diff --git a/.gitignore b/.gitignore index f2cfacd..933e513 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ node_modules *.log /dist/* !/dist/index.js +!/dist/pnpm.js tmp temp *.tmp diff --git a/dist/index.js b/dist/index.js index bc0966b..a895831 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,38 +1,10 @@ -(()=>{var __webpack_modules__={8243:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=r(3031);const s=n(r(4694));const o=n(r(1142));const a=n(r(2759));const u=n(r(4207));const l=n(r(5659));async function main(){const e=(0,s.default)();const t=(0,i.getState)("is_post");if(t==="true")return(0,l.default)(e);(0,i.saveState)("is_post","true");await(0,o.default)(e);console.log("Installation Completed!");(0,a.default)(e);(0,u.default)(e)}main().catch((e=>{console.error(e);(0,i.setFailed)(e)}))},4694:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getInputs=void 0;const i=r(3031);const s=n(r(4790));const o=r(5400);const a={required:true};const parseInputPath=e=>(0,s.default)((0,i.getInput)(e,a));const getInputs=()=>({version:(0,i.getInput)("version"),dest:parseInputPath("dest"),runInstall:(0,o.parseRunInstall)("run_install")});t.getInputs=getInputs;t["default"]=t.getInputs},5400:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.parseRunInstall=void 0;const i=r(3031);const s=n(r(8438));const o=r(3639);const a=n(r(7282));const u=n(r(5379));const l={required:true};function parseRunInstall(e){const t=(0,o.load)((0,i.getInput)(e,l));const r=new s.default({allErrors:true});const n=r.compile(u.default);if(!n(t)){for(const e of n.errors){(0,i.error)(`with.run_install${e.dataPath}: ${e.message}`)}return a.default.exit(1)}if(!t)return[];if(t===true)return[{recursive:true}];if(Array.isArray(t))return t;return[t]}t.parseRunInstall=parseRunInstall},1142:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.install=t.runSelfInstaller=void 0;const i=r(3031);const s=n(r(9536));t.runSelfInstaller=s.default;async function install(e){(0,i.startGroup)("Running self-installer...");const t=await(0,s.default)(e);(0,i.endGroup)();if(t){return(0,i.setFailed)(`Something went wrong, self-installer exits with code ${t}`)}}t.install=install;t["default"]=install},9536:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.runSelfInstaller=void 0;const i=r(3031);const s=n(r(2043));const o=r(2081);const a=r(5176);const u=n(r(1017));const l=r(7282);async function runSelfInstaller(e){const{version:t,dest:r}=e;await(0,a.remove)(r);const n=u.default.join(r,"package.json");await(0,a.ensureFile)(n);await(0,a.writeFile)(n,JSON.stringify({private:true}));const c=await readTarget(t);const f=(0,o.spawn)(l.execPath,["-","install",c,"--no-lockfile"],{cwd:r,stdio:["pipe","inherit","inherit"]});const d=await(0,s.default)("https://get.pnpm.io/v6.16.js");if(!d.body)throw new Error("Did not receive response body");d.body.pipe(f.stdin);const p=await new Promise(((e,t)=>{f.on("error",t);f.on("close",e)}));if(p===0){const e=u.default.join(r,"node_modules/.bin");(0,i.addPath)(e);(0,i.exportVariable)("PNPM_HOME",e)}return p}t.runSelfInstaller=runSelfInstaller;async function readTarget(e){if(e)return`pnpm@${e}`;const{GITHUB_WORKSPACE:t}=process.env;if(!t){throw new Error(`No workspace is found.\nIf you're intended to let pnpm/action-setup read preferred pnpm version from the "packageManager" field in the package.json file,\nplease run the actions/checkout before pnpm/action-setup.\nOtherwise, please specify the pnpm version in the action configuration.`)}const{packageManager:r}=JSON.parse(await(0,a.readFile)(u.default.join(t,"package.json"),"utf8"));if(typeof r!=="string"){throw new Error(`No pnpm version is specified.\nPlease specify it by one of the following ways:\n - in the GitHub Action config with the key "version"\n - in the package.json with the key "packageManager" (See https://nodejs.org/api/corepack.html)`)}if(!r.startsWith("pnpm@")){throw new Error("Invalid packageManager field in package.json")}return r}t["default"]=runSelfInstaller},2759:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setOutputs=void 0;const n=r(3031);const i=r(6392);function setOutputs(e){const t=(0,i.getBinDest)(e);(0,n.addPath)(t);(0,n.setOutput)("dest",e.dest);(0,n.setOutput)("bin_dest",t)}t.setOutputs=setOutputs;t["default"]=setOutputs},4207:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.runPnpmInstall=void 0;const n=r(3031);const i=r(2081);const s=r(6392);function runPnpmInstall(e){const t=(0,s.patchPnpmEnv)(e);for(const r of e.runInstall){const e=["install"];if(r.recursive)e.unshift("recursive");if(r.args)e.push(...r.args);const s=["pnpm",...e].join(" ");(0,n.startGroup)(`Running ${s}...`);const{error:o,status:a}=(0,i.spawnSync)("pnpm",e,{stdio:"inherit",cwd:r.cwd,shell:true,env:t});(0,n.endGroup)();if(o){(0,n.setFailed)(o);continue}if(a){(0,n.setFailed)(`Command ${s} (cwd: ${r.cwd}) exits with status ${a}`);continue}}}t.runPnpmInstall=runPnpmInstall;t["default"]=runPnpmInstall},5659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.pruneStore=void 0;const n=r(3031);const i=r(2081);const s=r(6392);function pruneStore(e){if(e.runInstall.length===0){console.log("Pruning is unnecessary.");return}(0,n.startGroup)("Running pnpm store prune...");const{error:t,status:r}=(0,i.spawnSync)("pnpm",["store","prune"],{stdio:"inherit",shell:true,env:(0,s.patchPnpmEnv)(e)});(0,n.endGroup)();if(t){(0,n.warning)(t);return}if(r){(0,n.warning)(`command pnpm store prune exits with code ${r}`);return}}t.pruneStore=pruneStore;t["default"]=pruneStore},6392:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.patchPnpmEnv=t.getBinDest=void 0;const i=n(r(1017));const s=n(r(7282));const getBinDest=e=>i.default.join(e.dest,"node_modules",".bin");t.getBinDest=getBinDest;const patchPnpmEnv=e=>({...s.default.env,PATH:(0,t.getBinDest)(e)+i.default.delimiter+s.default.env.PATH});t.patchPnpmEnv=patchPnpmEnv},8302:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const o=s(r(2037));const a=r(8541);function issueCommand(e,t,r){const n=new Command(e,t,r);process.stdout.write(n.toString()+o.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const u="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=u+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const n=this.properties[r];if(n){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(n)}`}}}}e+=`${u}${escapeData(this.message)}`;return e}}function escapeData(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},3031:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const a=r(8302);const u=r(1234);const l=r(8541);const c=s(r(2037));const f=s(r(1017));const d=r(9946);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const r=l.toCommandValue(t);process.env[e]=r;const n=process.env["GITHUB_ENV"]||"";if(n){const t="_GitHubActionsFileCommandDelimeter_";const n=`${e}<<${t}${c.EOL}${r}${c.EOL}${t}`;u.issueCommand("ENV",n)}else{a.issueCommand("set-env",{name:e},r)}}t.exportVariable=exportVariable;function setSecret(e){a.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){u.issueCommand("PATH",e)}else{a.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${f.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return r}return r.trim()}t.getInput=getInput;function getMultilineInput(e,t){const r=getInput(e,t).split("\n").filter((e=>e!==""));return r}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const r=["true","True","TRUE"];const n=["false","False","FALSE"];const i=getInput(e,t);if(r.includes(i))return true;if(n.includes(i))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){process.stdout.write(c.EOL);a.issueCommand("set-output",{name:e},t)}t.setOutput=setOutput;function setCommandEcho(e){a.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=p.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){a.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){a.issueCommand("error",l.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){a.issueCommand("warning",l.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){a.issueCommand("notice",l.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+c.EOL)}t.info=info;function startGroup(e){a.issue("group",e)}t.startGroup=startGroup;function endGroup(){a.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return o(this,void 0,void 0,(function*(){startGroup(e);let r;try{r=yield t()}finally{endGroup()}return r}))}t.group=group;function saveState(e,t){a.issueCommand("save-state",{name:e},t)}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return o(this,void 0,void 0,(function*(){return yield d.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken},1234:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issueCommand=void 0;const o=s(r(7147));const a=s(r(2037));const u=r(8541);function issueCommand(e,t){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!o.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}o.appendFileSync(r,`${u.toCommandValue(t)}${a.EOL}`,{encoding:"utf8"})}t.issueCommand=issueCommand},9946:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const i=r(9875);const s=r(2760);const o=r(3031);class OidcClient{static createHttpClient(e=true,t=10){const r={allowRetries:e,maxRetries:t};return new i.HttpClient("actions/oidc-client",[new s.BearerCredentialHandler(OidcClient.getRequestToken())],r)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var t;return n(this,void 0,void 0,(function*(){const r=OidcClient.createHttpClient();const n=yield r.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.result.message}`)}));const i=(t=n.result)===null||t===void 0?void 0:t.value;if(!i){throw new Error("Response json body do not have ID Token field")}return i}))}static getIDToken(e){return n(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const r=encodeURIComponent(e);t=`${t}&audience=${r}`}o.debug(`ID token url is ${t}`);const r=yield OidcClient.getCall(t);o.setSecret(r);return r}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},8541:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandProperties=t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}t.toCommandProperties=toCommandProperties},2760:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from(this.username+":"+this.password).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,t,r){return null}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Bearer "+this.token}canHandleAuthentication(e){return false}handleAuthentication(e,t,r){return null}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from("PAT:"+this.token).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,t,r){return null}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},9875:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(3685);const i=r(5687);const s=r(6502);let o;var a;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(a=t.HttpCodes||(t.HttpCodes={}));var u;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(u=t.Headers||(t.Headers={}));var l;(function(e){e["ApplicationJson"]="application/json"})(l=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){let t=s.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const c=[a.MovedPermanently,a.ResourceMoved,a.SeeOther,a.TemporaryRedirect,a.PermanentRedirect];const f=[a.BadGateway,a.ServiceUnavailable,a.GatewayTimeout];const d=["OPTIONS","GET","DELETE","HEAD"];const p=10;const h=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return new Promise((async(e,t)=>{let r=Buffer.alloc(0);this.message.on("data",(e=>{r=Buffer.concat([r,e])}));this.message.on("end",(()=>{e(r.toString())}))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){let t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,r){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,t){return this.request("OPTIONS",e,null,t||{})}get(e,t){return this.request("GET",e,null,t||{})}del(e,t){return this.request("DELETE",e,null,t||{})}post(e,t,r){return this.request("POST",e,t,r||{})}patch(e,t,r){return this.request("PATCH",e,t,r||{})}put(e,t,r){return this.request("PUT",e,t,r||{})}head(e,t){return this.request("HEAD",e,null,t||{})}sendStream(e,t,r,n){return this.request(e,t,r,n)}async getJson(e,t={}){t[u.Accept]=this._getExistingOrDefaultHeader(t,u.Accept,l.ApplicationJson);let r=await this.get(e,t);return this._processResponse(r,this.requestOptions)}async postJson(e,t,r={}){let n=JSON.stringify(t,null,2);r[u.Accept]=this._getExistingOrDefaultHeader(r,u.Accept,l.ApplicationJson);r[u.ContentType]=this._getExistingOrDefaultHeader(r,u.ContentType,l.ApplicationJson);let i=await this.post(e,n,r);return this._processResponse(i,this.requestOptions)}async putJson(e,t,r={}){let n=JSON.stringify(t,null,2);r[u.Accept]=this._getExistingOrDefaultHeader(r,u.Accept,l.ApplicationJson);r[u.ContentType]=this._getExistingOrDefaultHeader(r,u.ContentType,l.ApplicationJson);let i=await this.put(e,n,r);return this._processResponse(i,this.requestOptions)}async patchJson(e,t,r={}){let n=JSON.stringify(t,null,2);r[u.Accept]=this._getExistingOrDefaultHeader(r,u.Accept,l.ApplicationJson);r[u.ContentType]=this._getExistingOrDefaultHeader(r,u.ContentType,l.ApplicationJson);let i=await this.patch(e,n,r);return this._processResponse(i,this.requestOptions)}async request(e,t,r,n){if(this._disposed){throw new Error("Client has already been disposed.")}let i=new URL(t);let s=this._prepareRequest(e,i,n);let o=this._allowRetries&&d.indexOf(e)!=-1?this._maxRetries+1:1;let u=0;let l;while(u0){const o=l.message.headers["location"];if(!o){break}let a=new URL(o);if(i.protocol=="https:"&&i.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.")}await l.readBody();if(a.hostname!==i.hostname){for(let e in n){if(e.toLowerCase()==="authorization"){delete n[e]}}}s=this._prepareRequest(e,a,n);l=await this.requestRaw(s,r);t--}if(f.indexOf(l.message.statusCode)==-1){return l}u+=1;if(u{let callbackForResult=function(e,t){if(e){n(e)}r(t)};this.requestRawWithCallback(e,t,callbackForResult)}))}requestRawWithCallback(e,t,r){let n;if(typeof t==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let i=false;let handleResult=(e,t)=>{if(!i){i=true;r(e,t)}};let s=e.httpModule.request(e.options,(e=>{let t=new HttpClientResponse(e);handleResult(null,t)}));s.on("socket",(e=>{n=e}));s.setTimeout(this._socketTimeout||3*6e4,(()=>{if(n){n.end()}handleResult(new Error("Request timeout: "+e.options.path),null)}));s.on("error",(function(e){handleResult(e,null)}));if(t&&typeof t==="string"){s.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){s.end()}));t.pipe(s)}else{s.end()}}getAgent(e){let t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,r){const s={};s.parsedUrl=t;const o=s.parsedUrl.protocol==="https:";s.httpModule=o?i:n;const a=o?443:80;s.options={};s.options.host=s.parsedUrl.hostname;s.options.port=s.parsedUrl.port?parseInt(s.parsedUrl.port):a;s.options.path=(s.parsedUrl.pathname||"")+(s.parsedUrl.search||"");s.options.method=e;s.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){s.options.headers["user-agent"]=this.userAgent}s.options.agent=this._getAgent(s.parsedUrl);if(this.handlers){this.handlers.forEach((e=>{e.prepareRequest(s.options)}))}return s}_mergeHeaders(e){const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,r){const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{});let n;if(this.requestOptions&&this.requestOptions.headers){n=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||n||r}_getAgent(e){let t;let a=s.getProxyUrl(e);let u=a&&a.hostname;if(this._keepAlive&&u){t=this._proxyAgent}if(this._keepAlive&&!u){t=this._agent}if(!!t){return t}const l=e.protocol==="https:";let c=100;if(!!this.requestOptions){c=this.requestOptions.maxSockets||n.globalAgent.maxSockets}if(u){if(!o){o=r(1353)}const e={maxSockets:c,keepAlive:this._keepAlive,proxy:{...(a.username||a.password)&&{proxyAuth:`${a.username}:${a.password}`},host:a.hostname,port:a.port}};let n;const i=a.protocol==="https:";if(l){n=i?o.httpsOverHttps:o.httpsOverHttp}else{n=i?o.httpOverHttps:o.httpOverHttp}t=n(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:c};t=l?new i.Agent(e):new n.Agent(e);this._agent=t}if(!t){t=l?i.globalAgent:n.globalAgent}if(l&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){e=Math.min(p,e);const t=h*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}static dateTimeDeserializer(e,t){if(typeof t==="string"){let e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}async _processResponse(e,t){return new Promise((async(r,n)=>{const i=e.message.statusCode;const s={statusCode:i,result:null,headers:{}};if(i==a.NotFound){r(s)}let o;let u;try{u=await e.readBody();if(u&&u.length>0){if(t&&t.deserializeDates){o=JSON.parse(u,HttpClient.dateTimeDeserializer)}else{o=JSON.parse(u)}s.result=o}s.headers=e.message.headers}catch(e){}if(i>299){let e;if(o&&o.message){e=o.message}else if(u&&u.length>0){e=u}else{e="Failed request: ("+i+")"}let t=new HttpClientError(e,i);t.result=s.result;n(t)}else{r(s)}}))}}t.HttpClient=HttpClient},6502:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function getProxyUrl(e){let t=e.protocol==="https:";let r;if(checkBypass(e)){return r}let n;if(t){n=process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{n=process.env["http_proxy"]||process.env["HTTP_PROXY"]}if(n){r=new URL(n)}return r}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}let t=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!t){return false}let r;if(e.port){r=Number(e.port)}else if(e.protocol==="http:"){r=80}else if(e.protocol==="https:"){r=443}let n=[e.hostname.toUpperCase()];if(typeof r==="number"){n.push(`${n[0]}:${r}`)}for(let e of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(n.some((t=>t===e))){return true}}return false}t.checkBypass=checkBypass},5774:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});i(r(8348),t);i(r(1598),t);i(r(9844),t);i(r(899),t);i(r(9884),t);i(r(8289),t);i(r(6106),t);i(r(3551),t);i(r(2129),t);i(r(6499),t);i(r(6677),t);i(r(7792),t);i(r(3496),t);i(r(1589),t);i(r(6759),t);i(r(6688),t);i(r(1703),t);i(r(5743),t);i(r(1314),t);i(r(7644),t);i(r(2072),t)},8348:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.contextLogger=void 0;const i=n(r(2491));t.contextLogger=(0,i.default)("context")},1598:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.deprecationLogger=void 0;const i=n(r(2491));t.deprecationLogger=(0,i.default)("deprecation")},9844:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.fetchingProgressLogger=void 0;const i=n(r(2491));t.fetchingProgressLogger=(0,i.default)("fetching-progress")},899:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.hookLogger=void 0;const i=n(r(2491));t.hookLogger=(0,i.default)("hook")},6109:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});i(r(5774),t)},9884:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.installCheckLogger=void 0;const i=n(r(2491));t.installCheckLogger=(0,i.default)("install-check")},8289:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.lifecycleLogger=void 0;const i=n(r(2491));t.lifecycleLogger=(0,i.default)("lifecycle")},6106:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.linkLogger=void 0;const i=n(r(2491));t.linkLogger=(0,i.default)("link")},3551:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.packageImportMethodLogger=void 0;const i=n(r(2491));t.packageImportMethodLogger=(0,i.default)("package-import-method")},2129:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.packageManifestLogger=void 0;const i=n(r(2491));t.packageManifestLogger=(0,i.default)("package-manifest")},6499:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.peerDependencyIssuesLogger=void 0;const i=n(r(2491));t.peerDependencyIssuesLogger=(0,i.default)("peer-dependency-issues")},6677:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.progressLogger=void 0;const i=n(r(2491));t.progressLogger=(0,i.default)("progress")},7792:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true})},3496:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.removalLogger=void 0;const i=n(r(2491));t.removalLogger=(0,i.default)("removal")},1589:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.requestRetryLogger=void 0;const i=n(r(2491));t.requestRetryLogger=(0,i.default)("request-retry")},6759:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.rootLogger=void 0;const i=n(r(2491));t.rootLogger=(0,i.default)("root")},6688:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.scopeLogger=void 0;const i=n(r(2491));t.scopeLogger=(0,i.default)("scope")},1703:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.skippedOptionalDependencyLogger=void 0;const i=n(r(2491));t.skippedOptionalDependencyLogger=(0,i.default)("skipped-optional-dependency")},5743:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.stageLogger=void 0;const i=n(r(2491));t.stageLogger=(0,i.default)("stage")},1314:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.statsLogger=void 0;const i=n(r(2491));t.statsLogger=(0,i.default)("stats")},7644:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.summaryLogger=void 0;const i=n(r(2491));t.summaryLogger=(0,i.default)("summary")},2072:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.updateCheckLogger=void 0;const i=n(r(2491));t.updateCheckLogger=(0,i.default)("update-check")},239:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.ResponseError=t.isRedirect=t.Response=void 0;const o=r(6109);const a=r(461);const u=s(r(3793));Object.defineProperty(t,"Response",{enumerable:true,get:function(){return u.Response}});t.isRedirect=u.default.isRedirect;async function fetchRetry(e,t={}){var r,n,i,s,l;const c=(r=t.retry)!==null&&r!==void 0?r:{};const f=(n=c.retries)!==null&&n!==void 0?n:2;const d=(0,a.operation)({factor:(i=c.factor)!==null&&i!==void 0?i:10,maxTimeout:(s=c.maxTimeout)!==null&&s!==void 0?s:6e4,minTimeout:(l=c.minTimeout)!==null&&l!==void 0?l:1e4,randomize:false,retries:f});try{return await new Promise(((r,n)=>d.attempt((async i=>{var s;try{const n=await(0,u.default)(e,t);if(n.status>=500&&n.status<600||[408,409,420,429].includes(n.status)){throw new ResponseError(n)}else{r(n);return}}catch(r){const a=d.retry(r);if(a===false){n(d.mainError());return}o.requestRetryLogger.debug({attempt:i,error:r,maxRetries:f,method:(s=t.method)!==null&&s!==void 0?s:"GET",timeout:a,url:e.toString()})}}))))}catch(e){if(e instanceof ResponseError){return e.res}throw e}}t["default"]=fetchRetry;class ResponseError extends Error{constructor(e){super(e.statusText);if(Error.captureStackTrace){Error.captureStackTrace(this,ResponseError)}this.name=this.constructor.name;this.res=e;this.code=this.status=this.statusCode=e.status;this.url=e.url}}t.ResponseError=ResponseError},5239:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.fetchWithAgent=void 0;const a=r(7310);const u=o(r(5844));const l=s(r(239));const c="pnpm";const f="application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*";const d="application/json";const p=20;function fetchWithAgent(e,t){var r,n;const i=(0,u.default)(e.toString(),{...t.agentOptions,strictSsl:(r=t.agentOptions.strictSsl)!==null&&r!==void 0?r:true});const s=(n=t.headers)!==null&&n!==void 0?n:{};s["connection"]=i?"keep-alive":"close";return(0,l.default)(e,{...t,agent:i})}t.fetchWithAgent=fetchWithAgent;function default_1(e){return async(t,r)=>{var n,i,s;const o={"user-agent":c,...getHeaders({auth:r===null||r===void 0?void 0:r.authHeaderValue,fullMetadata:e.fullMetadata,userAgent:e.userAgent})};let u=0;let f=new a.URL(t);const d=f.host;while(true){const t={...e,...r,strictSsl:(n=e.strictSsl)!==null&&n!==void 0?n:true};const c=await fetchWithAgent(f,{agentOptions:t,compress:(i=r===null||r===void 0?void 0:r.compress)!==null&&i!==void 0?i:false,headers:o,redirect:"manual",retry:r===null||r===void 0?void 0:r.retry,timeout:(s=r===null||r===void 0?void 0:r.timeout)!==null&&s!==void 0?s:6e4});if(!(0,l.isRedirect)(c.status)||u>=p){return c}u++;f=new a.URL(c.headers.get("location"));if(!o["authorization"]||d===f.host)continue;delete o.authorization}}}t["default"]=default_1;function getHeaders(e){const t={accept:e.fullMetadata===true?d:f};if(e.auth){t["authorization"]=e.auth}if(e.userAgent){t["user-agent"]=e.userAgent}return t}},2043:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.fetchWithAgent=t.createFetchFromRegistry=void 0;const a=o(r(239));const u=s(r(5239));t.createFetchFromRegistry=u.default;Object.defineProperty(t,"fetchWithAgent",{enumerable:true,get:function(){return u.fetchWithAgent}});t["default"]=a.default},2491:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.writeToConsole=t.createStreamParser=t.streamParser=t.globalWarn=t.globalInfo=void 0;const n=r(9344);Object.defineProperty(t,"globalInfo",{enumerable:true,get:function(){return n.globalInfo}});Object.defineProperty(t,"globalWarn",{enumerable:true,get:function(){return n.globalWarn}});const i=r(7234);t.streamParser=i.default;Object.defineProperty(t,"createStreamParser",{enumerable:true,get:function(){return i.createStreamParser}});const s=r(9815);t.writeToConsole=s.default;t["default"]=n.default},9344:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.globalInfo=t.globalWarn=void 0;const n=r(5631);n.setFastTime();t["default"]=n("pnpm");const i=n("pnpm:global");function globalWarn(e){i.warn(e)}t.globalWarn=globalWarn;function globalInfo(e){i.info(e)}t.globalInfo=globalInfo},7234:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createStreamParser=void 0;const n=r(5631);const i=r(9847);t["default"]=createStreamParser();function createStreamParser(){const e=i.parse();n.output([{level:"debug",stream:e}]);return e}t.createStreamParser=createStreamParser},9815:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(5631);function default_1(){n.output([{level:"debug",stream:process.stdout}])}t["default"]=default_1},5844:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=r(7310);const s=n(r(3194));const o=n(r(5283));const a=n(r(72));const u=n(r(1296));const l=n(r(329));const c=s.default.HttpsAgent;const f=50;const d=new u.default({max:50});function getAgent(e,t){var r,n,o;const a=new i.URL(e);const u=a.protocol==="https:";const l=getProxyUri(e,t);const p=[`https:${u.toString()}`,l?`proxy:${l.protocol}//${l.username}:${l.password}@${l.host}:${l.port}`:">no-proxy<",`local-address:${(r=t.localAddress)!==null&&r!==void 0?r:">no-local-address<"}`,`strict-ssl:${u?Boolean(t.strictSsl).toString():">no-strict-ssl<"}`,`ca:${u&&t.ca||">no-ca<"}`,`cert:${u&&t.cert||">no-cert<"}`,`key:${u&&t.key||">no-key<"}`].join(":");if(d.peek(p)){return d.get(p)}if(l){const e=getProxy(l,t,u);d.set(p,e);return e}const h=typeof t.timeout!=="number"||t.timeout===0?0:t.timeout+1;const m=u?new c({ca:t.ca,cert:t.cert,key:t.key,localAddress:t.localAddress,maxSockets:(n=t.maxSockets)!==null&&n!==void 0?n:f,rejectUnauthorized:t.strictSsl,timeout:h}):new s.default({localAddress:t.localAddress,maxSockets:(o=t.maxSockets)!==null&&o!==void 0?o:f,timeout:h});d.set(p,m);return m}t["default"]=getAgent;function checkNoProxy(e,t){const r=new i.URL(e).hostname.split(".").filter((e=>e)).reverse();if(typeof t.noProxy==="string"){const e=t.noProxy.split(/\s*,\s*/g);return e.some((e=>{const t=e.split(".").filter((e=>e)).reverse();if(t.length===0){return false}for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});function once(e,t,{signal:r}={}){return new Promise(((n,i)=>{function cleanup(){r===null||r===void 0?void 0:r.removeEventListener("abort",cleanup);e.removeListener(t,onEvent);e.removeListener("error",onError)}function onEvent(...e){cleanup();n(e)}function onError(e){cleanup();i(e)}r===null||r===void 0?void 0:r.addEventListener("abort",cleanup);e.on(t,onEvent);e.on("error",onError)}))}t["default"]=once},461:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createTimeout=t.createTimeouts=t.operation=void 0;const n=r(2798);function operation(e){var t=createTimeouts(e);return new n.default(t,{maxRetryTime:e&&e.maxRetryTime})}t.operation=operation;function createTimeouts(e){var t={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:Infinity,randomize:false,...e};if(t.minTimeout>t.maxTimeout){throw new Error("minTimeout is greater than maxTimeout")}var r=[];for(var n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:true});class RetryOperation{constructor(e,t){var r;this._originalTimeouts=[...e];this._timeouts=e;this._maxRetryTime=(r=t===null||t===void 0?void 0:t.maxRetryTime)!==null&&r!==void 0?r:Infinity;this._fn=null;this._errors=[];this._attempts=1;this._operationStart=null;this._timer=null}reset(){this._attempts=1;this._timeouts=this._originalTimeouts}stop(){if(this._timer){clearTimeout(this._timer)}this._timeouts=[]}retry(e){if(!e){return false}var t=(new Date).getTime();if(e&&t-this._operationStart>=this._maxRetryTime){this._errors.unshift(new Error("RetryOperation timeout occurred"));return false}this._errors.push(e);var r=this._timeouts.shift();if(r===undefined){return false}this._timer=setTimeout((()=>this._fn(++this._attempts)),r);return r}attempt(e){this._fn=e;this._operationStart=(new Date).getTime();this._fn(this._attempts)}errors(){return this._errors}attempts(){return this._attempts}mainError(){if(this._errors.length===0){return null}var e={};var t=null;var r=0;for(var n=0;n=r){t=i;r=o}}return t}}t["default"]=RetryOperation},5689:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const i=r(2361);const s=n(r(5598));const o=n(r(2135));const a=s.default("agent-base");function isAgent(e){return Boolean(e)&&typeof e.addRequest==="function"}function isSecureEndpoint(){const{stack:e}=new Error;if(typeof e!=="string")return false;return e.split("\n").some((e=>e.indexOf("(https.js:")!==-1||e.indexOf("node:https:")!==-1))}function createAgent(e,t){return new createAgent.Agent(e,t)}(function(e){class Agent extends i.EventEmitter{constructor(e,t){super();let r=t;if(typeof e==="function"){this.callback=e}else if(e){r=e}this.timeout=null;if(r&&typeof r.timeout==="number"){this.timeout=r.timeout}this.maxFreeSockets=1;this.maxSockets=1;this.maxTotalSockets=Infinity;this.sockets={};this.freeSockets={};this.requests={};this.options={}}get defaultPort(){if(typeof this.explicitDefaultPort==="number"){return this.explicitDefaultPort}return isSecureEndpoint()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){if(typeof this.explicitProtocol==="string"){return this.explicitProtocol}return isSecureEndpoint()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,t,r){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,t){const r=Object.assign({},t);if(typeof r.secureEndpoint!=="boolean"){r.secureEndpoint=isSecureEndpoint()}if(r.host==null){r.host="localhost"}if(r.port==null){r.port=r.secureEndpoint?443:80}if(r.protocol==null){r.protocol=r.secureEndpoint?"https:":"http:"}if(r.host&&r.path){delete r.path}delete r.agent;delete r.hostname;delete r._defaultAgent;delete r.defaultPort;delete r.createConnection;e._last=true;e.shouldKeepAlive=false;let n=false;let i=null;const s=r.timeout||this.timeout;const onerror=t=>{if(e._hadError)return;e.emit("error",t);e._hadError=true};const ontimeout=()=>{i=null;n=true;const e=new Error(`A "socket" was not created for HTTP request before ${s}ms`);e.code="ETIMEOUT";onerror(e)};const callbackError=e=>{if(n)return;if(i!==null){clearTimeout(i);i=null}onerror(e)};const onsocket=t=>{if(n)return;if(i!=null){clearTimeout(i);i=null}if(isAgent(t)){a("Callback returned another Agent instance %o",t.constructor.name);t.addRequest(e,r);return}if(t){t.once("free",(()=>{this.freeSocket(t,r)}));e.onSocket(t);return}const s=new Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``);onerror(s)};if(typeof this.callback!=="function"){onerror(new Error("`callback` is not defined"));return}if(!this.promisifiedCallback){if(this.callback.length>=3){a("Converting legacy callback function to promise");this.promisifiedCallback=o.default(this.callback)}else{this.promisifiedCallback=this.callback}}if(typeof s==="number"&&s>0){i=setTimeout(ontimeout,s)}if("port"in r&&typeof r.port!=="number"){r.port=Number(r.port)}try{a("Resolving socket for %o request: %o",r.protocol,`${e.method} ${e.path}`);Promise.resolve(this.promisifiedCallback(e,r)).then(onsocket,callbackError)}catch(e){Promise.reject(e).catch(callbackError)}}freeSocket(e,t){a("Freeing socket %o %o",e.constructor.name,t);e.destroy()}destroy(){a("Destroying agent %o",this.constructor.name)}}e.Agent=Agent;e.prototype=e.Agent.prototype})(createAgent||(createAgent={}));e.exports=createAgent},2135:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function promisify(e){return function(t,r){return new Promise(((n,i)=>{e.call(this,t,r,((e,t)=>{if(e){i(e)}else{n(t)}}))}))}}t["default"]=promisify},3194:(e,t,r)=>{"use strict";e.exports=r(8238);e.exports.HttpsAgent=r(5862);e.exports.constants=r(5483)},8238:(e,t,r)=>{"use strict";const n=r(3685).Agent;const i=r(979);const s=r(5598)("agentkeepalive");const o=r(9386)("agentkeepalive");const{INIT_SOCKET:a,CURRENT_ID:u,CREATE_ID:l,SOCKET_CREATED_TIME:c,SOCKET_NAME:f,SOCKET_REQUEST_COUNT:d,SOCKET_REQUEST_FINISHED_COUNT:p}=r(5483);let h=1;const m=parseInt(process.version.split(".",1)[0].substring(1));if(m>=11&&m<=12){h=2}else if(m>=13){h=3}class Agent extends n{constructor(e){e=e||{};e.keepAlive=e.keepAlive!==false;if(e.freeSocketTimeout===undefined){e.freeSocketTimeout=4e3}if(e.keepAliveTimeout){o("options.keepAliveTimeout is deprecated, please use options.freeSocketTimeout instead");e.freeSocketTimeout=e.keepAliveTimeout;delete e.keepAliveTimeout}if(e.freeSocketKeepAliveTimeout){o("options.freeSocketKeepAliveTimeout is deprecated, please use options.freeSocketTimeout instead");e.freeSocketTimeout=e.freeSocketKeepAliveTimeout;delete e.freeSocketKeepAliveTimeout}if(e.timeout===undefined){e.timeout=Math.max(e.freeSocketTimeout*2,8e3)}e.timeout=i(e.timeout);e.freeSocketTimeout=i(e.freeSocketTimeout);e.socketActiveTTL=e.socketActiveTTL?i(e.socketActiveTTL):0;super(e);this[u]=0;this.createSocketCount=0;this.createSocketCountLastCheck=0;this.createSocketErrorCount=0;this.createSocketErrorCountLastCheck=0;this.closeSocketCount=0;this.closeSocketCountLastCheck=0;this.errorSocketCount=0;this.errorSocketCountLastCheck=0;this.requestCount=0;this.requestCountLastCheck=0;this.timeoutSocketCount=0;this.timeoutSocketCountLastCheck=0;this.on("free",(e=>{const t=this.calcSocketTimeout(e);if(t>0&&e.timeout!==t){e.setTimeout(t)}}))}get freeSocketKeepAliveTimeout(){o("agent.freeSocketKeepAliveTimeout is deprecated, please use agent.options.freeSocketTimeout instead");return this.options.freeSocketTimeout}get timeout(){o("agent.timeout is deprecated, please use agent.options.timeout instead");return this.options.timeout}get socketActiveTTL(){o("agent.socketActiveTTL is deprecated, please use agent.options.socketActiveTTL instead");return this.options.socketActiveTTL}calcSocketTimeout(e){let t=this.options.freeSocketTimeout;const r=this.options.socketActiveTTL;if(r){const n=Date.now()-e[c];const i=r-n;if(i<=0){return i}if(t&&i{if(r)return;r=true;if(n){this.createSocketErrorCount++;return t(n)}this[a](i,e);t(n,i)};const n=super.createConnection(e,onNewCreate);if(n)onNewCreate(null,n)}get statusChanged(){const e=this.createSocketCount!==this.createSocketCountLastCheck||this.createSocketErrorCount!==this.createSocketErrorCountLastCheck||this.closeSocketCount!==this.closeSocketCountLastCheck||this.errorSocketCount!==this.errorSocketCountLastCheck||this.timeoutSocketCount!==this.timeoutSocketCountLastCheck||this.requestCount!==this.requestCountLastCheck;if(e){this.createSocketCountLastCheck=this.createSocketCount;this.createSocketErrorCountLastCheck=this.createSocketErrorCount;this.closeSocketCountLastCheck=this.closeSocketCount;this.errorSocketCountLastCheck=this.errorSocketCount;this.timeoutSocketCountLastCheck=this.timeoutSocketCount;this.requestCountLastCheck=this.requestCount}return e}getCurrentStatus(){return{createSocketCount:this.createSocketCount,createSocketErrorCount:this.createSocketErrorCount,closeSocketCount:this.closeSocketCount,errorSocketCount:this.errorSocketCount,timeoutSocketCount:this.timeoutSocketCount,requestCount:this.requestCount,freeSockets:inspect(this.freeSockets),sockets:inspect(this.sockets),requests:inspect(this.requests)}}}function getSocketTimeout(e){return e.timeout||e._idleTimeout}function installListeners(e,t,r){s("%s create, timeout %sms",t[f],getSocketTimeout(t));function onFree(){if(!t._httpMessage&&t[d]===1)return;t[p]++;e.requestCount++;s("%s(requests: %s, finished: %s) free",t[f],t[d],t[p]);const n=e.getName(r);if(t.writable&&e.requests[n]&&e.requests[n].length){t[d]++;s("%s(requests: %s, finished: %s) will be reuse on agent free event",t[f],t[d],t[p])}}t.on("free",onFree);function onClose(r){s("%s(requests: %s, finished: %s) close, isError: %s",t[f],t[d],t[p],r);e.closeSocketCount++}t.on("close",onClose);function onTimeout(){const n=t.listeners("timeout").length;const i=getSocketTimeout(t);const o=t._httpMessage;const a=o&&o.listeners("timeout").length||0;s("%s(requests: %s, finished: %s) timeout after %sms, listeners %s, defaultTimeoutListenerCount %s, hasHttpRequest %s, HttpRequest timeoutListenerCount %s",t[f],t[d],t[p],i,n,h,!!o,a);if(s.enabled){s("timeout listeners: %s",t.listeners("timeout").map((e=>e.name)).join(", "))}e.timeoutSocketCount++;const u=e.getName(r);if(e.freeSockets[u]&&e.freeSockets[u].indexOf(t)!==-1){t.destroy();e.removeSocket(t,r);s("%s is free, destroy quietly",t[f])}else{if(a===0){const n=new Error("Socket timeout");n.code="ERR_SOCKET_TIMEOUT";n.timeout=i;t.destroy(n);e.removeSocket(t,r);s("%s destroy with timeout error",t[f])}}}t.on("timeout",onTimeout);function onError(r){const n=t.listeners("error").length;s("%s(requests: %s, finished: %s) error: %s, listenerCount: %s",t[f],t[d],t[p],r,n);e.errorSocketCount++;if(n===1){s("%s emit uncaught error event",t[f]);t.removeListener("error",onError);t.emit("error",r)}}t.on("error",onError);function onRemove(){s("%s(requests: %s, finished: %s) agentRemove",t[f],t[d],t[p]);t.removeListener("close",onClose);t.removeListener("error",onError);t.removeListener("free",onFree);t.removeListener("timeout",onTimeout);t.removeListener("agentRemove",onRemove)}t.on("agentRemove",onRemove)}e.exports=Agent;function inspect(e){const t={};for(const r in e){t[r]=e[r].length}return t}},5483:e=>{"use strict";e.exports={CURRENT_ID:Symbol("agentkeepalive#currentId"),CREATE_ID:Symbol("agentkeepalive#createId"),INIT_SOCKET:Symbol("agentkeepalive#initSocket"),CREATE_HTTPS_CONNECTION:Symbol("agentkeepalive#createHttpsConnection"),SOCKET_CREATED_TIME:Symbol("agentkeepalive#socketCreatedTime"),SOCKET_NAME:Symbol("agentkeepalive#socketName"),SOCKET_REQUEST_COUNT:Symbol("agentkeepalive#socketRequestCount"),SOCKET_REQUEST_FINISHED_COUNT:Symbol("agentkeepalive#socketRequestFinishedCount")}},5862:(e,t,r)=>{"use strict";const n=r(5687).Agent;const i=r(8238);const{INIT_SOCKET:s,CREATE_HTTPS_CONNECTION:o}=r(5483);class HttpsAgent extends i{constructor(e){super(e);this.defaultPort=443;this.protocol="https:";this.maxCachedSessions=this.options.maxCachedSessions;if(this.maxCachedSessions===undefined){this.maxCachedSessions=100}this._sessionCache={map:{},list:[]}}createConnection(e){const t=this[o](e);this[s](t,e);return t}}HttpsAgent.prototype[o]=n.prototype.createConnection;["getName","_getSession","_cacheSession","_evictSession"].forEach((function(e){if(typeof n.prototype[e]==="function"){HttpsAgent.prototype[e]=n.prototype[e]}}));e.exports=HttpsAgent},8438:(e,t,r)=>{"use strict";var n=r(5391),i=r(6650),s=r(6281),o=r(5738),a=r(4486),u=r(229),l=r(6072),c=r(7178),f=r(3162);e.exports=Ajv;Ajv.prototype.validate=validate;Ajv.prototype.compile=compile;Ajv.prototype.addSchema=addSchema;Ajv.prototype.addMetaSchema=addMetaSchema;Ajv.prototype.validateSchema=validateSchema;Ajv.prototype.getSchema=getSchema;Ajv.prototype.removeSchema=removeSchema;Ajv.prototype.addFormat=addFormat;Ajv.prototype.errorsText=errorsText;Ajv.prototype._addSchema=_addSchema;Ajv.prototype._compile=_compile;Ajv.prototype.compileAsync=r(5911);var d=r(7975);Ajv.prototype.addKeyword=d.add;Ajv.prototype.getKeyword=d.get;Ajv.prototype.removeKeyword=d.remove;Ajv.prototype.validateKeyword=d.validate;var p=r(2485);Ajv.ValidationError=p.Validation;Ajv.MissingRefError=p.MissingRef;Ajv.$dataMetaSchema=c;var h="http://json-schema.org/draft-07/schema";var m=["removeAdditional","useDefaults","coerceTypes","strictDefaults"];var v=["/properties"];function Ajv(e){if(!(this instanceof Ajv))return new Ajv(e);e=this._opts=f.copy(e)||{};setLogger(this);this._schemas={};this._refs={};this._fragments={};this._formats=u(e.format);this._cache=e.cache||new s;this._loadingSchemas={};this._compilations=[];this.RULES=l();this._getId=chooseGetId(e);e.loopRequired=e.loopRequired||Infinity;if(e.errorDataPath=="property")e._errorDataPathProperty=true;if(e.serialize===undefined)e.serialize=a;this._metaOpts=getMetaSchemaOptions(this);if(e.formats)addInitialFormats(this);if(e.keywords)addInitialKeywords(this);addDefaultMetaSchema(this);if(typeof e.meta=="object")this.addMetaSchema(e.meta);if(e.nullable)this.addKeyword("nullable",{metaSchema:{type:"boolean"}});addInitialSchemas(this)}function validate(e,t){var r;if(typeof e=="string"){r=this.getSchema(e);if(!r)throw new Error('no schema with key or ref "'+e+'"')}else{var n=this._addSchema(e);r=n.validate||this._compile(n)}var i=r(t);if(r.$async!==true)this.errors=r.errors;return i}function compile(e,t){var r=this._addSchema(e,undefined,t);return r.validate||this._compile(r)}function addSchema(e,t,r,n){if(Array.isArray(e)){for(var s=0;s{"use strict";var t=e.exports=function Cache(){this._cache={}};t.prototype.put=function Cache_put(e,t){this._cache[e]=t};t.prototype.get=function Cache_get(e){return this._cache[e]};t.prototype.del=function Cache_del(e){delete this._cache[e]};t.prototype.clear=function Cache_clear(){this._cache={}}},5911:(e,t,r)=>{"use strict";var n=r(2485).MissingRef;e.exports=compileAsync;function compileAsync(e,t,r){var i=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");if(typeof t=="function"){r=t;t=undefined}var s=loadMetaSchemaOf(e).then((function(){var r=i._addSchema(e,undefined,t);return r.validate||_compileAsync(r)}));if(r){s.then((function(e){r(null,e)}),r)}return s;function loadMetaSchemaOf(e){var t=e.$schema;return t&&!i.getSchema(t)?compileAsync.call(i,{$ref:t},true):Promise.resolve()}function _compileAsync(e){try{return i._compile(e)}catch(e){if(e instanceof n)return loadMissingSchema(e);throw e}function loadMissingSchema(r){var n=r.missingSchema;if(added(n))throw new Error("Schema "+n+" is loaded but "+r.missingRef+" cannot be resolved");var s=i._loadingSchemas[n];if(!s){s=i._loadingSchemas[n]=i._opts.loadSchema(n);s.then(removePromise,removePromise)}return s.then((function(e){if(!added(n)){return loadMetaSchemaOf(e).then((function(){if(!added(n))i.addSchema(e,n,undefined,t)}))}})).then((function(){return _compileAsync(e)}));function removePromise(){delete i._loadingSchemas[n]}function added(e){return i._refs[e]||i._schemas[e]}}}}},2485:(e,t,r)=>{"use strict";var n=r(6650);e.exports={Validation:errorSubclass(ValidationError),MissingRef:errorSubclass(MissingRefError)};function ValidationError(e){this.message="validation failed";this.errors=e;this.ajv=this.validation=true}MissingRefError.message=function(e,t){return"can't resolve reference "+t+" from id "+e};function MissingRefError(e,t,r){this.message=r||MissingRefError.message(e,t);this.missingRef=n.url(e,t);this.missingSchema=n.normalizeId(n.fullPath(this.missingRef))}function errorSubclass(e){e.prototype=Object.create(Error.prototype);e.prototype.constructor=e;return e}},229:(e,t,r)=>{"use strict";var n=r(3162);var i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;var s=[0,31,28,31,30,31,30,31,31,30,31,30,31];var o=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;var a=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;var u=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var l=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var c=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;var f=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;var d=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;var p=/^(?:\/(?:[^~/]|~0|~1)*)*$/;var h=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;var m=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;e.exports=formats;function formats(e){e=e=="full"?"full":"fast";return n.copy(formats[e])}formats.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":c,url:f,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:d,"json-pointer":p,"json-pointer-uri-fragment":h,"relative-json-pointer":m};formats.full={date:date,time:time,"date-time":date_time,uri:uri,"uri-reference":l,"uri-template":c,url:f,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:d,"json-pointer":p,"json-pointer-uri-fragment":h,"relative-json-pointer":m};function isLeapYear(e){return e%4===0&&(e%100!==0||e%400===0)}function date(e){var t=e.match(i);if(!t)return false;var r=+t[1];var n=+t[2];var o=+t[3];return n>=1&&n<=12&&o>=1&&o<=(n==2&&isLeapYear(r)?29:s[n])}function time(e,t){var r=e.match(o);if(!r)return false;var n=r[1];var i=r[2];var s=r[3];var a=r[5];return(n<=23&&i<=59&&s<=59||n==23&&i==59&&s==60)&&(!t||a)}var v=/t|\s/i;function date_time(e){var t=e.split(v);return t.length==2&&date(t[0])&&time(t[1],true)}var g=/\/|:/;function uri(e){return g.test(e)&&u.test(e)}var y=/[^\\]\\Z/;function regex(e){if(y.test(e))return false;try{new RegExp(e);return true}catch(e){return false}}},5391:(e,t,r)=>{"use strict";var n=r(6650),i=r(3162),s=r(2485),o=r(4486);var a=r(734);var u=i.ucs2length;var l=r(3064);var c=s.Validation;e.exports=compile;function compile(e,t,r,f){var d=this,p=this._opts,h=[undefined],m={},v=[],g={},y=[],b={},S=[];t=t||{schema:e,refVal:h,refs:m};var w=checkCompiling.call(this,e,t,f);var _=this._compilations[w.index];if(w.compiling)return _.callValidate=callValidate;var E=this._formats;var k=this.RULES;try{var P=localCompile(e,t,r,f);_.validate=P;var C=_.callValidate;if(C){C.schema=P.schema;C.errors=null;C.refs=P.refs;C.refVal=P.refVal;C.root=P.root;C.$async=P.$async;if(p.sourceCode)C.source=P.source}return P}finally{endCompiling.call(this,e,t,f)}function callValidate(){var e=_.validate;var t=e.apply(this,arguments);callValidate.errors=e.errors;return t}function localCompile(e,r,o,f){var g=!r||r&&r.schema==e;if(r.schema!=t.schema)return compile.call(d,e,r,o,f);var b=e.$async===true;var w=a({isTop:true,schema:e,isRoot:g,baseId:f,root:r,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:s.MissingRef,RULES:k,validate:a,util:i,resolve:n,resolveRef:resolveRef,usePattern:usePattern,useDefault:useDefault,useCustomRule:useCustomRule,opts:p,formats:E,logger:d.logger,self:d});w=vars(h,refValCode)+vars(v,patternCode)+vars(y,defaultCode)+vars(S,customRuleCode)+w;if(p.processCode)w=p.processCode(w,e);var _;try{var P=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",w);_=P(d,k,E,t,h,y,S,l,u,c);h[0]=_}catch(e){d.logger.error("Error compiling schema, function code:",w);throw e}_.schema=e;_.errors=null;_.refs=m;_.refVal=h;_.root=g?_:r;if(b)_.$async=true;if(p.sourceCode===true){_.source={code:w,patterns:v,defaults:y}}return _}function resolveRef(e,i,s){i=n.url(e,i);var o=m[i];var a,u;if(o!==undefined){a=h[o];u="refVal["+o+"]";return resolvedRef(a,u)}if(!s&&t.refs){var l=t.refs[i];if(l!==undefined){a=t.refVal[l];u=addLocalRef(i,a);return resolvedRef(a,u)}}u=addLocalRef(i);var c=n.call(d,localCompile,t,i);if(c===undefined){var f=r&&r[i];if(f){c=n.inlineRef(f,p.inlineRefs)?f:compile.call(d,f,t,r,e)}}if(c===undefined){removeLocalRef(i)}else{replaceLocalRef(i,c);return resolvedRef(c,u)}}function addLocalRef(e,t){var r=h.length;h[r]=t;m[e]=r;return"refVal"+r}function removeLocalRef(e){delete m[e]}function replaceLocalRef(e,t){var r=m[e];h[r]=t}function resolvedRef(e,t){return typeof e=="object"||typeof e=="boolean"?{code:t,schema:e,inline:true}:{code:t,$async:e&&!!e.$async}}function usePattern(e){var t=g[e];if(t===undefined){t=g[e]=v.length;v[t]=e}return"pattern"+t}function useDefault(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return i.toQuotedString(e);case"object":if(e===null)return"null";var t=o(e);var r=b[t];if(r===undefined){r=b[t]=y.length;y[r]=e}return"default"+r}}function useCustomRule(e,t,r,n){if(d._opts.validateSchema!==false){var i=e.definition.dependencies;if(i&&!i.every((function(e){return Object.prototype.hasOwnProperty.call(r,e)})))throw new Error("parent schema must have all required keywords: "+i.join(","));var s=e.definition.validateSchema;if(s){var o=s(t);if(!o){var a="keyword schema is invalid: "+d.errorsText(s.errors);if(d._opts.validateSchema=="log")d.logger.error(a);else throw new Error(a)}}}var u=e.definition.compile,l=e.definition.inline,c=e.definition.macro;var f;if(u){f=u.call(d,t,r,n)}else if(c){f=c.call(d,t,r,n);if(p.validateSchema!==false)d.validateSchema(f,true)}else if(l){f=l.call(d,n,e.keyword,t,r)}else{f=e.definition.validate;if(!f)return}if(f===undefined)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=S.length;S[h]=f;return{code:"customRule"+h,validate:f}}}function checkCompiling(e,t,r){var n=compIndex.call(this,e,t,r);if(n>=0)return{index:n,compiling:true};n=this._compilations.length;this._compilations[n]={schema:e,root:t,baseId:r};return{index:n,compiling:false}}function endCompiling(e,t,r){var n=compIndex.call(this,e,t,r);if(n>=0)this._compilations.splice(n,1)}function compIndex(e,t,r){for(var n=0;n{"use strict";var n=r(626),i=r(3064),s=r(3162),o=r(5738),a=r(8154);e.exports=resolve;resolve.normalizeId=normalizeId;resolve.fullPath=getFullPath;resolve.url=resolveUrl;resolve.ids=resolveIds;resolve.inlineRef=inlineRef;resolve.schema=resolveSchema;function resolve(e,t,r){var n=this._refs[r];if(typeof n=="string"){if(this._refs[n])n=this._refs[n];else return resolve.call(this,e,t,n)}n=n||this._schemas[r];if(n instanceof o){return inlineRef(n.schema,this._opts.inlineRefs)?n.schema:n.validate||this._compile(n)}var i=resolveSchema.call(this,t,r);var s,a,u;if(i){s=i.schema;t=i.root;u=i.baseId}if(s instanceof o){a=s.validate||e.call(this,s.schema,t,undefined,u)}else if(s!==undefined){a=inlineRef(s,this._opts.inlineRefs)?s:e.call(this,s,t,undefined,u)}return a}function resolveSchema(e,t){var r=n.parse(t),i=_getFullPath(r),s=getFullPath(this._getId(e.schema));if(Object.keys(e.schema).length===0||i!==s){var a=normalizeId(i);var u=this._refs[a];if(typeof u=="string"){return resolveRecursive.call(this,e,u,r)}else if(u instanceof o){if(!u.validate)this._compile(u);e=u}else{u=this._schemas[a];if(u instanceof o){if(!u.validate)this._compile(u);if(a==normalizeId(t))return{schema:u,root:e,baseId:s};e=u}else{return}}if(!e.schema)return;s=getFullPath(this._getId(e.schema))}return getJsonPointer.call(this,r,s,e.schema,e)}function resolveRecursive(e,t,r){var n=resolveSchema.call(this,e,t);if(n){var i=n.schema;var s=n.baseId;e=n.root;var o=this._getId(i);if(o)s=resolveUrl(s,o);return getJsonPointer.call(this,r,s,i,e)}}var u=s.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(e,t,r,n){e.fragment=e.fragment||"";if(e.fragment.slice(0,1)!="/")return;var i=e.fragment.split("/");for(var o=1;o{"use strict";var n=r(1960),i=r(3162).toHash;e.exports=function rules(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}];var t=["type","$comment"];var r=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"];var s=["number","integer","string","array","object","boolean","null"];e.all=i(t);e.types=i(s);e.forEach((function(r){r.rules=r.rules.map((function(r){var i;if(typeof r=="object"){var s=Object.keys(r)[0];i=r[s];r=s;i.forEach((function(r){t.push(r);e.all[r]=true}))}t.push(r);var o=e.all[r]={keyword:r,code:n[r],implements:i};return o}));e.all.$comment={keyword:"$comment",code:n.$comment};if(r.type)e.types[r.type]=r}));e.keywords=i(t.concat(r));e.custom={};return e}},5738:(e,t,r)=>{"use strict";var n=r(3162);e.exports=SchemaObject;function SchemaObject(e){n.copy(e,this)}},6103:e=>{"use strict";e.exports=function ucs2length(e){var t=0,r=e.length,n=0,i;while(n=55296&&i<=56319&&n{"use strict";e.exports={copy:copy,checkDataType:checkDataType,checkDataTypes:checkDataTypes,coerceToTypes:coerceToTypes,toHash:toHash,getProperty:getProperty,escapeQuotes:escapeQuotes,equal:r(3064),ucs2length:r(6103),varOccurences:varOccurences,varReplace:varReplace,schemaHasRules:schemaHasRules,schemaHasRulesExcept:schemaHasRulesExcept,schemaUnknownRules:schemaUnknownRules,toQuotedString:toQuotedString,getPathExpr:getPathExpr,getPath:getPath,getData:getData,unescapeFragment:unescapeFragment,unescapeJsonPointer:unescapeJsonPointer,escapeFragment:escapeFragment,escapeJsonPointer:escapeJsonPointer};function copy(e,t){t=t||{};for(var r in e)t[r]=e[r];return t}function checkDataType(e,t,r,n){var i=n?" !== ":" === ",s=n?" || ":" && ",o=n?"!":"",a=n?"":"!";switch(e){case"null":return t+i+"null";case"array":return o+"Array.isArray("+t+")";case"object":return"("+o+t+s+"typeof "+t+i+'"object"'+s+a+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+i+'"number"'+s+a+"("+t+" % 1)"+s+t+i+t+(r?s+o+"isFinite("+t+")":"")+")";case"number":return"(typeof "+t+i+'"'+e+'"'+(r?s+o+"isFinite("+t+")":"")+")";default:return"typeof "+t+i+'"'+e+'"'}}function checkDataTypes(e,t,r){switch(e.length){case 1:return checkDataType(e[0],t,r,true);default:var n="";var i=toHash(e);if(i.array&&i.object){n=i.null?"(":"(!"+t+" || ";n+="typeof "+t+' !== "object")';delete i.null;delete i.array;delete i.object}if(i.number)delete i.integer;for(var s in i)n+=(n?" && ":"")+checkDataType(s,t,r,true);return n}}var n=toHash(["string","number","integer","boolean","null"]);function coerceToTypes(e,t){if(Array.isArray(t)){var r=[];for(var i=0;i=t)throw new Error("Cannot access property/index "+n+" levels up, current level is "+t);return r[t-n]}if(n>t)throw new Error("Cannot access data "+n+" levels up, current level is "+t);s="data"+(t-n||"");if(!i)return s}var l=s;var c=i.split("/");for(var f=0;f{"use strict";var t=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,r){for(var n=0;n{"use strict";var n=r(8703);e.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:n.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:n.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}},2813:e=>{"use strict";e.exports=function generate__limit(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c;var f="data"+(s||"");var d=e.opts.$data&&o&&o.$data,p;if(d){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";p="schema"+i}else{p=o}var h=t=="maximum",m=h?"exclusiveMaximum":"exclusiveMinimum",v=e.schema[m],g=e.opts.$data&&v&&v.$data,y=h?"<":">",b=h?">":"<",c=undefined;if(!(d||typeof o=="number"||o===undefined)){throw new Error(t+" must be number")}if(!(g||v===undefined||typeof v=="number"||typeof v=="boolean")){throw new Error(m+" must be number or boolean")}if(g){var S=e.util.getData(v.$data,s,e.dataPathArr),w="exclusive"+i,_="exclType"+i,E="exclIsNumber"+i,k="op"+i,P="' + "+k+" + '";n+=" var schemaExcl"+i+" = "+S+"; ";S="schemaExcl"+i;n+=" var "+w+"; var "+_+" = typeof "+S+"; if ("+_+" != 'boolean' && "+_+" != 'undefined' && "+_+" != 'number') { ";var c=m;var C=C||[];C.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+(c||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ";if(e.opts.messages!==false){n+=" , message: '"+m+" should be boolean' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "}n+=" } "}else{n+=" {} "}var x=n;n=C.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+x+"]); "}else{n+=" validate.errors = ["+x+"]; return false; "}}else{n+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } else if ( ";if(d){n+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "}n+=" "+_+" == 'number' ? ( ("+w+" = "+p+" === undefined || "+S+" "+y+"= "+p+") ? "+f+" "+b+"= "+S+" : "+f+" "+b+" "+p+" ) : ( ("+w+" = "+S+" === true) ? "+f+" "+b+"= "+p+" : "+f+" "+b+" "+p+" ) || "+f+" !== "+f+") { var op"+i+" = "+w+" ? '"+y+"' : '"+y+"='; ";if(o===undefined){c=m;u=e.errSchemaPath+"/"+m;p=S;d=g}}else{var E=typeof v=="number",P=y;if(E&&d){var k="'"+P+"'";n+=" if ( ";if(d){n+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "}n+=" ( "+p+" === undefined || "+v+" "+y+"= "+p+" ? "+f+" "+b+"= "+v+" : "+f+" "+b+" "+p+" ) || "+f+" !== "+f+") { "}else{if(E&&o===undefined){w=true;c=m;u=e.errSchemaPath+"/"+m;p=v;b+="="}else{if(E)p=Math[h?"min":"max"](v,o);if(v===(E?p:true)){w=true;c=m;u=e.errSchemaPath+"/"+m;b+="="}else{w=false;P+="="}}var k="'"+P+"'";n+=" if ( ";if(d){n+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "}n+=" "+f+" "+b+" "+p+" || "+f+" !== "+f+") { "}}c=c||t;var C=C||[];C.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+(c||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+k+", limit: "+p+", exclusive: "+w+" } ";if(e.opts.messages!==false){n+=" , message: 'should be "+P+" ";if(d){n+="' + "+p}else{n+=""+p+"'"}}if(e.opts.verbose){n+=" , schema: ";if(d){n+="validate.schema"+a}else{n+=""+o}n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "}n+=" } "}else{n+=" {} "}var x=n;n=C.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+x+"]); "}else{n+=" validate.errors = ["+x+"]; return false; "}}else{n+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } ";if(l){n+=" else { "}return n}},9809:e=>{"use strict";e.exports=function generate__limitItems(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c;var f="data"+(s||"");var d=e.opts.$data&&o&&o.$data,p;if(d){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";p="schema"+i}else{p=o}if(!(d||typeof o=="number")){throw new Error(t+" must be number")}var h=t=="maxItems"?">":"<";n+="if ( ";if(d){n+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "}n+=" "+f+".length "+h+" "+p+") { ";var c=t;var m=m||[];m.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+(c||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+p+" } ";if(e.opts.messages!==false){n+=" , message: 'should NOT have ";if(t=="maxItems"){n+="more"}else{n+="fewer"}n+=" than ";if(d){n+="' + "+p+" + '"}else{n+=""+o}n+=" items' "}if(e.opts.verbose){n+=" , schema: ";if(d){n+="validate.schema"+a}else{n+=""+o}n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "}n+=" } "}else{n+=" {} "}var v=n;n=m.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+v+"]); "}else{n+=" validate.errors = ["+v+"]; return false; "}}else{n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+="} ";if(l){n+=" else { "}return n}},5356:e=>{"use strict";e.exports=function generate__limitLength(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c;var f="data"+(s||"");var d=e.opts.$data&&o&&o.$data,p;if(d){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";p="schema"+i}else{p=o}if(!(d||typeof o=="number")){throw new Error(t+" must be number")}var h=t=="maxLength"?">":"<";n+="if ( ";if(d){n+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "}if(e.opts.unicode===false){n+=" "+f+".length "}else{n+=" ucs2length("+f+") "}n+=" "+h+" "+p+") { ";var c=t;var m=m||[];m.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+(c||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+p+" } ";if(e.opts.messages!==false){n+=" , message: 'should NOT be ";if(t=="maxLength"){n+="longer"}else{n+="shorter"}n+=" than ";if(d){n+="' + "+p+" + '"}else{n+=""+o}n+=" characters' "}if(e.opts.verbose){n+=" , schema: ";if(d){n+="validate.schema"+a}else{n+=""+o}n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "}n+=" } "}else{n+=" {} "}var v=n;n=m.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+v+"]); "}else{n+=" validate.errors = ["+v+"]; return false; "}}else{n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+="} ";if(l){n+=" else { "}return n}},7500:e=>{"use strict";e.exports=function generate__limitProperties(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c;var f="data"+(s||"");var d=e.opts.$data&&o&&o.$data,p;if(d){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";p="schema"+i}else{p=o}if(!(d||typeof o=="number")){throw new Error(t+" must be number")}var h=t=="maxProperties"?">":"<";n+="if ( ";if(d){n+=" ("+p+" !== undefined && typeof "+p+" != 'number') || "}n+=" Object.keys("+f+").length "+h+" "+p+") { ";var c=t;var m=m||[];m.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+(c||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+p+" } ";if(e.opts.messages!==false){n+=" , message: 'should NOT have ";if(t=="maxProperties"){n+="more"}else{n+="fewer"}n+=" than ";if(d){n+="' + "+p+" + '"}else{n+=""+o}n+=" properties' "}if(e.opts.verbose){n+=" , schema: ";if(d){n+="validate.schema"+a}else{n+=""+o}n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "}n+=" } "}else{n+=" {} "}var v=n;n=m.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+v+"]); "}else{n+=" validate.errors = ["+v+"]; return false; "}}else{n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+="} ";if(l){n+=" else { "}return n}},6265:e=>{"use strict";e.exports=function generate_allOf(e,t,r){var n=" ";var i=e.schema[t];var s=e.schemaPath+e.util.getProperty(t);var o=e.errSchemaPath+"/"+t;var a=!e.opts.allErrors;var u=e.util.copy(e);var l="";u.level++;var c="valid"+u.level;var f=u.baseId,d=true;var p=i;if(p){var h,m=-1,v=p.length-1;while(m0||h===false:e.util.schemaHasRules(h,e.RULES.all)){d=false;u.schema=h;u.schemaPath=s+"["+m+"]";u.errSchemaPath=o+"/"+m;n+=" "+e.validate(u)+" ";u.baseId=f;if(a){n+=" if ("+c+") { ";l+="}"}}}}if(a){if(d){n+=" if (true) { "}else{n+=" "+l.slice(0,-1)+" "}}return n}},2816:e=>{"use strict";e.exports=function generate_anyOf(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="valid"+i;var d="errs__"+i;var p=e.util.copy(e);var h="";p.level++;var m="valid"+p.level;var v=o.every((function(t){return e.opts.strictKeywords?typeof t=="object"&&Object.keys(t).length>0||t===false:e.util.schemaHasRules(t,e.RULES.all)}));if(v){var g=p.baseId;n+=" var "+d+" = errors; var "+f+" = false; ";var y=e.compositeRule;e.compositeRule=p.compositeRule=true;var b=o;if(b){var S,w=-1,_=b.length-1;while(w<_){S=b[w+=1];p.schema=S;p.schemaPath=a+"["+w+"]";p.errSchemaPath=u+"/"+w;n+=" "+e.validate(p)+" ";p.baseId=g;n+=" "+f+" = "+f+" || "+m+"; if (!"+f+") { ";h+="}"}}e.compositeRule=p.compositeRule=y;n+=" "+h+" if (!"+f+") { var err = ";if(e.createErrors!==false){n+=" { keyword: '"+"anyOf"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ";if(e.opts.messages!==false){n+=" , message: 'should match some schema in anyOf' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(vErrors); "}else{n+=" validate.errors = vErrors; return false; "}}n+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ";if(e.opts.allErrors){n+=" } "}}else{if(l){n+=" if (true) { "}}return n}},4302:e=>{"use strict";e.exports=function generate_comment(e,t,r){var n=" ";var i=e.schema[t];var s=e.errSchemaPath+"/"+t;var o=!e.opts.allErrors;var a=e.util.toQuotedString(i);if(e.opts.$comment===true){n+=" console.log("+a+");"}else if(typeof e.opts.$comment=="function"){n+=" self._opts.$comment("+a+", "+e.util.toQuotedString(s)+", validate.root.schema);"}return n}},3641:e=>{"use strict";e.exports=function generate_const(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="valid"+i;var d=e.opts.$data&&o&&o.$data,p;if(d){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";p="schema"+i}else{p=o}if(!d){n+=" var schema"+i+" = validate.schema"+a+";"}n+="var "+f+" = equal("+c+", schema"+i+"); if (!"+f+") { ";var h=h||[];h.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"const"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { allowedValue: schema"+i+" } ";if(e.opts.messages!==false){n+=" , message: 'should be equal to constant' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var m=n;n=h.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+m+"]); "}else{n+=" validate.errors = ["+m+"]; return false; "}}else{n+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" }";if(l){n+=" else { "}return n}},6665:e=>{"use strict";e.exports=function generate_contains(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="valid"+i;var d="errs__"+i;var p=e.util.copy(e);var h="";p.level++;var m="valid"+p.level;var v="i"+i,g=p.dataLevel=e.dataLevel+1,y="data"+g,b=e.baseId,S=e.opts.strictKeywords?typeof o=="object"&&Object.keys(o).length>0||o===false:e.util.schemaHasRules(o,e.RULES.all);n+="var "+d+" = errors;var "+f+";";if(S){var w=e.compositeRule;e.compositeRule=p.compositeRule=true;p.schema=o;p.schemaPath=a;p.errSchemaPath=u;n+=" var "+m+" = false; for (var "+v+" = 0; "+v+" < "+c+".length; "+v+"++) { ";p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,true);var _=c+"["+v+"]";p.dataPathArr[g]=v;var E=e.validate(p);p.baseId=b;if(e.util.varOccurences(E,y)<2){n+=" "+e.util.varReplace(E,y,_)+" "}else{n+=" var "+y+" = "+_+"; "+E+" "}n+=" if ("+m+") break; } ";e.compositeRule=p.compositeRule=w;n+=" "+h+" if (!"+m+") {"}else{n+=" if ("+c+".length == 0) {"}var k=k||[];k.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"contains"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ";if(e.opts.messages!==false){n+=" , message: 'should contain a valid item' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var P=n;n=k.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+P+"]); "}else{n+=" validate.errors = ["+P+"]; return false; "}}else{n+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } else { ";if(S){n+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } "}if(e.opts.allErrors){n+=" } "}return n}},8343:e=>{"use strict";e.exports=function generate_custom(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c;var f="data"+(s||"");var d="valid"+i;var p="errs__"+i;var h=e.opts.$data&&o&&o.$data,m;if(h){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";m="schema"+i}else{m=o}var v=this,g="definition"+i,y=v.definition,b="";var S,w,_,E,k;if(h&&y.$data){k="keywordValidate"+i;var P=y.validateSchema;n+=" var "+g+" = RULES.custom['"+t+"'].definition; var "+k+" = "+g+".validate;"}else{E=e.useCustomRule(v,o,e.schema,e);if(!E)return;m="validate.schema"+a;k=E.code;S=y.compile;w=y.inline;_=y.macro}var C=k+".errors",x="i"+i,O="ruleErr"+i,R=y.async;if(R&&!e.async)throw new Error("async keyword in sync schema");if(!(w||_)){n+=""+C+" = null;"}n+="var "+p+" = errors;var "+d+";";if(h&&y.$data){b+="}";n+=" if ("+m+" === undefined) { "+d+" = true; } else { ";if(P){b+="}";n+=" "+d+" = "+g+".validateSchema("+m+"); if ("+d+") { "}}if(w){if(y.statements){n+=" "+E.validate+" "}else{n+=" "+d+" = "+E.validate+"; "}}else if(_){var I=e.util.copy(e);var b="";I.level++;var A="valid"+I.level;I.schema=E.validate;I.schemaPath="";var T=e.compositeRule;e.compositeRule=I.compositeRule=true;var D=e.validate(I).replace(/validate\.schema/g,k);e.compositeRule=I.compositeRule=T;n+=" "+D}else{var F=F||[];F.push(n);n="";n+=" "+k+".call( ";if(e.opts.passContext){n+="this"}else{n+="self"}if(S||y.schema===false){n+=" , "+f+" "}else{n+=" , "+m+" , "+f+" , validate.schema"+e.schemaPath+" "}n+=" , (dataPath || '')";if(e.errorPath!='""'){n+=" + "+e.errorPath}var L=s?"data"+(s-1||""):"parentData",N=s?e.dataPathArr[s]:"parentDataProperty";n+=" , "+L+" , "+N+" , rootData ) ";var j=n;n=F.pop();if(y.errors===false){n+=" "+d+" = ";if(R){n+="await "}n+=""+j+"; "}else{if(R){C="customErrors"+i;n+=" var "+C+" = null; try { "+d+" = await "+j+"; } catch (e) { "+d+" = false; if (e instanceof ValidationError) "+C+" = e.errors; else throw e; } "}else{n+=" "+C+" = null; "+d+" = "+j+"; "}}}if(y.modifying){n+=" if ("+L+") "+f+" = "+L+"["+N+"];"}n+=""+b;if(y.valid){if(l){n+=" if (true) { "}}else{n+=" if ( ";if(y.valid===undefined){n+=" !";if(_){n+=""+A}else{n+=""+d}}else{n+=" "+!y.valid+" "}n+=") { ";c=v.keyword;var F=F||[];F.push(n);n="";var F=F||[];F.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+(c||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+v.keyword+"' } ";if(e.opts.messages!==false){n+=" , message: 'should pass \""+v.keyword+"\" keyword validation' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "}n+=" } "}else{n+=" {} "}var B=n;n=F.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+B+"]); "}else{n+=" validate.errors = ["+B+"]; return false; "}}else{n+=" var err = "+B+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}var M=n;n=F.pop();if(w){if(y.errors){if(y.errors!="full"){n+=" for (var "+x+"="+p+"; "+x+"{"use strict";e.exports=function generate_dependencies(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="errs__"+i;var d=e.util.copy(e);var p="";d.level++;var h="valid"+d.level;var m={},v={},g=e.opts.ownProperties;for(w in o){if(w=="__proto__")continue;var y=o[w];var b=Array.isArray(y)?v:m;b[w]=y}n+="var "+f+" = errors;";var S=e.errorPath;n+="var missing"+i+";";for(var w in v){b=v[w];if(b.length){n+=" if ( "+c+e.util.getProperty(w)+" !== undefined ";if(g){n+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(w)+"') "}if(l){n+=" && ( ";var _=b;if(_){var E,k=-1,P=_.length-1;while(k0||y===false:e.util.schemaHasRules(y,e.RULES.all)){n+=" "+h+" = true; if ( "+c+e.util.getProperty(w)+" !== undefined ";if(g){n+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(w)+"') "}n+=") { ";d.schema=y;d.schemaPath=a+e.util.getProperty(w);d.errSchemaPath=u+"/"+e.util.escapeFragment(w);n+=" "+e.validate(d)+" ";d.baseId=L;n+=" } ";if(l){n+=" if ("+h+") { ";p+="}"}}}if(l){n+=" "+p+" if ("+f+" == errors) {"}return n}},5625:e=>{"use strict";e.exports=function generate_enum(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="valid"+i;var d=e.opts.$data&&o&&o.$data,p;if(d){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";p="schema"+i}else{p=o}var h="i"+i,m="schema"+i;if(!d){n+=" var "+m+" = validate.schema"+a+";"}n+="var "+f+";";if(d){n+=" if (schema"+i+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+i+")) "+f+" = false; else {"}n+=""+f+" = false;for (var "+h+"=0; "+h+"<"+m+".length; "+h+"++) if (equal("+c+", "+m+"["+h+"])) { "+f+" = true; break; }";if(d){n+=" } "}n+=" if (!"+f+") { ";var v=v||[];v.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"enum"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { allowedValues: schema"+i+" } ";if(e.opts.messages!==false){n+=" , message: 'should be equal to one of the allowed values' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var g=n;n=v.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+g+"]); "}else{n+=" validate.errors = ["+g+"]; return false; "}}else{n+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" }";if(l){n+=" else { "}return n}},137:e=>{"use strict";e.exports=function generate_format(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");if(e.opts.format===false){if(l){n+=" if (true) { "}return n}var f=e.opts.$data&&o&&o.$data,d;if(f){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";d="schema"+i}else{d=o}var p=e.opts.unknownFormats,h=Array.isArray(p);if(f){var m="format"+i,v="isObject"+i,g="formatType"+i;n+=" var "+m+" = formats["+d+"]; var "+v+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+g+" = "+v+" && "+m+".type || 'string'; if ("+v+") { ";if(e.async){n+=" var async"+i+" = "+m+".async; "}n+=" "+m+" = "+m+".validate; } if ( ";if(f){n+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "}n+=" (";if(p!="ignore"){n+=" ("+d+" && !"+m+" ";if(h){n+=" && self._opts.unknownFormats.indexOf("+d+") == -1 "}n+=") || "}n+=" ("+m+" && "+g+" == '"+r+"' && !(typeof "+m+" == 'function' ? ";if(e.async){n+=" (async"+i+" ? await "+m+"("+c+") : "+m+"("+c+")) "}else{n+=" "+m+"("+c+") "}n+=" : "+m+".test("+c+"))))) {"}else{var m=e.formats[o];if(!m){if(p=="ignore"){e.logger.warn('unknown format "'+o+'" ignored in schema at path "'+e.errSchemaPath+'"');if(l){n+=" if (true) { "}return n}else if(h&&p.indexOf(o)>=0){if(l){n+=" if (true) { "}return n}else{throw new Error('unknown format "'+o+'" is used in schema at path "'+e.errSchemaPath+'"')}}var v=typeof m=="object"&&!(m instanceof RegExp)&&m.validate;var g=v&&m.type||"string";if(v){var y=m.async===true;m=m.validate}if(g!=r){if(l){n+=" if (true) { "}return n}if(y){if(!e.async)throw new Error("async format in sync schema");var b="formats"+e.util.getProperty(o)+".validate";n+=" if (!(await "+b+"("+c+"))) { "}else{n+=" if (! ";var b="formats"+e.util.getProperty(o);if(v)b+=".validate";if(typeof m=="function"){n+=" "+b+"("+c+") "}else{n+=" "+b+".test("+c+") "}n+=") { "}}var S=S||[];S.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"format"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { format: ";if(f){n+=""+d}else{n+=""+e.util.toQuotedString(o)}n+=" } ";if(e.opts.messages!==false){n+=" , message: 'should match format \"";if(f){n+="' + "+d+" + '"}else{n+=""+e.util.escapeQuotes(o)}n+="\"' "}if(e.opts.verbose){n+=" , schema: ";if(f){n+="validate.schema"+a}else{n+=""+e.util.toQuotedString(o)}n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var w=n;n=S.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+w+"]); "}else{n+=" validate.errors = ["+w+"]; return false; "}}else{n+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } ";if(l){n+=" else { "}return n}},7137:e=>{"use strict";e.exports=function generate_if(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="valid"+i;var d="errs__"+i;var p=e.util.copy(e);p.level++;var h="valid"+p.level;var m=e.schema["then"],v=e.schema["else"],g=m!==undefined&&(e.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===false:e.util.schemaHasRules(m,e.RULES.all)),y=v!==undefined&&(e.opts.strictKeywords?typeof v=="object"&&Object.keys(v).length>0||v===false:e.util.schemaHasRules(v,e.RULES.all)),b=p.baseId;if(g||y){var S;p.createErrors=false;p.schema=o;p.schemaPath=a;p.errSchemaPath=u;n+=" var "+d+" = errors; var "+f+" = true; ";var w=e.compositeRule;e.compositeRule=p.compositeRule=true;n+=" "+e.validate(p)+" ";p.baseId=b;p.createErrors=true;n+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ";e.compositeRule=p.compositeRule=w;if(g){n+=" if ("+h+") { ";p.schema=e.schema["then"];p.schemaPath=e.schemaPath+".then";p.errSchemaPath=e.errSchemaPath+"/then";n+=" "+e.validate(p)+" ";p.baseId=b;n+=" "+f+" = "+h+"; ";if(g&&y){S="ifClause"+i;n+=" var "+S+" = 'then'; "}else{S="'then'"}n+=" } ";if(y){n+=" else { "}}else{n+=" if (!"+h+") { "}if(y){p.schema=e.schema["else"];p.schemaPath=e.schemaPath+".else";p.errSchemaPath=e.errSchemaPath+"/else";n+=" "+e.validate(p)+" ";p.baseId=b;n+=" "+f+" = "+h+"; ";if(g&&y){S="ifClause"+i;n+=" var "+S+" = 'else'; "}else{S="'else'"}n+=" } "}n+=" if (!"+f+") { var err = ";if(e.createErrors!==false){n+=" { keyword: '"+"if"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { failingKeyword: "+S+" } ";if(e.opts.messages!==false){n+=" , message: 'should match \"' + "+S+" + '\" schema' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(vErrors); "}else{n+=" validate.errors = vErrors; return false; "}}n+=" } ";if(l){n+=" else { "}}else{if(l){n+=" if (true) { "}}return n}},1960:(e,t,r)=>{"use strict";e.exports={$ref:r(144),allOf:r(6265),anyOf:r(2816),$comment:r(4302),const:r(3641),contains:r(6665),dependencies:r(4352),enum:r(5625),format:r(137),if:r(7137),items:r(6301),maximum:r(2813),minimum:r(2813),maxItems:r(9809),minItems:r(9809),maxLength:r(5356),minLength:r(5356),maxProperties:r(7500),minProperties:r(7500),multipleOf:r(9180),not:r(911),oneOf:r(555),pattern:r(8557),properties:r(2847),propertyNames:r(5897),required:r(6775),uniqueItems:r(4313),validate:r(734)}},6301:e=>{"use strict";e.exports=function generate_items(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="valid"+i;var d="errs__"+i;var p=e.util.copy(e);var h="";p.level++;var m="valid"+p.level;var v="i"+i,g=p.dataLevel=e.dataLevel+1,y="data"+g,b=e.baseId;n+="var "+d+" = errors;var "+f+";";if(Array.isArray(o)){var S=e.schema.additionalItems;if(S===false){n+=" "+f+" = "+c+".length <= "+o.length+"; ";var w=u;u=e.errSchemaPath+"/additionalItems";n+=" if (!"+f+") { ";var _=_||[];_.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"additionalItems"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+o.length+" } ";if(e.opts.messages!==false){n+=" , message: 'should NOT have more than "+o.length+" items' "}if(e.opts.verbose){n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var E=n;n=_.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+E+"]); "}else{n+=" validate.errors = ["+E+"]; return false; "}}else{n+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } ";u=w;if(l){h+="}";n+=" else { "}}var k=o;if(k){var P,C=-1,x=k.length-1;while(C0||P===false:e.util.schemaHasRules(P,e.RULES.all)){n+=" "+m+" = true; if ("+c+".length > "+C+") { ";var O=c+"["+C+"]";p.schema=P;p.schemaPath=a+"["+C+"]";p.errSchemaPath=u+"/"+C;p.errorPath=e.util.getPathExpr(e.errorPath,C,e.opts.jsonPointers,true);p.dataPathArr[g]=C;var R=e.validate(p);p.baseId=b;if(e.util.varOccurences(R,y)<2){n+=" "+e.util.varReplace(R,y,O)+" "}else{n+=" var "+y+" = "+O+"; "+R+" "}n+=" } ";if(l){n+=" if ("+m+") { ";h+="}"}}}}if(typeof S=="object"&&(e.opts.strictKeywords?typeof S=="object"&&Object.keys(S).length>0||S===false:e.util.schemaHasRules(S,e.RULES.all))){p.schema=S;p.schemaPath=e.schemaPath+".additionalItems";p.errSchemaPath=e.errSchemaPath+"/additionalItems";n+=" "+m+" = true; if ("+c+".length > "+o.length+") { for (var "+v+" = "+o.length+"; "+v+" < "+c+".length; "+v+"++) { ";p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,true);var O=c+"["+v+"]";p.dataPathArr[g]=v;var R=e.validate(p);p.baseId=b;if(e.util.varOccurences(R,y)<2){n+=" "+e.util.varReplace(R,y,O)+" "}else{n+=" var "+y+" = "+O+"; "+R+" "}if(l){n+=" if (!"+m+") break; "}n+=" } } ";if(l){n+=" if ("+m+") { ";h+="}"}}}else if(e.opts.strictKeywords?typeof o=="object"&&Object.keys(o).length>0||o===false:e.util.schemaHasRules(o,e.RULES.all)){p.schema=o;p.schemaPath=a;p.errSchemaPath=u;n+=" for (var "+v+" = "+0+"; "+v+" < "+c+".length; "+v+"++) { ";p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,true);var O=c+"["+v+"]";p.dataPathArr[g]=v;var R=e.validate(p);p.baseId=b;if(e.util.varOccurences(R,y)<2){n+=" "+e.util.varReplace(R,y,O)+" "}else{n+=" var "+y+" = "+O+"; "+R+" "}if(l){n+=" if (!"+m+") break; "}n+=" }"}if(l){n+=" "+h+" if ("+d+" == errors) {"}return n}},9180:e=>{"use strict";e.exports=function generate_multipleOf(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f=e.opts.$data&&o&&o.$data,d;if(f){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";d="schema"+i}else{d=o}if(!(f||typeof o=="number")){throw new Error(t+" must be number")}n+="var division"+i+";if (";if(f){n+=" "+d+" !== undefined && ( typeof "+d+" != 'number' || "}n+=" (division"+i+" = "+c+" / "+d+", ";if(e.opts.multipleOfPrecision){n+=" Math.abs(Math.round(division"+i+") - division"+i+") > 1e-"+e.opts.multipleOfPrecision+" "}else{n+=" division"+i+" !== parseInt(division"+i+") "}n+=" ) ";if(f){n+=" ) "}n+=" ) { ";var p=p||[];p.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"multipleOf"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+d+" } ";if(e.opts.messages!==false){n+=" , message: 'should be multiple of ";if(f){n+="' + "+d}else{n+=""+d+"'"}}if(e.opts.verbose){n+=" , schema: ";if(f){n+="validate.schema"+a}else{n+=""+o}n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var h=n;n=p.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+h+"]); "}else{n+=" validate.errors = ["+h+"]; return false; "}}else{n+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+="} ";if(l){n+=" else { "}return n}},911:e=>{"use strict";e.exports=function generate_not(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="errs__"+i;var d=e.util.copy(e);d.level++;var p="valid"+d.level;if(e.opts.strictKeywords?typeof o=="object"&&Object.keys(o).length>0||o===false:e.util.schemaHasRules(o,e.RULES.all)){d.schema=o;d.schemaPath=a;d.errSchemaPath=u;n+=" var "+f+" = errors; ";var h=e.compositeRule;e.compositeRule=d.compositeRule=true;d.createErrors=false;var m;if(d.opts.allErrors){m=d.opts.allErrors;d.opts.allErrors=false}n+=" "+e.validate(d)+" ";d.createErrors=true;if(m)d.opts.allErrors=m;e.compositeRule=d.compositeRule=h;n+=" if ("+p+") { ";var v=v||[];v.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ";if(e.opts.messages!==false){n+=" , message: 'should NOT be valid' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var g=n;n=v.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+g+"]); "}else{n+=" validate.errors = ["+g+"]; return false; "}}else{n+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ";if(e.opts.allErrors){n+=" } "}}else{n+=" var err = ";if(e.createErrors!==false){n+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ";if(e.opts.messages!==false){n+=" , message: 'should NOT be valid' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(l){n+=" if (false) { "}}return n}},555:e=>{"use strict";e.exports=function generate_oneOf(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="valid"+i;var d="errs__"+i;var p=e.util.copy(e);var h="";p.level++;var m="valid"+p.level;var v=p.baseId,g="prevValid"+i,y="passingSchemas"+i;n+="var "+d+" = errors , "+g+" = false , "+f+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=p.compositeRule=true;var S=o;if(S){var w,_=-1,E=S.length-1;while(_0||w===false:e.util.schemaHasRules(w,e.RULES.all)){p.schema=w;p.schemaPath=a+"["+_+"]";p.errSchemaPath=u+"/"+_;n+=" "+e.validate(p)+" ";p.baseId=v}else{n+=" var "+m+" = true; "}if(_){n+=" if ("+m+" && "+g+") { "+f+" = false; "+y+" = ["+y+", "+_+"]; } else { ";h+="}"}n+=" if ("+m+") { "+f+" = "+g+" = true; "+y+" = "+_+"; }"}}e.compositeRule=p.compositeRule=b;n+=""+h+"if (!"+f+") { var err = ";if(e.createErrors!==false){n+=" { keyword: '"+"oneOf"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { passingSchemas: "+y+" } ";if(e.opts.messages!==false){n+=" , message: 'should match exactly one schema in oneOf' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(vErrors); "}else{n+=" validate.errors = vErrors; return false; "}}n+="} else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; }";if(e.opts.allErrors){n+=" } "}return n}},8557:e=>{"use strict";e.exports=function generate_pattern(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f=e.opts.$data&&o&&o.$data,d;if(f){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";d="schema"+i}else{d=o}var p=f?"(new RegExp("+d+"))":e.usePattern(o);n+="if ( ";if(f){n+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "}n+=" !"+p+".test("+c+") ) { ";var h=h||[];h.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"pattern"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { pattern: ";if(f){n+=""+d}else{n+=""+e.util.toQuotedString(o)}n+=" } ";if(e.opts.messages!==false){n+=" , message: 'should match pattern \"";if(f){n+="' + "+d+" + '"}else{n+=""+e.util.escapeQuotes(o)}n+="\"' "}if(e.opts.verbose){n+=" , schema: ";if(f){n+="validate.schema"+a}else{n+=""+e.util.toQuotedString(o)}n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var m=n;n=h.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+m+"]); "}else{n+=" validate.errors = ["+m+"]; return false; "}}else{n+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+="} ";if(l){n+=" else { "}return n}},2847:e=>{"use strict";e.exports=function generate_properties(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="errs__"+i;var d=e.util.copy(e);var p="";d.level++;var h="valid"+d.level;var m="key"+i,v="idx"+i,g=d.dataLevel=e.dataLevel+1,y="data"+g,b="dataProperties"+i;var S=Object.keys(o||{}).filter(notProto),w=e.schema.patternProperties||{},_=Object.keys(w).filter(notProto),E=e.schema.additionalProperties,k=S.length||_.length,P=E===false,C=typeof E=="object"&&Object.keys(E).length,x=e.opts.removeAdditional,O=P||C||x,R=e.opts.ownProperties,I=e.baseId;var A=e.schema.required;if(A&&!(e.opts.$data&&A.$data)&&A.length8){n+=" || validate.schema"+a+".hasOwnProperty("+m+") "}else{var D=S;if(D){var F,L=-1,N=D.length-1;while(L0||X===false:e.util.schemaHasRules(X,e.RULES.all)){var ee=e.util.getProperty(F),K=c+ee,te=G&&X.default!==undefined;d.schema=X;d.schemaPath=a+ee;d.errSchemaPath=u+"/"+e.util.escapeFragment(F);d.errorPath=e.util.getPath(e.errorPath,F,e.opts.jsonPointers);d.dataPathArr[g]=e.util.toQuotedString(F);var Y=e.validate(d);d.baseId=I;if(e.util.varOccurences(Y,y)<2){Y=e.util.varReplace(Y,y,K);var re=K}else{var re=y;n+=" var "+y+" = "+K+"; "}if(te){n+=" "+Y+" "}else{if(T&&T[F]){n+=" if ( "+re+" === undefined ";if(R){n+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(F)+"') "}n+=") { "+h+" = false; ";var U=e.errorPath,q=u,ne=e.util.escapeQuotes(F);if(e.opts._errorDataPathProperty){e.errorPath=e.util.getPath(U,F,e.opts.jsonPointers)}u=e.errSchemaPath+"/required";var V=V||[];V.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+ne+"' } ";if(e.opts.messages!==false){n+=" , message: '";if(e.opts._errorDataPathProperty){n+="is a required property"}else{n+="should have required property \\'"+ne+"\\'"}n+="' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var z=n;n=V.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+z+"]); "}else{n+=" validate.errors = ["+z+"]; return false; "}}else{n+=" var err = "+z+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}u=q;e.errorPath=U;n+=" } else { "}else{if(l){n+=" if ( "+re+" === undefined ";if(R){n+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(F)+"') "}n+=") { "+h+" = true; } else { "}else{n+=" if ("+re+" !== undefined ";if(R){n+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(F)+"') "}n+=" ) { "}}n+=" "+Y+" } "}}if(l){n+=" if ("+h+") { ";p+="}"}}}}if(_.length){var ie=_;if(ie){var B,se=-1,oe=ie.length-1;while(se0||X===false:e.util.schemaHasRules(X,e.RULES.all)){d.schema=X;d.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(B);d.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(B);if(R){n+=" "+b+" = "+b+" || Object.keys("+c+"); for (var "+v+"=0; "+v+"<"+b+".length; "+v+"++) { var "+m+" = "+b+"["+v+"]; "}else{n+=" for (var "+m+" in "+c+") { "}n+=" if ("+e.usePattern(B)+".test("+m+")) { ";d.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var K=c+"["+m+"]";d.dataPathArr[g]=m;var Y=e.validate(d);d.baseId=I;if(e.util.varOccurences(Y,y)<2){n+=" "+e.util.varReplace(Y,y,K)+" "}else{n+=" var "+y+" = "+K+"; "+Y+" "}if(l){n+=" if (!"+h+") break; "}n+=" } ";if(l){n+=" else "+h+" = true; "}n+=" } ";if(l){n+=" if ("+h+") { ";p+="}"}}}}}if(l){n+=" "+p+" if ("+f+" == errors) {"}return n}},5897:e=>{"use strict";e.exports=function generate_propertyNames(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="errs__"+i;var d=e.util.copy(e);var p="";d.level++;var h="valid"+d.level;n+="var "+f+" = errors;";if(e.opts.strictKeywords?typeof o=="object"&&Object.keys(o).length>0||o===false:e.util.schemaHasRules(o,e.RULES.all)){d.schema=o;d.schemaPath=a;d.errSchemaPath=u;var m="key"+i,v="idx"+i,g="i"+i,y="' + "+m+" + '",b=d.dataLevel=e.dataLevel+1,S="data"+b,w="dataProperties"+i,_=e.opts.ownProperties,E=e.baseId;if(_){n+=" var "+w+" = undefined; "}if(_){n+=" "+w+" = "+w+" || Object.keys("+c+"); for (var "+v+"=0; "+v+"<"+w+".length; "+v+"++) { var "+m+" = "+w+"["+v+"]; "}else{n+=" for (var "+m+" in "+c+") { "}n+=" var startErrs"+i+" = errors; ";var k=m;var P=e.compositeRule;e.compositeRule=d.compositeRule=true;var C=e.validate(d);d.baseId=E;if(e.util.varOccurences(C,S)<2){n+=" "+e.util.varReplace(C,S,k)+" "}else{n+=" var "+S+" = "+k+"; "+C+" "}e.compositeRule=d.compositeRule=P;n+=" if (!"+h+") { for (var "+g+"=startErrs"+i+"; "+g+"{"use strict";e.exports=function generate_ref(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.errSchemaPath+"/"+t;var u=!e.opts.allErrors;var l="data"+(s||"");var c="valid"+i;var f,d;if(o=="#"||o=="#/"){if(e.isRoot){f=e.async;d="validate"}else{f=e.root.schema.$async===true;d="root.refVal[0]"}}else{var p=e.resolveRef(e.baseId,o,e.isRoot);if(p===undefined){var h=e.MissingRefError.message(e.baseId,o);if(e.opts.missingRefs=="fail"){e.logger.error(h);var m=m||[];m.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"$ref"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(a)+" , params: { ref: '"+e.util.escapeQuotes(o)+"' } ";if(e.opts.messages!==false){n+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(o)+"' "}if(e.opts.verbose){n+=" , schema: "+e.util.toQuotedString(o)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "}n+=" } "}else{n+=" {} "}var v=n;n=m.pop();if(!e.compositeRule&&u){if(e.async){n+=" throw new ValidationError(["+v+"]); "}else{n+=" validate.errors = ["+v+"]; return false; "}}else{n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}if(u){n+=" if (false) { "}}else if(e.opts.missingRefs=="ignore"){e.logger.warn(h);if(u){n+=" if (true) { "}}else{throw new e.MissingRefError(e.baseId,o,h)}}else if(p.inline){var g=e.util.copy(e);g.level++;var y="valid"+g.level;g.schema=p.schema;g.schemaPath="";g.errSchemaPath=o;var b=e.validate(g).replace(/validate\.schema/g,p.code);n+=" "+b+" ";if(u){n+=" if ("+y+") { "}}else{f=p.$async===true||e.async&&p.$async!==false;d=p.code}}if(d){var m=m||[];m.push(n);n="";if(e.opts.passContext){n+=" "+d+".call(this, "}else{n+=" "+d+"( "}n+=" "+l+", (dataPath || '')";if(e.errorPath!='""'){n+=" + "+e.errorPath}var S=s?"data"+(s-1||""):"parentData",w=s?e.dataPathArr[s]:"parentDataProperty";n+=" , "+S+" , "+w+", rootData) ";var _=n;n=m.pop();if(f){if(!e.async)throw new Error("async schema referenced by sync schema");if(u){n+=" var "+c+"; "}n+=" try { await "+_+"; ";if(u){n+=" "+c+" = true; "}n+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ";if(u){n+=" "+c+" = false; "}n+=" } ";if(u){n+=" if ("+c+") { "}}else{n+=" if (!"+_+") { if (vErrors === null) vErrors = "+d+".errors; else vErrors = vErrors.concat("+d+".errors); errors = vErrors.length; } ";if(u){n+=" else { "}}}return n}},6775:e=>{"use strict";e.exports=function generate_required(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="valid"+i;var d=e.opts.$data&&o&&o.$data,p;if(d){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";p="schema"+i}else{p=o}var h="schema"+i;if(!d){if(o.length0||S===false:e.util.schemaHasRules(S,e.RULES.all)))){m[m.length]=g}}}}else{var m=o}}if(d||m.length){var w=e.errorPath,_=d||m.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(l){n+=" var missing"+i+"; ";if(_){if(!d){n+=" var "+h+" = validate.schema"+a+"; "}var k="i"+i,P="schema"+i+"["+k+"]",C="' + "+P+" + '";if(e.opts._errorDataPathProperty){e.errorPath=e.util.getPathExpr(w,P,e.opts.jsonPointers)}n+=" var "+f+" = true; ";if(d){n+=" if (schema"+i+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+i+")) "+f+" = false; else {"}n+=" for (var "+k+" = 0; "+k+" < "+h+".length; "+k+"++) { "+f+" = "+c+"["+h+"["+k+"]] !== undefined ";if(E){n+=" && Object.prototype.hasOwnProperty.call("+c+", "+h+"["+k+"]) "}n+="; if (!"+f+") break; } ";if(d){n+=" } "}n+=" if (!"+f+") { ";var x=x||[];x.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+C+"' } ";if(e.opts.messages!==false){n+=" , message: '";if(e.opts._errorDataPathProperty){n+="is a required property"}else{n+="should have required property \\'"+C+"\\'"}n+="' "}if(e.opts.verbose){n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var O=n;n=x.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+O+"]); "}else{n+=" validate.errors = ["+O+"]; return false; "}}else{n+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } else { "}else{n+=" if ( ";var R=m;if(R){var I,k=-1,A=R.length-1;while(k{"use strict";e.exports=function generate_uniqueItems(e,t,r){var n=" ";var i=e.level;var s=e.dataLevel;var o=e.schema[t];var a=e.schemaPath+e.util.getProperty(t);var u=e.errSchemaPath+"/"+t;var l=!e.opts.allErrors;var c="data"+(s||"");var f="valid"+i;var d=e.opts.$data&&o&&o.$data,p;if(d){n+=" var schema"+i+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ";p="schema"+i}else{p=o}if((o||d)&&e.opts.uniqueItems!==false){if(d){n+=" var "+f+"; if ("+p+" === false || "+p+" === undefined) "+f+" = true; else if (typeof "+p+" != 'boolean') "+f+" = false; else { "}n+=" var i = "+c+".length , "+f+" = true , j; if (i > 1) { ";var h=e.schema.items&&e.schema.items.type,m=Array.isArray(h);if(!h||h=="object"||h=="array"||m&&(h.indexOf("object")>=0||h.indexOf("array")>=0)){n+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+c+"[i], "+c+"[j])) { "+f+" = false; break outer; } } } "}else{n+=" var itemIndices = {}, item; for (;i--;) { var item = "+c+"[i]; ";var v="checkDataType"+(m?"s":"");n+=" if ("+e.util[v](h,"item",e.opts.strictNumbers,true)+") continue; ";if(m){n+=" if (typeof item == 'string') item = '\"' + item; "}n+=" if (typeof itemIndices[item] == 'number') { "+f+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}n+=" } ";if(d){n+=" } "}n+=" if (!"+f+") { ";var g=g||[];g.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+"uniqueItems"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ";if(e.opts.messages!==false){n+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "}if(e.opts.verbose){n+=" , schema: ";if(d){n+="validate.schema"+a}else{n+=""+o}n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}n+=" } "}else{n+=" {} "}var y=n;n=g.pop();if(!e.compositeRule&&l){if(e.async){n+=" throw new ValidationError(["+y+"]); "}else{n+=" validate.errors = ["+y+"]; return false; "}}else{n+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } ";if(l){n+=" else { "}}else{if(l){n+=" if (true) { "}}return n}},734:e=>{"use strict";e.exports=function generate_validate(e,t,r){var n="";var i=e.schema.$async===true,s=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),o=e.self._getId(e.schema);if(e.opts.strictKeywords){var a=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(a){var u="unknown keyword: "+a;if(e.opts.strictKeywords==="log")e.logger.warn(u);else throw new Error(u)}}if(e.isTop){n+=" var validate = ";if(i){e.async=true;n+="async "}n+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ";if(o&&(e.opts.sourceCode||e.opts.processCode)){n+=" "+("/*# sourceURL="+o+" */")+" "}}if(typeof e.schema=="boolean"||!(s||e.schema.$ref)){var t="false schema";var l=e.level;var c=e.dataLevel;var f=e.schema[t];var d=e.schemaPath+e.util.getProperty(t);var p=e.errSchemaPath+"/"+t;var h=!e.opts.allErrors;var m;var v="data"+(c||"");var g="valid"+l;if(e.schema===false){if(e.isTop){h=true}else{n+=" var "+g+" = false; "}var y=y||[];y.push(n);n="";if(e.createErrors!==false){n+=" { keyword: '"+(m||"false schema")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ";if(e.opts.messages!==false){n+=" , message: 'boolean schema is false' "}if(e.opts.verbose){n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "}n+=" } "}else{n+=" {} "}var b=n;n=y.pop();if(!e.compositeRule&&h){if(e.async){n+=" throw new ValidationError(["+b+"]); "}else{n+=" validate.errors = ["+b+"]; return false; "}}else{n+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}else{if(e.isTop){if(i){n+=" return data; "}else{n+=" validate.errors = null; return true; "}}else{n+=" var "+g+" = true; "}}if(e.isTop){n+=" }; return validate; "}return n}if(e.isTop){var S=e.isTop,l=e.level=0,c=e.dataLevel=0,v="data";e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema));e.baseId=e.baseId||e.rootId;delete e.isTop;e.dataPathArr=[""];if(e.schema.default!==undefined&&e.opts.useDefaults&&e.opts.strictDefaults){var w="default is ignored in the schema root";if(e.opts.strictDefaults==="log")e.logger.warn(w);else throw new Error(w)}n+=" var vErrors = null; ";n+=" var errors = 0; ";n+=" if (rootData === undefined) rootData = data; "}else{var l=e.level,c=e.dataLevel,v="data"+(c||"");if(o)e.baseId=e.resolve.url(e.baseId,o);if(i&&!e.async)throw new Error("async schema in sync schema");n+=" var errs_"+l+" = errors;"}var g="valid"+l,h=!e.opts.allErrors,_="",E="";var m;var k=e.schema.type,P=Array.isArray(k);if(k&&e.opts.nullable&&e.schema.nullable===true){if(P){if(k.indexOf("null")==-1)k=k.concat("null")}else if(k!="null"){k=[k,"null"];P=true}}if(P&&k.length==1){k=k[0];P=false}if(e.schema.$ref&&s){if(e.opts.extendRefs=="fail"){throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)')}else if(e.opts.extendRefs!==true){s=false;e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"')}}if(e.schema.$comment&&e.opts.$comment){n+=" "+e.RULES.all.$comment.code(e,"$comment")}if(k){if(e.opts.coerceTypes){var C=e.util.coerceToTypes(e.opts.coerceTypes,k)}var x=e.RULES.types[k];if(C||P||x===true||x&&!$shouldUseGroup(x)){var d=e.schemaPath+".type",p=e.errSchemaPath+"/type";var d=e.schemaPath+".type",p=e.errSchemaPath+"/type",O=P?"checkDataTypes":"checkDataType";n+=" if ("+e.util[O](k,v,e.opts.strictNumbers,true)+") { ";if(C){var R="dataType"+l,I="coerced"+l;n+=" var "+R+" = typeof "+v+"; var "+I+" = undefined; ";if(e.opts.coerceTypes=="array"){n+=" if ("+R+" == 'object' && Array.isArray("+v+") && "+v+".length == 1) { "+v+" = "+v+"[0]; "+R+" = typeof "+v+"; if ("+e.util.checkDataType(e.schema.type,v,e.opts.strictNumbers)+") "+I+" = "+v+"; } "}n+=" if ("+I+" !== undefined) ; ";var A=C;if(A){var T,D=-1,F=A.length-1;while(D{"use strict";var n=/^[a-z_$][a-z0-9_$-]*$/i;var i=r(8343);var s=r(4540);e.exports={add:addKeyword,get:getKeyword,remove:removeKeyword,validate:validateKeyword};function addKeyword(e,t){var r=this.RULES;if(r.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!n.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(t){this.validateKeyword(t,true);var s=t.type;if(Array.isArray(s)){for(var o=0;o{"use strict";const n=r(4389);const i=r(1972)("$$bole",{fastTime:false});const s=r(357);const o="debug info warn error".split(" ");const a=r(2037).hostname();const u=n(a);const l=process.pid;let c=false;const f=[];for(const e of o){f[e]=',"hostname":'+u+',"pid":'+l+',"level":"'+e;Number(f[e]);if(!Array.isArray(i[e])){i[e]=[]}}function stackToString(e){let t=e.stack;let r;if(typeof e.cause==="function"&&(r=e.cause())){t+="\nCaused by: "+stackToString(r)}return t}function errorToOut(e,t){t.err={name:e.name,message:e.message,code:e.code,stack:stackToString(e)}}function requestToOut(e,t){t.req={method:e.method,url:e.url,headers:e.headers,remoteAddress:e.connection.remoteAddress,remotePort:e.connection.remotePort}}function objectToOut(e,t){for(const r in e){if(Object.prototype.hasOwnProperty.call(e,r)&&e[r]!==undefined){t[r]=e[r]}}}function objectMode(e){return e._writableState&&e._writableState.objectMode===true}function stringify(e,t,r,s){let o='{"time":'+(i.fastTime?Date.now():'"'+(new Date).toISOString()+'"')+f[e]+'","name":'+t+(r!==undefined?',"message":'+n(r):"");for(const e in s){o+=","+n(e)+":"+n(s[e])}o+="}";Number(o);return o}function extend(e,t,r,n){const s={time:i.fastTime?Date.now():(new Date).toISOString(),hostname:a,pid:l,level:e,name:t};if(r!==undefined){n.message=r}for(const e in n){s[e]=n[e]}return s}function levelLogger(e,t){const r=i[e];const o=n(t);return function namedLevelLogger(n,i,a,u,l,f,d,p,h,m,v,g,y,b,S,w){if(r.length===0){return}const _={};let E;let k=0;const P=r.length;let C;let x;if(typeof n==="string"||n==null){if(!(x=s(n,i,a,u,l,f,d,p,h,m,v,g,y,b,S,w))){x=undefined}}else{if(n instanceof Error){if(typeof i==="object"){objectToOut(i,_);errorToOut(n,_);if(!(x=s(a,u,l,f,d,p,h,m,v,g,y,b,S,w))){x=undefined}}else{errorToOut(n,_);if(!(x=s(i,a,u,l,f,d,p,h,m,v,g,y,b,S,w))){x=undefined}}}else{if(!(x=s(i,a,u,l,f,d,p,h,m,v,g,y,b,S,w))){x=undefined}}if(typeof n==="boolean"){x=String(n)}else if(typeof n==="object"&&!(n instanceof Error)){if(n.method&&n.url&&n.headers&&n.socket){requestToOut(n,_)}else{objectToOut(n,_)}}}if(P===1&&!c){r[0].write(Buffer.from(stringify(e,o,x,_)+"\n"));return}for(;k{var n=r(3837).format;function format(e,t,r,i,s,o,a,u,l,c,f,d,p,h,m,v){if(v!==undefined){return n(e,t,r,i,s,o,a,u,l,c,f,d,p,h,m,v)}if(m!==undefined){return n(e,t,r,i,s,o,a,u,l,c,f,d,p,h,m)}if(h!==undefined){return n(e,t,r,i,s,o,a,u,l,c,f,d,p,h)}if(p!==undefined){return n(e,t,r,i,s,o,a,u,l,c,f,d,p)}if(d!==undefined){return n(e,t,r,i,s,o,a,u,l,c,f,d)}if(f!==undefined){return n(e,t,r,i,s,o,a,u,l,c,f)}if(c!==undefined){return n(e,t,r,i,s,o,a,u,l,c)}if(l!==undefined){return n(e,t,r,i,s,o,a,u,l)}if(u!==undefined){return n(e,t,r,i,s,o,a,u)}if(a!==undefined){return n(e,t,r,i,s,o,a)}if(o!==undefined){return n(e,t,r,i,s,o)}if(s!==undefined){return n(e,t,r,i,s)}if(i!==undefined){return n(e,t,r,i)}if(r!==undefined){return n(e,t,r)}if(t!==undefined){return n(e,t)}return e}e.exports=format},5708:e=>{"use strict";function dataUriToBuffer(e){if(!/^data:/i.test(e)){throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")')}e=e.replace(/\r?\n/g,"");const t=e.indexOf(",");if(t===-1||t<=4){throw new TypeError("malformed data: URI")}const r=e.substring(5,t).split(";");let n="";let i=false;const s=r[0]||"text/plain";let o=s;for(let e=1;e{t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.storage=localstorage();t.destroy=(()=>{let e=false;return()=>{if(!e){e=true;console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}}})();t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(t){t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0;let i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{if(e==="%%"){return}n++;if(e==="%c"){i=n}}));t.splice(i,0,r)}t.log=console.debug||console.log||(()=>{});function save(e){try{if(e){t.storage.setItem("debug",e)}else{t.storage.removeItem("debug")}}catch(e){}}function load(){let e;try{e=t.storage.getItem("debug")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=r(7695)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},7695:(e,t,r)=>{function setup(e){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=r(401);createDebug.destroy=destroy;Object.keys(e).forEach((t=>{createDebug[t]=e[t]}));createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(e){let t=0;for(let r=0;r{if(t==="%%"){return"%"}s++;const i=createDebug.formatters[n];if(typeof i==="function"){const n=e[s];t=i.call(r,n);e.splice(s,1);s--}return t}));createDebug.formatArgs.call(r,e);const o=r.log||createDebug.log;o.apply(r,e)}debug.namespace=e;debug.useColors=createDebug.useColors();debug.color=createDebug.selectColor(e);debug.extend=extend;debug.destroy=createDebug.destroy;Object.defineProperty(debug,"enabled",{enumerable:true,configurable:false,get:()=>{if(r!==null){return r}if(n!==createDebug.namespaces){n=createDebug.namespaces;i=createDebug.enabled(e)}return i},set:e=>{r=e}});if(typeof createDebug.init==="function"){createDebug.init(debug)}return debug}function extend(e,t){const r=createDebug(this.namespace+(typeof t==="undefined"?":":t)+e);r.log=this.log;return r}function enable(e){createDebug.save(e);createDebug.namespaces=e;createDebug.names=[];createDebug.skips=[];let t;const r=(typeof e==="string"?e:"").split(/[\s,]+/);const n=r.length;for(t=0;t"-"+e))].join(",");createDebug.enable("");return e}function enabled(e){if(e[e.length-1]==="*"){return true}let t;let r;for(t=0,r=createDebug.skips.length;t{if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=r(3167)}else{e.exports=r(8867)}},8867:(e,t,r)=>{const n=r(6224);const i=r(3837);t.init=init;t.log=log;t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.destroy=i.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");t.colors=[6,2,3,4,5,1];try{const e=r(4226);if(e&&(e.stderr||e).level>=2){t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];if(/^(yes|on|true|enabled)$/i.test(n)){n=true}else if(/^(no|off|false|disabled)$/i.test(n)){n=false}else if(n==="null"){n=null}else{n=Number(n)}e[r]=n;return e}),{});function useColors(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)}function formatArgs(t){const{namespace:r,useColors:n}=this;if(n){const n=this.color;const i="[3"+(n<8?n:"8;5;"+n);const s=` ${i};1m${r} `;t[0]=s+t[0].split("\n").join("\n"+s);t.push(i+"m+"+e.exports.humanize(this.diff)+"")}else{t[0]=getDate()+r+" "+t[0]}}function getDate(){if(t.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(i.format(...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let n=0;ne.trim())).join(" ")};s.O=function(e){this.inspectOpts.colors=this.useColors;return i.inspect(e,this.inspectOpts)}},9386:(module,__unused_webpack_exports,__nccwpck_require__)=>{ -/*! - * depd - * Copyright(c) 2014-2017 Douglas Christopher Wilson - * MIT Licensed - */ -var callSiteToString=__nccwpck_require__(2775).callSiteToString;var eventListenerCount=__nccwpck_require__(2775).eventListenerCount;var relative=__nccwpck_require__(1017).relative;module.exports=depd;var basePath=process.cwd();function containsNamespace(e,t){var r=e.split(/[ ,]+/);var n=String(t).toLowerCase();for(var i=0;i";var r=e.getLineNumber();var n=e.getColumnNumber();if(e.isEval()){t=e.getEvalOrigin()+", "+t}var i=[t,r,n];i.callSite=e;i.name=e.getFunctionName();return i}function defaultMessage(e){var t=e.callSite;var r=e.name;if(!r){r=""}var n=t.getThis();var i=n&&t.getTypeName();if(i==="Object"){i=undefined}if(i==="Function"){i=n.name||i}return i&&t.getMethodName()?i+"."+r:r}function formatPlain(e,t,r){var n=(new Date).toUTCString();var i=n+" "+this._namespace+" deprecated "+e;if(this._traced){for(var s=0;s{"use strict"; -/*! - * depd - * Copyright(c) 2014 Douglas Christopher Wilson - * MIT Licensed - */e.exports=callSiteToString;function callSiteFileLocation(e){var t;var r="";if(e.isNative()){r="native"}else if(e.isEval()){t=e.getScriptNameOrSourceURL();if(!t){r=e.getEvalOrigin()}}else{t=e.getFileName()}if(t){r+=t;var n=e.getLineNumber();if(n!=null){r+=":"+n;var i=e.getColumnNumber();if(i){r+=":"+i}}}return r||"unknown source"}function callSiteToString(e){var t=true;var r=callSiteFileLocation(e);var n=e.getFunctionName();var i=e.isConstructor();var s=!(e.isToplevel()||i);var o="";if(s){var a=e.getMethodName();var u=getConstructorName(e);if(n){if(u&&n.indexOf(u)!==0){o+=u+"."}o+=n;if(a&&n.lastIndexOf("."+a)!==n.length-a.length-1){o+=" [as "+a+"]"}}else{o+=u+"."+(a||"")}}else if(i){o+="new "+(n||"")}else if(n){o+=n}else{t=false;o+=r}if(t){o+=" ("+r+")"}return o}function getConstructorName(e){var t=e.receiver;return t.constructor&&t.constructor.name||null}},7723:e=>{"use strict"; -/*! - * depd - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */e.exports=eventListenerCount;function eventListenerCount(e,t){return e.listeners(t).length}},2775:(e,t,r)=>{"use strict"; -/*! - * depd - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */var n=r(2361).EventEmitter;lazyProperty(e.exports,"callSiteToString",(function callSiteToString(){var e=Error.stackTraceLimit;var t={};var n=Error.prepareStackTrace;function prepareObjectStackTrace(e,t){return t}Error.prepareStackTrace=prepareObjectStackTrace;Error.stackTraceLimit=2;Error.captureStackTrace(t);var i=t.stack.slice();Error.prepareStackTrace=n;Error.stackTraceLimit=e;return i[0].toString?toString:r(7264)}));lazyProperty(e.exports,"eventListenerCount",(function eventListenerCount(){return n.listenerCount||r(7723)}));function lazyProperty(e,t,r){function get(){var n=r();Object.defineProperty(e,t,{configurable:true,enumerable:true,value:n});return n}Object.defineProperty(e,t,{configurable:true,enumerable:true,get:get})}function toString(e){return e.toString()}},4790:(e,t,r)=>{ +(()=>{var e={8243:function(e,r,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});const i=t(3031);const n=a(t(4694));const s=a(t(1142));const o=a(t(2759));const l=a(t(4207));const c=a(t(5659));async function main(){const e=(0,n.default)();const r=(0,i.getState)("is_post");if(r==="true")return(0,c.default)(e);(0,i.saveState)("is_post","true");await(0,s.default)(e);console.log("Installation Completed!");(0,o.default)(e);(0,l.default)(e)}main().catch((e=>{console.error(e);(0,i.setFailed)(e)}))},4694:function(e,r,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});r.getInputs=void 0;const i=t(3031);const n=a(t(4790));const s=t(5400);const o={required:true};const parseInputPath=e=>(0,n.default)((0,i.getInput)(e,o));const getInputs=()=>({version:(0,i.getInput)("version"),dest:parseInputPath("dest"),runInstall:(0,s.parseRunInstall)("run_install")});r.getInputs=getInputs;r["default"]=r.getInputs},5400:function(e,r,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});r.parseRunInstall=void 0;const i=t(3031);const n=a(t(8438));const s=t(3639);const o=a(t(7282));const l=a(t(5379));const c={required:true};function parseRunInstall(e){const r=(0,s.load)((0,i.getInput)(e,c));const t=new n.default({allErrors:true});const a=t.compile(l.default);if(!a(r)){for(const e of a.errors){(0,i.error)(`with.run_install${e.dataPath}: ${e.message}`)}return o.default.exit(1)}if(!r)return[];if(r===true)return[{recursive:true}];if(Array.isArray(r))return r;return[r]}r.parseRunInstall=parseRunInstall},1142:function(e,r,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});r.install=r.runSelfInstaller=void 0;const i=t(3031);const n=a(t(9536));r.runSelfInstaller=n.default;async function install(e){(0,i.startGroup)("Running self-installer...");const r=await(0,n.default)(e);(0,i.endGroup)();if(r){return(0,i.setFailed)(`Something went wrong, self-installer exits with code ${r}`)}}r.install=install;r["default"]=install},9536:function(e,r,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});r.runSelfInstaller=void 0;const i=t(3031);const n=t(2081);const s=t(5176);const o=a(t(1017));const l=t(7282);async function runSelfInstaller(e){const{version:r,dest:t}=e;await(0,s.remove)(t);const a=o.default.join(t,"package.json");await(0,s.ensureFile)(a);await(0,s.writeFile)(a,JSON.stringify({private:true}));const c=await readTarget(r);const u=(0,n.spawn)(l.execPath,[o.default.join(__dirname,"pnpm.js"),"install",c,"--no-lockfile"],{cwd:t,stdio:["pipe","inherit","inherit"]});const f=await new Promise(((e,r)=>{u.on("error",r);u.on("close",e)}));if(f===0){const e=o.default.join(t,"node_modules/.bin");(0,i.addPath)(e);(0,i.exportVariable)("PNPM_HOME",e)}return f}r.runSelfInstaller=runSelfInstaller;async function readTarget(e){if(e)return`pnpm@${e}`;const{GITHUB_WORKSPACE:r}=process.env;if(!r){throw new Error(`No workspace is found.\nIf you're intended to let pnpm/action-setup read preferred pnpm version from the "packageManager" field in the package.json file,\nplease run the actions/checkout before pnpm/action-setup.\nOtherwise, please specify the pnpm version in the action configuration.`)}const{packageManager:t}=JSON.parse(await(0,s.readFile)(o.default.join(r,"package.json"),"utf8"));if(typeof t!=="string"){throw new Error(`No pnpm version is specified.\nPlease specify it by one of the following ways:\n - in the GitHub Action config with the key "version"\n - in the package.json with the key "packageManager" (See https://nodejs.org/api/corepack.html)`)}if(!t.startsWith("pnpm@")){throw new Error("Invalid packageManager field in package.json")}return t}r["default"]=runSelfInstaller},2759:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.setOutputs=void 0;const a=t(3031);const i=t(6392);function setOutputs(e){const r=(0,i.getBinDest)(e);(0,a.addPath)(r);(0,a.setOutput)("dest",e.dest);(0,a.setOutput)("bin_dest",r)}r.setOutputs=setOutputs;r["default"]=setOutputs},4207:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.runPnpmInstall=void 0;const a=t(3031);const i=t(2081);const n=t(6392);function runPnpmInstall(e){const r=(0,n.patchPnpmEnv)(e);for(const t of e.runInstall){const e=["install"];if(t.recursive)e.unshift("recursive");if(t.args)e.push(...t.args);const n=["pnpm",...e].join(" ");(0,a.startGroup)(`Running ${n}...`);const{error:s,status:o}=(0,i.spawnSync)("pnpm",e,{stdio:"inherit",cwd:t.cwd,shell:true,env:r});(0,a.endGroup)();if(s){(0,a.setFailed)(s);continue}if(o){(0,a.setFailed)(`Command ${n} (cwd: ${t.cwd}) exits with status ${o}`);continue}}}r.runPnpmInstall=runPnpmInstall;r["default"]=runPnpmInstall},5659:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.pruneStore=void 0;const a=t(3031);const i=t(2081);const n=t(6392);function pruneStore(e){if(e.runInstall.length===0){console.log("Pruning is unnecessary.");return}(0,a.startGroup)("Running pnpm store prune...");const{error:r,status:t}=(0,i.spawnSync)("pnpm",["store","prune"],{stdio:"inherit",shell:true,env:(0,n.patchPnpmEnv)(e)});(0,a.endGroup)();if(r){(0,a.warning)(r);return}if(t){(0,a.warning)(`command pnpm store prune exits with code ${t}`);return}}r.pruneStore=pruneStore;r["default"]=pruneStore},6392:function(e,r,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});r.patchPnpmEnv=r.getBinDest=void 0;const i=a(t(1017));const n=a(t(7282));const getBinDest=e=>i.default.join(e.dest,"node_modules",".bin");r.getBinDest=getBinDest;const patchPnpmEnv=e=>({...n.default.env,PATH:(0,r.getBinDest)(e)+i.default.delimiter+n.default.env.PATH});r.patchPnpmEnv=patchPnpmEnv},8302:function(e,r,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,r,t,a){if(a===undefined)a=t;Object.defineProperty(e,a,{enumerable:true,get:function(){return r[t]}})}:function(e,r,t,a){if(a===undefined)a=t;e[a]=r[t]});var i=this&&this.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:true,value:r})}:function(e,r){e["default"]=r});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(t!=="default"&&Object.hasOwnProperty.call(e,t))a(r,e,t);i(r,e);return r};Object.defineProperty(r,"__esModule",{value:true});r.issue=r.issueCommand=void 0;const s=n(t(2037));const o=t(8541);function issueCommand(e,r,t){const a=new Command(e,r,t);process.stdout.write(a.toString()+s.EOL)}r.issueCommand=issueCommand;function issue(e,r=""){issueCommand(e,{},r)}r.issue=issue;const l="::";class Command{constructor(e,r,t){if(!e){e="missing.command"}this.command=e;this.properties=r;this.message=t}toString(){let e=l+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=true;for(const t in this.properties){if(this.properties.hasOwnProperty(t)){const a=this.properties[t];if(a){if(r){r=false}else{e+=","}e+=`${t}=${escapeProperty(a)}`}}}}e+=`${l}${escapeData(this.message)}`;return e}}function escapeData(e){return o.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return o.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},3031:function(e,r,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,r,t,a){if(a===undefined)a=t;Object.defineProperty(e,a,{enumerable:true,get:function(){return r[t]}})}:function(e,r,t,a){if(a===undefined)a=t;e[a]=r[t]});var i=this&&this.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:true,value:r})}:function(e,r){e["default"]=r});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(t!=="default"&&Object.hasOwnProperty.call(e,t))a(r,e,t);i(r,e);return r};var s=this&&this.__awaiter||function(e,r,t,a){function adopt(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,i){function fulfilled(e){try{step(a.next(e))}catch(e){i(e)}}function rejected(e){try{step(a["throw"](e))}catch(e){i(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((a=a.apply(e,r||[])).next())}))};Object.defineProperty(r,"__esModule",{value:true});r.getIDToken=r.getState=r.saveState=r.group=r.endGroup=r.startGroup=r.info=r.notice=r.warning=r.error=r.debug=r.isDebug=r.setFailed=r.setCommandEcho=r.setOutput=r.getBooleanInput=r.getMultilineInput=r.getInput=r.addPath=r.setSecret=r.exportVariable=r.ExitCode=void 0;const o=t(8302);const l=t(1234);const c=t(8541);const u=n(t(2037));const f=n(t(1017));const p=t(9946);var d;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(d=r.ExitCode||(r.ExitCode={}));function exportVariable(e,r){const t=c.toCommandValue(r);process.env[e]=t;const a=process.env["GITHUB_ENV"]||"";if(a){const r="_GitHubActionsFileCommandDelimeter_";const a=`${e}<<${r}${u.EOL}${t}${u.EOL}${r}`;l.issueCommand("ENV",a)}else{o.issueCommand("set-env",{name:e},t)}}r.exportVariable=exportVariable;function setSecret(e){o.issueCommand("add-mask",{},e)}r.setSecret=setSecret;function addPath(e){const r=process.env["GITHUB_PATH"]||"";if(r){l.issueCommand("PATH",e)}else{o.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${f.delimiter}${process.env["PATH"]}`}r.addPath=addPath;function getInput(e,r){const t=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(r&&r.required&&!t){throw new Error(`Input required and not supplied: ${e}`)}if(r&&r.trimWhitespace===false){return t}return t.trim()}r.getInput=getInput;function getMultilineInput(e,r){const t=getInput(e,r).split("\n").filter((e=>e!==""));return t}r.getMultilineInput=getMultilineInput;function getBooleanInput(e,r){const t=["true","True","TRUE"];const a=["false","False","FALSE"];const i=getInput(e,r);if(t.includes(i))return true;if(a.includes(i))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}r.getBooleanInput=getBooleanInput;function setOutput(e,r){process.stdout.write(u.EOL);o.issueCommand("set-output",{name:e},r)}r.setOutput=setOutput;function setCommandEcho(e){o.issue("echo",e?"on":"off")}r.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=d.Failure;error(e)}r.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}r.isDebug=isDebug;function debug(e){o.issueCommand("debug",{},e)}r.debug=debug;function error(e,r={}){o.issueCommand("error",c.toCommandProperties(r),e instanceof Error?e.toString():e)}r.error=error;function warning(e,r={}){o.issueCommand("warning",c.toCommandProperties(r),e instanceof Error?e.toString():e)}r.warning=warning;function notice(e,r={}){o.issueCommand("notice",c.toCommandProperties(r),e instanceof Error?e.toString():e)}r.notice=notice;function info(e){process.stdout.write(e+u.EOL)}r.info=info;function startGroup(e){o.issue("group",e)}r.startGroup=startGroup;function endGroup(){o.issue("endgroup")}r.endGroup=endGroup;function group(e,r){return s(this,void 0,void 0,(function*(){startGroup(e);let t;try{t=yield r()}finally{endGroup()}return t}))}r.group=group;function saveState(e,r){o.issueCommand("save-state",{name:e},r)}r.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}r.getState=getState;function getIDToken(e){return s(this,void 0,void 0,(function*(){return yield p.OidcClient.getIDToken(e)}))}r.getIDToken=getIDToken},1234:function(e,r,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,r,t,a){if(a===undefined)a=t;Object.defineProperty(e,a,{enumerable:true,get:function(){return r[t]}})}:function(e,r,t,a){if(a===undefined)a=t;e[a]=r[t]});var i=this&&this.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:true,value:r})}:function(e,r){e["default"]=r});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(t!=="default"&&Object.hasOwnProperty.call(e,t))a(r,e,t);i(r,e);return r};Object.defineProperty(r,"__esModule",{value:true});r.issueCommand=void 0;const s=n(t(7147));const o=n(t(2037));const l=t(8541);function issueCommand(e,r){const t=process.env[`GITHUB_${e}`];if(!t){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!s.existsSync(t)){throw new Error(`Missing file at path: ${t}`)}s.appendFileSync(t,`${l.toCommandValue(r)}${o.EOL}`,{encoding:"utf8"})}r.issueCommand=issueCommand},9946:function(e,r,t){"use strict";var a=this&&this.__awaiter||function(e,r,t,a){function adopt(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,i){function fulfilled(e){try{step(a.next(e))}catch(e){i(e)}}function rejected(e){try{step(a["throw"](e))}catch(e){i(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((a=a.apply(e,r||[])).next())}))};Object.defineProperty(r,"__esModule",{value:true});r.OidcClient=void 0;const i=t(9875);const n=t(2760);const s=t(3031);class OidcClient{static createHttpClient(e=true,r=10){const t={allowRetries:e,maxRetries:r};return new i.HttpClient("actions/oidc-client",[new n.BearerCredentialHandler(OidcClient.getRequestToken())],t)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var r;return a(this,void 0,void 0,(function*(){const t=OidcClient.createHttpClient();const a=yield t.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.result.message}`)}));const i=(r=a.result)===null||r===void 0?void 0:r.value;if(!i){throw new Error("Response json body do not have ID Token field")}return i}))}static getIDToken(e){return a(this,void 0,void 0,(function*(){try{let r=OidcClient.getIDTokenUrl();if(e){const t=encodeURIComponent(e);r=`${r}&audience=${t}`}s.debug(`ID token url is ${r}`);const t=yield OidcClient.getCall(r);s.setSecret(t);return t}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}r.OidcClient=OidcClient},8541:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});r.toCommandProperties=r.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}r.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}r.toCommandProperties=toCommandProperties},2760:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});class BasicCredentialHandler{constructor(e,r){this.username=e;this.password=r}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from(this.username+":"+this.password).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,r,t){return null}}r.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Bearer "+this.token}canHandleAuthentication(e){return false}handleAuthentication(e,r,t){return null}}r.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from("PAT:"+this.token).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,r,t){return null}}r.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},9875:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});const a=t(3685);const i=t(5687);const n=t(6502);let s;var o;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(o=r.HttpCodes||(r.HttpCodes={}));var l;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(l=r.Headers||(r.Headers={}));var c;(function(e){e["ApplicationJson"]="application/json"})(c=r.MediaTypes||(r.MediaTypes={}));function getProxyUrl(e){let r=n.getProxyUrl(new URL(e));return r?r.href:""}r.getProxyUrl=getProxyUrl;const u=[o.MovedPermanently,o.ResourceMoved,o.SeeOther,o.TemporaryRedirect,o.PermanentRedirect];const f=[o.BadGateway,o.ServiceUnavailable,o.GatewayTimeout];const p=["OPTIONS","GET","DELETE","HEAD"];const d=10;const h=5;class HttpClientError extends Error{constructor(e,r){super(e);this.name="HttpClientError";this.statusCode=r;Object.setPrototypeOf(this,HttpClientError.prototype)}}r.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return new Promise((async(e,r)=>{let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])}));this.message.on("end",(()=>{e(t.toString())}))}))}}r.HttpClientResponse=HttpClientResponse;function isHttps(e){let r=new URL(e);return r.protocol==="https:"}r.isHttps=isHttps;class HttpClient{constructor(e,r,t){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=r||[];this.requestOptions=t;if(t){if(t.ignoreSslError!=null){this._ignoreSslError=t.ignoreSslError}this._socketTimeout=t.socketTimeout;if(t.allowRedirects!=null){this._allowRedirects=t.allowRedirects}if(t.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=t.allowRedirectDowngrade}if(t.maxRedirects!=null){this._maxRedirects=Math.max(t.maxRedirects,0)}if(t.keepAlive!=null){this._keepAlive=t.keepAlive}if(t.allowRetries!=null){this._allowRetries=t.allowRetries}if(t.maxRetries!=null){this._maxRetries=t.maxRetries}}}options(e,r){return this.request("OPTIONS",e,null,r||{})}get(e,r){return this.request("GET",e,null,r||{})}del(e,r){return this.request("DELETE",e,null,r||{})}post(e,r,t){return this.request("POST",e,r,t||{})}patch(e,r,t){return this.request("PATCH",e,r,t||{})}put(e,r,t){return this.request("PUT",e,r,t||{})}head(e,r){return this.request("HEAD",e,null,r||{})}sendStream(e,r,t,a){return this.request(e,r,t,a)}async getJson(e,r={}){r[l.Accept]=this._getExistingOrDefaultHeader(r,l.Accept,c.ApplicationJson);let t=await this.get(e,r);return this._processResponse(t,this.requestOptions)}async postJson(e,r,t={}){let a=JSON.stringify(r,null,2);t[l.Accept]=this._getExistingOrDefaultHeader(t,l.Accept,c.ApplicationJson);t[l.ContentType]=this._getExistingOrDefaultHeader(t,l.ContentType,c.ApplicationJson);let i=await this.post(e,a,t);return this._processResponse(i,this.requestOptions)}async putJson(e,r,t={}){let a=JSON.stringify(r,null,2);t[l.Accept]=this._getExistingOrDefaultHeader(t,l.Accept,c.ApplicationJson);t[l.ContentType]=this._getExistingOrDefaultHeader(t,l.ContentType,c.ApplicationJson);let i=await this.put(e,a,t);return this._processResponse(i,this.requestOptions)}async patchJson(e,r,t={}){let a=JSON.stringify(r,null,2);t[l.Accept]=this._getExistingOrDefaultHeader(t,l.Accept,c.ApplicationJson);t[l.ContentType]=this._getExistingOrDefaultHeader(t,l.ContentType,c.ApplicationJson);let i=await this.patch(e,a,t);return this._processResponse(i,this.requestOptions)}async request(e,r,t,a){if(this._disposed){throw new Error("Client has already been disposed.")}let i=new URL(r);let n=this._prepareRequest(e,i,a);let s=this._allowRetries&&p.indexOf(e)!=-1?this._maxRetries+1:1;let l=0;let c;while(l0){const s=c.message.headers["location"];if(!s){break}let o=new URL(s);if(i.protocol=="https:"&&i.protocol!=o.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.")}await c.readBody();if(o.hostname!==i.hostname){for(let e in a){if(e.toLowerCase()==="authorization"){delete a[e]}}}n=this._prepareRequest(e,o,a);c=await this.requestRaw(n,t);r--}if(f.indexOf(c.message.statusCode)==-1){return c}l+=1;if(l{let callbackForResult=function(e,r){if(e){a(e)}t(r)};this.requestRawWithCallback(e,r,callbackForResult)}))}requestRawWithCallback(e,r,t){let a;if(typeof r==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(r,"utf8")}let i=false;let handleResult=(e,r)=>{if(!i){i=true;t(e,r)}};let n=e.httpModule.request(e.options,(e=>{let r=new HttpClientResponse(e);handleResult(null,r)}));n.on("socket",(e=>{a=e}));n.setTimeout(this._socketTimeout||3*6e4,(()=>{if(a){a.end()}handleResult(new Error("Request timeout: "+e.options.path),null)}));n.on("error",(function(e){handleResult(e,null)}));if(r&&typeof r==="string"){n.write(r,"utf8")}if(r&&typeof r!=="string"){r.on("close",(function(){n.end()}));r.pipe(n)}else{n.end()}}getAgent(e){let r=new URL(e);return this._getAgent(r)}_prepareRequest(e,r,t){const n={};n.parsedUrl=r;const s=n.parsedUrl.protocol==="https:";n.httpModule=s?i:a;const o=s?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):o;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(t);if(this.userAgent!=null){n.options.headers["user-agent"]=this.userAgent}n.options.agent=this._getAgent(n.parsedUrl);if(this.handlers){this.handlers.forEach((e=>{e.prepareRequest(n.options)}))}return n}_mergeHeaders(e){const lowercaseKeys=e=>Object.keys(e).reduce(((r,t)=>(r[t.toLowerCase()]=e[t],r)),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,r,t){const lowercaseKeys=e=>Object.keys(e).reduce(((r,t)=>(r[t.toLowerCase()]=e[t],r)),{});let a;if(this.requestOptions&&this.requestOptions.headers){a=lowercaseKeys(this.requestOptions.headers)[r]}return e[r]||a||t}_getAgent(e){let r;let o=n.getProxyUrl(e);let l=o&&o.hostname;if(this._keepAlive&&l){r=this._proxyAgent}if(this._keepAlive&&!l){r=this._agent}if(!!r){return r}const c=e.protocol==="https:";let u=100;if(!!this.requestOptions){u=this.requestOptions.maxSockets||a.globalAgent.maxSockets}if(l){if(!s){s=t(1353)}const e={maxSockets:u,keepAlive:this._keepAlive,proxy:{...(o.username||o.password)&&{proxyAuth:`${o.username}:${o.password}`},host:o.hostname,port:o.port}};let a;const i=o.protocol==="https:";if(c){a=i?s.httpsOverHttps:s.httpsOverHttp}else{a=i?s.httpOverHttps:s.httpOverHttp}r=a(e);this._proxyAgent=r}if(this._keepAlive&&!r){const e={keepAlive:this._keepAlive,maxSockets:u};r=c?new i.Agent(e):new a.Agent(e);this._agent=r}if(!r){r=c?i.globalAgent:a.globalAgent}if(c&&this._ignoreSslError){r.options=Object.assign(r.options||{},{rejectUnauthorized:false})}return r}_performExponentialBackoff(e){e=Math.min(d,e);const r=h*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),r)))}static dateTimeDeserializer(e,r){if(typeof r==="string"){let e=new Date(r);if(!isNaN(e.valueOf())){return e}}return r}async _processResponse(e,r){return new Promise((async(t,a)=>{const i=e.message.statusCode;const n={statusCode:i,result:null,headers:{}};if(i==o.NotFound){t(n)}let s;let l;try{l=await e.readBody();if(l&&l.length>0){if(r&&r.deserializeDates){s=JSON.parse(l,HttpClient.dateTimeDeserializer)}else{s=JSON.parse(l)}n.result=s}n.headers=e.message.headers}catch(e){}if(i>299){let e;if(s&&s.message){e=s.message}else if(l&&l.length>0){e=l}else{e="Failed request: ("+i+")"}let r=new HttpClientError(e,i);r.result=n.result;a(r)}else{t(n)}}))}}r.HttpClient=HttpClient},6502:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});function getProxyUrl(e){let r=e.protocol==="https:";let t;if(checkBypass(e)){return t}let a;if(r){a=process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{a=process.env["http_proxy"]||process.env["HTTP_PROXY"]}if(a){t=new URL(a)}return t}r.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}let r=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!r){return false}let t;if(e.port){t=Number(e.port)}else if(e.protocol==="http:"){t=80}else if(e.protocol==="https:"){t=443}let a=[e.hostname.toUpperCase()];if(typeof t==="number"){a.push(`${a[0]}:${t}`)}for(let e of r.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(a.some((r=>r===e))){return true}}return false}r.checkBypass=checkBypass},8438:(e,r,t)=>{"use strict";var a=t(5391),i=t(6650),n=t(6281),s=t(5738),o=t(4486),l=t(229),c=t(6072),u=t(7178),f=t(3162);e.exports=Ajv;Ajv.prototype.validate=validate;Ajv.prototype.compile=compile;Ajv.prototype.addSchema=addSchema;Ajv.prototype.addMetaSchema=addMetaSchema;Ajv.prototype.validateSchema=validateSchema;Ajv.prototype.getSchema=getSchema;Ajv.prototype.removeSchema=removeSchema;Ajv.prototype.addFormat=addFormat;Ajv.prototype.errorsText=errorsText;Ajv.prototype._addSchema=_addSchema;Ajv.prototype._compile=_compile;Ajv.prototype.compileAsync=t(5911);var p=t(7975);Ajv.prototype.addKeyword=p.add;Ajv.prototype.getKeyword=p.get;Ajv.prototype.removeKeyword=p.remove;Ajv.prototype.validateKeyword=p.validate;var d=t(2485);Ajv.ValidationError=d.Validation;Ajv.MissingRefError=d.MissingRef;Ajv.$dataMetaSchema=u;var h="http://json-schema.org/draft-07/schema";var m=["removeAdditional","useDefaults","coerceTypes","strictDefaults"];var v=["/properties"];function Ajv(e){if(!(this instanceof Ajv))return new Ajv(e);e=this._opts=f.copy(e)||{};setLogger(this);this._schemas={};this._refs={};this._fragments={};this._formats=l(e.format);this._cache=e.cache||new n;this._loadingSchemas={};this._compilations=[];this.RULES=c();this._getId=chooseGetId(e);e.loopRequired=e.loopRequired||Infinity;if(e.errorDataPath=="property")e._errorDataPathProperty=true;if(e.serialize===undefined)e.serialize=o;this._metaOpts=getMetaSchemaOptions(this);if(e.formats)addInitialFormats(this);if(e.keywords)addInitialKeywords(this);addDefaultMetaSchema(this);if(typeof e.meta=="object")this.addMetaSchema(e.meta);if(e.nullable)this.addKeyword("nullable",{metaSchema:{type:"boolean"}});addInitialSchemas(this)}function validate(e,r){var t;if(typeof e=="string"){t=this.getSchema(e);if(!t)throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var i=t(r);if(t.$async!==true)this.errors=t.errors;return i}function compile(e,r){var t=this._addSchema(e,undefined,r);return t.validate||this._compile(t)}function addSchema(e,r,t,a){if(Array.isArray(e)){for(var n=0;n{"use strict";var r=e.exports=function Cache(){this._cache={}};r.prototype.put=function Cache_put(e,r){this._cache[e]=r};r.prototype.get=function Cache_get(e){return this._cache[e]};r.prototype.del=function Cache_del(e){delete this._cache[e]};r.prototype.clear=function Cache_clear(){this._cache={}}},5911:(e,r,t)=>{"use strict";var a=t(2485).MissingRef;e.exports=compileAsync;function compileAsync(e,r,t){var i=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");if(typeof r=="function"){t=r;r=undefined}var n=loadMetaSchemaOf(e).then((function(){var t=i._addSchema(e,undefined,r);return t.validate||_compileAsync(t)}));if(t){n.then((function(e){t(null,e)}),t)}return n;function loadMetaSchemaOf(e){var r=e.$schema;return r&&!i.getSchema(r)?compileAsync.call(i,{$ref:r},true):Promise.resolve()}function _compileAsync(e){try{return i._compile(e)}catch(e){if(e instanceof a)return loadMissingSchema(e);throw e}function loadMissingSchema(t){var a=t.missingSchema;if(added(a))throw new Error("Schema "+a+" is loaded but "+t.missingRef+" cannot be resolved");var n=i._loadingSchemas[a];if(!n){n=i._loadingSchemas[a]=i._opts.loadSchema(a);n.then(removePromise,removePromise)}return n.then((function(e){if(!added(a)){return loadMetaSchemaOf(e).then((function(){if(!added(a))i.addSchema(e,a,undefined,r)}))}})).then((function(){return _compileAsync(e)}));function removePromise(){delete i._loadingSchemas[a]}function added(e){return i._refs[e]||i._schemas[e]}}}}},2485:(e,r,t)=>{"use strict";var a=t(6650);e.exports={Validation:errorSubclass(ValidationError),MissingRef:errorSubclass(MissingRefError)};function ValidationError(e){this.message="validation failed";this.errors=e;this.ajv=this.validation=true}MissingRefError.message=function(e,r){return"can't resolve reference "+r+" from id "+e};function MissingRefError(e,r,t){this.message=t||MissingRefError.message(e,r);this.missingRef=a.url(e,r);this.missingSchema=a.normalizeId(a.fullPath(this.missingRef))}function errorSubclass(e){e.prototype=Object.create(Error.prototype);e.prototype.constructor=e;return e}},229:(e,r,t)=>{"use strict";var a=t(3162);var i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;var n=[0,31,28,31,30,31,30,31,31,30,31,30,31];var s=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;var o=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;var l=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var c=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var u=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;var f=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;var p=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;var d=/^(?:\/(?:[^~/]|~0|~1)*)*$/;var h=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;var m=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;e.exports=formats;function formats(e){e=e=="full"?"full":"fast";return a.copy(formats[e])}formats.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":u,url:f,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:o,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:p,"json-pointer":d,"json-pointer-uri-fragment":h,"relative-json-pointer":m};formats.full={date:date,time:time,"date-time":date_time,uri:uri,"uri-reference":c,"uri-template":u,url:f,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:o,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:p,"json-pointer":d,"json-pointer-uri-fragment":h,"relative-json-pointer":m};function isLeapYear(e){return e%4===0&&(e%100!==0||e%400===0)}function date(e){var r=e.match(i);if(!r)return false;var t=+r[1];var a=+r[2];var s=+r[3];return a>=1&&a<=12&&s>=1&&s<=(a==2&&isLeapYear(t)?29:n[a])}function time(e,r){var t=e.match(s);if(!t)return false;var a=t[1];var i=t[2];var n=t[3];var o=t[5];return(a<=23&&i<=59&&n<=59||a==23&&i==59&&n==60)&&(!r||o)}var v=/t|\s/i;function date_time(e){var r=e.split(v);return r.length==2&&date(r[0])&&time(r[1],true)}var y=/\/|:/;function uri(e){return y.test(e)&&l.test(e)}var g=/[^\\]\\Z/;function regex(e){if(g.test(e))return false;try{new RegExp(e);return true}catch(e){return false}}},5391:(e,r,t)=>{"use strict";var a=t(6650),i=t(3162),n=t(2485),s=t(4486);var o=t(734);var l=i.ucs2length;var c=t(3064);var u=n.Validation;e.exports=compile;function compile(e,r,t,f){var p=this,d=this._opts,h=[undefined],m={},v=[],y={},g=[],S={},w=[];r=r||{schema:e,refVal:h,refs:m};var E=checkCompiling.call(this,e,r,f);var b=this._compilations[E.index];if(E.compiling)return b.callValidate=callValidate;var P=this._formats;var x=this.RULES;try{var _=localCompile(e,r,t,f);b.validate=_;var k=b.callValidate;if(k){k.schema=_.schema;k.errors=null;k.refs=_.refs;k.refVal=_.refVal;k.root=_.root;k.$async=_.$async;if(d.sourceCode)k.source=_.source}return _}finally{endCompiling.call(this,e,r,f)}function callValidate(){var e=b.validate;var r=e.apply(this,arguments);callValidate.errors=e.errors;return r}function localCompile(e,t,s,f){var y=!t||t&&t.schema==e;if(t.schema!=r.schema)return compile.call(p,e,t,s,f);var S=e.$async===true;var E=o({isTop:true,schema:e,isRoot:y,baseId:f,root:t,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:n.MissingRef,RULES:x,validate:o,util:i,resolve:a,resolveRef:resolveRef,usePattern:usePattern,useDefault:useDefault,useCustomRule:useCustomRule,opts:d,formats:P,logger:p.logger,self:p});E=vars(h,refValCode)+vars(v,patternCode)+vars(g,defaultCode)+vars(w,customRuleCode)+E;if(d.processCode)E=d.processCode(E,e);var b;try{var _=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",E);b=_(p,x,P,r,h,g,w,c,l,u);h[0]=b}catch(e){p.logger.error("Error compiling schema, function code:",E);throw e}b.schema=e;b.errors=null;b.refs=m;b.refVal=h;b.root=y?b:t;if(S)b.$async=true;if(d.sourceCode===true){b.source={code:E,patterns:v,defaults:g}}return b}function resolveRef(e,i,n){i=a.url(e,i);var s=m[i];var o,l;if(s!==undefined){o=h[s];l="refVal["+s+"]";return resolvedRef(o,l)}if(!n&&r.refs){var c=r.refs[i];if(c!==undefined){o=r.refVal[c];l=addLocalRef(i,o);return resolvedRef(o,l)}}l=addLocalRef(i);var u=a.call(p,localCompile,r,i);if(u===undefined){var f=t&&t[i];if(f){u=a.inlineRef(f,d.inlineRefs)?f:compile.call(p,f,r,t,e)}}if(u===undefined){removeLocalRef(i)}else{replaceLocalRef(i,u);return resolvedRef(u,l)}}function addLocalRef(e,r){var t=h.length;h[t]=r;m[e]=t;return"refVal"+t}function removeLocalRef(e){delete m[e]}function replaceLocalRef(e,r){var t=m[e];h[t]=r}function resolvedRef(e,r){return typeof e=="object"||typeof e=="boolean"?{code:r,schema:e,inline:true}:{code:r,$async:e&&!!e.$async}}function usePattern(e){var r=y[e];if(r===undefined){r=y[e]=v.length;v[r]=e}return"pattern"+r}function useDefault(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return i.toQuotedString(e);case"object":if(e===null)return"null";var r=s(e);var t=S[r];if(t===undefined){t=S[r]=g.length;g[t]=e}return"default"+t}}function useCustomRule(e,r,t,a){if(p._opts.validateSchema!==false){var i=e.definition.dependencies;if(i&&!i.every((function(e){return Object.prototype.hasOwnProperty.call(t,e)})))throw new Error("parent schema must have all required keywords: "+i.join(","));var n=e.definition.validateSchema;if(n){var s=n(r);if(!s){var o="keyword schema is invalid: "+p.errorsText(n.errors);if(p._opts.validateSchema=="log")p.logger.error(o);else throw new Error(o)}}}var l=e.definition.compile,c=e.definition.inline,u=e.definition.macro;var f;if(l){f=l.call(p,r,t,a)}else if(u){f=u.call(p,r,t,a);if(d.validateSchema!==false)p.validateSchema(f,true)}else if(c){f=c.call(p,a,e.keyword,r,t)}else{f=e.definition.validate;if(!f)return}if(f===undefined)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=w.length;w[h]=f;return{code:"customRule"+h,validate:f}}}function checkCompiling(e,r,t){var a=compIndex.call(this,e,r,t);if(a>=0)return{index:a,compiling:true};a=this._compilations.length;this._compilations[a]={schema:e,root:r,baseId:t};return{index:a,compiling:false}}function endCompiling(e,r,t){var a=compIndex.call(this,e,r,t);if(a>=0)this._compilations.splice(a,1)}function compIndex(e,r,t){for(var a=0;a{"use strict";var a=t(626),i=t(3064),n=t(3162),s=t(5738),o=t(8154);e.exports=resolve;resolve.normalizeId=normalizeId;resolve.fullPath=getFullPath;resolve.url=resolveUrl;resolve.ids=resolveIds;resolve.inlineRef=inlineRef;resolve.schema=resolveSchema;function resolve(e,r,t){var a=this._refs[t];if(typeof a=="string"){if(this._refs[a])a=this._refs[a];else return resolve.call(this,e,r,a)}a=a||this._schemas[t];if(a instanceof s){return inlineRef(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a)}var i=resolveSchema.call(this,r,t);var n,o,l;if(i){n=i.schema;r=i.root;l=i.baseId}if(n instanceof s){o=n.validate||e.call(this,n.schema,r,undefined,l)}else if(n!==undefined){o=inlineRef(n,this._opts.inlineRefs)?n:e.call(this,n,r,undefined,l)}return o}function resolveSchema(e,r){var t=a.parse(r),i=_getFullPath(t),n=getFullPath(this._getId(e.schema));if(Object.keys(e.schema).length===0||i!==n){var o=normalizeId(i);var l=this._refs[o];if(typeof l=="string"){return resolveRecursive.call(this,e,l,t)}else if(l instanceof s){if(!l.validate)this._compile(l);e=l}else{l=this._schemas[o];if(l instanceof s){if(!l.validate)this._compile(l);if(o==normalizeId(r))return{schema:l,root:e,baseId:n};e=l}else{return}}if(!e.schema)return;n=getFullPath(this._getId(e.schema))}return getJsonPointer.call(this,t,n,e.schema,e)}function resolveRecursive(e,r,t){var a=resolveSchema.call(this,e,r);if(a){var i=a.schema;var n=a.baseId;e=a.root;var s=this._getId(i);if(s)n=resolveUrl(n,s);return getJsonPointer.call(this,t,n,i,e)}}var l=n.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(e,r,t,a){e.fragment=e.fragment||"";if(e.fragment.slice(0,1)!="/")return;var i=e.fragment.split("/");for(var s=1;s{"use strict";var a=t(1960),i=t(3162).toHash;e.exports=function rules(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}];var r=["type","$comment"];var t=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"];var n=["number","integer","string","array","object","boolean","null"];e.all=i(r);e.types=i(n);e.forEach((function(t){t.rules=t.rules.map((function(t){var i;if(typeof t=="object"){var n=Object.keys(t)[0];i=t[n];t=n;i.forEach((function(t){r.push(t);e.all[t]=true}))}r.push(t);var s=e.all[t]={keyword:t,code:a[t],implements:i};return s}));e.all.$comment={keyword:"$comment",code:a.$comment};if(t.type)e.types[t.type]=t}));e.keywords=i(r.concat(t));e.custom={};return e}},5738:(e,r,t)=>{"use strict";var a=t(3162);e.exports=SchemaObject;function SchemaObject(e){a.copy(e,this)}},6103:e=>{"use strict";e.exports=function ucs2length(e){var r=0,t=e.length,a=0,i;while(a=55296&&i<=56319&&a{"use strict";e.exports={copy:copy,checkDataType:checkDataType,checkDataTypes:checkDataTypes,coerceToTypes:coerceToTypes,toHash:toHash,getProperty:getProperty,escapeQuotes:escapeQuotes,equal:t(3064),ucs2length:t(6103),varOccurences:varOccurences,varReplace:varReplace,schemaHasRules:schemaHasRules,schemaHasRulesExcept:schemaHasRulesExcept,schemaUnknownRules:schemaUnknownRules,toQuotedString:toQuotedString,getPathExpr:getPathExpr,getPath:getPath,getData:getData,unescapeFragment:unescapeFragment,unescapeJsonPointer:unescapeJsonPointer,escapeFragment:escapeFragment,escapeJsonPointer:escapeJsonPointer};function copy(e,r){r=r||{};for(var t in e)r[t]=e[t];return r}function checkDataType(e,r,t,a){var i=a?" !== ":" === ",n=a?" || ":" && ",s=a?"!":"",o=a?"":"!";switch(e){case"null":return r+i+"null";case"array":return s+"Array.isArray("+r+")";case"object":return"("+s+r+n+"typeof "+r+i+'"object"'+n+o+"Array.isArray("+r+"))";case"integer":return"(typeof "+r+i+'"number"'+n+o+"("+r+" % 1)"+n+r+i+r+(t?n+s+"isFinite("+r+")":"")+")";case"number":return"(typeof "+r+i+'"'+e+'"'+(t?n+s+"isFinite("+r+")":"")+")";default:return"typeof "+r+i+'"'+e+'"'}}function checkDataTypes(e,r,t){switch(e.length){case 1:return checkDataType(e[0],r,t,true);default:var a="";var i=toHash(e);if(i.array&&i.object){a=i.null?"(":"(!"+r+" || ";a+="typeof "+r+' !== "object")';delete i.null;delete i.array;delete i.object}if(i.number)delete i.integer;for(var n in i)a+=(a?" && ":"")+checkDataType(n,r,t,true);return a}}var a=toHash(["string","number","integer","boolean","null"]);function coerceToTypes(e,r){if(Array.isArray(r)){var t=[];for(var i=0;i=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);n="data"+(r-a||"");if(!i)return n}var c=n;var u=i.split("/");for(var f=0;f{"use strict";var r=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,t){for(var a=0;a{"use strict";var a=t(8703);e.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:a.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:a.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}},2813:e=>{"use strict";e.exports=function generate__limit(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u;var f="data"+(n||"");var p=e.opts.$data&&s&&s.$data,d;if(p){a+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ";d="schema"+i}else{d=s}var h=r=="maximum",m=h?"exclusiveMaximum":"exclusiveMinimum",v=e.schema[m],y=e.opts.$data&&v&&v.$data,g=h?"<":">",S=h?">":"<",u=undefined;if(!(p||typeof s=="number"||s===undefined)){throw new Error(r+" must be number")}if(!(y||v===undefined||typeof v=="number"||typeof v=="boolean")){throw new Error(m+" must be number or boolean")}if(y){var w=e.util.getData(v.$data,n,e.dataPathArr),E="exclusive"+i,b="exclType"+i,P="exclIsNumber"+i,x="op"+i,_="' + "+x+" + '";a+=" var schemaExcl"+i+" = "+w+"; ";w="schemaExcl"+i;a+=" var "+E+"; var "+b+" = typeof "+w+"; if ("+b+" != 'boolean' && "+b+" != 'undefined' && "+b+" != 'number') { ";var u=m;var k=k||[];k.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(u||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ";if(e.opts.messages!==false){a+=" , message: '"+m+" should be boolean' "}if(e.opts.verbose){a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "}a+=" } "}else{a+=" {} "}var O=a;a=k.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+O+"]); "}else{a+=" validate.errors = ["+O+"]; return false; "}}else{a+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } else if ( ";if(p){a+=" ("+d+" !== undefined && typeof "+d+" != 'number') || "}a+=" "+b+" == 'number' ? ( ("+E+" = "+d+" === undefined || "+w+" "+g+"= "+d+") ? "+f+" "+S+"= "+w+" : "+f+" "+S+" "+d+" ) : ( ("+E+" = "+w+" === true) ? "+f+" "+S+"= "+d+" : "+f+" "+S+" "+d+" ) || "+f+" !== "+f+") { var op"+i+" = "+E+" ? '"+g+"' : '"+g+"='; ";if(s===undefined){u=m;l=e.errSchemaPath+"/"+m;d=w;p=y}}else{var P=typeof v=="number",_=g;if(P&&p){var x="'"+_+"'";a+=" if ( ";if(p){a+=" ("+d+" !== undefined && typeof "+d+" != 'number') || "}a+=" ( "+d+" === undefined || "+v+" "+g+"= "+d+" ? "+f+" "+S+"= "+v+" : "+f+" "+S+" "+d+" ) || "+f+" !== "+f+") { "}else{if(P&&s===undefined){E=true;u=m;l=e.errSchemaPath+"/"+m;d=v;S+="="}else{if(P)d=Math[h?"min":"max"](v,s);if(v===(P?d:true)){E=true;u=m;l=e.errSchemaPath+"/"+m;S+="="}else{E=false;_+="="}}var x="'"+_+"'";a+=" if ( ";if(p){a+=" ("+d+" !== undefined && typeof "+d+" != 'number') || "}a+=" "+f+" "+S+" "+d+" || "+f+" !== "+f+") { "}}u=u||r;var k=k||[];k.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(u||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { comparison: "+x+", limit: "+d+", exclusive: "+E+" } ";if(e.opts.messages!==false){a+=" , message: 'should be "+_+" ";if(p){a+="' + "+d}else{a+=""+d+"'"}}if(e.opts.verbose){a+=" , schema: ";if(p){a+="validate.schema"+o}else{a+=""+s}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "}a+=" } "}else{a+=" {} "}var O=a;a=k.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+O+"]); "}else{a+=" validate.errors = ["+O+"]; return false; "}}else{a+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } ";if(c){a+=" else { "}return a}},9809:e=>{"use strict";e.exports=function generate__limitItems(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u;var f="data"+(n||"");var p=e.opts.$data&&s&&s.$data,d;if(p){a+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ";d="schema"+i}else{d=s}if(!(p||typeof s=="number")){throw new Error(r+" must be number")}var h=r=="maxItems"?">":"<";a+="if ( ";if(p){a+=" ("+d+" !== undefined && typeof "+d+" != 'number') || "}a+=" "+f+".length "+h+" "+d+") { ";var u=r;var m=m||[];m.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(u||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+d+" } ";if(e.opts.messages!==false){a+=" , message: 'should NOT have ";if(r=="maxItems"){a+="more"}else{a+="fewer"}a+=" than ";if(p){a+="' + "+d+" + '"}else{a+=""+s}a+=" items' "}if(e.opts.verbose){a+=" , schema: ";if(p){a+="validate.schema"+o}else{a+=""+s}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "}a+=" } "}else{a+=" {} "}var v=a;a=m.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+v+"]); "}else{a+=" validate.errors = ["+v+"]; return false; "}}else{a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+="} ";if(c){a+=" else { "}return a}},5356:e=>{"use strict";e.exports=function generate__limitLength(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u;var f="data"+(n||"");var p=e.opts.$data&&s&&s.$data,d;if(p){a+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ";d="schema"+i}else{d=s}if(!(p||typeof s=="number")){throw new Error(r+" must be number")}var h=r=="maxLength"?">":"<";a+="if ( ";if(p){a+=" ("+d+" !== undefined && typeof "+d+" != 'number') || "}if(e.opts.unicode===false){a+=" "+f+".length "}else{a+=" ucs2length("+f+") "}a+=" "+h+" "+d+") { ";var u=r;var m=m||[];m.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(u||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+d+" } ";if(e.opts.messages!==false){a+=" , message: 'should NOT be ";if(r=="maxLength"){a+="longer"}else{a+="shorter"}a+=" than ";if(p){a+="' + "+d+" + '"}else{a+=""+s}a+=" characters' "}if(e.opts.verbose){a+=" , schema: ";if(p){a+="validate.schema"+o}else{a+=""+s}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "}a+=" } "}else{a+=" {} "}var v=a;a=m.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+v+"]); "}else{a+=" validate.errors = ["+v+"]; return false; "}}else{a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+="} ";if(c){a+=" else { "}return a}},7500:e=>{"use strict";e.exports=function generate__limitProperties(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u;var f="data"+(n||"");var p=e.opts.$data&&s&&s.$data,d;if(p){a+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ";d="schema"+i}else{d=s}if(!(p||typeof s=="number")){throw new Error(r+" must be number")}var h=r=="maxProperties"?">":"<";a+="if ( ";if(p){a+=" ("+d+" !== undefined && typeof "+d+" != 'number') || "}a+=" Object.keys("+f+").length "+h+" "+d+") { ";var u=r;var m=m||[];m.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(u||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+d+" } ";if(e.opts.messages!==false){a+=" , message: 'should NOT have ";if(r=="maxProperties"){a+="more"}else{a+="fewer"}a+=" than ";if(p){a+="' + "+d+" + '"}else{a+=""+s}a+=" properties' "}if(e.opts.verbose){a+=" , schema: ";if(p){a+="validate.schema"+o}else{a+=""+s}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "}a+=" } "}else{a+=" {} "}var v=a;a=m.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+v+"]); "}else{a+=" validate.errors = ["+v+"]; return false; "}}else{a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+="} ";if(c){a+=" else { "}return a}},6265:e=>{"use strict";e.exports=function generate_allOf(e,r,t){var a=" ";var i=e.schema[r];var n=e.schemaPath+e.util.getProperty(r);var s=e.errSchemaPath+"/"+r;var o=!e.opts.allErrors;var l=e.util.copy(e);var c="";l.level++;var u="valid"+l.level;var f=l.baseId,p=true;var d=i;if(d){var h,m=-1,v=d.length-1;while(m0||h===false:e.util.schemaHasRules(h,e.RULES.all)){p=false;l.schema=h;l.schemaPath=n+"["+m+"]";l.errSchemaPath=s+"/"+m;a+=" "+e.validate(l)+" ";l.baseId=f;if(o){a+=" if ("+u+") { ";c+="}"}}}}if(o){if(p){a+=" if (true) { "}else{a+=" "+c.slice(0,-1)+" "}}return a}},2816:e=>{"use strict";e.exports=function generate_anyOf(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u="data"+(n||"");var f="valid"+i;var p="errs__"+i;var d=e.util.copy(e);var h="";d.level++;var m="valid"+d.level;var v=s.every((function(r){return e.opts.strictKeywords?typeof r=="object"&&Object.keys(r).length>0||r===false:e.util.schemaHasRules(r,e.RULES.all)}));if(v){var y=d.baseId;a+=" var "+p+" = errors; var "+f+" = false; ";var g=e.compositeRule;e.compositeRule=d.compositeRule=true;var S=s;if(S){var w,E=-1,b=S.length-1;while(E{"use strict";e.exports=function generate_comment(e,r,t){var a=" ";var i=e.schema[r];var n=e.errSchemaPath+"/"+r;var s=!e.opts.allErrors;var o=e.util.toQuotedString(i);if(e.opts.$comment===true){a+=" console.log("+o+");"}else if(typeof e.opts.$comment=="function"){a+=" self._opts.$comment("+o+", "+e.util.toQuotedString(n)+", validate.root.schema);"}return a}},3641:e=>{"use strict";e.exports=function generate_const(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u="data"+(n||"");var f="valid"+i;var p=e.opts.$data&&s&&s.$data,d;if(p){a+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ";d="schema"+i}else{d=s}if(!p){a+=" var schema"+i+" = validate.schema"+o+";"}a+="var "+f+" = equal("+u+", schema"+i+"); if (!"+f+") { ";var h=h||[];h.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"const"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+i+" } ";if(e.opts.messages!==false){a+=" , message: 'should be equal to constant' "}if(e.opts.verbose){a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var m=a;a=h.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+m+"]); "}else{a+=" validate.errors = ["+m+"]; return false; "}}else{a+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" }";if(c){a+=" else { "}return a}},6665:e=>{"use strict";e.exports=function generate_contains(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u="data"+(n||"");var f="valid"+i;var p="errs__"+i;var d=e.util.copy(e);var h="";d.level++;var m="valid"+d.level;var v="i"+i,y=d.dataLevel=e.dataLevel+1,g="data"+y,S=e.baseId,w=e.opts.strictKeywords?typeof s=="object"&&Object.keys(s).length>0||s===false:e.util.schemaHasRules(s,e.RULES.all);a+="var "+p+" = errors;var "+f+";";if(w){var E=e.compositeRule;e.compositeRule=d.compositeRule=true;d.schema=s;d.schemaPath=o;d.errSchemaPath=l;a+=" var "+m+" = false; for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ";d.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,true);var b=u+"["+v+"]";d.dataPathArr[y]=v;var P=e.validate(d);d.baseId=S;if(e.util.varOccurences(P,g)<2){a+=" "+e.util.varReplace(P,g,b)+" "}else{a+=" var "+g+" = "+b+"; "+P+" "}a+=" if ("+m+") break; } ";e.compositeRule=d.compositeRule=E;a+=" "+h+" if (!"+m+") {"}else{a+=" if ("+u+".length == 0) {"}var x=x||[];x.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"contains"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ";if(e.opts.messages!==false){a+=" , message: 'should contain a valid item' "}if(e.opts.verbose){a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var _=a;a=x.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+_+"]); "}else{a+=" validate.errors = ["+_+"]; return false; "}}else{a+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } else { ";if(w){a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } "}if(e.opts.allErrors){a+=" } "}return a}},8343:e=>{"use strict";e.exports=function generate_custom(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u;var f="data"+(n||"");var p="valid"+i;var d="errs__"+i;var h=e.opts.$data&&s&&s.$data,m;if(h){a+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ";m="schema"+i}else{m=s}var v=this,y="definition"+i,g=v.definition,S="";var w,E,b,P,x;if(h&&g.$data){x="keywordValidate"+i;var _=g.validateSchema;a+=" var "+y+" = RULES.custom['"+r+"'].definition; var "+x+" = "+y+".validate;"}else{P=e.useCustomRule(v,s,e.schema,e);if(!P)return;m="validate.schema"+o;x=P.code;w=g.compile;E=g.inline;b=g.macro}var k=x+".errors",O="i"+i,C="ruleErr"+i,A=g.async;if(A&&!e.async)throw new Error("async keyword in sync schema");if(!(E||b)){a+=""+k+" = null;"}a+="var "+d+" = errors;var "+p+";";if(h&&g.$data){S+="}";a+=" if ("+m+" === undefined) { "+p+" = true; } else { ";if(_){S+="}";a+=" "+p+" = "+y+".validateSchema("+m+"); if ("+p+") { "}}if(E){if(g.statements){a+=" "+P.validate+" "}else{a+=" "+p+" = "+P.validate+"; "}}else if(b){var F=e.util.copy(e);var S="";F.level++;var R="valid"+F.level;F.schema=P.validate;F.schemaPath="";var I=e.compositeRule;e.compositeRule=F.compositeRule=true;var D=e.validate(F).replace(/validate\.schema/g,x);e.compositeRule=F.compositeRule=I;a+=" "+D}else{var j=j||[];j.push(a);a="";a+=" "+x+".call( ";if(e.opts.passContext){a+="this"}else{a+="self"}if(w||g.schema===false){a+=" , "+f+" "}else{a+=" , "+m+" , "+f+" , validate.schema"+e.schemaPath+" "}a+=" , (dataPath || '')";if(e.errorPath!='""'){a+=" + "+e.errorPath}var T=n?"data"+(n-1||""):"parentData",$=n?e.dataPathArr[n]:"parentDataProperty";a+=" , "+T+" , "+$+" , rootData ) ";var N=a;a=j.pop();if(g.errors===false){a+=" "+p+" = ";if(A){a+="await "}a+=""+N+"; "}else{if(A){k="customErrors"+i;a+=" var "+k+" = null; try { "+p+" = await "+N+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+k+" = e.errors; else throw e; } "}else{a+=" "+k+" = null; "+p+" = "+N+"; "}}}if(g.modifying){a+=" if ("+T+") "+f+" = "+T+"["+$+"];"}a+=""+S;if(g.valid){if(c){a+=" if (true) { "}}else{a+=" if ( ";if(g.valid===undefined){a+=" !";if(b){a+=""+R}else{a+=""+p}}else{a+=" "+!g.valid+" "}a+=") { ";u=v.keyword;var j=j||[];j.push(a);a="";var j=j||[];j.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(u||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { keyword: '"+v.keyword+"' } ";if(e.opts.messages!==false){a+=" , message: 'should pass \""+v.keyword+"\" keyword validation' "}if(e.opts.verbose){a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "}a+=" } "}else{a+=" {} "}var L=a;a=j.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+L+"]); "}else{a+=" validate.errors = ["+L+"]; return false; "}}else{a+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}var M=a;a=j.pop();if(E){if(g.errors){if(g.errors!="full"){a+=" for (var "+O+"="+d+"; "+O+"{"use strict";e.exports=function generate_dependencies(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u="data"+(n||"");var f="errs__"+i;var p=e.util.copy(e);var d="";p.level++;var h="valid"+p.level;var m={},v={},y=e.opts.ownProperties;for(E in s){if(E=="__proto__")continue;var g=s[E];var S=Array.isArray(g)?v:m;S[E]=g}a+="var "+f+" = errors;";var w=e.errorPath;a+="var missing"+i+";";for(var E in v){S=v[E];if(S.length){a+=" if ( "+u+e.util.getProperty(E)+" !== undefined ";if(y){a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(E)+"') "}if(c){a+=" && ( ";var b=S;if(b){var P,x=-1,_=b.length-1;while(x<_){P=b[x+=1];if(x){a+=" || "}var k=e.util.getProperty(P),O=u+k;a+=" ( ( "+O+" === undefined ";if(y){a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(P)+"') "}a+=") && (missing"+i+" = "+e.util.toQuotedString(e.opts.jsonPointers?P:k)+") ) "}}a+=")) { ";var C="missing"+i,A="' + "+C+" + '";if(e.opts._errorDataPathProperty){e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(w,C,true):w+" + "+C}var F=F||[];F.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"dependencies"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { property: '"+e.util.escapeQuotes(E)+"', missingProperty: '"+A+"', depsCount: "+S.length+", deps: '"+e.util.escapeQuotes(S.length==1?S[0]:S.join(", "))+"' } ";if(e.opts.messages!==false){a+=" , message: 'should have ";if(S.length==1){a+="property "+e.util.escapeQuotes(S[0])}else{a+="properties "+e.util.escapeQuotes(S.join(", "))}a+=" when property "+e.util.escapeQuotes(E)+" is present' "}if(e.opts.verbose){a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var R=a;a=F.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+R+"]); "}else{a+=" validate.errors = ["+R+"]; return false; "}}else{a+=" var err = "+R+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}else{a+=" ) { ";var I=S;if(I){var P,D=-1,j=I.length-1;while(D0||g===false:e.util.schemaHasRules(g,e.RULES.all)){a+=" "+h+" = true; if ( "+u+e.util.getProperty(E)+" !== undefined ";if(y){a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(E)+"') "}a+=") { ";p.schema=g;p.schemaPath=o+e.util.getProperty(E);p.errSchemaPath=l+"/"+e.util.escapeFragment(E);a+=" "+e.validate(p)+" ";p.baseId=T;a+=" } ";if(c){a+=" if ("+h+") { ";d+="}"}}}if(c){a+=" "+d+" if ("+f+" == errors) {"}return a}},5625:e=>{"use strict";e.exports=function generate_enum(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u="data"+(n||"");var f="valid"+i;var p=e.opts.$data&&s&&s.$data,d;if(p){a+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ";d="schema"+i}else{d=s}var h="i"+i,m="schema"+i;if(!p){a+=" var "+m+" = validate.schema"+o+";"}a+="var "+f+";";if(p){a+=" if (schema"+i+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+i+")) "+f+" = false; else {"}a+=""+f+" = false;for (var "+h+"=0; "+h+"<"+m+".length; "+h+"++) if (equal("+u+", "+m+"["+h+"])) { "+f+" = true; break; }";if(p){a+=" } "}a+=" if (!"+f+") { ";var v=v||[];v.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"enum"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+i+" } ";if(e.opts.messages!==false){a+=" , message: 'should be equal to one of the allowed values' "}if(e.opts.verbose){a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var y=a;a=v.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+y+"]); "}else{a+=" validate.errors = ["+y+"]; return false; "}}else{a+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" }";if(c){a+=" else { "}return a}},137:e=>{"use strict";e.exports=function generate_format(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u="data"+(n||"");if(e.opts.format===false){if(c){a+=" if (true) { "}return a}var f=e.opts.$data&&s&&s.$data,p;if(f){a+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ";p="schema"+i}else{p=s}var d=e.opts.unknownFormats,h=Array.isArray(d);if(f){var m="format"+i,v="isObject"+i,y="formatType"+i;a+=" var "+m+" = formats["+p+"]; var "+v+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+y+" = "+v+" && "+m+".type || 'string'; if ("+v+") { ";if(e.async){a+=" var async"+i+" = "+m+".async; "}a+=" "+m+" = "+m+".validate; } if ( ";if(f){a+=" ("+p+" !== undefined && typeof "+p+" != 'string') || "}a+=" (";if(d!="ignore"){a+=" ("+p+" && !"+m+" ";if(h){a+=" && self._opts.unknownFormats.indexOf("+p+") == -1 "}a+=") || "}a+=" ("+m+" && "+y+" == '"+t+"' && !(typeof "+m+" == 'function' ? ";if(e.async){a+=" (async"+i+" ? await "+m+"("+u+") : "+m+"("+u+")) "}else{a+=" "+m+"("+u+") "}a+=" : "+m+".test("+u+"))))) {"}else{var m=e.formats[s];if(!m){if(d=="ignore"){e.logger.warn('unknown format "'+s+'" ignored in schema at path "'+e.errSchemaPath+'"');if(c){a+=" if (true) { "}return a}else if(h&&d.indexOf(s)>=0){if(c){a+=" if (true) { "}return a}else{throw new Error('unknown format "'+s+'" is used in schema at path "'+e.errSchemaPath+'"')}}var v=typeof m=="object"&&!(m instanceof RegExp)&&m.validate;var y=v&&m.type||"string";if(v){var g=m.async===true;m=m.validate}if(y!=t){if(c){a+=" if (true) { "}return a}if(g){if(!e.async)throw new Error("async format in sync schema");var S="formats"+e.util.getProperty(s)+".validate";a+=" if (!(await "+S+"("+u+"))) { "}else{a+=" if (! ";var S="formats"+e.util.getProperty(s);if(v)S+=".validate";if(typeof m=="function"){a+=" "+S+"("+u+") "}else{a+=" "+S+".test("+u+") "}a+=") { "}}var w=w||[];w.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"format"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ";if(f){a+=""+p}else{a+=""+e.util.toQuotedString(s)}a+=" } ";if(e.opts.messages!==false){a+=" , message: 'should match format \"";if(f){a+="' + "+p+" + '"}else{a+=""+e.util.escapeQuotes(s)}a+="\"' "}if(e.opts.verbose){a+=" , schema: ";if(f){a+="validate.schema"+o}else{a+=""+e.util.toQuotedString(s)}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var E=a;a=w.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+E+"]); "}else{a+=" validate.errors = ["+E+"]; return false; "}}else{a+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } ";if(c){a+=" else { "}return a}},7137:e=>{"use strict";e.exports=function generate_if(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u="data"+(n||"");var f="valid"+i;var p="errs__"+i;var d=e.util.copy(e);d.level++;var h="valid"+d.level;var m=e.schema["then"],v=e.schema["else"],y=m!==undefined&&(e.opts.strictKeywords?typeof m=="object"&&Object.keys(m).length>0||m===false:e.util.schemaHasRules(m,e.RULES.all)),g=v!==undefined&&(e.opts.strictKeywords?typeof v=="object"&&Object.keys(v).length>0||v===false:e.util.schemaHasRules(v,e.RULES.all)),S=d.baseId;if(y||g){var w;d.createErrors=false;d.schema=s;d.schemaPath=o;d.errSchemaPath=l;a+=" var "+p+" = errors; var "+f+" = true; ";var E=e.compositeRule;e.compositeRule=d.compositeRule=true;a+=" "+e.validate(d)+" ";d.baseId=S;d.createErrors=true;a+=" errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ";e.compositeRule=d.compositeRule=E;if(y){a+=" if ("+h+") { ";d.schema=e.schema["then"];d.schemaPath=e.schemaPath+".then";d.errSchemaPath=e.errSchemaPath+"/then";a+=" "+e.validate(d)+" ";d.baseId=S;a+=" "+f+" = "+h+"; ";if(y&&g){w="ifClause"+i;a+=" var "+w+" = 'then'; "}else{w="'then'"}a+=" } ";if(g){a+=" else { "}}else{a+=" if (!"+h+") { "}if(g){d.schema=e.schema["else"];d.schemaPath=e.schemaPath+".else";d.errSchemaPath=e.errSchemaPath+"/else";a+=" "+e.validate(d)+" ";d.baseId=S;a+=" "+f+" = "+h+"; ";if(y&&g){w="ifClause"+i;a+=" var "+w+" = 'else'; "}else{w="'else'"}a+=" } "}a+=" if (!"+f+") { var err = ";if(e.createErrors!==false){a+=" { keyword: '"+"if"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+w+" } ";if(e.opts.messages!==false){a+=" , message: 'should match \"' + "+w+" + '\" schema' "}if(e.opts.verbose){a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(vErrors); "}else{a+=" validate.errors = vErrors; return false; "}}a+=" } ";if(c){a+=" else { "}}else{if(c){a+=" if (true) { "}}return a}},1960:(e,r,t)=>{"use strict";e.exports={$ref:t(144),allOf:t(6265),anyOf:t(2816),$comment:t(4302),const:t(3641),contains:t(6665),dependencies:t(4352),enum:t(5625),format:t(137),if:t(7137),items:t(6301),maximum:t(2813),minimum:t(2813),maxItems:t(9809),minItems:t(9809),maxLength:t(5356),minLength:t(5356),maxProperties:t(7500),minProperties:t(7500),multipleOf:t(9180),not:t(911),oneOf:t(555),pattern:t(8557),properties:t(2847),propertyNames:t(5897),required:t(6775),uniqueItems:t(4313),validate:t(734)}},6301:e=>{"use strict";e.exports=function generate_items(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u="data"+(n||"");var f="valid"+i;var p="errs__"+i;var d=e.util.copy(e);var h="";d.level++;var m="valid"+d.level;var v="i"+i,y=d.dataLevel=e.dataLevel+1,g="data"+y,S=e.baseId;a+="var "+p+" = errors;var "+f+";";if(Array.isArray(s)){var w=e.schema.additionalItems;if(w===false){a+=" "+f+" = "+u+".length <= "+s.length+"; ";var E=l;l=e.errSchemaPath+"/additionalItems";a+=" if (!"+f+") { ";var b=b||[];b.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"additionalItems"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+s.length+" } ";if(e.opts.messages!==false){a+=" , message: 'should NOT have more than "+s.length+" items' "}if(e.opts.verbose){a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var P=a;a=b.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+P+"]); "}else{a+=" validate.errors = ["+P+"]; return false; "}}else{a+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } ";l=E;if(c){h+="}";a+=" else { "}}var x=s;if(x){var _,k=-1,O=x.length-1;while(k0||_===false:e.util.schemaHasRules(_,e.RULES.all)){a+=" "+m+" = true; if ("+u+".length > "+k+") { ";var C=u+"["+k+"]";d.schema=_;d.schemaPath=o+"["+k+"]";d.errSchemaPath=l+"/"+k;d.errorPath=e.util.getPathExpr(e.errorPath,k,e.opts.jsonPointers,true);d.dataPathArr[y]=k;var A=e.validate(d);d.baseId=S;if(e.util.varOccurences(A,g)<2){a+=" "+e.util.varReplace(A,g,C)+" "}else{a+=" var "+g+" = "+C+"; "+A+" "}a+=" } ";if(c){a+=" if ("+m+") { ";h+="}"}}}}if(typeof w=="object"&&(e.opts.strictKeywords?typeof w=="object"&&Object.keys(w).length>0||w===false:e.util.schemaHasRules(w,e.RULES.all))){d.schema=w;d.schemaPath=e.schemaPath+".additionalItems";d.errSchemaPath=e.errSchemaPath+"/additionalItems";a+=" "+m+" = true; if ("+u+".length > "+s.length+") { for (var "+v+" = "+s.length+"; "+v+" < "+u+".length; "+v+"++) { ";d.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,true);var C=u+"["+v+"]";d.dataPathArr[y]=v;var A=e.validate(d);d.baseId=S;if(e.util.varOccurences(A,g)<2){a+=" "+e.util.varReplace(A,g,C)+" "}else{a+=" var "+g+" = "+C+"; "+A+" "}if(c){a+=" if (!"+m+") break; "}a+=" } } ";if(c){a+=" if ("+m+") { ";h+="}"}}}else if(e.opts.strictKeywords?typeof s=="object"&&Object.keys(s).length>0||s===false:e.util.schemaHasRules(s,e.RULES.all)){d.schema=s;d.schemaPath=o;d.errSchemaPath=l;a+=" for (var "+v+" = "+0+"; "+v+" < "+u+".length; "+v+"++) { ";d.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,true);var C=u+"["+v+"]";d.dataPathArr[y]=v;var A=e.validate(d);d.baseId=S;if(e.util.varOccurences(A,g)<2){a+=" "+e.util.varReplace(A,g,C)+" "}else{a+=" var "+g+" = "+C+"; "+A+" "}if(c){a+=" if (!"+m+") break; "}a+=" }"}if(c){a+=" "+h+" if ("+p+" == errors) {"}return a}},9180:e=>{"use strict";e.exports=function generate_multipleOf(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u="data"+(n||"");var f=e.opts.$data&&s&&s.$data,p;if(f){a+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ";p="schema"+i}else{p=s}if(!(f||typeof s=="number")){throw new Error(r+" must be number")}a+="var division"+i+";if (";if(f){a+=" "+p+" !== undefined && ( typeof "+p+" != 'number' || "}a+=" (division"+i+" = "+u+" / "+p+", ";if(e.opts.multipleOfPrecision){a+=" Math.abs(Math.round(division"+i+") - division"+i+") > 1e-"+e.opts.multipleOfPrecision+" "}else{a+=" division"+i+" !== parseInt(division"+i+") "}a+=" ) ";if(f){a+=" ) "}a+=" ) { ";var d=d||[];d.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"multipleOf"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { multipleOf: "+p+" } ";if(e.opts.messages!==false){a+=" , message: 'should be multiple of ";if(f){a+="' + "+p}else{a+=""+p+"'"}}if(e.opts.verbose){a+=" , schema: ";if(f){a+="validate.schema"+o}else{a+=""+s}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var h=a;a=d.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+h+"]); "}else{a+=" validate.errors = ["+h+"]; return false; "}}else{a+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+="} ";if(c){a+=" else { "}return a}},911:e=>{"use strict";e.exports=function generate_not(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u="data"+(n||"");var f="errs__"+i;var p=e.util.copy(e);p.level++;var d="valid"+p.level;if(e.opts.strictKeywords?typeof s=="object"&&Object.keys(s).length>0||s===false:e.util.schemaHasRules(s,e.RULES.all)){p.schema=s;p.schemaPath=o;p.errSchemaPath=l;a+=" var "+f+" = errors; ";var h=e.compositeRule;e.compositeRule=p.compositeRule=true;p.createErrors=false;var m;if(p.opts.allErrors){m=p.opts.allErrors;p.opts.allErrors=false}a+=" "+e.validate(p)+" ";p.createErrors=true;if(m)p.opts.allErrors=m;e.compositeRule=p.compositeRule=h;a+=" if ("+d+") { ";var v=v||[];v.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ";if(e.opts.messages!==false){a+=" , message: 'should NOT be valid' "}if(e.opts.verbose){a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var y=a;a=v.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+y+"]); "}else{a+=" validate.errors = ["+y+"]; return false; "}}else{a+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ";if(e.opts.allErrors){a+=" } "}}else{a+=" var err = ";if(e.createErrors!==false){a+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ";if(e.opts.messages!==false){a+=" , message: 'should NOT be valid' "}if(e.opts.verbose){a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c){a+=" if (false) { "}}return a}},555:e=>{"use strict";e.exports=function generate_oneOf(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u="data"+(n||"");var f="valid"+i;var p="errs__"+i;var d=e.util.copy(e);var h="";d.level++;var m="valid"+d.level;var v=d.baseId,y="prevValid"+i,g="passingSchemas"+i;a+="var "+p+" = errors , "+y+" = false , "+f+" = false , "+g+" = null; ";var S=e.compositeRule;e.compositeRule=d.compositeRule=true;var w=s;if(w){var E,b=-1,P=w.length-1;while(b0||E===false:e.util.schemaHasRules(E,e.RULES.all)){d.schema=E;d.schemaPath=o+"["+b+"]";d.errSchemaPath=l+"/"+b;a+=" "+e.validate(d)+" ";d.baseId=v}else{a+=" var "+m+" = true; "}if(b){a+=" if ("+m+" && "+y+") { "+f+" = false; "+g+" = ["+g+", "+b+"]; } else { ";h+="}"}a+=" if ("+m+") { "+f+" = "+y+" = true; "+g+" = "+b+"; }"}}e.compositeRule=d.compositeRule=S;a+=""+h+"if (!"+f+") { var err = ";if(e.createErrors!==false){a+=" { keyword: '"+"oneOf"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+g+" } ";if(e.opts.messages!==false){a+=" , message: 'should match exactly one schema in oneOf' "}if(e.opts.verbose){a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(vErrors); "}else{a+=" validate.errors = vErrors; return false; "}}a+="} else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; }";if(e.opts.allErrors){a+=" } "}return a}},8557:e=>{"use strict";e.exports=function generate_pattern(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u="data"+(n||"");var f=e.opts.$data&&s&&s.$data,p;if(f){a+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ";p="schema"+i}else{p=s}var d=f?"(new RegExp("+p+"))":e.usePattern(s);a+="if ( ";if(f){a+=" ("+p+" !== undefined && typeof "+p+" != 'string') || "}a+=" !"+d+".test("+u+") ) { ";var h=h||[];h.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"pattern"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { pattern: ";if(f){a+=""+p}else{a+=""+e.util.toQuotedString(s)}a+=" } ";if(e.opts.messages!==false){a+=" , message: 'should match pattern \"";if(f){a+="' + "+p+" + '"}else{a+=""+e.util.escapeQuotes(s)}a+="\"' "}if(e.opts.verbose){a+=" , schema: ";if(f){a+="validate.schema"+o}else{a+=""+e.util.toQuotedString(s)}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var m=a;a=h.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+m+"]); "}else{a+=" validate.errors = ["+m+"]; return false; "}}else{a+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+="} ";if(c){a+=" else { "}return a}},2847:e=>{"use strict";e.exports=function generate_properties(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u="data"+(n||"");var f="errs__"+i;var p=e.util.copy(e);var d="";p.level++;var h="valid"+p.level;var m="key"+i,v="idx"+i,y=p.dataLevel=e.dataLevel+1,g="data"+y,S="dataProperties"+i;var w=Object.keys(s||{}).filter(notProto),E=e.schema.patternProperties||{},b=Object.keys(E).filter(notProto),P=e.schema.additionalProperties,x=w.length||b.length,_=P===false,k=typeof P=="object"&&Object.keys(P).length,O=e.opts.removeAdditional,C=_||k||O,A=e.opts.ownProperties,F=e.baseId;var R=e.schema.required;if(R&&!(e.opts.$data&&R.$data)&&R.length8){a+=" || validate.schema"+o+".hasOwnProperty("+m+") "}else{var D=w;if(D){var j,T=-1,$=D.length-1;while(T<$){j=D[T+=1];a+=" || "+m+" == "+e.util.toQuotedString(j)+" "}}}}if(b.length){var N=b;if(N){var L,M=-1,q=N.length-1;while(M0||X===false:e.util.schemaHasRules(X,e.RULES.all)){var ee=e.util.getProperty(j),W=u+ee,re=K&&X.default!==undefined;p.schema=X;p.schemaPath=o+ee;p.errSchemaPath=l+"/"+e.util.escapeFragment(j);p.errorPath=e.util.getPath(e.errorPath,j,e.opts.jsonPointers);p.dataPathArr[y]=e.util.toQuotedString(j);var Y=e.validate(p);p.baseId=F;if(e.util.varOccurences(Y,g)<2){Y=e.util.varReplace(Y,g,W);var te=W}else{var te=g;a+=" var "+g+" = "+W+"; "}if(re){a+=" "+Y+" "}else{if(I&&I[j]){a+=" if ( "+te+" === undefined ";if(A){a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "}a+=") { "+h+" = false; ";var U=e.errorPath,z=l,ae=e.util.escapeQuotes(j);if(e.opts._errorDataPathProperty){e.errorPath=e.util.getPath(U,j,e.opts.jsonPointers)}l=e.errSchemaPath+"/required";var B=B||[];B.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ae+"' } ";if(e.opts.messages!==false){a+=" , message: '";if(e.opts._errorDataPathProperty){a+="is a required property"}else{a+="should have required property \\'"+ae+"\\'"}a+="' "}if(e.opts.verbose){a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var V=a;a=B.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+V+"]); "}else{a+=" validate.errors = ["+V+"]; return false; "}}else{a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}l=z;e.errorPath=U;a+=" } else { "}else{if(c){a+=" if ( "+te+" === undefined ";if(A){a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "}a+=") { "+h+" = true; } else { "}else{a+=" if ("+te+" !== undefined ";if(A){a+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(j)+"') "}a+=" ) { "}}a+=" "+Y+" } "}}if(c){a+=" if ("+h+") { ";d+="}"}}}}if(b.length){var ie=b;if(ie){var L,ne=-1,se=ie.length-1;while(ne0||X===false:e.util.schemaHasRules(X,e.RULES.all)){p.schema=X;p.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(L);p.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(L);if(A){a+=" "+S+" = "+S+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+S+".length; "+v+"++) { var "+m+" = "+S+"["+v+"]; "}else{a+=" for (var "+m+" in "+u+") { "}a+=" if ("+e.usePattern(L)+".test("+m+")) { ";p.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var W=u+"["+m+"]";p.dataPathArr[y]=m;var Y=e.validate(p);p.baseId=F;if(e.util.varOccurences(Y,g)<2){a+=" "+e.util.varReplace(Y,g,W)+" "}else{a+=" var "+g+" = "+W+"; "+Y+" "}if(c){a+=" if (!"+h+") break; "}a+=" } ";if(c){a+=" else "+h+" = true; "}a+=" } ";if(c){a+=" if ("+h+") { ";d+="}"}}}}}if(c){a+=" "+d+" if ("+f+" == errors) {"}return a}},5897:e=>{"use strict";e.exports=function generate_propertyNames(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u="data"+(n||"");var f="errs__"+i;var p=e.util.copy(e);var d="";p.level++;var h="valid"+p.level;a+="var "+f+" = errors;";if(e.opts.strictKeywords?typeof s=="object"&&Object.keys(s).length>0||s===false:e.util.schemaHasRules(s,e.RULES.all)){p.schema=s;p.schemaPath=o;p.errSchemaPath=l;var m="key"+i,v="idx"+i,y="i"+i,g="' + "+m+" + '",S=p.dataLevel=e.dataLevel+1,w="data"+S,E="dataProperties"+i,b=e.opts.ownProperties,P=e.baseId;if(b){a+=" var "+E+" = undefined; "}if(b){a+=" "+E+" = "+E+" || Object.keys("+u+"); for (var "+v+"=0; "+v+"<"+E+".length; "+v+"++) { var "+m+" = "+E+"["+v+"]; "}else{a+=" for (var "+m+" in "+u+") { "}a+=" var startErrs"+i+" = errors; ";var x=m;var _=e.compositeRule;e.compositeRule=p.compositeRule=true;var k=e.validate(p);p.baseId=P;if(e.util.varOccurences(k,w)<2){a+=" "+e.util.varReplace(k,w,x)+" "}else{a+=" var "+w+" = "+x+"; "+k+" "}e.compositeRule=p.compositeRule=_;a+=" if (!"+h+") { for (var "+y+"=startErrs"+i+"; "+y+"{"use strict";e.exports=function generate_ref(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.errSchemaPath+"/"+r;var l=!e.opts.allErrors;var c="data"+(n||"");var u="valid"+i;var f,p;if(s=="#"||s=="#/"){if(e.isRoot){f=e.async;p="validate"}else{f=e.root.schema.$async===true;p="root.refVal[0]"}}else{var d=e.resolveRef(e.baseId,s,e.isRoot);if(d===undefined){var h=e.MissingRefError.message(e.baseId,s);if(e.opts.missingRefs=="fail"){e.logger.error(h);var m=m||[];m.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"$ref"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(o)+" , params: { ref: '"+e.util.escapeQuotes(s)+"' } ";if(e.opts.messages!==false){a+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(s)+"' "}if(e.opts.verbose){a+=" , schema: "+e.util.toQuotedString(s)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "}a+=" } "}else{a+=" {} "}var v=a;a=m.pop();if(!e.compositeRule&&l){if(e.async){a+=" throw new ValidationError(["+v+"]); "}else{a+=" validate.errors = ["+v+"]; return false; "}}else{a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}if(l){a+=" if (false) { "}}else if(e.opts.missingRefs=="ignore"){e.logger.warn(h);if(l){a+=" if (true) { "}}else{throw new e.MissingRefError(e.baseId,s,h)}}else if(d.inline){var y=e.util.copy(e);y.level++;var g="valid"+y.level;y.schema=d.schema;y.schemaPath="";y.errSchemaPath=s;var S=e.validate(y).replace(/validate\.schema/g,d.code);a+=" "+S+" ";if(l){a+=" if ("+g+") { "}}else{f=d.$async===true||e.async&&d.$async!==false;p=d.code}}if(p){var m=m||[];m.push(a);a="";if(e.opts.passContext){a+=" "+p+".call(this, "}else{a+=" "+p+"( "}a+=" "+c+", (dataPath || '')";if(e.errorPath!='""'){a+=" + "+e.errorPath}var w=n?"data"+(n-1||""):"parentData",E=n?e.dataPathArr[n]:"parentDataProperty";a+=" , "+w+" , "+E+", rootData) ";var b=a;a=m.pop();if(f){if(!e.async)throw new Error("async schema referenced by sync schema");if(l){a+=" var "+u+"; "}a+=" try { await "+b+"; ";if(l){a+=" "+u+" = true; "}a+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ";if(l){a+=" "+u+" = false; "}a+=" } ";if(l){a+=" if ("+u+") { "}}else{a+=" if (!"+b+") { if (vErrors === null) vErrors = "+p+".errors; else vErrors = vErrors.concat("+p+".errors); errors = vErrors.length; } ";if(l){a+=" else { "}}}return a}},6775:e=>{"use strict";e.exports=function generate_required(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u="data"+(n||"");var f="valid"+i;var p=e.opts.$data&&s&&s.$data,d;if(p){a+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ";d="schema"+i}else{d=s}var h="schema"+i;if(!p){if(s.length0||w===false:e.util.schemaHasRules(w,e.RULES.all)))){m[m.length]=y}}}}else{var m=s}}if(p||m.length){var E=e.errorPath,b=p||m.length>=e.opts.loopRequired,P=e.opts.ownProperties;if(c){a+=" var missing"+i+"; ";if(b){if(!p){a+=" var "+h+" = validate.schema"+o+"; "}var x="i"+i,_="schema"+i+"["+x+"]",k="' + "+_+" + '";if(e.opts._errorDataPathProperty){e.errorPath=e.util.getPathExpr(E,_,e.opts.jsonPointers)}a+=" var "+f+" = true; ";if(p){a+=" if (schema"+i+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+i+")) "+f+" = false; else {"}a+=" for (var "+x+" = 0; "+x+" < "+h+".length; "+x+"++) { "+f+" = "+u+"["+h+"["+x+"]] !== undefined ";if(P){a+=" && Object.prototype.hasOwnProperty.call("+u+", "+h+"["+x+"]) "}a+="; if (!"+f+") break; } ";if(p){a+=" } "}a+=" if (!"+f+") { ";var O=O||[];O.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+k+"' } ";if(e.opts.messages!==false){a+=" , message: '";if(e.opts._errorDataPathProperty){a+="is a required property"}else{a+="should have required property \\'"+k+"\\'"}a+="' "}if(e.opts.verbose){a+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var C=a;a=O.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+C+"]); "}else{a+=" validate.errors = ["+C+"]; return false; "}}else{a+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } else { "}else{a+=" if ( ";var A=m;if(A){var F,x=-1,R=A.length-1;while(x{"use strict";e.exports=function generate_uniqueItems(e,r,t){var a=" ";var i=e.level;var n=e.dataLevel;var s=e.schema[r];var o=e.schemaPath+e.util.getProperty(r);var l=e.errSchemaPath+"/"+r;var c=!e.opts.allErrors;var u="data"+(n||"");var f="valid"+i;var p=e.opts.$data&&s&&s.$data,d;if(p){a+=" var schema"+i+" = "+e.util.getData(s.$data,n,e.dataPathArr)+"; ";d="schema"+i}else{d=s}if((s||p)&&e.opts.uniqueItems!==false){if(p){a+=" var "+f+"; if ("+d+" === false || "+d+" === undefined) "+f+" = true; else if (typeof "+d+" != 'boolean') "+f+" = false; else { "}a+=" var i = "+u+".length , "+f+" = true , j; if (i > 1) { ";var h=e.schema.items&&e.schema.items.type,m=Array.isArray(h);if(!h||h=="object"||h=="array"||m&&(h.indexOf("object")>=0||h.indexOf("array")>=0)){a+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+u+"[i], "+u+"[j])) { "+f+" = false; break outer; } } } "}else{a+=" var itemIndices = {}, item; for (;i--;) { var item = "+u+"[i]; ";var v="checkDataType"+(m?"s":"");a+=" if ("+e.util[v](h,"item",e.opts.strictNumbers,true)+") continue; ";if(m){a+=" if (typeof item == 'string') item = '\"' + item; "}a+=" if (typeof itemIndices[item] == 'number') { "+f+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}a+=" } ";if(p){a+=" } "}a+=" if (!"+f+") { ";var y=y||[];y.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+"uniqueItems"+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { i: i, j: j } ";if(e.opts.messages!==false){a+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "}if(e.opts.verbose){a+=" , schema: ";if(p){a+="validate.schema"+o}else{a+=""+s}a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "}a+=" } "}else{a+=" {} "}var g=a;a=y.pop();if(!e.compositeRule&&c){if(e.async){a+=" throw new ValidationError(["+g+"]); "}else{a+=" validate.errors = ["+g+"]; return false; "}}else{a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } ";if(c){a+=" else { "}}else{if(c){a+=" if (true) { "}}return a}},734:e=>{"use strict";e.exports=function generate_validate(e,r,t){var a="";var i=e.schema.$async===true,n=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),s=e.self._getId(e.schema);if(e.opts.strictKeywords){var o=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(o){var l="unknown keyword: "+o;if(e.opts.strictKeywords==="log")e.logger.warn(l);else throw new Error(l)}}if(e.isTop){a+=" var validate = ";if(i){e.async=true;a+="async "}a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ";if(s&&(e.opts.sourceCode||e.opts.processCode)){a+=" "+("/*# sourceURL="+s+" */")+" "}}if(typeof e.schema=="boolean"||!(n||e.schema.$ref)){var r="false schema";var c=e.level;var u=e.dataLevel;var f=e.schema[r];var p=e.schemaPath+e.util.getProperty(r);var d=e.errSchemaPath+"/"+r;var h=!e.opts.allErrors;var m;var v="data"+(u||"");var y="valid"+c;if(e.schema===false){if(e.isTop){h=true}else{a+=" var "+y+" = false; "}var g=g||[];g.push(a);a="";if(e.createErrors!==false){a+=" { keyword: '"+(m||"false schema")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: {} ";if(e.opts.messages!==false){a+=" , message: 'boolean schema is false' "}if(e.opts.verbose){a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "}a+=" } "}else{a+=" {} "}var S=a;a=g.pop();if(!e.compositeRule&&h){if(e.async){a+=" throw new ValidationError(["+S+"]); "}else{a+=" validate.errors = ["+S+"]; return false; "}}else{a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}else{if(e.isTop){if(i){a+=" return data; "}else{a+=" validate.errors = null; return true; "}}else{a+=" var "+y+" = true; "}}if(e.isTop){a+=" }; return validate; "}return a}if(e.isTop){var w=e.isTop,c=e.level=0,u=e.dataLevel=0,v="data";e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema));e.baseId=e.baseId||e.rootId;delete e.isTop;e.dataPathArr=[""];if(e.schema.default!==undefined&&e.opts.useDefaults&&e.opts.strictDefaults){var E="default is ignored in the schema root";if(e.opts.strictDefaults==="log")e.logger.warn(E);else throw new Error(E)}a+=" var vErrors = null; ";a+=" var errors = 0; ";a+=" if (rootData === undefined) rootData = data; "}else{var c=e.level,u=e.dataLevel,v="data"+(u||"");if(s)e.baseId=e.resolve.url(e.baseId,s);if(i&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+c+" = errors;"}var y="valid"+c,h=!e.opts.allErrors,b="",P="";var m;var x=e.schema.type,_=Array.isArray(x);if(x&&e.opts.nullable&&e.schema.nullable===true){if(_){if(x.indexOf("null")==-1)x=x.concat("null")}else if(x!="null"){x=[x,"null"];_=true}}if(_&&x.length==1){x=x[0];_=false}if(e.schema.$ref&&n){if(e.opts.extendRefs=="fail"){throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)')}else if(e.opts.extendRefs!==true){n=false;e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"')}}if(e.schema.$comment&&e.opts.$comment){a+=" "+e.RULES.all.$comment.code(e,"$comment")}if(x){if(e.opts.coerceTypes){var k=e.util.coerceToTypes(e.opts.coerceTypes,x)}var O=e.RULES.types[x];if(k||_||O===true||O&&!$shouldUseGroup(O)){var p=e.schemaPath+".type",d=e.errSchemaPath+"/type";var p=e.schemaPath+".type",d=e.errSchemaPath+"/type",C=_?"checkDataTypes":"checkDataType";a+=" if ("+e.util[C](x,v,e.opts.strictNumbers,true)+") { ";if(k){var A="dataType"+c,F="coerced"+c;a+=" var "+A+" = typeof "+v+"; var "+F+" = undefined; ";if(e.opts.coerceTypes=="array"){a+=" if ("+A+" == 'object' && Array.isArray("+v+") && "+v+".length == 1) { "+v+" = "+v+"[0]; "+A+" = typeof "+v+"; if ("+e.util.checkDataType(e.schema.type,v,e.opts.strictNumbers)+") "+F+" = "+v+"; } "}a+=" if ("+F+" !== undefined) ; ";var R=k;if(R){var I,D=-1,j=R.length-1;while(D{"use strict";var a=/^[a-z_$][a-z0-9_$-]*$/i;var i=t(8343);var n=t(4540);e.exports={add:addKeyword,get:getKeyword,remove:removeKeyword,validate:validateKeyword};function addKeyword(e,r){var t=this.RULES;if(t.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!a.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(r){this.validateKeyword(r,true);var n=r.type;if(Array.isArray(n)){for(var s=0;s{ /*! * expand-tilde * * Copyright (c) 2015 Jon Schlinkert. * Licensed under the MIT license. */ -var n=r(2157);var i=r(1017);e.exports=function expandTilde(e){var t=n();if(e.charCodeAt(0)===126){if(e.charCodeAt(1)===43){return i.join(process.cwd(),e.slice(2))}return t?i.join(t,e.slice(1)):e}return e}},3064:e=>{"use strict";e.exports=function equal(e,t){if(e===t)return true;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return false;var r,n,i;if(Array.isArray(e)){r=e.length;if(r!=t.length)return false;for(n=r;n--!==0;)if(!equal(e[n],t[n]))return false;return true}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();i=Object.keys(e);r=i.length;if(r!==Object.keys(t).length)return false;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return false;for(n=r;n--!==0;){var s=i[n];if(!equal(e[s],t[s]))return false}return true}return e!==e&&t!==t}},4486:e=>{"use strict";e.exports=function(e,t){if(!t)t={};if(typeof t==="function")t={cmp:t};var r=typeof t.cycles==="boolean"?t.cycles:false;var n=t.cmp&&function(e){return function(t){return function(r,n){var i={key:r,value:t[r]};var s={key:n,value:t[n]};return e(i,s)}}}(t.cmp);var i=[];return function stringify(e){if(e&&e.toJSON&&typeof e.toJSON==="function"){e=e.toJSON()}if(e===undefined)return;if(typeof e=="number")return isFinite(e)?""+e:"null";if(typeof e!=="object")return JSON.stringify(e);var t,s;if(Array.isArray(e)){s="[";for(t=0;t{e.exports=stringify;stringify.default=stringify;stringify.stable=deterministicStringify;stringify.stableStringify=deterministicStringify;var t="[...]";var r="[Circular]";var n=[];var i=[];function defaultOptions(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function stringify(e,t,r,s){if(typeof s==="undefined"){s=defaultOptions()}decirc(e,"",0,[],undefined,0,s);var o;try{if(i.length===0){o=JSON.stringify(e,t,r)}else{o=JSON.stringify(e,replaceGetterValues(t),r)}}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{while(n.length!==0){var a=n.pop();if(a.length===4){Object.defineProperty(a[0],a[1],a[3])}else{a[0][a[1]]=a[2]}}}return o}function setReplace(e,t,r,s){var o=Object.getOwnPropertyDescriptor(s,r);if(o.get!==undefined){if(o.configurable){Object.defineProperty(s,r,{value:e});n.push([s,r,t,o])}else{i.push([t,r,e])}}else{s[r]=e;n.push([s,r,t])}}function decirc(e,n,i,s,o,a,u){a+=1;var l;if(typeof e==="object"&&e!==null){for(l=0;lu.depthLimit){setReplace(t,e,n,o);return}if(typeof u.edgesLimit!=="undefined"&&i+1>u.edgesLimit){setReplace(t,e,n,o);return}s.push(e);if(Array.isArray(e)){for(l=0;lt){return 1}return 0}function deterministicStringify(e,t,r,s){if(typeof s==="undefined"){s=defaultOptions()}var o=deterministicDecirc(e,"",0,[],undefined,0,s)||e;var a;try{if(i.length===0){a=JSON.stringify(o,t,r)}else{a=JSON.stringify(o,replaceGetterValues(t),r)}}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{while(n.length!==0){var u=n.pop();if(u.length===4){Object.defineProperty(u[0],u[1],u[3])}else{u[0][u[1]]=u[2]}}}return a}function deterministicDecirc(e,i,s,o,a,u,l){u+=1;var c;if(typeof e==="object"&&e!==null){for(c=0;cl.depthLimit){setReplace(t,e,i,a);return}if(typeof l.edgesLimit!=="undefined"&&s+1>l.edgesLimit){setReplace(t,e,i,a);return}o.push(e);if(Array.isArray(e)){for(c=0;c0){for(var n=0;n{const{Readable:n}=r(2781);const i=new WeakMap;async function*read(e){for(const t of e){if("stream"in t){yield*t.stream()}else{yield t}}}class Blob{constructor(e=[],t={}){let r=0;const n=e.map((e=>{let t;if(e instanceof Buffer){t=e}else if(ArrayBuffer.isView(e)){t=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}else if(e instanceof ArrayBuffer){t=Buffer.from(e)}else if(e instanceof Blob){t=e}else{t=Buffer.from(typeof e==="string"?e:String(e))}r+=t.length||t.size||0;return t}));const s=t.type===undefined?"":String(t.type).toLowerCase();i.set(this,{type:/[^\u0020-\u007E]/.test(s)?"":s,size:r,parts:n})}get size(){return i.get(this).size}get type(){return i.get(this).type}async text(){return Buffer.from(await this.arrayBuffer()).toString()}async arrayBuffer(){const e=new Uint8Array(this.size);let t=0;for await(const r of this.stream()){e.set(r,t);t+=r.length}return e.buffer}stream(){return n.from(read(i.get(this).parts))}slice(e=0,t=this.size,r=""){const{size:n}=this;let s=e<0?Math.max(n+e,0):Math.min(e,n);let o=t<0?Math.max(n+t,0):Math.min(t,n);const a=Math.max(o-s,0);const u=i.get(this).parts.values();const l=[];let c=0;for(const e of u){const t=ArrayBuffer.isView(e)?e.byteLength:e.size;if(s&&t<=s){s-=t;o-=t}else{const r=e.slice(s,Math.min(t,o));l.push(r);c+=ArrayBuffer.isView(r)?r.byteLength:r.size;s=0;if(c>=a){break}}}const f=new Blob([],{type:String(r).toLowerCase()});Object.assign(i.get(f),{size:a,parts:l});return f}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](e){return e&&typeof e==="object"&&typeof e.stream==="function"&&e.stream.length===0&&typeof e.constructor==="function"&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}}Object.defineProperties(Blob.prototype,{size:{enumerable:true},type:{enumerable:true},slice:{enumerable:true}});e.exports=Blob},8593:(e,t,r)=>{"use strict";const n=r(7765);const i=r(1017);const s=r(5443).mkdirsSync;const o=r(7237).utimesMillisSync;const a=r(7169);function copySync(e,t,r){if(typeof r==="function"){r={filter:r}}r=r||{};r.clobber="clobber"in r?!!r.clobber:true;r.overwrite="overwrite"in r?!!r.overwrite:r.clobber;if(r.preserveTimestamps&&process.arch==="ia32"){console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269`)}const{srcStat:n,destStat:i}=a.checkPathsSync(e,t,"copy",r);a.checkParentPathsSync(e,n,t,"copy");return handleFilterAndCopy(i,e,t,r)}function handleFilterAndCopy(e,t,r,o){if(o.filter&&!o.filter(t,r))return;const a=i.dirname(r);if(!n.existsSync(a))s(a);return getStats(e,t,r,o)}function startCopy(e,t,r,n){if(n.filter&&!n.filter(t,r))return;return getStats(e,t,r,n)}function getStats(e,t,r,i){const s=i.dereference?n.statSync:n.lstatSync;const o=s(t);if(o.isDirectory())return onDir(o,e,t,r,i);else if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return onFile(o,e,t,r,i);else if(o.isSymbolicLink())return onLink(e,t,r,i);else if(o.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);else if(o.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}function onFile(e,t,r,n,i){if(!t)return copyFile(e,r,n,i);return mayCopyFile(e,r,n,i)}function mayCopyFile(e,t,r,i){if(i.overwrite){n.unlinkSync(r);return copyFile(e,t,r,i)}else if(i.errorOnExist){throw new Error(`'${r}' already exists`)}}function copyFile(e,t,r,i){n.copyFileSync(t,r);if(i.preserveTimestamps)handleTimestamps(e.mode,t,r);return setDestMode(r,e.mode)}function handleTimestamps(e,t,r){if(fileIsNotWritable(e))makeFileWritable(r,e);return setDestTimestamps(t,r)}function fileIsNotWritable(e){return(e&128)===0}function makeFileWritable(e,t){return setDestMode(e,t|128)}function setDestMode(e,t){return n.chmodSync(e,t)}function setDestTimestamps(e,t){const r=n.statSync(e);return o(t,r.atime,r.mtime)}function onDir(e,t,r,n,i){if(!t)return mkDirAndCopy(e.mode,r,n,i);return copyDir(r,n,i)}function mkDirAndCopy(e,t,r,i){n.mkdirSync(r);copyDir(t,r,i);return setDestMode(r,e)}function copyDir(e,t,r){n.readdirSync(e).forEach((n=>copyDirItem(n,e,t,r)))}function copyDirItem(e,t,r,n){const s=i.join(t,e);const o=i.join(r,e);const{destStat:u}=a.checkPathsSync(s,o,"copy",n);return startCopy(u,s,o,n)}function onLink(e,t,r,s){let o=n.readlinkSync(t);if(s.dereference){o=i.resolve(process.cwd(),o)}if(!e){return n.symlinkSync(o,r)}else{let e;try{e=n.readlinkSync(r)}catch(e){if(e.code==="EINVAL"||e.code==="UNKNOWN")return n.symlinkSync(o,r);throw e}if(s.dereference){e=i.resolve(process.cwd(),e)}if(a.isSrcSubdir(o,e)){throw new Error(`Cannot copy '${o}' to a subdirectory of itself, '${e}'.`)}if(n.statSync(r).isDirectory()&&a.isSrcSubdir(e,o)){throw new Error(`Cannot overwrite '${e}' with '${o}'.`)}return copyLink(o,r)}}function copyLink(e,t){n.unlinkSync(t);return n.symlinkSync(e,t)}e.exports=copySync},5390:(e,t,r)=>{"use strict";e.exports={copySync:r(8593)}},9226:(e,t,r)=>{"use strict";const n=r(7765);const i=r(1017);const s=r(5443).mkdirs;const o=r(6618).pathExists;const a=r(7237).utimesMillis;const u=r(7169);function copy(e,t,r,n){if(typeof r==="function"&&!n){n=r;r={}}else if(typeof r==="function"){r={filter:r}}n=n||function(){};r=r||{};r.clobber="clobber"in r?!!r.clobber:true;r.overwrite="overwrite"in r?!!r.overwrite:r.clobber;if(r.preserveTimestamps&&process.arch==="ia32"){console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269`)}u.checkPaths(e,t,"copy",r,((i,s)=>{if(i)return n(i);const{srcStat:o,destStat:a}=s;u.checkParentPaths(e,o,t,"copy",(i=>{if(i)return n(i);if(r.filter)return handleFilter(checkParentDir,a,e,t,r,n);return checkParentDir(a,e,t,r,n)}))}))}function checkParentDir(e,t,r,n,a){const u=i.dirname(r);o(u,((i,o)=>{if(i)return a(i);if(o)return getStats(e,t,r,n,a);s(u,(i=>{if(i)return a(i);return getStats(e,t,r,n,a)}))}))}function handleFilter(e,t,r,n,i,s){Promise.resolve(i.filter(r,n)).then((o=>{if(o)return e(t,r,n,i,s);return s()}),(e=>s(e)))}function startCopy(e,t,r,n,i){if(n.filter)return handleFilter(getStats,e,t,r,n,i);return getStats(e,t,r,n,i)}function getStats(e,t,r,i,s){const o=i.dereference?n.stat:n.lstat;o(t,((n,o)=>{if(n)return s(n);if(o.isDirectory())return onDir(o,e,t,r,i,s);else if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return onFile(o,e,t,r,i,s);else if(o.isSymbolicLink())return onLink(e,t,r,i,s);else if(o.isSocket())return s(new Error(`Cannot copy a socket file: ${t}`));else if(o.isFIFO())return s(new Error(`Cannot copy a FIFO pipe: ${t}`));return s(new Error(`Unknown file: ${t}`))}))}function onFile(e,t,r,n,i,s){if(!t)return copyFile(e,r,n,i,s);return mayCopyFile(e,r,n,i,s)}function mayCopyFile(e,t,r,i,s){if(i.overwrite){n.unlink(r,(n=>{if(n)return s(n);return copyFile(e,t,r,i,s)}))}else if(i.errorOnExist){return s(new Error(`'${r}' already exists`))}else return s()}function copyFile(e,t,r,i,s){n.copyFile(t,r,(n=>{if(n)return s(n);if(i.preserveTimestamps)return handleTimestampsAndMode(e.mode,t,r,s);return setDestMode(r,e.mode,s)}))}function handleTimestampsAndMode(e,t,r,n){if(fileIsNotWritable(e)){return makeFileWritable(r,e,(i=>{if(i)return n(i);return setDestTimestampsAndMode(e,t,r,n)}))}return setDestTimestampsAndMode(e,t,r,n)}function fileIsNotWritable(e){return(e&128)===0}function makeFileWritable(e,t,r){return setDestMode(e,t|128,r)}function setDestTimestampsAndMode(e,t,r,n){setDestTimestamps(t,r,(t=>{if(t)return n(t);return setDestMode(r,e,n)}))}function setDestMode(e,t,r){return n.chmod(e,t,r)}function setDestTimestamps(e,t,r){n.stat(e,((e,n)=>{if(e)return r(e);return a(t,n.atime,n.mtime,r)}))}function onDir(e,t,r,n,i,s){if(!t)return mkDirAndCopy(e.mode,r,n,i,s);return copyDir(r,n,i,s)}function mkDirAndCopy(e,t,r,i,s){n.mkdir(r,(n=>{if(n)return s(n);copyDir(t,r,i,(t=>{if(t)return s(t);return setDestMode(r,e,s)}))}))}function copyDir(e,t,r,i){n.readdir(e,((n,s)=>{if(n)return i(n);return copyDirItems(s,e,t,r,i)}))}function copyDirItems(e,t,r,n,i){const s=e.pop();if(!s)return i();return copyDirItem(e,s,t,r,n,i)}function copyDirItem(e,t,r,n,s,o){const a=i.join(r,t);const l=i.join(n,t);u.checkPaths(a,l,"copy",s,((t,i)=>{if(t)return o(t);const{destStat:u}=i;startCopy(u,a,l,s,(t=>{if(t)return o(t);return copyDirItems(e,r,n,s,o)}))}))}function onLink(e,t,r,s,o){n.readlink(t,((t,a)=>{if(t)return o(t);if(s.dereference){a=i.resolve(process.cwd(),a)}if(!e){return n.symlink(a,r,o)}else{n.readlink(r,((t,l)=>{if(t){if(t.code==="EINVAL"||t.code==="UNKNOWN")return n.symlink(a,r,o);return o(t)}if(s.dereference){l=i.resolve(process.cwd(),l)}if(u.isSrcSubdir(a,l)){return o(new Error(`Cannot copy '${a}' to a subdirectory of itself, '${l}'.`))}if(e.isDirectory()&&u.isSrcSubdir(l,a)){return o(new Error(`Cannot overwrite '${l}' with '${a}'.`))}return copyLink(a,r,o)}))}}))}function copyLink(e,t,r){n.unlink(t,(i=>{if(i)return r(i);return n.symlink(e,t,r)}))}e.exports=copy},7619:(e,t,r)=>{"use strict";const n=r(3706).fromCallback;e.exports={copy:n(r(9226))}},4810:(e,t,r)=>{"use strict";const n=r(3706).fromPromise;const i=r(2003);const s=r(1017);const o=r(5443);const a=r(6875);const u=n((async function emptyDir(e){let t;try{t=await i.readdir(e)}catch{return o.mkdirs(e)}return Promise.all(t.map((t=>a.remove(s.join(e,t)))))}));function emptyDirSync(e){let t;try{t=i.readdirSync(e)}catch{return o.mkdirsSync(e)}t.forEach((t=>{t=s.join(e,t);a.removeSync(t)}))}e.exports={emptyDirSync:emptyDirSync,emptydirSync:emptyDirSync,emptyDir:u,emptydir:u}},3132:(e,t,r)=>{"use strict";const n=r(3706).fromCallback;const i=r(1017);const s=r(7765);const o=r(5443);function createFile(e,t){function makeFile(){s.writeFile(e,"",(e=>{if(e)return t(e);t()}))}s.stat(e,((r,n)=>{if(!r&&n.isFile())return t();const a=i.dirname(e);s.stat(a,((e,r)=>{if(e){if(e.code==="ENOENT"){return o.mkdirs(a,(e=>{if(e)return t(e);makeFile()}))}return t(e)}if(r.isDirectory())makeFile();else{s.readdir(a,(e=>{if(e)return t(e)}))}}))}))}function createFileSync(e){let t;try{t=s.statSync(e)}catch{}if(t&&t.isFile())return;const r=i.dirname(e);try{if(!s.statSync(r).isDirectory()){s.readdirSync(r)}}catch(e){if(e&&e.code==="ENOENT")o.mkdirsSync(r);else throw e}s.writeFileSync(e,"")}e.exports={createFile:n(createFile),createFileSync:createFileSync}},1393:(e,t,r)=>{"use strict";const n=r(3132);const i=r(9817);const s=r(9609);e.exports={createFile:n.createFile,createFileSync:n.createFileSync,ensureFile:n.createFile,ensureFileSync:n.createFileSync,createLink:i.createLink,createLinkSync:i.createLinkSync,ensureLink:i.createLink,ensureLinkSync:i.createLinkSync,createSymlink:s.createSymlink,createSymlinkSync:s.createSymlinkSync,ensureSymlink:s.createSymlink,ensureSymlinkSync:s.createSymlinkSync}},9817:(e,t,r)=>{"use strict";const n=r(3706).fromCallback;const i=r(1017);const s=r(7765);const o=r(5443);const a=r(6618).pathExists;const{areIdentical:u}=r(7169);function createLink(e,t,r){function makeLink(e,t){s.link(e,t,(e=>{if(e)return r(e);r(null)}))}s.lstat(t,((n,l)=>{s.lstat(e,((n,s)=>{if(n){n.message=n.message.replace("lstat","ensureLink");return r(n)}if(l&&u(s,l))return r(null);const c=i.dirname(t);a(c,((n,i)=>{if(n)return r(n);if(i)return makeLink(e,t);o.mkdirs(c,(n=>{if(n)return r(n);makeLink(e,t)}))}))}))}))}function createLinkSync(e,t){let r;try{r=s.lstatSync(t)}catch{}try{const t=s.lstatSync(e);if(r&&u(t,r))return}catch(e){e.message=e.message.replace("lstat","ensureLink");throw e}const n=i.dirname(t);const a=s.existsSync(n);if(a)return s.linkSync(e,t);o.mkdirsSync(n);return s.linkSync(e,t)}e.exports={createLink:n(createLink),createLinkSync:createLinkSync}},6927:(e,t,r)=>{"use strict";const n=r(1017);const i=r(7765);const s=r(6618).pathExists;function symlinkPaths(e,t,r){if(n.isAbsolute(e)){return i.lstat(e,(t=>{if(t){t.message=t.message.replace("lstat","ensureSymlink");return r(t)}return r(null,{toCwd:e,toDst:e})}))}else{const o=n.dirname(t);const a=n.join(o,e);return s(a,((t,s)=>{if(t)return r(t);if(s){return r(null,{toCwd:a,toDst:e})}else{return i.lstat(e,(t=>{if(t){t.message=t.message.replace("lstat","ensureSymlink");return r(t)}return r(null,{toCwd:e,toDst:n.relative(o,e)})}))}}))}}function symlinkPathsSync(e,t){let r;if(n.isAbsolute(e)){r=i.existsSync(e);if(!r)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}else{const s=n.dirname(t);const o=n.join(s,e);r=i.existsSync(o);if(r){return{toCwd:o,toDst:e}}else{r=i.existsSync(e);if(!r)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:n.relative(s,e)}}}}e.exports={symlinkPaths:symlinkPaths,symlinkPathsSync:symlinkPathsSync}},3694:(e,t,r)=>{"use strict";const n=r(7765);function symlinkType(e,t,r){r=typeof t==="function"?t:r;t=typeof t==="function"?false:t;if(t)return r(null,t);n.lstat(e,((e,n)=>{if(e)return r(null,"file");t=n&&n.isDirectory()?"dir":"file";r(null,t)}))}function symlinkTypeSync(e,t){let r;if(t)return t;try{r=n.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}e.exports={symlinkType:symlinkType,symlinkTypeSync:symlinkTypeSync}},9609:(e,t,r)=>{"use strict";const n=r(3706).fromCallback;const i=r(1017);const s=r(2003);const o=r(5443);const a=o.mkdirs;const u=o.mkdirsSync;const l=r(6927);const c=l.symlinkPaths;const f=l.symlinkPathsSync;const d=r(3694);const p=d.symlinkType;const h=d.symlinkTypeSync;const m=r(6618).pathExists;const{areIdentical:v}=r(7169);function createSymlink(e,t,r,n){n=typeof r==="function"?r:n;r=typeof r==="function"?false:r;s.lstat(t,((i,o)=>{if(!i&&o.isSymbolicLink()){Promise.all([s.stat(e),s.stat(t)]).then((([i,s])=>{if(v(i,s))return n(null);_createSymlink(e,t,r,n)}))}else _createSymlink(e,t,r,n)}))}function _createSymlink(e,t,r,n){c(e,t,((o,u)=>{if(o)return n(o);e=u.toDst;p(u.toCwd,r,((r,o)=>{if(r)return n(r);const u=i.dirname(t);m(u,((r,i)=>{if(r)return n(r);if(i)return s.symlink(e,t,o,n);a(u,(r=>{if(r)return n(r);s.symlink(e,t,o,n)}))}))}))}))}function createSymlinkSync(e,t,r){let n;try{n=s.lstatSync(t)}catch{}if(n&&n.isSymbolicLink()){const r=s.statSync(e);const n=s.statSync(t);if(v(r,n))return}const o=f(e,t);e=o.toDst;r=h(o.toCwd,r);const a=i.dirname(t);const l=s.existsSync(a);if(l)return s.symlinkSync(e,t,r);u(a);return s.symlinkSync(e,t,r)}e.exports={createSymlink:n(createSymlink),createSymlinkSync:createSymlinkSync}},2003:(e,t,r)=>{"use strict";const n=r(3706).fromCallback;const i=r(7765);const s=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((e=>typeof i[e]==="function"));Object.assign(t,i);s.forEach((e=>{t[e]=n(i[e])}));t.realpath.native=n(i.realpath.native);t.exists=function(e,t){if(typeof t==="function"){return i.exists(e,t)}return new Promise((t=>i.exists(e,t)))};t.read=function(e,t,r,n,s,o){if(typeof o==="function"){return i.read(e,t,r,n,s,o)}return new Promise(((o,a)=>{i.read(e,t,r,n,s,((e,t,r)=>{if(e)return a(e);o({bytesRead:t,buffer:r})}))}))};t.write=function(e,t,...r){if(typeof r[r.length-1]==="function"){return i.write(e,t,...r)}return new Promise(((n,s)=>{i.write(e,t,...r,((e,t,r)=>{if(e)return s(e);n({bytesWritten:t,buffer:r})}))}))};if(typeof i.writev==="function"){t.writev=function(e,t,...r){if(typeof r[r.length-1]==="function"){return i.writev(e,t,...r)}return new Promise(((n,s)=>{i.writev(e,t,...r,((e,t,r)=>{if(e)return s(e);n({bytesWritten:t,buffers:r})}))}))}}},5176:(e,t,r)=>{"use strict";e.exports={...r(2003),...r(5390),...r(7619),...r(4810),...r(1393),...r(6287),...r(5443),...r(4155),...r(9453),...r(209),...r(6618),...r(6875)}},6287:(e,t,r)=>{"use strict";const n=r(3706).fromPromise;const i=r(1108);i.outputJson=n(r(447));i.outputJsonSync=r(466);i.outputJSON=i.outputJson;i.outputJSONSync=i.outputJsonSync;i.writeJSON=i.writeJson;i.writeJSONSync=i.writeJsonSync;i.readJSON=i.readJson;i.readJSONSync=i.readJsonSync;e.exports=i},1108:(e,t,r)=>{"use strict";const n=r(5533);e.exports={readJson:n.readFile,readJsonSync:n.readFileSync,writeJson:n.writeFile,writeJsonSync:n.writeFileSync}},466:(e,t,r)=>{"use strict";const{stringify:n}=r(8171);const{outputFileSync:i}=r(209);function outputJsonSync(e,t,r){const s=n(t,r);i(e,s,r)}e.exports=outputJsonSync},447:(e,t,r)=>{"use strict";const{stringify:n}=r(8171);const{outputFile:i}=r(209);async function outputJson(e,t,r={}){const s=n(t,r);await i(e,s,r)}e.exports=outputJson},5443:(e,t,r)=>{"use strict";const n=r(3706).fromPromise;const{makeDir:i,makeDirSync:s}=r(7113);const o=n(i);e.exports={mkdirs:o,mkdirsSync:s,mkdirp:o,mkdirpSync:s,ensureDir:o,ensureDirSync:s}},7113:(e,t,r)=>{"use strict";const n=r(2003);const{checkPath:i}=r(4096);const getMode=e=>{const t={mode:511};if(typeof e==="number")return e;return{...t,...e}.mode};e.exports.makeDir=async(e,t)=>{i(e);return n.mkdir(e,{mode:getMode(t),recursive:true})};e.exports.makeDirSync=(e,t)=>{i(e);return n.mkdirSync(e,{mode:getMode(t),recursive:true})}},4096:(e,t,r)=>{"use strict";const n=r(1017);e.exports.checkPath=function checkPath(e){if(process.platform==="win32"){const t=/[<>:"|?*]/.test(e.replace(n.parse(e).root,""));if(t){const t=new Error(`Path contains invalid characters: ${e}`);t.code="EINVAL";throw t}}}},4155:(e,t,r)=>{"use strict";e.exports={moveSync:r(8450)}},8450:(e,t,r)=>{"use strict";const n=r(7765);const i=r(1017);const s=r(5390).copySync;const o=r(6875).removeSync;const a=r(5443).mkdirpSync;const u=r(7169);function moveSync(e,t,r){r=r||{};const n=r.overwrite||r.clobber||false;const{srcStat:s,isChangingCase:o=false}=u.checkPathsSync(e,t,"move",r);u.checkParentPathsSync(e,s,t,"move");if(!isParentRoot(t))a(i.dirname(t));return doRename(e,t,n,o)}function isParentRoot(e){const t=i.dirname(e);const r=i.parse(t);return r.root===t}function doRename(e,t,r,i){if(i)return rename(e,t,r);if(r){o(t);return rename(e,t,r)}if(n.existsSync(t))throw new Error("dest already exists.");return rename(e,t,r)}function rename(e,t,r){try{n.renameSync(e,t)}catch(n){if(n.code!=="EXDEV")throw n;return moveAcrossDevice(e,t,r)}}function moveAcrossDevice(e,t,r){const n={overwrite:r,errorOnExist:true};s(e,t,n);return o(e)}e.exports=moveSync},9453:(e,t,r)=>{"use strict";const n=r(3706).fromCallback;e.exports={move:n(r(2826))}},2826:(e,t,r)=>{"use strict";const n=r(7765);const i=r(1017);const s=r(7619).copy;const o=r(6875).remove;const a=r(5443).mkdirp;const u=r(6618).pathExists;const l=r(7169);function move(e,t,r,n){if(typeof r==="function"){n=r;r={}}const s=r.overwrite||r.clobber||false;l.checkPaths(e,t,"move",r,((r,o)=>{if(r)return n(r);const{srcStat:u,isChangingCase:c=false}=o;l.checkParentPaths(e,u,t,"move",(r=>{if(r)return n(r);if(isParentRoot(t))return doRename(e,t,s,c,n);a(i.dirname(t),(r=>{if(r)return n(r);return doRename(e,t,s,c,n)}))}))}))}function isParentRoot(e){const t=i.dirname(e);const r=i.parse(t);return r.root===t}function doRename(e,t,r,n,i){if(n)return rename(e,t,r,i);if(r){return o(t,(n=>{if(n)return i(n);return rename(e,t,r,i)}))}u(t,((n,s)=>{if(n)return i(n);if(s)return i(new Error("dest already exists."));return rename(e,t,r,i)}))}function rename(e,t,r,i){n.rename(e,t,(n=>{if(!n)return i();if(n.code!=="EXDEV")return i(n);return moveAcrossDevice(e,t,r,i)}))}function moveAcrossDevice(e,t,r,n){const i={overwrite:r,errorOnExist:true};s(e,t,i,(t=>{if(t)return n(t);return o(e,n)}))}e.exports=move},209:(e,t,r)=>{"use strict";const n=r(3706).fromCallback;const i=r(7765);const s=r(1017);const o=r(5443);const a=r(6618).pathExists;function outputFile(e,t,r,n){if(typeof r==="function"){n=r;r="utf8"}const u=s.dirname(e);a(u,((s,a)=>{if(s)return n(s);if(a)return i.writeFile(e,t,r,n);o.mkdirs(u,(s=>{if(s)return n(s);i.writeFile(e,t,r,n)}))}))}function outputFileSync(e,...t){const r=s.dirname(e);if(i.existsSync(r)){return i.writeFileSync(e,...t)}o.mkdirsSync(r);i.writeFileSync(e,...t)}e.exports={outputFile:n(outputFile),outputFileSync:outputFileSync}},6618:(e,t,r)=>{"use strict";const n=r(3706).fromPromise;const i=r(2003);function pathExists(e){return i.access(e).then((()=>true)).catch((()=>false))}e.exports={pathExists:n(pathExists),pathExistsSync:i.existsSync}},6875:(e,t,r)=>{"use strict";const n=r(7765);const i=r(3706).fromCallback;const s=r(7611);function remove(e,t){if(n.rm)return n.rm(e,{recursive:true,force:true},t);s(e,t)}function removeSync(e){if(n.rmSync)return n.rmSync(e,{recursive:true,force:true});s.sync(e)}e.exports={remove:i(remove),removeSync:removeSync}},7611:(e,t,r)=>{"use strict";const n=r(7765);const i=r(1017);const s=r(9491);const o=process.platform==="win32";function defaults(e){const t=["unlink","chmod","stat","lstat","rmdir","readdir"];t.forEach((t=>{e[t]=e[t]||n[t];t=t+"Sync";e[t]=e[t]||n[t]}));e.maxBusyTries=e.maxBusyTries||3}function rimraf(e,t,r){let n=0;if(typeof t==="function"){r=t;t={}}s(e,"rimraf: missing path");s.strictEqual(typeof e,"string","rimraf: path should be a string");s.strictEqual(typeof r,"function","rimraf: callback function required");s(t,"rimraf: invalid options argument provided");s.strictEqual(typeof t,"object","rimraf: options should be object");defaults(t);rimraf_(e,t,(function CB(i){if(i){if((i.code==="EBUSY"||i.code==="ENOTEMPTY"||i.code==="EPERM")&&nrimraf_(e,t,CB)),r)}if(i.code==="ENOENT")i=null}r(i)}))}function rimraf_(e,t,r){s(e);s(t);s(typeof r==="function");t.lstat(e,((n,i)=>{if(n&&n.code==="ENOENT"){return r(null)}if(n&&n.code==="EPERM"&&o){return fixWinEPERM(e,t,n,r)}if(i&&i.isDirectory()){return rmdir(e,t,n,r)}t.unlink(e,(n=>{if(n){if(n.code==="ENOENT"){return r(null)}if(n.code==="EPERM"){return o?fixWinEPERM(e,t,n,r):rmdir(e,t,n,r)}if(n.code==="EISDIR"){return rmdir(e,t,n,r)}}return r(n)}))}))}function fixWinEPERM(e,t,r,n){s(e);s(t);s(typeof n==="function");t.chmod(e,438,(i=>{if(i){n(i.code==="ENOENT"?null:r)}else{t.stat(e,((i,s)=>{if(i){n(i.code==="ENOENT"?null:r)}else if(s.isDirectory()){rmdir(e,t,r,n)}else{t.unlink(e,n)}}))}}))}function fixWinEPERMSync(e,t,r){let n;s(e);s(t);try{t.chmodSync(e,438)}catch(e){if(e.code==="ENOENT"){return}else{throw r}}try{n=t.statSync(e)}catch(e){if(e.code==="ENOENT"){return}else{throw r}}if(n.isDirectory()){rmdirSync(e,t,r)}else{t.unlinkSync(e)}}function rmdir(e,t,r,n){s(e);s(t);s(typeof n==="function");t.rmdir(e,(i=>{if(i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")){rmkids(e,t,n)}else if(i&&i.code==="ENOTDIR"){n(r)}else{n(i)}}))}function rmkids(e,t,r){s(e);s(t);s(typeof r==="function");t.readdir(e,((n,s)=>{if(n)return r(n);let o=s.length;let a;if(o===0)return t.rmdir(e,r);s.forEach((n=>{rimraf(i.join(e,n),t,(n=>{if(a){return}if(n)return r(a=n);if(--o===0){t.rmdir(e,r)}}))}))}))}function rimrafSync(e,t){let r;t=t||{};defaults(t);s(e,"rimraf: missing path");s.strictEqual(typeof e,"string","rimraf: path should be a string");s(t,"rimraf: missing options");s.strictEqual(typeof t,"object","rimraf: options should be object");try{r=t.lstatSync(e)}catch(r){if(r.code==="ENOENT"){return}if(r.code==="EPERM"&&o){fixWinEPERMSync(e,t,r)}}try{if(r&&r.isDirectory()){rmdirSync(e,t,null)}else{t.unlinkSync(e)}}catch(r){if(r.code==="ENOENT"){return}else if(r.code==="EPERM"){return o?fixWinEPERMSync(e,t,r):rmdirSync(e,t,r)}else if(r.code!=="EISDIR"){throw r}rmdirSync(e,t,r)}}function rmdirSync(e,t,r){s(e);s(t);try{t.rmdirSync(e)}catch(n){if(n.code==="ENOTDIR"){throw r}else if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM"){rmkidsSync(e,t)}else if(n.code!=="ENOENT"){throw n}}}function rmkidsSync(e,t){s(e);s(t);t.readdirSync(e).forEach((r=>rimrafSync(i.join(e,r),t)));if(o){const r=Date.now();do{try{const r=t.rmdirSync(e,t);return r}catch{}}while(Date.now()-r<500)}else{const r=t.rmdirSync(e,t);return r}}e.exports=rimraf;rimraf.sync=rimrafSync},7169:(e,t,r)=>{"use strict";const n=r(2003);const i=r(1017);const s=r(3837);function getStats(e,t,r){const i=r.dereference?e=>n.stat(e,{bigint:true}):e=>n.lstat(e,{bigint:true});return Promise.all([i(e),i(t).catch((e=>{if(e.code==="ENOENT")return null;throw e}))]).then((([e,t])=>({srcStat:e,destStat:t})))}function getStatsSync(e,t,r){let i;const s=r.dereference?e=>n.statSync(e,{bigint:true}):e=>n.lstatSync(e,{bigint:true});const o=s(e);try{i=s(t)}catch(e){if(e.code==="ENOENT")return{srcStat:o,destStat:null};throw e}return{srcStat:o,destStat:i}}function checkPaths(e,t,r,n,o){s.callbackify(getStats)(e,t,n,((n,s)=>{if(n)return o(n);const{srcStat:a,destStat:u}=s;if(u){if(areIdentical(a,u)){const n=i.basename(e);const s=i.basename(t);if(r==="move"&&n!==s&&n.toLowerCase()===s.toLowerCase()){return o(null,{srcStat:a,destStat:u,isChangingCase:true})}return o(new Error("Source and destination must not be the same."))}if(a.isDirectory()&&!u.isDirectory()){return o(new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`))}if(!a.isDirectory()&&u.isDirectory()){return o(new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`))}}if(a.isDirectory()&&isSrcSubdir(e,t)){return o(new Error(errMsg(e,t,r)))}return o(null,{srcStat:a,destStat:u})}))}function checkPathsSync(e,t,r,n){const{srcStat:s,destStat:o}=getStatsSync(e,t,n);if(o){if(areIdentical(s,o)){const n=i.basename(e);const a=i.basename(t);if(r==="move"&&n!==a&&n.toLowerCase()===a.toLowerCase()){return{srcStat:s,destStat:o,isChangingCase:true}}throw new Error("Source and destination must not be the same.")}if(s.isDirectory()&&!o.isDirectory()){throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`)}if(!s.isDirectory()&&o.isDirectory()){throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}}if(s.isDirectory()&&isSrcSubdir(e,t)){throw new Error(errMsg(e,t,r))}return{srcStat:s,destStat:o}}function checkParentPaths(e,t,r,s,o){const a=i.resolve(i.dirname(e));const u=i.resolve(i.dirname(r));if(u===a||u===i.parse(u).root)return o();n.stat(u,{bigint:true},((n,i)=>{if(n){if(n.code==="ENOENT")return o();return o(n)}if(areIdentical(t,i)){return o(new Error(errMsg(e,r,s)))}return checkParentPaths(e,t,u,s,o)}))}function checkParentPathsSync(e,t,r,s){const o=i.resolve(i.dirname(e));const a=i.resolve(i.dirname(r));if(a===o||a===i.parse(a).root)return;let u;try{u=n.statSync(a,{bigint:true})}catch(e){if(e.code==="ENOENT")return;throw e}if(areIdentical(t,u)){throw new Error(errMsg(e,r,s))}return checkParentPathsSync(e,t,a,s)}function areIdentical(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function isSrcSubdir(e,t){const r=i.resolve(e).split(i.sep).filter((e=>e));const n=i.resolve(t).split(i.sep).filter((e=>e));return r.reduce(((e,t,r)=>e&&n[r]===t),true)}function errMsg(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}e.exports={checkPaths:checkPaths,checkPathsSync:checkPathsSync,checkParentPaths:checkParentPaths,checkParentPathsSync:checkParentPathsSync,isSrcSubdir:isSrcSubdir,areIdentical:areIdentical}},7237:(e,t,r)=>{"use strict";const n=r(7765);function utimesMillis(e,t,r,i){n.open(e,"r+",((e,s)=>{if(e)return i(e);n.futimes(s,t,r,(e=>{n.close(s,(t=>{if(i)i(e||t)}))}))}))}function utimesMillisSync(e,t,r){const i=n.openSync(e,"r+");n.futimesSync(i,t,r);return n.closeSync(i)}e.exports={utimesMillis:utimesMillis,utimesMillisSync:utimesMillisSync}},3236:e=>{"use strict";e.exports=clone;var t=Object.getPrototypeOf||function(e){return e.__proto__};function clone(e){if(e===null||typeof e!=="object")return e;if(e instanceof Object)var r={__proto__:t(e)};else var r=Object.create(null);Object.getOwnPropertyNames(e).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}));return r}},7765:(e,t,r)=>{var n=r(7147);var i=r(7457);var s=r(7681);var o=r(3236);var a=r(3837);var u;var l;if(typeof Symbol==="function"&&typeof Symbol.for==="function"){u=Symbol.for("graceful-fs.queue");l=Symbol.for("graceful-fs.previous")}else{u="___graceful-fs.queue";l="___graceful-fs.previous"}function noop(){}function publishQueue(e,t){Object.defineProperty(e,u,{get:function(){return t}})}var c=noop;if(a.debuglog)c=a.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))c=function(){var e=a.format.apply(a,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: ");console.error(e)};if(!n[u]){var f=global[u]||[];publishQueue(n,f);n.close=function(e){function close(t,r){return e.call(n,t,(function(e){if(!e){resetQueue()}if(typeof r==="function")r.apply(this,arguments)}))}Object.defineProperty(close,l,{value:e});return close}(n.close);n.closeSync=function(e){function closeSync(t){e.apply(n,arguments);resetQueue()}Object.defineProperty(closeSync,l,{value:e});return closeSync}(n.closeSync);if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")){process.on("exit",(function(){c(n[u]);r(9491).equal(n[u].length,0)}))}}if(!global[u]){publishQueue(global,n[u])}e.exports=patch(o(n));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!n.__patched){e.exports=patch(n);n.__patched=true}function patch(e){i(e);e.gracefulify=patch;e.createReadStream=createReadStream;e.createWriteStream=createWriteStream;var t=e.readFile;e.readFile=readFile;function readFile(e,r,n){if(typeof r==="function")n=r,r=null;return go$readFile(e,r,n);function go$readFile(e,r,n,i){return t(e,r,(function(t){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))enqueue([go$readFile,[e,r,n],t,i||Date.now(),Date.now()]);else{if(typeof n==="function")n.apply(this,arguments)}}))}}var r=e.writeFile;e.writeFile=writeFile;function writeFile(e,t,n,i){if(typeof n==="function")i=n,n=null;return go$writeFile(e,t,n,i);function go$writeFile(e,t,n,i,s){return r(e,t,n,(function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))enqueue([go$writeFile,[e,t,n,i],r,s||Date.now(),Date.now()]);else{if(typeof i==="function")i.apply(this,arguments)}}))}}var n=e.appendFile;if(n)e.appendFile=appendFile;function appendFile(e,t,r,i){if(typeof r==="function")i=r,r=null;return go$appendFile(e,t,r,i);function go$appendFile(e,t,r,i,s){return n(e,t,r,(function(n){if(n&&(n.code==="EMFILE"||n.code==="ENFILE"))enqueue([go$appendFile,[e,t,r,i],n,s||Date.now(),Date.now()]);else{if(typeof i==="function")i.apply(this,arguments)}}))}}var o=e.copyFile;if(o)e.copyFile=copyFile;function copyFile(e,t,r,n){if(typeof r==="function"){n=r;r=0}return go$copyFile(e,t,r,n);function go$copyFile(e,t,r,n,i){return o(e,t,r,(function(s){if(s&&(s.code==="EMFILE"||s.code==="ENFILE"))enqueue([go$copyFile,[e,t,r,n],s,i||Date.now(),Date.now()]);else{if(typeof n==="function")n.apply(this,arguments)}}))}}var a=e.readdir;e.readdir=readdir;function readdir(e,t,r){if(typeof t==="function")r=t,t=null;return go$readdir(e,t,r);function go$readdir(e,t,r,n){return a(e,t,(function(i,s){if(i&&(i.code==="EMFILE"||i.code==="ENFILE"))enqueue([go$readdir,[e,t,r],i,n||Date.now(),Date.now()]);else{if(s&&s.sort)s.sort();if(typeof r==="function")r.call(this,i,s)}}))}}if(process.version.substr(0,4)==="v0.8"){var u=s(e);ReadStream=u.ReadStream;WriteStream=u.WriteStream}var l=e.ReadStream;if(l){ReadStream.prototype=Object.create(l.prototype);ReadStream.prototype.open=ReadStream$open}var c=e.WriteStream;if(c){WriteStream.prototype=Object.create(c.prototype);WriteStream.prototype.open=WriteStream$open}Object.defineProperty(e,"ReadStream",{get:function(){return ReadStream},set:function(e){ReadStream=e},enumerable:true,configurable:true});Object.defineProperty(e,"WriteStream",{get:function(){return WriteStream},set:function(e){WriteStream=e},enumerable:true,configurable:true});var f=ReadStream;Object.defineProperty(e,"FileReadStream",{get:function(){return f},set:function(e){f=e},enumerable:true,configurable:true});var d=WriteStream;Object.defineProperty(e,"FileWriteStream",{get:function(){return d},set:function(e){d=e},enumerable:true,configurable:true});function ReadStream(e,t){if(this instanceof ReadStream)return l.apply(this,arguments),this;else return ReadStream.apply(Object.create(ReadStream.prototype),arguments)}function ReadStream$open(){var e=this;open(e.path,e.flags,e.mode,(function(t,r){if(t){if(e.autoClose)e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r);e.read()}}))}function WriteStream(e,t){if(this instanceof WriteStream)return c.apply(this,arguments),this;else return WriteStream.apply(Object.create(WriteStream.prototype),arguments)}function WriteStream$open(){var e=this;open(e.path,e.flags,e.mode,(function(t,r){if(t){e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r)}}))}function createReadStream(t,r){return new e.ReadStream(t,r)}function createWriteStream(t,r){return new e.WriteStream(t,r)}var p=e.open;e.open=open;function open(e,t,r,n){if(typeof r==="function")n=r,r=null;return go$open(e,t,r,n);function go$open(e,t,r,n,i){return p(e,t,r,(function(s,o){if(s&&(s.code==="EMFILE"||s.code==="ENFILE"))enqueue([go$open,[e,t,r,n],s,i||Date.now(),Date.now()]);else{if(typeof n==="function")n.apply(this,arguments)}}))}}return e}function enqueue(e){c("ENQUEUE",e[0].name,e[1]);n[u].push(e);retry()}var d;function resetQueue(){var e=Date.now();for(var t=0;t2){n[u][t][3]=e;n[u][t][4]=e}}retry()}function retry(){clearTimeout(d);d=undefined;if(n[u].length===0)return;var e=n[u].shift();var t=e[0];var r=e[1];var i=e[2];var s=e[3];var o=e[4];if(s===undefined){c("RETRY",t.name,r);t.apply(null,r)}else if(Date.now()-s>=6e4){c("TIMEOUT",t.name,r);var a=r.pop();if(typeof a==="function")a.call(null,i)}else{var l=Date.now()-o;var f=Math.max(o-s,1);var p=Math.min(f*1.2,100);if(l>=p){c("RETRY",t.name,r);t.apply(null,r.concat([s]))}else{n[u].push(e)}}if(d===undefined){d=setTimeout(retry,0)}}},7681:(e,t,r)=>{var n=r(2781).Stream;e.exports=legacy;function legacy(e){return{ReadStream:ReadStream,WriteStream:WriteStream};function ReadStream(t,r){if(!(this instanceof ReadStream))return new ReadStream(t,r);n.call(this);var i=this;this.path=t;this.fd=null;this.readable=true;this.paused=false;this.flags="r";this.mode=438;this.bufferSize=64*1024;r=r||{};var s=Object.keys(r);for(var o=0,a=s.length;othis.end){throw new Error("start must be <= end")}this.pos=this.start}if(this.fd!==null){process.nextTick((function(){i._read()}));return}e.open(this.path,this.flags,this.mode,(function(e,t){if(e){i.emit("error",e);i.readable=false;return}i.fd=t;i.emit("open",t);i._read()}))}function WriteStream(t,r){if(!(this instanceof WriteStream))return new WriteStream(t,r);n.call(this);this.path=t;this.fd=null;this.writable=true;this.flags="w";this.encoding="binary";this.mode=438;this.bytesWritten=0;r=r||{};var i=Object.keys(r);for(var s=0,o=i.length;s= zero")}this.pos=this.start}this.busy=false;this._queue=[];if(this.fd===null){this._open=e.open;this._queue.push([this._open,this.path,this.flags,this.mode,undefined]);this.flush()}}}},7457:(e,t,r)=>{var n=r(2057);var i=process.cwd;var s=null;var o=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!s)s=i.call(process);return s};try{process.cwd()}catch(e){}if(typeof process.chdir==="function"){var a=process.chdir;process.chdir=function(e){s=null;a.call(process,e)};if(Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,a)}e.exports=patch;function patch(e){if(n.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)){patchLchmod(e)}if(!e.lutimes){patchLutimes(e)}e.chown=chownFix(e.chown);e.fchown=chownFix(e.fchown);e.lchown=chownFix(e.lchown);e.chmod=chmodFix(e.chmod);e.fchmod=chmodFix(e.fchmod);e.lchmod=chmodFix(e.lchmod);e.chownSync=chownFixSync(e.chownSync);e.fchownSync=chownFixSync(e.fchownSync);e.lchownSync=chownFixSync(e.lchownSync);e.chmodSync=chmodFixSync(e.chmodSync);e.fchmodSync=chmodFixSync(e.fchmodSync);e.lchmodSync=chmodFixSync(e.lchmodSync);e.stat=statFix(e.stat);e.fstat=statFix(e.fstat);e.lstat=statFix(e.lstat);e.statSync=statFixSync(e.statSync);e.fstatSync=statFixSync(e.fstatSync);e.lstatSync=statFixSync(e.lstatSync);if(!e.lchmod){e.lchmod=function(e,t,r){if(r)process.nextTick(r)};e.lchmodSync=function(){}}if(!e.lchown){e.lchown=function(e,t,r,n){if(n)process.nextTick(n)};e.lchownSync=function(){}}if(o==="win32"){e.rename=function(t){return function(r,n,i){var s=Date.now();var o=0;t(r,n,(function CB(a){if(a&&(a.code==="EACCES"||a.code==="EPERM")&&Date.now()-s<6e4){setTimeout((function(){e.stat(n,(function(e,s){if(e&&e.code==="ENOENT")t(r,n,CB);else i(a)}))}),o);if(o<100)o+=10;return}if(i)i(a)}))}}(e.rename)}e.read=function(t){function read(r,n,i,s,o,a){var u;if(a&&typeof a==="function"){var l=0;u=function(c,f,d){if(c&&c.code==="EAGAIN"&&l<10){l++;return t.call(e,r,n,i,s,o,u)}a.apply(this,arguments)}}return t.call(e,r,n,i,s,o,u)}if(Object.setPrototypeOf)Object.setPrototypeOf(read,t);return read}(e.read);e.readSync=function(t){return function(r,n,i,s,o){var a=0;while(true){try{return t.call(e,r,n,i,s,o)}catch(e){if(e.code==="EAGAIN"&&a<10){a++;continue}throw e}}}}(e.readSync);function patchLchmod(e){e.lchmod=function(t,r,i){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,(function(t,n){if(t){if(i)i(t);return}e.fchmod(n,r,(function(t){e.close(n,(function(e){if(i)i(t||e)}))}))}))};e.lchmodSync=function(t,r){var i=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r);var s=true;var o;try{o=e.fchmodSync(i,r);s=false}finally{if(s){try{e.closeSync(i)}catch(e){}}else{e.closeSync(i)}}return o}}function patchLutimes(e){if(n.hasOwnProperty("O_SYMLINK")){e.lutimes=function(t,r,i,s){e.open(t,n.O_SYMLINK,(function(t,n){if(t){if(s)s(t);return}e.futimes(n,r,i,(function(t){e.close(n,(function(e){if(s)s(t||e)}))}))}))};e.lutimesSync=function(t,r,i){var s=e.openSync(t,n.O_SYMLINK);var o;var a=true;try{o=e.futimesSync(s,r,i);a=false}finally{if(a){try{e.closeSync(s)}catch(e){}}else{e.closeSync(s)}}return o}}else{e.lutimes=function(e,t,r,n){if(n)process.nextTick(n)};e.lutimesSync=function(){}}}function chmodFix(t){if(!t)return t;return function(r,n,i){return t.call(e,r,n,(function(e){if(chownErOk(e))e=null;if(i)i.apply(this,arguments)}))}}function chmodFixSync(t){if(!t)return t;return function(r,n){try{return t.call(e,r,n)}catch(e){if(!chownErOk(e))throw e}}}function chownFix(t){if(!t)return t;return function(r,n,i,s){return t.call(e,r,n,i,(function(e){if(chownErOk(e))e=null;if(s)s.apply(this,arguments)}))}}function chownFixSync(t){if(!t)return t;return function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!chownErOk(e))throw e}}}function statFix(t){if(!t)return t;return function(r,n,i){if(typeof n==="function"){i=n;n=null}function callback(e,t){if(t){if(t.uid<0)t.uid+=4294967296;if(t.gid<0)t.gid+=4294967296}if(i)i.apply(this,arguments)}return n?t.call(e,r,n,callback):t.call(e,r,callback)}}function statFixSync(t){if(!t)return t;return function(r,n){var i=n?t.call(e,r,n):t.call(e,r);if(i){if(i.uid<0)i.uid+=4294967296;if(i.gid<0)i.gid+=4294967296}return i}}function chownErOk(e){if(!e)return true;if(e.code==="ENOSYS")return true;var t=!process.getuid||process.getuid()!==0;if(t){if(e.code==="EINVAL"||e.code==="EPERM")return true}return false}}},2157:(e,t,r)=>{"use strict";var n=r(2037);if(typeof n.homedir!=="undefined"){e.exports=n.homedir}else{e.exports=r(9975)}},9975:(e,t,r)=>{"use strict";var n=r(7147);var i=r(9524);function homedir(){if(process.platform==="win32"){if(process.env.USERPROFILE){return process.env.USERPROFILE}if(process.env.HOMEDRIVE&&process.env.HOMEPATH){return process.env.HOMEDRIVE+process.env.HOMEPATH}if(process.env.HOME){return process.env.HOME}return null}if(process.env.HOME){return process.env.HOME}var e=tryReadFileSync("/etc/passwd");var t=find(i(e),getuid());if(t){return t}var r=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;if(!r){return null}if(process.platform==="darwin"){return"/Users/"+r}return"/home/"+r}function find(e,t){var r=e.length;for(var n=0;n0){f("Patching connection write() output buffer with updated header");t=e.output[0];r=t.indexOf("\r\n\r\n")+4;e.output[0]=e._header+t.substring(r);f("Output buffer: %o",e.output)}else if(e.outputData&&e.outputData.length>0){f("Patching connection write() output buffer with updated header");t=e.outputData[0].data;r=t.indexOf("\r\n\r\n")+4;e.outputData[0].data=e._header+t.substring(r);f("Output buffer: %o",e.outputData[0].data)}}yield(0,l.default)(u,"connect");return u}))}}t["default"]=HttpProxyAgent},5283:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const i=n(r(5724));function createHttpProxyAgent(e){return new i.default(e)}(function(e){e.HttpProxyAgent=i.default;e.prototype=i.default.prototype})(createHttpProxyAgent||(createHttpProxyAgent={}));e.exports=createHttpProxyAgent},7316:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const s=i(r(1808));const o=i(r(4404));const a=i(r(7310));const u=i(r(9491));const l=i(r(5598));const c=r(5689);const f=i(r(5335));const d=l.default("https-proxy-agent:agent");class HttpsProxyAgent extends c.Agent{constructor(e){let t;if(typeof e==="string"){t=a.default.parse(e)}else{t=e}if(!t){throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!")}d("creating new HttpsProxyAgent instance: %o",t);super(t);const r=Object.assign({},t);this.secureProxy=t.secureProxy||isHTTPS(r.protocol);r.host=r.hostname||r.host;if(typeof r.port==="string"){r.port=parseInt(r.port,10)}if(!r.port&&r.host){r.port=this.secureProxy?443:80}if(this.secureProxy&&!("ALPNProtocols"in r)){r.ALPNProtocols=["http 1.1"]}if(r.host&&r.path){delete r.path;delete r.pathname}this.proxy=r}callback(e,t){return n(this,void 0,void 0,(function*(){const{proxy:r,secureProxy:n}=this;let i;if(n){d("Creating `tls.Socket`: %o",r);i=o.default.connect(r)}else{d("Creating `net.Socket`: %o",r);i=s.default.connect(r)}const a=Object.assign({},r.headers);const l=`${t.host}:${t.port}`;let c=`CONNECT ${l} HTTP/1.1\r\n`;if(r.auth){a["Proxy-Authorization"]=`Basic ${Buffer.from(r.auth).toString("base64")}`}let{host:p,port:h,secureEndpoint:m}=t;if(!isDefaultPort(h,m)){p+=`:${h}`}a.Host=p;a.Connection="close";for(const e of Object.keys(a)){c+=`${e}: ${a[e]}\r\n`}const v=f.default(i);i.write(`${c}\r\n`);const{statusCode:g,buffered:y}=yield v;if(g===200){e.once("socket",resume);if(t.secureEndpoint){const e=t.servername||t.host;if(!e){throw new Error('Could not determine "servername"')}d("Upgrading socket connection to TLS");return o.default.connect(Object.assign(Object.assign({},omit(t,"host","hostname","path","port")),{socket:i,servername:e}))}return i}i.destroy();const b=new s.default.Socket;b.readable=true;e.once("socket",(e=>{d("replaying proxy buffer for failed request");u.default(e.listenerCount("data")>0);e.push(y);e.push(null)}));return b}))}}t["default"]=HttpsProxyAgent;function resume(e){e.resume()}function isDefaultPort(e,t){return Boolean(!t&&e===80||t&&e===443)}function isHTTPS(e){return typeof e==="string"?/^https:?$/i.test(e):false}function omit(e,...t){const r={};let n;for(n in e){if(!t.includes(n)){r[n]=e[n]}}return r}},72:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const i=n(r(7316));function createHttpsProxyAgent(e){return new i.default(e)}(function(e){e.HttpsProxyAgent=i.default;e.prototype=i.default.prototype})(createHttpsProxyAgent||(createHttpsProxyAgent={}));e.exports=createHttpsProxyAgent},5335:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const i=n(r(5598));const s=i.default("https-proxy-agent:parse-proxy-response");function parseProxyResponse(e){return new Promise(((t,r)=>{let n=0;const i=[];function read(){const t=e.read();if(t)ondata(t);else e.once("readable",read)}function cleanup(){e.removeListener("end",onend);e.removeListener("error",onerror);e.removeListener("close",onclose);e.removeListener("readable",read)}function onclose(e){s("onclose had error %o",e)}function onend(){s("onend")}function onerror(e){cleanup();s("onerror %o",e);r(e)}function ondata(e){i.push(e);n+=e.length;const r=Buffer.concat(i,n);const o=r.indexOf("\r\n\r\n");if(o===-1){s("have not received end of HTTP headers yet...");read();return}const a=r.toString("ascii",0,r.indexOf("\r\n"));const u=+a.split(" ")[1];s("got proxy server response: %o",a);t({statusCode:u,buffered:r})}e.on("error",onerror);e.on("close",onclose);e.on("end",onend);read()}))}t["default"]=parseProxyResponse},979:(e,t,r)=>{"use strict"; -/*! - * humanize-ms - index.js - * Copyright(c) 2014 dead_horse - * MIT Licensed - */var n=r(3837);var i=r(8527);e.exports=function(e){if(typeof e==="number")return e;var t=i(e);if(t===undefined){var r=new Error(n.format("humanize-ms(%j) result undefined",e));console.warn(r.stack)}return t}},1972:e=>{"use strict";var t=typeof window!=="undefined"?window:typeof global!=="undefined"?global:{};e.exports=Individual;function Individual(e,r){if(e in t){return t[e]}t[e]=r;return r}},5651:(e,t,r)=>{try{var n=r(3837);if(typeof n.inherits!=="function")throw"";e.exports=n.inherits}catch(t){e.exports=r(5940)}},5940:e=>{if(typeof Object.create==="function"){e.exports=function inherits(e,t){if(t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,t){if(t){e.super_=t;var TempCtor=function(){};TempCtor.prototype=t.prototype;e.prototype=new TempCtor;e.prototype.constructor=e}}}},9316:(e,t,r)=>{"use strict";var n=t;var i=r(4300).Buffer;var s=r(2037);n.toBuffer=function(e,t,r){r=~~r;var n;if(this.isV4Format(e)){n=t||new i(r+4);e.split(/\./g).map((function(e){n[r++]=parseInt(e,10)&255}))}else if(this.isV6Format(e)){var s=e.split(":",8);var o;for(o=0;o0;o--){l.push("0")}s.splice.apply(s,l)}n=t||new i(r+16);for(o=0;o>8&255;n[r++]=c&255}}if(!n){throw Error("Invalid ip address: "+e)}return n};n.toString=function(e,t,r){t=~~t;r=r||e.length-t;var n=[];if(r===4){for(var i=0;i32){t="ipv6"}else{t=_normalizeFamily(t)}var r=4;if(t==="ipv6"){r=16}var s=new i(r);for(var o=0,a=s.length;o>u)&255}return n.toString(s)};n.mask=function(e,t){e=n.toBuffer(e);t=n.toBuffer(t);var r=new i(Math.max(e.length,t.length));var s=0;if(e.length===t.length){for(s=0;se.length){i=t;s=e}var o=i.length-s.length;for(var r=o;r>>0};n.fromLong=function(e){return(e>>>24)+"."+(e>>16&255)+"."+(e>>8&255)+"."+(e&255)}},3639:(e,t,r)=>{"use strict";var n=r(6344);var i=r(7902);function renamed(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. "+"Use yaml."+t+" instead, which is now safe by default.")}}e.exports.Type=r(4098);e.exports.Schema=r(5217);e.exports.FAILSAFE_SCHEMA=r(3183);e.exports.JSON_SCHEMA=r(9116);e.exports.CORE_SCHEMA=r(9043);e.exports.DEFAULT_SCHEMA=r(6672);e.exports.load=n.load;e.exports.loadAll=n.loadAll;e.exports.dump=i.dump;e.exports.YAMLException=r(876);e.exports.types={binary:r(1688),float:r(3250),map:r(723),null:r(2451),pairs:r(5671),set:r(3051),timestamp:r(8285),bool:r(8510),int:r(2682),merge:r(5831),omap:r(3602),seq:r(9130),str:r(802)};e.exports.safeLoad=renamed("safeLoad","load");e.exports.safeLoadAll=renamed("safeLoadAll","loadAll");e.exports.safeDump=renamed("safeDump","dump")},5929:e=>{"use strict";function isNothing(e){return typeof e==="undefined"||e===null}function isObject(e){return typeof e==="object"&&e!==null}function toArray(e){if(Array.isArray(e))return e;else if(isNothing(e))return[];return[e]}function extend(e,t){var r,n,i,s;if(t){s=Object.keys(t);for(r=0,n=s.length;r{"use strict";var n=r(5929);var i=r(876);var s=r(6672);var o=Object.prototype.toString;var a=Object.prototype.hasOwnProperty;var u=65279;var l=9;var c=10;var f=13;var d=32;var p=33;var h=34;var m=35;var v=37;var g=38;var y=39;var b=42;var S=44;var w=45;var _=58;var E=61;var k=62;var P=63;var C=64;var x=91;var O=93;var R=96;var I=123;var A=124;var T=125;var D={};D[0]="\\0";D[7]="\\a";D[8]="\\b";D[9]="\\t";D[10]="\\n";D[11]="\\v";D[12]="\\f";D[13]="\\r";D[27]="\\e";D[34]='\\"';D[92]="\\\\";D[133]="\\N";D[160]="\\_";D[8232]="\\L";D[8233]="\\P";var F=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];var L=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function compileStyleMap(e,t){var r,n,i,s,o,u,l;if(t===null)return{};r={};n=Object.keys(t);for(i=0,s=n.length;i=55296&&r<=56319&&t+1=56320&&n<=57343){return(r-55296)*1024+n-56320+65536}}return r}function needIndentIndicator(e){var t=/^\n* /;return t.test(e)}var B=1,M=2,$=3,U=4,H=5;function chooseScalarStyle(e,t,r,n,i,s,o,a){var u;var l=0;var f=null;var d=false;var p=false;var h=n!==-1;var m=-1;var v=isPlainSafeFirst(codePointAt(e,0))&&isPlainSafeLast(codePointAt(e,e.length-1));if(t||o){for(u=0;u=65536?u+=2:u++){l=codePointAt(e,u);if(!isPrintable(l)){return H}v=v&&isPlainSafe(l,f,a);f=l}}else{for(u=0;u=65536?u+=2:u++){l=codePointAt(e,u);if(l===c){d=true;if(h){p=p||u-m-1>n&&e[m+1]!==" ";m=u}}else if(!isPrintable(l)){return H}v=v&&isPlainSafe(l,f,a);f=l}p=p||h&&(u-m-1>n&&e[m+1]!==" ")}if(!d&&!p){if(v&&!o&&!i(e)){return B}return s===j?H:M}if(r>9&&needIndentIndicator(e)){return H}if(!o){return p?U:$}return s===j?H:M}function writeScalar(e,t,r,n,s){e.dump=function(){if(t.length===0){return e.quotingType===j?'""':"''"}if(!e.noCompatMode){if(F.indexOf(t)!==-1||L.test(t)){return e.quotingType===j?'"'+t+'"':"'"+t+"'"}}var o=e.indent*Math.max(1,r);var a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o);var u=n||e.flowLevel>-1&&r>=e.flowLevel;function testAmbiguity(t){return testImplicitResolving(e,t)}switch(chooseScalarStyle(t,u,e.indent,a,testAmbiguity,e.quotingType,e.forceQuotes&&!n,s)){case B:return t;case M:return"'"+t.replace(/'/g,"''")+"'";case $:return"|"+blockHeader(t,e.indent)+dropEndingNewline(indentString(t,o));case U:return">"+blockHeader(t,e.indent)+dropEndingNewline(indentString(foldString(t,a),o));case H:return'"'+escapeString(t,a)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function blockHeader(e,t){var r=needIndentIndicator(e)?String(t):"";var n=e[e.length-1]==="\n";var i=n&&(e[e.length-2]==="\n"||e==="\n");var s=i?"+":n?"":"-";return r+s+"\n"}function dropEndingNewline(e){return e[e.length-1]==="\n"?e.slice(0,-1):e}function foldString(e,t){var r=/(\n+)([^\n]*)/g;var n=function(){var n=e.indexOf("\n");n=n!==-1?n:e.length;r.lastIndex=n;return foldLine(e.slice(0,n),t)}();var i=e[0]==="\n"||e[0]===" ";var s;var o;while(o=r.exec(e)){var a=o[1],u=o[2];s=u[0]===" ";n+=a+(!i&&!s&&u!==""?"\n":"")+foldLine(u,t);i=s}return n}function foldLine(e,t){if(e===""||e[0]===" ")return e;var r=/ [^ ]/g;var n;var i=0,s,o=0,a=0;var u="";while(n=r.exec(e)){a=n.index;if(a-i>t){s=o>i?o:a;u+="\n"+e.slice(i,s);i=s+1}o=a}u+="\n";if(e.length-i>t&&o>i){u+=e.slice(i,o)+"\n"+e.slice(o+1)}else{u+=e.slice(i)}return u.slice(1)}function escapeString(e){var t="";var r=0;var n;for(var i=0;i=65536?i+=2:i++){r=codePointAt(e,i);n=D[r];if(!n&&isPrintable(r)){t+=e[i];if(r>=65536)t+=e[i+1]}else{t+=n||encodeHex(r)}}return t}function writeFlowSequence(e,t,r){var n="",i=e.tag,s,o,a;for(s=0,o=r.length;s1024)c+="? ";c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" ");if(!writeNode(e,t,l,false,false)){continue}c+=e.dump;n+=c}e.tag=i;e.dump="{"+n+"}"}function writeBlockMapping(e,t,r,n){var s="",o=e.tag,a=Object.keys(r),u,l,f,d,p,h;if(e.sortKeys===true){a.sort()}else if(typeof e.sortKeys==="function"){a.sort(e.sortKeys)}else if(e.sortKeys){throw new i("sortKeys must be a boolean or a function")}for(u=0,l=a.length;u1024;if(p){if(e.dump&&c===e.dump.charCodeAt(0)){h+="?"}else{h+="? "}}h+=e.dump;if(p){h+=generateNextLine(e,t)}if(!writeNode(e,t+1,d,true,p)){continue}if(e.dump&&c===e.dump.charCodeAt(0)){h+=":"}else{h+=": "}h+=e.dump;s+=h}e.tag=o;e.dump=s||"{}"}function detectType(e,t,r){var n,s,u,l,c,f;s=r?e.explicitTypes:e.implicitTypes;for(u=0,l=s.length;u tag resolver accepts not "'+f+'" style')}e.dump=n}return true}}return false}function writeNode(e,t,r,n,s,a,u){e.tag=null;e.dump=r;if(!detectType(e,r,false)){detectType(e,r,true)}var l=o.call(e.dump);var c=n;var f;if(n){n=e.flowLevel<0||e.flowLevel>t}var d=l==="[object Object]"||l==="[object Array]",p,h;if(d){p=e.duplicates.indexOf(r);h=p!==-1}if(e.tag!==null&&e.tag!=="?"||h||e.indent!==2&&t>0){s=false}if(h&&e.usedDuplicates[p]){e.dump="*ref_"+p}else{if(d&&h&&!e.usedDuplicates[p]){e.usedDuplicates[p]=true}if(l==="[object Object]"){if(n&&Object.keys(e.dump).length!==0){writeBlockMapping(e,t,e.dump,s);if(h){e.dump="&ref_"+p+e.dump}}else{writeFlowMapping(e,t,e.dump);if(h){e.dump="&ref_"+p+" "+e.dump}}}else if(l==="[object Array]"){if(n&&e.dump.length!==0){if(e.noArrayIndent&&!u&&t>0){writeBlockSequence(e,t-1,e.dump,s)}else{writeBlockSequence(e,t,e.dump,s)}if(h){e.dump="&ref_"+p+e.dump}}else{writeFlowSequence(e,t,e.dump);if(h){e.dump="&ref_"+p+" "+e.dump}}}else if(l==="[object String]"){if(e.tag!=="?"){writeScalar(e,e.dump,t,a,c)}}else if(l==="[object Undefined]"){return false}else{if(e.skipInvalid)return false;throw new i("unacceptable kind of an object to dump "+l)}if(e.tag!==null&&e.tag!=="?"){f=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21");if(e.tag[0]==="!"){f="!"+f}else if(f.slice(0,18)==="tag:yaml.org,2002:"){f="!!"+f.slice(18)}else{f="!<"+f+">"}e.dump=f+" "+e.dump}}return true}function getDuplicateReferences(e,t){var r=[],n=[],i,s;inspectNode(e,r,n);for(i=0,s=n.length;i{"use strict";function formatError(e,t){var r="",n=e.reason||"(unknown reason)";if(!e.mark)return n;if(e.mark.name){r+='in "'+e.mark.name+'" '}r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")";if(!t&&e.mark.snippet){r+="\n\n"+e.mark.snippet}return n+" "+r}function YAMLException(e,t){Error.call(this);this.name="YAMLException";this.reason=e;this.mark=t;this.message=formatError(this,false);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack||""}}YAMLException.prototype=Object.create(Error.prototype);YAMLException.prototype.constructor=YAMLException;YAMLException.prototype.toString=function toString(e){return this.name+": "+formatError(this,e)};e.exports=YAMLException},6344:(e,t,r)=>{"use strict";var n=r(5929);var i=r(876);var s=r(6589);var o=r(6672);var a=Object.prototype.hasOwnProperty;var u=1;var l=2;var c=3;var f=4;var d=1;var p=2;var h=3;var m=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var v=/[\x85\u2028\u2029]/;var g=/[,\[\]\{\}]/;var y=/^(?:!|!!|![a-z\-]+!)$/i;var b=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(e){return Object.prototype.toString.call(e)}function is_EOL(e){return e===10||e===13}function is_WHITE_SPACE(e){return e===9||e===32}function is_WS_OR_EOL(e){return e===9||e===32||e===10||e===13}function is_FLOW_INDICATOR(e){return e===44||e===91||e===93||e===123||e===125}function fromHexCode(e){var t;if(48<=e&&e<=57){return e-48}t=e|32;if(97<=t&&t<=102){return t-97+10}return-1}function escapedHexLen(e){if(e===120){return 2}if(e===117){return 4}if(e===85){return 8}return 0}function fromDecimalCode(e){if(48<=e&&e<=57){return e-48}return-1}function simpleEscapeSequence(e){return e===48?"\0":e===97?"":e===98?"\b":e===116?"\t":e===9?"\t":e===110?"\n":e===118?"\v":e===102?"\f":e===114?"\r":e===101?"":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function charFromCodepoint(e){if(e<=65535){return String.fromCharCode(e)}return String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var S=new Array(256);var w=new Array(256);for(var _=0;_<256;_++){S[_]=simpleEscapeSequence(_)?1:0;w[_]=simpleEscapeSequence(_)}function State(e,t){this.input=e;this.filename=t["filename"]||null;this.schema=t["schema"]||o;this.onWarning=t["onWarning"]||null;this.legacy=t["legacy"]||false;this.json=t["json"]||false;this.listener=t["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=e.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.firstTabInLine=-1;this.documents=[]}function generateError(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};r.snippet=s(r);return new i(t,r)}function throwError(e,t){throw generateError(e,t)}function throwWarning(e,t){if(e.onWarning){e.onWarning.call(null,generateError(e,t))}}var E={YAML:function handleYamlDirective(e,t,r){var n,i,s;if(e.version!==null){throwError(e,"duplication of %YAML directive")}if(r.length!==1){throwError(e,"YAML directive accepts exactly one argument")}n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);if(n===null){throwError(e,"ill-formed argument of the YAML directive")}i=parseInt(n[1],10);s=parseInt(n[2],10);if(i!==1){throwError(e,"unacceptable YAML version of the document")}e.version=r[0];e.checkLineBreaks=s<2;if(s!==1&&s!==2){throwWarning(e,"unsupported YAML version of the document")}},TAG:function handleTagDirective(e,t,r){var n,i;if(r.length!==2){throwError(e,"TAG directive accepts exactly two arguments")}n=r[0];i=r[1];if(!y.test(n)){throwError(e,"ill-formed tag handle (first argument) of the TAG directive")}if(a.call(e.tagMap,n)){throwError(e,'there is a previously declared suffix for "'+n+'" tag handle')}if(!b.test(i)){throwError(e,"ill-formed tag prefix (second argument) of the TAG directive")}try{i=decodeURIComponent(i)}catch(t){throwError(e,"tag prefix is malformed: "+i)}e.tagMap[n]=i}};function captureSegment(e,t,r,n){var i,s,o,a;if(t1){e.result+=n.repeat("\n",t-1)}}function readPlainScalar(e,t,r){var n,i,s,o,a,u,l,c,f=e.kind,d=e.result,p;p=e.input.charCodeAt(e.position);if(is_WS_OR_EOL(p)||is_FLOW_INDICATOR(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96){return false}if(p===63||p===45){i=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(i)||r&&is_FLOW_INDICATOR(i)){return false}}e.kind="scalar";e.result="";s=o=e.position;a=false;while(p!==0){if(p===58){i=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(i)||r&&is_FLOW_INDICATOR(i)){break}}else if(p===35){n=e.input.charCodeAt(e.position-1);if(is_WS_OR_EOL(n)){break}}else if(e.position===e.lineStart&&testDocumentSeparator(e)||r&&is_FLOW_INDICATOR(p)){break}else if(is_EOL(p)){u=e.line;l=e.lineStart;c=e.lineIndent;skipSeparationSpace(e,false,-1);if(e.lineIndent>=t){a=true;p=e.input.charCodeAt(e.position);continue}else{e.position=o;e.line=u;e.lineStart=l;e.lineIndent=c;break}}if(a){captureSegment(e,s,o,false);writeFoldedLines(e,e.line-u);s=o=e.position;a=false}if(!is_WHITE_SPACE(p)){o=e.position+1}p=e.input.charCodeAt(++e.position)}captureSegment(e,s,o,false);if(e.result){return true}e.kind=f;e.result=d;return false}function readSingleQuotedScalar(e,t){var r,n,i;r=e.input.charCodeAt(e.position);if(r!==39){return false}e.kind="scalar";e.result="";e.position++;n=i=e.position;while((r=e.input.charCodeAt(e.position))!==0){if(r===39){captureSegment(e,n,e.position,true);r=e.input.charCodeAt(++e.position);if(r===39){n=e.position;e.position++;i=e.position}else{return true}}else if(is_EOL(r)){captureSegment(e,n,i,true);writeFoldedLines(e,skipSeparationSpace(e,false,t));n=i=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a single quoted scalar")}else{e.position++;i=e.position}}throwError(e,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(e,t){var r,n,i,s,o,a;a=e.input.charCodeAt(e.position);if(a!==34){return false}e.kind="scalar";e.result="";e.position++;r=n=e.position;while((a=e.input.charCodeAt(e.position))!==0){if(a===34){captureSegment(e,r,e.position,true);e.position++;return true}else if(a===92){captureSegment(e,r,e.position,true);a=e.input.charCodeAt(++e.position);if(is_EOL(a)){skipSeparationSpace(e,false,t)}else if(a<256&&S[a]){e.result+=w[a];e.position++}else if((o=escapedHexLen(a))>0){i=o;s=0;for(;i>0;i--){a=e.input.charCodeAt(++e.position);if((o=fromHexCode(a))>=0){s=(s<<4)+o}else{throwError(e,"expected hexadecimal character")}}e.result+=charFromCodepoint(s);e.position++}else{throwError(e,"unknown escape sequence")}r=n=e.position}else if(is_EOL(a)){captureSegment(e,r,n,true);writeFoldedLines(e,skipSeparationSpace(e,false,t));r=n=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a double quoted scalar")}else{e.position++;n=e.position}}throwError(e,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(e,t){var r=true,n,i,s,o=e.tag,a,l=e.anchor,c,f,d,p,h,m=Object.create(null),v,g,y,b;b=e.input.charCodeAt(e.position);if(b===91){f=93;h=false;a=[]}else if(b===123){f=125;h=true;a={}}else{return false}if(e.anchor!==null){e.anchorMap[e.anchor]=a}b=e.input.charCodeAt(++e.position);while(b!==0){skipSeparationSpace(e,true,t);b=e.input.charCodeAt(e.position);if(b===f){e.position++;e.tag=o;e.anchor=l;e.kind=h?"mapping":"sequence";e.result=a;return true}else if(!r){throwError(e,"missed comma between flow collection entries")}else if(b===44){throwError(e,"expected the node content, but found ','")}g=v=y=null;d=p=false;if(b===63){c=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(c)){d=p=true;e.position++;skipSeparationSpace(e,true,t)}}n=e.line;i=e.lineStart;s=e.position;composeNode(e,t,u,false,true);g=e.tag;v=e.result;skipSeparationSpace(e,true,t);b=e.input.charCodeAt(e.position);if((p||e.line===n)&&b===58){d=true;b=e.input.charCodeAt(++e.position);skipSeparationSpace(e,true,t);composeNode(e,t,u,false,true);y=e.result}if(h){storeMappingPair(e,a,m,g,v,y,n,i,s)}else if(d){a.push(storeMappingPair(e,null,m,g,v,y,n,i,s))}else{a.push(v)}skipSeparationSpace(e,true,t);b=e.input.charCodeAt(e.position);if(b===44){r=true;b=e.input.charCodeAt(++e.position)}else{r=false}}throwError(e,"unexpected end of the stream within a flow collection")}function readBlockScalar(e,t){var r,i,s=d,o=false,a=false,u=t,l=0,c=false,f,m;m=e.input.charCodeAt(e.position);if(m===124){i=false}else if(m===62){i=true}else{return false}e.kind="scalar";e.result="";while(m!==0){m=e.input.charCodeAt(++e.position);if(m===43||m===45){if(d===s){s=m===43?h:p}else{throwError(e,"repeat of a chomping mode identifier")}}else if((f=fromDecimalCode(m))>=0){if(f===0){throwError(e,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!a){u=t+f-1;a=true}else{throwError(e,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(m)){do{m=e.input.charCodeAt(++e.position)}while(is_WHITE_SPACE(m));if(m===35){do{m=e.input.charCodeAt(++e.position)}while(!is_EOL(m)&&m!==0)}}while(m!==0){readLineBreak(e);e.lineIndent=0;m=e.input.charCodeAt(e.position);while((!a||e.lineIndentu){u=e.lineIndent}if(is_EOL(m)){l++;continue}if(e.lineIndentt)&&u!==0){throwError(e,"bad indentation of a sequence entry")}else if(e.lineIndentt){if(y){o=e.line;a=e.lineStart;u=e.position}if(composeNode(e,t,f,true,i)){if(y){v=e.result}else{g=e.result}}if(!y){storeMappingPair(e,p,h,m,v,g,o,a,u);m=v=g=null}skipSeparationSpace(e,true,-1);S=e.input.charCodeAt(e.position)}if((e.line===s||e.lineIndent>t)&&S!==0){throwError(e,"bad indentation of a mapping entry")}else if(e.lineIndentt){p=1}else if(e.lineIndent===t){p=0}else if(e.lineIndentt){p=1}else if(e.lineIndent===t){p=0}else if(e.lineIndent tag; it should be "scalar", not "'+e.kind+'"')}for(v=0,g=e.implicitTypes.length;v")}if(e.result!==null&&b.kind!==e.kind){throwError(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+b.kind+'", not "'+e.kind+'"')}if(!b.resolve(e.result,e.tag)){throwError(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}else{e.result=b.construct(e.result,e.tag);if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}if(e.listener!==null){e.listener("close",e)}return e.tag!==null||e.anchor!==null||m}function readDocument(e){var t=e.position,r,n,i,s=false,o;e.version=null;e.checkLineBreaks=e.legacy;e.tagMap=Object.create(null);e.anchorMap=Object.create(null);while((o=e.input.charCodeAt(e.position))!==0){skipSeparationSpace(e,true,-1);o=e.input.charCodeAt(e.position);if(e.lineIndent>0||o!==37){break}s=true;o=e.input.charCodeAt(++e.position);r=e.position;while(o!==0&&!is_WS_OR_EOL(o)){o=e.input.charCodeAt(++e.position)}n=e.input.slice(r,e.position);i=[];if(n.length<1){throwError(e,"directive name must not be less than one character in length")}while(o!==0){while(is_WHITE_SPACE(o)){o=e.input.charCodeAt(++e.position)}if(o===35){do{o=e.input.charCodeAt(++e.position)}while(o!==0&&!is_EOL(o));break}if(is_EOL(o))break;r=e.position;while(o!==0&&!is_WS_OR_EOL(o)){o=e.input.charCodeAt(++e.position)}i.push(e.input.slice(r,e.position))}if(o!==0)readLineBreak(e);if(a.call(E,n)){E[n](e,n,i)}else{throwWarning(e,'unknown document directive "'+n+'"')}}skipSeparationSpace(e,true,-1);if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45){e.position+=3;skipSeparationSpace(e,true,-1)}else if(s){throwError(e,"directives end mark is expected")}composeNode(e,e.lineIndent-1,f,false,true);skipSeparationSpace(e,true,-1);if(e.checkLineBreaks&&v.test(e.input.slice(t,e.position))){throwWarning(e,"non-ASCII line breaks are interpreted as content")}e.documents.push(e.result);if(e.position===e.lineStart&&testDocumentSeparator(e)){if(e.input.charCodeAt(e.position)===46){e.position+=3;skipSeparationSpace(e,true,-1)}return}if(e.position{"use strict";var n=r(876);var i=r(4098);function compileList(e,t){var r=[];e[t].forEach((function(e){var t=r.length;r.forEach((function(r,n){if(r.tag===e.tag&&r.kind===e.kind&&r.multi===e.multi){t=n}}));r[t]=e}));return r}function compileMap(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function collectType(t){if(t.multi){e.multi[t.kind].push(t);e.multi["fallback"].push(t)}else{e[t.kind][t.tag]=e["fallback"][t.tag]=t}}for(t=0,r=arguments.length;t{"use strict";e.exports=r(9116)},6672:(e,t,r)=>{"use strict";e.exports=r(9043).extend({implicit:[r(8285),r(5831)],explicit:[r(1688),r(3602),r(5671),r(3051)]})},3183:(e,t,r)=>{"use strict";var n=r(5217);e.exports=new n({explicit:[r(802),r(9130),r(723)]})},9116:(e,t,r)=>{"use strict";e.exports=r(3183).extend({implicit:[r(2451),r(8510),r(2682),r(3250)]})},6589:(e,t,r)=>{"use strict";var n=r(5929);function getLine(e,t,r,n,i){var s="";var o="";var a=Math.floor(i/2)-1;if(n-t>a){s=" ... ";t=n-a+s.length}if(r-n>a){o=" ...";r=n+a-o.length}return{str:s+e.slice(t,r).replace(/\t/g,"→")+o,pos:n-t+s.length}}function padStart(e,t){return n.repeat(" ",t-e.length)+e}function makeSnippet(e,t){t=Object.create(t||null);if(!e.buffer)return null;if(!t.maxLength)t.maxLength=79;if(typeof t.indent!=="number")t.indent=1;if(typeof t.linesBefore!=="number")t.linesBefore=3;if(typeof t.linesAfter!=="number")t.linesAfter=2;var r=/\r?\n|\r|\0/g;var i=[0];var s=[];var o;var a=-1;while(o=r.exec(e.buffer)){s.push(o.index);i.push(o.index+o[0].length);if(e.position<=o.index&&a<0){a=i.length-2}}if(a<0)a=i.length-1;var u="",l,c;var f=Math.min(e.line+t.linesAfter,s.length).toString().length;var d=t.maxLength-(t.indent+f+3);for(l=1;l<=t.linesBefore;l++){if(a-l<0)break;c=getLine(e.buffer,i[a-l],s[a-l],e.position-(i[a]-i[a-l]),d);u=n.repeat(" ",t.indent)+padStart((e.line-l+1).toString(),f)+" | "+c.str+"\n"+u}c=getLine(e.buffer,i[a],s[a],e.position,d);u+=n.repeat(" ",t.indent)+padStart((e.line+1).toString(),f)+" | "+c.str+"\n";u+=n.repeat("-",t.indent+f+3+c.pos)+"^"+"\n";for(l=1;l<=t.linesAfter;l++){if(a+l>=s.length)break;c=getLine(e.buffer,i[a+l],s[a+l],e.position-(i[a]-i[a+l]),d);u+=n.repeat(" ",t.indent)+padStart((e.line+l+1).toString(),f)+" | "+c.str+"\n"}return u.replace(/\n$/,"")}e.exports=makeSnippet},4098:(e,t,r)=>{"use strict";var n=r(876);var i=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"];var s=["scalar","sequence","mapping"];function compileStyleAliases(e){var t={};if(e!==null){Object.keys(e).forEach((function(r){e[r].forEach((function(e){t[String(e)]=r}))}))}return t}function Type(e,t){t=t||{};Object.keys(t).forEach((function(t){if(i.indexOf(t)===-1){throw new n('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}}));this.options=t;this.tag=e;this.kind=t["kind"]||null;this.resolve=t["resolve"]||function(){return true};this.construct=t["construct"]||function(e){return e};this.instanceOf=t["instanceOf"]||null;this.predicate=t["predicate"]||null;this.represent=t["represent"]||null;this.representName=t["representName"]||null;this.defaultStyle=t["defaultStyle"]||null;this.multi=t["multi"]||false;this.styleAliases=compileStyleAliases(t["styleAliases"]||null);if(s.indexOf(this.kind)===-1){throw new n('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}}e.exports=Type},1688:(e,t,r)=>{"use strict";var n=r(4098);var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function resolveYamlBinary(e){if(e===null)return false;var t,r,n=0,s=e.length,o=i;for(r=0;r64)continue;if(t<0)return false;n+=6}return n%8===0}function constructYamlBinary(e){var t,r,n=e.replace(/[\r\n=]/g,""),s=n.length,o=i,a=0,u=[];for(t=0;t>16&255);u.push(a>>8&255);u.push(a&255)}a=a<<6|o.indexOf(n.charAt(t))}r=s%4*6;if(r===0){u.push(a>>16&255);u.push(a>>8&255);u.push(a&255)}else if(r===18){u.push(a>>10&255);u.push(a>>2&255)}else if(r===12){u.push(a>>4&255)}return new Uint8Array(u)}function representYamlBinary(e){var t="",r=0,n,s,o=e.length,a=i;for(n=0;n>18&63];t+=a[r>>12&63];t+=a[r>>6&63];t+=a[r&63]}r=(r<<8)+e[n]}s=o%3;if(s===0){t+=a[r>>18&63];t+=a[r>>12&63];t+=a[r>>6&63];t+=a[r&63]}else if(s===2){t+=a[r>>10&63];t+=a[r>>4&63];t+=a[r<<2&63];t+=a[64]}else if(s===1){t+=a[r>>2&63];t+=a[r<<4&63];t+=a[64];t+=a[64]}return t}function isBinary(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}e.exports=new n("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},8510:(e,t,r)=>{"use strict";var n=r(4098);function resolveYamlBoolean(e){if(e===null)return false;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function constructYamlBoolean(e){return e==="true"||e==="True"||e==="TRUE"}function isBoolean(e){return Object.prototype.toString.call(e)==="[object Boolean]"}e.exports=new n("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},3250:(e,t,r)=>{"use strict";var n=r(5929);var i=r(4098);var s=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(e){if(e===null)return false;if(!s.test(e)||e[e.length-1]==="_"){return false}return true}function constructYamlFloat(e){var t,r;t=e.replace(/_/g,"").toLowerCase();r=t[0]==="-"?-1:1;if("+-".indexOf(t[0])>=0){t=t.slice(1)}if(t===".inf"){return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(t===".nan"){return NaN}return r*parseFloat(t,10)}var o=/^[-+]?[0-9]+e/;function representYamlFloat(e,t){var r;if(isNaN(e)){switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===e){switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===e){switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(n.isNegativeZero(e)){return"-0.0"}r=e.toString(10);return o.test(r)?r.replace("e",".e"):r}function isFloat(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||n.isNegativeZero(e))}e.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},2682:(e,t,r)=>{"use strict";var n=r(5929);var i=r(4098);function isHexCode(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function isOctCode(e){return 48<=e&&e<=55}function isDecCode(e){return 48<=e&&e<=57}function resolveYamlInteger(e){if(e===null)return false;var t=e.length,r=0,n=false,i;if(!t)return false;i=e[r];if(i==="-"||i==="+"){i=e[++r]}if(i==="0"){if(r+1===t)return true;i=e[++r];if(i==="b"){r++;for(;r=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},723:(e,t,r)=>{"use strict";var n=r(4098);e.exports=new n("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})},5831:(e,t,r)=>{"use strict";var n=r(4098);function resolveYamlMerge(e){return e==="<<"||e===null}e.exports=new n("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},2451:(e,t,r)=>{"use strict";var n=r(4098);function resolveYamlNull(e){if(e===null)return true;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function constructYamlNull(){return null}function isNull(e){return e===null}e.exports=new n("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})},3602:(e,t,r)=>{"use strict";var n=r(4098);var i=Object.prototype.hasOwnProperty;var s=Object.prototype.toString;function resolveYamlOmap(e){if(e===null)return true;var t=[],r,n,o,a,u,l=e;for(r=0,n=l.length;r{"use strict";var n=r(4098);var i=Object.prototype.toString;function resolveYamlPairs(e){if(e===null)return true;var t,r,n,s,o,a=e;o=new Array(a.length);for(t=0,r=a.length;t{"use strict";var n=r(4098);e.exports=new n("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})},3051:(e,t,r)=>{"use strict";var n=r(4098);var i=Object.prototype.hasOwnProperty;function resolveYamlSet(e){if(e===null)return true;var t,r=e;for(t in r){if(i.call(r,t)){if(r[t]!==null)return false}}return true}function constructYamlSet(e){return e!==null?e:{}}e.exports=new n("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},802:(e,t,r)=>{"use strict";var n=r(4098);e.exports=new n("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})},8285:(e,t,r)=>{"use strict";var n=r(4098);var i=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var s=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(e){if(e===null)return false;if(i.exec(e)!==null)return true;if(s.exec(e)!==null)return true;return false}function constructYamlTimestamp(e){var t,r,n,o,a,u,l,c=0,f=null,d,p,h;t=i.exec(e);if(t===null)t=s.exec(e);if(t===null)throw new Error("Date resolve error");r=+t[1];n=+t[2]-1;o=+t[3];if(!t[4]){return new Date(Date.UTC(r,n,o))}a=+t[4];u=+t[5];l=+t[6];if(t[7]){c=t[7].slice(0,3);while(c.length<3){c+="0"}c=+c}if(t[9]){d=+t[10];p=+(t[11]||0);f=(d*60+p)*6e4;if(t[9]==="-")f=-f}h=new Date(Date.UTC(r,n,o,a,u,l,c));if(f)h.setTime(h.getTime()-f);return h}function representYamlTimestamp(e){return e.toISOString()}e.exports=new n("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp})},8154:e=>{"use strict";var t=e.exports=function(e,t,r){if(typeof t=="function"){r=t;t={}}r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){};var i=r.post||function(){};_traverse(t,n,i,e,"",e)};t.keywords={additionalItems:true,items:true,contains:true,additionalProperties:true,propertyNames:true,not:true};t.arrayKeywords={items:true,allOf:true,anyOf:true,oneOf:true};t.propsKeywords={definitions:true,properties:true,patternProperties:true,dependencies:true};t.skipKeywords={default:true,enum:true,const:true,required:true,maximum:true,minimum:true,exclusiveMaximum:true,exclusiveMinimum:true,multipleOf:true,maxLength:true,minLength:true,pattern:true,format:true,maxItems:true,minItems:true,uniqueItems:true,maxProperties:true,minProperties:true};function _traverse(e,r,n,i,s,o,a,u,l,c){if(i&&typeof i=="object"&&!Array.isArray(i)){r(i,s,o,a,u,l,c);for(var f in i){var d=i[f];if(Array.isArray(d)){if(f in t.arrayKeywords){for(var p=0;p{t=e.exports=stringify;t.getSerialize=serializer;function stringify(e,t,r,n){return JSON.stringify(e,serializer(t,n),r)}function serializer(e,t){var r=[],n=[];if(t==null)t=function(e,t){if(r[0]===t)return"[Circular ~]";return"[Circular ~."+n.slice(0,r.indexOf(t)).join(".")+"]"};return function(i,s){if(r.length>0){var o=r.indexOf(this);~o?r.splice(o+1):r.push(this);~o?n.splice(o,Infinity,i):n.push(i);if(~r.indexOf(s))s=t.call(this,i,s)}else r.push(s);return e==null?s:e.call(this,i,s)}}},5533:(e,t,r)=>{let n;try{n=r(7765)}catch(e){n=r(7147)}const i=r(3706);const{stringify:s,stripBom:o}=r(8171);async function _readFile(e,t={}){if(typeof t==="string"){t={encoding:t}}const r=t.fs||n;const s="throws"in t?t.throws:true;let a=await i.fromCallback(r.readFile)(e,t);a=o(a);let u;try{u=JSON.parse(a,t?t.reviver:null)}catch(t){if(s){t.message=`${e}: ${t.message}`;throw t}else{return null}}return u}const a=i.fromPromise(_readFile);function readFileSync(e,t={}){if(typeof t==="string"){t={encoding:t}}const r=t.fs||n;const i="throws"in t?t.throws:true;try{let n=r.readFileSync(e,t);n=o(n);return JSON.parse(n,t.reviver)}catch(t){if(i){t.message=`${e}: ${t.message}`;throw t}else{return null}}}async function _writeFile(e,t,r={}){const o=r.fs||n;const a=s(t,r);await i.fromCallback(o.writeFile)(e,a,r)}const u=i.fromPromise(_writeFile);function writeFileSync(e,t,r={}){const i=r.fs||n;const o=s(t,r);return i.writeFileSync(e,o,r)}const l={readFile:a,readFileSync:readFileSync,writeFile:u,writeFileSync:writeFileSync};e.exports=l},8171:e=>{function stringify(e,{EOL:t="\n",finalEOL:r=true,replacer:n=null,spaces:i}={}){const s=r?t:"";const o=JSON.stringify(e,n,i);return o.replace(/\n/g,t)+s}function stripBom(e){if(Buffer.isBuffer(e))e=e.toString("utf8");return e.replace(/^\uFEFF/,"")}e.exports={stringify:stringify,stripBom:stripBom}},1296:(e,t,r)=>{"use strict";const n=r(6368);const i=Symbol("max");const s=Symbol("length");const o=Symbol("lengthCalculator");const a=Symbol("allowStale");const u=Symbol("maxAge");const l=Symbol("dispose");const c=Symbol("noDisposeOnSet");const f=Symbol("lruList");const d=Symbol("cache");const p=Symbol("updateAgeOnGet");const naiveLength=()=>1;class LRUCache{constructor(e){if(typeof e==="number")e={max:e};if(!e)e={};if(e.max&&(typeof e.max!=="number"||e.max<0))throw new TypeError("max must be a non-negative number");const t=this[i]=e.max||Infinity;const r=e.length||naiveLength;this[o]=typeof r!=="function"?naiveLength:r;this[a]=e.stale||false;if(e.maxAge&&typeof e.maxAge!=="number")throw new TypeError("maxAge must be a number");this[u]=e.maxAge||0;this[l]=e.dispose;this[c]=e.noDisposeOnSet||false;this[p]=e.updateAgeOnGet||false;this.reset()}set max(e){if(typeof e!=="number"||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||Infinity;trim(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if(typeof e!=="number")throw new TypeError("maxAge must be a non-negative number");this[u]=e;trim(this)}get maxAge(){return this[u]}set lengthCalculator(e){if(typeof e!=="function")e=naiveLength;if(e!==this[o]){this[o]=e;this[s]=0;this[f].forEach((e=>{e.length=this[o](e.value,e.key);this[s]+=e.length}))}trim(this)}get lengthCalculator(){return this[o]}get length(){return this[s]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let r=this[f].tail;r!==null;){const n=r.prev;forEachStep(this,e,r,t);r=n}}forEach(e,t){t=t||this;for(let r=this[f].head;r!==null;){const n=r.next;forEachStep(this,e,r,t);r=n}}keys(){return this[f].toArray().map((e=>e.key))}values(){return this[f].toArray().map((e=>e.value))}reset(){if(this[l]&&this[f]&&this[f].length){this[f].forEach((e=>this[l](e.key,e.value)))}this[d]=new Map;this[f]=new n;this[s]=0}dump(){return this[f].map((e=>isStale(this,e)?false:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[f]}set(e,t,r){r=r||this[u];if(r&&typeof r!=="number")throw new TypeError("maxAge must be a number");const n=r?Date.now():0;const a=this[o](t,e);if(this[d].has(e)){if(a>this[i]){del(this,this[d].get(e));return false}const o=this[d].get(e);const u=o.value;if(this[l]){if(!this[c])this[l](e,u.value)}u.now=n;u.maxAge=r;u.value=t;this[s]+=a-u.length;u.length=a;this.get(e);trim(this);return true}const p=new Entry(e,t,a,n,r);if(p.length>this[i]){if(this[l])this[l](e,t);return false}this[s]+=p.length;this[f].unshift(p);this[d].set(e,this[f].head);trim(this);return true}has(e){if(!this[d].has(e))return false;const t=this[d].get(e).value;return!isStale(this,t)}get(e){return get(this,e,true)}peek(e){return get(this,e,false)}pop(){const e=this[f].tail;if(!e)return null;del(this,e);return e.value}del(e){del(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r];const i=n.e||0;if(i===0)this.set(n.k,n.v);else{const e=i-t;if(e>0){this.set(n.k,n.v,e)}}}}prune(){this[d].forEach(((e,t)=>get(this,t,false)))}}const get=(e,t,r)=>{const n=e[d].get(t);if(n){const t=n.value;if(isStale(e,t)){del(e,n);if(!e[a])return undefined}else{if(r){if(e[p])n.value.now=Date.now();e[f].unshiftNode(n)}}return t.value}};const isStale=(e,t)=>{if(!t||!t.maxAge&&!e[u])return false;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[u]&&r>e[u]};const trim=e=>{if(e[s]>e[i]){for(let t=e[f].tail;e[s]>e[i]&&t!==null;){const r=t.prev;del(e,t);t=r}}};const del=(e,t)=>{if(t){const r=t.value;if(e[l])e[l](r.key,r.value);e[s]-=r.length;e[d].delete(r.key);e[f].removeNode(t)}};class Entry{constructor(e,t,r,n,i){this.key=e;this.value=t;this.length=r;this.now=n;this.maxAge=i||0}}const forEachStep=(e,t,r,n)=>{let i=r.value;if(isStale(e,i)){del(e,r);if(!e[a])i=undefined}if(i)t.call(n,i.value,i.key,e)};e.exports=LRUCache},401:e=>{var t=1e3;var r=t*60;var n=r*60;var i=n*24;var s=i*7;var o=i*365.25;e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0){return parse(e)}else if(r==="number"&&isFinite(e)){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a){return}var u=parseFloat(a[1]);var l=(a[2]||"ms").toLowerCase();switch(l){case"years":case"year":case"yrs":case"yr":case"y":return u*o;case"weeks":case"week":case"w":return u*s;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*n;case"minutes":case"minute":case"mins":case"min":case"m":return u*r;case"seconds":case"second":case"secs":case"sec":case"s":return u*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return undefined}}function fmtShort(e){var s=Math.abs(e);if(s>=i){return Math.round(e/i)+"d"}if(s>=n){return Math.round(e/n)+"h"}if(s>=r){return Math.round(e/r)+"m"}if(s>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var s=Math.abs(e);if(s>=i){return plural(e,s,i,"day")}if(s>=n){return plural(e,s,n,"hour")}if(s>=r){return plural(e,s,r,"minute")}if(s>=t){return plural(e,s,t,"second")}return e+" ms"}function plural(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}},8527:e=>{var t=1e3;var r=t*60;var n=r*60;var i=n*24;var s=i*7;var o=i*365.25;e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0){return parse(e)}else if(r==="number"&&isFinite(e)){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a){return}var u=parseFloat(a[1]);var l=(a[2]||"ms").toLowerCase();switch(l){case"years":case"year":case"yrs":case"yr":case"y":return u*o;case"weeks":case"week":case"w":return u*s;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*n;case"minutes":case"minute":case"mins":case"min":case"m":return u*r;case"seconds":case"second":case"secs":case"sec":case"s":return u*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return undefined}}function fmtShort(e){var s=Math.abs(e);if(s>=i){return Math.round(e/i)+"d"}if(s>=n){return Math.round(e/n)+"h"}if(s>=r){return Math.round(e/r)+"m"}if(s>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var s=Math.abs(e);if(s>=i){return plural(e,s,i,"day")}if(s>=n){return plural(e,s,n,"hour")}if(s>=r){return plural(e,s,r,"minute")}if(s>=t){return plural(e,s,t,"second")}return e+" ms"}function plural(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}},9847:(e,t,r)=>{const n=r(1596);const i=r(5021);const{EOL:s}=r(2037);const o=r(5056);e.exports.stringify=e=>n.obj(e,((e,t,r)=>{r(null,o(e)+s)}));e.exports.parse=e=>{e=e||{};e.strict=e.strict!==false;function parseRow(t){try{if(t)return JSON.parse(t)}catch(r){if(e.strict){this.emit("error",new Error("Could not parse row "+t.slice(0,50)+"..."))}}}return i(parseRow,e)}},9524:e=>{"use strict";e.exports=function(e){if(typeof e!=="string"){throw new Error("expected a string")}return e.split("\n").map(user).filter(Boolean)};function user(e,t){if(!e||!e.length||e.charAt(0)==="#"){return null}var r=e.split(":");return{username:r[0],password:r[1],uid:r[2],gid:r[3],gecos:r[4],homedir:r[5],shell:r[6]}}},614:e=>{"use strict";const t={};function createErrorType(e,r,n){if(!n){n=Error}function getMessage(e,t,n){if(typeof r==="string"){return r}else{return r(e,t,n)}}class NodeError extends n{constructor(e,t,r){super(getMessage(e,t,r))}}NodeError.prototype.name=n.name;NodeError.prototype.code=e;t[e]=NodeError}function oneOf(e,t){if(Array.isArray(e)){const r=e.length;e=e.map((e=>String(e)));if(r>2){return`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]}else if(r===2){return`one of ${t} ${e[0]} or ${e[1]}`}else{return`of ${t} ${e[0]}`}}else{return`of ${t} ${String(e)}`}}function startsWith(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function endsWith(e,t,r){if(r===undefined||r>e.length){r=e.length}return e.substring(r-t.length,r)===t}function includes(e,t,r){if(typeof r!=="number"){r=0}if(r+t.length>e.length){return false}else{return e.indexOf(t,r)!==-1}}createErrorType("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError);createErrorType("ERR_INVALID_ARG_TYPE",(function(e,t,r){let n;if(typeof t==="string"&&startsWith(t,"not ")){n="must not be";t=t.replace(/^not /,"")}else{n="must be"}let i;if(endsWith(e," argument")){i=`The ${e} ${n} ${oneOf(t,"type")}`}else{const r=includes(e,".")?"property":"argument";i=`The "${e}" ${r} ${n} ${oneOf(t,"type")}`}i+=`. Received type ${typeof r}`;return i}),TypeError);createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");createErrorType("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"}));createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close");createErrorType("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"}));createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times");createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end");createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);createErrorType("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError);createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");e.exports.q=t},3444:(e,t,r)=>{"use strict";var n=Object.keys||function(e){var t=[];for(var r in e){t.push(r)}return t};e.exports=Duplex;var i=r(7253);var s=r(3399);r(5651)(Duplex,i);{var o=n(s.prototype);for(var a=0;a{"use strict";e.exports=PassThrough;var n=r(7291);r(5651)(PassThrough,n);function PassThrough(e){if(!(this instanceof PassThrough))return new PassThrough(e);n.call(this,e)}PassThrough.prototype._transform=function(e,t,r){r(null,e)}},7253:(e,t,r)=>{"use strict";e.exports=Readable;var n;Readable.ReadableState=ReadableState;var i=r(2361).EventEmitter;var s=function EElistenerCount(e,t){return e.listeners(t).length};var o=r(7121);var a=r(4300).Buffer;var u=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return a.from(e)}function _isUint8Array(e){return a.isBuffer(e)||e instanceof u}var l=r(3837);var c;if(l&&l.debuglog){c=l.debuglog("stream")}else{c=function debug(){}}var f=r(7275);var d=r(1317);var p=r(6125),h=p.getHighWaterMark;var m=r(614).q,v=m.ERR_INVALID_ARG_TYPE,g=m.ERR_STREAM_PUSH_AFTER_EOF,y=m.ERR_METHOD_NOT_IMPLEMENTED,b=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;var S;var w;var _;r(5651)(Readable,o);var E=d.errorOrDestroy;var k=["error","close","destroy","pause","resume"];function prependListener(e,t,r){if(typeof e.prependListener==="function")return e.prependListener(t,r);if(!e._events||!e._events[t])e.on(t,r);else if(Array.isArray(e._events[t]))e._events[t].unshift(r);else e._events[t]=[r,e._events[t]]}function ReadableState(e,t,i){n=n||r(3444);e=e||{};if(typeof i!=="boolean")i=t instanceof n;this.objectMode=!!e.objectMode;if(i)this.objectMode=this.objectMode||!!e.readableObjectMode;this.highWaterMark=h(this,e,"readableHighWaterMark",i);this.buffer=new f;this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.resumeScheduled=false;this.paused=true;this.emitClose=e.emitClose!==false;this.autoDestroy=!!e.autoDestroy;this.destroyed=false;this.defaultEncoding=e.defaultEncoding||"utf8";this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(e.encoding){if(!S)S=r(9488).s;this.decoder=new S(e.encoding);this.encoding=e.encoding}}function Readable(e){n=n||r(3444);if(!(this instanceof Readable))return new Readable(e);var t=this instanceof n;this._readableState=new ReadableState(e,this,t);this.readable=true;if(e){if(typeof e.read==="function")this._read=e.read;if(typeof e.destroy==="function")this._destroy=e.destroy}o.call(this)}Object.defineProperty(Readable.prototype,"destroyed",{enumerable:false,get:function get(){if(this._readableState===undefined){return false}return this._readableState.destroyed},set:function set(e){if(!this._readableState){return}this._readableState.destroyed=e}});Readable.prototype.destroy=d.destroy;Readable.prototype._undestroy=d.undestroy;Readable.prototype._destroy=function(e,t){t(e)};Readable.prototype.push=function(e,t){var r=this._readableState;var n;if(!r.objectMode){if(typeof e==="string"){t=t||r.defaultEncoding;if(t!==r.encoding){e=a.from(e,t);t=""}n=true}}else{n=true}return readableAddChunk(this,e,t,false,n)};Readable.prototype.unshift=function(e){return readableAddChunk(this,e,null,true,false)};function readableAddChunk(e,t,r,n,i){c("readableAddChunk",t);var s=e._readableState;if(t===null){s.reading=false;onEofChunk(e,s)}else{var o;if(!i)o=chunkInvalid(s,t);if(o){E(e,o)}else if(s.objectMode||t&&t.length>0){if(typeof t!=="string"&&!s.objectMode&&Object.getPrototypeOf(t)!==a.prototype){t=_uint8ArrayToBuffer(t)}if(n){if(s.endEmitted)E(e,new b);else addChunk(e,s,t,true)}else if(s.ended){E(e,new g)}else if(s.destroyed){return false}else{s.reading=false;if(s.decoder&&!r){t=s.decoder.write(t);if(s.objectMode||t.length!==0)addChunk(e,s,t,false);else maybeReadMore(e,s)}else{addChunk(e,s,t,false)}}}else if(!n){s.reading=false;maybeReadMore(e,s)}}return!s.ended&&(s.length=P){e=P}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function howMuchToRead(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e){if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length}if(e>t.highWaterMark)t.highWaterMark=computeNewHighWaterMark(e);if(e<=t.length)return e;if(!t.ended){t.needReadable=true;return 0}return t.length}Readable.prototype.read=function(e){c("read",e);e=parseInt(e,10);var t=this._readableState;var r=e;if(e!==0)t.emittedReadable=false;if(e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended)){c("read: emitReadable",t.length,t.ended);if(t.length===0&&t.ended)endReadable(this);else emitReadable(this);return null}e=howMuchToRead(e,t);if(e===0&&t.ended){if(t.length===0)endReadable(this);return null}var n=t.needReadable;c("need readable",n);if(t.length===0||t.length-e0)i=fromList(e,t);else i=null;if(i===null){t.needReadable=t.length<=t.highWaterMark;e=0}else{t.length-=e;t.awaitDrain=0}if(t.length===0){if(!t.ended)t.needReadable=true;if(r!==e&&t.ended)endReadable(this)}if(i!==null)this.emit("data",i);return i};function onEofChunk(e,t){c("onEofChunk");if(t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length){t.buffer.push(r);t.length+=t.objectMode?1:r.length}}t.ended=true;if(t.sync){emitReadable(e)}else{t.needReadable=false;if(!t.emittedReadable){t.emittedReadable=true;emitReadable_(e)}}}function emitReadable(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable);t.needReadable=false;if(!t.emittedReadable){c("emitReadable",t.flowing);t.emittedReadable=true;process.nextTick(emitReadable_,e)}}function emitReadable_(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended);if(!t.destroyed&&(t.length||t.ended)){e.emit("readable");t.emittedReadable=false}t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark;flow(e)}function maybeReadMore(e,t){if(!t.readingMore){t.readingMore=true;process.nextTick(maybeReadMore_,e,t)}}function maybeReadMore_(e,t){while(!t.reading&&!t.ended&&(t.length1&&indexOf(n.pipes,e)!==-1)&&!u){c("false write response, pause",n.awaitDrain);n.awaitDrain++}r.pause()}}function onerror(t){c("onerror",t);unpipe();e.removeListener("error",onerror);if(s(e,"error")===0)E(e,t)}prependListener(e,"error",onerror);function onclose(){e.removeListener("finish",onfinish);unpipe()}e.once("close",onclose);function onfinish(){c("onfinish");e.removeListener("close",onclose);unpipe()}e.once("finish",onfinish);function unpipe(){c("unpipe");r.unpipe(e)}e.emit("pipe",r);if(!n.flowing){c("pipe resume");r.resume()}return e};function pipeOnDrain(e){return function pipeOnDrainFunctionResult(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain);if(t.awaitDrain)t.awaitDrain--;if(t.awaitDrain===0&&s(e,"data")){t.flowing=true;flow(e)}}}Readable.prototype.unpipe=function(e){var t=this._readableState;var r={hasUnpiped:false};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;t.pipes=null;t.pipesCount=0;t.flowing=false;if(e)e.emit("unpipe",this,r);return this}if(!e){var n=t.pipes;var i=t.pipesCount;t.pipes=null;t.pipesCount=0;t.flowing=false;for(var s=0;s0;if(n.flowing!==false)this.resume()}else if(e==="readable"){if(!n.endEmitted&&!n.readableListening){n.readableListening=n.needReadable=true;n.flowing=false;n.emittedReadable=false;c("on readable",n.length,n.reading);if(n.length){emitReadable(this)}else if(!n.reading){process.nextTick(nReadingNextTick,this)}}}return r};Readable.prototype.addListener=Readable.prototype.on;Readable.prototype.removeListener=function(e,t){var r=o.prototype.removeListener.call(this,e,t);if(e==="readable"){process.nextTick(updateReadableListening,this)}return r};Readable.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);if(e==="readable"||e===undefined){process.nextTick(updateReadableListening,this)}return t};function updateReadableListening(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0;if(t.resumeScheduled&&!t.paused){t.flowing=true}else if(e.listenerCount("data")>0){e.resume()}}function nReadingNextTick(e){c("readable nexttick read 0");e.read(0)}Readable.prototype.resume=function(){var e=this._readableState;if(!e.flowing){c("resume");e.flowing=!e.readableListening;resume(this,e)}e.paused=false;return this};function resume(e,t){if(!t.resumeScheduled){t.resumeScheduled=true;process.nextTick(resume_,e,t)}}function resume_(e,t){c("resume",t.reading);if(!t.reading){e.read(0)}t.resumeScheduled=false;e.emit("resume");flow(e);if(t.flowing&&!t.reading)e.read(0)}Readable.prototype.pause=function(){c("call pause flowing=%j",this._readableState.flowing);if(this._readableState.flowing!==false){c("pause");this._readableState.flowing=false;this.emit("pause")}this._readableState.paused=true;return this};function flow(e){var t=e._readableState;c("flow",t.flowing);while(t.flowing&&e.read()!==null){}}Readable.prototype.wrap=function(e){var t=this;var r=this._readableState;var n=false;e.on("end",(function(){c("wrapped end");if(r.decoder&&!r.ended){var e=r.decoder.end();if(e&&e.length)t.push(e)}t.push(null)}));e.on("data",(function(i){c("wrapped data");if(r.decoder)i=r.decoder.write(i);if(r.objectMode&&(i===null||i===undefined))return;else if(!r.objectMode&&(!i||!i.length))return;var s=t.push(i);if(!s){n=true;e.pause()}}));for(var i in e){if(this[i]===undefined&&typeof e[i]==="function"){this[i]=function methodWrap(t){return function methodWrapReturnFunction(){return e[t].apply(e,arguments)}}(i)}}for(var s=0;s=t.length){if(t.decoder)r=t.buffer.join("");else if(t.buffer.length===1)r=t.buffer.first();else r=t.buffer.concat(t.length);t.buffer.clear()}else{r=t.buffer.consume(e,t.decoder)}return r}function endReadable(e){var t=e._readableState;c("endReadable",t.endEmitted);if(!t.endEmitted){t.ended=true;process.nextTick(endReadableNT,t,e)}}function endReadableNT(e,t){c("endReadableNT",e.endEmitted,e.length);if(!e.endEmitted&&e.length===0){e.endEmitted=true;t.readable=false;t.emit("end");if(e.autoDestroy){var r=t._writableState;if(!r||r.autoDestroy&&r.finished){t.destroy()}}}}if(typeof Symbol==="function"){Readable.from=function(e,t){if(_===undefined){_=r(9144)}return _(Readable,e,t)}}function indexOf(e,t){for(var r=0,n=e.length;r{"use strict";e.exports=Transform;var n=r(614).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,s=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0;var u=r(3444);r(5651)(Transform,u);function afterTransform(e,t){var r=this._transformState;r.transforming=false;var n=r.writecb;if(n===null){return this.emit("error",new s)}r.writechunk=null;r.writecb=null;if(t!=null)this.push(t);n(e);var i=this._readableState;i.reading=false;if(i.needReadable||i.length{"use strict";e.exports=Writable;function WriteReq(e,t,r){this.chunk=e;this.encoding=t;this.callback=r;this.next=null}function CorkedRequest(e){var t=this;this.next=null;this.entry=null;this.finish=function(){onCorkedFinish(t,e)}}var n;Writable.WritableState=WritableState;var i={deprecate:r(5372)};var s=r(7121);var o=r(4300).Buffer;var a=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return o.from(e)}function _isUint8Array(e){return o.isBuffer(e)||e instanceof a}var u=r(1317);var l=r(6125),c=l.getHighWaterMark;var f=r(614).q,d=f.ERR_INVALID_ARG_TYPE,p=f.ERR_METHOD_NOT_IMPLEMENTED,h=f.ERR_MULTIPLE_CALLBACK,m=f.ERR_STREAM_CANNOT_PIPE,v=f.ERR_STREAM_DESTROYED,g=f.ERR_STREAM_NULL_VALUES,y=f.ERR_STREAM_WRITE_AFTER_END,b=f.ERR_UNKNOWN_ENCODING;var S=u.errorOrDestroy;r(5651)(Writable,s);function nop(){}function WritableState(e,t,i){n=n||r(3444);e=e||{};if(typeof i!=="boolean")i=t instanceof n;this.objectMode=!!e.objectMode;if(i)this.objectMode=this.objectMode||!!e.writableObjectMode;this.highWaterMark=c(this,e,"writableHighWaterMark",i);this.finalCalled=false;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;this.destroyed=false;var s=e.decodeStrings===false;this.decodeStrings=!s;this.defaultEncoding=e.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(e){onwrite(t,e)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.emitClose=e.emitClose!==false;this.autoDestroy=!!e.autoDestroy;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var e=this.bufferedRequest;var t=[];while(e){t.push(e);e=e.next}return t};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:i.deprecate((function writableStateBufferGetter(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}})();var w;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){w=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function value(e){if(w.call(this,e))return true;if(this!==Writable)return false;return e&&e._writableState instanceof WritableState}})}else{w=function realHasInstance(e){return e instanceof this}}function Writable(e){n=n||r(3444);var t=this instanceof n;if(!t&&!w.call(Writable,this))return new Writable(e);this._writableState=new WritableState(e,this,t);this.writable=true;if(e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}s.call(this)}Writable.prototype.pipe=function(){S(this,new m)};function writeAfterEnd(e,t){var r=new y;S(e,r);process.nextTick(t,r)}function validChunk(e,t,r,n){var i;if(r===null){i=new g}else if(typeof r!=="string"&&!t.objectMode){i=new d("chunk",["string","Buffer"],r)}if(i){S(e,i);process.nextTick(n,i);return false}return true}Writable.prototype.write=function(e,t,r){var n=this._writableState;var i=false;var s=!n.objectMode&&_isUint8Array(e);if(s&&!o.isBuffer(e)){e=_uint8ArrayToBuffer(e)}if(typeof t==="function"){r=t;t=null}if(s)t="buffer";else if(!t)t=n.defaultEncoding;if(typeof r!=="function")r=nop;if(n.ending)writeAfterEnd(this,r);else if(s||validChunk(this,n,e,r)){n.pendingcb++;i=writeOrBuffer(this,n,s,e,t,r)}return i};Writable.prototype.cork=function(){this._writableState.corked++};Writable.prototype.uncork=function(){var e=this._writableState;if(e.corked){e.corked--;if(!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest)clearBuffer(this,e)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(e){if(typeof e==="string")e=e.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new b(e);this._writableState.defaultEncoding=e;return this};Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:false,get:function get(){return this._writableState&&this._writableState.getBuffer()}});function decodeChunk(e,t,r){if(!e.objectMode&&e.decodeStrings!==false&&typeof t==="string"){t=o.from(t,r)}return t}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function get(){return this._writableState.highWaterMark}});function writeOrBuffer(e,t,r,n,i,s){if(!r){var o=decodeChunk(t,n,i);if(n!==o){r=true;i="buffer";n=o}}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length{"use strict";var n;function _defineProperty(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}var i=r(5617);var s=Symbol("lastResolve");var o=Symbol("lastReject");var a=Symbol("error");var u=Symbol("ended");var l=Symbol("lastPromise");var c=Symbol("handlePromise");var f=Symbol("stream");function createIterResult(e,t){return{value:e,done:t}}function readAndResolve(e){var t=e[s];if(t!==null){var r=e[f].read();if(r!==null){e[l]=null;e[s]=null;e[o]=null;t(createIterResult(r,false))}}}function onReadable(e){process.nextTick(readAndResolve,e)}function wrapForNext(e,t){return function(r,n){e.then((function(){if(t[u]){r(createIterResult(undefined,true));return}t[c](r,n)}),n)}}var d=Object.getPrototypeOf((function(){}));var p=Object.setPrototypeOf((n={get stream(){return this[f]},next:function next(){var e=this;var t=this[a];if(t!==null){return Promise.reject(t)}if(this[u]){return Promise.resolve(createIterResult(undefined,true))}if(this[f].destroyed){return new Promise((function(t,r){process.nextTick((function(){if(e[a]){r(e[a])}else{t(createIterResult(undefined,true))}}))}))}var r=this[l];var n;if(r){n=new Promise(wrapForNext(r,this))}else{var i=this[f].read();if(i!==null){return Promise.resolve(createIterResult(i,false))}n=new Promise(this[c])}this[l]=n;return n}},_defineProperty(n,Symbol.asyncIterator,(function(){return this})),_defineProperty(n,"return",(function _return(){var e=this;return new Promise((function(t,r){e[f].destroy(null,(function(e){if(e){r(e);return}t(createIterResult(undefined,true))}))}))})),n),d);var h=function createReadableStreamAsyncIterator(e){var t;var r=Object.create(p,(t={},_defineProperty(t,f,{value:e,writable:true}),_defineProperty(t,s,{value:null,writable:true}),_defineProperty(t,o,{value:null,writable:true}),_defineProperty(t,a,{value:null,writable:true}),_defineProperty(t,u,{value:e._readableState.endEmitted,writable:true}),_defineProperty(t,c,{value:function value(e,t){var n=r[f].read();if(n){r[l]=null;r[s]=null;r[o]=null;e(createIterResult(n,false))}else{r[s]=e;r[o]=t}},writable:true}),t));r[l]=null;i(e,(function(e){if(e&&e.code!=="ERR_STREAM_PREMATURE_CLOSE"){var t=r[o];if(t!==null){r[l]=null;r[s]=null;r[o]=null;t(e)}r[a]=e;return}var n=r[s];if(n!==null){r[l]=null;r[s]=null;r[o]=null;n(createIterResult(undefined,true))}r[u]=true}));e.on("readable",onReadable.bind(null,r));return r};e.exports=h},7275:(e,t,r)=>{"use strict";function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);if(t)n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}));r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t0)this.tail.next=t;else this.head=t;this.tail=t;++this.length}},{key:"unshift",value:function unshift(e){var t={data:e,next:this.head};if(this.length===0)this.tail=t;this.head=t;++this.length}},{key:"shift",value:function shift(){if(this.length===0)return;var e=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return e}},{key:"clear",value:function clear(){this.head=this.tail=null;this.length=0}},{key:"join",value:function join(e){if(this.length===0)return"";var t=this.head;var r=""+t.data;while(t=t.next){r+=e+t.data}return r}},{key:"concat",value:function concat(e){if(this.length===0)return i.alloc(0);var t=i.allocUnsafe(e>>>0);var r=this.head;var n=0;while(r){copyBuffer(r.data,t,n);n+=r.data.length;r=r.next}return t}},{key:"consume",value:function consume(e,t){var r;if(ei.length?i.length:e;if(s===i.length)n+=i;else n+=i.slice(0,e);e-=s;if(e===0){if(s===i.length){++r;if(t.next)this.head=t.next;else this.head=this.tail=null}else{this.head=t;t.data=i.slice(s)}break}++r}this.length-=r;return n}},{key:"_getBuffer",value:function _getBuffer(e){var t=i.allocUnsafe(e);var r=this.head;var n=1;r.data.copy(t);e-=r.data.length;while(r=r.next){var s=r.data;var o=e>s.length?s.length:e;s.copy(t,t.length-e,0,o);e-=o;if(e===0){if(o===s.length){++n;if(r.next)this.head=r.next;else this.head=this.tail=null}else{this.head=r;r.data=s.slice(o)}break}++n}this.length-=n;return t}},{key:a,value:function value(e,t){return o(this,_objectSpread({},t,{depth:0,customInspect:false}))}}]);return BufferList}()},1317:e=>{"use strict";function destroy(e,t){var r=this;var n=this._readableState&&this._readableState.destroyed;var i=this._writableState&&this._writableState.destroyed;if(n||i){if(t){t(e)}else if(e){if(!this._writableState){process.nextTick(emitErrorNT,this,e)}else if(!this._writableState.errorEmitted){this._writableState.errorEmitted=true;process.nextTick(emitErrorNT,this,e)}}return this}if(this._readableState){this._readableState.destroyed=true}if(this._writableState){this._writableState.destroyed=true}this._destroy(e||null,(function(e){if(!t&&e){if(!r._writableState){process.nextTick(emitErrorAndCloseNT,r,e)}else if(!r._writableState.errorEmitted){r._writableState.errorEmitted=true;process.nextTick(emitErrorAndCloseNT,r,e)}else{process.nextTick(emitCloseNT,r)}}else if(t){process.nextTick(emitCloseNT,r);t(e)}else{process.nextTick(emitCloseNT,r)}}));return this}function emitErrorAndCloseNT(e,t){emitErrorNT(e,t);emitCloseNT(e)}function emitCloseNT(e){if(e._writableState&&!e._writableState.emitClose)return;if(e._readableState&&!e._readableState.emitClose)return;e.emit("close")}function undestroy(){if(this._readableState){this._readableState.destroyed=false;this._readableState.reading=false;this._readableState.ended=false;this._readableState.endEmitted=false}if(this._writableState){this._writableState.destroyed=false;this._writableState.ended=false;this._writableState.ending=false;this._writableState.finalCalled=false;this._writableState.prefinished=false;this._writableState.finished=false;this._writableState.errorEmitted=false}}function emitErrorNT(e,t){e.emit("error",t)}function errorOrDestroy(e,t){var r=e._readableState;var n=e._writableState;if(r&&r.autoDestroy||n&&n.autoDestroy)e.destroy(t);else e.emit("error",t)}e.exports={destroy:destroy,undestroy:undestroy,errorOrDestroy:errorOrDestroy}},5617:(e,t,r)=>{"use strict";var n=r(614).q.ERR_STREAM_PREMATURE_CLOSE;function once(e){var t=false;return function(){if(t)return;t=true;for(var r=arguments.length,n=new Array(r),i=0;i{"use strict";function asyncGeneratorStep(e,t,r,n,i,s,o){try{var a=e[s](o);var u=a.value}catch(e){r(e);return}if(a.done){t(u)}else{Promise.resolve(u).then(n,i)}}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var s=e.apply(t,r);function _next(e){asyncGeneratorStep(s,n,i,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(s,n,i,_next,_throw,"throw",e)}_next(undefined)}))}}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);if(t)n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}));r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t{"use strict";var n;function once(e){var t=false;return function(){if(t)return;t=true;e.apply(void 0,arguments)}}var i=r(614).q,s=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function noop(e){if(e)throw e}function isRequest(e){return e.setHeader&&typeof e.abort==="function"}function destroyer(e,t,i,s){s=once(s);var a=false;e.on("close",(function(){a=true}));if(n===undefined)n=r(5617);n(e,{readable:t,writable:i},(function(e){if(e)return s(e);a=true;s()}));var u=false;return function(t){if(a)return;if(u)return;u=true;if(isRequest(e))return e.abort();if(typeof e.destroy==="function")return e.destroy();s(t||new o("pipe"))}}function call(e){e()}function pipe(e,t){return e.pipe(t)}function popCallback(e){if(!e.length)return noop;if(typeof e[e.length-1]!=="function")return noop;return e.pop()}function pipeline(){for(var e=arguments.length,t=new Array(e),r=0;r0;return destroyer(e,s,a,(function(e){if(!i)i=e;if(e)o.forEach(call);if(s)return;o.forEach(call);n(i)}))}));return t.reduce(pipe)}e.exports=pipeline},6125:(e,t,r)=>{"use strict";var n=r(614).q.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function getHighWaterMark(e,t,r,i){var s=highWaterMarkFrom(t,i,r);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var o=i?r:"highWaterMark";throw new n(o,s)}return Math.floor(s)}return e.objectMode?16:16*1024}e.exports={getHighWaterMark:getHighWaterMark}},7121:(e,t,r)=>{e.exports=r(2781)},3020:(e,t,r)=>{var n=r(2781);if(process.env.READABLE_STREAM==="disable"&&n){e.exports=n.Readable;Object.assign(e.exports,n);e.exports.Stream=n}else{t=e.exports=r(7253);t.Stream=n||t;t.Readable=t;t.Writable=r(3399);t.Duplex=r(3444);t.Transform=r(7291);t.PassThrough=r(7712);t.finished=r(5617);t.pipeline=r(6481)}},2683:(e,t,r)=>{ -/*! safe-buffer. MIT License. Feross Aboukhadijeh */ -var n=r(4300);var i=n.Buffer;function copyProps(e,t){for(var r in e){t[r]=e[r]}}if(i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow){e.exports=n}else{copyProps(n,t);t.Buffer=SafeBuffer}function SafeBuffer(e,t,r){return i(e,t,r)}SafeBuffer.prototype=Object.create(i.prototype);copyProps(i,SafeBuffer);SafeBuffer.from=function(e,t,r){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return i(e,t,r)};SafeBuffer.alloc=function(e,t,r){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var n=i(e);if(t!==undefined){if(typeof r==="string"){n.fill(t,r)}else{n.fill(t)}}else{n.fill(0)}return n};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return i(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n.SlowBuffer(e)}},8795:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(4105);const i=4096;const s="utf8";class SmartBuffer{constructor(e){this.length=0;this._encoding=s;this._writeOffset=0;this._readOffset=0;if(SmartBuffer.isSmartBufferOptions(e)){if(e.encoding){n.checkEncoding(e.encoding);this._encoding=e.encoding}if(e.size){if(n.isFiniteInteger(e.size)&&e.size>0){this._buff=Buffer.allocUnsafe(e.size)}else{throw new Error(n.ERRORS.INVALID_SMARTBUFFER_SIZE)}}else if(e.buff){if(Buffer.isBuffer(e.buff)){this._buff=e.buff;this.length=e.buff.length}else{throw new Error(n.ERRORS.INVALID_SMARTBUFFER_BUFFER)}}else{this._buff=Buffer.allocUnsafe(i)}}else{if(typeof e!=="undefined"){throw new Error(n.ERRORS.INVALID_SMARTBUFFER_OBJECT)}this._buff=Buffer.allocUnsafe(i)}}static fromSize(e,t){return new this({size:e,encoding:t})}static fromBuffer(e,t){return new this({buff:e,encoding:t})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){const t=e;return t&&(t.encoding!==undefined||t.size!==undefined||t.buff!==undefined)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffer.prototype.readInt32BE,4,e)}readInt32LE(e){return this._readNumberValue(Buffer.prototype.readInt32LE,4,e)}readBigInt64BE(e){n.bigIntAndBufferInt64Check("readBigInt64BE");return this._readNumberValue(Buffer.prototype.readBigInt64BE,8,e)}readBigInt64LE(e){n.bigIntAndBufferInt64Check("readBigInt64LE");return this._readNumberValue(Buffer.prototype.readBigInt64LE,8,e)}writeInt8(e,t){this._writeNumberValue(Buffer.prototype.writeInt8,1,e,t);return this}insertInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeInt8,1,e,t)}writeInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}insertInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}writeInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}insertInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}writeInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}insertInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}writeInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}insertInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}writeBigInt64BE(e,t){n.bigIntAndBufferInt64Check("writeBigInt64BE");return this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}insertBigInt64BE(e,t){n.bigIntAndBufferInt64Check("writeBigInt64BE");return this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}writeBigInt64LE(e,t){n.bigIntAndBufferInt64Check("writeBigInt64LE");return this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,e,t)}insertBigInt64LE(e,t){n.bigIntAndBufferInt64Check("writeBigInt64LE");return this._insertNumberValue(Buffer.prototype.writeBigInt64LE,8,e,t)}readUInt8(e){return this._readNumberValue(Buffer.prototype.readUInt8,1,e)}readUInt16BE(e){return this._readNumberValue(Buffer.prototype.readUInt16BE,2,e)}readUInt16LE(e){return this._readNumberValue(Buffer.prototype.readUInt16LE,2,e)}readUInt32BE(e){return this._readNumberValue(Buffer.prototype.readUInt32BE,4,e)}readUInt32LE(e){return this._readNumberValue(Buffer.prototype.readUInt32LE,4,e)}readBigUInt64BE(e){n.bigIntAndBufferInt64Check("readBigUInt64BE");return this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,e)}readBigUInt64LE(e){n.bigIntAndBufferInt64Check("readBigUInt64LE");return this._readNumberValue(Buffer.prototype.readBigUInt64LE,8,e)}writeUInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt8,1,e,t)}insertUInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt8,1,e,t)}writeUInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}insertUInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}writeUInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}insertUInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}writeUInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}insertUInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}writeUInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}insertUInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}writeBigUInt64BE(e,t){n.bigIntAndBufferInt64Check("writeBigUInt64BE");return this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,t)}insertBigUInt64BE(e,t){n.bigIntAndBufferInt64Check("writeBigUInt64BE");return this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,t)}writeBigUInt64LE(e,t){n.bigIntAndBufferInt64Check("writeBigUInt64LE");return this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,t)}insertBigUInt64LE(e,t){n.bigIntAndBufferInt64Check("writeBigUInt64LE");return this._insertNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,t)}readFloatBE(e){return this._readNumberValue(Buffer.prototype.readFloatBE,4,e)}readFloatLE(e){return this._readNumberValue(Buffer.prototype.readFloatLE,4,e)}writeFloatBE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}insertFloatBE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}writeFloatLE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}insertFloatLE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}readDoubleBE(e){return this._readNumberValue(Buffer.prototype.readDoubleBE,8,e)}readDoubleLE(e){return this._readNumberValue(Buffer.prototype.readDoubleLE,8,e)}writeDoubleBE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}insertDoubleBE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}writeDoubleLE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}insertDoubleLE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}readString(e,t){let r;if(typeof e==="number"){n.checkLengthValue(e);r=Math.min(e,this.length-this._readOffset)}else{t=e;r=this.length-this._readOffset}if(typeof t!=="undefined"){n.checkEncoding(t)}const i=this._buff.slice(this._readOffset,this._readOffset+r).toString(t||this._encoding);this._readOffset+=r;return i}insertString(e,t,r){n.checkOffsetValue(t);return this._handleString(e,true,t,r)}writeString(e,t,r){return this._handleString(e,false,t,r)}readStringNT(e){if(typeof e!=="undefined"){n.checkEncoding(e)}let t=this.length;for(let e=this._readOffset;ethis.length){throw new Error(n.ERRORS.INVALID_READ_BEYOND_BOUNDS)}}ensureInsertable(e,t){n.checkOffsetValue(t);this._ensureCapacity(this.length+e);if(tthis.length){this.length=t+e}else{this.length+=e}}_ensureWriteable(e,t){const r=typeof t==="number"?t:this._writeOffset;this._ensureCapacity(r+e);if(r+e>this.length){this.length=r+e}}_ensureCapacity(e){const t=this._buff.length;if(e>t){let r=this._buff;let n=t*3/2+1;if(n{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(4300);const i={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};t.ERRORS=i;function checkEncoding(e){if(!n.Buffer.isEncoding(e)){throw new Error(i.INVALID_ENCODING)}}t.checkEncoding=checkEncoding;function isFiniteInteger(e){return typeof e==="number"&&isFinite(e)&&isInteger(e)}t.isFiniteInteger=isFiniteInteger;function checkOffsetOrLengthValue(e,t){if(typeof e==="number"){if(!isFiniteInteger(e)||e<0){throw new Error(t?i.INVALID_OFFSET:i.INVALID_LENGTH)}}else{throw new Error(t?i.INVALID_OFFSET_NON_NUMBER:i.INVALID_LENGTH_NON_NUMBER)}}function checkLengthValue(e){checkOffsetOrLengthValue(e,false)}t.checkLengthValue=checkLengthValue;function checkOffsetValue(e){checkOffsetOrLengthValue(e,true)}t.checkOffsetValue=checkOffsetValue;function checkTargetOffset(e,t){if(e<0||e>t.length){throw new Error(i.INVALID_TARGET_OFFSET)}}t.checkTargetOffset=checkTargetOffset;function isInteger(e){return typeof e==="number"&&isFinite(e)&&Math.floor(e)===e}function bigIntAndBufferInt64Check(e){if(typeof BigInt==="undefined"){throw new Error("Platform does not support JS BigInt type.")}if(typeof n.Buffer.prototype[e]==="undefined"){throw new Error(`Platform does not support Buffer.prototype.${e}.`)}}t.bigIntAndBufferInt64Check=bigIntAndBufferInt64Check},8345:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const s=i(r(9523));const o=i(r(4404));const a=i(r(7310));const u=i(r(5598));const l=r(5689);const c=r(8003);const f=u.default("socks-proxy-agent");function dnsLookup(e){return new Promise(((t,r)=>{s.default.lookup(e,((e,n)=>{if(e){r(e)}else{t(n)}}))}))}function parseSocksProxy(e){let t=0;let r=false;let n=5;const i=e.hostname||e.host;if(!i){throw new TypeError('No "host"')}if(typeof e.port==="number"){t=e.port}else if(typeof e.port==="string"){t=parseInt(e.port,10)}if(!t){t=1080}if(e.protocol){switch(e.protocol.replace(":","")){case"socks4":r=true;case"socks4a":n=4;break;case"socks5":r=true;case"socks":case"socks5h":n=5;break;default:throw new TypeError(`A "socks" protocol must be specified! Got: ${e.protocol}`)}}if(typeof e.type!=="undefined"){if(e.type===4||e.type===5){n=e.type}else{throw new TypeError(`"type" must be 4 or 5, got: ${e.type}`)}}const s={host:i,port:t,type:n};let o=e.userId||e.username;let a=e.password;if(e.auth){const t=e.auth.split(":");o=t[0];a=t[1]}if(o){Object.defineProperty(s,"userId",{value:o,enumerable:false})}if(a){Object.defineProperty(s,"password",{value:a,enumerable:false})}return{lookup:r,proxy:s}}class SocksProxyAgent extends l.Agent{constructor(e){let t;if(typeof e==="string"){t=a.default.parse(e)}else{t=e}if(!t){throw new TypeError("a SOCKS proxy server `host` and `port` must be specified!")}super(t);const r=parseSocksProxy(t);this.lookup=r.lookup;this.proxy=r.proxy;this.tlsConnectionOptions=t.tls||{}}callback(e,t){return n(this,void 0,void 0,(function*(){const{lookup:e,proxy:r}=this;let{host:n,port:i,timeout:s}=t;if(!n){throw new Error("No `host` defined!")}if(e){n=yield dnsLookup(n)}const a={proxy:r,destination:{host:n,port:i},command:"connect",timeout:s};f("Creating socks proxy connection: %o",a);const{socket:u}=yield c.SocksClient.createConnection(a);f("Successfully created socks proxy connection");if(t.secureEndpoint){f("Upgrading socket connection to TLS");const e=t.servername||t.host;return o.default.connect(Object.assign(Object.assign(Object.assign({},omit(t,"host","hostname","path","port")),{socket:u,servername:e}),this.tlsConnectionOptions))}return u}))}}t["default"]=SocksProxyAgent;function omit(e,...t){const r={};let n;for(n in e){if(!t.includes(n)){r[n]=e[n]}}return r}},329:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const i=n(r(8345));function createSocksProxyAgent(e){return new i.default(e)}(function(e){e.SocksProxyAgent=i.default;e.prototype=i.default.prototype})(createSocksProxyAgent||(createSocksProxyAgent={}));e.exports=createSocksProxyAgent},9054:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.SocksClientError=t.SocksClient=void 0;const i=r(2361);const s=r(1808);const o=r(9316);const a=r(8795);const u=r(2739);const l=r(6515);const c=r(7222);const f=r(5369);Object.defineProperty(t,"SocksClientError",{enumerable:true,get:function(){return f.SocksClientError}});class SocksClient extends i.EventEmitter{constructor(e){super();this.options=Object.assign({},e);(0,l.validateSocksClientOptions)(e);this.setState(u.SocksClientState.Created)}static createConnection(e,t){return new Promise(((r,n)=>{try{(0,l.validateSocksClientOptions)(e,["connect"])}catch(e){if(typeof t==="function"){t(e);return r(e)}else{return n(e)}}const i=new SocksClient(e);i.connect(e.existing_socket);i.once("established",(e=>{i.removeAllListeners();if(typeof t==="function"){t(null,e);r(e)}else{r(e)}}));i.once("error",(e=>{i.removeAllListeners();if(typeof t==="function"){t(e);r(e)}else{n(e)}}))}))}static createConnectionChain(e,t){return new Promise(((r,i)=>n(this,void 0,void 0,(function*(){try{(0,l.validateSocksClientChainOptions)(e)}catch(e){if(typeof t==="function"){t(e);return r(e)}else{return i(e)}}let n;if(e.randomizeChain){(0,f.shuffleArray)(e.proxies)}try{for(let t=0;tthis.onDataReceivedHandler(e);this.onClose=()=>this.onCloseHandler();this.onError=e=>this.onErrorHandler(e);this.onConnect=()=>this.onConnectHandler();const t=setTimeout((()=>this.onEstablishedTimeout()),this.options.timeout||u.DEFAULT_TIMEOUT);if(t.unref&&typeof t.unref==="function"){t.unref()}if(e){this.socket=e}else{this.socket=new s.Socket}this.socket.once("close",this.onClose);this.socket.once("error",this.onError);this.socket.once("connect",this.onConnect);this.socket.on("data",this.onDataReceived);this.setState(u.SocksClientState.Connecting);this.receiveBuffer=new c.ReceiveBuffer;if(e){this.socket.emit("connect")}else{this.socket.connect(this.getSocketOptions());if(this.options.set_tcp_nodelay!==undefined&&this.options.set_tcp_nodelay!==null){this.socket.setNoDelay(!!this.options.set_tcp_nodelay)}}this.prependOnceListener("established",(e=>{setImmediate((()=>{if(this.receiveBuffer.length>0){const t=this.receiveBuffer.get(this.receiveBuffer.length);e.socket.emit("data",t)}e.socket.resume()}))}))}getSocketOptions(){return Object.assign(Object.assign({},this.options.socket_options),{host:this.options.proxy.host||this.options.proxy.ipaddress,port:this.options.proxy.port})}onEstablishedTimeout(){if(this.state!==u.SocksClientState.Established&&this.state!==u.SocksClientState.BoundWaitingForConnection){this.closeSocket(u.ERRORS.ProxyConnectionTimedOut)}}onConnectHandler(){this.setState(u.SocksClientState.Connected);if(this.options.proxy.type===4){this.sendSocks4InitialHandshake()}else{this.sendSocks5InitialHandshake()}this.setState(u.SocksClientState.SentInitialHandshake)}onDataReceivedHandler(e){this.receiveBuffer.append(e);this.processData()}processData(){while(this.state!==u.SocksClientState.Established&&this.state!==u.SocksClientState.Error&&this.receiveBuffer.length>=this.nextRequiredPacketBufferSize){if(this.state===u.SocksClientState.SentInitialHandshake){if(this.options.proxy.type===4){this.handleSocks4FinalHandshakeResponse()}else{this.handleInitialSocks5HandshakeResponse()}}else if(this.state===u.SocksClientState.SentAuthentication){this.handleInitialSocks5AuthenticationHandshakeResponse()}else if(this.state===u.SocksClientState.SentFinalHandshake){this.handleSocks5FinalHandshakeResponse()}else if(this.state===u.SocksClientState.BoundWaitingForConnection){if(this.options.proxy.type===4){this.handleSocks4IncomingConnectionResponse()}else{this.handleSocks5IncomingConnectionResponse()}}else{this.closeSocket(u.ERRORS.InternalError);break}}}onCloseHandler(){this.closeSocket(u.ERRORS.SocketClosed)}onErrorHandler(e){this.closeSocket(e.message)}removeInternalSocketHandlers(){this.socket.pause();this.socket.removeListener("data",this.onDataReceived);this.socket.removeListener("close",this.onClose);this.socket.removeListener("error",this.onError);this.socket.removeListener("connect",this.onConnect)}closeSocket(e){if(this.state!==u.SocksClientState.Error){this.setState(u.SocksClientState.Error);this.socket.destroy();this.removeInternalSocketHandlers();this.emit("error",new f.SocksClientError(e,this.options))}}sendSocks4InitialHandshake(){const e=this.options.proxy.userId||"";const t=new a.SmartBuffer;t.writeUInt8(4);t.writeUInt8(u.SocksCommand[this.options.command]);t.writeUInt16BE(this.options.destination.port);if(s.isIPv4(this.options.destination.host)){t.writeBuffer(o.toBuffer(this.options.destination.host));t.writeStringNT(e)}else{t.writeUInt8(0);t.writeUInt8(0);t.writeUInt8(0);t.writeUInt8(1);t.writeStringNT(e);t.writeStringNT(this.options.destination.host)}this.nextRequiredPacketBufferSize=u.SOCKS_INCOMING_PACKET_SIZES.Socks4Response;this.socket.write(t.toBuffer())}handleSocks4FinalHandshakeResponse(){const e=this.receiveBuffer.get(8);if(e[1]!==u.Socks4Response.Granted){this.closeSocket(`${u.ERRORS.Socks4ProxyRejectedConnection} - (${u.Socks4Response[e[1]]})`)}else{if(u.SocksCommand[this.options.command]===u.SocksCommand.bind){const t=a.SmartBuffer.fromBuffer(e);t.readOffset=2;const r={port:t.readUInt16BE(),host:o.fromLong(t.readUInt32BE())};if(r.host==="0.0.0.0"){r.host=this.options.proxy.ipaddress}this.setState(u.SocksClientState.BoundWaitingForConnection);this.emit("bound",{remoteHost:r,socket:this.socket})}else{this.setState(u.SocksClientState.Established);this.removeInternalSocketHandlers();this.emit("established",{socket:this.socket})}}}handleSocks4IncomingConnectionResponse(){const e=this.receiveBuffer.get(8);if(e[1]!==u.Socks4Response.Granted){this.closeSocket(`${u.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${u.Socks4Response[e[1]]})`)}else{const t=a.SmartBuffer.fromBuffer(e);t.readOffset=2;const r={port:t.readUInt16BE(),host:o.fromLong(t.readUInt32BE())};this.setState(u.SocksClientState.Established);this.removeInternalSocketHandlers();this.emit("established",{remoteHost:r,socket:this.socket})}}sendSocks5InitialHandshake(){const e=new a.SmartBuffer;const t=[u.Socks5Auth.NoAuth];if(this.options.proxy.userId||this.options.proxy.password){t.push(u.Socks5Auth.UserPass)}if(this.options.proxy.custom_auth_method!==undefined){t.push(this.options.proxy.custom_auth_method)}e.writeUInt8(5);e.writeUInt8(t.length);for(const r of t){e.writeUInt8(r)}this.nextRequiredPacketBufferSize=u.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse;this.socket.write(e.toBuffer());this.setState(u.SocksClientState.SentInitialHandshake)}handleInitialSocks5HandshakeResponse(){const e=this.receiveBuffer.get(2);if(e[0]!==5){this.closeSocket(u.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion)}else if(e[1]===u.SOCKS5_NO_ACCEPTABLE_AUTH){this.closeSocket(u.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType)}else{if(e[1]===u.Socks5Auth.NoAuth){this.socks5ChosenAuthType=u.Socks5Auth.NoAuth;this.sendSocks5CommandRequest()}else if(e[1]===u.Socks5Auth.UserPass){this.socks5ChosenAuthType=u.Socks5Auth.UserPass;this.sendSocks5UserPassAuthentication()}else if(e[1]===this.options.proxy.custom_auth_method){this.socks5ChosenAuthType=this.options.proxy.custom_auth_method;this.sendSocks5CustomAuthentication()}else{this.closeSocket(u.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType)}}}sendSocks5UserPassAuthentication(){const e=this.options.proxy.userId||"";const t=this.options.proxy.password||"";const r=new a.SmartBuffer;r.writeUInt8(1);r.writeUInt8(Buffer.byteLength(e));r.writeString(e);r.writeUInt8(Buffer.byteLength(t));r.writeString(t);this.nextRequiredPacketBufferSize=u.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse;this.socket.write(r.toBuffer());this.setState(u.SocksClientState.SentAuthentication)}sendSocks5CustomAuthentication(){return n(this,void 0,void 0,(function*(){this.nextRequiredPacketBufferSize=this.options.proxy.custom_auth_response_size;this.socket.write(yield this.options.proxy.custom_auth_request_handler());this.setState(u.SocksClientState.SentAuthentication)}))}handleSocks5CustomAuthHandshakeResponse(e){return n(this,void 0,void 0,(function*(){return yield this.options.proxy.custom_auth_response_handler(e)}))}handleSocks5AuthenticationNoAuthHandshakeResponse(e){return n(this,void 0,void 0,(function*(){return e[1]===0}))}handleSocks5AuthenticationUserPassHandshakeResponse(e){return n(this,void 0,void 0,(function*(){return e[1]===0}))}handleInitialSocks5AuthenticationHandshakeResponse(){return n(this,void 0,void 0,(function*(){this.setState(u.SocksClientState.ReceivedAuthenticationResponse);let e=false;if(this.socks5ChosenAuthType===u.Socks5Auth.NoAuth){e=yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2))}else if(this.socks5ChosenAuthType===u.Socks5Auth.UserPass){e=yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2))}else if(this.socks5ChosenAuthType===this.options.proxy.custom_auth_method){e=yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size))}if(!e){this.closeSocket(u.ERRORS.Socks5AuthenticationFailed)}else{this.sendSocks5CommandRequest()}}))}sendSocks5CommandRequest(){const e=new a.SmartBuffer;e.writeUInt8(5);e.writeUInt8(u.SocksCommand[this.options.command]);e.writeUInt8(0);if(s.isIPv4(this.options.destination.host)){e.writeUInt8(u.Socks5HostType.IPv4);e.writeBuffer(o.toBuffer(this.options.destination.host))}else if(s.isIPv6(this.options.destination.host)){e.writeUInt8(u.Socks5HostType.IPv6);e.writeBuffer(o.toBuffer(this.options.destination.host))}else{e.writeUInt8(u.Socks5HostType.Hostname);e.writeUInt8(this.options.destination.host.length);e.writeString(this.options.destination.host)}e.writeUInt16BE(this.options.destination.port);this.nextRequiredPacketBufferSize=u.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader;this.socket.write(e.toBuffer());this.setState(u.SocksClientState.SentFinalHandshake)}handleSocks5FinalHandshakeResponse(){const e=this.receiveBuffer.peek(5);if(e[0]!==5||e[1]!==u.Socks5Response.Granted){this.closeSocket(`${u.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${u.Socks5Response[e[1]]}`)}else{const t=e[3];let r;let n;if(t===u.Socks5HostType.IPv4){const e=u.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SOCKS5_NO_ACCEPTABLE_AUTH=t.SOCKS5_CUSTOM_AUTH_END=t.SOCKS5_CUSTOM_AUTH_START=t.SOCKS_INCOMING_PACKET_SIZES=t.SocksClientState=t.Socks5Response=t.Socks5HostType=t.Socks5Auth=t.Socks4Response=t.SocksCommand=t.ERRORS=t.DEFAULT_TIMEOUT=void 0;const r=3e4;t.DEFAULT_TIMEOUT=r;const n={InvalidSocksCommand:"An invalid SOCKS command was provided. Valid options are connect, bind, and associate.",InvalidSocksCommandForOperation:"An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.",InvalidSocksCommandChain:"An invalid SOCKS command was provided. Chaining currently only supports the connect command.",InvalidSocksClientOptionsDestination:"An invalid destination host was provided.",InvalidSocksClientOptionsExistingSocket:"An invalid existing socket was provided. This should be an instance of stream.Duplex.",InvalidSocksClientOptionsProxy:"Invalid SOCKS proxy details were provided.",InvalidSocksClientOptionsTimeout:"An invalid timeout value was provided. Please enter a value above 0 (in ms).",InvalidSocksClientOptionsProxiesLength:"At least two socks proxies must be provided for chaining.",InvalidSocksClientOptionsCustomAuthRange:"Custom auth must be a value between 0x80 and 0xFE.",InvalidSocksClientOptionsCustomAuthOptions:"When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.",NegotiationError:"Negotiation error",SocketClosed:"Socket closed",ProxyConnectionTimedOut:"Proxy connection timed out",InternalError:"SocksClient internal error (this should not happen)",InvalidSocks4HandshakeResponse:"Received invalid Socks4 handshake response",Socks4ProxyRejectedConnection:"Socks4 Proxy rejected connection",InvalidSocks4IncomingConnectionResponse:"Socks4 invalid incoming connection response",Socks4ProxyRejectedIncomingBoundConnection:"Socks4 Proxy rejected incoming bound connection",InvalidSocks5InitialHandshakeResponse:"Received invalid Socks5 initial handshake response",InvalidSocks5IntiailHandshakeSocksVersion:"Received invalid Socks5 initial handshake (invalid socks version)",InvalidSocks5InitialHandshakeNoAcceptedAuthType:"Received invalid Socks5 initial handshake (no accepted authentication type)",InvalidSocks5InitialHandshakeUnknownAuthType:"Received invalid Socks5 initial handshake (unknown authentication type)",Socks5AuthenticationFailed:"Socks5 Authentication failed",InvalidSocks5FinalHandshake:"Received invalid Socks5 final handshake response",InvalidSocks5FinalHandshakeRejected:"Socks5 proxy rejected connection",InvalidSocks5IncomingConnectionResponse:"Received invalid Socks5 incoming connection response",Socks5ProxyRejectedIncomingBoundConnection:"Socks5 Proxy rejected incoming bound connection"};t.ERRORS=n;const i={Socks5InitialHandshakeResponse:2,Socks5UserPassAuthenticationResponse:2,Socks5ResponseHeader:5,Socks5ResponseIPv4:10,Socks5ResponseIPv6:22,Socks5ResponseHostname:e=>e+7,Socks4Response:8};t.SOCKS_INCOMING_PACKET_SIZES=i;var s;(function(e){e[e["connect"]=1]="connect";e[e["bind"]=2]="bind";e[e["associate"]=3]="associate"})(s||(s={}));t.SocksCommand=s;var o;(function(e){e[e["Granted"]=90]="Granted";e[e["Failed"]=91]="Failed";e[e["Rejected"]=92]="Rejected";e[e["RejectedIdent"]=93]="RejectedIdent"})(o||(o={}));t.Socks4Response=o;var a;(function(e){e[e["NoAuth"]=0]="NoAuth";e[e["GSSApi"]=1]="GSSApi";e[e["UserPass"]=2]="UserPass"})(a||(a={}));t.Socks5Auth=a;const u=128;t.SOCKS5_CUSTOM_AUTH_START=u;const l=254;t.SOCKS5_CUSTOM_AUTH_END=l;const c=255;t.SOCKS5_NO_ACCEPTABLE_AUTH=c;var f;(function(e){e[e["Granted"]=0]="Granted";e[e["Failure"]=1]="Failure";e[e["NotAllowed"]=2]="NotAllowed";e[e["NetworkUnreachable"]=3]="NetworkUnreachable";e[e["HostUnreachable"]=4]="HostUnreachable";e[e["ConnectionRefused"]=5]="ConnectionRefused";e[e["TTLExpired"]=6]="TTLExpired";e[e["CommandNotSupported"]=7]="CommandNotSupported";e[e["AddressNotSupported"]=8]="AddressNotSupported"})(f||(f={}));t.Socks5Response=f;var d;(function(e){e[e["IPv4"]=1]="IPv4";e[e["Hostname"]=3]="Hostname";e[e["IPv6"]=4]="IPv6"})(d||(d={}));t.Socks5HostType=d;var p;(function(e){e[e["Created"]=0]="Created";e[e["Connecting"]=1]="Connecting";e[e["Connected"]=2]="Connected";e[e["SentInitialHandshake"]=3]="SentInitialHandshake";e[e["ReceivedInitialHandshakeResponse"]=4]="ReceivedInitialHandshakeResponse";e[e["SentAuthentication"]=5]="SentAuthentication";e[e["ReceivedAuthenticationResponse"]=6]="ReceivedAuthenticationResponse";e[e["SentFinalHandshake"]=7]="SentFinalHandshake";e[e["ReceivedFinalResponse"]=8]="ReceivedFinalResponse";e[e["BoundWaitingForConnection"]=9]="BoundWaitingForConnection";e[e["Established"]=10]="Established";e[e["Disconnected"]=11]="Disconnected";e[e["Error"]=99]="Error"})(p||(p={}));t.SocksClientState=p},6515:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.validateSocksClientChainOptions=t.validateSocksClientOptions=void 0;const n=r(5369);const i=r(2739);const s=r(2781);function validateSocksClientOptions(e,t=["connect","bind","associate"]){if(!i.SocksCommand[e.command]){throw new n.SocksClientError(i.ERRORS.InvalidSocksCommand,e)}if(t.indexOf(e.command)===-1){throw new n.SocksClientError(i.ERRORS.InvalidSocksCommandForOperation,e)}if(!isValidSocksRemoteHost(e.destination)){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsDestination,e)}if(!isValidSocksProxy(e.proxy)){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsProxy,e)}validateCustomProxyAuth(e.proxy,e);if(e.timeout&&!isValidTimeoutValue(e.timeout)){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsTimeout,e)}if(e.existing_socket&&!(e.existing_socket instanceof s.Duplex)){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsExistingSocket,e)}}t.validateSocksClientOptions=validateSocksClientOptions;function validateSocksClientChainOptions(e){if(e.command!=="connect"){throw new n.SocksClientError(i.ERRORS.InvalidSocksCommandChain,e)}if(!isValidSocksRemoteHost(e.destination)){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsDestination,e)}if(!(e.proxies&&Array.isArray(e.proxies)&&e.proxies.length>=2)){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsProxiesLength,e)}e.proxies.forEach((t=>{if(!isValidSocksProxy(t)){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsProxy,e)}validateCustomProxyAuth(t,e)}));if(e.timeout&&!isValidTimeoutValue(e.timeout)){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsTimeout,e)}}t.validateSocksClientChainOptions=validateSocksClientChainOptions;function validateCustomProxyAuth(e,t){if(e.custom_auth_method!==undefined){if(e.custom_auth_methodi.SOCKS5_CUSTOM_AUTH_END){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsCustomAuthRange,t)}if(e.custom_auth_request_handler===undefined||typeof e.custom_auth_request_handler!=="function"){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,t)}if(e.custom_auth_response_size===undefined){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,t)}if(e.custom_auth_response_handler===undefined||typeof e.custom_auth_response_handler!=="function"){throw new n.SocksClientError(i.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,t)}}}function isValidSocksRemoteHost(e){return e&&typeof e.host==="string"&&typeof e.port==="number"&&e.port>=0&&e.port<=65535}function isValidSocksProxy(e){return e&&(typeof e.host==="string"||typeof e.ipaddress==="string")&&typeof e.port==="number"&&e.port>=0&&e.port<=65535&&(e.type===4||e.type===5)}function isValidTimeoutValue(e){return typeof e==="number"&&e>0}},7222:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ReceiveBuffer=void 0;class ReceiveBuffer{constructor(e=4096){this.buffer=Buffer.allocUnsafe(e);this.offset=0;this.originalSize=e}get length(){return this.offset}append(e){if(!Buffer.isBuffer(e)){throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.")}if(this.offset+e.length>=this.buffer.length){const t=this.buffer;this.buffer=Buffer.allocUnsafe(Math.max(this.buffer.length+this.originalSize,this.buffer.length+e.length));t.copy(this.buffer)}e.copy(this.buffer,this.offset);return this.offset+=e.length}peek(e){if(e>this.offset){throw new Error("Attempted to read beyond the bounds of the managed internal data.")}return this.buffer.slice(0,e)}get(e){if(e>this.offset){throw new Error("Attempted to read beyond the bounds of the managed internal data.")}const t=Buffer.allocUnsafe(e);this.buffer.slice(0,e).copy(t);this.buffer.copyWithin(0,e,e+this.offset-e);this.offset-=e;return t}}t.ReceiveBuffer=ReceiveBuffer},5369:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.shuffleArray=t.SocksClientError=void 0;class SocksClientError extends Error{constructor(e,t){super(e);this.options=t}}t.SocksClientError=SocksClientError;function shuffleArray(e){for(let t=e.length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1));[e[t],e[r]]=[e[r],e[t]]}}t.shuffleArray=shuffleArray},8003:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});i(r(9054),t)},5021:(e,t,r)=>{"use strict";const{Transform:n}=r(3020);const{StringDecoder:i}=r(1576);const s=Symbol("last");const o=Symbol("decoder");function transform(e,t,r){var n;if(this.overflow){var i=this[o].write(e);n=i.split(this.matcher);if(n.length===1)return r();n.shift();this.overflow=false}else{this[s]+=this[o].write(e);n=this[s].split(this.matcher)}this[s]=n.pop();for(var a=0;athis.maxLength;if(this.overflow&&!this.skipOverflow)return r(new Error("maximum buffer reached"));r()}function flush(e){this[s]+=this[o].end();if(this[s]){try{push(this,this.mapper(this[s]))}catch(t){return e(t)}}e()}function push(e,t){if(t!==undefined){e.push(t)}}function noop(e){return e}function split(e,t,r){e=e||/\r?\n/;t=t||noop;r=r||{};switch(arguments.length){case 1:if(typeof e==="function"){t=e;e=/\r?\n/}else if(typeof e==="object"&&!(e instanceof RegExp)){r=e;e=/\r?\n/}break;case 2:if(typeof e==="function"){r=t;t=e;e=/\r?\n/}else if(typeof t==="object"){r=t;t=noop}}r=Object.assign({},r);r.transform=transform;r.flush=flush;r.readableObjectMode=true;const a=new n(r);a[s]="";a[o]=new i("utf8");a.matcher=e;a.mapper=t;a.maxLength=r.maxLength;a.skipOverflow=r.skipOverflow;a.overflow=false;return a}e.exports=split},9488:(e,t,r)=>{"use strict";var n=r(2683).Buffer;var i=n.isEncoding||function(e){e=""+e;switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function _normalizeEncoding(e){if(!e)return"utf8";var t;while(true){switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase();t=true}}}function normalizeEncoding(e){var t=_normalizeEncoding(e);if(typeof t!=="string"&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}t.s=StringDecoder;function StringDecoder(e){this.encoding=normalizeEncoding(e);var t;switch(this.encoding){case"utf16le":this.text=utf16Text;this.end=utf16End;t=4;break;case"utf8":this.fillLast=utf8FillLast;t=4;break;case"base64":this.text=base64Text;this.end=base64End;t=3;break;default:this.write=simpleWrite;this.end=simpleEnd;return}this.lastNeed=0;this.lastTotal=0;this.lastChar=n.allocUnsafe(t)}StringDecoder.prototype.write=function(e){if(e.length===0)return"";var t;var r;if(this.lastNeed){t=this.fillLast(e);if(t===undefined)return"";r=this.lastNeed;this.lastNeed=0}else{r=0}if(r>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function utf8CheckIncomplete(e,t,r){var n=t.length-1;if(n=0){if(i>0)e.lastNeed=i-1;return i}if(--n=0){if(i>0)e.lastNeed=i-2;return i}if(--n=0){if(i>0){if(i===2)i=0;else e.lastNeed=i-3}return i}return 0}function utf8CheckExtraBytes(e,t,r){if((t[0]&192)!==128){e.lastNeed=0;return"�"}if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128){e.lastNeed=1;return"�"}if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128){e.lastNeed=2;return"�"}}}}function utf8FillLast(e){var t=this.lastTotal-this.lastNeed;var r=utf8CheckExtraBytes(this,e,t);if(r!==undefined)return r;if(this.lastNeed<=e.length){e.copy(this.lastChar,t,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,t,0,e.length);this.lastNeed-=e.length}function utf8Text(e,t){var r=utf8CheckIncomplete(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);e.copy(this.lastChar,0,n);return e.toString("utf8",t,n)}function utf8End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"�";return t}function utf16Text(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1];return r.slice(0,-1)}}return r}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=e[e.length-1];return e.toString("utf16le",t,e.length-1)}function utf16End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function base64Text(e,t){var r=(e.length-t)%3;if(r===0)return e.toString("base64",t);this.lastNeed=3-r;this.lastTotal=3;if(r===1){this.lastChar[0]=e[e.length-1]}else{this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1]}return e.toString("base64",t,e.length-r)}function base64End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):""}},1596:(e,t,r)=>{const{Transform:n}=r(3020);function inherits(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}function through2(e){return(t,r,n)=>{if(typeof t==="function"){n=r;r=t;t={}}if(typeof r!=="function"){r=(e,t,r)=>r(null,e)}if(typeof n!=="function"){n=null}return e(t,r,n)}}const i=through2(((e,t,r)=>{const i=new n(e);i._transform=t;if(r){i._flush=r}return i}));const s=through2(((e,t,r)=>{function Through2(i){if(!(this instanceof Through2)){return new Through2(i)}this.options=Object.assign({},e,i);n.call(this,this.options);this._transform=t;if(r){this._flush=r}}inherits(Through2,n);return Through2}));const o=through2((function(e,t,r){const i=new n(Object.assign({objectMode:true,highWaterMark:16},e));i._transform=t;if(r){i._flush=r}return i}));e.exports=i;e.exports.ctor=s;e.exports.obj=o},1353:(e,t,r)=>{e.exports=r(21)},21:(e,t,r)=>{"use strict";var n=r(1808);var i=r(4404);var s=r(3685);var o=r(5687);var a=r(2361);var u=r(9491);var l=r(3837);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=s.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=s.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=o.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=o.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function TunnelingAgent(e){var t=this;t.options=e||{};t.proxyOptions=t.options.proxy||{};t.maxSockets=t.options.maxSockets||s.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",(function onFree(e,r,n,i){var s=toOptions(r,n,i);for(var o=0,a=t.requests.length;o=this.maxSockets){i.requests.push(s);return}i.createSocket(s,(function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){i.emit("free",t,s)}function onCloseOrRemove(e){i.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var r=this;var n={};r.sockets.push(n);var i=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){i.localAddress=e.localAddress}if(i.proxyAuth){i.headers=i.headers||{};i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")}c("making CONNECT request");var s=r.request(i);s.useChunkedEncodingByDefault=false;s.once("response",onResponse);s.once("upgrade",onUpgrade);s.once("connect",onConnect);s.once("error",onError);s.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick((function(){onConnect(e,t,r)}))}function onConnect(i,o,a){s.removeAllListeners();o.removeAllListeners();if(i.statusCode!==200){c("tunneling socket could not be established, statusCode=%d",i.statusCode);o.destroy();var u=new Error("tunneling socket could not be established, "+"statusCode="+i.statusCode);u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(n);return}if(a.length>0){c("got illegal response body from proxy");o.destroy();var u=new Error("got illegal response body from proxy");u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(n);return}c("tunneling connection has established");r.sockets[r.sockets.indexOf(n)]=o;return t(o)}function onError(t){s.removeAllListeners();c("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var i=new Error("tunneling socket could not be established, "+"cause="+t.message);i.code="ECONNRESET";e.request.emit("error",i);r.removeSocket(n)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var r=this.requests.shift();if(r){this.createSocket(r,(function(e){r.request.onSocket(e)}))}};function createSecureSocket(e,t){var r=this;TunnelingAgent.prototype.createSocket.call(r,e,(function(n){var s=e.request.getHeader("host");var o=mergeOptions({},r.options,{socket:n,servername:s?s.replace(/:.*$/,""):e.host});var a=i.connect(0,o);r.sockets[r.sockets.indexOf(n)]=a;t(a)}))}function toOptions(e,t,r){if(typeof e==="string"){return{host:e,port:t,localAddress:r}}return e}function mergeOptions(e){for(var t=1,r=arguments.length;t{"use strict";t.fromCallback=function(e){return Object.defineProperty((function(...t){if(typeof t[t.length-1]==="function")e.apply(this,t);else{return new Promise(((r,n)=>{e.call(this,...t,((e,t)=>e!=null?n(e):r(t)))}))}}),"name",{value:e.name})};t.fromPromise=function(e){return Object.defineProperty((function(...t){const r=t[t.length-1];if(typeof r!=="function")return e.apply(this,t);else e.apply(this,t.slice(0,-1)).then((e=>r(null,e)),r)}),"name",{value:e.name})}},626:function(e,t){ +var a=t(2157);var i=t(1017);e.exports=function expandTilde(e){var r=a();if(e.charCodeAt(0)===126){if(e.charCodeAt(1)===43){return i.join(process.cwd(),e.slice(2))}return r?i.join(r,e.slice(1)):e}return e}},3064:e=>{"use strict";e.exports=function equal(e,r){if(e===r)return true;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return false;var t,a,i;if(Array.isArray(e)){t=e.length;if(t!=r.length)return false;for(a=t;a--!==0;)if(!equal(e[a],r[a]))return false;return true}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();i=Object.keys(e);t=i.length;if(t!==Object.keys(r).length)return false;for(a=t;a--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[a]))return false;for(a=t;a--!==0;){var n=i[a];if(!equal(e[n],r[n]))return false}return true}return e!==e&&r!==r}},4486:e=>{"use strict";e.exports=function(e,r){if(!r)r={};if(typeof r==="function")r={cmp:r};var t=typeof r.cycles==="boolean"?r.cycles:false;var a=r.cmp&&function(e){return function(r){return function(t,a){var i={key:t,value:r[t]};var n={key:a,value:r[a]};return e(i,n)}}}(r.cmp);var i=[];return function stringify(e){if(e&&e.toJSON&&typeof e.toJSON==="function"){e=e.toJSON()}if(e===undefined)return;if(typeof e=="number")return isFinite(e)?""+e:"null";if(typeof e!=="object")return JSON.stringify(e);var r,n;if(Array.isArray(e)){n="[";for(r=0;r{"use strict";const a=t(7765);const i=t(1017);const n=t(5443).mkdirsSync;const s=t(7237).utimesMillisSync;const o=t(7169);function copySync(e,r,t){if(typeof t==="function"){t={filter:t}}t=t||{};t.clobber="clobber"in t?!!t.clobber:true;t.overwrite="overwrite"in t?!!t.overwrite:t.clobber;if(t.preserveTimestamps&&process.arch==="ia32"){console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269`)}const{srcStat:a,destStat:i}=o.checkPathsSync(e,r,"copy",t);o.checkParentPathsSync(e,a,r,"copy");return handleFilterAndCopy(i,e,r,t)}function handleFilterAndCopy(e,r,t,s){if(s.filter&&!s.filter(r,t))return;const o=i.dirname(t);if(!a.existsSync(o))n(o);return getStats(e,r,t,s)}function startCopy(e,r,t,a){if(a.filter&&!a.filter(r,t))return;return getStats(e,r,t,a)}function getStats(e,r,t,i){const n=i.dereference?a.statSync:a.lstatSync;const s=n(r);if(s.isDirectory())return onDir(s,e,r,t,i);else if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return onFile(s,e,r,t,i);else if(s.isSymbolicLink())return onLink(e,r,t,i);else if(s.isSocket())throw new Error(`Cannot copy a socket file: ${r}`);else if(s.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${r}`);throw new Error(`Unknown file: ${r}`)}function onFile(e,r,t,a,i){if(!r)return copyFile(e,t,a,i);return mayCopyFile(e,t,a,i)}function mayCopyFile(e,r,t,i){if(i.overwrite){a.unlinkSync(t);return copyFile(e,r,t,i)}else if(i.errorOnExist){throw new Error(`'${t}' already exists`)}}function copyFile(e,r,t,i){a.copyFileSync(r,t);if(i.preserveTimestamps)handleTimestamps(e.mode,r,t);return setDestMode(t,e.mode)}function handleTimestamps(e,r,t){if(fileIsNotWritable(e))makeFileWritable(t,e);return setDestTimestamps(r,t)}function fileIsNotWritable(e){return(e&128)===0}function makeFileWritable(e,r){return setDestMode(e,r|128)}function setDestMode(e,r){return a.chmodSync(e,r)}function setDestTimestamps(e,r){const t=a.statSync(e);return s(r,t.atime,t.mtime)}function onDir(e,r,t,a,i){if(!r)return mkDirAndCopy(e.mode,t,a,i);return copyDir(t,a,i)}function mkDirAndCopy(e,r,t,i){a.mkdirSync(t);copyDir(r,t,i);return setDestMode(t,e)}function copyDir(e,r,t){a.readdirSync(e).forEach((a=>copyDirItem(a,e,r,t)))}function copyDirItem(e,r,t,a){const n=i.join(r,e);const s=i.join(t,e);const{destStat:l}=o.checkPathsSync(n,s,"copy",a);return startCopy(l,n,s,a)}function onLink(e,r,t,n){let s=a.readlinkSync(r);if(n.dereference){s=i.resolve(process.cwd(),s)}if(!e){return a.symlinkSync(s,t)}else{let e;try{e=a.readlinkSync(t)}catch(e){if(e.code==="EINVAL"||e.code==="UNKNOWN")return a.symlinkSync(s,t);throw e}if(n.dereference){e=i.resolve(process.cwd(),e)}if(o.isSrcSubdir(s,e)){throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${e}'.`)}if(a.statSync(t).isDirectory()&&o.isSrcSubdir(e,s)){throw new Error(`Cannot overwrite '${e}' with '${s}'.`)}return copyLink(s,t)}}function copyLink(e,r){a.unlinkSync(r);return a.symlinkSync(e,r)}e.exports=copySync},5390:(e,r,t)=>{"use strict";e.exports={copySync:t(8593)}},9226:(e,r,t)=>{"use strict";const a=t(7765);const i=t(1017);const n=t(5443).mkdirs;const s=t(6618).pathExists;const o=t(7237).utimesMillis;const l=t(7169);function copy(e,r,t,a){if(typeof t==="function"&&!a){a=t;t={}}else if(typeof t==="function"){t={filter:t}}a=a||function(){};t=t||{};t.clobber="clobber"in t?!!t.clobber:true;t.overwrite="overwrite"in t?!!t.overwrite:t.clobber;if(t.preserveTimestamps&&process.arch==="ia32"){console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269`)}l.checkPaths(e,r,"copy",t,((i,n)=>{if(i)return a(i);const{srcStat:s,destStat:o}=n;l.checkParentPaths(e,s,r,"copy",(i=>{if(i)return a(i);if(t.filter)return handleFilter(checkParentDir,o,e,r,t,a);return checkParentDir(o,e,r,t,a)}))}))}function checkParentDir(e,r,t,a,o){const l=i.dirname(t);s(l,((i,s)=>{if(i)return o(i);if(s)return getStats(e,r,t,a,o);n(l,(i=>{if(i)return o(i);return getStats(e,r,t,a,o)}))}))}function handleFilter(e,r,t,a,i,n){Promise.resolve(i.filter(t,a)).then((s=>{if(s)return e(r,t,a,i,n);return n()}),(e=>n(e)))}function startCopy(e,r,t,a,i){if(a.filter)return handleFilter(getStats,e,r,t,a,i);return getStats(e,r,t,a,i)}function getStats(e,r,t,i,n){const s=i.dereference?a.stat:a.lstat;s(r,((a,s)=>{if(a)return n(a);if(s.isDirectory())return onDir(s,e,r,t,i,n);else if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return onFile(s,e,r,t,i,n);else if(s.isSymbolicLink())return onLink(e,r,t,i,n);else if(s.isSocket())return n(new Error(`Cannot copy a socket file: ${r}`));else if(s.isFIFO())return n(new Error(`Cannot copy a FIFO pipe: ${r}`));return n(new Error(`Unknown file: ${r}`))}))}function onFile(e,r,t,a,i,n){if(!r)return copyFile(e,t,a,i,n);return mayCopyFile(e,t,a,i,n)}function mayCopyFile(e,r,t,i,n){if(i.overwrite){a.unlink(t,(a=>{if(a)return n(a);return copyFile(e,r,t,i,n)}))}else if(i.errorOnExist){return n(new Error(`'${t}' already exists`))}else return n()}function copyFile(e,r,t,i,n){a.copyFile(r,t,(a=>{if(a)return n(a);if(i.preserveTimestamps)return handleTimestampsAndMode(e.mode,r,t,n);return setDestMode(t,e.mode,n)}))}function handleTimestampsAndMode(e,r,t,a){if(fileIsNotWritable(e)){return makeFileWritable(t,e,(i=>{if(i)return a(i);return setDestTimestampsAndMode(e,r,t,a)}))}return setDestTimestampsAndMode(e,r,t,a)}function fileIsNotWritable(e){return(e&128)===0}function makeFileWritable(e,r,t){return setDestMode(e,r|128,t)}function setDestTimestampsAndMode(e,r,t,a){setDestTimestamps(r,t,(r=>{if(r)return a(r);return setDestMode(t,e,a)}))}function setDestMode(e,r,t){return a.chmod(e,r,t)}function setDestTimestamps(e,r,t){a.stat(e,((e,a)=>{if(e)return t(e);return o(r,a.atime,a.mtime,t)}))}function onDir(e,r,t,a,i,n){if(!r)return mkDirAndCopy(e.mode,t,a,i,n);return copyDir(t,a,i,n)}function mkDirAndCopy(e,r,t,i,n){a.mkdir(t,(a=>{if(a)return n(a);copyDir(r,t,i,(r=>{if(r)return n(r);return setDestMode(t,e,n)}))}))}function copyDir(e,r,t,i){a.readdir(e,((a,n)=>{if(a)return i(a);return copyDirItems(n,e,r,t,i)}))}function copyDirItems(e,r,t,a,i){const n=e.pop();if(!n)return i();return copyDirItem(e,n,r,t,a,i)}function copyDirItem(e,r,t,a,n,s){const o=i.join(t,r);const c=i.join(a,r);l.checkPaths(o,c,"copy",n,((r,i)=>{if(r)return s(r);const{destStat:l}=i;startCopy(l,o,c,n,(r=>{if(r)return s(r);return copyDirItems(e,t,a,n,s)}))}))}function onLink(e,r,t,n,s){a.readlink(r,((r,o)=>{if(r)return s(r);if(n.dereference){o=i.resolve(process.cwd(),o)}if(!e){return a.symlink(o,t,s)}else{a.readlink(t,((r,c)=>{if(r){if(r.code==="EINVAL"||r.code==="UNKNOWN")return a.symlink(o,t,s);return s(r)}if(n.dereference){c=i.resolve(process.cwd(),c)}if(l.isSrcSubdir(o,c)){return s(new Error(`Cannot copy '${o}' to a subdirectory of itself, '${c}'.`))}if(e.isDirectory()&&l.isSrcSubdir(c,o)){return s(new Error(`Cannot overwrite '${c}' with '${o}'.`))}return copyLink(o,t,s)}))}}))}function copyLink(e,r,t){a.unlink(r,(i=>{if(i)return t(i);return a.symlink(e,r,t)}))}e.exports=copy},7619:(e,r,t)=>{"use strict";const a=t(3706).fromCallback;e.exports={copy:a(t(9226))}},4810:(e,r,t)=>{"use strict";const a=t(3706).fromPromise;const i=t(2003);const n=t(1017);const s=t(5443);const o=t(6875);const l=a((async function emptyDir(e){let r;try{r=await i.readdir(e)}catch{return s.mkdirs(e)}return Promise.all(r.map((r=>o.remove(n.join(e,r)))))}));function emptyDirSync(e){let r;try{r=i.readdirSync(e)}catch{return s.mkdirsSync(e)}r.forEach((r=>{r=n.join(e,r);o.removeSync(r)}))}e.exports={emptyDirSync:emptyDirSync,emptydirSync:emptyDirSync,emptyDir:l,emptydir:l}},3132:(e,r,t)=>{"use strict";const a=t(3706).fromCallback;const i=t(1017);const n=t(7765);const s=t(5443);function createFile(e,r){function makeFile(){n.writeFile(e,"",(e=>{if(e)return r(e);r()}))}n.stat(e,((t,a)=>{if(!t&&a.isFile())return r();const o=i.dirname(e);n.stat(o,((e,t)=>{if(e){if(e.code==="ENOENT"){return s.mkdirs(o,(e=>{if(e)return r(e);makeFile()}))}return r(e)}if(t.isDirectory())makeFile();else{n.readdir(o,(e=>{if(e)return r(e)}))}}))}))}function createFileSync(e){let r;try{r=n.statSync(e)}catch{}if(r&&r.isFile())return;const t=i.dirname(e);try{if(!n.statSync(t).isDirectory()){n.readdirSync(t)}}catch(e){if(e&&e.code==="ENOENT")s.mkdirsSync(t);else throw e}n.writeFileSync(e,"")}e.exports={createFile:a(createFile),createFileSync:createFileSync}},1393:(e,r,t)=>{"use strict";const a=t(3132);const i=t(5258);const n=t(9609);e.exports={createFile:a.createFile,createFileSync:a.createFileSync,ensureFile:a.createFile,ensureFileSync:a.createFileSync,createLink:i.createLink,createLinkSync:i.createLinkSync,ensureLink:i.createLink,ensureLinkSync:i.createLinkSync,createSymlink:n.createSymlink,createSymlinkSync:n.createSymlinkSync,ensureSymlink:n.createSymlink,ensureSymlinkSync:n.createSymlinkSync}},5258:(e,r,t)=>{"use strict";const a=t(3706).fromCallback;const i=t(1017);const n=t(7765);const s=t(5443);const o=t(6618).pathExists;const{areIdentical:l}=t(7169);function createLink(e,r,t){function makeLink(e,r){n.link(e,r,(e=>{if(e)return t(e);t(null)}))}n.lstat(r,((a,c)=>{n.lstat(e,((a,n)=>{if(a){a.message=a.message.replace("lstat","ensureLink");return t(a)}if(c&&l(n,c))return t(null);const u=i.dirname(r);o(u,((a,i)=>{if(a)return t(a);if(i)return makeLink(e,r);s.mkdirs(u,(a=>{if(a)return t(a);makeLink(e,r)}))}))}))}))}function createLinkSync(e,r){let t;try{t=n.lstatSync(r)}catch{}try{const r=n.lstatSync(e);if(t&&l(r,t))return}catch(e){e.message=e.message.replace("lstat","ensureLink");throw e}const a=i.dirname(r);const o=n.existsSync(a);if(o)return n.linkSync(e,r);s.mkdirsSync(a);return n.linkSync(e,r)}e.exports={createLink:a(createLink),createLinkSync:createLinkSync}},6927:(e,r,t)=>{"use strict";const a=t(1017);const i=t(7765);const n=t(6618).pathExists;function symlinkPaths(e,r,t){if(a.isAbsolute(e)){return i.lstat(e,(r=>{if(r){r.message=r.message.replace("lstat","ensureSymlink");return t(r)}return t(null,{toCwd:e,toDst:e})}))}else{const s=a.dirname(r);const o=a.join(s,e);return n(o,((r,n)=>{if(r)return t(r);if(n){return t(null,{toCwd:o,toDst:e})}else{return i.lstat(e,(r=>{if(r){r.message=r.message.replace("lstat","ensureSymlink");return t(r)}return t(null,{toCwd:e,toDst:a.relative(s,e)})}))}}))}}function symlinkPathsSync(e,r){let t;if(a.isAbsolute(e)){t=i.existsSync(e);if(!t)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}else{const n=a.dirname(r);const s=a.join(n,e);t=i.existsSync(s);if(t){return{toCwd:s,toDst:e}}else{t=i.existsSync(e);if(!t)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:a.relative(n,e)}}}}e.exports={symlinkPaths:symlinkPaths,symlinkPathsSync:symlinkPathsSync}},3694:(e,r,t)=>{"use strict";const a=t(7765);function symlinkType(e,r,t){t=typeof r==="function"?r:t;r=typeof r==="function"?false:r;if(r)return t(null,r);a.lstat(e,((e,a)=>{if(e)return t(null,"file");r=a&&a.isDirectory()?"dir":"file";t(null,r)}))}function symlinkTypeSync(e,r){let t;if(r)return r;try{t=a.lstatSync(e)}catch{return"file"}return t&&t.isDirectory()?"dir":"file"}e.exports={symlinkType:symlinkType,symlinkTypeSync:symlinkTypeSync}},9609:(e,r,t)=>{"use strict";const a=t(3706).fromCallback;const i=t(1017);const n=t(2003);const s=t(5443);const o=s.mkdirs;const l=s.mkdirsSync;const c=t(6927);const u=c.symlinkPaths;const f=c.symlinkPathsSync;const p=t(3694);const d=p.symlinkType;const h=p.symlinkTypeSync;const m=t(6618).pathExists;const{areIdentical:v}=t(7169);function createSymlink(e,r,t,a){a=typeof t==="function"?t:a;t=typeof t==="function"?false:t;n.lstat(r,((i,s)=>{if(!i&&s.isSymbolicLink()){Promise.all([n.stat(e),n.stat(r)]).then((([i,n])=>{if(v(i,n))return a(null);_createSymlink(e,r,t,a)}))}else _createSymlink(e,r,t,a)}))}function _createSymlink(e,r,t,a){u(e,r,((s,l)=>{if(s)return a(s);e=l.toDst;d(l.toCwd,t,((t,s)=>{if(t)return a(t);const l=i.dirname(r);m(l,((t,i)=>{if(t)return a(t);if(i)return n.symlink(e,r,s,a);o(l,(t=>{if(t)return a(t);n.symlink(e,r,s,a)}))}))}))}))}function createSymlinkSync(e,r,t){let a;try{a=n.lstatSync(r)}catch{}if(a&&a.isSymbolicLink()){const t=n.statSync(e);const a=n.statSync(r);if(v(t,a))return}const s=f(e,r);e=s.toDst;t=h(s.toCwd,t);const o=i.dirname(r);const c=n.existsSync(o);if(c)return n.symlinkSync(e,r,t);l(o);return n.symlinkSync(e,r,t)}e.exports={createSymlink:a(createSymlink),createSymlinkSync:createSymlinkSync}},2003:(e,r,t)=>{"use strict";const a=t(3706).fromCallback;const i=t(7765);const n=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((e=>typeof i[e]==="function"));Object.assign(r,i);n.forEach((e=>{r[e]=a(i[e])}));r.realpath.native=a(i.realpath.native);r.exists=function(e,r){if(typeof r==="function"){return i.exists(e,r)}return new Promise((r=>i.exists(e,r)))};r.read=function(e,r,t,a,n,s){if(typeof s==="function"){return i.read(e,r,t,a,n,s)}return new Promise(((s,o)=>{i.read(e,r,t,a,n,((e,r,t)=>{if(e)return o(e);s({bytesRead:r,buffer:t})}))}))};r.write=function(e,r,...t){if(typeof t[t.length-1]==="function"){return i.write(e,r,...t)}return new Promise(((a,n)=>{i.write(e,r,...t,((e,r,t)=>{if(e)return n(e);a({bytesWritten:r,buffer:t})}))}))};if(typeof i.writev==="function"){r.writev=function(e,r,...t){if(typeof t[t.length-1]==="function"){return i.writev(e,r,...t)}return new Promise(((a,n)=>{i.writev(e,r,...t,((e,r,t)=>{if(e)return n(e);a({bytesWritten:r,buffers:t})}))}))}}},5176:(e,r,t)=>{"use strict";e.exports={...t(2003),...t(5390),...t(7619),...t(4810),...t(1393),...t(6287),...t(5443),...t(4155),...t(9453),...t(209),...t(6618),...t(6875)}},6287:(e,r,t)=>{"use strict";const a=t(3706).fromPromise;const i=t(1108);i.outputJson=a(t(447));i.outputJsonSync=t(466);i.outputJSON=i.outputJson;i.outputJSONSync=i.outputJsonSync;i.writeJSON=i.writeJson;i.writeJSONSync=i.writeJsonSync;i.readJSON=i.readJson;i.readJSONSync=i.readJsonSync;e.exports=i},1108:(e,r,t)=>{"use strict";const a=t(5533);e.exports={readJson:a.readFile,readJsonSync:a.readFileSync,writeJson:a.writeFile,writeJsonSync:a.writeFileSync}},466:(e,r,t)=>{"use strict";const{stringify:a}=t(8171);const{outputFileSync:i}=t(209);function outputJsonSync(e,r,t){const n=a(r,t);i(e,n,t)}e.exports=outputJsonSync},447:(e,r,t)=>{"use strict";const{stringify:a}=t(8171);const{outputFile:i}=t(209);async function outputJson(e,r,t={}){const n=a(r,t);await i(e,n,t)}e.exports=outputJson},5443:(e,r,t)=>{"use strict";const a=t(3706).fromPromise;const{makeDir:i,makeDirSync:n}=t(7113);const s=a(i);e.exports={mkdirs:s,mkdirsSync:n,mkdirp:s,mkdirpSync:n,ensureDir:s,ensureDirSync:n}},7113:(e,r,t)=>{"use strict";const a=t(2003);const{checkPath:i}=t(4096);const getMode=e=>{const r={mode:511};if(typeof e==="number")return e;return{...r,...e}.mode};e.exports.makeDir=async(e,r)=>{i(e);return a.mkdir(e,{mode:getMode(r),recursive:true})};e.exports.makeDirSync=(e,r)=>{i(e);return a.mkdirSync(e,{mode:getMode(r),recursive:true})}},4096:(e,r,t)=>{"use strict";const a=t(1017);e.exports.checkPath=function checkPath(e){if(process.platform==="win32"){const r=/[<>:"|?*]/.test(e.replace(a.parse(e).root,""));if(r){const r=new Error(`Path contains invalid characters: ${e}`);r.code="EINVAL";throw r}}}},4155:(e,r,t)=>{"use strict";e.exports={moveSync:t(8450)}},8450:(e,r,t)=>{"use strict";const a=t(7765);const i=t(1017);const n=t(5390).copySync;const s=t(6875).removeSync;const o=t(5443).mkdirpSync;const l=t(7169);function moveSync(e,r,t){t=t||{};const a=t.overwrite||t.clobber||false;const{srcStat:n,isChangingCase:s=false}=l.checkPathsSync(e,r,"move",t);l.checkParentPathsSync(e,n,r,"move");if(!isParentRoot(r))o(i.dirname(r));return doRename(e,r,a,s)}function isParentRoot(e){const r=i.dirname(e);const t=i.parse(r);return t.root===r}function doRename(e,r,t,i){if(i)return rename(e,r,t);if(t){s(r);return rename(e,r,t)}if(a.existsSync(r))throw new Error("dest already exists.");return rename(e,r,t)}function rename(e,r,t){try{a.renameSync(e,r)}catch(a){if(a.code!=="EXDEV")throw a;return moveAcrossDevice(e,r,t)}}function moveAcrossDevice(e,r,t){const a={overwrite:t,errorOnExist:true};n(e,r,a);return s(e)}e.exports=moveSync},9453:(e,r,t)=>{"use strict";const a=t(3706).fromCallback;e.exports={move:a(t(2826))}},2826:(e,r,t)=>{"use strict";const a=t(7765);const i=t(1017);const n=t(7619).copy;const s=t(6875).remove;const o=t(5443).mkdirp;const l=t(6618).pathExists;const c=t(7169);function move(e,r,t,a){if(typeof t==="function"){a=t;t={}}const n=t.overwrite||t.clobber||false;c.checkPaths(e,r,"move",t,((t,s)=>{if(t)return a(t);const{srcStat:l,isChangingCase:u=false}=s;c.checkParentPaths(e,l,r,"move",(t=>{if(t)return a(t);if(isParentRoot(r))return doRename(e,r,n,u,a);o(i.dirname(r),(t=>{if(t)return a(t);return doRename(e,r,n,u,a)}))}))}))}function isParentRoot(e){const r=i.dirname(e);const t=i.parse(r);return t.root===r}function doRename(e,r,t,a,i){if(a)return rename(e,r,t,i);if(t){return s(r,(a=>{if(a)return i(a);return rename(e,r,t,i)}))}l(r,((a,n)=>{if(a)return i(a);if(n)return i(new Error("dest already exists."));return rename(e,r,t,i)}))}function rename(e,r,t,i){a.rename(e,r,(a=>{if(!a)return i();if(a.code!=="EXDEV")return i(a);return moveAcrossDevice(e,r,t,i)}))}function moveAcrossDevice(e,r,t,a){const i={overwrite:t,errorOnExist:true};n(e,r,i,(r=>{if(r)return a(r);return s(e,a)}))}e.exports=move},209:(e,r,t)=>{"use strict";const a=t(3706).fromCallback;const i=t(7765);const n=t(1017);const s=t(5443);const o=t(6618).pathExists;function outputFile(e,r,t,a){if(typeof t==="function"){a=t;t="utf8"}const l=n.dirname(e);o(l,((n,o)=>{if(n)return a(n);if(o)return i.writeFile(e,r,t,a);s.mkdirs(l,(n=>{if(n)return a(n);i.writeFile(e,r,t,a)}))}))}function outputFileSync(e,...r){const t=n.dirname(e);if(i.existsSync(t)){return i.writeFileSync(e,...r)}s.mkdirsSync(t);i.writeFileSync(e,...r)}e.exports={outputFile:a(outputFile),outputFileSync:outputFileSync}},6618:(e,r,t)=>{"use strict";const a=t(3706).fromPromise;const i=t(2003);function pathExists(e){return i.access(e).then((()=>true)).catch((()=>false))}e.exports={pathExists:a(pathExists),pathExistsSync:i.existsSync}},6875:(e,r,t)=>{"use strict";const a=t(7765);const i=t(3706).fromCallback;const n=t(7611);function remove(e,r){if(a.rm)return a.rm(e,{recursive:true,force:true},r);n(e,r)}function removeSync(e){if(a.rmSync)return a.rmSync(e,{recursive:true,force:true});n.sync(e)}e.exports={remove:i(remove),removeSync:removeSync}},7611:(e,r,t)=>{"use strict";const a=t(7765);const i=t(1017);const n=t(9491);const s=process.platform==="win32";function defaults(e){const r=["unlink","chmod","stat","lstat","rmdir","readdir"];r.forEach((r=>{e[r]=e[r]||a[r];r=r+"Sync";e[r]=e[r]||a[r]}));e.maxBusyTries=e.maxBusyTries||3}function rimraf(e,r,t){let a=0;if(typeof r==="function"){t=r;r={}}n(e,"rimraf: missing path");n.strictEqual(typeof e,"string","rimraf: path should be a string");n.strictEqual(typeof t,"function","rimraf: callback function required");n(r,"rimraf: invalid options argument provided");n.strictEqual(typeof r,"object","rimraf: options should be object");defaults(r);rimraf_(e,r,(function CB(i){if(i){if((i.code==="EBUSY"||i.code==="ENOTEMPTY"||i.code==="EPERM")&&arimraf_(e,r,CB)),t)}if(i.code==="ENOENT")i=null}t(i)}))}function rimraf_(e,r,t){n(e);n(r);n(typeof t==="function");r.lstat(e,((a,i)=>{if(a&&a.code==="ENOENT"){return t(null)}if(a&&a.code==="EPERM"&&s){return fixWinEPERM(e,r,a,t)}if(i&&i.isDirectory()){return rmdir(e,r,a,t)}r.unlink(e,(a=>{if(a){if(a.code==="ENOENT"){return t(null)}if(a.code==="EPERM"){return s?fixWinEPERM(e,r,a,t):rmdir(e,r,a,t)}if(a.code==="EISDIR"){return rmdir(e,r,a,t)}}return t(a)}))}))}function fixWinEPERM(e,r,t,a){n(e);n(r);n(typeof a==="function");r.chmod(e,438,(i=>{if(i){a(i.code==="ENOENT"?null:t)}else{r.stat(e,((i,n)=>{if(i){a(i.code==="ENOENT"?null:t)}else if(n.isDirectory()){rmdir(e,r,t,a)}else{r.unlink(e,a)}}))}}))}function fixWinEPERMSync(e,r,t){let a;n(e);n(r);try{r.chmodSync(e,438)}catch(e){if(e.code==="ENOENT"){return}else{throw t}}try{a=r.statSync(e)}catch(e){if(e.code==="ENOENT"){return}else{throw t}}if(a.isDirectory()){rmdirSync(e,r,t)}else{r.unlinkSync(e)}}function rmdir(e,r,t,a){n(e);n(r);n(typeof a==="function");r.rmdir(e,(i=>{if(i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")){rmkids(e,r,a)}else if(i&&i.code==="ENOTDIR"){a(t)}else{a(i)}}))}function rmkids(e,r,t){n(e);n(r);n(typeof t==="function");r.readdir(e,((a,n)=>{if(a)return t(a);let s=n.length;let o;if(s===0)return r.rmdir(e,t);n.forEach((a=>{rimraf(i.join(e,a),r,(a=>{if(o){return}if(a)return t(o=a);if(--s===0){r.rmdir(e,t)}}))}))}))}function rimrafSync(e,r){let t;r=r||{};defaults(r);n(e,"rimraf: missing path");n.strictEqual(typeof e,"string","rimraf: path should be a string");n(r,"rimraf: missing options");n.strictEqual(typeof r,"object","rimraf: options should be object");try{t=r.lstatSync(e)}catch(t){if(t.code==="ENOENT"){return}if(t.code==="EPERM"&&s){fixWinEPERMSync(e,r,t)}}try{if(t&&t.isDirectory()){rmdirSync(e,r,null)}else{r.unlinkSync(e)}}catch(t){if(t.code==="ENOENT"){return}else if(t.code==="EPERM"){return s?fixWinEPERMSync(e,r,t):rmdirSync(e,r,t)}else if(t.code!=="EISDIR"){throw t}rmdirSync(e,r,t)}}function rmdirSync(e,r,t){n(e);n(r);try{r.rmdirSync(e)}catch(a){if(a.code==="ENOTDIR"){throw t}else if(a.code==="ENOTEMPTY"||a.code==="EEXIST"||a.code==="EPERM"){rmkidsSync(e,r)}else if(a.code!=="ENOENT"){throw a}}}function rmkidsSync(e,r){n(e);n(r);r.readdirSync(e).forEach((t=>rimrafSync(i.join(e,t),r)));if(s){const t=Date.now();do{try{const t=r.rmdirSync(e,r);return t}catch{}}while(Date.now()-t<500)}else{const t=r.rmdirSync(e,r);return t}}e.exports=rimraf;rimraf.sync=rimrafSync},7169:(e,r,t)=>{"use strict";const a=t(2003);const i=t(1017);const n=t(3837);function getStats(e,r,t){const i=t.dereference?e=>a.stat(e,{bigint:true}):e=>a.lstat(e,{bigint:true});return Promise.all([i(e),i(r).catch((e=>{if(e.code==="ENOENT")return null;throw e}))]).then((([e,r])=>({srcStat:e,destStat:r})))}function getStatsSync(e,r,t){let i;const n=t.dereference?e=>a.statSync(e,{bigint:true}):e=>a.lstatSync(e,{bigint:true});const s=n(e);try{i=n(r)}catch(e){if(e.code==="ENOENT")return{srcStat:s,destStat:null};throw e}return{srcStat:s,destStat:i}}function checkPaths(e,r,t,a,s){n.callbackify(getStats)(e,r,a,((a,n)=>{if(a)return s(a);const{srcStat:o,destStat:l}=n;if(l){if(areIdentical(o,l)){const a=i.basename(e);const n=i.basename(r);if(t==="move"&&a!==n&&a.toLowerCase()===n.toLowerCase()){return s(null,{srcStat:o,destStat:l,isChangingCase:true})}return s(new Error("Source and destination must not be the same."))}if(o.isDirectory()&&!l.isDirectory()){return s(new Error(`Cannot overwrite non-directory '${r}' with directory '${e}'.`))}if(!o.isDirectory()&&l.isDirectory()){return s(new Error(`Cannot overwrite directory '${r}' with non-directory '${e}'.`))}}if(o.isDirectory()&&isSrcSubdir(e,r)){return s(new Error(errMsg(e,r,t)))}return s(null,{srcStat:o,destStat:l})}))}function checkPathsSync(e,r,t,a){const{srcStat:n,destStat:s}=getStatsSync(e,r,a);if(s){if(areIdentical(n,s)){const a=i.basename(e);const o=i.basename(r);if(t==="move"&&a!==o&&a.toLowerCase()===o.toLowerCase()){return{srcStat:n,destStat:s,isChangingCase:true}}throw new Error("Source and destination must not be the same.")}if(n.isDirectory()&&!s.isDirectory()){throw new Error(`Cannot overwrite non-directory '${r}' with directory '${e}'.`)}if(!n.isDirectory()&&s.isDirectory()){throw new Error(`Cannot overwrite directory '${r}' with non-directory '${e}'.`)}}if(n.isDirectory()&&isSrcSubdir(e,r)){throw new Error(errMsg(e,r,t))}return{srcStat:n,destStat:s}}function checkParentPaths(e,r,t,n,s){const o=i.resolve(i.dirname(e));const l=i.resolve(i.dirname(t));if(l===o||l===i.parse(l).root)return s();a.stat(l,{bigint:true},((a,i)=>{if(a){if(a.code==="ENOENT")return s();return s(a)}if(areIdentical(r,i)){return s(new Error(errMsg(e,t,n)))}return checkParentPaths(e,r,l,n,s)}))}function checkParentPathsSync(e,r,t,n){const s=i.resolve(i.dirname(e));const o=i.resolve(i.dirname(t));if(o===s||o===i.parse(o).root)return;let l;try{l=a.statSync(o,{bigint:true})}catch(e){if(e.code==="ENOENT")return;throw e}if(areIdentical(r,l)){throw new Error(errMsg(e,t,n))}return checkParentPathsSync(e,r,o,n)}function areIdentical(e,r){return r.ino&&r.dev&&r.ino===e.ino&&r.dev===e.dev}function isSrcSubdir(e,r){const t=i.resolve(e).split(i.sep).filter((e=>e));const a=i.resolve(r).split(i.sep).filter((e=>e));return t.reduce(((e,r,t)=>e&&a[t]===r),true)}function errMsg(e,r,t){return`Cannot ${t} '${e}' to a subdirectory of itself, '${r}'.`}e.exports={checkPaths:checkPaths,checkPathsSync:checkPathsSync,checkParentPaths:checkParentPaths,checkParentPathsSync:checkParentPathsSync,isSrcSubdir:isSrcSubdir,areIdentical:areIdentical}},7237:(e,r,t)=>{"use strict";const a=t(7765);function utimesMillis(e,r,t,i){a.open(e,"r+",((e,n)=>{if(e)return i(e);a.futimes(n,r,t,(e=>{a.close(n,(r=>{if(i)i(e||r)}))}))}))}function utimesMillisSync(e,r,t){const i=a.openSync(e,"r+");a.futimesSync(i,r,t);return a.closeSync(i)}e.exports={utimesMillis:utimesMillis,utimesMillisSync:utimesMillisSync}},3236:e=>{"use strict";e.exports=clone;var r=Object.getPrototypeOf||function(e){return e.__proto__};function clone(e){if(e===null||typeof e!=="object")return e;if(e instanceof Object)var t={__proto__:r(e)};else var t=Object.create(null);Object.getOwnPropertyNames(e).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}));return t}},7765:(e,r,t)=>{var a=t(7147);var i=t(7457);var n=t(7681);var s=t(3236);var o=t(3837);var l;var c;if(typeof Symbol==="function"&&typeof Symbol.for==="function"){l=Symbol.for("graceful-fs.queue");c=Symbol.for("graceful-fs.previous")}else{l="___graceful-fs.queue";c="___graceful-fs.previous"}function noop(){}function publishQueue(e,r){Object.defineProperty(e,l,{get:function(){return r}})}var u=noop;if(o.debuglog)u=o.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))u=function(){var e=o.format.apply(o,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: ");console.error(e)};if(!a[l]){var f=global[l]||[];publishQueue(a,f);a.close=function(e){function close(r,t){return e.call(a,r,(function(e){if(!e){resetQueue()}if(typeof t==="function")t.apply(this,arguments)}))}Object.defineProperty(close,c,{value:e});return close}(a.close);a.closeSync=function(e){function closeSync(r){e.apply(a,arguments);resetQueue()}Object.defineProperty(closeSync,c,{value:e});return closeSync}(a.closeSync);if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")){process.on("exit",(function(){u(a[l]);t(9491).equal(a[l].length,0)}))}}if(!global[l]){publishQueue(global,a[l])}e.exports=patch(s(a));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!a.__patched){e.exports=patch(a);a.__patched=true}function patch(e){i(e);e.gracefulify=patch;e.createReadStream=createReadStream;e.createWriteStream=createWriteStream;var r=e.readFile;e.readFile=readFile;function readFile(e,t,a){if(typeof t==="function")a=t,t=null;return go$readFile(e,t,a);function go$readFile(e,t,a,i){return r(e,t,(function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))enqueue([go$readFile,[e,t,a],r,i||Date.now(),Date.now()]);else{if(typeof a==="function")a.apply(this,arguments)}}))}}var t=e.writeFile;e.writeFile=writeFile;function writeFile(e,r,a,i){if(typeof a==="function")i=a,a=null;return go$writeFile(e,r,a,i);function go$writeFile(e,r,a,i,n){return t(e,r,a,(function(t){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))enqueue([go$writeFile,[e,r,a,i],t,n||Date.now(),Date.now()]);else{if(typeof i==="function")i.apply(this,arguments)}}))}}var a=e.appendFile;if(a)e.appendFile=appendFile;function appendFile(e,r,t,i){if(typeof t==="function")i=t,t=null;return go$appendFile(e,r,t,i);function go$appendFile(e,r,t,i,n){return a(e,r,t,(function(a){if(a&&(a.code==="EMFILE"||a.code==="ENFILE"))enqueue([go$appendFile,[e,r,t,i],a,n||Date.now(),Date.now()]);else{if(typeof i==="function")i.apply(this,arguments)}}))}}var s=e.copyFile;if(s)e.copyFile=copyFile;function copyFile(e,r,t,a){if(typeof t==="function"){a=t;t=0}return go$copyFile(e,r,t,a);function go$copyFile(e,r,t,a,i){return s(e,r,t,(function(n){if(n&&(n.code==="EMFILE"||n.code==="ENFILE"))enqueue([go$copyFile,[e,r,t,a],n,i||Date.now(),Date.now()]);else{if(typeof a==="function")a.apply(this,arguments)}}))}}var o=e.readdir;e.readdir=readdir;function readdir(e,r,t){if(typeof r==="function")t=r,r=null;return go$readdir(e,r,t);function go$readdir(e,r,t,a){return o(e,r,(function(i,n){if(i&&(i.code==="EMFILE"||i.code==="ENFILE"))enqueue([go$readdir,[e,r,t],i,a||Date.now(),Date.now()]);else{if(n&&n.sort)n.sort();if(typeof t==="function")t.call(this,i,n)}}))}}if(process.version.substr(0,4)==="v0.8"){var l=n(e);ReadStream=l.ReadStream;WriteStream=l.WriteStream}var c=e.ReadStream;if(c){ReadStream.prototype=Object.create(c.prototype);ReadStream.prototype.open=ReadStream$open}var u=e.WriteStream;if(u){WriteStream.prototype=Object.create(u.prototype);WriteStream.prototype.open=WriteStream$open}Object.defineProperty(e,"ReadStream",{get:function(){return ReadStream},set:function(e){ReadStream=e},enumerable:true,configurable:true});Object.defineProperty(e,"WriteStream",{get:function(){return WriteStream},set:function(e){WriteStream=e},enumerable:true,configurable:true});var f=ReadStream;Object.defineProperty(e,"FileReadStream",{get:function(){return f},set:function(e){f=e},enumerable:true,configurable:true});var p=WriteStream;Object.defineProperty(e,"FileWriteStream",{get:function(){return p},set:function(e){p=e},enumerable:true,configurable:true});function ReadStream(e,r){if(this instanceof ReadStream)return c.apply(this,arguments),this;else return ReadStream.apply(Object.create(ReadStream.prototype),arguments)}function ReadStream$open(){var e=this;open(e.path,e.flags,e.mode,(function(r,t){if(r){if(e.autoClose)e.destroy();e.emit("error",r)}else{e.fd=t;e.emit("open",t);e.read()}}))}function WriteStream(e,r){if(this instanceof WriteStream)return u.apply(this,arguments),this;else return WriteStream.apply(Object.create(WriteStream.prototype),arguments)}function WriteStream$open(){var e=this;open(e.path,e.flags,e.mode,(function(r,t){if(r){e.destroy();e.emit("error",r)}else{e.fd=t;e.emit("open",t)}}))}function createReadStream(r,t){return new e.ReadStream(r,t)}function createWriteStream(r,t){return new e.WriteStream(r,t)}var d=e.open;e.open=open;function open(e,r,t,a){if(typeof t==="function")a=t,t=null;return go$open(e,r,t,a);function go$open(e,r,t,a,i){return d(e,r,t,(function(n,s){if(n&&(n.code==="EMFILE"||n.code==="ENFILE"))enqueue([go$open,[e,r,t,a],n,i||Date.now(),Date.now()]);else{if(typeof a==="function")a.apply(this,arguments)}}))}}return e}function enqueue(e){u("ENQUEUE",e[0].name,e[1]);a[l].push(e);retry()}var p;function resetQueue(){var e=Date.now();for(var r=0;r2){a[l][r][3]=e;a[l][r][4]=e}}retry()}function retry(){clearTimeout(p);p=undefined;if(a[l].length===0)return;var e=a[l].shift();var r=e[0];var t=e[1];var i=e[2];var n=e[3];var s=e[4];if(n===undefined){u("RETRY",r.name,t);r.apply(null,t)}else if(Date.now()-n>=6e4){u("TIMEOUT",r.name,t);var o=t.pop();if(typeof o==="function")o.call(null,i)}else{var c=Date.now()-s;var f=Math.max(s-n,1);var d=Math.min(f*1.2,100);if(c>=d){u("RETRY",r.name,t);r.apply(null,t.concat([n]))}else{a[l].push(e)}}if(p===undefined){p=setTimeout(retry,0)}}},7681:(e,r,t)=>{var a=t(2781).Stream;e.exports=legacy;function legacy(e){return{ReadStream:ReadStream,WriteStream:WriteStream};function ReadStream(r,t){if(!(this instanceof ReadStream))return new ReadStream(r,t);a.call(this);var i=this;this.path=r;this.fd=null;this.readable=true;this.paused=false;this.flags="r";this.mode=438;this.bufferSize=64*1024;t=t||{};var n=Object.keys(t);for(var s=0,o=n.length;sthis.end){throw new Error("start must be <= end")}this.pos=this.start}if(this.fd!==null){process.nextTick((function(){i._read()}));return}e.open(this.path,this.flags,this.mode,(function(e,r){if(e){i.emit("error",e);i.readable=false;return}i.fd=r;i.emit("open",r);i._read()}))}function WriteStream(r,t){if(!(this instanceof WriteStream))return new WriteStream(r,t);a.call(this);this.path=r;this.fd=null;this.writable=true;this.flags="w";this.encoding="binary";this.mode=438;this.bytesWritten=0;t=t||{};var i=Object.keys(t);for(var n=0,s=i.length;n= zero")}this.pos=this.start}this.busy=false;this._queue=[];if(this.fd===null){this._open=e.open;this._queue.push([this._open,this.path,this.flags,this.mode,undefined]);this.flush()}}}},7457:(e,r,t)=>{var a=t(2057);var i=process.cwd;var n=null;var s=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!n)n=i.call(process);return n};try{process.cwd()}catch(e){}if(typeof process.chdir==="function"){var o=process.chdir;process.chdir=function(e){n=null;o.call(process,e)};if(Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,o)}e.exports=patch;function patch(e){if(a.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)){patchLchmod(e)}if(!e.lutimes){patchLutimes(e)}e.chown=chownFix(e.chown);e.fchown=chownFix(e.fchown);e.lchown=chownFix(e.lchown);e.chmod=chmodFix(e.chmod);e.fchmod=chmodFix(e.fchmod);e.lchmod=chmodFix(e.lchmod);e.chownSync=chownFixSync(e.chownSync);e.fchownSync=chownFixSync(e.fchownSync);e.lchownSync=chownFixSync(e.lchownSync);e.chmodSync=chmodFixSync(e.chmodSync);e.fchmodSync=chmodFixSync(e.fchmodSync);e.lchmodSync=chmodFixSync(e.lchmodSync);e.stat=statFix(e.stat);e.fstat=statFix(e.fstat);e.lstat=statFix(e.lstat);e.statSync=statFixSync(e.statSync);e.fstatSync=statFixSync(e.fstatSync);e.lstatSync=statFixSync(e.lstatSync);if(!e.lchmod){e.lchmod=function(e,r,t){if(t)process.nextTick(t)};e.lchmodSync=function(){}}if(!e.lchown){e.lchown=function(e,r,t,a){if(a)process.nextTick(a)};e.lchownSync=function(){}}if(s==="win32"){e.rename=function(r){return function(t,a,i){var n=Date.now();var s=0;r(t,a,(function CB(o){if(o&&(o.code==="EACCES"||o.code==="EPERM")&&Date.now()-n<6e4){setTimeout((function(){e.stat(a,(function(e,n){if(e&&e.code==="ENOENT")r(t,a,CB);else i(o)}))}),s);if(s<100)s+=10;return}if(i)i(o)}))}}(e.rename)}e.read=function(r){function read(t,a,i,n,s,o){var l;if(o&&typeof o==="function"){var c=0;l=function(u,f,p){if(u&&u.code==="EAGAIN"&&c<10){c++;return r.call(e,t,a,i,n,s,l)}o.apply(this,arguments)}}return r.call(e,t,a,i,n,s,l)}if(Object.setPrototypeOf)Object.setPrototypeOf(read,r);return read}(e.read);e.readSync=function(r){return function(t,a,i,n,s){var o=0;while(true){try{return r.call(e,t,a,i,n,s)}catch(e){if(e.code==="EAGAIN"&&o<10){o++;continue}throw e}}}}(e.readSync);function patchLchmod(e){e.lchmod=function(r,t,i){e.open(r,a.O_WRONLY|a.O_SYMLINK,t,(function(r,a){if(r){if(i)i(r);return}e.fchmod(a,t,(function(r){e.close(a,(function(e){if(i)i(r||e)}))}))}))};e.lchmodSync=function(r,t){var i=e.openSync(r,a.O_WRONLY|a.O_SYMLINK,t);var n=true;var s;try{s=e.fchmodSync(i,t);n=false}finally{if(n){try{e.closeSync(i)}catch(e){}}else{e.closeSync(i)}}return s}}function patchLutimes(e){if(a.hasOwnProperty("O_SYMLINK")){e.lutimes=function(r,t,i,n){e.open(r,a.O_SYMLINK,(function(r,a){if(r){if(n)n(r);return}e.futimes(a,t,i,(function(r){e.close(a,(function(e){if(n)n(r||e)}))}))}))};e.lutimesSync=function(r,t,i){var n=e.openSync(r,a.O_SYMLINK);var s;var o=true;try{s=e.futimesSync(n,t,i);o=false}finally{if(o){try{e.closeSync(n)}catch(e){}}else{e.closeSync(n)}}return s}}else{e.lutimes=function(e,r,t,a){if(a)process.nextTick(a)};e.lutimesSync=function(){}}}function chmodFix(r){if(!r)return r;return function(t,a,i){return r.call(e,t,a,(function(e){if(chownErOk(e))e=null;if(i)i.apply(this,arguments)}))}}function chmodFixSync(r){if(!r)return r;return function(t,a){try{return r.call(e,t,a)}catch(e){if(!chownErOk(e))throw e}}}function chownFix(r){if(!r)return r;return function(t,a,i,n){return r.call(e,t,a,i,(function(e){if(chownErOk(e))e=null;if(n)n.apply(this,arguments)}))}}function chownFixSync(r){if(!r)return r;return function(t,a,i){try{return r.call(e,t,a,i)}catch(e){if(!chownErOk(e))throw e}}}function statFix(r){if(!r)return r;return function(t,a,i){if(typeof a==="function"){i=a;a=null}function callback(e,r){if(r){if(r.uid<0)r.uid+=4294967296;if(r.gid<0)r.gid+=4294967296}if(i)i.apply(this,arguments)}return a?r.call(e,t,a,callback):r.call(e,t,callback)}}function statFixSync(r){if(!r)return r;return function(t,a){var i=a?r.call(e,t,a):r.call(e,t);if(i){if(i.uid<0)i.uid+=4294967296;if(i.gid<0)i.gid+=4294967296}return i}}function chownErOk(e){if(!e)return true;if(e.code==="ENOSYS")return true;var r=!process.getuid||process.getuid()!==0;if(r){if(e.code==="EINVAL"||e.code==="EPERM")return true}return false}}},2157:(e,r,t)=>{"use strict";var a=t(2037);if(typeof a.homedir!=="undefined"){e.exports=a.homedir}else{e.exports=t(9975)}},9975:(e,r,t)=>{"use strict";var a=t(7147);var i=t(9524);function homedir(){if(process.platform==="win32"){if(process.env.USERPROFILE){return process.env.USERPROFILE}if(process.env.HOMEDRIVE&&process.env.HOMEPATH){return process.env.HOMEDRIVE+process.env.HOMEPATH}if(process.env.HOME){return process.env.HOME}return null}if(process.env.HOME){return process.env.HOME}var e=tryReadFileSync("/etc/passwd");var r=find(i(e),getuid());if(r){return r}var t=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;if(!t){return null}if(process.platform==="darwin"){return"/Users/"+t}return"/home/"+t}function find(e,r){var t=e.length;for(var a=0;a{"use strict";var a=t(6344);var i=t(7902);function renamed(e,r){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. "+"Use yaml."+r+" instead, which is now safe by default.")}}e.exports.Type=t(4098);e.exports.Schema=t(5217);e.exports.FAILSAFE_SCHEMA=t(3183);e.exports.JSON_SCHEMA=t(9116);e.exports.CORE_SCHEMA=t(9043);e.exports.DEFAULT_SCHEMA=t(6672);e.exports.load=a.load;e.exports.loadAll=a.loadAll;e.exports.dump=i.dump;e.exports.YAMLException=t(876);e.exports.types={binary:t(1688),float:t(3250),map:t(723),null:t(2451),pairs:t(5671),set:t(3051),timestamp:t(8285),bool:t(8510),int:t(2682),merge:t(5831),omap:t(3602),seq:t(9130),str:t(802)};e.exports.safeLoad=renamed("safeLoad","load");e.exports.safeLoadAll=renamed("safeLoadAll","loadAll");e.exports.safeDump=renamed("safeDump","dump")},5929:e=>{"use strict";function isNothing(e){return typeof e==="undefined"||e===null}function isObject(e){return typeof e==="object"&&e!==null}function toArray(e){if(Array.isArray(e))return e;else if(isNothing(e))return[];return[e]}function extend(e,r){var t,a,i,n;if(r){n=Object.keys(r);for(t=0,a=n.length;t{"use strict";var a=t(5929);var i=t(876);var n=t(6672);var s=Object.prototype.toString;var o=Object.prototype.hasOwnProperty;var l=65279;var c=9;var u=10;var f=13;var p=32;var d=33;var h=34;var m=35;var v=37;var y=38;var g=39;var S=42;var w=44;var E=45;var b=58;var P=61;var x=62;var _=63;var k=64;var O=91;var C=93;var A=96;var F=123;var R=124;var I=125;var D={};D[0]="\\0";D[7]="\\a";D[8]="\\b";D[9]="\\t";D[10]="\\n";D[11]="\\v";D[12]="\\f";D[13]="\\r";D[27]="\\e";D[34]='\\"';D[92]="\\\\";D[133]="\\N";D[160]="\\_";D[8232]="\\L";D[8233]="\\P";var j=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];var T=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function compileStyleMap(e,r){var t,a,i,n,s,l,c;if(r===null)return{};t={};a=Object.keys(r);for(i=0,n=a.length;i=55296&&t<=56319&&r+1=56320&&a<=57343){return(t-55296)*1024+a-56320+65536}}return t}function needIndentIndicator(e){var r=/^\n* /;return r.test(e)}var L=1,M=2,q=3,U=4,H=5;function chooseScalarStyle(e,r,t,a,i,n,s,o){var l;var c=0;var f=null;var p=false;var d=false;var h=a!==-1;var m=-1;var v=isPlainSafeFirst(codePointAt(e,0))&&isPlainSafeLast(codePointAt(e,e.length-1));if(r||s){for(l=0;l=65536?l+=2:l++){c=codePointAt(e,l);if(!isPrintable(c)){return H}v=v&&isPlainSafe(c,f,o);f=c}}else{for(l=0;l=65536?l+=2:l++){c=codePointAt(e,l);if(c===u){p=true;if(h){d=d||l-m-1>a&&e[m+1]!==" ";m=l}}else if(!isPrintable(c)){return H}v=v&&isPlainSafe(c,f,o);f=c}d=d||h&&(l-m-1>a&&e[m+1]!==" ")}if(!p&&!d){if(v&&!s&&!i(e)){return L}return n===N?H:M}if(t>9&&needIndentIndicator(e)){return H}if(!s){return d?U:q}return n===N?H:M}function writeScalar(e,r,t,a,n){e.dump=function(){if(r.length===0){return e.quotingType===N?'""':"''"}if(!e.noCompatMode){if(j.indexOf(r)!==-1||T.test(r)){return e.quotingType===N?'"'+r+'"':"'"+r+"'"}}var s=e.indent*Math.max(1,t);var o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s);var l=a||e.flowLevel>-1&&t>=e.flowLevel;function testAmbiguity(r){return testImplicitResolving(e,r)}switch(chooseScalarStyle(r,l,e.indent,o,testAmbiguity,e.quotingType,e.forceQuotes&&!a,n)){case L:return r;case M:return"'"+r.replace(/'/g,"''")+"'";case q:return"|"+blockHeader(r,e.indent)+dropEndingNewline(indentString(r,s));case U:return">"+blockHeader(r,e.indent)+dropEndingNewline(indentString(foldString(r,o),s));case H:return'"'+escapeString(r,o)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function blockHeader(e,r){var t=needIndentIndicator(e)?String(r):"";var a=e[e.length-1]==="\n";var i=a&&(e[e.length-2]==="\n"||e==="\n");var n=i?"+":a?"":"-";return t+n+"\n"}function dropEndingNewline(e){return e[e.length-1]==="\n"?e.slice(0,-1):e}function foldString(e,r){var t=/(\n+)([^\n]*)/g;var a=function(){var a=e.indexOf("\n");a=a!==-1?a:e.length;t.lastIndex=a;return foldLine(e.slice(0,a),r)}();var i=e[0]==="\n"||e[0]===" ";var n;var s;while(s=t.exec(e)){var o=s[1],l=s[2];n=l[0]===" ";a+=o+(!i&&!n&&l!==""?"\n":"")+foldLine(l,r);i=n}return a}function foldLine(e,r){if(e===""||e[0]===" ")return e;var t=/ [^ ]/g;var a;var i=0,n,s=0,o=0;var l="";while(a=t.exec(e)){o=a.index;if(o-i>r){n=s>i?s:o;l+="\n"+e.slice(i,n);i=n+1}s=o}l+="\n";if(e.length-i>r&&s>i){l+=e.slice(i,s)+"\n"+e.slice(s+1)}else{l+=e.slice(i)}return l.slice(1)}function escapeString(e){var r="";var t=0;var a;for(var i=0;i=65536?i+=2:i++){t=codePointAt(e,i);a=D[t];if(!a&&isPrintable(t)){r+=e[i];if(t>=65536)r+=e[i+1]}else{r+=a||encodeHex(t)}}return r}function writeFlowSequence(e,r,t){var a="",i=e.tag,n,s,o;for(n=0,s=t.length;n1024)u+="? ";u+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" ");if(!writeNode(e,r,c,false,false)){continue}u+=e.dump;a+=u}e.tag=i;e.dump="{"+a+"}"}function writeBlockMapping(e,r,t,a){var n="",s=e.tag,o=Object.keys(t),l,c,f,p,d,h;if(e.sortKeys===true){o.sort()}else if(typeof e.sortKeys==="function"){o.sort(e.sortKeys)}else if(e.sortKeys){throw new i("sortKeys must be a boolean or a function")}for(l=0,c=o.length;l1024;if(d){if(e.dump&&u===e.dump.charCodeAt(0)){h+="?"}else{h+="? "}}h+=e.dump;if(d){h+=generateNextLine(e,r)}if(!writeNode(e,r+1,p,true,d)){continue}if(e.dump&&u===e.dump.charCodeAt(0)){h+=":"}else{h+=": "}h+=e.dump;n+=h}e.tag=s;e.dump=n||"{}"}function detectType(e,r,t){var a,n,l,c,u,f;n=t?e.explicitTypes:e.implicitTypes;for(l=0,c=n.length;l tag resolver accepts not "'+f+'" style')}e.dump=a}return true}}return false}function writeNode(e,r,t,a,n,o,l){e.tag=null;e.dump=t;if(!detectType(e,t,false)){detectType(e,t,true)}var c=s.call(e.dump);var u=a;var f;if(a){a=e.flowLevel<0||e.flowLevel>r}var p=c==="[object Object]"||c==="[object Array]",d,h;if(p){d=e.duplicates.indexOf(t);h=d!==-1}if(e.tag!==null&&e.tag!=="?"||h||e.indent!==2&&r>0){n=false}if(h&&e.usedDuplicates[d]){e.dump="*ref_"+d}else{if(p&&h&&!e.usedDuplicates[d]){e.usedDuplicates[d]=true}if(c==="[object Object]"){if(a&&Object.keys(e.dump).length!==0){writeBlockMapping(e,r,e.dump,n);if(h){e.dump="&ref_"+d+e.dump}}else{writeFlowMapping(e,r,e.dump);if(h){e.dump="&ref_"+d+" "+e.dump}}}else if(c==="[object Array]"){if(a&&e.dump.length!==0){if(e.noArrayIndent&&!l&&r>0){writeBlockSequence(e,r-1,e.dump,n)}else{writeBlockSequence(e,r,e.dump,n)}if(h){e.dump="&ref_"+d+e.dump}}else{writeFlowSequence(e,r,e.dump);if(h){e.dump="&ref_"+d+" "+e.dump}}}else if(c==="[object String]"){if(e.tag!=="?"){writeScalar(e,e.dump,r,o,u)}}else if(c==="[object Undefined]"){return false}else{if(e.skipInvalid)return false;throw new i("unacceptable kind of an object to dump "+c)}if(e.tag!==null&&e.tag!=="?"){f=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21");if(e.tag[0]==="!"){f="!"+f}else if(f.slice(0,18)==="tag:yaml.org,2002:"){f="!!"+f.slice(18)}else{f="!<"+f+">"}e.dump=f+" "+e.dump}}return true}function getDuplicateReferences(e,r){var t=[],a=[],i,n;inspectNode(e,t,a);for(i=0,n=a.length;i{"use strict";function formatError(e,r){var t="",a=e.reason||"(unknown reason)";if(!e.mark)return a;if(e.mark.name){t+='in "'+e.mark.name+'" '}t+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")";if(!r&&e.mark.snippet){t+="\n\n"+e.mark.snippet}return a+" "+t}function YAMLException(e,r){Error.call(this);this.name="YAMLException";this.reason=e;this.mark=r;this.message=formatError(this,false);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack||""}}YAMLException.prototype=Object.create(Error.prototype);YAMLException.prototype.constructor=YAMLException;YAMLException.prototype.toString=function toString(e){return this.name+": "+formatError(this,e)};e.exports=YAMLException},6344:(e,r,t)=>{"use strict";var a=t(5929);var i=t(876);var n=t(6589);var s=t(6672);var o=Object.prototype.hasOwnProperty;var l=1;var c=2;var u=3;var f=4;var p=1;var d=2;var h=3;var m=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var v=/[\x85\u2028\u2029]/;var y=/[,\[\]\{\}]/;var g=/^(?:!|!!|![a-z\-]+!)$/i;var S=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(e){return Object.prototype.toString.call(e)}function is_EOL(e){return e===10||e===13}function is_WHITE_SPACE(e){return e===9||e===32}function is_WS_OR_EOL(e){return e===9||e===32||e===10||e===13}function is_FLOW_INDICATOR(e){return e===44||e===91||e===93||e===123||e===125}function fromHexCode(e){var r;if(48<=e&&e<=57){return e-48}r=e|32;if(97<=r&&r<=102){return r-97+10}return-1}function escapedHexLen(e){if(e===120){return 2}if(e===117){return 4}if(e===85){return 8}return 0}function fromDecimalCode(e){if(48<=e&&e<=57){return e-48}return-1}function simpleEscapeSequence(e){return e===48?"\0":e===97?"":e===98?"\b":e===116?"\t":e===9?"\t":e===110?"\n":e===118?"\v":e===102?"\f":e===114?"\r":e===101?"":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function charFromCodepoint(e){if(e<=65535){return String.fromCharCode(e)}return String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var w=new Array(256);var E=new Array(256);for(var b=0;b<256;b++){w[b]=simpleEscapeSequence(b)?1:0;E[b]=simpleEscapeSequence(b)}function State(e,r){this.input=e;this.filename=r["filename"]||null;this.schema=r["schema"]||s;this.onWarning=r["onWarning"]||null;this.legacy=r["legacy"]||false;this.json=r["json"]||false;this.listener=r["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=e.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.firstTabInLine=-1;this.documents=[]}function generateError(e,r){var t={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};t.snippet=n(t);return new i(r,t)}function throwError(e,r){throw generateError(e,r)}function throwWarning(e,r){if(e.onWarning){e.onWarning.call(null,generateError(e,r))}}var P={YAML:function handleYamlDirective(e,r,t){var a,i,n;if(e.version!==null){throwError(e,"duplication of %YAML directive")}if(t.length!==1){throwError(e,"YAML directive accepts exactly one argument")}a=/^([0-9]+)\.([0-9]+)$/.exec(t[0]);if(a===null){throwError(e,"ill-formed argument of the YAML directive")}i=parseInt(a[1],10);n=parseInt(a[2],10);if(i!==1){throwError(e,"unacceptable YAML version of the document")}e.version=t[0];e.checkLineBreaks=n<2;if(n!==1&&n!==2){throwWarning(e,"unsupported YAML version of the document")}},TAG:function handleTagDirective(e,r,t){var a,i;if(t.length!==2){throwError(e,"TAG directive accepts exactly two arguments")}a=t[0];i=t[1];if(!g.test(a)){throwError(e,"ill-formed tag handle (first argument) of the TAG directive")}if(o.call(e.tagMap,a)){throwError(e,'there is a previously declared suffix for "'+a+'" tag handle')}if(!S.test(i)){throwError(e,"ill-formed tag prefix (second argument) of the TAG directive")}try{i=decodeURIComponent(i)}catch(r){throwError(e,"tag prefix is malformed: "+i)}e.tagMap[a]=i}};function captureSegment(e,r,t,a){var i,n,s,o;if(r1){e.result+=a.repeat("\n",r-1)}}function readPlainScalar(e,r,t){var a,i,n,s,o,l,c,u,f=e.kind,p=e.result,d;d=e.input.charCodeAt(e.position);if(is_WS_OR_EOL(d)||is_FLOW_INDICATOR(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96){return false}if(d===63||d===45){i=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(i)||t&&is_FLOW_INDICATOR(i)){return false}}e.kind="scalar";e.result="";n=s=e.position;o=false;while(d!==0){if(d===58){i=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(i)||t&&is_FLOW_INDICATOR(i)){break}}else if(d===35){a=e.input.charCodeAt(e.position-1);if(is_WS_OR_EOL(a)){break}}else if(e.position===e.lineStart&&testDocumentSeparator(e)||t&&is_FLOW_INDICATOR(d)){break}else if(is_EOL(d)){l=e.line;c=e.lineStart;u=e.lineIndent;skipSeparationSpace(e,false,-1);if(e.lineIndent>=r){o=true;d=e.input.charCodeAt(e.position);continue}else{e.position=s;e.line=l;e.lineStart=c;e.lineIndent=u;break}}if(o){captureSegment(e,n,s,false);writeFoldedLines(e,e.line-l);n=s=e.position;o=false}if(!is_WHITE_SPACE(d)){s=e.position+1}d=e.input.charCodeAt(++e.position)}captureSegment(e,n,s,false);if(e.result){return true}e.kind=f;e.result=p;return false}function readSingleQuotedScalar(e,r){var t,a,i;t=e.input.charCodeAt(e.position);if(t!==39){return false}e.kind="scalar";e.result="";e.position++;a=i=e.position;while((t=e.input.charCodeAt(e.position))!==0){if(t===39){captureSegment(e,a,e.position,true);t=e.input.charCodeAt(++e.position);if(t===39){a=e.position;e.position++;i=e.position}else{return true}}else if(is_EOL(t)){captureSegment(e,a,i,true);writeFoldedLines(e,skipSeparationSpace(e,false,r));a=i=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a single quoted scalar")}else{e.position++;i=e.position}}throwError(e,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(e,r){var t,a,i,n,s,o;o=e.input.charCodeAt(e.position);if(o!==34){return false}e.kind="scalar";e.result="";e.position++;t=a=e.position;while((o=e.input.charCodeAt(e.position))!==0){if(o===34){captureSegment(e,t,e.position,true);e.position++;return true}else if(o===92){captureSegment(e,t,e.position,true);o=e.input.charCodeAt(++e.position);if(is_EOL(o)){skipSeparationSpace(e,false,r)}else if(o<256&&w[o]){e.result+=E[o];e.position++}else if((s=escapedHexLen(o))>0){i=s;n=0;for(;i>0;i--){o=e.input.charCodeAt(++e.position);if((s=fromHexCode(o))>=0){n=(n<<4)+s}else{throwError(e,"expected hexadecimal character")}}e.result+=charFromCodepoint(n);e.position++}else{throwError(e,"unknown escape sequence")}t=a=e.position}else if(is_EOL(o)){captureSegment(e,t,a,true);writeFoldedLines(e,skipSeparationSpace(e,false,r));t=a=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a double quoted scalar")}else{e.position++;a=e.position}}throwError(e,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(e,r){var t=true,a,i,n,s=e.tag,o,c=e.anchor,u,f,p,d,h,m=Object.create(null),v,y,g,S;S=e.input.charCodeAt(e.position);if(S===91){f=93;h=false;o=[]}else if(S===123){f=125;h=true;o={}}else{return false}if(e.anchor!==null){e.anchorMap[e.anchor]=o}S=e.input.charCodeAt(++e.position);while(S!==0){skipSeparationSpace(e,true,r);S=e.input.charCodeAt(e.position);if(S===f){e.position++;e.tag=s;e.anchor=c;e.kind=h?"mapping":"sequence";e.result=o;return true}else if(!t){throwError(e,"missed comma between flow collection entries")}else if(S===44){throwError(e,"expected the node content, but found ','")}y=v=g=null;p=d=false;if(S===63){u=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(u)){p=d=true;e.position++;skipSeparationSpace(e,true,r)}}a=e.line;i=e.lineStart;n=e.position;composeNode(e,r,l,false,true);y=e.tag;v=e.result;skipSeparationSpace(e,true,r);S=e.input.charCodeAt(e.position);if((d||e.line===a)&&S===58){p=true;S=e.input.charCodeAt(++e.position);skipSeparationSpace(e,true,r);composeNode(e,r,l,false,true);g=e.result}if(h){storeMappingPair(e,o,m,y,v,g,a,i,n)}else if(p){o.push(storeMappingPair(e,null,m,y,v,g,a,i,n))}else{o.push(v)}skipSeparationSpace(e,true,r);S=e.input.charCodeAt(e.position);if(S===44){t=true;S=e.input.charCodeAt(++e.position)}else{t=false}}throwError(e,"unexpected end of the stream within a flow collection")}function readBlockScalar(e,r){var t,i,n=p,s=false,o=false,l=r,c=0,u=false,f,m;m=e.input.charCodeAt(e.position);if(m===124){i=false}else if(m===62){i=true}else{return false}e.kind="scalar";e.result="";while(m!==0){m=e.input.charCodeAt(++e.position);if(m===43||m===45){if(p===n){n=m===43?h:d}else{throwError(e,"repeat of a chomping mode identifier")}}else if((f=fromDecimalCode(m))>=0){if(f===0){throwError(e,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!o){l=r+f-1;o=true}else{throwError(e,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(m)){do{m=e.input.charCodeAt(++e.position)}while(is_WHITE_SPACE(m));if(m===35){do{m=e.input.charCodeAt(++e.position)}while(!is_EOL(m)&&m!==0)}}while(m!==0){readLineBreak(e);e.lineIndent=0;m=e.input.charCodeAt(e.position);while((!o||e.lineIndentl){l=e.lineIndent}if(is_EOL(m)){c++;continue}if(e.lineIndentr)&&l!==0){throwError(e,"bad indentation of a sequence entry")}else if(e.lineIndentr){if(g){s=e.line;o=e.lineStart;l=e.position}if(composeNode(e,r,f,true,i)){if(g){v=e.result}else{y=e.result}}if(!g){storeMappingPair(e,d,h,m,v,y,s,o,l);m=v=y=null}skipSeparationSpace(e,true,-1);w=e.input.charCodeAt(e.position)}if((e.line===n||e.lineIndent>r)&&w!==0){throwError(e,"bad indentation of a mapping entry")}else if(e.lineIndentr){d=1}else if(e.lineIndent===r){d=0}else if(e.lineIndentr){d=1}else if(e.lineIndent===r){d=0}else if(e.lineIndent tag; it should be "scalar", not "'+e.kind+'"')}for(v=0,y=e.implicitTypes.length;v")}if(e.result!==null&&S.kind!==e.kind){throwError(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+S.kind+'", not "'+e.kind+'"')}if(!S.resolve(e.result,e.tag)){throwError(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}else{e.result=S.construct(e.result,e.tag);if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}if(e.listener!==null){e.listener("close",e)}return e.tag!==null||e.anchor!==null||m}function readDocument(e){var r=e.position,t,a,i,n=false,s;e.version=null;e.checkLineBreaks=e.legacy;e.tagMap=Object.create(null);e.anchorMap=Object.create(null);while((s=e.input.charCodeAt(e.position))!==0){skipSeparationSpace(e,true,-1);s=e.input.charCodeAt(e.position);if(e.lineIndent>0||s!==37){break}n=true;s=e.input.charCodeAt(++e.position);t=e.position;while(s!==0&&!is_WS_OR_EOL(s)){s=e.input.charCodeAt(++e.position)}a=e.input.slice(t,e.position);i=[];if(a.length<1){throwError(e,"directive name must not be less than one character in length")}while(s!==0){while(is_WHITE_SPACE(s)){s=e.input.charCodeAt(++e.position)}if(s===35){do{s=e.input.charCodeAt(++e.position)}while(s!==0&&!is_EOL(s));break}if(is_EOL(s))break;t=e.position;while(s!==0&&!is_WS_OR_EOL(s)){s=e.input.charCodeAt(++e.position)}i.push(e.input.slice(t,e.position))}if(s!==0)readLineBreak(e);if(o.call(P,a)){P[a](e,a,i)}else{throwWarning(e,'unknown document directive "'+a+'"')}}skipSeparationSpace(e,true,-1);if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45){e.position+=3;skipSeparationSpace(e,true,-1)}else if(n){throwError(e,"directives end mark is expected")}composeNode(e,e.lineIndent-1,f,false,true);skipSeparationSpace(e,true,-1);if(e.checkLineBreaks&&v.test(e.input.slice(r,e.position))){throwWarning(e,"non-ASCII line breaks are interpreted as content")}e.documents.push(e.result);if(e.position===e.lineStart&&testDocumentSeparator(e)){if(e.input.charCodeAt(e.position)===46){e.position+=3;skipSeparationSpace(e,true,-1)}return}if(e.position{"use strict";var a=t(876);var i=t(4098);function compileList(e,r){var t=[];e[r].forEach((function(e){var r=t.length;t.forEach((function(t,a){if(t.tag===e.tag&&t.kind===e.kind&&t.multi===e.multi){r=a}}));t[r]=e}));return t}function compileMap(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},r,t;function collectType(r){if(r.multi){e.multi[r.kind].push(r);e.multi["fallback"].push(r)}else{e[r.kind][r.tag]=e["fallback"][r.tag]=r}}for(r=0,t=arguments.length;r{"use strict";e.exports=t(9116)},6672:(e,r,t)=>{"use strict";e.exports=t(9043).extend({implicit:[t(8285),t(5831)],explicit:[t(1688),t(3602),t(5671),t(3051)]})},3183:(e,r,t)=>{"use strict";var a=t(5217);e.exports=new a({explicit:[t(802),t(9130),t(723)]})},9116:(e,r,t)=>{"use strict";e.exports=t(3183).extend({implicit:[t(2451),t(8510),t(2682),t(3250)]})},6589:(e,r,t)=>{"use strict";var a=t(5929);function getLine(e,r,t,a,i){var n="";var s="";var o=Math.floor(i/2)-1;if(a-r>o){n=" ... ";r=a-o+n.length}if(t-a>o){s=" ...";t=a+o-s.length}return{str:n+e.slice(r,t).replace(/\t/g,"→")+s,pos:a-r+n.length}}function padStart(e,r){return a.repeat(" ",r-e.length)+e}function makeSnippet(e,r){r=Object.create(r||null);if(!e.buffer)return null;if(!r.maxLength)r.maxLength=79;if(typeof r.indent!=="number")r.indent=1;if(typeof r.linesBefore!=="number")r.linesBefore=3;if(typeof r.linesAfter!=="number")r.linesAfter=2;var t=/\r?\n|\r|\0/g;var i=[0];var n=[];var s;var o=-1;while(s=t.exec(e.buffer)){n.push(s.index);i.push(s.index+s[0].length);if(e.position<=s.index&&o<0){o=i.length-2}}if(o<0)o=i.length-1;var l="",c,u;var f=Math.min(e.line+r.linesAfter,n.length).toString().length;var p=r.maxLength-(r.indent+f+3);for(c=1;c<=r.linesBefore;c++){if(o-c<0)break;u=getLine(e.buffer,i[o-c],n[o-c],e.position-(i[o]-i[o-c]),p);l=a.repeat(" ",r.indent)+padStart((e.line-c+1).toString(),f)+" | "+u.str+"\n"+l}u=getLine(e.buffer,i[o],n[o],e.position,p);l+=a.repeat(" ",r.indent)+padStart((e.line+1).toString(),f)+" | "+u.str+"\n";l+=a.repeat("-",r.indent+f+3+u.pos)+"^"+"\n";for(c=1;c<=r.linesAfter;c++){if(o+c>=n.length)break;u=getLine(e.buffer,i[o+c],n[o+c],e.position-(i[o]-i[o+c]),p);l+=a.repeat(" ",r.indent)+padStart((e.line+c+1).toString(),f)+" | "+u.str+"\n"}return l.replace(/\n$/,"")}e.exports=makeSnippet},4098:(e,r,t)=>{"use strict";var a=t(876);var i=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"];var n=["scalar","sequence","mapping"];function compileStyleAliases(e){var r={};if(e!==null){Object.keys(e).forEach((function(t){e[t].forEach((function(e){r[String(e)]=t}))}))}return r}function Type(e,r){r=r||{};Object.keys(r).forEach((function(r){if(i.indexOf(r)===-1){throw new a('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}}));this.options=r;this.tag=e;this.kind=r["kind"]||null;this.resolve=r["resolve"]||function(){return true};this.construct=r["construct"]||function(e){return e};this.instanceOf=r["instanceOf"]||null;this.predicate=r["predicate"]||null;this.represent=r["represent"]||null;this.representName=r["representName"]||null;this.defaultStyle=r["defaultStyle"]||null;this.multi=r["multi"]||false;this.styleAliases=compileStyleAliases(r["styleAliases"]||null);if(n.indexOf(this.kind)===-1){throw new a('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}}e.exports=Type},1688:(e,r,t)=>{"use strict";var a=t(4098);var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function resolveYamlBinary(e){if(e===null)return false;var r,t,a=0,n=e.length,s=i;for(t=0;t64)continue;if(r<0)return false;a+=6}return a%8===0}function constructYamlBinary(e){var r,t,a=e.replace(/[\r\n=]/g,""),n=a.length,s=i,o=0,l=[];for(r=0;r>16&255);l.push(o>>8&255);l.push(o&255)}o=o<<6|s.indexOf(a.charAt(r))}t=n%4*6;if(t===0){l.push(o>>16&255);l.push(o>>8&255);l.push(o&255)}else if(t===18){l.push(o>>10&255);l.push(o>>2&255)}else if(t===12){l.push(o>>4&255)}return new Uint8Array(l)}function representYamlBinary(e){var r="",t=0,a,n,s=e.length,o=i;for(a=0;a>18&63];r+=o[t>>12&63];r+=o[t>>6&63];r+=o[t&63]}t=(t<<8)+e[a]}n=s%3;if(n===0){r+=o[t>>18&63];r+=o[t>>12&63];r+=o[t>>6&63];r+=o[t&63]}else if(n===2){r+=o[t>>10&63];r+=o[t>>4&63];r+=o[t<<2&63];r+=o[64]}else if(n===1){r+=o[t>>2&63];r+=o[t<<4&63];r+=o[64];r+=o[64]}return r}function isBinary(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}e.exports=new a("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},8510:(e,r,t)=>{"use strict";var a=t(4098);function resolveYamlBoolean(e){if(e===null)return false;var r=e.length;return r===4&&(e==="true"||e==="True"||e==="TRUE")||r===5&&(e==="false"||e==="False"||e==="FALSE")}function constructYamlBoolean(e){return e==="true"||e==="True"||e==="TRUE"}function isBoolean(e){return Object.prototype.toString.call(e)==="[object Boolean]"}e.exports=new a("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},3250:(e,r,t)=>{"use strict";var a=t(5929);var i=t(4098);var n=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(e){if(e===null)return false;if(!n.test(e)||e[e.length-1]==="_"){return false}return true}function constructYamlFloat(e){var r,t;r=e.replace(/_/g,"").toLowerCase();t=r[0]==="-"?-1:1;if("+-".indexOf(r[0])>=0){r=r.slice(1)}if(r===".inf"){return t===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(r===".nan"){return NaN}return t*parseFloat(r,10)}var s=/^[-+]?[0-9]+e/;function representYamlFloat(e,r){var t;if(isNaN(e)){switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===e){switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===e){switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(a.isNegativeZero(e)){return"-0.0"}t=e.toString(10);return s.test(t)?t.replace("e",".e"):t}function isFloat(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||a.isNegativeZero(e))}e.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},2682:(e,r,t)=>{"use strict";var a=t(5929);var i=t(4098);function isHexCode(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function isOctCode(e){return 48<=e&&e<=55}function isDecCode(e){return 48<=e&&e<=57}function resolveYamlInteger(e){if(e===null)return false;var r=e.length,t=0,a=false,i;if(!r)return false;i=e[t];if(i==="-"||i==="+"){i=e[++t]}if(i==="0"){if(t+1===r)return true;i=e[++t];if(i==="b"){t++;for(;t=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},723:(e,r,t)=>{"use strict";var a=t(4098);e.exports=new a("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})},5831:(e,r,t)=>{"use strict";var a=t(4098);function resolveYamlMerge(e){return e==="<<"||e===null}e.exports=new a("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},2451:(e,r,t)=>{"use strict";var a=t(4098);function resolveYamlNull(e){if(e===null)return true;var r=e.length;return r===1&&e==="~"||r===4&&(e==="null"||e==="Null"||e==="NULL")}function constructYamlNull(){return null}function isNull(e){return e===null}e.exports=new a("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})},3602:(e,r,t)=>{"use strict";var a=t(4098);var i=Object.prototype.hasOwnProperty;var n=Object.prototype.toString;function resolveYamlOmap(e){if(e===null)return true;var r=[],t,a,s,o,l,c=e;for(t=0,a=c.length;t{"use strict";var a=t(4098);var i=Object.prototype.toString;function resolveYamlPairs(e){if(e===null)return true;var r,t,a,n,s,o=e;s=new Array(o.length);for(r=0,t=o.length;r{"use strict";var a=t(4098);e.exports=new a("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})},3051:(e,r,t)=>{"use strict";var a=t(4098);var i=Object.prototype.hasOwnProperty;function resolveYamlSet(e){if(e===null)return true;var r,t=e;for(r in t){if(i.call(t,r)){if(t[r]!==null)return false}}return true}function constructYamlSet(e){return e!==null?e:{}}e.exports=new a("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},802:(e,r,t)=>{"use strict";var a=t(4098);e.exports=new a("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})},8285:(e,r,t)=>{"use strict";var a=t(4098);var i=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var n=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(e){if(e===null)return false;if(i.exec(e)!==null)return true;if(n.exec(e)!==null)return true;return false}function constructYamlTimestamp(e){var r,t,a,s,o,l,c,u=0,f=null,p,d,h;r=i.exec(e);if(r===null)r=n.exec(e);if(r===null)throw new Error("Date resolve error");t=+r[1];a=+r[2]-1;s=+r[3];if(!r[4]){return new Date(Date.UTC(t,a,s))}o=+r[4];l=+r[5];c=+r[6];if(r[7]){u=r[7].slice(0,3);while(u.length<3){u+="0"}u=+u}if(r[9]){p=+r[10];d=+(r[11]||0);f=(p*60+d)*6e4;if(r[9]==="-")f=-f}h=new Date(Date.UTC(t,a,s,o,l,c,u));if(f)h.setTime(h.getTime()-f);return h}function representYamlTimestamp(e){return e.toISOString()}e.exports=new a("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp})},8154:e=>{"use strict";var r=e.exports=function(e,r,t){if(typeof r=="function"){t=r;r={}}t=r.cb||t;var a=typeof t=="function"?t:t.pre||function(){};var i=t.post||function(){};_traverse(r,a,i,e,"",e)};r.keywords={additionalItems:true,items:true,contains:true,additionalProperties:true,propertyNames:true,not:true};r.arrayKeywords={items:true,allOf:true,anyOf:true,oneOf:true};r.propsKeywords={definitions:true,properties:true,patternProperties:true,dependencies:true};r.skipKeywords={default:true,enum:true,const:true,required:true,maximum:true,minimum:true,exclusiveMaximum:true,exclusiveMinimum:true,multipleOf:true,maxLength:true,minLength:true,pattern:true,format:true,maxItems:true,minItems:true,uniqueItems:true,maxProperties:true,minProperties:true};function _traverse(e,t,a,i,n,s,o,l,c,u){if(i&&typeof i=="object"&&!Array.isArray(i)){t(i,n,s,o,l,c,u);for(var f in i){var p=i[f];if(Array.isArray(p)){if(f in r.arrayKeywords){for(var d=0;d{let a;try{a=t(7765)}catch(e){a=t(7147)}const i=t(3706);const{stringify:n,stripBom:s}=t(8171);async function _readFile(e,r={}){if(typeof r==="string"){r={encoding:r}}const t=r.fs||a;const n="throws"in r?r.throws:true;let o=await i.fromCallback(t.readFile)(e,r);o=s(o);let l;try{l=JSON.parse(o,r?r.reviver:null)}catch(r){if(n){r.message=`${e}: ${r.message}`;throw r}else{return null}}return l}const o=i.fromPromise(_readFile);function readFileSync(e,r={}){if(typeof r==="string"){r={encoding:r}}const t=r.fs||a;const i="throws"in r?r.throws:true;try{let a=t.readFileSync(e,r);a=s(a);return JSON.parse(a,r.reviver)}catch(r){if(i){r.message=`${e}: ${r.message}`;throw r}else{return null}}}async function _writeFile(e,r,t={}){const s=t.fs||a;const o=n(r,t);await i.fromCallback(s.writeFile)(e,o,t)}const l=i.fromPromise(_writeFile);function writeFileSync(e,r,t={}){const i=t.fs||a;const s=n(r,t);return i.writeFileSync(e,s,t)}const c={readFile:o,readFileSync:readFileSync,writeFile:l,writeFileSync:writeFileSync};e.exports=c},8171:e=>{function stringify(e,{EOL:r="\n",finalEOL:t=true,replacer:a=null,spaces:i}={}){const n=t?r:"";const s=JSON.stringify(e,a,i);return s.replace(/\n/g,r)+n}function stripBom(e){if(Buffer.isBuffer(e))e=e.toString("utf8");return e.replace(/^\uFEFF/,"")}e.exports={stringify:stringify,stripBom:stripBom}},9524:e=>{"use strict";e.exports=function(e){if(typeof e!=="string"){throw new Error("expected a string")}return e.split("\n").map(user).filter(Boolean)};function user(e,r){if(!e||!e.length||e.charAt(0)==="#"){return null}var t=e.split(":");return{username:t[0],password:t[1],uid:t[2],gid:t[3],gecos:t[4],homedir:t[5],shell:t[6]}}},1353:(e,r,t)=>{e.exports=t(21)},21:(e,r,t)=>{"use strict";var a=t(1808);var i=t(4404);var n=t(3685);var s=t(5687);var o=t(2361);var l=t(9491);var c=t(3837);r.httpOverHttp=httpOverHttp;r.httpsOverHttp=httpsOverHttp;r.httpOverHttps=httpOverHttps;r.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var r=new TunnelingAgent(e);r.request=n.request;return r}function httpsOverHttp(e){var r=new TunnelingAgent(e);r.request=n.request;r.createSocket=createSecureSocket;r.defaultPort=443;return r}function httpOverHttps(e){var r=new TunnelingAgent(e);r.request=s.request;return r}function httpsOverHttps(e){var r=new TunnelingAgent(e);r.request=s.request;r.createSocket=createSecureSocket;r.defaultPort=443;return r}function TunnelingAgent(e){var r=this;r.options=e||{};r.proxyOptions=r.options.proxy||{};r.maxSockets=r.options.maxSockets||n.Agent.defaultMaxSockets;r.requests=[];r.sockets=[];r.on("free",(function onFree(e,t,a,i){var n=toOptions(t,a,i);for(var s=0,o=r.requests.length;s=this.maxSockets){i.requests.push(n);return}i.createSocket(n,(function(r){r.on("free",onFree);r.on("close",onCloseOrRemove);r.on("agentRemove",onCloseOrRemove);e.onSocket(r);function onFree(){i.emit("free",r,n)}function onCloseOrRemove(e){i.removeSocket(r);r.removeListener("free",onFree);r.removeListener("close",onCloseOrRemove);r.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(e,r){var t=this;var a={};t.sockets.push(a);var i=mergeOptions({},t.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){i.localAddress=e.localAddress}if(i.proxyAuth){i.headers=i.headers||{};i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")}u("making CONNECT request");var n=t.request(i);n.useChunkedEncodingByDefault=false;n.once("response",onResponse);n.once("upgrade",onUpgrade);n.once("connect",onConnect);n.once("error",onError);n.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,r,t){process.nextTick((function(){onConnect(e,r,t)}))}function onConnect(i,s,o){n.removeAllListeners();s.removeAllListeners();if(i.statusCode!==200){u("tunneling socket could not be established, statusCode=%d",i.statusCode);s.destroy();var l=new Error("tunneling socket could not be established, "+"statusCode="+i.statusCode);l.code="ECONNRESET";e.request.emit("error",l);t.removeSocket(a);return}if(o.length>0){u("got illegal response body from proxy");s.destroy();var l=new Error("got illegal response body from proxy");l.code="ECONNRESET";e.request.emit("error",l);t.removeSocket(a);return}u("tunneling connection has established");t.sockets[t.sockets.indexOf(a)]=s;return r(s)}function onError(r){n.removeAllListeners();u("tunneling socket could not be established, cause=%s\n",r.message,r.stack);var i=new Error("tunneling socket could not be established, "+"cause="+r.message);i.code="ECONNRESET";e.request.emit("error",i);t.removeSocket(a)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var r=this.sockets.indexOf(e);if(r===-1){return}this.sockets.splice(r,1);var t=this.requests.shift();if(t){this.createSocket(t,(function(e){t.request.onSocket(e)}))}};function createSecureSocket(e,r){var t=this;TunnelingAgent.prototype.createSocket.call(t,e,(function(a){var n=e.request.getHeader("host");var s=mergeOptions({},t.options,{socket:a,servername:n?n.replace(/:.*$/,""):e.host});var o=i.connect(0,s);t.sockets[t.sockets.indexOf(a)]=o;r(o)}))}function toOptions(e,r,t){if(typeof e==="string"){return{host:e,port:r,localAddress:t}}return e}function mergeOptions(e){for(var r=1,t=arguments.length;r{"use strict";r.fromCallback=function(e){return Object.defineProperty((function(...r){if(typeof r[r.length-1]==="function")e.apply(this,r);else{return new Promise(((t,a)=>{e.call(this,...r,((e,r)=>e!=null?a(e):t(r)))}))}}),"name",{value:e.name})};r.fromPromise=function(e){return Object.defineProperty((function(...r){const t=r[r.length-1];if(typeof t!=="function")return e.apply(this,r);else e.apply(this,r.slice(0,-1)).then((e=>t(null,e)),t)}),"name",{value:e.name})}},626:function(e,r){ /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ -(function(e,r){true?r(t):0})(this,(function(e){"use strict";function merge(){for(var e=arguments.length,t=Array(e),r=0;r1){t[0]=t[0].slice(0,-1);var n=t.length-1;for(var i=1;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var g=s-o;var y=Math.floor;var b=String.fromCharCode;function error$1(e){throw new RangeError(v[e])}function map(e,t){var r=[];var n=e.length;while(n--){r[n]=t(e[n])}return r}function mapDomain(e,t){var r=e.split("@");var n="";if(r.length>1){n=r[0]+"@";e=r[1]}e=e.replace(m,".");var i=e.split(".");var s=map(i,t).join(".");return n+s}function ucs2decode(e){var t=[];var r=0;var n=e.length;while(r=55296&&i<=56319&&r>1;e+=y(e/t);for(;e>g*a>>1;n+=s){e=y(e/g)}return y(n+(g+1)*e/(e+u))};var k=function decode(e){var t=[];var r=e.length;var n=0;var u=f;var l=c;var p=e.lastIndexOf(d);if(p<0){p=0}for(var h=0;h=128){error$1("not-basic")}t.push(e.charCodeAt(h))}for(var m=p>0?p+1:0;m=r){error$1("invalid-input")}var S=w(e.charCodeAt(m++));if(S>=s||S>y((i-n)/g)){error$1("overflow")}n+=S*g;var _=b<=l?o:b>=l+a?a:b-l;if(S<_){break}var k=s-_;if(g>y(i/k)){error$1("overflow")}g*=k}var P=t.length+1;l=E(n-v,P,v==0);if(y(n/P)>i-u){error$1("overflow")}u+=y(n/P);n%=P;t.splice(n++,0,u)}return String.fromCodePoint.apply(String,t)};var P=function encode(e){var t=[];e=ucs2decode(e);var r=e.length;var n=f;var u=0;var l=c;var p=true;var h=false;var m=undefined;try{for(var v=e[Symbol.iterator](),g;!(p=(g=v.next()).done);p=true){var S=g.value;if(S<128){t.push(b(S))}}}catch(e){h=true;m=e}finally{try{if(!p&&v.return){v.return()}}finally{if(h){throw m}}}var w=t.length;var k=w;if(w){t.push(d)}while(k=n&&Ay((i-u)/T)){error$1("overflow")}u+=(P-n)*T;n=P;var D=true;var F=false;var L=undefined;try{for(var N=e[Symbol.iterator](),j;!(D=(j=N.next()).done);D=true){var B=j.value;if(Bi){error$1("overflow")}if(B==n){var M=u;for(var $=s;;$+=s){var U=$<=l?o:$>=l+a?a:$-l;if(M>6|192).toString(16).toUpperCase()+"%"+(t&63|128).toString(16).toUpperCase();else r="%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(t&63|128).toString(16).toUpperCase();return r}function pctDecChars(e){var t="";var r=0;var n=e.length;while(r=194&&i<224){if(n-r>=6){var s=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((i&31)<<6|s&63)}else{t+=e.substr(r,6)}r+=6}else if(i>=224){if(n-r>=9){var o=parseInt(e.substr(r+4,2),16);var a=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((i&15)<<12|(o&63)<<6|a&63)}else{t+=e.substr(r,9)}r+=9}else{t+=e.substr(r,3);r+=3}}return t}function _normalizeComponentEncoding(e,t){function decodeUnreserved(e){var r=pctDecChars(e);return!r.match(t.UNRESERVED)?e:r}if(e.scheme)e.scheme=String(e.scheme).replace(t.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(t.NOT_SCHEME,"");if(e.userinfo!==undefined)e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_USERINFO,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.host!==undefined)e.host=String(e.host).replace(t.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(t.NOT_HOST,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.path!==undefined)e.path=String(e.path).replace(t.PCT_ENCODED,decodeUnreserved).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.query!==undefined)e.query=String(e.query).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_QUERY,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.fragment!==undefined)e.fragment=String(e.fragment).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_FRAGMENT,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);return e}function _stripLeadingZeros(e){return e.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(e,t){var r=e.match(t.IPV4ADDRESS)||[];var i=n(r,2),s=i[1];if(s){return s.split(".").map(_stripLeadingZeros).join(".")}else{return e}}function _normalizeIPv6(e,t){var r=e.match(t.IPV6ADDRESS)||[];var i=n(r,3),s=i[1],o=i[2];if(s){var a=s.toLowerCase().split("::").reverse(),u=n(a,2),l=u[0],c=u[1];var f=c?c.split(":").map(_stripLeadingZeros):[];var d=l.split(":").map(_stripLeadingZeros);var p=t.IPV4ADDRESS.test(d[d.length-1]);var h=p?7:8;var m=d.length-h;var v=Array(h);for(var g=0;g1){var w=v.slice(0,b.index);var _=v.slice(b.index+b.length);S=w.join(":")+"::"+_.join(":")}else{S=v.join(":")}if(o){S+="%"+o}return S}else{return e}}var I=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;var A="".match(/(){0}/)[1]===undefined;function parse(e){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var i={};var s=n.iri!==false?r:t;if(n.reference==="suffix")e=(n.scheme?n.scheme+":":"")+"//"+e;var o=e.match(I);if(o){if(A){i.scheme=o[1];i.userinfo=o[3];i.host=o[4];i.port=parseInt(o[5],10);i.path=o[6]||"";i.query=o[7];i.fragment=o[8];if(isNaN(i.port)){i.port=o[5]}}else{i.scheme=o[1]||undefined;i.userinfo=e.indexOf("@")!==-1?o[3]:undefined;i.host=e.indexOf("//")!==-1?o[4]:undefined;i.port=parseInt(o[5],10);i.path=o[6]||"";i.query=e.indexOf("?")!==-1?o[7]:undefined;i.fragment=e.indexOf("#")!==-1?o[8]:undefined;if(isNaN(i.port)){i.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:undefined}}if(i.host){i.host=_normalizeIPv6(_normalizeIPv4(i.host,s),s)}if(i.scheme===undefined&&i.userinfo===undefined&&i.host===undefined&&i.port===undefined&&!i.path&&i.query===undefined){i.reference="same-document"}else if(i.scheme===undefined){i.reference="relative"}else if(i.fragment===undefined){i.reference="absolute"}else{i.reference="uri"}if(n.reference&&n.reference!=="suffix"&&n.reference!==i.reference){i.error=i.error||"URI is not a "+n.reference+" reference."}var a=R[(n.scheme||i.scheme||"").toLowerCase()];if(!n.unicodeSupport&&(!a||!a.unicodeSupport)){if(i.host&&(n.domainHost||a&&a.domainHost)){try{i.host=O.toASCII(i.host.replace(s.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){i.error=i.error||"Host's domain name can not be converted to ASCII via punycode: "+e}}_normalizeComponentEncoding(i,t)}else{_normalizeComponentEncoding(i,s)}if(a&&a.parse){a.parse(i,n)}}else{i.error=i.error||"URI can not be parsed."}return i}function _recomposeAuthority(e,n){var i=n.iri!==false?r:t;var s=[];if(e.userinfo!==undefined){s.push(e.userinfo);s.push("@")}if(e.host!==undefined){s.push(_normalizeIPv6(_normalizeIPv4(String(e.host),i),i).replace(i.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"})))}if(typeof e.port==="number"||typeof e.port==="string"){s.push(":");s.push(String(e.port))}return s.length?s.join(""):undefined}var T=/^\.\.?\//;var D=/^\/\.(\/|$)/;var F=/^\/\.\.(\/|$)/;var L=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(e){var t=[];while(e.length){if(e.match(T)){e=e.replace(T,"")}else if(e.match(D)){e=e.replace(D,"/")}else if(e.match(F)){e=e.replace(F,"/");t.pop()}else if(e==="."||e===".."){e=""}else{var r=e.match(L);if(r){var n=r[0];e=e.slice(n.length);t.push(n)}else{throw new Error("Unexpected dot segment condition")}}}return t.join("")}function serialize(e){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var i=n.iri?r:t;var s=[];var o=R[(n.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize)o.serialize(e,n);if(e.host){if(i.IPV6ADDRESS.test(e.host)){}else if(n.domainHost||o&&o.domainHost){try{e.host=!n.iri?O.toASCII(e.host.replace(i.PCT_ENCODED,pctDecChars).toLowerCase()):O.toUnicode(e.host)}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(!n.iri?"ASCII":"Unicode")+" via punycode: "+t}}}_normalizeComponentEncoding(e,i);if(n.reference!=="suffix"&&e.scheme){s.push(e.scheme);s.push(":")}var a=_recomposeAuthority(e,n);if(a!==undefined){if(n.reference!=="suffix"){s.push("//")}s.push(a);if(e.path&&e.path.charAt(0)!=="/"){s.push("/")}}if(e.path!==undefined){var u=e.path;if(!n.absolutePath&&(!o||!o.absolutePath)){u=removeDotSegments(u)}if(a===undefined){u=u.replace(/^\/\//,"/%2F")}s.push(u)}if(e.query!==undefined){s.push("?");s.push(e.query)}if(e.fragment!==undefined){s.push("#");s.push(e.fragment)}return s.join("")}function resolveComponents(e,t){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var n=arguments[3];var i={};if(!n){e=parse(serialize(e,r),r);t=parse(serialize(t,r),r)}r=r||{};if(!r.tolerant&&t.scheme){i.scheme=t.scheme;i.userinfo=t.userinfo;i.host=t.host;i.port=t.port;i.path=removeDotSegments(t.path||"");i.query=t.query}else{if(t.userinfo!==undefined||t.host!==undefined||t.port!==undefined){i.userinfo=t.userinfo;i.host=t.host;i.port=t.port;i.path=removeDotSegments(t.path||"");i.query=t.query}else{if(!t.path){i.path=e.path;if(t.query!==undefined){i.query=t.query}else{i.query=e.query}}else{if(t.path.charAt(0)==="/"){i.path=removeDotSegments(t.path)}else{if((e.userinfo!==undefined||e.host!==undefined||e.port!==undefined)&&!e.path){i.path="/"+t.path}else if(!e.path){i.path=t.path}else{i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path}i.path=removeDotSegments(i.path)}i.query=t.query}i.userinfo=e.userinfo;i.host=e.host;i.port=e.port}i.scheme=e.scheme}i.fragment=t.fragment;return i}function resolve(e,t,r){var n=assign({scheme:"null"},r);return serialize(resolveComponents(parse(e,n),parse(t,n),n,true),n)}function normalize(e,t){if(typeof e==="string"){e=serialize(parse(e,t),t)}else if(typeOf(e)==="object"){e=parse(serialize(e,t),t)}return e}function equal(e,t,r){if(typeof e==="string"){e=serialize(parse(e,r),r)}else if(typeOf(e)==="object"){e=serialize(e,r)}if(typeof t==="string"){t=serialize(parse(t,r),r)}else if(typeOf(t)==="object"){t=serialize(t,r)}return e===t}function escapeComponent(e,n){return e&&e.toString().replace(!n||!n.iri?t.ESCAPE:r.ESCAPE,pctEncChar)}function unescapeComponent(e,n){return e&&e.toString().replace(!n||!n.iri?t.PCT_ENCODED:r.PCT_ENCODED,pctDecChars)}var N={scheme:"http",domainHost:true,parse:function parse(e,t){if(!e.host){e.error=e.error||"HTTP URIs must have a host."}return e},serialize:function serialize(e,t){var r=String(e.scheme).toLowerCase()==="https";if(e.port===(r?443:80)||e.port===""){e.port=undefined}if(!e.path){e.path="/"}return e}};var j={scheme:"https",domainHost:N.domainHost,parse:N.parse,serialize:N.serialize};function isSecure(e){return typeof e.secure==="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}var B={scheme:"ws",domainHost:true,parse:function parse(e,t){var r=e;r.secure=isSecure(r);r.resourceName=(r.path||"/")+(r.query?"?"+r.query:"");r.path=undefined;r.query=undefined;return r},serialize:function serialize(e,t){if(e.port===(isSecure(e)?443:80)||e.port===""){e.port=undefined}if(typeof e.secure==="boolean"){e.scheme=e.secure?"wss":"ws";e.secure=undefined}if(e.resourceName){var r=e.resourceName.split("?"),i=n(r,2),s=i[0],o=i[1];e.path=s&&s!=="/"?s:undefined;e.query=o;e.resourceName=undefined}e.fragment=undefined;return e}};var M={scheme:"wss",domainHost:B.domainHost,parse:B.parse,serialize:B.serialize};var $={};var U=true;var H="[A-Za-z0-9\\-\\.\\_\\~"+(U?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]";var q="[0-9A-Fa-f]";var V=subexp(subexp("%[EFef]"+q+"%"+q+q+"%"+q+q)+"|"+subexp("%[89A-Fa-f]"+q+"%"+q+q)+"|"+subexp("%"+q+q));var z="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";var W="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";var K=merge(W,'[\\"\\\\]');var Y="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";var G=new RegExp(H,"g");var Q=new RegExp(V,"g");var J=new RegExp(merge("[^]",z,"[\\.]",'[\\"]',K),"g");var Z=new RegExp(merge("[^]",H,Y),"g");var X=Z;function decodeUnreserved(e){var t=pctDecChars(e);return!t.match(G)?e:t}var ee={scheme:"mailto",parse:function parse$$1(e,t){var r=e;var n=r.to=r.path?r.path.split(","):[];r.path=undefined;if(r.query){var i=false;var s={};var o=r.query.split("&");for(var a=0,u=o.length;a{e.exports=r(3837).deprecate},2531:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next){yield e.value}}}},6368:(e,t,r)=>{"use strict";e.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(e){var t=this;if(!(t instanceof Yallist)){t=new Yallist}t.tail=null;t.head=null;t.length=0;if(e&&typeof e.forEach==="function"){e.forEach((function(e){t.push(e)}))}else if(arguments.length>0){for(var r=0,n=arguments.length;r1){r=t}else if(this.head){n=this.head.next;r=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=0;n!==null;i++){r=e(r,n.value,i);n=n.next}return r};Yallist.prototype.reduceReverse=function(e,t){var r;var n=this.tail;if(arguments.length>1){r=t}else if(this.tail){n=this.tail.prev;r=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=this.length-1;n!==null;i--){r=e(r,n.value,i);n=n.prev}return r};Yallist.prototype.toArray=function(){var e=new Array(this.length);for(var t=0,r=this.head;r!==null;t++){e[t]=r.value;r=r.next}return e};Yallist.prototype.toArrayReverse=function(){var e=new Array(this.length);for(var t=0,r=this.tail;r!==null;t++){e[t]=r.value;r=r.prev}return e};Yallist.prototype.slice=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var r=new Yallist;if(tthis.length){t=this.length}for(var n=0,i=this.head;i!==null&&nthis.length){t=this.length}for(var n=this.length,i=this.tail;i!==null&&n>t;n--){i=i.prev}for(;i!==null&&n>e;n--,i=i.prev){r.push(i.value)}return r};Yallist.prototype.splice=function(e,t,...r){if(e>this.length){e=this.length-1}if(e<0){e=this.length+e}for(var n=0,i=this.head;i!==null&&n{module.exports=eval("require")("supports-color")},9491:e=>{"use strict";e.exports=require("assert")},4300:e=>{"use strict";e.exports=require("buffer")},2081:e=>{"use strict";e.exports=require("child_process")},2057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},7282:e=>{"use strict";e.exports=require("process")},2781:e=>{"use strict";e.exports=require("stream")},1576:e=>{"use strict";e.exports=require("string_decoder")},4404:e=>{"use strict";e.exports=require("tls")},6224:e=>{"use strict";e.exports=require("tty")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9796:e=>{"use strict";e.exports=require("zlib")},3793:(e,t,r)=>{"use strict";t=e.exports=fetch;const n=r(3685);const i=r(5687);const s=r(9796);const o=r(2781);const a=r(5708);const u=r(3837);const l=r(5314);const c=r(6113);const f=r(7310);class FetchBaseError extends Error{constructor(e,t){super(e);Error.captureStackTrace(this,this.constructor);this.type=t}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}class FetchError extends FetchBaseError{constructor(e,t,r){super(e,t);if(r){this.code=this.errno=r.code;this.erroredSysCall=r.syscall}}}const d=Symbol.toStringTag;const isURLSearchParameters=e=>typeof e==="object"&&typeof e.append==="function"&&typeof e.delete==="function"&&typeof e.get==="function"&&typeof e.getAll==="function"&&typeof e.has==="function"&&typeof e.set==="function"&&typeof e.sort==="function"&&e[d]==="URLSearchParams";const isBlob=e=>typeof e==="object"&&typeof e.arrayBuffer==="function"&&typeof e.type==="string"&&typeof e.stream==="function"&&typeof e.constructor==="function"&&/^(Blob|File)$/.test(e[d]);function isFormData(e){return typeof e==="object"&&typeof e.append==="function"&&typeof e.set==="function"&&typeof e.get==="function"&&typeof e.getAll==="function"&&typeof e.delete==="function"&&typeof e.keys==="function"&&typeof e.values==="function"&&typeof e.entries==="function"&&typeof e.constructor==="function"&&e[d]==="FormData"}const isAbortSignal=e=>typeof e==="object"&&e[d]==="AbortSignal";const p="\r\n";const h="-".repeat(2);const m=Buffer.byteLength(p);const getFooter=e=>`${h}${e}${h}${p.repeat(2)}`;function getHeader(e,t,r){let n="";n+=`${h}${e}${p}`;n+=`Content-Disposition: form-data; name="${t}"`;if(isBlob(r)){n+=`; filename="${r.name}"${p}`;n+=`Content-Type: ${r.type||"application/octet-stream"}`}return`${n}${p.repeat(2)}`}const getBoundary=()=>c.randomBytes(8).toString("hex");async function*formDataIterator(e,t){for(const[r,n]of e){yield getHeader(t,r,n);if(isBlob(n)){yield*n.stream()}else{yield n}yield p}yield getFooter(t)}function getFormDataLength(e,t){let r=0;for(const[n,i]of e){r+=Buffer.byteLength(getHeader(t,n,i));if(isBlob(i)){r+=i.size}else{r+=Buffer.byteLength(String(i))}r+=m}r+=Buffer.byteLength(getFooter(t));return r}const v=Symbol("Body internals");class Body{constructor(e,{size:t=0}={}){let r=null;if(e===null){e=null}else if(isURLSearchParameters(e)){e=Buffer.from(e.toString())}else if(isBlob(e));else if(Buffer.isBuffer(e));else if(u.types.isAnyArrayBuffer(e)){e=Buffer.from(e)}else if(ArrayBuffer.isView(e)){e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}else if(e instanceof o);else if(isFormData(e)){r=`NodeFetchFormDataBoundary${getBoundary()}`;e=o.Readable.from(formDataIterator(e,r))}else{e=Buffer.from(String(e))}this[v]={body:e,boundary:r,disturbed:false,error:null};this.size=t;if(e instanceof o){e.on("error",(e=>{const t=e instanceof FetchBaseError?e:new FetchError(`Invalid response body while trying to fetch ${this.url}: ${e.message}`,"system",e);this[v].error=t}))}}get body(){return this[v].body}get bodyUsed(){return this[v].disturbed}async arrayBuffer(){const{buffer:e,byteOffset:t,byteLength:r}=await consumeBody(this);return e.slice(t,t+r)}async blob(){const e=this.headers&&this.headers.get("content-type")||this[v].body&&this[v].body.type||"";const t=await this.buffer();return new l([t],{type:e})}async json(){const e=await consumeBody(this);return JSON.parse(e.toString())}async text(){const e=await consumeBody(this);return e.toString()}buffer(){return consumeBody(this)}}Object.defineProperties(Body.prototype,{body:{enumerable:true},bodyUsed:{enumerable:true},arrayBuffer:{enumerable:true},blob:{enumerable:true},json:{enumerable:true},text:{enumerable:true}});async function consumeBody(e){if(e[v].disturbed){throw new TypeError(`body used already for: ${e.url}`)}e[v].disturbed=true;if(e[v].error){throw e[v].error}let{body:t}=e;if(t===null){return Buffer.alloc(0)}if(isBlob(t)){t=t.stream()}if(Buffer.isBuffer(t)){return t}if(!(t instanceof o)){return Buffer.alloc(0)}const r=[];let n=0;try{for await(const i of t){if(e.size>0&&n+i.length>e.size){const r=new FetchError(`content size at ${e.url} over limit: ${e.size}`,"max-size");t.destroy(r);throw r}n+=i.length;r.push(i)}}catch(t){if(t instanceof FetchBaseError){throw t}else{throw new FetchError(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t)}}if(t.readableEnded===true||t._readableState.ended===true){try{if(r.every((e=>typeof e==="string"))){return Buffer.from(r.join(""))}return Buffer.concat(r,n)}catch(t){throw new FetchError(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t)}}else{throw new FetchError(`Premature close of server response while trying to fetch ${e.url}`)}}const clone=(e,t)=>{let r;let n;let{body:i}=e;if(e.bodyUsed){throw new Error("cannot clone body after it is used")}if(i instanceof o&&typeof i.getBoundary!=="function"){r=new o.PassThrough({highWaterMark:t});n=new o.PassThrough({highWaterMark:t});i.pipe(r);i.pipe(n);e[v].body=r;i=n}return i};const extractContentType=(e,t)=>{if(e===null){return null}if(typeof e==="string"){return"text/plain;charset=UTF-8"}if(isURLSearchParameters(e)){return"application/x-www-form-urlencoded;charset=UTF-8"}if(isBlob(e)){return e.type||null}if(Buffer.isBuffer(e)||u.types.isAnyArrayBuffer(e)||ArrayBuffer.isView(e)){return null}if(e&&typeof e.getBoundary==="function"){return`multipart/form-data;boundary=${e.getBoundary()}`}if(isFormData(e)){return`multipart/form-data; boundary=${t[v].boundary}`}if(e instanceof o){return null}return"text/plain;charset=UTF-8"};const getTotalBytes=e=>{const{body:t}=e;if(t===null){return 0}if(isBlob(t)){return t.size}if(Buffer.isBuffer(t)){return t.length}if(t&&typeof t.getLengthSync==="function"){return t.hasKnownLength&&t.hasKnownLength()?t.getLengthSync():null}if(isFormData(t)){return getFormDataLength(e[v].boundary)}return null};const writeToStream=(e,{body:t})=>{if(t===null){e.end()}else if(isBlob(t)){t.stream().pipe(e)}else if(Buffer.isBuffer(t)){e.write(t);e.end()}else{t.pipe(e)}};const g=typeof n.validateHeaderName==="function"?n.validateHeaderName:e=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(e)){const t=new TypeError(`Header name must be a valid HTTP token [${e}]`);Object.defineProperty(t,"code",{value:"ERR_INVALID_HTTP_TOKEN"});throw t}};const y=typeof n.validateHeaderValue==="function"?n.validateHeaderValue:(e,t)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(t)){const t=new TypeError(`Invalid character in header content ["${e}"]`);Object.defineProperty(t,"code",{value:"ERR_INVALID_CHAR"});throw t}};class Headers extends URLSearchParams{constructor(e){let t=[];if(e instanceof Headers){const r=e.raw();for(const[e,n]of Object.entries(r)){t.push(...n.map((t=>[e,t])))}}else if(e==null);else if(typeof e==="object"&&!u.types.isBoxedPrimitive(e)){const r=e[Symbol.iterator];if(r==null){t.push(...Object.entries(e))}else{if(typeof r!=="function"){throw new TypeError("Header pairs must be iterable")}t=[...e].map((e=>{if(typeof e!=="object"||u.types.isBoxedPrimitive(e)){throw new TypeError("Each header pair must be an iterable object")}return[...e]})).map((e=>{if(e.length!==2){throw new TypeError("Each header pair must be a name/value tuple")}return[...e]}))}}else{throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence> or record)")}t=t.length>0?t.map((([e,t])=>{g(e);y(e,String(t));return[String(e).toLowerCase(),String(t)]})):undefined;super(t);return new Proxy(this,{get(e,t,r){switch(t){case"append":case"set":return(e,n)=>{g(e);y(e,String(n));return URLSearchParams.prototype[t].call(r,String(e).toLowerCase(),String(n))};case"delete":case"has":case"getAll":return e=>{g(e);return URLSearchParams.prototype[t].call(r,String(e).toLowerCase())};case"keys":return()=>{e.sort();return new Set(URLSearchParams.prototype.keys.call(e)).keys()};default:return Reflect.get(e,t,r)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){const t=this.getAll(e);if(t.length===0){return null}let r=t.join(", ");if(/^content-encoding$/i.test(e)){r=r.toLowerCase()}return r}forEach(e){for(const t of this.keys()){e(this.get(t),t)}}*values(){for(const e of this.keys()){yield this.get(e)}}*entries(){for(const e of this.keys()){yield[e,this.get(e)]}}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce(((e,t)=>{e[t]=this.getAll(t);return e}),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce(((e,t)=>{const r=this.getAll(t);if(t==="host"){e[t]=r[0]}else{e[t]=r.length>1?r:r[0]}return e}),{})}}Object.defineProperties(Headers.prototype,["get","entries","forEach","values"].reduce(((e,t)=>{e[t]={enumerable:true};return e}),{}));function fromRawHeaders(e=[]){return new Headers(e.reduce(((e,t,r,n)=>{if(r%2===0){e.push(n.slice(r,r+2))}return e}),[]).filter((([e,t])=>{try{g(e);y(e,String(t));return true}catch{return false}})))}const b=new Set([301,302,303,307,308]);const isRedirect=e=>b.has(e);const S=Symbol("Response internals");class Response extends Body{constructor(e=null,t={}){super(e,t);const r=t.status||200;const n=new Headers(t.headers);if(e!==null&&!n.has("Content-Type")){const t=extractContentType(e);if(t){n.append("Content-Type",t)}}this[S]={url:t.url,status:r,statusText:t.statusText||"",headers:n,counter:t.counter,highWaterMark:t.highWaterMark}}get url(){return this[S].url||""}get status(){return this[S].status}get ok(){return this[S].status>=200&&this[S].status<300}get redirected(){return this[S].counter>0}get statusText(){return this[S].statusText}get headers(){return this[S].headers}get highWaterMark(){return this[S].highWaterMark}clone(){return new Response(clone(this,this.highWaterMark),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size})}static redirect(e,t=302){if(!isRedirect(t)){throw new RangeError('Failed to execute "redirect" on "response": Invalid status code')}return new Response(null,{headers:{location:new URL(e).toString()},status:t})}get[Symbol.toStringTag](){return"Response"}}Object.defineProperties(Response.prototype,{url:{enumerable:true},status:{enumerable:true},ok:{enumerable:true},redirected:{enumerable:true},statusText:{enumerable:true},headers:{enumerable:true},clone:{enumerable:true}});const getSearch=e=>{if(e.search){return e.search}const t=e.href.length-1;const r=e.hash||(e.href[t]==="#"?"#":"");return e.href[t-r.length]==="?"?"?":""};const w=Symbol("Request internals");const isRequest=e=>typeof e==="object"&&typeof e[w]==="object";class Request extends Body{constructor(e,t={}){let r;if(isRequest(e)){r=new URL(e.url)}else{r=new URL(e);e={}}let n=t.method||e.method||"GET";n=n.toUpperCase();if((t.body!=null||isRequest(e))&&e.body!==null&&(n==="GET"||n==="HEAD")){throw new TypeError("Request with GET/HEAD method cannot have body")}const i=t.body?t.body:isRequest(e)&&e.body!==null?clone(e):null;super(i,{size:t.size||e.size||0});const s=new Headers(t.headers||e.headers||{});if(i!==null&&!s.has("Content-Type")){const e=extractContentType(i,this);if(e){s.append("Content-Type",e)}}let o=isRequest(e)?e.signal:null;if("signal"in t){o=t.signal}if(o!==null&&!isAbortSignal(o)){throw new TypeError("Expected signal to be an instanceof AbortSignal")}this[w]={method:n,redirect:t.redirect||e.redirect||"follow",headers:s,parsedURL:r,signal:o};this.follow=t.follow===undefined?e.follow===undefined?20:e.follow:t.follow;this.compress=t.compress===undefined?e.compress===undefined?true:e.compress:t.compress;this.counter=t.counter||e.counter||0;this.agent=t.agent||e.agent;this.highWaterMark=t.highWaterMark||e.highWaterMark||16384;this.insecureHTTPParser=t.insecureHTTPParser||e.insecureHTTPParser||false}get method(){return this[w].method}get url(){return f.format(this[w].parsedURL)}get headers(){return this[w].headers}get redirect(){return this[w].redirect}get signal(){return this[w].signal}clone(){return new Request(this)}get[Symbol.toStringTag](){return"Request"}}Object.defineProperties(Request.prototype,{method:{enumerable:true},url:{enumerable:true},headers:{enumerable:true},redirect:{enumerable:true},clone:{enumerable:true},signal:{enumerable:true}});const getNodeRequestOptions=e=>{const{parsedURL:t}=e[w];const r=new Headers(e[w].headers);if(!r.has("Accept")){r.set("Accept","*/*")}let n=null;if(e.body===null&&/^(post|put)$/i.test(e.method)){n="0"}if(e.body!==null){const t=getTotalBytes(e);if(typeof t==="number"&&!Number.isNaN(t)){n=String(t)}}if(n){r.set("Content-Length",n)}if(!r.has("User-Agent")){r.set("User-Agent","node-fetch")}if(e.compress&&!r.has("Accept-Encoding")){r.set("Accept-Encoding","gzip,deflate,br")}let{agent:i}=e;if(typeof i==="function"){i=i(t)}if(!r.has("Connection")&&!i){r.set("Connection","close")}const s=getSearch(t);const o={path:t.pathname+s,pathname:t.pathname,hostname:t.hostname,protocol:t.protocol,port:t.port,hash:t.hash,search:t.search,query:t.query,href:t.href,method:e.method,headers:r[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:e.insecureHTTPParser,agent:i};return o};class AbortError extends FetchBaseError{constructor(e,t="aborted"){super(e,t)}}const _=new Set(["data:","http:","https:"]);async function fetch(e,t){return new Promise(((r,u)=>{const l=new Request(e,t);const c=getNodeRequestOptions(l);if(!_.has(c.protocol)){throw new TypeError(`node-fetch cannot load ${e}. URL scheme "${c.protocol.replace(/:$/,"")}" is not supported.`)}if(c.protocol==="data:"){const e=a(l.url);const t=new Response(e,{headers:{"Content-Type":e.typeFull}});r(t);return}const f=(c.protocol==="https:"?i:n).request;const{signal:d}=l;let p=null;const abort=()=>{const e=new AbortError("The operation was aborted.");u(e);if(l.body&&l.body instanceof o.Readable){l.body.destroy(e)}if(!p||!p.body){return}p.body.emit("error",e)};if(d&&d.aborted){abort();return}const abortAndFinalize=()=>{abort();finalize()};const h=f(c);if(d){d.addEventListener("abort",abortAndFinalize)}const finalize=()=>{h.abort();if(d){d.removeEventListener("abort",abortAndFinalize)}};h.on("error",(e=>{u(new FetchError(`request to ${l.url} failed, reason: ${e.message}`,"system",e));finalize()}));h.on("response",(e=>{h.setTimeout(0);const n=fromRawHeaders(e.rawHeaders);if(isRedirect(e.statusCode)){const i=n.get("Location");const s=i===null?null:new URL(i,l.url);switch(l.redirect){case"error":u(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${l.url}`,"no-redirect"));finalize();return;case"manual":if(s!==null){try{n.set("Location",s)}catch(e){u(e)}}break;case"follow":{if(s===null){break}if(l.counter>=l.follow){u(new FetchError(`maximum redirect reached at: ${l.url}`,"max-redirect"));finalize();return}const n={headers:new Headers(l.headers),follow:l.follow,counter:l.counter+1,agent:l.agent,compress:l.compress,method:l.method,body:l.body,signal:l.signal,size:l.size};if(e.statusCode!==303&&l.body&&t.body instanceof o.Readable){u(new FetchError("Cannot follow redirect with body being a readable stream","unsupported-redirect"));finalize();return}if(e.statusCode===303||(e.statusCode===301||e.statusCode===302)&&l.method==="POST"){n.method="GET";n.body=undefined;n.headers.delete("content-length")}r(fetch(new Request(s,n)));finalize();return}}}e.once("end",(()=>{if(d){d.removeEventListener("abort",abortAndFinalize)}}));let i=o.pipeline(e,new o.PassThrough,(e=>{u(e)}));if(process.version<"v12.10"){e.on("aborted",abortAndFinalize)}const a={url:l.url,status:e.statusCode,statusText:e.statusMessage,headers:n,size:l.size,counter:l.counter,highWaterMark:l.highWaterMark};const c=n.get("Content-Encoding");if(!l.compress||l.method==="HEAD"||c===null||e.statusCode===204||e.statusCode===304){p=new Response(i,a);r(p);return}const f={flush:s.Z_SYNC_FLUSH,finishFlush:s.Z_SYNC_FLUSH};if(c==="gzip"||c==="x-gzip"){i=o.pipeline(i,s.createGunzip(f),(e=>{u(e)}));p=new Response(i,a);r(p);return}if(c==="deflate"||c==="x-deflate"){const t=o.pipeline(e,new o.PassThrough,(e=>{u(e)}));t.once("data",(e=>{if((e[0]&15)===8){i=o.pipeline(i,s.createInflate(),(e=>{u(e)}))}else{i=o.pipeline(i,s.createInflateRaw(),(e=>{u(e)}))}p=new Response(i,a);r(p)}));return}if(c==="br"){i=o.pipeline(i,s.createBrotliDecompress(),(e=>{u(e)}));p=new Response(i,a);r(p);return}p=new Response(i,a);r(p)}));writeToStream(h,l)}))}t.AbortError=AbortError;t.FetchError=FetchError;t.Headers=Headers;t.Request=Request;t.Response=Response;t["default"]=fetch;t.isRedirect=isRedirect},5379:e=>{"use strict";e.exports=JSON.parse('{"anyOf":[{"$ref":"#/definitions/RunInstall"},{"type":"array","items":{"$ref":"#/definitions/RunInstall"}},{"type":["null","boolean"]}],"definitions":{"RunInstall":{"type":"object","properties":{"recursive":{"type":"boolean"},"cwd":{"type":"string"},"args":{"type":"array","items":{"type":"string"}}}}},"$schema":"http://json-schema.org/draft-07/schema#"}')},3246:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},8703:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var r=__webpack_module_cache__[e]={exports:{}};var n=true;try{__webpack_modules__[e].call(r.exports,r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete __webpack_module_cache__[e]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__=__nccwpck_require__(8243);module.exports=__webpack_exports__})(); \ No newline at end of file +(function(e,t){true?t(r):0})(this,(function(e){"use strict";function merge(){for(var e=arguments.length,r=Array(e),t=0;t1){r[0]=r[0].slice(0,-1);var a=r.length-1;for(var i=1;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var y=n-s;var g=Math.floor;var S=String.fromCharCode;function error$1(e){throw new RangeError(v[e])}function map(e,r){var t=[];var a=e.length;while(a--){t[a]=r(e[a])}return t}function mapDomain(e,r){var t=e.split("@");var a="";if(t.length>1){a=t[0]+"@";e=t[1]}e=e.replace(m,".");var i=e.split(".");var n=map(i,r).join(".");return a+n}function ucs2decode(e){var r=[];var t=0;var a=e.length;while(t=55296&&i<=56319&&t>1;e+=g(e/r);for(;e>y*o>>1;a+=n){e=g(e/y)}return g(a+(y+1)*e/(e+l))};var x=function decode(e){var r=[];var t=e.length;var a=0;var l=f;var c=u;var d=e.lastIndexOf(p);if(d<0){d=0}for(var h=0;h=128){error$1("not-basic")}r.push(e.charCodeAt(h))}for(var m=d>0?d+1:0;m=t){error$1("invalid-input")}var w=E(e.charCodeAt(m++));if(w>=n||w>g((i-a)/y)){error$1("overflow")}a+=w*y;var b=S<=c?s:S>=c+o?o:S-c;if(wg(i/x)){error$1("overflow")}y*=x}var _=r.length+1;c=P(a-v,_,v==0);if(g(a/_)>i-l){error$1("overflow")}l+=g(a/_);a%=_;r.splice(a++,0,l)}return String.fromCodePoint.apply(String,r)};var _=function encode(e){var r=[];e=ucs2decode(e);var t=e.length;var a=f;var l=0;var c=u;var d=true;var h=false;var m=undefined;try{for(var v=e[Symbol.iterator](),y;!(d=(y=v.next()).done);d=true){var w=y.value;if(w<128){r.push(S(w))}}}catch(e){h=true;m=e}finally{try{if(!d&&v.return){v.return()}}finally{if(h){throw m}}}var E=r.length;var x=E;if(E){r.push(p)}while(x=a&&R<_){_=R}}}catch(e){O=true;C=e}finally{try{if(!k&&A.return){A.return()}}finally{if(O){throw C}}}var I=x+1;if(_-a>g((i-l)/I)){error$1("overflow")}l+=(_-a)*I;a=_;var D=true;var j=false;var T=undefined;try{for(var $=e[Symbol.iterator](),N;!(D=(N=$.next()).done);D=true){var L=N.value;if(Li){error$1("overflow")}if(L==a){var M=l;for(var q=n;;q+=n){var U=q<=c?s:q>=c+o?o:q-c;if(M>6|192).toString(16).toUpperCase()+"%"+(r&63|128).toString(16).toUpperCase();else t="%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(r&63|128).toString(16).toUpperCase();return t}function pctDecChars(e){var r="";var t=0;var a=e.length;while(t=194&&i<224){if(a-t>=6){var n=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((i&31)<<6|n&63)}else{r+=e.substr(t,6)}t+=6}else if(i>=224){if(a-t>=9){var s=parseInt(e.substr(t+4,2),16);var o=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((i&15)<<12|(s&63)<<6|o&63)}else{r+=e.substr(t,9)}t+=9}else{r+=e.substr(t,3);t+=3}}return r}function _normalizeComponentEncoding(e,r){function decodeUnreserved(e){var t=pctDecChars(e);return!t.match(r.UNRESERVED)?e:t}if(e.scheme)e.scheme=String(e.scheme).replace(r.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(r.NOT_SCHEME,"");if(e.userinfo!==undefined)e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,decodeUnreserved).replace(r.NOT_USERINFO,pctEncChar).replace(r.PCT_ENCODED,toUpperCase);if(e.host!==undefined)e.host=String(e.host).replace(r.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(r.NOT_HOST,pctEncChar).replace(r.PCT_ENCODED,toUpperCase);if(e.path!==undefined)e.path=String(e.path).replace(r.PCT_ENCODED,decodeUnreserved).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,pctEncChar).replace(r.PCT_ENCODED,toUpperCase);if(e.query!==undefined)e.query=String(e.query).replace(r.PCT_ENCODED,decodeUnreserved).replace(r.NOT_QUERY,pctEncChar).replace(r.PCT_ENCODED,toUpperCase);if(e.fragment!==undefined)e.fragment=String(e.fragment).replace(r.PCT_ENCODED,decodeUnreserved).replace(r.NOT_FRAGMENT,pctEncChar).replace(r.PCT_ENCODED,toUpperCase);return e}function _stripLeadingZeros(e){return e.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(e,r){var t=e.match(r.IPV4ADDRESS)||[];var i=a(t,2),n=i[1];if(n){return n.split(".").map(_stripLeadingZeros).join(".")}else{return e}}function _normalizeIPv6(e,r){var t=e.match(r.IPV6ADDRESS)||[];var i=a(t,3),n=i[1],s=i[2];if(n){var o=n.toLowerCase().split("::").reverse(),l=a(o,2),c=l[0],u=l[1];var f=u?u.split(":").map(_stripLeadingZeros):[];var p=c.split(":").map(_stripLeadingZeros);var d=r.IPV4ADDRESS.test(p[p.length-1]);var h=d?7:8;var m=p.length-h;var v=Array(h);for(var y=0;y1){var E=v.slice(0,S.index);var b=v.slice(S.index+S.length);w=E.join(":")+"::"+b.join(":")}else{w=v.join(":")}if(s){w+="%"+s}return w}else{return e}}var F=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;var R="".match(/(){0}/)[1]===undefined;function parse(e){var a=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var i={};var n=a.iri!==false?t:r;if(a.reference==="suffix")e=(a.scheme?a.scheme+":":"")+"//"+e;var s=e.match(F);if(s){if(R){i.scheme=s[1];i.userinfo=s[3];i.host=s[4];i.port=parseInt(s[5],10);i.path=s[6]||"";i.query=s[7];i.fragment=s[8];if(isNaN(i.port)){i.port=s[5]}}else{i.scheme=s[1]||undefined;i.userinfo=e.indexOf("@")!==-1?s[3]:undefined;i.host=e.indexOf("//")!==-1?s[4]:undefined;i.port=parseInt(s[5],10);i.path=s[6]||"";i.query=e.indexOf("?")!==-1?s[7]:undefined;i.fragment=e.indexOf("#")!==-1?s[8]:undefined;if(isNaN(i.port)){i.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?s[4]:undefined}}if(i.host){i.host=_normalizeIPv6(_normalizeIPv4(i.host,n),n)}if(i.scheme===undefined&&i.userinfo===undefined&&i.host===undefined&&i.port===undefined&&!i.path&&i.query===undefined){i.reference="same-document"}else if(i.scheme===undefined){i.reference="relative"}else if(i.fragment===undefined){i.reference="absolute"}else{i.reference="uri"}if(a.reference&&a.reference!=="suffix"&&a.reference!==i.reference){i.error=i.error||"URI is not a "+a.reference+" reference."}var o=A[(a.scheme||i.scheme||"").toLowerCase()];if(!a.unicodeSupport&&(!o||!o.unicodeSupport)){if(i.host&&(a.domainHost||o&&o.domainHost)){try{i.host=C.toASCII(i.host.replace(n.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){i.error=i.error||"Host's domain name can not be converted to ASCII via punycode: "+e}}_normalizeComponentEncoding(i,r)}else{_normalizeComponentEncoding(i,n)}if(o&&o.parse){o.parse(i,a)}}else{i.error=i.error||"URI can not be parsed."}return i}function _recomposeAuthority(e,a){var i=a.iri!==false?t:r;var n=[];if(e.userinfo!==undefined){n.push(e.userinfo);n.push("@")}if(e.host!==undefined){n.push(_normalizeIPv6(_normalizeIPv4(String(e.host),i),i).replace(i.IPV6ADDRESS,(function(e,r,t){return"["+r+(t?"%25"+t:"")+"]"})))}if(typeof e.port==="number"||typeof e.port==="string"){n.push(":");n.push(String(e.port))}return n.length?n.join(""):undefined}var I=/^\.\.?\//;var D=/^\/\.(\/|$)/;var j=/^\/\.\.(\/|$)/;var T=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(e){var r=[];while(e.length){if(e.match(I)){e=e.replace(I,"")}else if(e.match(D)){e=e.replace(D,"/")}else if(e.match(j)){e=e.replace(j,"/");r.pop()}else if(e==="."||e===".."){e=""}else{var t=e.match(T);if(t){var a=t[0];e=e.slice(a.length);r.push(a)}else{throw new Error("Unexpected dot segment condition")}}}return r.join("")}function serialize(e){var a=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var i=a.iri?t:r;var n=[];var s=A[(a.scheme||e.scheme||"").toLowerCase()];if(s&&s.serialize)s.serialize(e,a);if(e.host){if(i.IPV6ADDRESS.test(e.host)){}else if(a.domainHost||s&&s.domainHost){try{e.host=!a.iri?C.toASCII(e.host.replace(i.PCT_ENCODED,pctDecChars).toLowerCase()):C.toUnicode(e.host)}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(!a.iri?"ASCII":"Unicode")+" via punycode: "+r}}}_normalizeComponentEncoding(e,i);if(a.reference!=="suffix"&&e.scheme){n.push(e.scheme);n.push(":")}var o=_recomposeAuthority(e,a);if(o!==undefined){if(a.reference!=="suffix"){n.push("//")}n.push(o);if(e.path&&e.path.charAt(0)!=="/"){n.push("/")}}if(e.path!==undefined){var l=e.path;if(!a.absolutePath&&(!s||!s.absolutePath)){l=removeDotSegments(l)}if(o===undefined){l=l.replace(/^\/\//,"/%2F")}n.push(l)}if(e.query!==undefined){n.push("?");n.push(e.query)}if(e.fragment!==undefined){n.push("#");n.push(e.fragment)}return n.join("")}function resolveComponents(e,r){var t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var a=arguments[3];var i={};if(!a){e=parse(serialize(e,t),t);r=parse(serialize(r,t),t)}t=t||{};if(!t.tolerant&&r.scheme){i.scheme=r.scheme;i.userinfo=r.userinfo;i.host=r.host;i.port=r.port;i.path=removeDotSegments(r.path||"");i.query=r.query}else{if(r.userinfo!==undefined||r.host!==undefined||r.port!==undefined){i.userinfo=r.userinfo;i.host=r.host;i.port=r.port;i.path=removeDotSegments(r.path||"");i.query=r.query}else{if(!r.path){i.path=e.path;if(r.query!==undefined){i.query=r.query}else{i.query=e.query}}else{if(r.path.charAt(0)==="/"){i.path=removeDotSegments(r.path)}else{if((e.userinfo!==undefined||e.host!==undefined||e.port!==undefined)&&!e.path){i.path="/"+r.path}else if(!e.path){i.path=r.path}else{i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path}i.path=removeDotSegments(i.path)}i.query=r.query}i.userinfo=e.userinfo;i.host=e.host;i.port=e.port}i.scheme=e.scheme}i.fragment=r.fragment;return i}function resolve(e,r,t){var a=assign({scheme:"null"},t);return serialize(resolveComponents(parse(e,a),parse(r,a),a,true),a)}function normalize(e,r){if(typeof e==="string"){e=serialize(parse(e,r),r)}else if(typeOf(e)==="object"){e=parse(serialize(e,r),r)}return e}function equal(e,r,t){if(typeof e==="string"){e=serialize(parse(e,t),t)}else if(typeOf(e)==="object"){e=serialize(e,t)}if(typeof r==="string"){r=serialize(parse(r,t),t)}else if(typeOf(r)==="object"){r=serialize(r,t)}return e===r}function escapeComponent(e,a){return e&&e.toString().replace(!a||!a.iri?r.ESCAPE:t.ESCAPE,pctEncChar)}function unescapeComponent(e,a){return e&&e.toString().replace(!a||!a.iri?r.PCT_ENCODED:t.PCT_ENCODED,pctDecChars)}var $={scheme:"http",domainHost:true,parse:function parse(e,r){if(!e.host){e.error=e.error||"HTTP URIs must have a host."}return e},serialize:function serialize(e,r){var t=String(e.scheme).toLowerCase()==="https";if(e.port===(t?443:80)||e.port===""){e.port=undefined}if(!e.path){e.path="/"}return e}};var N={scheme:"https",domainHost:$.domainHost,parse:$.parse,serialize:$.serialize};function isSecure(e){return typeof e.secure==="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}var L={scheme:"ws",domainHost:true,parse:function parse(e,r){var t=e;t.secure=isSecure(t);t.resourceName=(t.path||"/")+(t.query?"?"+t.query:"");t.path=undefined;t.query=undefined;return t},serialize:function serialize(e,r){if(e.port===(isSecure(e)?443:80)||e.port===""){e.port=undefined}if(typeof e.secure==="boolean"){e.scheme=e.secure?"wss":"ws";e.secure=undefined}if(e.resourceName){var t=e.resourceName.split("?"),i=a(t,2),n=i[0],s=i[1];e.path=n&&n!=="/"?n:undefined;e.query=s;e.resourceName=undefined}e.fragment=undefined;return e}};var M={scheme:"wss",domainHost:L.domainHost,parse:L.parse,serialize:L.serialize};var q={};var U=true;var H="[A-Za-z0-9\\-\\.\\_\\~"+(U?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]";var z="[0-9A-Fa-f]";var B=subexp(subexp("%[EFef]"+z+"%"+z+z+"%"+z+z)+"|"+subexp("%[89A-Fa-f]"+z+"%"+z+z)+"|"+subexp("%"+z+z));var V="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";var Q="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";var W=merge(Q,'[\\"\\\\]');var Y="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";var K=new RegExp(H,"g");var J=new RegExp(B,"g");var G=new RegExp(merge("[^]",V,"[\\.]",'[\\"]',W),"g");var Z=new RegExp(merge("[^]",H,Y),"g");var X=Z;function decodeUnreserved(e){var r=pctDecChars(e);return!r.match(K)?e:r}var ee={scheme:"mailto",parse:function parse$$1(e,r){var t=e;var a=t.to=t.path?t.path.split(","):[];t.path=undefined;if(t.query){var i=false;var n={};var s=t.query.split("&");for(var o=0,l=s.length;o{"use strict";e.exports=require("assert")},2081:e=>{"use strict";e.exports=require("child_process")},2057:e=>{"use strict";e.exports=require("constants")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},7282:e=>{"use strict";e.exports=require("process")},2781:e=>{"use strict";e.exports=require("stream")},4404:e=>{"use strict";e.exports=require("tls")},3837:e=>{"use strict";e.exports=require("util")},5379:e=>{"use strict";e.exports=JSON.parse('{"anyOf":[{"$ref":"#/definitions/RunInstall"},{"type":"array","items":{"$ref":"#/definitions/RunInstall"}},{"type":["null","boolean"]}],"definitions":{"RunInstall":{"type":"object","properties":{"recursive":{"type":"boolean"},"cwd":{"type":"string"},"args":{"type":"array","items":{"type":"string"}}}}},"$schema":"http://json-schema.org/draft-07/schema#"}')},3246:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},8703:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}};var r={};function __nccwpck_require__(t){var a=r[t];if(a!==undefined){return a.exports}var i=r[t]={exports:{}};var n=true;try{e[t].call(i.exports,i,i.exports,__nccwpck_require__);n=false}finally{if(n)delete r[t]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(8243);module.exports=t})(); \ No newline at end of file diff --git a/dist/pnpm.js b/dist/pnpm.js new file mode 100644 index 0000000..0bceb05 --- /dev/null +++ b/dist/pnpm.js @@ -0,0 +1,134031 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __reExport = (target, module2, desc) => { + if (module2 && typeof module2 === "object" || typeof module2 === "function") { + for (let key of __getOwnPropNames(module2)) + if (!__hasOwnProp.call(target, key) && key !== "default") + __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); + } + return target; +}; +var __toModule = (module2) => { + return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); +}; + +// ../../node_modules/.pnpm/graceful-fs@4.2.8/node_modules/graceful-fs/polyfills.js +var require_polyfills = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.8/node_modules/graceful-fs/polyfills.js"(exports2, module2) { + var constants = require("constants"); + var origCwd = process.cwd; + var cwd = null; + var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform; + process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process); + return cwd; + }; + try { + process.cwd(); + } catch (er) { + } + if (typeof process.chdir === "function") { + chdir = process.chdir; + process.chdir = function(d) { + cwd = null; + chdir.call(process, d); + }; + if (Object.setPrototypeOf) + Object.setPrototypeOf(process.chdir, chdir); + } + var chdir; + module2.exports = patch; + function patch(fs) { + if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs); + } + if (!fs.lutimes) { + patchLutimes(fs); + } + fs.chown = chownFix(fs.chown); + fs.fchown = chownFix(fs.fchown); + fs.lchown = chownFix(fs.lchown); + fs.chmod = chmodFix(fs.chmod); + fs.fchmod = chmodFix(fs.fchmod); + fs.lchmod = chmodFix(fs.lchmod); + fs.chownSync = chownFixSync(fs.chownSync); + fs.fchownSync = chownFixSync(fs.fchownSync); + fs.lchownSync = chownFixSync(fs.lchownSync); + fs.chmodSync = chmodFixSync(fs.chmodSync); + fs.fchmodSync = chmodFixSync(fs.fchmodSync); + fs.lchmodSync = chmodFixSync(fs.lchmodSync); + fs.stat = statFix(fs.stat); + fs.fstat = statFix(fs.fstat); + fs.lstat = statFix(fs.lstat); + fs.statSync = statFixSync(fs.statSync); + fs.fstatSync = statFixSync(fs.fstatSync); + fs.lstatSync = statFixSync(fs.lstatSync); + if (!fs.lchmod) { + fs.lchmod = function(path, mode, cb) { + if (cb) + process.nextTick(cb); + }; + fs.lchmodSync = function() { + }; + } + if (!fs.lchown) { + fs.lchown = function(path, uid, gid, cb) { + if (cb) + process.nextTick(cb); + }; + fs.lchownSync = function() { + }; + } + if (platform === "win32") { + fs.rename = function(fs$rename) { + return function(from, to, cb) { + var start = Date.now(); + var backoff = 0; + fs$rename(from, to, function CB(er) { + if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { + setTimeout(function() { + fs.stat(to, function(stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er); + }); + }, backoff); + if (backoff < 100) + backoff += 10; + return; + } + if (cb) + cb(er); + }); + }; + }(fs.rename); + } + fs.read = function(fs$read) { + function read(fd, buffer, offset, length, position, callback_) { + var callback; + if (callback_ && typeof callback_ === "function") { + var eagCounter = 0; + callback = function(er, _, __) { + if (er && er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + return fs$read.call(fs, fd, buffer, offset, length, position, callback); + } + callback_.apply(this, arguments); + }; + } + return fs$read.call(fs, fd, buffer, offset, length, position, callback); + } + if (Object.setPrototypeOf) + Object.setPrototypeOf(read, fs$read); + return read; + }(fs.read); + fs.readSync = function(fs$readSync) { + return function(fd, buffer, offset, length, position) { + var eagCounter = 0; + while (true) { + try { + return fs$readSync.call(fs, fd, buffer, offset, length, position); + } catch (er) { + if (er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + continue; + } + throw er; + } + } + }; + }(fs.readSync); + function patchLchmod(fs2) { + fs2.lchmod = function(path, mode, callback) { + fs2.open(path, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) { + if (err) { + if (callback) + callback(err); + return; + } + fs2.fchmod(fd, mode, function(err2) { + fs2.close(fd, function(err22) { + if (callback) + callback(err2 || err22); + }); + }); + }); + }; + fs2.lchmodSync = function(path, mode) { + var fd = fs2.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode); + var threw = true; + var ret; + try { + ret = fs2.fchmodSync(fd, mode); + threw = false; + } finally { + if (threw) { + try { + fs2.closeSync(fd); + } catch (er) { + } + } else { + fs2.closeSync(fd); + } + } + return ret; + }; + } + function patchLutimes(fs2) { + if (constants.hasOwnProperty("O_SYMLINK")) { + fs2.lutimes = function(path, at, mt, cb) { + fs2.open(path, constants.O_SYMLINK, function(er, fd) { + if (er) { + if (cb) + cb(er); + return; + } + fs2.futimes(fd, at, mt, function(er2) { + fs2.close(fd, function(er22) { + if (cb) + cb(er2 || er22); + }); + }); + }); + }; + fs2.lutimesSync = function(path, at, mt) { + var fd = fs2.openSync(path, constants.O_SYMLINK); + var ret; + var threw = true; + try { + ret = fs2.futimesSync(fd, at, mt); + threw = false; + } finally { + if (threw) { + try { + fs2.closeSync(fd); + } catch (er) { + } + } else { + fs2.closeSync(fd); + } + } + return ret; + }; + } else { + fs2.lutimes = function(_a, _b, _c, cb) { + if (cb) + process.nextTick(cb); + }; + fs2.lutimesSync = function() { + }; + } + } + function chmodFix(orig) { + if (!orig) + return orig; + return function(target, mode, cb) { + return orig.call(fs, target, mode, function(er) { + if (chownErOk(er)) + er = null; + if (cb) + cb.apply(this, arguments); + }); + }; + } + function chmodFixSync(orig) { + if (!orig) + return orig; + return function(target, mode) { + try { + return orig.call(fs, target, mode); + } catch (er) { + if (!chownErOk(er)) + throw er; + } + }; + } + function chownFix(orig) { + if (!orig) + return orig; + return function(target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function(er) { + if (chownErOk(er)) + er = null; + if (cb) + cb.apply(this, arguments); + }); + }; + } + function chownFixSync(orig) { + if (!orig) + return orig; + return function(target, uid, gid) { + try { + return orig.call(fs, target, uid, gid); + } catch (er) { + if (!chownErOk(er)) + throw er; + } + }; + } + function statFix(orig) { + if (!orig) + return orig; + return function(target, options, cb) { + if (typeof options === "function") { + cb = options; + options = null; + } + function callback(er, stats) { + if (stats) { + if (stats.uid < 0) + stats.uid += 4294967296; + if (stats.gid < 0) + stats.gid += 4294967296; + } + if (cb) + cb.apply(this, arguments); + } + return options ? orig.call(fs, target, options, callback) : orig.call(fs, target, callback); + }; + } + function statFixSync(orig) { + if (!orig) + return orig; + return function(target, options) { + var stats = options ? orig.call(fs, target, options) : orig.call(fs, target); + if (stats.uid < 0) + stats.uid += 4294967296; + if (stats.gid < 0) + stats.gid += 4294967296; + return stats; + }; + } + function chownErOk(er) { + if (!er) + return true; + if (er.code === "ENOSYS") + return true; + var nonroot = !process.getuid || process.getuid() !== 0; + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true; + } + return false; + } + } + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.8/node_modules/graceful-fs/legacy-streams.js +var require_legacy_streams = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.8/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { + var Stream = require("stream").Stream; + module2.exports = legacy; + function legacy(fs) { + return { + ReadStream, + WriteStream + }; + function ReadStream(path, options) { + if (!(this instanceof ReadStream)) + return new ReadStream(path, options); + Stream.call(this); + var self2 = this; + this.path = path; + this.fd = null; + this.readable = true; + this.paused = false; + this.flags = "r"; + this.mode = 438; + this.bufferSize = 64 * 1024; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.encoding) + this.setEncoding(this.encoding); + if (this.start !== void 0) { + if (typeof this.start !== "number") { + throw TypeError("start must be a Number"); + } + if (this.end === void 0) { + this.end = Infinity; + } else if (typeof this.end !== "number") { + throw TypeError("end must be a Number"); + } + if (this.start > this.end) { + throw new Error("start must be <= end"); + } + this.pos = this.start; + } + if (this.fd !== null) { + process.nextTick(function() { + self2._read(); + }); + return; + } + fs.open(this.path, this.flags, this.mode, function(err, fd) { + if (err) { + self2.emit("error", err); + self2.readable = false; + return; + } + self2.fd = fd; + self2.emit("open", fd); + self2._read(); + }); + } + function WriteStream(path, options) { + if (!(this instanceof WriteStream)) + return new WriteStream(path, options); + Stream.call(this); + this.path = path; + this.fd = null; + this.writable = true; + this.flags = "w"; + this.encoding = "binary"; + this.mode = 438; + this.bytesWritten = 0; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.start !== void 0) { + if (typeof this.start !== "number") { + throw TypeError("start must be a Number"); + } + if (this.start < 0) { + throw new Error("start must be >= zero"); + } + this.pos = this.start; + } + this.busy = false; + this._queue = []; + if (this.fd === null) { + this._open = fs.open; + this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); + this.flush(); + } + } + } + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.8/node_modules/graceful-fs/clone.js +var require_clone = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.8/node_modules/graceful-fs/clone.js"(exports2, module2) { + "use strict"; + module2.exports = clone; + var getPrototypeOf = Object.getPrototypeOf || function(obj) { + return obj.__proto__; + }; + function clone(obj) { + if (obj === null || typeof obj !== "object") + return obj; + if (obj instanceof Object) + var copy = { __proto__: getPrototypeOf(obj) }; + else + var copy = Object.create(null); + Object.getOwnPropertyNames(obj).forEach(function(key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); + }); + return copy; + } + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.8/node_modules/graceful-fs/graceful-fs.js +var require_graceful_fs = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.8/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { + var fs = require("fs"); + var polyfills = require_polyfills(); + var legacy = require_legacy_streams(); + var clone = require_clone(); + var util = require("util"); + var gracefulQueue; + var previousSymbol; + if (typeof Symbol === "function" && typeof Symbol.for === "function") { + gracefulQueue = Symbol.for("graceful-fs.queue"); + previousSymbol = Symbol.for("graceful-fs.previous"); + } else { + gracefulQueue = "___graceful-fs.queue"; + previousSymbol = "___graceful-fs.previous"; + } + function noop() { + } + function publishQueue(context, queue2) { + Object.defineProperty(context, gracefulQueue, { + get: function() { + return queue2; + } + }); + } + var debug = noop; + if (util.debuglog) + debug = util.debuglog("gfs4"); + else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) + debug = function() { + var m = util.format.apply(util, arguments); + m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); + console.error(m); + }; + if (!fs[gracefulQueue]) { + queue = global[gracefulQueue] || []; + publishQueue(fs, queue); + fs.close = function(fs$close) { + function close(fd, cb) { + return fs$close.call(fs, fd, function(err) { + if (!err) { + resetQueue(); + } + if (typeof cb === "function") + cb.apply(this, arguments); + }); + } + Object.defineProperty(close, previousSymbol, { + value: fs$close + }); + return close; + }(fs.close); + fs.closeSync = function(fs$closeSync) { + function closeSync(fd) { + fs$closeSync.apply(fs, arguments); + resetQueue(); + } + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }); + return closeSync; + }(fs.closeSync); + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { + process.on("exit", function() { + debug(fs[gracefulQueue]); + require("assert").equal(fs[gracefulQueue].length, 0); + }); + } + } + var queue; + if (!global[gracefulQueue]) { + publishQueue(global, fs[gracefulQueue]); + } + module2.exports = patch(clone(fs)); + if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { + module2.exports = patch(fs); + fs.__patched = true; + } + function patch(fs2) { + polyfills(fs2); + fs2.gracefulify = patch; + fs2.createReadStream = createReadStream; + fs2.createWriteStream = createWriteStream; + var fs$readFile = fs2.readFile; + fs2.readFile = readFile; + function readFile(path, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$readFile(path, options, cb); + function go$readFile(path2, options2, cb2, startTime) { + return fs$readFile(path2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$readFile, [path2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$writeFile = fs2.writeFile; + fs2.writeFile = writeFile; + function writeFile(path, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$writeFile(path, data, options, cb); + function go$writeFile(path2, data2, options2, cb2, startTime) { + return fs$writeFile(path2, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$writeFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$appendFile = fs2.appendFile; + if (fs$appendFile) + fs2.appendFile = appendFile; + function appendFile(path, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$appendFile(path, data, options, cb); + function go$appendFile(path2, data2, options2, cb2, startTime) { + return fs$appendFile(path2, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$appendFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$copyFile = fs2.copyFile; + if (fs$copyFile) + fs2.copyFile = copyFile; + function copyFile(src, dest, flags, cb) { + if (typeof flags === "function") { + cb = flags; + flags = 0; + } + return go$copyFile(src, dest, flags, cb); + function go$copyFile(src2, dest2, flags2, cb2, startTime) { + return fs$copyFile(src2, dest2, flags2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$readdir = fs2.readdir; + fs2.readdir = readdir; + function readdir(path, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$readdir(path, options, cb); + function go$readdir(path2, options2, cb2, startTime) { + return fs$readdir(path2, options2, function(err, files) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$readdir, [path2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (files && files.sort) + files.sort(); + if (typeof cb2 === "function") + cb2.call(this, err, files); + } + }); + } + } + if (process.version.substr(0, 4) === "v0.8") { + var legStreams = legacy(fs2); + ReadStream = legStreams.ReadStream; + WriteStream = legStreams.WriteStream; + } + var fs$ReadStream = fs2.ReadStream; + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype); + ReadStream.prototype.open = ReadStream$open; + } + var fs$WriteStream = fs2.WriteStream; + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype); + WriteStream.prototype.open = WriteStream$open; + } + Object.defineProperty(fs2, "ReadStream", { + get: function() { + return ReadStream; + }, + set: function(val) { + ReadStream = val; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(fs2, "WriteStream", { + get: function() { + return WriteStream; + }, + set: function(val) { + WriteStream = val; + }, + enumerable: true, + configurable: true + }); + var FileReadStream = ReadStream; + Object.defineProperty(fs2, "FileReadStream", { + get: function() { + return FileReadStream; + }, + set: function(val) { + FileReadStream = val; + }, + enumerable: true, + configurable: true + }); + var FileWriteStream = WriteStream; + Object.defineProperty(fs2, "FileWriteStream", { + get: function() { + return FileWriteStream; + }, + set: function(val) { + FileWriteStream = val; + }, + enumerable: true, + configurable: true + }); + function ReadStream(path, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this; + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments); + } + function ReadStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + if (that.autoClose) + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + that.read(); + } + }); + } + function WriteStream(path, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this; + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments); + } + function WriteStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + } + }); + } + function createReadStream(path, options) { + return new fs2.ReadStream(path, options); + } + function createWriteStream(path, options) { + return new fs2.WriteStream(path, options); + } + var fs$open = fs2.open; + fs2.open = open; + function open(path, flags, mode, cb) { + if (typeof mode === "function") + cb = mode, mode = null; + return go$open(path, flags, mode, cb); + function go$open(path2, flags2, mode2, cb2, startTime) { + return fs$open(path2, flags2, mode2, function(err, fd) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$open, [path2, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + return fs2; + } + function enqueue(elem) { + debug("ENQUEUE", elem[0].name, elem[1]); + fs[gracefulQueue].push(elem); + retry(); + } + var retryTimer; + function resetQueue() { + var now = Date.now(); + for (var i = 0; i < fs[gracefulQueue].length; ++i) { + if (fs[gracefulQueue][i].length > 2) { + fs[gracefulQueue][i][3] = now; + fs[gracefulQueue][i][4] = now; + } + } + retry(); + } + function retry() { + clearTimeout(retryTimer); + retryTimer = void 0; + if (fs[gracefulQueue].length === 0) + return; + var elem = fs[gracefulQueue].shift(); + var fn2 = elem[0]; + var args2 = elem[1]; + var err = elem[2]; + var startTime = elem[3]; + var lastTime = elem[4]; + if (startTime === void 0) { + debug("RETRY", fn2.name, args2); + fn2.apply(null, args2); + } else if (Date.now() - startTime >= 6e4) { + debug("TIMEOUT", fn2.name, args2); + var cb = args2.pop(); + if (typeof cb === "function") + cb.call(null, err); + } else { + var sinceAttempt = Date.now() - lastTime; + var sinceStart = Math.max(lastTime - startTime, 1); + var desiredDelay = Math.min(sinceStart * 1.2, 100); + if (sinceAttempt >= desiredDelay) { + debug("RETRY", fn2.name, args2); + fn2.apply(null, args2.concat([startTime])); + } else { + fs[gracefulQueue].push(elem); + } + } + if (retryTimer === void 0) { + retryTimer = setTimeout(retry, 0); + } + } + } +}); + +// ../../node_modules/.pnpm/strip-bom@4.0.0/node_modules/strip-bom/index.js +var require_strip_bom = __commonJS({ + "../../node_modules/.pnpm/strip-bom@4.0.0/node_modules/strip-bom/index.js"(exports2, module2) { + "use strict"; + module2.exports = (string) => { + if (typeof string !== "string") { + throw new TypeError(`Expected a string, got ${typeof string}`); + } + if (string.charCodeAt(0) === 65279) { + return string.slice(1); + } + return string; + }; + } +}); + +// ../../node_modules/.pnpm/is-arrayish@0.2.1/node_modules/is-arrayish/index.js +var require_is_arrayish = __commonJS({ + "../../node_modules/.pnpm/is-arrayish@0.2.1/node_modules/is-arrayish/index.js"(exports2, module2) { + "use strict"; + module2.exports = function isArrayish(obj) { + if (!obj) { + return false; + } + return obj instanceof Array || Array.isArray(obj) || obj.length >= 0 && obj.splice instanceof Function; + }; + } +}); + +// ../../node_modules/.pnpm/error-ex@1.3.2/node_modules/error-ex/index.js +var require_error_ex = __commonJS({ + "../../node_modules/.pnpm/error-ex@1.3.2/node_modules/error-ex/index.js"(exports2, module2) { + "use strict"; + var util = require("util"); + var isArrayish = require_is_arrayish(); + var errorEx = function errorEx2(name, properties) { + if (!name || name.constructor !== String) { + properties = name || {}; + name = Error.name; + } + var errorExError = function ErrorEXError(message2) { + if (!this) { + return new ErrorEXError(message2); + } + message2 = message2 instanceof Error ? message2.message : message2 || this.message; + Error.call(this, message2); + Error.captureStackTrace(this, errorExError); + this.name = name; + Object.defineProperty(this, "message", { + configurable: true, + enumerable: false, + get: function() { + var newMessage = message2.split(/\r?\n/g); + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } + var modifier = properties[key]; + if ("message" in modifier) { + newMessage = modifier.message(this[key], newMessage) || newMessage; + if (!isArrayish(newMessage)) { + newMessage = [newMessage]; + } + } + } + return newMessage.join("\n"); + }, + set: function(v) { + message2 = v; + } + }); + var overwrittenStack = null; + var stackDescriptor = Object.getOwnPropertyDescriptor(this, "stack"); + var stackGetter = stackDescriptor.get; + var stackValue = stackDescriptor.value; + delete stackDescriptor.value; + delete stackDescriptor.writable; + stackDescriptor.set = function(newstack) { + overwrittenStack = newstack; + }; + stackDescriptor.get = function() { + var stack2 = (overwrittenStack || (stackGetter ? stackGetter.call(this) : stackValue)).split(/\r?\n+/g); + if (!overwrittenStack) { + stack2[0] = this.name + ": " + this.message; + } + var lineCount = 1; + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } + var modifier = properties[key]; + if ("line" in modifier) { + var line = modifier.line(this[key]); + if (line) { + stack2.splice(lineCount++, 0, " " + line); + } + } + if ("stack" in modifier) { + modifier.stack(this[key], stack2); + } + } + return stack2.join("\n"); + }; + Object.defineProperty(this, "stack", stackDescriptor); + }; + if (Object.setPrototypeOf) { + Object.setPrototypeOf(errorExError.prototype, Error.prototype); + Object.setPrototypeOf(errorExError, Error); + } else { + util.inherits(errorExError, Error); + } + return errorExError; + }; + errorEx.append = function(str, def) { + return { + message: function(v, message2) { + v = v || def; + if (v) { + message2[0] += " " + str.replace("%s", v.toString()); + } + return message2; + } + }; + }; + errorEx.line = function(str, def) { + return { + line: function(v) { + v = v || def; + if (v) { + return str.replace("%s", v.toString()); + } + return null; + } + }; + }; + module2.exports = errorEx; + } +}); + +// ../../node_modules/.pnpm/json-parse-even-better-errors@2.3.1/node_modules/json-parse-even-better-errors/index.js +var require_json_parse_even_better_errors = __commonJS({ + "../../node_modules/.pnpm/json-parse-even-better-errors@2.3.1/node_modules/json-parse-even-better-errors/index.js"(exports2, module2) { + "use strict"; + var hexify = (char) => { + const h = char.charCodeAt(0).toString(16).toUpperCase(); + return "0x" + (h.length % 2 ? "0" : "") + h; + }; + var parseError = (e, txt, context) => { + if (!txt) { + return { + message: e.message + " while parsing empty string", + position: 0 + }; + } + const badToken = e.message.match(/^Unexpected token (.) .*position\s+(\d+)/i); + const errIdx = badToken ? +badToken[2] : e.message.match(/^Unexpected end of JSON.*/i) ? txt.length - 1 : null; + const msg = badToken ? e.message.replace(/^Unexpected token ./, `Unexpected token ${JSON.stringify(badToken[1])} (${hexify(badToken[1])})`) : e.message; + if (errIdx !== null && errIdx !== void 0) { + const start = errIdx <= context ? 0 : errIdx - context; + const end = errIdx + context >= txt.length ? txt.length : errIdx + context; + const slice = (start === 0 ? "" : "...") + txt.slice(start, end) + (end === txt.length ? "" : "..."); + const near = txt === slice ? "" : "near "; + return { + message: msg + ` while parsing ${near}${JSON.stringify(slice)}`, + position: errIdx + }; + } else { + return { + message: msg + ` while parsing '${txt.slice(0, context * 2)}'`, + position: 0 + }; + } + }; + var JSONParseError = class extends SyntaxError { + constructor(er, txt, context, caller) { + context = context || 20; + const metadata = parseError(er, txt, context); + super(metadata.message); + Object.assign(this, metadata); + this.code = "EJSONPARSE"; + this.systemError = er; + Error.captureStackTrace(this, caller || this.constructor); + } + get name() { + return this.constructor.name; + } + set name(n) { + } + get [Symbol.toStringTag]() { + return this.constructor.name; + } + }; + var kIndent = Symbol.for("indent"); + var kNewline = Symbol.for("newline"); + var formatRE = /^\s*[{\[]((?:\r?\n)+)([\s\t]*)/; + var emptyRE = /^(?:\{\}|\[\])((?:\r?\n)+)?$/; + var parseJson = (txt, reviver, context) => { + const parseText = stripBOM(txt); + context = context || 20; + try { + const [, newline = "\n", indent = " "] = parseText.match(emptyRE) || parseText.match(formatRE) || [, "", ""]; + const result = JSON.parse(parseText, reviver); + if (result && typeof result === "object") { + result[kNewline] = newline; + result[kIndent] = indent; + } + return result; + } catch (e) { + if (typeof txt !== "string" && !Buffer.isBuffer(txt)) { + const isEmptyArray = Array.isArray(txt) && txt.length === 0; + throw Object.assign(new TypeError(`Cannot parse ${isEmptyArray ? "an empty array" : String(txt)}`), { + code: "EJSONPARSE", + systemError: e + }); + } + throw new JSONParseError(e, parseText, context, parseJson); + } + }; + var stripBOM = (txt) => String(txt).replace(/^\uFEFF/, ""); + module2.exports = parseJson; + parseJson.JSONParseError = JSONParseError; + parseJson.noExceptions = (txt, reviver) => { + try { + return JSON.parse(stripBOM(txt), reviver); + } catch (e) { + } + }; + } +}); + +// ../../node_modules/.pnpm/lines-and-columns@1.1.6/node_modules/lines-and-columns/dist/index.js +var require_dist = __commonJS({ + "../../node_modules/.pnpm/lines-and-columns@1.1.6/node_modules/lines-and-columns/dist/index.js"(exports2) { + "use strict"; + var LF = "\n"; + var CR = "\r"; + var LinesAndColumns = function() { + function LinesAndColumns2(string) { + this.string = string; + var offsets = [0]; + for (var offset = 0; offset < string.length; ) { + switch (string[offset]) { + case LF: + offset += LF.length; + offsets.push(offset); + break; + case CR: + offset += CR.length; + if (string[offset] === LF) { + offset += LF.length; + } + offsets.push(offset); + break; + default: + offset++; + break; + } + } + this.offsets = offsets; + } + LinesAndColumns2.prototype.locationForIndex = function(index) { + if (index < 0 || index > this.string.length) { + return null; + } + var line = 0; + var offsets = this.offsets; + while (offsets[line + 1] <= index) { + line++; + } + var column = index - offsets[line]; + return { line, column }; + }; + LinesAndColumns2.prototype.indexForLocation = function(location) { + var line = location.line, column = location.column; + if (line < 0 || line >= this.offsets.length) { + return null; + } + if (column < 0 || column > this.lengthOfLine(line)) { + return null; + } + return this.offsets[line] + column; + }; + LinesAndColumns2.prototype.lengthOfLine = function(line) { + var offset = this.offsets[line]; + var nextOffset = line === this.offsets.length - 1 ? this.string.length : this.offsets[line + 1]; + return nextOffset - offset; + }; + return LinesAndColumns2; + }(); + exports2.__esModule = true; + exports2["default"] = LinesAndColumns; + } +}); + +// ../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js +var require_js_tokens = __commonJS({ + "../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g; + exports2.matchToToken = function(match) { + var token = { type: "invalid", value: match[0], closed: void 0 }; + if (match[1]) + token.type = "string", token.closed = !!(match[3] || match[4]); + else if (match[5]) + token.type = "comment"; + else if (match[6]) + token.type = "comment", token.closed = !!match[7]; + else if (match[8]) + token.type = "regex"; + else if (match[9]) + token.type = "number"; + else if (match[10]) + token.type = "name"; + else if (match[11]) + token.type = "punctuator"; + else if (match[12]) + token.type = "whitespace"; + return token; + }; + } +}); + +// ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.15.7/node_modules/@babel/helper-validator-identifier/lib/identifier.js +var require_identifier = __commonJS({ + "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.15.7/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.isIdentifierStart = isIdentifierStart; + exports2.isIdentifierChar = isIdentifierChar; + exports2.isIdentifierName = isIdentifierName; + var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC"; + var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F"; + var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); + var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; + var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 46, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938]; + var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; + function isInAstralSet(code, set) { + let pos = 65536; + for (let i = 0, length = set.length; i < length; i += 2) { + pos += set[i]; + if (pos > code) + return false; + pos += set[i + 1]; + if (pos >= code) + return true; + } + return false; + } + function isIdentifierStart(code) { + if (code < 65) + return code === 36; + if (code <= 90) + return true; + if (code < 97) + return code === 95; + if (code <= 122) + return true; + if (code <= 65535) { + return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes); + } + function isIdentifierChar(code) { + if (code < 48) + return code === 36; + if (code < 58) + return true; + if (code < 65) + return false; + if (code <= 90) + return true; + if (code < 97) + return code === 95; + if (code <= 122) + return true; + if (code <= 65535) { + return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); + } + function isIdentifierName(name) { + let isFirst = true; + for (let i = 0; i < name.length; i++) { + let cp = name.charCodeAt(i); + if ((cp & 64512) === 55296 && i + 1 < name.length) { + const trail = name.charCodeAt(++i); + if ((trail & 64512) === 56320) { + cp = 65536 + ((cp & 1023) << 10) + (trail & 1023); + } + } + if (isFirst) { + isFirst = false; + if (!isIdentifierStart(cp)) { + return false; + } + } else if (!isIdentifierChar(cp)) { + return false; + } + } + return !isFirst; + } + } +}); + +// ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.15.7/node_modules/@babel/helper-validator-identifier/lib/keyword.js +var require_keyword = __commonJS({ + "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.15.7/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.isReservedWord = isReservedWord; + exports2.isStrictReservedWord = isStrictReservedWord; + exports2.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord; + exports2.isStrictBindReservedWord = isStrictBindReservedWord; + exports2.isKeyword = isKeyword; + var reservedWords = { + keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"], + strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], + strictBind: ["eval", "arguments"] + }; + var keywords = new Set(reservedWords.keyword); + var reservedWordsStrictSet = new Set(reservedWords.strict); + var reservedWordsStrictBindSet = new Set(reservedWords.strictBind); + function isReservedWord(word, inModule) { + return inModule && word === "await" || word === "enum"; + } + function isStrictReservedWord(word, inModule) { + return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); + } + function isStrictBindOnlyReservedWord(word) { + return reservedWordsStrictBindSet.has(word); + } + function isStrictBindReservedWord(word, inModule) { + return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); + } + function isKeyword(word) { + return keywords.has(word); + } + } +}); + +// ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.15.7/node_modules/@babel/helper-validator-identifier/lib/index.js +var require_lib = __commonJS({ + "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.15.7/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + Object.defineProperty(exports2, "isIdentifierName", { + enumerable: true, + get: function() { + return _identifier.isIdentifierName; + } + }); + Object.defineProperty(exports2, "isIdentifierChar", { + enumerable: true, + get: function() { + return _identifier.isIdentifierChar; + } + }); + Object.defineProperty(exports2, "isIdentifierStart", { + enumerable: true, + get: function() { + return _identifier.isIdentifierStart; + } + }); + Object.defineProperty(exports2, "isReservedWord", { + enumerable: true, + get: function() { + return _keyword.isReservedWord; + } + }); + Object.defineProperty(exports2, "isStrictBindOnlyReservedWord", { + enumerable: true, + get: function() { + return _keyword.isStrictBindOnlyReservedWord; + } + }); + Object.defineProperty(exports2, "isStrictBindReservedWord", { + enumerable: true, + get: function() { + return _keyword.isStrictBindReservedWord; + } + }); + Object.defineProperty(exports2, "isStrictReservedWord", { + enumerable: true, + get: function() { + return _keyword.isStrictReservedWord; + } + }); + Object.defineProperty(exports2, "isKeyword", { + enumerable: true, + get: function() { + return _keyword.isKeyword; + } + }); + var _identifier = require_identifier(); + var _keyword = require_keyword(); + } +}); + +// ../../node_modules/.pnpm/escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js +var require_escape_string_regexp = __commonJS({ + "../../node_modules/.pnpm/escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js"(exports2, module2) { + "use strict"; + var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; + module2.exports = function(str) { + if (typeof str !== "string") { + throw new TypeError("Expected a string"); + } + return str.replace(matchOperatorsRe, "\\$&"); + }; + } +}); + +// ../../node_modules/.pnpm/color-name@1.1.3/node_modules/color-name/index.js +var require_color_name = __commonJS({ + "../../node_modules/.pnpm/color-name@1.1.3/node_modules/color-name/index.js"(exports2, module2) { + "use strict"; + module2.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] + }; + } +}); + +// ../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/conversions.js +var require_conversions = __commonJS({ + "../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/conversions.js"(exports2, module2) { + var cssKeywords = require_color_name(); + var reverseKeywords = {}; + for (key in cssKeywords) { + if (cssKeywords.hasOwnProperty(key)) { + reverseKeywords[cssKeywords[key]] = key; + } + } + var key; + var convert = module2.exports = { + rgb: { channels: 3, labels: "rgb" }, + hsl: { channels: 3, labels: "hsl" }, + hsv: { channels: 3, labels: "hsv" }, + hwb: { channels: 3, labels: "hwb" }, + cmyk: { channels: 4, labels: "cmyk" }, + xyz: { channels: 3, labels: "xyz" }, + lab: { channels: 3, labels: "lab" }, + lch: { channels: 3, labels: "lch" }, + hex: { channels: 1, labels: ["hex"] }, + keyword: { channels: 1, labels: ["keyword"] }, + ansi16: { channels: 1, labels: ["ansi16"] }, + ansi256: { channels: 1, labels: ["ansi256"] }, + hcg: { channels: 3, labels: ["h", "c", "g"] }, + apple: { channels: 3, labels: ["r16", "g16", "b16"] }, + gray: { channels: 1, labels: ["gray"] } + }; + for (model in convert) { + if (convert.hasOwnProperty(model)) { + if (!("channels" in convert[model])) { + throw new Error("missing channels property: " + model); + } + if (!("labels" in convert[model])) { + throw new Error("missing channel labels property: " + model); + } + if (convert[model].labels.length !== convert[model].channels) { + throw new Error("channel and label counts mismatch: " + model); + } + channels = convert[model].channels; + labels = convert[model].labels; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], "channels", { value: channels }); + Object.defineProperty(convert[model], "labels", { value: labels }); + } + } + var channels; + var labels; + var model; + convert.rgb.hsl = function(rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var min = Math.min(r, g, b); + var max = Math.max(r, g, b); + var delta = max - min; + var h; + var s; + var l; + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + h = Math.min(h * 60, 360); + if (h < 0) { + h += 360; + } + l = (min + max) / 2; + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); + } + return [h, s * 100, l * 100]; + }; + convert.rgb.hsv = function(rgb) { + var rdif; + var gdif; + var bdif; + var h; + var s; + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var v = Math.max(r, g, b); + var diff = v - Math.min(r, g, b); + var diffc = function(c) { + return (v - c) / 6 / diff + 1 / 2; + }; + if (diff === 0) { + h = s = 0; + } else { + s = diff / v; + rdif = diffc(r); + gdif = diffc(g); + bdif = diffc(b); + if (r === v) { + h = bdif - gdif; + } else if (g === v) { + h = 1 / 3 + rdif - bdif; + } else if (b === v) { + h = 2 / 3 + gdif - rdif; + } + if (h < 0) { + h += 1; + } else if (h > 1) { + h -= 1; + } + } + return [ + h * 360, + s * 100, + v * 100 + ]; + }; + convert.rgb.hwb = function(rgb) { + var r = rgb[0]; + var g = rgb[1]; + var b = rgb[2]; + var h = convert.rgb.hsl(rgb)[0]; + var w = 1 / 255 * Math.min(r, Math.min(g, b)); + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + return [h, w * 100, b * 100]; + }; + convert.rgb.cmyk = function(rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var c; + var m; + var y; + var k; + k = Math.min(1 - r, 1 - g, 1 - b); + c = (1 - r - k) / (1 - k) || 0; + m = (1 - g - k) / (1 - k) || 0; + y = (1 - b - k) / (1 - k) || 0; + return [c * 100, m * 100, y * 100, k * 100]; + }; + function comparativeDistance(x, y) { + return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2); + } + convert.rgb.keyword = function(rgb) { + var reversed = reverseKeywords[rgb]; + if (reversed) { + return reversed; + } + var currentClosestDistance = Infinity; + var currentClosestKeyword; + for (var keyword in cssKeywords) { + if (cssKeywords.hasOwnProperty(keyword)) { + var value = cssKeywords[keyword]; + var distance = comparativeDistance(rgb, value); + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } + } + } + return currentClosestKeyword; + }; + convert.keyword.rgb = function(keyword) { + return cssKeywords[keyword]; + }; + convert.rgb.xyz = function(rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92; + g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92; + b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92; + var x = r * 0.4124 + g * 0.3576 + b * 0.1805; + var y = r * 0.2126 + g * 0.7152 + b * 0.0722; + var z = r * 0.0193 + g * 0.1192 + b * 0.9505; + return [x * 100, y * 100, z * 100]; + }; + convert.rgb.lab = function(rgb) { + var xyz = convert.rgb.xyz(rgb); + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + x /= 95.047; + y /= 100; + z /= 108.883; + x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; + y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; + z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; + l = 116 * y - 16; + a = 500 * (x - y); + b = 200 * (y - z); + return [l, a, b]; + }; + convert.hsl.rgb = function(hsl) { + var h = hsl[0] / 360; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var t1; + var t2; + var t3; + var rgb; + var val; + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + if (l < 0.5) { + t2 = l * (1 + s); + } else { + t2 = l + s - l * s; + } + t1 = 2 * l - t2; + rgb = [0, 0, 0]; + for (var i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + if (t3 < 0) { + t3++; + } + if (t3 > 1) { + t3--; + } + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + } else { + val = t1; + } + rgb[i] = val * 255; + } + return rgb; + }; + convert.hsl.hsv = function(hsl) { + var h = hsl[0]; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var smin = s; + var lmin = Math.max(l, 0.01); + var sv; + var v; + l *= 2; + s *= l <= 1 ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + v = (l + s) / 2; + sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s); + return [h, sv * 100, v * 100]; + }; + convert.hsv.rgb = function(hsv) { + var h = hsv[0] / 60; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var hi = Math.floor(h) % 6; + var f = h - Math.floor(h); + var p = 255 * v * (1 - s); + var q = 255 * v * (1 - s * f); + var t = 255 * v * (1 - s * (1 - f)); + v *= 255; + switch (hi) { + case 0: + return [v, t, p]; + case 1: + return [q, v, p]; + case 2: + return [p, v, t]; + case 3: + return [p, q, v]; + case 4: + return [t, p, v]; + case 5: + return [v, p, q]; + } + }; + convert.hsv.hsl = function(hsv) { + var h = hsv[0]; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var vmin = Math.max(v, 0.01); + var lmin; + var sl; + var l; + l = (2 - s) * v; + lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= lmin <= 1 ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + return [h, sl * 100, l * 100]; + }; + convert.hwb.rgb = function(hwb) { + var h = hwb[0] / 360; + var wh = hwb[1] / 100; + var bl = hwb[2] / 100; + var ratio = wh + bl; + var i; + var v; + var f; + var n; + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + i = Math.floor(6 * h); + v = 1 - bl; + f = 6 * h - i; + if ((i & 1) !== 0) { + f = 1 - f; + } + n = wh + f * (v - wh); + var r; + var g; + var b; + switch (i) { + default: + case 6: + case 0: + r = v; + g = n; + b = wh; + break; + case 1: + r = n; + g = v; + b = wh; + break; + case 2: + r = wh; + g = v; + b = n; + break; + case 3: + r = wh; + g = n; + b = v; + break; + case 4: + r = n; + g = wh; + b = v; + break; + case 5: + r = v; + g = wh; + b = n; + break; + } + return [r * 255, g * 255, b * 255]; + }; + convert.cmyk.rgb = function(cmyk) { + var c = cmyk[0] / 100; + var m = cmyk[1] / 100; + var y = cmyk[2] / 100; + var k = cmyk[3] / 100; + var r; + var g; + var b; + r = 1 - Math.min(1, c * (1 - k) + k); + g = 1 - Math.min(1, m * (1 - k) + k); + b = 1 - Math.min(1, y * (1 - k) + k); + return [r * 255, g * 255, b * 255]; + }; + convert.xyz.rgb = function(xyz) { + var x = xyz[0] / 100; + var y = xyz[1] / 100; + var z = xyz[2] / 100; + var r; + var g; + var b; + r = x * 3.2406 + y * -1.5372 + z * -0.4986; + g = x * -0.9689 + y * 1.8758 + z * 0.0415; + b = x * 0.0557 + y * -0.204 + z * 1.057; + r = r > 31308e-7 ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 : r * 12.92; + g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92; + b = b > 31308e-7 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : b * 12.92; + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + return [r * 255, g * 255, b * 255]; + }; + convert.xyz.lab = function(xyz) { + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + x /= 95.047; + y /= 100; + z /= 108.883; + x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; + y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; + z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; + l = 116 * y - 16; + a = 500 * (x - y); + b = 200 * (y - z); + return [l, a, b]; + }; + convert.lab.xyz = function(lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var x; + var y; + var z; + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + var y2 = Math.pow(y, 3); + var x2 = Math.pow(x, 3); + var z2 = Math.pow(z, 3); + y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787; + x *= 95.047; + y *= 100; + z *= 108.883; + return [x, y, z]; + }; + convert.lab.lch = function(lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var hr; + var h; + var c; + hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + if (h < 0) { + h += 360; + } + c = Math.sqrt(a * a + b * b); + return [l, c, h]; + }; + convert.lch.lab = function(lch) { + var l = lch[0]; + var c = lch[1]; + var h = lch[2]; + var a; + var b; + var hr; + hr = h / 360 * 2 * Math.PI; + a = c * Math.cos(hr); + b = c * Math.sin(hr); + return [l, a, b]; + }; + convert.rgb.ansi16 = function(args2) { + var r = args2[0]; + var g = args2[1]; + var b = args2[2]; + var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args2)[2]; + value = Math.round(value / 50); + if (value === 0) { + return 30; + } + var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255)); + if (value === 2) { + ansi += 60; + } + return ansi; + }; + convert.hsv.ansi16 = function(args2) { + return convert.rgb.ansi16(convert.hsv.rgb(args2), args2[2]); + }; + convert.rgb.ansi256 = function(args2) { + var r = args2[0]; + var g = args2[1]; + var b = args2[2]; + if (r === g && g === b) { + if (r < 8) { + return 16; + } + if (r > 248) { + return 231; + } + return Math.round((r - 8) / 247 * 24) + 232; + } + var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5); + return ansi; + }; + convert.ansi16.rgb = function(args2) { + var color = args2 % 10; + if (color === 0 || color === 7) { + if (args2 > 50) { + color += 3.5; + } + color = color / 10.5 * 255; + return [color, color, color]; + } + var mult = (~~(args2 > 50) + 1) * 0.5; + var r = (color & 1) * mult * 255; + var g = (color >> 1 & 1) * mult * 255; + var b = (color >> 2 & 1) * mult * 255; + return [r, g, b]; + }; + convert.ansi256.rgb = function(args2) { + if (args2 >= 232) { + var c = (args2 - 232) * 10 + 8; + return [c, c, c]; + } + args2 -= 16; + var rem; + var r = Math.floor(args2 / 36) / 5 * 255; + var g = Math.floor((rem = args2 % 36) / 6) / 5 * 255; + var b = rem % 6 / 5 * 255; + return [r, g, b]; + }; + convert.rgb.hex = function(args2) { + var integer = ((Math.round(args2[0]) & 255) << 16) + ((Math.round(args2[1]) & 255) << 8) + (Math.round(args2[2]) & 255); + var string = integer.toString(16).toUpperCase(); + return "000000".substring(string.length) + string; + }; + convert.hex.rgb = function(args2) { + var match = args2.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + if (!match) { + return [0, 0, 0]; + } + var colorString = match[0]; + if (match[0].length === 3) { + colorString = colorString.split("").map(function(char) { + return char + char; + }).join(""); + } + var integer = parseInt(colorString, 16); + var r = integer >> 16 & 255; + var g = integer >> 8 & 255; + var b = integer & 255; + return [r, g, b]; + }; + convert.rgb.hcg = function(rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var max = Math.max(Math.max(r, g), b); + var min = Math.min(Math.min(r, g), b); + var chroma = max - min; + var grayscale; + var hue; + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; + } + if (chroma <= 0) { + hue = 0; + } else if (max === r) { + hue = (g - b) / chroma % 6; + } else if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma + 4; + } + hue /= 6; + hue %= 1; + return [hue * 360, chroma * 100, grayscale * 100]; + }; + convert.hsl.hcg = function(hsl) { + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var c = 1; + var f = 0; + if (l < 0.5) { + c = 2 * s * l; + } else { + c = 2 * s * (1 - l); + } + if (c < 1) { + f = (l - 0.5 * c) / (1 - c); + } + return [hsl[0], c * 100, f * 100]; + }; + convert.hsv.hcg = function(hsv) { + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var c = s * v; + var f = 0; + if (c < 1) { + f = (v - c) / (1 - c); + } + return [hsv[0], c * 100, f * 100]; + }; + convert.hcg.rgb = function(hcg) { + var h = hcg[0] / 360; + var c = hcg[1] / 100; + var g = hcg[2] / 100; + if (c === 0) { + return [g * 255, g * 255, g * 255]; + } + var pure = [0, 0, 0]; + var hi = h % 1 * 6; + var v = hi % 1; + var w = 1 - v; + var mg = 0; + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; + pure[1] = v; + pure[2] = 0; + break; + case 1: + pure[0] = w; + pure[1] = 1; + pure[2] = 0; + break; + case 2: + pure[0] = 0; + pure[1] = 1; + pure[2] = v; + break; + case 3: + pure[0] = 0; + pure[1] = w; + pure[2] = 1; + break; + case 4: + pure[0] = v; + pure[1] = 0; + pure[2] = 1; + break; + default: + pure[0] = 1; + pure[1] = 0; + pure[2] = w; + } + mg = (1 - c) * g; + return [ + (c * pure[0] + mg) * 255, + (c * pure[1] + mg) * 255, + (c * pure[2] + mg) * 255 + ]; + }; + convert.hcg.hsv = function(hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var v = c + g * (1 - c); + var f = 0; + if (v > 0) { + f = c / v; + } + return [hcg[0], f * 100, v * 100]; + }; + convert.hcg.hsl = function(hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var l = g * (1 - c) + 0.5 * c; + var s = 0; + if (l > 0 && l < 0.5) { + s = c / (2 * l); + } else if (l >= 0.5 && l < 1) { + s = c / (2 * (1 - l)); + } + return [hcg[0], s * 100, l * 100]; + }; + convert.hcg.hwb = function(hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var v = c + g * (1 - c); + return [hcg[0], (v - c) * 100, (1 - v) * 100]; + }; + convert.hwb.hcg = function(hwb) { + var w = hwb[1] / 100; + var b = hwb[2] / 100; + var v = 1 - b; + var c = v - w; + var g = 0; + if (c < 1) { + g = (v - c) / (1 - c); + } + return [hwb[0], c * 100, g * 100]; + }; + convert.apple.rgb = function(apple) { + return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255]; + }; + convert.rgb.apple = function(rgb) { + return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535]; + }; + convert.gray.rgb = function(args2) { + return [args2[0] / 100 * 255, args2[0] / 100 * 255, args2[0] / 100 * 255]; + }; + convert.gray.hsl = convert.gray.hsv = function(args2) { + return [0, 0, args2[0]]; + }; + convert.gray.hwb = function(gray) { + return [0, 100, gray[0]]; + }; + convert.gray.cmyk = function(gray) { + return [0, 0, 0, gray[0]]; + }; + convert.gray.lab = function(gray) { + return [gray[0], 0, 0]; + }; + convert.gray.hex = function(gray) { + var val = Math.round(gray[0] / 100 * 255) & 255; + var integer = (val << 16) + (val << 8) + val; + var string = integer.toString(16).toUpperCase(); + return "000000".substring(string.length) + string; + }; + convert.rgb.gray = function(rgb) { + var val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; + }; + } +}); + +// ../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/route.js +var require_route = __commonJS({ + "../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/route.js"(exports2, module2) { + var conversions = require_conversions(); + function buildGraph() { + var graph = {}; + var models = Object.keys(conversions); + for (var len = models.length, i = 0; i < len; i++) { + graph[models[i]] = { + distance: -1, + parent: null + }; + } + return graph; + } + function deriveBFS(fromModel) { + var graph = buildGraph(); + var queue = [fromModel]; + graph[fromModel].distance = 0; + while (queue.length) { + var current = queue.pop(); + var adjacents = Object.keys(conversions[current]); + for (var len = adjacents.length, i = 0; i < len; i++) { + var adjacent = adjacents[i]; + var node = graph[adjacent]; + if (node.distance === -1) { + node.distance = graph[current].distance + 1; + node.parent = current; + queue.unshift(adjacent); + } + } + } + return graph; + } + function link(from, to) { + return function(args2) { + return to(from(args2)); + }; + } + function wrapConversion(toModel, graph) { + var path = [graph[toModel].parent, toModel]; + var fn2 = conversions[graph[toModel].parent][toModel]; + var cur = graph[toModel].parent; + while (graph[cur].parent) { + path.unshift(graph[cur].parent); + fn2 = link(conversions[graph[cur].parent][cur], fn2); + cur = graph[cur].parent; + } + fn2.conversion = path; + return fn2; + } + module2.exports = function(fromModel) { + var graph = deriveBFS(fromModel); + var conversion = {}; + var models = Object.keys(graph); + for (var len = models.length, i = 0; i < len; i++) { + var toModel = models[i]; + var node = graph[toModel]; + if (node.parent === null) { + continue; + } + conversion[toModel] = wrapConversion(toModel, graph); + } + return conversion; + }; + } +}); + +// ../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/index.js +var require_color_convert = __commonJS({ + "../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/index.js"(exports2, module2) { + var conversions = require_conversions(); + var route = require_route(); + var convert = {}; + var models = Object.keys(conversions); + function wrapRaw(fn2) { + var wrappedFn = function(args2) { + if (args2 === void 0 || args2 === null) { + return args2; + } + if (arguments.length > 1) { + args2 = Array.prototype.slice.call(arguments); + } + return fn2(args2); + }; + if ("conversion" in fn2) { + wrappedFn.conversion = fn2.conversion; + } + return wrappedFn; + } + function wrapRounded(fn2) { + var wrappedFn = function(args2) { + if (args2 === void 0 || args2 === null) { + return args2; + } + if (arguments.length > 1) { + args2 = Array.prototype.slice.call(arguments); + } + var result = fn2(args2); + if (typeof result === "object") { + for (var len = result.length, i = 0; i < len; i++) { + result[i] = Math.round(result[i]); + } + } + return result; + }; + if ("conversion" in fn2) { + wrappedFn.conversion = fn2.conversion; + } + return wrappedFn; + } + models.forEach(function(fromModel) { + convert[fromModel] = {}; + Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels }); + Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels }); + var routes = route(fromModel); + var routeModels = Object.keys(routes); + routeModels.forEach(function(toModel) { + var fn2 = routes[toModel]; + convert[fromModel][toModel] = wrapRounded(fn2); + convert[fromModel][toModel].raw = wrapRaw(fn2); + }); + }); + module2.exports = convert; + } +}); + +// ../../node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/index.js +var require_ansi_styles = __commonJS({ + "../../node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/index.js"(exports2, module2) { + "use strict"; + var colorConvert = require_color_convert(); + var wrapAnsi16 = (fn2, offset) => function() { + const code = fn2.apply(colorConvert, arguments); + return `[${code + offset}m`; + }; + var wrapAnsi256 = (fn2, offset) => function() { + const code = fn2.apply(colorConvert, arguments); + return `[${38 + offset};5;${code}m`; + }; + var wrapAnsi16m = (fn2, offset) => function() { + const rgb = fn2.apply(colorConvert, arguments); + return `[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; + }; + function assembleStyles() { + const codes = new Map(); + const styles = { + modifier: { + reset: [0, 0], + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39], + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; + styles.color.grey = styles.color.gray; + for (const groupName of Object.keys(styles)) { + const group = styles[groupName]; + for (const styleName of Object.keys(group)) { + const style = group[styleName]; + styles[styleName] = { + open: `[${style[0]}m`, + close: `[${style[1]}m` + }; + group[styleName] = styles[styleName]; + codes.set(style[0], style[1]); + } + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + Object.defineProperty(styles, "codes", { + value: codes, + enumerable: false + }); + } + const ansi2ansi = (n) => n; + const rgb2rgb = (r, g, b) => [r, g, b]; + styles.color.close = ""; + styles.bgColor.close = ""; + styles.color.ansi = { + ansi: wrapAnsi16(ansi2ansi, 0) + }; + styles.color.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 0) + }; + styles.color.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 0) + }; + styles.bgColor.ansi = { + ansi: wrapAnsi16(ansi2ansi, 10) + }; + styles.bgColor.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 10) + }; + styles.bgColor.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 10) + }; + for (let key of Object.keys(colorConvert)) { + if (typeof colorConvert[key] !== "object") { + continue; + } + const suite = colorConvert[key]; + if (key === "ansi16") { + key = "ansi"; + } + if ("ansi16" in suite) { + styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); + styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); + } + if ("ansi256" in suite) { + styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); + styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); + } + if ("rgb" in suite) { + styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); + styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); + } + } + return styles; + } + Object.defineProperty(module2, "exports", { + enumerable: true, + get: assembleStyles + }); + } +}); + +// ../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js +var require_has_flag = __commonJS({ + "../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports2, module2) { + "use strict"; + module2.exports = (flag, argv2) => { + argv2 = argv2 || process.argv; + const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; + const pos = argv2.indexOf(prefix + flag); + const terminatorPos = argv2.indexOf("--"); + return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); + }; + } +}); + +// ../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js +var require_supports_color = __commonJS({ + "../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports2, module2) { + "use strict"; + var os = require("os"); + var hasFlag = require_has_flag(); + var env = process.env; + var forceColor; + if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) { + forceColor = false; + } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { + forceColor = true; + } + if ("FORCE_COLOR" in env) { + forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; + } + function translateLevel(level) { + if (level === 0) { + return false; + } + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; + } + function supportsColor(stream) { + if (forceColor === false) { + return 0; + } + if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { + return 3; + } + if (hasFlag("color=256")) { + return 2; + } + if (stream && !stream.isTTY && forceColor !== true) { + return 0; + } + const min = forceColor ? 1 : 0; + if (process.platform === "win32") { + const osRelease = os.release().split("."); + if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + return 1; + } + if ("CI" in env) { + if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") { + return 1; + } + return min; + } + if ("TEAMCITY_VERSION" in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + if (env.COLORTERM === "truecolor") { + return 3; + } + if ("TERM_PROGRAM" in env) { + const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); + switch (env.TERM_PROGRAM) { + case "iTerm.app": + return version >= 3 ? 3 : 2; + case "Apple_Terminal": + return 2; + } + } + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + if ("COLORTERM" in env) { + return 1; + } + if (env.TERM === "dumb") { + return min; + } + return min; + } + function getSupportLevel(stream) { + const level = supportsColor(stream); + return translateLevel(level); + } + module2.exports = { + supportsColor: getSupportLevel, + stdout: getSupportLevel(process.stdout), + stderr: getSupportLevel(process.stderr) + }; + } +}); + +// ../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/templates.js +var require_templates = __commonJS({ + "../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/templates.js"(exports2, module2) { + "use strict"; + var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; + var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; + var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; + var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; + var ESCAPES = new Map([ + ["n", "\n"], + ["r", "\r"], + ["t", " "], + ["b", "\b"], + ["f", "\f"], + ["v", "\v"], + ["0", "\0"], + ["\\", "\\"], + ["e", ""], + ["a", "\x07"] + ]); + function unescape2(c) { + if (c[0] === "u" && c.length === 5 || c[0] === "x" && c.length === 3) { + return String.fromCharCode(parseInt(c.slice(1), 16)); + } + return ESCAPES.get(c) || c; + } + function parseArguments(name, args2) { + const results = []; + const chunks = args2.trim().split(/\s*,\s*/g); + let matches; + for (const chunk of chunks) { + if (!isNaN(chunk)) { + results.push(Number(chunk)); + } else if (matches = chunk.match(STRING_REGEX)) { + results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape2(escape) : chr)); + } else { + throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); + } + } + return results; + } + function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + const results = []; + let matches; + while ((matches = STYLE_REGEX.exec(style)) !== null) { + const name = matches[1]; + if (matches[2]) { + const args2 = parseArguments(name, matches[2]); + results.push([name].concat(args2)); + } else { + results.push([name]); + } + } + return results; + } + function buildStyle(chalk, styles) { + const enabled = {}; + for (const layer of styles) { + for (const style of layer.styles) { + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } + } + let current = chalk; + for (const styleName of Object.keys(enabled)) { + if (Array.isArray(enabled[styleName])) { + if (!(styleName in current)) { + throw new Error(`Unknown Chalk style: ${styleName}`); + } + if (enabled[styleName].length > 0) { + current = current[styleName].apply(current, enabled[styleName]); + } else { + current = current[styleName]; + } + } + } + return current; + } + module2.exports = (chalk, tmp) => { + const styles = []; + const chunks = []; + let chunk = []; + tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => { + if (escapeChar) { + chunk.push(unescape2(escapeChar)); + } else if (style) { + const str = chunk.join(""); + chunk = []; + chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str)); + styles.push({ inverse, styles: parseStyle(style) }); + } else if (close) { + if (styles.length === 0) { + throw new Error("Found extraneous } in Chalk template literal"); + } + chunks.push(buildStyle(chalk, styles)(chunk.join(""))); + chunk = []; + styles.pop(); + } else { + chunk.push(chr); + } + }); + chunks.push(chunk.join("")); + if (styles.length > 0) { + const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`; + throw new Error(errMsg); + } + return chunks.join(""); + }; + } +}); + +// ../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/index.js +var require_chalk = __commonJS({ + "../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/index.js"(exports2, module2) { + "use strict"; + var escapeStringRegexp = require_escape_string_regexp(); + var ansiStyles = require_ansi_styles(); + var stdoutColor = require_supports_color().stdout; + var template = require_templates(); + var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm"); + var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"]; + var skipModels = new Set(["gray"]); + var styles = Object.create(null); + function applyOptions(obj, options) { + options = options || {}; + const scLevel = stdoutColor ? stdoutColor.level : 0; + obj.level = options.level === void 0 ? scLevel : options.level; + obj.enabled = "enabled" in options ? options.enabled : obj.level > 0; + } + function Chalk(options) { + if (!this || !(this instanceof Chalk) || this.template) { + const chalk = {}; + applyOptions(chalk, options); + chalk.template = function() { + const args2 = [].slice.call(arguments); + return chalkTag.apply(null, [chalk.template].concat(args2)); + }; + Object.setPrototypeOf(chalk, Chalk.prototype); + Object.setPrototypeOf(chalk.template, chalk); + chalk.template.constructor = Chalk; + return chalk.template; + } + applyOptions(this, options); + } + if (isSimpleWindowsTerm) { + ansiStyles.blue.open = ""; + } + for (const key of Object.keys(ansiStyles)) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g"); + styles[key] = { + get() { + const codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + }; + } + styles.visible = { + get() { + return build.call(this, this._styles || [], true, "visible"); + } + }; + ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), "g"); + for (const model of Object.keys(ansiStyles.color.ansi)) { + if (skipModels.has(model)) { + continue; + } + styles[model] = { + get() { + const level = this.level; + return function() { + const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; + } + ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), "g"); + for (const model of Object.keys(ansiStyles.bgColor.ansi)) { + if (skipModels.has(model)) { + continue; + } + const bgModel = "bg" + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + const level = this.level; + return function() { + const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; + } + var proto = Object.defineProperties(() => { + }, styles); + function build(_styles, _empty, key) { + const builder = function() { + return applyStyle.apply(builder, arguments); + }; + builder._styles = _styles; + builder._empty = _empty; + const self2 = this; + Object.defineProperty(builder, "level", { + enumerable: true, + get() { + return self2.level; + }, + set(level) { + self2.level = level; + } + }); + Object.defineProperty(builder, "enabled", { + enumerable: true, + get() { + return self2.enabled; + }, + set(enabled) { + self2.enabled = enabled; + } + }); + builder.hasGrey = this.hasGrey || key === "gray" || key === "grey"; + builder.__proto__ = proto; + return builder; + } + function applyStyle() { + const args2 = arguments; + const argsLen = args2.length; + let str = String(arguments[0]); + if (argsLen === 0) { + return ""; + } + if (argsLen > 1) { + for (let a = 1; a < argsLen; a++) { + str += " " + args2[a]; + } + } + if (!this.enabled || this.level <= 0 || !str) { + return this._empty ? "" : str; + } + const originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ""; + } + for (const code of this._styles.slice().reverse()) { + str = code.open + str.replace(code.closeRe, code.open) + code.close; + str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); + } + ansiStyles.dim.open = originalDim; + return str; + } + function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + return [].slice.call(arguments, 1).join(" "); + } + const args2 = [].slice.call(arguments, 2); + const parts = [strings.raw[0]]; + for (let i = 1; i < strings.length; i++) { + parts.push(String(args2[i - 1]).replace(/[{}\\]/g, "\\$&")); + parts.push(String(strings.raw[i])); + } + return template(chalk, parts.join("")); + } + Object.defineProperties(Chalk.prototype, styles); + module2.exports = Chalk(); + module2.exports.supportsColor = stdoutColor; + module2.exports.default = module2.exports; + } +}); + +// ../../node_modules/.pnpm/@babel+highlight@7.14.5/node_modules/@babel/highlight/lib/index.js +var require_lib2 = __commonJS({ + "../../node_modules/.pnpm/@babel+highlight@7.14.5/node_modules/@babel/highlight/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.shouldHighlight = shouldHighlight; + exports2.getChalk = getChalk; + exports2.default = highlight; + var _jsTokens = require_js_tokens(); + var _helperValidatorIdentifier = require_lib(); + var _chalk = require_chalk(); + var sometimesKeywords = new Set(["as", "async", "from", "get", "of", "set"]); + function getDefs(chalk) { + return { + keyword: chalk.cyan, + capitalized: chalk.yellow, + jsxIdentifier: chalk.yellow, + punctuator: chalk.yellow, + number: chalk.magenta, + string: chalk.green, + regex: chalk.magenta, + comment: chalk.grey, + invalid: chalk.white.bgRed.bold + }; + } + var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; + var BRACKET = /^[()[\]{}]$/; + var tokenize; + { + const JSX_TAG = /^[a-z][\w-]*$/i; + const getTokenType = function(token, offset, text) { + if (token.type === "name") { + if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) { + return "keyword"; + } + if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == " colorize(str)).join("\n"); + } else { + highlighted += value; + } + } + return highlighted; + } + function shouldHighlight(options) { + return !!_chalk.supportsColor || options.forceColor; + } + function getChalk(options) { + return options.forceColor ? new _chalk.constructor({ + enabled: true, + level: 1 + }) : _chalk; + } + function highlight(code, options = {}) { + if (shouldHighlight(options)) { + const chalk = getChalk(options); + const defs = getDefs(chalk); + return highlightTokens(defs, code); + } else { + return code; + } + } + } +}); + +// ../../node_modules/.pnpm/@babel+code-frame@7.14.5/node_modules/@babel/code-frame/lib/index.js +var require_lib3 = __commonJS({ + "../../node_modules/.pnpm/@babel+code-frame@7.14.5/node_modules/@babel/code-frame/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.codeFrameColumns = codeFrameColumns; + exports2.default = _default; + var _highlight = require_lib2(); + var deprecationWarningShown = false; + function getDefs(chalk) { + return { + gutter: chalk.grey, + marker: chalk.red.bold, + message: chalk.red.bold + }; + } + var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; + function getMarkerLines(loc, source, opts) { + const startLoc = Object.assign({ + column: 0, + line: -1 + }, loc.start); + const endLoc = Object.assign({}, startLoc, loc.end); + const { + linesAbove = 2, + linesBelow = 3 + } = opts || {}; + const startLine = startLoc.line; + const startColumn = startLoc.column; + const endLine = endLoc.line; + const endColumn = endLoc.column; + let start = Math.max(startLine - (linesAbove + 1), 0); + let end = Math.min(source.length, endLine + linesBelow); + if (startLine === -1) { + start = 0; + } + if (endLine === -1) { + end = source.length; + } + const lineDiff = endLine - startLine; + const markerLines = {}; + if (lineDiff) { + for (let i = 0; i <= lineDiff; i++) { + const lineNumber = i + startLine; + if (!startColumn) { + markerLines[lineNumber] = true; + } else if (i === 0) { + const sourceLength = source[lineNumber - 1].length; + markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1]; + } else if (i === lineDiff) { + markerLines[lineNumber] = [0, endColumn]; + } else { + const sourceLength = source[lineNumber - i].length; + markerLines[lineNumber] = [0, sourceLength]; + } + } + } else { + if (startColumn === endColumn) { + if (startColumn) { + markerLines[startLine] = [startColumn, 0]; + } else { + markerLines[startLine] = true; + } + } else { + markerLines[startLine] = [startColumn, endColumn - startColumn]; + } + } + return { + start, + end, + markerLines + }; + } + function codeFrameColumns(rawLines, loc, opts = {}) { + const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts); + const chalk = (0, _highlight.getChalk)(opts); + const defs = getDefs(chalk); + const maybeHighlight = (chalkFn, string) => { + return highlighted ? chalkFn(string) : string; + }; + const lines = rawLines.split(NEWLINE); + const { + start, + end, + markerLines + } = getMarkerLines(loc, lines, opts); + const hasColumns = loc.start && typeof loc.start.column === "number"; + const numberMaxWidth = String(end).length; + const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines; + let frame = highlightedLines.split(NEWLINE).slice(start, end).map((line, index) => { + const number = start + 1 + index; + const paddedNumber = ` ${number}`.slice(-numberMaxWidth); + const gutter = ` ${paddedNumber} |`; + const hasMarker = markerLines[number]; + const lastMarkerLine = !markerLines[number + 1]; + if (hasMarker) { + let markerLine = ""; + if (Array.isArray(hasMarker)) { + const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); + const numberOfMarkers = hasMarker[1] || 1; + markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join(""); + if (lastMarkerLine && opts.message) { + markerLine += " " + maybeHighlight(defs.message, opts.message); + } + } + return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join(""); + } else { + return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`; + } + }).join("\n"); + if (opts.message && !hasColumns) { + frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message} +${frame}`; + } + if (highlighted) { + return chalk.reset(frame); + } else { + return frame; + } + } + function _default(rawLines, lineNumber, colNumber, opts = {}) { + if (!deprecationWarningShown) { + deprecationWarningShown = true; + const message2 = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; + if (process.emitWarning) { + process.emitWarning(message2, "DeprecationWarning"); + } else { + const deprecationError = new Error(message2); + deprecationError.name = "DeprecationWarning"; + console.warn(new Error(message2)); + } + } + colNumber = Math.max(colNumber, 0); + const location = { + start: { + column: colNumber, + line: lineNumber + } + }; + return codeFrameColumns(rawLines, location, opts); + } + } +}); + +// ../../node_modules/.pnpm/parse-json@5.2.0/node_modules/parse-json/index.js +var require_parse_json = __commonJS({ + "../../node_modules/.pnpm/parse-json@5.2.0/node_modules/parse-json/index.js"(exports2, module2) { + "use strict"; + var errorEx = require_error_ex(); + var fallback = require_json_parse_even_better_errors(); + var { default: LinesAndColumns } = require_dist(); + var { codeFrameColumns } = require_lib3(); + var JSONError = errorEx("JSONError", { + fileName: errorEx.append("in %s"), + codeFrame: errorEx.append("\n\n%s\n") + }); + var parseJson = (string, reviver, filename) => { + if (typeof reviver === "string") { + filename = reviver; + reviver = null; + } + try { + try { + return JSON.parse(string, reviver); + } catch (error) { + fallback(string, reviver); + throw error; + } + } catch (error) { + error.message = error.message.replace(/\n/g, ""); + const indexMatch = error.message.match(/in JSON at position (\d+) while parsing/); + const jsonError = new JSONError(error); + if (filename) { + jsonError.fileName = filename; + } + if (indexMatch && indexMatch.length > 0) { + const lines = new LinesAndColumns(string); + const index = Number(indexMatch[1]); + const location = lines.locationForIndex(index); + const codeFrame = codeFrameColumns(string, { start: { line: location.line + 1, column: location.column + 1 } }, { highlightCode: true }); + jsonError.codeFrame = codeFrame; + } + throw jsonError; + } + }; + parseJson.JSONError = JSONError; + module2.exports = parseJson; + } +}); + +// ../../node_modules/.pnpm/load-json-file@6.2.0/node_modules/load-json-file/index.js +var require_load_json_file = __commonJS({ + "../../node_modules/.pnpm/load-json-file@6.2.0/node_modules/load-json-file/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var { promisify } = require("util"); + var fs = require_graceful_fs(); + var stripBom = require_strip_bom(); + var parseJson = require_parse_json(); + var parse = (data, filePath, options = {}) => { + data = stripBom(data); + if (typeof options.beforeParse === "function") { + data = options.beforeParse(data); + } + return parseJson(data, options.reviver, path.relative(process.cwd(), filePath)); + }; + module2.exports = async (filePath, options) => parse(await promisify(fs.readFile)(filePath, "utf8"), filePath, options); + module2.exports.sync = (filePath, options) => parse(fs.readFileSync(filePath, "utf8"), filePath, options); + } +}); + +// ../cli-meta/lib/index.js +var require_lib4 = __commonJS({ + "../cli-meta/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var load_json_file_1 = __importDefault(require_load_json_file()); + var defaultManifest = { + name: "pnpm" != null && true ? "pnpm" : "pnpm", + version: "6.16.0" != null && true ? "6.16.0" : "0.0.0" + }; + var pkgJson; + if (require.main == null) { + pkgJson = defaultManifest; + } else { + try { + pkgJson = { + ...defaultManifest, + ...load_json_file_1.default.sync(path_1.default.join(path_1.default.dirname(require.main.filename), "../package.json")) + }; + } catch (err) { + pkgJson = defaultManifest; + } + } + var packageManager = { + name: pkgJson.name, + stableVersion: pkgJson.version.includes("-") ? pkgJson.version.substr(0, pkgJson.version.indexOf("-")) : pkgJson.version, + version: pkgJson.version + }; + exports2.default = packageManager; + } +}); + +// ../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/constants.js +var require_constants = __commonJS({ + "../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/constants.js"(exports2, module2) { + var BASH_LOCATION = "~/.bashrc"; + var FISH_LOCATION = "~/.config/fish/config.fish"; + var ZSH_LOCATION = "~/.zshrc"; + var COMPLETION_DIR = "~/.config/tabtab"; + var TABTAB_SCRIPT_NAME = "__tabtab"; + var SHELL_LOCATIONS = { + bash: "~/.bashrc", + zsh: "~/.zshrc", + fish: "~/.config/fish/config.fish" + }; + module2.exports = { + BASH_LOCATION, + ZSH_LOCATION, + FISH_LOCATION, + COMPLETION_DIR, + TABTAB_SCRIPT_NAME, + SHELL_LOCATIONS + }; + } +}); + +// ../../node_modules/.pnpm/ansi-colors@4.1.1/node_modules/ansi-colors/symbols.js +var require_symbols = __commonJS({ + "../../node_modules/.pnpm/ansi-colors@4.1.1/node_modules/ansi-colors/symbols.js"(exports2, module2) { + "use strict"; + var isHyper = process.env.TERM_PROGRAM === "Hyper"; + var isWindows = process.platform === "win32"; + var isLinux = process.platform === "linux"; + var common = { + ballotDisabled: "\u2612", + ballotOff: "\u2610", + ballotOn: "\u2611", + bullet: "\u2022", + bulletWhite: "\u25E6", + fullBlock: "\u2588", + heart: "\u2764", + identicalTo: "\u2261", + line: "\u2500", + mark: "\u203B", + middot: "\xB7", + minus: "\uFF0D", + multiplication: "\xD7", + obelus: "\xF7", + pencilDownRight: "\u270E", + pencilRight: "\u270F", + pencilUpRight: "\u2710", + percent: "%", + pilcrow2: "\u2761", + pilcrow: "\xB6", + plusMinus: "\xB1", + section: "\xA7", + starsOff: "\u2606", + starsOn: "\u2605", + upDownArrow: "\u2195" + }; + var windows = Object.assign({}, common, { + check: "\u221A", + cross: "\xD7", + ellipsisLarge: "...", + ellipsis: "...", + info: "i", + question: "?", + questionSmall: "?", + pointer: ">", + pointerSmall: "\xBB", + radioOff: "( )", + radioOn: "(*)", + warning: "\u203C" + }); + var other = Object.assign({}, common, { + ballotCross: "\u2718", + check: "\u2714", + cross: "\u2716", + ellipsisLarge: "\u22EF", + ellipsis: "\u2026", + info: "\u2139", + question: "?", + questionFull: "\uFF1F", + questionSmall: "\uFE56", + pointer: isLinux ? "\u25B8" : "\u276F", + pointerSmall: isLinux ? "\u2023" : "\u203A", + radioOff: "\u25EF", + radioOn: "\u25C9", + warning: "\u26A0" + }); + module2.exports = isWindows && !isHyper ? windows : other; + Reflect.defineProperty(module2.exports, "common", { enumerable: false, value: common }); + Reflect.defineProperty(module2.exports, "windows", { enumerable: false, value: windows }); + Reflect.defineProperty(module2.exports, "other", { enumerable: false, value: other }); + } +}); + +// ../../node_modules/.pnpm/ansi-colors@4.1.1/node_modules/ansi-colors/index.js +var require_ansi_colors = __commonJS({ + "../../node_modules/.pnpm/ansi-colors@4.1.1/node_modules/ansi-colors/index.js"(exports2, module2) { + "use strict"; + var isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val); + var ANSI_REGEX = /[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g; + var create = () => { + const colors = { enabled: true, visible: true, styles: {}, keys: {} }; + if ("FORCE_COLOR" in process.env) { + colors.enabled = process.env.FORCE_COLOR !== "0"; + } + const ansi = (style2) => { + let open = style2.open = `[${style2.codes[0]}m`; + let close = style2.close = `[${style2.codes[1]}m`; + let regex = style2.regex = new RegExp(`\\u001b\\[${style2.codes[1]}m`, "g"); + style2.wrap = (input, newline) => { + if (input.includes(close)) + input = input.replace(regex, close + open); + let output = open + input + close; + return newline ? output.replace(/\r*\n/g, `${close}$&${open}`) : output; + }; + return style2; + }; + const wrap = (style2, input, newline) => { + return typeof style2 === "function" ? style2(input) : style2.wrap(input, newline); + }; + const style = (input, stack2) => { + if (input === "" || input == null) + return ""; + if (colors.enabled === false) + return input; + if (colors.visible === false) + return ""; + let str = "" + input; + let nl = str.includes("\n"); + let n = stack2.length; + if (n > 0 && stack2.includes("unstyle")) { + stack2 = [...new Set(["unstyle", ...stack2])].reverse(); + } + while (n-- > 0) + str = wrap(colors.styles[stack2[n]], str, nl); + return str; + }; + const define2 = (name, codes, type) => { + colors.styles[name] = ansi({ name, codes }); + let keys = colors.keys[type] || (colors.keys[type] = []); + keys.push(name); + Reflect.defineProperty(colors, name, { + configurable: true, + enumerable: true, + set(value) { + colors.alias(name, value); + }, + get() { + let color = (input) => style(input, color.stack); + Reflect.setPrototypeOf(color, colors); + color.stack = this.stack ? this.stack.concat(name) : [name]; + return color; + } + }); + }; + define2("reset", [0, 0], "modifier"); + define2("bold", [1, 22], "modifier"); + define2("dim", [2, 22], "modifier"); + define2("italic", [3, 23], "modifier"); + define2("underline", [4, 24], "modifier"); + define2("inverse", [7, 27], "modifier"); + define2("hidden", [8, 28], "modifier"); + define2("strikethrough", [9, 29], "modifier"); + define2("black", [30, 39], "color"); + define2("red", [31, 39], "color"); + define2("green", [32, 39], "color"); + define2("yellow", [33, 39], "color"); + define2("blue", [34, 39], "color"); + define2("magenta", [35, 39], "color"); + define2("cyan", [36, 39], "color"); + define2("white", [37, 39], "color"); + define2("gray", [90, 39], "color"); + define2("grey", [90, 39], "color"); + define2("bgBlack", [40, 49], "bg"); + define2("bgRed", [41, 49], "bg"); + define2("bgGreen", [42, 49], "bg"); + define2("bgYellow", [43, 49], "bg"); + define2("bgBlue", [44, 49], "bg"); + define2("bgMagenta", [45, 49], "bg"); + define2("bgCyan", [46, 49], "bg"); + define2("bgWhite", [47, 49], "bg"); + define2("blackBright", [90, 39], "bright"); + define2("redBright", [91, 39], "bright"); + define2("greenBright", [92, 39], "bright"); + define2("yellowBright", [93, 39], "bright"); + define2("blueBright", [94, 39], "bright"); + define2("magentaBright", [95, 39], "bright"); + define2("cyanBright", [96, 39], "bright"); + define2("whiteBright", [97, 39], "bright"); + define2("bgBlackBright", [100, 49], "bgBright"); + define2("bgRedBright", [101, 49], "bgBright"); + define2("bgGreenBright", [102, 49], "bgBright"); + define2("bgYellowBright", [103, 49], "bgBright"); + define2("bgBlueBright", [104, 49], "bgBright"); + define2("bgMagentaBright", [105, 49], "bgBright"); + define2("bgCyanBright", [106, 49], "bgBright"); + define2("bgWhiteBright", [107, 49], "bgBright"); + colors.ansiRegex = ANSI_REGEX; + colors.hasColor = colors.hasAnsi = (str) => { + colors.ansiRegex.lastIndex = 0; + return typeof str === "string" && str !== "" && colors.ansiRegex.test(str); + }; + colors.alias = (name, color) => { + let fn2 = typeof color === "string" ? colors[color] : color; + if (typeof fn2 !== "function") { + throw new TypeError("Expected alias to be the name of an existing color (string) or a function"); + } + if (!fn2.stack) { + Reflect.defineProperty(fn2, "name", { value: name }); + colors.styles[name] = fn2; + fn2.stack = [name]; + } + Reflect.defineProperty(colors, name, { + configurable: true, + enumerable: true, + set(value) { + colors.alias(name, value); + }, + get() { + let color2 = (input) => style(input, color2.stack); + Reflect.setPrototypeOf(color2, colors); + color2.stack = this.stack ? this.stack.concat(fn2.stack) : fn2.stack; + return color2; + } + }); + }; + colors.theme = (custom) => { + if (!isObject(custom)) + throw new TypeError("Expected theme to be an object"); + for (let name of Object.keys(custom)) { + colors.alias(name, custom[name]); + } + return colors; + }; + colors.alias("unstyle", (str) => { + if (typeof str === "string" && str !== "") { + colors.ansiRegex.lastIndex = 0; + return str.replace(colors.ansiRegex, ""); + } + return ""; + }); + colors.alias("noop", (str) => str); + colors.none = colors.clear = colors.noop; + colors.stripColor = colors.unstyle; + colors.symbols = require_symbols(); + colors.define = define2; + return colors; + }; + module2.exports = create(); + module2.exports.create = create; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/utils.js +var require_utils = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/utils.js"(exports2) { + "use strict"; + var toString = Object.prototype.toString; + var colors = require_ansi_colors(); + var called = false; + var fns = []; + var complements = { + "yellow": "blue", + "cyan": "red", + "green": "magenta", + "black": "white", + "blue": "yellow", + "red": "cyan", + "magenta": "green", + "white": "black" + }; + exports2.longest = (arr, prop) => { + return arr.reduce((a, v) => Math.max(a, prop ? v[prop].length : v.length), 0); + }; + exports2.hasColor = (str) => !!str && colors.hasColor(str); + var isObject = exports2.isObject = (val) => { + return val !== null && typeof val === "object" && !Array.isArray(val); + }; + exports2.nativeType = (val) => { + return toString.call(val).slice(8, -1).toLowerCase().replace(/\s/g, ""); + }; + exports2.isAsyncFn = (val) => { + return exports2.nativeType(val) === "asyncfunction"; + }; + exports2.isPrimitive = (val) => { + return val != null && typeof val !== "object" && typeof val !== "function"; + }; + exports2.resolve = (context, value, ...rest) => { + if (typeof value === "function") { + return value.call(context, ...rest); + } + return value; + }; + exports2.scrollDown = (choices = []) => [...choices.slice(1), choices[0]]; + exports2.scrollUp = (choices = []) => [choices.pop(), ...choices]; + exports2.reorder = (arr = []) => { + let res = arr.slice(); + res.sort((a, b) => { + if (a.index > b.index) + return 1; + if (a.index < b.index) + return -1; + return 0; + }); + return res; + }; + exports2.swap = (arr, index, pos) => { + let len = arr.length; + let idx = pos === len ? 0 : pos < 0 ? len - 1 : pos; + let choice = arr[index]; + arr[index] = arr[idx]; + arr[idx] = choice; + }; + exports2.width = (stream, fallback = 80) => { + let columns = stream && stream.columns ? stream.columns : fallback; + if (stream && typeof stream.getWindowSize === "function") { + columns = stream.getWindowSize()[0]; + } + if (process.platform === "win32") { + return columns - 1; + } + return columns; + }; + exports2.height = (stream, fallback = 20) => { + let rows = stream && stream.rows ? stream.rows : fallback; + if (stream && typeof stream.getWindowSize === "function") { + rows = stream.getWindowSize()[1]; + } + return rows; + }; + exports2.wordWrap = (str, options = {}) => { + if (!str) + return str; + if (typeof options === "number") { + options = { width: options }; + } + let { indent = "", newline = "\n" + indent, width = 80 } = options; + let spaces = (newline + indent).match(/[^\S\n]/g) || []; + width -= spaces.length; + let source = `.{1,${width}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`; + let output = str.trim(); + let regex = new RegExp(source, "g"); + let lines = output.match(regex) || []; + lines = lines.map((line) => line.replace(/\n$/, "")); + if (options.padEnd) + lines = lines.map((line) => line.padEnd(width, " ")); + if (options.padStart) + lines = lines.map((line) => line.padStart(width, " ")); + return indent + lines.join(newline); + }; + exports2.unmute = (color) => { + let name = color.stack.find((n) => colors.keys.color.includes(n)); + if (name) { + return colors[name]; + } + let bg = color.stack.find((n) => n.slice(2) === "bg"); + if (bg) { + return colors[name.slice(2)]; + } + return (str) => str; + }; + exports2.pascal = (str) => str ? str[0].toUpperCase() + str.slice(1) : ""; + exports2.inverse = (color) => { + if (!color || !color.stack) + return color; + let name = color.stack.find((n) => colors.keys.color.includes(n)); + if (name) { + let col = colors["bg" + exports2.pascal(name)]; + return col ? col.black : color; + } + let bg = color.stack.find((n) => n.slice(0, 2) === "bg"); + if (bg) { + return colors[bg.slice(2).toLowerCase()] || color; + } + return colors.none; + }; + exports2.complement = (color) => { + if (!color || !color.stack) + return color; + let name = color.stack.find((n) => colors.keys.color.includes(n)); + let bg = color.stack.find((n) => n.slice(0, 2) === "bg"); + if (name && !bg) { + return colors[complements[name] || name]; + } + if (bg) { + let lower = bg.slice(2).toLowerCase(); + let comp = complements[lower]; + if (!comp) + return color; + return colors["bg" + exports2.pascal(comp)] || color; + } + return colors.none; + }; + exports2.meridiem = (date) => { + let hours = date.getHours(); + let minutes = date.getMinutes(); + let ampm = hours >= 12 ? "pm" : "am"; + hours = hours % 12; + let hrs = hours === 0 ? 12 : hours; + let min = minutes < 10 ? "0" + minutes : minutes; + return hrs + ":" + min + " " + ampm; + }; + exports2.set = (obj = {}, prop = "", val) => { + return prop.split(".").reduce((acc, k, i, arr) => { + let value = arr.length - 1 > i ? acc[k] || {} : val; + if (!exports2.isObject(value) && i < arr.length - 1) + value = {}; + return acc[k] = value; + }, obj); + }; + exports2.get = (obj = {}, prop = "", fallback) => { + let value = obj[prop] == null ? prop.split(".").reduce((acc, k) => acc && acc[k], obj) : obj[prop]; + return value == null ? fallback : value; + }; + exports2.mixin = (target, b) => { + if (!isObject(target)) + return b; + if (!isObject(b)) + return target; + for (let key of Object.keys(b)) { + let desc = Object.getOwnPropertyDescriptor(b, key); + if (desc.hasOwnProperty("value")) { + if (target.hasOwnProperty(key) && isObject(desc.value)) { + let existing = Object.getOwnPropertyDescriptor(target, key); + if (isObject(existing.value)) { + target[key] = exports2.merge({}, target[key], b[key]); + } else { + Reflect.defineProperty(target, key, desc); + } + } else { + Reflect.defineProperty(target, key, desc); + } + } else { + Reflect.defineProperty(target, key, desc); + } + } + return target; + }; + exports2.merge = (...args2) => { + let target = {}; + for (let ele of args2) + exports2.mixin(target, ele); + return target; + }; + exports2.mixinEmitter = (obj, emitter) => { + let proto = emitter.constructor.prototype; + for (let key of Object.keys(proto)) { + let val = proto[key]; + if (typeof val === "function") { + exports2.define(obj, key, val.bind(emitter)); + } else { + exports2.define(obj, key, val); + } + } + }; + exports2.onExit = (callback) => { + const onExit = (quit, code) => { + if (called) + return; + called = true; + fns.forEach((fn2) => fn2()); + if (quit === true) { + process.exit(128 + code); + } + }; + if (fns.length === 0) { + process.once("SIGTERM", onExit.bind(null, true, 15)); + process.once("SIGINT", onExit.bind(null, true, 2)); + process.once("exit", onExit); + } + fns.push(callback); + }; + exports2.define = (obj, key, value) => { + Reflect.defineProperty(obj, key, { value }); + }; + exports2.defineExport = (obj, key, fn2) => { + let custom; + Reflect.defineProperty(obj, key, { + enumerable: true, + configurable: true, + set(val) { + custom = val; + }, + get() { + return custom ? custom() : fn2(); + } + }); + }; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/combos.js +var require_combos = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/combos.js"(exports2) { + "use strict"; + exports2.ctrl = { + a: "first", + b: "backward", + c: "cancel", + d: "deleteForward", + e: "last", + f: "forward", + g: "reset", + i: "tab", + k: "cutForward", + l: "reset", + n: "newItem", + m: "cancel", + j: "submit", + p: "search", + r: "remove", + s: "save", + u: "undo", + w: "cutLeft", + x: "toggleCursor", + v: "paste" + }; + exports2.shift = { + up: "shiftUp", + down: "shiftDown", + left: "shiftLeft", + right: "shiftRight", + tab: "prev" + }; + exports2.fn = { + up: "pageUp", + down: "pageDown", + left: "pageLeft", + right: "pageRight", + delete: "deleteForward" + }; + exports2.option = { + b: "backward", + f: "forward", + d: "cutRight", + left: "cutLeft", + up: "altUp", + down: "altDown" + }; + exports2.keys = { + pageup: "pageUp", + pagedown: "pageDown", + home: "home", + end: "end", + cancel: "cancel", + delete: "deleteForward", + backspace: "delete", + down: "down", + enter: "submit", + escape: "cancel", + left: "left", + space: "space", + number: "number", + return: "submit", + right: "right", + tab: "next", + up: "up" + }; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/keypress.js +var require_keypress = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/keypress.js"(exports2, module2) { + "use strict"; + var readline = require("readline"); + var combos = require_combos(); + var metaKeyCodeRe = /^(?:\x1b)([a-zA-Z0-9])$/; + var fnKeyRe = /^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/; + var keyName = { + "OP": "f1", + "OQ": "f2", + "OR": "f3", + "OS": "f4", + "[11~": "f1", + "[12~": "f2", + "[13~": "f3", + "[14~": "f4", + "[[A": "f1", + "[[B": "f2", + "[[C": "f3", + "[[D": "f4", + "[[E": "f5", + "[15~": "f5", + "[17~": "f6", + "[18~": "f7", + "[19~": "f8", + "[20~": "f9", + "[21~": "f10", + "[23~": "f11", + "[24~": "f12", + "[A": "up", + "[B": "down", + "[C": "right", + "[D": "left", + "[E": "clear", + "[F": "end", + "[H": "home", + "OA": "up", + "OB": "down", + "OC": "right", + "OD": "left", + "OE": "clear", + "OF": "end", + "OH": "home", + "[1~": "home", + "[2~": "insert", + "[3~": "delete", + "[4~": "end", + "[5~": "pageup", + "[6~": "pagedown", + "[[5~": "pageup", + "[[6~": "pagedown", + "[7~": "home", + "[8~": "end", + "[a": "up", + "[b": "down", + "[c": "right", + "[d": "left", + "[e": "clear", + "[2$": "insert", + "[3$": "delete", + "[5$": "pageup", + "[6$": "pagedown", + "[7$": "home", + "[8$": "end", + "Oa": "up", + "Ob": "down", + "Oc": "right", + "Od": "left", + "Oe": "clear", + "[2^": "insert", + "[3^": "delete", + "[5^": "pageup", + "[6^": "pagedown", + "[7^": "home", + "[8^": "end", + "[Z": "tab" + }; + function isShiftKey(code) { + return ["[a", "[b", "[c", "[d", "[e", "[2$", "[3$", "[5$", "[6$", "[7$", "[8$", "[Z"].includes(code); + } + function isCtrlKey(code) { + return ["Oa", "Ob", "Oc", "Od", "Oe", "[2^", "[3^", "[5^", "[6^", "[7^", "[8^"].includes(code); + } + var keypress = (s = "", event = {}) => { + let parts; + let key = { + name: event.name, + ctrl: false, + meta: false, + shift: false, + option: false, + sequence: s, + raw: s, + ...event + }; + if (Buffer.isBuffer(s)) { + if (s[0] > 127 && s[1] === void 0) { + s[0] -= 128; + s = "" + String(s); + } else { + s = String(s); + } + } else if (s !== void 0 && typeof s !== "string") { + s = String(s); + } else if (!s) { + s = key.sequence || ""; + } + key.sequence = key.sequence || s || key.name; + if (s === "\r") { + key.raw = void 0; + key.name = "return"; + } else if (s === "\n") { + key.name = "enter"; + } else if (s === " ") { + key.name = "tab"; + } else if (s === "\b" || s === "\x7F" || s === "\x7F" || s === "\b") { + key.name = "backspace"; + key.meta = s.charAt(0) === ""; + } else if (s === "" || s === "") { + key.name = "escape"; + key.meta = s.length === 2; + } else if (s === " " || s === " ") { + key.name = "space"; + key.meta = s.length === 2; + } else if (s <= "") { + key.name = String.fromCharCode(s.charCodeAt(0) + "a".charCodeAt(0) - 1); + key.ctrl = true; + } else if (s.length === 1 && s >= "0" && s <= "9") { + key.name = "number"; + } else if (s.length === 1 && s >= "a" && s <= "z") { + key.name = s; + } else if (s.length === 1 && s >= "A" && s <= "Z") { + key.name = s.toLowerCase(); + key.shift = true; + } else if (parts = metaKeyCodeRe.exec(s)) { + key.meta = true; + key.shift = /^[A-Z]$/.test(parts[1]); + } else if (parts = fnKeyRe.exec(s)) { + let segs = [...s]; + if (segs[0] === "" && segs[1] === "") { + key.option = true; + } + let code = [parts[1], parts[2], parts[4], parts[6]].filter(Boolean).join(""); + let modifier = (parts[3] || parts[5] || 1) - 1; + key.ctrl = !!(modifier & 4); + key.meta = !!(modifier & 10); + key.shift = !!(modifier & 1); + key.code = code; + key.name = keyName[code]; + key.shift = isShiftKey(code) || key.shift; + key.ctrl = isCtrlKey(code) || key.ctrl; + } + return key; + }; + keypress.listen = (options = {}, onKeypress) => { + let { stdin } = options; + if (!stdin || stdin !== process.stdin && !stdin.isTTY) { + throw new Error("Invalid stream passed"); + } + let rl = readline.createInterface({ terminal: true, input: stdin }); + readline.emitKeypressEvents(stdin, rl); + let on = (buf, key) => onKeypress(buf, keypress(buf, key), rl); + let isRaw = stdin.isRaw; + if (stdin.isTTY) + stdin.setRawMode(true); + stdin.on("keypress", on); + rl.resume(); + let off = () => { + if (stdin.isTTY) + stdin.setRawMode(isRaw); + stdin.removeListener("keypress", on); + rl.pause(); + rl.close(); + }; + return off; + }; + keypress.action = (buf, key, customActions) => { + let obj = { ...combos, ...customActions }; + if (key.ctrl) { + key.action = obj.ctrl[key.name]; + return key; + } + if (key.option && obj.option) { + key.action = obj.option[key.name]; + return key; + } + if (key.shift) { + key.action = obj.shift[key.name]; + return key; + } + key.action = obj.keys[key.name]; + return key; + }; + module2.exports = keypress; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/timer.js +var require_timer = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/timer.js"(exports2, module2) { + "use strict"; + module2.exports = (prompt) => { + prompt.timers = prompt.timers || {}; + let timers = prompt.options.timers; + if (!timers) + return; + for (let key of Object.keys(timers)) { + let opts = timers[key]; + if (typeof opts === "number") { + opts = { interval: opts }; + } + create(prompt, key, opts); + } + }; + function create(prompt, name, options = {}) { + let timer = prompt.timers[name] = { name, start: Date.now(), ms: 0, tick: 0 }; + let ms = options.interval || 120; + timer.frames = options.frames || []; + timer.loading = true; + let interval = setInterval(() => { + timer.ms = Date.now() - timer.start; + timer.tick++; + prompt.render(); + }, ms); + timer.stop = () => { + timer.loading = false; + clearInterval(interval); + }; + Reflect.defineProperty(timer, "interval", { value: interval }); + prompt.once("close", () => timer.stop()); + return timer.stop; + } + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/state.js +var require_state = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/state.js"(exports2, module2) { + "use strict"; + var { define: define2, width } = require_utils(); + var State = class { + constructor(prompt) { + let options = prompt.options; + define2(this, "_prompt", prompt); + this.type = prompt.type; + this.name = prompt.name; + this.message = ""; + this.header = ""; + this.footer = ""; + this.error = ""; + this.hint = ""; + this.input = ""; + this.cursor = 0; + this.index = 0; + this.lines = 0; + this.tick = 0; + this.prompt = ""; + this.buffer = ""; + this.width = width(options.stdout || process.stdout); + Object.assign(this, options); + this.name = this.name || this.message; + this.message = this.message || this.name; + this.symbols = prompt.symbols; + this.styles = prompt.styles; + this.required = new Set(); + this.cancelled = false; + this.submitted = false; + } + clone() { + let state = { ...this }; + state.status = this.status; + state.buffer = Buffer.from(state.buffer); + delete state.clone; + return state; + } + set color(val) { + this._color = val; + } + get color() { + let styles = this.prompt.styles; + if (this.cancelled) + return styles.cancelled; + if (this.submitted) + return styles.submitted; + let color = this._color || styles[this.status]; + return typeof color === "function" ? color : styles.pending; + } + set loading(value) { + this._loading = value; + } + get loading() { + if (typeof this._loading === "boolean") + return this._loading; + if (this.loadingChoices) + return "choices"; + return false; + } + get status() { + if (this.cancelled) + return "cancelled"; + if (this.submitted) + return "submitted"; + return "pending"; + } + }; + module2.exports = State; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/styles.js +var require_styles = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/styles.js"(exports2, module2) { + "use strict"; + var utils = require_utils(); + var colors = require_ansi_colors(); + var styles = { + default: colors.noop, + noop: colors.noop, + set inverse(custom) { + this._inverse = custom; + }, + get inverse() { + return this._inverse || utils.inverse(this.primary); + }, + set complement(custom) { + this._complement = custom; + }, + get complement() { + return this._complement || utils.complement(this.primary); + }, + primary: colors.cyan, + success: colors.green, + danger: colors.magenta, + strong: colors.bold, + warning: colors.yellow, + muted: colors.dim, + disabled: colors.gray, + dark: colors.dim.gray, + underline: colors.underline, + set info(custom) { + this._info = custom; + }, + get info() { + return this._info || this.primary; + }, + set em(custom) { + this._em = custom; + }, + get em() { + return this._em || this.primary.underline; + }, + set heading(custom) { + this._heading = custom; + }, + get heading() { + return this._heading || this.muted.underline; + }, + set pending(custom) { + this._pending = custom; + }, + get pending() { + return this._pending || this.primary; + }, + set submitted(custom) { + this._submitted = custom; + }, + get submitted() { + return this._submitted || this.success; + }, + set cancelled(custom) { + this._cancelled = custom; + }, + get cancelled() { + return this._cancelled || this.danger; + }, + set typing(custom) { + this._typing = custom; + }, + get typing() { + return this._typing || this.dim; + }, + set placeholder(custom) { + this._placeholder = custom; + }, + get placeholder() { + return this._placeholder || this.primary.dim; + }, + set highlight(custom) { + this._highlight = custom; + }, + get highlight() { + return this._highlight || this.inverse; + } + }; + styles.merge = (options = {}) => { + if (options.styles && typeof options.styles.enabled === "boolean") { + colors.enabled = options.styles.enabled; + } + if (options.styles && typeof options.styles.visible === "boolean") { + colors.visible = options.styles.visible; + } + let result = utils.merge({}, styles, options.styles); + delete result.merge; + for (let key of Object.keys(colors)) { + if (!result.hasOwnProperty(key)) { + Reflect.defineProperty(result, key, { get: () => colors[key] }); + } + } + for (let key of Object.keys(colors.styles)) { + if (!result.hasOwnProperty(key)) { + Reflect.defineProperty(result, key, { get: () => colors[key] }); + } + } + return result; + }; + module2.exports = styles; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/symbols.js +var require_symbols2 = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/symbols.js"(exports2, module2) { + "use strict"; + var isWindows = process.platform === "win32"; + var colors = require_ansi_colors(); + var utils = require_utils(); + var symbols = { + ...colors.symbols, + upDownDoubleArrow: "\u21D5", + upDownDoubleArrow2: "\u2B0D", + upDownArrow: "\u2195", + asterisk: "*", + asterism: "\u2042", + bulletWhite: "\u25E6", + electricArrow: "\u2301", + ellipsisLarge: "\u22EF", + ellipsisSmall: "\u2026", + fullBlock: "\u2588", + identicalTo: "\u2261", + indicator: colors.symbols.check, + leftAngle: "\u2039", + mark: "\u203B", + minus: "\u2212", + multiplication: "\xD7", + obelus: "\xF7", + percent: "%", + pilcrow: "\xB6", + pilcrow2: "\u2761", + pencilUpRight: "\u2710", + pencilDownRight: "\u270E", + pencilRight: "\u270F", + plus: "+", + plusMinus: "\xB1", + pointRight: "\u261E", + rightAngle: "\u203A", + section: "\xA7", + hexagon: { off: "\u2B21", on: "\u2B22", disabled: "\u2B22" }, + ballot: { on: "\u2611", off: "\u2610", disabled: "\u2612" }, + stars: { on: "\u2605", off: "\u2606", disabled: "\u2606" }, + folder: { on: "\u25BC", off: "\u25B6", disabled: "\u25B6" }, + prefix: { + pending: colors.symbols.question, + submitted: colors.symbols.check, + cancelled: colors.symbols.cross + }, + separator: { + pending: colors.symbols.pointerSmall, + submitted: colors.symbols.middot, + cancelled: colors.symbols.middot + }, + radio: { + off: isWindows ? "( )" : "\u25EF", + on: isWindows ? "(*)" : "\u25C9", + disabled: isWindows ? "(|)" : "\u24BE" + }, + numbers: ["\u24EA", "\u2460", "\u2461", "\u2462", "\u2463", "\u2464", "\u2465", "\u2466", "\u2467", "\u2468", "\u2469", "\u246A", "\u246B", "\u246C", "\u246D", "\u246E", "\u246F", "\u2470", "\u2471", "\u2472", "\u2473", "\u3251", "\u3252", "\u3253", "\u3254", "\u3255", "\u3256", "\u3257", "\u3258", "\u3259", "\u325A", "\u325B", "\u325C", "\u325D", "\u325E", "\u325F", "\u32B1", "\u32B2", "\u32B3", "\u32B4", "\u32B5", "\u32B6", "\u32B7", "\u32B8", "\u32B9", "\u32BA", "\u32BB", "\u32BC", "\u32BD", "\u32BE", "\u32BF"] + }; + symbols.merge = (options) => { + let result = utils.merge({}, colors.symbols, symbols, options.symbols); + delete result.merge; + return result; + }; + module2.exports = symbols; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/theme.js +var require_theme = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/theme.js"(exports2, module2) { + "use strict"; + var styles = require_styles(); + var symbols = require_symbols2(); + var utils = require_utils(); + module2.exports = (prompt) => { + prompt.options = utils.merge({}, prompt.options.theme, prompt.options); + prompt.symbols = symbols.merge(prompt.options); + prompt.styles = styles.merge(prompt.options); + }; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/ansi.js +var require_ansi = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/ansi.js"(exports2, module2) { + "use strict"; + var isTerm = process.env.TERM_PROGRAM === "Apple_Terminal"; + var colors = require_ansi_colors(); + var utils = require_utils(); + var ansi = module2.exports = exports2; + var ESC = "["; + var BEL = "\x07"; + var hidden = false; + var code = ansi.code = { + bell: BEL, + beep: BEL, + beginning: `${ESC}G`, + down: `${ESC}J`, + esc: ESC, + getPosition: `${ESC}6n`, + hide: `${ESC}?25l`, + line: `${ESC}2K`, + lineEnd: `${ESC}K`, + lineStart: `${ESC}1K`, + restorePosition: ESC + (isTerm ? "8" : "u"), + savePosition: ESC + (isTerm ? "7" : "s"), + screen: `${ESC}2J`, + show: `${ESC}?25h`, + up: `${ESC}1J` + }; + var cursor = ansi.cursor = { + get hidden() { + return hidden; + }, + hide() { + hidden = true; + return code.hide; + }, + show() { + hidden = false; + return code.show; + }, + forward: (count = 1) => `${ESC}${count}C`, + backward: (count = 1) => `${ESC}${count}D`, + nextLine: (count = 1) => `${ESC}E`.repeat(count), + prevLine: (count = 1) => `${ESC}F`.repeat(count), + up: (count = 1) => count ? `${ESC}${count}A` : "", + down: (count = 1) => count ? `${ESC}${count}B` : "", + right: (count = 1) => count ? `${ESC}${count}C` : "", + left: (count = 1) => count ? `${ESC}${count}D` : "", + to(x, y) { + return y ? `${ESC}${y + 1};${x + 1}H` : `${ESC}${x + 1}G`; + }, + move(x = 0, y = 0) { + let res = ""; + res += x < 0 ? cursor.left(-x) : x > 0 ? cursor.right(x) : ""; + res += y < 0 ? cursor.up(-y) : y > 0 ? cursor.down(y) : ""; + return res; + }, + restore(state = {}) { + let { after, cursor: cursor2, initial, input, prompt, size, value } = state; + initial = utils.isPrimitive(initial) ? String(initial) : ""; + input = utils.isPrimitive(input) ? String(input) : ""; + value = utils.isPrimitive(value) ? String(value) : ""; + if (size) { + let codes = ansi.cursor.up(size) + ansi.cursor.to(prompt.length); + let diff = input.length - cursor2; + if (diff > 0) { + codes += ansi.cursor.left(diff); + } + return codes; + } + if (value || after) { + let pos = !input && !!initial ? -initial.length : -input.length + cursor2; + if (after) + pos -= after.length; + if (input === "" && initial && !prompt.includes(initial)) { + pos += initial.length; + } + return ansi.cursor.move(pos); + } + } + }; + var erase = ansi.erase = { + screen: code.screen, + up: code.up, + down: code.down, + line: code.line, + lineEnd: code.lineEnd, + lineStart: code.lineStart, + lines(n) { + let str = ""; + for (let i = 0; i < n; i++) { + str += ansi.erase.line + (i < n - 1 ? ansi.cursor.up(1) : ""); + } + if (n) + str += ansi.code.beginning; + return str; + } + }; + ansi.clear = (input = "", columns = process.stdout.columns) => { + if (!columns) + return erase.line + cursor.to(0); + let width = (str) => [...colors.unstyle(str)].length; + let lines = input.split(/\r?\n/); + let rows = 0; + for (let line of lines) { + rows += 1 + Math.floor(Math.max(width(line) - 1, 0) / columns); + } + return (erase.line + cursor.prevLine()).repeat(rows - 1) + erase.line + cursor.to(0); + }; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompt.js +var require_prompt = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompt.js"(exports2, module2) { + "use strict"; + var Events = require("events"); + var colors = require_ansi_colors(); + var keypress = require_keypress(); + var timer = require_timer(); + var State = require_state(); + var theme = require_theme(); + var utils = require_utils(); + var ansi = require_ansi(); + var Prompt = class extends Events { + constructor(options = {}) { + super(); + this.name = options.name; + this.type = options.type; + this.options = options; + theme(this); + timer(this); + this.state = new State(this); + this.initial = [options.initial, options.default].find((v) => v != null); + this.stdout = options.stdout || process.stdout; + this.stdin = options.stdin || process.stdin; + this.scale = options.scale || 1; + this.term = this.options.term || process.env.TERM_PROGRAM; + this.margin = margin(this.options.margin); + this.setMaxListeners(0); + setOptions(this); + } + async keypress(input, event = {}) { + this.keypressed = true; + let key = keypress.action(input, keypress(input, event), this.options.actions); + this.state.keypress = key; + this.emit("keypress", input, key); + this.emit("state", this.state.clone()); + let fn2 = this.options[key.action] || this[key.action] || this.dispatch; + if (typeof fn2 === "function") { + return await fn2.call(this, input, key); + } + this.alert(); + } + alert() { + delete this.state.alert; + if (this.options.show === false) { + this.emit("alert"); + } else { + this.stdout.write(ansi.code.beep); + } + } + cursorHide() { + this.stdout.write(ansi.cursor.hide()); + utils.onExit(() => this.cursorShow()); + } + cursorShow() { + this.stdout.write(ansi.cursor.show()); + } + write(str) { + if (!str) + return; + if (this.stdout && this.state.show !== false) { + this.stdout.write(str); + } + this.state.buffer += str; + } + clear(lines = 0) { + let buffer = this.state.buffer; + this.state.buffer = ""; + if (!buffer && !lines || this.options.show === false) + return; + this.stdout.write(ansi.cursor.down(lines) + ansi.clear(buffer, this.width)); + } + restore() { + if (this.state.closed || this.options.show === false) + return; + let { prompt, after, rest } = this.sections(); + let { cursor, initial = "", input = "", value = "" } = this; + let size = this.state.size = rest.length; + let state = { after, cursor, initial, input, prompt, size, value }; + let codes = ansi.cursor.restore(state); + if (codes) { + this.stdout.write(codes); + } + } + sections() { + let { buffer, input, prompt } = this.state; + prompt = colors.unstyle(prompt); + let buf = colors.unstyle(buffer); + let idx = buf.indexOf(prompt); + let header = buf.slice(0, idx); + let rest = buf.slice(idx); + let lines = rest.split("\n"); + let first = lines[0]; + let last = lines[lines.length - 1]; + let promptLine = prompt + (input ? " " + input : ""); + let len = promptLine.length; + let after = len < first.length ? first.slice(len + 1) : ""; + return { header, prompt: first, after, rest: lines.slice(1), last }; + } + async submit() { + this.state.submitted = true; + this.state.validating = true; + if (this.options.onSubmit) { + await this.options.onSubmit.call(this, this.name, this.value, this); + } + let result = this.state.error || await this.validate(this.value, this.state); + if (result !== true) { + let error = "\n" + this.symbols.pointer + " "; + if (typeof result === "string") { + error += result.trim(); + } else { + error += "Invalid input"; + } + this.state.error = "\n" + this.styles.danger(error); + this.state.submitted = false; + await this.render(); + await this.alert(); + this.state.validating = false; + this.state.error = void 0; + return; + } + this.state.validating = false; + await this.render(); + await this.close(); + this.value = await this.result(this.value); + this.emit("submit", this.value); + } + async cancel(err) { + this.state.cancelled = this.state.submitted = true; + await this.render(); + await this.close(); + if (typeof this.options.onCancel === "function") { + await this.options.onCancel.call(this, this.name, this.value, this); + } + this.emit("cancel", await this.error(err)); + } + async close() { + this.state.closed = true; + try { + let sections = this.sections(); + let lines = Math.ceil(sections.prompt.length / this.width); + if (sections.rest) { + this.write(ansi.cursor.down(sections.rest.length)); + } + this.write("\n".repeat(lines)); + } catch (err) { + } + this.emit("close"); + } + start() { + if (!this.stop && this.options.show !== false) { + this.stop = keypress.listen(this, this.keypress.bind(this)); + this.once("close", this.stop); + } + } + async skip() { + this.skipped = this.options.skip === true; + if (typeof this.options.skip === "function") { + this.skipped = await this.options.skip.call(this, this.name, this.value); + } + return this.skipped; + } + async initialize() { + let { format, options, result } = this; + this.format = () => format.call(this, this.value); + this.result = () => result.call(this, this.value); + if (typeof options.initial === "function") { + this.initial = await options.initial.call(this, this); + } + if (typeof options.onRun === "function") { + await options.onRun.call(this, this); + } + if (typeof options.onSubmit === "function") { + let onSubmit = options.onSubmit.bind(this); + let submit = this.submit.bind(this); + delete this.options.onSubmit; + this.submit = async () => { + await onSubmit(this.name, this.value, this); + return submit(); + }; + } + await this.start(); + await this.render(); + } + render() { + throw new Error("expected prompt to have a custom render method"); + } + run() { + return new Promise(async (resolve, reject) => { + this.once("submit", resolve); + this.once("cancel", reject); + if (await this.skip()) { + this.render = () => { + }; + return this.submit(); + } + await this.initialize(); + this.emit("run"); + }); + } + async element(name, choice, i) { + let { options, state, symbols, timers } = this; + let timer2 = timers && timers[name]; + state.timer = timer2; + let value = options[name] || state[name] || symbols[name]; + let val = choice && choice[name] != null ? choice[name] : await value; + if (val === "") + return val; + let res = await this.resolve(val, state, choice, i); + if (!res && choice && choice[name]) { + return this.resolve(value, state, choice, i); + } + return res; + } + async prefix() { + let element = await this.element("prefix") || this.symbols; + let timer2 = this.timers && this.timers.prefix; + let state = this.state; + state.timer = timer2; + if (utils.isObject(element)) + element = element[state.status] || element.pending; + if (!utils.hasColor(element)) { + let style = this.styles[state.status] || this.styles.pending; + return style(element); + } + return element; + } + async message() { + let message2 = await this.element("message"); + if (!utils.hasColor(message2)) { + return this.styles.strong(message2); + } + return message2; + } + async separator() { + let element = await this.element("separator") || this.symbols; + let timer2 = this.timers && this.timers.separator; + let state = this.state; + state.timer = timer2; + let value = element[state.status] || element.pending || state.separator; + let ele = await this.resolve(value, state); + if (utils.isObject(ele)) + ele = ele[state.status] || ele.pending; + if (!utils.hasColor(ele)) { + return this.styles.muted(ele); + } + return ele; + } + async pointer(choice, i) { + let val = await this.element("pointer", choice, i); + if (typeof val === "string" && utils.hasColor(val)) { + return val; + } + if (val) { + let styles = this.styles; + let focused = this.index === i; + let style = focused ? styles.primary : (val2) => val2; + let ele = await this.resolve(val[focused ? "on" : "off"] || val, this.state); + let styled = !utils.hasColor(ele) ? style(ele) : ele; + return focused ? styled : " ".repeat(ele.length); + } + } + async indicator(choice, i) { + let val = await this.element("indicator", choice, i); + if (typeof val === "string" && utils.hasColor(val)) { + return val; + } + if (val) { + let styles = this.styles; + let enabled = choice.enabled === true; + let style = enabled ? styles.success : styles.dark; + let ele = val[enabled ? "on" : "off"] || val; + return !utils.hasColor(ele) ? style(ele) : ele; + } + return ""; + } + body() { + return null; + } + footer() { + if (this.state.status === "pending") { + return this.element("footer"); + } + } + header() { + if (this.state.status === "pending") { + return this.element("header"); + } + } + async hint() { + if (this.state.status === "pending" && !this.isValue(this.state.input)) { + let hint = await this.element("hint"); + if (!utils.hasColor(hint)) { + return this.styles.muted(hint); + } + return hint; + } + } + error(err) { + return !this.state.submitted ? err || this.state.error : ""; + } + format(value) { + return value; + } + result(value) { + return value; + } + validate(value) { + if (this.options.required === true) { + return this.isValue(value); + } + return true; + } + isValue(value) { + return value != null && value !== ""; + } + resolve(value, ...args2) { + return utils.resolve(this, value, ...args2); + } + get base() { + return Prompt.prototype; + } + get style() { + return this.styles[this.state.status]; + } + get height() { + return this.options.rows || utils.height(this.stdout, 25); + } + get width() { + return this.options.columns || utils.width(this.stdout, 80); + } + get size() { + return { width: this.width, height: this.height }; + } + set cursor(value) { + this.state.cursor = value; + } + get cursor() { + return this.state.cursor; + } + set input(value) { + this.state.input = value; + } + get input() { + return this.state.input; + } + set value(value) { + this.state.value = value; + } + get value() { + let { input, value } = this.state; + let result = [value, input].find(this.isValue.bind(this)); + return this.isValue(result) ? result : this.initial; + } + static get prompt() { + return (options) => new this(options).run(); + } + }; + function setOptions(prompt) { + let isValidKey = (key) => { + return prompt[key] === void 0 || typeof prompt[key] === "function"; + }; + let ignore = [ + "actions", + "choices", + "initial", + "margin", + "roles", + "styles", + "symbols", + "theme", + "timers", + "value" + ]; + let ignoreFn = [ + "body", + "footer", + "error", + "header", + "hint", + "indicator", + "message", + "prefix", + "separator", + "skip" + ]; + for (let key of Object.keys(prompt.options)) { + if (ignore.includes(key)) + continue; + if (/^on[A-Z]/.test(key)) + continue; + let option = prompt.options[key]; + if (typeof option === "function" && isValidKey(key)) { + if (!ignoreFn.includes(key)) { + prompt[key] = option.bind(prompt); + } + } else if (typeof prompt[key] !== "function") { + prompt[key] = option; + } + } + } + function margin(value) { + if (typeof value === "number") { + value = [value, value, value, value]; + } + let arr = [].concat(value || []); + let pad = (i) => i % 2 === 0 ? "\n" : " "; + let res = []; + for (let i = 0; i < 4; i++) { + let char = pad(i); + if (arr[i]) { + res.push(char.repeat(arr[i])); + } else { + res.push(""); + } + } + return res; + } + module2.exports = Prompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/roles.js +var require_roles = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/roles.js"(exports2, module2) { + "use strict"; + var utils = require_utils(); + var roles = { + default(prompt, choice) { + return choice; + }, + checkbox(prompt, choice) { + throw new Error("checkbox role is not implemented yet"); + }, + editable(prompt, choice) { + throw new Error("editable role is not implemented yet"); + }, + expandable(prompt, choice) { + throw new Error("expandable role is not implemented yet"); + }, + heading(prompt, choice) { + choice.disabled = ""; + choice.indicator = [choice.indicator, " "].find((v) => v != null); + choice.message = choice.message || ""; + return choice; + }, + input(prompt, choice) { + throw new Error("input role is not implemented yet"); + }, + option(prompt, choice) { + return roles.default(prompt, choice); + }, + radio(prompt, choice) { + throw new Error("radio role is not implemented yet"); + }, + separator(prompt, choice) { + choice.disabled = ""; + choice.indicator = [choice.indicator, " "].find((v) => v != null); + choice.message = choice.message || prompt.symbols.line.repeat(5); + return choice; + }, + spacer(prompt, choice) { + return choice; + } + }; + module2.exports = (name, options = {}) => { + let role = utils.merge({}, roles, options.roles); + return role[name] || role.default; + }; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/array.js +var require_array = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/array.js"(exports2, module2) { + "use strict"; + var colors = require_ansi_colors(); + var Prompt = require_prompt(); + var roles = require_roles(); + var utils = require_utils(); + var { reorder, scrollUp, scrollDown, isObject, swap } = utils; + var ArrayPrompt = class extends Prompt { + constructor(options) { + super(options); + this.cursorHide(); + this.maxSelected = options.maxSelected || Infinity; + this.multiple = options.multiple || false; + this.initial = options.initial || 0; + this.delay = options.delay || 0; + this.longest = 0; + this.num = ""; + } + async initialize() { + if (typeof this.options.initial === "function") { + this.initial = await this.options.initial.call(this); + } + await this.reset(true); + await super.initialize(); + } + async reset() { + let { choices, initial, autofocus, suggest } = this.options; + this.state._choices = []; + this.state.choices = []; + this.choices = await Promise.all(await this.toChoices(choices)); + this.choices.forEach((ch) => ch.enabled = false); + if (typeof suggest !== "function" && this.selectable.length === 0) { + throw new Error("At least one choice must be selectable"); + } + if (isObject(initial)) + initial = Object.keys(initial); + if (Array.isArray(initial)) { + if (autofocus != null) + this.index = this.findIndex(autofocus); + initial.forEach((v) => this.enable(this.find(v))); + await this.render(); + } else { + if (autofocus != null) + initial = autofocus; + if (typeof initial === "string") + initial = this.findIndex(initial); + if (typeof initial === "number" && initial > -1) { + this.index = Math.max(0, Math.min(initial, this.choices.length)); + this.enable(this.find(this.index)); + } + } + if (this.isDisabled(this.focused)) { + await this.down(); + } + } + async toChoices(value, parent) { + this.state.loadingChoices = true; + let choices = []; + let index = 0; + let toChoices = async (items, parent2) => { + if (typeof items === "function") + items = await items.call(this); + if (items instanceof Promise) + items = await items; + for (let i = 0; i < items.length; i++) { + let choice = items[i] = await this.toChoice(items[i], index++, parent2); + choices.push(choice); + if (choice.choices) { + await toChoices(choice.choices, choice); + } + } + return choices; + }; + return toChoices(value, parent).then((choices2) => { + this.state.loadingChoices = false; + return choices2; + }); + } + async toChoice(ele, i, parent) { + if (typeof ele === "function") + ele = await ele.call(this, this); + if (ele instanceof Promise) + ele = await ele; + if (typeof ele === "string") + ele = { name: ele }; + if (ele.normalized) + return ele; + ele.normalized = true; + let origVal = ele.value; + let role = roles(ele.role, this.options); + ele = role(this, ele); + if (typeof ele.disabled === "string" && !ele.hint) { + ele.hint = ele.disabled; + ele.disabled = true; + } + if (ele.disabled === true && ele.hint == null) { + ele.hint = "(disabled)"; + } + if (ele.index != null) + return ele; + ele.name = ele.name || ele.key || ele.title || ele.value || ele.message; + ele.message = ele.message || ele.name || ""; + ele.value = [ele.value, ele.name].find(this.isValue.bind(this)); + ele.input = ""; + ele.index = i; + ele.cursor = 0; + utils.define(ele, "parent", parent); + ele.level = parent ? parent.level + 1 : 1; + if (ele.indent == null) { + ele.indent = parent ? parent.indent + " " : ele.indent || ""; + } + ele.path = parent ? parent.path + "." + ele.name : ele.name; + ele.enabled = !!(this.multiple && !this.isDisabled(ele) && (ele.enabled || this.isSelected(ele))); + if (!this.isDisabled(ele)) { + this.longest = Math.max(this.longest, colors.unstyle(ele.message).length); + } + let choice = { ...ele }; + ele.reset = (input = choice.input, value = choice.value) => { + for (let key of Object.keys(choice)) + ele[key] = choice[key]; + ele.input = input; + ele.value = value; + }; + if (origVal == null && typeof ele.initial === "function") { + ele.input = await ele.initial.call(this, this.state, ele, i); + } + return ele; + } + async onChoice(choice, i) { + this.emit("choice", choice, i, this); + if (typeof choice.onChoice === "function") { + await choice.onChoice.call(this, this.state, choice, i); + } + } + async addChoice(ele, i, parent) { + let choice = await this.toChoice(ele, i, parent); + this.choices.push(choice); + this.index = this.choices.length - 1; + this.limit = this.choices.length; + return choice; + } + async newItem(item, i, parent) { + let ele = { name: "New choice name?", editable: true, newChoice: true, ...item }; + let choice = await this.addChoice(ele, i, parent); + choice.updateChoice = () => { + delete choice.newChoice; + choice.name = choice.message = choice.input; + choice.input = ""; + choice.cursor = 0; + }; + return this.render(); + } + indent(choice) { + if (choice.indent == null) { + return choice.level > 1 ? " ".repeat(choice.level - 1) : ""; + } + return choice.indent; + } + dispatch(s, key) { + if (this.multiple && this[key.name]) + return this[key.name](); + this.alert(); + } + focus(choice, enabled) { + if (typeof enabled !== "boolean") + enabled = choice.enabled; + if (enabled && !choice.enabled && this.selected.length >= this.maxSelected) { + return this.alert(); + } + this.index = choice.index; + choice.enabled = enabled && !this.isDisabled(choice); + return choice; + } + space() { + if (!this.multiple) + return this.alert(); + this.toggle(this.focused); + return this.render(); + } + a() { + if (this.maxSelected < this.choices.length) + return this.alert(); + let enabled = this.selectable.every((ch) => ch.enabled); + this.choices.forEach((ch) => ch.enabled = !enabled); + return this.render(); + } + i() { + if (this.choices.length - this.selected.length > this.maxSelected) { + return this.alert(); + } + this.choices.forEach((ch) => ch.enabled = !ch.enabled); + return this.render(); + } + g(choice = this.focused) { + if (!this.choices.some((ch) => !!ch.parent)) + return this.a(); + this.toggle(choice.parent && !choice.choices ? choice.parent : choice); + return this.render(); + } + toggle(choice, enabled) { + if (!choice.enabled && this.selected.length >= this.maxSelected) { + return this.alert(); + } + if (typeof enabled !== "boolean") + enabled = !choice.enabled; + choice.enabled = enabled; + if (choice.choices) { + choice.choices.forEach((ch) => this.toggle(ch, enabled)); + } + let parent = choice.parent; + while (parent) { + let choices = parent.choices.filter((ch) => this.isDisabled(ch)); + parent.enabled = choices.every((ch) => ch.enabled === true); + parent = parent.parent; + } + reset(this, this.choices); + this.emit("toggle", choice, this); + return choice; + } + enable(choice) { + if (this.selected.length >= this.maxSelected) + return this.alert(); + choice.enabled = !this.isDisabled(choice); + choice.choices && choice.choices.forEach(this.enable.bind(this)); + return choice; + } + disable(choice) { + choice.enabled = false; + choice.choices && choice.choices.forEach(this.disable.bind(this)); + return choice; + } + number(n) { + this.num += n; + let number = (num) => { + let i = Number(num); + if (i > this.choices.length - 1) + return this.alert(); + let focused = this.focused; + let choice = this.choices.find((ch) => i === ch.index); + if (!choice.enabled && this.selected.length >= this.maxSelected) { + return this.alert(); + } + if (this.visible.indexOf(choice) === -1) { + let choices = reorder(this.choices); + let actualIdx = choices.indexOf(choice); + if (focused.index > actualIdx) { + let start = choices.slice(actualIdx, actualIdx + this.limit); + let end = choices.filter((ch) => !start.includes(ch)); + this.choices = start.concat(end); + } else { + let pos = actualIdx - this.limit + 1; + this.choices = choices.slice(pos).concat(choices.slice(0, pos)); + } + } + this.index = this.choices.indexOf(choice); + this.toggle(this.focused); + return this.render(); + }; + clearTimeout(this.numberTimeout); + return new Promise((resolve) => { + let len = this.choices.length; + let num = this.num; + let handle = (val = false, res) => { + clearTimeout(this.numberTimeout); + if (val) + res = number(num); + this.num = ""; + resolve(res); + }; + if (num === "0" || num.length === 1 && Number(num + "0") > len) { + return handle(true); + } + if (Number(num) > len) { + return handle(false, this.alert()); + } + this.numberTimeout = setTimeout(() => handle(true), this.delay); + }); + } + home() { + this.choices = reorder(this.choices); + this.index = 0; + return this.render(); + } + end() { + let pos = this.choices.length - this.limit; + let choices = reorder(this.choices); + this.choices = choices.slice(pos).concat(choices.slice(0, pos)); + this.index = this.limit - 1; + return this.render(); + } + first() { + this.index = 0; + return this.render(); + } + last() { + this.index = this.visible.length - 1; + return this.render(); + } + prev() { + if (this.visible.length <= 1) + return this.alert(); + return this.up(); + } + next() { + if (this.visible.length <= 1) + return this.alert(); + return this.down(); + } + right() { + if (this.cursor >= this.input.length) + return this.alert(); + this.cursor++; + return this.render(); + } + left() { + if (this.cursor <= 0) + return this.alert(); + this.cursor--; + return this.render(); + } + up() { + let len = this.choices.length; + let vis = this.visible.length; + let idx = this.index; + if (this.options.scroll === false && idx === 0) { + return this.alert(); + } + if (len > vis && idx === 0) { + return this.scrollUp(); + } + this.index = (idx - 1 % len + len) % len; + if (this.isDisabled()) { + return this.up(); + } + return this.render(); + } + down() { + let len = this.choices.length; + let vis = this.visible.length; + let idx = this.index; + if (this.options.scroll === false && idx === vis - 1) { + return this.alert(); + } + if (len > vis && idx === vis - 1) { + return this.scrollDown(); + } + this.index = (idx + 1) % len; + if (this.isDisabled()) { + return this.down(); + } + return this.render(); + } + scrollUp(i = 0) { + this.choices = scrollUp(this.choices); + this.index = i; + if (this.isDisabled()) { + return this.up(); + } + return this.render(); + } + scrollDown(i = this.visible.length - 1) { + this.choices = scrollDown(this.choices); + this.index = i; + if (this.isDisabled()) { + return this.down(); + } + return this.render(); + } + async shiftUp() { + if (this.options.sort === true) { + this.sorting = true; + this.swap(this.index - 1); + await this.up(); + this.sorting = false; + return; + } + return this.scrollUp(this.index); + } + async shiftDown() { + if (this.options.sort === true) { + this.sorting = true; + this.swap(this.index + 1); + await this.down(); + this.sorting = false; + return; + } + return this.scrollDown(this.index); + } + pageUp() { + if (this.visible.length <= 1) + return this.alert(); + this.limit = Math.max(this.limit - 1, 0); + this.index = Math.min(this.limit - 1, this.index); + this._limit = this.limit; + if (this.isDisabled()) { + return this.up(); + } + return this.render(); + } + pageDown() { + if (this.visible.length >= this.choices.length) + return this.alert(); + this.index = Math.max(0, this.index); + this.limit = Math.min(this.limit + 1, this.choices.length); + this._limit = this.limit; + if (this.isDisabled()) { + return this.down(); + } + return this.render(); + } + swap(pos) { + swap(this.choices, this.index, pos); + } + isDisabled(choice = this.focused) { + let keys = ["disabled", "collapsed", "hidden", "completing", "readonly"]; + if (choice && keys.some((key) => choice[key] === true)) { + return true; + } + return choice && choice.role === "heading"; + } + isEnabled(choice = this.focused) { + if (Array.isArray(choice)) + return choice.every((ch) => this.isEnabled(ch)); + if (choice.choices) { + let choices = choice.choices.filter((ch) => !this.isDisabled(ch)); + return choice.enabled && choices.every((ch) => this.isEnabled(ch)); + } + return choice.enabled && !this.isDisabled(choice); + } + isChoice(choice, value) { + return choice.name === value || choice.index === Number(value); + } + isSelected(choice) { + if (Array.isArray(this.initial)) { + return this.initial.some((value) => this.isChoice(choice, value)); + } + return this.isChoice(choice, this.initial); + } + map(names = [], prop = "value") { + return [].concat(names || []).reduce((acc, name) => { + acc[name] = this.find(name, prop); + return acc; + }, {}); + } + filter(value, prop) { + let isChoice = (ele, i) => [ele.name, i].includes(value); + let fn2 = typeof value === "function" ? value : isChoice; + let choices = this.options.multiple ? this.state._choices : this.choices; + let result = choices.filter(fn2); + if (prop) { + return result.map((ch) => ch[prop]); + } + return result; + } + find(value, prop) { + if (isObject(value)) + return prop ? value[prop] : value; + let isChoice = (ele, i) => [ele.name, i].includes(value); + let fn2 = typeof value === "function" ? value : isChoice; + let choice = this.choices.find(fn2); + if (choice) { + return prop ? choice[prop] : choice; + } + } + findIndex(value) { + return this.choices.indexOf(this.find(value)); + } + async submit() { + let choice = this.focused; + if (!choice) + return this.alert(); + if (choice.newChoice) { + if (!choice.input) + return this.alert(); + choice.updateChoice(); + return this.render(); + } + if (this.choices.some((ch) => ch.newChoice)) { + return this.alert(); + } + let { reorder: reorder2, sort } = this.options; + let multi = this.multiple === true; + let value = this.selected; + if (value === void 0) { + return this.alert(); + } + if (Array.isArray(value) && reorder2 !== false && sort !== true) { + value = utils.reorder(value); + } + this.value = multi ? value.map((ch) => ch.name) : value.name; + return super.submit(); + } + set choices(choices = []) { + this.state._choices = this.state._choices || []; + this.state.choices = choices; + for (let choice of choices) { + if (!this.state._choices.some((ch) => ch.name === choice.name)) { + this.state._choices.push(choice); + } + } + if (!this._initial && this.options.initial) { + this._initial = true; + let init = this.initial; + if (typeof init === "string" || typeof init === "number") { + let choice = this.find(init); + if (choice) { + this.initial = choice.index; + this.focus(choice, true); + } + } + } + } + get choices() { + return reset(this, this.state.choices || []); + } + set visible(visible) { + this.state.visible = visible; + } + get visible() { + return (this.state.visible || this.choices).slice(0, this.limit); + } + set limit(num) { + this.state.limit = num; + } + get limit() { + let { state, options, choices } = this; + let limit = state.limit || this._limit || options.limit || choices.length; + return Math.min(limit, this.height); + } + set value(value) { + super.value = value; + } + get value() { + if (typeof super.value !== "string" && super.value === this.initial) { + return this.input; + } + return super.value; + } + set index(i) { + this.state.index = i; + } + get index() { + return Math.max(0, this.state ? this.state.index : 0); + } + get enabled() { + return this.filter(this.isEnabled.bind(this)); + } + get focused() { + let choice = this.choices[this.index]; + if (choice && this.state.submitted && this.multiple !== true) { + choice.enabled = true; + } + return choice; + } + get selectable() { + return this.choices.filter((choice) => !this.isDisabled(choice)); + } + get selected() { + return this.multiple ? this.enabled : this.focused; + } + }; + function reset(prompt, choices) { + if (choices instanceof Promise) + return choices; + if (typeof choices === "function") { + if (utils.isAsyncFn(choices)) + return choices; + choices = choices.call(prompt, prompt); + } + for (let choice of choices) { + if (Array.isArray(choice.choices)) { + let items = choice.choices.filter((ch) => !prompt.isDisabled(ch)); + choice.enabled = items.every((ch) => ch.enabled === true); + } + if (prompt.isDisabled(choice) === true) { + delete choice.enabled; + } + } + return choices; + } + module2.exports = ArrayPrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/select.js +var require_select = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/select.js"(exports2, module2) { + "use strict"; + var ArrayPrompt = require_array(); + var utils = require_utils(); + var SelectPrompt = class extends ArrayPrompt { + constructor(options) { + super(options); + this.emptyError = this.options.emptyError || "No items were selected"; + } + async dispatch(s, key) { + if (this.multiple) { + return this[key.name] ? await this[key.name](s, key) : await super.dispatch(s, key); + } + this.alert(); + } + separator() { + if (this.options.separator) + return super.separator(); + let sep = this.styles.muted(this.symbols.ellipsis); + return this.state.submitted ? super.separator() : sep; + } + pointer(choice, i) { + return !this.multiple || this.options.pointer ? super.pointer(choice, i) : ""; + } + indicator(choice, i) { + return this.multiple ? super.indicator(choice, i) : ""; + } + choiceMessage(choice, i) { + let message2 = this.resolve(choice.message, this.state, choice, i); + if (choice.role === "heading" && !utils.hasColor(message2)) { + message2 = this.styles.strong(message2); + } + return this.resolve(message2, this.state, choice, i); + } + choiceSeparator() { + return ":"; + } + async renderChoice(choice, i) { + await this.onChoice(choice, i); + let focused = this.index === i; + let pointer = await this.pointer(choice, i); + let check = await this.indicator(choice, i) + (choice.pad || ""); + let hint = await this.resolve(choice.hint, this.state, choice, i); + if (hint && !utils.hasColor(hint)) { + hint = this.styles.muted(hint); + } + let ind = this.indent(choice); + let msg = await this.choiceMessage(choice, i); + let line = () => [this.margin[3], ind + pointer + check, msg, this.margin[1], hint].filter(Boolean).join(" "); + if (choice.role === "heading") { + return line(); + } + if (choice.disabled) { + if (!utils.hasColor(msg)) { + msg = this.styles.disabled(msg); + } + return line(); + } + if (focused) { + msg = this.styles.em(msg); + } + return line(); + } + async renderChoices() { + if (this.state.loading === "choices") { + return this.styles.warning("Loading choices"); + } + if (this.state.submitted) + return ""; + let choices = this.visible.map(async (ch, i) => await this.renderChoice(ch, i)); + let visible = await Promise.all(choices); + if (!visible.length) + visible.push(this.styles.danger("No matching choices")); + let result = this.margin[0] + visible.join("\n"); + let header; + if (this.options.choicesHeader) { + header = await this.resolve(this.options.choicesHeader, this.state); + } + return [header, result].filter(Boolean).join("\n"); + } + format() { + if (!this.state.submitted || this.state.cancelled) + return ""; + if (Array.isArray(this.selected)) { + return this.selected.map((choice) => this.styles.primary(choice.name)).join(", "); + } + return this.styles.primary(this.selected.name); + } + async render() { + let { submitted, size } = this.state; + let prompt = ""; + let header = await this.header(); + let prefix = await this.prefix(); + let separator = await this.separator(); + let message2 = await this.message(); + if (this.options.promptLine !== false) { + prompt = [prefix, message2, separator, ""].join(" "); + this.state.prompt = prompt; + } + let output = await this.format(); + let help = await this.error() || await this.hint(); + let body = await this.renderChoices(); + let footer = await this.footer(); + if (output) + prompt += output; + if (help && !prompt.includes(help)) + prompt += " " + help; + if (submitted && !output && !body.trim() && this.multiple && this.emptyError != null) { + prompt += this.styles.danger(this.emptyError); + } + this.clear(size); + this.write([header, prompt, body, footer].filter(Boolean).join("\n")); + this.write(this.margin[2]); + this.restore(); + } + }; + module2.exports = SelectPrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/autocomplete.js +var require_autocomplete = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/autocomplete.js"(exports2, module2) { + "use strict"; + var Select = require_select(); + var highlight = (input, color) => { + let val = input.toLowerCase(); + return (str) => { + let s = str.toLowerCase(); + let i = s.indexOf(val); + let colored = color(str.slice(i, i + val.length)); + return i >= 0 ? str.slice(0, i) + colored + str.slice(i + val.length) : str; + }; + }; + var AutoComplete = class extends Select { + constructor(options) { + super(options); + this.cursorShow(); + } + moveCursor(n) { + this.state.cursor += n; + } + dispatch(ch) { + return this.append(ch); + } + space(ch) { + return this.options.multiple ? super.space(ch) : this.append(ch); + } + append(ch) { + let { cursor, input } = this.state; + this.input = input.slice(0, cursor) + ch + input.slice(cursor); + this.moveCursor(1); + return this.complete(); + } + delete() { + let { cursor, input } = this.state; + if (!input) + return this.alert(); + this.input = input.slice(0, cursor - 1) + input.slice(cursor); + this.moveCursor(-1); + return this.complete(); + } + deleteForward() { + let { cursor, input } = this.state; + if (input[cursor] === void 0) + return this.alert(); + this.input = `${input}`.slice(0, cursor) + `${input}`.slice(cursor + 1); + return this.complete(); + } + number(ch) { + return this.append(ch); + } + async complete() { + this.completing = true; + this.choices = await this.suggest(this.input, this.state._choices); + this.state.limit = void 0; + this.index = Math.min(Math.max(this.visible.length - 1, 0), this.index); + await this.render(); + this.completing = false; + } + suggest(input = this.input, choices = this.state._choices) { + if (typeof this.options.suggest === "function") { + return this.options.suggest.call(this, input, choices); + } + let str = input.toLowerCase(); + return choices.filter((ch) => ch.message.toLowerCase().includes(str)); + } + pointer() { + return ""; + } + format() { + if (!this.focused) + return this.input; + if (this.options.multiple && this.state.submitted) { + return this.selected.map((ch) => this.styles.primary(ch.message)).join(", "); + } + if (this.state.submitted) { + let value = this.value = this.input = this.focused.value; + return this.styles.primary(value); + } + return this.input; + } + async render() { + if (this.state.status !== "pending") + return super.render(); + let style = this.options.highlight ? this.options.highlight.bind(this) : this.styles.placeholder; + let color = highlight(this.input, style); + let choices = this.choices; + this.choices = choices.map((ch) => ({ ...ch, message: color(ch.message) })); + await super.render(); + this.choices = choices; + } + submit() { + if (this.options.multiple) { + this.value = this.selected.map((ch) => ch.name); + } + return super.submit(); + } + }; + module2.exports = AutoComplete; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/placeholder.js +var require_placeholder = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/placeholder.js"(exports2, module2) { + "use strict"; + var utils = require_utils(); + module2.exports = (prompt, options = {}) => { + prompt.cursorHide(); + let { input = "", initial = "", pos, showCursor = true, color } = options; + let style = color || prompt.styles.placeholder; + let inverse = utils.inverse(prompt.styles.primary); + let blinker = (str) => inverse(prompt.styles.black(str)); + let output = input; + let char = " "; + let reverse = blinker(char); + if (prompt.blink && prompt.blink.off === true) { + blinker = (str) => str; + reverse = ""; + } + if (showCursor && pos === 0 && initial === "" && input === "") { + return blinker(char); + } + if (showCursor && pos === 0 && (input === initial || input === "")) { + return blinker(initial[0]) + style(initial.slice(1)); + } + initial = utils.isPrimitive(initial) ? `${initial}` : ""; + input = utils.isPrimitive(input) ? `${input}` : ""; + let placeholder = initial && initial.startsWith(input) && initial !== input; + let cursor = placeholder ? blinker(initial[input.length]) : reverse; + if (pos !== input.length && showCursor === true) { + output = input.slice(0, pos) + blinker(input[pos]) + input.slice(pos + 1); + cursor = ""; + } + if (showCursor === false) { + cursor = ""; + } + if (placeholder) { + let raw = prompt.styles.unstyle(output + cursor); + return output + cursor + style(initial.slice(raw.length)); + } + return output + cursor; + }; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/form.js +var require_form = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/form.js"(exports2, module2) { + "use strict"; + var colors = require_ansi_colors(); + var SelectPrompt = require_select(); + var placeholder = require_placeholder(); + var FormPrompt = class extends SelectPrompt { + constructor(options) { + super({ ...options, multiple: true }); + this.type = "form"; + this.initial = this.options.initial; + this.align = [this.options.align, "right"].find((v) => v != null); + this.emptyError = ""; + this.values = {}; + } + async reset(first) { + await super.reset(); + if (first === true) + this._index = this.index; + this.index = this._index; + this.values = {}; + this.choices.forEach((choice) => choice.reset && choice.reset()); + return this.render(); + } + dispatch(char) { + return !!char && this.append(char); + } + append(char) { + let choice = this.focused; + if (!choice) + return this.alert(); + let { cursor, input } = choice; + choice.value = choice.input = input.slice(0, cursor) + char + input.slice(cursor); + choice.cursor++; + return this.render(); + } + delete() { + let choice = this.focused; + if (!choice || choice.cursor <= 0) + return this.alert(); + let { cursor, input } = choice; + choice.value = choice.input = input.slice(0, cursor - 1) + input.slice(cursor); + choice.cursor--; + return this.render(); + } + deleteForward() { + let choice = this.focused; + if (!choice) + return this.alert(); + let { cursor, input } = choice; + if (input[cursor] === void 0) + return this.alert(); + let str = `${input}`.slice(0, cursor) + `${input}`.slice(cursor + 1); + choice.value = choice.input = str; + return this.render(); + } + right() { + let choice = this.focused; + if (!choice) + return this.alert(); + if (choice.cursor >= choice.input.length) + return this.alert(); + choice.cursor++; + return this.render(); + } + left() { + let choice = this.focused; + if (!choice) + return this.alert(); + if (choice.cursor <= 0) + return this.alert(); + choice.cursor--; + return this.render(); + } + space(ch, key) { + return this.dispatch(ch, key); + } + number(ch, key) { + return this.dispatch(ch, key); + } + next() { + let ch = this.focused; + if (!ch) + return this.alert(); + let { initial, input } = ch; + if (initial && initial.startsWith(input) && input !== initial) { + ch.value = ch.input = initial; + ch.cursor = ch.value.length; + return this.render(); + } + return super.next(); + } + prev() { + let ch = this.focused; + if (!ch) + return this.alert(); + if (ch.cursor === 0) + return super.prev(); + ch.value = ch.input = ""; + ch.cursor = 0; + return this.render(); + } + separator() { + return ""; + } + format(value) { + return !this.state.submitted ? super.format(value) : ""; + } + pointer() { + return ""; + } + indicator(choice) { + return choice.input ? "\u29BF" : "\u2299"; + } + async choiceSeparator(choice, i) { + let sep = await this.resolve(choice.separator, this.state, choice, i) || ":"; + return sep ? " " + this.styles.disabled(sep) : ""; + } + async renderChoice(choice, i) { + await this.onChoice(choice, i); + let { state, styles } = this; + let { cursor, initial = "", name, hint, input = "" } = choice; + let { muted, submitted, primary, danger } = styles; + let help = hint; + let focused = this.index === i; + let validate = choice.validate || (() => true); + let sep = await this.choiceSeparator(choice, i); + let msg = choice.message; + if (this.align === "right") + msg = msg.padStart(this.longest + 1, " "); + if (this.align === "left") + msg = msg.padEnd(this.longest + 1, " "); + let value = this.values[name] = input || initial; + let color = input ? "success" : "dark"; + if (await validate.call(choice, value, this.state) !== true) { + color = "danger"; + } + let style = styles[color]; + let indicator = style(await this.indicator(choice, i)) + (choice.pad || ""); + let indent = this.indent(choice); + let line = () => [indent, indicator, msg + sep, input, help].filter(Boolean).join(" "); + if (state.submitted) { + msg = colors.unstyle(msg); + input = submitted(input); + help = ""; + return line(); + } + if (choice.format) { + input = await choice.format.call(this, input, choice, i); + } else { + let color2 = this.styles.muted; + let options = { input, initial, pos: cursor, showCursor: focused, color: color2 }; + input = placeholder(this, options); + } + if (!this.isValue(input)) { + input = this.styles.muted(this.symbols.ellipsis); + } + if (choice.result) { + this.values[name] = await choice.result.call(this, value, choice, i); + } + if (focused) { + msg = primary(msg); + } + if (choice.error) { + input += (input ? " " : "") + danger(choice.error.trim()); + } else if (choice.hint) { + input += (input ? " " : "") + muted(choice.hint.trim()); + } + return line(); + } + async submit() { + this.value = this.values; + return super.base.submit.call(this); + } + }; + module2.exports = FormPrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/auth.js +var require_auth = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/auth.js"(exports2, module2) { + "use strict"; + var FormPrompt = require_form(); + var defaultAuthenticate = () => { + throw new Error("expected prompt to have a custom authenticate method"); + }; + var factory = (authenticate = defaultAuthenticate) => { + class AuthPrompt extends FormPrompt { + constructor(options) { + super(options); + } + async submit() { + this.value = await authenticate.call(this, this.values, this.state); + super.base.submit.call(this); + } + static create(authenticate2) { + return factory(authenticate2); + } + } + return AuthPrompt; + }; + module2.exports = factory(); + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/basicauth.js +var require_basicauth = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/basicauth.js"(exports2, module2) { + "use strict"; + var AuthPrompt = require_auth(); + function defaultAuthenticate(value, state) { + if (value.username === this.options.username && value.password === this.options.password) { + return true; + } + return false; + } + var factory = (authenticate = defaultAuthenticate) => { + const choices = [ + { name: "username", message: "username" }, + { + name: "password", + message: "password", + format(input) { + if (this.options.showPassword) { + return input; + } + let color = this.state.submitted ? this.styles.primary : this.styles.muted; + return color(this.symbols.asterisk.repeat(input.length)); + } + } + ]; + class BasicAuthPrompt extends AuthPrompt.create(authenticate) { + constructor(options) { + super({ ...options, choices }); + } + static create(authenticate2) { + return factory(authenticate2); + } + } + return BasicAuthPrompt; + }; + module2.exports = factory(); + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/boolean.js +var require_boolean = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/boolean.js"(exports2, module2) { + "use strict"; + var Prompt = require_prompt(); + var { isPrimitive, hasColor } = require_utils(); + var BooleanPrompt = class extends Prompt { + constructor(options) { + super(options); + this.cursorHide(); + } + async initialize() { + let initial = await this.resolve(this.initial, this.state); + this.input = await this.cast(initial); + await super.initialize(); + } + dispatch(ch) { + if (!this.isValue(ch)) + return this.alert(); + this.input = ch; + return this.submit(); + } + format(value) { + let { styles, state } = this; + return !state.submitted ? styles.primary(value) : styles.success(value); + } + cast(input) { + return this.isTrue(input); + } + isTrue(input) { + return /^[ty1]/i.test(input); + } + isFalse(input) { + return /^[fn0]/i.test(input); + } + isValue(value) { + return isPrimitive(value) && (this.isTrue(value) || this.isFalse(value)); + } + async hint() { + if (this.state.status === "pending") { + let hint = await this.element("hint"); + if (!hasColor(hint)) { + return this.styles.muted(hint); + } + return hint; + } + } + async render() { + let { input, size } = this.state; + let prefix = await this.prefix(); + let sep = await this.separator(); + let msg = await this.message(); + let hint = this.styles.muted(this.default); + let promptLine = [prefix, msg, hint, sep].filter(Boolean).join(" "); + this.state.prompt = promptLine; + let header = await this.header(); + let value = this.value = this.cast(input); + let output = await this.format(value); + let help = await this.error() || await this.hint(); + let footer = await this.footer(); + if (help && !promptLine.includes(help)) + output += " " + help; + promptLine += " " + output; + this.clear(size); + this.write([header, promptLine, footer].filter(Boolean).join("\n")); + this.restore(); + } + set value(value) { + super.value = value; + } + get value() { + return this.cast(super.value); + } + }; + module2.exports = BooleanPrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/confirm.js +var require_confirm = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/confirm.js"(exports2, module2) { + "use strict"; + var BooleanPrompt = require_boolean(); + var ConfirmPrompt = class extends BooleanPrompt { + constructor(options) { + super(options); + this.default = this.options.default || (this.initial ? "(Y/n)" : "(y/N)"); + } + }; + module2.exports = ConfirmPrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/editable.js +var require_editable = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/editable.js"(exports2, module2) { + "use strict"; + var Select = require_select(); + var Form = require_form(); + var form = Form.prototype; + var Editable = class extends Select { + constructor(options) { + super({ ...options, multiple: true }); + this.align = [this.options.align, "left"].find((v) => v != null); + this.emptyError = ""; + this.values = {}; + } + dispatch(char, key) { + let choice = this.focused; + let parent = choice.parent || {}; + if (!choice.editable && !parent.editable) { + if (char === "a" || char === "i") + return super[char](); + } + return form.dispatch.call(this, char, key); + } + append(char, key) { + return form.append.call(this, char, key); + } + delete(char, key) { + return form.delete.call(this, char, key); + } + space(char) { + return this.focused.editable ? this.append(char) : super.space(); + } + number(char) { + return this.focused.editable ? this.append(char) : super.number(char); + } + next() { + return this.focused.editable ? form.next.call(this) : super.next(); + } + prev() { + return this.focused.editable ? form.prev.call(this) : super.prev(); + } + async indicator(choice, i) { + let symbol = choice.indicator || ""; + let value = choice.editable ? symbol : super.indicator(choice, i); + return await this.resolve(value, this.state, choice, i) || ""; + } + indent(choice) { + return choice.role === "heading" ? "" : choice.editable ? " " : " "; + } + async renderChoice(choice, i) { + choice.indent = ""; + if (choice.editable) + return form.renderChoice.call(this, choice, i); + return super.renderChoice(choice, i); + } + error() { + return ""; + } + footer() { + return this.state.error; + } + async validate() { + let result = true; + for (let choice of this.choices) { + if (typeof choice.validate !== "function") { + continue; + } + if (choice.role === "heading") { + continue; + } + let val = choice.parent ? this.value[choice.parent.name] : this.value; + if (choice.editable) { + val = choice.value === choice.name ? choice.initial || "" : choice.value; + } else if (!this.isDisabled(choice)) { + val = choice.enabled === true; + } + result = await choice.validate(val, this.state); + if (result !== true) { + break; + } + } + if (result !== true) { + this.state.error = typeof result === "string" ? result : "Invalid Input"; + } + return result; + } + submit() { + if (this.focused.newChoice === true) + return super.submit(); + if (this.choices.some((ch) => ch.newChoice)) { + return this.alert(); + } + this.value = {}; + for (let choice of this.choices) { + let val = choice.parent ? this.value[choice.parent.name] : this.value; + if (choice.role === "heading") { + this.value[choice.name] = {}; + continue; + } + if (choice.editable) { + val[choice.name] = choice.value === choice.name ? choice.initial || "" : choice.value; + } else if (!this.isDisabled(choice)) { + val[choice.name] = choice.enabled === true; + } + } + return this.base.submit.call(this); + } + }; + module2.exports = Editable; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/string.js +var require_string = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/string.js"(exports2, module2) { + "use strict"; + var Prompt = require_prompt(); + var placeholder = require_placeholder(); + var { isPrimitive } = require_utils(); + var StringPrompt = class extends Prompt { + constructor(options) { + super(options); + this.initial = isPrimitive(this.initial) ? String(this.initial) : ""; + if (this.initial) + this.cursorHide(); + this.state.prevCursor = 0; + this.state.clipboard = []; + } + async keypress(input, key = {}) { + let prev = this.state.prevKeypress; + this.state.prevKeypress = key; + if (this.options.multiline === true && key.name === "return") { + if (!prev || prev.name !== "return") { + return this.append("\n", key); + } + } + return super.keypress(input, key); + } + moveCursor(n) { + this.cursor += n; + } + reset() { + this.input = this.value = ""; + this.cursor = 0; + return this.render(); + } + dispatch(ch, key) { + if (!ch || key.ctrl || key.code) + return this.alert(); + this.append(ch); + } + append(ch) { + let { cursor, input } = this.state; + this.input = `${input}`.slice(0, cursor) + ch + `${input}`.slice(cursor); + this.moveCursor(String(ch).length); + this.render(); + } + insert(str) { + this.append(str); + } + delete() { + let { cursor, input } = this.state; + if (cursor <= 0) + return this.alert(); + this.input = `${input}`.slice(0, cursor - 1) + `${input}`.slice(cursor); + this.moveCursor(-1); + this.render(); + } + deleteForward() { + let { cursor, input } = this.state; + if (input[cursor] === void 0) + return this.alert(); + this.input = `${input}`.slice(0, cursor) + `${input}`.slice(cursor + 1); + this.render(); + } + cutForward() { + let pos = this.cursor; + if (this.input.length <= pos) + return this.alert(); + this.state.clipboard.push(this.input.slice(pos)); + this.input = this.input.slice(0, pos); + this.render(); + } + cutLeft() { + let pos = this.cursor; + if (pos === 0) + return this.alert(); + let before = this.input.slice(0, pos); + let after = this.input.slice(pos); + let words = before.split(" "); + this.state.clipboard.push(words.pop()); + this.input = words.join(" "); + this.cursor = this.input.length; + this.input += after; + this.render(); + } + paste() { + if (!this.state.clipboard.length) + return this.alert(); + this.insert(this.state.clipboard.pop()); + this.render(); + } + toggleCursor() { + if (this.state.prevCursor) { + this.cursor = this.state.prevCursor; + this.state.prevCursor = 0; + } else { + this.state.prevCursor = this.cursor; + this.cursor = 0; + } + this.render(); + } + first() { + this.cursor = 0; + this.render(); + } + last() { + this.cursor = this.input.length - 1; + this.render(); + } + next() { + let init = this.initial != null ? String(this.initial) : ""; + if (!init || !init.startsWith(this.input)) + return this.alert(); + this.input = this.initial; + this.cursor = this.initial.length; + this.render(); + } + prev() { + if (!this.input) + return this.alert(); + this.reset(); + } + backward() { + return this.left(); + } + forward() { + return this.right(); + } + right() { + if (this.cursor >= this.input.length) + return this.alert(); + this.moveCursor(1); + return this.render(); + } + left() { + if (this.cursor <= 0) + return this.alert(); + this.moveCursor(-1); + return this.render(); + } + isValue(value) { + return !!value; + } + async format(input = this.value) { + let initial = await this.resolve(this.initial, this.state); + if (!this.state.submitted) { + return placeholder(this, { input, initial, pos: this.cursor }); + } + return this.styles.submitted(input || initial); + } + async render() { + let size = this.state.size; + let prefix = await this.prefix(); + let separator = await this.separator(); + let message2 = await this.message(); + let prompt = [prefix, message2, separator].filter(Boolean).join(" "); + this.state.prompt = prompt; + let header = await this.header(); + let output = await this.format(); + let help = await this.error() || await this.hint(); + let footer = await this.footer(); + if (help && !output.includes(help)) + output += " " + help; + prompt += " " + output; + this.clear(size); + this.write([header, prompt, footer].filter(Boolean).join("\n")); + this.restore(); + } + }; + module2.exports = StringPrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/completer.js +var require_completer = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/completer.js"(exports2, module2) { + "use strict"; + var unique = (arr) => arr.filter((v, i) => arr.lastIndexOf(v) === i); + var compact = (arr) => unique(arr).filter(Boolean); + module2.exports = (action, data = {}, value = "") => { + let { past = [], present = "" } = data; + let rest, prev; + switch (action) { + case "prev": + case "undo": + rest = past.slice(0, past.length - 1); + prev = past[past.length - 1] || ""; + return { + past: compact([value, ...rest]), + present: prev + }; + case "next": + case "redo": + rest = past.slice(1); + prev = past[0] || ""; + return { + past: compact([...rest, value]), + present: prev + }; + case "save": + return { + past: compact([...past, value]), + present: "" + }; + case "remove": + prev = compact(past.filter((v) => v !== value)); + present = ""; + if (prev.length) { + present = prev.pop(); + } + return { + past: prev, + present + }; + default: { + throw new Error(`Invalid action: "${action}"`); + } + } + }; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/input.js +var require_input = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/input.js"(exports2, module2) { + "use strict"; + var Prompt = require_string(); + var completer = require_completer(); + var Input = class extends Prompt { + constructor(options) { + super(options); + let history = this.options.history; + if (history && history.store) { + let initial = history.values || this.initial; + this.autosave = !!history.autosave; + this.store = history.store; + this.data = this.store.get("values") || { past: [], present: initial }; + this.initial = this.data.present || this.data.past[this.data.past.length - 1]; + } + } + completion(action) { + if (!this.store) + return this.alert(); + this.data = completer(action, this.data, this.input); + if (!this.data.present) + return this.alert(); + this.input = this.data.present; + this.cursor = this.input.length; + return this.render(); + } + altUp() { + return this.completion("prev"); + } + altDown() { + return this.completion("next"); + } + prev() { + this.save(); + return super.prev(); + } + save() { + if (!this.store) + return; + this.data = completer("save", this.data, this.input); + this.store.set("values", this.data); + } + submit() { + if (this.store && this.autosave === true) { + this.save(); + } + return super.submit(); + } + }; + module2.exports = Input; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/invisible.js +var require_invisible = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/invisible.js"(exports2, module2) { + "use strict"; + var StringPrompt = require_string(); + var InvisiblePrompt = class extends StringPrompt { + format() { + return ""; + } + }; + module2.exports = InvisiblePrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/list.js +var require_list = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/list.js"(exports2, module2) { + "use strict"; + var StringPrompt = require_string(); + var ListPrompt = class extends StringPrompt { + constructor(options = {}) { + super(options); + this.sep = this.options.separator || /, */; + this.initial = options.initial || ""; + } + split(input = this.value) { + return input ? String(input).split(this.sep) : []; + } + format() { + let style = this.state.submitted ? this.styles.primary : (val) => val; + return this.list.map(style).join(", "); + } + async submit(value) { + let result = this.state.error || await this.validate(this.list, this.state); + if (result !== true) { + this.state.error = result; + return super.submit(); + } + this.value = this.list; + return super.submit(); + } + get list() { + return this.split(); + } + }; + module2.exports = ListPrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/multiselect.js +var require_multiselect = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/multiselect.js"(exports2, module2) { + "use strict"; + var Select = require_select(); + var MultiSelect = class extends Select { + constructor(options) { + super({ ...options, multiple: true }); + } + }; + module2.exports = MultiSelect; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/number.js +var require_number = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/number.js"(exports2, module2) { + "use strict"; + var StringPrompt = require_string(); + var NumberPrompt = class extends StringPrompt { + constructor(options = {}) { + super({ style: "number", ...options }); + this.min = this.isValue(options.min) ? this.toNumber(options.min) : -Infinity; + this.max = this.isValue(options.max) ? this.toNumber(options.max) : Infinity; + this.delay = options.delay != null ? options.delay : 1e3; + this.float = options.float !== false; + this.round = options.round === true || options.float === false; + this.major = options.major || 10; + this.minor = options.minor || 1; + this.initial = options.initial != null ? options.initial : ""; + this.input = String(this.initial); + this.cursor = this.input.length; + this.cursorShow(); + } + append(ch) { + if (!/[-+.]/.test(ch) || ch === "." && this.input.includes(".")) { + return this.alert("invalid number"); + } + return super.append(ch); + } + number(ch) { + return super.append(ch); + } + next() { + if (this.input && this.input !== this.initial) + return this.alert(); + if (!this.isValue(this.initial)) + return this.alert(); + this.input = this.initial; + this.cursor = String(this.initial).length; + return this.render(); + } + up(number) { + let step = number || this.minor; + let num = this.toNumber(this.input); + if (num > this.max + step) + return this.alert(); + this.input = `${num + step}`; + return this.render(); + } + down(number) { + let step = number || this.minor; + let num = this.toNumber(this.input); + if (num < this.min - step) + return this.alert(); + this.input = `${num - step}`; + return this.render(); + } + shiftDown() { + return this.down(this.major); + } + shiftUp() { + return this.up(this.major); + } + format(input = this.input) { + if (typeof this.options.format === "function") { + return this.options.format.call(this, input); + } + return this.styles.info(input); + } + toNumber(value = "") { + return this.float ? +value : Math.round(+value); + } + isValue(value) { + return /^[-+]?[0-9]+((\.)|(\.[0-9]+))?$/.test(value); + } + submit() { + let value = [this.input, this.initial].find((v) => this.isValue(v)); + this.value = this.toNumber(value || 0); + return super.submit(); + } + }; + module2.exports = NumberPrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/numeral.js +var require_numeral = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/numeral.js"(exports2, module2) { + module2.exports = require_number(); + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/password.js +var require_password = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/password.js"(exports2, module2) { + "use strict"; + var StringPrompt = require_string(); + var PasswordPrompt = class extends StringPrompt { + constructor(options) { + super(options); + this.cursorShow(); + } + format(input = this.input) { + if (!this.keypressed) + return ""; + let color = this.state.submitted ? this.styles.primary : this.styles.muted; + return color(this.symbols.asterisk.repeat(input.length)); + } + }; + module2.exports = PasswordPrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/scale.js +var require_scale = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/scale.js"(exports2, module2) { + "use strict"; + var colors = require_ansi_colors(); + var ArrayPrompt = require_array(); + var utils = require_utils(); + var LikertScale = class extends ArrayPrompt { + constructor(options = {}) { + super(options); + this.widths = [].concat(options.messageWidth || 50); + this.align = [].concat(options.align || "left"); + this.linebreak = options.linebreak || false; + this.edgeLength = options.edgeLength || 3; + this.newline = options.newline || "\n "; + let start = options.startNumber || 1; + if (typeof this.scale === "number") { + this.scaleKey = false; + this.scale = Array(this.scale).fill(0).map((v, i) => ({ name: i + start })); + } + } + async reset() { + this.tableized = false; + await super.reset(); + return this.render(); + } + tableize() { + if (this.tableized === true) + return; + this.tableized = true; + let longest = 0; + for (let ch of this.choices) { + longest = Math.max(longest, ch.message.length); + ch.scaleIndex = ch.initial || 2; + ch.scale = []; + for (let i = 0; i < this.scale.length; i++) { + ch.scale.push({ index: i }); + } + } + this.widths[0] = Math.min(this.widths[0], longest + 3); + } + async dispatch(s, key) { + if (this.multiple) { + return this[key.name] ? await this[key.name](s, key) : await super.dispatch(s, key); + } + this.alert(); + } + heading(msg, item, i) { + return this.styles.strong(msg); + } + separator() { + return this.styles.muted(this.symbols.ellipsis); + } + right() { + let choice = this.focused; + if (choice.scaleIndex >= this.scale.length - 1) + return this.alert(); + choice.scaleIndex++; + return this.render(); + } + left() { + let choice = this.focused; + if (choice.scaleIndex <= 0) + return this.alert(); + choice.scaleIndex--; + return this.render(); + } + indent() { + return ""; + } + format() { + if (this.state.submitted) { + let values = this.choices.map((ch) => this.styles.info(ch.index)); + return values.join(", "); + } + return ""; + } + pointer() { + return ""; + } + renderScaleKey() { + if (this.scaleKey === false) + return ""; + if (this.state.submitted) + return ""; + let scale = this.scale.map((item) => ` ${item.name} - ${item.message}`); + let key = ["", ...scale].map((item) => this.styles.muted(item)); + return key.join("\n"); + } + renderScaleHeading(max) { + let keys = this.scale.map((ele) => ele.name); + if (typeof this.options.renderScaleHeading === "function") { + keys = this.options.renderScaleHeading.call(this, max); + } + let diff = this.scaleLength - keys.join("").length; + let spacing = Math.round(diff / (keys.length - 1)); + let names = keys.map((key) => this.styles.strong(key)); + let headings = names.join(" ".repeat(spacing)); + let padding = " ".repeat(this.widths[0]); + return this.margin[3] + padding + this.margin[1] + headings; + } + scaleIndicator(choice, item, i) { + if (typeof this.options.scaleIndicator === "function") { + return this.options.scaleIndicator.call(this, choice, item, i); + } + let enabled = choice.scaleIndex === item.index; + if (item.disabled) + return this.styles.hint(this.symbols.radio.disabled); + if (enabled) + return this.styles.success(this.symbols.radio.on); + return this.symbols.radio.off; + } + renderScale(choice, i) { + let scale = choice.scale.map((item) => this.scaleIndicator(choice, item, i)); + let padding = this.term === "Hyper" ? "" : " "; + return scale.join(padding + this.symbols.line.repeat(this.edgeLength)); + } + async renderChoice(choice, i) { + await this.onChoice(choice, i); + let focused = this.index === i; + let pointer = await this.pointer(choice, i); + let hint = await choice.hint; + if (hint && !utils.hasColor(hint)) { + hint = this.styles.muted(hint); + } + let pad = (str) => this.margin[3] + str.replace(/\s+$/, "").padEnd(this.widths[0], " "); + let newline = this.newline; + let ind = this.indent(choice); + let message2 = await this.resolve(choice.message, this.state, choice, i); + let scale = await this.renderScale(choice, i); + let margin = this.margin[1] + this.margin[3]; + this.scaleLength = colors.unstyle(scale).length; + this.widths[0] = Math.min(this.widths[0], this.width - this.scaleLength - margin.length); + let msg = utils.wordWrap(message2, { width: this.widths[0], newline }); + let lines = msg.split("\n").map((line) => pad(line) + this.margin[1]); + if (focused) { + scale = this.styles.info(scale); + lines = lines.map((line) => this.styles.info(line)); + } + lines[0] += scale; + if (this.linebreak) + lines.push(""); + return [ind + pointer, lines.join("\n")].filter(Boolean); + } + async renderChoices() { + if (this.state.submitted) + return ""; + this.tableize(); + let choices = this.visible.map(async (ch, i) => await this.renderChoice(ch, i)); + let visible = await Promise.all(choices); + let heading = await this.renderScaleHeading(); + return this.margin[0] + [heading, ...visible.map((v) => v.join(" "))].join("\n"); + } + async render() { + let { submitted, size } = this.state; + let prefix = await this.prefix(); + let separator = await this.separator(); + let message2 = await this.message(); + let prompt = ""; + if (this.options.promptLine !== false) { + prompt = [prefix, message2, separator, ""].join(" "); + this.state.prompt = prompt; + } + let header = await this.header(); + let output = await this.format(); + let key = await this.renderScaleKey(); + let help = await this.error() || await this.hint(); + let body = await this.renderChoices(); + let footer = await this.footer(); + let err = this.emptyError; + if (output) + prompt += output; + if (help && !prompt.includes(help)) + prompt += " " + help; + if (submitted && !output && !body.trim() && this.multiple && err != null) { + prompt += this.styles.danger(err); + } + this.clear(size); + this.write([header, prompt, key, body, footer].filter(Boolean).join("\n")); + if (!this.state.submitted) { + this.write(this.margin[2]); + } + this.restore(); + } + submit() { + this.value = {}; + for (let choice of this.choices) { + this.value[choice.name] = choice.scaleIndex; + } + return this.base.submit.call(this); + } + }; + module2.exports = LikertScale; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/interpolate.js +var require_interpolate = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/interpolate.js"(exports2, module2) { + "use strict"; + var colors = require_ansi_colors(); + var clean = (str = "") => { + return typeof str === "string" ? str.replace(/^['"]|['"]$/g, "") : ""; + }; + var Item = class { + constructor(token) { + this.name = token.key; + this.field = token.field || {}; + this.value = clean(token.initial || this.field.initial || ""); + this.message = token.message || this.name; + this.cursor = 0; + this.input = ""; + this.lines = []; + } + }; + var tokenize = async (options = {}, defaults = {}, fn2 = (token) => token) => { + let unique = new Set(); + let fields = options.fields || []; + let input = options.template; + let tabstops = []; + let items = []; + let keys = []; + let line = 1; + if (typeof input === "function") { + input = await input(); + } + let i = -1; + let next = () => input[++i]; + let peek = () => input[i + 1]; + let push = (token) => { + token.line = line; + tabstops.push(token); + }; + push({ type: "bos", value: "" }); + while (i < input.length - 1) { + let value = next(); + if (/^[^\S\n ]$/.test(value)) { + push({ type: "text", value }); + continue; + } + if (value === "\n") { + push({ type: "newline", value }); + line++; + continue; + } + if (value === "\\") { + value += next(); + push({ type: "text", value }); + continue; + } + if ((value === "$" || value === "#" || value === "{") && peek() === "{") { + let n = next(); + value += n; + let token = { type: "template", open: value, inner: "", close: "", value }; + let ch; + while (ch = next()) { + if (ch === "}") { + if (peek() === "}") + ch += next(); + token.value += ch; + token.close = ch; + break; + } + if (ch === ":") { + token.initial = ""; + token.key = token.inner; + } else if (token.initial !== void 0) { + token.initial += ch; + } + token.value += ch; + token.inner += ch; + } + token.template = token.open + (token.initial || token.inner) + token.close; + token.key = token.key || token.inner; + if (defaults.hasOwnProperty(token.key)) { + token.initial = defaults[token.key]; + } + token = fn2(token); + push(token); + keys.push(token.key); + unique.add(token.key); + let item = items.find((item2) => item2.name === token.key); + token.field = fields.find((ch2) => ch2.name === token.key); + if (!item) { + item = new Item(token); + items.push(item); + } + item.lines.push(token.line - 1); + continue; + } + let last = tabstops[tabstops.length - 1]; + if (last.type === "text" && last.line === line) { + last.value += value; + } else { + push({ type: "text", value }); + } + } + push({ type: "eos", value: "" }); + return { input, tabstops, unique, keys, items }; + }; + module2.exports = async (prompt) => { + let options = prompt.options; + let required = new Set(options.required === true ? [] : options.required || []); + let defaults = { ...options.values, ...options.initial }; + let { tabstops, items, keys } = await tokenize(options, defaults); + let result = createFn("result", prompt, options); + let format = createFn("format", prompt, options); + let isValid = createFn("validate", prompt, options, true); + let isVal = prompt.isValue.bind(prompt); + return async (state = {}, submitted = false) => { + let index = 0; + state.required = required; + state.items = items; + state.keys = keys; + state.output = ""; + let validate = async (value, state2, item, index2) => { + let error = await isValid(value, state2, item, index2); + if (error === false) { + return "Invalid field " + item.name; + } + return error; + }; + for (let token of tabstops) { + let value = token.value; + let key = token.key; + if (token.type !== "template") { + if (value) + state.output += value; + continue; + } + if (token.type === "template") { + let item = items.find((ch) => ch.name === key); + if (options.required === true) { + state.required.add(item.name); + } + let val = [item.input, state.values[item.value], item.value, value].find(isVal); + let field = item.field || {}; + let message2 = field.message || token.inner; + if (submitted) { + let error = await validate(state.values[key], state, item, index); + if (error && typeof error === "string" || error === false) { + state.invalid.set(key, error); + continue; + } + state.invalid.delete(key); + let res = await result(state.values[key], state, item, index); + state.output += colors.unstyle(res); + continue; + } + item.placeholder = false; + let before = value; + value = await format(value, state, item, index); + if (val !== value) { + state.values[key] = val; + value = prompt.styles.typing(val); + state.missing.delete(message2); + } else { + state.values[key] = void 0; + val = `<${message2}>`; + value = prompt.styles.primary(val); + item.placeholder = true; + if (state.required.has(key)) { + state.missing.add(message2); + } + } + if (state.missing.has(message2) && state.validating) { + value = prompt.styles.warning(val); + } + if (state.invalid.has(key) && state.validating) { + value = prompt.styles.danger(val); + } + if (index === state.index) { + if (before !== value) { + value = prompt.styles.underline(value); + } else { + value = prompt.styles.heading(colors.unstyle(value)); + } + } + index++; + } + if (value) { + state.output += value; + } + } + let lines = state.output.split("\n").map((l) => " " + l); + let len = items.length; + let done = 0; + for (let item of items) { + if (state.invalid.has(item.name)) { + item.lines.forEach((i) => { + if (lines[i][0] !== " ") + return; + lines[i] = state.styles.danger(state.symbols.bullet) + lines[i].slice(1); + }); + } + if (prompt.isValue(state.values[item.name])) { + done++; + } + } + state.completed = (done / len * 100).toFixed(0); + state.output = lines.join("\n"); + return state.output; + }; + }; + function createFn(prop, prompt, options, fallback) { + return (value, state, item, index) => { + if (typeof item.field[prop] === "function") { + return item.field[prop].call(prompt, value, state, item, index); + } + return [fallback, value].find((v) => prompt.isValue(v)); + }; + } + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/snippet.js +var require_snippet = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/snippet.js"(exports2, module2) { + "use strict"; + var colors = require_ansi_colors(); + var interpolate = require_interpolate(); + var Prompt = require_prompt(); + var SnippetPrompt = class extends Prompt { + constructor(options) { + super(options); + this.cursorHide(); + this.reset(true); + } + async initialize() { + this.interpolate = await interpolate(this); + await super.initialize(); + } + async reset(first) { + this.state.keys = []; + this.state.invalid = new Map(); + this.state.missing = new Set(); + this.state.completed = 0; + this.state.values = {}; + if (first !== true) { + await this.initialize(); + await this.render(); + } + } + moveCursor(n) { + let item = this.getItem(); + this.cursor += n; + item.cursor += n; + } + dispatch(ch, key) { + if (!key.code && !key.ctrl && ch != null && this.getItem()) { + this.append(ch, key); + return; + } + this.alert(); + } + append(ch, key) { + let item = this.getItem(); + let prefix = item.input.slice(0, this.cursor); + let suffix = item.input.slice(this.cursor); + this.input = item.input = `${prefix}${ch}${suffix}`; + this.moveCursor(1); + this.render(); + } + delete() { + let item = this.getItem(); + if (this.cursor <= 0 || !item.input) + return this.alert(); + let suffix = item.input.slice(this.cursor); + let prefix = item.input.slice(0, this.cursor - 1); + this.input = item.input = `${prefix}${suffix}`; + this.moveCursor(-1); + this.render(); + } + increment(i) { + return i >= this.state.keys.length - 1 ? 0 : i + 1; + } + decrement(i) { + return i <= 0 ? this.state.keys.length - 1 : i - 1; + } + first() { + this.state.index = 0; + this.render(); + } + last() { + this.state.index = this.state.keys.length - 1; + this.render(); + } + right() { + if (this.cursor >= this.input.length) + return this.alert(); + this.moveCursor(1); + this.render(); + } + left() { + if (this.cursor <= 0) + return this.alert(); + this.moveCursor(-1); + this.render(); + } + prev() { + this.state.index = this.decrement(this.state.index); + this.getItem(); + this.render(); + } + next() { + this.state.index = this.increment(this.state.index); + this.getItem(); + this.render(); + } + up() { + this.prev(); + } + down() { + this.next(); + } + format(value) { + let color = this.state.completed < 100 ? this.styles.warning : this.styles.success; + if (this.state.submitted === true && this.state.completed !== 100) { + color = this.styles.danger; + } + return color(`${this.state.completed}% completed`); + } + async render() { + let { index, keys = [], submitted, size } = this.state; + let newline = [this.options.newline, "\n"].find((v) => v != null); + let prefix = await this.prefix(); + let separator = await this.separator(); + let message2 = await this.message(); + let prompt = [prefix, message2, separator].filter(Boolean).join(" "); + this.state.prompt = prompt; + let header = await this.header(); + let error = await this.error() || ""; + let hint = await this.hint() || ""; + let body = submitted ? "" : await this.interpolate(this.state); + let key = this.state.key = keys[index] || ""; + let input = await this.format(key); + let footer = await this.footer(); + if (input) + prompt += " " + input; + if (hint && !input && this.state.completed === 0) + prompt += " " + hint; + this.clear(size); + let lines = [header, prompt, body, footer, error.trim()]; + this.write(lines.filter(Boolean).join(newline)); + this.restore(); + } + getItem(name) { + let { items, keys, index } = this.state; + let item = items.find((ch) => ch.name === keys[index]); + if (item && item.input != null) { + this.input = item.input; + this.cursor = item.cursor; + } + return item; + } + async submit() { + if (typeof this.interpolate !== "function") + await this.initialize(); + await this.interpolate(this.state, true); + let { invalid, missing, output, values } = this.state; + if (invalid.size) { + let err = ""; + for (let [key, value] of invalid) + err += `Invalid ${key}: ${value} +`; + this.state.error = err; + return super.submit(); + } + if (missing.size) { + this.state.error = "Required: " + [...missing.keys()].join(", "); + return super.submit(); + } + let lines = colors.unstyle(output).split("\n"); + let result = lines.map((v) => v.slice(1)).join("\n"); + this.value = { values, result }; + return super.submit(); + } + }; + module2.exports = SnippetPrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/sort.js +var require_sort = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/sort.js"(exports2, module2) { + "use strict"; + var hint = "(Use + to sort)"; + var Prompt = require_select(); + var Sort = class extends Prompt { + constructor(options) { + super({ ...options, reorder: false, sort: true, multiple: true }); + this.state.hint = [this.options.hint, hint].find(this.isValue.bind(this)); + } + indicator() { + return ""; + } + async renderChoice(choice, i) { + let str = await super.renderChoice(choice, i); + let sym = this.symbols.identicalTo + " "; + let pre = this.index === i && this.sorting ? this.styles.muted(sym) : " "; + if (this.options.drag === false) + pre = ""; + if (this.options.numbered === true) { + return pre + `${i + 1} - ` + str; + } + return pre + str; + } + get selected() { + return this.choices; + } + submit() { + this.value = this.choices.map((choice) => choice.value); + return super.submit(); + } + }; + module2.exports = Sort; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/survey.js +var require_survey = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/survey.js"(exports2, module2) { + "use strict"; + var ArrayPrompt = require_array(); + var Survey = class extends ArrayPrompt { + constructor(options = {}) { + super(options); + this.emptyError = options.emptyError || "No items were selected"; + this.term = process.env.TERM_PROGRAM; + if (!this.options.header) { + let header = ["", "4 - Strongly Agree", "3 - Agree", "2 - Neutral", "1 - Disagree", "0 - Strongly Disagree", ""]; + header = header.map((ele) => this.styles.muted(ele)); + this.state.header = header.join("\n "); + } + } + async toChoices(...args2) { + if (this.createdScales) + return false; + this.createdScales = true; + let choices = await super.toChoices(...args2); + for (let choice of choices) { + choice.scale = createScale(5, this.options); + choice.scaleIdx = 2; + } + return choices; + } + dispatch() { + this.alert(); + } + space() { + let choice = this.focused; + let ele = choice.scale[choice.scaleIdx]; + let selected = ele.selected; + choice.scale.forEach((e) => e.selected = false); + ele.selected = !selected; + return this.render(); + } + indicator() { + return ""; + } + pointer() { + return ""; + } + separator() { + return this.styles.muted(this.symbols.ellipsis); + } + right() { + let choice = this.focused; + if (choice.scaleIdx >= choice.scale.length - 1) + return this.alert(); + choice.scaleIdx++; + return this.render(); + } + left() { + let choice = this.focused; + if (choice.scaleIdx <= 0) + return this.alert(); + choice.scaleIdx--; + return this.render(); + } + indent() { + return " "; + } + async renderChoice(item, i) { + await this.onChoice(item, i); + let focused = this.index === i; + let isHyper = this.term === "Hyper"; + let n = !isHyper ? 8 : 9; + let s = !isHyper ? " " : ""; + let ln = this.symbols.line.repeat(n); + let sp = " ".repeat(n + (isHyper ? 0 : 1)); + let dot = (enabled) => (enabled ? this.styles.success("\u25C9") : "\u25EF") + s; + let num = i + 1 + "."; + let color = focused ? this.styles.heading : this.styles.noop; + let msg = await this.resolve(item.message, this.state, item, i); + let indent = this.indent(item); + let scale = indent + item.scale.map((e, i2) => dot(i2 === item.scaleIdx)).join(ln); + let val = (i2) => i2 === item.scaleIdx ? color(i2) : i2; + let next = indent + item.scale.map((e, i2) => val(i2)).join(sp); + let line = () => [num, msg].filter(Boolean).join(" "); + let lines = () => [line(), scale, next, " "].filter(Boolean).join("\n"); + if (focused) { + scale = this.styles.cyan(scale); + next = this.styles.cyan(next); + } + return lines(); + } + async renderChoices() { + if (this.state.submitted) + return ""; + let choices = this.visible.map(async (ch, i) => await this.renderChoice(ch, i)); + let visible = await Promise.all(choices); + if (!visible.length) + visible.push(this.styles.danger("No matching choices")); + return visible.join("\n"); + } + format() { + if (this.state.submitted) { + let values = this.choices.map((ch) => this.styles.info(ch.scaleIdx)); + return values.join(", "); + } + return ""; + } + async render() { + let { submitted, size } = this.state; + let prefix = await this.prefix(); + let separator = await this.separator(); + let message2 = await this.message(); + let prompt = [prefix, message2, separator].filter(Boolean).join(" "); + this.state.prompt = prompt; + let header = await this.header(); + let output = await this.format(); + let help = await this.error() || await this.hint(); + let body = await this.renderChoices(); + let footer = await this.footer(); + if (output || !help) + prompt += " " + output; + if (help && !prompt.includes(help)) + prompt += " " + help; + if (submitted && !output && !body && this.multiple && this.type !== "form") { + prompt += this.styles.danger(this.emptyError); + } + this.clear(size); + this.write([prompt, header, body, footer].filter(Boolean).join("\n")); + this.restore(); + } + submit() { + this.value = {}; + for (let choice of this.choices) { + this.value[choice.name] = choice.scaleIdx; + } + return this.base.submit.call(this); + } + }; + function createScale(n, options = {}) { + if (Array.isArray(options.scale)) { + return options.scale.map((ele) => ({ ...ele })); + } + let scale = []; + for (let i = 1; i < n + 1; i++) + scale.push({ i, selected: false }); + return scale; + } + module2.exports = Survey; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/text.js +var require_text = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/text.js"(exports2, module2) { + module2.exports = require_input(); + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/toggle.js +var require_toggle = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/toggle.js"(exports2, module2) { + "use strict"; + var BooleanPrompt = require_boolean(); + var TogglePrompt = class extends BooleanPrompt { + async initialize() { + await super.initialize(); + this.value = this.initial = !!this.options.initial; + this.disabled = this.options.disabled || "no"; + this.enabled = this.options.enabled || "yes"; + await this.render(); + } + reset() { + this.value = this.initial; + this.render(); + } + delete() { + this.alert(); + } + toggle() { + this.value = !this.value; + this.render(); + } + enable() { + if (this.value === true) + return this.alert(); + this.value = true; + this.render(); + } + disable() { + if (this.value === false) + return this.alert(); + this.value = false; + this.render(); + } + up() { + this.toggle(); + } + down() { + this.toggle(); + } + right() { + this.toggle(); + } + left() { + this.toggle(); + } + next() { + this.toggle(); + } + prev() { + this.toggle(); + } + dispatch(ch = "", key) { + switch (ch.toLowerCase()) { + case " ": + return this.toggle(); + case "1": + case "y": + case "t": + return this.enable(); + case "0": + case "n": + case "f": + return this.disable(); + default: { + return this.alert(); + } + } + } + format() { + let active = (str) => this.styles.primary.underline(str); + let value = [ + this.value ? this.disabled : active(this.disabled), + this.value ? active(this.enabled) : this.enabled + ]; + return value.join(this.styles.muted(" / ")); + } + async render() { + let { size } = this.state; + let header = await this.header(); + let prefix = await this.prefix(); + let separator = await this.separator(); + let message2 = await this.message(); + let output = await this.format(); + let help = await this.error() || await this.hint(); + let footer = await this.footer(); + let prompt = [prefix, message2, separator, output].join(" "); + this.state.prompt = prompt; + if (help && !prompt.includes(help)) + prompt += " " + help; + this.clear(size); + this.write([header, prompt, footer].filter(Boolean).join("\n")); + this.write(this.margin[2]); + this.restore(); + } + }; + module2.exports = TogglePrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/quiz.js +var require_quiz = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/quiz.js"(exports2, module2) { + "use strict"; + var SelectPrompt = require_select(); + var Quiz = class extends SelectPrompt { + constructor(options) { + super(options); + if (typeof this.options.correctChoice !== "number" || this.options.correctChoice < 0) { + throw new Error("Please specify the index of the correct answer from the list of choices"); + } + } + async toChoices(value, parent) { + let choices = await super.toChoices(value, parent); + if (choices.length < 2) { + throw new Error("Please give at least two choices to the user"); + } + if (this.options.correctChoice > choices.length) { + throw new Error("Please specify the index of the correct answer from the list of choices"); + } + return choices; + } + check(state) { + return state.index === this.options.correctChoice; + } + async result(selected) { + return { + selectedAnswer: selected, + correctAnswer: this.options.choices[this.options.correctChoice].value, + correct: await this.check(this.state) + }; + } + }; + module2.exports = Quiz; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/index.js +var require_prompts = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/index.js"(exports2) { + "use strict"; + var utils = require_utils(); + var define2 = (key, fn2) => { + utils.defineExport(exports2, key, fn2); + utils.defineExport(exports2, key.toLowerCase(), fn2); + }; + define2("AutoComplete", () => require_autocomplete()); + define2("BasicAuth", () => require_basicauth()); + define2("Confirm", () => require_confirm()); + define2("Editable", () => require_editable()); + define2("Form", () => require_form()); + define2("Input", () => require_input()); + define2("Invisible", () => require_invisible()); + define2("List", () => require_list()); + define2("MultiSelect", () => require_multiselect()); + define2("Numeral", () => require_numeral()); + define2("Password", () => require_password()); + define2("Scale", () => require_scale()); + define2("Select", () => require_select()); + define2("Snippet", () => require_snippet()); + define2("Sort", () => require_sort()); + define2("Survey", () => require_survey()); + define2("Text", () => require_text()); + define2("Toggle", () => require_toggle()); + define2("Quiz", () => require_quiz()); + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/index.js +var require_types = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/index.js"(exports2, module2) { + module2.exports = { + ArrayPrompt: require_array(), + AuthPrompt: require_auth(), + BooleanPrompt: require_boolean(), + NumberPrompt: require_number(), + StringPrompt: require_string() + }; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/index.js +var require_enquirer = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/index.js"(exports2, module2) { + "use strict"; + var assert = require("assert"); + var Events = require("events"); + var utils = require_utils(); + var Enquirer = class extends Events { + constructor(options, answers) { + super(); + this.options = utils.merge({}, options); + this.answers = { ...answers }; + } + register(type, fn2) { + if (utils.isObject(type)) { + for (let key of Object.keys(type)) + this.register(key, type[key]); + return this; + } + assert.equal(typeof fn2, "function", "expected a function"); + let name = type.toLowerCase(); + if (fn2.prototype instanceof this.Prompt) { + this.prompts[name] = fn2; + } else { + this.prompts[name] = fn2(this.Prompt, this); + } + return this; + } + async prompt(questions = []) { + for (let question of [].concat(questions)) { + try { + if (typeof question === "function") + question = await question.call(this); + await this.ask(utils.merge({}, this.options, question)); + } catch (err) { + return Promise.reject(err); + } + } + return this.answers; + } + async ask(question) { + if (typeof question === "function") { + question = await question.call(this); + } + let opts = utils.merge({}, this.options, question); + let { type, name } = question; + let { set, get } = utils; + if (typeof type === "function") { + type = await type.call(this, question, this.answers); + } + if (!type) + return this.answers[name]; + assert(this.prompts[type], `Prompt "${type}" is not registered`); + let prompt = new this.prompts[type](opts); + let value = get(this.answers, name); + prompt.state.answers = this.answers; + prompt.enquirer = this; + if (name) { + prompt.on("submit", (value2) => { + this.emit("answer", name, value2, prompt); + set(this.answers, name, value2); + }); + } + let emit = prompt.emit.bind(prompt); + prompt.emit = (...args2) => { + this.emit.call(this, ...args2); + return emit(...args2); + }; + this.emit("prompt", prompt, this); + if (opts.autofill && value != null) { + prompt.value = prompt.input = value; + if (opts.autofill === "show") { + await prompt.submit(); + } + } else { + value = prompt.value = await prompt.run(); + } + return value; + } + use(plugin) { + plugin.call(this, this); + return this; + } + set Prompt(value) { + this._Prompt = value; + } + get Prompt() { + return this._Prompt || this.constructor.Prompt; + } + get prompts() { + return this.constructor.prompts; + } + static set Prompt(value) { + this._Prompt = value; + } + static get Prompt() { + return this._Prompt || require_prompt(); + } + static get prompts() { + return require_prompts(); + } + static get types() { + return require_types(); + } + static get prompt() { + const fn2 = (questions, ...rest) => { + let enquirer = new this(...rest); + let emit = enquirer.emit.bind(enquirer); + enquirer.emit = (...args2) => { + fn2.emit(...args2); + return emit(...args2); + }; + return enquirer.prompt(questions); + }; + utils.mixinEmitter(fn2, new Events()); + return fn2; + } + }; + utils.mixinEmitter(Enquirer, new Events()); + var prompts = Enquirer.prompts; + for (let name of Object.keys(prompts)) { + let key = name.toLowerCase(); + let run = (options) => new prompts[name](options).run(); + Enquirer.prompt[key] = run; + Enquirer[key] = run; + if (!Enquirer[name]) { + Reflect.defineProperty(Enquirer, name, { get: () => prompts[name] }); + } + } + var exp = (name) => { + utils.defineExport(Enquirer, name, () => Enquirer.types[name]); + }; + exp("ArrayPrompt"); + exp("AuthPrompt"); + exp("BooleanPrompt"); + exp("NumberPrompt"); + exp("StringPrompt"); + module2.exports = Enquirer; + } +}); + +// ../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js +var require_ms = __commonJS({ + "../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js"(exports2, module2) { + var s = 1e3; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var w = d * 7; + var y = d * 365.25; + module2.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === "string" && val.length > 0) { + return parse(val); + } else if (type === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val)); + }; + function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || "ms").toLowerCase(); + switch (type) { + case "years": + case "year": + case "yrs": + case "yr": + case "y": + return n * y; + case "weeks": + case "week": + case "w": + return n * w; + case "days": + case "day": + case "d": + return n * d; + case "hours": + case "hour": + case "hrs": + case "hr": + case "h": + return n * h; + case "minutes": + case "minute": + case "mins": + case "min": + case "m": + return n * m; + case "seconds": + case "second": + case "secs": + case "sec": + case "s": + return n * s; + case "milliseconds": + case "millisecond": + case "msecs": + case "msec": + case "ms": + return n; + default: + return void 0; + } + } + function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + "d"; + } + if (msAbs >= h) { + return Math.round(ms / h) + "h"; + } + if (msAbs >= m) { + return Math.round(ms / m) + "m"; + } + if (msAbs >= s) { + return Math.round(ms / s) + "s"; + } + return ms + "ms"; + } + function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, "day"); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, "hour"); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, "minute"); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, "second"); + } + return ms + " ms"; + } + function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); + } + } +}); + +// ../../node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/common.js +var require_common = __commonJS({ + "../../node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/common.js"(exports2, module2) { + function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require_ms(); + createDebug.destroy = destroy; + Object.keys(env).forEach((key) => { + createDebug[key] = env[key]; + }); + createDebug.names = []; + createDebug.skips = []; + createDebug.formatters = {}; + function selectColor(namespace) { + let hash = 0; + for (let i = 0; i < namespace.length; i++) { + hash = (hash << 5) - hash + namespace.charCodeAt(i); + hash |= 0; + } + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + function debug(...args2) { + if (!debug.enabled) { + return; + } + const self2 = debug; + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self2.diff = ms; + self2.prev = prevTime; + self2.curr = curr; + prevTime = curr; + args2[0] = createDebug.coerce(args2[0]); + if (typeof args2[0] !== "string") { + args2.unshift("%O"); + } + let index = 0; + args2[0] = args2[0].replace(/%([a-zA-Z%])/g, (match, format) => { + if (match === "%%") { + return "%"; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === "function") { + const val = args2[index]; + match = formatter.call(self2, val); + args2.splice(index, 1); + index--; + } + return match; + }); + createDebug.formatArgs.call(self2, args2); + const logFn = self2.log || createDebug.log; + logFn.apply(self2, args2); + } + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend; + debug.destroy = createDebug.destroy; + Object.defineProperty(debug, "enabled", { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + return enabledCache; + }, + set: (v) => { + enableOverride = v; + } + }); + if (typeof createDebug.init === "function") { + createDebug.init(debug); + } + return debug; + } + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; + createDebug.names = []; + createDebug.skips = []; + let i; + const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); + const len = split.length; + for (i = 0; i < len; i++) { + if (!split[i]) { + continue; + } + namespaces = split[i].replace(/\*/g, ".*?"); + if (namespaces[0] === "-") { + createDebug.skips.push(new RegExp("^" + namespaces.substr(1) + "$")); + } else { + createDebug.names.push(new RegExp("^" + namespaces + "$")); + } + } + } + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace) + ].join(","); + createDebug.enable(""); + return namespaces; + } + function enabled(name) { + if (name[name.length - 1] === "*") { + return true; + } + let i; + let len; + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + return false; + } + function toNamespace(regexp) { + return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*"); + } + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + function destroy() { + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + } + createDebug.enable(createDebug.load()); + return createDebug; + } + module2.exports = setup; + } +}); + +// ../../node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/browser.js +var require_browser = __commonJS({ + "../../node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/browser.js"(exports2, module2) { + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.storage = localstorage(); + exports2.destroy = (() => { + let warned = false; + return () => { + if (!warned) { + warned = true; + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + } + }; + })(); + exports2.colors = [ + "#0000CC", + "#0000FF", + "#0033CC", + "#0033FF", + "#0066CC", + "#0066FF", + "#0099CC", + "#0099FF", + "#00CC00", + "#00CC33", + "#00CC66", + "#00CC99", + "#00CCCC", + "#00CCFF", + "#3300CC", + "#3300FF", + "#3333CC", + "#3333FF", + "#3366CC", + "#3366FF", + "#3399CC", + "#3399FF", + "#33CC00", + "#33CC33", + "#33CC66", + "#33CC99", + "#33CCCC", + "#33CCFF", + "#6600CC", + "#6600FF", + "#6633CC", + "#6633FF", + "#66CC00", + "#66CC33", + "#9900CC", + "#9900FF", + "#9933CC", + "#9933FF", + "#99CC00", + "#99CC33", + "#CC0000", + "#CC0033", + "#CC0066", + "#CC0099", + "#CC00CC", + "#CC00FF", + "#CC3300", + "#CC3333", + "#CC3366", + "#CC3399", + "#CC33CC", + "#CC33FF", + "#CC6600", + "#CC6633", + "#CC9900", + "#CC9933", + "#CCCC00", + "#CCCC33", + "#FF0000", + "#FF0033", + "#FF0066", + "#FF0099", + "#FF00CC", + "#FF00FF", + "#FF3300", + "#FF3333", + "#FF3366", + "#FF3399", + "#FF33CC", + "#FF33FF", + "#FF6600", + "#FF6633", + "#FF9900", + "#FF9933", + "#FFCC00", + "#FFCC33" + ]; + function useColors() { + if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { + return true; + } + if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); + } + function formatArgs(args2) { + args2[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args2[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); + if (!this.useColors) { + return; + } + const c = "color: " + this.color; + args2.splice(1, 0, c, "color: inherit"); + let index = 0; + let lastC = 0; + args2[0].replace(/%[a-zA-Z%]/g, (match) => { + if (match === "%%") { + return; + } + index++; + if (match === "%c") { + lastC = index; + } + }); + args2.splice(lastC, 0, c); + } + exports2.log = console.debug || console.log || (() => { + }); + function save(namespaces) { + try { + if (namespaces) { + exports2.storage.setItem("debug", namespaces); + } else { + exports2.storage.removeItem("debug"); + } + } catch (error) { + } + } + function load() { + let r; + try { + r = exports2.storage.getItem("debug"); + } catch (error) { + } + if (!r && typeof process !== "undefined" && "env" in process) { + r = process.env.DEBUG; + } + return r; + } + function localstorage() { + try { + return localStorage; + } catch (error) { + } + } + module2.exports = require_common()(exports2); + var { formatters } = module2.exports; + formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (error) { + return "[UnexpectedJSONParseError]: " + error.message; + } + }; + } +}); + +// ../../node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/node.js +var require_node = __commonJS({ + "../../node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/node.js"(exports2, module2) { + var tty = require("tty"); + var util = require("util"); + exports2.init = init; + exports2.log = log2; + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.destroy = util.deprecate(() => { + }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + exports2.colors = [6, 2, 3, 4, 5, 1]; + try { + const supportsColor = require("supports-color"); + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports2.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } + } catch (error) { + } + exports2.inspectOpts = Object.keys(process.env).filter((key) => { + return /^debug_/i.test(key); + }).reduce((obj, key) => { + const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === "null") { + val = null; + } else { + val = Number(val); + } + obj[prop] = val; + return obj; + }, {}); + function useColors() { + return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd); + } + function formatArgs(args2) { + const { namespace: name, useColors: useColors2 } = this; + if (useColors2) { + const c = this.color; + const colorCode = "[3" + (c < 8 ? c : "8;5;" + c); + const prefix = ` ${colorCode};1m${name} `; + args2[0] = prefix + args2[0].split("\n").join("\n" + prefix); + args2.push(colorCode + "m+" + module2.exports.humanize(this.diff) + ""); + } else { + args2[0] = getDate() + name + " " + args2[0]; + } + } + function getDate() { + if (exports2.inspectOpts.hideDate) { + return ""; + } + return new Date().toISOString() + " "; + } + function log2(...args2) { + return process.stderr.write(util.format(...args2) + "\n"); + } + function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + delete process.env.DEBUG; + } + } + function load() { + return process.env.DEBUG; + } + function init(debug) { + debug.inspectOpts = {}; + const keys = Object.keys(exports2.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; + } + } + module2.exports = require_common()(exports2); + var { formatters } = module2.exports; + formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); + }; + formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); + }; + } +}); + +// ../../node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/index.js +var require_src = __commonJS({ + "../../node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/index.js"(exports2, module2) { + if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { + module2.exports = require_browser(); + } else { + module2.exports = require_node(); + } + } +}); + +// ../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/utils/tabtabDebug.js +var require_tabtabDebug = __commonJS({ + "../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/utils/tabtabDebug.js"(exports2, module2) { + var fs = require("fs"); + var util = require("util"); + var tabtabDebug = (name) => { + let debug = require_src()(name); + if (process.env.TABTAB_DEBUG) { + const file = process.env.TABTAB_DEBUG; + const stream = fs.createWriteStream(file, { + flags: "a+" + }); + const log2 = (...args2) => { + args2 = args2.map((arg) => { + if (typeof arg === "string") + return arg; + return JSON.stringify(arg); + }); + const str = `${util.format(...args2)} +`; + stream.write(str); + }; + if (process.env.COMP_LINE) { + debug = log2; + } else { + debug.log = log2; + } + } + return debug; + }; + module2.exports = tabtabDebug; + } +}); + +// ../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/prompt.js +var require_prompt2 = __commonJS({ + "../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/prompt.js"(exports2, module2) { + var enquirer = require_enquirer(); + var path = require("path"); + var { SHELL_LOCATIONS } = require_constants(); + var debug = require_tabtabDebug()("tabtab:prompt"); + var prompt = async () => { + const questions = [ + { + type: "select", + name: "shell", + message: "Which Shell do you use ?", + choices: ["bash", "zsh", "fish"], + default: "bash" + } + ]; + const finalAnswers = {}; + const { shell } = await enquirer.prompt(questions); + debug("answers", shell); + const location = SHELL_LOCATIONS[shell]; + debug(`Will install completion to ${location}`); + Object.assign(finalAnswers, { location, shell }); + const { locationOK } = await enquirer.prompt({ + type: "confirm", + name: "locationOK", + message: `We will install completion to ${location}, is it ok ?` + }); + if (locationOK) { + debug("location is ok, return", finalAnswers); + return finalAnswers; + } + const { userLocation } = await enquirer.prompt({ + name: "userLocation", + message: "Which path then ? Must be absolute.", + type: "input", + validate: (input) => { + debug("Validating input", input); + return path.isAbsolute(input); + } + }); + console.log(`Very well, we will install using ${userLocation}`); + Object.assign(finalAnswers, { location: userLocation }); + return finalAnswers; + }; + module2.exports = prompt; + } +}); + +// ../../node_modules/.pnpm/untildify@4.0.0/node_modules/untildify/index.js +var require_untildify = __commonJS({ + "../../node_modules/.pnpm/untildify@4.0.0/node_modules/untildify/index.js"(exports2, module2) { + "use strict"; + var os = require("os"); + var homeDirectory = os.homedir(); + module2.exports = (pathWithTilde) => { + if (typeof pathWithTilde !== "string") { + throw new TypeError(`Expected a string, got ${typeof pathWithTilde}`); + } + return homeDirectory ? pathWithTilde.replace(/^~(?=$|\/|\\)/, homeDirectory) : pathWithTilde; + }; + } +}); + +// ../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/utils/systemShell.js +var require_systemShell = __commonJS({ + "../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/utils/systemShell.js"(exports2, module2) { + var systemShell = () => (process.env.SHELL || "").split("/").slice(-1)[0]; + module2.exports = systemShell; + } +}); + +// ../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/utils/exists.js +var require_exists = __commonJS({ + "../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/utils/exists.js"(exports2, module2) { + var fs = require("fs"); + var untildify = require_untildify(); + var { promisify } = require("util"); + var readFile = promisify(fs.readFile); + module2.exports = async (file) => { + let fileExists; + try { + await readFile(untildify(file)); + fileExists = true; + } catch (err) { + fileExists = false; + } + return fileExists; + }; + } +}); + +// ../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/utils/index.js +var require_utils2 = __commonJS({ + "../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/utils/index.js"(exports2, module2) { + var tabtabDebug = require_tabtabDebug(); + var systemShell = require_systemShell(); + var exists = require_exists(); + module2.exports = { + systemShell, + tabtabDebug, + exists + }; + } +}); + +// ../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/installer.js +var require_installer = __commonJS({ + "../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/installer.js"(exports2, module2) { + var fs = require("fs"); + var path = require("path"); + var untildify = require_untildify(); + var { promisify } = require("util"); + var { tabtabDebug, systemShell, exists } = require_utils2(); + var debug = tabtabDebug("tabtab:installer"); + var readFile = promisify(fs.readFile); + var writeFile = promisify(fs.writeFile); + var unlink = promisify(fs.unlink); + var mkdir = promisify(fs.mkdir); + var { + BASH_LOCATION, + FISH_LOCATION, + ZSH_LOCATION, + COMPLETION_DIR, + TABTAB_SCRIPT_NAME + } = require_constants(); + var scriptFromShell = (shell = systemShell()) => { + if (shell === "fish") { + return path.join(__dirname, "scripts/fish.sh"); + } + if (shell === "zsh") { + return path.join(__dirname, "scripts/zsh.sh"); + } + return path.join(__dirname, "scripts/bash.sh"); + }; + var locationFromShell = (shell = systemShell()) => { + if (shell === "bash") + return untildify(BASH_LOCATION); + if (shell === "zsh") + return untildify(ZSH_LOCATION); + if (shell === "fish") + return untildify(FISH_LOCATION); + return BASH_LOCATION; + }; + var sourceLineForShell = (scriptname, shell = systemShell()) => { + if (shell === "fish") { + return `[ -f ${scriptname} ]; and . ${scriptname}; or true`; + } + if (shell === "zsh") { + return `[[ -f ${scriptname} ]] && . ${scriptname} || true`; + } + return `[ -f ${scriptname} ] && . ${scriptname} || true`; + }; + var isInShellConfig = (filename) => [ + BASH_LOCATION, + ZSH_LOCATION, + FISH_LOCATION, + untildify(BASH_LOCATION), + untildify(ZSH_LOCATION), + untildify(FISH_LOCATION) + ].includes(filename); + var checkFilenameForLine = async (filename, line) => { + debug('Check filename (%s) for "%s"', filename, line); + let filecontent = ""; + try { + filecontent = await readFile(untildify(filename), "utf8"); + } catch (err) { + if (err.code !== "ENOENT") { + return console.error("Got an error while trying to read from %s file", filename, err); + } + } + return !!filecontent.match(`${line}`); + }; + var writeLineToFilename = ({ filename, scriptname, name, shell }) => (resolve, reject) => { + const filepath = untildify(filename); + debug("Creating directory for %s file", filepath); + mkdir(path.dirname(filepath), { recursive: true }).then(() => { + const stream = fs.createWriteStream(filepath, { flags: "a" }); + stream.on("error", reject); + stream.on("finish", () => resolve()); + debug("Writing to shell configuration file (%s)", filename); + debug("scriptname:", scriptname); + const inShellConfig = isInShellConfig(filename); + if (inShellConfig) { + stream.write(` +# tabtab source for packages`); + } else { + stream.write(` +# tabtab source for ${name} package`); + } + stream.write("\n# uninstall by removing these lines"); + stream.write(` +${sourceLineForShell(scriptname, shell)}`); + stream.end("\n"); + console.log('=> Added tabtab source line in "%s" file', filename); + }).catch((err) => { + console.error("mkdirp ERROR", err); + reject(err); + }); + }; + var writeToShellConfig = async ({ location, name, shell }) => { + const scriptname = path.join(COMPLETION_DIR, shell, `${TABTAB_SCRIPT_NAME}.${shell}`); + const filename = location; + const existing = await checkFilenameForLine(filename, scriptname); + if (existing) { + return console.log("=> Tabtab line already exists in %s file", filename); + } + return new Promise(writeLineToFilename({ + filename, + scriptname, + name, + shell + })); + }; + var writeToTabtabScript = async ({ name, shell }) => { + const filename = path.join(COMPLETION_DIR, shell, `${TABTAB_SCRIPT_NAME}.${shell}`); + const scriptname = path.join(COMPLETION_DIR, shell, `${name}.${shell}`); + const existing = await checkFilenameForLine(filename, scriptname); + if (existing) { + return console.log("=> Tabtab line already exists in %s file", filename); + } + return new Promise(writeLineToFilename({ filename, scriptname, name, shell })); + }; + var writeToCompletionScript = async ({ name, completer, shell }) => { + const filename = untildify(path.join(COMPLETION_DIR, shell, `${name}.${shell}`)); + const script = scriptFromShell(shell); + debug("Writing completion script to", filename); + debug("with", script); + try { + let filecontent = await readFile(script, "utf8"); + filecontent = filecontent.replace(/\{pkgname\}/g, name).replace(/{completer}/g, completer).replace(/\r?\n/g, "\n"); + await mkdir(path.dirname(filename), { recursive: true }); + await writeFile(filename, filecontent); + console.log("=> Wrote completion script to %s file", filename); + } catch (err) { + console.error("ERROR:", err); + } + }; + var install = async (options = { name: "", completer: "", location: "", shell: systemShell() }) => { + debug("Install with options", options); + if (!options.name) { + throw new Error("options.name is required"); + } + if (!options.completer) { + throw new Error("options.completer is required"); + } + if (!options.location) { + throw new Error("options.location is required"); + } + await Promise.all([ + writeToShellConfig(options), + writeToTabtabScript(options), + writeToCompletionScript(options) + ]); + const { location, name } = options; + console.log(` + => Tabtab source line added to ${location} for ${name} package. + + Make sure to reload your SHELL. + `); + }; + var removeLinesFromFilename = async (filename, name) => { + debug("Removing lines from %s file, looking for %s package", filename, name); + if (!await exists(filename)) { + return debug("File %s does not exist", filename); + } + const filecontent = await readFile(filename, "utf8"); + const lines = filecontent.split(/\r?\n/); + const sourceLine = isInShellConfig(filename) ? `# tabtab source for packages` : `# tabtab source for ${name} package`; + const hasLine = !!filecontent.match(`${sourceLine}`); + if (!hasLine) { + return debug("File %s does not include the line: %s", filename, sourceLine); + } + let lineIndex = -1; + const buffer = lines.map((line, index) => { + const match = line.match(sourceLine); + if (match) { + lineIndex = index; + } else if (lineIndex + 3 <= index) { + lineIndex = -1; + } + return lineIndex === -1 ? line : ""; + }).map((line, index, array) => { + const next = array[index + 1]; + if (line === "" && next === "") { + return; + } + return line; + }).filter((line) => line !== void 0).join("\n").trim(); + await writeFile(filename, buffer); + console.log("=> Removed tabtab source lines from %s file", filename); + }; + var uninstall = async (options = { name: "", shell: "" }) => { + debug("Uninstall with options", options); + const { name, shell } = options; + if (!name) { + throw new Error("Unable to uninstall if options.name is missing"); + } + if (!shell) { + throw new Error("Unable to uninstall if options.shell is missing"); + } + const completionScript = untildify(path.join(COMPLETION_DIR, shell, `${name}.${shell}`)); + if (await exists(completionScript)) { + await unlink(completionScript); + console.log("=> Removed completion script (%s)", completionScript); + } + const tabtabScript = untildify(path.join(COMPLETION_DIR, shell, `${TABTAB_SCRIPT_NAME}.${shell}`)); + await removeLinesFromFilename(tabtabScript, name); + const isEmpty = (await readFile(tabtabScript, "utf8")).trim() === ""; + if (isEmpty) { + const shellScript = locationFromShell(); + debug("File %s is empty. Removing source line from %s file", tabtabScript, shellScript); + await removeLinesFromFilename(shellScript, name); + } + console.log("=> Uninstalled completion for %s package", name); + }; + module2.exports = { + install, + uninstall, + checkFilenameForLine, + writeToShellConfig, + writeToTabtabScript, + writeToCompletionScript, + writeLineToFilename + }; + } +}); + +// ../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/index.js +var require_lib5 = __commonJS({ + "../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/index.js"(exports2, module2) { + var { SHELL_LOCATIONS } = require_constants(); + var prompt = require_prompt2(); + var installer = require_installer(); + var { tabtabDebug, systemShell } = require_utils2(); + var debug = tabtabDebug("tabtab"); + var install = async (options = { name: "", completer: "" }) => { + const { name, completer } = options; + if (!name) + throw new TypeError("options.name is required"); + if (!completer) + throw new TypeError("options.completer is required"); + if (options.shell) { + const location2 = SHELL_LOCATIONS[options.shell]; + if (!location2) { + throw new Error(`Couldn't find shell location for ${options.shell}`); + } + await installer.install({ + name, + completer, + location: location2, + shell: options.shell + }); + return; + } + const { location, shell } = await prompt(); + await installer.install({ + name, + completer, + location, + shell + }); + }; + var uninstall = async (options = { name: "" }) => { + const { name } = options; + if (!name) + throw new TypeError("options.name is required"); + try { + await installer.uninstall({ name }); + } catch (err) { + console.error("ERROR while uninstalling", err); + } + }; + var parseEnv = (env) => { + if (!env) { + throw new Error("parseEnv: You must pass in an environment object."); + } + debug("Parsing env. CWORD: %s, COMP_POINT: %s, COMP_LINE: %s", env.COMP_CWORD, env.COMP_POINT, env.COMP_LINE); + let cword = Number(env.COMP_CWORD); + let point = Number(env.COMP_POINT); + const line = env.COMP_LINE || ""; + if (Number.isNaN(cword)) + cword = 0; + if (Number.isNaN(point)) + point = 0; + const partial = line.slice(0, point); + const parts = line.split(" "); + const prev = parts.slice(0, -1).slice(-1)[0]; + const last = parts.slice(-1).join(""); + const lastPartial = partial.split(" ").slice(-1).join(""); + let complete = true; + if (!env.COMP_CWORD || !env.COMP_POINT || !env.COMP_LINE) { + complete = false; + } + return { + complete, + words: cword, + point, + line, + partial, + last, + lastPartial, + prev + }; + }; + var completionItem = (item) => { + debug("completion item", item); + if (item.name || item.description) { + return { + name: item.name, + description: item.description || "" + }; + } + const shell = systemShell(); + let name = item; + let description = ""; + const matching = /^(.*?)(\\)?:(.*)$/.exec(item); + if (matching) { + [, name, , description] = matching; + } + if (shell === "zsh" && /\\/.test(item)) { + name += "\\"; + } + return { + name, + description + }; + }; + var log2 = (args2) => { + const shell = systemShell(); + if (!Array.isArray(args2)) { + throw new Error("log: Invalid arguments, must be an array"); + } + args2 = args2.map(completionItem).map((item) => { + const { name: rawName, description: rawDescription } = item; + const name = shell === "zsh" ? rawName.replace(/:/g, "\\:") : rawName; + const description = shell === "zsh" ? rawDescription.replace(/:/g, "\\:") : rawDescription; + let str = name; + if (shell === "zsh" && description) { + str = `${name}:${description}`; + } else if (shell === "fish" && description) { + str = `${name} ${description}`; + } + return str; + }); + if (shell === "bash") { + const env = parseEnv(process.env); + args2 = args2.filter((arg) => arg.indexOf(env.last) === 0); + } + for (const arg of args2) { + console.log(`${arg}`); + } + }; + var logFiles = () => { + console.log("__tabtab_complete_files__"); + }; + module2.exports = { + shell: systemShell, + install, + uninstall, + parseEnv, + log: log2, + logFiles + }; + } +}); + +// ../../node_modules/.pnpm/fast-safe-stringify@2.1.1/node_modules/fast-safe-stringify/index.js +var require_fast_safe_stringify = __commonJS({ + "../../node_modules/.pnpm/fast-safe-stringify@2.1.1/node_modules/fast-safe-stringify/index.js"(exports2, module2) { + module2.exports = stringify; + stringify.default = stringify; + stringify.stable = deterministicStringify; + stringify.stableStringify = deterministicStringify; + var LIMIT_REPLACE_NODE = "[...]"; + var CIRCULAR_REPLACE_NODE = "[Circular]"; + var arr = []; + var replacerStack = []; + function defaultOptions() { + return { + depthLimit: Number.MAX_SAFE_INTEGER, + edgesLimit: Number.MAX_SAFE_INTEGER + }; + } + function stringify(obj, replacer, spacer, options) { + if (typeof options === "undefined") { + options = defaultOptions(); + } + decirc(obj, "", 0, [], void 0, 0, options); + var res; + try { + if (replacerStack.length === 0) { + res = JSON.stringify(obj, replacer, spacer); + } else { + res = JSON.stringify(obj, replaceGetterValues(replacer), spacer); + } + } catch (_) { + return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]"); + } finally { + while (arr.length !== 0) { + var part = arr.pop(); + if (part.length === 4) { + Object.defineProperty(part[0], part[1], part[3]); + } else { + part[0][part[1]] = part[2]; + } + } + } + return res; + } + function setReplace(replace, val, k, parent) { + var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k); + if (propertyDescriptor.get !== void 0) { + if (propertyDescriptor.configurable) { + Object.defineProperty(parent, k, { value: replace }); + arr.push([parent, k, val, propertyDescriptor]); + } else { + replacerStack.push([val, k, replace]); + } + } else { + parent[k] = replace; + arr.push([parent, k, val]); + } + } + function decirc(val, k, edgeIndex, stack2, parent, depth, options) { + depth += 1; + var i; + if (typeof val === "object" && val !== null) { + for (i = 0; i < stack2.length; i++) { + if (stack2[i] === val) { + setReplace(CIRCULAR_REPLACE_NODE, val, k, parent); + return; + } + } + if (typeof options.depthLimit !== "undefined" && depth > options.depthLimit) { + setReplace(LIMIT_REPLACE_NODE, val, k, parent); + return; + } + if (typeof options.edgesLimit !== "undefined" && edgeIndex + 1 > options.edgesLimit) { + setReplace(LIMIT_REPLACE_NODE, val, k, parent); + return; + } + stack2.push(val); + if (Array.isArray(val)) { + for (i = 0; i < val.length; i++) { + decirc(val[i], i, i, stack2, val, depth, options); + } + } else { + var keys = Object.keys(val); + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + decirc(val[key], key, i, stack2, val, depth, options); + } + } + stack2.pop(); + } + } + function compareFunction(a, b) { + if (a < b) { + return -1; + } + if (a > b) { + return 1; + } + return 0; + } + function deterministicStringify(obj, replacer, spacer, options) { + if (typeof options === "undefined") { + options = defaultOptions(); + } + var tmp = deterministicDecirc(obj, "", 0, [], void 0, 0, options) || obj; + var res; + try { + if (replacerStack.length === 0) { + res = JSON.stringify(tmp, replacer, spacer); + } else { + res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer); + } + } catch (_) { + return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]"); + } finally { + while (arr.length !== 0) { + var part = arr.pop(); + if (part.length === 4) { + Object.defineProperty(part[0], part[1], part[3]); + } else { + part[0][part[1]] = part[2]; + } + } + } + return res; + } + function deterministicDecirc(val, k, edgeIndex, stack2, parent, depth, options) { + depth += 1; + var i; + if (typeof val === "object" && val !== null) { + for (i = 0; i < stack2.length; i++) { + if (stack2[i] === val) { + setReplace(CIRCULAR_REPLACE_NODE, val, k, parent); + return; + } + } + try { + if (typeof val.toJSON === "function") { + return; + } + } catch (_) { + return; + } + if (typeof options.depthLimit !== "undefined" && depth > options.depthLimit) { + setReplace(LIMIT_REPLACE_NODE, val, k, parent); + return; + } + if (typeof options.edgesLimit !== "undefined" && edgeIndex + 1 > options.edgesLimit) { + setReplace(LIMIT_REPLACE_NODE, val, k, parent); + return; + } + stack2.push(val); + if (Array.isArray(val)) { + for (i = 0; i < val.length; i++) { + deterministicDecirc(val[i], i, i, stack2, val, depth, options); + } + } else { + var tmp = {}; + var keys = Object.keys(val).sort(compareFunction); + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + deterministicDecirc(val[key], key, i, stack2, val, depth, options); + tmp[key] = val[key]; + } + if (typeof parent !== "undefined") { + arr.push([parent, k, val]); + parent[k] = tmp; + } else { + return tmp; + } + } + stack2.pop(); + } + } + function replaceGetterValues(replacer) { + replacer = typeof replacer !== "undefined" ? replacer : function(k, v) { + return v; + }; + return function(key, val) { + if (replacerStack.length > 0) { + for (var i = 0; i < replacerStack.length; i++) { + var part = replacerStack[i]; + if (part[1] === key && part[0] === val) { + val = part[2]; + replacerStack.splice(i, 1); + break; + } + } + } + return replacer.call(this, key, val); + }; + } + } +}); + +// ../../node_modules/.pnpm/individual@3.0.0/node_modules/individual/index.js +var require_individual = __commonJS({ + "../../node_modules/.pnpm/individual@3.0.0/node_modules/individual/index.js"(exports2, module2) { + "use strict"; + var root = typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}; + module2.exports = Individual; + function Individual(key, value) { + if (key in root) { + return root[key]; + } + root[key] = value; + return value; + } + } +}); + +// ../../node_modules/.pnpm/bole@4.0.0/node_modules/bole/format.js +var require_format = __commonJS({ + "../../node_modules/.pnpm/bole@4.0.0/node_modules/bole/format.js"(exports2, module2) { + var utilformat = require("util").format; + function format(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) { + if (a16 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); + } + if (a15 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); + } + if (a14 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); + } + if (a13 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); + } + if (a12 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); + } + if (a11 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); + } + if (a10 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); + } + if (a9 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9); + } + if (a8 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6, a7, a8); + } + if (a7 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6, a7); + } + if (a6 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6); + } + if (a5 !== void 0) { + return utilformat(a1, a2, a3, a4, a5); + } + if (a4 !== void 0) { + return utilformat(a1, a2, a3, a4); + } + if (a3 !== void 0) { + return utilformat(a1, a2, a3); + } + if (a2 !== void 0) { + return utilformat(a1, a2); + } + return a1; + } + module2.exports = format; + } +}); + +// ../../node_modules/.pnpm/bole@4.0.0/node_modules/bole/bole.js +var require_bole = __commonJS({ + "../../node_modules/.pnpm/bole@4.0.0/node_modules/bole/bole.js"(exports2, module2) { + "use strict"; + var _stringify = require_fast_safe_stringify(); + var individual = require_individual()("$$bole", { fastTime: false }); + var format = require_format(); + var levels = "debug info warn error".split(" "); + var hostname = require("os").hostname(); + var hostnameSt = _stringify(hostname); + var pid = process.pid; + var hasObjMode = false; + var scache = []; + for (const level of levels) { + scache[level] = ',"hostname":' + hostnameSt + ',"pid":' + pid + ',"level":"' + level; + Number(scache[level]); + if (!Array.isArray(individual[level])) { + individual[level] = []; + } + } + function stackToString(e) { + let s = e.stack; + let ce; + if (typeof e.cause === "function" && (ce = e.cause())) { + s += "\nCaused by: " + stackToString(ce); + } + return s; + } + function errorToOut(err, out) { + out.err = { + name: err.name, + message: err.message, + code: err.code, + stack: stackToString(err) + }; + } + function requestToOut(req, out) { + out.req = { + method: req.method, + url: req.url, + headers: req.headers, + remoteAddress: req.connection.remoteAddress, + remotePort: req.connection.remotePort + }; + } + function objectToOut(obj, out) { + for (const k in obj) { + if (Object.prototype.hasOwnProperty.call(obj, k) && obj[k] !== void 0) { + out[k] = obj[k]; + } + } + } + function objectMode(stream) { + return stream._writableState && stream._writableState.objectMode === true; + } + function stringify(level, name, message2, obj) { + let s = '{"time":' + (individual.fastTime ? Date.now() : '"' + new Date().toISOString() + '"') + scache[level] + '","name":' + name + (message2 !== void 0 ? ',"message":' + _stringify(message2) : ""); + for (const k in obj) { + s += "," + _stringify(k) + ":" + _stringify(obj[k]); + } + s += "}"; + Number(s); + return s; + } + function extend(level, name, message2, obj) { + const newObj = { + time: individual.fastTime ? Date.now() : new Date().toISOString(), + hostname, + pid, + level, + name + }; + if (message2 !== void 0) { + obj.message = message2; + } + for (const k in obj) { + newObj[k] = obj[k]; + } + return newObj; + } + function levelLogger(level, name) { + const outputs = individual[level]; + const nameSt = _stringify(name); + return function namedLevelLogger(inp, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) { + if (outputs.length === 0) { + return; + } + const out = {}; + let objectOut; + let i = 0; + const l = outputs.length; + let stringified; + let message2; + if (typeof inp === "string" || inp == null) { + if (!(message2 = format(inp, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16))) { + message2 = void 0; + } + } else { + if (inp instanceof Error) { + if (typeof a2 === "object") { + objectToOut(a2, out); + errorToOut(inp, out); + if (!(message2 = format(a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16))) { + message2 = void 0; + } + } else { + errorToOut(inp, out); + if (!(message2 = format(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16))) { + message2 = void 0; + } + } + } else { + if (!(message2 = format(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16))) { + message2 = void 0; + } + } + if (typeof inp === "boolean") { + message2 = String(inp); + } else if (typeof inp === "object" && !(inp instanceof Error)) { + if (inp.method && inp.url && inp.headers && inp.socket) { + requestToOut(inp, out); + } else { + objectToOut(inp, out); + } + } + } + if (l === 1 && !hasObjMode) { + outputs[0].write(Buffer.from(stringify(level, nameSt, message2, out) + "\n")); + return; + } + for (; i < l; i++) { + if (objectMode(outputs[i])) { + if (objectOut === void 0) { + objectOut = extend(level, name, message2, out); + } + outputs[i].write(objectOut); + } else { + if (stringified === void 0) { + stringified = Buffer.from(stringify(level, nameSt, message2, out) + "\n"); + } + outputs[i].write(stringified); + } + } + }; + } + function bole(name) { + function boleLogger(subname) { + return bole(name + ":" + subname); + } + function makeLogger(p, level) { + p[level] = levelLogger(level, name); + return p; + } + return levels.reduce(makeLogger, boleLogger); + } + bole.output = function output(opt) { + let b = false; + if (Array.isArray(opt)) { + opt.forEach(bole.output); + return bole; + } + if (typeof opt.level !== "string") { + throw new TypeError('Must provide a "level" option'); + } + for (const level of levels) { + if (!b && level === opt.level) { + b = true; + } + if (b) { + if (opt.stream && objectMode(opt.stream)) { + hasObjMode = true; + } + individual[level].push(opt.stream); + } + } + return bole; + }; + bole.reset = function reset() { + for (const level of levels) { + individual[level].splice(0, individual[level].length); + } + individual.fastTime = false; + return bole; + }; + bole.setFastTime = function setFastTime(b) { + if (!arguments.length) { + individual.fastTime = true; + } else { + individual.fastTime = b; + } + return bole; + }; + module2.exports = bole; + } +}); + +// ../../node_modules/.pnpm/@pnpm+logger@4.0.0/node_modules/@pnpm/logger/lib/logger.js +var require_logger = __commonJS({ + "../../node_modules/.pnpm/@pnpm+logger@4.0.0/node_modules/@pnpm/logger/lib/logger.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.globalInfo = exports2.globalWarn = void 0; + var bole = require_bole(); + bole.setFastTime(); + exports2.default = bole("pnpm"); + var globalLogger = bole("pnpm:global"); + function globalWarn(message2) { + globalLogger.warn(message2); + } + exports2.globalWarn = globalWarn; + function globalInfo(message2) { + globalLogger.info(message2); + } + exports2.globalInfo = globalInfo; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/stream.js +var require_stream = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/stream.js"(exports2, module2) { + module2.exports = require("stream"); + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/buffer_list.js +var require_buffer_list = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/buffer_list.js"(exports2, module2) { + "use strict"; + function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) + symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } + return keys; + } + function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + if (i % 2) { + ownKeys(Object(source), true).forEach(function(key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + return target; + } + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); + } else { + obj[key] = value; + } + return obj; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) + descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) + _defineProperties(Constructor.prototype, protoProps); + if (staticProps) + _defineProperties(Constructor, staticProps); + return Constructor; + } + var _require = require("buffer"); + var Buffer2 = _require.Buffer; + var _require2 = require("util"); + var inspect = _require2.inspect; + var custom = inspect && inspect.custom || "inspect"; + function copyBuffer(src, target, offset) { + Buffer2.prototype.copy.call(src, target, offset); + } + module2.exports = /* @__PURE__ */ function() { + function BufferList() { + _classCallCheck(this, BufferList); + this.head = null; + this.tail = null; + this.length = 0; + } + _createClass(BufferList, [{ + key: "push", + value: function push(v) { + var entry = { + data: v, + next: null + }; + if (this.length > 0) + this.tail.next = entry; + else + this.head = entry; + this.tail = entry; + ++this.length; + } + }, { + key: "unshift", + value: function unshift(v) { + var entry = { + data: v, + next: this.head + }; + if (this.length === 0) + this.tail = entry; + this.head = entry; + ++this.length; + } + }, { + key: "shift", + value: function shift() { + if (this.length === 0) + return; + var ret = this.head.data; + if (this.length === 1) + this.head = this.tail = null; + else + this.head = this.head.next; + --this.length; + return ret; + } + }, { + key: "clear", + value: function clear() { + this.head = this.tail = null; + this.length = 0; + } + }, { + key: "join", + value: function join(s) { + if (this.length === 0) + return ""; + var p = this.head; + var ret = "" + p.data; + while (p = p.next) { + ret += s + p.data; + } + return ret; + } + }, { + key: "concat", + value: function concat(n) { + if (this.length === 0) + return Buffer2.alloc(0); + var ret = Buffer2.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } + return ret; + } + }, { + key: "consume", + value: function consume(n, hasStrings) { + var ret; + if (n < this.head.data.length) { + ret = this.head.data.slice(0, n); + this.head.data = this.head.data.slice(n); + } else if (n === this.head.data.length) { + ret = this.shift(); + } else { + ret = hasStrings ? this._getString(n) : this._getBuffer(n); + } + return ret; + } + }, { + key: "first", + value: function first() { + return this.head.data; + } + }, { + key: "_getString", + value: function _getString(n) { + var p = this.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) + ret += str; + else + ret += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) + this.head = p.next; + else + this.head = this.tail = null; + } else { + this.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + this.length -= c; + return ret; + } + }, { + key: "_getBuffer", + value: function _getBuffer(n) { + var ret = Buffer2.allocUnsafe(n); + var p = this.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) + this.head = p.next; + else + this.head = this.tail = null; + } else { + this.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + this.length -= c; + return ret; + } + }, { + key: custom, + value: function value(_, options) { + return inspect(this, _objectSpread({}, options, { + depth: 0, + customInspect: false + })); + } + }]); + return BufferList; + }(); + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/destroy.js +var require_destroy = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/destroy.js"(exports2, module2) { + "use strict"; + function destroy(err, cb) { + var _this = this; + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err) { + if (!this._writableState) { + process.nextTick(emitErrorNT, this, err); + } else if (!this._writableState.errorEmitted) { + this._writableState.errorEmitted = true; + process.nextTick(emitErrorNT, this, err); + } + } + return this; + } + if (this._readableState) { + this._readableState.destroyed = true; + } + if (this._writableState) { + this._writableState.destroyed = true; + } + this._destroy(err || null, function(err2) { + if (!cb && err2) { + if (!_this._writableState) { + process.nextTick(emitErrorAndCloseNT, _this, err2); + } else if (!_this._writableState.errorEmitted) { + _this._writableState.errorEmitted = true; + process.nextTick(emitErrorAndCloseNT, _this, err2); + } else { + process.nextTick(emitCloseNT, _this); + } + } else if (cb) { + process.nextTick(emitCloseNT, _this); + cb(err2); + } else { + process.nextTick(emitCloseNT, _this); + } + }); + return this; + } + function emitErrorAndCloseNT(self2, err) { + emitErrorNT(self2, err); + emitCloseNT(self2); + } + function emitCloseNT(self2) { + if (self2._writableState && !self2._writableState.emitClose) + return; + if (self2._readableState && !self2._readableState.emitClose) + return; + self2.emit("close"); + } + function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finalCalled = false; + this._writableState.prefinished = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } + } + function emitErrorNT(self2, err) { + self2.emit("error", err); + } + function errorOrDestroy(stream, err) { + var rState = stream._readableState; + var wState = stream._writableState; + if (rState && rState.autoDestroy || wState && wState.autoDestroy) + stream.destroy(err); + else + stream.emit("error", err); + } + module2.exports = { + destroy, + undestroy, + errorOrDestroy + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/errors.js +var require_errors = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/errors.js"(exports2, module2) { + "use strict"; + var codes = {}; + function createErrorType(code, message2, Base) { + if (!Base) { + Base = Error; + } + function getMessage(arg1, arg2, arg3) { + if (typeof message2 === "string") { + return message2; + } else { + return message2(arg1, arg2, arg3); + } + } + class NodeError extends Base { + constructor(arg1, arg2, arg3) { + super(getMessage(arg1, arg2, arg3)); + } + } + NodeError.prototype.name = Base.name; + NodeError.prototype.code = code; + codes[code] = NodeError; + } + function oneOf(expected, thing) { + if (Array.isArray(expected)) { + const len = expected.length; + expected = expected.map((i) => String(i)); + if (len > 2) { + return `one of ${thing} ${expected.slice(0, len - 1).join(", ")}, or ` + expected[len - 1]; + } else if (len === 2) { + return `one of ${thing} ${expected[0]} or ${expected[1]}`; + } else { + return `of ${thing} ${expected[0]}`; + } + } else { + return `of ${thing} ${String(expected)}`; + } + } + function startsWith(str, search, pos) { + return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; + } + function endsWith(str, search, this_len) { + if (this_len === void 0 || this_len > str.length) { + this_len = str.length; + } + return str.substring(this_len - search.length, this_len) === search; + } + function includes(str, search, start) { + if (typeof start !== "number") { + start = 0; + } + if (start + search.length > str.length) { + return false; + } else { + return str.indexOf(search, start) !== -1; + } + } + createErrorType("ERR_INVALID_OPT_VALUE", function(name, value) { + return 'The value "' + value + '" is invalid for option "' + name + '"'; + }, TypeError); + createErrorType("ERR_INVALID_ARG_TYPE", function(name, expected, actual) { + let determiner; + if (typeof expected === "string" && startsWith(expected, "not ")) { + determiner = "must not be"; + expected = expected.replace(/^not /, ""); + } else { + determiner = "must be"; + } + let msg; + if (endsWith(name, " argument")) { + msg = `The ${name} ${determiner} ${oneOf(expected, "type")}`; + } else { + const type = includes(name, ".") ? "property" : "argument"; + msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, "type")}`; + } + msg += `. Received type ${typeof actual}`; + return msg; + }, TypeError); + createErrorType("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"); + createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(name) { + return "The " + name + " method is not implemented"; + }); + createErrorType("ERR_STREAM_PREMATURE_CLOSE", "Premature close"); + createErrorType("ERR_STREAM_DESTROYED", function(name) { + return "Cannot call " + name + " after a stream was destroyed"; + }); + createErrorType("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"); + createErrorType("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"); + createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end"); + createErrorType("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError); + createErrorType("ERR_UNKNOWN_ENCODING", function(arg) { + return "Unknown encoding: " + arg; + }, TypeError); + createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"); + module2.exports.codes = codes; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/state.js +var require_state2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/state.js"(exports2, module2) { + "use strict"; + var ERR_INVALID_OPT_VALUE = require_errors().codes.ERR_INVALID_OPT_VALUE; + function highWaterMarkFrom(options, isDuplex, duplexKey) { + return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; + } + function getHighWaterMark(state, options, duplexKey, isDuplex) { + var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); + if (hwm != null) { + if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { + var name = isDuplex ? duplexKey : "highWaterMark"; + throw new ERR_INVALID_OPT_VALUE(name, hwm); + } + return Math.floor(hwm); + } + return state.objectMode ? 16 : 16 * 1024; + } + module2.exports = { + getHighWaterMark + }; + } +}); + +// ../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js +var require_inherits_browser = __commonJS({ + "../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(exports2, module2) { + if (typeof Object.create === "function") { + module2.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + } + }; + } else { + module2.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + var TempCtor = function() { + }; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + } + }; + } + } +}); + +// ../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js +var require_inherits = __commonJS({ + "../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js"(exports2, module2) { + try { + util = require("util"); + if (typeof util.inherits !== "function") + throw ""; + module2.exports = util.inherits; + } catch (e) { + module2.exports = require_inherits_browser(); + } + var util; + } +}); + +// ../../node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/node.js +var require_node2 = __commonJS({ + "../../node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/node.js"(exports2, module2) { + module2.exports = require("util").deprecate; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_writable.js +var require_stream_writable = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_writable.js"(exports2, module2) { + "use strict"; + module2.exports = Writable; + function CorkedRequest(state) { + var _this = this; + this.next = null; + this.entry = null; + this.finish = function() { + onCorkedFinish(_this, state); + }; + } + var Duplex; + Writable.WritableState = WritableState; + var internalUtil = { + deprecate: require_node2() + }; + var Stream = require_stream(); + var Buffer2 = require("buffer").Buffer; + var OurUint8Array = global.Uint8Array || function() { + }; + function _uint8ArrayToBuffer(chunk) { + return Buffer2.from(chunk); + } + function _isUint8Array(obj) { + return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; + } + var destroyImpl = require_destroy(); + var _require = require_state2(); + var getHighWaterMark = _require.getHighWaterMark; + var _require$codes = require_errors().codes; + var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE; + var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED; + var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK; + var ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE; + var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; + var ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES; + var ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END; + var ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; + var errorOrDestroy = destroyImpl.errorOrDestroy; + require_inherits()(Writable, Stream); + function nop() { + } + function WritableState(options, stream, isDuplex) { + Duplex = Duplex || require_stream_duplex(); + options = options || {}; + if (typeof isDuplex !== "boolean") + isDuplex = stream instanceof Duplex; + this.objectMode = !!options.objectMode; + if (isDuplex) + this.objectMode = this.objectMode || !!options.writableObjectMode; + this.highWaterMark = getHighWaterMark(this, options, "writableHighWaterMark", isDuplex); + this.finalCalled = false; + this.needDrain = false; + this.ending = false; + this.ended = false; + this.finished = false; + this.destroyed = false; + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + this.defaultEncoding = options.defaultEncoding || "utf8"; + this.length = 0; + this.writing = false; + this.corked = 0; + this.sync = true; + this.bufferProcessing = false; + this.onwrite = function(er) { + onwrite(stream, er); + }; + this.writecb = null; + this.writelen = 0; + this.bufferedRequest = null; + this.lastBufferedRequest = null; + this.pendingcb = 0; + this.prefinished = false; + this.errorEmitted = false; + this.emitClose = options.emitClose !== false; + this.autoDestroy = !!options.autoDestroy; + this.bufferedRequestCount = 0; + this.corkedRequestsFree = new CorkedRequest(this); + } + WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; + }; + (function() { + try { + Object.defineProperty(WritableState.prototype, "buffer", { + get: internalUtil.deprecate(function writableStateBufferGetter() { + return this.getBuffer(); + }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") + }); + } catch (_) { + } + })(); + var realHasInstance; + if (typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function") { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function value(object) { + if (realHasInstance.call(this, object)) + return true; + if (this !== Writable) + return false; + return object && object._writableState instanceof WritableState; + } + }); + } else { + realHasInstance = function realHasInstance2(object) { + return object instanceof this; + }; + } + function Writable(options) { + Duplex = Duplex || require_stream_duplex(); + var isDuplex = this instanceof Duplex; + if (!isDuplex && !realHasInstance.call(Writable, this)) + return new Writable(options); + this._writableState = new WritableState(options, this, isDuplex); + this.writable = true; + if (options) { + if (typeof options.write === "function") + this._write = options.write; + if (typeof options.writev === "function") + this._writev = options.writev; + if (typeof options.destroy === "function") + this._destroy = options.destroy; + if (typeof options.final === "function") + this._final = options.final; + } + Stream.call(this); + } + Writable.prototype.pipe = function() { + errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); + }; + function writeAfterEnd(stream, cb) { + var er = new ERR_STREAM_WRITE_AFTER_END(); + errorOrDestroy(stream, er); + process.nextTick(cb, er); + } + function validChunk(stream, state, chunk, cb) { + var er; + if (chunk === null) { + er = new ERR_STREAM_NULL_VALUES(); + } else if (typeof chunk !== "string" && !state.objectMode) { + er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer"], chunk); + } + if (er) { + errorOrDestroy(stream, er); + process.nextTick(cb, er); + return false; + } + return true; + } + Writable.prototype.write = function(chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + if (isBuf && !Buffer2.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (typeof encoding === "function") { + cb = encoding; + encoding = null; + } + if (isBuf) + encoding = "buffer"; + else if (!encoding) + encoding = state.defaultEncoding; + if (typeof cb !== "function") + cb = nop; + if (state.ending) + writeAfterEnd(this, cb); + else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + return ret; + }; + Writable.prototype.cork = function() { + this._writableState.corked++; + }; + Writable.prototype.uncork = function() { + var state = this._writableState; + if (state.corked) { + state.corked--; + if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) + clearBuffer(this, state); + } + }; + Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + if (typeof encoding === "string") + encoding = encoding.toLowerCase(); + if (!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((encoding + "").toLowerCase()) > -1)) + throw new ERR_UNKNOWN_ENCODING(encoding); + this._writableState.defaultEncoding = encoding; + return this; + }; + Object.defineProperty(Writable.prototype, "writableBuffer", { + enumerable: false, + get: function get() { + return this._writableState && this._writableState.getBuffer(); + } + }); + function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === "string") { + chunk = Buffer2.from(chunk, encoding); + } + return chunk; + } + Object.defineProperty(Writable.prototype, "writableHighWaterMark", { + enumerable: false, + get: function get() { + return this._writableState.highWaterMark; + } + }); + function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = "buffer"; + chunk = newChunk; + } + } + var len = state.objectMode ? 1 : chunk.length; + state.length += len; + var ret = state.length < state.highWaterMark; + if (!ret) + state.needDrain = true; + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk, + encoding, + isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + return ret; + } + function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (state.destroyed) + state.onwrite(new ERR_STREAM_DESTROYED("write")); + else if (writev) + stream._writev(chunk, state.onwrite); + else + stream._write(chunk, encoding, state.onwrite); + state.sync = false; + } + function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + if (sync) { + process.nextTick(cb, er); + process.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + errorOrDestroy(stream, er); + } else { + cb(er); + stream._writableState.errorEmitted = true; + errorOrDestroy(stream, er); + finishMaybe(stream, state); + } + } + function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; + } + function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + if (typeof cb !== "function") + throw new ERR_MULTIPLE_CALLBACK(); + onwriteStateUpdate(state); + if (er) + onwriteError(stream, state, sync, er, cb); + else { + var finished = needFinish(state) || stream.destroyed; + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + if (sync) { + process.nextTick(afterWrite, stream, state, finished, cb); + } else { + afterWrite(stream, state, finished, cb); + } + } + } + function afterWrite(stream, state, finished, cb) { + if (!finished) + onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); + } + function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit("drain"); + } + } + function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + if (stream._writev && entry && entry.next) { + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) + allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + doWrite(stream, state, true, state.length, buffer, "", holder.finish); + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + state.bufferedRequestCount = 0; + } else { + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + if (state.writing) { + break; + } + } + if (entry === null) + state.lastBufferedRequest = null; + } + state.bufferedRequest = entry; + state.bufferProcessing = false; + } + Writable.prototype._write = function(chunk, encoding, cb) { + cb(new ERR_METHOD_NOT_IMPLEMENTED("_write()")); + }; + Writable.prototype._writev = null; + Writable.prototype.end = function(chunk, encoding, cb) { + var state = this._writableState; + if (typeof chunk === "function") { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === "function") { + cb = encoding; + encoding = null; + } + if (chunk !== null && chunk !== void 0) + this.write(chunk, encoding); + if (state.corked) { + state.corked = 1; + this.uncork(); + } + if (!state.ending) + endWritable(this, state, cb); + return this; + }; + Object.defineProperty(Writable.prototype, "writableLength", { + enumerable: false, + get: function get() { + return this._writableState.length; + } + }); + function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; + } + function callFinal(stream, state) { + stream._final(function(err) { + state.pendingcb--; + if (err) { + errorOrDestroy(stream, err); + } + state.prefinished = true; + stream.emit("prefinish"); + finishMaybe(stream, state); + }); + } + function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === "function" && !state.destroyed) { + state.pendingcb++; + state.finalCalled = true; + process.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit("prefinish"); + } + } + } + function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit("finish"); + if (state.autoDestroy) { + var rState = stream._readableState; + if (!rState || rState.autoDestroy && rState.endEmitted) { + stream.destroy(); + } + } + } + } + return need; + } + function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) + process.nextTick(cb); + else + stream.once("finish", cb); + } + state.ended = true; + stream.writable = false; + } + function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + state.corkedRequestsFree.next = corkReq; + } + Object.defineProperty(Writable.prototype, "destroyed", { + enumerable: false, + get: function get() { + if (this._writableState === void 0) { + return false; + } + return this._writableState.destroyed; + }, + set: function set(value) { + if (!this._writableState) { + return; + } + this._writableState.destroyed = value; + } + }); + Writable.prototype.destroy = destroyImpl.destroy; + Writable.prototype._undestroy = destroyImpl.undestroy; + Writable.prototype._destroy = function(err, cb) { + cb(err); + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_duplex.js +var require_stream_duplex = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_duplex.js"(exports2, module2) { + "use strict"; + var objectKeys = Object.keys || function(obj) { + var keys2 = []; + for (var key in obj) { + keys2.push(key); + } + return keys2; + }; + module2.exports = Duplex; + var Readable = require_stream_readable(); + var Writable = require_stream_writable(); + require_inherits()(Duplex, Readable); + { + keys = objectKeys(Writable.prototype); + for (v = 0; v < keys.length; v++) { + method = keys[v]; + if (!Duplex.prototype[method]) + Duplex.prototype[method] = Writable.prototype[method]; + } + } + var keys; + var method; + var v; + function Duplex(options) { + if (!(this instanceof Duplex)) + return new Duplex(options); + Readable.call(this, options); + Writable.call(this, options); + this.allowHalfOpen = true; + if (options) { + if (options.readable === false) + this.readable = false; + if (options.writable === false) + this.writable = false; + if (options.allowHalfOpen === false) { + this.allowHalfOpen = false; + this.once("end", onend); + } + } + } + Object.defineProperty(Duplex.prototype, "writableHighWaterMark", { + enumerable: false, + get: function get() { + return this._writableState.highWaterMark; + } + }); + Object.defineProperty(Duplex.prototype, "writableBuffer", { + enumerable: false, + get: function get() { + return this._writableState && this._writableState.getBuffer(); + } + }); + Object.defineProperty(Duplex.prototype, "writableLength", { + enumerable: false, + get: function get() { + return this._writableState.length; + } + }); + function onend() { + if (this._writableState.ended) + return; + process.nextTick(onEndNT, this); + } + function onEndNT(self2) { + self2.end(); + } + Object.defineProperty(Duplex.prototype, "destroyed", { + enumerable: false, + get: function get() { + if (this._readableState === void 0 || this._writableState === void 0) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function set(value) { + if (this._readableState === void 0 || this._writableState === void 0) { + return; + } + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } + }); + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +var require_end_of_stream = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports2, module2) { + "use strict"; + var ERR_STREAM_PREMATURE_CLOSE = require_errors().codes.ERR_STREAM_PREMATURE_CLOSE; + function once(callback) { + var called = false; + return function() { + if (called) + return; + called = true; + for (var _len = arguments.length, args2 = new Array(_len), _key = 0; _key < _len; _key++) { + args2[_key] = arguments[_key]; + } + callback.apply(this, args2); + }; + } + function noop() { + } + function isRequest(stream) { + return stream.setHeader && typeof stream.abort === "function"; + } + function eos(stream, opts, callback) { + if (typeof opts === "function") + return eos(stream, null, opts); + if (!opts) + opts = {}; + callback = once(callback || noop); + var readable = opts.readable || opts.readable !== false && stream.readable; + var writable = opts.writable || opts.writable !== false && stream.writable; + var onlegacyfinish = function onlegacyfinish2() { + if (!stream.writable) + onfinish(); + }; + var writableEnded = stream._writableState && stream._writableState.finished; + var onfinish = function onfinish2() { + writable = false; + writableEnded = true; + if (!readable) + callback.call(stream); + }; + var readableEnded = stream._readableState && stream._readableState.endEmitted; + var onend = function onend2() { + readable = false; + readableEnded = true; + if (!writable) + callback.call(stream); + }; + var onerror = function onerror2(err) { + callback.call(stream, err); + }; + var onclose = function onclose2() { + var err; + if (readable && !readableEnded) { + if (!stream._readableState || !stream._readableState.ended) + err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); + } + if (writable && !writableEnded) { + if (!stream._writableState || !stream._writableState.ended) + err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); + } + }; + var onrequest = function onrequest2() { + stream.req.on("finish", onfinish); + }; + if (isRequest(stream)) { + stream.on("complete", onfinish); + stream.on("abort", onclose); + if (stream.req) + onrequest(); + else + stream.on("request", onrequest); + } else if (writable && !stream._writableState) { + stream.on("end", onlegacyfinish); + stream.on("close", onlegacyfinish); + } + stream.on("end", onend); + stream.on("finish", onfinish); + if (opts.error !== false) + stream.on("error", onerror); + stream.on("close", onclose); + return function() { + stream.removeListener("complete", onfinish); + stream.removeListener("abort", onclose); + stream.removeListener("request", onrequest); + if (stream.req) + stream.req.removeListener("finish", onfinish); + stream.removeListener("end", onlegacyfinish); + stream.removeListener("close", onlegacyfinish); + stream.removeListener("finish", onfinish); + stream.removeListener("end", onend); + stream.removeListener("error", onerror); + stream.removeListener("close", onclose); + }; + } + module2.exports = eos; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/async_iterator.js +var require_async_iterator = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/async_iterator.js"(exports2, module2) { + "use strict"; + var _Object$setPrototypeO; + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); + } else { + obj[key] = value; + } + return obj; + } + var finished = require_end_of_stream(); + var kLastResolve = Symbol("lastResolve"); + var kLastReject = Symbol("lastReject"); + var kError = Symbol("error"); + var kEnded = Symbol("ended"); + var kLastPromise = Symbol("lastPromise"); + var kHandlePromise = Symbol("handlePromise"); + var kStream = Symbol("stream"); + function createIterResult(value, done) { + return { + value, + done + }; + } + function readAndResolve(iter) { + var resolve = iter[kLastResolve]; + if (resolve !== null) { + var data = iter[kStream].read(); + if (data !== null) { + iter[kLastPromise] = null; + iter[kLastResolve] = null; + iter[kLastReject] = null; + resolve(createIterResult(data, false)); + } + } + } + function onReadable(iter) { + process.nextTick(readAndResolve, iter); + } + function wrapForNext(lastPromise, iter) { + return function(resolve, reject) { + lastPromise.then(function() { + if (iter[kEnded]) { + resolve(createIterResult(void 0, true)); + return; + } + iter[kHandlePromise](resolve, reject); + }, reject); + }; + } + var AsyncIteratorPrototype = Object.getPrototypeOf(function() { + }); + var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { + get stream() { + return this[kStream]; + }, + next: function next() { + var _this = this; + var error = this[kError]; + if (error !== null) { + return Promise.reject(error); + } + if (this[kEnded]) { + return Promise.resolve(createIterResult(void 0, true)); + } + if (this[kStream].destroyed) { + return new Promise(function(resolve, reject) { + process.nextTick(function() { + if (_this[kError]) { + reject(_this[kError]); + } else { + resolve(createIterResult(void 0, true)); + } + }); + }); + } + var lastPromise = this[kLastPromise]; + var promise; + if (lastPromise) { + promise = new Promise(wrapForNext(lastPromise, this)); + } else { + var data = this[kStream].read(); + if (data !== null) { + return Promise.resolve(createIterResult(data, false)); + } + promise = new Promise(this[kHandlePromise]); + } + this[kLastPromise] = promise; + return promise; + } + }, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function() { + return this; + }), _defineProperty(_Object$setPrototypeO, "return", function _return() { + var _this2 = this; + return new Promise(function(resolve, reject) { + _this2[kStream].destroy(null, function(err) { + if (err) { + reject(err); + return; + } + resolve(createIterResult(void 0, true)); + }); + }); + }), _Object$setPrototypeO), AsyncIteratorPrototype); + var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator2(stream) { + var _Object$create; + var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { + value: stream, + writable: true + }), _defineProperty(_Object$create, kLastResolve, { + value: null, + writable: true + }), _defineProperty(_Object$create, kLastReject, { + value: null, + writable: true + }), _defineProperty(_Object$create, kError, { + value: null, + writable: true + }), _defineProperty(_Object$create, kEnded, { + value: stream._readableState.endEmitted, + writable: true + }), _defineProperty(_Object$create, kHandlePromise, { + value: function value(resolve, reject) { + var data = iterator[kStream].read(); + if (data) { + iterator[kLastPromise] = null; + iterator[kLastResolve] = null; + iterator[kLastReject] = null; + resolve(createIterResult(data, false)); + } else { + iterator[kLastResolve] = resolve; + iterator[kLastReject] = reject; + } + }, + writable: true + }), _Object$create)); + iterator[kLastPromise] = null; + finished(stream, function(err) { + if (err && err.code !== "ERR_STREAM_PREMATURE_CLOSE") { + var reject = iterator[kLastReject]; + if (reject !== null) { + iterator[kLastPromise] = null; + iterator[kLastResolve] = null; + iterator[kLastReject] = null; + reject(err); + } + iterator[kError] = err; + return; + } + var resolve = iterator[kLastResolve]; + if (resolve !== null) { + iterator[kLastPromise] = null; + iterator[kLastResolve] = null; + iterator[kLastReject] = null; + resolve(createIterResult(void 0, true)); + } + iterator[kEnded] = true; + }); + stream.on("readable", onReadable.bind(null, iterator)); + return iterator; + }; + module2.exports = createReadableStreamAsyncIterator; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/from.js +var require_from = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/from.js"(exports2, module2) { + "use strict"; + function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); + } + } + function _asyncToGenerator(fn2) { + return function() { + var self2 = this, args2 = arguments; + return new Promise(function(resolve, reject) { + var gen = fn2.apply(self2, args2); + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + } + _next(void 0); + }); + }; + } + function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) + symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } + return keys; + } + function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + if (i % 2) { + ownKeys(Object(source), true).forEach(function(key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + return target; + } + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); + } else { + obj[key] = value; + } + return obj; + } + var ERR_INVALID_ARG_TYPE = require_errors().codes.ERR_INVALID_ARG_TYPE; + function from(Readable, iterable, opts) { + var iterator; + if (iterable && typeof iterable.next === "function") { + iterator = iterable; + } else if (iterable && iterable[Symbol.asyncIterator]) + iterator = iterable[Symbol.asyncIterator](); + else if (iterable && iterable[Symbol.iterator]) + iterator = iterable[Symbol.iterator](); + else + throw new ERR_INVALID_ARG_TYPE("iterable", ["Iterable"], iterable); + var readable = new Readable(_objectSpread({ + objectMode: true + }, opts)); + var reading = false; + readable._read = function() { + if (!reading) { + reading = true; + next(); + } + }; + function next() { + return _next2.apply(this, arguments); + } + function _next2() { + _next2 = _asyncToGenerator(function* () { + try { + var _ref = yield iterator.next(), value = _ref.value, done = _ref.done; + if (done) { + readable.push(null); + } else if (readable.push(yield value)) { + next(); + } else { + reading = false; + } + } catch (err) { + readable.destroy(err); + } + }); + return _next2.apply(this, arguments); + } + return readable; + } + module2.exports = from; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_readable.js +var require_stream_readable = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_readable.js"(exports2, module2) { + "use strict"; + module2.exports = Readable; + var Duplex; + Readable.ReadableState = ReadableState; + var EE = require("events").EventEmitter; + var EElistenerCount = function EElistenerCount2(emitter, type) { + return emitter.listeners(type).length; + }; + var Stream = require_stream(); + var Buffer2 = require("buffer").Buffer; + var OurUint8Array = global.Uint8Array || function() { + }; + function _uint8ArrayToBuffer(chunk) { + return Buffer2.from(chunk); + } + function _isUint8Array(obj) { + return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; + } + var debugUtil = require("util"); + var debug; + if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog("stream"); + } else { + debug = function debug2() { + }; + } + var BufferList = require_buffer_list(); + var destroyImpl = require_destroy(); + var _require = require_state2(); + var getHighWaterMark = _require.getHighWaterMark; + var _require$codes = require_errors().codes; + var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE; + var ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF; + var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED; + var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; + var StringDecoder; + var createReadableStreamAsyncIterator; + var from; + require_inherits()(Readable, Stream); + var errorOrDestroy = destroyImpl.errorOrDestroy; + var kProxyEvents = ["error", "close", "destroy", "pause", "resume"]; + function prependListener(emitter, event, fn2) { + if (typeof emitter.prependListener === "function") + return emitter.prependListener(event, fn2); + if (!emitter._events || !emitter._events[event]) + emitter.on(event, fn2); + else if (Array.isArray(emitter._events[event])) + emitter._events[event].unshift(fn2); + else + emitter._events[event] = [fn2, emitter._events[event]]; + } + function ReadableState(options, stream, isDuplex) { + Duplex = Duplex || require_stream_duplex(); + options = options || {}; + if (typeof isDuplex !== "boolean") + isDuplex = stream instanceof Duplex; + this.objectMode = !!options.objectMode; + if (isDuplex) + this.objectMode = this.objectMode || !!options.readableObjectMode; + this.highWaterMark = getHighWaterMark(this, options, "readableHighWaterMark", isDuplex); + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + this.sync = true; + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + this.paused = true; + this.emitClose = options.emitClose !== false; + this.autoDestroy = !!options.autoDestroy; + this.destroyed = false; + this.defaultEncoding = options.defaultEncoding || "utf8"; + this.awaitDrain = 0; + this.readingMore = false; + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) + StringDecoder = require("string_decoder/").StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } + } + function Readable(options) { + Duplex = Duplex || require_stream_duplex(); + if (!(this instanceof Readable)) + return new Readable(options); + var isDuplex = this instanceof Duplex; + this._readableState = new ReadableState(options, this, isDuplex); + this.readable = true; + if (options) { + if (typeof options.read === "function") + this._read = options.read; + if (typeof options.destroy === "function") + this._destroy = options.destroy; + } + Stream.call(this); + } + Object.defineProperty(Readable.prototype, "destroyed", { + enumerable: false, + get: function get() { + if (this._readableState === void 0) { + return false; + } + return this._readableState.destroyed; + }, + set: function set(value) { + if (!this._readableState) { + return; + } + this._readableState.destroyed = value; + } + }); + Readable.prototype.destroy = destroyImpl.destroy; + Readable.prototype._undestroy = destroyImpl.undestroy; + Readable.prototype._destroy = function(err, cb) { + cb(err); + }; + Readable.prototype.push = function(chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + if (!state.objectMode) { + if (typeof chunk === "string") { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer2.from(chunk, encoding); + encoding = ""; + } + skipChunkCheck = true; + } + } else { + skipChunkCheck = true; + } + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); + }; + Readable.prototype.unshift = function(chunk) { + return readableAddChunk(this, chunk, null, true, false); + }; + function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + debug("readableAddChunk", chunk); + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) + er = chunkInvalid(state, chunk); + if (er) { + errorOrDestroy(stream, er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== "string" && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer2.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (addToFront) { + if (state.endEmitted) + errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT()); + else + addChunk(stream, state, chunk, true); + } else if (state.ended) { + errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); + } else if (state.destroyed) { + return false; + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) + addChunk(stream, state, chunk, false); + else + maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); + } + } + } else if (!addToFront) { + state.reading = false; + maybeReadMore(stream, state); + } + } + return !state.ended && (state.length < state.highWaterMark || state.length === 0); + } + function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + state.awaitDrain = 0; + stream.emit("data", chunk); + } else { + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) + state.buffer.unshift(chunk); + else + state.buffer.push(chunk); + if (state.needReadable) + emitReadable(stream); + } + maybeReadMore(stream, state); + } + function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) { + er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer", "Uint8Array"], chunk); + } + return er; + } + Readable.prototype.isPaused = function() { + return this._readableState.flowing === false; + }; + Readable.prototype.setEncoding = function(enc) { + if (!StringDecoder) + StringDecoder = require("string_decoder/").StringDecoder; + var decoder = new StringDecoder(enc); + this._readableState.decoder = decoder; + this._readableState.encoding = this._readableState.decoder.encoding; + var p = this._readableState.buffer.head; + var content = ""; + while (p !== null) { + content += decoder.write(p.data); + p = p.next; + } + this._readableState.buffer.clear(); + if (content !== "") + this._readableState.buffer.push(content); + this._readableState.length = content.length; + return this; + }; + var MAX_HWM = 1073741824; + function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; + } + function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) + return 0; + if (state.objectMode) + return 1; + if (n !== n) { + if (state.flowing && state.length) + return state.buffer.head.data.length; + else + return state.length; + } + if (n > state.highWaterMark) + state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) + return n; + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; + } + Readable.prototype.read = function(n) { + debug("read", n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + if (n !== 0) + state.emittedReadable = false; + if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { + debug("read: emitReadable", state.length, state.ended); + if (state.length === 0 && state.ended) + endReadable(this); + else + emitReadable(this); + return null; + } + n = howMuchToRead(n, state); + if (n === 0 && state.ended) { + if (state.length === 0) + endReadable(this); + return null; + } + var doRead = state.needReadable; + debug("need readable", doRead); + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug("length less than watermark", doRead); + } + if (state.ended || state.reading) { + doRead = false; + debug("reading or ended", doRead); + } else if (doRead) { + debug("do read"); + state.reading = true; + state.sync = true; + if (state.length === 0) + state.needReadable = true; + this._read(state.highWaterMark); + state.sync = false; + if (!state.reading) + n = howMuchToRead(nOrig, state); + } + var ret; + if (n > 0) + ret = fromList(n, state); + else + ret = null; + if (ret === null) { + state.needReadable = state.length <= state.highWaterMark; + n = 0; + } else { + state.length -= n; + state.awaitDrain = 0; + } + if (state.length === 0) { + if (!state.ended) + state.needReadable = true; + if (nOrig !== n && state.ended) + endReadable(this); + } + if (ret !== null) + this.emit("data", ret); + return ret; + }; + function onEofChunk(stream, state) { + debug("onEofChunk"); + if (state.ended) + return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + if (state.sync) { + emitReadable(stream); + } else { + state.needReadable = false; + if (!state.emittedReadable) { + state.emittedReadable = true; + emitReadable_(stream); + } + } + } + function emitReadable(stream) { + var state = stream._readableState; + debug("emitReadable", state.needReadable, state.emittedReadable); + state.needReadable = false; + if (!state.emittedReadable) { + debug("emitReadable", state.flowing); + state.emittedReadable = true; + process.nextTick(emitReadable_, stream); + } + } + function emitReadable_(stream) { + var state = stream._readableState; + debug("emitReadable_", state.destroyed, state.length, state.ended); + if (!state.destroyed && (state.length || state.ended)) { + stream.emit("readable"); + state.emittedReadable = false; + } + state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; + flow(stream); + } + function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + process.nextTick(maybeReadMore_, stream, state); + } + } + function maybeReadMore_(stream, state) { + while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { + var len = state.length; + debug("maybeReadMore read 0"); + stream.read(0); + if (len === state.length) + break; + } + state.readingMore = false; + } + Readable.prototype._read = function(n) { + errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED("_read()")); + }; + Readable.prototype.pipe = function(dest, pipeOpts) { + var src = this; + var state = this._readableState; + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug("pipe count=%d opts=%j", state.pipesCount, pipeOpts); + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) + process.nextTick(endFn); + else + src.once("end", endFn); + dest.on("unpipe", onunpipe); + function onunpipe(readable, unpipeInfo) { + debug("onunpipe"); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } + } + } + function onend() { + debug("onend"); + dest.end(); + } + var ondrain = pipeOnDrain(src); + dest.on("drain", ondrain); + var cleanedUp = false; + function cleanup() { + debug("cleanup"); + dest.removeListener("close", onclose); + dest.removeListener("finish", onfinish); + dest.removeListener("drain", ondrain); + dest.removeListener("error", onerror); + dest.removeListener("unpipe", onunpipe); + src.removeListener("end", onend); + src.removeListener("end", unpipe); + src.removeListener("data", ondata); + cleanedUp = true; + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) + ondrain(); + } + src.on("data", ondata); + function ondata(chunk) { + debug("ondata"); + var ret = dest.write(chunk); + debug("dest.write", ret); + if (ret === false) { + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug("false write response, pause", state.awaitDrain); + state.awaitDrain++; + } + src.pause(); + } + } + function onerror(er) { + debug("onerror", er); + unpipe(); + dest.removeListener("error", onerror); + if (EElistenerCount(dest, "error") === 0) + errorOrDestroy(dest, er); + } + prependListener(dest, "error", onerror); + function onclose() { + dest.removeListener("finish", onfinish); + unpipe(); + } + dest.once("close", onclose); + function onfinish() { + debug("onfinish"); + dest.removeListener("close", onclose); + unpipe(); + } + dest.once("finish", onfinish); + function unpipe() { + debug("unpipe"); + src.unpipe(dest); + } + dest.emit("pipe", src); + if (!state.flowing) { + debug("pipe resume"); + src.resume(); + } + return dest; + }; + function pipeOnDrain(src) { + return function pipeOnDrainFunctionResult() { + var state = src._readableState; + debug("pipeOnDrain", state.awaitDrain); + if (state.awaitDrain) + state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, "data")) { + state.flowing = true; + flow(src); + } + }; + } + Readable.prototype.unpipe = function(dest) { + var state = this._readableState; + var unpipeInfo = { + hasUnpiped: false + }; + if (state.pipesCount === 0) + return this; + if (state.pipesCount === 1) { + if (dest && dest !== state.pipes) + return this; + if (!dest) + dest = state.pipes; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) + dest.emit("unpipe", this, unpipeInfo); + return this; + } + if (!dest) { + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + for (var i = 0; i < len; i++) { + dests[i].emit("unpipe", this, { + hasUnpiped: false + }); + } + return this; + } + var index = indexOf(state.pipes, dest); + if (index === -1) + return this; + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) + state.pipes = state.pipes[0]; + dest.emit("unpipe", this, unpipeInfo); + return this; + }; + Readable.prototype.on = function(ev, fn2) { + var res = Stream.prototype.on.call(this, ev, fn2); + var state = this._readableState; + if (ev === "data") { + state.readableListening = this.listenerCount("readable") > 0; + if (state.flowing !== false) + this.resume(); + } else if (ev === "readable") { + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.flowing = false; + state.emittedReadable = false; + debug("on readable", state.length, state.reading); + if (state.length) { + emitReadable(this); + } else if (!state.reading) { + process.nextTick(nReadingNextTick, this); + } + } + } + return res; + }; + Readable.prototype.addListener = Readable.prototype.on; + Readable.prototype.removeListener = function(ev, fn2) { + var res = Stream.prototype.removeListener.call(this, ev, fn2); + if (ev === "readable") { + process.nextTick(updateReadableListening, this); + } + return res; + }; + Readable.prototype.removeAllListeners = function(ev) { + var res = Stream.prototype.removeAllListeners.apply(this, arguments); + if (ev === "readable" || ev === void 0) { + process.nextTick(updateReadableListening, this); + } + return res; + }; + function updateReadableListening(self2) { + var state = self2._readableState; + state.readableListening = self2.listenerCount("readable") > 0; + if (state.resumeScheduled && !state.paused) { + state.flowing = true; + } else if (self2.listenerCount("data") > 0) { + self2.resume(); + } + } + function nReadingNextTick(self2) { + debug("readable nexttick read 0"); + self2.read(0); + } + Readable.prototype.resume = function() { + var state = this._readableState; + if (!state.flowing) { + debug("resume"); + state.flowing = !state.readableListening; + resume(this, state); + } + state.paused = false; + return this; + }; + function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + process.nextTick(resume_, stream, state); + } + } + function resume_(stream, state) { + debug("resume", state.reading); + if (!state.reading) { + stream.read(0); + } + state.resumeScheduled = false; + stream.emit("resume"); + flow(stream); + if (state.flowing && !state.reading) + stream.read(0); + } + Readable.prototype.pause = function() { + debug("call pause flowing=%j", this._readableState.flowing); + if (this._readableState.flowing !== false) { + debug("pause"); + this._readableState.flowing = false; + this.emit("pause"); + } + this._readableState.paused = true; + return this; + }; + function flow(stream) { + var state = stream._readableState; + debug("flow", state.flowing); + while (state.flowing && stream.read() !== null) { + ; + } + } + Readable.prototype.wrap = function(stream) { + var _this = this; + var state = this._readableState; + var paused = false; + stream.on("end", function() { + debug("wrapped end"); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) + _this.push(chunk); + } + _this.push(null); + }); + stream.on("data", function(chunk) { + debug("wrapped data"); + if (state.decoder) + chunk = state.decoder.write(chunk); + if (state.objectMode && (chunk === null || chunk === void 0)) + return; + else if (!state.objectMode && (!chunk || !chunk.length)) + return; + var ret = _this.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + for (var i in stream) { + if (this[i] === void 0 && typeof stream[i] === "function") { + this[i] = function methodWrap(method) { + return function methodWrapReturnFunction() { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } + this._read = function(n2) { + debug("wrapped _read", n2); + if (paused) { + paused = false; + stream.resume(); + } + }; + return this; + }; + if (typeof Symbol === "function") { + Readable.prototype[Symbol.asyncIterator] = function() { + if (createReadableStreamAsyncIterator === void 0) { + createReadableStreamAsyncIterator = require_async_iterator(); + } + return createReadableStreamAsyncIterator(this); + }; + } + Object.defineProperty(Readable.prototype, "readableHighWaterMark", { + enumerable: false, + get: function get() { + return this._readableState.highWaterMark; + } + }); + Object.defineProperty(Readable.prototype, "readableBuffer", { + enumerable: false, + get: function get() { + return this._readableState && this._readableState.buffer; + } + }); + Object.defineProperty(Readable.prototype, "readableFlowing", { + enumerable: false, + get: function get() { + return this._readableState.flowing; + }, + set: function set(state) { + if (this._readableState) { + this._readableState.flowing = state; + } + } + }); + Readable._fromList = fromList; + Object.defineProperty(Readable.prototype, "readableLength", { + enumerable: false, + get: function get() { + return this._readableState.length; + } + }); + function fromList(n, state) { + if (state.length === 0) + return null; + var ret; + if (state.objectMode) + ret = state.buffer.shift(); + else if (!n || n >= state.length) { + if (state.decoder) + ret = state.buffer.join(""); + else if (state.buffer.length === 1) + ret = state.buffer.first(); + else + ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + ret = state.buffer.consume(n, state.decoder); + } + return ret; + } + function endReadable(stream) { + var state = stream._readableState; + debug("endReadable", state.endEmitted); + if (!state.endEmitted) { + state.ended = true; + process.nextTick(endReadableNT, state, stream); + } + } + function endReadableNT(state, stream) { + debug("endReadableNT", state.endEmitted, state.length); + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit("end"); + if (state.autoDestroy) { + var wState = stream._writableState; + if (!wState || wState.autoDestroy && wState.finished) { + stream.destroy(); + } + } + } + } + if (typeof Symbol === "function") { + Readable.from = function(iterable, opts) { + if (from === void 0) { + from = require_from(); + } + return from(Readable, iterable, opts); + }; + } + function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) + return i; + } + return -1; + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_transform.js +var require_stream_transform = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_transform.js"(exports2, module2) { + "use strict"; + module2.exports = Transform; + var _require$codes = require_errors().codes; + var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED; + var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK; + var ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING; + var ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; + var Duplex = require_stream_duplex(); + require_inherits()(Transform, Duplex); + function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + var cb = ts.writecb; + if (cb === null) { + return this.emit("error", new ERR_MULTIPLE_CALLBACK()); + } + ts.writechunk = null; + ts.writecb = null; + if (data != null) + this.push(data); + cb(er); + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } + } + function Transform(options) { + if (!(this instanceof Transform)) + return new Transform(options); + Duplex.call(this, options); + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; + this._readableState.needReadable = true; + this._readableState.sync = false; + if (options) { + if (typeof options.transform === "function") + this._transform = options.transform; + if (typeof options.flush === "function") + this._flush = options.flush; + } + this.on("prefinish", prefinish); + } + function prefinish() { + var _this = this; + if (typeof this._flush === "function" && !this._readableState.destroyed) { + this._flush(function(er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } + } + Transform.prototype.push = function(chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); + }; + Transform.prototype._transform = function(chunk, encoding, cb) { + cb(new ERR_METHOD_NOT_IMPLEMENTED("_transform()")); + }; + Transform.prototype._write = function(chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) + this._read(rs.highWaterMark); + } + }; + Transform.prototype._read = function(n) { + var ts = this._transformState; + if (ts.writechunk !== null && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + ts.needTransform = true; + } + }; + Transform.prototype._destroy = function(err, cb) { + Duplex.prototype._destroy.call(this, err, function(err2) { + cb(err2); + }); + }; + function done(stream, er, data) { + if (er) + return stream.emit("error", er); + if (data != null) + stream.push(data); + if (stream._writableState.length) + throw new ERR_TRANSFORM_WITH_LENGTH_0(); + if (stream._transformState.transforming) + throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); + return stream.push(null); + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_passthrough.js +var require_stream_passthrough = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_passthrough.js"(exports2, module2) { + "use strict"; + module2.exports = PassThrough; + var Transform = require_stream_transform(); + require_inherits()(PassThrough, Transform); + function PassThrough(options) { + if (!(this instanceof PassThrough)) + return new PassThrough(options); + Transform.call(this, options); + } + PassThrough.prototype._transform = function(chunk, encoding, cb) { + cb(null, chunk); + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/pipeline.js +var require_pipeline = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports2, module2) { + "use strict"; + var eos; + function once(callback) { + var called = false; + return function() { + if (called) + return; + called = true; + callback.apply(void 0, arguments); + }; + } + var _require$codes = require_errors().codes; + var ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS; + var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; + function noop(err) { + if (err) + throw err; + } + function isRequest(stream) { + return stream.setHeader && typeof stream.abort === "function"; + } + function destroyer(stream, reading, writing, callback) { + callback = once(callback); + var closed = false; + stream.on("close", function() { + closed = true; + }); + if (eos === void 0) + eos = require_end_of_stream(); + eos(stream, { + readable: reading, + writable: writing + }, function(err) { + if (err) + return callback(err); + closed = true; + callback(); + }); + var destroyed = false; + return function(err) { + if (closed) + return; + if (destroyed) + return; + destroyed = true; + if (isRequest(stream)) + return stream.abort(); + if (typeof stream.destroy === "function") + return stream.destroy(); + callback(err || new ERR_STREAM_DESTROYED("pipe")); + }; + } + function call(fn2) { + fn2(); + } + function pipe(from, to) { + return from.pipe(to); + } + function popCallback(streams) { + if (!streams.length) + return noop; + if (typeof streams[streams.length - 1] !== "function") + return noop; + return streams.pop(); + } + function pipeline() { + for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { + streams[_key] = arguments[_key]; + } + var callback = popCallback(streams); + if (Array.isArray(streams[0])) + streams = streams[0]; + if (streams.length < 2) { + throw new ERR_MISSING_ARGS("streams"); + } + var error; + var destroys = streams.map(function(stream, i) { + var reading = i < streams.length - 1; + var writing = i > 0; + return destroyer(stream, reading, writing, function(err) { + if (!error) + error = err; + if (err) + destroys.forEach(call); + if (reading) + return; + destroys.forEach(call); + callback(error); + }); + }); + return streams.reduce(pipe); + } + module2.exports = pipeline; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/readable.js +var require_readable = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/readable.js"(exports2, module2) { + var Stream = require("stream"); + if (process.env.READABLE_STREAM === "disable" && Stream) { + module2.exports = Stream.Readable; + Object.assign(module2.exports, Stream); + module2.exports.Stream = Stream; + } else { + exports2 = module2.exports = require_stream_readable(); + exports2.Stream = Stream || exports2; + exports2.Readable = exports2; + exports2.Writable = require_stream_writable(); + exports2.Duplex = require_stream_duplex(); + exports2.Transform = require_stream_transform(); + exports2.PassThrough = require_stream_passthrough(); + exports2.finished = require_end_of_stream(); + exports2.pipeline = require_pipeline(); + } + } +}); + +// ../../node_modules/.pnpm/through2@4.0.2/node_modules/through2/through2.js +var require_through2 = __commonJS({ + "../../node_modules/.pnpm/through2@4.0.2/node_modules/through2/through2.js"(exports2, module2) { + var { Transform } = require_readable(); + function inherits(fn2, sup) { + fn2.super_ = sup; + fn2.prototype = Object.create(sup.prototype, { + constructor: { value: fn2, enumerable: false, writable: true, configurable: true } + }); + } + function through2(construct) { + return (options, transform, flush) => { + if (typeof options === "function") { + flush = transform; + transform = options; + options = {}; + } + if (typeof transform !== "function") { + transform = (chunk, enc, cb) => cb(null, chunk); + } + if (typeof flush !== "function") { + flush = null; + } + return construct(options, transform, flush); + }; + } + var make = through2((options, transform, flush) => { + const t2 = new Transform(options); + t2._transform = transform; + if (flush) { + t2._flush = flush; + } + return t2; + }); + var ctor = through2((options, transform, flush) => { + function Through2(override) { + if (!(this instanceof Through2)) { + return new Through2(override); + } + this.options = Object.assign({}, options, override); + Transform.call(this, this.options); + this._transform = transform; + if (flush) { + this._flush = flush; + } + } + inherits(Through2, Transform); + return Through2; + }); + var obj = through2(function(options, transform, flush) { + const t2 = new Transform(Object.assign({ objectMode: true, highWaterMark: 16 }, options)); + t2._transform = transform; + if (flush) { + t2._flush = flush; + } + return t2; + }); + module2.exports = make; + module2.exports.ctor = ctor; + module2.exports.obj = obj; + } +}); + +// ../../node_modules/.pnpm/split2@3.2.2/node_modules/split2/index.js +var require_split2 = __commonJS({ + "../../node_modules/.pnpm/split2@3.2.2/node_modules/split2/index.js"(exports2, module2) { + "use strict"; + var { Transform } = require_readable(); + var { StringDecoder } = require("string_decoder"); + var kLast = Symbol("last"); + var kDecoder = Symbol("decoder"); + function transform(chunk, enc, cb) { + var list; + if (this.overflow) { + var buf = this[kDecoder].write(chunk); + list = buf.split(this.matcher); + if (list.length === 1) + return cb(); + list.shift(); + this.overflow = false; + } else { + this[kLast] += this[kDecoder].write(chunk); + list = this[kLast].split(this.matcher); + } + this[kLast] = list.pop(); + for (var i = 0; i < list.length; i++) { + try { + push(this, this.mapper(list[i])); + } catch (error) { + return cb(error); + } + } + this.overflow = this[kLast].length > this.maxLength; + if (this.overflow && !this.skipOverflow) + return cb(new Error("maximum buffer reached")); + cb(); + } + function flush(cb) { + this[kLast] += this[kDecoder].end(); + if (this[kLast]) { + try { + push(this, this.mapper(this[kLast])); + } catch (error) { + return cb(error); + } + } + cb(); + } + function push(self2, val) { + if (val !== void 0) { + self2.push(val); + } + } + function noop(incoming) { + return incoming; + } + function split(matcher, mapper, options) { + matcher = matcher || /\r?\n/; + mapper = mapper || noop; + options = options || {}; + switch (arguments.length) { + case 1: + if (typeof matcher === "function") { + mapper = matcher; + matcher = /\r?\n/; + } else if (typeof matcher === "object" && !(matcher instanceof RegExp)) { + options = matcher; + matcher = /\r?\n/; + } + break; + case 2: + if (typeof matcher === "function") { + options = mapper; + mapper = matcher; + matcher = /\r?\n/; + } else if (typeof mapper === "object") { + options = mapper; + mapper = noop; + } + } + options = Object.assign({}, options); + options.transform = transform; + options.flush = flush; + options.readableObjectMode = true; + const stream = new Transform(options); + stream[kLast] = ""; + stream[kDecoder] = new StringDecoder("utf8"); + stream.matcher = matcher; + stream.mapper = mapper; + stream.maxLength = options.maxLength; + stream.skipOverflow = options.skipOverflow; + stream.overflow = false; + return stream; + } + module2.exports = split; + } +}); + +// ../../node_modules/.pnpm/json-stringify-safe@5.0.1/node_modules/json-stringify-safe/stringify.js +var require_stringify = __commonJS({ + "../../node_modules/.pnpm/json-stringify-safe@5.0.1/node_modules/json-stringify-safe/stringify.js"(exports2, module2) { + exports2 = module2.exports = stringify; + exports2.getSerialize = serializer; + function stringify(obj, replacer, spaces, cycleReplacer) { + return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces); + } + function serializer(replacer, cycleReplacer) { + var stack2 = [], keys = []; + if (cycleReplacer == null) + cycleReplacer = function(key, value) { + if (stack2[0] === value) + return "[Circular ~]"; + return "[Circular ~." + keys.slice(0, stack2.indexOf(value)).join(".") + "]"; + }; + return function(key, value) { + if (stack2.length > 0) { + var thisPos = stack2.indexOf(this); + ~thisPos ? stack2.splice(thisPos + 1) : stack2.push(this); + ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key); + if (~stack2.indexOf(value)) + value = cycleReplacer.call(this, key, value); + } else + stack2.push(value); + return replacer == null ? value : replacer.call(this, key, value); + }; + } + } +}); + +// ../../node_modules/.pnpm/ndjson@2.0.0/node_modules/ndjson/index.js +var require_ndjson = __commonJS({ + "../../node_modules/.pnpm/ndjson@2.0.0/node_modules/ndjson/index.js"(exports2, module2) { + var through = require_through2(); + var split = require_split2(); + var { EOL } = require("os"); + var stringify = require_stringify(); + module2.exports.stringify = (opts) => through.obj(opts, (obj, _, cb) => { + cb(null, stringify(obj) + EOL); + }); + module2.exports.parse = (opts) => { + opts = opts || {}; + opts.strict = opts.strict !== false; + function parseRow(row) { + try { + if (row) + return JSON.parse(row); + } catch (e) { + if (opts.strict) { + this.emit("error", new Error("Could not parse row " + row.slice(0, 50) + "...")); + } + } + } + return split(parseRow, opts); + }; + } +}); + +// ../../node_modules/.pnpm/@pnpm+logger@4.0.0/node_modules/@pnpm/logger/lib/streamParser.js +var require_streamParser = __commonJS({ + "../../node_modules/.pnpm/@pnpm+logger@4.0.0/node_modules/@pnpm/logger/lib/streamParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createStreamParser = void 0; + var bole = require_bole(); + var ndjson = require_ndjson(); + exports2.default = createStreamParser(); + function createStreamParser() { + const sp = ndjson.parse(); + bole.output([ + { + level: "debug", + stream: sp + } + ]); + return sp; + } + exports2.createStreamParser = createStreamParser; + } +}); + +// ../../node_modules/.pnpm/@pnpm+logger@4.0.0/node_modules/@pnpm/logger/lib/writeToConsole.js +var require_writeToConsole = __commonJS({ + "../../node_modules/.pnpm/@pnpm+logger@4.0.0/node_modules/@pnpm/logger/lib/writeToConsole.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var bole = require_bole(); + function default_1() { + bole.output([ + { + level: "debug", + stream: process.stdout + } + ]); + } + exports2.default = default_1; + } +}); + +// ../../node_modules/.pnpm/@pnpm+logger@4.0.0/node_modules/@pnpm/logger/lib/index.js +var require_lib6 = __commonJS({ + "../../node_modules/.pnpm/@pnpm+logger@4.0.0/node_modules/@pnpm/logger/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.writeToConsole = exports2.createStreamParser = exports2.streamParser = exports2.globalWarn = exports2.globalInfo = void 0; + var logger_1 = require_logger(); + Object.defineProperty(exports2, "globalInfo", { enumerable: true, get: function() { + return logger_1.globalInfo; + } }); + Object.defineProperty(exports2, "globalWarn", { enumerable: true, get: function() { + return logger_1.globalWarn; + } }); + var streamParser_1 = require_streamParser(); + exports2.streamParser = streamParser_1.default; + Object.defineProperty(exports2, "createStreamParser", { enumerable: true, get: function() { + return streamParser_1.createStreamParser; + } }); + var writeToConsole_1 = require_writeToConsole(); + exports2.writeToConsole = writeToConsole_1.default; + exports2.default = logger_1.default; + } +}); + +// lib/err.js +var require_err = __commonJS({ + "lib/err.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var logger_1 = __importDefault(require_lib6()); + function err(error) { + if (!global["reporterInitialized"]) { + console.log(error); + process.exit(1); + } + if (global["reporterInitialized"] === "silent") { + process.exit(1); + } + if (error.name != null && error.name !== "pnpm" && !error.name.startsWith("pnpm:")) { + error.name = "pnpm"; + } + logger_1.default.error(error, error); + setTimeout(() => process.exit(1), 0); + } + exports2.default = err; + } +}); + +// ../../node_modules/.pnpm/signal-exit@3.0.4/node_modules/signal-exit/signals.js +var require_signals = __commonJS({ + "../../node_modules/.pnpm/signal-exit@3.0.4/node_modules/signal-exit/signals.js"(exports2, module2) { + module2.exports = [ + "SIGABRT", + "SIGALRM", + "SIGHUP", + "SIGINT", + "SIGTERM" + ]; + if (process.platform !== "win32") { + module2.exports.push("SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT"); + } + if (process.platform === "linux") { + module2.exports.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT", "SIGUNUSED"); + } + } +}); + +// ../../node_modules/.pnpm/signal-exit@3.0.4/node_modules/signal-exit/index.js +var require_signal_exit = __commonJS({ + "../../node_modules/.pnpm/signal-exit@3.0.4/node_modules/signal-exit/index.js"(exports2, module2) { + var process2 = global.process; + if (typeof process2 !== "object" || !process2) { + module2.exports = () => { + }; + } else { + assert = require("assert"); + signals = require_signals(); + isWin = /^win/i.test(process2.platform); + EE = require("events"); + if (typeof EE !== "function") { + EE = EE.EventEmitter; + } + if (process2.__signal_exit_emitter__) { + emitter = process2.__signal_exit_emitter__; + } else { + emitter = process2.__signal_exit_emitter__ = new EE(); + emitter.count = 0; + emitter.emitted = {}; + } + if (!emitter.infinite) { + emitter.setMaxListeners(Infinity); + emitter.infinite = true; + } + module2.exports = function(cb, opts) { + if (global.process !== process2) { + return; + } + assert.equal(typeof cb, "function", "a callback must be provided for exit handler"); + if (loaded === false) { + load(); + } + var ev = "exit"; + if (opts && opts.alwaysLast) { + ev = "afterexit"; + } + var remove = function() { + emitter.removeListener(ev, cb); + if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) { + unload(); + } + }; + emitter.on(ev, cb); + return remove; + }; + unload = function unload2() { + if (!loaded || global.process !== process2) { + return; + } + loaded = false; + signals.forEach(function(sig) { + try { + process2.removeListener(sig, sigListeners[sig]); + } catch (er) { + } + }); + process2.emit = originalProcessEmit; + process2.reallyExit = originalProcessReallyExit; + emitter.count -= 1; + }; + module2.exports.unload = unload; + emit = function emit2(event, code, signal) { + if (emitter.emitted[event]) { + return; + } + emitter.emitted[event] = true; + emitter.emit(event, code, signal); + }; + sigListeners = {}; + signals.forEach(function(sig) { + sigListeners[sig] = function listener() { + if (process2 !== global.process) { + return; + } + var listeners = process2.listeners(sig); + if (listeners.length === emitter.count) { + unload(); + emit("exit", null, sig); + emit("afterexit", null, sig); + if (isWin && sig === "SIGHUP") { + sig = "SIGINT"; + } + process2.kill(process2.pid, sig); + } + }; + }); + module2.exports.signals = function() { + return signals; + }; + loaded = false; + load = function load2() { + if (loaded || process2 !== global.process) { + return; + } + loaded = true; + emitter.count += 1; + signals = signals.filter(function(sig) { + try { + process2.on(sig, sigListeners[sig]); + return true; + } catch (er) { + return false; + } + }); + process2.emit = processEmit; + process2.reallyExit = processReallyExit; + }; + module2.exports.load = load; + originalProcessReallyExit = process2.reallyExit; + processReallyExit = function processReallyExit2(code) { + if (process2 !== global.process) { + return; + } + process2.exitCode = code || 0; + emit("exit", process2.exitCode, null); + emit("afterexit", process2.exitCode, null); + originalProcessReallyExit.call(process2, process2.exitCode); + }; + originalProcessEmit = process2.emit; + processEmit = function processEmit2(ev, arg) { + if (ev === "exit" && process2 === global.process) { + if (arg !== void 0) { + process2.exitCode = arg; + } + var ret = originalProcessEmit.apply(this, arguments); + emit("exit", process2.exitCode, null); + emit("afterexit", process2.exitCode, null); + return ret; + } else { + return originalProcessEmit.apply(this, arguments); + } + }; + } + var assert; + var signals; + var isWin; + var EE; + var emitter; + var unload; + var emit; + var sigListeners; + var loaded; + var load; + var originalProcessReallyExit; + var processReallyExit; + var originalProcessEmit; + var processEmit; + } +}); + +// ../../node_modules/.pnpm/array-find-index@1.0.2/node_modules/array-find-index/index.js +var require_array_find_index = __commonJS({ + "../../node_modules/.pnpm/array-find-index@1.0.2/node_modules/array-find-index/index.js"(exports2, module2) { + "use strict"; + module2.exports = function(arr, predicate, ctx) { + if (typeof Array.prototype.findIndex === "function") { + return arr.findIndex(predicate, ctx); + } + if (typeof predicate !== "function") { + throw new TypeError("predicate must be a function"); + } + var list = Object(arr); + var len = list.length; + if (len === 0) { + return -1; + } + for (var i = 0; i < len; i++) { + if (predicate.call(ctx, list[i], i, list)) { + return i; + } + } + return -1; + }; + } +}); + +// ../../node_modules/.pnpm/currently-unhandled@0.4.1/node_modules/currently-unhandled/core.js +var require_core = __commonJS({ + "../../node_modules/.pnpm/currently-unhandled@0.4.1/node_modules/currently-unhandled/core.js"(exports2, module2) { + "use strict"; + var arrayFindIndex = require_array_find_index(); + module2.exports = function() { + var unhandledRejections = []; + function onUnhandledRejection(reason, promise) { + unhandledRejections.push({ reason, promise }); + } + function onRejectionHandled(promise) { + var index = arrayFindIndex(unhandledRejections, function(x) { + return x.promise === promise; + }); + unhandledRejections.splice(index, 1); + } + function currentlyUnhandled() { + return unhandledRejections.map(function(entry) { + return { + reason: entry.reason, + promise: entry.promise + }; + }); + } + return { + onUnhandledRejection, + onRejectionHandled, + currentlyUnhandled + }; + }; + } +}); + +// ../../node_modules/.pnpm/currently-unhandled@0.4.1/node_modules/currently-unhandled/index.js +var require_currently_unhandled = __commonJS({ + "../../node_modules/.pnpm/currently-unhandled@0.4.1/node_modules/currently-unhandled/index.js"(exports2, module2) { + "use strict"; + var core = require_core(); + module2.exports = function(p) { + p = p || process; + var c = core(); + p.on("unhandledRejection", c.onUnhandledRejection); + p.on("rejectionHandled", c.onRejectionHandled); + return c.currentlyUnhandled; + }; + } +}); + +// ../../node_modules/.pnpm/loud-rejection@2.2.0/node_modules/loud-rejection/index.js +var require_loud_rejection = __commonJS({ + "../../node_modules/.pnpm/loud-rejection@2.2.0/node_modules/loud-rejection/index.js"(exports2, module2) { + "use strict"; + var util = require("util"); + var onExit = require_signal_exit(); + var currentlyUnhandled = require_currently_unhandled(); + var installed = false; + var loudRejection = (log2 = console.error) => { + if (installed) { + return; + } + installed = true; + const listUnhandled = currentlyUnhandled(); + onExit(() => { + const unhandledRejections = listUnhandled(); + if (unhandledRejections.length > 0) { + for (const unhandledRejection of unhandledRejections) { + let error = unhandledRejection.reason; + if (!(error instanceof Error)) { + error = new Error(`Promise rejected with value: ${util.inspect(error)}`); + } + log2(error.stack); + } + process.exitCode = 1; + } + }); + }; + module2.exports = loudRejection; + module2.exports.default = loudRejection; + } +}); + +// ../constants/lib/index.js +var require_lib7 = __commonJS({ + "../constants/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.WORKSPACE_MANIFEST_FILENAME = exports2.LAYOUT_VERSION = exports2.ENGINE_NAME = exports2.LOCKFILE_VERSION = exports2.WANTED_LOCKFILE = void 0; + exports2.WANTED_LOCKFILE = "pnpm-lock.yaml"; + exports2.LOCKFILE_VERSION = 5.3; + exports2.ENGINE_NAME = `${process.platform}-${process.arch}-node-${process.version.split(".")[0]}`; + exports2.LAYOUT_VERSION = 5; + exports2.WORKSPACE_MANIFEST_FILENAME = "pnpm-workspace.yaml"; + } +}); + +// ../error/lib/index.js +var require_lib8 = __commonJS({ + "../error/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.FetchError = void 0; + var PnpmError = class extends Error { + constructor(code, message2, opts) { + super(message2); + this.code = `ERR_PNPM_${code}`; + this.hint = opts === null || opts === void 0 ? void 0 : opts.hint; + this.attempts = opts === null || opts === void 0 ? void 0 : opts.attempts; + } + }; + exports2.default = PnpmError; + var FetchError = class extends PnpmError { + constructor(request, response, hint) { + const message2 = `GET ${request.url}: ${response.statusText} - ${response.status}`; + const authHeaderValue = request.authHeaderValue ? hideAuthInformation(request.authHeaderValue) : void 0; + if (response.status === 401 || response.status === 403 || response.status === 404) { + hint = hint ? `${hint} + +` : ""; + if (authHeaderValue) { + hint += `An authorization header was used: ${authHeaderValue}`; + } else { + hint += "No authorization header was set for the request."; + } + } + super(`FETCH_${response.status}`, message2, { hint }); + this.request = request; + this.response = response; + } + }; + exports2.FetchError = FetchError; + function hideAuthInformation(authHeaderValue) { + const [authType, token] = authHeaderValue.split(" "); + return `${authType} ${token.substring(0, 4)}[hidden]`; + } + } +}); + +// ../../node_modules/.pnpm/crypto-random-string@2.0.0/node_modules/crypto-random-string/index.js +var require_crypto_random_string = __commonJS({ + "../../node_modules/.pnpm/crypto-random-string@2.0.0/node_modules/crypto-random-string/index.js"(exports2, module2) { + "use strict"; + var crypto = require("crypto"); + module2.exports = (length) => { + if (!Number.isFinite(length)) { + throw new TypeError("Expected a finite number"); + } + return crypto.randomBytes(Math.ceil(length / 2)).toString("hex").slice(0, length); + }; + } +}); + +// ../../node_modules/.pnpm/unique-string@2.0.0/node_modules/unique-string/index.js +var require_unique_string = __commonJS({ + "../../node_modules/.pnpm/unique-string@2.0.0/node_modules/unique-string/index.js"(exports2, module2) { + "use strict"; + var cryptoRandomString = require_crypto_random_string(); + module2.exports = () => cryptoRandomString(32); + } +}); + +// ../../node_modules/.pnpm/path-temp@2.0.0/node_modules/path-temp/index.js +var require_path_temp = __commonJS({ + "../../node_modules/.pnpm/path-temp@2.0.0/node_modules/path-temp/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var uniqueString = require_unique_string(); + module2.exports = function pathTemp(folder) { + return path.join(folder, `_tmp_${process.pid}_${uniqueString()}`); + }; + } +}); + +// ../../node_modules/.pnpm/can-write-to-dir@1.1.1/node_modules/can-write-to-dir/index.js +var require_can_write_to_dir = __commonJS({ + "../../node_modules/.pnpm/can-write-to-dir@1.1.1/node_modules/can-write-to-dir/index.js"(exports2, module2) { + "use strict"; + var defaultFS = require("fs"); + var pathTemp = require_path_temp(); + module2.exports = async (dir, customFS) => { + const fs = customFS || defaultFS; + const tempFile = pathTemp(dir); + try { + await fs.promises.writeFile(tempFile, "", "utf8"); + fs.promises.unlink(tempFile).catch(() => { + }); + return true; + } catch (err) { + if (err.code === "EACCES" || err.code === "EPERM" || err.code === "EROFS") { + return false; + } + throw err; + } + }; + module2.exports.sync = (dir, customFS) => { + const fs = customFS || defaultFS; + const tempFile = pathTemp(dir); + try { + fs.writeFileSync(tempFile, "", "utf8"); + fs.unlinkSync(tempFile); + return true; + } catch (err) { + if (err.code === "EACCES" || err.code === "EPERM" || err.code === "EROFS") { + return false; + } + throw err; + } + }; + } +}); + +// ../../node_modules/.pnpm/path-name@1.0.0/node_modules/path-name/index.js +var require_path_name = __commonJS({ + "../../node_modules/.pnpm/path-name@1.0.0/node_modules/path-name/index.js"(exports2, module2) { + "use strict"; + var PATH; + if (process.platform === "win32") { + PATH = "Path"; + Object.keys(process.env).forEach((e) => { + if (e.match(/^PATH$/i)) { + PATH = e; + } + }); + } else { + PATH = "PATH"; + } + module2.exports = PATH; + } +}); + +// ../global-bin-dir/lib/index.js +var require_lib9 = __commonJS({ + "../global-bin-dir/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = __importDefault(require("fs")); + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var can_write_to_dir_1 = require_can_write_to_dir(); + var path_name_1 = __importDefault(require_path_name()); + function default_1(knownCandidates = [], { shouldAllowWrite = true } = {}) { + var _a, _b; + if (!process.env[path_name_1.default]) { + throw new error_1.default("NO_PATH_ENV", `Couldn't find a global directory for executables because the "${path_name_1.default}" environment variable is not set.`); + } + const dirs = (_b = (_a = process.env[path_name_1.default]) === null || _a === void 0 ? void 0 : _a.split(path_1.default.delimiter)) !== null && _b !== void 0 ? _b : []; + const nodeBinDir = path_1.default.dirname(process.execPath); + return pickBestGlobalBinDir(dirs, [ + ...knownCandidates, + nodeBinDir + ], shouldAllowWrite); + } + exports2.default = default_1; + var areDirsEqual = (dir1, dir2) => path_1.default.relative(dir1, dir2) === ""; + function pickBestGlobalBinDir(dirs, knownCandidates, shouldAllowWrite) { + const noWriteAccessDirs = []; + const pnpmDir = dirs.find((dir) => isUnderDir("pnpm", dir.toLowerCase())); + if (pnpmDir != null) { + if (canWriteToDirAndExists(pnpmDir)) + return pnpmDir; + throw new error_1.default("PNPM_DIR_NOT_WRITABLE", `The CLI has no write access to the pnpm home directory at ${pnpmDir}`); + } + for (const dir of dirs) { + const lowCaseDir = dir.toLowerCase(); + if ((isUnderDir("node", lowCaseDir) || isUnderDir("nodejs", lowCaseDir) || isUnderDir("npm", lowCaseDir) || knownCandidates.some((candidate) => areDirsEqual(candidate, dir)) || dirHasNodeRelatedCommand(dir)) && !isUnderDir("_npx", lowCaseDir)) { + if (canWriteToDirAndExists(dir)) + return dir; + noWriteAccessDirs.push(dir); + } + } + if (noWriteAccessDirs.length === 0) { + throw new error_1.default("NO_GLOBAL_BIN_DIR", "Couldn't find a suitable global executables directory.", { + hint: `There should be a node, nodejs, npm, or pnpm directory in the "${path_name_1.default}" environment variable` + }); + } + if (shouldAllowWrite) { + throw new error_1.default("GLOBAL_BIN_DIR_PERMISSION", "No write access to the found global executable directories", { + hint: `The found directories: + ${noWriteAccessDirs.join("\n")}` + }); + } + return noWriteAccessDirs[0]; + } + var NODE_RELATED_COMMANDS = new Set(["pnpm", "npm", "node"]); + function dirHasNodeRelatedCommand(dir) { + try { + return fs_1.default.readdirSync(dir, { withFileTypes: true }).filter((entry) => !entry.isDirectory()).map(({ name }) => name.toLowerCase()).some((file) => NODE_RELATED_COMMANDS.has(file.split(".")[0])); + } catch (err) { + return false; + } + } + function isUnderDir(dir, target) { + target = target.endsWith(path_1.default.sep) ? target : `${target}${path_1.default.sep}`; + return target.includes(`${path_1.default.sep}${dir}${path_1.default.sep}`) || target.includes(`${path_1.default.sep}.${dir}${path_1.default.sep}`); + } + function canWriteToDirAndExists(dir) { + try { + return can_write_to_dir_1.sync(dir); + } catch (err) { + if (err.code !== "ENOENT") + throw err; + return false; + } + } + } +}); + +// ../../node_modules/.pnpm/camelcase@6.2.0/node_modules/camelcase/index.js +var require_camelcase = __commonJS({ + "../../node_modules/.pnpm/camelcase@6.2.0/node_modules/camelcase/index.js"(exports2, module2) { + "use strict"; + var preserveCamelCase = (string, locale) => { + let isLastCharLower = false; + let isLastCharUpper = false; + let isLastLastCharUpper = false; + for (let i = 0; i < string.length; i++) { + const character = string[i]; + if (isLastCharLower && /[\p{Lu}]/u.test(character)) { + string = string.slice(0, i) + "-" + string.slice(i); + isLastCharLower = false; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = true; + i++; + } else if (isLastCharUpper && isLastLastCharUpper && /[\p{Ll}]/u.test(character)) { + string = string.slice(0, i - 1) + "-" + string.slice(i - 1); + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = false; + isLastCharLower = true; + } else { + isLastCharLower = character.toLocaleLowerCase(locale) === character && character.toLocaleUpperCase(locale) !== character; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = character.toLocaleUpperCase(locale) === character && character.toLocaleLowerCase(locale) !== character; + } + } + return string; + }; + var preserveConsecutiveUppercase = (input) => { + return input.replace(/^[\p{Lu}](?![\p{Lu}])/gu, (m1) => m1.toLowerCase()); + }; + var postProcess = (input, options) => { + return input.replace(/[_.\- ]+([\p{Alpha}\p{N}_]|$)/gu, (_, p1) => p1.toLocaleUpperCase(options.locale)).replace(/\d+([\p{Alpha}\p{N}_]|$)/gu, (m) => m.toLocaleUpperCase(options.locale)); + }; + var camelCase = (input, options) => { + if (!(typeof input === "string" || Array.isArray(input))) { + throw new TypeError("Expected the input to be `string | string[]`"); + } + options = { + pascalCase: false, + preserveConsecutiveUppercase: false, + ...options + }; + if (Array.isArray(input)) { + input = input.map((x) => x.trim()).filter((x) => x.length).join("-"); + } else { + input = input.trim(); + } + if (input.length === 0) { + return ""; + } + if (input.length === 1) { + return options.pascalCase ? input.toLocaleUpperCase(options.locale) : input.toLocaleLowerCase(options.locale); + } + const hasUpperCase = input !== input.toLocaleLowerCase(options.locale); + if (hasUpperCase) { + input = preserveCamelCase(input, options.locale); + } + input = input.replace(/^[_.\- ]+/, ""); + if (options.preserveConsecutiveUppercase) { + input = preserveConsecutiveUppercase(input); + } else { + input = input.toLocaleLowerCase(); + } + if (options.pascalCase) { + input = input.charAt(0).toLocaleUpperCase(options.locale) + input.slice(1); + } + return postProcess(input, options); + }; + module2.exports = camelCase; + module2.exports.default = camelCase; + } +}); + +// ../../node_modules/.pnpm/proto-list@1.2.4/node_modules/proto-list/proto-list.js +var require_proto_list = __commonJS({ + "../../node_modules/.pnpm/proto-list@1.2.4/node_modules/proto-list/proto-list.js"(exports2, module2) { + module2.exports = ProtoList; + function setProto(obj, proto) { + if (typeof Object.setPrototypeOf === "function") + return Object.setPrototypeOf(obj, proto); + else + obj.__proto__ = proto; + } + function ProtoList() { + this.list = []; + var root = null; + Object.defineProperty(this, "root", { + get: function() { + return root; + }, + set: function(r) { + root = r; + if (this.list.length) { + setProto(this.list[this.list.length - 1], r); + } + }, + enumerable: true, + configurable: true + }); + } + ProtoList.prototype = { + get length() { + return this.list.length; + }, + get keys() { + var k = []; + for (var i in this.list[0]) + k.push(i); + return k; + }, + get snapshot() { + var o = {}; + this.keys.forEach(function(k) { + o[k] = this.get(k); + }, this); + return o; + }, + get store() { + return this.list[0]; + }, + push: function(obj) { + if (typeof obj !== "object") + obj = { valueOf: obj }; + if (this.list.length >= 1) { + setProto(this.list[this.list.length - 1], obj); + } + setProto(obj, this.root); + return this.list.push(obj); + }, + pop: function() { + if (this.list.length >= 2) { + setProto(this.list[this.list.length - 2], this.root); + } + return this.list.pop(); + }, + unshift: function(obj) { + setProto(obj, this.list[0] || this.root); + return this.list.unshift(obj); + }, + shift: function() { + if (this.list.length === 1) { + setProto(this.list[0], this.root); + } + return this.list.shift(); + }, + get: function(key) { + return this.list[0][key]; + }, + set: function(key, val, save) { + if (!this.length) + this.push({}); + if (save && this.list[0].hasOwnProperty(key)) + this.push({}); + return this.list[0][key] = val; + }, + forEach: function(fn2, thisp) { + for (var key in this.list[0]) + fn2.call(thisp, key, this.list[0][key]); + }, + slice: function() { + return this.list.slice.apply(this.list, arguments); + }, + splice: function() { + var ret = this.list.splice.apply(this.list, arguments); + for (var i = 0, l = this.list.length; i < l; i++) { + setProto(this.list[i], this.list[i + 1] || this.root); + } + return ret; + } + }; + } +}); + +// ../../node_modules/.pnpm/ini@1.3.8/node_modules/ini/ini.js +var require_ini = __commonJS({ + "../../node_modules/.pnpm/ini@1.3.8/node_modules/ini/ini.js"(exports2) { + exports2.parse = exports2.decode = decode; + exports2.stringify = exports2.encode = encode; + exports2.safe = safe; + exports2.unsafe = unsafe; + var eol = typeof process !== "undefined" && process.platform === "win32" ? "\r\n" : "\n"; + function encode(obj, opt) { + var children = []; + var out = ""; + if (typeof opt === "string") { + opt = { + section: opt, + whitespace: false + }; + } else { + opt = opt || {}; + opt.whitespace = opt.whitespace === true; + } + var separator = opt.whitespace ? " = " : "="; + Object.keys(obj).forEach(function(k, _, __) { + var val = obj[k]; + if (val && Array.isArray(val)) { + val.forEach(function(item) { + out += safe(k + "[]") + separator + safe(item) + "\n"; + }); + } else if (val && typeof val === "object") + children.push(k); + else + out += safe(k) + separator + safe(val) + eol; + }); + if (opt.section && out.length) + out = "[" + safe(opt.section) + "]" + eol + out; + children.forEach(function(k, _, __) { + var nk = dotSplit(k).join("\\."); + var section = (opt.section ? opt.section + "." : "") + nk; + var child = encode(obj[k], { + section, + whitespace: opt.whitespace + }); + if (out.length && child.length) + out += eol; + out += child; + }); + return out; + } + function dotSplit(str) { + return str.replace(/\1/g, "LITERAL\\1LITERAL").replace(/\\\./g, "").split(/\./).map(function(part) { + return part.replace(/\1/g, "\\.").replace(/\2LITERAL\\1LITERAL\2/g, ""); + }); + } + function decode(str) { + var out = {}; + var p = out; + var section = null; + var re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i; + var lines = str.split(/[\r\n]+/g); + lines.forEach(function(line, _, __) { + if (!line || line.match(/^\s*[;#]/)) + return; + var match = line.match(re); + if (!match) + return; + if (match[1] !== void 0) { + section = unsafe(match[1]); + if (section === "__proto__") { + p = {}; + return; + } + p = out[section] = out[section] || {}; + return; + } + var key = unsafe(match[2]); + if (key === "__proto__") + return; + var value = match[3] ? unsafe(match[4]) : true; + switch (value) { + case "true": + case "false": + case "null": + value = JSON.parse(value); + } + if (key.length > 2 && key.slice(-2) === "[]") { + key = key.substring(0, key.length - 2); + if (key === "__proto__") + return; + if (!p[key]) + p[key] = []; + else if (!Array.isArray(p[key])) + p[key] = [p[key]]; + } + if (Array.isArray(p[key])) + p[key].push(value); + else + p[key] = value; + }); + Object.keys(out).filter(function(k, _, __) { + if (!out[k] || typeof out[k] !== "object" || Array.isArray(out[k])) + return false; + var parts = dotSplit(k); + var p2 = out; + var l = parts.pop(); + var nl = l.replace(/\\\./g, "."); + parts.forEach(function(part, _2, __2) { + if (part === "__proto__") + return; + if (!p2[part] || typeof p2[part] !== "object") + p2[part] = {}; + p2 = p2[part]; + }); + if (p2 === out && nl === l) + return false; + p2[nl] = out[k]; + return true; + }).forEach(function(del, _, __) { + delete out[del]; + }); + return out; + } + function isQuoted(val) { + return val.charAt(0) === '"' && val.slice(-1) === '"' || val.charAt(0) === "'" && val.slice(-1) === "'"; + } + function safe(val) { + return typeof val !== "string" || val.match(/[=\r\n]/) || val.match(/^\[/) || val.length > 1 && isQuoted(val) || val !== val.trim() ? JSON.stringify(val) : val.replace(/;/g, "\\;").replace(/#/g, "\\#"); + } + function unsafe(val, doUnesc) { + val = (val || "").trim(); + if (isQuoted(val)) { + if (val.charAt(0) === "'") + val = val.substr(1, val.length - 2); + try { + val = JSON.parse(val); + } catch (_) { + } + } else { + var esc = false; + var unesc = ""; + for (var i = 0, l = val.length; i < l; i++) { + var c = val.charAt(i); + if (esc) { + if ("\\;#".indexOf(c) !== -1) + unesc += c; + else + unesc += "\\" + c; + esc = false; + } else if (";#".indexOf(c) !== -1) + break; + else if (c === "\\") + esc = true; + else + unesc += c; + } + if (esc) + unesc += "\\"; + return unesc.trim(); + } + return val; + } + } +}); + +// ../../node_modules/.pnpm/config-chain@1.1.13/node_modules/config-chain/index.js +var require_config_chain = __commonJS({ + "../../node_modules/.pnpm/config-chain@1.1.13/node_modules/config-chain/index.js"(exports2, module2) { + var ProtoList = require_proto_list(); + var path = require("path"); + var fs = require("fs"); + var ini = require_ini(); + var EE = require("events").EventEmitter; + var url = require("url"); + var http = require("http"); + var exports2 = module2.exports = function() { + var args2 = [].slice.call(arguments), conf = new ConfigChain(); + while (args2.length) { + var a = args2.shift(); + if (a) + conf.push(typeof a === "string" ? json(a) : a); + } + return conf; + }; + var find = exports2.find = function() { + var rel = path.join.apply(null, [].slice.call(arguments)); + function find2(start, rel2) { + var file = path.join(start, rel2); + try { + fs.statSync(file); + return file; + } catch (err) { + if (path.dirname(start) !== start) + return find2(path.dirname(start), rel2); + } + } + return find2(__dirname, rel); + }; + var parse = exports2.parse = function(content, file, type) { + content = "" + content; + if (!type) { + try { + return JSON.parse(content); + } catch (er) { + return ini.parse(content); + } + } else if (type === "json") { + if (this.emit) { + try { + return JSON.parse(content); + } catch (er) { + this.emit("error", er); + } + } else { + return JSON.parse(content); + } + } else { + return ini.parse(content); + } + }; + var json = exports2.json = function() { + var args2 = [].slice.call(arguments).filter(function(arg) { + return arg != null; + }); + var file = path.join.apply(null, args2); + var content; + try { + content = fs.readFileSync(file, "utf-8"); + } catch (err) { + return; + } + return parse(content, file, "json"); + }; + var env = exports2.env = function(prefix, env2) { + env2 = env2 || process.env; + var obj = {}; + var l = prefix.length; + for (var k in env2) { + if (k.indexOf(prefix) === 0) + obj[k.substring(l)] = env2[k]; + } + return obj; + }; + exports2.ConfigChain = ConfigChain; + function ConfigChain() { + EE.apply(this); + ProtoList.apply(this, arguments); + this._awaiting = 0; + this._saving = 0; + this.sources = {}; + } + var extras = { + constructor: { value: ConfigChain } + }; + Object.keys(EE.prototype).forEach(function(k) { + extras[k] = Object.getOwnPropertyDescriptor(EE.prototype, k); + }); + ConfigChain.prototype = Object.create(ProtoList.prototype, extras); + ConfigChain.prototype.del = function(key, where) { + if (where) { + var target = this.sources[where]; + target = target && target.data; + if (!target) { + return this.emit("error", new Error("not found " + where)); + } + delete target[key]; + } else { + for (var i = 0, l = this.list.length; i < l; i++) { + delete this.list[i][key]; + } + } + return this; + }; + ConfigChain.prototype.set = function(key, value, where) { + var target; + if (where) { + target = this.sources[where]; + target = target && target.data; + if (!target) { + return this.emit("error", new Error("not found " + where)); + } + } else { + target = this.list[0]; + if (!target) { + return this.emit("error", new Error("cannot set, no confs!")); + } + } + target[key] = value; + return this; + }; + ConfigChain.prototype.get = function(key, where) { + if (where) { + where = this.sources[where]; + if (where) + where = where.data; + if (where && Object.hasOwnProperty.call(where, key)) + return where[key]; + return void 0; + } + return this.list[0][key]; + }; + ConfigChain.prototype.save = function(where, type, cb) { + if (typeof type === "function") + cb = type, type = null; + var target = this.sources[where]; + if (!target || !(target.path || target.source) || !target.data) { + return this.emit("error", new Error("bad save target: " + where)); + } + if (target.source) { + var pref = target.prefix || ""; + Object.keys(target.data).forEach(function(k) { + target.source[pref + k] = target.data[k]; + }); + return this; + } + var type = type || target.type; + var data = target.data; + if (target.type === "json") { + data = JSON.stringify(data); + } else { + data = ini.stringify(data); + } + this._saving++; + fs.writeFile(target.path, data, "utf8", function(er) { + this._saving--; + if (er) { + if (cb) + return cb(er); + else + return this.emit("error", er); + } + if (this._saving === 0) { + if (cb) + cb(); + this.emit("save"); + } + }.bind(this)); + return this; + }; + ConfigChain.prototype.addFile = function(file, type, name) { + name = name || file; + var marker = { __source__: name }; + this.sources[name] = { path: file, type }; + this.push(marker); + this._await(); + fs.readFile(file, "utf8", function(er, data) { + if (er) + this.emit("error", er); + this.addString(data, file, type, marker); + }.bind(this)); + return this; + }; + ConfigChain.prototype.addEnv = function(prefix, env2, name) { + name = name || "env"; + var data = exports2.env(prefix, env2); + this.sources[name] = { data, source: env2, prefix }; + return this.add(data, name); + }; + ConfigChain.prototype.addUrl = function(req, type, name) { + this._await(); + var href = url.format(req); + name = name || href; + var marker = { __source__: name }; + this.sources[name] = { href, type }; + this.push(marker); + http.request(req, function(res) { + var c = []; + var ct = res.headers["content-type"]; + if (!type) { + type = ct.indexOf("json") !== -1 ? "json" : ct.indexOf("ini") !== -1 ? "ini" : href.match(/\.json$/) ? "json" : href.match(/\.ini$/) ? "ini" : null; + marker.type = type; + } + res.on("data", c.push.bind(c)).on("end", function() { + this.addString(Buffer.concat(c), href, type, marker); + }.bind(this)).on("error", this.emit.bind(this, "error")); + }.bind(this)).on("error", this.emit.bind(this, "error")).end(); + return this; + }; + ConfigChain.prototype.addString = function(data, file, type, marker) { + data = this.parse(data, file, type); + this.add(data, marker); + return this; + }; + ConfigChain.prototype.add = function(data, marker) { + if (marker && typeof marker === "object") { + var i = this.list.indexOf(marker); + if (i === -1) { + return this.emit("error", new Error("bad marker")); + } + this.splice(i, 1, data); + marker = marker.__source__; + this.sources[marker] = this.sources[marker] || {}; + this.sources[marker].data = data; + this._resolve(); + } else { + if (typeof marker === "string") { + this.sources[marker] = this.sources[marker] || {}; + this.sources[marker].data = data; + } + this._await(); + this.push(data); + process.nextTick(this._resolve.bind(this)); + } + return this; + }; + ConfigChain.prototype.parse = exports2.parse; + ConfigChain.prototype._await = function() { + this._awaiting++; + }; + ConfigChain.prototype._resolve = function() { + this._awaiting--; + if (this._awaiting === 0) + this.emit("load", this); + }; + } +}); + +// ../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/lib/envKeyToSetting.js +var require_envKeyToSetting = __commonJS({ + "../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/lib/envKeyToSetting.js"(exports2, module2) { + module2.exports = function(x) { + const colonIndex = x.indexOf(":"); + if (colonIndex === -1) { + return normalize(x); + } + const firstPart = x.substr(0, colonIndex); + const secondPart = x.substr(colonIndex + 1); + return `${normalize(firstPart)}:${normalize(secondPart)}`; + }; + function normalize(s) { + s = s.toLowerCase(); + if (s === "_authtoken") + return "_authToken"; + let r = s[0]; + for (let i = 1; i < s.length; i++) { + r += s[i] === "_" ? "-" : s[i]; + } + return r; + } + } +}); + +// ../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/lib/util.js +var require_util = __commonJS({ + "../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/lib/util.js"(exports2) { + "use strict"; + var fs = require("fs"); + var path = require("path"); + var envReplace = (str) => { + if (typeof str !== "string" || !str) { + return str; + } + const regex = /(\\*)\$\{([^}]+)\}/g; + return str.replace(regex, (orig, esc, name) => { + esc = esc.length > 0 && esc.length % 2; + if (esc) { + return orig; + } + if (process.env[name] === void 0) { + throw new Error(`Failed to replace env in config: ${orig}`); + } + return process.env[name]; + }); + }; + var parseField = (types, field, key) => { + if (typeof field !== "string") { + return field; + } + const typeList = [].concat(types[key]); + const isPath = typeList.indexOf(path) !== -1; + const isBool = typeList.indexOf(Boolean) !== -1; + const isString = typeList.indexOf(String) !== -1; + const isNumber = typeList.indexOf(Number) !== -1; + field = `${field}`.trim(); + if (/^".*"$/.test(field)) { + try { + field = JSON.parse(field); + } catch (error) { + throw new Error(`Failed parsing JSON config key ${key}: ${field}`); + } + } + if (isBool && !isString && field === "") { + return true; + } + switch (field) { + case "true": { + return true; + } + case "false": { + return false; + } + case "null": { + return null; + } + case "undefined": { + return void 0; + } + } + field = envReplace(field); + if (isPath) { + const regex = process.platform === "win32" ? /^~(\/|\\)/ : /^~\//; + if (regex.test(field) && process.env.HOME) { + field = path.resolve(process.env.HOME, field.substr(2)); + } + field = path.resolve(field); + } + if (isNumber && !isNaN(field)) { + field = Number(field); + } + return field; + }; + var findPrefix = (name) => { + name = path.resolve(name); + let walkedUp = false; + while (path.basename(name) === "node_modules") { + name = path.dirname(name); + walkedUp = true; + } + if (walkedUp) { + return name; + } + const find = (name2, original) => { + const regex = /^[a-zA-Z]:(\\|\/)?$/; + if (name2 === "/" || process.platform === "win32" && regex.test(name2)) { + return original; + } + try { + const files = fs.readdirSync(name2); + if (files.includes("node_modules") || files.includes("package.json") || files.includes("package.json5") || files.includes("package.yaml") || files.includes("pnpm-workspace.yaml")) { + return name2; + } + const dirname = path.dirname(name2); + if (dirname === name2) { + return original; + } + return find(dirname, original); + } catch (error) { + if (name2 === original) { + if (error.code === "ENOENT") { + return original; + } + throw error; + } + return original; + } + }; + return find(name, name); + }; + exports2.envReplace = envReplace; + exports2.findPrefix = findPrefix; + exports2.parseField = parseField; + } +}); + +// ../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/lib/types.js +var require_types2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/lib/types.js"(exports2) { + "use strict"; + var path = require("path"); + var Stream = require("stream").Stream; + var url = require("url"); + var Umask = () => { + }; + var getLocalAddresses = () => []; + var semver = () => { + }; + exports2.types = { + access: [null, "restricted", "public"], + "allow-same-version": Boolean, + "always-auth": Boolean, + also: [null, "dev", "development"], + audit: Boolean, + "auth-type": ["legacy", "sso", "saml", "oauth"], + "bin-links": Boolean, + browser: [null, String], + ca: [null, String, Array], + cafile: path, + cache: path, + "cache-lock-stale": Number, + "cache-lock-retries": Number, + "cache-lock-wait": Number, + "cache-max": Number, + "cache-min": Number, + cert: [null, String], + cidr: [null, String, Array], + color: ["always", Boolean], + depth: Number, + description: Boolean, + dev: Boolean, + "dry-run": Boolean, + editor: String, + "engine-strict": Boolean, + force: Boolean, + "fetch-retries": Number, + "fetch-retry-factor": Number, + "fetch-retry-mintimeout": Number, + "fetch-retry-maxtimeout": Number, + git: String, + "git-tag-version": Boolean, + "commit-hooks": Boolean, + global: Boolean, + globalconfig: path, + "global-style": Boolean, + group: [Number, String], + "https-proxy": [null, url], + "user-agent": String, + "ham-it-up": Boolean, + "heading": String, + "if-present": Boolean, + "ignore-prepublish": Boolean, + "ignore-scripts": Boolean, + "init-module": path, + "init-author-name": String, + "init-author-email": String, + "init-author-url": ["", url], + "init-license": String, + "init-version": semver, + json: Boolean, + key: [null, String], + "legacy-bundling": Boolean, + link: Boolean, + "local-address": getLocalAddresses(), + loglevel: ["silent", "error", "warn", "notice", "http", "timing", "info", "verbose", "silly"], + logstream: Stream, + "logs-max": Number, + long: Boolean, + maxsockets: Number, + message: String, + "metrics-registry": [null, String], + "node-options": [null, String], + "node-version": [null, semver], + "no-proxy": [null, String, Array], + offline: Boolean, + "onload-script": [null, String], + only: [null, "dev", "development", "prod", "production"], + optional: Boolean, + "package-lock": Boolean, + otp: [null, String], + "package-lock-only": Boolean, + parseable: Boolean, + "prefer-offline": Boolean, + "prefer-online": Boolean, + prefix: path, + production: Boolean, + progress: Boolean, + proxy: [null, false, url], + "read-only": Boolean, + "rebuild-bundle": Boolean, + registry: [null, url], + rollback: Boolean, + save: Boolean, + "save-bundle": Boolean, + "save-dev": Boolean, + "save-exact": Boolean, + "save-optional": Boolean, + "save-prefix": String, + "save-prod": Boolean, + scope: String, + "script-shell": [null, String], + "scripts-prepend-node-path": [false, true, "auto", "warn-only"], + searchopts: String, + searchexclude: [null, String], + searchlimit: Number, + searchstaleness: Number, + "send-metrics": Boolean, + shell: String, + shrinkwrap: Boolean, + "sign-git-tag": Boolean, + "sso-poll-frequency": Number, + "sso-type": [null, "oauth", "saml"], + "strict-ssl": Boolean, + tag: String, + timing: Boolean, + tmp: path, + unicode: Boolean, + "unsafe-perm": Boolean, + usage: Boolean, + user: [Number, String], + userconfig: path, + umask: Umask, + version: Boolean, + "tag-version-prefix": String, + versions: Boolean, + viewer: String, + _exit: Boolean + }; + } +}); + +// ../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/lib/conf.js +var require_conf = __commonJS({ + "../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/lib/conf.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var path = require("path"); + var { ConfigChain } = require_config_chain(); + var envKeyToSetting = require_envKeyToSetting(); + var util = require_util(); + var Conf = class extends ConfigChain { + constructor(base, types) { + super(base); + this.root = base; + this._parseField = util.parseField.bind(null, types || require_types2()); + } + add(data, marker) { + try { + for (const x of Object.keys(data)) { + data[x] = this._parseField(data[x], x); + } + } catch (error) { + throw error; + } + return super.add(data, marker); + } + addFile(file, name) { + name = name || file; + const marker = { __source__: name }; + this.sources[name] = { path: file, type: "ini" }; + this.push(marker); + this._await(); + try { + const contents = fs.readFileSync(file, "utf8"); + this.addString(contents, file, "ini", marker); + } catch (error) { + this.add({}, marker); + } + return this; + } + addEnv(env) { + env = env || process.env; + const conf = {}; + Object.keys(env).filter((x) => /^npm_config_/i.test(x)).forEach((x) => { + if (!env[x]) { + return; + } + conf[envKeyToSetting(x.substr(11))] = env[x]; + }); + return super.addEnv("", conf, "env"); + } + loadPrefix() { + const cli = this.list[0]; + Object.defineProperty(this, "prefix", { + enumerable: true, + set: (prefix) => { + const g = this.get("global"); + this[g ? "globalPrefix" : "localPrefix"] = prefix; + }, + get: () => { + const g = this.get("global"); + return g ? this.globalPrefix : this.localPrefix; + } + }); + Object.defineProperty(this, "globalPrefix", { + enumerable: true, + set: (prefix) => { + this.set("prefix", prefix); + }, + get: () => { + return path.resolve(this.get("prefix")); + } + }); + let p; + Object.defineProperty(this, "localPrefix", { + enumerable: true, + set: (prefix) => { + p = prefix; + }, + get: () => { + return p; + } + }); + if (Object.prototype.hasOwnProperty.call(cli, "prefix")) { + p = path.resolve(cli.prefix); + } else { + try { + const prefix = util.findPrefix(process.cwd()); + p = prefix; + } catch (error) { + throw error; + } + } + return p; + } + loadCAFile(file) { + if (!file) { + return; + } + try { + const contents = fs.readFileSync(file, "utf8"); + const delim = "-----END CERTIFICATE-----"; + const output = contents.split(delim).filter((x) => Boolean(x.trim())).map((x) => x.trimLeft() + delim); + this.set("ca", output); + } catch (error) { + if (error.code === "ENOENT") { + return; + } + throw error; + } + } + loadUser() { + const defConf = this.root; + if (this.get("global")) { + return; + } + if (process.env.SUDO_UID) { + defConf.user = Number(process.env.SUDO_UID); + return; + } + const prefix = path.resolve(this.get("prefix")); + try { + const stats = fs.statSync(prefix); + defConf.user = stats.uid; + } catch (error) { + if (error.code === "ENOENT") { + return; + } + throw error; + } + } + }; + module2.exports = Conf; + } +}); + +// ../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/lib/defaults.js +var require_defaults = __commonJS({ + "../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/lib/defaults.js"(exports2) { + "use strict"; + var os = require("os"); + var path = require("path"); + var temp = os.tmpdir(); + var uidOrPid = process.getuid ? process.getuid() : process.pid; + var hasUnicode = () => true; + var isWindows = process.platform === "win32"; + var osenv = { + editor: () => process.env.EDITOR || process.env.VISUAL || (isWindows ? "notepad.exe" : "vi"), + shell: () => isWindows ? process.env.COMSPEC || "cmd.exe" : process.env.SHELL || "/bin/bash" + }; + var umask = { + fromString: () => process.umask() + }; + var home = os.homedir(); + if (home) { + process.env.HOME = home; + } else { + home = path.resolve(temp, "npm-" + uidOrPid); + } + var cacheExtra = process.platform === "win32" ? "npm-cache" : ".npm"; + var cacheRoot = process.platform === "win32" ? process.env.APPDATA : home; + var cache = path.resolve(cacheRoot, cacheExtra); + var defaults; + var globalPrefix; + Object.defineProperty(exports2, "defaults", { + get: function() { + if (defaults) + return defaults; + if (process.env.PREFIX) { + globalPrefix = process.env.PREFIX; + } else if (process.platform === "win32") { + globalPrefix = path.dirname(process.execPath); + } else { + globalPrefix = path.dirname(path.dirname(process.execPath)); + if (process.env.DESTDIR) { + globalPrefix = path.join(process.env.DESTDIR, globalPrefix); + } + } + defaults = { + access: null, + "allow-same-version": false, + "always-auth": false, + also: null, + audit: true, + "auth-type": "legacy", + "bin-links": true, + browser: null, + ca: null, + cafile: null, + cache, + "cache-lock-stale": 6e4, + "cache-lock-retries": 10, + "cache-lock-wait": 1e4, + "cache-max": Infinity, + "cache-min": 10, + cert: null, + cidr: null, + color: process.env.NO_COLOR == null, + depth: Infinity, + description: true, + dev: false, + "dry-run": false, + editor: osenv.editor(), + "engine-strict": false, + force: false, + "fetch-retries": 2, + "fetch-retry-factor": 10, + "fetch-retry-mintimeout": 1e4, + "fetch-retry-maxtimeout": 6e4, + git: "git", + "git-tag-version": true, + "commit-hooks": true, + global: false, + globalconfig: path.resolve(globalPrefix, "etc", "npmrc"), + "global-style": false, + group: process.platform === "win32" ? 0 : process.env.SUDO_GID || process.getgid && process.getgid(), + "ham-it-up": false, + heading: "npm", + "if-present": false, + "ignore-prepublish": false, + "ignore-scripts": false, + "init-module": path.resolve(home, ".npm-init.js"), + "init-author-name": "", + "init-author-email": "", + "init-author-url": "", + "init-version": "1.0.0", + "init-license": "ISC", + json: false, + key: null, + "legacy-bundling": false, + link: false, + "local-address": void 0, + loglevel: "notice", + logstream: process.stderr, + "logs-max": 10, + long: false, + maxsockets: 50, + message: "%s", + "metrics-registry": null, + "node-options": null, + "node-version": process.version, + "offline": false, + "onload-script": false, + only: null, + optional: true, + otp: null, + "package-lock": true, + "package-lock-only": false, + parseable: false, + "prefer-offline": false, + "prefer-online": false, + prefix: globalPrefix, + production: process.env.NODE_ENV === "production", + "progress": !process.env.TRAVIS && !process.env.CI, + proxy: null, + "https-proxy": null, + "no-proxy": null, + "user-agent": "npm/{npm-version} node/{node-version} {platform} {arch}", + "read-only": false, + "rebuild-bundle": true, + registry: "https://registry.npmjs.org/", + rollback: true, + save: true, + "save-bundle": false, + "save-dev": false, + "save-exact": false, + "save-optional": false, + "save-prefix": "^", + "save-prod": false, + scope: "", + "script-shell": null, + "scripts-prepend-node-path": "warn-only", + searchopts: "", + searchexclude: null, + searchlimit: 20, + searchstaleness: 15 * 60, + "send-metrics": false, + shell: osenv.shell(), + shrinkwrap: true, + "sign-git-tag": false, + "sso-poll-frequency": 500, + "sso-type": "oauth", + "strict-ssl": true, + tag: "latest", + "tag-version-prefix": "v", + timing: false, + tmp: temp, + unicode: hasUnicode(), + "unsafe-perm": process.platform === "win32" || process.platform === "cygwin" || !(process.getuid && process.setuid && process.getgid && process.setgid) || process.getuid() !== 0, + usage: false, + user: process.platform === "win32" ? 0 : "nobody", + userconfig: path.resolve(home, ".npmrc"), + umask: process.umask ? process.umask() : umask.fromString("022"), + version: false, + versions: false, + viewer: process.platform === "win32" ? "browser" : "man", + _exit: true + }; + return defaults; + } + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/index.js +var require_npm_conf = __commonJS({ + "../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var Conf = require_conf(); + var _defaults = require_defaults(); + module2.exports = (opts, types, defaults) => { + const conf = new Conf(Object.assign({}, _defaults.defaults, defaults), types); + conf.add(Object.assign({}, opts), "cli"); + if (require.resolve.paths) { + const paths = require.resolve.paths("npm"); + let npmPath; + try { + npmPath = require.resolve("npm", { paths: paths.slice(-1) }); + } catch (error) { + } + if (npmPath) { + conf.addFile(path.resolve(path.dirname(npmPath), "..", "npmrc"), "builtin"); + } + } + conf.addEnv(); + conf.loadPrefix(); + const projectConf = path.resolve(conf.localPrefix, ".npmrc"); + const userConf = conf.get("userconfig"); + if (!conf.get("global") && projectConf !== userConf) { + conf.addFile(projectConf, "project"); + } else { + conf.add({}, "project"); + } + if (conf.get("workspace-prefix") && conf.get("workspace-prefix") !== projectConf) { + const workspaceConf = path.resolve(conf.get("workspace-prefix"), ".npmrc"); + conf.addFile(workspaceConf, "workspace"); + } + conf.addFile(conf.get("userconfig"), "user"); + if (conf.get("prefix")) { + const etc = path.resolve(conf.get("prefix"), "etc"); + conf.root.globalconfig = path.resolve(etc, "npmrc"); + conf.root.globalignorefile = path.resolve(etc, "npmignore"); + } + conf.addFile(conf.get("globalconfig"), "global"); + conf.loadUser(); + const caFile = conf.get("cafile"); + if (caFile) { + conf.loadCAFile(caFile); + } + return conf; + }; + Object.defineProperty(module2.exports, "defaults", { + get() { + return _defaults.defaults; + }, + enumerable: true + }); + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isPlaceholder.js +var require_isPlaceholder = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isPlaceholder.js"(exports2, module2) { + function _isPlaceholder(a) { + return a != null && typeof a === "object" && a["@@functional/placeholder"] === true; + } + module2.exports = _isPlaceholder; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_curry1.js +var require_curry1 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_curry1.js"(exports2, module2) { + var _isPlaceholder = require_isPlaceholder(); + function _curry1(fn2) { + return function f1(a) { + if (arguments.length === 0 || _isPlaceholder(a)) { + return f1; + } else { + return fn2.apply(this, arguments); + } + }; + } + module2.exports = _curry1; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/fromPairs.js +var require_fromPairs = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/fromPairs.js"(exports2, module2) { + var _curry1 = require_curry1(); + var fromPairs = /* @__PURE__ */ _curry1(function fromPairs2(pairs) { + var result = {}; + var idx = 0; + while (idx < pairs.length) { + result[pairs[idx][0]] = pairs[idx][1]; + idx += 1; + } + return result; + }); + module2.exports = fromPairs; + } +}); + +// ../../node_modules/.pnpm/realpath-missing@1.1.0/node_modules/realpath-missing/index.js +var require_realpath_missing = __commonJS({ + "../../node_modules/.pnpm/realpath-missing@1.1.0/node_modules/realpath-missing/index.js"(exports2, module2) { + var fs = require("fs"); + module2.exports = async function realpathMissing(path) { + try { + return await fs.promises.realpath(path); + } catch (err) { + if (err.code === "ENOENT") { + return path; + } + throw err; + } + }; + } +}); + +// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js +var require_windows = __commonJS({ + "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports2, module2) { + module2.exports = isexe; + isexe.sync = sync; + var fs = require("fs"); + function checkPathExt(path, options) { + var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT; + if (!pathext) { + return true; + } + pathext = pathext.split(";"); + if (pathext.indexOf("") !== -1) { + return true; + } + for (var i = 0; i < pathext.length; i++) { + var p = pathext[i].toLowerCase(); + if (p && path.substr(-p.length).toLowerCase() === p) { + return true; + } + } + return false; + } + function checkStat(stat, path, options) { + if (!stat.isSymbolicLink() && !stat.isFile()) { + return false; + } + return checkPathExt(path, options); + } + function isexe(path, options, cb) { + fs.stat(path, function(er, stat) { + cb(er, er ? false : checkStat(stat, path, options)); + }); + } + function sync(path, options) { + return checkStat(fs.statSync(path), path, options); + } + } +}); + +// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js +var require_mode = __commonJS({ + "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports2, module2) { + module2.exports = isexe; + isexe.sync = sync; + var fs = require("fs"); + function isexe(path, options, cb) { + fs.stat(path, function(er, stat) { + cb(er, er ? false : checkStat(stat, options)); + }); + } + function sync(path, options) { + return checkStat(fs.statSync(path), options); + } + function checkStat(stat, options) { + return stat.isFile() && checkMode(stat, options); + } + function checkMode(stat, options) { + var mod = stat.mode; + var uid = stat.uid; + var gid = stat.gid; + var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid(); + var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid(); + var u = parseInt("100", 8); + var g = parseInt("010", 8); + var o = parseInt("001", 8); + var ug = u | g; + var ret = mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0; + return ret; + } + } +}); + +// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js +var require_isexe = __commonJS({ + "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports2, module2) { + var fs = require("fs"); + var core; + if (process.platform === "win32" || global.TESTING_WINDOWS) { + core = require_windows(); + } else { + core = require_mode(); + } + module2.exports = isexe; + isexe.sync = sync; + function isexe(path, options, cb) { + if (typeof options === "function") { + cb = options; + options = {}; + } + if (!cb) { + if (typeof Promise !== "function") { + throw new TypeError("callback not provided"); + } + return new Promise(function(resolve, reject) { + isexe(path, options || {}, function(er, is) { + if (er) { + reject(er); + } else { + resolve(is); + } + }); + }); + } + core(path, options || {}, function(er, is) { + if (er) { + if (er.code === "EACCES" || options && options.ignoreErrors) { + er = null; + is = false; + } + } + cb(er, is); + }); + } + function sync(path, options) { + try { + return core.sync(path, options || {}); + } catch (er) { + if (options && options.ignoreErrors || er.code === "EACCES") { + return false; + } else { + throw er; + } + } + } + } +}); + +// ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js +var require_which = __commonJS({ + "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports2, module2) { + var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys"; + var path = require("path"); + var COLON = isWindows ? ";" : ":"; + var isexe = require_isexe(); + var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }); + var getPathInfo = (cmd, opt) => { + const colon = opt.colon || COLON; + const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [ + ...isWindows ? [process.cwd()] : [], + ...(opt.path || process.env.PATH || "").split(colon) + ]; + const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : ""; + const pathExt = isWindows ? pathExtExe.split(colon) : [""]; + if (isWindows) { + if (cmd.indexOf(".") !== -1 && pathExt[0] !== "") + pathExt.unshift(""); + } + return { + pathEnv, + pathExt, + pathExtExe + }; + }; + var which = (cmd, opt, cb) => { + if (typeof opt === "function") { + cb = opt; + opt = {}; + } + if (!opt) + opt = {}; + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); + const found = []; + const step = (i) => new Promise((resolve, reject) => { + if (i === pathEnv.length) + return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd)); + const ppRaw = pathEnv[i]; + const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; + const pCmd = path.join(pathPart, cmd); + const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; + resolve(subStep(p, i, 0)); + }); + const subStep = (p, i, ii) => new Promise((resolve, reject) => { + if (ii === pathExt.length) + return resolve(step(i + 1)); + const ext = pathExt[ii]; + isexe(p + ext, { pathExt: pathExtExe }, (er, is) => { + if (!er && is) { + if (opt.all) + found.push(p + ext); + else + return resolve(p + ext); + } + return resolve(subStep(p, i, ii + 1)); + }); + }); + return cb ? step(0).then((res) => cb(null, res), cb) : step(0); + }; + var whichSync = (cmd, opt) => { + opt = opt || {}; + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); + const found = []; + for (let i = 0; i < pathEnv.length; i++) { + const ppRaw = pathEnv[i]; + const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; + const pCmd = path.join(pathPart, cmd); + const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; + for (let j = 0; j < pathExt.length; j++) { + const cur = p + pathExt[j]; + try { + const is = isexe.sync(cur, { pathExt: pathExtExe }); + if (is) { + if (opt.all) + found.push(cur); + else + return cur; + } + } catch (ex) { + } + } + } + if (opt.all && found.length) + return found; + if (opt.nothrow) + return null; + throw getNotFoundError(cmd); + }; + module2.exports = which; + which.sync = whichSync; + } +}); + +// ../config/lib/getScopeRegistries.js +var require_getScopeRegistries = __commonJS({ + "../config/lib/getScopeRegistries.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.normalizeRegistry = void 0; + function getScopeRegistries(rawConfig) { + const registries = {}; + for (const configKey of Object.keys(rawConfig)) { + if (configKey[0] === "@" && configKey.endsWith(":registry")) { + registries[configKey.substr(0, configKey.indexOf(":"))] = normalizeRegistry(rawConfig[configKey]); + } + } + return registries; + } + exports2.default = getScopeRegistries; + function normalizeRegistry(registry) { + return registry.endsWith("/") ? registry : `${registry}/`; + } + exports2.normalizeRegistry = normalizeRegistry; + } +}); + +// ../../node_modules/.pnpm/is-windows@1.0.2/node_modules/is-windows/index.js +var require_is_windows = __commonJS({ + "../../node_modules/.pnpm/is-windows@1.0.2/node_modules/is-windows/index.js"(exports2, module2) { + (function(factory) { + if (exports2 && typeof exports2 === "object" && typeof module2 !== "undefined") { + module2.exports = factory(); + } else if (typeof define === "function" && define.amd) { + define([], factory); + } else if (typeof window !== "undefined") { + window.isWindows = factory(); + } else if (typeof global !== "undefined") { + global.isWindows = factory(); + } else if (typeof self !== "undefined") { + self.isWindows = factory(); + } else { + this.isWindows = factory(); + } + })(function() { + "use strict"; + return function isWindows() { + return process && (process.platform === "win32" || /^(msys|cygwin)$/.test(process.env.OSTYPE)); + }; + }); + } +}); + +// ../../node_modules/.pnpm/better-path-resolve@1.0.0/node_modules/better-path-resolve/index.js +var require_better_path_resolve = __commonJS({ + "../../node_modules/.pnpm/better-path-resolve@1.0.0/node_modules/better-path-resolve/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var isWindows = require_is_windows(); + module2.exports = isWindows() ? winResolve : path.resolve; + function winResolve(p) { + if (arguments.length === 0) + return path.resolve(); + if (typeof p !== "string") { + return path.resolve(p); + } + if (p[1] === ":") { + const cc = p[0].charCodeAt(); + if (cc < 65 || cc > 90) { + p = `${p[0].toUpperCase()}${p.substr(1)}`; + } + } + if (p.endsWith(":")) { + return p; + } + return path.resolve(p); + } + } +}); + +// ../../node_modules/.pnpm/is-subdir@1.2.0/node_modules/is-subdir/index.js +var require_is_subdir = __commonJS({ + "../../node_modules/.pnpm/is-subdir@1.2.0/node_modules/is-subdir/index.js"(exports2, module2) { + "use strict"; + var betterPathResolve = require_better_path_resolve(); + var path = require("path"); + function isSubdir(parentDir, subdir) { + const rParent = `${betterPathResolve(parentDir)}${path.sep}`; + const rDir = `${betterPathResolve(subdir)}${path.sep}`; + return rDir.startsWith(rParent); + } + isSubdir.strict = function isSubdirStrict(parentDir, subdir) { + const rParent = `${betterPathResolve(parentDir)}${path.sep}`; + const rDir = `${betterPathResolve(subdir)}${path.sep}`; + return rDir !== rParent && rDir.startsWith(rParent); + }; + module2.exports = isSubdir; + } +}); + +// ../config/lib/findBestGlobalPrefix.js +var require_findBestGlobalPrefix = __commonJS({ + "../config/lib/findBestGlobalPrefix.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var is_subdir_1 = __importDefault(require_is_subdir()); + function findBestGlobalPrefixOnWindows(defaultNpmGlobalPrefix, env) { + if (process.platform !== "win32") + return defaultNpmGlobalPrefix; + if (env.LOCALAPPDATA != null && is_subdir_1.default(env.LOCALAPPDATA, defaultNpmGlobalPrefix) || env.APPDATA != null && is_subdir_1.default(env.APPDATA, defaultNpmGlobalPrefix)) { + return defaultNpmGlobalPrefix; + } + if (env.APPDATA) + return path_1.default.join(env.APPDATA, "npm"); + return defaultNpmGlobalPrefix; + } + exports2.default = findBestGlobalPrefixOnWindows; + } +}); + +// ../config/lib/dirs.js +var require_dirs = __commonJS({ + "../config/lib/dirs.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDataDir = exports2.getStateDir = exports2.getCacheDir = void 0; + var os_1 = __importDefault(require("os")); + var path_1 = __importDefault(require("path")); + function getCacheDir(opts) { + if (opts.env.XDG_CACHE_HOME) { + return path_1.default.join(opts.env.XDG_CACHE_HOME, "pnpm"); + } + if (opts.platform === "darwin") { + return path_1.default.join(os_1.default.homedir(), "Library/Caches/pnpm"); + } + if (opts.platform !== "win32") { + return path_1.default.join(os_1.default.homedir(), ".cache/pnpm"); + } + if (opts.env.LOCALAPPDATA) { + return path_1.default.join(opts.env.LOCALAPPDATA, "pnpm-cache"); + } + return path_1.default.join(os_1.default.homedir(), ".pnpm-cache"); + } + exports2.getCacheDir = getCacheDir; + function getStateDir(opts) { + if (opts.env.XDG_STATE_HOME) { + return path_1.default.join(opts.env.XDG_STATE_HOME, "pnpm"); + } + if (opts.platform !== "win32" && opts.platform !== "darwin") { + return path_1.default.join(os_1.default.homedir(), ".local/state/pnpm"); + } + if (opts.env.LOCALAPPDATA) { + return path_1.default.join(opts.env.LOCALAPPDATA, "pnpm-state"); + } + return path_1.default.join(os_1.default.homedir(), ".pnpm-state"); + } + exports2.getStateDir = getStateDir; + function getDataDir(opts) { + if (opts.env.XDG_DATA_HOME) { + return path_1.default.join(opts.env.XDG_DATA_HOME, "pnpm"); + } + if (opts.platform === "darwin") { + return path_1.default.join(os_1.default.homedir(), "Library/pnpm"); + } + if (opts.platform !== "win32") { + return path_1.default.join(os_1.default.homedir(), ".local/share/pnpm"); + } + if (opts.env.LOCALAPPDATA) { + return path_1.default.join(opts.env.LOCALAPPDATA, "pnpm"); + } + return path_1.default.join(os_1.default.homedir(), ".pnpm"); + } + exports2.getDataDir = getDataDir; + } +}); + +// ../config/lib/concurrency.js +var require_concurrency = __commonJS({ + "../config/lib/concurrency.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getWorkspaceConcurrency = void 0; + var os_1 = require("os"); + function getWorkspaceConcurrency(option) { + if (typeof option !== "number") + return 4; + if (option <= 0) { + return Math.max(1, os_1.cpus().length - Math.abs(option)); + } + return option; + } + exports2.getWorkspaceConcurrency = getWorkspaceConcurrency; + } +}); + +// ../config/lib/index.js +var require_lib10 = __commonJS({ + "../config/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.types = void 0; + var path_1 = __importDefault(require("path")); + var fs_1 = __importDefault(require("fs")); + var os_1 = __importDefault(require("os")); + var constants_1 = require_lib7(); + var error_1 = __importDefault(require_lib8()); + var global_bin_dir_1 = __importDefault(require_lib9()); + var camelcase_1 = __importDefault(require_camelcase()); + var npm_conf_1 = __importDefault(require_npm_conf()); + var types_1 = __importDefault(require_types2()); + var can_write_to_dir_1 = require_can_write_to_dir(); + var fromPairs_1 = __importDefault(require_fromPairs()); + var realpath_missing_1 = __importDefault(require_realpath_missing()); + var which_1 = __importDefault(require_which()); + var getScopeRegistries_1 = __importStar2(require_getScopeRegistries()); + var findBestGlobalPrefix_1 = __importDefault(require_findBestGlobalPrefix()); + var dirs_1 = require_dirs(); + var concurrency_1 = require_concurrency(); + var npmDefaults = npm_conf_1.default.defaults; + var PNPM_GLOBAL = "pnpm-global"; + async function which(cmd) { + return new Promise((resolve, reject) => { + which_1.default(cmd, (err, resolvedPath) => err != null ? reject(err) : resolve(resolvedPath)); + }); + } + exports2.types = Object.assign({ + bail: Boolean, + "cache-dir": String, + "child-concurrency": Number, + color: ["always", "auto", "never"], + dev: [null, true], + dir: String, + "enable-modules-dir": Boolean, + "enable-pre-post-scripts": Boolean, + "extend-node-path": Boolean, + "fetch-timeout": Number, + "fetching-concurrency": Number, + filter: [String, Array], + "filter-prod": [String, Array], + "frozen-lockfile": Boolean, + "frozen-shrinkwrap": Boolean, + "git-checks": Boolean, + "global-bin-dir": String, + "global-dir": String, + "global-path": String, + "global-pnpmfile": String, + hoist: Boolean, + "hoist-pattern": Array, + "ignore-pnpmfile": Boolean, + "ignore-workspace-root-check": Boolean, + "link-workspace-packages": [Boolean, "deep"], + lockfile: Boolean, + "lockfile-dir": String, + "lockfile-directory": String, + "lockfile-only": Boolean, + loglevel: ["silent", "error", "warn", "info", "debug"], + "modules-cache-max-age": Number, + "modules-dir": String, + "network-concurrency": Number, + "node-linker": ["pnp"], + noproxy: String, + "npm-path": String, + offline: Boolean, + "package-import-method": ["auto", "hardlink", "clone", "copy"], + pnpmfile: String, + "prefer-frozen-lockfile": Boolean, + "prefer-frozen-shrinkwrap": Boolean, + "prefer-offline": Boolean, + "prefer-workspace-packages": Boolean, + production: [null, true], + "public-hoist-pattern": Array, + "publish-branch": String, + "recursive-install": Boolean, + reporter: String, + "save-peer": Boolean, + "save-workspace-protocol": Boolean, + "script-shell": String, + "shamefully-flatten": Boolean, + "shamefully-hoist": Boolean, + "shared-workspace-lockfile": Boolean, + "shared-workspace-shrinkwrap": Boolean, + "shell-emulator": Boolean, + "shrinkwrap-directory": String, + "shrinkwrap-only": Boolean, + "side-effects-cache": Boolean, + "side-effects-cache-readonly": Boolean, + symlink: Boolean, + sort: Boolean, + "state-dir": String, + store: String, + "store-dir": String, + stream: Boolean, + "strict-peer-dependencies": Boolean, + "use-beta-cli": Boolean, + "use-node-version": String, + "use-running-store-server": Boolean, + "use-store-server": Boolean, + "use-stderr": Boolean, + "verify-store-integrity": Boolean, + "virtual-store-dir": String, + "workspace-concurrency": Number, + "workspace-packages": [String, Array], + "workspace-root": Boolean, + "test-pattern": [String, Array], + "changed-files-ignore-pattern": [String, Array] + }, types_1.default.types); + exports2.default = async (opts) => { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; + const packageManager = (_a = opts.packageManager) !== null && _a !== void 0 ? _a : { name: "pnpm", version: "undefined" }; + const cliOptions = (_b = opts.cliOptions) !== null && _b !== void 0 ? _b : {}; + const warnings = new Array(); + if (cliOptions["hoist"] === false) { + if (cliOptions["shamefully-hoist"] === true) { + throw new error_1.default("CONFIG_CONFLICT_HOIST", "--shamefully-hoist cannot be used with --no-hoist"); + } + if (cliOptions["shamefully-flatten"] === true) { + throw new error_1.default("CONFIG_CONFLICT_HOIST", "--shamefully-flatten cannot be used with --no-hoist"); + } + if (cliOptions["hoist-pattern"]) { + throw new error_1.default("CONFIG_CONFLICT_HOIST", "--hoist-pattern cannot be used with --no-hoist"); + } + } + const originalExecPath = process.execPath; + try { + const node = await which(process.argv[0]); + if (node.toUpperCase() !== process.execPath.toUpperCase()) { + process.execPath = node; + } + } catch (err) { + } + if (cliOptions.dir) { + cliOptions.dir = await realpath_missing_1.default(cliOptions.dir); + cliOptions["prefix"] = cliOptions.dir; + } + const rcOptionsTypes = { ...exports2.types, ...opts.rcOptionsTypes }; + const npmConfig = npm_conf_1.default(cliOptions, rcOptionsTypes, { + bail: true, + color: "auto", + "enable-modules-dir": true, + "extend-node-path": true, + "fetch-retries": 2, + "fetch-retry-factor": 10, + "fetch-retry-maxtimeout": 6e4, + "fetch-retry-mintimeout": 1e4, + "fetch-timeout": 6e4, + globalconfig: npmDefaults.globalconfig, + hoist: true, + "hoist-pattern": ["*"], + "ignore-workspace-root-check": false, + "link-workspace-packages": true, + "modules-cache-max-age": 7 * 24 * 60, + "package-lock": npmDefaults["package-lock"], + pending: false, + "prefer-workspace-packages": false, + "public-hoist-pattern": [ + "*types*", + "*eslint*", + "@prettier/plugin-*", + "*prettier-plugin-*" + ], + "recursive-install": true, + registry: npmDefaults.registry, + "save-peer": false, + "save-workspace-protocol": true, + symlink: true, + "shared-workspace-lockfile": true, + "shared-workspace-shrinkwrap": true, + "shell-emulator": false, + shrinkwrap: npmDefaults.shrinkwrap, + reverse: false, + sort: true, + "strict-peer-dependencies": false, + "unsafe-perm": npmDefaults["unsafe-perm"], + "use-beta-cli": false, + userconfig: npmDefaults.userconfig, + "virtual-store-dir": "node_modules/.pnpm", + "workspace-concurrency": 4, + "workspace-prefix": opts.workspaceDir + }); + delete cliOptions.prefix; + process.execPath = originalExecPath; + const rcOptions = Object.keys(rcOptionsTypes); + const pnpmConfig = fromPairs_1.default([ + ...rcOptions.map((configKey) => [camelcase_1.default(configKey), npmConfig.get(configKey)]), + ...Object.entries(cliOptions).filter(([name, value]) => typeof value !== "undefined").map(([name, value]) => [camelcase_1.default(name), value]) + ]); + const cwd = (_c = cliOptions.dir && path_1.default.resolve(cliOptions.dir)) !== null && _c !== void 0 ? _c : npmConfig.localPrefix; + pnpmConfig.workspaceDir = opts.workspaceDir; + pnpmConfig.workspaceRoot = cliOptions["workspace-root"]; + pnpmConfig.rawLocalConfig = Object.assign.apply(Object, [ + {}, + ...npmConfig.list.slice(3, pnpmConfig.workspaceDir && pnpmConfig.workspaceDir !== cwd ? 5 : 4).reverse(), + cliOptions + ]); + pnpmConfig.userAgent = pnpmConfig.rawLocalConfig["user-agent"] ? pnpmConfig.rawLocalConfig["user-agent"] : `${packageManager.name}/${packageManager.version} npm/? node/${process.version} ${process.platform} ${process.arch}`; + pnpmConfig.rawConfig = Object.assign.apply(Object, [ + { registry: "https://registry.npmjs.org/" }, + ...[...npmConfig.list].reverse(), + cliOptions, + { "user-agent": pnpmConfig.userAgent } + ]); + pnpmConfig.registries = { + default: getScopeRegistries_1.normalizeRegistry(pnpmConfig.rawConfig.registry), + ...getScopeRegistries_1.default(pnpmConfig.rawConfig) + }; + pnpmConfig.lockfileDir = (_e = (_d = pnpmConfig.lockfileDir) !== null && _d !== void 0 ? _d : pnpmConfig.lockfileDirectory) !== null && _e !== void 0 ? _e : pnpmConfig.shrinkwrapDirectory; + pnpmConfig.useLockfile = (() => { + if (typeof pnpmConfig["lockfile"] === "boolean") + return pnpmConfig["lockfile"]; + if (typeof pnpmConfig["packageLock"] === "boolean") + return pnpmConfig["packageLock"]; + if (typeof pnpmConfig["shrinkwrap"] === "boolean") + return pnpmConfig["shrinkwrap"]; + return false; + })(); + pnpmConfig.lockfileOnly = typeof pnpmConfig["lockfileOnly"] === "undefined" ? pnpmConfig.shrinkwrapOnly : pnpmConfig["lockfileOnly"]; + pnpmConfig.frozenLockfile = typeof pnpmConfig["frozenLockfile"] === "undefined" ? pnpmConfig.frozenShrinkwrap : pnpmConfig["frozenLockfile"]; + pnpmConfig.preferFrozenLockfile = typeof pnpmConfig["preferFrozenLockfile"] === "undefined" ? pnpmConfig.preferFrozenShrinkwrap : pnpmConfig["preferFrozenLockfile"]; + pnpmConfig.sharedWorkspaceLockfile = typeof pnpmConfig["sharedWorkspaceLockfile"] === "undefined" ? pnpmConfig.sharedWorkspaceShrinkwrap : pnpmConfig["sharedWorkspaceLockfile"]; + pnpmConfig.pnpmHomeDir = dirs_1.getDataDir(process); + if (cliOptions["global"]) { + const knownGlobalBinDirCandidates = []; + let globalDirRoot; + if (pnpmConfig["globalDir"]) { + globalDirRoot = pnpmConfig["globalDir"]; + } else if (pnpmConfig.useBetaCli) { + globalDirRoot = path_1.default.join(pnpmConfig.pnpmHomeDir, "global-packages"); + } else { + let npmGlobalPrefix = findBestGlobalPrefix_1.default(npmConfig.globalPrefix, process.env); + const globalDirName = `${path_1.default.sep}${PNPM_GLOBAL}${path_1.default.sep}`; + if (npmGlobalPrefix.includes(globalDirName)) { + npmGlobalPrefix = npmGlobalPrefix.substring(0, npmGlobalPrefix.indexOf(globalDirName)); + } else { + const npmGlobalBinDir = process.platform === "win32" ? npmGlobalPrefix : path_1.default.resolve(npmGlobalPrefix, "bin"); + knownGlobalBinDirCandidates.push(npmGlobalBinDir); + } + globalDirRoot = path_1.default.join(firstWithWriteAccess([npmGlobalPrefix, os_1.default.homedir()]), PNPM_GLOBAL); + } + pnpmConfig.dir = path_1.default.join(globalDirRoot, constants_1.LAYOUT_VERSION.toString()); + const npmConfigGlobalBinDir = npmConfig.get("global-bin-dir"); + if (typeof npmConfigGlobalBinDir === "string") { + fs_1.default.mkdirSync(npmConfigGlobalBinDir, { recursive: true }); + pnpmConfig.bin = npmConfigGlobalBinDir; + } else { + pnpmConfig.bin = cliOptions.dir ? process.platform === "win32" ? cliOptions.dir : path_1.default.resolve(cliOptions.dir, "bin") : global_bin_dir_1.default(knownGlobalBinDirCandidates, { shouldAllowWrite: opts.globalDirShouldAllowWrite === true }); + } + pnpmConfig.save = true; + pnpmConfig.allowNew = true; + pnpmConfig.ignoreCurrentPrefs = true; + pnpmConfig.saveProd = true; + pnpmConfig.saveDev = false; + pnpmConfig.saveOptional = false; + pnpmConfig.extendNodePath = false; + if (pnpmConfig.hoistPattern != null && (pnpmConfig.hoistPattern.length > 1 || pnpmConfig.hoistPattern[0] !== "*")) { + if (opts.cliOptions["hoist-pattern"]) { + throw new error_1.default("CONFIG_CONFLICT_HOIST_PATTERN_WITH_GLOBAL", 'Configuration conflict. "hoist-pattern" may not be used with "global"'); + } + } + if (pnpmConfig.linkWorkspacePackages) { + if (opts.cliOptions["link-workspace-packages"]) { + throw new error_1.default("CONFIG_CONFLICT_LINK_WORKSPACE_PACKAGES_WITH_GLOBAL", 'Configuration conflict. "link-workspace-packages" may not be used with "global"'); + } + pnpmConfig.linkWorkspacePackages = false; + } + if (pnpmConfig.sharedWorkspaceLockfile) { + if (opts.cliOptions["shared-workspace-lockfile"]) { + throw new error_1.default("CONFIG_CONFLICT_SHARED_WORKSPACE_LOCKFILE_WITH_GLOBAL", 'Configuration conflict. "shared-workspace-lockfile" may not be used with "global"'); + } + pnpmConfig.sharedWorkspaceLockfile = false; + } + if (pnpmConfig.lockfileDir) { + if (opts.cliOptions["lockfile-dir"]) { + throw new error_1.default("CONFIG_CONFLICT_LOCKFILE_DIR_WITH_GLOBAL", 'Configuration conflict. "lockfile-dir" may not be used with "global"'); + } + delete pnpmConfig.lockfileDir; + } + if (opts.cliOptions["virtual-store-dir"]) { + throw new error_1.default("CONFIG_CONFLICT_VIRTUAL_STORE_DIR_WITH_GLOBAL", 'Configuration conflict. "virtual-store-dir" may not be used with "global"'); + } + delete pnpmConfig.virtualStoreDir; + } else { + pnpmConfig.dir = cwd; + pnpmConfig.bin = path_1.default.join(pnpmConfig.dir, "node_modules", ".bin"); + } + if (opts.cliOptions["save-peer"]) { + if (opts.cliOptions["save-prod"]) { + throw new error_1.default("CONFIG_CONFLICT_PEER_CANNOT_BE_PROD_DEP", "A package cannot be a peer dependency and a prod dependency at the same time"); + } + if (opts.cliOptions["save-optional"]) { + throw new error_1.default("CONFIG_CONFLICT_PEER_CANNOT_BE_OPTIONAL_DEP", "A package cannot be a peer dependency and an optional dependency at the same time"); + } + } + if (pnpmConfig.sharedWorkspaceLockfile && !pnpmConfig.lockfileDir && pnpmConfig.workspaceDir) { + pnpmConfig.lockfileDir = pnpmConfig.workspaceDir; + } + pnpmConfig.packageManager = packageManager; + if (pnpmConfig.only === "prod" || pnpmConfig.only === "production" || !pnpmConfig.only && pnpmConfig.production) { + pnpmConfig.production = true; + pnpmConfig.dev = false; + } else if (pnpmConfig.only === "dev" || pnpmConfig.only === "development" || pnpmConfig.dev) { + pnpmConfig.production = false; + pnpmConfig.dev = true; + pnpmConfig.optional = false; + } else { + pnpmConfig.production = true; + pnpmConfig.dev = true; + } + if (typeof pnpmConfig.filter === "string") { + pnpmConfig.filter = pnpmConfig.filter.split(" "); + } + if (typeof pnpmConfig.filterProd === "string") { + pnpmConfig.filterProd = pnpmConfig.filterProd.split(" "); + } + if (!pnpmConfig.ignoreScripts && pnpmConfig.workspaceDir) { + pnpmConfig.extraBinPaths = [path_1.default.join(pnpmConfig.workspaceDir, "node_modules", ".bin")]; + } else { + pnpmConfig.extraBinPaths = []; + } + if (pnpmConfig["shamefullyFlatten"]) { + warnings.push(`The "shamefully-flatten" setting has been renamed to "shamefully-hoist". Also, in most cases you won't need "shamefully-hoist". Since v4, a semistrict node_modules structure is on by default (via hoist-pattern=[*]).`); + pnpmConfig.shamefullyHoist = true; + } + if (!pnpmConfig.storeDir && pnpmConfig["store"]) { + warnings.push('The "store" setting has been renamed to "store-dir". Please use the new name.'); + pnpmConfig.storeDir = pnpmConfig["store"]; + } + if (!pnpmConfig.cacheDir) { + pnpmConfig.cacheDir = dirs_1.getCacheDir(process); + } + if (!pnpmConfig.stateDir) { + pnpmConfig.stateDir = dirs_1.getStateDir(process); + } + if (pnpmConfig["hoist"] === false) { + delete pnpmConfig.hoistPattern; + } + switch (pnpmConfig.shamefullyHoist) { + case false: + delete pnpmConfig.publicHoistPattern; + break; + case true: + pnpmConfig.publicHoistPattern = ["*"]; + break; + default: + if (pnpmConfig.publicHoistPattern == null || pnpmConfig.publicHoistPattern === "" || Array.isArray(pnpmConfig.publicHoistPattern) && pnpmConfig.publicHoistPattern.length === 1 && pnpmConfig.publicHoistPattern[0] === "") { + delete pnpmConfig.publicHoistPattern; + } + break; + } + if (!pnpmConfig.symlink) { + delete pnpmConfig.hoistPattern; + delete pnpmConfig.publicHoistPattern; + } + if (typeof pnpmConfig["color"] === "boolean") { + switch (pnpmConfig["color"]) { + case true: + pnpmConfig.color = "always"; + break; + case false: + pnpmConfig.color = "never"; + break; + default: + pnpmConfig.color = "auto"; + break; + } + } + if (!pnpmConfig.httpsProxy) { + pnpmConfig.httpsProxy = (_f = pnpmConfig.proxy) !== null && _f !== void 0 ? _f : getProcessEnv("https_proxy"); + } + if (!pnpmConfig.httpProxy) { + pnpmConfig.httpProxy = (_h = (_g = pnpmConfig.httpsProxy) !== null && _g !== void 0 ? _g : getProcessEnv("http_proxy")) !== null && _h !== void 0 ? _h : getProcessEnv("proxy"); + } + if (!pnpmConfig.noProxy) { + pnpmConfig.noProxy = (_j = pnpmConfig["noproxy"]) !== null && _j !== void 0 ? _j : getProcessEnv("no_proxy"); + } + pnpmConfig.enablePnp = pnpmConfig["nodeLinker"] === "pnp"; + if (opts.checkUnknownSetting) { + const settingKeys = Object.keys({ + ...(_l = (_k = npmConfig === null || npmConfig === void 0 ? void 0 : npmConfig.sources) === null || _k === void 0 ? void 0 : _k.workspace) === null || _l === void 0 ? void 0 : _l.data, + ...(_o = (_m = npmConfig === null || npmConfig === void 0 ? void 0 : npmConfig.sources) === null || _m === void 0 ? void 0 : _m.project) === null || _o === void 0 ? void 0 : _o.data + }).filter((key) => key.trim() !== ""); + const unknownKeys = []; + for (const key of settingKeys) { + if (!rcOptions.includes(key) && !key.startsWith("//") && !(key.startsWith("@") && key.endsWith(":registry"))) { + unknownKeys.push(key); + } + } + if (unknownKeys.length > 0) { + warnings.push(`Your .npmrc file contains unknown setting: ${unknownKeys.join(", ")}`); + } + } + pnpmConfig.workspaceConcurrency = concurrency_1.getWorkspaceConcurrency(pnpmConfig.workspaceConcurrency); + return { config: pnpmConfig, warnings }; + }; + function getProcessEnv(env) { + var _a, _b; + return (_b = (_a = process.env[env]) !== null && _a !== void 0 ? _a : process.env[env.toUpperCase()]) !== null && _b !== void 0 ? _b : process.env[env.toLowerCase()]; + } + function firstWithWriteAccess(dirs) { + const first = dirs.find((dir) => { + try { + return can_write_to_dir_1.sync(dir); + } catch (err) { + if (err.code !== "ENOENT") + throw err; + } + try { + fs_1.default.mkdirSync(dir, { recursive: true }); + return true; + } catch (err) { + return false; + } + }); + if (first == null) { + throw new error_1.default("NO_SUITABLE_GLOBAL_DIR", `pnpm has no write access to global direcotry. Tried locations: ${dirs.join(", ")}`); + } + return first; + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isFunction.js +var require_isFunction = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isFunction.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isFunction = void 0; + function isFunction(value) { + return typeof value === "function"; + } + exports2.isFunction = isFunction; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js +var require_createErrorClass = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createErrorClass = void 0; + function createErrorClass(createImpl) { + var _super = function(instance) { + Error.call(instance); + instance.stack = new Error().stack; + }; + var ctorFunc = createImpl(_super); + ctorFunc.prototype = Object.create(Error.prototype); + ctorFunc.prototype.constructor = ctorFunc; + return ctorFunc; + } + exports2.createErrorClass = createErrorClass; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js +var require_UnsubscriptionError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UnsubscriptionError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.UnsubscriptionError = createErrorClass_1.createErrorClass(function(_super) { + return function UnsubscriptionErrorImpl(errors) { + _super(this); + this.message = errors ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function(err, i) { + return i + 1 + ") " + err.toString(); + }).join("\n ") : ""; + this.name = "UnsubscriptionError"; + this.errors = errors; + }; + }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/arrRemove.js +var require_arrRemove = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/arrRemove.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.arrRemove = void 0; + function arrRemove(arr, item) { + if (arr) { + var index = arr.indexOf(item); + 0 <= index && arr.splice(index, 1); + } + } + exports2.arrRemove = arrRemove; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Subscription.js +var require_Subscription = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Subscription.js"(exports2) { + "use strict"; + var __values = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isSubscription = exports2.EMPTY_SUBSCRIPTION = exports2.Subscription = void 0; + var isFunction_1 = require_isFunction(); + var UnsubscriptionError_1 = require_UnsubscriptionError(); + var arrRemove_1 = require_arrRemove(); + var Subscription = function() { + function Subscription2(initialTeardown) { + this.initialTeardown = initialTeardown; + this.closed = false; + this._parentage = null; + this._teardowns = null; + } + Subscription2.prototype.unsubscribe = function() { + var e_1, _a, e_2, _b; + var errors; + if (!this.closed) { + this.closed = true; + var _parentage = this._parentage; + if (_parentage) { + this._parentage = null; + if (Array.isArray(_parentage)) { + try { + for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) { + var parent_1 = _parentage_1_1.value; + parent_1.remove(this); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) + _a.call(_parentage_1); + } finally { + if (e_1) + throw e_1.error; + } + } + } else { + _parentage.remove(this); + } + } + var initialTeardown = this.initialTeardown; + if (isFunction_1.isFunction(initialTeardown)) { + try { + initialTeardown(); + } catch (e) { + errors = e instanceof UnsubscriptionError_1.UnsubscriptionError ? e.errors : [e]; + } + } + var _teardowns = this._teardowns; + if (_teardowns) { + this._teardowns = null; + try { + for (var _teardowns_1 = __values(_teardowns), _teardowns_1_1 = _teardowns_1.next(); !_teardowns_1_1.done; _teardowns_1_1 = _teardowns_1.next()) { + var teardown_1 = _teardowns_1_1.value; + try { + execTeardown(teardown_1); + } catch (err) { + errors = errors !== null && errors !== void 0 ? errors : []; + if (err instanceof UnsubscriptionError_1.UnsubscriptionError) { + errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors)); + } else { + errors.push(err); + } + } + } + } catch (e_2_1) { + e_2 = { error: e_2_1 }; + } finally { + try { + if (_teardowns_1_1 && !_teardowns_1_1.done && (_b = _teardowns_1.return)) + _b.call(_teardowns_1); + } finally { + if (e_2) + throw e_2.error; + } + } + } + if (errors) { + throw new UnsubscriptionError_1.UnsubscriptionError(errors); + } + } + }; + Subscription2.prototype.add = function(teardown) { + var _a; + if (teardown && teardown !== this) { + if (this.closed) { + execTeardown(teardown); + } else { + if (teardown instanceof Subscription2) { + if (teardown.closed || teardown._hasParent(this)) { + return; + } + teardown._addParent(this); + } + (this._teardowns = (_a = this._teardowns) !== null && _a !== void 0 ? _a : []).push(teardown); + } + } + }; + Subscription2.prototype._hasParent = function(parent) { + var _parentage = this._parentage; + return _parentage === parent || Array.isArray(_parentage) && _parentage.includes(parent); + }; + Subscription2.prototype._addParent = function(parent) { + var _parentage = this._parentage; + this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent; + }; + Subscription2.prototype._removeParent = function(parent) { + var _parentage = this._parentage; + if (_parentage === parent) { + this._parentage = null; + } else if (Array.isArray(_parentage)) { + arrRemove_1.arrRemove(_parentage, parent); + } + }; + Subscription2.prototype.remove = function(teardown) { + var _teardowns = this._teardowns; + _teardowns && arrRemove_1.arrRemove(_teardowns, teardown); + if (teardown instanceof Subscription2) { + teardown._removeParent(this); + } + }; + Subscription2.EMPTY = function() { + var empty = new Subscription2(); + empty.closed = true; + return empty; + }(); + return Subscription2; + }(); + exports2.Subscription = Subscription; + exports2.EMPTY_SUBSCRIPTION = Subscription.EMPTY; + function isSubscription(value) { + return value instanceof Subscription || value && "closed" in value && isFunction_1.isFunction(value.remove) && isFunction_1.isFunction(value.add) && isFunction_1.isFunction(value.unsubscribe); + } + exports2.isSubscription = isSubscription; + function execTeardown(teardown) { + if (isFunction_1.isFunction(teardown)) { + teardown(); + } else { + teardown.unsubscribe(); + } + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/config.js +var require_config = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/config.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.config = void 0; + exports2.config = { + onUnhandledError: null, + onStoppedNotification: null, + Promise: void 0, + useDeprecatedSynchronousErrorHandling: false, + useDeprecatedNextContext: false + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js +var require_timeoutProvider = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.timeoutProvider = void 0; + exports2.timeoutProvider = { + setTimeout: function() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var delegate = exports2.timeoutProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) || setTimeout).apply(void 0, __spreadArray([], __read(args2))); + }, + clearTimeout: function(handle) { + var delegate = exports2.timeoutProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle); + }, + delegate: void 0 + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js +var require_reportUnhandledError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.reportUnhandledError = void 0; + var config_1 = require_config(); + var timeoutProvider_1 = require_timeoutProvider(); + function reportUnhandledError(err) { + timeoutProvider_1.timeoutProvider.setTimeout(function() { + var onUnhandledError = config_1.config.onUnhandledError; + if (onUnhandledError) { + onUnhandledError(err); + } else { + throw err; + } + }); + } + exports2.reportUnhandledError = reportUnhandledError; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/noop.js +var require_noop = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/noop.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.noop = void 0; + function noop() { + } + exports2.noop = noop; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/NotificationFactories.js +var require_NotificationFactories = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/NotificationFactories.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createNotification = exports2.nextNotification = exports2.errorNotification = exports2.COMPLETE_NOTIFICATION = void 0; + exports2.COMPLETE_NOTIFICATION = function() { + return createNotification("C", void 0, void 0); + }(); + function errorNotification(error) { + return createNotification("E", void 0, error); + } + exports2.errorNotification = errorNotification; + function nextNotification(value) { + return createNotification("N", value, void 0); + } + exports2.nextNotification = nextNotification; + function createNotification(kind, value, error) { + return { + kind, + value, + error + }; + } + exports2.createNotification = createNotification; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/errorContext.js +var require_errorContext = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/errorContext.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.captureError = exports2.errorContext = void 0; + var config_1 = require_config(); + var context = null; + function errorContext(cb) { + if (config_1.config.useDeprecatedSynchronousErrorHandling) { + var isRoot = !context; + if (isRoot) { + context = { errorThrown: false, error: null }; + } + cb(); + if (isRoot) { + var _a = context, errorThrown = _a.errorThrown, error = _a.error; + context = null; + if (errorThrown) { + throw error; + } + } + } else { + cb(); + } + } + exports2.errorContext = errorContext; + function captureError(err) { + if (config_1.config.useDeprecatedSynchronousErrorHandling && context) { + context.errorThrown = true; + context.error = err; + } + } + exports2.captureError = captureError; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Subscriber.js +var require_Subscriber = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Subscriber.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.EMPTY_OBSERVER = exports2.SafeSubscriber = exports2.Subscriber = void 0; + var isFunction_1 = require_isFunction(); + var Subscription_1 = require_Subscription(); + var config_1 = require_config(); + var reportUnhandledError_1 = require_reportUnhandledError(); + var noop_1 = require_noop(); + var NotificationFactories_1 = require_NotificationFactories(); + var timeoutProvider_1 = require_timeoutProvider(); + var errorContext_1 = require_errorContext(); + var Subscriber = function(_super) { + __extends(Subscriber2, _super); + function Subscriber2(destination) { + var _this = _super.call(this) || this; + _this.isStopped = false; + if (destination) { + _this.destination = destination; + if (Subscription_1.isSubscription(destination)) { + destination.add(_this); + } + } else { + _this.destination = exports2.EMPTY_OBSERVER; + } + return _this; + } + Subscriber2.create = function(next, error, complete) { + return new SafeSubscriber(next, error, complete); + }; + Subscriber2.prototype.next = function(value) { + if (this.isStopped) { + handleStoppedNotification(NotificationFactories_1.nextNotification(value), this); + } else { + this._next(value); + } + }; + Subscriber2.prototype.error = function(err) { + if (this.isStopped) { + handleStoppedNotification(NotificationFactories_1.errorNotification(err), this); + } else { + this.isStopped = true; + this._error(err); + } + }; + Subscriber2.prototype.complete = function() { + if (this.isStopped) { + handleStoppedNotification(NotificationFactories_1.COMPLETE_NOTIFICATION, this); + } else { + this.isStopped = true; + this._complete(); + } + }; + Subscriber2.prototype.unsubscribe = function() { + if (!this.closed) { + this.isStopped = true; + _super.prototype.unsubscribe.call(this); + this.destination = null; + } + }; + Subscriber2.prototype._next = function(value) { + this.destination.next(value); + }; + Subscriber2.prototype._error = function(err) { + try { + this.destination.error(err); + } finally { + this.unsubscribe(); + } + }; + Subscriber2.prototype._complete = function() { + try { + this.destination.complete(); + } finally { + this.unsubscribe(); + } + }; + return Subscriber2; + }(Subscription_1.Subscription); + exports2.Subscriber = Subscriber; + var SafeSubscriber = function(_super) { + __extends(SafeSubscriber2, _super); + function SafeSubscriber2(observerOrNext, error, complete) { + var _this = _super.call(this) || this; + var next; + if (isFunction_1.isFunction(observerOrNext)) { + next = observerOrNext; + } else if (observerOrNext) { + next = observerOrNext.next, error = observerOrNext.error, complete = observerOrNext.complete; + var context_1; + if (_this && config_1.config.useDeprecatedNextContext) { + context_1 = Object.create(observerOrNext); + context_1.unsubscribe = function() { + return _this.unsubscribe(); + }; + } else { + context_1 = observerOrNext; + } + next = next === null || next === void 0 ? void 0 : next.bind(context_1); + error = error === null || error === void 0 ? void 0 : error.bind(context_1); + complete = complete === null || complete === void 0 ? void 0 : complete.bind(context_1); + } + _this.destination = { + next: next ? wrapForErrorHandling(next, _this) : noop_1.noop, + error: wrapForErrorHandling(error !== null && error !== void 0 ? error : defaultErrorHandler, _this), + complete: complete ? wrapForErrorHandling(complete, _this) : noop_1.noop + }; + return _this; + } + return SafeSubscriber2; + }(Subscriber); + exports2.SafeSubscriber = SafeSubscriber; + function wrapForErrorHandling(handler, instance) { + return function() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + try { + handler.apply(void 0, __spreadArray([], __read(args2))); + } catch (err) { + if (config_1.config.useDeprecatedSynchronousErrorHandling) { + errorContext_1.captureError(err); + } else { + reportUnhandledError_1.reportUnhandledError(err); + } + } + }; + } + function defaultErrorHandler(err) { + throw err; + } + function handleStoppedNotification(notification, subscriber) { + var onStoppedNotification = config_1.config.onStoppedNotification; + onStoppedNotification && timeoutProvider_1.timeoutProvider.setTimeout(function() { + return onStoppedNotification(notification, subscriber); + }); + } + exports2.EMPTY_OBSERVER = { + closed: true, + next: noop_1.noop, + error: defaultErrorHandler, + complete: noop_1.noop + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/symbol/observable.js +var require_observable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/symbol/observable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.observable = void 0; + exports2.observable = function() { + return typeof Symbol === "function" && Symbol.observable || "@@observable"; + }(); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/identity.js +var require_identity = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/identity.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.identity = void 0; + function identity(x) { + return x; + } + exports2.identity = identity; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/pipe.js +var require_pipe = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/pipe.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pipeFromArray = exports2.pipe = void 0; + var identity_1 = require_identity(); + function pipe() { + var fns = []; + for (var _i = 0; _i < arguments.length; _i++) { + fns[_i] = arguments[_i]; + } + return pipeFromArray(fns); + } + exports2.pipe = pipe; + function pipeFromArray(fns) { + if (fns.length === 0) { + return identity_1.identity; + } + if (fns.length === 1) { + return fns[0]; + } + return function piped(input) { + return fns.reduce(function(prev, fn2) { + return fn2(prev); + }, input); + }; + } + exports2.pipeFromArray = pipeFromArray; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Observable.js +var require_Observable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Observable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Observable = void 0; + var Subscriber_1 = require_Subscriber(); + var Subscription_1 = require_Subscription(); + var observable_1 = require_observable(); + var pipe_1 = require_pipe(); + var config_1 = require_config(); + var isFunction_1 = require_isFunction(); + var errorContext_1 = require_errorContext(); + var Observable = function() { + function Observable2(subscribe) { + if (subscribe) { + this._subscribe = subscribe; + } + } + Observable2.prototype.lift = function(operator) { + var observable = new Observable2(); + observable.source = this; + observable.operator = operator; + return observable; + }; + Observable2.prototype.subscribe = function(observerOrNext, error, complete) { + var _this = this; + var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new Subscriber_1.SafeSubscriber(observerOrNext, error, complete); + errorContext_1.errorContext(function() { + var _a = _this, operator = _a.operator, source = _a.source; + subscriber.add(operator ? operator.call(subscriber, source) : source ? _this._subscribe(subscriber) : _this._trySubscribe(subscriber)); + }); + return subscriber; + }; + Observable2.prototype._trySubscribe = function(sink) { + try { + return this._subscribe(sink); + } catch (err) { + sink.error(err); + } + }; + Observable2.prototype.forEach = function(next, promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor(function(resolve, reject) { + var subscription; + subscription = _this.subscribe(function(value) { + try { + next(value); + } catch (err) { + reject(err); + subscription === null || subscription === void 0 ? void 0 : subscription.unsubscribe(); + } + }, reject, resolve); + }); + }; + Observable2.prototype._subscribe = function(subscriber) { + var _a; + return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber); + }; + Observable2.prototype[observable_1.observable] = function() { + return this; + }; + Observable2.prototype.pipe = function() { + var operations = []; + for (var _i = 0; _i < arguments.length; _i++) { + operations[_i] = arguments[_i]; + } + return pipe_1.pipeFromArray(operations)(this); + }; + Observable2.prototype.toPromise = function(promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor(function(resolve, reject) { + var value; + _this.subscribe(function(x) { + return value = x; + }, function(err) { + return reject(err); + }, function() { + return resolve(value); + }); + }); + }; + Observable2.create = function(subscribe) { + return new Observable2(subscribe); + }; + return Observable2; + }(); + exports2.Observable = Observable; + function getPromiseCtor(promiseCtor) { + var _a; + return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config_1.config.Promise) !== null && _a !== void 0 ? _a : Promise; + } + function isObserver(value) { + return value && isFunction_1.isFunction(value.next) && isFunction_1.isFunction(value.error) && isFunction_1.isFunction(value.complete); + } + function isSubscriber(value) { + return value && value instanceof Subscriber_1.Subscriber || isObserver(value) && Subscription_1.isSubscription(value); + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/lift.js +var require_lift = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/lift.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.operate = exports2.hasLift = void 0; + var isFunction_1 = require_isFunction(); + function hasLift(source) { + return isFunction_1.isFunction(source === null || source === void 0 ? void 0 : source.lift); + } + exports2.hasLift = hasLift; + function operate(init) { + return function(source) { + if (hasLift(source)) { + return source.lift(function(liftedSource) { + try { + return init(liftedSource, this); + } catch (err) { + this.error(err); + } + }); + } + throw new TypeError("Unable to lift unknown Observable type"); + }; + } + exports2.operate = operate; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js +var require_OperatorSubscriber = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OperatorSubscriber = void 0; + var Subscriber_1 = require_Subscriber(); + var OperatorSubscriber = function(_super) { + __extends(OperatorSubscriber2, _super); + function OperatorSubscriber2(destination, onNext, onComplete, onError, onFinalize) { + var _this = _super.call(this, destination) || this; + _this.onFinalize = onFinalize; + _this._next = onNext ? function(value) { + try { + onNext(value); + } catch (err) { + destination.error(err); + } + } : _super.prototype._next; + _this._error = onError ? function(err) { + try { + onError(err); + } catch (err2) { + destination.error(err2); + } finally { + this.unsubscribe(); + } + } : _super.prototype._error; + _this._complete = onComplete ? function() { + try { + onComplete(); + } catch (err) { + destination.error(err); + } finally { + this.unsubscribe(); + } + } : _super.prototype._complete; + return _this; + } + OperatorSubscriber2.prototype.unsubscribe = function() { + var _a; + var closed = this.closed; + _super.prototype.unsubscribe.call(this); + !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this)); + }; + return OperatorSubscriber2; + }(Subscriber_1.Subscriber); + exports2.OperatorSubscriber = OperatorSubscriber; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/refCount.js +var require_refCount = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/refCount.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.refCount = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function refCount() { + return lift_1.operate(function(source, subscriber) { + var connection = null; + source._refCount++; + var refCounter = new OperatorSubscriber_1.OperatorSubscriber(subscriber, void 0, void 0, void 0, function() { + if (!source || source._refCount <= 0 || 0 < --source._refCount) { + connection = null; + return; + } + var sharedConnection = source._connection; + var conn = connection; + connection = null; + if (sharedConnection && (!conn || sharedConnection === conn)) { + sharedConnection.unsubscribe(); + } + subscriber.unsubscribe(); + }); + source.subscribe(refCounter); + if (!refCounter.closed) { + connection = source.connect(); + } + }); + } + exports2.refCount = refCount; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js +var require_ConnectableObservable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ConnectableObservable = void 0; + var Observable_1 = require_Observable(); + var Subscription_1 = require_Subscription(); + var refCount_1 = require_refCount(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var lift_1 = require_lift(); + var ConnectableObservable = function(_super) { + __extends(ConnectableObservable2, _super); + function ConnectableObservable2(source, subjectFactory) { + var _this = _super.call(this) || this; + _this.source = source; + _this.subjectFactory = subjectFactory; + _this._subject = null; + _this._refCount = 0; + _this._connection = null; + if (lift_1.hasLift(source)) { + _this.lift = source.lift; + } + return _this; + } + ConnectableObservable2.prototype._subscribe = function(subscriber) { + return this.getSubject().subscribe(subscriber); + }; + ConnectableObservable2.prototype.getSubject = function() { + var subject = this._subject; + if (!subject || subject.isStopped) { + this._subject = this.subjectFactory(); + } + return this._subject; + }; + ConnectableObservable2.prototype._teardown = function() { + this._refCount = 0; + var _connection = this._connection; + this._subject = this._connection = null; + _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe(); + }; + ConnectableObservable2.prototype.connect = function() { + var _this = this; + var connection = this._connection; + if (!connection) { + connection = this._connection = new Subscription_1.Subscription(); + var subject_1 = this.getSubject(); + connection.add(this.source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subject_1, void 0, function() { + _this._teardown(); + subject_1.complete(); + }, function(err) { + _this._teardown(); + subject_1.error(err); + }, function() { + return _this._teardown(); + }))); + if (connection.closed) { + this._connection = null; + connection = Subscription_1.Subscription.EMPTY; + } + } + return connection; + }; + ConnectableObservable2.prototype.refCount = function() { + return refCount_1.refCount()(this); + }; + return ConnectableObservable2; + }(Observable_1.Observable); + exports2.ConnectableObservable = ConnectableObservable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js +var require_performanceTimestampProvider = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.performanceTimestampProvider = void 0; + exports2.performanceTimestampProvider = { + now: function() { + return (exports2.performanceTimestampProvider.delegate || performance).now(); + }, + delegate: void 0 + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js +var require_animationFrameProvider = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.animationFrameProvider = void 0; + var Subscription_1 = require_Subscription(); + exports2.animationFrameProvider = { + schedule: function(callback) { + var request = requestAnimationFrame; + var cancel = cancelAnimationFrame; + var delegate = exports2.animationFrameProvider.delegate; + if (delegate) { + request = delegate.requestAnimationFrame; + cancel = delegate.cancelAnimationFrame; + } + var handle = request(function(timestamp) { + cancel = void 0; + callback(timestamp); + }); + return new Subscription_1.Subscription(function() { + return cancel === null || cancel === void 0 ? void 0 : cancel(handle); + }); + }, + requestAnimationFrame: function() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var delegate = exports2.animationFrameProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, __spreadArray([], __read(args2))); + }, + cancelAnimationFrame: function() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var delegate = exports2.animationFrameProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame).apply(void 0, __spreadArray([], __read(args2))); + }, + delegate: void 0 + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js +var require_animationFrames = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.animationFrames = void 0; + var Observable_1 = require_Observable(); + var Subscription_1 = require_Subscription(); + var performanceTimestampProvider_1 = require_performanceTimestampProvider(); + var animationFrameProvider_1 = require_animationFrameProvider(); + function animationFrames(timestampProvider) { + return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES; + } + exports2.animationFrames = animationFrames; + function animationFramesFactory(timestampProvider) { + var schedule = animationFrameProvider_1.animationFrameProvider.schedule; + return new Observable_1.Observable(function(subscriber) { + var subscription = new Subscription_1.Subscription(); + var provider = timestampProvider || performanceTimestampProvider_1.performanceTimestampProvider; + var start = provider.now(); + var run = function(timestamp) { + var now = provider.now(); + subscriber.next({ + timestamp: timestampProvider ? now : timestamp, + elapsed: now - start + }); + if (!subscriber.closed) { + subscription.add(schedule(run)); + } + }; + subscription.add(schedule(run)); + return subscription; + }); + } + var DEFAULT_ANIMATION_FRAMES = animationFramesFactory(); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js +var require_ObjectUnsubscribedError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ObjectUnsubscribedError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.ObjectUnsubscribedError = createErrorClass_1.createErrorClass(function(_super) { + return function ObjectUnsubscribedErrorImpl() { + _super(this); + this.name = "ObjectUnsubscribedError"; + this.message = "object unsubscribed"; + }; + }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Subject.js +var require_Subject = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Subject.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + var __values = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousSubject = exports2.Subject = void 0; + var Observable_1 = require_Observable(); + var Subscription_1 = require_Subscription(); + var ObjectUnsubscribedError_1 = require_ObjectUnsubscribedError(); + var arrRemove_1 = require_arrRemove(); + var errorContext_1 = require_errorContext(); + var Subject = function(_super) { + __extends(Subject2, _super); + function Subject2() { + var _this = _super.call(this) || this; + _this.closed = false; + _this.observers = []; + _this.isStopped = false; + _this.hasError = false; + _this.thrownError = null; + return _this; + } + Subject2.prototype.lift = function(operator) { + var subject = new AnonymousSubject(this, this); + subject.operator = operator; + return subject; + }; + Subject2.prototype._throwIfClosed = function() { + if (this.closed) { + throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); + } + }; + Subject2.prototype.next = function(value) { + var _this = this; + errorContext_1.errorContext(function() { + var e_1, _a; + _this._throwIfClosed(); + if (!_this.isStopped) { + var copy = _this.observers.slice(); + try { + for (var copy_1 = __values(copy), copy_1_1 = copy_1.next(); !copy_1_1.done; copy_1_1 = copy_1.next()) { + var observer = copy_1_1.value; + observer.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (copy_1_1 && !copy_1_1.done && (_a = copy_1.return)) + _a.call(copy_1); + } finally { + if (e_1) + throw e_1.error; + } + } + } + }); + }; + Subject2.prototype.error = function(err) { + var _this = this; + errorContext_1.errorContext(function() { + _this._throwIfClosed(); + if (!_this.isStopped) { + _this.hasError = _this.isStopped = true; + _this.thrownError = err; + var observers = _this.observers; + while (observers.length) { + observers.shift().error(err); + } + } + }); + }; + Subject2.prototype.complete = function() { + var _this = this; + errorContext_1.errorContext(function() { + _this._throwIfClosed(); + if (!_this.isStopped) { + _this.isStopped = true; + var observers = _this.observers; + while (observers.length) { + observers.shift().complete(); + } + } + }); + }; + Subject2.prototype.unsubscribe = function() { + this.isStopped = this.closed = true; + this.observers = null; + }; + Object.defineProperty(Subject2.prototype, "observed", { + get: function() { + var _a; + return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0; + }, + enumerable: false, + configurable: true + }); + Subject2.prototype._trySubscribe = function(subscriber) { + this._throwIfClosed(); + return _super.prototype._trySubscribe.call(this, subscriber); + }; + Subject2.prototype._subscribe = function(subscriber) { + this._throwIfClosed(); + this._checkFinalizedStatuses(subscriber); + return this._innerSubscribe(subscriber); + }; + Subject2.prototype._innerSubscribe = function(subscriber) { + var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers; + return hasError || isStopped ? Subscription_1.EMPTY_SUBSCRIPTION : (observers.push(subscriber), new Subscription_1.Subscription(function() { + return arrRemove_1.arrRemove(observers, subscriber); + })); + }; + Subject2.prototype._checkFinalizedStatuses = function(subscriber) { + var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped; + if (hasError) { + subscriber.error(thrownError); + } else if (isStopped) { + subscriber.complete(); + } + }; + Subject2.prototype.asObservable = function() { + var observable = new Observable_1.Observable(); + observable.source = this; + return observable; + }; + Subject2.create = function(destination, source) { + return new AnonymousSubject(destination, source); + }; + return Subject2; + }(Observable_1.Observable); + exports2.Subject = Subject; + var AnonymousSubject = function(_super) { + __extends(AnonymousSubject2, _super); + function AnonymousSubject2(destination, source) { + var _this = _super.call(this) || this; + _this.destination = destination; + _this.source = source; + return _this; + } + AnonymousSubject2.prototype.next = function(value) { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value); + }; + AnonymousSubject2.prototype.error = function(err) { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err); + }; + AnonymousSubject2.prototype.complete = function() { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a); + }; + AnonymousSubject2.prototype._subscribe = function(subscriber) { + var _a, _b; + return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : Subscription_1.EMPTY_SUBSCRIPTION; + }; + return AnonymousSubject2; + }(Subject); + exports2.AnonymousSubject = AnonymousSubject; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/BehaviorSubject.js +var require_BehaviorSubject = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/BehaviorSubject.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BehaviorSubject = void 0; + var Subject_1 = require_Subject(); + var BehaviorSubject = function(_super) { + __extends(BehaviorSubject2, _super); + function BehaviorSubject2(_value) { + var _this = _super.call(this) || this; + _this._value = _value; + return _this; + } + Object.defineProperty(BehaviorSubject2.prototype, "value", { + get: function() { + return this.getValue(); + }, + enumerable: false, + configurable: true + }); + BehaviorSubject2.prototype._subscribe = function(subscriber) { + var subscription = _super.prototype._subscribe.call(this, subscriber); + !subscription.closed && subscriber.next(this._value); + return subscription; + }; + BehaviorSubject2.prototype.getValue = function() { + var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, _value = _a._value; + if (hasError) { + throw thrownError; + } + this._throwIfClosed(); + return _value; + }; + BehaviorSubject2.prototype.next = function(value) { + _super.prototype.next.call(this, this._value = value); + }; + return BehaviorSubject2; + }(Subject_1.Subject); + exports2.BehaviorSubject = BehaviorSubject; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js +var require_dateTimestampProvider = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.dateTimestampProvider = void 0; + exports2.dateTimestampProvider = { + now: function() { + return (exports2.dateTimestampProvider.delegate || Date).now(); + }, + delegate: void 0 + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/ReplaySubject.js +var require_ReplaySubject = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/ReplaySubject.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ReplaySubject = void 0; + var Subject_1 = require_Subject(); + var dateTimestampProvider_1 = require_dateTimestampProvider(); + var ReplaySubject = function(_super) { + __extends(ReplaySubject2, _super); + function ReplaySubject2(_bufferSize, _windowTime, _timestampProvider) { + if (_bufferSize === void 0) { + _bufferSize = Infinity; + } + if (_windowTime === void 0) { + _windowTime = Infinity; + } + if (_timestampProvider === void 0) { + _timestampProvider = dateTimestampProvider_1.dateTimestampProvider; + } + var _this = _super.call(this) || this; + _this._bufferSize = _bufferSize; + _this._windowTime = _windowTime; + _this._timestampProvider = _timestampProvider; + _this._buffer = []; + _this._infiniteTimeWindow = true; + _this._infiniteTimeWindow = _windowTime === Infinity; + _this._bufferSize = Math.max(1, _bufferSize); + _this._windowTime = Math.max(1, _windowTime); + return _this; + } + ReplaySubject2.prototype.next = function(value) { + var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime; + if (!isStopped) { + _buffer.push(value); + !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime); + } + this._trimBuffer(); + _super.prototype.next.call(this, value); + }; + ReplaySubject2.prototype._subscribe = function(subscriber) { + this._throwIfClosed(); + this._trimBuffer(); + var subscription = this._innerSubscribe(subscriber); + var _a = this, _infiniteTimeWindow = _a._infiniteTimeWindow, _buffer = _a._buffer; + var copy = _buffer.slice(); + for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) { + subscriber.next(copy[i]); + } + this._checkFinalizedStatuses(subscriber); + return subscription; + }; + ReplaySubject2.prototype._trimBuffer = function() { + var _a = this, _bufferSize = _a._bufferSize, _timestampProvider = _a._timestampProvider, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow; + var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize; + _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize); + if (!_infiniteTimeWindow) { + var now = _timestampProvider.now(); + var last = 0; + for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) { + last = i; + } + last && _buffer.splice(0, last + 1); + } + }; + return ReplaySubject2; + }(Subject_1.Subject); + exports2.ReplaySubject = ReplaySubject; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/AsyncSubject.js +var require_AsyncSubject = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/AsyncSubject.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AsyncSubject = void 0; + var Subject_1 = require_Subject(); + var AsyncSubject = function(_super) { + __extends(AsyncSubject2, _super); + function AsyncSubject2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this._value = null; + _this._hasValue = false; + _this._isComplete = false; + return _this; + } + AsyncSubject2.prototype._checkFinalizedStatuses = function(subscriber) { + var _a = this, hasError = _a.hasError, _hasValue = _a._hasValue, _value = _a._value, thrownError = _a.thrownError, isStopped = _a.isStopped, _isComplete = _a._isComplete; + if (hasError) { + subscriber.error(thrownError); + } else if (isStopped || _isComplete) { + _hasValue && subscriber.next(_value); + subscriber.complete(); + } + }; + AsyncSubject2.prototype.next = function(value) { + if (!this.isStopped) { + this._value = value; + this._hasValue = true; + } + }; + AsyncSubject2.prototype.complete = function() { + var _a = this, _hasValue = _a._hasValue, _value = _a._value, _isComplete = _a._isComplete; + if (!_isComplete) { + this._isComplete = true; + _hasValue && _super.prototype.next.call(this, _value); + _super.prototype.complete.call(this); + } + }; + return AsyncSubject2; + }(Subject_1.Subject); + exports2.AsyncSubject = AsyncSubject; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/Action.js +var require_Action = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/Action.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Action = void 0; + var Subscription_1 = require_Subscription(); + var Action = function(_super) { + __extends(Action2, _super); + function Action2(scheduler, work) { + return _super.call(this) || this; + } + Action2.prototype.schedule = function(state, delay) { + if (delay === void 0) { + delay = 0; + } + return this; + }; + return Action2; + }(Subscription_1.Subscription); + exports2.Action = Action; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js +var require_intervalProvider = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.intervalProvider = void 0; + exports2.intervalProvider = { + setInterval: function() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var delegate = exports2.intervalProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) || setInterval).apply(void 0, __spreadArray([], __read(args2))); + }, + clearInterval: function(handle) { + var delegate = exports2.intervalProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle); + }, + delegate: void 0 + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js +var require_AsyncAction = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AsyncAction = void 0; + var Action_1 = require_Action(); + var intervalProvider_1 = require_intervalProvider(); + var arrRemove_1 = require_arrRemove(); + var AsyncAction = function(_super) { + __extends(AsyncAction2, _super); + function AsyncAction2(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + _this.pending = false; + return _this; + } + AsyncAction2.prototype.schedule = function(state, delay) { + if (delay === void 0) { + delay = 0; + } + if (this.closed) { + return this; + } + this.state = state; + var id = this.id; + var scheduler = this.scheduler; + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, delay); + } + this.pending = true; + this.delay = delay; + this.id = this.id || this.requestAsyncId(scheduler, this.id, delay); + return this; + }; + AsyncAction2.prototype.requestAsyncId = function(scheduler, _id, delay) { + if (delay === void 0) { + delay = 0; + } + return intervalProvider_1.intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay); + }; + AsyncAction2.prototype.recycleAsyncId = function(_scheduler, id, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay != null && this.delay === delay && this.pending === false) { + return id; + } + intervalProvider_1.intervalProvider.clearInterval(id); + return void 0; + }; + AsyncAction2.prototype.execute = function(state, delay) { + if (this.closed) { + return new Error("executing a cancelled action"); + } + this.pending = false; + var error = this._execute(state, delay); + if (error) { + return error; + } else if (this.pending === false && this.id != null) { + this.id = this.recycleAsyncId(this.scheduler, this.id, null); + } + }; + AsyncAction2.prototype._execute = function(state, _delay) { + var errored = false; + var errorValue; + try { + this.work(state); + } catch (e) { + errored = true; + errorValue = !!e && e || new Error(e); + } + if (errored) { + this.unsubscribe(); + return errorValue; + } + }; + AsyncAction2.prototype.unsubscribe = function() { + if (!this.closed) { + var _a = this, id = _a.id, scheduler = _a.scheduler; + var actions = scheduler.actions; + this.work = this.state = this.scheduler = null; + this.pending = false; + arrRemove_1.arrRemove(actions, this); + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, null); + } + this.delay = null; + _super.prototype.unsubscribe.call(this); + } + }; + return AsyncAction2; + }(Action_1.Action); + exports2.AsyncAction = AsyncAction; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/Immediate.js +var require_Immediate = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/Immediate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TestTools = exports2.Immediate = void 0; + var nextHandle = 1; + var resolved; + var activeHandles = {}; + function findAndClearHandle(handle) { + if (handle in activeHandles) { + delete activeHandles[handle]; + return true; + } + return false; + } + exports2.Immediate = { + setImmediate: function(cb) { + var handle = nextHandle++; + activeHandles[handle] = true; + if (!resolved) { + resolved = Promise.resolve(); + } + resolved.then(function() { + return findAndClearHandle(handle) && cb(); + }); + return handle; + }, + clearImmediate: function(handle) { + findAndClearHandle(handle); + } + }; + exports2.TestTools = { + pending: function() { + return Object.keys(activeHandles).length; + } + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js +var require_immediateProvider = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.immediateProvider = void 0; + var Immediate_1 = require_Immediate(); + var setImmediate2 = Immediate_1.Immediate.setImmediate; + var clearImmediate2 = Immediate_1.Immediate.clearImmediate; + exports2.immediateProvider = { + setImmediate: function() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var delegate = exports2.immediateProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate2).apply(void 0, __spreadArray([], __read(args2))); + }, + clearImmediate: function(handle) { + var delegate = exports2.immediateProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate2)(handle); + }, + delegate: void 0 + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js +var require_AsapAction = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AsapAction = void 0; + var AsyncAction_1 = require_AsyncAction(); + var immediateProvider_1 = require_immediateProvider(); + var AsapAction = function(_super) { + __extends(AsapAction2, _super); + function AsapAction2(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + AsapAction2.prototype.requestAsyncId = function(scheduler, id, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay !== null && delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + } + scheduler.actions.push(this); + return scheduler._scheduled || (scheduler._scheduled = immediateProvider_1.immediateProvider.setImmediate(scheduler.flush.bind(scheduler, void 0))); + }; + AsapAction2.prototype.recycleAsyncId = function(scheduler, id, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay != null && delay > 0 || delay == null && this.delay > 0) { + return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); + } + if (scheduler.actions.length === 0) { + immediateProvider_1.immediateProvider.clearImmediate(id); + scheduler._scheduled = void 0; + } + return void 0; + }; + return AsapAction2; + }(AsyncAction_1.AsyncAction); + exports2.AsapAction = AsapAction; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Scheduler.js +var require_Scheduler = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Scheduler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Scheduler = void 0; + var dateTimestampProvider_1 = require_dateTimestampProvider(); + var Scheduler = function() { + function Scheduler2(schedulerActionCtor, now) { + if (now === void 0) { + now = Scheduler2.now; + } + this.schedulerActionCtor = schedulerActionCtor; + this.now = now; + } + Scheduler2.prototype.schedule = function(work, delay, state) { + if (delay === void 0) { + delay = 0; + } + return new this.schedulerActionCtor(this, work).schedule(state, delay); + }; + Scheduler2.now = dateTimestampProvider_1.dateTimestampProvider.now; + return Scheduler2; + }(); + exports2.Scheduler = Scheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js +var require_AsyncScheduler = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AsyncScheduler = void 0; + var Scheduler_1 = require_Scheduler(); + var AsyncScheduler = function(_super) { + __extends(AsyncScheduler2, _super); + function AsyncScheduler2(SchedulerAction, now) { + if (now === void 0) { + now = Scheduler_1.Scheduler.now; + } + var _this = _super.call(this, SchedulerAction, now) || this; + _this.actions = []; + _this._active = false; + _this._scheduled = void 0; + return _this; + } + AsyncScheduler2.prototype.flush = function(action) { + var actions = this.actions; + if (this._active) { + actions.push(action); + return; + } + var error; + this._active = true; + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while (action = actions.shift()); + this._active = false; + if (error) { + while (action = actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + return AsyncScheduler2; + }(Scheduler_1.Scheduler); + exports2.AsyncScheduler = AsyncScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js +var require_AsapScheduler = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AsapScheduler = void 0; + var AsyncScheduler_1 = require_AsyncScheduler(); + var AsapScheduler = function(_super) { + __extends(AsapScheduler2, _super); + function AsapScheduler2() { + return _super !== null && _super.apply(this, arguments) || this; + } + AsapScheduler2.prototype.flush = function(action) { + this._active = true; + this._scheduled = void 0; + var actions = this.actions; + var error; + var index = -1; + action = action || actions.shift(); + var count = actions.length; + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while (++index < count && (action = actions.shift())); + this._active = false; + if (error) { + while (++index < count && (action = actions.shift())) { + action.unsubscribe(); + } + throw error; + } + }; + return AsapScheduler2; + }(AsyncScheduler_1.AsyncScheduler); + exports2.AsapScheduler = AsapScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/asap.js +var require_asap = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/asap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.asap = exports2.asapScheduler = void 0; + var AsapAction_1 = require_AsapAction(); + var AsapScheduler_1 = require_AsapScheduler(); + exports2.asapScheduler = new AsapScheduler_1.AsapScheduler(AsapAction_1.AsapAction); + exports2.asap = exports2.asapScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/async.js +var require_async = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/async.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.async = exports2.asyncScheduler = void 0; + var AsyncAction_1 = require_AsyncAction(); + var AsyncScheduler_1 = require_AsyncScheduler(); + exports2.asyncScheduler = new AsyncScheduler_1.AsyncScheduler(AsyncAction_1.AsyncAction); + exports2.async = exports2.asyncScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js +var require_QueueAction = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.QueueAction = void 0; + var AsyncAction_1 = require_AsyncAction(); + var QueueAction = function(_super) { + __extends(QueueAction2, _super); + function QueueAction2(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + QueueAction2.prototype.schedule = function(state, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay > 0) { + return _super.prototype.schedule.call(this, state, delay); + } + this.delay = delay; + this.state = state; + this.scheduler.flush(this); + return this; + }; + QueueAction2.prototype.execute = function(state, delay) { + return delay > 0 || this.closed ? _super.prototype.execute.call(this, state, delay) : this._execute(state, delay); + }; + QueueAction2.prototype.requestAsyncId = function(scheduler, id, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay != null && delay > 0 || delay == null && this.delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + } + return scheduler.flush(this); + }; + return QueueAction2; + }(AsyncAction_1.AsyncAction); + exports2.QueueAction = QueueAction; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js +var require_QueueScheduler = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.QueueScheduler = void 0; + var AsyncScheduler_1 = require_AsyncScheduler(); + var QueueScheduler = function(_super) { + __extends(QueueScheduler2, _super); + function QueueScheduler2() { + return _super !== null && _super.apply(this, arguments) || this; + } + return QueueScheduler2; + }(AsyncScheduler_1.AsyncScheduler); + exports2.QueueScheduler = QueueScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/queue.js +var require_queue = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/queue.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.queue = exports2.queueScheduler = void 0; + var QueueAction_1 = require_QueueAction(); + var QueueScheduler_1 = require_QueueScheduler(); + exports2.queueScheduler = new QueueScheduler_1.QueueScheduler(QueueAction_1.QueueAction); + exports2.queue = exports2.queueScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js +var require_AnimationFrameAction = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnimationFrameAction = void 0; + var AsyncAction_1 = require_AsyncAction(); + var animationFrameProvider_1 = require_animationFrameProvider(); + var AnimationFrameAction = function(_super) { + __extends(AnimationFrameAction2, _super); + function AnimationFrameAction2(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + AnimationFrameAction2.prototype.requestAsyncId = function(scheduler, id, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay !== null && delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + } + scheduler.actions.push(this); + return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider_1.animationFrameProvider.requestAnimationFrame(function() { + return scheduler.flush(void 0); + })); + }; + AnimationFrameAction2.prototype.recycleAsyncId = function(scheduler, id, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay != null && delay > 0 || delay == null && this.delay > 0) { + return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); + } + if (scheduler.actions.length === 0) { + animationFrameProvider_1.animationFrameProvider.cancelAnimationFrame(id); + scheduler._scheduled = void 0; + } + return void 0; + }; + return AnimationFrameAction2; + }(AsyncAction_1.AsyncAction); + exports2.AnimationFrameAction = AnimationFrameAction; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js +var require_AnimationFrameScheduler = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnimationFrameScheduler = void 0; + var AsyncScheduler_1 = require_AsyncScheduler(); + var AnimationFrameScheduler = function(_super) { + __extends(AnimationFrameScheduler2, _super); + function AnimationFrameScheduler2() { + return _super !== null && _super.apply(this, arguments) || this; + } + AnimationFrameScheduler2.prototype.flush = function(action) { + this._active = true; + this._scheduled = void 0; + var actions = this.actions; + var error; + var index = -1; + action = action || actions.shift(); + var count = actions.length; + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while (++index < count && (action = actions.shift())); + this._active = false; + if (error) { + while (++index < count && (action = actions.shift())) { + action.unsubscribe(); + } + throw error; + } + }; + return AnimationFrameScheduler2; + }(AsyncScheduler_1.AsyncScheduler); + exports2.AnimationFrameScheduler = AnimationFrameScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js +var require_animationFrame = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.animationFrame = exports2.animationFrameScheduler = void 0; + var AnimationFrameAction_1 = require_AnimationFrameAction(); + var AnimationFrameScheduler_1 = require_AnimationFrameScheduler(); + exports2.animationFrameScheduler = new AnimationFrameScheduler_1.AnimationFrameScheduler(AnimationFrameAction_1.AnimationFrameAction); + exports2.animationFrame = exports2.animationFrameScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js +var require_VirtualTimeScheduler = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.VirtualAction = exports2.VirtualTimeScheduler = void 0; + var AsyncAction_1 = require_AsyncAction(); + var Subscription_1 = require_Subscription(); + var AsyncScheduler_1 = require_AsyncScheduler(); + var VirtualTimeScheduler = function(_super) { + __extends(VirtualTimeScheduler2, _super); + function VirtualTimeScheduler2(schedulerActionCtor, maxFrames) { + if (schedulerActionCtor === void 0) { + schedulerActionCtor = VirtualAction; + } + if (maxFrames === void 0) { + maxFrames = Infinity; + } + var _this = _super.call(this, schedulerActionCtor, function() { + return _this.frame; + }) || this; + _this.maxFrames = maxFrames; + _this.frame = 0; + _this.index = -1; + return _this; + } + VirtualTimeScheduler2.prototype.flush = function() { + var _a = this, actions = _a.actions, maxFrames = _a.maxFrames; + var error; + var action; + while ((action = actions[0]) && action.delay <= maxFrames) { + actions.shift(); + this.frame = action.delay; + if (error = action.execute(action.state, action.delay)) { + break; + } + } + if (error) { + while (action = actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + VirtualTimeScheduler2.frameTimeFactor = 10; + return VirtualTimeScheduler2; + }(AsyncScheduler_1.AsyncScheduler); + exports2.VirtualTimeScheduler = VirtualTimeScheduler; + var VirtualAction = function(_super) { + __extends(VirtualAction2, _super); + function VirtualAction2(scheduler, work, index) { + if (index === void 0) { + index = scheduler.index += 1; + } + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + _this.index = index; + _this.active = true; + _this.index = scheduler.index = index; + return _this; + } + VirtualAction2.prototype.schedule = function(state, delay) { + if (delay === void 0) { + delay = 0; + } + if (Number.isFinite(delay)) { + if (!this.id) { + return _super.prototype.schedule.call(this, state, delay); + } + this.active = false; + var action = new VirtualAction2(this.scheduler, this.work); + this.add(action); + return action.schedule(state, delay); + } else { + return Subscription_1.Subscription.EMPTY; + } + }; + VirtualAction2.prototype.requestAsyncId = function(scheduler, id, delay) { + if (delay === void 0) { + delay = 0; + } + this.delay = scheduler.frame + delay; + var actions = scheduler.actions; + actions.push(this); + actions.sort(VirtualAction2.sortActions); + return true; + }; + VirtualAction2.prototype.recycleAsyncId = function(scheduler, id, delay) { + if (delay === void 0) { + delay = 0; + } + return void 0; + }; + VirtualAction2.prototype._execute = function(state, delay) { + if (this.active === true) { + return _super.prototype._execute.call(this, state, delay); + } + }; + VirtualAction2.sortActions = function(a, b) { + if (a.delay === b.delay) { + if (a.index === b.index) { + return 0; + } else if (a.index > b.index) { + return 1; + } else { + return -1; + } + } else if (a.delay > b.delay) { + return 1; + } else { + return -1; + } + }; + return VirtualAction2; + }(AsyncAction_1.AsyncAction); + exports2.VirtualAction = VirtualAction; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/empty.js +var require_empty = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/empty.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.empty = exports2.EMPTY = void 0; + var Observable_1 = require_Observable(); + exports2.EMPTY = new Observable_1.Observable(function(subscriber) { + return subscriber.complete(); + }); + function empty(scheduler) { + return scheduler ? emptyScheduled(scheduler) : exports2.EMPTY; + } + exports2.empty = empty; + function emptyScheduled(scheduler) { + return new Observable_1.Observable(function(subscriber) { + return scheduler.schedule(function() { + return subscriber.complete(); + }); + }); + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js +var require_scheduleArray = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduleArray = void 0; + var Observable_1 = require_Observable(); + function scheduleArray(input, scheduler) { + return new Observable_1.Observable(function(subscriber) { + var i = 0; + return scheduler.schedule(function() { + if (i === input.length) { + subscriber.complete(); + } else { + subscriber.next(input[i++]); + if (!subscriber.closed) { + this.schedule(); + } + } + }); + }); + } + exports2.scheduleArray = scheduleArray; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js +var require_isArrayLike = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isArrayLike = void 0; + exports2.isArrayLike = function(x) { + return x && typeof x.length === "number" && typeof x !== "function"; + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isPromise.js +var require_isPromise = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isPromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isPromise = void 0; + var isFunction_1 = require_isFunction(); + function isPromise(value) { + return isFunction_1.isFunction(value === null || value === void 0 ? void 0 : value.then); + } + exports2.isPromise = isPromise; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js +var require_scheduleObservable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduleObservable = void 0; + var Observable_1 = require_Observable(); + var Subscription_1 = require_Subscription(); + var observable_1 = require_observable(); + function scheduleObservable(input, scheduler) { + return new Observable_1.Observable(function(subscriber) { + var sub = new Subscription_1.Subscription(); + sub.add(scheduler.schedule(function() { + var observable = input[observable_1.observable](); + sub.add(observable.subscribe({ + next: function(value) { + sub.add(scheduler.schedule(function() { + return subscriber.next(value); + })); + }, + error: function(err) { + sub.add(scheduler.schedule(function() { + return subscriber.error(err); + })); + }, + complete: function() { + sub.add(scheduler.schedule(function() { + return subscriber.complete(); + })); + } + })); + })); + return sub; + }); + } + exports2.scheduleObservable = scheduleObservable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js +var require_schedulePromise = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.schedulePromise = void 0; + var Observable_1 = require_Observable(); + function schedulePromise(input, scheduler) { + return new Observable_1.Observable(function(subscriber) { + return scheduler.schedule(function() { + return input.then(function(value) { + subscriber.add(scheduler.schedule(function() { + subscriber.next(value); + subscriber.add(scheduler.schedule(function() { + return subscriber.complete(); + })); + })); + }, function(err) { + subscriber.add(scheduler.schedule(function() { + return subscriber.error(err); + })); + }); + }); + }); + } + exports2.schedulePromise = schedulePromise; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/symbol/iterator.js +var require_iterator = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/symbol/iterator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.iterator = exports2.getSymbolIterator = void 0; + function getSymbolIterator() { + if (typeof Symbol !== "function" || !Symbol.iterator) { + return "@@iterator"; + } + return Symbol.iterator; + } + exports2.getSymbolIterator = getSymbolIterator; + exports2.iterator = getSymbolIterator(); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/caughtSchedule.js +var require_caughtSchedule = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/caughtSchedule.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.caughtSchedule = void 0; + function caughtSchedule(subscriber, scheduler, execute, delay) { + if (delay === void 0) { + delay = 0; + } + var subscription = scheduler.schedule(function() { + try { + execute.call(this); + } catch (err) { + subscriber.error(err); + } + }, delay); + subscriber.add(subscription); + return subscription; + } + exports2.caughtSchedule = caughtSchedule; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js +var require_scheduleIterable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduleIterable = void 0; + var Observable_1 = require_Observable(); + var iterator_1 = require_iterator(); + var isFunction_1 = require_isFunction(); + var caughtSchedule_1 = require_caughtSchedule(); + function scheduleIterable(input, scheduler) { + return new Observable_1.Observable(function(subscriber) { + var iterator; + subscriber.add(scheduler.schedule(function() { + iterator = input[iterator_1.iterator](); + caughtSchedule_1.caughtSchedule(subscriber, scheduler, function() { + var _a = iterator.next(), value = _a.value, done = _a.done; + if (done) { + subscriber.complete(); + } else { + subscriber.next(value); + this.schedule(); + } + }); + })); + return function() { + return isFunction_1.isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); + }; + }); + } + exports2.scheduleIterable = scheduleIterable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js +var require_scheduleAsyncIterable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduleAsyncIterable = void 0; + var Observable_1 = require_Observable(); + var Subscription_1 = require_Subscription(); + function scheduleAsyncIterable(input, scheduler) { + if (!input) { + throw new Error("Iterable cannot be null"); + } + return new Observable_1.Observable(function(subscriber) { + var sub = new Subscription_1.Subscription(); + sub.add(scheduler.schedule(function() { + var iterator = input[Symbol.asyncIterator](); + sub.add(scheduler.schedule(function() { + var _this = this; + iterator.next().then(function(result) { + if (result.done) { + subscriber.complete(); + } else { + subscriber.next(result.value); + _this.schedule(); + } + }); + })); + })); + return sub; + }); + } + exports2.scheduleAsyncIterable = scheduleAsyncIterable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js +var require_isInteropObservable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isInteropObservable = void 0; + var observable_1 = require_observable(); + var isFunction_1 = require_isFunction(); + function isInteropObservable(input) { + return isFunction_1.isFunction(input[observable_1.observable]); + } + exports2.isInteropObservable = isInteropObservable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isIterable.js +var require_isIterable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isIterable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isIterable = void 0; + var iterator_1 = require_iterator(); + var isFunction_1 = require_isFunction(); + function isIterable(input) { + return isFunction_1.isFunction(input === null || input === void 0 ? void 0 : input[iterator_1.iterator]); + } + exports2.isIterable = isIterable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js +var require_isAsyncIterable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isAsyncIterable = void 0; + var isFunction_1 = require_isFunction(); + function isAsyncIterable(obj) { + return Symbol.asyncIterator && isFunction_1.isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]); + } + exports2.isAsyncIterable = isAsyncIterable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js +var require_throwUnobservableError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createInvalidObservableTypeError = void 0; + function createInvalidObservableTypeError(input) { + return new TypeError("You provided " + (input !== null && typeof input === "object" ? "an invalid object" : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable."); + } + exports2.createInvalidObservableTypeError = createInvalidObservableTypeError; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js +var require_isReadableStreamLike = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js"(exports2) { + "use strict"; + var __generator = exports2 && exports2.__generator || function(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) + throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) + throw new TypeError("Generator is already executing."); + while (_) + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) + return t; + if (y = 0, t) + op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + var __await = exports2 && exports2.__await || function(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + var __asyncGenerator = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) + i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) + resume(q[0][0], q[0][1]); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isReadableStreamLike = exports2.readableStreamLikeToAsyncGenerator = void 0; + var isFunction_1 = require_isFunction(); + function readableStreamLikeToAsyncGenerator(readableStream) { + return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() { + var reader, _a, value, done; + return __generator(this, function(_b) { + switch (_b.label) { + case 0: + reader = readableStream.getReader(); + _b.label = 1; + case 1: + _b.trys.push([1, , 9, 10]); + _b.label = 2; + case 2: + if (false) + return [3, 8]; + return [4, __await(reader.read())]; + case 3: + _a = _b.sent(), value = _a.value, done = _a.done; + if (!done) + return [3, 5]; + return [4, __await(void 0)]; + case 4: + return [2, _b.sent()]; + case 5: + return [4, __await(value)]; + case 6: + return [4, _b.sent()]; + case 7: + _b.sent(); + return [3, 2]; + case 8: + return [3, 10]; + case 9: + reader.releaseLock(); + return [7]; + case 10: + return [2]; + } + }); + }); + } + exports2.readableStreamLikeToAsyncGenerator = readableStreamLikeToAsyncGenerator; + function isReadableStreamLike(obj) { + return isFunction_1.isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader); + } + exports2.isReadableStreamLike = isReadableStreamLike; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js +var require_scheduleReadableStreamLike = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduleReadableStreamLike = void 0; + var scheduleAsyncIterable_1 = require_scheduleAsyncIterable(); + var isReadableStreamLike_1 = require_isReadableStreamLike(); + function scheduleReadableStreamLike(input, scheduler) { + return scheduleAsyncIterable_1.scheduleAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(input), scheduler); + } + exports2.scheduleReadableStreamLike = scheduleReadableStreamLike; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js +var require_scheduled = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduled = void 0; + var scheduleObservable_1 = require_scheduleObservable(); + var schedulePromise_1 = require_schedulePromise(); + var scheduleArray_1 = require_scheduleArray(); + var scheduleIterable_1 = require_scheduleIterable(); + var scheduleAsyncIterable_1 = require_scheduleAsyncIterable(); + var isInteropObservable_1 = require_isInteropObservable(); + var isPromise_1 = require_isPromise(); + var isArrayLike_1 = require_isArrayLike(); + var isIterable_1 = require_isIterable(); + var isAsyncIterable_1 = require_isAsyncIterable(); + var throwUnobservableError_1 = require_throwUnobservableError(); + var isReadableStreamLike_1 = require_isReadableStreamLike(); + var scheduleReadableStreamLike_1 = require_scheduleReadableStreamLike(); + function scheduled(input, scheduler) { + if (input != null) { + if (isInteropObservable_1.isInteropObservable(input)) { + return scheduleObservable_1.scheduleObservable(input, scheduler); + } + if (isArrayLike_1.isArrayLike(input)) { + return scheduleArray_1.scheduleArray(input, scheduler); + } + if (isPromise_1.isPromise(input)) { + return schedulePromise_1.schedulePromise(input, scheduler); + } + if (isAsyncIterable_1.isAsyncIterable(input)) { + return scheduleAsyncIterable_1.scheduleAsyncIterable(input, scheduler); + } + if (isIterable_1.isIterable(input)) { + return scheduleIterable_1.scheduleIterable(input, scheduler); + } + if (isReadableStreamLike_1.isReadableStreamLike(input)) { + return scheduleReadableStreamLike_1.scheduleReadableStreamLike(input, scheduler); + } + } + throw throwUnobservableError_1.createInvalidObservableTypeError(input); + } + exports2.scheduled = scheduled; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/from.js +var require_from2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/from.js"(exports2) { + "use strict"; + var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = exports2 && exports2.__generator || function(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) + throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) + throw new TypeError("Generator is already executing."); + while (_) + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) + return t; + if (y = 0, t) + op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + var __asyncValues = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve({ value: v2, done: d }); + }, reject); + } + }; + var __values = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromArrayLike = exports2.innerFrom = exports2.from = void 0; + var isArrayLike_1 = require_isArrayLike(); + var isPromise_1 = require_isPromise(); + var observable_1 = require_observable(); + var Observable_1 = require_Observable(); + var scheduled_1 = require_scheduled(); + var isFunction_1 = require_isFunction(); + var reportUnhandledError_1 = require_reportUnhandledError(); + var isInteropObservable_1 = require_isInteropObservable(); + var isAsyncIterable_1 = require_isAsyncIterable(); + var throwUnobservableError_1 = require_throwUnobservableError(); + var isIterable_1 = require_isIterable(); + var isReadableStreamLike_1 = require_isReadableStreamLike(); + function from(input, scheduler) { + return scheduler ? scheduled_1.scheduled(input, scheduler) : innerFrom(input); + } + exports2.from = from; + function innerFrom(input) { + if (input instanceof Observable_1.Observable) { + return input; + } + if (input != null) { + if (isInteropObservable_1.isInteropObservable(input)) { + return fromInteropObservable(input); + } + if (isArrayLike_1.isArrayLike(input)) { + return fromArrayLike(input); + } + if (isPromise_1.isPromise(input)) { + return fromPromise(input); + } + if (isAsyncIterable_1.isAsyncIterable(input)) { + return fromAsyncIterable(input); + } + if (isIterable_1.isIterable(input)) { + return fromIterable(input); + } + if (isReadableStreamLike_1.isReadableStreamLike(input)) { + return fromReadableStreamLike(input); + } + } + throw throwUnobservableError_1.createInvalidObservableTypeError(input); + } + exports2.innerFrom = innerFrom; + function fromInteropObservable(obj) { + return new Observable_1.Observable(function(subscriber) { + var obs = obj[observable_1.observable](); + if (isFunction_1.isFunction(obs.subscribe)) { + return obs.subscribe(subscriber); + } + throw new TypeError("Provided object does not correctly implement Symbol.observable"); + }); + } + function fromArrayLike(array) { + return new Observable_1.Observable(function(subscriber) { + for (var i = 0; i < array.length && !subscriber.closed; i++) { + subscriber.next(array[i]); + } + subscriber.complete(); + }); + } + exports2.fromArrayLike = fromArrayLike; + function fromPromise(promise) { + return new Observable_1.Observable(function(subscriber) { + promise.then(function(value) { + if (!subscriber.closed) { + subscriber.next(value); + subscriber.complete(); + } + }, function(err) { + return subscriber.error(err); + }).then(null, reportUnhandledError_1.reportUnhandledError); + }); + } + function fromIterable(iterable) { + return new Observable_1.Observable(function(subscriber) { + var e_1, _a; + try { + for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) { + var value = iterable_1_1.value; + subscriber.next(value); + if (subscriber.closed) { + return; + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) + _a.call(iterable_1); + } finally { + if (e_1) + throw e_1.error; + } + } + subscriber.complete(); + }); + } + function fromAsyncIterable(asyncIterable) { + return new Observable_1.Observable(function(subscriber) { + process2(asyncIterable, subscriber).catch(function(err) { + return subscriber.error(err); + }); + }); + } + function fromReadableStreamLike(readableStream) { + return fromAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(readableStream)); + } + function process2(asyncIterable, subscriber) { + var asyncIterable_1, asyncIterable_1_1; + var e_2, _a; + return __awaiter(this, void 0, void 0, function() { + var value, e_2_1; + return __generator(this, function(_b) { + switch (_b.label) { + case 0: + _b.trys.push([0, 5, 6, 11]); + asyncIterable_1 = __asyncValues(asyncIterable); + _b.label = 1; + case 1: + return [4, asyncIterable_1.next()]; + case 2: + if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) + return [3, 4]; + value = asyncIterable_1_1.value; + subscriber.next(value); + if (subscriber.closed) { + return [2]; + } + _b.label = 3; + case 3: + return [3, 1]; + case 4: + return [3, 11]; + case 5: + e_2_1 = _b.sent(); + e_2 = { error: e_2_1 }; + return [3, 11]; + case 6: + _b.trys.push([6, , 9, 10]); + if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) + return [3, 8]; + return [4, _a.call(asyncIterable_1)]; + case 7: + _b.sent(); + _b.label = 8; + case 8: + return [3, 10]; + case 9: + if (e_2) + throw e_2.error; + return [7]; + case 10: + return [7]; + case 11: + subscriber.complete(); + return [2]; + } + }); + }); + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/fromArray.js +var require_fromArray = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/fromArray.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.internalFromArray = void 0; + var scheduleArray_1 = require_scheduleArray(); + var from_1 = require_from2(); + function internalFromArray(input, scheduler) { + return scheduler ? scheduleArray_1.scheduleArray(input, scheduler) : from_1.fromArrayLike(input); + } + exports2.internalFromArray = internalFromArray; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isScheduler.js +var require_isScheduler = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isScheduler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isScheduler = void 0; + var isFunction_1 = require_isFunction(); + function isScheduler(value) { + return value && isFunction_1.isFunction(value.schedule); + } + exports2.isScheduler = isScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/args.js +var require_args = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/args.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.popNumber = exports2.popScheduler = exports2.popResultSelector = void 0; + var isFunction_1 = require_isFunction(); + var isScheduler_1 = require_isScheduler(); + function last(arr) { + return arr[arr.length - 1]; + } + function popResultSelector(args2) { + return isFunction_1.isFunction(last(args2)) ? args2.pop() : void 0; + } + exports2.popResultSelector = popResultSelector; + function popScheduler(args2) { + return isScheduler_1.isScheduler(last(args2)) ? args2.pop() : void 0; + } + exports2.popScheduler = popScheduler; + function popNumber(args2, defaultValue) { + return typeof last(args2) === "number" ? args2.pop() : defaultValue; + } + exports2.popNumber = popNumber; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/of.js +var require_of = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/of.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.of = void 0; + var fromArray_1 = require_fromArray(); + var scheduleArray_1 = require_scheduleArray(); + var args_1 = require_args(); + function of() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(args2); + return scheduler ? scheduleArray_1.scheduleArray(args2, scheduler) : fromArray_1.internalFromArray(args2); + } + exports2.of = of; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/throwError.js +var require_throwError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/throwError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throwError = void 0; + var Observable_1 = require_Observable(); + var isFunction_1 = require_isFunction(); + function throwError(errorOrErrorFactory, scheduler) { + var errorFactory = isFunction_1.isFunction(errorOrErrorFactory) ? errorOrErrorFactory : function() { + return errorOrErrorFactory; + }; + var init = function(subscriber) { + return subscriber.error(errorFactory()); + }; + return new Observable_1.Observable(scheduler ? function(subscriber) { + return scheduler.schedule(init, 0, subscriber); + } : init); + } + exports2.throwError = throwError; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Notification.js +var require_Notification = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Notification.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.observeNotification = exports2.Notification = exports2.NotificationKind = void 0; + var empty_1 = require_empty(); + var of_1 = require_of(); + var throwError_1 = require_throwError(); + var isFunction_1 = require_isFunction(); + var NotificationKind; + (function(NotificationKind2) { + NotificationKind2["NEXT"] = "N"; + NotificationKind2["ERROR"] = "E"; + NotificationKind2["COMPLETE"] = "C"; + })(NotificationKind = exports2.NotificationKind || (exports2.NotificationKind = {})); + var Notification = function() { + function Notification2(kind, value, error) { + this.kind = kind; + this.value = value; + this.error = error; + this.hasValue = kind === "N"; + } + Notification2.prototype.observe = function(observer) { + return observeNotification(this, observer); + }; + Notification2.prototype.do = function(nextHandler, errorHandler, completeHandler) { + var _a = this, kind = _a.kind, value = _a.value, error = _a.error; + return kind === "N" ? nextHandler === null || nextHandler === void 0 ? void 0 : nextHandler(value) : kind === "E" ? errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(error) : completeHandler === null || completeHandler === void 0 ? void 0 : completeHandler(); + }; + Notification2.prototype.accept = function(nextOrObserver, error, complete) { + var _a; + return isFunction_1.isFunction((_a = nextOrObserver) === null || _a === void 0 ? void 0 : _a.next) ? this.observe(nextOrObserver) : this.do(nextOrObserver, error, complete); + }; + Notification2.prototype.toObservable = function() { + var _a = this, kind = _a.kind, value = _a.value, error = _a.error; + var result = kind === "N" ? of_1.of(value) : kind === "E" ? throwError_1.throwError(function() { + return error; + }) : kind === "C" ? empty_1.EMPTY : 0; + if (!result) { + throw new TypeError("Unexpected notification kind " + kind); + } + return result; + }; + Notification2.createNext = function(value) { + return new Notification2("N", value); + }; + Notification2.createError = function(err) { + return new Notification2("E", void 0, err); + }; + Notification2.createComplete = function() { + return Notification2.completeNotification; + }; + Notification2.completeNotification = new Notification2("C"); + return Notification2; + }(); + exports2.Notification = Notification; + function observeNotification(notification, observer) { + var _a, _b, _c; + var _d = notification, kind = _d.kind, value = _d.value, error = _d.error; + if (typeof kind !== "string") { + throw new TypeError('Invalid notification, missing "kind"'); + } + kind === "N" ? (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, value) : kind === "E" ? (_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, error) : (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer); + } + exports2.observeNotification = observeNotification; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isObservable.js +var require_isObservable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isObservable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isObservable = void 0; + var Observable_1 = require_Observable(); + var isFunction_1 = require_isFunction(); + function isObservable(obj) { + return !!obj && (obj instanceof Observable_1.Observable || isFunction_1.isFunction(obj.lift) && isFunction_1.isFunction(obj.subscribe)); + } + exports2.isObservable = isObservable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/EmptyError.js +var require_EmptyError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/EmptyError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.EmptyError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.EmptyError = createErrorClass_1.createErrorClass(function(_super) { + return function EmptyErrorImpl() { + _super(this); + this.name = "EmptyError"; + this.message = "no elements in sequence"; + }; + }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/lastValueFrom.js +var require_lastValueFrom = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/lastValueFrom.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.lastValueFrom = void 0; + var EmptyError_1 = require_EmptyError(); + function lastValueFrom(source, config) { + var hasConfig = typeof config === "object"; + return new Promise(function(resolve, reject) { + var _hasValue = false; + var _value; + source.subscribe({ + next: function(value) { + _value = value; + _hasValue = true; + }, + error: reject, + complete: function() { + if (_hasValue) { + resolve(_value); + } else if (hasConfig) { + resolve(config.defaultValue); + } else { + reject(new EmptyError_1.EmptyError()); + } + } + }); + }); + } + exports2.lastValueFrom = lastValueFrom; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/firstValueFrom.js +var require_firstValueFrom = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/firstValueFrom.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.firstValueFrom = void 0; + var EmptyError_1 = require_EmptyError(); + var Subscriber_1 = require_Subscriber(); + function firstValueFrom(source, config) { + var hasConfig = typeof config === "object"; + return new Promise(function(resolve, reject) { + var subscriber = new Subscriber_1.SafeSubscriber({ + next: function(value) { + resolve(value); + subscriber.unsubscribe(); + }, + error: reject, + complete: function() { + if (hasConfig) { + resolve(config.defaultValue); + } else { + reject(new EmptyError_1.EmptyError()); + } + } + }); + source.subscribe(subscriber); + }); + } + exports2.firstValueFrom = firstValueFrom; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js +var require_ArgumentOutOfRangeError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ArgumentOutOfRangeError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.ArgumentOutOfRangeError = createErrorClass_1.createErrorClass(function(_super) { + return function ArgumentOutOfRangeErrorImpl() { + _super(this); + this.name = "ArgumentOutOfRangeError"; + this.message = "argument out of range"; + }; + }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js +var require_NotFoundError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NotFoundError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.NotFoundError = createErrorClass_1.createErrorClass(function(_super) { + return function NotFoundErrorImpl(message2) { + _super(this); + this.name = "NotFoundError"; + this.message = message2; + }; + }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/SequenceError.js +var require_SequenceError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/SequenceError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SequenceError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.SequenceError = createErrorClass_1.createErrorClass(function(_super) { + return function SequenceErrorImpl(message2) { + _super(this); + this.name = "SequenceError"; + this.message = message2; + }; + }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isDate.js +var require_isDate = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isDate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isValidDate = void 0; + function isValidDate(value) { + return value instanceof Date && !isNaN(value); + } + exports2.isValidDate = isValidDate; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/timeout.js +var require_timeout = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/timeout.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.timeout = exports2.TimeoutError = void 0; + var async_1 = require_async(); + var isDate_1 = require_isDate(); + var lift_1 = require_lift(); + var from_1 = require_from2(); + var createErrorClass_1 = require_createErrorClass(); + var caughtSchedule_1 = require_caughtSchedule(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + exports2.TimeoutError = createErrorClass_1.createErrorClass(function(_super) { + return function TimeoutErrorImpl(info) { + if (info === void 0) { + info = null; + } + _super(this); + this.message = "Timeout has occurred"; + this.name = "TimeoutError"; + this.info = info; + }; + }); + function timeout(config, schedulerArg) { + var _a = isDate_1.isValidDate(config) ? { first: config } : typeof config === "number" ? { each: config } : config, first = _a.first, each = _a.each, _b = _a.with, _with = _b === void 0 ? timeoutErrorFactory : _b, _c = _a.scheduler, scheduler = _c === void 0 ? schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : async_1.asyncScheduler : _c, _d = _a.meta, meta = _d === void 0 ? null : _d; + if (first == null && each == null) { + throw new TypeError("No timeout provided."); + } + return lift_1.operate(function(source, subscriber) { + var originalSourceSubscription; + var timerSubscription; + var lastValue = null; + var seen = 0; + var startTimer = function(delay) { + timerSubscription = caughtSchedule_1.caughtSchedule(subscriber, scheduler, function() { + originalSourceSubscription.unsubscribe(); + from_1.innerFrom(_with({ + meta, + lastValue, + seen + })).subscribe(subscriber); + }, delay); + }; + originalSourceSubscription = source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); + seen++; + subscriber.next(lastValue = value); + each > 0 && startTimer(each); + }, void 0, void 0, function() { + if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) { + timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); + } + lastValue = null; + })); + startTimer(first != null ? typeof first === "number" ? first : +first - scheduler.now() : each); + }); + } + exports2.timeout = timeout; + function timeoutErrorFactory(info) { + throw new exports2.TimeoutError(info); + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js +var require_subscribeOn = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.subscribeOn = void 0; + var lift_1 = require_lift(); + function subscribeOn(scheduler, delay) { + if (delay === void 0) { + delay = 0; + } + return lift_1.operate(function(source, subscriber) { + subscriber.add(scheduler.schedule(function() { + return source.subscribe(subscriber); + }, delay)); + }); + } + exports2.subscribeOn = subscribeOn; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/map.js +var require_map = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/map.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.map = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function map(project, thisArg) { + return lift_1.operate(function(source, subscriber) { + var index = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + subscriber.next(project.call(thisArg, value, index++)); + })); + }); + } + exports2.map = map; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js +var require_mapOneOrManyArgs = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mapOneOrManyArgs = void 0; + var map_1 = require_map(); + var isArray = Array.isArray; + function callOrApply(fn2, args2) { + return isArray(args2) ? fn2.apply(void 0, __spreadArray([], __read(args2))) : fn2(args2); + } + function mapOneOrManyArgs(fn2) { + return map_1.map(function(args2) { + return callOrApply(fn2, args2); + }); + } + exports2.mapOneOrManyArgs = mapOneOrManyArgs; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js +var require_observeOn = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.observeOn = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function observeOn(scheduler, delay) { + if (delay === void 0) { + delay = 0; + } + return lift_1.operate(function(source, subscriber) { + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + return subscriber.add(scheduler.schedule(function() { + return subscriber.next(value); + }, delay)); + }, function() { + return subscriber.add(scheduler.schedule(function() { + return subscriber.complete(); + }, delay)); + }, function(err) { + return subscriber.add(scheduler.schedule(function() { + return subscriber.error(err); + }, delay)); + })); + }); + } + exports2.observeOn = observeOn; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js +var require_bindCallbackInternals = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bindCallbackInternals = void 0; + var isScheduler_1 = require_isScheduler(); + var Observable_1 = require_Observable(); + var subscribeOn_1 = require_subscribeOn(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var observeOn_1 = require_observeOn(); + var AsyncSubject_1 = require_AsyncSubject(); + function bindCallbackInternals(isNodeStyle, callbackFunc, resultSelector, scheduler) { + if (resultSelector) { + if (isScheduler_1.isScheduler(resultSelector)) { + scheduler = resultSelector; + } else { + return function() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + return bindCallbackInternals(isNodeStyle, callbackFunc, scheduler).apply(this, args2).pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)); + }; + } + } + if (scheduler) { + return function() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + return bindCallbackInternals(isNodeStyle, callbackFunc).apply(this, args2).pipe(subscribeOn_1.subscribeOn(scheduler), observeOn_1.observeOn(scheduler)); + }; + } + return function() { + var _this = this; + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var subject = new AsyncSubject_1.AsyncSubject(); + var uninitialized = true; + return new Observable_1.Observable(function(subscriber) { + var subs = subject.subscribe(subscriber); + if (uninitialized) { + uninitialized = false; + var isAsync_1 = false; + var isComplete_1 = false; + callbackFunc.apply(_this, __spreadArray(__spreadArray([], __read(args2)), [ + function() { + var results = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + results[_i2] = arguments[_i2]; + } + if (isNodeStyle) { + var err = results.shift(); + if (err != null) { + subject.error(err); + return; + } + } + subject.next(1 < results.length ? results : results[0]); + isComplete_1 = true; + if (isAsync_1) { + subject.complete(); + } + } + ])); + if (isComplete_1) { + subject.complete(); + } + isAsync_1 = true; + } + return subs; + }); + }; + } + exports2.bindCallbackInternals = bindCallbackInternals; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js +var require_bindCallback = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bindCallback = void 0; + var bindCallbackInternals_1 = require_bindCallbackInternals(); + function bindCallback(callbackFunc, resultSelector, scheduler) { + return bindCallbackInternals_1.bindCallbackInternals(false, callbackFunc, resultSelector, scheduler); + } + exports2.bindCallback = bindCallback; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js +var require_bindNodeCallback = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bindNodeCallback = void 0; + var bindCallbackInternals_1 = require_bindCallbackInternals(); + function bindNodeCallback(callbackFunc, resultSelector, scheduler) { + return bindCallbackInternals_1.bindCallbackInternals(true, callbackFunc, resultSelector, scheduler); + } + exports2.bindNodeCallback = bindNodeCallback; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js +var require_argsArgArrayOrObject = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argsArgArrayOrObject = void 0; + var isArray = Array.isArray; + var getPrototypeOf = Object.getPrototypeOf; + var objectProto = Object.prototype; + var getKeys = Object.keys; + function argsArgArrayOrObject(args2) { + if (args2.length === 1) { + var first_1 = args2[0]; + if (isArray(first_1)) { + return { args: first_1, keys: null }; + } + if (isPOJO(first_1)) { + var keys = getKeys(first_1); + return { + args: keys.map(function(key) { + return first_1[key]; + }), + keys + }; + } + } + return { args: args2, keys: null }; + } + exports2.argsArgArrayOrObject = argsArgArrayOrObject; + function isPOJO(obj) { + return obj && typeof obj === "object" && getPrototypeOf(obj) === objectProto; + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/createObject.js +var require_createObject = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/createObject.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createObject = void 0; + function createObject(keys, values) { + return keys.reduce(function(result, key, i) { + return result[key] = values[i], result; + }, {}); + } + exports2.createObject = createObject; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js +var require_combineLatest = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.combineLatestInit = exports2.combineLatest = void 0; + var Observable_1 = require_Observable(); + var argsArgArrayOrObject_1 = require_argsArgArrayOrObject(); + var from_1 = require_from2(); + var identity_1 = require_identity(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var args_1 = require_args(); + var createObject_1 = require_createObject(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function combineLatest() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(args2); + var resultSelector = args_1.popResultSelector(args2); + var _a = argsArgArrayOrObject_1.argsArgArrayOrObject(args2), observables = _a.args, keys = _a.keys; + if (observables.length === 0) { + return from_1.from([], scheduler); + } + var result = new Observable_1.Observable(combineLatestInit(observables, scheduler, keys ? function(values) { + return createObject_1.createObject(keys, values); + } : identity_1.identity)); + return resultSelector ? result.pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : result; + } + exports2.combineLatest = combineLatest; + function combineLatestInit(observables, scheduler, valueTransform) { + if (valueTransform === void 0) { + valueTransform = identity_1.identity; + } + return function(subscriber) { + maybeSchedule(scheduler, function() { + var length = observables.length; + var values = new Array(length); + var active = length; + var remainingFirstValues = length; + var _loop_1 = function(i2) { + maybeSchedule(scheduler, function() { + var source = from_1.from(observables[i2], scheduler); + var hasFirstValue = false; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + values[i2] = value; + if (!hasFirstValue) { + hasFirstValue = true; + remainingFirstValues--; + } + if (!remainingFirstValues) { + subscriber.next(valueTransform(values.slice())); + } + }, function() { + if (!--active) { + subscriber.complete(); + } + })); + }, subscriber); + }; + for (var i = 0; i < length; i++) { + _loop_1(i); + } + }, subscriber); + }; + } + exports2.combineLatestInit = combineLatestInit; + function maybeSchedule(scheduler, execute, subscription) { + if (scheduler) { + subscription.add(scheduler.schedule(execute)); + } else { + execute(); + } + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js +var require_mergeInternals = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeInternals = void 0; + var from_1 = require_from2(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalTeardown) { + var buffer = []; + var active = 0; + var index = 0; + var isComplete = false; + var checkComplete = function() { + if (isComplete && !buffer.length && !active) { + subscriber.complete(); + } + }; + var outerNext = function(value) { + return active < concurrent ? doInnerSub(value) : buffer.push(value); + }; + var doInnerSub = function(value) { + expand && subscriber.next(value); + active++; + var innerComplete = false; + from_1.innerFrom(project(value, index++)).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(innerValue) { + onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue); + if (expand) { + outerNext(innerValue); + } else { + subscriber.next(innerValue); + } + }, function() { + innerComplete = true; + }, void 0, function() { + if (innerComplete) { + try { + active--; + var _loop_1 = function() { + var bufferedValue = buffer.shift(); + innerSubScheduler ? subscriber.add(innerSubScheduler.schedule(function() { + return doInnerSub(bufferedValue); + })) : doInnerSub(bufferedValue); + }; + while (buffer.length && active < concurrent) { + _loop_1(); + } + checkComplete(); + } catch (err) { + subscriber.error(err); + } + } + })); + }; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, outerNext, function() { + isComplete = true; + checkComplete(); + })); + return function() { + additionalTeardown === null || additionalTeardown === void 0 ? void 0 : additionalTeardown(); + }; + } + exports2.mergeInternals = mergeInternals; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js +var require_mergeMap = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeMap = void 0; + var map_1 = require_map(); + var from_1 = require_from2(); + var lift_1 = require_lift(); + var mergeInternals_1 = require_mergeInternals(); + var isFunction_1 = require_isFunction(); + function mergeMap(project, resultSelector, concurrent) { + if (concurrent === void 0) { + concurrent = Infinity; + } + if (isFunction_1.isFunction(resultSelector)) { + return mergeMap(function(a, i) { + return map_1.map(function(b, ii) { + return resultSelector(a, b, i, ii); + })(from_1.innerFrom(project(a, i))); + }, concurrent); + } else if (typeof resultSelector === "number") { + concurrent = resultSelector; + } + return lift_1.operate(function(source, subscriber) { + return mergeInternals_1.mergeInternals(source, subscriber, project, concurrent); + }); + } + exports2.mergeMap = mergeMap; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js +var require_mergeAll = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeAll = void 0; + var mergeMap_1 = require_mergeMap(); + var identity_1 = require_identity(); + function mergeAll(concurrent) { + if (concurrent === void 0) { + concurrent = Infinity; + } + return mergeMap_1.mergeMap(identity_1.identity, concurrent); + } + exports2.mergeAll = mergeAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/concatAll.js +var require_concatAll = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/concatAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concatAll = void 0; + var mergeAll_1 = require_mergeAll(); + function concatAll() { + return mergeAll_1.mergeAll(1); + } + exports2.concatAll = concatAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/concat.js +var require_concat = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/concat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concat = void 0; + var concatAll_1 = require_concatAll(); + var fromArray_1 = require_fromArray(); + var args_1 = require_args(); + function concat() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + return concatAll_1.concatAll()(fromArray_1.internalFromArray(args2, args_1.popScheduler(args2))); + } + exports2.concat = concat; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/defer.js +var require_defer = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/defer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defer = void 0; + var Observable_1 = require_Observable(); + var from_1 = require_from2(); + function defer(observableFactory) { + return new Observable_1.Observable(function(subscriber) { + from_1.innerFrom(observableFactory()).subscribe(subscriber); + }); + } + exports2.defer = defer; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/connectable.js +var require_connectable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/connectable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.connectable = void 0; + var Subject_1 = require_Subject(); + var Observable_1 = require_Observable(); + var defer_1 = require_defer(); + var DEFAULT_CONFIG = { + connector: function() { + return new Subject_1.Subject(); + }, + resetOnDisconnect: true + }; + function connectable(source, config) { + if (config === void 0) { + config = DEFAULT_CONFIG; + } + var connection = null; + var connector = config.connector, _a = config.resetOnDisconnect, resetOnDisconnect = _a === void 0 ? true : _a; + var subject = connector(); + var result = new Observable_1.Observable(function(subscriber) { + return subject.subscribe(subscriber); + }); + result.connect = function() { + if (!connection || connection.closed) { + connection = defer_1.defer(function() { + return source; + }).subscribe(subject); + if (resetOnDisconnect) { + connection.add(function() { + return subject = connector(); + }); + } + } + return connection; + }; + return result; + } + exports2.connectable = connectable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js +var require_forkJoin = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.forkJoin = void 0; + var Observable_1 = require_Observable(); + var argsArgArrayOrObject_1 = require_argsArgArrayOrObject(); + var from_1 = require_from2(); + var args_1 = require_args(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var createObject_1 = require_createObject(); + function forkJoin() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var resultSelector = args_1.popResultSelector(args2); + var _a = argsArgArrayOrObject_1.argsArgArrayOrObject(args2), sources = _a.args, keys = _a.keys; + var result = new Observable_1.Observable(function(subscriber) { + var length = sources.length; + if (!length) { + subscriber.complete(); + return; + } + var values = new Array(length); + var remainingCompletions = length; + var remainingEmissions = length; + var _loop_1 = function(sourceIndex2) { + var hasValue = false; + from_1.innerFrom(sources[sourceIndex2]).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + if (!hasValue) { + hasValue = true; + remainingEmissions--; + } + values[sourceIndex2] = value; + }, function() { + if (!--remainingCompletions || !hasValue) { + if (!remainingEmissions) { + subscriber.next(keys ? createObject_1.createObject(keys, values) : values); + } + subscriber.complete(); + } + })); + }; + for (var sourceIndex = 0; sourceIndex < length; sourceIndex++) { + _loop_1(sourceIndex); + } + }); + return resultSelector ? result.pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : result; + } + exports2.forkJoin = forkJoin; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js +var require_fromEvent = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromEvent = void 0; + var Observable_1 = require_Observable(); + var mergeMap_1 = require_mergeMap(); + var isArrayLike_1 = require_isArrayLike(); + var isFunction_1 = require_isFunction(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var fromArray_1 = require_fromArray(); + var nodeEventEmitterMethods = ["addListener", "removeListener"]; + var eventTargetMethods = ["addEventListener", "removeEventListener"]; + var jqueryMethods = ["on", "off"]; + function fromEvent(target, eventName, options, resultSelector) { + if (isFunction_1.isFunction(options)) { + resultSelector = options; + options = void 0; + } + if (resultSelector) { + return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)); + } + var _a = __read(isEventTarget(target) ? eventTargetMethods.map(function(methodName) { + return function(handler) { + return target[methodName](eventName, handler, options); + }; + }) : isNodeStyleEventEmitter(target) ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) : isJQueryStyleEventEmitter(target) ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) : [], 2), add = _a[0], remove = _a[1]; + if (!add) { + if (isArrayLike_1.isArrayLike(target)) { + return mergeMap_1.mergeMap(function(subTarget) { + return fromEvent(subTarget, eventName, options); + })(fromArray_1.internalFromArray(target)); + } + } + if (!add) { + throw new TypeError("Invalid event target"); + } + return new Observable_1.Observable(function(subscriber) { + var handler = function() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + return subscriber.next(1 < args2.length ? args2 : args2[0]); + }; + add(handler); + return function() { + return remove(handler); + }; + }); + } + exports2.fromEvent = fromEvent; + function toCommonHandlerRegistry(target, eventName) { + return function(methodName) { + return function(handler) { + return target[methodName](eventName, handler); + }; + }; + } + function isNodeStyleEventEmitter(target) { + return isFunction_1.isFunction(target.addListener) && isFunction_1.isFunction(target.removeListener); + } + function isJQueryStyleEventEmitter(target) { + return isFunction_1.isFunction(target.on) && isFunction_1.isFunction(target.off); + } + function isEventTarget(target) { + return isFunction_1.isFunction(target.addEventListener) && isFunction_1.isFunction(target.removeEventListener); + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/fromEventPattern.js +var require_fromEventPattern = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/fromEventPattern.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromEventPattern = void 0; + var Observable_1 = require_Observable(); + var isFunction_1 = require_isFunction(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + function fromEventPattern(addHandler, removeHandler, resultSelector) { + if (resultSelector) { + return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)); + } + return new Observable_1.Observable(function(subscriber) { + var handler = function() { + var e = []; + for (var _i = 0; _i < arguments.length; _i++) { + e[_i] = arguments[_i]; + } + return subscriber.next(e.length === 1 ? e[0] : e); + }; + var retValue = addHandler(handler); + return isFunction_1.isFunction(removeHandler) ? function() { + return removeHandler(handler, retValue); + } : void 0; + }); + } + exports2.fromEventPattern = fromEventPattern; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/generate.js +var require_generate = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/generate.js"(exports2) { + "use strict"; + var __generator = exports2 && exports2.__generator || function(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) + throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) + throw new TypeError("Generator is already executing."); + while (_) + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) + return t; + if (y = 0, t) + op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generate = void 0; + var identity_1 = require_identity(); + var isScheduler_1 = require_isScheduler(); + var defer_1 = require_defer(); + var scheduleIterable_1 = require_scheduleIterable(); + function generate(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler) { + var _a, _b; + var resultSelector; + var initialState; + if (arguments.length === 1) { + _a = initialStateOrOptions, initialState = _a.initialState, condition = _a.condition, iterate = _a.iterate, _b = _a.resultSelector, resultSelector = _b === void 0 ? identity_1.identity : _b, scheduler = _a.scheduler; + } else { + initialState = initialStateOrOptions; + if (!resultSelectorOrScheduler || isScheduler_1.isScheduler(resultSelectorOrScheduler)) { + resultSelector = identity_1.identity; + scheduler = resultSelectorOrScheduler; + } else { + resultSelector = resultSelectorOrScheduler; + } + } + function gen() { + var state; + return __generator(this, function(_a2) { + switch (_a2.label) { + case 0: + state = initialState; + _a2.label = 1; + case 1: + if (!(!condition || condition(state))) + return [3, 4]; + return [4, resultSelector(state)]; + case 2: + _a2.sent(); + _a2.label = 3; + case 3: + state = iterate(state); + return [3, 1]; + case 4: + return [2]; + } + }); + } + return defer_1.defer(scheduler ? function() { + return scheduleIterable_1.scheduleIterable(gen(), scheduler); + } : gen); + } + exports2.generate = generate; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/iif.js +var require_iif = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/iif.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.iif = void 0; + var defer_1 = require_defer(); + function iif(condition, trueResult, falseResult) { + return defer_1.defer(function() { + return condition() ? trueResult : falseResult; + }); + } + exports2.iif = iif; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/timer.js +var require_timer2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/timer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.timer = void 0; + var Observable_1 = require_Observable(); + var async_1 = require_async(); + var isScheduler_1 = require_isScheduler(); + var isDate_1 = require_isDate(); + function timer(dueTime, intervalOrScheduler, scheduler) { + if (dueTime === void 0) { + dueTime = 0; + } + if (scheduler === void 0) { + scheduler = async_1.async; + } + var intervalDuration = -1; + if (intervalOrScheduler != null) { + if (isScheduler_1.isScheduler(intervalOrScheduler)) { + scheduler = intervalOrScheduler; + } else { + intervalDuration = intervalOrScheduler; + } + } + return new Observable_1.Observable(function(subscriber) { + var due = isDate_1.isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime; + if (due < 0) { + due = 0; + } + var n = 0; + return scheduler.schedule(function() { + if (!subscriber.closed) { + subscriber.next(n++); + if (0 <= intervalDuration) { + this.schedule(void 0, intervalDuration); + } else { + subscriber.complete(); + } + } + }, due); + }); + } + exports2.timer = timer; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/interval.js +var require_interval = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/interval.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.interval = void 0; + var async_1 = require_async(); + var timer_1 = require_timer2(); + function interval(period, scheduler) { + if (period === void 0) { + period = 0; + } + if (scheduler === void 0) { + scheduler = async_1.asyncScheduler; + } + if (period < 0) { + period = 0; + } + return timer_1.timer(period, period, scheduler); + } + exports2.interval = interval; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/merge.js +var require_merge = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/merge.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.merge = void 0; + var mergeAll_1 = require_mergeAll(); + var fromArray_1 = require_fromArray(); + var from_1 = require_from2(); + var empty_1 = require_empty(); + var args_1 = require_args(); + function merge() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(args2); + var concurrent = args_1.popNumber(args2, Infinity); + var sources = args2; + return !sources.length ? empty_1.EMPTY : sources.length === 1 ? from_1.innerFrom(sources[0]) : mergeAll_1.mergeAll(concurrent)(fromArray_1.internalFromArray(sources, scheduler)); + } + exports2.merge = merge; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/never.js +var require_never = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/never.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.never = exports2.NEVER = void 0; + var Observable_1 = require_Observable(); + var noop_1 = require_noop(); + exports2.NEVER = new Observable_1.Observable(noop_1.noop); + function never() { + return exports2.NEVER; + } + exports2.never = never; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js +var require_argsOrArgArray = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argsOrArgArray = void 0; + var isArray = Array.isArray; + function argsOrArgArray(args2) { + return args2.length === 1 && isArray(args2[0]) ? args2[0] : args2; + } + exports2.argsOrArgArray = argsOrArgArray; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNext.js +var require_onErrorResumeNext = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNext.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.onErrorResumeNext = void 0; + var lift_1 = require_lift(); + var from_1 = require_from2(); + var argsOrArgArray_1 = require_argsOrArgArray(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop(); + function onErrorResumeNext() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + var nextSources = argsOrArgArray_1.argsOrArgArray(sources); + return lift_1.operate(function(source, subscriber) { + var remaining = __spreadArray([source], __read(nextSources)); + var subscribeNext = function() { + if (!subscriber.closed) { + if (remaining.length > 0) { + var nextSource = void 0; + try { + nextSource = from_1.innerFrom(remaining.shift()); + } catch (err) { + subscribeNext(); + return; + } + var innerSub = new OperatorSubscriber_1.OperatorSubscriber(subscriber, void 0, noop_1.noop, noop_1.noop); + subscriber.add(nextSource.subscribe(innerSub)); + innerSub.add(subscribeNext); + } else { + subscriber.complete(); + } + } + }; + subscribeNext(); + }); + } + exports2.onErrorResumeNext = onErrorResumeNext; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js +var require_onErrorResumeNext2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.onErrorResumeNext = void 0; + var empty_1 = require_empty(); + var onErrorResumeNext_1 = require_onErrorResumeNext(); + var argsOrArgArray_1 = require_argsOrArgArray(); + function onErrorResumeNext() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + return onErrorResumeNext_1.onErrorResumeNext(argsOrArgArray_1.argsOrArgArray(sources))(empty_1.EMPTY); + } + exports2.onErrorResumeNext = onErrorResumeNext; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/pairs.js +var require_pairs = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/pairs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pairs = void 0; + var from_1 = require_from2(); + function pairs(obj, scheduler) { + return from_1.from(Object.entries(obj), scheduler); + } + exports2.pairs = pairs; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/not.js +var require_not = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/not.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.not = void 0; + function not(pred, thisArg) { + return function(value, index) { + return !pred.call(thisArg, value, index); + }; + } + exports2.not = not; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/filter.js +var require_filter = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/filter.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.filter = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function filter(predicate, thisArg) { + return lift_1.operate(function(source, subscriber) { + var index = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + return predicate.call(thisArg, value, index++) && subscriber.next(value); + })); + }); + } + exports2.filter = filter; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/partition.js +var require_partition = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/partition.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.partition = void 0; + var not_1 = require_not(); + var filter_1 = require_filter(); + var from_1 = require_from2(); + function partition(source, predicate, thisArg) { + return [filter_1.filter(predicate, thisArg)(from_1.innerFrom(source)), filter_1.filter(not_1.not(predicate, thisArg))(from_1.innerFrom(source))]; + } + exports2.partition = partition; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/race.js +var require_race = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/race.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.raceInit = exports2.race = void 0; + var Observable_1 = require_Observable(); + var from_1 = require_from2(); + var argsOrArgArray_1 = require_argsOrArgArray(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function race() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + sources = argsOrArgArray_1.argsOrArgArray(sources); + return sources.length === 1 ? from_1.innerFrom(sources[0]) : new Observable_1.Observable(raceInit(sources)); + } + exports2.race = race; + function raceInit(sources) { + return function(subscriber) { + var subscriptions = []; + var _loop_1 = function(i2) { + subscriptions.push(from_1.innerFrom(sources[i2]).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + if (subscriptions) { + for (var s = 0; s < subscriptions.length; s++) { + s !== i2 && subscriptions[s].unsubscribe(); + } + subscriptions = null; + } + subscriber.next(value); + }))); + }; + for (var i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) { + _loop_1(i); + } + }; + } + exports2.raceInit = raceInit; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/range.js +var require_range = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/range.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.range = void 0; + var Observable_1 = require_Observable(); + var empty_1 = require_empty(); + function range(start, count, scheduler) { + if (count == null) { + count = start; + start = 0; + } + if (count <= 0) { + return empty_1.EMPTY; + } + var end = count + start; + return new Observable_1.Observable(scheduler ? function(subscriber) { + var n = start; + return scheduler.schedule(function() { + if (n < end) { + subscriber.next(n++); + this.schedule(); + } else { + subscriber.complete(); + } + }); + } : function(subscriber) { + var n = start; + while (n < end && !subscriber.closed) { + subscriber.next(n++); + } + subscriber.complete(); + }); + } + exports2.range = range; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/using.js +var require_using = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/using.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.using = void 0; + var Observable_1 = require_Observable(); + var from_1 = require_from2(); + var empty_1 = require_empty(); + function using(resourceFactory, observableFactory) { + return new Observable_1.Observable(function(subscriber) { + var resource = resourceFactory(); + var result = observableFactory(resource); + var source = result ? from_1.innerFrom(result) : empty_1.EMPTY; + source.subscribe(subscriber); + return function() { + if (resource) { + resource.unsubscribe(); + } + }; + }); + } + exports2.using = using; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/zip.js +var require_zip = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/zip.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.zip = void 0; + var Observable_1 = require_Observable(); + var from_1 = require_from2(); + var argsOrArgArray_1 = require_argsOrArgArray(); + var empty_1 = require_empty(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var args_1 = require_args(); + function zip() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var resultSelector = args_1.popResultSelector(args2); + var sources = argsOrArgArray_1.argsOrArgArray(args2); + return sources.length ? new Observable_1.Observable(function(subscriber) { + var buffers = sources.map(function() { + return []; + }); + var completed = sources.map(function() { + return false; + }); + subscriber.add(function() { + buffers = completed = null; + }); + var _loop_1 = function(sourceIndex2) { + from_1.innerFrom(sources[sourceIndex2]).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + buffers[sourceIndex2].push(value); + if (buffers.every(function(buffer) { + return buffer.length; + })) { + var result = buffers.map(function(buffer) { + return buffer.shift(); + }); + subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray([], __read(result))) : result); + if (buffers.some(function(buffer, i) { + return !buffer.length && completed[i]; + })) { + subscriber.complete(); + } + } + }, function() { + completed[sourceIndex2] = true; + !buffers[sourceIndex2].length && subscriber.complete(); + })); + }; + for (var sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) { + _loop_1(sourceIndex); + } + return function() { + buffers = completed = null; + }; + }) : empty_1.EMPTY; + } + exports2.zip = zip; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/types.js +var require_types3 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/types.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/audit.js +var require_audit = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/audit.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.audit = void 0; + var lift_1 = require_lift(); + var from_1 = require_from2(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function audit(durationSelector) { + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + var lastValue = null; + var durationSubscriber = null; + var isComplete = false; + var endDuration = function() { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber = null; + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + isComplete && subscriber.complete(); + }; + var cleanupDuration = function() { + durationSubscriber = null; + isComplete && subscriber.complete(); + }; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + hasValue = true; + lastValue = value; + if (!durationSubscriber) { + from_1.innerFrom(durationSelector(value)).subscribe(durationSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, endDuration, cleanupDuration)); + } + }, function() { + isComplete = true; + (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); + })); + }); + } + exports2.audit = audit; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/auditTime.js +var require_auditTime = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/auditTime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.auditTime = void 0; + var async_1 = require_async(); + var audit_1 = require_audit(); + var timer_1 = require_timer2(); + function auditTime(duration, scheduler) { + if (scheduler === void 0) { + scheduler = async_1.async; + } + return audit_1.audit(function() { + return timer_1.timer(duration, scheduler); + }); + } + exports2.auditTime = auditTime; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/buffer.js +var require_buffer = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/buffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buffer = void 0; + var lift_1 = require_lift(); + var noop_1 = require_noop(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function buffer(closingNotifier) { + return lift_1.operate(function(source, subscriber) { + var currentBuffer = []; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + return currentBuffer.push(value); + }, function() { + subscriber.next(currentBuffer); + subscriber.complete(); + })); + closingNotifier.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function() { + var b = currentBuffer; + currentBuffer = []; + subscriber.next(b); + }, noop_1.noop)); + return function() { + currentBuffer = null; + }; + }); + } + exports2.buffer = buffer; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js +var require_bufferCount = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js"(exports2) { + "use strict"; + var __values = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bufferCount = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var arrRemove_1 = require_arrRemove(); + function bufferCount(bufferSize, startBufferEvery) { + if (startBufferEvery === void 0) { + startBufferEvery = null; + } + startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize; + return lift_1.operate(function(source, subscriber) { + var buffers = []; + var count = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var e_1, _a, e_2, _b; + var toEmit = null; + if (count++ % startBufferEvery === 0) { + buffers.push([]); + } + try { + for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { + var buffer = buffers_1_1.value; + buffer.push(value); + if (bufferSize <= buffer.length) { + toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : []; + toEmit.push(buffer); + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) + _a.call(buffers_1); + } finally { + if (e_1) + throw e_1.error; + } + } + if (toEmit) { + try { + for (var toEmit_1 = __values(toEmit), toEmit_1_1 = toEmit_1.next(); !toEmit_1_1.done; toEmit_1_1 = toEmit_1.next()) { + var buffer = toEmit_1_1.value; + arrRemove_1.arrRemove(buffers, buffer); + subscriber.next(buffer); + } + } catch (e_2_1) { + e_2 = { error: e_2_1 }; + } finally { + try { + if (toEmit_1_1 && !toEmit_1_1.done && (_b = toEmit_1.return)) + _b.call(toEmit_1); + } finally { + if (e_2) + throw e_2.error; + } + } + } + }, function() { + var e_3, _a; + try { + for (var buffers_2 = __values(buffers), buffers_2_1 = buffers_2.next(); !buffers_2_1.done; buffers_2_1 = buffers_2.next()) { + var buffer = buffers_2_1.value; + subscriber.next(buffer); + } + } catch (e_3_1) { + e_3 = { error: e_3_1 }; + } finally { + try { + if (buffers_2_1 && !buffers_2_1.done && (_a = buffers_2.return)) + _a.call(buffers_2); + } finally { + if (e_3) + throw e_3.error; + } + } + subscriber.complete(); + }, void 0, function() { + buffers = null; + })); + }); + } + exports2.bufferCount = bufferCount; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js +var require_bufferTime = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js"(exports2) { + "use strict"; + var __values = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bufferTime = void 0; + var Subscription_1 = require_Subscription(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var arrRemove_1 = require_arrRemove(); + var async_1 = require_async(); + var args_1 = require_args(); + function bufferTime(bufferTimeSpan) { + var _a, _b; + var otherArgs = []; + for (var _i = 1; _i < arguments.length; _i++) { + otherArgs[_i - 1] = arguments[_i]; + } + var scheduler = (_a = args_1.popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : async_1.asyncScheduler; + var bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + var maxBufferSize = otherArgs[1] || Infinity; + return lift_1.operate(function(source, subscriber) { + var bufferRecords = []; + var restartOnEmit = false; + var emit = function(record) { + var buffer = record.buffer, subs = record.subs; + subs.unsubscribe(); + arrRemove_1.arrRemove(bufferRecords, record); + subscriber.next(buffer); + restartOnEmit && startBuffer(); + }; + var startBuffer = function() { + if (bufferRecords) { + var subs = new Subscription_1.Subscription(); + subscriber.add(subs); + var buffer = []; + var record_1 = { + buffer, + subs + }; + bufferRecords.push(record_1); + subs.add(scheduler.schedule(function() { + return emit(record_1); + }, bufferTimeSpan)); + } + }; + bufferCreationInterval !== null && bufferCreationInterval >= 0 ? subscriber.add(scheduler.schedule(function() { + startBuffer(); + !this.closed && subscriber.add(this.schedule(null, bufferCreationInterval)); + }, bufferCreationInterval)) : restartOnEmit = true; + startBuffer(); + var bufferTimeSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var e_1, _a2; + var recordsCopy = bufferRecords.slice(); + try { + for (var recordsCopy_1 = __values(recordsCopy), recordsCopy_1_1 = recordsCopy_1.next(); !recordsCopy_1_1.done; recordsCopy_1_1 = recordsCopy_1.next()) { + var record = recordsCopy_1_1.value; + var buffer = record.buffer; + buffer.push(value); + maxBufferSize <= buffer.length && emit(record); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (recordsCopy_1_1 && !recordsCopy_1_1.done && (_a2 = recordsCopy_1.return)) + _a2.call(recordsCopy_1); + } finally { + if (e_1) + throw e_1.error; + } + } + }, function() { + while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) { + subscriber.next(bufferRecords.shift().buffer); + } + bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe(); + subscriber.complete(); + subscriber.unsubscribe(); + }, void 0, function() { + return bufferRecords = null; + }); + source.subscribe(bufferTimeSubscriber); + }); + } + exports2.bufferTime = bufferTime; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js +var require_bufferToggle = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js"(exports2) { + "use strict"; + var __values = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bufferToggle = void 0; + var Subscription_1 = require_Subscription(); + var lift_1 = require_lift(); + var from_1 = require_from2(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop(); + var arrRemove_1 = require_arrRemove(); + function bufferToggle(openings, closingSelector) { + return lift_1.operate(function(source, subscriber) { + var buffers = []; + from_1.innerFrom(openings).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(openValue) { + var buffer = []; + buffers.push(buffer); + var closingSubscription = new Subscription_1.Subscription(); + var emitBuffer = function() { + arrRemove_1.arrRemove(buffers, buffer); + subscriber.next(buffer); + closingSubscription.unsubscribe(); + }; + closingSubscription.add(from_1.innerFrom(closingSelector(openValue)).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, emitBuffer, noop_1.noop))); + }, noop_1.noop)); + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var e_1, _a; + try { + for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { + var buffer = buffers_1_1.value; + buffer.push(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) + _a.call(buffers_1); + } finally { + if (e_1) + throw e_1.error; + } + } + }, function() { + while (buffers.length > 0) { + subscriber.next(buffers.shift()); + } + subscriber.complete(); + })); + }); + } + exports2.bufferToggle = bufferToggle; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js +var require_bufferWhen = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bufferWhen = void 0; + var lift_1 = require_lift(); + var noop_1 = require_noop(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var from_1 = require_from2(); + function bufferWhen(closingSelector) { + return lift_1.operate(function(source, subscriber) { + var buffer = null; + var closingSubscriber = null; + var openBuffer = function() { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + var b = buffer; + buffer = []; + b && subscriber.next(b); + from_1.innerFrom(closingSelector()).subscribe(closingSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, openBuffer, noop_1.noop)); + }; + openBuffer(); + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + return buffer === null || buffer === void 0 ? void 0 : buffer.push(value); + }, function() { + buffer && subscriber.next(buffer); + subscriber.complete(); + }, void 0, function() { + return buffer = closingSubscriber = null; + })); + }); + } + exports2.bufferWhen = bufferWhen; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/catchError.js +var require_catchError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/catchError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.catchError = void 0; + var from_1 = require_from2(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var lift_1 = require_lift(); + function catchError(selector) { + return lift_1.operate(function(source, subscriber) { + var innerSub = null; + var syncUnsub = false; + var handledResult; + innerSub = source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, void 0, void 0, function(err) { + handledResult = from_1.innerFrom(selector(err, catchError(selector)(source))); + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + handledResult.subscribe(subscriber); + } else { + syncUnsub = true; + } + })); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + handledResult.subscribe(subscriber); + } + }); + } + exports2.catchError = catchError; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js +var require_scanInternals = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scanInternals = void 0; + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) { + return function(source, subscriber) { + var hasState = hasSeed; + var state = seed; + var index = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var i = index++; + state = hasState ? accumulator(state, value, i) : (hasState = true, value); + emitOnNext && subscriber.next(state); + }, emitBeforeComplete && function() { + hasState && subscriber.next(state); + subscriber.complete(); + })); + }; + } + exports2.scanInternals = scanInternals; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/reduce.js +var require_reduce = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/reduce.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.reduce = void 0; + var scanInternals_1 = require_scanInternals(); + var lift_1 = require_lift(); + function reduce(accumulator, seed) { + return lift_1.operate(scanInternals_1.scanInternals(accumulator, seed, arguments.length >= 2, false, true)); + } + exports2.reduce = reduce; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/toArray.js +var require_toArray = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/toArray.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toArray = void 0; + var reduce_1 = require_reduce(); + var lift_1 = require_lift(); + var arrReducer = function(arr, value) { + return arr.push(value), arr; + }; + function toArray() { + return lift_1.operate(function(source, subscriber) { + reduce_1.reduce(arrReducer, [])(source).subscribe(subscriber); + }); + } + exports2.toArray = toArray; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js +var require_joinAllInternals = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.joinAllInternals = void 0; + var identity_1 = require_identity(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var pipe_1 = require_pipe(); + var mergeMap_1 = require_mergeMap(); + var toArray_1 = require_toArray(); + function joinAllInternals(joinFn, project) { + return pipe_1.pipe(toArray_1.toArray(), mergeMap_1.mergeMap(function(sources) { + return joinFn(sources); + }), project ? mapOneOrManyArgs_1.mapOneOrManyArgs(project) : identity_1.identity); + } + exports2.joinAllInternals = joinAllInternals; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js +var require_combineLatestAll = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.combineLatestAll = void 0; + var combineLatest_1 = require_combineLatest(); + var joinAllInternals_1 = require_joinAllInternals(); + function combineLatestAll(project) { + return joinAllInternals_1.joinAllInternals(combineLatest_1.combineLatest, project); + } + exports2.combineLatestAll = combineLatestAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/combineAll.js +var require_combineAll = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/combineAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.combineAll = void 0; + var combineLatestAll_1 = require_combineLatestAll(); + exports2.combineAll = combineLatestAll_1.combineLatestAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js +var require_combineLatest2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.combineLatest = void 0; + var combineLatest_1 = require_combineLatest(); + var lift_1 = require_lift(); + var argsOrArgArray_1 = require_argsOrArgArray(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var pipe_1 = require_pipe(); + var args_1 = require_args(); + function combineLatest() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var resultSelector = args_1.popResultSelector(args2); + return resultSelector ? pipe_1.pipe(combineLatest.apply(void 0, __spreadArray([], __read(args2))), mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : lift_1.operate(function(source, subscriber) { + combineLatest_1.combineLatestInit(__spreadArray([source], __read(argsOrArgArray_1.argsOrArgArray(args2))))(subscriber); + }); + } + exports2.combineLatest = combineLatest; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js +var require_combineLatestWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.combineLatestWith = void 0; + var combineLatest_1 = require_combineLatest2(); + function combineLatestWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return combineLatest_1.combineLatest.apply(void 0, __spreadArray([], __read(otherSources))); + } + exports2.combineLatestWith = combineLatestWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/concatMap.js +var require_concatMap = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/concatMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concatMap = void 0; + var mergeMap_1 = require_mergeMap(); + var isFunction_1 = require_isFunction(); + function concatMap(project, resultSelector) { + return isFunction_1.isFunction(resultSelector) ? mergeMap_1.mergeMap(project, resultSelector, 1) : mergeMap_1.mergeMap(project, 1); + } + exports2.concatMap = concatMap; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js +var require_concatMapTo = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concatMapTo = void 0; + var concatMap_1 = require_concatMap(); + var isFunction_1 = require_isFunction(); + function concatMapTo(innerObservable, resultSelector) { + return isFunction_1.isFunction(resultSelector) ? concatMap_1.concatMap(function() { + return innerObservable; + }, resultSelector) : concatMap_1.concatMap(function() { + return innerObservable; + }); + } + exports2.concatMapTo = concatMapTo; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/concat.js +var require_concat2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/concat.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concat = void 0; + var lift_1 = require_lift(); + var concatAll_1 = require_concatAll(); + var fromArray_1 = require_fromArray(); + var args_1 = require_args(); + function concat() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(args2); + return lift_1.operate(function(source, subscriber) { + concatAll_1.concatAll()(fromArray_1.internalFromArray(__spreadArray([source], __read(args2)), scheduler)).subscribe(subscriber); + }); + } + exports2.concat = concat; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/concatWith.js +var require_concatWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/concatWith.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concatWith = void 0; + var concat_1 = require_concat2(); + function concatWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return concat_1.concat.apply(void 0, __spreadArray([], __read(otherSources))); + } + exports2.concatWith = concatWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js +var require_fromSubscribable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromSubscribable = void 0; + var Observable_1 = require_Observable(); + function fromSubscribable(subscribable) { + return new Observable_1.Observable(function(subscriber) { + return subscribable.subscribe(subscriber); + }); + } + exports2.fromSubscribable = fromSubscribable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/connect.js +var require_connect = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/connect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.connect = void 0; + var Subject_1 = require_Subject(); + var from_1 = require_from2(); + var lift_1 = require_lift(); + var fromSubscribable_1 = require_fromSubscribable(); + var DEFAULT_CONFIG = { + connector: function() { + return new Subject_1.Subject(); + } + }; + function connect(selector, config) { + if (config === void 0) { + config = DEFAULT_CONFIG; + } + var connector = config.connector; + return lift_1.operate(function(source, subscriber) { + var subject = connector(); + from_1.from(selector(fromSubscribable_1.fromSubscribable(subject))).subscribe(subscriber); + subscriber.add(source.subscribe(subject)); + }); + } + exports2.connect = connect; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/count.js +var require_count = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/count.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.count = void 0; + var reduce_1 = require_reduce(); + function count(predicate) { + return reduce_1.reduce(function(total, value, i) { + return !predicate || predicate(value, i) ? total + 1 : total; + }, 0); + } + exports2.count = count; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/debounce.js +var require_debounce = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/debounce.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.debounce = void 0; + var lift_1 = require_lift(); + var noop_1 = require_noop(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var from_1 = require_from2(); + function debounce(durationSelector) { + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + var lastValue = null; + var durationSubscriber = null; + var emit = function() { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber = null; + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + hasValue = true; + lastValue = value; + durationSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, emit, noop_1.noop); + from_1.innerFrom(durationSelector(value)).subscribe(durationSubscriber); + }, function() { + emit(); + subscriber.complete(); + }, void 0, function() { + lastValue = durationSubscriber = null; + })); + }); + } + exports2.debounce = debounce; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js +var require_debounceTime = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.debounceTime = void 0; + var async_1 = require_async(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function debounceTime(dueTime, scheduler) { + if (scheduler === void 0) { + scheduler = async_1.asyncScheduler; + } + return lift_1.operate(function(source, subscriber) { + var activeTask = null; + var lastValue = null; + var lastTime = null; + var emit = function() { + if (activeTask) { + activeTask.unsubscribe(); + activeTask = null; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }; + function emitWhenIdle() { + var targetTime = lastTime + dueTime; + var now = scheduler.now(); + if (now < targetTime) { + activeTask = this.schedule(void 0, targetTime - now); + subscriber.add(activeTask); + return; + } + emit(); + } + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + lastValue = value; + lastTime = scheduler.now(); + if (!activeTask) { + activeTask = scheduler.schedule(emitWhenIdle, dueTime); + subscriber.add(activeTask); + } + }, function() { + emit(); + subscriber.complete(); + }, void 0, function() { + lastValue = activeTask = null; + })); + }); + } + exports2.debounceTime = debounceTime; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js +var require_defaultIfEmpty = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultIfEmpty = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function defaultIfEmpty(defaultValue) { + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + hasValue = true; + subscriber.next(value); + }, function() { + if (!hasValue) { + subscriber.next(defaultValue); + } + subscriber.complete(); + })); + }); + } + exports2.defaultIfEmpty = defaultIfEmpty; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/take.js +var require_take = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/take.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.take = void 0; + var empty_1 = require_empty(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function take(count) { + return count <= 0 ? function() { + return empty_1.EMPTY; + } : lift_1.operate(function(source, subscriber) { + var seen = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + if (++seen <= count) { + subscriber.next(value); + if (count <= seen) { + subscriber.complete(); + } + } + })); + }); + } + exports2.take = take; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js +var require_ignoreElements = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ignoreElements = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop(); + function ignoreElements() { + return lift_1.operate(function(source, subscriber) { + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, noop_1.noop)); + }); + } + exports2.ignoreElements = ignoreElements; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mapTo.js +var require_mapTo = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mapTo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mapTo = void 0; + var map_1 = require_map(); + function mapTo(value) { + return map_1.map(function() { + return value; + }); + } + exports2.mapTo = mapTo; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js +var require_delayWhen = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delayWhen = void 0; + var concat_1 = require_concat(); + var take_1 = require_take(); + var ignoreElements_1 = require_ignoreElements(); + var mapTo_1 = require_mapTo(); + var mergeMap_1 = require_mergeMap(); + function delayWhen(delayDurationSelector, subscriptionDelay) { + if (subscriptionDelay) { + return function(source) { + return concat_1.concat(subscriptionDelay.pipe(take_1.take(1), ignoreElements_1.ignoreElements()), source.pipe(delayWhen(delayDurationSelector))); + }; + } + return mergeMap_1.mergeMap(function(value, index) { + return delayDurationSelector(value, index).pipe(take_1.take(1), mapTo_1.mapTo(value)); + }); + } + exports2.delayWhen = delayWhen; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/delay.js +var require_delay = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = void 0; + var async_1 = require_async(); + var delayWhen_1 = require_delayWhen(); + var timer_1 = require_timer2(); + function delay(due, scheduler) { + if (scheduler === void 0) { + scheduler = async_1.asyncScheduler; + } + var duration = timer_1.timer(due, scheduler); + return delayWhen_1.delayWhen(function() { + return duration; + }); + } + exports2.delay = delay; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js +var require_dematerialize = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.dematerialize = void 0; + var Notification_1 = require_Notification(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function dematerialize() { + return lift_1.operate(function(source, subscriber) { + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(notification) { + return Notification_1.observeNotification(notification, subscriber); + })); + }); + } + exports2.dematerialize = dematerialize; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/distinct.js +var require_distinct = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/distinct.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.distinct = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop(); + function distinct(keySelector, flushes) { + return lift_1.operate(function(source, subscriber) { + var distinctKeys = new Set(); + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var key = keySelector ? keySelector(value) : value; + if (!distinctKeys.has(key)) { + distinctKeys.add(key); + subscriber.next(value); + } + })); + flushes === null || flushes === void 0 ? void 0 : flushes.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function() { + return distinctKeys.clear(); + }, noop_1.noop)); + }); + } + exports2.distinct = distinct; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js +var require_distinctUntilChanged = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.distinctUntilChanged = void 0; + var identity_1 = require_identity(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function distinctUntilChanged(comparator, keySelector) { + if (keySelector === void 0) { + keySelector = identity_1.identity; + } + comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare; + return lift_1.operate(function(source, subscriber) { + var previousKey; + var first = true; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var currentKey = keySelector(value); + if (first || !comparator(previousKey, currentKey)) { + first = false; + previousKey = currentKey; + subscriber.next(value); + } + })); + }); + } + exports2.distinctUntilChanged = distinctUntilChanged; + function defaultCompare(a, b) { + return a === b; + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js +var require_distinctUntilKeyChanged = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.distinctUntilKeyChanged = void 0; + var distinctUntilChanged_1 = require_distinctUntilChanged(); + function distinctUntilKeyChanged(key, compare) { + return distinctUntilChanged_1.distinctUntilChanged(function(x, y) { + return compare ? compare(x[key], y[key]) : x[key] === y[key]; + }); + } + exports2.distinctUntilKeyChanged = distinctUntilKeyChanged; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js +var require_throwIfEmpty = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throwIfEmpty = void 0; + var EmptyError_1 = require_EmptyError(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function throwIfEmpty(errorFactory) { + if (errorFactory === void 0) { + errorFactory = defaultErrorFactory; + } + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + hasValue = true; + subscriber.next(value); + }, function() { + return hasValue ? subscriber.complete() : subscriber.error(errorFactory()); + })); + }); + } + exports2.throwIfEmpty = throwIfEmpty; + function defaultErrorFactory() { + return new EmptyError_1.EmptyError(); + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/elementAt.js +var require_elementAt = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/elementAt.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.elementAt = void 0; + var ArgumentOutOfRangeError_1 = require_ArgumentOutOfRangeError(); + var filter_1 = require_filter(); + var throwIfEmpty_1 = require_throwIfEmpty(); + var defaultIfEmpty_1 = require_defaultIfEmpty(); + var take_1 = require_take(); + function elementAt(index, defaultValue) { + if (index < 0) { + throw new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError(); + } + var hasDefaultValue = arguments.length >= 2; + return function(source) { + return source.pipe(filter_1.filter(function(v, i) { + return i === index; + }), take_1.take(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function() { + return new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError(); + })); + }; + } + exports2.elementAt = elementAt; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/endWith.js +var require_endWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/endWith.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.endWith = void 0; + var concat_1 = require_concat(); + var of_1 = require_of(); + function endWith() { + var values = []; + for (var _i = 0; _i < arguments.length; _i++) { + values[_i] = arguments[_i]; + } + return function(source) { + return concat_1.concat(source, of_1.of.apply(void 0, __spreadArray([], __read(values)))); + }; + } + exports2.endWith = endWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/every.js +var require_every = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/every.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.every = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function every(predicate, thisArg) { + return lift_1.operate(function(source, subscriber) { + var index = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + if (!predicate.call(thisArg, value, index++, source)) { + subscriber.next(false); + subscriber.complete(); + } + }, function() { + subscriber.next(true); + subscriber.complete(); + })); + }); + } + exports2.every = every; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js +var require_exhaustAll = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exhaustAll = void 0; + var lift_1 = require_lift(); + var from_1 = require_from2(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function exhaustAll() { + return lift_1.operate(function(source, subscriber) { + var isComplete = false; + var innerSub = null; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(inner) { + if (!innerSub) { + innerSub = from_1.innerFrom(inner).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, void 0, function() { + innerSub = null; + isComplete && subscriber.complete(); + })); + } + }, function() { + isComplete = true; + !innerSub && subscriber.complete(); + })); + }); + } + exports2.exhaustAll = exhaustAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/exhaust.js +var require_exhaust = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/exhaust.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exhaust = void 0; + var exhaustAll_1 = require_exhaustAll(); + exports2.exhaust = exhaustAll_1.exhaustAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js +var require_exhaustMap = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exhaustMap = void 0; + var map_1 = require_map(); + var from_1 = require_from2(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function exhaustMap(project, resultSelector) { + if (resultSelector) { + return function(source) { + return source.pipe(exhaustMap(function(a, i) { + return from_1.innerFrom(project(a, i)).pipe(map_1.map(function(b, ii) { + return resultSelector(a, b, i, ii); + })); + })); + }; + } + return lift_1.operate(function(source, subscriber) { + var index = 0; + var innerSub = null; + var isComplete = false; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(outerValue) { + if (!innerSub) { + innerSub = new OperatorSubscriber_1.OperatorSubscriber(subscriber, void 0, function() { + innerSub = null; + isComplete && subscriber.complete(); + }); + from_1.innerFrom(project(outerValue, index++)).subscribe(innerSub); + } + }, function() { + isComplete = true; + !innerSub && subscriber.complete(); + })); + }); + } + exports2.exhaustMap = exhaustMap; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/expand.js +var require_expand = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/expand.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.expand = void 0; + var lift_1 = require_lift(); + var mergeInternals_1 = require_mergeInternals(); + function expand(project, concurrent, scheduler) { + if (concurrent === void 0) { + concurrent = Infinity; + } + concurrent = (concurrent || 0) < 1 ? Infinity : concurrent; + return lift_1.operate(function(source, subscriber) { + return mergeInternals_1.mergeInternals(source, subscriber, project, concurrent, void 0, true, scheduler); + }); + } + exports2.expand = expand; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/finalize.js +var require_finalize = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/finalize.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.finalize = void 0; + var lift_1 = require_lift(); + function finalize(callback) { + return lift_1.operate(function(source, subscriber) { + try { + source.subscribe(subscriber); + } finally { + subscriber.add(callback); + } + }); + } + exports2.finalize = finalize; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/find.js +var require_find = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/find.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createFind = exports2.find = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function find(predicate, thisArg) { + return lift_1.operate(createFind(predicate, thisArg, "value")); + } + exports2.find = find; + function createFind(predicate, thisArg, emit) { + var findIndex = emit === "index"; + return function(source, subscriber) { + var index = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var i = index++; + if (predicate.call(thisArg, value, i, source)) { + subscriber.next(findIndex ? i : value); + subscriber.complete(); + } + }, function() { + subscriber.next(findIndex ? -1 : void 0); + subscriber.complete(); + })); + }; + } + exports2.createFind = createFind; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/findIndex.js +var require_findIndex = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/findIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findIndex = void 0; + var lift_1 = require_lift(); + var find_1 = require_find(); + function findIndex(predicate, thisArg) { + return lift_1.operate(find_1.createFind(predicate, thisArg, "index")); + } + exports2.findIndex = findIndex; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/first.js +var require_first = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/first.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.first = void 0; + var EmptyError_1 = require_EmptyError(); + var filter_1 = require_filter(); + var take_1 = require_take(); + var defaultIfEmpty_1 = require_defaultIfEmpty(); + var throwIfEmpty_1 = require_throwIfEmpty(); + var identity_1 = require_identity(); + function first(predicate, defaultValue) { + var hasDefaultValue = arguments.length >= 2; + return function(source) { + return source.pipe(predicate ? filter_1.filter(function(v, i) { + return predicate(v, i, source); + }) : identity_1.identity, take_1.take(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function() { + return new EmptyError_1.EmptyError(); + })); + }; + } + exports2.first = first; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js +var require_groupBy = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.groupBy = void 0; + var Observable_1 = require_Observable(); + var from_1 = require_from2(); + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function groupBy(keySelector, elementOrOptions, duration, connector) { + return lift_1.operate(function(source, subscriber) { + var element; + if (!elementOrOptions || typeof elementOrOptions === "function") { + element = elementOrOptions; + } else { + duration = elementOrOptions.duration, element = elementOrOptions.element, connector = elementOrOptions.connector; + } + var groups = new Map(); + var notify = function(cb) { + groups.forEach(cb); + cb(subscriber); + }; + var handleError = function(err) { + return notify(function(consumer) { + return consumer.error(err); + }); + }; + var groupBySourceSubscriber = new GroupBySubscriber(subscriber, function(value) { + try { + var key_1 = keySelector(value); + var group_1 = groups.get(key_1); + if (!group_1) { + groups.set(key_1, group_1 = connector ? connector() : new Subject_1.Subject()); + var grouped = createGroupedObservable(key_1, group_1); + subscriber.next(grouped); + if (duration) { + var durationSubscriber_1 = new OperatorSubscriber_1.OperatorSubscriber(group_1, function() { + group_1.complete(); + durationSubscriber_1 === null || durationSubscriber_1 === void 0 ? void 0 : durationSubscriber_1.unsubscribe(); + }, void 0, void 0, function() { + return groups.delete(key_1); + }); + groupBySourceSubscriber.add(from_1.innerFrom(duration(grouped)).subscribe(durationSubscriber_1)); + } + } + group_1.next(element ? element(value) : value); + } catch (err) { + handleError(err); + } + }, function() { + return notify(function(consumer) { + return consumer.complete(); + }); + }, handleError, function() { + return groups.clear(); + }); + source.subscribe(groupBySourceSubscriber); + function createGroupedObservable(key, groupSubject) { + var result = new Observable_1.Observable(function(groupSubscriber) { + groupBySourceSubscriber.activeGroups++; + var innerSub = groupSubject.subscribe(groupSubscriber); + return function() { + innerSub.unsubscribe(); + --groupBySourceSubscriber.activeGroups === 0 && groupBySourceSubscriber.teardownAttempted && groupBySourceSubscriber.unsubscribe(); + }; + }); + result.key = key; + return result; + } + }); + } + exports2.groupBy = groupBy; + var GroupBySubscriber = function(_super) { + __extends(GroupBySubscriber2, _super); + function GroupBySubscriber2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.activeGroups = 0; + _this.teardownAttempted = false; + return _this; + } + GroupBySubscriber2.prototype.unsubscribe = function() { + this.teardownAttempted = true; + this.activeGroups === 0 && _super.prototype.unsubscribe.call(this); + }; + return GroupBySubscriber2; + }(OperatorSubscriber_1.OperatorSubscriber); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js +var require_isEmpty = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isEmpty = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function isEmpty() { + return lift_1.operate(function(source, subscriber) { + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function() { + subscriber.next(false); + subscriber.complete(); + }, function() { + subscriber.next(true); + subscriber.complete(); + })); + }); + } + exports2.isEmpty = isEmpty; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js +var require_takeLast = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js"(exports2) { + "use strict"; + var __values = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.takeLast = void 0; + var empty_1 = require_empty(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function takeLast(count) { + return count <= 0 ? function() { + return empty_1.EMPTY; + } : lift_1.operate(function(source, subscriber) { + var buffer = []; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + buffer.push(value); + count < buffer.length && buffer.shift(); + }, function() { + var e_1, _a; + try { + for (var buffer_1 = __values(buffer), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) { + var value = buffer_1_1.value; + subscriber.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) + _a.call(buffer_1); + } finally { + if (e_1) + throw e_1.error; + } + } + subscriber.complete(); + }, void 0, function() { + buffer = null; + })); + }); + } + exports2.takeLast = takeLast; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/last.js +var require_last = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/last.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.last = void 0; + var EmptyError_1 = require_EmptyError(); + var filter_1 = require_filter(); + var takeLast_1 = require_takeLast(); + var throwIfEmpty_1 = require_throwIfEmpty(); + var defaultIfEmpty_1 = require_defaultIfEmpty(); + var identity_1 = require_identity(); + function last(predicate, defaultValue) { + var hasDefaultValue = arguments.length >= 2; + return function(source) { + return source.pipe(predicate ? filter_1.filter(function(v, i) { + return predicate(v, i, source); + }) : identity_1.identity, takeLast_1.takeLast(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function() { + return new EmptyError_1.EmptyError(); + })); + }; + } + exports2.last = last; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/materialize.js +var require_materialize = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/materialize.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.materialize = void 0; + var Notification_1 = require_Notification(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function materialize() { + return lift_1.operate(function(source, subscriber) { + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + subscriber.next(Notification_1.Notification.createNext(value)); + }, function() { + subscriber.next(Notification_1.Notification.createComplete()); + subscriber.complete(); + }, function(err) { + subscriber.next(Notification_1.Notification.createError(err)); + subscriber.complete(); + })); + }); + } + exports2.materialize = materialize; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/max.js +var require_max = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/max.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.max = void 0; + var reduce_1 = require_reduce(); + var isFunction_1 = require_isFunction(); + function max(comparer) { + return reduce_1.reduce(isFunction_1.isFunction(comparer) ? function(x, y) { + return comparer(x, y) > 0 ? x : y; + } : function(x, y) { + return x > y ? x : y; + }); + } + exports2.max = max; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/flatMap.js +var require_flatMap = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/flatMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.flatMap = void 0; + var mergeMap_1 = require_mergeMap(); + exports2.flatMap = mergeMap_1.mergeMap; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js +var require_mergeMapTo = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeMapTo = void 0; + var mergeMap_1 = require_mergeMap(); + var isFunction_1 = require_isFunction(); + function mergeMapTo(innerObservable, resultSelector, concurrent) { + if (concurrent === void 0) { + concurrent = Infinity; + } + if (isFunction_1.isFunction(resultSelector)) { + return mergeMap_1.mergeMap(function() { + return innerObservable; + }, resultSelector, concurrent); + } + if (typeof resultSelector === "number") { + concurrent = resultSelector; + } + return mergeMap_1.mergeMap(function() { + return innerObservable; + }, concurrent); + } + exports2.mergeMapTo = mergeMapTo; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js +var require_mergeScan = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeScan = void 0; + var lift_1 = require_lift(); + var mergeInternals_1 = require_mergeInternals(); + function mergeScan(accumulator, seed, concurrent) { + if (concurrent === void 0) { + concurrent = Infinity; + } + return lift_1.operate(function(source, subscriber) { + var state = seed; + return mergeInternals_1.mergeInternals(source, subscriber, function(value, index) { + return accumulator(state, value, index); + }, concurrent, function(value) { + state = value; + }, false, void 0, function() { + return state = null; + }); + }); + } + exports2.mergeScan = mergeScan; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/merge.js +var require_merge2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/merge.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.merge = void 0; + var lift_1 = require_lift(); + var argsOrArgArray_1 = require_argsOrArgArray(); + var fromArray_1 = require_fromArray(); + var mergeAll_1 = require_mergeAll(); + var args_1 = require_args(); + function merge() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(args2); + var concurrent = args_1.popNumber(args2, Infinity); + args2 = argsOrArgArray_1.argsOrArgArray(args2); + return lift_1.operate(function(source, subscriber) { + mergeAll_1.mergeAll(concurrent)(fromArray_1.internalFromArray(__spreadArray([source], __read(args2)), scheduler)).subscribe(subscriber); + }); + } + exports2.merge = merge; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js +var require_mergeWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeWith = void 0; + var merge_1 = require_merge2(); + function mergeWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return merge_1.merge.apply(void 0, __spreadArray([], __read(otherSources))); + } + exports2.mergeWith = mergeWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/min.js +var require_min = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/min.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.min = void 0; + var reduce_1 = require_reduce(); + var isFunction_1 = require_isFunction(); + function min(comparer) { + return reduce_1.reduce(isFunction_1.isFunction(comparer) ? function(x, y) { + return comparer(x, y) < 0 ? x : y; + } : function(x, y) { + return x < y ? x : y; + }); + } + exports2.min = min; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/multicast.js +var require_multicast = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/multicast.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multicast = void 0; + var ConnectableObservable_1 = require_ConnectableObservable(); + var isFunction_1 = require_isFunction(); + var connect_1 = require_connect(); + function multicast(subjectOrSubjectFactory, selector) { + var subjectFactory = isFunction_1.isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : function() { + return subjectOrSubjectFactory; + }; + if (isFunction_1.isFunction(selector)) { + return connect_1.connect(selector, { + connector: subjectFactory + }); + } + return function(source) { + return new ConnectableObservable_1.ConnectableObservable(source, subjectFactory); + }; + } + exports2.multicast = multicast; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js +var require_pairwise = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pairwise = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function pairwise() { + return lift_1.operate(function(source, subscriber) { + var prev; + var hasPrev = false; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var p = prev; + prev = value; + hasPrev && subscriber.next([p, value]); + hasPrev = true; + })); + }); + } + exports2.pairwise = pairwise; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/pluck.js +var require_pluck = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/pluck.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pluck = void 0; + var map_1 = require_map(); + function pluck() { + var properties = []; + for (var _i = 0; _i < arguments.length; _i++) { + properties[_i] = arguments[_i]; + } + var length = properties.length; + if (length === 0) { + throw new Error("list of properties cannot be empty."); + } + return map_1.map(function(x) { + var currentProp = x; + for (var i = 0; i < length; i++) { + var p = currentProp === null || currentProp === void 0 ? void 0 : currentProp[properties[i]]; + if (typeof p !== "undefined") { + currentProp = p; + } else { + return void 0; + } + } + return currentProp; + }); + } + exports2.pluck = pluck; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/publish.js +var require_publish = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/publish.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.publish = void 0; + var Subject_1 = require_Subject(); + var multicast_1 = require_multicast(); + var connect_1 = require_connect(); + function publish(selector) { + return selector ? function(source) { + return connect_1.connect(selector)(source); + } : function(source) { + return multicast_1.multicast(new Subject_1.Subject())(source); + }; + } + exports2.publish = publish; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js +var require_publishBehavior = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.publishBehavior = void 0; + var BehaviorSubject_1 = require_BehaviorSubject(); + var ConnectableObservable_1 = require_ConnectableObservable(); + function publishBehavior(initialValue) { + return function(source) { + var subject = new BehaviorSubject_1.BehaviorSubject(initialValue); + return new ConnectableObservable_1.ConnectableObservable(source, function() { + return subject; + }); + }; + } + exports2.publishBehavior = publishBehavior; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/publishLast.js +var require_publishLast = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/publishLast.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.publishLast = void 0; + var AsyncSubject_1 = require_AsyncSubject(); + var ConnectableObservable_1 = require_ConnectableObservable(); + function publishLast() { + return function(source) { + var subject = new AsyncSubject_1.AsyncSubject(); + return new ConnectableObservable_1.ConnectableObservable(source, function() { + return subject; + }); + }; + } + exports2.publishLast = publishLast; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js +var require_publishReplay = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.publishReplay = void 0; + var ReplaySubject_1 = require_ReplaySubject(); + var multicast_1 = require_multicast(); + var isFunction_1 = require_isFunction(); + function publishReplay(bufferSize, windowTime, selectorOrScheduler, timestampProvider) { + if (selectorOrScheduler && !isFunction_1.isFunction(selectorOrScheduler)) { + timestampProvider = selectorOrScheduler; + } + var selector = isFunction_1.isFunction(selectorOrScheduler) ? selectorOrScheduler : void 0; + return function(source) { + return multicast_1.multicast(new ReplaySubject_1.ReplaySubject(bufferSize, windowTime, timestampProvider), selector)(source); + }; + } + exports2.publishReplay = publishReplay; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/raceWith.js +var require_raceWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/raceWith.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.raceWith = void 0; + var race_1 = require_race(); + var lift_1 = require_lift(); + var identity_1 = require_identity(); + function raceWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return !otherSources.length ? identity_1.identity : lift_1.operate(function(source, subscriber) { + race_1.raceInit(__spreadArray([source], __read(otherSources)))(subscriber); + }); + } + exports2.raceWith = raceWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/repeat.js +var require_repeat = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/repeat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.repeat = void 0; + var empty_1 = require_empty(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function repeat(count) { + if (count === void 0) { + count = Infinity; + } + return count <= 0 ? function() { + return empty_1.EMPTY; + } : lift_1.operate(function(source, subscriber) { + var soFar = 0; + var innerSub; + var subscribeForRepeat = function() { + var syncUnsub = false; + innerSub = source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, void 0, function() { + if (++soFar < count) { + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRepeat(); + } else { + syncUnsub = true; + } + } else { + subscriber.complete(); + } + })); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRepeat(); + } + }; + subscribeForRepeat(); + }); + } + exports2.repeat = repeat; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js +var require_repeatWhen = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.repeatWhen = void 0; + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function repeatWhen(notifier) { + return lift_1.operate(function(source, subscriber) { + var innerSub; + var syncResub = false; + var completions$; + var isNotifierComplete = false; + var isMainComplete = false; + var checkComplete = function() { + return isMainComplete && isNotifierComplete && (subscriber.complete(), true); + }; + var getCompletionSubject = function() { + if (!completions$) { + completions$ = new Subject_1.Subject(); + notifier(completions$).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function() { + if (innerSub) { + subscribeForRepeatWhen(); + } else { + syncResub = true; + } + }, function() { + isNotifierComplete = true; + checkComplete(); + })); + } + return completions$; + }; + var subscribeForRepeatWhen = function() { + isMainComplete = false; + innerSub = source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, void 0, function() { + isMainComplete = true; + !checkComplete() && getCompletionSubject().next(); + })); + if (syncResub) { + innerSub.unsubscribe(); + innerSub = null; + syncResub = false; + subscribeForRepeatWhen(); + } + }; + subscribeForRepeatWhen(); + }); + } + exports2.repeatWhen = repeatWhen; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/retry.js +var require_retry = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/retry.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retry = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var identity_1 = require_identity(); + var timer_1 = require_timer2(); + var from_1 = require_from2(); + function retry(configOrCount) { + if (configOrCount === void 0) { + configOrCount = Infinity; + } + var config; + if (configOrCount && typeof configOrCount === "object") { + config = configOrCount; + } else { + config = { + count: configOrCount + }; + } + var _a = config.count, count = _a === void 0 ? Infinity : _a, delay = config.delay, _b = config.resetOnSuccess, resetOnSuccess = _b === void 0 ? false : _b; + return count <= 0 ? identity_1.identity : lift_1.operate(function(source, subscriber) { + var soFar = 0; + var innerSub; + var subscribeForRetry = function() { + var syncUnsub = false; + innerSub = source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + if (resetOnSuccess) { + soFar = 0; + } + subscriber.next(value); + }, void 0, function(err) { + if (soFar++ < count) { + var resub_1 = function() { + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } else { + syncUnsub = true; + } + }; + if (delay != null) { + var notifier = typeof delay === "number" ? timer_1.timer(delay) : from_1.innerFrom(delay(err, soFar)); + var notifierSubscriber_1 = new OperatorSubscriber_1.OperatorSubscriber(subscriber, function() { + notifierSubscriber_1.unsubscribe(); + resub_1(); + }, function() { + subscriber.complete(); + }); + notifier.subscribe(notifierSubscriber_1); + } else { + resub_1(); + } + } else { + subscriber.error(err); + } + })); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } + }; + subscribeForRetry(); + }); + } + exports2.retry = retry; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js +var require_retryWhen = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryWhen = void 0; + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function retryWhen(notifier) { + return lift_1.operate(function(source, subscriber) { + var innerSub; + var syncResub = false; + var errors$; + var subscribeForRetryWhen = function() { + innerSub = source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, void 0, void 0, function(err) { + if (!errors$) { + errors$ = new Subject_1.Subject(); + notifier(errors$).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function() { + return innerSub ? subscribeForRetryWhen() : syncResub = true; + })); + } + if (errors$) { + errors$.next(err); + } + })); + if (syncResub) { + innerSub.unsubscribe(); + innerSub = null; + syncResub = false; + subscribeForRetryWhen(); + } + }; + subscribeForRetryWhen(); + }); + } + exports2.retryWhen = retryWhen; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/sample.js +var require_sample = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/sample.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sample = void 0; + var lift_1 = require_lift(); + var noop_1 = require_noop(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function sample(notifier) { + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + var lastValue = null; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + hasValue = true; + lastValue = value; + })); + var emit = function() { + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }; + notifier.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, emit, noop_1.noop)); + }); + } + exports2.sample = sample; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js +var require_sampleTime = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sampleTime = void 0; + var async_1 = require_async(); + var sample_1 = require_sample(); + var interval_1 = require_interval(); + function sampleTime(period, scheduler) { + if (scheduler === void 0) { + scheduler = async_1.asyncScheduler; + } + return sample_1.sample(interval_1.interval(period, scheduler)); + } + exports2.sampleTime = sampleTime; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/scan.js +var require_scan = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/scan.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scan = void 0; + var lift_1 = require_lift(); + var scanInternals_1 = require_scanInternals(); + function scan(accumulator, seed) { + return lift_1.operate(scanInternals_1.scanInternals(accumulator, seed, arguments.length >= 2, true)); + } + exports2.scan = scan; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js +var require_sequenceEqual = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sequenceEqual = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function sequenceEqual(compareTo, comparator) { + if (comparator === void 0) { + comparator = function(a, b) { + return a === b; + }; + } + return lift_1.operate(function(source, subscriber) { + var aState = createState(); + var bState = createState(); + var emit = function(isEqual) { + subscriber.next(isEqual); + subscriber.complete(); + }; + var createSubscriber = function(selfState, otherState) { + var sequenceEqualSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(a) { + var buffer = otherState.buffer, complete = otherState.complete; + if (buffer.length === 0) { + complete ? emit(false) : selfState.buffer.push(a); + } else { + !comparator(a, buffer.shift()) && emit(false); + } + }, function() { + selfState.complete = true; + var complete = otherState.complete, buffer = otherState.buffer; + complete && emit(buffer.length === 0); + sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe(); + }); + return sequenceEqualSubscriber; + }; + source.subscribe(createSubscriber(aState, bState)); + compareTo.subscribe(createSubscriber(bState, aState)); + }); + } + exports2.sequenceEqual = sequenceEqual; + function createState() { + return { + buffer: [], + complete: false + }; + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/share.js +var require_share = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/share.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.share = void 0; + var from_1 = require_from2(); + var take_1 = require_take(); + var Subject_1 = require_Subject(); + var Subscriber_1 = require_Subscriber(); + var lift_1 = require_lift(); + function share(options) { + if (options === void 0) { + options = {}; + } + var _a = options.connector, connector = _a === void 0 ? function() { + return new Subject_1.Subject(); + } : _a, _b = options.resetOnError, resetOnError = _b === void 0 ? true : _b, _c = options.resetOnComplete, resetOnComplete = _c === void 0 ? true : _c, _d = options.resetOnRefCountZero, resetOnRefCountZero = _d === void 0 ? true : _d; + return function(wrapperSource) { + var connection = null; + var resetConnection = null; + var subject = null; + var refCount = 0; + var hasCompleted = false; + var hasErrored = false; + var cancelReset = function() { + resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe(); + resetConnection = null; + }; + var reset = function() { + cancelReset(); + connection = subject = null; + hasCompleted = hasErrored = false; + }; + var resetAndUnsubscribe = function() { + var conn = connection; + reset(); + conn === null || conn === void 0 ? void 0 : conn.unsubscribe(); + }; + return lift_1.operate(function(source, subscriber) { + refCount++; + if (!hasErrored && !hasCompleted) { + cancelReset(); + } + var dest = subject = subject !== null && subject !== void 0 ? subject : connector(); + subscriber.add(function() { + refCount--; + if (refCount === 0 && !hasErrored && !hasCompleted) { + resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero); + } + }); + dest.subscribe(subscriber); + if (!connection) { + connection = new Subscriber_1.SafeSubscriber({ + next: function(value) { + return dest.next(value); + }, + error: function(err) { + hasErrored = true; + cancelReset(); + resetConnection = handleReset(reset, resetOnError, err); + dest.error(err); + }, + complete: function() { + hasCompleted = true; + cancelReset(); + resetConnection = handleReset(reset, resetOnComplete); + dest.complete(); + } + }); + from_1.from(source).subscribe(connection); + } + })(wrapperSource); + }; + } + exports2.share = share; + function handleReset(reset, on) { + var args2 = []; + for (var _i = 2; _i < arguments.length; _i++) { + args2[_i - 2] = arguments[_i]; + } + if (on === true) { + reset(); + return null; + } + if (on === false) { + return null; + } + return on.apply(void 0, __spreadArray([], __read(args2))).pipe(take_1.take(1)).subscribe(function() { + return reset(); + }); + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js +var require_shareReplay = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.shareReplay = void 0; + var ReplaySubject_1 = require_ReplaySubject(); + var share_1 = require_share(); + function shareReplay(configOrBufferSize, windowTime, scheduler) { + var _a, _b; + var bufferSize; + var refCount = false; + if (configOrBufferSize && typeof configOrBufferSize === "object") { + bufferSize = (_a = configOrBufferSize.bufferSize) !== null && _a !== void 0 ? _a : Infinity; + windowTime = (_b = configOrBufferSize.windowTime) !== null && _b !== void 0 ? _b : Infinity; + refCount = !!configOrBufferSize.refCount; + scheduler = configOrBufferSize.scheduler; + } else { + bufferSize = configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity; + } + return share_1.share({ + connector: function() { + return new ReplaySubject_1.ReplaySubject(bufferSize, windowTime, scheduler); + }, + resetOnError: true, + resetOnComplete: false, + resetOnRefCountZero: refCount + }); + } + exports2.shareReplay = shareReplay; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/single.js +var require_single = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/single.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.single = void 0; + var EmptyError_1 = require_EmptyError(); + var SequenceError_1 = require_SequenceError(); + var NotFoundError_1 = require_NotFoundError(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function single(predicate) { + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + var singleValue; + var seenValue = false; + var index = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + seenValue = true; + if (!predicate || predicate(value, index++, source)) { + hasValue && subscriber.error(new SequenceError_1.SequenceError("Too many matching values")); + hasValue = true; + singleValue = value; + } + }, function() { + if (hasValue) { + subscriber.next(singleValue); + subscriber.complete(); + } else { + subscriber.error(seenValue ? new NotFoundError_1.NotFoundError("No matching values") : new EmptyError_1.EmptyError()); + } + })); + }); + } + exports2.single = single; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/skip.js +var require_skip = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/skip.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.skip = void 0; + var filter_1 = require_filter(); + function skip(count) { + return filter_1.filter(function(_, index) { + return count <= index; + }); + } + exports2.skip = skip; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js +var require_skipLast = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.skipLast = void 0; + var identity_1 = require_identity(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function skipLast(skipCount) { + return skipCount <= 0 ? identity_1.identity : lift_1.operate(function(source, subscriber) { + var ring = new Array(skipCount); + var seen = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var valueIndex = seen++; + if (valueIndex < skipCount) { + ring[valueIndex] = value; + } else { + var index = valueIndex % skipCount; + var oldValue = ring[index]; + ring[index] = value; + subscriber.next(oldValue); + } + })); + return function() { + ring = null; + }; + }); + } + exports2.skipLast = skipLast; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js +var require_skipUntil = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.skipUntil = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var from_1 = require_from2(); + var noop_1 = require_noop(); + function skipUntil(notifier) { + return lift_1.operate(function(source, subscriber) { + var taking = false; + var skipSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, function() { + skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe(); + taking = true; + }, noop_1.noop); + from_1.innerFrom(notifier).subscribe(skipSubscriber); + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + return taking && subscriber.next(value); + })); + }); + } + exports2.skipUntil = skipUntil; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js +var require_skipWhile = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.skipWhile = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function skipWhile(predicate) { + return lift_1.operate(function(source, subscriber) { + var taking = false; + var index = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + return (taking || (taking = !predicate(value, index++))) && subscriber.next(value); + })); + }); + } + exports2.skipWhile = skipWhile; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/startWith.js +var require_startWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/startWith.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.startWith = void 0; + var concat_1 = require_concat(); + var args_1 = require_args(); + var lift_1 = require_lift(); + function startWith() { + var values = []; + for (var _i = 0; _i < arguments.length; _i++) { + values[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(values); + return lift_1.operate(function(source, subscriber) { + (scheduler ? concat_1.concat(values, source, scheduler) : concat_1.concat(values, source)).subscribe(subscriber); + }); + } + exports2.startWith = startWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js +var require_switchMap = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.switchMap = void 0; + var from_1 = require_from2(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function switchMap(project, resultSelector) { + return lift_1.operate(function(source, subscriber) { + var innerSubscriber = null; + var index = 0; + var isComplete = false; + var checkComplete = function() { + return isComplete && !innerSubscriber && subscriber.complete(); + }; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); + var innerIndex = 0; + var outerIndex = index++; + from_1.innerFrom(project(value, outerIndex)).subscribe(innerSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(innerValue) { + return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); + }, function() { + innerSubscriber = null; + checkComplete(); + })); + }, function() { + isComplete = true; + checkComplete(); + })); + }); + } + exports2.switchMap = switchMap; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/switchAll.js +var require_switchAll = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/switchAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.switchAll = void 0; + var switchMap_1 = require_switchMap(); + var identity_1 = require_identity(); + function switchAll() { + return switchMap_1.switchMap(identity_1.identity); + } + exports2.switchAll = switchAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js +var require_switchMapTo = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.switchMapTo = void 0; + var switchMap_1 = require_switchMap(); + var isFunction_1 = require_isFunction(); + function switchMapTo(innerObservable, resultSelector) { + return isFunction_1.isFunction(resultSelector) ? switchMap_1.switchMap(function() { + return innerObservable; + }, resultSelector) : switchMap_1.switchMap(function() { + return innerObservable; + }); + } + exports2.switchMapTo = switchMapTo; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/switchScan.js +var require_switchScan = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/switchScan.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.switchScan = void 0; + var switchMap_1 = require_switchMap(); + var lift_1 = require_lift(); + function switchScan(accumulator, seed) { + return lift_1.operate(function(source, subscriber) { + var state = seed; + switchMap_1.switchMap(function(value, index) { + return accumulator(state, value, index); + }, function(_, innerValue) { + return state = innerValue, innerValue; + })(source).subscribe(subscriber); + return function() { + state = null; + }; + }); + } + exports2.switchScan = switchScan; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js +var require_takeUntil = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.takeUntil = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var from_1 = require_from2(); + var noop_1 = require_noop(); + function takeUntil(notifier) { + return lift_1.operate(function(source, subscriber) { + from_1.innerFrom(notifier).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function() { + return subscriber.complete(); + }, noop_1.noop)); + !subscriber.closed && source.subscribe(subscriber); + }); + } + exports2.takeUntil = takeUntil; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js +var require_takeWhile = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.takeWhile = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function takeWhile(predicate, inclusive) { + if (inclusive === void 0) { + inclusive = false; + } + return lift_1.operate(function(source, subscriber) { + var index = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var result = predicate(value, index++); + (result || inclusive) && subscriber.next(value); + !result && subscriber.complete(); + })); + }); + } + exports2.takeWhile = takeWhile; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/tap.js +var require_tap = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/tap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tap = void 0; + var isFunction_1 = require_isFunction(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var identity_1 = require_identity(); + function tap(observerOrNext, error, complete) { + var tapObserver = isFunction_1.isFunction(observerOrNext) || error || complete ? { next: observerOrNext, error, complete } : observerOrNext; + return tapObserver ? lift_1.operate(function(source, subscriber) { + var _a; + (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); + var isUnsub = true; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var _a2; + (_a2 = tapObserver.next) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver, value); + subscriber.next(value); + }, function() { + var _a2; + isUnsub = false; + (_a2 = tapObserver.complete) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver); + subscriber.complete(); + }, function(err) { + var _a2; + isUnsub = false; + (_a2 = tapObserver.error) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver, err); + subscriber.error(err); + }, function() { + var _a2, _b; + if (isUnsub) { + (_a2 = tapObserver.unsubscribe) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver); + } + (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver); + })); + }) : identity_1.identity; + } + exports2.tap = tap; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/throttle.js +var require_throttle = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/throttle.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throttle = exports2.defaultThrottleConfig = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var from_1 = require_from2(); + exports2.defaultThrottleConfig = { + leading: true, + trailing: false + }; + function throttle(durationSelector, _a) { + var _b = _a === void 0 ? exports2.defaultThrottleConfig : _a, leading = _b.leading, trailing = _b.trailing; + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + var sendValue = null; + var throttled = null; + var isComplete = false; + var endThrottling = function() { + throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe(); + throttled = null; + if (trailing) { + send(); + isComplete && subscriber.complete(); + } + }; + var cleanupThrottling = function() { + throttled = null; + isComplete && subscriber.complete(); + }; + var startThrottle = function(value) { + return throttled = from_1.innerFrom(durationSelector(value)).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, endThrottling, cleanupThrottling)); + }; + var send = function() { + if (hasValue) { + hasValue = false; + var value = sendValue; + sendValue = null; + subscriber.next(value); + !isComplete && startThrottle(value); + } + }; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + hasValue = true; + sendValue = value; + !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value)); + }, function() { + isComplete = true; + !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete(); + })); + }); + } + exports2.throttle = throttle; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js +var require_throttleTime = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throttleTime = void 0; + var async_1 = require_async(); + var throttle_1 = require_throttle(); + var timer_1 = require_timer2(); + function throttleTime(duration, scheduler, config) { + if (scheduler === void 0) { + scheduler = async_1.asyncScheduler; + } + if (config === void 0) { + config = throttle_1.defaultThrottleConfig; + } + var duration$ = timer_1.timer(duration, scheduler); + return throttle_1.throttle(function() { + return duration$; + }, config); + } + exports2.throttleTime = throttleTime; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js +var require_timeInterval = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TimeInterval = exports2.timeInterval = void 0; + var async_1 = require_async(); + var scan_1 = require_scan(); + var defer_1 = require_defer(); + var map_1 = require_map(); + function timeInterval(scheduler) { + if (scheduler === void 0) { + scheduler = async_1.async; + } + return function(source) { + return defer_1.defer(function() { + return source.pipe(scan_1.scan(function(_a, value) { + var current = _a.current; + return { value, current: scheduler.now(), last: current }; + }, { + current: scheduler.now(), + value: void 0, + last: void 0 + }), map_1.map(function(_a) { + var current = _a.current, last = _a.last, value = _a.value; + return new TimeInterval(value, current - last); + })); + }); + }; + } + exports2.timeInterval = timeInterval; + var TimeInterval = function() { + function TimeInterval2(value, interval) { + this.value = value; + this.interval = interval; + } + return TimeInterval2; + }(); + exports2.TimeInterval = TimeInterval; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js +var require_timeoutWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.timeoutWith = void 0; + var async_1 = require_async(); + var isDate_1 = require_isDate(); + var timeout_1 = require_timeout(); + function timeoutWith(due, withObservable, scheduler) { + var first; + var each; + var _with; + scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async_1.async; + if (isDate_1.isValidDate(due)) { + first = due; + } else if (typeof due === "number") { + each = due; + } + if (withObservable) { + _with = function() { + return withObservable; + }; + } else { + throw new TypeError("No observable provided to switch to"); + } + if (first == null && each == null) { + throw new TypeError("No timeout provided."); + } + return timeout_1.timeout({ + first, + each, + scheduler, + with: _with + }); + } + exports2.timeoutWith = timeoutWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/timestamp.js +var require_timestamp = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/timestamp.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.timestamp = void 0; + var dateTimestampProvider_1 = require_dateTimestampProvider(); + var map_1 = require_map(); + function timestamp(timestampProvider) { + if (timestampProvider === void 0) { + timestampProvider = dateTimestampProvider_1.dateTimestampProvider; + } + return map_1.map(function(value) { + return { value, timestamp: timestampProvider.now() }; + }); + } + exports2.timestamp = timestamp; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/window.js +var require_window = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/window.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.window = void 0; + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop(); + function window2(windowBoundaries) { + return lift_1.operate(function(source, subscriber) { + var windowSubject = new Subject_1.Subject(); + subscriber.next(windowSubject.asObservable()); + var errorHandler = function(err) { + windowSubject.error(err); + subscriber.error(err); + }; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + return windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value); + }, function() { + windowSubject.complete(); + subscriber.complete(); + }, errorHandler)); + windowBoundaries.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function() { + windowSubject.complete(); + subscriber.next(windowSubject = new Subject_1.Subject()); + }, noop_1.noop, errorHandler)); + return function() { + windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe(); + windowSubject = null; + }; + }); + } + exports2.window = window2; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js +var require_windowCount = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js"(exports2) { + "use strict"; + var __values = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.windowCount = void 0; + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function windowCount(windowSize, startWindowEvery) { + if (startWindowEvery === void 0) { + startWindowEvery = 0; + } + var startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize; + return lift_1.operate(function(source, subscriber) { + var windows = [new Subject_1.Subject()]; + var starts = []; + var count = 0; + subscriber.next(windows[0].asObservable()); + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var e_1, _a; + try { + for (var windows_1 = __values(windows), windows_1_1 = windows_1.next(); !windows_1_1.done; windows_1_1 = windows_1.next()) { + var window_1 = windows_1_1.value; + window_1.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (windows_1_1 && !windows_1_1.done && (_a = windows_1.return)) + _a.call(windows_1); + } finally { + if (e_1) + throw e_1.error; + } + } + var c = count - windowSize + 1; + if (c >= 0 && c % startEvery === 0) { + windows.shift().complete(); + } + if (++count % startEvery === 0) { + var window_2 = new Subject_1.Subject(); + windows.push(window_2); + subscriber.next(window_2.asObservable()); + } + }, function() { + while (windows.length > 0) { + windows.shift().complete(); + } + subscriber.complete(); + }, function(err) { + while (windows.length > 0) { + windows.shift().error(err); + } + subscriber.error(err); + }, function() { + starts = null; + windows = null; + })); + }); + } + exports2.windowCount = windowCount; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js +var require_windowTime = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.windowTime = void 0; + var Subject_1 = require_Subject(); + var async_1 = require_async(); + var Subscription_1 = require_Subscription(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var arrRemove_1 = require_arrRemove(); + var args_1 = require_args(); + function windowTime(windowTimeSpan) { + var _a, _b; + var otherArgs = []; + for (var _i = 1; _i < arguments.length; _i++) { + otherArgs[_i - 1] = arguments[_i]; + } + var scheduler = (_a = args_1.popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : async_1.asyncScheduler; + var windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + var maxWindowSize = otherArgs[1] || Infinity; + return lift_1.operate(function(source, subscriber) { + var windowRecords = []; + var restartOnClose = false; + var closeWindow = function(record) { + var window2 = record.window, subs = record.subs; + window2.complete(); + subs.unsubscribe(); + arrRemove_1.arrRemove(windowRecords, record); + restartOnClose && startWindow(); + }; + var startWindow = function() { + if (windowRecords) { + var subs = new Subscription_1.Subscription(); + subscriber.add(subs); + var window_1 = new Subject_1.Subject(); + var record_1 = { + window: window_1, + subs, + seen: 0 + }; + windowRecords.push(record_1); + subscriber.next(window_1.asObservable()); + subs.add(scheduler.schedule(function() { + return closeWindow(record_1); + }, windowTimeSpan)); + } + }; + windowCreationInterval !== null && windowCreationInterval >= 0 ? subscriber.add(scheduler.schedule(function() { + startWindow(); + !this.closed && subscriber.add(this.schedule(null, windowCreationInterval)); + }, windowCreationInterval)) : restartOnClose = true; + startWindow(); + var loop = function(cb) { + return windowRecords.slice().forEach(cb); + }; + var terminate = function(cb) { + loop(function(_a2) { + var window2 = _a2.window; + return cb(window2); + }); + cb(subscriber); + subscriber.unsubscribe(); + }; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + loop(function(record) { + record.window.next(value); + maxWindowSize <= ++record.seen && closeWindow(record); + }); + }, function() { + return terminate(function(consumer) { + return consumer.complete(); + }); + }, function(err) { + return terminate(function(consumer) { + return consumer.error(err); + }); + })); + return function() { + windowRecords = null; + }; + }); + } + exports2.windowTime = windowTime; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js +var require_windowToggle = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js"(exports2) { + "use strict"; + var __values = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.windowToggle = void 0; + var Subject_1 = require_Subject(); + var Subscription_1 = require_Subscription(); + var lift_1 = require_lift(); + var from_1 = require_from2(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop(); + var arrRemove_1 = require_arrRemove(); + function windowToggle(openings, closingSelector) { + return lift_1.operate(function(source, subscriber) { + var windows = []; + var handleError = function(err) { + while (0 < windows.length) { + windows.shift().error(err); + } + subscriber.error(err); + }; + from_1.innerFrom(openings).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(openValue) { + var window2 = new Subject_1.Subject(); + windows.push(window2); + var closingSubscription = new Subscription_1.Subscription(); + var closeWindow = function() { + arrRemove_1.arrRemove(windows, window2); + window2.complete(); + closingSubscription.unsubscribe(); + }; + var closingNotifier; + try { + closingNotifier = from_1.innerFrom(closingSelector(openValue)); + } catch (err) { + handleError(err); + return; + } + subscriber.next(window2.asObservable()); + closingSubscription.add(closingNotifier.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, closeWindow, noop_1.noop, handleError))); + }, noop_1.noop)); + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var e_1, _a; + var windowsCopy = windows.slice(); + try { + for (var windowsCopy_1 = __values(windowsCopy), windowsCopy_1_1 = windowsCopy_1.next(); !windowsCopy_1_1.done; windowsCopy_1_1 = windowsCopy_1.next()) { + var window_1 = windowsCopy_1_1.value; + window_1.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (windowsCopy_1_1 && !windowsCopy_1_1.done && (_a = windowsCopy_1.return)) + _a.call(windowsCopy_1); + } finally { + if (e_1) + throw e_1.error; + } + } + }, function() { + while (0 < windows.length) { + windows.shift().complete(); + } + subscriber.complete(); + }, handleError, function() { + while (0 < windows.length) { + windows.shift().unsubscribe(); + } + })); + }); + } + exports2.windowToggle = windowToggle; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js +var require_windowWhen = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.windowWhen = void 0; + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var from_1 = require_from2(); + function windowWhen(closingSelector) { + return lift_1.operate(function(source, subscriber) { + var window2; + var closingSubscriber; + var handleError = function(err) { + window2.error(err); + subscriber.error(err); + }; + var openWindow = function() { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + window2 === null || window2 === void 0 ? void 0 : window2.complete(); + window2 = new Subject_1.Subject(); + subscriber.next(window2.asObservable()); + var closingNotifier; + try { + closingNotifier = from_1.innerFrom(closingSelector()); + } catch (err) { + handleError(err); + return; + } + closingNotifier.subscribe(closingSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, openWindow, openWindow, handleError)); + }; + openWindow(); + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + return window2.next(value); + }, function() { + window2.complete(); + subscriber.complete(); + }, handleError, function() { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + window2 = null; + })); + }); + } + exports2.windowWhen = windowWhen; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js +var require_withLatestFrom = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.withLatestFrom = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var from_1 = require_from2(); + var identity_1 = require_identity(); + var noop_1 = require_noop(); + var args_1 = require_args(); + function withLatestFrom() { + var inputs = []; + for (var _i = 0; _i < arguments.length; _i++) { + inputs[_i] = arguments[_i]; + } + var project = args_1.popResultSelector(inputs); + return lift_1.operate(function(source, subscriber) { + var len = inputs.length; + var otherValues = new Array(len); + var hasValue = inputs.map(function() { + return false; + }); + var ready = false; + var _loop_1 = function(i2) { + from_1.innerFrom(inputs[i2]).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + otherValues[i2] = value; + if (!ready && !hasValue[i2]) { + hasValue[i2] = true; + (ready = hasValue.every(identity_1.identity)) && (hasValue = null); + } + }, noop_1.noop)); + }; + for (var i = 0; i < len; i++) { + _loop_1(i); + } + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + if (ready) { + var values = __spreadArray([value], __read(otherValues)); + subscriber.next(project ? project.apply(void 0, __spreadArray([], __read(values))) : values); + } + })); + }); + } + exports2.withLatestFrom = withLatestFrom; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/zipAll.js +var require_zipAll = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/zipAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.zipAll = void 0; + var zip_1 = require_zip(); + var joinAllInternals_1 = require_joinAllInternals(); + function zipAll(project) { + return joinAllInternals_1.joinAllInternals(zip_1.zip, project); + } + exports2.zipAll = zipAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/zip.js +var require_zip2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/zip.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.zip = void 0; + var zip_1 = require_zip(); + var lift_1 = require_lift(); + function zip() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + return lift_1.operate(function(source, subscriber) { + zip_1.zip.apply(void 0, __spreadArray([source], __read(sources))).subscribe(subscriber); + }); + } + exports2.zip = zip; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/zipWith.js +var require_zipWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/zipWith.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.zipWith = void 0; + var zip_1 = require_zip2(); + function zipWith() { + var otherInputs = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherInputs[_i] = arguments[_i]; + } + return zip_1.zip.apply(void 0, __spreadArray([], __read(otherInputs))); + } + exports2.zipWith = zipWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/index.js +var require_cjs = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.interval = exports2.iif = exports2.generate = exports2.fromEventPattern = exports2.fromEvent = exports2.from = exports2.forkJoin = exports2.empty = exports2.defer = exports2.connectable = exports2.concat = exports2.combineLatest = exports2.bindNodeCallback = exports2.bindCallback = exports2.UnsubscriptionError = exports2.TimeoutError = exports2.SequenceError = exports2.ObjectUnsubscribedError = exports2.NotFoundError = exports2.EmptyError = exports2.ArgumentOutOfRangeError = exports2.firstValueFrom = exports2.lastValueFrom = exports2.isObservable = exports2.identity = exports2.noop = exports2.pipe = exports2.NotificationKind = exports2.Notification = exports2.Subscriber = exports2.Subscription = exports2.Scheduler = exports2.VirtualAction = exports2.VirtualTimeScheduler = exports2.animationFrameScheduler = exports2.animationFrame = exports2.queueScheduler = exports2.queue = exports2.asyncScheduler = exports2.async = exports2.asapScheduler = exports2.asap = exports2.AsyncSubject = exports2.ReplaySubject = exports2.BehaviorSubject = exports2.Subject = exports2.animationFrames = exports2.observable = exports2.ConnectableObservable = exports2.Observable = void 0; + exports2.filter = exports2.expand = exports2.exhaustMap = exports2.exhaustAll = exports2.exhaust = exports2.every = exports2.endWith = exports2.elementAt = exports2.distinctUntilKeyChanged = exports2.distinctUntilChanged = exports2.distinct = exports2.dematerialize = exports2.delayWhen = exports2.delay = exports2.defaultIfEmpty = exports2.debounceTime = exports2.debounce = exports2.count = exports2.connect = exports2.concatWith = exports2.concatMapTo = exports2.concatMap = exports2.concatAll = exports2.combineLatestWith = exports2.combineLatestAll = exports2.combineAll = exports2.catchError = exports2.bufferWhen = exports2.bufferToggle = exports2.bufferTime = exports2.bufferCount = exports2.buffer = exports2.auditTime = exports2.audit = exports2.config = exports2.NEVER = exports2.EMPTY = exports2.scheduled = exports2.zip = exports2.using = exports2.timer = exports2.throwError = exports2.range = exports2.race = exports2.partition = exports2.pairs = exports2.onErrorResumeNext = exports2.of = exports2.never = exports2.merge = void 0; + exports2.switchMapTo = exports2.switchMap = exports2.switchAll = exports2.subscribeOn = exports2.startWith = exports2.skipWhile = exports2.skipUntil = exports2.skipLast = exports2.skip = exports2.single = exports2.shareReplay = exports2.share = exports2.sequenceEqual = exports2.scan = exports2.sampleTime = exports2.sample = exports2.refCount = exports2.retryWhen = exports2.retry = exports2.repeatWhen = exports2.repeat = exports2.reduce = exports2.raceWith = exports2.publishReplay = exports2.publishLast = exports2.publishBehavior = exports2.publish = exports2.pluck = exports2.pairwise = exports2.observeOn = exports2.multicast = exports2.min = exports2.mergeWith = exports2.mergeScan = exports2.mergeMapTo = exports2.mergeMap = exports2.flatMap = exports2.mergeAll = exports2.max = exports2.materialize = exports2.mapTo = exports2.map = exports2.last = exports2.isEmpty = exports2.ignoreElements = exports2.groupBy = exports2.first = exports2.findIndex = exports2.find = exports2.finalize = void 0; + exports2.zipWith = exports2.zipAll = exports2.withLatestFrom = exports2.windowWhen = exports2.windowToggle = exports2.windowTime = exports2.windowCount = exports2.window = exports2.toArray = exports2.timestamp = exports2.timeoutWith = exports2.timeout = exports2.timeInterval = exports2.throwIfEmpty = exports2.throttleTime = exports2.throttle = exports2.tap = exports2.takeWhile = exports2.takeUntil = exports2.takeLast = exports2.take = exports2.switchScan = void 0; + var Observable_1 = require_Observable(); + Object.defineProperty(exports2, "Observable", { enumerable: true, get: function() { + return Observable_1.Observable; + } }); + var ConnectableObservable_1 = require_ConnectableObservable(); + Object.defineProperty(exports2, "ConnectableObservable", { enumerable: true, get: function() { + return ConnectableObservable_1.ConnectableObservable; + } }); + var observable_1 = require_observable(); + Object.defineProperty(exports2, "observable", { enumerable: true, get: function() { + return observable_1.observable; + } }); + var animationFrames_1 = require_animationFrames(); + Object.defineProperty(exports2, "animationFrames", { enumerable: true, get: function() { + return animationFrames_1.animationFrames; + } }); + var Subject_1 = require_Subject(); + Object.defineProperty(exports2, "Subject", { enumerable: true, get: function() { + return Subject_1.Subject; + } }); + var BehaviorSubject_1 = require_BehaviorSubject(); + Object.defineProperty(exports2, "BehaviorSubject", { enumerable: true, get: function() { + return BehaviorSubject_1.BehaviorSubject; + } }); + var ReplaySubject_1 = require_ReplaySubject(); + Object.defineProperty(exports2, "ReplaySubject", { enumerable: true, get: function() { + return ReplaySubject_1.ReplaySubject; + } }); + var AsyncSubject_1 = require_AsyncSubject(); + Object.defineProperty(exports2, "AsyncSubject", { enumerable: true, get: function() { + return AsyncSubject_1.AsyncSubject; + } }); + var asap_1 = require_asap(); + Object.defineProperty(exports2, "asap", { enumerable: true, get: function() { + return asap_1.asap; + } }); + Object.defineProperty(exports2, "asapScheduler", { enumerable: true, get: function() { + return asap_1.asapScheduler; + } }); + var async_1 = require_async(); + Object.defineProperty(exports2, "async", { enumerable: true, get: function() { + return async_1.async; + } }); + Object.defineProperty(exports2, "asyncScheduler", { enumerable: true, get: function() { + return async_1.asyncScheduler; + } }); + var queue_1 = require_queue(); + Object.defineProperty(exports2, "queue", { enumerable: true, get: function() { + return queue_1.queue; + } }); + Object.defineProperty(exports2, "queueScheduler", { enumerable: true, get: function() { + return queue_1.queueScheduler; + } }); + var animationFrame_1 = require_animationFrame(); + Object.defineProperty(exports2, "animationFrame", { enumerable: true, get: function() { + return animationFrame_1.animationFrame; + } }); + Object.defineProperty(exports2, "animationFrameScheduler", { enumerable: true, get: function() { + return animationFrame_1.animationFrameScheduler; + } }); + var VirtualTimeScheduler_1 = require_VirtualTimeScheduler(); + Object.defineProperty(exports2, "VirtualTimeScheduler", { enumerable: true, get: function() { + return VirtualTimeScheduler_1.VirtualTimeScheduler; + } }); + Object.defineProperty(exports2, "VirtualAction", { enumerable: true, get: function() { + return VirtualTimeScheduler_1.VirtualAction; + } }); + var Scheduler_1 = require_Scheduler(); + Object.defineProperty(exports2, "Scheduler", { enumerable: true, get: function() { + return Scheduler_1.Scheduler; + } }); + var Subscription_1 = require_Subscription(); + Object.defineProperty(exports2, "Subscription", { enumerable: true, get: function() { + return Subscription_1.Subscription; + } }); + var Subscriber_1 = require_Subscriber(); + Object.defineProperty(exports2, "Subscriber", { enumerable: true, get: function() { + return Subscriber_1.Subscriber; + } }); + var Notification_1 = require_Notification(); + Object.defineProperty(exports2, "Notification", { enumerable: true, get: function() { + return Notification_1.Notification; + } }); + Object.defineProperty(exports2, "NotificationKind", { enumerable: true, get: function() { + return Notification_1.NotificationKind; + } }); + var pipe_1 = require_pipe(); + Object.defineProperty(exports2, "pipe", { enumerable: true, get: function() { + return pipe_1.pipe; + } }); + var noop_1 = require_noop(); + Object.defineProperty(exports2, "noop", { enumerable: true, get: function() { + return noop_1.noop; + } }); + var identity_1 = require_identity(); + Object.defineProperty(exports2, "identity", { enumerable: true, get: function() { + return identity_1.identity; + } }); + var isObservable_1 = require_isObservable(); + Object.defineProperty(exports2, "isObservable", { enumerable: true, get: function() { + return isObservable_1.isObservable; + } }); + var lastValueFrom_1 = require_lastValueFrom(); + Object.defineProperty(exports2, "lastValueFrom", { enumerable: true, get: function() { + return lastValueFrom_1.lastValueFrom; + } }); + var firstValueFrom_1 = require_firstValueFrom(); + Object.defineProperty(exports2, "firstValueFrom", { enumerable: true, get: function() { + return firstValueFrom_1.firstValueFrom; + } }); + var ArgumentOutOfRangeError_1 = require_ArgumentOutOfRangeError(); + Object.defineProperty(exports2, "ArgumentOutOfRangeError", { enumerable: true, get: function() { + return ArgumentOutOfRangeError_1.ArgumentOutOfRangeError; + } }); + var EmptyError_1 = require_EmptyError(); + Object.defineProperty(exports2, "EmptyError", { enumerable: true, get: function() { + return EmptyError_1.EmptyError; + } }); + var NotFoundError_1 = require_NotFoundError(); + Object.defineProperty(exports2, "NotFoundError", { enumerable: true, get: function() { + return NotFoundError_1.NotFoundError; + } }); + var ObjectUnsubscribedError_1 = require_ObjectUnsubscribedError(); + Object.defineProperty(exports2, "ObjectUnsubscribedError", { enumerable: true, get: function() { + return ObjectUnsubscribedError_1.ObjectUnsubscribedError; + } }); + var SequenceError_1 = require_SequenceError(); + Object.defineProperty(exports2, "SequenceError", { enumerable: true, get: function() { + return SequenceError_1.SequenceError; + } }); + var timeout_1 = require_timeout(); + Object.defineProperty(exports2, "TimeoutError", { enumerable: true, get: function() { + return timeout_1.TimeoutError; + } }); + var UnsubscriptionError_1 = require_UnsubscriptionError(); + Object.defineProperty(exports2, "UnsubscriptionError", { enumerable: true, get: function() { + return UnsubscriptionError_1.UnsubscriptionError; + } }); + var bindCallback_1 = require_bindCallback(); + Object.defineProperty(exports2, "bindCallback", { enumerable: true, get: function() { + return bindCallback_1.bindCallback; + } }); + var bindNodeCallback_1 = require_bindNodeCallback(); + Object.defineProperty(exports2, "bindNodeCallback", { enumerable: true, get: function() { + return bindNodeCallback_1.bindNodeCallback; + } }); + var combineLatest_1 = require_combineLatest(); + Object.defineProperty(exports2, "combineLatest", { enumerable: true, get: function() { + return combineLatest_1.combineLatest; + } }); + var concat_1 = require_concat(); + Object.defineProperty(exports2, "concat", { enumerable: true, get: function() { + return concat_1.concat; + } }); + var connectable_1 = require_connectable(); + Object.defineProperty(exports2, "connectable", { enumerable: true, get: function() { + return connectable_1.connectable; + } }); + var defer_1 = require_defer(); + Object.defineProperty(exports2, "defer", { enumerable: true, get: function() { + return defer_1.defer; + } }); + var empty_1 = require_empty(); + Object.defineProperty(exports2, "empty", { enumerable: true, get: function() { + return empty_1.empty; + } }); + var forkJoin_1 = require_forkJoin(); + Object.defineProperty(exports2, "forkJoin", { enumerable: true, get: function() { + return forkJoin_1.forkJoin; + } }); + var from_1 = require_from2(); + Object.defineProperty(exports2, "from", { enumerable: true, get: function() { + return from_1.from; + } }); + var fromEvent_1 = require_fromEvent(); + Object.defineProperty(exports2, "fromEvent", { enumerable: true, get: function() { + return fromEvent_1.fromEvent; + } }); + var fromEventPattern_1 = require_fromEventPattern(); + Object.defineProperty(exports2, "fromEventPattern", { enumerable: true, get: function() { + return fromEventPattern_1.fromEventPattern; + } }); + var generate_1 = require_generate(); + Object.defineProperty(exports2, "generate", { enumerable: true, get: function() { + return generate_1.generate; + } }); + var iif_1 = require_iif(); + Object.defineProperty(exports2, "iif", { enumerable: true, get: function() { + return iif_1.iif; + } }); + var interval_1 = require_interval(); + Object.defineProperty(exports2, "interval", { enumerable: true, get: function() { + return interval_1.interval; + } }); + var merge_1 = require_merge(); + Object.defineProperty(exports2, "merge", { enumerable: true, get: function() { + return merge_1.merge; + } }); + var never_1 = require_never(); + Object.defineProperty(exports2, "never", { enumerable: true, get: function() { + return never_1.never; + } }); + var of_1 = require_of(); + Object.defineProperty(exports2, "of", { enumerable: true, get: function() { + return of_1.of; + } }); + var onErrorResumeNext_1 = require_onErrorResumeNext2(); + Object.defineProperty(exports2, "onErrorResumeNext", { enumerable: true, get: function() { + return onErrorResumeNext_1.onErrorResumeNext; + } }); + var pairs_1 = require_pairs(); + Object.defineProperty(exports2, "pairs", { enumerable: true, get: function() { + return pairs_1.pairs; + } }); + var partition_1 = require_partition(); + Object.defineProperty(exports2, "partition", { enumerable: true, get: function() { + return partition_1.partition; + } }); + var race_1 = require_race(); + Object.defineProperty(exports2, "race", { enumerable: true, get: function() { + return race_1.race; + } }); + var range_1 = require_range(); + Object.defineProperty(exports2, "range", { enumerable: true, get: function() { + return range_1.range; + } }); + var throwError_1 = require_throwError(); + Object.defineProperty(exports2, "throwError", { enumerable: true, get: function() { + return throwError_1.throwError; + } }); + var timer_1 = require_timer2(); + Object.defineProperty(exports2, "timer", { enumerable: true, get: function() { + return timer_1.timer; + } }); + var using_1 = require_using(); + Object.defineProperty(exports2, "using", { enumerable: true, get: function() { + return using_1.using; + } }); + var zip_1 = require_zip(); + Object.defineProperty(exports2, "zip", { enumerable: true, get: function() { + return zip_1.zip; + } }); + var scheduled_1 = require_scheduled(); + Object.defineProperty(exports2, "scheduled", { enumerable: true, get: function() { + return scheduled_1.scheduled; + } }); + var empty_2 = require_empty(); + Object.defineProperty(exports2, "EMPTY", { enumerable: true, get: function() { + return empty_2.EMPTY; + } }); + var never_2 = require_never(); + Object.defineProperty(exports2, "NEVER", { enumerable: true, get: function() { + return never_2.NEVER; + } }); + __exportStar(require_types3(), exports2); + var config_1 = require_config(); + Object.defineProperty(exports2, "config", { enumerable: true, get: function() { + return config_1.config; + } }); + var audit_1 = require_audit(); + Object.defineProperty(exports2, "audit", { enumerable: true, get: function() { + return audit_1.audit; + } }); + var auditTime_1 = require_auditTime(); + Object.defineProperty(exports2, "auditTime", { enumerable: true, get: function() { + return auditTime_1.auditTime; + } }); + var buffer_1 = require_buffer(); + Object.defineProperty(exports2, "buffer", { enumerable: true, get: function() { + return buffer_1.buffer; + } }); + var bufferCount_1 = require_bufferCount(); + Object.defineProperty(exports2, "bufferCount", { enumerable: true, get: function() { + return bufferCount_1.bufferCount; + } }); + var bufferTime_1 = require_bufferTime(); + Object.defineProperty(exports2, "bufferTime", { enumerable: true, get: function() { + return bufferTime_1.bufferTime; + } }); + var bufferToggle_1 = require_bufferToggle(); + Object.defineProperty(exports2, "bufferToggle", { enumerable: true, get: function() { + return bufferToggle_1.bufferToggle; + } }); + var bufferWhen_1 = require_bufferWhen(); + Object.defineProperty(exports2, "bufferWhen", { enumerable: true, get: function() { + return bufferWhen_1.bufferWhen; + } }); + var catchError_1 = require_catchError(); + Object.defineProperty(exports2, "catchError", { enumerable: true, get: function() { + return catchError_1.catchError; + } }); + var combineAll_1 = require_combineAll(); + Object.defineProperty(exports2, "combineAll", { enumerable: true, get: function() { + return combineAll_1.combineAll; + } }); + var combineLatestAll_1 = require_combineLatestAll(); + Object.defineProperty(exports2, "combineLatestAll", { enumerable: true, get: function() { + return combineLatestAll_1.combineLatestAll; + } }); + var combineLatestWith_1 = require_combineLatestWith(); + Object.defineProperty(exports2, "combineLatestWith", { enumerable: true, get: function() { + return combineLatestWith_1.combineLatestWith; + } }); + var concatAll_1 = require_concatAll(); + Object.defineProperty(exports2, "concatAll", { enumerable: true, get: function() { + return concatAll_1.concatAll; + } }); + var concatMap_1 = require_concatMap(); + Object.defineProperty(exports2, "concatMap", { enumerable: true, get: function() { + return concatMap_1.concatMap; + } }); + var concatMapTo_1 = require_concatMapTo(); + Object.defineProperty(exports2, "concatMapTo", { enumerable: true, get: function() { + return concatMapTo_1.concatMapTo; + } }); + var concatWith_1 = require_concatWith(); + Object.defineProperty(exports2, "concatWith", { enumerable: true, get: function() { + return concatWith_1.concatWith; + } }); + var connect_1 = require_connect(); + Object.defineProperty(exports2, "connect", { enumerable: true, get: function() { + return connect_1.connect; + } }); + var count_1 = require_count(); + Object.defineProperty(exports2, "count", { enumerable: true, get: function() { + return count_1.count; + } }); + var debounce_1 = require_debounce(); + Object.defineProperty(exports2, "debounce", { enumerable: true, get: function() { + return debounce_1.debounce; + } }); + var debounceTime_1 = require_debounceTime(); + Object.defineProperty(exports2, "debounceTime", { enumerable: true, get: function() { + return debounceTime_1.debounceTime; + } }); + var defaultIfEmpty_1 = require_defaultIfEmpty(); + Object.defineProperty(exports2, "defaultIfEmpty", { enumerable: true, get: function() { + return defaultIfEmpty_1.defaultIfEmpty; + } }); + var delay_1 = require_delay(); + Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { + return delay_1.delay; + } }); + var delayWhen_1 = require_delayWhen(); + Object.defineProperty(exports2, "delayWhen", { enumerable: true, get: function() { + return delayWhen_1.delayWhen; + } }); + var dematerialize_1 = require_dematerialize(); + Object.defineProperty(exports2, "dematerialize", { enumerable: true, get: function() { + return dematerialize_1.dematerialize; + } }); + var distinct_1 = require_distinct(); + Object.defineProperty(exports2, "distinct", { enumerable: true, get: function() { + return distinct_1.distinct; + } }); + var distinctUntilChanged_1 = require_distinctUntilChanged(); + Object.defineProperty(exports2, "distinctUntilChanged", { enumerable: true, get: function() { + return distinctUntilChanged_1.distinctUntilChanged; + } }); + var distinctUntilKeyChanged_1 = require_distinctUntilKeyChanged(); + Object.defineProperty(exports2, "distinctUntilKeyChanged", { enumerable: true, get: function() { + return distinctUntilKeyChanged_1.distinctUntilKeyChanged; + } }); + var elementAt_1 = require_elementAt(); + Object.defineProperty(exports2, "elementAt", { enumerable: true, get: function() { + return elementAt_1.elementAt; + } }); + var endWith_1 = require_endWith(); + Object.defineProperty(exports2, "endWith", { enumerable: true, get: function() { + return endWith_1.endWith; + } }); + var every_1 = require_every(); + Object.defineProperty(exports2, "every", { enumerable: true, get: function() { + return every_1.every; + } }); + var exhaust_1 = require_exhaust(); + Object.defineProperty(exports2, "exhaust", { enumerable: true, get: function() { + return exhaust_1.exhaust; + } }); + var exhaustAll_1 = require_exhaustAll(); + Object.defineProperty(exports2, "exhaustAll", { enumerable: true, get: function() { + return exhaustAll_1.exhaustAll; + } }); + var exhaustMap_1 = require_exhaustMap(); + Object.defineProperty(exports2, "exhaustMap", { enumerable: true, get: function() { + return exhaustMap_1.exhaustMap; + } }); + var expand_1 = require_expand(); + Object.defineProperty(exports2, "expand", { enumerable: true, get: function() { + return expand_1.expand; + } }); + var filter_1 = require_filter(); + Object.defineProperty(exports2, "filter", { enumerable: true, get: function() { + return filter_1.filter; + } }); + var finalize_1 = require_finalize(); + Object.defineProperty(exports2, "finalize", { enumerable: true, get: function() { + return finalize_1.finalize; + } }); + var find_1 = require_find(); + Object.defineProperty(exports2, "find", { enumerable: true, get: function() { + return find_1.find; + } }); + var findIndex_1 = require_findIndex(); + Object.defineProperty(exports2, "findIndex", { enumerable: true, get: function() { + return findIndex_1.findIndex; + } }); + var first_1 = require_first(); + Object.defineProperty(exports2, "first", { enumerable: true, get: function() { + return first_1.first; + } }); + var groupBy_1 = require_groupBy(); + Object.defineProperty(exports2, "groupBy", { enumerable: true, get: function() { + return groupBy_1.groupBy; + } }); + var ignoreElements_1 = require_ignoreElements(); + Object.defineProperty(exports2, "ignoreElements", { enumerable: true, get: function() { + return ignoreElements_1.ignoreElements; + } }); + var isEmpty_1 = require_isEmpty(); + Object.defineProperty(exports2, "isEmpty", { enumerable: true, get: function() { + return isEmpty_1.isEmpty; + } }); + var last_1 = require_last(); + Object.defineProperty(exports2, "last", { enumerable: true, get: function() { + return last_1.last; + } }); + var map_1 = require_map(); + Object.defineProperty(exports2, "map", { enumerable: true, get: function() { + return map_1.map; + } }); + var mapTo_1 = require_mapTo(); + Object.defineProperty(exports2, "mapTo", { enumerable: true, get: function() { + return mapTo_1.mapTo; + } }); + var materialize_1 = require_materialize(); + Object.defineProperty(exports2, "materialize", { enumerable: true, get: function() { + return materialize_1.materialize; + } }); + var max_1 = require_max(); + Object.defineProperty(exports2, "max", { enumerable: true, get: function() { + return max_1.max; + } }); + var mergeAll_1 = require_mergeAll(); + Object.defineProperty(exports2, "mergeAll", { enumerable: true, get: function() { + return mergeAll_1.mergeAll; + } }); + var flatMap_1 = require_flatMap(); + Object.defineProperty(exports2, "flatMap", { enumerable: true, get: function() { + return flatMap_1.flatMap; + } }); + var mergeMap_1 = require_mergeMap(); + Object.defineProperty(exports2, "mergeMap", { enumerable: true, get: function() { + return mergeMap_1.mergeMap; + } }); + var mergeMapTo_1 = require_mergeMapTo(); + Object.defineProperty(exports2, "mergeMapTo", { enumerable: true, get: function() { + return mergeMapTo_1.mergeMapTo; + } }); + var mergeScan_1 = require_mergeScan(); + Object.defineProperty(exports2, "mergeScan", { enumerable: true, get: function() { + return mergeScan_1.mergeScan; + } }); + var mergeWith_1 = require_mergeWith(); + Object.defineProperty(exports2, "mergeWith", { enumerable: true, get: function() { + return mergeWith_1.mergeWith; + } }); + var min_1 = require_min(); + Object.defineProperty(exports2, "min", { enumerable: true, get: function() { + return min_1.min; + } }); + var multicast_1 = require_multicast(); + Object.defineProperty(exports2, "multicast", { enumerable: true, get: function() { + return multicast_1.multicast; + } }); + var observeOn_1 = require_observeOn(); + Object.defineProperty(exports2, "observeOn", { enumerable: true, get: function() { + return observeOn_1.observeOn; + } }); + var pairwise_1 = require_pairwise(); + Object.defineProperty(exports2, "pairwise", { enumerable: true, get: function() { + return pairwise_1.pairwise; + } }); + var pluck_1 = require_pluck(); + Object.defineProperty(exports2, "pluck", { enumerable: true, get: function() { + return pluck_1.pluck; + } }); + var publish_1 = require_publish(); + Object.defineProperty(exports2, "publish", { enumerable: true, get: function() { + return publish_1.publish; + } }); + var publishBehavior_1 = require_publishBehavior(); + Object.defineProperty(exports2, "publishBehavior", { enumerable: true, get: function() { + return publishBehavior_1.publishBehavior; + } }); + var publishLast_1 = require_publishLast(); + Object.defineProperty(exports2, "publishLast", { enumerable: true, get: function() { + return publishLast_1.publishLast; + } }); + var publishReplay_1 = require_publishReplay(); + Object.defineProperty(exports2, "publishReplay", { enumerable: true, get: function() { + return publishReplay_1.publishReplay; + } }); + var raceWith_1 = require_raceWith(); + Object.defineProperty(exports2, "raceWith", { enumerable: true, get: function() { + return raceWith_1.raceWith; + } }); + var reduce_1 = require_reduce(); + Object.defineProperty(exports2, "reduce", { enumerable: true, get: function() { + return reduce_1.reduce; + } }); + var repeat_1 = require_repeat(); + Object.defineProperty(exports2, "repeat", { enumerable: true, get: function() { + return repeat_1.repeat; + } }); + var repeatWhen_1 = require_repeatWhen(); + Object.defineProperty(exports2, "repeatWhen", { enumerable: true, get: function() { + return repeatWhen_1.repeatWhen; + } }); + var retry_1 = require_retry(); + Object.defineProperty(exports2, "retry", { enumerable: true, get: function() { + return retry_1.retry; + } }); + var retryWhen_1 = require_retryWhen(); + Object.defineProperty(exports2, "retryWhen", { enumerable: true, get: function() { + return retryWhen_1.retryWhen; + } }); + var refCount_1 = require_refCount(); + Object.defineProperty(exports2, "refCount", { enumerable: true, get: function() { + return refCount_1.refCount; + } }); + var sample_1 = require_sample(); + Object.defineProperty(exports2, "sample", { enumerable: true, get: function() { + return sample_1.sample; + } }); + var sampleTime_1 = require_sampleTime(); + Object.defineProperty(exports2, "sampleTime", { enumerable: true, get: function() { + return sampleTime_1.sampleTime; + } }); + var scan_1 = require_scan(); + Object.defineProperty(exports2, "scan", { enumerable: true, get: function() { + return scan_1.scan; + } }); + var sequenceEqual_1 = require_sequenceEqual(); + Object.defineProperty(exports2, "sequenceEqual", { enumerable: true, get: function() { + return sequenceEqual_1.sequenceEqual; + } }); + var share_1 = require_share(); + Object.defineProperty(exports2, "share", { enumerable: true, get: function() { + return share_1.share; + } }); + var shareReplay_1 = require_shareReplay(); + Object.defineProperty(exports2, "shareReplay", { enumerable: true, get: function() { + return shareReplay_1.shareReplay; + } }); + var single_1 = require_single(); + Object.defineProperty(exports2, "single", { enumerable: true, get: function() { + return single_1.single; + } }); + var skip_1 = require_skip(); + Object.defineProperty(exports2, "skip", { enumerable: true, get: function() { + return skip_1.skip; + } }); + var skipLast_1 = require_skipLast(); + Object.defineProperty(exports2, "skipLast", { enumerable: true, get: function() { + return skipLast_1.skipLast; + } }); + var skipUntil_1 = require_skipUntil(); + Object.defineProperty(exports2, "skipUntil", { enumerable: true, get: function() { + return skipUntil_1.skipUntil; + } }); + var skipWhile_1 = require_skipWhile(); + Object.defineProperty(exports2, "skipWhile", { enumerable: true, get: function() { + return skipWhile_1.skipWhile; + } }); + var startWith_1 = require_startWith(); + Object.defineProperty(exports2, "startWith", { enumerable: true, get: function() { + return startWith_1.startWith; + } }); + var subscribeOn_1 = require_subscribeOn(); + Object.defineProperty(exports2, "subscribeOn", { enumerable: true, get: function() { + return subscribeOn_1.subscribeOn; + } }); + var switchAll_1 = require_switchAll(); + Object.defineProperty(exports2, "switchAll", { enumerable: true, get: function() { + return switchAll_1.switchAll; + } }); + var switchMap_1 = require_switchMap(); + Object.defineProperty(exports2, "switchMap", { enumerable: true, get: function() { + return switchMap_1.switchMap; + } }); + var switchMapTo_1 = require_switchMapTo(); + Object.defineProperty(exports2, "switchMapTo", { enumerable: true, get: function() { + return switchMapTo_1.switchMapTo; + } }); + var switchScan_1 = require_switchScan(); + Object.defineProperty(exports2, "switchScan", { enumerable: true, get: function() { + return switchScan_1.switchScan; + } }); + var take_1 = require_take(); + Object.defineProperty(exports2, "take", { enumerable: true, get: function() { + return take_1.take; + } }); + var takeLast_1 = require_takeLast(); + Object.defineProperty(exports2, "takeLast", { enumerable: true, get: function() { + return takeLast_1.takeLast; + } }); + var takeUntil_1 = require_takeUntil(); + Object.defineProperty(exports2, "takeUntil", { enumerable: true, get: function() { + return takeUntil_1.takeUntil; + } }); + var takeWhile_1 = require_takeWhile(); + Object.defineProperty(exports2, "takeWhile", { enumerable: true, get: function() { + return takeWhile_1.takeWhile; + } }); + var tap_1 = require_tap(); + Object.defineProperty(exports2, "tap", { enumerable: true, get: function() { + return tap_1.tap; + } }); + var throttle_1 = require_throttle(); + Object.defineProperty(exports2, "throttle", { enumerable: true, get: function() { + return throttle_1.throttle; + } }); + var throttleTime_1 = require_throttleTime(); + Object.defineProperty(exports2, "throttleTime", { enumerable: true, get: function() { + return throttleTime_1.throttleTime; + } }); + var throwIfEmpty_1 = require_throwIfEmpty(); + Object.defineProperty(exports2, "throwIfEmpty", { enumerable: true, get: function() { + return throwIfEmpty_1.throwIfEmpty; + } }); + var timeInterval_1 = require_timeInterval(); + Object.defineProperty(exports2, "timeInterval", { enumerable: true, get: function() { + return timeInterval_1.timeInterval; + } }); + var timeout_2 = require_timeout(); + Object.defineProperty(exports2, "timeout", { enumerable: true, get: function() { + return timeout_2.timeout; + } }); + var timeoutWith_1 = require_timeoutWith(); + Object.defineProperty(exports2, "timeoutWith", { enumerable: true, get: function() { + return timeoutWith_1.timeoutWith; + } }); + var timestamp_1 = require_timestamp(); + Object.defineProperty(exports2, "timestamp", { enumerable: true, get: function() { + return timestamp_1.timestamp; + } }); + var toArray_1 = require_toArray(); + Object.defineProperty(exports2, "toArray", { enumerable: true, get: function() { + return toArray_1.toArray; + } }); + var window_1 = require_window(); + Object.defineProperty(exports2, "window", { enumerable: true, get: function() { + return window_1.window; + } }); + var windowCount_1 = require_windowCount(); + Object.defineProperty(exports2, "windowCount", { enumerable: true, get: function() { + return windowCount_1.windowCount; + } }); + var windowTime_1 = require_windowTime(); + Object.defineProperty(exports2, "windowTime", { enumerable: true, get: function() { + return windowTime_1.windowTime; + } }); + var windowToggle_1 = require_windowToggle(); + Object.defineProperty(exports2, "windowToggle", { enumerable: true, get: function() { + return windowToggle_1.windowToggle; + } }); + var windowWhen_1 = require_windowWhen(); + Object.defineProperty(exports2, "windowWhen", { enumerable: true, get: function() { + return windowWhen_1.windowWhen; + } }); + var withLatestFrom_1 = require_withLatestFrom(); + Object.defineProperty(exports2, "withLatestFrom", { enumerable: true, get: function() { + return withLatestFrom_1.withLatestFrom; + } }); + var zipAll_1 = require_zipAll(); + Object.defineProperty(exports2, "zipAll", { enumerable: true, get: function() { + return zipAll_1.zipAll; + } }); + var zipWith_1 = require_zipWith(); + Object.defineProperty(exports2, "zipWith", { enumerable: true, get: function() { + return zipWith_1.zipWith; + } }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/partition.js +var require_partition2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/partition.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.partition = void 0; + var not_1 = require_not(); + var filter_1 = require_filter(); + function partition(predicate, thisArg) { + return function(source) { + return [filter_1.filter(predicate, thisArg)(source), filter_1.filter(not_1.not(predicate, thisArg))(source)]; + }; + } + exports2.partition = partition; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/race.js +var require_race2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/race.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.race = void 0; + var argsOrArgArray_1 = require_argsOrArgArray(); + var raceWith_1 = require_raceWith(); + function race() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + return raceWith_1.raceWith.apply(void 0, __spreadArray([], __read(argsOrArgArray_1.argsOrArgArray(args2)))); + } + exports2.race = race; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/operators/index.js +var require_operators = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/operators/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeAll = exports2.merge = exports2.max = exports2.materialize = exports2.mapTo = exports2.map = exports2.last = exports2.isEmpty = exports2.ignoreElements = exports2.groupBy = exports2.first = exports2.findIndex = exports2.find = exports2.finalize = exports2.filter = exports2.expand = exports2.exhaustMap = exports2.exhaustAll = exports2.exhaust = exports2.every = exports2.endWith = exports2.elementAt = exports2.distinctUntilKeyChanged = exports2.distinctUntilChanged = exports2.distinct = exports2.dematerialize = exports2.delayWhen = exports2.delay = exports2.defaultIfEmpty = exports2.debounceTime = exports2.debounce = exports2.count = exports2.connect = exports2.concatWith = exports2.concatMapTo = exports2.concatMap = exports2.concatAll = exports2.concat = exports2.combineLatestWith = exports2.combineLatest = exports2.combineLatestAll = exports2.combineAll = exports2.catchError = exports2.bufferWhen = exports2.bufferToggle = exports2.bufferTime = exports2.bufferCount = exports2.buffer = exports2.auditTime = exports2.audit = void 0; + exports2.timeInterval = exports2.throwIfEmpty = exports2.throttleTime = exports2.throttle = exports2.tap = exports2.takeWhile = exports2.takeUntil = exports2.takeLast = exports2.take = exports2.switchScan = exports2.switchMapTo = exports2.switchMap = exports2.switchAll = exports2.subscribeOn = exports2.startWith = exports2.skipWhile = exports2.skipUntil = exports2.skipLast = exports2.skip = exports2.single = exports2.shareReplay = exports2.share = exports2.sequenceEqual = exports2.scan = exports2.sampleTime = exports2.sample = exports2.refCount = exports2.retryWhen = exports2.retry = exports2.repeatWhen = exports2.repeat = exports2.reduce = exports2.raceWith = exports2.race = exports2.publishReplay = exports2.publishLast = exports2.publishBehavior = exports2.publish = exports2.pluck = exports2.partition = exports2.pairwise = exports2.onErrorResumeNext = exports2.observeOn = exports2.multicast = exports2.min = exports2.mergeWith = exports2.mergeScan = exports2.mergeMapTo = exports2.mergeMap = exports2.flatMap = void 0; + exports2.zipWith = exports2.zipAll = exports2.zip = exports2.withLatestFrom = exports2.windowWhen = exports2.windowToggle = exports2.windowTime = exports2.windowCount = exports2.window = exports2.toArray = exports2.timestamp = exports2.timeoutWith = exports2.timeout = void 0; + var audit_1 = require_audit(); + Object.defineProperty(exports2, "audit", { enumerable: true, get: function() { + return audit_1.audit; + } }); + var auditTime_1 = require_auditTime(); + Object.defineProperty(exports2, "auditTime", { enumerable: true, get: function() { + return auditTime_1.auditTime; + } }); + var buffer_1 = require_buffer(); + Object.defineProperty(exports2, "buffer", { enumerable: true, get: function() { + return buffer_1.buffer; + } }); + var bufferCount_1 = require_bufferCount(); + Object.defineProperty(exports2, "bufferCount", { enumerable: true, get: function() { + return bufferCount_1.bufferCount; + } }); + var bufferTime_1 = require_bufferTime(); + Object.defineProperty(exports2, "bufferTime", { enumerable: true, get: function() { + return bufferTime_1.bufferTime; + } }); + var bufferToggle_1 = require_bufferToggle(); + Object.defineProperty(exports2, "bufferToggle", { enumerable: true, get: function() { + return bufferToggle_1.bufferToggle; + } }); + var bufferWhen_1 = require_bufferWhen(); + Object.defineProperty(exports2, "bufferWhen", { enumerable: true, get: function() { + return bufferWhen_1.bufferWhen; + } }); + var catchError_1 = require_catchError(); + Object.defineProperty(exports2, "catchError", { enumerable: true, get: function() { + return catchError_1.catchError; + } }); + var combineAll_1 = require_combineAll(); + Object.defineProperty(exports2, "combineAll", { enumerable: true, get: function() { + return combineAll_1.combineAll; + } }); + var combineLatestAll_1 = require_combineLatestAll(); + Object.defineProperty(exports2, "combineLatestAll", { enumerable: true, get: function() { + return combineLatestAll_1.combineLatestAll; + } }); + var combineLatest_1 = require_combineLatest2(); + Object.defineProperty(exports2, "combineLatest", { enumerable: true, get: function() { + return combineLatest_1.combineLatest; + } }); + var combineLatestWith_1 = require_combineLatestWith(); + Object.defineProperty(exports2, "combineLatestWith", { enumerable: true, get: function() { + return combineLatestWith_1.combineLatestWith; + } }); + var concat_1 = require_concat2(); + Object.defineProperty(exports2, "concat", { enumerable: true, get: function() { + return concat_1.concat; + } }); + var concatAll_1 = require_concatAll(); + Object.defineProperty(exports2, "concatAll", { enumerable: true, get: function() { + return concatAll_1.concatAll; + } }); + var concatMap_1 = require_concatMap(); + Object.defineProperty(exports2, "concatMap", { enumerable: true, get: function() { + return concatMap_1.concatMap; + } }); + var concatMapTo_1 = require_concatMapTo(); + Object.defineProperty(exports2, "concatMapTo", { enumerable: true, get: function() { + return concatMapTo_1.concatMapTo; + } }); + var concatWith_1 = require_concatWith(); + Object.defineProperty(exports2, "concatWith", { enumerable: true, get: function() { + return concatWith_1.concatWith; + } }); + var connect_1 = require_connect(); + Object.defineProperty(exports2, "connect", { enumerable: true, get: function() { + return connect_1.connect; + } }); + var count_1 = require_count(); + Object.defineProperty(exports2, "count", { enumerable: true, get: function() { + return count_1.count; + } }); + var debounce_1 = require_debounce(); + Object.defineProperty(exports2, "debounce", { enumerable: true, get: function() { + return debounce_1.debounce; + } }); + var debounceTime_1 = require_debounceTime(); + Object.defineProperty(exports2, "debounceTime", { enumerable: true, get: function() { + return debounceTime_1.debounceTime; + } }); + var defaultIfEmpty_1 = require_defaultIfEmpty(); + Object.defineProperty(exports2, "defaultIfEmpty", { enumerable: true, get: function() { + return defaultIfEmpty_1.defaultIfEmpty; + } }); + var delay_1 = require_delay(); + Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { + return delay_1.delay; + } }); + var delayWhen_1 = require_delayWhen(); + Object.defineProperty(exports2, "delayWhen", { enumerable: true, get: function() { + return delayWhen_1.delayWhen; + } }); + var dematerialize_1 = require_dematerialize(); + Object.defineProperty(exports2, "dematerialize", { enumerable: true, get: function() { + return dematerialize_1.dematerialize; + } }); + var distinct_1 = require_distinct(); + Object.defineProperty(exports2, "distinct", { enumerable: true, get: function() { + return distinct_1.distinct; + } }); + var distinctUntilChanged_1 = require_distinctUntilChanged(); + Object.defineProperty(exports2, "distinctUntilChanged", { enumerable: true, get: function() { + return distinctUntilChanged_1.distinctUntilChanged; + } }); + var distinctUntilKeyChanged_1 = require_distinctUntilKeyChanged(); + Object.defineProperty(exports2, "distinctUntilKeyChanged", { enumerable: true, get: function() { + return distinctUntilKeyChanged_1.distinctUntilKeyChanged; + } }); + var elementAt_1 = require_elementAt(); + Object.defineProperty(exports2, "elementAt", { enumerable: true, get: function() { + return elementAt_1.elementAt; + } }); + var endWith_1 = require_endWith(); + Object.defineProperty(exports2, "endWith", { enumerable: true, get: function() { + return endWith_1.endWith; + } }); + var every_1 = require_every(); + Object.defineProperty(exports2, "every", { enumerable: true, get: function() { + return every_1.every; + } }); + var exhaust_1 = require_exhaust(); + Object.defineProperty(exports2, "exhaust", { enumerable: true, get: function() { + return exhaust_1.exhaust; + } }); + var exhaustAll_1 = require_exhaustAll(); + Object.defineProperty(exports2, "exhaustAll", { enumerable: true, get: function() { + return exhaustAll_1.exhaustAll; + } }); + var exhaustMap_1 = require_exhaustMap(); + Object.defineProperty(exports2, "exhaustMap", { enumerable: true, get: function() { + return exhaustMap_1.exhaustMap; + } }); + var expand_1 = require_expand(); + Object.defineProperty(exports2, "expand", { enumerable: true, get: function() { + return expand_1.expand; + } }); + var filter_1 = require_filter(); + Object.defineProperty(exports2, "filter", { enumerable: true, get: function() { + return filter_1.filter; + } }); + var finalize_1 = require_finalize(); + Object.defineProperty(exports2, "finalize", { enumerable: true, get: function() { + return finalize_1.finalize; + } }); + var find_1 = require_find(); + Object.defineProperty(exports2, "find", { enumerable: true, get: function() { + return find_1.find; + } }); + var findIndex_1 = require_findIndex(); + Object.defineProperty(exports2, "findIndex", { enumerable: true, get: function() { + return findIndex_1.findIndex; + } }); + var first_1 = require_first(); + Object.defineProperty(exports2, "first", { enumerable: true, get: function() { + return first_1.first; + } }); + var groupBy_1 = require_groupBy(); + Object.defineProperty(exports2, "groupBy", { enumerable: true, get: function() { + return groupBy_1.groupBy; + } }); + var ignoreElements_1 = require_ignoreElements(); + Object.defineProperty(exports2, "ignoreElements", { enumerable: true, get: function() { + return ignoreElements_1.ignoreElements; + } }); + var isEmpty_1 = require_isEmpty(); + Object.defineProperty(exports2, "isEmpty", { enumerable: true, get: function() { + return isEmpty_1.isEmpty; + } }); + var last_1 = require_last(); + Object.defineProperty(exports2, "last", { enumerable: true, get: function() { + return last_1.last; + } }); + var map_1 = require_map(); + Object.defineProperty(exports2, "map", { enumerable: true, get: function() { + return map_1.map; + } }); + var mapTo_1 = require_mapTo(); + Object.defineProperty(exports2, "mapTo", { enumerable: true, get: function() { + return mapTo_1.mapTo; + } }); + var materialize_1 = require_materialize(); + Object.defineProperty(exports2, "materialize", { enumerable: true, get: function() { + return materialize_1.materialize; + } }); + var max_1 = require_max(); + Object.defineProperty(exports2, "max", { enumerable: true, get: function() { + return max_1.max; + } }); + var merge_1 = require_merge2(); + Object.defineProperty(exports2, "merge", { enumerable: true, get: function() { + return merge_1.merge; + } }); + var mergeAll_1 = require_mergeAll(); + Object.defineProperty(exports2, "mergeAll", { enumerable: true, get: function() { + return mergeAll_1.mergeAll; + } }); + var flatMap_1 = require_flatMap(); + Object.defineProperty(exports2, "flatMap", { enumerable: true, get: function() { + return flatMap_1.flatMap; + } }); + var mergeMap_1 = require_mergeMap(); + Object.defineProperty(exports2, "mergeMap", { enumerable: true, get: function() { + return mergeMap_1.mergeMap; + } }); + var mergeMapTo_1 = require_mergeMapTo(); + Object.defineProperty(exports2, "mergeMapTo", { enumerable: true, get: function() { + return mergeMapTo_1.mergeMapTo; + } }); + var mergeScan_1 = require_mergeScan(); + Object.defineProperty(exports2, "mergeScan", { enumerable: true, get: function() { + return mergeScan_1.mergeScan; + } }); + var mergeWith_1 = require_mergeWith(); + Object.defineProperty(exports2, "mergeWith", { enumerable: true, get: function() { + return mergeWith_1.mergeWith; + } }); + var min_1 = require_min(); + Object.defineProperty(exports2, "min", { enumerable: true, get: function() { + return min_1.min; + } }); + var multicast_1 = require_multicast(); + Object.defineProperty(exports2, "multicast", { enumerable: true, get: function() { + return multicast_1.multicast; + } }); + var observeOn_1 = require_observeOn(); + Object.defineProperty(exports2, "observeOn", { enumerable: true, get: function() { + return observeOn_1.observeOn; + } }); + var onErrorResumeNext_1 = require_onErrorResumeNext(); + Object.defineProperty(exports2, "onErrorResumeNext", { enumerable: true, get: function() { + return onErrorResumeNext_1.onErrorResumeNext; + } }); + var pairwise_1 = require_pairwise(); + Object.defineProperty(exports2, "pairwise", { enumerable: true, get: function() { + return pairwise_1.pairwise; + } }); + var partition_1 = require_partition2(); + Object.defineProperty(exports2, "partition", { enumerable: true, get: function() { + return partition_1.partition; + } }); + var pluck_1 = require_pluck(); + Object.defineProperty(exports2, "pluck", { enumerable: true, get: function() { + return pluck_1.pluck; + } }); + var publish_1 = require_publish(); + Object.defineProperty(exports2, "publish", { enumerable: true, get: function() { + return publish_1.publish; + } }); + var publishBehavior_1 = require_publishBehavior(); + Object.defineProperty(exports2, "publishBehavior", { enumerable: true, get: function() { + return publishBehavior_1.publishBehavior; + } }); + var publishLast_1 = require_publishLast(); + Object.defineProperty(exports2, "publishLast", { enumerable: true, get: function() { + return publishLast_1.publishLast; + } }); + var publishReplay_1 = require_publishReplay(); + Object.defineProperty(exports2, "publishReplay", { enumerable: true, get: function() { + return publishReplay_1.publishReplay; + } }); + var race_1 = require_race2(); + Object.defineProperty(exports2, "race", { enumerable: true, get: function() { + return race_1.race; + } }); + var raceWith_1 = require_raceWith(); + Object.defineProperty(exports2, "raceWith", { enumerable: true, get: function() { + return raceWith_1.raceWith; + } }); + var reduce_1 = require_reduce(); + Object.defineProperty(exports2, "reduce", { enumerable: true, get: function() { + return reduce_1.reduce; + } }); + var repeat_1 = require_repeat(); + Object.defineProperty(exports2, "repeat", { enumerable: true, get: function() { + return repeat_1.repeat; + } }); + var repeatWhen_1 = require_repeatWhen(); + Object.defineProperty(exports2, "repeatWhen", { enumerable: true, get: function() { + return repeatWhen_1.repeatWhen; + } }); + var retry_1 = require_retry(); + Object.defineProperty(exports2, "retry", { enumerable: true, get: function() { + return retry_1.retry; + } }); + var retryWhen_1 = require_retryWhen(); + Object.defineProperty(exports2, "retryWhen", { enumerable: true, get: function() { + return retryWhen_1.retryWhen; + } }); + var refCount_1 = require_refCount(); + Object.defineProperty(exports2, "refCount", { enumerable: true, get: function() { + return refCount_1.refCount; + } }); + var sample_1 = require_sample(); + Object.defineProperty(exports2, "sample", { enumerable: true, get: function() { + return sample_1.sample; + } }); + var sampleTime_1 = require_sampleTime(); + Object.defineProperty(exports2, "sampleTime", { enumerable: true, get: function() { + return sampleTime_1.sampleTime; + } }); + var scan_1 = require_scan(); + Object.defineProperty(exports2, "scan", { enumerable: true, get: function() { + return scan_1.scan; + } }); + var sequenceEqual_1 = require_sequenceEqual(); + Object.defineProperty(exports2, "sequenceEqual", { enumerable: true, get: function() { + return sequenceEqual_1.sequenceEqual; + } }); + var share_1 = require_share(); + Object.defineProperty(exports2, "share", { enumerable: true, get: function() { + return share_1.share; + } }); + var shareReplay_1 = require_shareReplay(); + Object.defineProperty(exports2, "shareReplay", { enumerable: true, get: function() { + return shareReplay_1.shareReplay; + } }); + var single_1 = require_single(); + Object.defineProperty(exports2, "single", { enumerable: true, get: function() { + return single_1.single; + } }); + var skip_1 = require_skip(); + Object.defineProperty(exports2, "skip", { enumerable: true, get: function() { + return skip_1.skip; + } }); + var skipLast_1 = require_skipLast(); + Object.defineProperty(exports2, "skipLast", { enumerable: true, get: function() { + return skipLast_1.skipLast; + } }); + var skipUntil_1 = require_skipUntil(); + Object.defineProperty(exports2, "skipUntil", { enumerable: true, get: function() { + return skipUntil_1.skipUntil; + } }); + var skipWhile_1 = require_skipWhile(); + Object.defineProperty(exports2, "skipWhile", { enumerable: true, get: function() { + return skipWhile_1.skipWhile; + } }); + var startWith_1 = require_startWith(); + Object.defineProperty(exports2, "startWith", { enumerable: true, get: function() { + return startWith_1.startWith; + } }); + var subscribeOn_1 = require_subscribeOn(); + Object.defineProperty(exports2, "subscribeOn", { enumerable: true, get: function() { + return subscribeOn_1.subscribeOn; + } }); + var switchAll_1 = require_switchAll(); + Object.defineProperty(exports2, "switchAll", { enumerable: true, get: function() { + return switchAll_1.switchAll; + } }); + var switchMap_1 = require_switchMap(); + Object.defineProperty(exports2, "switchMap", { enumerable: true, get: function() { + return switchMap_1.switchMap; + } }); + var switchMapTo_1 = require_switchMapTo(); + Object.defineProperty(exports2, "switchMapTo", { enumerable: true, get: function() { + return switchMapTo_1.switchMapTo; + } }); + var switchScan_1 = require_switchScan(); + Object.defineProperty(exports2, "switchScan", { enumerable: true, get: function() { + return switchScan_1.switchScan; + } }); + var take_1 = require_take(); + Object.defineProperty(exports2, "take", { enumerable: true, get: function() { + return take_1.take; + } }); + var takeLast_1 = require_takeLast(); + Object.defineProperty(exports2, "takeLast", { enumerable: true, get: function() { + return takeLast_1.takeLast; + } }); + var takeUntil_1 = require_takeUntil(); + Object.defineProperty(exports2, "takeUntil", { enumerable: true, get: function() { + return takeUntil_1.takeUntil; + } }); + var takeWhile_1 = require_takeWhile(); + Object.defineProperty(exports2, "takeWhile", { enumerable: true, get: function() { + return takeWhile_1.takeWhile; + } }); + var tap_1 = require_tap(); + Object.defineProperty(exports2, "tap", { enumerable: true, get: function() { + return tap_1.tap; + } }); + var throttle_1 = require_throttle(); + Object.defineProperty(exports2, "throttle", { enumerable: true, get: function() { + return throttle_1.throttle; + } }); + var throttleTime_1 = require_throttleTime(); + Object.defineProperty(exports2, "throttleTime", { enumerable: true, get: function() { + return throttleTime_1.throttleTime; + } }); + var throwIfEmpty_1 = require_throwIfEmpty(); + Object.defineProperty(exports2, "throwIfEmpty", { enumerable: true, get: function() { + return throwIfEmpty_1.throwIfEmpty; + } }); + var timeInterval_1 = require_timeInterval(); + Object.defineProperty(exports2, "timeInterval", { enumerable: true, get: function() { + return timeInterval_1.timeInterval; + } }); + var timeout_1 = require_timeout(); + Object.defineProperty(exports2, "timeout", { enumerable: true, get: function() { + return timeout_1.timeout; + } }); + var timeoutWith_1 = require_timeoutWith(); + Object.defineProperty(exports2, "timeoutWith", { enumerable: true, get: function() { + return timeoutWith_1.timeoutWith; + } }); + var timestamp_1 = require_timestamp(); + Object.defineProperty(exports2, "timestamp", { enumerable: true, get: function() { + return timestamp_1.timestamp; + } }); + var toArray_1 = require_toArray(); + Object.defineProperty(exports2, "toArray", { enumerable: true, get: function() { + return toArray_1.toArray; + } }); + var window_1 = require_window(); + Object.defineProperty(exports2, "window", { enumerable: true, get: function() { + return window_1.window; + } }); + var windowCount_1 = require_windowCount(); + Object.defineProperty(exports2, "windowCount", { enumerable: true, get: function() { + return windowCount_1.windowCount; + } }); + var windowTime_1 = require_windowTime(); + Object.defineProperty(exports2, "windowTime", { enumerable: true, get: function() { + return windowTime_1.windowTime; + } }); + var windowToggle_1 = require_windowToggle(); + Object.defineProperty(exports2, "windowToggle", { enumerable: true, get: function() { + return windowToggle_1.windowToggle; + } }); + var windowWhen_1 = require_windowWhen(); + Object.defineProperty(exports2, "windowWhen", { enumerable: true, get: function() { + return windowWhen_1.windowWhen; + } }); + var withLatestFrom_1 = require_withLatestFrom(); + Object.defineProperty(exports2, "withLatestFrom", { enumerable: true, get: function() { + return withLatestFrom_1.withLatestFrom; + } }); + var zip_1 = require_zip2(); + Object.defineProperty(exports2, "zip", { enumerable: true, get: function() { + return zip_1.zip; + } }); + var zipAll_1 = require_zipAll(); + Object.defineProperty(exports2, "zipAll", { enumerable: true, get: function() { + return zipAll_1.zipAll; + } }); + var zipWith_1 = require_zipWith(); + Object.defineProperty(exports2, "zipWith", { enumerable: true, get: function() { + return zipWith_1.zipWith; + } }); + } +}); + +// ../../node_modules/.pnpm/ansi-regex@3.0.0/node_modules/ansi-regex/index.js +var require_ansi_regex = __commonJS({ + "../../node_modules/.pnpm/ansi-regex@3.0.0/node_modules/ansi-regex/index.js"(exports2, module2) { + "use strict"; + module2.exports = () => { + const pattern = [ + "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)", + "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))" + ].join("|"); + return new RegExp(pattern, "g"); + }; + } +}); + +// ../../node_modules/.pnpm/ansi-split@1.0.1/node_modules/ansi-split/index.js +var require_ansi_split = __commonJS({ + "../../node_modules/.pnpm/ansi-split@1.0.1/node_modules/ansi-split/index.js"(exports2, module2) { + var isAnsi = require_ansi_regex()(); + module2.exports = splitAnsi; + function splitAnsi(str) { + var parts = str.match(isAnsi); + if (!parts) + return [str]; + var result = []; + var offset = 0; + var ptr = 0; + for (var i = 0; i < parts.length; i++) { + offset = str.indexOf(parts[i], offset); + if (offset === -1) + throw new Error("Could not split string"); + if (ptr !== offset) + result.push(str.slice(ptr, offset)); + if (ptr === offset && result.length) { + result[result.length - 1] += parts[i]; + } else { + if (offset === 0) + result.push(""); + result.push(parts[i]); + } + ptr = offset + parts[i].length; + } + result.push(str.slice(ptr)); + return result; + } + } +}); + +// ../../node_modules/.pnpm/ansi-diff@1.1.1/node_modules/ansi-diff/index.js +var require_ansi_diff = __commonJS({ + "../../node_modules/.pnpm/ansi-diff@1.1.1/node_modules/ansi-diff/index.js"(exports2, module2) { + var ansi = require_ansi_split(); + var CLEAR_LINE = Buffer.from([27, 91, 48, 75]); + var NEWLINE = Buffer.from("\n"); + module2.exports = Diff; + function Diff(opts) { + if (!(this instanceof Diff)) + return new Diff(opts); + if (!opts) + opts = {}; + this.x = 0; + this.y = 0; + this.width = opts.width || Infinity; + this.height = opts.height || Infinity; + this._buffer = null; + this._out = []; + this._lines = []; + } + Diff.prototype.resize = function(opts) { + if (!opts) + opts = {}; + if (opts.width) + this.width = opts.width; + if (opts.height) + this.height = opts.height; + if (this._buffer) + this.update(this._buffer); + var last = top(this._lines); + if (!last) { + this.x = 0; + this.y = 0; + } else { + this.x = last.remainder; + this.y = last.y + last.height; + } + }; + Diff.prototype.toString = function() { + return this._buffer; + }; + Diff.prototype.update = function(buffer, opts) { + this._buffer = Buffer.isBuffer(buffer) ? buffer.toString() : buffer; + var other = this._buffer; + var oldLines = this._lines; + var lines = split(other, this); + this._lines = lines; + this._out = []; + var min = Math.min(lines.length, oldLines.length); + var i = 0; + var a; + var b; + var scrub = false; + for (; i < min; i++) { + a = lines[i]; + b = oldLines[i]; + if (same(a, b)) + continue; + if (!scrub && this.x !== this.width && inlineDiff(a, b)) { + var left = a.diffLeft(b); + var right = a.diffRight(b); + var slice = a.raw.slice(left, right ? -right : a.length); + if (left + right > 4 && left + slice.length < this.width - 1) { + this._moveTo(left, a.y); + this._push(Buffer.from(slice)); + this.x += slice.length; + continue; + } + } + this._moveTo(0, a.y); + this._write(a); + if (a.y !== b.y || a.height !== b.height) + scrub = true; + if (b.length > a.length || scrub) + this._push(CLEAR_LINE); + if (a.newline) + this._newline(); + } + for (; i < lines.length; i++) { + a = lines[i]; + this._moveTo(0, a.y); + this._write(a); + if (scrub) + this._push(CLEAR_LINE); + if (a.newline) + this._newline(); + } + var oldLast = top(oldLines); + var last = top(lines); + if (oldLast && (!last || last.y + last.height < oldLast.y + oldLast.height)) { + this._clearDown(oldLast.y + oldLast.height); + } + if (opts && opts.moveTo) { + this._moveTo(opts.moveTo[0], opts.moveTo[1]); + } else if (last) { + this._moveTo(last.remainder, last.y + last.height); + } + return Buffer.concat(this._out); + }; + Diff.prototype._clearDown = function(y) { + var x = this.x; + for (var i = this.y; i <= y; i++) { + this._moveTo(x, i); + this._push(CLEAR_LINE); + x = 0; + } + }; + Diff.prototype._newline = function() { + this._push(NEWLINE); + this.x = 0; + this.y++; + }; + Diff.prototype._write = function(line) { + this._out.push(line.toBuffer()); + this.x = line.remainder; + this.y += line.height; + }; + Diff.prototype._moveTo = function(x, y) { + var dx = x - this.x; + var dy = y - this.y; + if (dx > 0) + this._push(moveRight(dx)); + else if (dx < 0) + this._push(moveLeft(-dx)); + if (dy > 0) + this._push(moveDown(dy)); + else if (dy < 0) + this._push(moveUp(-dy)); + this.x = x; + this.y = y; + }; + Diff.prototype._push = function(buf) { + this._out.push(buf); + }; + function same(a, b) { + return a.y === b.y && a.width === b.width && a.raw === b.raw && a.newline === b.newline; + } + function top(list) { + return list.length ? list[list.length - 1] : null; + } + function Line(str, y, nl, term) { + this.y = y; + this.width = term.width; + this.parts = ansi(str); + this.length = length(this.parts); + this.raw = str; + this.newline = nl; + this.height = Math.floor(this.length / term.width); + this.remainder = this.length - (this.height && this.height * term.width); + if (this.height && !this.remainder) { + this.height--; + this.remainder = this.width; + } + } + Line.prototype.diffLeft = function(other) { + var left = 0; + for (; left < this.length; left++) { + if (this.raw[left] !== other.raw[left]) + return left; + } + return left; + }; + Line.prototype.diffRight = function(other) { + var right = 0; + for (; right < this.length; right++) { + var r = this.length - right - 1; + if (this.raw[r] !== other.raw[r]) + return right; + } + return right; + }; + Line.prototype.toBuffer = function() { + return Buffer.from(this.raw); + }; + function inlineDiff(a, b) { + return a.length === b.length && a.parts.length === 1 && b.parts.length === 1 && a.y === b.y && a.newline && b.newline && a.width === b.width; + } + function split(str, term) { + var y = 0; + var lines = str.split("\n"); + var wrapped = []; + var line; + for (var i = 0; i < lines.length; i++) { + line = new Line(lines[i], y, i < lines.length - 1, term); + y += line.height + (line.newline ? 1 : 0); + wrapped.push(line); + } + return wrapped; + } + function moveUp(n) { + return Buffer.from("1b5b" + toHex(n) + "41", "hex"); + } + function moveDown(n) { + return Buffer.from("1b5b" + toHex(n) + "42", "hex"); + } + function moveRight(n) { + return Buffer.from("1b5b" + toHex(n) + "43", "hex"); + } + function moveLeft(n) { + return Buffer.from("1b5b" + toHex(n) + "44", "hex"); + } + function length(parts) { + var len = 0; + for (var i = 0; i < parts.length; i += 2) { + len += parts[i].length; + } + return len; + } + function toHex(n) { + return Buffer.from("" + n).toString("hex"); + } + } +}); + +// ../default-reporter/lib/constants.js +var require_constants2 = __commonJS({ + "../default-reporter/lib/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.EOL = void 0; + exports2.EOL = "\n"; + } +}); + +// ../default-reporter/lib/mergeOutputs.js +var require_mergeOutputs = __commonJS({ + "../default-reporter/lib/mergeOutputs.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var constants_1 = require_constants2(); + function mergeOutputs(outputs) { + let blockNo = 0; + let fixedBlockNo = 0; + let started = false; + let previousOuput = null; + return Rx.merge(...outputs).pipe(operators_1.map((log2) => { + let currentBlockNo = -1; + let currentFixedBlockNo = -1; + return log2.pipe(operators_1.map((msg) => { + if (msg["fixed"]) { + if (currentFixedBlockNo === -1) { + currentFixedBlockNo = fixedBlockNo++; + } + return { + blockNo: currentFixedBlockNo, + fixed: true, + msg: msg.msg + }; + } + if (currentBlockNo === -1) { + currentBlockNo = blockNo++; + } + return { + blockNo: currentBlockNo, + fixed: false, + msg: typeof msg === "string" ? msg : msg.msg, + prevFixedBlockNo: currentFixedBlockNo + }; + })); + }), operators_1.mergeAll(), operators_1.scan((acc, log2) => { + if (log2.fixed) { + acc.fixedBlocks[log2.blockNo] = log2.msg; + } else { + delete acc.fixedBlocks[log2["prevFixedBlockNo"]]; + acc.blocks[log2.blockNo] = log2.msg; + } + return acc; + }, { fixedBlocks: [], blocks: [] }), operators_1.map((sections) => { + const fixedBlocks = sections.fixedBlocks.filter(Boolean); + const nonFixedPart = sections.blocks.filter(Boolean).join(constants_1.EOL); + if (fixedBlocks.length === 0) { + return nonFixedPart; + } + const fixedPart = fixedBlocks.join(constants_1.EOL); + if (!nonFixedPart) { + return fixedPart; + } + return `${nonFixedPart}${constants_1.EOL}${fixedPart}`; + }), operators_1.filter((msg) => { + if (started) { + return true; + } + if (msg === "") + return false; + started = true; + return true; + }), operators_1.filter((msg) => { + if (msg !== previousOuput) { + previousOuput = msg; + return true; + } + return false; + })); + } + exports2.default = mergeOutputs; + } +}); + +// ../../node_modules/.pnpm/pretty-bytes@5.6.0/node_modules/pretty-bytes/index.js +var require_pretty_bytes = __commonJS({ + "../../node_modules/.pnpm/pretty-bytes@5.6.0/node_modules/pretty-bytes/index.js"(exports2, module2) { + "use strict"; + var BYTE_UNITS = [ + "B", + "kB", + "MB", + "GB", + "TB", + "PB", + "EB", + "ZB", + "YB" + ]; + var BIBYTE_UNITS = [ + "B", + "kiB", + "MiB", + "GiB", + "TiB", + "PiB", + "EiB", + "ZiB", + "YiB" + ]; + var BIT_UNITS = [ + "b", + "kbit", + "Mbit", + "Gbit", + "Tbit", + "Pbit", + "Ebit", + "Zbit", + "Ybit" + ]; + var BIBIT_UNITS = [ + "b", + "kibit", + "Mibit", + "Gibit", + "Tibit", + "Pibit", + "Eibit", + "Zibit", + "Yibit" + ]; + var toLocaleString = (number, locale, options) => { + let result = number; + if (typeof locale === "string" || Array.isArray(locale)) { + result = number.toLocaleString(locale, options); + } else if (locale === true || options !== void 0) { + result = number.toLocaleString(void 0, options); + } + return result; + }; + module2.exports = (number, options) => { + if (!Number.isFinite(number)) { + throw new TypeError(`Expected a finite number, got ${typeof number}: ${number}`); + } + options = Object.assign({ bits: false, binary: false }, options); + const UNITS = options.bits ? options.binary ? BIBIT_UNITS : BIT_UNITS : options.binary ? BIBYTE_UNITS : BYTE_UNITS; + if (options.signed && number === 0) { + return ` 0 ${UNITS[0]}`; + } + const isNegative = number < 0; + const prefix = isNegative ? "-" : options.signed ? "+" : ""; + if (isNegative) { + number = -number; + } + let localeOptions; + if (options.minimumFractionDigits !== void 0) { + localeOptions = { minimumFractionDigits: options.minimumFractionDigits }; + } + if (options.maximumFractionDigits !== void 0) { + localeOptions = Object.assign({ maximumFractionDigits: options.maximumFractionDigits }, localeOptions); + } + if (number < 1) { + const numberString2 = toLocaleString(number, options.locale, localeOptions); + return prefix + numberString2 + " " + UNITS[0]; + } + const exponent = Math.min(Math.floor(options.binary ? Math.log(number) / Math.log(1024) : Math.log10(number) / 3), UNITS.length - 1); + number /= Math.pow(options.binary ? 1024 : 1e3, exponent); + if (!localeOptions) { + number = number.toPrecision(3); + } + const numberString = toLocaleString(Number(number), options.locale, localeOptions); + const unit = UNITS[exponent]; + return prefix + numberString + " " + unit; + }; + } +}); + +// ../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js +var require_color_name2 = __commonJS({ + "../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"(exports2, module2) { + "use strict"; + module2.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] + }; + } +}); + +// ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js +var require_conversions2 = __commonJS({ + "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js"(exports2, module2) { + var cssKeywords = require_color_name2(); + var reverseKeywords = {}; + for (const key of Object.keys(cssKeywords)) { + reverseKeywords[cssKeywords[key]] = key; + } + var convert = { + rgb: { channels: 3, labels: "rgb" }, + hsl: { channels: 3, labels: "hsl" }, + hsv: { channels: 3, labels: "hsv" }, + hwb: { channels: 3, labels: "hwb" }, + cmyk: { channels: 4, labels: "cmyk" }, + xyz: { channels: 3, labels: "xyz" }, + lab: { channels: 3, labels: "lab" }, + lch: { channels: 3, labels: "lch" }, + hex: { channels: 1, labels: ["hex"] }, + keyword: { channels: 1, labels: ["keyword"] }, + ansi16: { channels: 1, labels: ["ansi16"] }, + ansi256: { channels: 1, labels: ["ansi256"] }, + hcg: { channels: 3, labels: ["h", "c", "g"] }, + apple: { channels: 3, labels: ["r16", "g16", "b16"] }, + gray: { channels: 1, labels: ["gray"] } + }; + module2.exports = convert; + for (const model of Object.keys(convert)) { + if (!("channels" in convert[model])) { + throw new Error("missing channels property: " + model); + } + if (!("labels" in convert[model])) { + throw new Error("missing channel labels property: " + model); + } + if (convert[model].labels.length !== convert[model].channels) { + throw new Error("channel and label counts mismatch: " + model); + } + const { channels, labels } = convert[model]; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], "channels", { value: channels }); + Object.defineProperty(convert[model], "labels", { value: labels }); + } + convert.rgb.hsl = function(rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const min = Math.min(r, g, b); + const max = Math.max(r, g, b); + const delta = max - min; + let h; + let s; + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + h = Math.min(h * 60, 360); + if (h < 0) { + h += 360; + } + const l = (min + max) / 2; + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); + } + return [h, s * 100, l * 100]; + }; + convert.rgb.hsv = function(rgb) { + let rdif; + let gdif; + let bdif; + let h; + let s; + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const v = Math.max(r, g, b); + const diff = v - Math.min(r, g, b); + const diffc = function(c) { + return (v - c) / 6 / diff + 1 / 2; + }; + if (diff === 0) { + h = 0; + s = 0; + } else { + s = diff / v; + rdif = diffc(r); + gdif = diffc(g); + bdif = diffc(b); + if (r === v) { + h = bdif - gdif; + } else if (g === v) { + h = 1 / 3 + rdif - bdif; + } else if (b === v) { + h = 2 / 3 + gdif - rdif; + } + if (h < 0) { + h += 1; + } else if (h > 1) { + h -= 1; + } + } + return [ + h * 360, + s * 100, + v * 100 + ]; + }; + convert.rgb.hwb = function(rgb) { + const r = rgb[0]; + const g = rgb[1]; + let b = rgb[2]; + const h = convert.rgb.hsl(rgb)[0]; + const w = 1 / 255 * Math.min(r, Math.min(g, b)); + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + return [h, w * 100, b * 100]; + }; + convert.rgb.cmyk = function(rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const k = Math.min(1 - r, 1 - g, 1 - b); + const c = (1 - r - k) / (1 - k) || 0; + const m = (1 - g - k) / (1 - k) || 0; + const y = (1 - b - k) / (1 - k) || 0; + return [c * 100, m * 100, y * 100, k * 100]; + }; + function comparativeDistance(x, y) { + return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2; + } + convert.rgb.keyword = function(rgb) { + const reversed = reverseKeywords[rgb]; + if (reversed) { + return reversed; + } + let currentClosestDistance = Infinity; + let currentClosestKeyword; + for (const keyword of Object.keys(cssKeywords)) { + const value = cssKeywords[keyword]; + const distance = comparativeDistance(rgb, value); + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } + } + return currentClosestKeyword; + }; + convert.keyword.rgb = function(keyword) { + return cssKeywords[keyword]; + }; + convert.rgb.xyz = function(rgb) { + let r = rgb[0] / 255; + let g = rgb[1] / 255; + let b = rgb[2] / 255; + r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92; + g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92; + b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92; + const x = r * 0.4124 + g * 0.3576 + b * 0.1805; + const y = r * 0.2126 + g * 0.7152 + b * 0.0722; + const z = r * 0.0193 + g * 0.1192 + b * 0.9505; + return [x * 100, y * 100, z * 100]; + }; + convert.rgb.lab = function(rgb) { + const xyz = convert.rgb.xyz(rgb); + let x = xyz[0]; + let y = xyz[1]; + let z = xyz[2]; + x /= 95.047; + y /= 100; + z /= 108.883; + x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116; + y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116; + z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116; + const l = 116 * y - 16; + const a = 500 * (x - y); + const b = 200 * (y - z); + return [l, a, b]; + }; + convert.hsl.rgb = function(hsl) { + const h = hsl[0] / 360; + const s = hsl[1] / 100; + const l = hsl[2] / 100; + let t2; + let t3; + let val; + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + if (l < 0.5) { + t2 = l * (1 + s); + } else { + t2 = l + s - l * s; + } + const t1 = 2 * l - t2; + const rgb = [0, 0, 0]; + for (let i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + if (t3 < 0) { + t3++; + } + if (t3 > 1) { + t3--; + } + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + } else { + val = t1; + } + rgb[i] = val * 255; + } + return rgb; + }; + convert.hsl.hsv = function(hsl) { + const h = hsl[0]; + let s = hsl[1] / 100; + let l = hsl[2] / 100; + let smin = s; + const lmin = Math.max(l, 0.01); + l *= 2; + s *= l <= 1 ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + const v = (l + s) / 2; + const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s); + return [h, sv * 100, v * 100]; + }; + convert.hsv.rgb = function(hsv) { + const h = hsv[0] / 60; + const s = hsv[1] / 100; + let v = hsv[2] / 100; + const hi = Math.floor(h) % 6; + const f = h - Math.floor(h); + const p = 255 * v * (1 - s); + const q = 255 * v * (1 - s * f); + const t = 255 * v * (1 - s * (1 - f)); + v *= 255; + switch (hi) { + case 0: + return [v, t, p]; + case 1: + return [q, v, p]; + case 2: + return [p, v, t]; + case 3: + return [p, q, v]; + case 4: + return [t, p, v]; + case 5: + return [v, p, q]; + } + }; + convert.hsv.hsl = function(hsv) { + const h = hsv[0]; + const s = hsv[1] / 100; + const v = hsv[2] / 100; + const vmin = Math.max(v, 0.01); + let sl; + let l; + l = (2 - s) * v; + const lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= lmin <= 1 ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + return [h, sl * 100, l * 100]; + }; + convert.hwb.rgb = function(hwb) { + const h = hwb[0] / 360; + let wh = hwb[1] / 100; + let bl = hwb[2] / 100; + const ratio = wh + bl; + let f; + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + const i = Math.floor(6 * h); + const v = 1 - bl; + f = 6 * h - i; + if ((i & 1) !== 0) { + f = 1 - f; + } + const n = wh + f * (v - wh); + let r; + let g; + let b; + switch (i) { + default: + case 6: + case 0: + r = v; + g = n; + b = wh; + break; + case 1: + r = n; + g = v; + b = wh; + break; + case 2: + r = wh; + g = v; + b = n; + break; + case 3: + r = wh; + g = n; + b = v; + break; + case 4: + r = n; + g = wh; + b = v; + break; + case 5: + r = v; + g = wh; + b = n; + break; + } + return [r * 255, g * 255, b * 255]; + }; + convert.cmyk.rgb = function(cmyk) { + const c = cmyk[0] / 100; + const m = cmyk[1] / 100; + const y = cmyk[2] / 100; + const k = cmyk[3] / 100; + const r = 1 - Math.min(1, c * (1 - k) + k); + const g = 1 - Math.min(1, m * (1 - k) + k); + const b = 1 - Math.min(1, y * (1 - k) + k); + return [r * 255, g * 255, b * 255]; + }; + convert.xyz.rgb = function(xyz) { + const x = xyz[0] / 100; + const y = xyz[1] / 100; + const z = xyz[2] / 100; + let r; + let g; + let b; + r = x * 3.2406 + y * -1.5372 + z * -0.4986; + g = x * -0.9689 + y * 1.8758 + z * 0.0415; + b = x * 0.0557 + y * -0.204 + z * 1.057; + r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92; + g = g > 31308e-7 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92; + b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92; + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + return [r * 255, g * 255, b * 255]; + }; + convert.xyz.lab = function(xyz) { + let x = xyz[0]; + let y = xyz[1]; + let z = xyz[2]; + x /= 95.047; + y /= 100; + z /= 108.883; + x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116; + y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116; + z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116; + const l = 116 * y - 16; + const a = 500 * (x - y); + const b = 200 * (y - z); + return [l, a, b]; + }; + convert.lab.xyz = function(lab) { + const l = lab[0]; + const a = lab[1]; + const b = lab[2]; + let x; + let y; + let z; + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + const y2 = y ** 3; + const x2 = x ** 3; + const z2 = z ** 3; + y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787; + x *= 95.047; + y *= 100; + z *= 108.883; + return [x, y, z]; + }; + convert.lab.lch = function(lab) { + const l = lab[0]; + const a = lab[1]; + const b = lab[2]; + let h; + const hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + if (h < 0) { + h += 360; + } + const c = Math.sqrt(a * a + b * b); + return [l, c, h]; + }; + convert.lch.lab = function(lch) { + const l = lch[0]; + const c = lch[1]; + const h = lch[2]; + const hr = h / 360 * 2 * Math.PI; + const a = c * Math.cos(hr); + const b = c * Math.sin(hr); + return [l, a, b]; + }; + convert.rgb.ansi16 = function(args2, saturation = null) { + const [r, g, b] = args2; + let value = saturation === null ? convert.rgb.hsv(args2)[2] : saturation; + value = Math.round(value / 50); + if (value === 0) { + return 30; + } + let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255)); + if (value === 2) { + ansi += 60; + } + return ansi; + }; + convert.hsv.ansi16 = function(args2) { + return convert.rgb.ansi16(convert.hsv.rgb(args2), args2[2]); + }; + convert.rgb.ansi256 = function(args2) { + const r = args2[0]; + const g = args2[1]; + const b = args2[2]; + if (r === g && g === b) { + if (r < 8) { + return 16; + } + if (r > 248) { + return 231; + } + return Math.round((r - 8) / 247 * 24) + 232; + } + const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5); + return ansi; + }; + convert.ansi16.rgb = function(args2) { + let color = args2 % 10; + if (color === 0 || color === 7) { + if (args2 > 50) { + color += 3.5; + } + color = color / 10.5 * 255; + return [color, color, color]; + } + const mult = (~~(args2 > 50) + 1) * 0.5; + const r = (color & 1) * mult * 255; + const g = (color >> 1 & 1) * mult * 255; + const b = (color >> 2 & 1) * mult * 255; + return [r, g, b]; + }; + convert.ansi256.rgb = function(args2) { + if (args2 >= 232) { + const c = (args2 - 232) * 10 + 8; + return [c, c, c]; + } + args2 -= 16; + let rem; + const r = Math.floor(args2 / 36) / 5 * 255; + const g = Math.floor((rem = args2 % 36) / 6) / 5 * 255; + const b = rem % 6 / 5 * 255; + return [r, g, b]; + }; + convert.rgb.hex = function(args2) { + const integer = ((Math.round(args2[0]) & 255) << 16) + ((Math.round(args2[1]) & 255) << 8) + (Math.round(args2[2]) & 255); + const string = integer.toString(16).toUpperCase(); + return "000000".substring(string.length) + string; + }; + convert.hex.rgb = function(args2) { + const match = args2.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + if (!match) { + return [0, 0, 0]; + } + let colorString = match[0]; + if (match[0].length === 3) { + colorString = colorString.split("").map((char) => { + return char + char; + }).join(""); + } + const integer = parseInt(colorString, 16); + const r = integer >> 16 & 255; + const g = integer >> 8 & 255; + const b = integer & 255; + return [r, g, b]; + }; + convert.rgb.hcg = function(rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const max = Math.max(Math.max(r, g), b); + const min = Math.min(Math.min(r, g), b); + const chroma = max - min; + let grayscale; + let hue; + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; + } + if (chroma <= 0) { + hue = 0; + } else if (max === r) { + hue = (g - b) / chroma % 6; + } else if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma; + } + hue /= 6; + hue %= 1; + return [hue * 360, chroma * 100, grayscale * 100]; + }; + convert.hsl.hcg = function(hsl) { + const s = hsl[1] / 100; + const l = hsl[2] / 100; + const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l); + let f = 0; + if (c < 1) { + f = (l - 0.5 * c) / (1 - c); + } + return [hsl[0], c * 100, f * 100]; + }; + convert.hsv.hcg = function(hsv) { + const s = hsv[1] / 100; + const v = hsv[2] / 100; + const c = s * v; + let f = 0; + if (c < 1) { + f = (v - c) / (1 - c); + } + return [hsv[0], c * 100, f * 100]; + }; + convert.hcg.rgb = function(hcg) { + const h = hcg[0] / 360; + const c = hcg[1] / 100; + const g = hcg[2] / 100; + if (c === 0) { + return [g * 255, g * 255, g * 255]; + } + const pure = [0, 0, 0]; + const hi = h % 1 * 6; + const v = hi % 1; + const w = 1 - v; + let mg = 0; + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; + pure[1] = v; + pure[2] = 0; + break; + case 1: + pure[0] = w; + pure[1] = 1; + pure[2] = 0; + break; + case 2: + pure[0] = 0; + pure[1] = 1; + pure[2] = v; + break; + case 3: + pure[0] = 0; + pure[1] = w; + pure[2] = 1; + break; + case 4: + pure[0] = v; + pure[1] = 0; + pure[2] = 1; + break; + default: + pure[0] = 1; + pure[1] = 0; + pure[2] = w; + } + mg = (1 - c) * g; + return [ + (c * pure[0] + mg) * 255, + (c * pure[1] + mg) * 255, + (c * pure[2] + mg) * 255 + ]; + }; + convert.hcg.hsv = function(hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + const v = c + g * (1 - c); + let f = 0; + if (v > 0) { + f = c / v; + } + return [hcg[0], f * 100, v * 100]; + }; + convert.hcg.hsl = function(hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + const l = g * (1 - c) + 0.5 * c; + let s = 0; + if (l > 0 && l < 0.5) { + s = c / (2 * l); + } else if (l >= 0.5 && l < 1) { + s = c / (2 * (1 - l)); + } + return [hcg[0], s * 100, l * 100]; + }; + convert.hcg.hwb = function(hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + const v = c + g * (1 - c); + return [hcg[0], (v - c) * 100, (1 - v) * 100]; + }; + convert.hwb.hcg = function(hwb) { + const w = hwb[1] / 100; + const b = hwb[2] / 100; + const v = 1 - b; + const c = v - w; + let g = 0; + if (c < 1) { + g = (v - c) / (1 - c); + } + return [hwb[0], c * 100, g * 100]; + }; + convert.apple.rgb = function(apple) { + return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255]; + }; + convert.rgb.apple = function(rgb) { + return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535]; + }; + convert.gray.rgb = function(args2) { + return [args2[0] / 100 * 255, args2[0] / 100 * 255, args2[0] / 100 * 255]; + }; + convert.gray.hsl = function(args2) { + return [0, 0, args2[0]]; + }; + convert.gray.hsv = convert.gray.hsl; + convert.gray.hwb = function(gray) { + return [0, 100, gray[0]]; + }; + convert.gray.cmyk = function(gray) { + return [0, 0, 0, gray[0]]; + }; + convert.gray.lab = function(gray) { + return [gray[0], 0, 0]; + }; + convert.gray.hex = function(gray) { + const val = Math.round(gray[0] / 100 * 255) & 255; + const integer = (val << 16) + (val << 8) + val; + const string = integer.toString(16).toUpperCase(); + return "000000".substring(string.length) + string; + }; + convert.rgb.gray = function(rgb) { + const val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; + }; + } +}); + +// ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js +var require_route2 = __commonJS({ + "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js"(exports2, module2) { + var conversions = require_conversions2(); + function buildGraph() { + const graph = {}; + const models = Object.keys(conversions); + for (let len = models.length, i = 0; i < len; i++) { + graph[models[i]] = { + distance: -1, + parent: null + }; + } + return graph; + } + function deriveBFS(fromModel) { + const graph = buildGraph(); + const queue = [fromModel]; + graph[fromModel].distance = 0; + while (queue.length) { + const current = queue.pop(); + const adjacents = Object.keys(conversions[current]); + for (let len = adjacents.length, i = 0; i < len; i++) { + const adjacent = adjacents[i]; + const node = graph[adjacent]; + if (node.distance === -1) { + node.distance = graph[current].distance + 1; + node.parent = current; + queue.unshift(adjacent); + } + } + } + return graph; + } + function link(from, to) { + return function(args2) { + return to(from(args2)); + }; + } + function wrapConversion(toModel, graph) { + const path = [graph[toModel].parent, toModel]; + let fn2 = conversions[graph[toModel].parent][toModel]; + let cur = graph[toModel].parent; + while (graph[cur].parent) { + path.unshift(graph[cur].parent); + fn2 = link(conversions[graph[cur].parent][cur], fn2); + cur = graph[cur].parent; + } + fn2.conversion = path; + return fn2; + } + module2.exports = function(fromModel) { + const graph = deriveBFS(fromModel); + const conversion = {}; + const models = Object.keys(graph); + for (let len = models.length, i = 0; i < len; i++) { + const toModel = models[i]; + const node = graph[toModel]; + if (node.parent === null) { + continue; + } + conversion[toModel] = wrapConversion(toModel, graph); + } + return conversion; + }; + } +}); + +// ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js +var require_color_convert2 = __commonJS({ + "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js"(exports2, module2) { + var conversions = require_conversions2(); + var route = require_route2(); + var convert = {}; + var models = Object.keys(conversions); + function wrapRaw(fn2) { + const wrappedFn = function(...args2) { + const arg0 = args2[0]; + if (arg0 === void 0 || arg0 === null) { + return arg0; + } + if (arg0.length > 1) { + args2 = arg0; + } + return fn2(args2); + }; + if ("conversion" in fn2) { + wrappedFn.conversion = fn2.conversion; + } + return wrappedFn; + } + function wrapRounded(fn2) { + const wrappedFn = function(...args2) { + const arg0 = args2[0]; + if (arg0 === void 0 || arg0 === null) { + return arg0; + } + if (arg0.length > 1) { + args2 = arg0; + } + const result = fn2(args2); + if (typeof result === "object") { + for (let len = result.length, i = 0; i < len; i++) { + result[i] = Math.round(result[i]); + } + } + return result; + }; + if ("conversion" in fn2) { + wrappedFn.conversion = fn2.conversion; + } + return wrappedFn; + } + models.forEach((fromModel) => { + convert[fromModel] = {}; + Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels }); + Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels }); + const routes = route(fromModel); + const routeModels = Object.keys(routes); + routeModels.forEach((toModel) => { + const fn2 = routes[toModel]; + convert[fromModel][toModel] = wrapRounded(fn2); + convert[fromModel][toModel].raw = wrapRaw(fn2); + }); + }); + module2.exports = convert; + } +}); + +// ../../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js +var require_ansi_styles2 = __commonJS({ + "../../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js"(exports2, module2) { + "use strict"; + var wrapAnsi16 = (fn2, offset) => (...args2) => { + const code = fn2(...args2); + return `[${code + offset}m`; + }; + var wrapAnsi256 = (fn2, offset) => (...args2) => { + const code = fn2(...args2); + return `[${38 + offset};5;${code}m`; + }; + var wrapAnsi16m = (fn2, offset) => (...args2) => { + const rgb = fn2(...args2); + return `[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; + }; + var ansi2ansi = (n) => n; + var rgb2rgb = (r, g, b) => [r, g, b]; + var setLazyProperty = (object, property, get) => { + Object.defineProperty(object, property, { + get: () => { + const value = get(); + Object.defineProperty(object, property, { + value, + enumerable: true, + configurable: true + }); + return value; + }, + enumerable: true, + configurable: true + }); + }; + var colorConvert; + var makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { + if (colorConvert === void 0) { + colorConvert = require_color_convert2(); + } + const offset = isBackground ? 10 : 0; + const styles = {}; + for (const [sourceSpace, suite] of Object.entries(colorConvert)) { + const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace; + if (sourceSpace === targetSpace) { + styles[name] = wrap(identity, offset); + } else if (typeof suite === "object") { + styles[name] = wrap(suite[targetSpace], offset); + } + } + return styles; + }; + function assembleStyles() { + const codes = new Map(); + const styles = { + modifier: { + reset: [0, 0], + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + blackBright: [90, 39], + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; + styles.color.gray = styles.color.blackBright; + styles.bgColor.bgGray = styles.bgColor.bgBlackBright; + styles.color.grey = styles.color.blackBright; + styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; + for (const [groupName, group] of Object.entries(styles)) { + for (const [styleName, style] of Object.entries(group)) { + styles[styleName] = { + open: `[${style[0]}m`, + close: `[${style[1]}m` + }; + group[styleName] = styles[styleName]; + codes.set(style[0], style[1]); + } + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + } + Object.defineProperty(styles, "codes", { + value: codes, + enumerable: false + }); + styles.color.close = ""; + styles.bgColor.close = ""; + setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false)); + setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false)); + setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false)); + setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true)); + setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true)); + setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true)); + return styles; + } + Object.defineProperty(module2, "exports", { + enumerable: true, + get: assembleStyles + }); + } +}); + +// ../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js +var require_has_flag2 = __commonJS({ + "../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports2, module2) { + "use strict"; + module2.exports = (flag, argv2 = process.argv) => { + const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; + const position = argv2.indexOf(prefix + flag); + const terminatorPosition = argv2.indexOf("--"); + return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); + }; + } +}); + +// ../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js +var require_supports_color2 = __commonJS({ + "../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports2, module2) { + "use strict"; + var os = require("os"); + var tty = require("tty"); + var hasFlag = require_has_flag2(); + var { env } = process; + var forceColor; + if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { + forceColor = 0; + } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { + forceColor = 1; + } + if ("FORCE_COLOR" in env) { + if (env.FORCE_COLOR === "true") { + forceColor = 1; + } else if (env.FORCE_COLOR === "false") { + forceColor = 0; + } else { + forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); + } + } + function translateLevel(level) { + if (level === 0) { + return false; + } + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; + } + function supportsColor(haveStream, streamIsTTY) { + if (forceColor === 0) { + return 0; + } + if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { + return 3; + } + if (hasFlag("color=256")) { + return 2; + } + if (haveStream && !streamIsTTY && forceColor === void 0) { + return 0; + } + const min = forceColor || 0; + if (env.TERM === "dumb") { + return min; + } + if (process.platform === "win32") { + const osRelease = os.release().split("."); + if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + return 1; + } + if ("CI" in env) { + if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") { + return 1; + } + return min; + } + if ("TEAMCITY_VERSION" in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + if (env.COLORTERM === "truecolor") { + return 3; + } + if ("TERM_PROGRAM" in env) { + const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); + switch (env.TERM_PROGRAM) { + case "iTerm.app": + return version >= 3 ? 3 : 2; + case "Apple_Terminal": + return 2; + } + } + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + if ("COLORTERM" in env) { + return 1; + } + return min; + } + function getSupportLevel(stream) { + const level = supportsColor(stream, stream && stream.isTTY); + return translateLevel(level); + } + module2.exports = { + supportsColor: getSupportLevel, + stdout: translateLevel(supportsColor(true, tty.isatty(1))), + stderr: translateLevel(supportsColor(true, tty.isatty(2))) + }; + } +}); + +// ../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js +var require_util2 = __commonJS({ + "../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js"(exports2, module2) { + "use strict"; + var stringReplaceAll = (string, substring, replacer) => { + let index = string.indexOf(substring); + if (index === -1) { + return string; + } + const substringLength = substring.length; + let endIndex = 0; + let returnValue = ""; + do { + returnValue += string.substr(endIndex, index - endIndex) + substring + replacer; + endIndex = index + substringLength; + index = string.indexOf(substring, endIndex); + } while (index !== -1); + returnValue += string.substr(endIndex); + return returnValue; + }; + var stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => { + let endIndex = 0; + let returnValue = ""; + do { + const gotCR = string[index - 1] === "\r"; + returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix; + endIndex = index + 1; + index = string.indexOf("\n", endIndex); + } while (index !== -1); + returnValue += string.substr(endIndex); + return returnValue; + }; + module2.exports = { + stringReplaceAll, + stringEncaseCRLFWithFirstIndex + }; + } +}); + +// ../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js +var require_templates2 = __commonJS({ + "../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js"(exports2, module2) { + "use strict"; + var TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; + var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; + var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; + var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi; + var ESCAPES = new Map([ + ["n", "\n"], + ["r", "\r"], + ["t", " "], + ["b", "\b"], + ["f", "\f"], + ["v", "\v"], + ["0", "\0"], + ["\\", "\\"], + ["e", ""], + ["a", "\x07"] + ]); + function unescape2(c) { + const u = c[0] === "u"; + const bracket = c[1] === "{"; + if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) { + return String.fromCharCode(parseInt(c.slice(1), 16)); + } + if (u && bracket) { + return String.fromCodePoint(parseInt(c.slice(2, -1), 16)); + } + return ESCAPES.get(c) || c; + } + function parseArguments(name, arguments_) { + const results = []; + const chunks = arguments_.trim().split(/\s*,\s*/g); + let matches; + for (const chunk of chunks) { + const number = Number(chunk); + if (!Number.isNaN(number)) { + results.push(number); + } else if (matches = chunk.match(STRING_REGEX)) { + results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape2(escape) : character)); + } else { + throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); + } + } + return results; + } + function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + const results = []; + let matches; + while ((matches = STYLE_REGEX.exec(style)) !== null) { + const name = matches[1]; + if (matches[2]) { + const args2 = parseArguments(name, matches[2]); + results.push([name].concat(args2)); + } else { + results.push([name]); + } + } + return results; + } + function buildStyle(chalk, styles) { + const enabled = {}; + for (const layer of styles) { + for (const style of layer.styles) { + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } + } + let current = chalk; + for (const [styleName, styles2] of Object.entries(enabled)) { + if (!Array.isArray(styles2)) { + continue; + } + if (!(styleName in current)) { + throw new Error(`Unknown Chalk style: ${styleName}`); + } + current = styles2.length > 0 ? current[styleName](...styles2) : current[styleName]; + } + return current; + } + module2.exports = (chalk, temporary) => { + const styles = []; + const chunks = []; + let chunk = []; + temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => { + if (escapeCharacter) { + chunk.push(unescape2(escapeCharacter)); + } else if (style) { + const string = chunk.join(""); + chunk = []; + chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string)); + styles.push({ inverse, styles: parseStyle(style) }); + } else if (close) { + if (styles.length === 0) { + throw new Error("Found extraneous } in Chalk template literal"); + } + chunks.push(buildStyle(chalk, styles)(chunk.join(""))); + chunk = []; + styles.pop(); + } else { + chunk.push(character); + } + }); + chunks.push(chunk.join("")); + if (styles.length > 0) { + const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`; + throw new Error(errMessage); + } + return chunks.join(""); + }; + } +}); + +// ../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js +var require_source = __commonJS({ + "../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js"(exports2, module2) { + "use strict"; + var ansiStyles = require_ansi_styles2(); + var { stdout: stdoutColor, stderr: stderrColor } = require_supports_color2(); + var { + stringReplaceAll, + stringEncaseCRLFWithFirstIndex + } = require_util2(); + var { isArray } = Array; + var levelMapping = [ + "ansi", + "ansi", + "ansi256", + "ansi16m" + ]; + var styles = Object.create(null); + var applyOptions = (object, options = {}) => { + if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) { + throw new Error("The `level` option should be an integer from 0 to 3"); + } + const colorLevel = stdoutColor ? stdoutColor.level : 0; + object.level = options.level === void 0 ? colorLevel : options.level; + }; + var ChalkClass = class { + constructor(options) { + return chalkFactory(options); + } + }; + var chalkFactory = (options) => { + const chalk2 = {}; + applyOptions(chalk2, options); + chalk2.template = (...arguments_) => chalkTag(chalk2.template, ...arguments_); + Object.setPrototypeOf(chalk2, Chalk.prototype); + Object.setPrototypeOf(chalk2.template, chalk2); + chalk2.template.constructor = () => { + throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead."); + }; + chalk2.template.Instance = ChalkClass; + return chalk2.template; + }; + function Chalk(options) { + return chalkFactory(options); + } + for (const [styleName, style] of Object.entries(ansiStyles)) { + styles[styleName] = { + get() { + const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty); + Object.defineProperty(this, styleName, { value: builder }); + return builder; + } + }; + } + styles.visible = { + get() { + const builder = createBuilder(this, this._styler, true); + Object.defineProperty(this, "visible", { value: builder }); + return builder; + } + }; + var usedModels = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"]; + for (const model of usedModels) { + styles[model] = { + get() { + const { level } = this; + return function(...arguments_) { + const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler); + return createBuilder(this, styler, this._isEmpty); + }; + } + }; + } + for (const model of usedModels) { + const bgModel = "bg" + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + const { level } = this; + return function(...arguments_) { + const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler); + return createBuilder(this, styler, this._isEmpty); + }; + } + }; + } + var proto = Object.defineProperties(() => { + }, { + ...styles, + level: { + enumerable: true, + get() { + return this._generator.level; + }, + set(level) { + this._generator.level = level; + } + } + }); + var createStyler = (open, close, parent) => { + let openAll; + let closeAll; + if (parent === void 0) { + openAll = open; + closeAll = close; + } else { + openAll = parent.openAll + open; + closeAll = close + parent.closeAll; + } + return { + open, + close, + openAll, + closeAll, + parent + }; + }; + var createBuilder = (self2, _styler, _isEmpty) => { + const builder = (...arguments_) => { + if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) { + return applyStyle(builder, chalkTag(builder, ...arguments_)); + } + return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" ")); + }; + Object.setPrototypeOf(builder, proto); + builder._generator = self2; + builder._styler = _styler; + builder._isEmpty = _isEmpty; + return builder; + }; + var applyStyle = (self2, string) => { + if (self2.level <= 0 || !string) { + return self2._isEmpty ? "" : string; + } + let styler = self2._styler; + if (styler === void 0) { + return string; + } + const { openAll, closeAll } = styler; + if (string.indexOf("") !== -1) { + while (styler !== void 0) { + string = stringReplaceAll(string, styler.close, styler.open); + styler = styler.parent; + } + } + const lfIndex = string.indexOf("\n"); + if (lfIndex !== -1) { + string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex); + } + return openAll + string + closeAll; + }; + var template; + var chalkTag = (chalk2, ...strings) => { + const [firstString] = strings; + if (!isArray(firstString) || !isArray(firstString.raw)) { + return strings.join(" "); + } + const arguments_ = strings.slice(1); + const parts = [firstString.raw[0]]; + for (let i = 1; i < firstString.length; i++) { + parts.push(String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"), String(firstString.raw[i])); + } + if (template === void 0) { + template = require_templates2(); + } + return template(chalk2, parts.join("")); + }; + Object.defineProperties(Chalk.prototype, styles); + var chalk = Chalk(); + chalk.supportsColor = stdoutColor; + chalk.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 }); + chalk.stderr.supportsColor = stderrColor; + module2.exports = chalk; + } +}); + +// ../default-reporter/lib/reporterForClient/outputConstants.js +var require_outputConstants = __commonJS({ + "../default-reporter/lib/reporterForClient/outputConstants.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.REMOVED_CHAR = exports2.ADDED_CHAR = exports2.hlPkgId = exports2.hlValue = exports2.PREFIX_MAX_LENGTH = void 0; + var chalk_1 = __importDefault(require_source()); + exports2.PREFIX_MAX_LENGTH = 40; + exports2.hlValue = chalk_1.default.cyanBright; + exports2.hlPkgId = chalk_1.default["whiteBright"]; + exports2.ADDED_CHAR = chalk_1.default.green("+"); + exports2.REMOVED_CHAR = chalk_1.default.red("-"); + } +}); + +// ../default-reporter/lib/reporterForClient/reportBigTarballsProgress.js +var require_reportBigTarballsProgress = __commonJS({ + "../default-reporter/lib/reporterForClient/reportBigTarballsProgress.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var operators_1 = require_operators(); + var pretty_bytes_1 = __importDefault(require_pretty_bytes()); + var outputConstants_1 = require_outputConstants(); + var BIG_TARBALL_SIZE = 1024 * 1024 * 5; + exports2.default = (log$) => { + return log$.fetchingProgress.pipe(operators_1.filter((log2) => log2.status === "started" && typeof log2.size === "number" && log2.size >= BIG_TARBALL_SIZE && log2.attempt === 1), operators_1.map((startedLog) => { + const size = pretty_bytes_1.default(startedLog["size"]); + return log$.fetchingProgress.pipe(operators_1.filter((log2) => log2.status === "in_progress" && log2.packageId === startedLog["packageId"]), operators_1.map((log2) => log2["downloaded"]), operators_1.startWith(0), operators_1.map((downloadedRaw) => { + const done = startedLog["size"] === downloadedRaw; + const downloaded = pretty_bytes_1.default(downloadedRaw); + return { + fixed: !done, + msg: `Downloading ${outputConstants_1.hlPkgId(startedLog["packageId"])}: ${outputConstants_1.hlValue(downloaded)}/${outputConstants_1.hlValue(size)}${done ? ", done" : ""}` + }; + })); + })); + }; + } +}); + +// ../../node_modules/.pnpm/normalize-path@3.0.0/node_modules/normalize-path/index.js +var require_normalize_path = __commonJS({ + "../../node_modules/.pnpm/normalize-path@3.0.0/node_modules/normalize-path/index.js"(exports2, module2) { + module2.exports = function(path, stripTrailing) { + if (typeof path !== "string") { + throw new TypeError("expected path to be a string"); + } + if (path === "\\" || path === "/") + return "/"; + var len = path.length; + if (len <= 1) + return path; + var prefix = ""; + if (len > 4 && path[3] === "\\") { + var ch = path[2]; + if ((ch === "?" || ch === ".") && path.slice(0, 2) === "\\\\") { + path = path.slice(2); + prefix = "//"; + } + } + var segs = path.split(/[/\\]+/); + if (stripTrailing !== false && segs[segs.length - 1] === "") { + segs.pop(); + } + return prefix + segs.join("/"); + }; + } +}); + +// ../default-reporter/lib/reporterForClient/reportContext.js +var require_reportContext = __commonJS({ + "../default-reporter/lib/reporterForClient/reportContext.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var normalize_path_1 = __importDefault(require_normalize_path()); + exports2.default = (log$, opts) => { + return Rx.combineLatest(log$.context.pipe(operators_1.take(1)), log$.packageImportMethod.pipe(operators_1.take(1))).pipe(operators_1.map(([context, packageImportMethod]) => { + if (context.currentLockfileExists) { + return Rx.NEVER; + } + let method; + switch (packageImportMethod.method) { + case "copy": + method = "copied"; + break; + case "clone": + method = "cloned"; + break; + case "hardlink": + method = "hard linked"; + break; + default: + method = packageImportMethod.method; + break; + } + return Rx.of({ + msg: `Packages are ${method} from the content-addressable store to the virtual store. + Content-addressable store is at: ${context.storeDir} + Virtual store is at: ${normalize_path_1.default(path_1.default.relative(opts.cwd, context.virtualStoreDir))}` + }); + })); + }; + } +}); + +// ../default-reporter/lib/reporterForClient/utils/formatWarn.js +var require_formatWarn = __commonJS({ + "../default-reporter/lib/reporterForClient/utils/formatWarn.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var chalk_1 = __importDefault(require_source()); + function formatWarn(message2) { + return `${chalk_1.default.bgYellow.black("\u2009WARN\u2009")} ${message2}`; + } + exports2.default = formatWarn; + } +}); + +// ../../node_modules/.pnpm/right-pad@1.0.1/node_modules/right-pad/rightpad.js +var require_rightpad = __commonJS({ + "../../node_modules/.pnpm/right-pad@1.0.1/node_modules/right-pad/rightpad.js"(exports2, module2) { + "use strict"; + exports2 = module2.exports = function rightPad(_string, _length, _char) { + if (typeof _string !== "string") { + throw new Error("The string parameter must be a string."); + } + if (_string.length < 1) { + throw new Error("The string parameter must be 1 character or longer."); + } + if (typeof _length !== "number") { + throw new Error("The length parameter must be a number."); + } + if (typeof _char !== "string" && _char) { + throw new Error("The character parameter must be a string."); + } + var i = -1; + _length = _length - _string.length; + if (!_char && _char !== 0) { + _char = " "; + } + while (++i < _length) { + _string += _char; + } + return _string; + }; + } +}); + +// ../default-reporter/lib/reporterForClient/utils/formatPrefix.js +var require_formatPrefix = __commonJS({ + "../default-reporter/lib/reporterForClient/utils/formatPrefix.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.formatPrefixNoTrim = void 0; + var path_1 = __importDefault(require("path")); + var normalize_path_1 = __importDefault(require_normalize_path()); + var outputConstants_1 = require_outputConstants(); + function formatPrefix(cwd, prefix) { + prefix = formatPrefixNoTrim(cwd, prefix); + if (prefix.length <= outputConstants_1.PREFIX_MAX_LENGTH) { + return prefix; + } + const shortPrefix = prefix.substr(-outputConstants_1.PREFIX_MAX_LENGTH + 3); + const separatorLocation = shortPrefix.indexOf("/"); + if (separatorLocation <= 0) { + return `...${shortPrefix}`; + } + return `...${shortPrefix.substr(separatorLocation)}`; + } + exports2.default = formatPrefix; + function formatPrefixNoTrim(cwd, prefix) { + return normalize_path_1.default(path_1.default.relative(cwd, prefix) || "."); + } + exports2.formatPrefixNoTrim = formatPrefixNoTrim; + } +}); + +// ../default-reporter/lib/reporterForClient/utils/zooming.js +var require_zooming = __commonJS({ + "../default-reporter/lib/reporterForClient/utils/zooming.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.zoomOut = exports2.autozoom = void 0; + var right_pad_1 = __importDefault(require_rightpad()); + var outputConstants_1 = require_outputConstants(); + var formatPrefix_1 = __importDefault(require_formatPrefix()); + function autozoom(currentPrefix, logPrefix, line, opts) { + if (!logPrefix || !opts.zoomOutCurrent && currentPrefix === logPrefix) { + return line; + } + return zoomOut(currentPrefix, logPrefix, line); + } + exports2.autozoom = autozoom; + function zoomOut(currentPrefix, logPrefix, line) { + return `${right_pad_1.default(formatPrefix_1.default(currentPrefix, logPrefix), outputConstants_1.PREFIX_MAX_LENGTH)} | ${line}`; + } + exports2.zoomOut = zoomOut; + } +}); + +// ../default-reporter/lib/reporterForClient/reportDeprecations.js +var require_reportDeprecations = __commonJS({ + "../default-reporter/lib/reporterForClient/reportDeprecations.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var chalk_1 = __importDefault(require_source()); + var formatWarn_1 = __importDefault(require_formatWarn()); + var zooming_1 = require_zooming(); + exports2.default = (deprecation$, opts) => { + return deprecation$.pipe(operators_1.filter((log2) => log2.depth === 0), operators_1.map((log2) => { + if (!opts.isRecursive && log2.prefix === opts.cwd) { + return Rx.of({ + msg: formatWarn_1.default(`${chalk_1.default.red("deprecated")} ${log2.pkgName}@${log2.pkgVersion}: ${log2.deprecated}`) + }); + } + return Rx.of({ + msg: zooming_1.zoomOut(opts.cwd, log2.prefix, formatWarn_1.default(`${chalk_1.default.red("deprecated")} ${log2.pkgName}@${log2.pkgVersion}`)) + }); + })); + }; + } +}); + +// ../default-reporter/lib/reporterForClient/reportHooks.js +var require_reportHooks = __commonJS({ + "../default-reporter/lib/reporterForClient/reportHooks.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var chalk_1 = __importDefault(require_source()); + var zooming_1 = require_zooming(); + exports2.default = (hook$, opts) => { + return hook$.pipe(operators_1.map((log2) => Rx.of({ + msg: zooming_1.autozoom(opts.cwd, log2.prefix, `${chalk_1.default.magentaBright(log2.hook)}: ${log2.message}`, { + zoomOutCurrent: opts.isRecursive + }) + }))); + }; + } +}); + +// ../default-reporter/lib/reporterForClient/reportInstallChecks.js +var require_reportInstallChecks = __commonJS({ + "../default-reporter/lib/reporterForClient/reportInstallChecks.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var formatWarn_1 = __importDefault(require_formatWarn()); + var zooming_1 = require_zooming(); + exports2.default = (installCheck$, opts) => { + return installCheck$.pipe(operators_1.map((log2) => formatInstallCheck(opts.cwd, log2)), operators_1.filter(Boolean), operators_1.map((msg) => Rx.of({ msg }))); + }; + function formatInstallCheck(currentPrefix, logObj, opts) { + var _a; + const zoomOutCurrent = (_a = opts === null || opts === void 0 ? void 0 : opts.zoomOutCurrent) !== null && _a !== void 0 ? _a : false; + switch (logObj.code) { + case "EBADPLATFORM": + return zooming_1.autozoom(currentPrefix, logObj["prefix"], formatWarn_1.default(`Unsupported system. Skipping dependency ${logObj.pkgId}`), { zoomOutCurrent }); + case "ENOTSUP": + return zooming_1.autozoom(currentPrefix, logObj["prefix"], logObj.toString(), { zoomOutCurrent }); + default: + return void 0; + } + } + } +}); + +// ../../node_modules/.pnpm/parse-ms@2.1.0/node_modules/parse-ms/index.js +var require_parse_ms = __commonJS({ + "../../node_modules/.pnpm/parse-ms@2.1.0/node_modules/parse-ms/index.js"(exports2, module2) { + "use strict"; + module2.exports = (milliseconds) => { + if (typeof milliseconds !== "number") { + throw new TypeError("Expected a number"); + } + const roundTowardsZero = milliseconds > 0 ? Math.floor : Math.ceil; + return { + days: roundTowardsZero(milliseconds / 864e5), + hours: roundTowardsZero(milliseconds / 36e5) % 24, + minutes: roundTowardsZero(milliseconds / 6e4) % 60, + seconds: roundTowardsZero(milliseconds / 1e3) % 60, + milliseconds: roundTowardsZero(milliseconds) % 1e3, + microseconds: roundTowardsZero(milliseconds * 1e3) % 1e3, + nanoseconds: roundTowardsZero(milliseconds * 1e6) % 1e3 + }; + }; + } +}); + +// ../../node_modules/.pnpm/pretty-ms@7.0.1/node_modules/pretty-ms/index.js +var require_pretty_ms = __commonJS({ + "../../node_modules/.pnpm/pretty-ms@7.0.1/node_modules/pretty-ms/index.js"(exports2, module2) { + "use strict"; + var parseMilliseconds = require_parse_ms(); + var pluralize = (word, count) => count === 1 ? word : `${word}s`; + var SECOND_ROUNDING_EPSILON = 1e-7; + module2.exports = (milliseconds, options = {}) => { + if (!Number.isFinite(milliseconds)) { + throw new TypeError("Expected a finite number"); + } + if (options.colonNotation) { + options.compact = false; + options.formatSubMilliseconds = false; + options.separateMilliseconds = false; + options.verbose = false; + } + if (options.compact) { + options.secondsDecimalDigits = 0; + options.millisecondsDecimalDigits = 0; + } + const result = []; + const floorDecimals = (value, decimalDigits) => { + const flooredInterimValue = Math.floor(value * 10 ** decimalDigits + SECOND_ROUNDING_EPSILON); + const flooredValue = Math.round(flooredInterimValue) / 10 ** decimalDigits; + return flooredValue.toFixed(decimalDigits); + }; + const add = (value, long, short, valueString) => { + if ((result.length === 0 || !options.colonNotation) && value === 0 && !(options.colonNotation && short === "m")) { + return; + } + valueString = (valueString || value || "0").toString(); + let prefix; + let suffix; + if (options.colonNotation) { + prefix = result.length > 0 ? ":" : ""; + suffix = ""; + const wholeDigits = valueString.includes(".") ? valueString.split(".")[0].length : valueString.length; + const minLength = result.length > 0 ? 2 : 1; + valueString = "0".repeat(Math.max(0, minLength - wholeDigits)) + valueString; + } else { + prefix = ""; + suffix = options.verbose ? " " + pluralize(long, value) : short; + } + result.push(prefix + valueString + suffix); + }; + const parsed = parseMilliseconds(milliseconds); + add(Math.trunc(parsed.days / 365), "year", "y"); + add(parsed.days % 365, "day", "d"); + add(parsed.hours, "hour", "h"); + add(parsed.minutes, "minute", "m"); + if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3) { + add(parsed.seconds, "second", "s"); + if (options.formatSubMilliseconds) { + add(parsed.milliseconds, "millisecond", "ms"); + add(parsed.microseconds, "microsecond", "\xB5s"); + add(parsed.nanoseconds, "nanosecond", "ns"); + } else { + const millisecondsAndBelow = parsed.milliseconds + parsed.microseconds / 1e3 + parsed.nanoseconds / 1e6; + const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === "number" ? options.millisecondsDecimalDigits : 0; + const roundedMiliseconds = millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow); + const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : roundedMiliseconds; + add(Number.parseFloat(millisecondsString, 10), "millisecond", "ms", millisecondsString); + } + } else { + const seconds = milliseconds / 1e3 % 60; + const secondsDecimalDigits = typeof options.secondsDecimalDigits === "number" ? options.secondsDecimalDigits : 1; + const secondsFixed = floorDecimals(seconds, secondsDecimalDigits); + const secondsString = options.keepDecimalsOnWholeSeconds ? secondsFixed : secondsFixed.replace(/\.0+$/, ""); + add(Number.parseFloat(secondsString, 10), "second", "s", secondsString); + } + if (result.length === 0) { + return "0" + (options.verbose ? " milliseconds" : "ms"); + } + if (options.compact) { + return result[0]; + } + if (typeof options.unitCount === "number") { + const separator = options.colonNotation ? "" : " "; + return result.slice(0, Math.max(options.unitCount, 1)).join(separator); + } + return options.colonNotation ? result.join("") : result.join(" "); + }; + } +}); + +// ../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js +var require_ansi_regex2 = __commonJS({ + "../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(exports2, module2) { + "use strict"; + module2.exports = ({ onlyFirst = false } = {}) => { + const pattern = [ + "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", + "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))" + ].join("|"); + return new RegExp(pattern, onlyFirst ? void 0 : "g"); + }; + } +}); + +// ../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js +var require_strip_ansi = __commonJS({ + "../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(exports2, module2) { + "use strict"; + var ansiRegex = require_ansi_regex2(); + module2.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string; + } +}); + +// ../default-reporter/lib/reporterForClient/reportLifecycleScripts.js +var require_reportLifecycleScripts = __commonJS({ + "../default-reporter/lib/reporterForClient/reportLifecycleScripts.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var chalk_1 = __importDefault(require_source()); + var pretty_ms_1 = __importDefault(require_pretty_ms()); + var strip_ansi_1 = __importDefault(require_strip_ansi()); + var constants_1 = require_constants2(); + var formatPrefix_1 = __importStar2(require_formatPrefix()); + var outputConstants_1 = require_outputConstants(); + var NODE_MODULES = `${path_1.default.sep}node_modules${path_1.default.sep}`; + var colorWheel = ["cyan", "magenta", "blue", "yellow", "green", "red"]; + var NUM_COLORS = colorWheel.length; + var currentColor = 0; + exports2.default = (log$, opts) => { + if (opts.appendOnly) { + const streamLifecycleOutput2 = createStreamLifecycleOutput(opts.cwd); + return log$.lifecycle.pipe(operators_1.map((log2) => Rx.of({ + msg: streamLifecycleOutput2(log2) + }))); + } + const lifecycleMessages = {}; + const lifecycleStreamByDepPath = {}; + const lifecyclePushStream = new Rx.Subject(); + log$.lifecycle.forEach((log2) => { + const key = `${log2.stage}:${log2.depPath}`; + lifecycleMessages[key] = lifecycleMessages[key] || { + collapsed: log2.wd.includes(NODE_MODULES), + output: [], + startTime: process.hrtime(), + status: formatIndentedStatus(chalk_1.default.magentaBright("Running...")) + }; + const exit = typeof log2["exitCode"] === "number"; + let msg; + if (lifecycleMessages[key].collapsed) { + msg = renderCollapsedScriptOutput(log2, lifecycleMessages[key], { cwd: opts.cwd, exit, maxWidth: opts.width }); + } else { + msg = renderScriptOutput(log2, lifecycleMessages[key], { cwd: opts.cwd, exit, maxWidth: opts.width }); + } + if (exit) { + delete lifecycleMessages[key]; + } + if (!lifecycleStreamByDepPath[key]) { + lifecycleStreamByDepPath[key] = new Rx.Subject(); + lifecyclePushStream.next(Rx.from(lifecycleStreamByDepPath[key])); + } + lifecycleStreamByDepPath[key].next({ msg }); + if (exit) { + lifecycleStreamByDepPath[key].complete(); + } + }); + return Rx.from(lifecyclePushStream); + }; + function toNano(time) { + return (time[0] + time[1] / 1e9) * 1e3; + } + function renderCollapsedScriptOutput(log2, messageCache, opts) { + var _a; + messageCache.label = (_a = messageCache.label) !== null && _a !== void 0 ? _a : `${highlightLastFolder(formatPrefix_1.formatPrefixNoTrim(opts.cwd, log2.wd))}: Running ${log2.stage} script`; + if (!opts.exit) { + updateMessageCache(log2, messageCache, opts); + return `${messageCache.label}...`; + } + const time = pretty_ms_1.default(toNano(process.hrtime(messageCache.startTime))); + if (log2["exitCode"] === 0) { + return `${messageCache.label}, done in ${time}`; + } + if (log2["optional"] === true) { + return `${messageCache.label}, failed in ${time} (skipped as optional)`; + } + return `${messageCache.label}, failed in ${time}${constants_1.EOL}${renderScriptOutput(log2, messageCache, opts)}`; + } + function renderScriptOutput(log2, messageCache, opts) { + updateMessageCache(log2, messageCache, opts); + if (opts.exit && log2["exitCode"] !== 0) { + return [ + messageCache.script, + ...messageCache.output, + messageCache.status + ].join(constants_1.EOL); + } + if (messageCache.output.length > 10) { + return [ + messageCache.script, + `[${messageCache.output.length - 10} lines collapsed]`, + ...messageCache.output.slice(messageCache.output.length - 10), + messageCache.status + ].join(constants_1.EOL); + } + return [ + messageCache.script, + ...messageCache.output, + messageCache.status + ].join(constants_1.EOL); + } + function updateMessageCache(log2, messageCache, opts) { + if (log2["script"]) { + const prefix = `${formatPrefix_1.default(opts.cwd, log2.wd)} ${outputConstants_1.hlValue(log2.stage)}`; + const maxLineWidth = opts.maxWidth - prefix.length - 2 + ANSI_ESCAPES_LENGTH_OF_PREFIX; + messageCache.script = `${prefix}$ ${cutLine(log2["script"], maxLineWidth)}`; + } else if (opts.exit) { + const time = pretty_ms_1.default(toNano(process.hrtime(messageCache.startTime))); + if (log2["exitCode"] === 0) { + messageCache.status = formatIndentedStatus(chalk_1.default.magentaBright(`Done in ${time}`)); + } else { + messageCache.status = formatIndentedStatus(chalk_1.default.red(`Failed in ${time}`)); + } + } else { + messageCache.output.push(formatIndentedOutput(opts.maxWidth, log2)); + } + } + function formatIndentedStatus(status) { + return `${chalk_1.default.magentaBright("\u2514\u2500")} ${status}`; + } + function highlightLastFolder(p) { + const lastSlash = p.lastIndexOf("/") + 1; + return `${chalk_1.default.gray(p.substr(0, lastSlash))}${p.substr(lastSlash)}`; + } + var ANSI_ESCAPES_LENGTH_OF_PREFIX = outputConstants_1.hlValue(" ").length - 1; + function createStreamLifecycleOutput(cwd) { + currentColor = 0; + const colorByPrefix = new Map(); + return streamLifecycleOutput.bind(null, colorByPrefix, cwd); + } + function streamLifecycleOutput(colorByPkg, cwd, logObj) { + const prefix = formatLifecycleScriptPrefix(colorByPkg, cwd, logObj.wd, logObj.stage); + if (typeof logObj["exitCode"] === "number") { + if (logObj["exitCode"] === 0) { + return `${prefix}: Done`; + } else { + return `${prefix}: Failed`; + } + } + if (logObj["script"]) { + return `${prefix}$ ${logObj["script"]}`; + } + const line = formatLine(Infinity, logObj); + return `${prefix}: ${line}`; + } + function formatIndentedOutput(maxWidth, logObj) { + return `${chalk_1.default.magentaBright("\u2502")} ${formatLine(maxWidth - 2, logObj)}`; + } + function formatLifecycleScriptPrefix(colorByPkg, cwd, wd, stage) { + if (!colorByPkg.has(wd)) { + const colorName = colorWheel[currentColor % NUM_COLORS]; + colorByPkg.set(wd, chalk_1.default[colorName]); + currentColor += 1; + } + const color = colorByPkg.get(wd); + return `${color(formatPrefix_1.default(cwd, wd))} ${outputConstants_1.hlValue(stage)}`; + } + function formatLine(maxWidth, logObj) { + const line = cutLine(logObj["line"], maxWidth); + if (logObj["stdio"] === "stderr") { + return chalk_1.default.gray(line); + } + return line; + } + function cutLine(line, maxLength) { + return strip_ansi_1.default(line).substr(0, maxLength); + } + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_curry2.js +var require_curry2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_curry2.js"(exports2, module2) { + var _curry1 = require_curry1(); + var _isPlaceholder = require_isPlaceholder(); + function _curry2(fn2) { + return function f2(a, b) { + switch (arguments.length) { + case 0: + return f2; + case 1: + return _isPlaceholder(a) ? f2 : _curry1(function(_b) { + return fn2(a, _b); + }); + default: + return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function(_a) { + return fn2(_a, b); + }) : _isPlaceholder(b) ? _curry1(function(_b) { + return fn2(a, _b); + }) : fn2(a, b); + } + }; + } + module2.exports = _curry2; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_arrayFromIterator.js +var require_arrayFromIterator = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_arrayFromIterator.js"(exports2, module2) { + function _arrayFromIterator(iter) { + var list = []; + var next; + while (!(next = iter.next()).done) { + list.push(next.value); + } + return list; + } + module2.exports = _arrayFromIterator; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_includesWith.js +var require_includesWith = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_includesWith.js"(exports2, module2) { + function _includesWith(pred, x, list) { + var idx = 0; + var len = list.length; + while (idx < len) { + if (pred(x, list[idx])) { + return true; + } + idx += 1; + } + return false; + } + module2.exports = _includesWith; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_functionName.js +var require_functionName = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_functionName.js"(exports2, module2) { + function _functionName(f) { + var match = String(f).match(/^function (\w*)/); + return match == null ? "" : match[1]; + } + module2.exports = _functionName; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_has.js +var require_has = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_has.js"(exports2, module2) { + function _has(prop, obj) { + return Object.prototype.hasOwnProperty.call(obj, prop); + } + module2.exports = _has; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_objectIs.js +var require_objectIs = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_objectIs.js"(exports2, module2) { + function _objectIs(a, b) { + if (a === b) { + return a !== 0 || 1 / a === 1 / b; + } else { + return a !== a && b !== b; + } + } + module2.exports = typeof Object.is === "function" ? Object.is : _objectIs; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isArguments.js +var require_isArguments = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isArguments.js"(exports2, module2) { + var _has = require_has(); + var toString = Object.prototype.toString; + var _isArguments = /* @__PURE__ */ function() { + return toString.call(arguments) === "[object Arguments]" ? function _isArguments2(x) { + return toString.call(x) === "[object Arguments]"; + } : function _isArguments2(x) { + return _has("callee", x); + }; + }(); + module2.exports = _isArguments; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/keys.js +var require_keys = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/keys.js"(exports2, module2) { + var _curry1 = require_curry1(); + var _has = require_has(); + var _isArguments = require_isArguments(); + var hasEnumBug = !/* @__PURE__ */ { + toString: null + }.propertyIsEnumerable("toString"); + var nonEnumerableProps = ["constructor", "valueOf", "isPrototypeOf", "toString", "propertyIsEnumerable", "hasOwnProperty", "toLocaleString"]; + var hasArgsEnumBug = /* @__PURE__ */ function() { + "use strict"; + return arguments.propertyIsEnumerable("length"); + }(); + var contains = function contains2(list, item) { + var idx = 0; + while (idx < list.length) { + if (list[idx] === item) { + return true; + } + idx += 1; + } + return false; + }; + var keys = typeof Object.keys === "function" && !hasArgsEnumBug ? /* @__PURE__ */ _curry1(function keys2(obj) { + return Object(obj) !== obj ? [] : Object.keys(obj); + }) : /* @__PURE__ */ _curry1(function keys2(obj) { + if (Object(obj) !== obj) { + return []; + } + var prop, nIdx; + var ks = []; + var checkArgsLength = hasArgsEnumBug && _isArguments(obj); + for (prop in obj) { + if (_has(prop, obj) && (!checkArgsLength || prop !== "length")) { + ks[ks.length] = prop; + } + } + if (hasEnumBug) { + nIdx = nonEnumerableProps.length - 1; + while (nIdx >= 0) { + prop = nonEnumerableProps[nIdx]; + if (_has(prop, obj) && !contains(ks, prop)) { + ks[ks.length] = prop; + } + nIdx -= 1; + } + } + return ks; + }); + module2.exports = keys; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/type.js +var require_type = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/type.js"(exports2, module2) { + var _curry1 = require_curry1(); + var type = /* @__PURE__ */ _curry1(function type2(val) { + return val === null ? "Null" : val === void 0 ? "Undefined" : Object.prototype.toString.call(val).slice(8, -1); + }); + module2.exports = type; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_equals.js +var require_equals = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_equals.js"(exports2, module2) { + var _arrayFromIterator = require_arrayFromIterator(); + var _includesWith = require_includesWith(); + var _functionName = require_functionName(); + var _has = require_has(); + var _objectIs = require_objectIs(); + var keys = require_keys(); + var type = require_type(); + function _uniqContentEquals(aIterator, bIterator, stackA, stackB) { + var a = _arrayFromIterator(aIterator); + var b = _arrayFromIterator(bIterator); + function eq(_a, _b) { + return _equals(_a, _b, stackA.slice(), stackB.slice()); + } + return !_includesWith(function(b2, aItem) { + return !_includesWith(eq, aItem, b2); + }, b, a); + } + function _equals(a, b, stackA, stackB) { + if (_objectIs(a, b)) { + return true; + } + var typeA = type(a); + if (typeA !== type(b)) { + return false; + } + if (a == null || b == null) { + return false; + } + if (typeof a["fantasy-land/equals"] === "function" || typeof b["fantasy-land/equals"] === "function") { + return typeof a["fantasy-land/equals"] === "function" && a["fantasy-land/equals"](b) && typeof b["fantasy-land/equals"] === "function" && b["fantasy-land/equals"](a); + } + if (typeof a.equals === "function" || typeof b.equals === "function") { + return typeof a.equals === "function" && a.equals(b) && typeof b.equals === "function" && b.equals(a); + } + switch (typeA) { + case "Arguments": + case "Array": + case "Object": + if (typeof a.constructor === "function" && _functionName(a.constructor) === "Promise") { + return a === b; + } + break; + case "Boolean": + case "Number": + case "String": + if (!(typeof a === typeof b && _objectIs(a.valueOf(), b.valueOf()))) { + return false; + } + break; + case "Date": + if (!_objectIs(a.valueOf(), b.valueOf())) { + return false; + } + break; + case "Error": + return a.name === b.name && a.message === b.message; + case "RegExp": + if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) { + return false; + } + break; + } + var idx = stackA.length - 1; + while (idx >= 0) { + if (stackA[idx] === a) { + return stackB[idx] === b; + } + idx -= 1; + } + switch (typeA) { + case "Map": + if (a.size !== b.size) { + return false; + } + return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b])); + case "Set": + if (a.size !== b.size) { + return false; + } + return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b])); + case "Arguments": + case "Array": + case "Object": + case "Boolean": + case "Number": + case "String": + case "Date": + case "Error": + case "RegExp": + case "Int8Array": + case "Uint8Array": + case "Uint8ClampedArray": + case "Int16Array": + case "Uint16Array": + case "Int32Array": + case "Uint32Array": + case "Float32Array": + case "Float64Array": + case "ArrayBuffer": + break; + default: + return false; + } + var keysA = keys(a); + if (keysA.length !== keys(b).length) { + return false; + } + var extendedStackA = stackA.concat([a]); + var extendedStackB = stackB.concat([b]); + idx = keysA.length - 1; + while (idx >= 0) { + var key = keysA[idx]; + if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) { + return false; + } + idx -= 1; + } + return true; + } + module2.exports = _equals; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/equals.js +var require_equals2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/equals.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _equals = require_equals(); + var equals = /* @__PURE__ */ _curry2(function equals2(a, b) { + return _equals(a, b, [], []); + }); + module2.exports = equals; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64.js +var require_base64 = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64.js"(exports2) { + var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""); + exports2.encode = function(number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + exports2.decode = function(charCode) { + var bigA = 65; + var bigZ = 90; + var littleA = 97; + var littleZ = 122; + var zero = 48; + var nine = 57; + var plus = 43; + var slash = 47; + var littleOffset = 26; + var numberOffset = 52; + if (bigA <= charCode && charCode <= bigZ) { + return charCode - bigA; + } + if (littleA <= charCode && charCode <= littleZ) { + return charCode - littleA + littleOffset; + } + if (zero <= charCode && charCode <= nine) { + return charCode - zero + numberOffset; + } + if (charCode == plus) { + return 62; + } + if (charCode == slash) { + return 63; + } + return -1; + }; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64-vlq.js +var require_base64_vlq = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64-vlq.js"(exports2) { + var base64 = require_base64(); + var VLQ_BASE_SHIFT = 5; + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + var VLQ_BASE_MASK = VLQ_BASE - 1; + var VLQ_CONTINUATION_BIT = VLQ_BASE; + function toVLQSigned(aValue) { + return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0; + } + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative ? -shifted : shifted; + } + exports2.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + var vlq = toVLQSigned(aValue); + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + return encoded; + }; + exports2.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/util.js +var require_util3 = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/util.js"(exports2) { + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports2.getArg = getArg; + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports2.urlParse = urlParse; + function urlGenerate(aParsedUrl) { + var url = ""; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ":"; + } + url += "//"; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + "@"; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port; + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports2.urlGenerate = urlGenerate; + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports2.isAbsolute(path); + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === ".") { + parts.splice(i, 1); + } else if (part === "..") { + up++; + } else if (up > 0) { + if (part === "") { + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join("/"); + if (path === "") { + path = isAbsolute ? "/" : "."; + } + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports2.normalize = normalize; + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || "/"; + } + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + var joined = aPath.charAt(0) === "/" ? aPath : normalize(aRoot.replace(/\/+$/, "") + "/" + aPath); + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports2.join = join; + exports2.isAbsolute = function(aPath) { + return aPath.charAt(0) === "/" || urlRegexp.test(aPath); + }; + function relative2(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + aRoot = aRoot.replace(/\/$/, ""); + var level = 0; + while (aPath.indexOf(aRoot + "/") !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + ++level; + } + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports2.relative = relative2; + var supportsNullProto = function() { + var obj = Object.create(null); + return !("__proto__" in obj); + }(); + function identity(s) { + return s; + } + function toSetString(aStr) { + if (isProtoString(aStr)) { + return "$" + aStr; + } + return aStr; + } + exports2.toSetString = supportsNullProto ? identity : toSetString; + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + return aStr; + } + exports2.fromSetString = supportsNullProto ? identity : fromSetString; + function isProtoString(s) { + if (!s) { + return false; + } + var length = s.length; + if (length < 9) { + return false; + } + if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) { + return false; + } + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36) { + return false; + } + } + return true; + } + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + return strcmp(mappingA.name, mappingB.name); + } + exports2.compareByOriginalPositions = compareByOriginalPositions; + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + return strcmp(mappingA.name, mappingB.name); + } + exports2.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + if (aStr1 === null) { + return 1; + } + if (aStr2 === null) { + return -1; + } + if (aStr1 > aStr2) { + return 1; + } + return -1; + } + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + return strcmp(mappingA.name, mappingB.name); + } + exports2.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, "")); + } + exports2.parseSourceMapInput = parseSourceMapInput; + function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ""; + if (sourceRoot) { + if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/") { + sourceRoot += "/"; + } + sourceURL = sourceRoot + sourceURL; + } + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + var index = parsed.path.lastIndexOf("/"); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + return normalize(sourceURL); + } + exports2.computeSourceURL = computeSourceURL; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/array-set.js +var require_array_set = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/array-set.js"(exports2) { + var util = require_util3(); + var has = Object.prototype.hasOwnProperty; + var hasNativeMap = typeof Map !== "undefined"; + function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); + } + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; + }; + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } + }; + ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } + }; + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + throw new Error('"' + aStr + '" is not in the set.'); + }; + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error("No element indexed by " + aIdx); + }; + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + exports2.ArraySet = ArraySet; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/mapping-list.js +var require_mapping_list = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/mapping-list.js"(exports2) { + var util = require_util3(); + function generatedPositionAfter(mappingA, mappingB) { + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + function MappingList() { + this._array = []; + this._sorted = true; + this._last = { generatedLine: -1, generatedColumn: 0 }; + } + MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + exports2.MappingList = MappingList; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-generator.js +var require_source_map_generator = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-generator.js"(exports2) { + var base64VLQ = require_base64_vlq(); + var util = require_util3(); + var ArraySet = require_array_set().ArraySet; + var MappingList = require_mapping_list().MappingList; + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, "file", null); + this._sourceRoot = util.getArg(aArgs, "sourceRoot", null); + this._skipValidation = util.getArg(aArgs, "skipValidation", false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + SourceMapGenerator.prototype._version = 3; + SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot + }); + aSourceMapConsumer.eachMapping(function(mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function(sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util.relative(sourceRoot, sourceFile); + } + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, "generated"); + var original = util.getArg(aArgs, "original", null); + var source = util.getArg(aArgs, "source", null); + var name = util.getArg(aArgs, "name", null); + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source, + name + }); + }; + SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + if (aSourceContent != null) { + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + var newSources = new ArraySet(); + var newNames = new ArraySet(); + this._mappings.unsortedForEach(function(mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source); + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + }, this); + this._sources = newSources; + this._names = newNames; + aSourceMapConsumer.sources.forEach(function(sourceFile2) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile2); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile2 = util.join(aSourceMapPath, sourceFile2); + } + if (sourceRoot != null) { + sourceFile2 = util.relative(sourceRoot, sourceFile2); + } + this.setSourceContent(sourceFile2, content); + } + }, this); + }; + SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) { + if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") { + throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values."); + } + if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) { + return; + } else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) { + return; + } else { + throw new Error("Invalid mapping: " + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ""; + var next; + var mapping; + var nameIdx; + var sourceIdx; + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = ""; + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ";"; + previousGeneratedLine++; + } + } else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ","; + } + } + next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + result += next; + } + return result; + }; + SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function(source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null; + }, this); + }; + SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + return map; + }; + SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + exports2.SourceMapGenerator = SourceMapGenerator; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/binary-search.js +var require_binary_search = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/binary-search.js"(exports2) { + exports2.GREATEST_LOWER_BOUND = 1; + exports2.LEAST_UPPER_BOUND = 2; + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + return mid; + } else if (cmp > 0) { + if (aHigh - mid > 1) { + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + if (aBias == exports2.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } else { + if (mid - aLow > 1) { + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + if (aBias == exports2.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + exports2.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports2.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + return index; + }; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/quick-sort.js +var require_quick_sort = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/quick-sort.js"(exports2) { + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + function randomIntInRange(low, high) { + return Math.round(low + Math.random() * (high - low)); + } + function doQuickSort(ary, comparator, p, r) { + if (p < r) { + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + swap(ary, pivotIndex, r); + var pivot = ary[r]; + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + swap(ary, i + 1, j); + var q = i + 1; + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + exports2.quickSort = function(ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-consumer.js +var require_source_map_consumer = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-consumer.js"(exports2) { + var util = require_util3(); + var binarySearch = require_binary_search(); + var ArraySet = require_array_set().ArraySet; + var base64VLQ = require_base64_vlq(); + var quickSort = require_quick_sort().quickSort; + function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === "string") { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); + } + SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); + }; + SourceMapConsumer.prototype._version = 3; + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, "_generatedMappings", { + configurable: true, + enumerable: true, + get: function() { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + return this.__generatedMappings; + } + }); + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, "_originalMappings", { + configurable: true, + enumerable: true, + get: function() { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + return this.__originalMappings; + } + }); + SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + var sourceRoot = this.sourceRoot; + mappings.map(function(mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); + return { + source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, "line"); + var needle = { + source: util.getArg(aArgs, "source"), + originalLine: line, + originalColumn: util.getArg(aArgs, "column", 0) + }; + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + var mappings = []; + var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + if (aArgs.column === void 0) { + var originalLine = mapping.originalLine; + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, "generatedLine", null), + column: util.getArg(mapping, "generatedColumn", null), + lastColumn: util.getArg(mapping, "lastGeneratedColumn", null) + }); + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, "generatedLine", null), + column: util.getArg(mapping, "generatedColumn", null), + lastColumn: util.getArg(mapping, "lastGeneratedColumn", null) + }); + mapping = this._originalMappings[++index]; + } + } + } + return mappings; + }; + exports2.SourceMapConsumer = SourceMapConsumer; + function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === "string") { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + var version = util.getArg(sourceMap, "version"); + var sources = util.getArg(sourceMap, "sources"); + var names = util.getArg(sourceMap, "names", []); + var sourceRoot = util.getArg(sourceMap, "sourceRoot", null); + var sourcesContent = util.getArg(sourceMap, "sourcesContent", null); + var mappings = util.getArg(sourceMap, "mappings"); + var file = util.getArg(sourceMap, "file", null); + if (version != this._version) { + throw new Error("Unsupported version: " + version); + } + if (sourceRoot) { + sourceRoot = util.normalize(sourceRoot); + } + sources = sources.map(String).map(util.normalize).map(function(source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source; + }); + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + this._absoluteSources = this._sources.toArray().map(function(s) { + return util.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; + } + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + return -1; + }; + BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function(s) { + return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping(); + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + destOriginalMappings.push(destMapping); + } + destGeneratedMappings.push(destMapping); + } + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + return smc; + }; + BasicSourceMapConsumer.prototype._version = 3; + Object.defineProperty(BasicSourceMapConsumer.prototype, "sources", { + get: function() { + return this._absoluteSources.slice(); + } + }); + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + while (index < length) { + if (aStr.charAt(index) === ";") { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } else if (aStr.charAt(index) === ",") { + index++; + } else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + if (segment.length === 2) { + throw new Error("Found a source, but no line and column"); + } + if (segment.length === 3) { + throw new Error("Found a source and line, but no column"); + } + cachedSegments[str] = segment; + } + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + if (segment.length > 1) { + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + mapping.originalLine += 1; + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + if (segment.length > 4) { + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + generatedMappings.push(mapping); + if (typeof mapping.originalLine === "number") { + originalMappings.push(mapping); + } + } + } + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) { + if (aNeedle[aLineName] <= 0) { + throw new TypeError("Line must be greater than or equal to 1, got " + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError("Column must be greater than or equal to 0, got " + aNeedle[aColumnName]); + } + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + mapping.lastGeneratedColumn = Infinity; + } + }; + BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, "line"), + generatedColumn: util.getArg(aArgs, "column") + }; + var index = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util.compareByGeneratedPositionsDeflated, util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)); + if (index >= 0) { + var mapping = this._generatedMappings[index]; + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, "source", null); + if (source !== null) { + source = this._sources.at(source); + source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util.getArg(mapping, "name", null); + if (name !== null) { + name = this._names.at(name); + } + return { + source, + line: util.getArg(mapping, "originalLine", null), + column: util.getArg(mapping, "originalColumn", null), + name + }; + } + } + return { + source: null, + line: null, + column: null, + name: null + }; + }; + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) { + return sc == null; + }); + }; + BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + var url; + if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) { + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]; + } + if ((!url.path || url.path == "/") && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + if (nullOnMissing) { + return null; + } else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, "source"); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + var needle = { + source, + originalLine: util.getArg(aArgs, "line"), + originalColumn: util.getArg(aArgs, "column") + }; + var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)); + if (index >= 0) { + var mapping = this._originalMappings[index]; + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, "generatedLine", null), + column: util.getArg(mapping, "generatedColumn", null), + lastColumn: util.getArg(mapping, "lastGeneratedColumn", null) + }; + } + } + return { + line: null, + column: null, + lastColumn: null + }; + }; + exports2.BasicSourceMapConsumer = BasicSourceMapConsumer; + function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === "string") { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + var version = util.getArg(sourceMap, "version"); + var sections = util.getArg(sourceMap, "sections"); + if (version != this._version) { + throw new Error("Unsupported version: " + version); + } + this._sources = new ArraySet(); + this._names = new ArraySet(); + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function(s) { + if (s.url) { + throw new Error("Support for url field in sections not implemented."); + } + var offset = util.getArg(s, "offset"); + var offsetLine = util.getArg(offset, "line"); + var offsetColumn = util.getArg(offset, "column"); + if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) { + throw new Error("Section offsets must be ordered and non-overlapping."); + } + lastOffset = offset; + return { + generatedOffset: { + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, "map"), aSourceMapURL) + }; + }); + } + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + IndexedSourceMapConsumer.prototype._version = 3; + Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", { + get: function() { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, "line"), + generatedColumn: util.getArg(aArgs, "column") + }; + var sectionIndex = binarySearch.search(needle, this._sections, function(needle2, section2) { + var cmp = needle2.generatedLine - section2.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + return needle2.generatedColumn - section2.generatedOffset.generatedColumn; + }); + var section = this._sections[sectionIndex]; + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + return section.consumer.originalPositionFor({ + line: needle.generatedLine - (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0), + bias: aArgs.bias + }); + }; + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function(s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + if (section.consumer._findSourceIndex(util.getArg(aArgs, "source")) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0) + }; + return ret; + } + } + return { + line: null, + column: null + }; + }; + IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + var source = section.consumer._sources.at(mapping.source); + source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + this._sources.add(source); + source = this._sources.indexOf(source); + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + var adjustedMapping = { + source, + generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name + }; + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === "number") { + this.__originalMappings.push(adjustedMapping); + } + } + } + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + exports2.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-node.js +var require_source_node = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-node.js"(exports2) { + var SourceMapGenerator = require_source_map_generator().SourceMapGenerator; + var util = require_util3(); + var REGEX_NEWLINE = /(\r?\n)/; + var NEWLINE_CODE = 10; + var isSourceNode = "$$$isSourceNode$$$"; + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) + this.add(aChunks); + } + SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + var node = new SourceNode(); + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + var newLine = getNextLine() || ""; + return lineContents + newLine; + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : void 0; + } + }; + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + var lastMapping = null; + aSourceMapConsumer.eachMapping(function(mapping) { + if (lastMapping !== null) { + if (lastGeneratedLine < mapping.generatedLine) { + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + } else { + var nextLine = remainingLines[remainingLinesIndex] || ""; + var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + lastMapping = mapping; + return; + } + } + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ""; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + addMappingWithCode(lastMapping, shiftNextLine()); + } + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + aSourceMapConsumer.sources.forEach(function(sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + return node; + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === void 0) { + node.add(code); + } else { + var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source; + node.add(new SourceNode(mapping.originalLine, mapping.originalColumn, source, code, mapping.name)); + } + } + }; + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function(chunk) { + this.add(chunk); + }, this); + } else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } else { + throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk); + } + return this; + }; + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length - 1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } else { + throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk); + } + return this; + }; + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } else { + if (chunk !== "") { + aFn(chunk, { + source: this.source, + line: this.line, + column: this.column, + name: this.name + }); + } + } + } + }; + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len - 1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } else if (typeof lastChild === "string") { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } else { + this.children.push("".replace(aPattern, aReplacement)); + } + return this; + }; + SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function(chunk) { + str += chunk; + }); + return str; + }; + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function(chunk, original) { + generated.code += chunk; + if (original.source !== null && original.line !== null && original.column !== null) { + if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function(sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + return { code: generated.code, map }; + }; + exports2.SourceNode = SourceNode; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/source-map.js +var require_source_map = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/source-map.js"(exports2) { + exports2.SourceMapGenerator = require_source_map_generator().SourceMapGenerator; + exports2.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer; + exports2.SourceNode = require_source_node().SourceNode; + } +}); + +// ../../node_modules/.pnpm/get-source@1.0.42/node_modules/get-source/impl/path.js +var require_path = __commonJS({ + "../../node_modules/.pnpm/get-source@1.0.42/node_modules/get-source/impl/path.js"(exports2, module2) { + "use strict"; + var isBrowser = typeof window !== "undefined" && window.window === window && window.navigator; + var cwd = isBrowser ? window.location.href : process.cwd(); + var urlRegexp = new RegExp("^((https|http)://)?[a-z0-9A-Z]{3}.[a-z0-9A-Z][a-z0-9A-Z]{0,61}?[a-z0-9A-Z].com|net|cn|cc (:s[0-9]{1-4})?/$"); + var path = module2.exports = { + concat(a, b) { + const a_endsWithSlash = a[a.length - 1] === "/", b_startsWithSlash = b[0] === "/"; + return a + (a_endsWithSlash || b_startsWithSlash ? "" : "/") + (a_endsWithSlash && b_startsWithSlash ? b.substring(1) : b); + }, + resolve(x) { + if (path.isAbsolute(x)) { + return path.normalize(x); + } + return path.normalize(path.concat(cwd, x)); + }, + normalize(x) { + let output = [], skip = 0; + x.split("/").reverse().filter((x2) => x2 !== ".").forEach((x2) => { + if (x2 === "..") { + skip++; + } else if (skip === 0) { + output.push(x2); + } else { + skip--; + } + }); + const result = output.reverse().join("/"); + return (isBrowser && result[0] === "/" ? window.location.origin : "") + result; + }, + isData: (x) => x.indexOf("data:") === 0, + isURL: (x) => urlRegexp.test(x), + isAbsolute: (x) => x[0] === "/" || /^[^\/]*:/.test(x), + relativeToFile(a, b) { + return path.isData(a) || path.isAbsolute(b) ? path.normalize(b) : path.normalize(path.concat(a.split("/").slice(0, -1).join("/"), b)); + } + }; + } +}); + +// ../../node_modules/.pnpm/data-uri-to-buffer@2.0.2/node_modules/data-uri-to-buffer/index.js +var require_data_uri_to_buffer = __commonJS({ + "../../node_modules/.pnpm/data-uri-to-buffer@2.0.2/node_modules/data-uri-to-buffer/index.js"(exports2, module2) { + "use strict"; + module2.exports = dataUriToBuffer; + function dataUriToBuffer(uri) { + if (!/^data\:/i.test(uri)) { + throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")'); + } + uri = uri.replace(/\r?\n/g, ""); + var firstComma = uri.indexOf(","); + if (firstComma === -1 || firstComma <= 4) { + throw new TypeError("malformed data: URI"); + } + var meta = uri.substring(5, firstComma).split(";"); + var type = meta[0] || "text/plain"; + var typeFull = type; + var base64 = false; + var charset = ""; + for (var i = 1; i < meta.length; i++) { + if (meta[i] == "base64") { + base64 = true; + } else { + typeFull += ";" + meta[i]; + if (meta[i].indexOf("charset=") == 0) { + charset = meta[i].substring(8); + } + } + } + if (!meta[0] && !charset.length) { + typeFull += ";charset=US-ASCII"; + charset = "US-ASCII"; + } + var data = unescape(uri.substring(firstComma + 1)); + var encoding = base64 ? "base64" : "ascii"; + var buffer = Buffer.from ? Buffer.from(data, encoding) : new Buffer(data, encoding); + buffer.type = type; + buffer.typeFull = typeFull; + buffer.charset = charset; + return buffer; + } + } +}); + +// ../../node_modules/.pnpm/get-source@1.0.42/node_modules/get-source/get-source.js +var require_get_source = __commonJS({ + "../../node_modules/.pnpm/get-source@1.0.42/node_modules/get-source/get-source.js"(exports2, module2) { + "use strict"; + var O = Object; + var isBrowser = typeof window !== "undefined" && window.window === window && window.navigator; + var SourceMapConsumer = require_source_map().SourceMapConsumer; + var path = require_path(); + var isURL = path.isURL; + var dataURIToBuffer = require_data_uri_to_buffer(); + var memoize = (f) => { + const m = (x) => x in m.cache ? m.cache[x] : m.cache[x] = f(x); + m.forgetEverything = () => { + m.cache = Object.create(null); + }; + m.cache = Object.create(null); + return m; + }; + var newSourceFileMemoized = memoize((file) => new SourceFile(file)); + var getSource = module2.exports = (file) => { + return newSourceFileMemoized(path.resolve(file)); + }; + getSource.resetCache = () => newSourceFileMemoized.forgetEverything(); + getSource.getCache = () => newSourceFileMemoized.cache; + var SourceMap = class { + constructor(originalFilePath, sourceMapPath) { + this.file = sourceMapPath.startsWith("data:") ? new SourceFile(originalFilePath, dataURIToBuffer(sourceMapPath).toString()) : getSource(path.relativeToFile(originalFilePath, sourceMapPath)); + this.parsed = this.file.text && SourceMapConsumer(JSON.parse(this.file.text)) || null; + this.sourceFor = memoize(this.sourceFor.bind(this)); + } + sourceFor(file) { + const content = this.parsed.sourceContentFor(file, true); + const fullPath = path.relativeToFile(this.file.path, file); + return content ? new SourceFile(fullPath, content) : getSource(fullPath); + } + resolve(loc) { + const originalLoc = this.parsed.originalPositionFor(loc); + return originalLoc.source ? this.sourceFor(originalLoc.source).resolve(O.assign({}, loc, { + line: originalLoc.line, + column: originalLoc.column + 1, + name: originalLoc.name + })) : loc; + } + }; + var SourceFile = class { + constructor(path2, text) { + this.path = path2; + if (text) { + this.text = text; + } else { + try { + if (isBrowser) { + let xhr = new XMLHttpRequest(); + xhr.open("GET", path2, false); + xhr.send(null); + this.text = xhr.responseText; + } else { + this.text = require("fs").readFileSync(path2, { encoding: "utf8" }); + } + } catch (e) { + this.error = e; + this.text = ""; + } + } + } + get lines() { + return this.lines_ = this.lines_ || this.text.split("\n"); + } + get sourceMap() { + try { + if (this.sourceMap_ === void 0) { + const re = /\u0023 sourceMappingURL=(.+)\n?/g; + let lastMatch = void 0; + while (true) { + const match = re.exec(this.text); + if (match) + lastMatch = match; + else + break; + } + const url = lastMatch && lastMatch[1]; + if (url) { + const sourceMap = new SourceMap(this.path, url); + if (sourceMap.parsed) { + this.sourceMap_ = sourceMap; + } + } else { + this.sourceMap_ = null; + } + } + } catch (e) { + this.sourceMap_ = null; + this.sourceMapError = e; + } + return this.sourceMap_; + } + resolve(loc) { + if (this.sourceMap) { + const newLoc = this.sourceMap.resolve(loc); + if (newLoc.sourceFile) + return newLoc; + } + return O.assign({}, loc, { + sourceFile: this, + sourceLine: this.lines[loc.line - 1] || "", + error: this.error + }); + } + }; + } +}); + +// ../../node_modules/.pnpm/stacktracey@1.2.127/node_modules/stacktracey/impl/partition.js +var require_partition3 = __commonJS({ + "../../node_modules/.pnpm/stacktracey@1.2.127/node_modules/stacktracey/impl/partition.js"(exports2, module2) { + "use strict"; + module2.exports = (arr_, pred) => { + const arr = arr_ || [], spans = []; + let span = { + label: void 0, + items: [arr.first] + }; + arr.forEach((x) => { + const label = pred(x); + if (span.label !== label && span.items.length) { + spans.push(span = { label, items: [x] }); + } else { + span.items.push(x); + } + }); + return spans; + }; + } +}); + +// ../../node_modules/.pnpm/printable-characters@1.0.42/node_modules/printable-characters/build/printable-characters.js +var require_printable_characters = __commonJS({ + "../../node_modules/.pnpm/printable-characters@1.0.42/node_modules/printable-characters/build/printable-characters.js"(exports2, module2) { + "use strict"; + var _slicedToArray = function() { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = void 0; + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) + break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) + _i["return"](); + } finally { + if (_d) + throw _e; + } + } + return _arr; + } + return function(arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; + }(); + var ansiEscapeCode = "[\x9B][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]"; + var zeroWidthCharacterExceptNewline = "\0-\b\v-\x9B\xAD\u200B\u2028\u2029\uFEFF\uFE00-\uFE0F"; + var zeroWidthCharacter = "\n" + zeroWidthCharacterExceptNewline; + var zeroWidthCharactersExceptNewline = new RegExp("(?:" + ansiEscapeCode + ")|[" + zeroWidthCharacterExceptNewline + "]", "g"); + var zeroWidthCharacters = new RegExp("(?:" + ansiEscapeCode + ")|[" + zeroWidthCharacter + "]", "g"); + var partition = new RegExp("((?:" + ansiEscapeCode + ")|[ " + zeroWidthCharacter + "])?([^ " + zeroWidthCharacter + "]*)", "g"); + module2.exports = { + zeroWidthCharacters, + ansiEscapeCodes: new RegExp(ansiEscapeCode, "g"), + strlen: (s) => Array.from(s.replace(zeroWidthCharacters, "")).length, + isBlank: (s) => s.replace(zeroWidthCharacters, "").replace(/\s/g, "").length === 0, + blank: (s) => Array.from(s.replace(zeroWidthCharactersExceptNewline, "")).map((x) => x === " " || x === "\n" ? x : " ").join(""), + partition(s) { + for (var m, spans = []; partition.lastIndex !== s.length && (m = partition.exec(s)); ) { + spans.push([m[1] || "", m[2]]); + } + partition.lastIndex = 0; + return spans; + }, + first(s, n) { + let result = "", length = 0; + for (const _ref of module2.exports.partition(s)) { + var _ref2 = _slicedToArray(_ref, 2); + const nonPrintable = _ref2[0]; + const printable = _ref2[1]; + const text = Array.from(printable).slice(0, n - length); + result += nonPrintable + text.join(""); + length += text.length; + } + return result; + } + }; + } +}); + +// ../../node_modules/.pnpm/as-table@1.0.55/node_modules/as-table/build/as-table.js +var require_as_table = __commonJS({ + "../../node_modules/.pnpm/as-table@1.0.55/node_modules/as-table/build/as-table.js"(exports2, module2) { + "use strict"; + function _toConsumableArray(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) + arr2[i] = arr[i]; + return arr2; + } else { + return Array.from(arr); + } + } + var O = Object; + var _require = require_printable_characters(); + var first = _require.first; + var strlen = _require.strlen; + var limit = (s, n) => first(s, n - 1) + "\u2026"; + var asColumns = (rows, cfg_) => { + const zip = (arrs, f) => arrs.reduce((a, b) => b.map((b2, i) => [].concat(_toConsumableArray(a[i] || []), [b2])), []).map((args2) => f.apply(void 0, _toConsumableArray(args2))), cells = rows.map((r) => r.map((c) => c.replace(/\n/g, "\\n"))), cellWidths = cells.map((r) => r.map(strlen)), maxWidths = zip(cellWidths, Math.max), cfg = O.assign({ + delimiter: " ", + minColumnWidths: maxWidths.map((x) => 0), + maxTotalWidth: 0 + }, cfg_), delimiterLength = strlen(cfg.delimiter), totalWidth = maxWidths.reduce((a, b) => a + b, 0), relativeWidths = maxWidths.map((w) => w / totalWidth), maxTotalWidth = cfg.maxTotalWidth - delimiterLength * (maxWidths.length - 1), excessWidth = Math.max(0, totalWidth - maxTotalWidth), computedWidths = zip([cfg.minColumnWidths, maxWidths, relativeWidths], (min, max, relative2) => Math.max(min, Math.floor(max - excessWidth * relative2))), restCellWidths = cellWidths.map((widths) => zip([computedWidths, widths], (a, b) => a - b)); + return zip([cells, restCellWidths], (a, b) => zip([a, b], (str, w) => w >= 0 ? cfg.right ? " ".repeat(w) + str : str + " ".repeat(w) : limit(str, strlen(str) + w)).join(cfg.delimiter)); + }; + var asTable = (cfg) => O.assign((arr) => { + var _ref; + if (arr[0] && Array.isArray(arr[0])) { + return asColumns(arr.map((r) => r.map((c, i) => c === void 0 ? "" : cfg.print(c, i))), cfg).join("\n"); + } + const colNames = [].concat(_toConsumableArray(new Set((_ref = []).concat.apply(_ref, _toConsumableArray(arr.map(O.keys)))))), columns = [colNames.map(cfg.title)].concat(_toConsumableArray(arr.map((o) => colNames.map((key) => o[key] === void 0 ? "" : cfg.print(o[key], key))))), lines = asColumns(columns, cfg); + return (cfg.dash ? [lines[0], cfg.dash.repeat(strlen(lines[0]))].concat(_toConsumableArray(lines.slice(1))) : lines).join("\n"); + }, cfg, { + configure: (newConfig) => asTable(O.assign({}, cfg, newConfig)) + }); + module2.exports = asTable({ + maxTotalWidth: Number.MAX_SAFE_INTEGER, + print: String, + title: String, + dash: "-", + right: false + }); + } +}); + +// ../../node_modules/.pnpm/stacktracey@1.2.127/node_modules/stacktracey/stacktracey.js +var require_stacktracey = __commonJS({ + "../../node_modules/.pnpm/stacktracey@1.2.127/node_modules/stacktracey/stacktracey.js"(exports2, module2) { + "use strict"; + var O = Object; + var isBrowser = typeof window !== "undefined" && window.window === window && window.navigator; + var lastOf = (x) => x[x.length - 1]; + var getSource = require_get_source(); + var partition = require_partition3(); + var asTable = require_as_table(); + var nixSlashes = (x) => x.replace(/\\/g, "/"); + var pathRoot = isBrowser ? window.location.href : nixSlashes(process.cwd()) + "/"; + var pathToRelative = isBrowser ? (root, full) => full.replace(root, "") : require("path").relative; + var StackTracey = class extends Array { + constructor(input, offset) { + const originalInput = input, isParseableSyntaxError = input && (input instanceof SyntaxError && !isBrowser); + super(); + this.constructor = StackTracey; + this.__proto__ = StackTracey.prototype; + if (!input) { + input = new Error(); + offset = offset === void 0 ? 1 : offset; + } + if (input instanceof Error) { + input = input[StackTracey.stack] || input.stack || ""; + } + if (typeof input === "string") { + input = StackTracey.rawParse(input).slice(offset).map(StackTracey.extractEntryMetadata); + } + if (Array.isArray(input)) { + if (isParseableSyntaxError) { + const rawLines = require("util").inspect(originalInput).split("\n"), fileLine = rawLines[0].split(":"), line = fileLine.pop(), file = fileLine.join(":"); + if (file) { + input.unshift({ + file: nixSlashes(file), + line, + column: (rawLines[2] || "").indexOf("^") + 1, + sourceLine: rawLines[1], + callee: "(syntax error)", + syntaxError: true + }); + } + } + this.length = input.length; + input.forEach((x, i) => this[i] = x); + } + } + static extractEntryMetadata(e) { + const fileRelative = StackTracey.relativePath(e.file || ""); + return O.assign(e, { + calleeShort: e.calleeShort || lastOf((e.callee || "").split(".")), + fileRelative, + fileShort: StackTracey.shortenPath(fileRelative), + fileName: lastOf((e.file || "").split("/")), + thirdParty: StackTracey.isThirdParty(fileRelative) && !e.index + }); + } + static shortenPath(relativePath) { + return relativePath.replace(/^node_modules\//, "").replace(/^webpack\/bootstrap\//, ""); + } + static relativePath(fullPath) { + return nixSlashes(pathToRelative(pathRoot, fullPath)).replace(/^.*\:\/\/?\/?/, ""); + } + static isThirdParty(relativePath) { + return relativePath[0] === "~" || relativePath[0] === "/" || relativePath.indexOf("node_modules") === 0 || relativePath.indexOf("webpack/bootstrap") === 0; + } + static rawParse(str) { + const lines = (str || "").split("\n"); + const entries = lines.map((line) => { + line = line.trim(); + let callee, fileLineColumn = [], native, planA, planB; + if ((planA = line.match(/at (.+) \((.+)\)/)) || line.slice(0, 3) !== "at " && (planA = line.match(/(.*)@(.*)/))) { + callee = planA[1]; + native = planA[2] === "native"; + fileLineColumn = (planA[2].match(/(.*):(.+):(.+)/) || []).slice(1); + } else if (planB = line.match(/^(at\s+)*(.+):([0-9]+):([0-9]+)/)) { + fileLineColumn = planB.slice(2); + } else { + return void 0; + } + if (callee && !fileLineColumn[0]) { + const type = callee.split(".")[0]; + if (type === "Array") { + native = true; + } + } + return { + beforeParse: line, + callee: callee || "", + index: isBrowser && fileLineColumn[0] === window.location.href, + native: native || false, + file: nixSlashes(fileLineColumn[0] || ""), + line: parseInt(fileLineColumn[1] || "", 10) || void 0, + column: parseInt(fileLineColumn[2] || "", 10) || void 0 + }; + }); + return entries.filter((x) => x !== void 0); + } + withSource(i) { + return this[i] && StackTracey.withSource(this[i]); + } + static withSource(loc) { + if (loc.sourceFile || loc.file && loc.file.indexOf("<") >= 0) { + return loc; + } else { + let resolved = getSource(loc.file || "").resolve(loc); + if (!resolved.sourceFile) { + return loc; + } + if (!resolved.sourceFile.error) { + resolved.file = nixSlashes(resolved.sourceFile.path); + resolved = StackTracey.extractEntryMetadata(resolved); + } + if (!resolved.sourceLine.error) { + if (resolved.sourceLine.includes("// @hide")) { + resolved.sourceLine = resolved.sourceLine.replace("// @hide", ""); + resolved.hide = true; + } + if (resolved.sourceLine.includes("__webpack_require__") || resolved.sourceLine.includes("/******/ ({")) { + resolved.thirdParty = true; + } + } + return O.assign({ sourceLine: "" }, loc, resolved); + } + } + get withSources() { + return new StackTracey(this.map(StackTracey.withSource)); + } + get mergeRepeatedLines() { + return new StackTracey(partition(this, (e) => e.file + e.line).map((group) => { + return group.items.slice(1).reduce((memo, entry) => { + memo.callee = (memo.callee || "") + " \u2192 " + (entry.callee || ""); + memo.calleeShort = (memo.calleeShort || "") + " \u2192 " + (entry.calleeShort || ""); + return memo; + }, O.assign({}, group.items[0])); + })); + } + get clean() { + return this.withSources.mergeRepeatedLines.filter((e, i) => i === 0 || !(e.thirdParty || e.hide || e.native)); + } + at(i) { + return O.assign({ + beforeParse: "", + callee: "", + index: false, + native: false, + file: "", + line: 0, + column: 0 + }, this[i]); + } + static locationsEqual(a, b) { + return a.file === b.file && a.line === b.line && a.column === b.column; + } + get pretty() { + const trimEnd = (s, n) => s && (s.length > n ? s.slice(0, n - 1) + "\u2026" : s); + const trimStart = (s, n) => s && (s.length > n ? "\u2026" + s.slice(-(n - 1)) : s); + return asTable(this.withSources.map((e) => [ + "at " + trimEnd(e.calleeShort, StackTracey.maxColumnWidths.callee), + trimStart(e.fileShort && e.fileShort + ":" + e.line || "", StackTracey.maxColumnWidths.file), + trimEnd((e.sourceLine || "").trim() || "", StackTracey.maxColumnWidths.sourceLine) + ])); + } + static resetCache() { + getSource.resetCache(); + } + }; + StackTracey.maxColumnWidths = { + callee: 30, + file: 60, + sourceLine: 80 + }; + (() => { + const methods = { + include(pred) { + const f = StackTracey.isThirdParty; + O.assign(StackTracey.isThirdParty = (path) => f(path) || pred(path), methods); + }, + except(pred) { + const f = StackTracey.isThirdParty; + O.assign(StackTracey.isThirdParty = (path) => f(path) && !pred(path), methods); + } + }; + O.assign(StackTracey.isThirdParty, methods); + })(); + ["map", "filter", "slice", "concat", "reverse"].forEach((name) => { + StackTracey.prototype[name] = function() { + const arr = Array.from(this); + return new StackTracey(arr[name].apply(arr, arguments)); + }; + }); + StackTracey.stack = typeof Symbol !== "undefined" ? Symbol.for("StackTracey") : "__StackTracey"; + module2.exports = StackTracey; + } +}); + +// ../default-reporter/lib/reportError.js +var require_reportError = __commonJS({ + "../default-reporter/lib/reportError.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var chalk_1 = __importDefault(require_source()); + var equals_1 = __importDefault(require_equals2()); + var stacktracey_1 = __importDefault(require_stacktracey()); + var constants_1 = require_constants2(); + stacktracey_1.default.maxColumnWidths = { + callee: 25, + file: 350, + sourceLine: 25 + }; + var highlight = chalk_1.default.yellow; + var colorPath = chalk_1.default.gray; + function reportError(logObj, config) { + const errorInfo = getErrorInfo(logObj, config); + let output = formatErrorSummary(errorInfo.title, logObj["err"]["code"]); + if (errorInfo.body) { + output += ` + +${errorInfo.body}`; + } + return output; + } + exports2.default = reportError; + function getErrorInfo(logObj, config) { + var _a, _b, _c, _d, _e; + if (logObj["err"]) { + const err = logObj["err"]; + switch (err.code) { + case "ERR_PNPM_UNEXPECTED_STORE": + return reportUnexpectedStore(err, logObj); + case "ERR_PNPM_UNEXPECTED_VIRTUAL_STORE": + return reportUnexpectedVirtualStoreDir(err, logObj); + case "ERR_PNPM_STORE_BREAKING_CHANGE": + return reportStoreBreakingChange(logObj); + case "ERR_PNPM_MODULES_BREAKING_CHANGE": + return reportModulesBreakingChange(logObj); + case "ERR_PNPM_MODIFIED_DEPENDENCY": + return reportModifiedDependency(logObj); + case "ERR_PNPM_LOCKFILE_BREAKING_CHANGE": + return reportLockfileBreakingChange(err, logObj); + case "ERR_PNPM_RECURSIVE_RUN_NO_SCRIPT": + return { title: err.message }; + case "ERR_PNPM_NO_MATCHING_VERSION": + return formatNoMatchingVersion(err, logObj); + case "ERR_PNPM_RECURSIVE_FAIL": + return formatRecursiveCommandSummary(logObj); + case "ERR_PNPM_BAD_TARBALL_SIZE": + return reportBadTarballSize(err, logObj); + case "ELIFECYCLE": + return reportLifecycleError(logObj); + case "ERR_PNPM_UNSUPPORTED_ENGINE": + return reportEngineError(logObj); + case "ERR_PNPM_FETCH_401": + case "ERR_PNPM_FETCH_403": + return reportAuthError(err, logObj, config); + default: { + if (!((_b = (_a = err.code) === null || _a === void 0 ? void 0 : _a.startsWith) === null || _b === void 0 ? void 0 : _b.call(_a, "ERR_PNPM_"))) { + return formatGenericError((_c = err.message) !== null && _c !== void 0 ? _c : logObj["message"], err.stack); + } + const errorOutput = []; + if ((_d = logObj["pkgsStack"]) === null || _d === void 0 ? void 0 : _d.length) { + errorOutput.push(formatPkgsStack(logObj["pkgsStack"])); + } + if (logObj["hint"]) { + errorOutput.push(logObj["hint"]); + } + return { + title: (_e = err.message) !== null && _e !== void 0 ? _e : "", + body: errorOutput.join(constants_1.EOL) + }; + } + } + } + return { title: logObj["message"] }; + } + function formatPkgsStack(pkgsStack) { + return `This error happened while installing the dependencies of ${pkgsStack[0].name}@${pkgsStack[0].version}${pkgsStack.slice(1).map(({ name, version }) => `${constants_1.EOL} at ${name}@${version}`).join("")}`; + } + function formatNoMatchingVersion(err, msg) { + const meta = msg["packageMeta"]; + let output = `The latest release of ${meta.name} is "${meta["dist-tags"].latest}".${constants_1.EOL}`; + if (!equals_1.default(Object.keys(meta["dist-tags"]), ["latest"])) { + output += constants_1.EOL + "Other releases are:" + constants_1.EOL; + for (const tag in meta["dist-tags"]) { + if (tag !== "latest") { + output += ` * ${tag}: ${meta["dist-tags"][tag]}${constants_1.EOL}`; + } + } + } + output += `${constants_1.EOL}If you need the full list of all ${Object.keys(meta.versions).length} published versions run "$ pnpm view ${meta.name} versions".`; + return { + title: err.message, + body: output + }; + } + function reportUnexpectedStore(err, msg) { + return { + title: err.message, + body: `The dependencies at "${msg.modulesDir}" are currently linked from the store at "${msg.expectedStorePath}". + +pnpm now wants to use the store at "${msg.actualStorePath}" to link dependencies. + +If you want to use the new store location, reinstall your dependencies with "pnpm install". + +You may change the global store location by running "pnpm config set store-dir ". +(This error may happen if the node_modules was installed with a different major version of pnpm)` + }; + } + function reportUnexpectedVirtualStoreDir(err, msg) { + return { + title: err.message, + body: `The dependencies at "${msg.modulesDir}" are currently symlinked from the virtual store directory at "${msg.expected}". + +pnpm now wants to use the virtual store at "${msg.actual}" to link dependencies from the store. + +If you want to use the new virtual store location, reinstall your dependencies with "pnpm install". + +You may change the virtual store location by changing the value of the virtual-store-dir config.` + }; + } + function reportStoreBreakingChange(msg) { + let output = `Store path: ${colorPath(msg.storePath)} + +Run "pnpm install" to recreate node_modules.`; + if (msg.additionalInformation) { + output = `${output}${constants_1.EOL}${constants_1.EOL}${msg.additionalInformation}`; + } + output += formatRelatedSources(msg); + return { + title: "The store used for the current node_modules is incomatible with the current version of pnpm", + body: output + }; + } + function reportModulesBreakingChange(msg) { + let output = `node_modules path: ${colorPath(msg.modulesPath)} + +Run ${highlight("pnpm install")} to recreate node_modules.`; + if (msg.additionalInformation) { + output = `${output}${constants_1.EOL}${constants_1.EOL}${msg.additionalInformation}`; + } + output += formatRelatedSources(msg); + return { + title: "The current version of pnpm is not compatible with the available node_modules structure", + body: output + }; + } + function formatRelatedSources(msg) { + let output = ""; + if (!msg.relatedIssue && !msg.relatedPR) + return output; + output += constants_1.EOL; + if (msg.relatedIssue) { + output += constants_1.EOL + `Related issue: ${colorPath(`https://github.com/pnpm/pnpm/issues/${msg.relatedIssue}`)}`; + } + if (msg.relatedPR) { + output += constants_1.EOL + `Related PR: ${colorPath(`https://github.com/pnpm/pnpm/pull/${msg.relatedPR}`)}`; + } + return output; + } + function formatGenericError(errorMessage, stack2) { + if (stack2) { + let prettyStack; + try { + prettyStack = new stacktracey_1.default(stack2).pretty; + } catch (err) { + prettyStack = void 0; + } + if (prettyStack) { + return { + title: errorMessage, + body: prettyStack + }; + } + } + return { title: errorMessage }; + } + function formatErrorSummary(message2, code) { + return `${chalk_1.default.bgRed.black(`\u2009${code !== null && code !== void 0 ? code : "ERROR"}\u2009`)} ${chalk_1.default.red(message2)}`; + } + function reportModifiedDependency(msg) { + return { + title: "Packages in the store have been mutated", + body: `These packages are modified: +${msg.modified.map((pkgPath) => colorPath(pkgPath)).join(constants_1.EOL)} + +You can run ${highlight("pnpm install")} to refetch the modified packages` + }; + } + function reportLockfileBreakingChange(err, msg) { + return { + title: err.message, + body: `Run with the ${highlight("--force")} parameter to recreate the lockfile.` + }; + } + function formatRecursiveCommandSummary(msg) { + const output = constants_1.EOL + `Summary: ${chalk_1.default.red(`${msg.fails.length} fails`)}, ${msg.passes} passes` + constants_1.EOL + constants_1.EOL + msg.fails.map((fail) => { + return fail.prefix + ":" + constants_1.EOL + formatErrorSummary(fail.message); + }).join(constants_1.EOL + constants_1.EOL); + return { + title: "", + body: output + }; + } + function reportBadTarballSize(err, msg) { + return { + title: err.message, + body: `Seems like you have internet connection issues. +Try running the same command again. +If that doesn't help, try one of the following: + +- Set a bigger value for the \`fetch-retries\` config. + To check the current value of \`fetch-retries\`, run \`pnpm get fetch-retries\`. + To set a new value, run \`pnpm set fetch-retries \`. + +- Set \`network-concurrency\` to 1. + This change will slow down installation times, so it is recommended to + delete the config once the internet connection is good again: \`pnpm config delete network-concurrency\` + +NOTE: You may also override configs via flags. +For instance, \`pnpm install --fetch-retries 5 --network-concurrency 1\`` + }; + } + function reportLifecycleError(msg) { + if (msg.stage === "test") { + return { title: "Test failed. See above for more details." }; + } + if (typeof msg.errno === "number") { + return { title: `Command failed with exit code ${msg.errno}.` }; + } + return { title: "Command failed." }; + } + function reportEngineError(msg) { + let output = ""; + if (msg.wanted.pnpm) { + output += `Your pnpm version is incompatible with "${msg.packageId}". + +Expected version: ${msg.wanted.pnpm} +Got: ${msg.current.pnpm} + +This is happening because the package's manifest has an engines.pnpm field specified. +To fix this issue, install the required pnpm version globally. + +To install the latest version of pnpm, run "pnpm i -g pnpm". +To check your pnpm version, run "pnpm -v".`; + } + if (msg.wanted.node) { + if (output) + output += constants_1.EOL + constants_1.EOL; + output += `Your Node version is incompatible with "${msg.packageId}". + +Expected version: ${msg.wanted.node} +Got: ${msg.current.node} + +This is happening because the package's manifest has an engines.node field specified. +To fix this issue, install the required Node version.`; + } + return { + title: "Unsupported environment (bad pnpm and/or Node.js version)", + body: output + }; + } + function reportAuthError(err, msg, config) { + var _a; + const foundSettings = []; + for (const [key, value] of Object.entries((_a = config === null || config === void 0 ? void 0 : config.rawConfig) !== null && _a !== void 0 ? _a : {})) { + if (key.startsWith("@")) { + foundSettings.push(`${key}=${value}`); + continue; + } + if (key.endsWith("_auth") || key.endsWith("_authToken") || key.endsWith("username") || key.endsWith("_password") || key.endsWith("always-auth")) { + foundSettings.push(`${key}=${hideSecureInfo(key, value)}`); + } + } + let output = msg.hint ? `${msg.hint}${constants_1.EOL}${constants_1.EOL}` : ""; + if (foundSettings.length === 0) { + output += `No authorization settings were found in the configs. +Try to log in to the registry by running "pnpm login" +or add the auth tokens manually to the ~/.npmrc file.`; + } else { + output += `These authorization settings were found: +${foundSettings.join("\n")}`; + } + return { + title: err.message, + body: output + }; + } + function hideSecureInfo(key, value) { + if (key.endsWith("_password")) + return "[hidden]"; + if (key.endsWith("_auth") || key.endsWith("_authToken")) + return `${value.substring(0, 4)}[hidden]`; + return value; + } + } +}); + +// ../default-reporter/lib/reporterForClient/reportMisc.js +var require_reportMisc = __commonJS({ + "../default-reporter/lib/reporterForClient/reportMisc.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var os_1 = __importDefault(require("os")); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var reportError_1 = __importDefault(require_reportError()); + var formatWarn_1 = __importDefault(require_formatWarn()); + var zooming_1 = require_zooming(); + var LOG_LEVEL_NUMBER = { + error: 0, + warn: 1, + info: 2, + debug: 3 + }; + var MAX_SHOWN_WARNINGS = 5; + exports2.default = (log$, opts) => { + var _a, _b; + const maxLogLevel = (_b = LOG_LEVEL_NUMBER[(_a = opts.logLevel) !== null && _a !== void 0 ? _a : "info"]) !== null && _b !== void 0 ? _b : LOG_LEVEL_NUMBER["info"]; + const reportWarning = makeWarningReporter(opts); + return Rx.merge(log$.registry, log$.other).pipe(operators_1.filter((obj) => LOG_LEVEL_NUMBER[obj.level] <= maxLogLevel && (obj.level !== "info" || !obj["prefix"] || obj["prefix"] === opts.cwd)), operators_1.map((obj) => { + switch (obj.level) { + case "warn": { + return reportWarning(obj); + } + case "error": + if (obj["prefix"] && obj["prefix"] !== opts.cwd) { + return Rx.of({ + msg: `${obj["prefix"]}:` + os_1.default.EOL + reportError_1.default(obj, opts.config) + }); + } + return Rx.of({ msg: reportError_1.default(obj, opts.config) }); + default: + return Rx.of({ msg: obj["message"] }); + } + })); + }; + function makeWarningReporter(opts) { + let warningsCounter = 0; + let collapsedWarnings; + return (obj) => { + warningsCounter++; + if (opts.appendOnly || warningsCounter <= MAX_SHOWN_WARNINGS) { + return Rx.of({ msg: zooming_1.autozoom(opts.cwd, obj.prefix, formatWarn_1.default(obj.message), opts) }); + } + const warningMsg = formatWarn_1.default(`${warningsCounter - MAX_SHOWN_WARNINGS} other warnings`); + if (!collapsedWarnings) { + collapsedWarnings = new Rx.Subject(); + setTimeout(() => collapsedWarnings.next({ msg: warningMsg }), 0); + return Rx.from(collapsedWarnings); + } + setTimeout(() => collapsedWarnings.next({ msg: warningMsg }), 0); + return Rx.NEVER; + }; + } + } +}); + +// ../default-reporter/lib/reporterForClient/reportProgress.js +var require_reportProgress = __commonJS({ + "../default-reporter/lib/reporterForClient/reportProgress.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var outputConstants_1 = require_outputConstants(); + var zooming_1 = require_zooming(); + exports2.default = (log$, opts) => { + const progressOutput = throttledProgressOutput.bind(null, opts.throttle); + return getModulesInstallProgress$(log$.stage, log$.progress).pipe(operators_1.map(({ importingDone$, progress$, requirer }) => { + const output$ = progressOutput(importingDone$, progress$); + if (requirer === opts.cwd) { + return output$; + } + return output$.pipe(operators_1.map((msg) => { + msg["msg"] = zooming_1.zoomOut(opts.cwd, requirer, msg["msg"]); + return msg; + })); + })); + }; + function throttledProgressOutput(throttle, importingDone$, progress$) { + let combinedProgress = Rx.combineLatest(progress$, importingDone$).pipe(operators_1.takeWhile(([, importingDone]) => !importingDone, true)); + if (throttle != null) { + combinedProgress = combinedProgress.pipe(throttle); + } + return combinedProgress.pipe(operators_1.map(createStatusMessage)); + } + function getModulesInstallProgress$(stage$, progress$) { + const modulesInstallProgressPushStream = new Rx.Subject(); + const progessStatsPushStreamByRequirer = getProgessStatsPushStreamByRequirer(progress$); + const stagePushStreamByRequirer = {}; + stage$.forEach((log2) => { + if (!stagePushStreamByRequirer[log2.prefix]) { + stagePushStreamByRequirer[log2.prefix] = new Rx.Subject(); + if (!progessStatsPushStreamByRequirer[log2.prefix]) { + progessStatsPushStreamByRequirer[log2.prefix] = new Rx.Subject(); + } + modulesInstallProgressPushStream.next({ + importingDone$: stage$ToImportingDone$(Rx.from(stagePushStreamByRequirer[log2.prefix])), + progress$: Rx.from(progessStatsPushStreamByRequirer[log2.prefix]), + requirer: log2.prefix + }); + } + stagePushStreamByRequirer[log2.prefix].next(log2); + if (log2.stage === "importing_done") { + progessStatsPushStreamByRequirer[log2.prefix].complete(); + stagePushStreamByRequirer[log2.prefix].complete(); + } + }).catch(() => { + }); + return Rx.from(modulesInstallProgressPushStream); + } + function stage$ToImportingDone$(stage$) { + return stage$.pipe(operators_1.filter((log2) => log2.stage === "importing_done"), operators_1.mapTo(true), operators_1.take(1), operators_1.startWith(false)); + } + function getProgessStatsPushStreamByRequirer(progress$) { + const progessStatsPushStreamByRequirer = {}; + const previousProgressStatsByRequirer = {}; + progress$.forEach((log2) => { + if (!previousProgressStatsByRequirer[log2.requester]) { + previousProgressStatsByRequirer[log2.requester] = { + fetched: 0, + imported: 0, + resolved: 0, + reused: 0 + }; + } + switch (log2.status) { + case "resolved": + previousProgressStatsByRequirer[log2.requester].resolved++; + break; + case "fetched": + previousProgressStatsByRequirer[log2.requester].fetched++; + break; + case "found_in_store": + previousProgressStatsByRequirer[log2.requester].reused++; + break; + case "imported": + previousProgressStatsByRequirer[log2.requester].imported++; + break; + } + if (!progessStatsPushStreamByRequirer[log2.requester]) { + progessStatsPushStreamByRequirer[log2.requester] = new Rx.Subject(); + } + progessStatsPushStreamByRequirer[log2.requester].next(previousProgressStatsByRequirer[log2.requester]); + }).catch(() => { + }); + return progessStatsPushStreamByRequirer; + } + function createStatusMessage([progress, importingDone]) { + const msg = `Progress: resolved ${outputConstants_1.hlValue(progress.resolved.toString())}, reused ${outputConstants_1.hlValue(progress.reused.toString())}, downloaded ${outputConstants_1.hlValue(progress.fetched.toString())}, added ${outputConstants_1.hlValue(progress.imported.toString())}`; + if (importingDone) { + return { + done: true, + fixed: false, + msg: `${msg}, done` + }; + } + return { + fixed: true, + msg + }; + } + } +}); + +// ../default-reporter/lib/reporterForClient/reportRequestRetry.js +var require_reportRequestRetry = __commonJS({ + "../default-reporter/lib/reporterForClient/reportRequestRetry.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var pretty_ms_1 = __importDefault(require_pretty_ms()); + var formatWarn_1 = __importDefault(require_formatWarn()); + exports2.default = (requestRetry$) => { + return requestRetry$.pipe(operators_1.map((log2) => { + const retriesLeft = log2.maxRetries - log2.attempt + 1; + const errorCode = log2.error["httpStatusCode"] || log2.error["status"] || log2.error["errno"] || log2.error["code"]; + const msg = `${log2.method} ${log2.url} error (${errorCode}). Will retry in ${pretty_ms_1.default(log2.timeout, { verbose: true })}. ${retriesLeft} retries left.`; + return Rx.of({ msg: formatWarn_1.default(msg) }); + })); + }; + } +}); + +// ../default-reporter/lib/reporterForClient/reportScope.js +var require_reportScope = __commonJS({ + "../default-reporter/lib/reporterForClient/reportScope.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var COMMANDS_THAT_REPORT_SCOPE = new Set([ + "install", + "link", + "prune", + "rebuild", + "remove", + "unlink", + "update", + "run", + "test" + ]); + exports2.default = (scope$, opts) => { + if (!COMMANDS_THAT_REPORT_SCOPE.has(opts.cmd)) { + return Rx.NEVER; + } + return scope$.pipe(operators_1.take(1), operators_1.map((log2) => { + if (log2.selected === 1) { + return Rx.NEVER; + } + let msg = "Scope: "; + if (log2.selected === log2.total) { + msg += `all ${log2.total}`; + } else { + msg += `${log2.selected}`; + if (log2.total) { + msg += ` of ${log2.total}`; + } + } + if (log2.workspacePrefix) { + msg += " workspace projects"; + } else { + msg += " projects"; + } + return Rx.of({ msg }); + })); + }; + } +}); + +// ../default-reporter/lib/reporterForClient/reportSkippedOptionalDependencies.js +var require_reportSkippedOptionalDependencies = __commonJS({ + "../default-reporter/lib/reporterForClient/reportSkippedOptionalDependencies.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + exports2.default = (skippedOptionalDependency$, opts) => { + return skippedOptionalDependency$.pipe(operators_1.filter((log2) => Boolean(log2["prefix"] === opts.cwd && log2.parents && log2.parents.length === 0)), operators_1.map((log2) => Rx.of({ + msg: `info: ${log2.package["id"] || log2.package.name && `${log2.package.name}@${log2.package.version}` || log2.package["pref"]} is an optional dependency and failed compatibility check. Excluding it from installation.` + }))); + }; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/always.js +var require_always = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/always.js"(exports2, module2) { + var _curry1 = require_curry1(); + var always = /* @__PURE__ */ _curry1(function always2(val) { + return function() { + return val; + }; + }); + module2.exports = always; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/times.js +var require_times = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/times.js"(exports2, module2) { + var _curry2 = require_curry2(); + var times = /* @__PURE__ */ _curry2(function times2(fn2, n) { + var len = Number(n); + var idx = 0; + var list; + if (len < 0 || isNaN(len)) { + throw new RangeError("n must be a non-negative number"); + } + list = new Array(len); + while (idx < len) { + list[idx] = fn2(idx); + idx += 1; + } + return list; + }); + module2.exports = times; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/repeat.js +var require_repeat2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/repeat.js"(exports2, module2) { + var _curry2 = require_curry2(); + var always = require_always(); + var times = require_times(); + var repeat = /* @__PURE__ */ _curry2(function repeat2(value, n) { + return times(always(value), n); + }); + module2.exports = repeat; + } +}); + +// ../../node_modules/.pnpm/char-regex@1.0.2/node_modules/char-regex/index.js +var require_char_regex = __commonJS({ + "../../node_modules/.pnpm/char-regex@1.0.2/node_modules/char-regex/index.js"(exports2, module2) { + "use strict"; + module2.exports = () => { + const astralRange = "\\ud800-\\udfff"; + const comboMarksRange = "\\u0300-\\u036f"; + const comboHalfMarksRange = "\\ufe20-\\ufe2f"; + const comboSymbolsRange = "\\u20d0-\\u20ff"; + const comboMarksExtendedRange = "\\u1ab0-\\u1aff"; + const comboMarksSupplementRange = "\\u1dc0-\\u1dff"; + const comboRange = comboMarksRange + comboHalfMarksRange + comboSymbolsRange + comboMarksExtendedRange + comboMarksSupplementRange; + const varRange = "\\ufe0e\\ufe0f"; + const familyRange = "\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93"; + const astral = `[${astralRange}]`; + const combo = `[${comboRange}]`; + const fitz = "\\ud83c[\\udffb-\\udfff]"; + const modifier = `(?:${combo}|${fitz})`; + const nonAstral = `[^${astralRange}]`; + const regional = "(?:\\uD83C[\\uDDE6-\\uDDFF]){2}"; + const surrogatePair = "[\\ud800-\\udbff][\\udc00-\\udfff]"; + const zwj = "\\u200d"; + const blackFlag = "(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)"; + const family = `[${familyRange}]`; + const optModifier = `${modifier}?`; + const optVar = `[${varRange}]?`; + const optJoin = `(?:${zwj}(?:${[nonAstral, regional, surrogatePair].join("|")})${optVar + optModifier})*`; + const seq = optVar + optModifier + optJoin; + const nonAstralCombo = `${nonAstral}${combo}?`; + const symbol = `(?:${[nonAstralCombo, combo, regional, surrogatePair, astral, family].join("|")})`; + return new RegExp(`${blackFlag}|${fitz}(?=${fitz})|${symbol + seq}`, "g"); + }; + } +}); + +// ../../node_modules/.pnpm/string-length@4.0.2/node_modules/string-length/index.js +var require_string_length = __commonJS({ + "../../node_modules/.pnpm/string-length@4.0.2/node_modules/string-length/index.js"(exports2, module2) { + "use strict"; + var stripAnsi = require_strip_ansi(); + var charRegex = require_char_regex(); + var stringLength = (string) => { + if (string === "") { + return 0; + } + const strippedString = stripAnsi(string); + if (strippedString === "") { + return 0; + } + return strippedString.match(charRegex()).length; + }; + module2.exports = stringLength; + } +}); + +// ../default-reporter/lib/reporterForClient/reportStats.js +var require_reportStats = __commonJS({ + "../default-reporter/lib/reporterForClient/reportStats.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var chalk_1 = __importDefault(require_source()); + var repeat_1 = __importDefault(require_repeat2()); + var string_length_1 = __importDefault(require_string_length()); + var constants_1 = require_constants2(); + var outputConstants_1 = require_outputConstants(); + var zooming_1 = require_zooming(); + exports2.default = (log$, opts) => { + const stats$ = opts.isRecursive ? log$.stats : log$.stats.pipe(operators_1.filter((log2) => log2.prefix !== opts.cwd)); + const outputs = [ + statsForNotCurrentPackage(stats$, { + cmd: opts.cmd, + currentPrefix: opts.cwd, + width: opts.width + }) + ]; + if (!opts.isRecursive) { + outputs.push(statsForCurrentPackage(log$.stats, { + cmd: opts.cmd, + currentPrefix: opts.cwd, + width: opts.width + })); + } + return outputs; + }; + function statsForCurrentPackage(stats$, opts) { + return stats$.pipe(operators_1.filter((log2) => log2.prefix === opts.currentPrefix), operators_1.take(opts.cmd === "install" || opts.cmd === "install-test" || opts.cmd === "add" || opts.cmd === "update" ? 2 : 1), operators_1.reduce((acc, log2) => { + if (typeof log2["added"] === "number") { + acc["added"] = log2["added"]; + } else if (typeof log2["removed"] === "number") { + acc["removed"] = log2["removed"]; + } + return acc; + }, {}), operators_1.map((stats) => { + if (!stats["removed"] && !stats["added"]) { + if (opts.cmd === "link") { + return Rx.NEVER; + } + return Rx.of({ msg: "Already up-to-date" }); + } + let msg = "Packages:"; + if (stats["added"]) { + msg += " " + chalk_1.default.green(`+${stats["added"].toString()}`); + } + if (stats["removed"]) { + msg += " " + chalk_1.default.red(`-${stats["removed"].toString()}`); + } + msg += constants_1.EOL + printPlusesAndMinuses(opts.width, stats["added"] || 0, stats["removed"] || 0); + return Rx.of({ msg }); + })); + } + function statsForNotCurrentPackage(stats$, opts) { + const stats = {}; + const cookedStats$ = opts.cmd !== "remove" ? stats$.pipe(operators_1.map((log2) => { + if (!stats[log2.prefix]) { + stats[log2.prefix] = log2; + return { seed: stats, value: null }; + } else if (typeof stats[log2.prefix].added === "number" && typeof log2["added"] === "number") { + stats[log2.prefix].added += log2["added"]; + return { seed: stats, value: null }; + } else if (typeof stats[log2.prefix].removed === "number" && typeof log2["removed"] === "number") { + stats[log2.prefix].removed += log2["removed"]; + return { seed: stats, value: null }; + } else { + const value = { ...stats[log2.prefix], ...log2 }; + delete stats[log2.prefix]; + return value; + } + }, {})) : stats$; + return cookedStats$.pipe(operators_1.filter((stats2) => stats2 !== null && (stats2["removed"] || stats2["added"])), operators_1.map((stats2) => { + const parts = []; + if (stats2["added"]) { + parts.push(padStep(chalk_1.default.green(`+${stats2["added"].toString()}`), 4)); + } + if (stats2["removed"]) { + parts.push(padStep(chalk_1.default.red(`-${stats2["removed"].toString()}`), 4)); + } + let msg = zooming_1.zoomOut(opts.currentPrefix, stats2["prefix"], parts.join(" ")); + const rest = Math.max(0, opts.width - 1 - string_length_1.default(msg)); + msg += " " + printPlusesAndMinuses(rest, roundStats(stats2["added"] || 0), roundStats(stats2["removed"] || 0)); + return Rx.of({ msg }); + })); + } + function padStep(s, step) { + const sLength = string_length_1.default(s); + const placeholderLength = Math.ceil(sLength / step) * step; + if (sLength < placeholderLength) { + return repeat_1.default(" ", placeholderLength - sLength).join("") + s; + } + return s; + } + function roundStats(stat) { + if (stat === 0) + return 0; + return Math.max(1, Math.round(stat / 10)); + } + function printPlusesAndMinuses(maxWidth, added, removed) { + if (maxWidth === 0) + return ""; + const changes = added + removed; + let addedChars; + let removedChars; + if (changes > maxWidth) { + if (!added) { + addedChars = 0; + removedChars = maxWidth; + } else if (!removed) { + addedChars = maxWidth; + removedChars = 0; + } else { + const p = maxWidth / changes; + addedChars = Math.min(Math.max(Math.floor(added * p), 1), maxWidth - 1); + removedChars = maxWidth - addedChars; + } + } else { + addedChars = added; + removedChars = removed; + } + return `${repeat_1.default(outputConstants_1.ADDED_CHAR, addedChars).join("")}${repeat_1.default(outputConstants_1.REMOVED_CHAR, removedChars).join("")}`; + } + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/internal/constants.js +var require_constants3 = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/internal/constants.js"(exports2, module2) { + var SEMVER_SPEC_VERSION = "2.0.0"; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; + var MAX_SAFE_COMPONENT_LENGTH = 16; + module2.exports = { + SEMVER_SPEC_VERSION, + MAX_LENGTH, + MAX_SAFE_INTEGER, + MAX_SAFE_COMPONENT_LENGTH + }; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/internal/debug.js +var require_debug = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/internal/debug.js"(exports2, module2) { + var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args2) => console.error("SEMVER", ...args2) : () => { + }; + module2.exports = debug; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/internal/re.js +var require_re = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/internal/re.js"(exports2, module2) { + var { MAX_SAFE_COMPONENT_LENGTH } = require_constants3(); + var debug = require_debug(); + exports2 = module2.exports = {}; + var re = exports2.re = []; + var src = exports2.src = []; + var t = exports2.t = {}; + var R = 0; + var createToken = (name, value, isGlobal) => { + const index = R++; + debug(index, value); + t[name] = index; + src[index] = value; + re[index] = new RegExp(value, isGlobal ? "g" : void 0); + }; + createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); + createToken("NUMERICIDENTIFIERLOOSE", "[0-9]+"); + createToken("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*"); + createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); + createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`); + createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`); + createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); + createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); + createToken("BUILDIDENTIFIER", "[0-9A-Za-z-]+"); + createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); + createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); + createToken("FULL", `^${src[t.FULLPLAIN]}$`); + createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); + createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); + createToken("GTLT", "((?:<|>)?=?)"); + createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); + createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); + createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); + createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`); + createToken("COERCERTL", src[t.COERCE], true); + createToken("LONETILDE", "(?:~>?)"); + createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); + exports2.tildeTrimReplace = "$1~"; + createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); + createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("LONECARET", "(?:\\^)"); + createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); + exports2.caretTrimReplace = "$1^"; + createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); + createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); + createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); + createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); + exports2.comparatorTrimReplace = "$1$2$3"; + createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); + createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); + createToken("STAR", "(<|>)?=?\\s*\\*"); + createToken("GTE0", "^\\s*>=\\s*0.0.0\\s*$"); + createToken("GTE0PRE", "^\\s*>=\\s*0.0.0-0\\s*$"); + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/internal/parse-options.js +var require_parse_options = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/internal/parse-options.js"(exports2, module2) { + var opts = ["includePrerelease", "loose", "rtl"]; + var parseOptions = (options) => !options ? {} : typeof options !== "object" ? { loose: true } : opts.filter((k) => options[k]).reduce((options2, k) => { + options2[k] = true; + return options2; + }, {}); + module2.exports = parseOptions; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/internal/identifiers.js +var require_identifiers = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/internal/identifiers.js"(exports2, module2) { + var numeric = /^[0-9]+$/; + var compareIdentifiers = (a, b) => { + const anum = numeric.test(a); + const bnum = numeric.test(b); + if (anum && bnum) { + a = +a; + b = +b; + } + return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; + }; + var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a); + module2.exports = { + compareIdentifiers, + rcompareIdentifiers + }; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/classes/semver.js +var require_semver = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/classes/semver.js"(exports2, module2) { + var debug = require_debug(); + var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants3(); + var { re, t } = require_re(); + var parseOptions = require_parse_options(); + var { compareIdentifiers } = require_identifiers(); + var SemVer = class { + constructor(version, options) { + options = parseOptions(options); + if (version instanceof SemVer) { + if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) { + return version; + } else { + version = version.version; + } + } else if (typeof version !== "string") { + throw new TypeError(`Invalid Version: ${version}`); + } + if (version.length > MAX_LENGTH) { + throw new TypeError(`version is longer than ${MAX_LENGTH} characters`); + } + debug("SemVer", version, options); + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); + if (!m) { + throw new TypeError(`Invalid Version: ${version}`); + } + this.raw = version; + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError("Invalid major version"); + } + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError("Invalid minor version"); + } + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError("Invalid patch version"); + } + if (!m[4]) { + this.prerelease = []; + } else { + this.prerelease = m[4].split(".").map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num; + } + } + return id; + }); + } + this.build = m[5] ? m[5].split(".") : []; + this.format(); + } + format() { + this.version = `${this.major}.${this.minor}.${this.patch}`; + if (this.prerelease.length) { + this.version += `-${this.prerelease.join(".")}`; + } + return this.version; + } + toString() { + return this.version; + } + compare(other) { + debug("SemVer.compare", this.version, this.options, other); + if (!(other instanceof SemVer)) { + if (typeof other === "string" && other === this.version) { + return 0; + } + other = new SemVer(other, this.options); + } + if (other.version === this.version) { + return 0; + } + return this.compareMain(other) || this.comparePre(other); + } + compareMain(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); + } + comparePre(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + if (this.prerelease.length && !other.prerelease.length) { + return -1; + } else if (!this.prerelease.length && other.prerelease.length) { + return 1; + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0; + } + let i = 0; + do { + const a = this.prerelease[i]; + const b = other.prerelease[i]; + debug("prerelease compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i); + } + compareBuild(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + let i = 0; + do { + const a = this.build[i]; + const b = other.build[i]; + debug("prerelease compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i); + } + inc(release, identifier) { + switch (release) { + case "premajor": + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc("pre", identifier); + break; + case "preminor": + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc("pre", identifier); + break; + case "prepatch": + this.prerelease.length = 0; + this.inc("patch", identifier); + this.inc("pre", identifier); + break; + case "prerelease": + if (this.prerelease.length === 0) { + this.inc("patch", identifier); + } + this.inc("pre", identifier); + break; + case "major": + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { + this.major++; + } + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case "minor": + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++; + } + this.patch = 0; + this.prerelease = []; + break; + case "patch": + if (this.prerelease.length === 0) { + this.patch++; + } + this.prerelease = []; + break; + case "pre": + if (this.prerelease.length === 0) { + this.prerelease = [0]; + } else { + let i = this.prerelease.length; + while (--i >= 0) { + if (typeof this.prerelease[i] === "number") { + this.prerelease[i]++; + i = -2; + } + } + if (i === -1) { + this.prerelease.push(0); + } + } + if (identifier) { + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0]; + } + } else { + this.prerelease = [identifier, 0]; + } + } + break; + default: + throw new Error(`invalid increment argument: ${release}`); + } + this.format(); + this.raw = this.version; + return this; + } + }; + module2.exports = SemVer; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/parse.js +var require_parse = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/parse.js"(exports2, module2) { + var { MAX_LENGTH } = require_constants3(); + var { re, t } = require_re(); + var SemVer = require_semver(); + var parseOptions = require_parse_options(); + var parse = (version, options) => { + options = parseOptions(options); + if (version instanceof SemVer) { + return version; + } + if (typeof version !== "string") { + return null; + } + if (version.length > MAX_LENGTH) { + return null; + } + const r = options.loose ? re[t.LOOSE] : re[t.FULL]; + if (!r.test(version)) { + return null; + } + try { + return new SemVer(version, options); + } catch (er) { + return null; + } + }; + module2.exports = parse; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/valid.js +var require_valid = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/valid.js"(exports2, module2) { + var parse = require_parse(); + var valid = (version, options) => { + const v = parse(version, options); + return v ? v.version : null; + }; + module2.exports = valid; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/clean.js +var require_clean = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/clean.js"(exports2, module2) { + var parse = require_parse(); + var clean = (version, options) => { + const s = parse(version.trim().replace(/^[=v]+/, ""), options); + return s ? s.version : null; + }; + module2.exports = clean; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/inc.js +var require_inc = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/inc.js"(exports2, module2) { + var SemVer = require_semver(); + var inc = (version, release, options, identifier) => { + if (typeof options === "string") { + identifier = options; + options = void 0; + } + try { + return new SemVer(version, options).inc(release, identifier).version; + } catch (er) { + return null; + } + }; + module2.exports = inc; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/compare.js +var require_compare = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/compare.js"(exports2, module2) { + var SemVer = require_semver(); + var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)); + module2.exports = compare; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/eq.js +var require_eq = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/eq.js"(exports2, module2) { + var compare = require_compare(); + var eq = (a, b, loose) => compare(a, b, loose) === 0; + module2.exports = eq; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/diff.js +var require_diff = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/diff.js"(exports2, module2) { + var parse = require_parse(); + var eq = require_eq(); + var diff = (version1, version2) => { + if (eq(version1, version2)) { + return null; + } else { + const v1 = parse(version1); + const v2 = parse(version2); + const hasPre = v1.prerelease.length || v2.prerelease.length; + const prefix = hasPre ? "pre" : ""; + const defaultResult = hasPre ? "prerelease" : ""; + for (const key in v1) { + if (key === "major" || key === "minor" || key === "patch") { + if (v1[key] !== v2[key]) { + return prefix + key; + } + } + } + return defaultResult; + } + }; + module2.exports = diff; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/major.js +var require_major = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/major.js"(exports2, module2) { + var SemVer = require_semver(); + var major = (a, loose) => new SemVer(a, loose).major; + module2.exports = major; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/minor.js +var require_minor = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/minor.js"(exports2, module2) { + var SemVer = require_semver(); + var minor = (a, loose) => new SemVer(a, loose).minor; + module2.exports = minor; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/patch.js +var require_patch = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/patch.js"(exports2, module2) { + var SemVer = require_semver(); + var patch = (a, loose) => new SemVer(a, loose).patch; + module2.exports = patch; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/prerelease.js +var require_prerelease = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/prerelease.js"(exports2, module2) { + var parse = require_parse(); + var prerelease = (version, options) => { + const parsed = parse(version, options); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; + }; + module2.exports = prerelease; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/rcompare.js +var require_rcompare = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/rcompare.js"(exports2, module2) { + var compare = require_compare(); + var rcompare = (a, b, loose) => compare(b, a, loose); + module2.exports = rcompare; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/compare-loose.js +var require_compare_loose = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/compare-loose.js"(exports2, module2) { + var compare = require_compare(); + var compareLoose = (a, b) => compare(a, b, true); + module2.exports = compareLoose; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/compare-build.js +var require_compare_build = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/compare-build.js"(exports2, module2) { + var SemVer = require_semver(); + var compareBuild = (a, b, loose) => { + const versionA = new SemVer(a, loose); + const versionB = new SemVer(b, loose); + return versionA.compare(versionB) || versionA.compareBuild(versionB); + }; + module2.exports = compareBuild; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/sort.js +var require_sort2 = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/sort.js"(exports2, module2) { + var compareBuild = require_compare_build(); + var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)); + module2.exports = sort; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/rsort.js +var require_rsort = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/rsort.js"(exports2, module2) { + var compareBuild = require_compare_build(); + var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)); + module2.exports = rsort; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/gt.js +var require_gt = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/gt.js"(exports2, module2) { + var compare = require_compare(); + var gt = (a, b, loose) => compare(a, b, loose) > 0; + module2.exports = gt; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/lt.js +var require_lt = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/lt.js"(exports2, module2) { + var compare = require_compare(); + var lt = (a, b, loose) => compare(a, b, loose) < 0; + module2.exports = lt; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/neq.js +var require_neq = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/neq.js"(exports2, module2) { + var compare = require_compare(); + var neq = (a, b, loose) => compare(a, b, loose) !== 0; + module2.exports = neq; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/gte.js +var require_gte = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/gte.js"(exports2, module2) { + var compare = require_compare(); + var gte = (a, b, loose) => compare(a, b, loose) >= 0; + module2.exports = gte; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/lte.js +var require_lte = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/lte.js"(exports2, module2) { + var compare = require_compare(); + var lte = (a, b, loose) => compare(a, b, loose) <= 0; + module2.exports = lte; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/cmp.js +var require_cmp = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/cmp.js"(exports2, module2) { + var eq = require_eq(); + var neq = require_neq(); + var gt = require_gt(); + var gte = require_gte(); + var lt = require_lt(); + var lte = require_lte(); + var cmp = (a, op, b, loose) => { + switch (op) { + case "===": + if (typeof a === "object") + a = a.version; + if (typeof b === "object") + b = b.version; + return a === b; + case "!==": + if (typeof a === "object") + a = a.version; + if (typeof b === "object") + b = b.version; + return a !== b; + case "": + case "=": + case "==": + return eq(a, b, loose); + case "!=": + return neq(a, b, loose); + case ">": + return gt(a, b, loose); + case ">=": + return gte(a, b, loose); + case "<": + return lt(a, b, loose); + case "<=": + return lte(a, b, loose); + default: + throw new TypeError(`Invalid operator: ${op}`); + } + }; + module2.exports = cmp; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/coerce.js +var require_coerce = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/coerce.js"(exports2, module2) { + var SemVer = require_semver(); + var parse = require_parse(); + var { re, t } = require_re(); + var coerce = (version, options) => { + if (version instanceof SemVer) { + return version; + } + if (typeof version === "number") { + version = String(version); + } + if (typeof version !== "string") { + return null; + } + options = options || {}; + let match = null; + if (!options.rtl) { + match = version.match(re[t.COERCE]); + } else { + let next; + while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) { + if (!match || next.index + next[0].length !== match.index + match[0].length) { + match = next; + } + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; + } + re[t.COERCERTL].lastIndex = -1; + } + if (match === null) + return null; + return parse(`${match[2]}.${match[3] || "0"}.${match[4] || "0"}`, options); + }; + module2.exports = coerce; + } +}); + +// ../../node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/iterator.js +var require_iterator2 = __commonJS({ + "../../node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/iterator.js"(exports2, module2) { + "use strict"; + module2.exports = function(Yallist) { + Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value; + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/yallist.js +var require_yallist = __commonJS({ + "../../node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/yallist.js"(exports2, module2) { + "use strict"; + module2.exports = Yallist; + Yallist.Node = Node; + Yallist.create = Yallist; + function Yallist(list) { + var self2 = this; + if (!(self2 instanceof Yallist)) { + self2 = new Yallist(); + } + self2.tail = null; + self2.head = null; + self2.length = 0; + if (list && typeof list.forEach === "function") { + list.forEach(function(item) { + self2.push(item); + }); + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self2.push(arguments[i]); + } + } + return self2; + } + Yallist.prototype.removeNode = function(node) { + if (node.list !== this) { + throw new Error("removing node which does not belong to this list"); + } + var next = node.next; + var prev = node.prev; + if (next) { + next.prev = prev; + } + if (prev) { + prev.next = next; + } + if (node === this.head) { + this.head = next; + } + if (node === this.tail) { + this.tail = prev; + } + node.list.length--; + node.next = null; + node.prev = null; + node.list = null; + return next; + }; + Yallist.prototype.unshiftNode = function(node) { + if (node === this.head) { + return; + } + if (node.list) { + node.list.removeNode(node); + } + var head = this.head; + node.list = this; + node.next = head; + if (head) { + head.prev = node; + } + this.head = node; + if (!this.tail) { + this.tail = node; + } + this.length++; + }; + Yallist.prototype.pushNode = function(node) { + if (node === this.tail) { + return; + } + if (node.list) { + node.list.removeNode(node); + } + var tail = this.tail; + node.list = this; + node.prev = tail; + if (tail) { + tail.next = node; + } + this.tail = node; + if (!this.head) { + this.head = node; + } + this.length++; + }; + Yallist.prototype.push = function() { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]); + } + return this.length; + }; + Yallist.prototype.unshift = function() { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]); + } + return this.length; + }; + Yallist.prototype.pop = function() { + if (!this.tail) { + return void 0; + } + var res = this.tail.value; + this.tail = this.tail.prev; + if (this.tail) { + this.tail.next = null; + } else { + this.head = null; + } + this.length--; + return res; + }; + Yallist.prototype.shift = function() { + if (!this.head) { + return void 0; + } + var res = this.head.value; + this.head = this.head.next; + if (this.head) { + this.head.prev = null; + } else { + this.tail = null; + } + this.length--; + return res; + }; + Yallist.prototype.forEach = function(fn2, thisp) { + thisp = thisp || this; + for (var walker = this.head, i = 0; walker !== null; i++) { + fn2.call(thisp, walker.value, i, this); + walker = walker.next; + } + }; + Yallist.prototype.forEachReverse = function(fn2, thisp) { + thisp = thisp || this; + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn2.call(thisp, walker.value, i, this); + walker = walker.prev; + } + }; + Yallist.prototype.get = function(n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + walker = walker.next; + } + if (i === n && walker !== null) { + return walker.value; + } + }; + Yallist.prototype.getReverse = function(n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + walker = walker.prev; + } + if (i === n && walker !== null) { + return walker.value; + } + }; + Yallist.prototype.map = function(fn2, thisp) { + thisp = thisp || this; + var res = new Yallist(); + for (var walker = this.head; walker !== null; ) { + res.push(fn2.call(thisp, walker.value, this)); + walker = walker.next; + } + return res; + }; + Yallist.prototype.mapReverse = function(fn2, thisp) { + thisp = thisp || this; + var res = new Yallist(); + for (var walker = this.tail; walker !== null; ) { + res.push(fn2.call(thisp, walker.value, this)); + walker = walker.prev; + } + return res; + }; + Yallist.prototype.reduce = function(fn2, initial) { + var acc; + var walker = this.head; + if (arguments.length > 1) { + acc = initial; + } else if (this.head) { + walker = this.head.next; + acc = this.head.value; + } else { + throw new TypeError("Reduce of empty list with no initial value"); + } + for (var i = 0; walker !== null; i++) { + acc = fn2(acc, walker.value, i); + walker = walker.next; + } + return acc; + }; + Yallist.prototype.reduceReverse = function(fn2, initial) { + var acc; + var walker = this.tail; + if (arguments.length > 1) { + acc = initial; + } else if (this.tail) { + walker = this.tail.prev; + acc = this.tail.value; + } else { + throw new TypeError("Reduce of empty list with no initial value"); + } + for (var i = this.length - 1; walker !== null; i--) { + acc = fn2(acc, walker.value, i); + walker = walker.prev; + } + return acc; + }; + Yallist.prototype.toArray = function() { + var arr = new Array(this.length); + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value; + walker = walker.next; + } + return arr; + }; + Yallist.prototype.toArrayReverse = function() { + var arr = new Array(this.length); + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value; + walker = walker.prev; + } + return arr; + }; + Yallist.prototype.slice = function(from, to) { + to = to || this.length; + if (to < 0) { + to += this.length; + } + from = from || 0; + if (from < 0) { + from += this.length; + } + var ret = new Yallist(); + if (to < from || to < 0) { + return ret; + } + if (from < 0) { + from = 0; + } + if (to > this.length) { + to = this.length; + } + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next; + } + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value); + } + return ret; + }; + Yallist.prototype.sliceReverse = function(from, to) { + to = to || this.length; + if (to < 0) { + to += this.length; + } + from = from || 0; + if (from < 0) { + from += this.length; + } + var ret = new Yallist(); + if (to < from || to < 0) { + return ret; + } + if (from < 0) { + from = 0; + } + if (to > this.length) { + to = this.length; + } + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev; + } + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value); + } + return ret; + }; + Yallist.prototype.splice = function(start, deleteCount, ...nodes) { + if (start > this.length) { + start = this.length - 1; + } + if (start < 0) { + start = this.length + start; + } + for (var i = 0, walker = this.head; walker !== null && i < start; i++) { + walker = walker.next; + } + var ret = []; + for (var i = 0; walker && i < deleteCount; i++) { + ret.push(walker.value); + walker = this.removeNode(walker); + } + if (walker === null) { + walker = this.tail; + } + if (walker !== this.head && walker !== this.tail) { + walker = walker.prev; + } + for (var i = 0; i < nodes.length; i++) { + walker = insert(this, walker, nodes[i]); + } + return ret; + }; + Yallist.prototype.reverse = function() { + var head = this.head; + var tail = this.tail; + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev; + walker.prev = walker.next; + walker.next = p; + } + this.head = tail; + this.tail = head; + return this; + }; + function insert(self2, node, value) { + var inserted = node === self2.head ? new Node(value, null, node, self2) : new Node(value, node, node.next, self2); + if (inserted.next === null) { + self2.tail = inserted; + } + if (inserted.prev === null) { + self2.head = inserted; + } + self2.length++; + return inserted; + } + function push(self2, item) { + self2.tail = new Node(item, self2.tail, null, self2); + if (!self2.head) { + self2.head = self2.tail; + } + self2.length++; + } + function unshift(self2, item) { + self2.head = new Node(item, null, self2.head, self2); + if (!self2.tail) { + self2.tail = self2.head; + } + self2.length++; + } + function Node(value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list); + } + this.list = list; + this.value = value; + if (prev) { + prev.next = this; + this.prev = prev; + } else { + this.prev = null; + } + if (next) { + next.prev = this; + this.next = next; + } else { + this.next = null; + } + } + try { + require_iterator2()(Yallist); + } catch (er) { + } + } +}); + +// ../../node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/index.js +var require_lru_cache = __commonJS({ + "../../node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/index.js"(exports2, module2) { + "use strict"; + var Yallist = require_yallist(); + var MAX = Symbol("max"); + var LENGTH = Symbol("length"); + var LENGTH_CALCULATOR = Symbol("lengthCalculator"); + var ALLOW_STALE = Symbol("allowStale"); + var MAX_AGE = Symbol("maxAge"); + var DISPOSE = Symbol("dispose"); + var NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet"); + var LRU_LIST = Symbol("lruList"); + var CACHE = Symbol("cache"); + var UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet"); + var naiveLength = () => 1; + var LRUCache = class { + constructor(options) { + if (typeof options === "number") + options = { max: options }; + if (!options) + options = {}; + if (options.max && (typeof options.max !== "number" || options.max < 0)) + throw new TypeError("max must be a non-negative number"); + const max = this[MAX] = options.max || Infinity; + const lc = options.length || naiveLength; + this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc; + this[ALLOW_STALE] = options.stale || false; + if (options.maxAge && typeof options.maxAge !== "number") + throw new TypeError("maxAge must be a number"); + this[MAX_AGE] = options.maxAge || 0; + this[DISPOSE] = options.dispose; + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false; + this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false; + this.reset(); + } + set max(mL) { + if (typeof mL !== "number" || mL < 0) + throw new TypeError("max must be a non-negative number"); + this[MAX] = mL || Infinity; + trim(this); + } + get max() { + return this[MAX]; + } + set allowStale(allowStale) { + this[ALLOW_STALE] = !!allowStale; + } + get allowStale() { + return this[ALLOW_STALE]; + } + set maxAge(mA) { + if (typeof mA !== "number") + throw new TypeError("maxAge must be a non-negative number"); + this[MAX_AGE] = mA; + trim(this); + } + get maxAge() { + return this[MAX_AGE]; + } + set lengthCalculator(lC) { + if (typeof lC !== "function") + lC = naiveLength; + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC; + this[LENGTH] = 0; + this[LRU_LIST].forEach((hit) => { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key); + this[LENGTH] += hit.length; + }); + } + trim(this); + } + get lengthCalculator() { + return this[LENGTH_CALCULATOR]; + } + get length() { + return this[LENGTH]; + } + get itemCount() { + return this[LRU_LIST].length; + } + rforEach(fn2, thisp) { + thisp = thisp || this; + for (let walker = this[LRU_LIST].tail; walker !== null; ) { + const prev = walker.prev; + forEachStep(this, fn2, walker, thisp); + walker = prev; + } + } + forEach(fn2, thisp) { + thisp = thisp || this; + for (let walker = this[LRU_LIST].head; walker !== null; ) { + const next = walker.next; + forEachStep(this, fn2, walker, thisp); + walker = next; + } + } + keys() { + return this[LRU_LIST].toArray().map((k) => k.key); + } + values() { + return this[LRU_LIST].toArray().map((k) => k.value); + } + reset() { + if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) { + this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value)); + } + this[CACHE] = new Map(); + this[LRU_LIST] = new Yallist(); + this[LENGTH] = 0; + } + dump() { + return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + }).toArray().filter((h) => h); + } + dumpLru() { + return this[LRU_LIST]; + } + set(key, value, maxAge) { + maxAge = maxAge || this[MAX_AGE]; + if (maxAge && typeof maxAge !== "number") + throw new TypeError("maxAge must be a number"); + const now = maxAge ? Date.now() : 0; + const len = this[LENGTH_CALCULATOR](value, key); + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key)); + return false; + } + const node = this[CACHE].get(key); + const item = node.value; + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) + this[DISPOSE](key, item.value); + } + item.now = now; + item.maxAge = maxAge; + item.value = value; + this[LENGTH] += len - item.length; + item.length = len; + this.get(key); + trim(this); + return true; + } + const hit = new Entry(key, value, len, now, maxAge); + if (hit.length > this[MAX]) { + if (this[DISPOSE]) + this[DISPOSE](key, value); + return false; + } + this[LENGTH] += hit.length; + this[LRU_LIST].unshift(hit); + this[CACHE].set(key, this[LRU_LIST].head); + trim(this); + return true; + } + has(key) { + if (!this[CACHE].has(key)) + return false; + const hit = this[CACHE].get(key).value; + return !isStale(this, hit); + } + get(key) { + return get(this, key, true); + } + peek(key) { + return get(this, key, false); + } + pop() { + const node = this[LRU_LIST].tail; + if (!node) + return null; + del(this, node); + return node.value; + } + del(key) { + del(this, this[CACHE].get(key)); + } + load(arr) { + this.reset(); + const now = Date.now(); + for (let l = arr.length - 1; l >= 0; l--) { + const hit = arr[l]; + const expiresAt = hit.e || 0; + if (expiresAt === 0) + this.set(hit.k, hit.v); + else { + const maxAge = expiresAt - now; + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge); + } + } + } + } + prune() { + this[CACHE].forEach((value, key) => get(this, key, false)); + } + }; + var get = (self2, key, doUse) => { + const node = self2[CACHE].get(key); + if (node) { + const hit = node.value; + if (isStale(self2, hit)) { + del(self2, node); + if (!self2[ALLOW_STALE]) + return void 0; + } else { + if (doUse) { + if (self2[UPDATE_AGE_ON_GET]) + node.value.now = Date.now(); + self2[LRU_LIST].unshiftNode(node); + } + } + return hit.value; + } + }; + var isStale = (self2, hit) => { + if (!hit || !hit.maxAge && !self2[MAX_AGE]) + return false; + const diff = Date.now() - hit.now; + return hit.maxAge ? diff > hit.maxAge : self2[MAX_AGE] && diff > self2[MAX_AGE]; + }; + var trim = (self2) => { + if (self2[LENGTH] > self2[MAX]) { + for (let walker = self2[LRU_LIST].tail; self2[LENGTH] > self2[MAX] && walker !== null; ) { + const prev = walker.prev; + del(self2, walker); + walker = prev; + } + } + }; + var del = (self2, node) => { + if (node) { + const hit = node.value; + if (self2[DISPOSE]) + self2[DISPOSE](hit.key, hit.value); + self2[LENGTH] -= hit.length; + self2[CACHE].delete(hit.key); + self2[LRU_LIST].removeNode(node); + } + }; + var Entry = class { + constructor(key, value, length, now, maxAge) { + this.key = key; + this.value = value; + this.length = length; + this.now = now; + this.maxAge = maxAge || 0; + } + }; + var forEachStep = (self2, fn2, node, thisp) => { + let hit = node.value; + if (isStale(self2, hit)) { + del(self2, node); + if (!self2[ALLOW_STALE]) + hit = void 0; + } + if (hit) + fn2.call(thisp, hit.value, hit.key, self2); + }; + module2.exports = LRUCache; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/classes/range.js +var require_range2 = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/classes/range.js"(exports2, module2) { + var Range = class { + constructor(range, options) { + options = parseOptions(options); + if (range instanceof Range) { + if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { + return range; + } else { + return new Range(range.raw, options); + } + } + if (range instanceof Comparator) { + this.raw = range.value; + this.set = [[range]]; + this.format(); + return this; + } + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + this.raw = range; + this.set = range.split(/\s*\|\|\s*/).map((range2) => this.parseRange(range2.trim())).filter((c) => c.length); + if (!this.set.length) { + throw new TypeError(`Invalid SemVer Range: ${range}`); + } + if (this.set.length > 1) { + const first = this.set[0]; + this.set = this.set.filter((c) => !isNullSet(c[0])); + if (this.set.length === 0) + this.set = [first]; + else if (this.set.length > 1) { + for (const c of this.set) { + if (c.length === 1 && isAny(c[0])) { + this.set = [c]; + break; + } + } + } + } + this.format(); + } + format() { + this.range = this.set.map((comps) => { + return comps.join(" ").trim(); + }).join("||").trim(); + return this.range; + } + toString() { + return this.range; + } + parseRange(range) { + range = range.trim(); + const memoOpts = Object.keys(this.options).join(","); + const memoKey = `parseRange:${memoOpts}:${range}`; + const cached = cache.get(memoKey); + if (cached) + return cached; + const loose = this.options.loose; + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); + debug("hyphen replace", range); + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); + debug("comparator trim", range, re[t.COMPARATORTRIM]); + range = range.replace(re[t.TILDETRIM], tildeTrimReplace); + range = range.replace(re[t.CARETTRIM], caretTrimReplace); + range = range.split(/\s+/).join(" "); + const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; + const rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)).filter(this.options.loose ? (comp) => !!comp.match(compRe) : () => true).map((comp) => new Comparator(comp, this.options)); + const l = rangeList.length; + const rangeMap = new Map(); + for (const comp of rangeList) { + if (isNullSet(comp)) + return [comp]; + rangeMap.set(comp.value, comp); + } + if (rangeMap.size > 1 && rangeMap.has("")) + rangeMap.delete(""); + const result = [...rangeMap.values()]; + cache.set(memoKey, result); + return result; + } + intersects(range, options) { + if (!(range instanceof Range)) { + throw new TypeError("a Range is required"); + } + return this.set.some((thisComparators) => { + return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { + return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { + return rangeComparators.every((rangeComparator) => { + return thisComparator.intersects(rangeComparator, options); + }); + }); + }); + }); + } + test(version) { + if (!version) { + return false; + } + if (typeof version === "string") { + try { + version = new SemVer(version, this.options); + } catch (er) { + return false; + } + } + for (let i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true; + } + } + return false; + } + }; + module2.exports = Range; + var LRU = require_lru_cache(); + var cache = new LRU({ max: 1e3 }); + var parseOptions = require_parse_options(); + var Comparator = require_comparator(); + var debug = require_debug(); + var SemVer = require_semver(); + var { + re, + t, + comparatorTrimReplace, + tildeTrimReplace, + caretTrimReplace + } = require_re(); + var isNullSet = (c) => c.value === "<0.0.0-0"; + var isAny = (c) => c.value === ""; + var isSatisfiable = (comparators, options) => { + let result = true; + const remainingComparators = comparators.slice(); + let testComparator = remainingComparators.pop(); + while (result && remainingComparators.length) { + result = remainingComparators.every((otherComparator) => { + return testComparator.intersects(otherComparator, options); + }); + testComparator = remainingComparators.pop(); + } + return result; + }; + var parseComparator = (comp, options) => { + debug("comp", comp, options); + comp = replaceCarets(comp, options); + debug("caret", comp); + comp = replaceTildes(comp, options); + debug("tildes", comp); + comp = replaceXRanges(comp, options); + debug("xrange", comp); + comp = replaceStars(comp, options); + debug("stars", comp); + return comp; + }; + var isX = (id) => !id || id.toLowerCase() === "x" || id === "*"; + var replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((comp2) => { + return replaceTilde(comp2, options); + }).join(" "); + var replaceTilde = (comp, options) => { + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; + return comp.replace(r, (_, M, m, p, pr) => { + debug("tilde", comp, _, M, m, p, pr); + let ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = `>=${M}.0.0 <${+M + 1}.0.0-0`; + } else if (isX(p)) { + ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`; + } else if (pr) { + debug("replaceTilde pr", pr); + ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; + } else { + ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; + } + debug("tilde return", ret); + return ret; + }); + }; + var replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((comp2) => { + return replaceCaret(comp2, options); + }).join(" "); + var replaceCaret = (comp, options) => { + debug("caret", comp, options); + const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; + const z = options.includePrerelease ? "-0" : ""; + return comp.replace(r, (_, M, m, p, pr) => { + debug("caret", comp, _, M, m, p, pr); + let ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; + } else if (isX(p)) { + if (M === "0") { + ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; + } else { + ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`; + } + } else if (pr) { + debug("replaceCaret pr", pr); + if (M === "0") { + if (m === "0") { + ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`; + } else { + ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; + } + } else { + ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`; + } + } else { + debug("no pr"); + if (M === "0") { + if (m === "0") { + ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`; + } else { + ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`; + } + } else { + ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`; + } + } + debug("caret return", ret); + return ret; + }); + }; + var replaceXRanges = (comp, options) => { + debug("replaceXRanges", comp, options); + return comp.split(/\s+/).map((comp2) => { + return replaceXRange(comp2, options); + }).join(" "); + }; + var replaceXRange = (comp, options) => { + comp = comp.trim(); + const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; + return comp.replace(r, (ret, gtlt, M, m, p, pr) => { + debug("xRange", comp, ret, gtlt, M, m, p, pr); + const xM = isX(M); + const xm = xM || isX(m); + const xp = xm || isX(p); + const anyX = xp; + if (gtlt === "=" && anyX) { + gtlt = ""; + } + pr = options.includePrerelease ? "-0" : ""; + if (xM) { + if (gtlt === ">" || gtlt === "<") { + ret = "<0.0.0-0"; + } else { + ret = "*"; + } + } else if (gtlt && anyX) { + if (xm) { + m = 0; + } + p = 0; + if (gtlt === ">") { + gtlt = ">="; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else { + m = +m + 1; + p = 0; + } + } else if (gtlt === "<=") { + gtlt = "<"; + if (xm) { + M = +M + 1; + } else { + m = +m + 1; + } + } + if (gtlt === "<") + pr = "-0"; + ret = `${gtlt + M}.${m}.${p}${pr}`; + } else if (xm) { + ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`; + } else if (xp) { + ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`; + } + debug("xRange return", ret); + return ret; + }); + }; + var replaceStars = (comp, options) => { + debug("replaceStars", comp, options); + return comp.trim().replace(re[t.STAR], ""); + }; + var replaceGTE0 = (comp, options) => { + debug("replaceGTE0", comp, options); + return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ""); + }; + var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => { + if (isX(fM)) { + from = ""; + } else if (isX(fm)) { + from = `>=${fM}.0.0${incPr ? "-0" : ""}`; + } else if (isX(fp)) { + from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`; + } else if (fpr) { + from = `>=${from}`; + } else { + from = `>=${from}${incPr ? "-0" : ""}`; + } + if (isX(tM)) { + to = ""; + } else if (isX(tm)) { + to = `<${+tM + 1}.0.0-0`; + } else if (isX(tp)) { + to = `<${tM}.${+tm + 1}.0-0`; + } else if (tpr) { + to = `<=${tM}.${tm}.${tp}-${tpr}`; + } else if (incPr) { + to = `<${tM}.${tm}.${+tp + 1}-0`; + } else { + to = `<=${to}`; + } + return `${from} ${to}`.trim(); + }; + var testSet = (set, version, options) => { + for (let i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false; + } + } + if (version.prerelease.length && !options.includePrerelease) { + for (let i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === Comparator.ANY) { + continue; + } + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver; + if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) { + return true; + } + } + } + return false; + } + return true; + }; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/classes/comparator.js +var require_comparator = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/classes/comparator.js"(exports2, module2) { + var ANY = Symbol("SemVer ANY"); + var Comparator = class { + static get ANY() { + return ANY; + } + constructor(comp, options) { + options = parseOptions(options); + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp; + } else { + comp = comp.value; + } + } + debug("comparator", comp, options); + this.options = options; + this.loose = !!options.loose; + this.parse(comp); + if (this.semver === ANY) { + this.value = ""; + } else { + this.value = this.operator + this.semver.version; + } + debug("comp", this); + } + parse(comp) { + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; + const m = comp.match(r); + if (!m) { + throw new TypeError(`Invalid comparator: ${comp}`); + } + this.operator = m[1] !== void 0 ? m[1] : ""; + if (this.operator === "=") { + this.operator = ""; + } + if (!m[2]) { + this.semver = ANY; + } else { + this.semver = new SemVer(m[2], this.options.loose); + } + } + toString() { + return this.value; + } + test(version) { + debug("Comparator.test", version, this.options.loose); + if (this.semver === ANY || version === ANY) { + return true; + } + if (typeof version === "string") { + try { + version = new SemVer(version, this.options); + } catch (er) { + return false; + } + } + return cmp(version, this.operator, this.semver, this.options); + } + intersects(comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError("a Comparator is required"); + } + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + if (this.operator === "") { + if (this.value === "") { + return true; + } + return new Range(comp.value, options).test(this.value); + } else if (comp.operator === "") { + if (comp.value === "") { + return true; + } + return new Range(this.value, options).test(comp.semver); + } + const sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">"); + const sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<"); + const sameSemVer = this.semver.version === comp.semver.version; + const differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<="); + const oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && (this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<"); + const oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && (this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">"); + return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; + } + }; + module2.exports = Comparator; + var parseOptions = require_parse_options(); + var { re, t } = require_re(); + var cmp = require_cmp(); + var debug = require_debug(); + var SemVer = require_semver(); + var Range = require_range2(); + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/satisfies.js +var require_satisfies = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/satisfies.js"(exports2, module2) { + var Range = require_range2(); + var satisfies = (version, range, options) => { + try { + range = new Range(range, options); + } catch (er) { + return false; + } + return range.test(version); + }; + module2.exports = satisfies; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/to-comparators.js +var require_to_comparators = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/to-comparators.js"(exports2, module2) { + var Range = require_range2(); + var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); + module2.exports = toComparators; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/max-satisfying.js +var require_max_satisfying = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/max-satisfying.js"(exports2, module2) { + var SemVer = require_semver(); + var Range = require_range2(); + var maxSatisfying = (versions, range, options) => { + let max = null; + let maxSV = null; + let rangeObj = null; + try { + rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + if (!max || maxSV.compare(v) === -1) { + max = v; + maxSV = new SemVer(max, options); + } + } + }); + return max; + }; + module2.exports = maxSatisfying; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/min-satisfying.js +var require_min_satisfying = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/min-satisfying.js"(exports2, module2) { + var SemVer = require_semver(); + var Range = require_range2(); + var minSatisfying = (versions, range, options) => { + let min = null; + let minSV = null; + let rangeObj = null; + try { + rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + if (!min || minSV.compare(v) === 1) { + min = v; + minSV = new SemVer(min, options); + } + } + }); + return min; + }; + module2.exports = minSatisfying; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/min-version.js +var require_min_version = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/min-version.js"(exports2, module2) { + var SemVer = require_semver(); + var Range = require_range2(); + var gt = require_gt(); + var minVersion = (range, loose) => { + range = new Range(range, loose); + let minver = new SemVer("0.0.0"); + if (range.test(minver)) { + return minver; + } + minver = new SemVer("0.0.0-0"); + if (range.test(minver)) { + return minver; + } + minver = null; + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; + let setMin = null; + comparators.forEach((comparator) => { + const compver = new SemVer(comparator.semver.version); + switch (comparator.operator) { + case ">": + if (compver.prerelease.length === 0) { + compver.patch++; + } else { + compver.prerelease.push(0); + } + compver.raw = compver.format(); + case "": + case ">=": + if (!setMin || gt(compver, setMin)) { + setMin = compver; + } + break; + case "<": + case "<=": + break; + default: + throw new Error(`Unexpected operation: ${comparator.operator}`); + } + }); + if (setMin && (!minver || gt(minver, setMin))) + minver = setMin; + } + if (minver && range.test(minver)) { + return minver; + } + return null; + }; + module2.exports = minVersion; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/valid.js +var require_valid2 = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/valid.js"(exports2, module2) { + var Range = require_range2(); + var validRange = (range, options) => { + try { + return new Range(range, options).range || "*"; + } catch (er) { + return null; + } + }; + module2.exports = validRange; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/outside.js +var require_outside = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/outside.js"(exports2, module2) { + var SemVer = require_semver(); + var Comparator = require_comparator(); + var { ANY } = Comparator; + var Range = require_range2(); + var satisfies = require_satisfies(); + var gt = require_gt(); + var lt = require_lt(); + var lte = require_lte(); + var gte = require_gte(); + var outside = (version, range, hilo, options) => { + version = new SemVer(version, options); + range = new Range(range, options); + let gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case ">": + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = ">"; + ecomp = ">="; + break; + case "<": + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = "<"; + ecomp = "<="; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + if (satisfies(version, range, options)) { + return false; + } + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; + let high = null; + let low = null; + comparators.forEach((comparator) => { + if (comparator.semver === ANY) { + comparator = new Comparator(">=0.0.0"); + } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator; + } + }); + if (high.operator === comp || high.operator === ecomp) { + return false; + } + if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false; + } + } + return true; + }; + module2.exports = outside; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/gtr.js +var require_gtr = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/gtr.js"(exports2, module2) { + var outside = require_outside(); + var gtr = (version, range, options) => outside(version, range, ">", options); + module2.exports = gtr; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/ltr.js +var require_ltr = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/ltr.js"(exports2, module2) { + var outside = require_outside(); + var ltr = (version, range, options) => outside(version, range, "<", options); + module2.exports = ltr; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/intersects.js +var require_intersects = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/intersects.js"(exports2, module2) { + var Range = require_range2(); + var intersects = (r1, r2, options) => { + r1 = new Range(r1, options); + r2 = new Range(r2, options); + return r1.intersects(r2); + }; + module2.exports = intersects; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/simplify.js +var require_simplify = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/simplify.js"(exports2, module2) { + var satisfies = require_satisfies(); + var compare = require_compare(); + module2.exports = (versions, range, options) => { + const set = []; + let min = null; + let prev = null; + const v = versions.sort((a, b) => compare(a, b, options)); + for (const version of v) { + const included = satisfies(version, range, options); + if (included) { + prev = version; + if (!min) + min = version; + } else { + if (prev) { + set.push([min, prev]); + } + prev = null; + min = null; + } + } + if (min) + set.push([min, null]); + const ranges = []; + for (const [min2, max] of set) { + if (min2 === max) + ranges.push(min2); + else if (!max && min2 === v[0]) + ranges.push("*"); + else if (!max) + ranges.push(`>=${min2}`); + else if (min2 === v[0]) + ranges.push(`<=${max}`); + else + ranges.push(`${min2} - ${max}`); + } + const simplified = ranges.join(" || "); + const original = typeof range.raw === "string" ? range.raw : String(range); + return simplified.length < original.length ? simplified : range; + }; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/subset.js +var require_subset = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/subset.js"(exports2, module2) { + var Range = require_range2(); + var Comparator = require_comparator(); + var { ANY } = Comparator; + var satisfies = require_satisfies(); + var compare = require_compare(); + var subset = (sub, dom, options = {}) => { + if (sub === dom) + return true; + sub = new Range(sub, options); + dom = new Range(dom, options); + let sawNonNull = false; + OUTER: + for (const simpleSub of sub.set) { + for (const simpleDom of dom.set) { + const isSub = simpleSubset(simpleSub, simpleDom, options); + sawNonNull = sawNonNull || isSub !== null; + if (isSub) + continue OUTER; + } + if (sawNonNull) + return false; + } + return true; + }; + var simpleSubset = (sub, dom, options) => { + if (sub === dom) + return true; + if (sub.length === 1 && sub[0].semver === ANY) { + if (dom.length === 1 && dom[0].semver === ANY) + return true; + else if (options.includePrerelease) + sub = [new Comparator(">=0.0.0-0")]; + else + sub = [new Comparator(">=0.0.0")]; + } + if (dom.length === 1 && dom[0].semver === ANY) { + if (options.includePrerelease) + return true; + else + dom = [new Comparator(">=0.0.0")]; + } + const eqSet = new Set(); + let gt, lt; + for (const c of sub) { + if (c.operator === ">" || c.operator === ">=") + gt = higherGT(gt, c, options); + else if (c.operator === "<" || c.operator === "<=") + lt = lowerLT(lt, c, options); + else + eqSet.add(c.semver); + } + if (eqSet.size > 1) + return null; + let gtltComp; + if (gt && lt) { + gtltComp = compare(gt.semver, lt.semver, options); + if (gtltComp > 0) + return null; + else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) + return null; + } + for (const eq of eqSet) { + if (gt && !satisfies(eq, String(gt), options)) + return null; + if (lt && !satisfies(eq, String(lt), options)) + return null; + for (const c of dom) { + if (!satisfies(eq, String(c), options)) + return false; + } + return true; + } + let higher, lower; + let hasDomLT, hasDomGT; + let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false; + let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false; + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) { + needDomLTPre = false; + } + for (const c of dom) { + hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">="; + hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<="; + if (gt) { + if (needDomGTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) { + needDomGTPre = false; + } + } + if (c.operator === ">" || c.operator === ">=") { + higher = higherGT(gt, c, options); + if (higher === c && higher !== gt) + return false; + } else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) + return false; + } + if (lt) { + if (needDomLTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) { + needDomLTPre = false; + } + } + if (c.operator === "<" || c.operator === "<=") { + lower = lowerLT(lt, c, options); + if (lower === c && lower !== lt) + return false; + } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) + return false; + } + if (!c.operator && (lt || gt) && gtltComp !== 0) + return false; + } + if (gt && hasDomLT && !lt && gtltComp !== 0) + return false; + if (lt && hasDomGT && !gt && gtltComp !== 0) + return false; + if (needDomGTPre || needDomLTPre) + return false; + return true; + }; + var higherGT = (a, b, options) => { + if (!a) + return b; + const comp = compare(a.semver, b.semver, options); + return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a; + }; + var lowerLT = (a, b, options) => { + if (!a) + return b; + const comp = compare(a.semver, b.semver, options); + return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a; + }; + module2.exports = subset; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/index.js +var require_semver2 = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/index.js"(exports2, module2) { + var internalRe = require_re(); + module2.exports = { + re: internalRe.re, + src: internalRe.src, + tokens: internalRe.t, + SEMVER_SPEC_VERSION: require_constants3().SEMVER_SPEC_VERSION, + SemVer: require_semver(), + compareIdentifiers: require_identifiers().compareIdentifiers, + rcompareIdentifiers: require_identifiers().rcompareIdentifiers, + parse: require_parse(), + valid: require_valid(), + clean: require_clean(), + inc: require_inc(), + diff: require_diff(), + major: require_major(), + minor: require_minor(), + patch: require_patch(), + prerelease: require_prerelease(), + compare: require_compare(), + rcompare: require_rcompare(), + compareLoose: require_compare_loose(), + compareBuild: require_compare_build(), + sort: require_sort2(), + rsort: require_rsort(), + gt: require_gt(), + lt: require_lt(), + eq: require_eq(), + neq: require_neq(), + gte: require_gte(), + lte: require_lte(), + cmp: require_cmp(), + coerce: require_coerce(), + Comparator: require_comparator(), + Range: require_range2(), + satisfies: require_satisfies(), + toComparators: require_to_comparators(), + maxSatisfying: require_max_satisfying(), + minSatisfying: require_min_satisfying(), + minVersion: require_min_version(), + validRange: require_valid2(), + outside: require_outside(), + gtr: require_gtr(), + ltr: require_ltr(), + intersects: require_intersects(), + simplifyRange: require_simplify(), + subset: require_subset() + }; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_objectAssign.js +var require_objectAssign = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_objectAssign.js"(exports2, module2) { + var _has = require_has(); + function _objectAssign(target) { + if (target == null) { + throw new TypeError("Cannot convert undefined or null to object"); + } + var output = Object(target); + var idx = 1; + var length = arguments.length; + while (idx < length) { + var source = arguments[idx]; + if (source != null) { + for (var nextKey in source) { + if (_has(nextKey, source)) { + output[nextKey] = source[nextKey]; + } + } + } + idx += 1; + } + return output; + } + module2.exports = typeof Object.assign === "function" ? Object.assign : _objectAssign; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/merge.js +var require_merge3 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/merge.js"(exports2, module2) { + var _objectAssign = require_objectAssign(); + var _curry2 = require_curry2(); + var merge = /* @__PURE__ */ _curry2(function merge2(l, r) { + return _objectAssign({}, l, r); + }); + module2.exports = merge; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_indexOf.js +var require_indexOf = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_indexOf.js"(exports2, module2) { + var equals = require_equals2(); + function _indexOf(list, a, idx) { + var inf, item; + if (typeof list.indexOf === "function") { + switch (typeof a) { + case "number": + if (a === 0) { + inf = 1 / a; + while (idx < list.length) { + item = list[idx]; + if (item === 0 && 1 / item === inf) { + return idx; + } + idx += 1; + } + return -1; + } else if (a !== a) { + while (idx < list.length) { + item = list[idx]; + if (typeof item === "number" && item !== item) { + return idx; + } + idx += 1; + } + return -1; + } + return list.indexOf(a, idx); + case "string": + case "boolean": + case "function": + case "undefined": + return list.indexOf(a, idx); + case "object": + if (a === null) { + return list.indexOf(a, idx); + } + } + } + while (idx < list.length) { + if (equals(list[idx], a)) { + return idx; + } + idx += 1; + } + return -1; + } + module2.exports = _indexOf; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_includes.js +var require_includes = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_includes.js"(exports2, module2) { + var _indexOf = require_indexOf(); + function _includes(a, list) { + return _indexOf(list, a, 0) >= 0; + } + module2.exports = _includes; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_Set.js +var require_Set = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_Set.js"(exports2, module2) { + var _includes = require_includes(); + var _Set = /* @__PURE__ */ function() { + function _Set2() { + this._nativeSet = typeof Set === "function" ? new Set() : null; + this._items = {}; + } + _Set2.prototype.add = function(item) { + return !hasOrAdd(item, true, this); + }; + _Set2.prototype.has = function(item) { + return hasOrAdd(item, false, this); + }; + return _Set2; + }(); + function hasOrAdd(item, shouldAdd, set) { + var type = typeof item; + var prevSize, newSize; + switch (type) { + case "string": + case "number": + if (item === 0 && 1 / item === -Infinity) { + if (set._items["-0"]) { + return true; + } else { + if (shouldAdd) { + set._items["-0"] = true; + } + return false; + } + } + if (set._nativeSet !== null) { + if (shouldAdd) { + prevSize = set._nativeSet.size; + set._nativeSet.add(item); + newSize = set._nativeSet.size; + return newSize === prevSize; + } else { + return set._nativeSet.has(item); + } + } else { + if (!(type in set._items)) { + if (shouldAdd) { + set._items[type] = {}; + set._items[type][item] = true; + } + return false; + } else if (item in set._items[type]) { + return true; + } else { + if (shouldAdd) { + set._items[type][item] = true; + } + return false; + } + } + case "boolean": + if (type in set._items) { + var bIdx = item ? 1 : 0; + if (set._items[type][bIdx]) { + return true; + } else { + if (shouldAdd) { + set._items[type][bIdx] = true; + } + return false; + } + } else { + if (shouldAdd) { + set._items[type] = item ? [false, true] : [true, false]; + } + return false; + } + case "function": + if (set._nativeSet !== null) { + if (shouldAdd) { + prevSize = set._nativeSet.size; + set._nativeSet.add(item); + newSize = set._nativeSet.size; + return newSize === prevSize; + } else { + return set._nativeSet.has(item); + } + } else { + if (!(type in set._items)) { + if (shouldAdd) { + set._items[type] = [item]; + } + return false; + } + if (!_includes(item, set._items[type])) { + if (shouldAdd) { + set._items[type].push(item); + } + return false; + } + return true; + } + case "undefined": + if (set._items[type]) { + return true; + } else { + if (shouldAdd) { + set._items[type] = true; + } + return false; + } + case "object": + if (item === null) { + if (!set._items["null"]) { + if (shouldAdd) { + set._items["null"] = true; + } + return false; + } + return true; + } + default: + type = Object.prototype.toString.call(item); + if (!(type in set._items)) { + if (shouldAdd) { + set._items[type] = [item]; + } + return false; + } + if (!_includes(item, set._items[type])) { + if (shouldAdd) { + set._items[type].push(item); + } + return false; + } + return true; + } + } + module2.exports = _Set; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/difference.js +var require_difference = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/difference.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _Set = require_Set(); + var difference = /* @__PURE__ */ _curry2(function difference2(first, second) { + var out = []; + var idx = 0; + var firstLen = first.length; + var secondLen = second.length; + var toFilterOut = new _Set(); + for (var i = 0; i < secondLen; i += 1) { + toFilterOut.add(second[i]); + } + while (idx < firstLen) { + if (toFilterOut.add(first[idx])) { + out[out.length] = first[idx]; + } + idx += 1; + } + return out; + }); + module2.exports = difference; + } +}); + +// ../default-reporter/lib/reporterForClient/pkgsDiff.js +var require_pkgsDiff = __commonJS({ + "../default-reporter/lib/reporterForClient/pkgsDiff.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.propertyByDependencyType = void 0; + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var merge_1 = __importDefault(require_merge3()); + var difference_1 = __importDefault(require_difference()); + exports2.propertyByDependencyType = { + dev: "devDependencies", + nodeModulesOnly: "node_modules", + optional: "optionalDependencies", + peer: "peerDependencies", + prod: "dependencies" + }; + function default_1(log$, opts) { + const deprecationSet$ = log$.deprecation.pipe(operators_1.filter((log2) => log2.prefix === opts.prefix), operators_1.scan((acc, log2) => { + acc.add(log2.pkgId); + return acc; + }, new Set()), operators_1.startWith(new Set())); + const filterPrefix = operators_1.filter((log2) => log2.prefix === opts.prefix); + const pkgsDiff$ = Rx.combineLatest(log$.root.pipe(filterPrefix), deprecationSet$).pipe(operators_1.scan((pkgsDiff, args2) => { + const rootLog = args2[0]; + const deprecationSet = args2[1]; + if (rootLog["added"]) { + pkgsDiff[rootLog["added"].dependencyType || "nodeModulesOnly"][`+${rootLog["added"].name}`] = { + added: true, + deprecated: deprecationSet.has(rootLog["added"].id), + from: rootLog["added"].linkedFrom, + latest: rootLog["added"].latest, + name: rootLog["added"].name, + realName: rootLog["added"].realName, + version: rootLog["added"].version + }; + return pkgsDiff; + } + if (rootLog["removed"]) { + pkgsDiff[rootLog["removed"].dependencyType || "nodeModulesOnly"][`-${rootLog["removed"].name}`] = { + added: false, + name: rootLog["removed"].name, + version: rootLog["removed"].version + }; + return pkgsDiff; + } + return pkgsDiff; + }, { + dev: {}, + nodeModulesOnly: {}, + optional: {}, + peer: {}, + prod: {} + }), operators_1.startWith({ + dev: {}, + nodeModulesOnly: {}, + optional: {}, + peer: {}, + prod: {} + })); + const packageManifest$ = Rx.merge(log$.packageManifest.pipe(filterPrefix), log$.summary.pipe(filterPrefix, operators_1.mapTo({}))).pipe(operators_1.take(2), operators_1.reduce(merge_1.default, {})); + return Rx.combineLatest(pkgsDiff$, packageManifest$).pipe(operators_1.map(([pkgsDiff, packageManifests]) => { + if (packageManifests["initial"] == null || packageManifests["updated"] == null) + return pkgsDiff; + const initialPackageManifest = removeOptionalFromProdDeps(packageManifests["initial"]); + const updatedPackageManifest = removeOptionalFromProdDeps(packageManifests["updated"]); + for (const depType of ["peer", "prod", "optional", "dev"]) { + const prop = exports2.propertyByDependencyType[depType]; + const initialDeps = Object.keys(initialPackageManifest[prop] || {}); + const updatedDeps = Object.keys(updatedPackageManifest[prop] || {}); + const removedDeps = difference_1.default(initialDeps, updatedDeps); + for (const removedDep of removedDeps) { + if (!pkgsDiff[depType][`-${removedDep}`]) { + pkgsDiff[depType][`-${removedDep}`] = { + added: false, + name: removedDep, + version: initialPackageManifest[prop][removedDep] + }; + } + } + const addedDeps = difference_1.default(updatedDeps, initialDeps); + for (const addedDep of addedDeps) { + if (!pkgsDiff[depType][`+${addedDep}`]) { + pkgsDiff[depType][`+${addedDep}`] = { + added: true, + name: addedDep, + version: updatedPackageManifest[prop][addedDep] + }; + } + } + } + return pkgsDiff; + })); + } + exports2.default = default_1; + function removeOptionalFromProdDeps(pkg) { + if (pkg.dependencies == null || pkg.optionalDependencies == null) + return pkg; + for (const depName of Object.keys(pkg.dependencies)) { + if (pkg.optionalDependencies[depName]) { + delete pkg.dependencies[depName]; + } + } + return pkg; + } + } +}); + +// ../default-reporter/lib/reporterForClient/reportSummary.js +var require_reportSummary = __commonJS({ + "../default-reporter/lib/reporterForClient/reportSummary.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var chalk_1 = __importDefault(require_source()); + var semver_1 = __importDefault(require_semver2()); + var constants_1 = require_constants2(); + var pkgsDiff_1 = __importStar2(require_pkgsDiff()); + var outputConstants_1 = require_outputConstants(); + exports2.default = (log$, opts) => { + const pkgsDiff$ = pkgsDiff_1.default(log$, { prefix: opts.cwd }); + const summaryLog$ = log$.summary.pipe(operators_1.take(1)); + return Rx.combineLatest(pkgsDiff$, summaryLog$).pipe(operators_1.take(1), operators_1.map(([pkgsDiff]) => { + var _a; + let msg = ""; + for (const depType of ["prod", "optional", "peer", "dev", "nodeModulesOnly"]) { + const diffs = Object.values(pkgsDiff[depType]); + if (diffs.length > 0) { + msg += constants_1.EOL; + if ((_a = opts.pnpmConfig) === null || _a === void 0 ? void 0 : _a.global) { + msg += chalk_1.default.cyanBright(`${opts.cwd}:`); + } else { + msg += chalk_1.default.cyanBright(`${pkgsDiff_1.propertyByDependencyType[depType]}:`); + } + msg += constants_1.EOL; + msg += printDiffs(diffs, { prefix: opts.cwd }); + msg += constants_1.EOL; + } + } + return Rx.of({ msg }); + })); + }; + function printDiffs(pkgsDiff, opts) { + pkgsDiff.sort((a, b) => a.name.localeCompare(b.name) * 10 + (Number(!b.added) - Number(!a.added))); + const msg = pkgsDiff.map((pkg) => { + let result = pkg.added ? outputConstants_1.ADDED_CHAR : outputConstants_1.REMOVED_CHAR; + if (!pkg.realName || pkg.name === pkg.realName) { + result += ` ${pkg.name}`; + } else { + result += ` ${pkg.name} <- ${pkg.realName}`; + } + if (pkg.version) { + result += ` ${chalk_1.default.grey(pkg.version)}`; + if (pkg.latest && semver_1.default.lt(pkg.version, pkg.latest)) { + result += ` ${chalk_1.default.grey(`(${pkg.latest} is available)`)}`; + } + } + if (pkg.deprecated) { + result += ` ${chalk_1.default.red("deprecated")}`; + } + if (pkg.from) { + result += ` ${chalk_1.default.grey(`<- ${pkg.from && path_1.default.relative(opts.prefix, pkg.from) || "???"}`)}`; + } + return result; + }).join(constants_1.EOL); + return msg; + } + } +}); + +// ../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js +var require_is_fullwidth_code_point = __commonJS({ + "../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js"(exports2, module2) { + "use strict"; + var isFullwidthCodePoint = (codePoint) => { + if (Number.isNaN(codePoint)) { + return false; + } + if (codePoint >= 4352 && (codePoint <= 4447 || codePoint === 9001 || codePoint === 9002 || 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || 12880 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65131 || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 262141)) { + return true; + } + return false; + }; + module2.exports = isFullwidthCodePoint; + module2.exports.default = isFullwidthCodePoint; + } +}); + +// ../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js +var require_emoji_regex = __commonJS({ + "../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js"(exports2, module2) { + "use strict"; + module2.exports = function() { + return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; + }; + } +}); + +// ../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js +var require_string_width = __commonJS({ + "../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(exports2, module2) { + "use strict"; + var stripAnsi = require_strip_ansi(); + var isFullwidthCodePoint = require_is_fullwidth_code_point(); + var emojiRegex = require_emoji_regex(); + var stringWidth = (string) => { + if (typeof string !== "string" || string.length === 0) { + return 0; + } + string = stripAnsi(string); + if (string.length === 0) { + return 0; + } + string = string.replace(emojiRegex(), " "); + let width = 0; + for (let i = 0; i < string.length; i++) { + const code = string.codePointAt(i); + if (code <= 31 || code >= 127 && code <= 159) { + continue; + } + if (code >= 768 && code <= 879) { + continue; + } + if (code > 65535) { + i++; + } + width += isFullwidthCodePoint(code) ? 2 : 1; + } + return width; + }; + module2.exports = stringWidth; + module2.exports.default = stringWidth; + } +}); + +// ../../node_modules/.pnpm/widest-line@3.1.0/node_modules/widest-line/index.js +var require_widest_line = __commonJS({ + "../../node_modules/.pnpm/widest-line@3.1.0/node_modules/widest-line/index.js"(exports2, module2) { + "use strict"; + var stringWidth = require_string_width(); + var widestLine = (input) => { + let max = 0; + for (const line of input.split("\n")) { + max = Math.max(max, stringWidth(line)); + } + return max; + }; + module2.exports = widestLine; + module2.exports.default = widestLine; + } +}); + +// ../../node_modules/.pnpm/cli-boxes@2.2.1/node_modules/cli-boxes/boxes.json +var require_boxes = __commonJS({ + "../../node_modules/.pnpm/cli-boxes@2.2.1/node_modules/cli-boxes/boxes.json"(exports2, module2) { + module2.exports = { + single: { + topLeft: "\u250C", + topRight: "\u2510", + bottomRight: "\u2518", + bottomLeft: "\u2514", + vertical: "\u2502", + horizontal: "\u2500" + }, + double: { + topLeft: "\u2554", + topRight: "\u2557", + bottomRight: "\u255D", + bottomLeft: "\u255A", + vertical: "\u2551", + horizontal: "\u2550" + }, + round: { + topLeft: "\u256D", + topRight: "\u256E", + bottomRight: "\u256F", + bottomLeft: "\u2570", + vertical: "\u2502", + horizontal: "\u2500" + }, + bold: { + topLeft: "\u250F", + topRight: "\u2513", + bottomRight: "\u251B", + bottomLeft: "\u2517", + vertical: "\u2503", + horizontal: "\u2501" + }, + singleDouble: { + topLeft: "\u2553", + topRight: "\u2556", + bottomRight: "\u255C", + bottomLeft: "\u2559", + vertical: "\u2551", + horizontal: "\u2500" + }, + doubleSingle: { + topLeft: "\u2552", + topRight: "\u2555", + bottomRight: "\u255B", + bottomLeft: "\u2558", + vertical: "\u2502", + horizontal: "\u2550" + }, + classic: { + topLeft: "+", + topRight: "+", + bottomRight: "+", + bottomLeft: "+", + vertical: "|", + horizontal: "-" + } + }; + } +}); + +// ../../node_modules/.pnpm/cli-boxes@2.2.1/node_modules/cli-boxes/index.js +var require_cli_boxes = __commonJS({ + "../../node_modules/.pnpm/cli-boxes@2.2.1/node_modules/cli-boxes/index.js"(exports2, module2) { + "use strict"; + var cliBoxes = require_boxes(); + module2.exports = cliBoxes; + module2.exports.default = cliBoxes; + } +}); + +// ../../node_modules/.pnpm/ansi-regex@4.1.0/node_modules/ansi-regex/index.js +var require_ansi_regex3 = __commonJS({ + "../../node_modules/.pnpm/ansi-regex@4.1.0/node_modules/ansi-regex/index.js"(exports2, module2) { + "use strict"; + module2.exports = (options) => { + options = Object.assign({ + onlyFirst: false + }, options); + const pattern = [ + "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", + "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))" + ].join("|"); + return new RegExp(pattern, options.onlyFirst ? void 0 : "g"); + }; + } +}); + +// ../../node_modules/.pnpm/strip-ansi@5.2.0/node_modules/strip-ansi/index.js +var require_strip_ansi2 = __commonJS({ + "../../node_modules/.pnpm/strip-ansi@5.2.0/node_modules/strip-ansi/index.js"(exports2, module2) { + "use strict"; + var ansiRegex = require_ansi_regex3(); + var stripAnsi = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string; + module2.exports = stripAnsi; + module2.exports.default = stripAnsi; + } +}); + +// ../../node_modules/.pnpm/is-fullwidth-code-point@2.0.0/node_modules/is-fullwidth-code-point/index.js +var require_is_fullwidth_code_point2 = __commonJS({ + "../../node_modules/.pnpm/is-fullwidth-code-point@2.0.0/node_modules/is-fullwidth-code-point/index.js"(exports2, module2) { + "use strict"; + module2.exports = (x) => { + if (Number.isNaN(x)) { + return false; + } + if (x >= 4352 && (x <= 4447 || x === 9001 || x === 9002 || 11904 <= x && x <= 12871 && x !== 12351 || 12880 <= x && x <= 19903 || 19968 <= x && x <= 42182 || 43360 <= x && x <= 43388 || 44032 <= x && x <= 55203 || 63744 <= x && x <= 64255 || 65040 <= x && x <= 65049 || 65072 <= x && x <= 65131 || 65281 <= x && x <= 65376 || 65504 <= x && x <= 65510 || 110592 <= x && x <= 110593 || 127488 <= x && x <= 127569 || 131072 <= x && x <= 262141)) { + return true; + } + return false; + }; + } +}); + +// ../../node_modules/.pnpm/emoji-regex@7.0.3/node_modules/emoji-regex/index.js +var require_emoji_regex2 = __commonJS({ + "../../node_modules/.pnpm/emoji-regex@7.0.3/node_modules/emoji-regex/index.js"(exports2, module2) { + "use strict"; + module2.exports = function() { + return /\uD83C\uDFF4(?:\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74)\uDB40\uDC7F|\u200D\u2620\uFE0F)|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3]))|\uD83D\uDC69\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83D\uDC69\u200D[\u2695\u2696\u2708])\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC68(?:\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDD1-\uDDDD])/g; + }; + } +}); + +// ../../node_modules/.pnpm/string-width@3.1.0/node_modules/string-width/index.js +var require_string_width2 = __commonJS({ + "../../node_modules/.pnpm/string-width@3.1.0/node_modules/string-width/index.js"(exports2, module2) { + "use strict"; + var stripAnsi = require_strip_ansi2(); + var isFullwidthCodePoint = require_is_fullwidth_code_point2(); + var emojiRegex = require_emoji_regex2()(); + module2.exports = (input) => { + input = input.replace(emojiRegex, " "); + if (typeof input !== "string" || input.length === 0) { + return 0; + } + input = stripAnsi(input); + let width = 0; + for (let i = 0; i < input.length; i++) { + const code = input.codePointAt(i); + if (code <= 31 || code >= 127 && code <= 159) { + continue; + } + if (code >= 768 && code <= 879) { + continue; + } + if (code > 65535) { + i++; + } + width += isFullwidthCodePoint(code) ? 2 : 1; + } + return width; + }; + } +}); + +// ../../node_modules/.pnpm/ansi-align@3.0.0/node_modules/ansi-align/index.js +var require_ansi_align = __commonJS({ + "../../node_modules/.pnpm/ansi-align@3.0.0/node_modules/ansi-align/index.js"(exports2, module2) { + "use strict"; + var stringWidth = require_string_width2(); + function ansiAlign(text, opts) { + if (!text) + return text; + opts = opts || {}; + const align = opts.align || "center"; + if (align === "left") + return text; + const split = opts.split || "\n"; + const pad = opts.pad || " "; + const widthDiffFn = align !== "right" ? halfDiff : fullDiff; + let returnString = false; + if (!Array.isArray(text)) { + returnString = true; + text = String(text).split(split); + } + let width; + let maxWidth = 0; + text = text.map(function(str) { + str = String(str); + width = stringWidth(str); + maxWidth = Math.max(width, maxWidth); + return { + str, + width + }; + }).map(function(obj) { + return new Array(widthDiffFn(maxWidth, obj.width) + 1).join(pad) + obj.str; + }); + return returnString ? text.join(split) : text; + } + ansiAlign.left = function left(text) { + return ansiAlign(text, { align: "left" }); + }; + ansiAlign.center = function center(text) { + return ansiAlign(text, { align: "center" }); + }; + ansiAlign.right = function right(text) { + return ansiAlign(text, { align: "right" }); + }; + module2.exports = ansiAlign; + function halfDiff(maxWidth, curWidth) { + return Math.floor((maxWidth - curWidth) / 2); + } + function fullDiff(maxWidth, curWidth) { + return maxWidth - curWidth; + } + } +}); + +// ../../node_modules/.pnpm/wrap-ansi@7.0.0/node_modules/wrap-ansi/index.js +var require_wrap_ansi = __commonJS({ + "../../node_modules/.pnpm/wrap-ansi@7.0.0/node_modules/wrap-ansi/index.js"(exports2, module2) { + "use strict"; + var stringWidth = require_string_width(); + var stripAnsi = require_strip_ansi(); + var ansiStyles = require_ansi_styles2(); + var ESCAPES = new Set([ + "", + "\x9B" + ]); + var END_CODE = 39; + var ANSI_ESCAPE_BELL = "\x07"; + var ANSI_CSI = "["; + var ANSI_OSC = "]"; + var ANSI_SGR_TERMINATOR = "m"; + var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`; + var wrapAnsi = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`; + var wrapAnsiHyperlink = (uri) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`; + var wordLengths = (string) => string.split(" ").map((character) => stringWidth(character)); + var wrapWord = (rows, word, columns) => { + const characters = [...word]; + let isInsideEscape = false; + let isInsideLinkEscape = false; + let visible = stringWidth(stripAnsi(rows[rows.length - 1])); + for (const [index, character] of characters.entries()) { + const characterLength = stringWidth(character); + if (visible + characterLength <= columns) { + rows[rows.length - 1] += character; + } else { + rows.push(character); + visible = 0; + } + if (ESCAPES.has(character)) { + isInsideEscape = true; + isInsideLinkEscape = characters.slice(index + 1).join("").startsWith(ANSI_ESCAPE_LINK); + } + if (isInsideEscape) { + if (isInsideLinkEscape) { + if (character === ANSI_ESCAPE_BELL) { + isInsideEscape = false; + isInsideLinkEscape = false; + } + } else if (character === ANSI_SGR_TERMINATOR) { + isInsideEscape = false; + } + continue; + } + visible += characterLength; + if (visible === columns && index < characters.length - 1) { + rows.push(""); + visible = 0; + } + } + if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) { + rows[rows.length - 2] += rows.pop(); + } + }; + var stringVisibleTrimSpacesRight = (string) => { + const words = string.split(" "); + let last = words.length; + while (last > 0) { + if (stringWidth(words[last - 1]) > 0) { + break; + } + last--; + } + if (last === words.length) { + return string; + } + return words.slice(0, last).join(" ") + words.slice(last).join(""); + }; + var exec = (string, columns, options = {}) => { + if (options.trim !== false && string.trim() === "") { + return ""; + } + let returnValue = ""; + let escapeCode; + let escapeUrl; + const lengths = wordLengths(string); + let rows = [""]; + for (const [index, word] of string.split(" ").entries()) { + if (options.trim !== false) { + rows[rows.length - 1] = rows[rows.length - 1].trimStart(); + } + let rowLength = stringWidth(rows[rows.length - 1]); + if (index !== 0) { + if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) { + rows.push(""); + rowLength = 0; + } + if (rowLength > 0 || options.trim === false) { + rows[rows.length - 1] += " "; + rowLength++; + } + } + if (options.hard && lengths[index] > columns) { + const remainingColumns = columns - rowLength; + const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns); + const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns); + if (breaksStartingNextLine < breaksStartingThisLine) { + rows.push(""); + } + wrapWord(rows, word, columns); + continue; + } + if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) { + if (options.wordWrap === false && rowLength < columns) { + wrapWord(rows, word, columns); + continue; + } + rows.push(""); + } + if (rowLength + lengths[index] > columns && options.wordWrap === false) { + wrapWord(rows, word, columns); + continue; + } + rows[rows.length - 1] += word; + } + if (options.trim !== false) { + rows = rows.map(stringVisibleTrimSpacesRight); + } + const pre = [...rows.join("\n")]; + for (const [index, character] of pre.entries()) { + returnValue += character; + if (ESCAPES.has(character)) { + const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?\\d+)m|\\${ANSI_ESCAPE_LINK}(?.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join("")) || { groups: {} }; + if (groups.code !== void 0) { + const code2 = Number.parseFloat(groups.code); + escapeCode = code2 === END_CODE ? void 0 : code2; + } else if (groups.uri !== void 0) { + escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri; + } + } + const code = ansiStyles.codes.get(Number(escapeCode)); + if (pre[index + 1] === "\n") { + if (escapeUrl) { + returnValue += wrapAnsiHyperlink(""); + } + if (escapeCode && code) { + returnValue += wrapAnsi(code); + } + } else if (character === "\n") { + if (escapeCode && code) { + returnValue += wrapAnsi(escapeCode); + } + if (escapeUrl) { + returnValue += wrapAnsiHyperlink(escapeUrl); + } + } + } + return returnValue; + }; + module2.exports = (string, columns, options) => { + return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line) => exec(line, columns, options)).join("\n"); + }; + } +}); + +// ../../node_modules/.pnpm/boxen@5.1.2/node_modules/boxen/index.js +var require_boxen = __commonJS({ + "../../node_modules/.pnpm/boxen@5.1.2/node_modules/boxen/index.js"(exports2, module2) { + "use strict"; + var stringWidth = require_string_width(); + var chalk = require_source(); + var widestLine = require_widest_line(); + var cliBoxes = require_cli_boxes(); + var camelCase = require_camelcase(); + var ansiAlign = require_ansi_align(); + var wrapAnsi = require_wrap_ansi(); + var NL = "\n"; + var PAD = " "; + var terminalColumns = () => { + const { env, stdout, stderr } = process; + if (stdout && stdout.columns) { + return stdout.columns; + } + if (stderr && stderr.columns) { + return stderr.columns; + } + if (env.COLUMNS) { + return Number.parseInt(env.COLUMNS, 10); + } + return 80; + }; + var getObject = (detail) => { + return typeof detail === "number" ? { + top: detail, + right: detail * 3, + bottom: detail, + left: detail * 3 + } : { + top: 0, + right: 0, + bottom: 0, + left: 0, + ...detail + }; + }; + var getBorderChars = (borderStyle) => { + const sides = [ + "topLeft", + "topRight", + "bottomRight", + "bottomLeft", + "vertical", + "horizontal" + ]; + let chararacters; + if (typeof borderStyle === "string") { + chararacters = cliBoxes[borderStyle]; + if (!chararacters) { + throw new TypeError(`Invalid border style: ${borderStyle}`); + } + } else { + for (const side of sides) { + if (!borderStyle[side] || typeof borderStyle[side] !== "string") { + throw new TypeError(`Invalid border style: ${side}`); + } + } + chararacters = borderStyle; + } + return chararacters; + }; + var makeTitle = (text, horizontal, alignement) => { + let title = ""; + const textWidth = stringWidth(text); + switch (alignement) { + case "left": + title = text + horizontal.slice(textWidth); + break; + case "right": + title = horizontal.slice(textWidth) + text; + break; + default: + horizontal = horizontal.slice(textWidth); + if (horizontal.length % 2 === 1) { + horizontal = horizontal.slice(Math.floor(horizontal.length / 2)); + title = horizontal.slice(1) + text + horizontal; + } else { + horizontal = horizontal.slice(horizontal.length / 2); + title = horizontal + text + horizontal; + } + break; + } + return title; + }; + var makeContentText = (text, padding, columns, align) => { + text = ansiAlign(text, { align }); + let lines = text.split(NL); + const textWidth = widestLine(text); + const max = columns - padding.left - padding.right; + if (textWidth > max) { + const newLines = []; + for (const line of lines) { + const createdLines = wrapAnsi(line, max, { hard: true }); + const alignedLines = ansiAlign(createdLines, { align }); + const alignedLinesArray = alignedLines.split("\n"); + const longestLength = Math.max(...alignedLinesArray.map((s) => stringWidth(s))); + for (const alignedLine of alignedLinesArray) { + let paddedLine; + switch (align) { + case "center": + paddedLine = PAD.repeat((max - longestLength) / 2) + alignedLine; + break; + case "right": + paddedLine = PAD.repeat(max - longestLength) + alignedLine; + break; + default: + paddedLine = alignedLine; + break; + } + newLines.push(paddedLine); + } + } + lines = newLines; + } + if (align === "center" && textWidth < max) { + lines = lines.map((line) => PAD.repeat((max - textWidth) / 2) + line); + } else if (align === "right" && textWidth < max) { + lines = lines.map((line) => PAD.repeat(max - textWidth) + line); + } + const paddingLeft = PAD.repeat(padding.left); + const paddingRight = PAD.repeat(padding.right); + lines = lines.map((line) => paddingLeft + line + paddingRight); + lines = lines.map((line) => { + if (columns - stringWidth(line) > 0) { + switch (align) { + case "center": + return line + PAD.repeat(columns - stringWidth(line)); + case "right": + return line + PAD.repeat(columns - stringWidth(line)); + default: + return line + PAD.repeat(columns - stringWidth(line)); + } + } + return line; + }); + if (padding.top > 0) { + lines = new Array(padding.top).fill(PAD.repeat(columns)).concat(lines); + } + if (padding.bottom > 0) { + lines = lines.concat(new Array(padding.bottom).fill(PAD.repeat(columns))); + } + return lines.join(NL); + }; + var isHex = (color) => color.match(/^#(?:[0-f]{3}){1,2}$/i); + var isColorValid = (color) => typeof color === "string" && (chalk[color] || isHex(color)); + var getColorFn = (color) => isHex(color) ? chalk.hex(color) : chalk[color]; + var getBGColorFn = (color) => isHex(color) ? chalk.bgHex(color) : chalk[camelCase(["bg", color])]; + module2.exports = (text, options) => { + options = { + padding: 0, + borderStyle: "single", + dimBorder: false, + textAlignment: "left", + float: "left", + titleAlignment: "left", + ...options + }; + if (options.align) { + options.textAlignment = options.align; + } + const BORDERS_WIDTH = 2; + if (options.borderColor && !isColorValid(options.borderColor)) { + throw new Error(`${options.borderColor} is not a valid borderColor`); + } + if (options.backgroundColor && !isColorValid(options.backgroundColor)) { + throw new Error(`${options.backgroundColor} is not a valid backgroundColor`); + } + const chars = getBorderChars(options.borderStyle); + const padding = getObject(options.padding); + const margin = getObject(options.margin); + const colorizeBorder = (border) => { + const newBorder = options.borderColor ? getColorFn(options.borderColor)(border) : border; + return options.dimBorder ? chalk.dim(newBorder) : newBorder; + }; + const colorizeContent = (content) => options.backgroundColor ? getBGColorFn(options.backgroundColor)(content) : content; + const columns = terminalColumns(); + let contentWidth = widestLine(wrapAnsi(text, columns - BORDERS_WIDTH, { hard: true, trim: false })) + padding.left + padding.right; + let title = options.title && options.title.slice(0, columns - 4 - margin.left - margin.right); + if (title) { + title = ` ${title} `; + if (stringWidth(title) > contentWidth) { + contentWidth = stringWidth(title); + } + } + if (margin.left && margin.right && contentWidth + BORDERS_WIDTH + margin.left + margin.right > columns) { + const spaceForMargins = columns - contentWidth - BORDERS_WIDTH; + const multiplier = spaceForMargins / (margin.left + margin.right); + margin.left = Math.max(0, Math.floor(margin.left * multiplier)); + margin.right = Math.max(0, Math.floor(margin.right * multiplier)); + } + contentWidth = Math.min(contentWidth, columns - BORDERS_WIDTH - margin.left - margin.right); + text = makeContentText(text, padding, contentWidth, options.textAlignment); + let marginLeft = PAD.repeat(margin.left); + if (options.float === "center") { + const marginWidth = Math.max((columns - contentWidth - BORDERS_WIDTH) / 2, 0); + marginLeft = PAD.repeat(marginWidth); + } else if (options.float === "right") { + const marginWidth = Math.max(columns - contentWidth - margin.right - BORDERS_WIDTH, 0); + marginLeft = PAD.repeat(marginWidth); + } + const horizontal = chars.horizontal.repeat(contentWidth); + const top = colorizeBorder(NL.repeat(margin.top) + marginLeft + chars.topLeft + (title ? makeTitle(title, horizontal, options.titleAlignment) : horizontal) + chars.topRight); + const bottom = colorizeBorder(marginLeft + chars.bottomLeft + horizontal + chars.bottomRight + NL.repeat(margin.bottom)); + const side = colorizeBorder(chars.vertical); + const LINE_SEPARATOR = contentWidth + BORDERS_WIDTH + margin.left >= columns ? "" : NL; + const lines = text.split(NL); + const middle = lines.map((line) => { + return marginLeft + side + colorizeContent(line) + side; + }).join(LINE_SEPARATOR); + return top + LINE_SEPARATOR + middle + LINE_SEPARATOR + bottom; + }; + module2.exports._borderStyles = cliBoxes; + } +}); + +// ../default-reporter/lib/reporterForClient/reportUpdateCheck.js +var require_reportUpdateCheck = __commonJS({ + "../default-reporter/lib/reporterForClient/reportUpdateCheck.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var boxen_1 = __importDefault(require_boxen()); + var chalk_1 = __importDefault(require_source()); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var semver_1 = __importDefault(require_semver2()); + exports2.default = (log$) => { + return log$.pipe(operators_1.take(1), operators_1.filter((log2) => semver_1.default.gt(log2.latestVersion, log2.currentVersion)), operators_1.map((log2) => Rx.of({ + msg: boxen_1.default(`Update available! ${chalk_1.default.red(log2.currentVersion)} \u2192 ${chalk_1.default.green(log2.latestVersion)}. +${chalk_1.default.magenta("Changelog:")} https://github.com/pnpm/pnpm/releases/tag/v${log2.latestVersion} +Run ${chalk_1.default.magenta("pnpm add -g pnpm")} to update. + +Follow ${chalk_1.default.magenta("@pnpmjs")} for updates: https://twitter.com/pnpmjs`, { + padding: 1, + margin: 1, + align: "center", + borderColor: "yellow", + borderStyle: "round" + }) + }))); + }; + } +}); + +// ../default-reporter/lib/reporterForClient/index.js +var require_reporterForClient = __commonJS({ + "../default-reporter/lib/reporterForClient/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var operators_1 = require_operators(); + var reportBigTarballsProgress_1 = __importDefault(require_reportBigTarballsProgress()); + var reportContext_1 = __importDefault(require_reportContext()); + var reportDeprecations_1 = __importDefault(require_reportDeprecations()); + var reportHooks_1 = __importDefault(require_reportHooks()); + var reportInstallChecks_1 = __importDefault(require_reportInstallChecks()); + var reportLifecycleScripts_1 = __importDefault(require_reportLifecycleScripts()); + var reportMisc_1 = __importDefault(require_reportMisc()); + var reportProgress_1 = __importDefault(require_reportProgress()); + var reportRequestRetry_1 = __importDefault(require_reportRequestRetry()); + var reportScope_1 = __importDefault(require_reportScope()); + var reportSkippedOptionalDependencies_1 = __importDefault(require_reportSkippedOptionalDependencies()); + var reportStats_1 = __importDefault(require_reportStats()); + var reportSummary_1 = __importDefault(require_reportSummary()); + var reportUpdateCheck_1 = __importDefault(require_reportUpdateCheck()); + function default_1(log$, opts) { + var _a, _b, _c, _d; + const width = (_b = (_a = opts.width) !== null && _a !== void 0 ? _a : process.stdout.columns) !== null && _b !== void 0 ? _b : 80; + const cwd = (_d = (_c = opts.pnpmConfig) === null || _c === void 0 ? void 0 : _c.dir) !== null && _d !== void 0 ? _d : process.cwd(); + const throttle = typeof opts.throttleProgress === "number" && opts.throttleProgress > 0 ? operators_1.throttleTime(opts.throttleProgress, void 0, { leading: true, trailing: true }) : void 0; + const outputs = [ + reportProgress_1.default(log$, { + cwd, + throttle + }), + reportLifecycleScripts_1.default(log$, { + appendOnly: opts.appendOnly === true || opts.streamLifecycleOutput, + cwd, + width + }), + reportDeprecations_1.default(log$.deprecation, { cwd, isRecursive: opts.isRecursive }), + reportMisc_1.default(log$, { + appendOnly: opts.appendOnly === true, + config: opts.config, + cwd, + logLevel: opts.logLevel, + zoomOutCurrent: opts.isRecursive + }), + ...reportStats_1.default(log$, { + cmd: opts.cmd, + cwd, + isRecursive: opts.isRecursive, + width + }), + reportInstallChecks_1.default(log$.installCheck, { cwd }), + reportRequestRetry_1.default(log$.requestRetry), + reportScope_1.default(log$.scope, { isRecursive: opts.isRecursive, cmd: opts.cmd }), + reportSkippedOptionalDependencies_1.default(log$.skippedOptionalDependency, { cwd }), + reportHooks_1.default(log$.hook, { cwd, isRecursive: opts.isRecursive }), + reportContext_1.default(log$, { cwd }), + reportUpdateCheck_1.default(log$.updateCheck) + ]; + if (!opts.appendOnly) { + outputs.push(reportBigTarballsProgress_1.default(log$)); + } + if (!opts.isRecursive) { + outputs.push(reportSummary_1.default(log$, { + cwd, + pnpmConfig: opts.pnpmConfig + })); + } + return outputs; + } + exports2.default = default_1; + } +}); + +// ../default-reporter/lib/reporterForServer.js +var require_reporterForServer = __commonJS({ + "../default-reporter/lib/reporterForServer.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var chalk_1 = __importDefault(require_source()); + var reportError_1 = __importDefault(require_reportError()); + function default_1(log$, config) { + log$.subscribe({ + complete: () => void 0, + error: () => void 0, + next(log2) { + if (log2.name === "pnpm:fetching-progress") { + console.log(`${chalk_1.default.cyan(`fetching_${log2.status}`)} ${log2.packageId}`); + return; + } + switch (log2.level) { + case "warn": + console.log(formatWarn(log2["message"])); + return; + case "error": + console.log(reportError_1.default(log2, config)); + return; + case "debug": + return; + default: + console.log(log2["message"]); + } + } + }); + } + exports2.default = default_1; + function formatWarn(message2) { + return `${chalk_1.default.bgYellow.black("\u2009WARN\u2009")} ${message2}`; + } + } +}); + +// ../default-reporter/lib/index.js +var require_lib11 = __commonJS({ + "../default-reporter/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toOutput$ = exports2.formatWarn = void 0; + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var ansi_diff_1 = __importDefault(require_ansi_diff()); + var constants_1 = require_constants2(); + var mergeOutputs_1 = __importDefault(require_mergeOutputs()); + var reporterForClient_1 = __importDefault(require_reporterForClient()); + var formatWarn_1 = __importDefault(require_formatWarn()); + exports2.formatWarn = formatWarn_1.default; + var reporterForServer_1 = __importDefault(require_reporterForServer()); + function default_1(opts) { + var _a, _b, _c, _d; + if (opts.context.argv[0] === "server") { + const log$ = Rx.fromEvent(opts.streamParser, "data"); + reporterForServer_1.default(log$, opts.context.config); + return; + } + const outputMaxWidth = (_c = (_b = (_a = opts.reportingOptions) === null || _a === void 0 ? void 0 : _a.outputMaxWidth) !== null && _b !== void 0 ? _b : process.stdout.columns && process.stdout.columns - 2) !== null && _c !== void 0 ? _c : 80; + const output$ = toOutput$({ ...opts, reportingOptions: { ...opts.reportingOptions, outputMaxWidth } }); + if ((_d = opts.reportingOptions) === null || _d === void 0 ? void 0 : _d.appendOnly) { + const writeNext = opts.useStderr ? console.error.bind(console) : console.log.bind(console); + output$.subscribe({ + complete() { + }, + error: (err) => console.error(err.message), + next: writeNext + }); + return; + } + const diff = ansi_diff_1.default({ + height: process.stdout.rows, + outputMaxWidth + }); + output$.subscribe({ + complete() { + }, + error: (err) => logUpdate(err.message), + next: logUpdate + }); + const write = opts.useStderr ? process.stderr.write.bind(process.stderr) : process.stdout.write.bind(process.stdout); + function logUpdate(view) { + if (!view.endsWith(constants_1.EOL)) + view += constants_1.EOL; + write(diff.update(view)); + } + } + exports2.default = default_1; + function toOutput$(opts) { + var _a, _b, _c, _d, _e, _f, _g; + opts = opts || {}; + const contextPushStream = new Rx.Subject(); + const fetchingProgressPushStream = new Rx.Subject(); + const progressPushStream = new Rx.Subject(); + const stagePushStream = new Rx.Subject(); + const deprecationPushStream = new Rx.Subject(); + const summaryPushStream = new Rx.Subject(); + const lifecyclePushStream = new Rx.Subject(); + const statsPushStream = new Rx.Subject(); + const packageImportMethodPushStream = new Rx.Subject(); + const installCheckPushStream = new Rx.Subject(); + const registryPushStream = new Rx.Subject(); + const rootPushStream = new Rx.Subject(); + const packageManifestPushStream = new Rx.Subject(); + const linkPushStream = new Rx.Subject(); + const otherPushStream = new Rx.Subject(); + const hookPushStream = new Rx.Subject(); + const skippedOptionalDependencyPushStream = new Rx.Subject(); + const scopePushStream = new Rx.Subject(); + const requestRetryPushStream = new Rx.Subject(); + const updateCheckPushStream = new Rx.Subject(); + setTimeout(() => { + opts.streamParser["on"]("data", (log2) => { + switch (log2.name) { + case "pnpm:context": + contextPushStream.next(log2); + break; + case "pnpm:fetching-progress": + fetchingProgressPushStream.next(log2); + break; + case "pnpm:progress": + progressPushStream.next(log2); + break; + case "pnpm:stage": + stagePushStream.next(log2); + break; + case "pnpm:deprecation": + deprecationPushStream.next(log2); + break; + case "pnpm:summary": + summaryPushStream.next(log2); + break; + case "pnpm:lifecycle": + lifecyclePushStream.next(log2); + break; + case "pnpm:stats": + statsPushStream.next(log2); + break; + case "pnpm:package-import-method": + packageImportMethodPushStream.next(log2); + break; + case "pnpm:install-check": + installCheckPushStream.next(log2); + break; + case "pnpm:registry": + registryPushStream.next(log2); + break; + case "pnpm:root": + rootPushStream.next(log2); + break; + case "pnpm:package-manifest": + packageManifestPushStream.next(log2); + break; + case "pnpm:link": + linkPushStream.next(log2); + break; + case "pnpm:hook": + hookPushStream.next(log2); + break; + case "pnpm:skipped-optional-dependency": + skippedOptionalDependencyPushStream.next(log2); + break; + case "pnpm:scope": + scopePushStream.next(log2); + break; + case "pnpm:request-retry": + requestRetryPushStream.next(log2); + break; + case "pnpm:update-check": + updateCheckPushStream.next(log2); + break; + case "pnpm": + case "pnpm:global": + case "pnpm:store": + case "pnpm:lockfile": + otherPushStream.next(log2); + break; + } + }); + }, 0); + const log$ = { + context: Rx.from(contextPushStream), + deprecation: Rx.from(deprecationPushStream), + fetchingProgress: Rx.from(fetchingProgressPushStream), + hook: Rx.from(hookPushStream), + installCheck: Rx.from(installCheckPushStream), + lifecycle: Rx.from(lifecyclePushStream), + link: Rx.from(linkPushStream), + other: Rx.from(otherPushStream), + packageImportMethod: Rx.from(packageImportMethodPushStream), + packageManifest: Rx.from(packageManifestPushStream), + progress: Rx.from(progressPushStream), + registry: Rx.from(registryPushStream), + requestRetry: Rx.from(requestRetryPushStream), + root: Rx.from(rootPushStream), + scope: Rx.from(scopePushStream), + skippedOptionalDependency: Rx.from(skippedOptionalDependencyPushStream), + stage: Rx.from(stagePushStream), + stats: Rx.from(statsPushStream), + summary: Rx.from(summaryPushStream), + updateCheck: Rx.from(updateCheckPushStream) + }; + const outputs = reporterForClient_1.default(log$, { + appendOnly: (_a = opts.reportingOptions) === null || _a === void 0 ? void 0 : _a.appendOnly, + cmd: opts.context.argv[0], + config: opts.context.config, + isRecursive: ((_b = opts.context.config) === null || _b === void 0 ? void 0 : _b["recursive"]) === true, + logLevel: (_c = opts.reportingOptions) === null || _c === void 0 ? void 0 : _c.logLevel, + pnpmConfig: opts.context.config, + streamLifecycleOutput: (_d = opts.reportingOptions) === null || _d === void 0 ? void 0 : _d.streamLifecycleOutput, + throttleProgress: (_e = opts.reportingOptions) === null || _e === void 0 ? void 0 : _e.throttleProgress, + width: (_f = opts.reportingOptions) === null || _f === void 0 ? void 0 : _f.outputMaxWidth + }); + if ((_g = opts.reportingOptions) === null || _g === void 0 ? void 0 : _g.appendOnly) { + return Rx.merge(...outputs).pipe(operators_1.map((log2) => log2.pipe(operators_1.map((msg) => msg.msg))), operators_1.mergeAll()); + } + return mergeOutputs_1.default(outputs); + } + exports2.toOutput$ = toOutput$; + } +}); + +// ../cli-utils/lib/getConfig.js +var require_getConfig = __commonJS({ + "../cli-utils/lib/getConfig.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var cli_meta_1 = __importDefault(require_lib4()); + var config_1 = __importDefault(require_lib10()); + var default_reporter_1 = require_lib11(); + async function default_1(cliOptions, opts) { + const { config, warnings } = await config_1.default({ + cliOptions, + globalDirShouldAllowWrite: opts.globalDirShouldAllowWrite, + packageManager: cli_meta_1.default, + rcOptionsTypes: opts.rcOptionsTypes, + workspaceDir: opts.workspaceDir, + checkUnknownSetting: opts.checkUnknownSetting + }); + config.cliOptions = cliOptions; + if (opts.excludeReporter) { + delete config.reporter; + } + if (warnings.length > 0) { + console.log(warnings.map((warning) => default_reporter_1.formatWarn(warning)).join("\n")); + } + return config; + } + exports2.default = default_1; + } +}); + +// ../core-loggers/lib/contextLogger.js +var require_contextLogger = __commonJS({ + "../core-loggers/lib/contextLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.contextLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.contextLogger = logger_1.default("context"); + } +}); + +// ../core-loggers/lib/deprecationLogger.js +var require_deprecationLogger = __commonJS({ + "../core-loggers/lib/deprecationLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.deprecationLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.deprecationLogger = logger_1.default("deprecation"); + } +}); + +// ../core-loggers/lib/fetchingProgressLogger.js +var require_fetchingProgressLogger = __commonJS({ + "../core-loggers/lib/fetchingProgressLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fetchingProgressLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.fetchingProgressLogger = logger_1.default("fetching-progress"); + } +}); + +// ../core-loggers/lib/hookLogger.js +var require_hookLogger = __commonJS({ + "../core-loggers/lib/hookLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hookLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.hookLogger = logger_1.default("hook"); + } +}); + +// ../core-loggers/lib/installCheckLogger.js +var require_installCheckLogger = __commonJS({ + "../core-loggers/lib/installCheckLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.installCheckLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.installCheckLogger = logger_1.default("install-check"); + } +}); + +// ../core-loggers/lib/lifecycleLogger.js +var require_lifecycleLogger = __commonJS({ + "../core-loggers/lib/lifecycleLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.lifecycleLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.lifecycleLogger = logger_1.default("lifecycle"); + } +}); + +// ../core-loggers/lib/linkLogger.js +var require_linkLogger = __commonJS({ + "../core-loggers/lib/linkLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.linkLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.linkLogger = logger_1.default("link"); + } +}); + +// ../core-loggers/lib/packageImportMethodLogger.js +var require_packageImportMethodLogger = __commonJS({ + "../core-loggers/lib/packageImportMethodLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageImportMethodLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.packageImportMethodLogger = logger_1.default("package-import-method"); + } +}); + +// ../core-loggers/lib/packageManifestLogger.js +var require_packageManifestLogger = __commonJS({ + "../core-loggers/lib/packageManifestLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageManifestLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.packageManifestLogger = logger_1.default("package-manifest"); + } +}); + +// ../core-loggers/lib/progressLogger.js +var require_progressLogger = __commonJS({ + "../core-loggers/lib/progressLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.progressLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.progressLogger = logger_1.default("progress"); + } +}); + +// ../core-loggers/lib/registryLogger.js +var require_registryLogger = __commonJS({ + "../core-loggers/lib/registryLogger.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../core-loggers/lib/removalLogger.js +var require_removalLogger = __commonJS({ + "../core-loggers/lib/removalLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.removalLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.removalLogger = logger_1.default("removal"); + } +}); + +// ../core-loggers/lib/requestRetryLogger.js +var require_requestRetryLogger = __commonJS({ + "../core-loggers/lib/requestRetryLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.requestRetryLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.requestRetryLogger = logger_1.default("request-retry"); + } +}); + +// ../core-loggers/lib/rootLogger.js +var require_rootLogger = __commonJS({ + "../core-loggers/lib/rootLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rootLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.rootLogger = logger_1.default("root"); + } +}); + +// ../core-loggers/lib/scopeLogger.js +var require_scopeLogger = __commonJS({ + "../core-loggers/lib/scopeLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scopeLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.scopeLogger = logger_1.default("scope"); + } +}); + +// ../core-loggers/lib/skippedOptionalDependencyLogger.js +var require_skippedOptionalDependencyLogger = __commonJS({ + "../core-loggers/lib/skippedOptionalDependencyLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.skippedOptionalDependencyLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.skippedOptionalDependencyLogger = logger_1.default("skipped-optional-dependency"); + } +}); + +// ../core-loggers/lib/stageLogger.js +var require_stageLogger = __commonJS({ + "../core-loggers/lib/stageLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.stageLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.stageLogger = logger_1.default("stage"); + } +}); + +// ../core-loggers/lib/statsLogger.js +var require_statsLogger = __commonJS({ + "../core-loggers/lib/statsLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.statsLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.statsLogger = logger_1.default("stats"); + } +}); + +// ../core-loggers/lib/summaryLogger.js +var require_summaryLogger = __commonJS({ + "../core-loggers/lib/summaryLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summaryLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.summaryLogger = logger_1.default("summary"); + } +}); + +// ../core-loggers/lib/updateCheckLogger.js +var require_updateCheckLogger = __commonJS({ + "../core-loggers/lib/updateCheckLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.updateCheckLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.updateCheckLogger = logger_1.default("update-check"); + } +}); + +// ../core-loggers/lib/all.js +var require_all = __commonJS({ + "../core-loggers/lib/all.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar(require_contextLogger(), exports2); + __exportStar(require_deprecationLogger(), exports2); + __exportStar(require_fetchingProgressLogger(), exports2); + __exportStar(require_hookLogger(), exports2); + __exportStar(require_installCheckLogger(), exports2); + __exportStar(require_lifecycleLogger(), exports2); + __exportStar(require_linkLogger(), exports2); + __exportStar(require_packageImportMethodLogger(), exports2); + __exportStar(require_packageManifestLogger(), exports2); + __exportStar(require_progressLogger(), exports2); + __exportStar(require_registryLogger(), exports2); + __exportStar(require_removalLogger(), exports2); + __exportStar(require_requestRetryLogger(), exports2); + __exportStar(require_rootLogger(), exports2); + __exportStar(require_scopeLogger(), exports2); + __exportStar(require_skippedOptionalDependencyLogger(), exports2); + __exportStar(require_stageLogger(), exports2); + __exportStar(require_statsLogger(), exports2); + __exportStar(require_summaryLogger(), exports2); + __exportStar(require_updateCheckLogger(), exports2); + } +}); + +// ../core-loggers/lib/index.js +var require_lib12 = __commonJS({ + "../core-loggers/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar(require_all(), exports2); + } +}); + +// ../package-is-installable/lib/checkEngine.js +var require_checkEngine = __commonJS({ + "../package-is-installable/lib/checkEngine.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UnsupportedEngineError = void 0; + var error_1 = __importDefault(require_lib8()); + var semver_1 = __importDefault(require_semver2()); + var UnsupportedEngineError = class extends error_1.default { + constructor(packageId, wanted, current) { + super("UNSUPPORTED_ENGINE", `Unsupported engine for ${packageId}: wanted: ${JSON.stringify(wanted)} (current: ${JSON.stringify(current)})`); + this.packageId = packageId; + this.wanted = wanted; + this.current = current; + } + }; + exports2.UnsupportedEngineError = UnsupportedEngineError; + function checkEngine(packageId, wantedEngine, currentEngine) { + if (!wantedEngine) + return null; + const unsatisfiedWanted = {}; + if (wantedEngine.node && !semver_1.default.satisfies(currentEngine.node, wantedEngine.node)) { + unsatisfiedWanted.node = wantedEngine.node; + } + if (currentEngine.pnpm && wantedEngine.pnpm && !semver_1.default.satisfies(currentEngine.pnpm, wantedEngine.pnpm)) { + unsatisfiedWanted.pnpm = wantedEngine.pnpm; + } + if (Object.keys(unsatisfiedWanted).length > 0) { + return new UnsupportedEngineError(packageId, unsatisfiedWanted, currentEngine); + } + return null; + } + exports2.default = checkEngine; + } +}); + +// ../package-is-installable/lib/checkPlatform.js +var require_checkPlatform = __commonJS({ + "../package-is-installable/lib/checkPlatform.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UnsupportedPlatformError = void 0; + var error_1 = __importDefault(require_lib8()); + var UnsupportedPlatformError = class extends error_1.default { + constructor(packageId, wanted, current) { + super("UNSUPPORTED_PLATFORM", `Unsupported platform for ${packageId}: wanted ${JSON.stringify(wanted)} (current: ${JSON.stringify(current)})`); + this.wanted = wanted; + this.current = current; + } + }; + exports2.UnsupportedPlatformError = UnsupportedPlatformError; + function checkPlatform(packageId, wantedPlatform) { + const platform = process.platform; + const arch = process.arch; + let osOk = true; + let cpuOk = true; + if (wantedPlatform.os) { + osOk = checkList(platform, wantedPlatform.os); + } + if (wantedPlatform.cpu) { + cpuOk = checkList(arch, wantedPlatform.cpu); + } + if (!osOk || !cpuOk) { + return new UnsupportedPlatformError(packageId, wantedPlatform, { os: platform, cpu: arch }); + } + return null; + } + exports2.default = checkPlatform; + function checkList(value, list) { + let tmp; + let match = false; + let blc = 0; + if (typeof list === "string") { + list = [list]; + } + if (list.length === 1 && list[0] === "any") { + return true; + } + for (let i = 0; i < list.length; ++i) { + tmp = list[i]; + if (tmp[0] === "!") { + tmp = tmp.slice(1); + if (tmp === value) { + return false; + } + ++blc; + } else { + match = match || tmp === value; + } + } + return match || blc === list.length; + } + } +}); + +// ../package-is-installable/lib/index.js +var require_lib13 = __commonJS({ + "../package-is-installable/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkPackage = exports2.UnsupportedPlatformError = exports2.UnsupportedEngineError = void 0; + var core_loggers_1 = require_lib12(); + var checkEngine_1 = __importStar2(require_checkEngine()); + Object.defineProperty(exports2, "UnsupportedEngineError", { enumerable: true, get: function() { + return checkEngine_1.UnsupportedEngineError; + } }); + var checkPlatform_1 = __importStar2(require_checkPlatform()); + Object.defineProperty(exports2, "UnsupportedPlatformError", { enumerable: true, get: function() { + return checkPlatform_1.UnsupportedPlatformError; + } }); + function packageIsInstallable(pkgId, pkg, options) { + const warn = checkPackage(pkgId, pkg, options); + if (warn == null) + return true; + core_loggers_1.installCheckLogger.warn({ + message: warn.message, + prefix: options.lockfileDir + }); + if (options.optional) { + core_loggers_1.skippedOptionalDependencyLogger.debug({ + details: warn.toString(), + package: { + id: pkgId, + name: pkg.name, + version: pkg.version + }, + prefix: options.lockfileDir, + reason: warn.code === "ERR_PNPM_UNSUPPORTED_ENGINE" ? "unsupported_engine" : "unsupported_platform" + }); + return false; + } + if (options.engineStrict) + throw warn; + return null; + } + exports2.default = packageIsInstallable; + function checkPackage(pkgId, manifest, options) { + var _a, _b, _c, _d; + return (_c = checkPlatform_1.default(pkgId, { + cpu: (_a = manifest.cpu) !== null && _a !== void 0 ? _a : ["any"], + os: (_b = manifest.os) !== null && _b !== void 0 ? _b : ["any"] + })) !== null && _c !== void 0 ? _c : manifest.engines == null ? null : checkEngine_1.default(pkgId, manifest.engines, { + node: (_d = options.nodeVersion) !== null && _d !== void 0 ? _d : process.version, + pnpm: options.pnpmVersion + }); + } + exports2.checkPackage = checkPackage; + } +}); + +// ../cli-utils/lib/packageIsInstallable.js +var require_packageIsInstallable = __commonJS({ + "../cli-utils/lib/packageIsInstallable.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageIsInstallable = void 0; + var cli_meta_1 = __importDefault(require_lib4()); + var logger_1 = __importDefault(require_lib6()); + var package_is_installable_1 = require_lib13(); + function packageIsInstallable(pkgPath, pkg, opts) { + var _a; + const pnpmVersion = cli_meta_1.default.name === "pnpm" ? cli_meta_1.default.stableVersion : void 0; + const err = package_is_installable_1.checkPackage(pkgPath, pkg, { pnpmVersion }); + if (err === null) + return; + if ((_a = err instanceof package_is_installable_1.UnsupportedEngineError && err.wanted.pnpm) !== null && _a !== void 0 ? _a : opts.engineStrict) + throw err; + logger_1.default.warn({ + message: `Unsupported ${err instanceof package_is_installable_1.UnsupportedEngineError ? "engine" : "platform"}: wanted: ${JSON.stringify(err.wanted)} (current: ${JSON.stringify(err.current)})`, + prefix: pkgPath + }); + } + exports2.packageIsInstallable = packageIsInstallable; + } +}); + +// ../manifest-utils/lib/getSpecFromPackageManifest.js +var require_getSpecFromPackageManifest = __commonJS({ + "../manifest-utils/lib/getSpecFromPackageManifest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = (manifest, depName) => { + var _a, _b, _c, _d, _e, _f; + return (_f = (_d = (_b = (_a = manifest.optionalDependencies) === null || _a === void 0 ? void 0 : _a[depName]) !== null && _b !== void 0 ? _b : (_c = manifest.dependencies) === null || _c === void 0 ? void 0 : _c[depName]) !== null && _d !== void 0 ? _d : (_e = manifest.devDependencies) === null || _e === void 0 ? void 0 : _e[depName]) !== null && _f !== void 0 ? _f : ""; + }; + } +}); + +// ../manifest-utils/lib/getPref.js +var require_getPref = __commonJS({ + "../manifest-utils/lib/getPref.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createVersionSpec = exports2.getPref = exports2.getPrefix = void 0; + var error_1 = __importDefault(require_lib8()); + var getPrefix = (alias, name) => alias !== name ? `npm:${name}@` : ""; + exports2.getPrefix = getPrefix; + function getPref(alias, name, version, opts) { + const prefix = exports2.getPrefix(alias, name); + return `${prefix}${createVersionSpec(version, opts.pinnedVersion)}`; + } + exports2.getPref = getPref; + function createVersionSpec(version, pinnedVersion) { + switch (pinnedVersion !== null && pinnedVersion !== void 0 ? pinnedVersion : "major") { + case "none": + return "*"; + case "major": + return `^${version}`; + case "minor": + return `~${version}`; + case "patch": + return `${version}`; + default: + throw new error_1.default("BAD_PINNED_VERSION", `Cannot pin '${pinnedVersion !== null && pinnedVersion !== void 0 ? pinnedVersion : "undefined"}'`); + } + } + exports2.createVersionSpec = createVersionSpec; + } +}); + +// ../types/lib/misc.js +var require_misc = __commonJS({ + "../types/lib/misc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEPENDENCIES_FIELDS = void 0; + exports2.DEPENDENCIES_FIELDS = [ + "optionalDependencies", + "dependencies", + "devDependencies" + ]; + } +}); + +// ../types/lib/options.js +var require_options = __commonJS({ + "../types/lib/options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../types/lib/package.js +var require_package = __commonJS({ + "../types/lib/package.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../types/lib/project.js +var require_project = __commonJS({ + "../types/lib/project.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../types/lib/index.js +var require_lib14 = __commonJS({ + "../types/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar(require_misc(), exports2); + __exportStar(require_options(), exports2); + __exportStar(require_package(), exports2); + __exportStar(require_project(), exports2); + } +}); + +// ../manifest-utils/lib/updateProjectManifestObject.js +var require_updateProjectManifestObject = __commonJS({ + "../manifest-utils/lib/updateProjectManifestObject.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.guessDependencyType = exports2.updateProjectManifestObject = void 0; + var core_loggers_1 = require_lib12(); + var types_1 = require_lib14(); + async function updateProjectManifestObject(prefix, packageManifest, packageSpecs) { + packageSpecs.forEach((packageSpec) => { + var _a, _b, _c, _d, _e; + if (packageSpec.saveType) { + const spec = (_a = packageSpec.pref) !== null && _a !== void 0 ? _a : findSpec(packageSpec.alias, packageManifest); + if (spec) { + packageManifest[packageSpec.saveType] = (_b = packageManifest[packageSpec.saveType]) !== null && _b !== void 0 ? _b : {}; + packageManifest[packageSpec.saveType][packageSpec.alias] = spec; + types_1.DEPENDENCIES_FIELDS.filter((depField) => depField !== packageSpec.saveType).forEach((deptype) => { + if (packageManifest[deptype] != null) { + delete packageManifest[deptype][packageSpec.alias]; + } + }); + if (packageSpec.peer === true) { + packageManifest.peerDependencies = (_c = packageManifest.peerDependencies) !== null && _c !== void 0 ? _c : {}; + packageManifest.peerDependencies[packageSpec.alias] = spec; + } + } + } else if (packageSpec.pref) { + const usedDepType = (_d = guessDependencyType(packageSpec.alias, packageManifest)) !== null && _d !== void 0 ? _d : "dependencies"; + packageManifest[usedDepType] = (_e = packageManifest[usedDepType]) !== null && _e !== void 0 ? _e : {}; + packageManifest[usedDepType][packageSpec.alias] = packageSpec.pref; + } + if (packageSpec.nodeExecPath) { + if (packageManifest.dependenciesMeta == null) { + packageManifest.dependenciesMeta = {}; + } + packageManifest.dependenciesMeta[packageSpec.alias] = { node: packageSpec.nodeExecPath }; + } + }); + core_loggers_1.packageManifestLogger.debug({ + prefix, + updated: packageManifest + }); + return packageManifest; + } + exports2.updateProjectManifestObject = updateProjectManifestObject; + function findSpec(alias, manifest) { + const foundDepType = guessDependencyType(alias, manifest); + return foundDepType && manifest[foundDepType][alias]; + } + function guessDependencyType(alias, manifest) { + return types_1.DEPENDENCIES_FIELDS.find((depField) => { + var _a; + return Boolean((_a = manifest[depField]) === null || _a === void 0 ? void 0 : _a[alias]); + }); + } + exports2.guessDependencyType = guessDependencyType; + } +}); + +// ../manifest-utils/lib/index.js +var require_lib15 = __commonJS({ + "../manifest-utils/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getAllDependenciesFromManifest = exports2.filterDependenciesByType = exports2.getSpecFromPackageManifest = void 0; + var getSpecFromPackageManifest_1 = __importDefault(require_getSpecFromPackageManifest()); + exports2.getSpecFromPackageManifest = getSpecFromPackageManifest_1.default; + __exportStar(require_getPref(), exports2); + __exportStar(require_updateProjectManifestObject(), exports2); + function filterDependenciesByType(manifest, include) { + return { + ...include.devDependencies ? manifest.devDependencies : {}, + ...include.dependencies ? manifest.dependencies : {}, + ...include.optionalDependencies ? manifest.optionalDependencies : {} + }; + } + exports2.filterDependenciesByType = filterDependenciesByType; + function getAllDependenciesFromManifest(manifest) { + return { + ...manifest.devDependencies, + ...manifest.dependencies, + ...manifest.optionalDependencies + }; + } + exports2.getAllDependenciesFromManifest = getAllDependenciesFromManifest; + } +}); + +// ../../node_modules/.pnpm/json5@2.2.0/node_modules/json5/lib/unicode.js +var require_unicode = __commonJS({ + "../../node_modules/.pnpm/json5@2.2.0/node_modules/json5/lib/unicode.js"(exports2, module2) { + module2.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/; + module2.exports.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/; + module2.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/; + } +}); + +// ../../node_modules/.pnpm/json5@2.2.0/node_modules/json5/lib/util.js +var require_util4 = __commonJS({ + "../../node_modules/.pnpm/json5@2.2.0/node_modules/json5/lib/util.js"(exports2, module2) { + var unicode = require_unicode(); + module2.exports = { + isSpaceSeparator(c) { + return typeof c === "string" && unicode.Space_Separator.test(c); + }, + isIdStartChar(c) { + return typeof c === "string" && (c >= "a" && c <= "z" || c >= "A" && c <= "Z" || c === "$" || c === "_" || unicode.ID_Start.test(c)); + }, + isIdContinueChar(c) { + return typeof c === "string" && (c >= "a" && c <= "z" || c >= "A" && c <= "Z" || c >= "0" && c <= "9" || c === "$" || c === "_" || c === "\u200C" || c === "\u200D" || unicode.ID_Continue.test(c)); + }, + isDigit(c) { + return typeof c === "string" && /[0-9]/.test(c); + }, + isHexDigit(c) { + return typeof c === "string" && /[0-9A-Fa-f]/.test(c); + } + }; + } +}); + +// ../../node_modules/.pnpm/json5@2.2.0/node_modules/json5/lib/parse.js +var require_parse2 = __commonJS({ + "../../node_modules/.pnpm/json5@2.2.0/node_modules/json5/lib/parse.js"(exports2, module2) { + var util = require_util4(); + var source; + var parseState; + var stack2; + var pos; + var line; + var column; + var token; + var key; + var root; + module2.exports = function parse(text, reviver) { + source = String(text); + parseState = "start"; + stack2 = []; + pos = 0; + line = 1; + column = 0; + token = void 0; + key = void 0; + root = void 0; + do { + token = lex(); + parseStates[parseState](); + } while (token.type !== "eof"); + if (typeof reviver === "function") { + return internalize({ "": root }, "", reviver); + } + return root; + }; + function internalize(holder, name, reviver) { + const value = holder[name]; + if (value != null && typeof value === "object") { + for (const key2 in value) { + const replacement = internalize(value, key2, reviver); + if (replacement === void 0) { + delete value[key2]; + } else { + value[key2] = replacement; + } + } + } + return reviver.call(holder, name, value); + } + var lexState; + var buffer; + var doubleQuote; + var sign; + var c; + function lex() { + lexState = "default"; + buffer = ""; + doubleQuote = false; + sign = 1; + for (; ; ) { + c = peek(); + const token2 = lexStates[lexState](); + if (token2) { + return token2; + } + } + } + function peek() { + if (source[pos]) { + return String.fromCodePoint(source.codePointAt(pos)); + } + } + function read() { + const c2 = peek(); + if (c2 === "\n") { + line++; + column = 0; + } else if (c2) { + column += c2.length; + } else { + column++; + } + if (c2) { + pos += c2.length; + } + return c2; + } + var lexStates = { + default() { + switch (c) { + case " ": + case "\v": + case "\f": + case " ": + case "\xA0": + case "\uFEFF": + case "\n": + case "\r": + case "\u2028": + case "\u2029": + read(); + return; + case "/": + read(); + lexState = "comment"; + return; + case void 0: + read(); + return newToken("eof"); + } + if (util.isSpaceSeparator(c)) { + read(); + return; + } + return lexStates[parseState](); + }, + comment() { + switch (c) { + case "*": + read(); + lexState = "multiLineComment"; + return; + case "/": + read(); + lexState = "singleLineComment"; + return; + } + throw invalidChar(read()); + }, + multiLineComment() { + switch (c) { + case "*": + read(); + lexState = "multiLineCommentAsterisk"; + return; + case void 0: + throw invalidChar(read()); + } + read(); + }, + multiLineCommentAsterisk() { + switch (c) { + case "*": + read(); + return; + case "/": + read(); + lexState = "default"; + return; + case void 0: + throw invalidChar(read()); + } + read(); + lexState = "multiLineComment"; + }, + singleLineComment() { + switch (c) { + case "\n": + case "\r": + case "\u2028": + case "\u2029": + read(); + lexState = "default"; + return; + case void 0: + read(); + return newToken("eof"); + } + read(); + }, + value() { + switch (c) { + case "{": + case "[": + return newToken("punctuator", read()); + case "n": + read(); + literal("ull"); + return newToken("null", null); + case "t": + read(); + literal("rue"); + return newToken("boolean", true); + case "f": + read(); + literal("alse"); + return newToken("boolean", false); + case "-": + case "+": + if (read() === "-") { + sign = -1; + } + lexState = "sign"; + return; + case ".": + buffer = read(); + lexState = "decimalPointLeading"; + return; + case "0": + buffer = read(); + lexState = "zero"; + return; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + buffer = read(); + lexState = "decimalInteger"; + return; + case "I": + read(); + literal("nfinity"); + return newToken("numeric", Infinity); + case "N": + read(); + literal("aN"); + return newToken("numeric", NaN); + case '"': + case "'": + doubleQuote = read() === '"'; + buffer = ""; + lexState = "string"; + return; + } + throw invalidChar(read()); + }, + identifierNameStartEscape() { + if (c !== "u") { + throw invalidChar(read()); + } + read(); + const u = unicodeEscape(); + switch (u) { + case "$": + case "_": + break; + default: + if (!util.isIdStartChar(u)) { + throw invalidIdentifier(); + } + break; + } + buffer += u; + lexState = "identifierName"; + }, + identifierName() { + switch (c) { + case "$": + case "_": + case "\u200C": + case "\u200D": + buffer += read(); + return; + case "\\": + read(); + lexState = "identifierNameEscape"; + return; + } + if (util.isIdContinueChar(c)) { + buffer += read(); + return; + } + return newToken("identifier", buffer); + }, + identifierNameEscape() { + if (c !== "u") { + throw invalidChar(read()); + } + read(); + const u = unicodeEscape(); + switch (u) { + case "$": + case "_": + case "\u200C": + case "\u200D": + break; + default: + if (!util.isIdContinueChar(u)) { + throw invalidIdentifier(); + } + break; + } + buffer += u; + lexState = "identifierName"; + }, + sign() { + switch (c) { + case ".": + buffer = read(); + lexState = "decimalPointLeading"; + return; + case "0": + buffer = read(); + lexState = "zero"; + return; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + buffer = read(); + lexState = "decimalInteger"; + return; + case "I": + read(); + literal("nfinity"); + return newToken("numeric", sign * Infinity); + case "N": + read(); + literal("aN"); + return newToken("numeric", NaN); + } + throw invalidChar(read()); + }, + zero() { + switch (c) { + case ".": + buffer += read(); + lexState = "decimalPoint"; + return; + case "e": + case "E": + buffer += read(); + lexState = "decimalExponent"; + return; + case "x": + case "X": + buffer += read(); + lexState = "hexadecimal"; + return; + } + return newToken("numeric", sign * 0); + }, + decimalInteger() { + switch (c) { + case ".": + buffer += read(); + lexState = "decimalPoint"; + return; + case "e": + case "E": + buffer += read(); + lexState = "decimalExponent"; + return; + } + if (util.isDigit(c)) { + buffer += read(); + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + decimalPointLeading() { + if (util.isDigit(c)) { + buffer += read(); + lexState = "decimalFraction"; + return; + } + throw invalidChar(read()); + }, + decimalPoint() { + switch (c) { + case "e": + case "E": + buffer += read(); + lexState = "decimalExponent"; + return; + } + if (util.isDigit(c)) { + buffer += read(); + lexState = "decimalFraction"; + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + decimalFraction() { + switch (c) { + case "e": + case "E": + buffer += read(); + lexState = "decimalExponent"; + return; + } + if (util.isDigit(c)) { + buffer += read(); + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + decimalExponent() { + switch (c) { + case "+": + case "-": + buffer += read(); + lexState = "decimalExponentSign"; + return; + } + if (util.isDigit(c)) { + buffer += read(); + lexState = "decimalExponentInteger"; + return; + } + throw invalidChar(read()); + }, + decimalExponentSign() { + if (util.isDigit(c)) { + buffer += read(); + lexState = "decimalExponentInteger"; + return; + } + throw invalidChar(read()); + }, + decimalExponentInteger() { + if (util.isDigit(c)) { + buffer += read(); + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + hexadecimal() { + if (util.isHexDigit(c)) { + buffer += read(); + lexState = "hexadecimalInteger"; + return; + } + throw invalidChar(read()); + }, + hexadecimalInteger() { + if (util.isHexDigit(c)) { + buffer += read(); + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + string() { + switch (c) { + case "\\": + read(); + buffer += escape(); + return; + case '"': + if (doubleQuote) { + read(); + return newToken("string", buffer); + } + buffer += read(); + return; + case "'": + if (!doubleQuote) { + read(); + return newToken("string", buffer); + } + buffer += read(); + return; + case "\n": + case "\r": + throw invalidChar(read()); + case "\u2028": + case "\u2029": + separatorChar(c); + break; + case void 0: + throw invalidChar(read()); + } + buffer += read(); + }, + start() { + switch (c) { + case "{": + case "[": + return newToken("punctuator", read()); + } + lexState = "value"; + }, + beforePropertyName() { + switch (c) { + case "$": + case "_": + buffer = read(); + lexState = "identifierName"; + return; + case "\\": + read(); + lexState = "identifierNameStartEscape"; + return; + case "}": + return newToken("punctuator", read()); + case '"': + case "'": + doubleQuote = read() === '"'; + lexState = "string"; + return; + } + if (util.isIdStartChar(c)) { + buffer += read(); + lexState = "identifierName"; + return; + } + throw invalidChar(read()); + }, + afterPropertyName() { + if (c === ":") { + return newToken("punctuator", read()); + } + throw invalidChar(read()); + }, + beforePropertyValue() { + lexState = "value"; + }, + afterPropertyValue() { + switch (c) { + case ",": + case "}": + return newToken("punctuator", read()); + } + throw invalidChar(read()); + }, + beforeArrayValue() { + if (c === "]") { + return newToken("punctuator", read()); + } + lexState = "value"; + }, + afterArrayValue() { + switch (c) { + case ",": + case "]": + return newToken("punctuator", read()); + } + throw invalidChar(read()); + }, + end() { + throw invalidChar(read()); + } + }; + function newToken(type, value) { + return { + type, + value, + line, + column + }; + } + function literal(s) { + for (const c2 of s) { + const p = peek(); + if (p !== c2) { + throw invalidChar(read()); + } + read(); + } + } + function escape() { + const c2 = peek(); + switch (c2) { + case "b": + read(); + return "\b"; + case "f": + read(); + return "\f"; + case "n": + read(); + return "\n"; + case "r": + read(); + return "\r"; + case "t": + read(); + return " "; + case "v": + read(); + return "\v"; + case "0": + read(); + if (util.isDigit(peek())) { + throw invalidChar(read()); + } + return "\0"; + case "x": + read(); + return hexEscape(); + case "u": + read(); + return unicodeEscape(); + case "\n": + case "\u2028": + case "\u2029": + read(); + return ""; + case "\r": + read(); + if (peek() === "\n") { + read(); + } + return ""; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + throw invalidChar(read()); + case void 0: + throw invalidChar(read()); + } + return read(); + } + function hexEscape() { + let buffer2 = ""; + let c2 = peek(); + if (!util.isHexDigit(c2)) { + throw invalidChar(read()); + } + buffer2 += read(); + c2 = peek(); + if (!util.isHexDigit(c2)) { + throw invalidChar(read()); + } + buffer2 += read(); + return String.fromCodePoint(parseInt(buffer2, 16)); + } + function unicodeEscape() { + let buffer2 = ""; + let count = 4; + while (count-- > 0) { + const c2 = peek(); + if (!util.isHexDigit(c2)) { + throw invalidChar(read()); + } + buffer2 += read(); + } + return String.fromCodePoint(parseInt(buffer2, 16)); + } + var parseStates = { + start() { + if (token.type === "eof") { + throw invalidEOF(); + } + push(); + }, + beforePropertyName() { + switch (token.type) { + case "identifier": + case "string": + key = token.value; + parseState = "afterPropertyName"; + return; + case "punctuator": + pop(); + return; + case "eof": + throw invalidEOF(); + } + }, + afterPropertyName() { + if (token.type === "eof") { + throw invalidEOF(); + } + parseState = "beforePropertyValue"; + }, + beforePropertyValue() { + if (token.type === "eof") { + throw invalidEOF(); + } + push(); + }, + beforeArrayValue() { + if (token.type === "eof") { + throw invalidEOF(); + } + if (token.type === "punctuator" && token.value === "]") { + pop(); + return; + } + push(); + }, + afterPropertyValue() { + if (token.type === "eof") { + throw invalidEOF(); + } + switch (token.value) { + case ",": + parseState = "beforePropertyName"; + return; + case "}": + pop(); + } + }, + afterArrayValue() { + if (token.type === "eof") { + throw invalidEOF(); + } + switch (token.value) { + case ",": + parseState = "beforeArrayValue"; + return; + case "]": + pop(); + } + }, + end() { + } + }; + function push() { + let value; + switch (token.type) { + case "punctuator": + switch (token.value) { + case "{": + value = {}; + break; + case "[": + value = []; + break; + } + break; + case "null": + case "boolean": + case "numeric": + case "string": + value = token.value; + break; + } + if (root === void 0) { + root = value; + } else { + const parent = stack2[stack2.length - 1]; + if (Array.isArray(parent)) { + parent.push(value); + } else { + parent[key] = value; + } + } + if (value !== null && typeof value === "object") { + stack2.push(value); + if (Array.isArray(value)) { + parseState = "beforeArrayValue"; + } else { + parseState = "beforePropertyName"; + } + } else { + const current = stack2[stack2.length - 1]; + if (current == null) { + parseState = "end"; + } else if (Array.isArray(current)) { + parseState = "afterArrayValue"; + } else { + parseState = "afterPropertyValue"; + } + } + } + function pop() { + stack2.pop(); + const current = stack2[stack2.length - 1]; + if (current == null) { + parseState = "end"; + } else if (Array.isArray(current)) { + parseState = "afterArrayValue"; + } else { + parseState = "afterPropertyValue"; + } + } + function invalidChar(c2) { + if (c2 === void 0) { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`); + } + return syntaxError(`JSON5: invalid character '${formatChar(c2)}' at ${line}:${column}`); + } + function invalidEOF() { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`); + } + function invalidIdentifier() { + column -= 5; + return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`); + } + function separatorChar(c2) { + console.warn(`JSON5: '${formatChar(c2)}' in strings is not valid ECMAScript; consider escaping`); + } + function formatChar(c2) { + const replacements = { + "'": "\\'", + '"': '\\"', + "\\": "\\\\", + "\b": "\\b", + "\f": "\\f", + "\n": "\\n", + "\r": "\\r", + " ": "\\t", + "\v": "\\v", + "\0": "\\0", + "\u2028": "\\u2028", + "\u2029": "\\u2029" + }; + if (replacements[c2]) { + return replacements[c2]; + } + if (c2 < " ") { + const hexString = c2.charCodeAt(0).toString(16); + return "\\x" + ("00" + hexString).substring(hexString.length); + } + return c2; + } + function syntaxError(message2) { + const err = new SyntaxError(message2); + err.lineNumber = line; + err.columnNumber = column; + return err; + } + } +}); + +// ../../node_modules/.pnpm/json5@2.2.0/node_modules/json5/lib/stringify.js +var require_stringify2 = __commonJS({ + "../../node_modules/.pnpm/json5@2.2.0/node_modules/json5/lib/stringify.js"(exports2, module2) { + var util = require_util4(); + module2.exports = function stringify(value, replacer, space) { + const stack2 = []; + let indent = ""; + let propertyList; + let replacerFunc; + let gap = ""; + let quote; + if (replacer != null && typeof replacer === "object" && !Array.isArray(replacer)) { + space = replacer.space; + quote = replacer.quote; + replacer = replacer.replacer; + } + if (typeof replacer === "function") { + replacerFunc = replacer; + } else if (Array.isArray(replacer)) { + propertyList = []; + for (const v of replacer) { + let item; + if (typeof v === "string") { + item = v; + } else if (typeof v === "number" || v instanceof String || v instanceof Number) { + item = String(v); + } + if (item !== void 0 && propertyList.indexOf(item) < 0) { + propertyList.push(item); + } + } + } + if (space instanceof Number) { + space = Number(space); + } else if (space instanceof String) { + space = String(space); + } + if (typeof space === "number") { + if (space > 0) { + space = Math.min(10, Math.floor(space)); + gap = " ".substr(0, space); + } + } else if (typeof space === "string") { + gap = space.substr(0, 10); + } + return serializeProperty("", { "": value }); + function serializeProperty(key, holder) { + let value2 = holder[key]; + if (value2 != null) { + if (typeof value2.toJSON5 === "function") { + value2 = value2.toJSON5(key); + } else if (typeof value2.toJSON === "function") { + value2 = value2.toJSON(key); + } + } + if (replacerFunc) { + value2 = replacerFunc.call(holder, key, value2); + } + if (value2 instanceof Number) { + value2 = Number(value2); + } else if (value2 instanceof String) { + value2 = String(value2); + } else if (value2 instanceof Boolean) { + value2 = value2.valueOf(); + } + switch (value2) { + case null: + return "null"; + case true: + return "true"; + case false: + return "false"; + } + if (typeof value2 === "string") { + return quoteString(value2, false); + } + if (typeof value2 === "number") { + return String(value2); + } + if (typeof value2 === "object") { + return Array.isArray(value2) ? serializeArray(value2) : serializeObject(value2); + } + return void 0; + } + function quoteString(value2) { + const quotes = { + "'": 0.1, + '"': 0.2 + }; + const replacements = { + "'": "\\'", + '"': '\\"', + "\\": "\\\\", + "\b": "\\b", + "\f": "\\f", + "\n": "\\n", + "\r": "\\r", + " ": "\\t", + "\v": "\\v", + "\0": "\\0", + "\u2028": "\\u2028", + "\u2029": "\\u2029" + }; + let product = ""; + for (let i = 0; i < value2.length; i++) { + const c = value2[i]; + switch (c) { + case "'": + case '"': + quotes[c]++; + product += c; + continue; + case "\0": + if (util.isDigit(value2[i + 1])) { + product += "\\x00"; + continue; + } + } + if (replacements[c]) { + product += replacements[c]; + continue; + } + if (c < " ") { + let hexString = c.charCodeAt(0).toString(16); + product += "\\x" + ("00" + hexString).substring(hexString.length); + continue; + } + product += c; + } + const quoteChar = quote || Object.keys(quotes).reduce((a, b) => quotes[a] < quotes[b] ? a : b); + product = product.replace(new RegExp(quoteChar, "g"), replacements[quoteChar]); + return quoteChar + product + quoteChar; + } + function serializeObject(value2) { + if (stack2.indexOf(value2) >= 0) { + throw TypeError("Converting circular structure to JSON5"); + } + stack2.push(value2); + let stepback = indent; + indent = indent + gap; + let keys = propertyList || Object.keys(value2); + let partial = []; + for (const key of keys) { + const propertyString = serializeProperty(key, value2); + if (propertyString !== void 0) { + let member = serializeKey(key) + ":"; + if (gap !== "") { + member += " "; + } + member += propertyString; + partial.push(member); + } + } + let final; + if (partial.length === 0) { + final = "{}"; + } else { + let properties; + if (gap === "") { + properties = partial.join(","); + final = "{" + properties + "}"; + } else { + let separator = ",\n" + indent; + properties = partial.join(separator); + final = "{\n" + indent + properties + ",\n" + stepback + "}"; + } + } + stack2.pop(); + indent = stepback; + return final; + } + function serializeKey(key) { + if (key.length === 0) { + return quoteString(key, true); + } + const firstChar = String.fromCodePoint(key.codePointAt(0)); + if (!util.isIdStartChar(firstChar)) { + return quoteString(key, true); + } + for (let i = firstChar.length; i < key.length; i++) { + if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) { + return quoteString(key, true); + } + } + return key; + } + function serializeArray(value2) { + if (stack2.indexOf(value2) >= 0) { + throw TypeError("Converting circular structure to JSON5"); + } + stack2.push(value2); + let stepback = indent; + indent = indent + gap; + let partial = []; + for (let i = 0; i < value2.length; i++) { + const propertyString = serializeProperty(String(i), value2); + partial.push(propertyString !== void 0 ? propertyString : "null"); + } + let final; + if (partial.length === 0) { + final = "[]"; + } else { + if (gap === "") { + let properties = partial.join(","); + final = "[" + properties + "]"; + } else { + let separator = ",\n" + indent; + let properties = partial.join(separator); + final = "[\n" + indent + properties + ",\n" + stepback + "]"; + } + } + stack2.pop(); + indent = stepback; + return final; + } + }; + } +}); + +// ../../node_modules/.pnpm/json5@2.2.0/node_modules/json5/lib/index.js +var require_lib16 = __commonJS({ + "../../node_modules/.pnpm/json5@2.2.0/node_modules/json5/lib/index.js"(exports2, module2) { + var parse = require_parse2(); + var stringify = require_stringify2(); + var JSON5 = { + parse, + stringify + }; + module2.exports = JSON5; + } +}); + +// ../../node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.js +var require_imurmurhash = __commonJS({ + "../../node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.js"(exports2, module2) { + (function() { + var cache; + function MurmurHash3(key, seed) { + var m = this instanceof MurmurHash3 ? this : cache; + m.reset(seed); + if (typeof key === "string" && key.length > 0) { + m.hash(key); + } + if (m !== this) { + return m; + } + } + ; + MurmurHash3.prototype.hash = function(key) { + var h1, k1, i, top, len; + len = key.length; + this.len += len; + k1 = this.k1; + i = 0; + switch (this.rem) { + case 0: + k1 ^= len > i ? key.charCodeAt(i++) & 65535 : 0; + case 1: + k1 ^= len > i ? (key.charCodeAt(i++) & 65535) << 8 : 0; + case 2: + k1 ^= len > i ? (key.charCodeAt(i++) & 65535) << 16 : 0; + case 3: + k1 ^= len > i ? (key.charCodeAt(i) & 255) << 24 : 0; + k1 ^= len > i ? (key.charCodeAt(i++) & 65280) >> 8 : 0; + } + this.rem = len + this.rem & 3; + len -= this.rem; + if (len > 0) { + h1 = this.h1; + while (1) { + k1 = k1 * 11601 + (k1 & 65535) * 3432906752 & 4294967295; + k1 = k1 << 15 | k1 >>> 17; + k1 = k1 * 13715 + (k1 & 65535) * 461832192 & 4294967295; + h1 ^= k1; + h1 = h1 << 13 | h1 >>> 19; + h1 = h1 * 5 + 3864292196 & 4294967295; + if (i >= len) { + break; + } + k1 = key.charCodeAt(i++) & 65535 ^ (key.charCodeAt(i++) & 65535) << 8 ^ (key.charCodeAt(i++) & 65535) << 16; + top = key.charCodeAt(i++); + k1 ^= (top & 255) << 24 ^ (top & 65280) >> 8; + } + k1 = 0; + switch (this.rem) { + case 3: + k1 ^= (key.charCodeAt(i + 2) & 65535) << 16; + case 2: + k1 ^= (key.charCodeAt(i + 1) & 65535) << 8; + case 1: + k1 ^= key.charCodeAt(i) & 65535; + } + this.h1 = h1; + } + this.k1 = k1; + return this; + }; + MurmurHash3.prototype.result = function() { + var k1, h1; + k1 = this.k1; + h1 = this.h1; + if (k1 > 0) { + k1 = k1 * 11601 + (k1 & 65535) * 3432906752 & 4294967295; + k1 = k1 << 15 | k1 >>> 17; + k1 = k1 * 13715 + (k1 & 65535) * 461832192 & 4294967295; + h1 ^= k1; + } + h1 ^= this.len; + h1 ^= h1 >>> 16; + h1 = h1 * 51819 + (h1 & 65535) * 2246770688 & 4294967295; + h1 ^= h1 >>> 13; + h1 = h1 * 44597 + (h1 & 65535) * 3266445312 & 4294967295; + h1 ^= h1 >>> 16; + return h1 >>> 0; + }; + MurmurHash3.prototype.reset = function(seed) { + this.h1 = typeof seed === "number" ? seed : 0; + this.rem = this.k1 = this.len = 0; + return this; + }; + cache = new MurmurHash3(); + if (typeof module2 != "undefined") { + module2.exports = MurmurHash3; + } else { + this.MurmurHash3 = MurmurHash3; + } + })(); + } +}); + +// ../../node_modules/.pnpm/is-typedarray@1.0.0/node_modules/is-typedarray/index.js +var require_is_typedarray = __commonJS({ + "../../node_modules/.pnpm/is-typedarray@1.0.0/node_modules/is-typedarray/index.js"(exports2, module2) { + module2.exports = isTypedArray; + isTypedArray.strict = isStrictTypedArray; + isTypedArray.loose = isLooseTypedArray; + var toString = Object.prototype.toString; + var names = { + "[object Int8Array]": true, + "[object Int16Array]": true, + "[object Int32Array]": true, + "[object Uint8Array]": true, + "[object Uint8ClampedArray]": true, + "[object Uint16Array]": true, + "[object Uint32Array]": true, + "[object Float32Array]": true, + "[object Float64Array]": true + }; + function isTypedArray(arr) { + return isStrictTypedArray(arr) || isLooseTypedArray(arr); + } + function isStrictTypedArray(arr) { + return arr instanceof Int8Array || arr instanceof Int16Array || arr instanceof Int32Array || arr instanceof Uint8Array || arr instanceof Uint8ClampedArray || arr instanceof Uint16Array || arr instanceof Uint32Array || arr instanceof Float32Array || arr instanceof Float64Array; + } + function isLooseTypedArray(arr) { + return names[toString.call(arr)]; + } + } +}); + +// ../../node_modules/.pnpm/typedarray-to-buffer@3.1.5/node_modules/typedarray-to-buffer/index.js +var require_typedarray_to_buffer = __commonJS({ + "../../node_modules/.pnpm/typedarray-to-buffer@3.1.5/node_modules/typedarray-to-buffer/index.js"(exports2, module2) { + var isTypedArray = require_is_typedarray().strict; + module2.exports = function typedarrayToBuffer(arr) { + if (isTypedArray(arr)) { + var buf = Buffer.from(arr.buffer); + if (arr.byteLength !== arr.buffer.byteLength) { + buf = buf.slice(arr.byteOffset, arr.byteOffset + arr.byteLength); + } + return buf; + } else { + return Buffer.from(arr); + } + }; + } +}); + +// ../../node_modules/.pnpm/write-file-atomic@3.0.3/node_modules/write-file-atomic/index.js +var require_write_file_atomic = __commonJS({ + "../../node_modules/.pnpm/write-file-atomic@3.0.3/node_modules/write-file-atomic/index.js"(exports2, module2) { + "use strict"; + module2.exports = writeFile; + module2.exports.sync = writeFileSync; + module2.exports._getTmpname = getTmpname; + module2.exports._cleanupOnExit = cleanupOnExit; + var fs = require("fs"); + var MurmurHash3 = require_imurmurhash(); + var onExit = require_signal_exit(); + var path = require("path"); + var isTypedArray = require_is_typedarray(); + var typedArrayToBuffer = require_typedarray_to_buffer(); + var { promisify } = require("util"); + var activeFiles = {}; + var threadId = function getId() { + try { + const workerThreads = require("worker_threads"); + return workerThreads.threadId; + } catch (e) { + return 0; + } + }(); + var invocations = 0; + function getTmpname(filename) { + return filename + "." + MurmurHash3(__filename).hash(String(process.pid)).hash(String(threadId)).hash(String(++invocations)).result(); + } + function cleanupOnExit(tmpfile) { + return () => { + try { + fs.unlinkSync(typeof tmpfile === "function" ? tmpfile() : tmpfile); + } catch (_) { + } + }; + } + function serializeActiveFile(absoluteName) { + return new Promise((resolve) => { + if (!activeFiles[absoluteName]) + activeFiles[absoluteName] = []; + activeFiles[absoluteName].push(resolve); + if (activeFiles[absoluteName].length === 1) + resolve(); + }); + } + function isChownErrOk(err) { + if (err.code === "ENOSYS") { + return true; + } + const nonroot = !process.getuid || process.getuid() !== 0; + if (nonroot) { + if (err.code === "EINVAL" || err.code === "EPERM") { + return true; + } + } + return false; + } + async function writeFileAsync(filename, data, options = {}) { + if (typeof options === "string") { + options = { encoding: options }; + } + let fd; + let tmpfile; + const removeOnExitHandler = onExit(cleanupOnExit(() => tmpfile)); + const absoluteName = path.resolve(filename); + try { + await serializeActiveFile(absoluteName); + const truename = await promisify(fs.realpath)(filename).catch(() => filename); + tmpfile = getTmpname(truename); + if (!options.mode || !options.chown) { + const stats = await promisify(fs.stat)(truename).catch(() => { + }); + if (stats) { + if (options.mode == null) { + options.mode = stats.mode; + } + if (options.chown == null && process.getuid) { + options.chown = { uid: stats.uid, gid: stats.gid }; + } + } + } + fd = await promisify(fs.open)(tmpfile, "w", options.mode); + if (options.tmpfileCreated) { + await options.tmpfileCreated(tmpfile); + } + if (isTypedArray(data)) { + data = typedArrayToBuffer(data); + } + if (Buffer.isBuffer(data)) { + await promisify(fs.write)(fd, data, 0, data.length, 0); + } else if (data != null) { + await promisify(fs.write)(fd, String(data), 0, String(options.encoding || "utf8")); + } + if (options.fsync !== false) { + await promisify(fs.fsync)(fd); + } + await promisify(fs.close)(fd); + fd = null; + if (options.chown) { + await promisify(fs.chown)(tmpfile, options.chown.uid, options.chown.gid).catch((err) => { + if (!isChownErrOk(err)) { + throw err; + } + }); + } + if (options.mode) { + await promisify(fs.chmod)(tmpfile, options.mode).catch((err) => { + if (!isChownErrOk(err)) { + throw err; + } + }); + } + await promisify(fs.rename)(tmpfile, truename); + } finally { + if (fd) { + await promisify(fs.close)(fd).catch(() => { + }); + } + removeOnExitHandler(); + await promisify(fs.unlink)(tmpfile).catch(() => { + }); + activeFiles[absoluteName].shift(); + if (activeFiles[absoluteName].length > 0) { + activeFiles[absoluteName][0](); + } else + delete activeFiles[absoluteName]; + } + } + function writeFile(filename, data, options, callback) { + if (options instanceof Function) { + callback = options; + options = {}; + } + const promise = writeFileAsync(filename, data, options); + if (callback) { + promise.then(callback, callback); + } + return promise; + } + function writeFileSync(filename, data, options) { + if (typeof options === "string") + options = { encoding: options }; + else if (!options) + options = {}; + try { + filename = fs.realpathSync(filename); + } catch (ex) { + } + const tmpfile = getTmpname(filename); + if (!options.mode || !options.chown) { + try { + const stats = fs.statSync(filename); + options = Object.assign({}, options); + if (!options.mode) { + options.mode = stats.mode; + } + if (!options.chown && process.getuid) { + options.chown = { uid: stats.uid, gid: stats.gid }; + } + } catch (ex) { + } + } + let fd; + const cleanup = cleanupOnExit(tmpfile); + const removeOnExitHandler = onExit(cleanup); + let threw = true; + try { + fd = fs.openSync(tmpfile, "w", options.mode || 438); + if (options.tmpfileCreated) { + options.tmpfileCreated(tmpfile); + } + if (isTypedArray(data)) { + data = typedArrayToBuffer(data); + } + if (Buffer.isBuffer(data)) { + fs.writeSync(fd, data, 0, data.length, 0); + } else if (data != null) { + fs.writeSync(fd, String(data), 0, String(options.encoding || "utf8")); + } + if (options.fsync !== false) { + fs.fsyncSync(fd); + } + fs.closeSync(fd); + fd = null; + if (options.chown) { + try { + fs.chownSync(tmpfile, options.chown.uid, options.chown.gid); + } catch (err) { + if (!isChownErrOk(err)) { + throw err; + } + } + } + if (options.mode) { + try { + fs.chmodSync(tmpfile, options.mode); + } catch (err) { + if (!isChownErrOk(err)) { + throw err; + } + } + } + fs.renameSync(tmpfile, filename); + threw = false; + } finally { + if (fd) { + try { + fs.closeSync(fd); + } catch (ex) { + } + } + removeOnExitHandler(); + if (threw) { + cleanup(); + } + } + } + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/common.js +var require_common2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/common.js"(exports2, module2) { + "use strict"; + function isNothing(subject) { + return typeof subject === "undefined" || subject === null; + } + function isObject(subject) { + return typeof subject === "object" && subject !== null; + } + function toArray(sequence) { + if (Array.isArray(sequence)) + return sequence; + else if (isNothing(sequence)) + return []; + return [sequence]; + } + function extend(target, source) { + var index, length, key, sourceKeys; + if (source) { + sourceKeys = Object.keys(source); + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + return target; + } + function repeat(string, count) { + var result = "", cycle; + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + return result; + } + function isNegativeZero(number) { + return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; + } + module2.exports.isNothing = isNothing; + module2.exports.isObject = isObject; + module2.exports.toArray = toArray; + module2.exports.repeat = repeat; + module2.exports.isNegativeZero = isNegativeZero; + module2.exports.extend = extend; + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/exception.js +var require_exception = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/exception.js"(exports2, module2) { + "use strict"; + function formatError(exception, compact) { + var where = "", message2 = exception.reason || "(unknown reason)"; + if (!exception.mark) + return message2; + if (exception.mark.name) { + where += 'in "' + exception.mark.name + '" '; + } + where += "(" + (exception.mark.line + 1) + ":" + (exception.mark.column + 1) + ")"; + if (!compact && exception.mark.snippet) { + where += "\n\n" + exception.mark.snippet; + } + return message2 + " " + where; + } + function YAMLException(reason, mark) { + Error.call(this); + this.name = "YAMLException"; + this.reason = reason; + this.mark = mark; + this.message = formatError(this, false); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + this.stack = new Error().stack || ""; + } + } + YAMLException.prototype = Object.create(Error.prototype); + YAMLException.prototype.constructor = YAMLException; + YAMLException.prototype.toString = function toString(compact) { + return this.name + ": " + formatError(this, compact); + }; + module2.exports = YAMLException; + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/snippet.js +var require_snippet2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/snippet.js"(exports2, module2) { + "use strict"; + var common = require_common2(); + function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { + var head = ""; + var tail = ""; + var maxHalfLength = Math.floor(maxLineLength / 2) - 1; + if (position - lineStart > maxHalfLength) { + head = " ... "; + lineStart = position - maxHalfLength + head.length; + } + if (lineEnd - position > maxHalfLength) { + tail = " ..."; + lineEnd = position + maxHalfLength - tail.length; + } + return { + str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail, + pos: position - lineStart + head.length + }; + } + function padStart(string, max) { + return common.repeat(" ", max - string.length) + string; + } + function makeSnippet(mark, options) { + options = Object.create(options || null); + if (!mark.buffer) + return null; + if (!options.maxLength) + options.maxLength = 79; + if (typeof options.indent !== "number") + options.indent = 1; + if (typeof options.linesBefore !== "number") + options.linesBefore = 3; + if (typeof options.linesAfter !== "number") + options.linesAfter = 2; + var re = /\r?\n|\r|\0/g; + var lineStarts = [0]; + var lineEnds = []; + var match; + var foundLineNo = -1; + while (match = re.exec(mark.buffer)) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + if (mark.position <= match.index && foundLineNo < 0) { + foundLineNo = lineStarts.length - 2; + } + } + if (foundLineNo < 0) + foundLineNo = lineStarts.length - 1; + var result = "", i, line; + var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; + var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); + for (i = 1; i <= options.linesBefore; i++) { + if (foundLineNo - i < 0) + break; + line = getLine(mark.buffer, lineStarts[foundLineNo - i], lineEnds[foundLineNo - i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), maxLineLength); + result = common.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line.str + "\n" + result; + } + line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + "\n"; + result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n"; + for (i = 1; i <= options.linesAfter; i++) { + if (foundLineNo + i >= lineEnds.length) + break; + line = getLine(mark.buffer, lineStarts[foundLineNo + i], lineEnds[foundLineNo + i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), maxLineLength); + result += common.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line.str + "\n"; + } + return result.replace(/\n$/, ""); + } + module2.exports = makeSnippet; + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type.js +var require_type2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type.js"(exports2, module2) { + "use strict"; + var YAMLException = require_exception(); + var TYPE_CONSTRUCTOR_OPTIONS = [ + "kind", + "multi", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "representName", + "defaultStyle", + "styleAliases" + ]; + var YAML_NODE_KINDS = [ + "scalar", + "sequence", + "mapping" + ]; + function compileStyleAliases(map) { + var result = {}; + if (map !== null) { + Object.keys(map).forEach(function(style) { + map[style].forEach(function(alias) { + result[String(alias)] = style; + }); + }); + } + return result; + } + function Type(tag, options) { + options = options || {}; + Object.keys(options).forEach(function(name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + this.tag = tag; + this.kind = options["kind"] || null; + this.resolve = options["resolve"] || function() { + return true; + }; + this.construct = options["construct"] || function(data) { + return data; + }; + this.instanceOf = options["instanceOf"] || null; + this.predicate = options["predicate"] || null; + this.represent = options["represent"] || null; + this.representName = options["representName"] || null; + this.defaultStyle = options["defaultStyle"] || null; + this.multi = options["multi"] || false; + this.styleAliases = compileStyleAliases(options["styleAliases"] || null); + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } + } + module2.exports = Type; + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/schema.js +var require_schema = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/schema.js"(exports2, module2) { + "use strict"; + var YAMLException = require_exception(); + var Type = require_type2(); + function compileList(schema, name, result) { + var exclude = []; + schema[name].forEach(function(currentType) { + result.forEach(function(previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) { + exclude.push(previousIndex); + } + }); + result.push(currentType); + }); + return result.filter(function(type, index) { + return exclude.indexOf(index) === -1; + }); + } + function compileMap() { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }, index, length; + function collectType(type) { + if (type.multi) { + result.multi[type.kind].push(type); + result.multi["fallback"].push(type); + } else { + result[type.kind][type.tag] = result["fallback"][type.tag] = type; + } + } + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; + } + function Schema(definition) { + return this.extend(definition); + } + Schema.prototype.extend = function extend(definition) { + var implicit = []; + var explicit = []; + if (definition instanceof Type) { + explicit.push(definition); + } else if (Array.isArray(definition)) { + explicit = explicit.concat(definition); + } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { + if (definition.implicit) + implicit = implicit.concat(definition.implicit); + if (definition.explicit) + explicit = explicit.concat(definition.explicit); + } else { + throw new YAMLException("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); + } + implicit.forEach(function(type) { + if (!(type instanceof Type)) { + throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + if (type.loadKind && type.loadKind !== "scalar") { + throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); + } + if (type.multi) { + throw new YAMLException("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); + } + }); + explicit.forEach(function(type) { + if (!(type instanceof Type)) { + throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + }); + var result = Object.create(Schema.prototype); + result.implicit = (this.implicit || []).concat(implicit); + result.explicit = (this.explicit || []).concat(explicit); + result.compiledImplicit = compileList(result, "implicit", []); + result.compiledExplicit = compileList(result, "explicit", []); + result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); + return result; + }; + module2.exports = Schema; + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/str.js +var require_str = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/str.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + module2.exports = new Type("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(data) { + return data !== null ? data : ""; + } + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/seq.js +var require_seq = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/seq.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + module2.exports = new Type("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(data) { + return data !== null ? data : []; + } + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/map.js +var require_map2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/map.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + module2.exports = new Type("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(data) { + return data !== null ? data : {}; + } + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/schema/failsafe.js +var require_failsafe = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/schema/failsafe.js"(exports2, module2) { + "use strict"; + var Schema = require_schema(); + module2.exports = new Schema({ + explicit: [ + require_str(), + require_seq(), + require_map2() + ] + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/null.js +var require_null = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/null.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + function resolveYamlNull(data) { + if (data === null) + return true; + var max = data.length; + return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); + } + function constructYamlNull() { + return null; + } + function isNull(object) { + return object === null; + } + module2.exports = new Type("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function() { + return "~"; + }, + lowercase: function() { + return "null"; + }, + uppercase: function() { + return "NULL"; + }, + camelcase: function() { + return "Null"; + }, + empty: function() { + return ""; + } + }, + defaultStyle: "lowercase" + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/bool.js +var require_bool = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/bool.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + function resolveYamlBoolean(data) { + if (data === null) + return false; + var max = data.length; + return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE"); + } + function constructYamlBoolean(data) { + return data === "true" || data === "True" || data === "TRUE"; + } + function isBoolean(object) { + return Object.prototype.toString.call(object) === "[object Boolean]"; + } + module2.exports = new Type("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function(object) { + return object ? "true" : "false"; + }, + uppercase: function(object) { + return object ? "TRUE" : "FALSE"; + }, + camelcase: function(object) { + return object ? "True" : "False"; + } + }, + defaultStyle: "lowercase" + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/int.js +var require_int = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/int.js"(exports2, module2) { + "use strict"; + var common = require_common2(); + var Type = require_type2(); + function isHexCode(c) { + return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102; + } + function isOctCode(c) { + return 48 <= c && c <= 55; + } + function isDecCode(c) { + return 48 <= c && c <= 57; + } + function resolveYamlInteger(data) { + if (data === null) + return false; + var max = data.length, index = 0, hasDigits = false, ch; + if (!max) + return false; + ch = data[index]; + if (ch === "-" || ch === "+") { + ch = data[++index]; + } + if (ch === "0") { + if (index + 1 === max) + return true; + ch = data[++index]; + if (ch === "b") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (ch !== "0" && ch !== "1") + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "x") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (!isHexCode(data.charCodeAt(index))) + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "o") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (!isOctCode(data.charCodeAt(index))) + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + } + if (ch === "_") + return false; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + if (!hasDigits || ch === "_") + return false; + return true; + } + function constructYamlInteger(data) { + var value = data, sign = 1, ch; + if (value.indexOf("_") !== -1) { + value = value.replace(/_/g, ""); + } + ch = value[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") + sign = -1; + value = value.slice(1); + ch = value[0]; + } + if (value === "0") + return 0; + if (ch === "0") { + if (value[1] === "b") + return sign * parseInt(value.slice(2), 2); + if (value[1] === "x") + return sign * parseInt(value.slice(2), 16); + if (value[1] === "o") + return sign * parseInt(value.slice(2), 8); + } + return sign * parseInt(value, 10); + } + function isInteger(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object)); + } + module2.exports = new Type("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function(obj) { + return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); + }, + octal: function(obj) { + return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1); + }, + decimal: function(obj) { + return obj.toString(10); + }, + hexadecimal: function(obj) { + return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); + } + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] + } + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/float.js +var require_float = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/float.js"(exports2, module2) { + "use strict"; + var common = require_common2(); + var Type = require_type2(); + var YAML_FLOAT_PATTERN = new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); + function resolveYamlFloat(data) { + if (data === null) + return false; + if (!YAML_FLOAT_PATTERN.test(data) || data[data.length - 1] === "_") { + return false; + } + return true; + } + function constructYamlFloat(data) { + var value, sign; + value = data.replace(/_/g, "").toLowerCase(); + sign = value[0] === "-" ? -1 : 1; + if ("+-".indexOf(value[0]) >= 0) { + value = value.slice(1); + } + if (value === ".inf") { + return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + } else if (value === ".nan") { + return NaN; + } + return sign * parseFloat(value, 10); + } + var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + function representYamlFloat(object, style) { + var res; + if (isNaN(object)) { + switch (style) { + case "lowercase": + return ".nan"; + case "uppercase": + return ".NAN"; + case "camelcase": + return ".NaN"; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return ".inf"; + case "uppercase": + return ".INF"; + case "camelcase": + return ".Inf"; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return "-.inf"; + case "uppercase": + return "-.INF"; + case "camelcase": + return "-.Inf"; + } + } else if (common.isNegativeZero(object)) { + return "-0.0"; + } + res = object.toString(10); + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; + } + function isFloat(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); + } + module2.exports = new Type("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: "lowercase" + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/schema/json.js +var require_json = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/schema/json.js"(exports2, module2) { + "use strict"; + module2.exports = require_failsafe().extend({ + implicit: [ + require_null(), + require_bool(), + require_int(), + require_float() + ] + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/schema/core.js +var require_core2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/schema/core.js"(exports2, module2) { + "use strict"; + module2.exports = require_json(); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/timestamp.js +var require_timestamp2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/timestamp.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + var YAML_DATE_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"); + var YAML_TIMESTAMP_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"); + function resolveYamlTimestamp(data) { + if (data === null) + return false; + if (YAML_DATE_REGEXP.exec(data) !== null) + return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) + return true; + return false; + } + function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; + match = YAML_DATE_REGEXP.exec(data); + if (match === null) + match = YAML_TIMESTAMP_REGEXP.exec(data); + if (match === null) + throw new Error("Date resolve error"); + year = +match[1]; + month = +match[2] - 1; + day = +match[3]; + if (!match[4]) { + return new Date(Date.UTC(year, month, day)); + } + hour = +match[4]; + minute = +match[5]; + second = +match[6]; + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { + fraction += "0"; + } + fraction = +fraction; + } + if (match[9]) { + tz_hour = +match[10]; + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 6e4; + if (match[9] === "-") + delta = -delta; + } + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + if (delta) + date.setTime(date.getTime() - delta); + return date; + } + function representYamlTimestamp(object) { + return object.toISOString(); + } + module2.exports = new Type("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/merge.js +var require_merge4 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/merge.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + function resolveYamlMerge(data) { + return data === "<<" || data === null; + } + module2.exports = new Type("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/binary.js +var require_binary = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/binary.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; + function resolveYamlBinary(data) { + if (data === null) + return false; + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + if (code > 64) + continue; + if (code < 0) + return false; + bitlen += 6; + } + return bitlen % 8 === 0; + } + function constructYamlBinary(data) { + var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map = BASE64_MAP, bits = 0, result = []; + for (idx = 0; idx < max; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } + bits = bits << 6 | map.indexOf(input.charAt(idx)); + } + tailbits = max % 4 * 6; + if (tailbits === 0) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } else if (tailbits === 18) { + result.push(bits >> 10 & 255); + result.push(bits >> 2 & 255); + } else if (tailbits === 12) { + result.push(bits >> 4 & 255); + } + return new Uint8Array(result); + } + function representYamlBinary(object) { + var result = "", bits = 0, idx, tail, max = object.length, map = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } + bits = (bits << 8) + object[idx]; + } + tail = max % 3; + if (tail === 0) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } else if (tail === 2) { + result += map[bits >> 10 & 63]; + result += map[bits >> 4 & 63]; + result += map[bits << 2 & 63]; + result += map[64]; + } else if (tail === 1) { + result += map[bits >> 2 & 63]; + result += map[bits << 4 & 63]; + result += map[64]; + result += map[64]; + } + return result; + } + function isBinary(obj) { + return Object.prototype.toString.call(obj) === "[object Uint8Array]"; + } + module2.exports = new Type("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/omap.js +var require_omap = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/omap.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var _toString = Object.prototype.toString; + function resolveYamlOmap(data) { + if (data === null) + return true; + var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data; + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + if (_toString.call(pair) !== "[object Object]") + return false; + for (pairKey in pair) { + if (_hasOwnProperty.call(pair, pairKey)) { + if (!pairHasKey) + pairHasKey = true; + else + return false; + } + } + if (!pairHasKey) + return false; + if (objectKeys.indexOf(pairKey) === -1) + objectKeys.push(pairKey); + else + return false; + } + return true; + } + function constructYamlOmap(data) { + return data !== null ? data : []; + } + module2.exports = new Type("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap, + construct: constructYamlOmap + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/pairs.js +var require_pairs2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/pairs.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + var _toString = Object.prototype.toString; + function resolveYamlPairs(data) { + if (data === null) + return true; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + if (_toString.call(pair) !== "[object Object]") + return false; + keys = Object.keys(pair); + if (keys.length !== 1) + return false; + result[index] = [keys[0], pair[keys[0]]]; + } + return true; + } + function constructYamlPairs(data) { + if (data === null) + return []; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + keys = Object.keys(pair); + result[index] = [keys[0], pair[keys[0]]]; + } + return result; + } + module2.exports = new Type("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs, + construct: constructYamlPairs + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/set.js +var require_set = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/set.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + function resolveYamlSet(data) { + if (data === null) + return true; + var key, object = data; + for (key in object) { + if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) + return false; + } + } + return true; + } + function constructYamlSet(data) { + return data !== null ? data : {}; + } + module2.exports = new Type("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet, + construct: constructYamlSet + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/schema/default.js +var require_default = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/schema/default.js"(exports2, module2) { + "use strict"; + module2.exports = require_core2().extend({ + implicit: [ + require_timestamp2(), + require_merge4() + ], + explicit: [ + require_binary(), + require_omap(), + require_pairs2(), + require_set() + ] + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/loader.js +var require_loader = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/loader.js"(exports2, module2) { + "use strict"; + var common = require_common2(); + var YAMLException = require_exception(); + var makeSnippet = require_snippet2(); + var DEFAULT_SCHEMA = require_default(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CONTEXT_FLOW_IN = 1; + var CONTEXT_FLOW_OUT = 2; + var CONTEXT_BLOCK_IN = 3; + var CONTEXT_BLOCK_OUT = 4; + var CHOMPING_CLIP = 1; + var CHOMPING_STRIP = 2; + var CHOMPING_KEEP = 3; + var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; + var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; + var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; + var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + function _class(obj) { + return Object.prototype.toString.call(obj); + } + function is_EOL(c) { + return c === 10 || c === 13; + } + function is_WHITE_SPACE(c) { + return c === 9 || c === 32; + } + function is_WS_OR_EOL(c) { + return c === 9 || c === 32 || c === 10 || c === 13; + } + function is_FLOW_INDICATOR(c) { + return c === 44 || c === 91 || c === 93 || c === 123 || c === 125; + } + function fromHexCode(c) { + var lc; + if (48 <= c && c <= 57) { + return c - 48; + } + lc = c | 32; + if (97 <= lc && lc <= 102) { + return lc - 97 + 10; + } + return -1; + } + function escapedHexLen(c) { + if (c === 120) { + return 2; + } + if (c === 117) { + return 4; + } + if (c === 85) { + return 8; + } + return 0; + } + function fromDecimalCode(c) { + if (48 <= c && c <= 57) { + return c - 48; + } + return -1; + } + function simpleEscapeSequence(c) { + return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\x85" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : ""; + } + function charFromCodepoint(c) { + if (c <= 65535) { + return String.fromCharCode(c); + } + return String.fromCharCode((c - 65536 >> 10) + 55296, (c - 65536 & 1023) + 56320); + } + var simpleEscapeCheck = new Array(256); + var simpleEscapeMap = new Array(256); + for (i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); + } + var i; + function State(input, options) { + this.input = input; + this.filename = options["filename"] || null; + this.schema = options["schema"] || DEFAULT_SCHEMA; + this.onWarning = options["onWarning"] || null; + this.legacy = options["legacy"] || false; + this.json = options["json"] || false; + this.listener = options["listener"] || null; + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + this.firstTabInLine = -1; + this.documents = []; + } + function generateError(state, message2) { + var mark = { + name: state.filename, + buffer: state.input.slice(0, -1), + position: state.position, + line: state.line, + column: state.position - state.lineStart + }; + mark.snippet = makeSnippet(mark); + return new YAMLException(message2, mark); + } + function throwError(state, message2) { + throw generateError(state, message2); + } + function throwWarning(state, message2) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message2)); + } + } + var directiveHandlers = { + YAML: function handleYamlDirective(state, name, args2) { + var match, major, minor; + if (state.version !== null) { + throwError(state, "duplication of %YAML directive"); + } + if (args2.length !== 1) { + throwError(state, "YAML directive accepts exactly one argument"); + } + match = /^([0-9]+)\.([0-9]+)$/.exec(args2[0]); + if (match === null) { + throwError(state, "ill-formed argument of the YAML directive"); + } + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + if (major !== 1) { + throwError(state, "unacceptable YAML version of the document"); + } + state.version = args2[0]; + state.checkLineBreaks = minor < 2; + if (minor !== 1 && minor !== 2) { + throwWarning(state, "unsupported YAML version of the document"); + } + }, + TAG: function handleTagDirective(state, name, args2) { + var handle, prefix; + if (args2.length !== 2) { + throwError(state, "TAG directive accepts exactly two arguments"); + } + handle = args2[0]; + prefix = args2[1]; + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, "ill-formed tag handle (first argument) of the TAG directive"); + } + if (_hasOwnProperty.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, "ill-formed tag prefix (second argument) of the TAG directive"); + } + try { + prefix = decodeURIComponent(prefix); + } catch (err) { + throwError(state, "tag prefix is malformed: " + prefix); + } + state.tagMap[handle] = prefix; + } + }; + function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + if (start < end) { + _result = state.input.slice(start, end); + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 9 || 32 <= _character && _character <= 1114111)) { + throwError(state, "expected valid JSON character"); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, "the stream contains non-printable characters"); + } + state.result += _result; + } + } + function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + if (!common.isObject(source)) { + throwError(state, "cannot merge mappings; the provided source object is unacceptable"); + } + sourceKeys = Object.keys(source); + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + if (!_hasOwnProperty.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } + } + function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) { + var index, quantity; + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state, "nested arrays are not supported inside keys"); + } + if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") { + keyNode[index] = "[object Object]"; + } + } + } + if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") { + keyNode = "[object Object]"; + } + keyNode = String(keyNode); + if (_result === null) { + _result = {}; + } + if (keyTag === "tag:yaml.org,2002:merge") { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) { + state.line = startLine || state.line; + state.lineStart = startLineStart || state.lineStart; + state.position = startPos || state.position; + throwError(state, "duplicated mapping key"); + } + if (keyNode === "__proto__") { + Object.defineProperty(_result, keyNode, { + configurable: true, + enumerable: true, + writable: true, + value: valueNode + }); + } else { + _result[keyNode] = valueNode; + } + delete overridableKeys[keyNode]; + } + return _result; + } + function readLineBreak(state) { + var ch; + ch = state.input.charCodeAt(state.position); + if (ch === 10) { + state.position++; + } else if (ch === 13) { + state.position++; + if (state.input.charCodeAt(state.position) === 10) { + state.position++; + } + } else { + throwError(state, "a line break is expected"); + } + state.line += 1; + state.lineStart = state.position; + state.firstTabInLine = -1; + } + function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + if (ch === 9 && state.firstTabInLine === -1) { + state.firstTabInLine = state.position; + } + ch = state.input.charCodeAt(++state.position); + } + if (allowComments && ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 10 && ch !== 13 && ch !== 0); + } + if (is_EOL(ch)) { + readLineBreak(state); + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + while (ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, "deficient indentation"); + } + return lineBreaks; + } + function testDocumentSeparator(state) { + var _position = state.position, ch; + ch = state.input.charCodeAt(_position); + if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) { + _position += 3; + ch = state.input.charCodeAt(_position); + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + return false; + } + function writeFoldedLines(state, count) { + if (count === 1) { + state.result += " "; + } else if (count > 1) { + state.result += common.repeat("\n", count - 1); + } + } + function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch; + ch = state.input.charCodeAt(state.position); + if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) { + return false; + } + if (ch === 63 || ch === 45) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + state.kind = "scalar"; + state.result = ""; + captureStart = captureEnd = state.position; + hasPendingContent = false; + while (ch !== 0) { + if (ch === 58) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + } else if (ch === 35) { + preceding = state.input.charCodeAt(state.position - 1); + if (is_WS_OR_EOL(preceding)) { + break; + } + } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + ch = state.input.charCodeAt(++state.position); + } + captureSegment(state, captureStart, captureEnd, false); + if (state.result) { + return true; + } + state.kind = _kind; + state.result = _result; + return false; + } + function readSingleQuotedScalar(state, nodeIndent) { + var ch, captureStart, captureEnd; + ch = state.input.charCodeAt(state.position); + if (ch !== 39) { + return false; + } + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 39) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (ch === 39) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, "unexpected end of the document within a single quoted scalar"); + } else { + state.position++; + captureEnd = state.position; + } + } + throwError(state, "unexpected end of the stream within a single quoted scalar"); + } + function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, captureEnd, hexLength, hexResult, tmp, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 34) { + return false; + } + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 34) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + } else if (ch === 92) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + } else { + throwError(state, "expected hexadecimal character"); + } + } + state.result += charFromCodepoint(hexResult); + state.position++; + } else { + throwError(state, "unknown escape sequence"); + } + captureStart = captureEnd = state.position; + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, "unexpected end of the document within a double quoted scalar"); + } else { + state.position++; + captureEnd = state.position; + } + } + throwError(state, "unexpected end of the stream within a double quoted scalar"); + } + function readFlowCollection(state, nodeIndent) { + var readNext = true, _line, _lineStart, _pos, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = Object.create(null), keyNode, keyTag, valueNode, ch; + ch = state.input.charCodeAt(state.position); + if (ch === 91) { + terminator = 93; + isMapping = false; + _result = []; + } else if (ch === 123) { + terminator = 125; + isMapping = true; + _result = {}; + } else { + return false; + } + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(++state.position); + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? "mapping" : "sequence"; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, "missed comma between flow collection entries"); + } else if (ch === 44) { + throwError(state, "expected the node content, but found ','"); + } + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + if (ch === 63) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + _line = state.line; + _lineStart = state.lineStart; + _pos = state.position; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if ((isExplicitPair || state.line === _line) && ch === 58) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); + } else { + _result.push(keyNode); + } + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === 44) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + throwError(state, "unexpected end of the stream within a flow collection"); + } + function readBlockScalar(state, nodeIndent) { + var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch; + ch = state.input.charCodeAt(state.position); + if (ch === 124) { + folding = false; + } else if (ch === 62) { + folding = true; + } else { + return false; + } + state.kind = "scalar"; + state.result = ""; + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + if (ch === 43 || ch === 45) { + if (CHOMPING_CLIP === chomping) { + chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, "repeat of a chomping mode identifier"); + } + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one"); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, "repeat of an indentation width identifier"); + } + } else { + break; + } + } + if (is_WHITE_SPACE(ch)) { + do { + ch = state.input.charCodeAt(++state.position); + } while (is_WHITE_SPACE(ch)); + if (ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (!is_EOL(ch) && ch !== 0); + } + } + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + ch = state.input.charCodeAt(state.position); + while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + if (is_EOL(ch)) { + emptyLines++; + continue; + } + if (state.lineIndent < textIndent) { + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { + state.result += "\n"; + } + } + break; + } + if (folding) { + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat("\n", emptyLines + 1); + } else if (emptyLines === 0) { + if (didReadContent) { + state.result += " "; + } + } else { + state.result += common.repeat("\n", emptyLines); + } + } else { + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + while (!is_EOL(ch) && ch !== 0) { + ch = state.input.charCodeAt(++state.position); + } + captureSegment(state, captureStart, state.position, false); + } + return true; + } + function readBlockSequence(state, nodeIndent) { + var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch; + if (state.firstTabInLine !== -1) + return false; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + if (state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, "tab characters must not be used in indentation"); + } + if (ch !== 45) { + break; + } + following = state.input.charCodeAt(state.position + 1); + if (!is_WS_OR_EOL(following)) { + break; + } + detected = true; + state.position++; + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { + throwError(state, "bad indentation of a sequence entry"); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "sequence"; + state.result = _result; + return true; + } + return false; + } + function readBlockMapping(state, nodeIndent, flowIndent) { + var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch; + if (state.firstTabInLine !== -1) + return false; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + if (!atExplicitKey && state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, "tab characters must not be used in indentation"); + } + following = state.input.charCodeAt(state.position + 1); + _line = state.line; + if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) { + if (ch === 63) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = true; + allowCompact = true; + } else if (atExplicitKey) { + atExplicitKey = false; + allowCompact = true; + } else { + throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"); + } + state.position += 1; + ch = following; + } else { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + break; + } + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (ch === 58) { + ch = state.input.charCodeAt(++state.position); + if (!is_WS_OR_EOL(ch)) { + throwError(state, "a whitespace character is expected after the key-value separator within a block mapping"); + } + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + } else if (detected) { + throwError(state, "can not read an implicit mapping pair; a colon is missed"); + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } else if (detected) { + throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key"); + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } + if (state.line === _line || state.lineIndent > nodeIndent) { + if (atExplicitKey) { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + } + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { + throwError(state, "bad indentation of a mapping entry"); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "mapping"; + state.result = _result; + } + return detected; + } + function readTagProperty(state) { + var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 33) + return false; + if (state.tag !== null) { + throwError(state, "duplication of a tag property"); + } + ch = state.input.charCodeAt(++state.position); + if (ch === 60) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + } else if (ch === 33) { + isNamed = true; + tagHandle = "!!"; + ch = state.input.charCodeAt(++state.position); + } else { + tagHandle = "!"; + } + _position = state.position; + if (isVerbatim) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0 && ch !== 62); + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, "unexpected end of the stream within a verbatim tag"); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + if (ch === 33) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, "named tag handle cannot contain such characters"); + } + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, "tag suffix cannot contain exclamation marks"); + } + } + ch = state.input.charCodeAt(++state.position); + } + tagName = state.input.slice(_position, state.position); + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, "tag suffix cannot contain flow indicator characters"); + } + } + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, "tag name cannot contain such characters: " + tagName); + } + try { + tagName = decodeURIComponent(tagName); + } catch (err) { + throwError(state, "tag name is malformed: " + tagName); + } + if (isVerbatim) { + state.tag = tagName; + } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + } else if (tagHandle === "!") { + state.tag = "!" + tagName; + } else if (tagHandle === "!!") { + state.tag = "tag:yaml.org,2002:" + tagName; + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + return true; + } + function readAnchorProperty(state) { + var _position, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 38) + return false; + if (state.anchor !== null) { + throwError(state, "duplication of an anchor property"); + } + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position === _position) { + throwError(state, "name of an anchor node must contain at least one character"); + } + state.anchor = state.input.slice(_position, state.position); + return true; + } + function readAlias(state) { + var _position, alias, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 42) + return false; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position === _position) { + throwError(state, "name of an alias node must contain at least one character"); + } + alias = state.input.slice(_position, state.position); + if (!_hasOwnProperty.call(state.anchorMap, alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; + } + function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type, flowIndent, blockIndent; + if (state.listener !== null) { + state.listener("open", state); + } + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext; + if (allowToSeek) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + blockIndent = state.position - state.lineStart; + if (indentStatus === 1) { + if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + } else if (readAlias(state)) { + hasContent = true; + if (state.tag !== null || state.anchor !== null) { + throwError(state, "alias node should not have any properties"); + } + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + if (state.tag === null) { + state.tag = "?"; + } + } + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + if (state.tag === null) { + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } else if (state.tag === "?") { + if (state.result !== null && state.kind !== "scalar") { + throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); + } + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + if (type.resolve(state.result)) { + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (state.tag !== "!") { + if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) { + type = state.typeMap[state.kind || "fallback"][state.tag]; + } else { + type = null; + typeList = state.typeMap.multi[state.kind || "fallback"]; + for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { + if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type = typeList[typeIndex]; + break; + } + } + } + if (!type) { + throwError(state, "unknown tag !<" + state.tag + ">"); + } + if (state.result !== null && type.kind !== state.kind) { + throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + if (!type.resolve(state.result, state.tag)) { + throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag"); + } else { + state.result = type.construct(state.result, state.tag); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } + if (state.listener !== null) { + state.listener("close", state); + } + return state.tag !== null || state.anchor !== null || hasContent; + } + function readDocument(state) { + var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = Object.create(null); + state.anchorMap = Object.create(null); + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if (state.lineIndent > 0 || ch !== 37) { + break; + } + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + if (directiveName.length < 1) { + throwError(state, "directive name must not be less than one character in length"); + } + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0 && !is_EOL(ch)); + break; + } + if (is_EOL(ch)) + break; + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveArgs.push(state.input.slice(_position, state.position)); + } + if (ch !== 0) + readLineBreak(state); + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + skipSeparationSpace(state, true, -1); + if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } else if (hasDirectives) { + throwError(state, "directives end mark is expected"); + } + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, "non-ASCII line breaks are interpreted as content"); + } + state.documents.push(state.result); + if (state.position === state.lineStart && testDocumentSeparator(state)) { + if (state.input.charCodeAt(state.position) === 46) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + if (state.position < state.length - 1) { + throwError(state, "end of the stream or a document separator is expected"); + } else { + return; + } + } + function loadDocuments(input, options) { + input = String(input); + options = options || {}; + if (input.length !== 0) { + if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) { + input += "\n"; + } + if (input.charCodeAt(0) === 65279) { + input = input.slice(1); + } + } + var state = new State(input, options); + var nullpos = input.indexOf("\0"); + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, "null byte is not allowed in input"); + } + state.input += "\0"; + while (state.input.charCodeAt(state.position) === 32) { + state.lineIndent += 1; + state.position += 1; + } + while (state.position < state.length - 1) { + readDocument(state); + } + return state.documents; + } + function loadAll(input, iterator, options) { + if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") { + options = iterator; + iterator = null; + } + var documents = loadDocuments(input, options); + if (typeof iterator !== "function") { + return documents; + } + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } + } + function load(input, options) { + var documents = loadDocuments(input, options); + if (documents.length === 0) { + return void 0; + } else if (documents.length === 1) { + return documents[0]; + } + throw new YAMLException("expected a single document in the stream, but found more"); + } + module2.exports.loadAll = loadAll; + module2.exports.load = load; + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/dumper.js +var require_dumper = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/dumper.js"(exports2, module2) { + "use strict"; + var common = require_common2(); + var YAMLException = require_exception(); + var DEFAULT_SCHEMA = require_default(); + var _toString = Object.prototype.toString; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CHAR_BOM = 65279; + var CHAR_TAB = 9; + var CHAR_LINE_FEED = 10; + var CHAR_CARRIAGE_RETURN = 13; + var CHAR_SPACE = 32; + var CHAR_EXCLAMATION = 33; + var CHAR_DOUBLE_QUOTE = 34; + var CHAR_SHARP = 35; + var CHAR_PERCENT = 37; + var CHAR_AMPERSAND = 38; + var CHAR_SINGLE_QUOTE = 39; + var CHAR_ASTERISK = 42; + var CHAR_COMMA = 44; + var CHAR_MINUS = 45; + var CHAR_COLON = 58; + var CHAR_EQUALS = 61; + var CHAR_GREATER_THAN = 62; + var CHAR_QUESTION = 63; + var CHAR_COMMERCIAL_AT = 64; + var CHAR_LEFT_SQUARE_BRACKET = 91; + var CHAR_RIGHT_SQUARE_BRACKET = 93; + var CHAR_GRAVE_ACCENT = 96; + var CHAR_LEFT_CURLY_BRACKET = 123; + var CHAR_VERTICAL_LINE = 124; + var CHAR_RIGHT_CURLY_BRACKET = 125; + var ESCAPE_SEQUENCES = {}; + ESCAPE_SEQUENCES[0] = "\\0"; + ESCAPE_SEQUENCES[7] = "\\a"; + ESCAPE_SEQUENCES[8] = "\\b"; + ESCAPE_SEQUENCES[9] = "\\t"; + ESCAPE_SEQUENCES[10] = "\\n"; + ESCAPE_SEQUENCES[11] = "\\v"; + ESCAPE_SEQUENCES[12] = "\\f"; + ESCAPE_SEQUENCES[13] = "\\r"; + ESCAPE_SEQUENCES[27] = "\\e"; + ESCAPE_SEQUENCES[34] = '\\"'; + ESCAPE_SEQUENCES[92] = "\\\\"; + ESCAPE_SEQUENCES[133] = "\\N"; + ESCAPE_SEQUENCES[160] = "\\_"; + ESCAPE_SEQUENCES[8232] = "\\L"; + ESCAPE_SEQUENCES[8233] = "\\P"; + var DEPRECATED_BOOLEANS_SYNTAX = [ + "y", + "Y", + "yes", + "Yes", + "YES", + "on", + "On", + "ON", + "n", + "N", + "no", + "No", + "NO", + "off", + "Off", + "OFF" + ]; + var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; + var SINGLE_LINE_KEYS = { + cpu: true, + engines: true, + os: true, + resolution: true + }; + function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + if (map === null) + return {}; + result = {}; + keys = Object.keys(map); + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + if (tag.slice(0, 2) === "!!") { + tag = "tag:yaml.org,2002:" + tag.slice(2); + } + type = schema.compiledTypeMap["fallback"][tag]; + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + result[tag] = style; + } + return result; + } + function encodeHex(character) { + var string, handle, length; + string = character.toString(16).toUpperCase(); + if (character <= 255) { + handle = "x"; + length = 2; + } else if (character <= 65535) { + handle = "u"; + length = 4; + } else if (character <= 4294967295) { + handle = "U"; + length = 8; + } else { + throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF"); + } + return "\\" + handle + common.repeat("0", length - string.length) + string; + } + var QUOTING_TYPE_SINGLE = 1; + var QUOTING_TYPE_DOUBLE = 2; + function State(options) { + this.blankLines = options["blankLines"] || false; + this.schema = options["schema"] || DEFAULT_SCHEMA; + this.indent = Math.max(1, options["indent"] || 2); + this.noArrayIndent = options["noArrayIndent"] || false; + this.skipInvalid = options["skipInvalid"] || false; + this.flowLevel = common.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"]; + this.styleMap = compileStyleMap(this.schema, options["styles"] || null); + this.sortKeys = options["sortKeys"] || false; + this.lineWidth = options["lineWidth"] || 80; + this.noRefs = options["noRefs"] || false; + this.noCompatMode = options["noCompatMode"] || false; + this.condenseFlow = options["condenseFlow"] || false; + this.quotingType = options["quotingType"] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; + this.forceQuotes = options["forceQuotes"] || false; + this.replacer = typeof options["replacer"] === "function" ? options["replacer"] : null; + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + this.tag = null; + this.result = ""; + this.duplicates = []; + this.usedDuplicates = null; + } + function indentString(string, spaces) { + var ind = common.repeat(" ", spaces), position = 0, next = -1, result = "", line, length = string.length; + while (position < length) { + next = string.indexOf("\n", position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + if (line.length && line !== "\n") + result += ind; + result += line; + } + return result; + } + function generateNextLine(state, level, doubleLine) { + return "\n" + (doubleLine ? "\n" : "") + common.repeat(" ", state.indent * level); + } + function testImplicitResolving(state, str) { + var index, length, type; + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + if (type.resolve(str)) { + return true; + } + } + return false; + } + function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; + } + function isPrintable(c) { + return 32 <= c && c <= 126 || 161 <= c && c <= 55295 && c !== 8232 && c !== 8233 || 57344 <= c && c <= 65533 && c !== CHAR_BOM || 65536 <= c && c <= 1114111; + } + function isNsCharOrWhitespace(c) { + return isPrintable(c) && c !== CHAR_BOM && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED; + } + function isPlainSafe(c, prev, inblock) { + var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); + var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); + return (inblock ? cIsNsCharOrWhitespace : cIsNsCharOrWhitespace && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET) && c !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar; + } + function isPlainSafeFirst(c) { + return isPrintable(c) && c !== CHAR_BOM && !isWhitespace(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT; + } + function isPlainSafeLast(c) { + return !isWhitespace(c) && c !== CHAR_COLON; + } + function codePointAt(string, pos) { + var first = string.charCodeAt(pos), second; + if (first >= 55296 && first <= 56319 && pos + 1 < string.length) { + second = string.charCodeAt(pos + 1); + if (second >= 56320 && second <= 57343) { + return (first - 55296) * 1024 + second - 56320 + 65536; + } + } + return first; + } + function needIndentIndicator(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); + } + var STYLE_PLAIN = 1; + var STYLE_SINGLE = 2; + var STYLE_LITERAL = 3; + var STYLE_FOLDED = 4; + var STYLE_DOUBLE = 5; + function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) { + var i; + var char = 0; + var prevChar = null; + var hasLineBreak = false; + var hasFoldableLine = false; + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; + var plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1)); + if (singleLineOnly || forceQuotes) { + for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { + char = codePointAt(string, i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + } else { + for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { + char = codePointAt(string, i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "; + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "); + } + if (!hasLineBreak && !hasFoldableLine) { + if (plain && !forceQuotes && !testAmbiguousType(string)) { + return STYLE_PLAIN; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + if (indentPerLevel > 9 && needIndentIndicator(string)) { + return STYLE_DOUBLE; + } + if (!forceQuotes) { + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + function writeScalar(state, string, level, iskey, inblock, singleLO) { + state.dump = function() { + if (string.length === 0) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; + } + if (!state.noCompatMode) { + if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'"; + } + } + var indent = state.indent * Math.max(1, level); + var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + var singleLineOnly = iskey || singleLO || state.flowLevel > -1 && level >= state.flowLevel; + function testAmbiguity(string2) { + return testImplicitResolving(state, string2); + } + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return "|" + blockHeader(string, state.indent) + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return ">" + blockHeader(string, state.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + default: + throw new YAMLException("impossible error: invalid scalar style"); + } + }(); + } + function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ""; + var clip = string[string.length - 1] === "\n"; + var keep = clip && (string[string.length - 2] === "\n" || string === "\n"); + var chomp = keep ? "+" : clip ? "" : "-"; + return indentIndicator + chomp + "\n"; + } + function dropEndingNewline(string) { + return string[string.length - 1] === "\n" ? string.slice(0, -1) : string; + } + function foldString(string, width) { + var lineRe = /(\n+)([^\n]*)/g; + var result = function() { + var nextLF = string.indexOf("\n"); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }(); + var prevMoreIndented = string[0] === "\n" || string[0] === " "; + var moreIndented; + var match; + while (match = lineRe.exec(string)) { + var prefix = match[1], line = match[2]; + moreIndented = line[0] === " "; + result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); + prevMoreIndented = moreIndented; + } + return result; + } + function foldLine(line, width) { + if (line === "" || line[0] === " ") + return line; + var breakRe = / [^ ]/g; + var match; + var start = 0, end, curr = 0, next = 0; + var result = ""; + while (match = breakRe.exec(line)) { + next = match.index; + if (next - start > width) { + end = curr > start ? curr : next; + result += "\n" + line.slice(start, end); + start = end + 1; + } + curr = next; + } + result += "\n"; + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + "\n" + line.slice(curr + 1); + } else { + result += line.slice(start); + } + return result.slice(1); + } + function escapeString(string) { + var result = ""; + var char = 0; + var escapeSeq; + for (var i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { + char = codePointAt(string, i); + escapeSeq = ESCAPE_SEQUENCES[char]; + if (!escapeSeq && isPrintable(char)) { + result += string[i]; + if (char >= 65536) + result += string[i + 1]; + } else { + result += escapeSeq || encodeHex(char); + } + } + return result; + } + function writeFlowSequence(state, level, object) { + var _result = "", _tag = state.tag, index, length, value; + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + if (writeNode(state, level, value, false, false) || typeof value === "undefined" && writeNode(state, level, null, false, false)) { + if (_result !== "") + _result += "," + (!state.condenseFlow ? " " : ""); + _result += state.dump; + } + } + state.tag = _tag; + state.dump = "[" + _result + "]"; + } + function writeBlockSequence(state, level, object, compact) { + var _result = "", _tag = state.tag, index, length, value; + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + if (writeNode(state, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state, level + 1, null, true, true, false, true)) { + if (!compact || _result !== "") { + _result += generateNextLine(state, level); + } + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += "-"; + } else { + _result += "- "; + } + _result += state.dump; + } + } + state.tag = _tag; + state.dump = _result || "[]"; + } + function writeFlowMapping(state, level, object, singleLineOnly) { + var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer; + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ""; + if (_result !== "") + pairBuffer += ", "; + if (state.condenseFlow) + pairBuffer += '"'; + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + if (!writeNode(state, level, objectKey, false, false, singleLineOnly)) { + continue; + } + if (state.dump.length > 1024) + pairBuffer += "? "; + pairBuffer += state.dump + (state.condenseFlow ? '"' : "") + ":" + (state.condenseFlow ? "" : " "); + if (!writeNode(state, level, objectValue, false, false, singleLineOnly)) { + continue; + } + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = "{" + _result + "}"; + } + function writeBlockMapping(state, level, object, compact, doubleLine) { + var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer; + if (state.sortKeys === true) { + objectKeyList.sort(); + } else if (typeof state.sortKeys === "function") { + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + throw new YAMLException("sortKeys must be a boolean or a function"); + } + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ""; + if (!compact || _result !== "") { + pairBuffer += generateNextLine(state, level, doubleLine); + } + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; + } + explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024; + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += "?"; + } else { + pairBuffer += "? "; + } + } + pairBuffer += state.dump; + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + if (!writeNode(state, level + 1, objectValue, true, explicitPair, null, null, objectKey)) { + continue; + } + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ":"; + } else { + pairBuffer += ": "; + } + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = _result || "{}"; + } + function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + typeList = explicit ? state.explicitTypes : state.implicitTypes; + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) { + if (explicit) { + if (type.multi && type.representName) { + state.tag = type.representName(object); + } else { + state.tag = type.tag; + } + } else { + state.tag = "?"; + } + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + if (_toString.call(type.represent) === "[object Function]") { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new YAMLException("!<" + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + state.dump = _result; + } + return true; + } + } + return false; + } + function writeNode(state, level, object, block, compact, iskey, isblockseq, objectKey, singleLineOnly) { + state.tag = null; + state.dump = object; + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + var type = _toString.call(state.dump); + var inblock = block; + var tagStr; + if (block) { + block = state.flowLevel < 0 || state.flowLevel > level; + } + var objectOrArray = type === "[object Object]" || type === "[object Array]", duplicateIndex, duplicate; + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) { + compact = false; + } + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = "*ref_" + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === "[object Object]") { + singleLineOnly = SINGLE_LINE_KEYS[objectKey]; + if (block && Object.keys(state.dump).length !== 0 && !singleLineOnly) { + var doubleLine = state.blankLines ? objectKey === "packages" || objectKey === "importers" || level === 0 : false; + writeBlockMapping(state, level, state.dump, compact, doubleLine); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump, singleLineOnly); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + } + } else if (type === "[object Array]") { + singleLineOnly = SINGLE_LINE_KEYS[objectKey]; + if (block && state.dump.length !== 0 && !singleLineOnly) { + if (state.noArrayIndent && !isblockseq && level > 0) { + writeBlockSequence(state, level - 1, state.dump, compact); + } else { + writeBlockSequence(state, level, state.dump, compact); + } + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, level, state.dump, singleLineOnly); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + } + } else if (type === "[object String]") { + if (state.tag !== "?") { + writeScalar(state, state.dump, level, iskey, inblock, singleLineOnly); + } + } else if (type === "[object Undefined]") { + return false; + } else { + if (state.skipInvalid) + return false; + throw new YAMLException("unacceptable kind of an object to dump " + type); + } + if (state.tag !== null && state.tag !== "?") { + tagStr = encodeURI(state.tag[0] === "!" ? state.tag.slice(1) : state.tag).replace(/!/g, "%21"); + if (state.tag[0] === "!") { + tagStr = "!" + tagStr; + } else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") { + tagStr = "!!" + tagStr.slice(18); + } else { + tagStr = "!<" + tagStr + ">"; + } + state.dump = tagStr + " " + state.dump; + } + } + return true; + } + function getDuplicateReferences(object, state) { + var objects = [], duplicatesIndexes = [], index, length; + inspectNode(object, objects, duplicatesIndexes); + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); + } + function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, index, length; + if (object !== null && typeof object === "object") { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } + } + function dump(input, options) { + options = options || {}; + var state = new State(options); + if (!state.noRefs) + getDuplicateReferences(input, state); + var value = input; + if (state.replacer) { + value = state.replacer.call({ "": value }, "", value); + } + if (writeNode(state, 0, value, true, true)) + return state.dump + "\n"; + return ""; + } + module2.exports.dump = dump; + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/index.js +var require_js_yaml = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/index.js"(exports2, module2) { + "use strict"; + var loader = require_loader(); + var dumper = require_dumper(); + function renamed(from, to) { + return function() { + throw new Error("Function yaml." + from + " is removed in js-yaml 4. Use yaml." + to + " instead, which is now safe by default."); + }; + } + module2.exports.Type = require_type2(); + module2.exports.Schema = require_schema(); + module2.exports.FAILSAFE_SCHEMA = require_failsafe(); + module2.exports.JSON_SCHEMA = require_json(); + module2.exports.CORE_SCHEMA = require_core2(); + module2.exports.DEFAULT_SCHEMA = require_default(); + module2.exports.load = loader.load; + module2.exports.loadAll = loader.loadAll; + module2.exports.dump = dumper.dump; + module2.exports.YAMLException = require_exception(); + module2.exports.safeLoad = renamed("safeLoad", "load"); + module2.exports.safeLoadAll = renamed("safeLoadAll", "loadAll"); + module2.exports.safeDump = renamed("safeDump", "dump"); + } +}); + +// ../../node_modules/.pnpm/write-yaml-file@4.2.0/node_modules/write-yaml-file/index.js +var require_write_yaml_file = __commonJS({ + "../../node_modules/.pnpm/write-yaml-file@4.2.0/node_modules/write-yaml-file/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var fs = require("fs"); + var writeFileAtomic = require_write_file_atomic(); + var YAML = require_js_yaml(); + var main = (fn2, fp, data, opts) => { + if (!fp) { + throw new TypeError("Expected a filepath"); + } + if (data === void 0) { + throw new TypeError("Expected data to stringify"); + } + opts = opts || {}; + const yaml = YAML.dump(data, opts); + return fn2(fp, yaml, { mode: opts.mode }); + }; + module2.exports = async (fp, data, opts) => { + await fs.promises.mkdir(path.dirname(fp), { recursive: true }); + return main(writeFileAtomic, fp, data, opts); + }; + module2.exports.sync = (fp, data, opts) => { + fs.mkdirSync(path.dirname(fp), { recursive: true }); + main(writeFileAtomic.sync, fp, data, opts); + }; + } +}); + +// ../write-project-manifest/lib/index.js +var require_lib17 = __commonJS({ + "../write-project-manifest/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var json5_1 = __importDefault(require_lib16()); + var write_file_atomic_1 = __importDefault(require_write_file_atomic()); + var write_yaml_file_1 = __importDefault(require_write_yaml_file()); + var YAML_FORMAT = { + noCompatMode: true, + noRefs: true + }; + async function writeProjectManifest(filePath, manifest, opts) { + var _a; + const fileType = filePath.substr(filePath.lastIndexOf(".") + 1).toLowerCase(); + if (fileType === "yaml") { + return write_yaml_file_1.default(filePath, manifest, YAML_FORMAT); + } + await fs_1.promises.mkdir(path_1.default.dirname(filePath), { recursive: true }); + const trailingNewline = (opts === null || opts === void 0 ? void 0 : opts.insertFinalNewline) === false ? "" : "\n"; + const json = (fileType === "json5" ? json5_1.default : JSON).stringify(manifest, void 0, (_a = opts === null || opts === void 0 ? void 0 : opts.indent) !== null && _a !== void 0 ? _a : " "); + return write_file_atomic_1.default(filePath, `${json}${trailingNewline}`); + } + exports2.default = writeProjectManifest; + } +}); + +// ../../node_modules/.pnpm/read-yaml-file@2.1.0/node_modules/read-yaml-file/index.js +var require_read_yaml_file = __commonJS({ + "../../node_modules/.pnpm/read-yaml-file@2.1.0/node_modules/read-yaml-file/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var stripBom = require_strip_bom(); + var yaml = require_js_yaml(); + var parse = (data) => yaml.load(stripBom(data)); + var readYamlFile = (fp) => fs.promises.readFile(fp, "utf8").then((data) => parse(data)); + module2.exports = readYamlFile; + module2.exports.default = readYamlFile; + module2.exports.sync = (fp) => parse(fs.readFileSync(fp, "utf8")); + } +}); + +// ../../node_modules/.pnpm/detect-indent@6.1.0/node_modules/detect-indent/index.js +var require_detect_indent = __commonJS({ + "../../node_modules/.pnpm/detect-indent@6.1.0/node_modules/detect-indent/index.js"(exports2, module2) { + "use strict"; + var INDENT_REGEX = /^(?:( )+|\t+)/; + var INDENT_TYPE_SPACE = "space"; + var INDENT_TYPE_TAB = "tab"; + function makeIndentsMap(string, ignoreSingleSpaces) { + const indents = new Map(); + let previousSize = 0; + let previousIndentType; + let key; + for (const line of string.split(/\n/g)) { + if (!line) { + continue; + } + let indent; + let indentType; + let weight; + let entry; + const matches = line.match(INDENT_REGEX); + if (matches === null) { + previousSize = 0; + previousIndentType = ""; + } else { + indent = matches[0].length; + if (matches[1]) { + indentType = INDENT_TYPE_SPACE; + } else { + indentType = INDENT_TYPE_TAB; + } + if (ignoreSingleSpaces && indentType === INDENT_TYPE_SPACE && indent === 1) { + continue; + } + if (indentType !== previousIndentType) { + previousSize = 0; + } + previousIndentType = indentType; + weight = 0; + const indentDifference = indent - previousSize; + previousSize = indent; + if (indentDifference === 0) { + weight++; + } else { + const absoluteIndentDifference = indentDifference > 0 ? indentDifference : -indentDifference; + key = encodeIndentsKey(indentType, absoluteIndentDifference); + } + entry = indents.get(key); + if (entry === void 0) { + entry = [1, 0]; + } else { + entry = [++entry[0], entry[1] + weight]; + } + indents.set(key, entry); + } + } + return indents; + } + function encodeIndentsKey(indentType, indentAmount) { + const typeCharacter = indentType === INDENT_TYPE_SPACE ? "s" : "t"; + return typeCharacter + String(indentAmount); + } + function decodeIndentsKey(indentsKey) { + const keyHasTypeSpace = indentsKey[0] === "s"; + const type = keyHasTypeSpace ? INDENT_TYPE_SPACE : INDENT_TYPE_TAB; + const amount = Number(indentsKey.slice(1)); + return { type, amount }; + } + function getMostUsedKey(indents) { + let result; + let maxUsed = 0; + let maxWeight = 0; + for (const [key, [usedCount, weight]] of indents) { + if (usedCount > maxUsed || usedCount === maxUsed && weight > maxWeight) { + maxUsed = usedCount; + maxWeight = weight; + result = key; + } + } + return result; + } + function makeIndentString(type, amount) { + const indentCharacter = type === INDENT_TYPE_SPACE ? " " : " "; + return indentCharacter.repeat(amount); + } + module2.exports = (string) => { + if (typeof string !== "string") { + throw new TypeError("Expected a string"); + } + let indents = makeIndentsMap(string, true); + if (indents.size === 0) { + indents = makeIndentsMap(string, false); + } + const keyOfMostUsedIndent = getMostUsedKey(indents); + let type; + let amount = 0; + let indent = ""; + if (keyOfMostUsedIndent !== void 0) { + ({ type, amount } = decodeIndentsKey(keyOfMostUsedIndent)); + indent = makeIndentString(type, amount); + } + return { + amount, + type, + indent + }; + }; + } +}); + +// ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +var require_fast_deep_equal = __commonJS({ + "../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports2, module2) { + "use strict"; + module2.exports = function equal(a, b) { + if (a === b) + return true; + if (a && b && typeof a == "object" && typeof b == "object") { + if (a.constructor !== b.constructor) + return false; + var length, i, keys; + if (Array.isArray(a)) { + length = a.length; + if (length != b.length) + return false; + for (i = length; i-- !== 0; ) + if (!equal(a[i], b[i])) + return false; + return true; + } + if (a.constructor === RegExp) + return a.source === b.source && a.flags === b.flags; + if (a.valueOf !== Object.prototype.valueOf) + return a.valueOf() === b.valueOf(); + if (a.toString !== Object.prototype.toString) + return a.toString() === b.toString(); + keys = Object.keys(a); + length = keys.length; + if (length !== Object.keys(b).length) + return false; + for (i = length; i-- !== 0; ) + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) + return false; + for (i = length; i-- !== 0; ) { + var key = keys[i]; + if (!equal(a[key], b[key])) + return false; + } + return true; + } + return a !== a && b !== b; + }; + } +}); + +// ../../node_modules/.pnpm/is-plain-obj@2.1.0/node_modules/is-plain-obj/index.js +var require_is_plain_obj = __commonJS({ + "../../node_modules/.pnpm/is-plain-obj@2.1.0/node_modules/is-plain-obj/index.js"(exports2, module2) { + "use strict"; + module2.exports = (value) => { + if (Object.prototype.toString.call(value) !== "[object Object]") { + return false; + } + const prototype = Object.getPrototypeOf(value); + return prototype === null || prototype === Object.prototype; + }; + } +}); + +// ../../node_modules/.pnpm/sort-keys@4.2.0/node_modules/sort-keys/index.js +var require_sort_keys = __commonJS({ + "../../node_modules/.pnpm/sort-keys@4.2.0/node_modules/sort-keys/index.js"(exports2, module2) { + "use strict"; + var isPlainObject = require_is_plain_obj(); + module2.exports = (object, options = {}) => { + if (!isPlainObject(object) && !Array.isArray(object)) { + throw new TypeError("Expected a plain object or array"); + } + const { deep } = options; + const seenInput = []; + const seenOutput = []; + const deepSortArray = (array) => { + const seenIndex = seenInput.indexOf(array); + if (seenIndex !== -1) { + return seenOutput[seenIndex]; + } + const result = []; + seenInput.push(array); + seenOutput.push(result); + result.push(...array.map((item) => { + if (Array.isArray(item)) { + return deepSortArray(item); + } + if (isPlainObject(item)) { + return sortKeys(item); + } + return item; + })); + return result; + }; + const sortKeys = (object2) => { + const seenIndex = seenInput.indexOf(object2); + if (seenIndex !== -1) { + return seenOutput[seenIndex]; + } + const result = {}; + const keys = Object.keys(object2).sort(options.compare); + seenInput.push(object2); + seenOutput.push(result); + for (const key of keys) { + const value = object2[key]; + let newValue; + if (deep && Array.isArray(value)) { + newValue = deepSortArray(value); + } else { + newValue = deep && isPlainObject(value) ? sortKeys(value) : value; + } + Object.defineProperty(result, key, { + ...Object.getOwnPropertyDescriptor(object2, key), + value: newValue + }); + } + return result; + }; + if (Array.isArray(object)) { + return deep ? deepSortArray(object) : object.slice(); + } + return sortKeys(object); + }; + } +}); + +// ../graceful-fs/lib/index.js +var require_lib18 = __commonJS({ + "../graceful-fs/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var util_1 = require("util"); + var graceful_fs_1 = __importDefault(require_graceful_fs()); + exports2.default = { + createReadStream: graceful_fs_1.default.createReadStream, + readFile: util_1.promisify(graceful_fs_1.default.readFile), + writeFile: util_1.promisify(graceful_fs_1.default.writeFile) + }; + } +}); + +// ../read-project-manifest/lib/readFile.js +var require_readFile = __commonJS({ + "../read-project-manifest/lib/readFile.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readJsonFile = exports2.readJson5File = void 0; + var graceful_fs_1 = __importDefault(require_lib18()); + var json5_1 = __importDefault(require_lib16()); + var parse_json_1 = __importDefault(require_parse_json()); + var strip_bom_1 = __importDefault(require_strip_bom()); + async function readJson5File(filePath) { + const text = await readFileWithoutBom(filePath); + try { + return { + data: json5_1.default.parse(text), + text + }; + } catch (err) { + err.message = `${err.message} in ${filePath}`; + err["code"] = "ERR_PNPM_JSON5_PARSE"; + throw err; + } + } + exports2.readJson5File = readJson5File; + async function readJsonFile(filePath) { + const text = await readFileWithoutBom(filePath); + try { + return { + data: parse_json_1.default(text, filePath), + text + }; + } catch (err) { + err["code"] = "ERR_PNPM_JSON_PARSE"; + throw err; + } + } + exports2.readJsonFile = readJsonFile; + async function readFileWithoutBom(path) { + return strip_bom_1.default(await graceful_fs_1.default.readFile(path, "utf8")); + } + } +}); + +// ../read-project-manifest/lib/index.js +var require_lib19 = __commonJS({ + "../read-project-manifest/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readExactProjectManifest = exports2.tryReadProjectManifest = exports2.readProjectManifestOnly = exports2.safeReadProjectManifestOnly = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var write_project_manifest_1 = __importDefault(require_lib17()); + var read_yaml_file_1 = __importDefault(require_read_yaml_file()); + var detect_indent_1 = __importDefault(require_detect_indent()); + var fast_deep_equal_1 = __importDefault(require_fast_deep_equal()); + var is_windows_1 = __importDefault(require_is_windows()); + var sort_keys_1 = __importDefault(require_sort_keys()); + var readFile_1 = require_readFile(); + async function safeReadProjectManifestOnly(projectDir) { + try { + return await readProjectManifestOnly(projectDir); + } catch (err) { + if (err.code === "ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND") { + return null; + } + throw err; + } + } + exports2.safeReadProjectManifestOnly = safeReadProjectManifestOnly; + async function readProjectManifest(projectDir) { + const result = await tryReadProjectManifest(projectDir); + if (result.manifest !== null) { + return result; + } + throw new error_1.default("NO_IMPORTER_MANIFEST_FOUND", `No package.json (or package.yaml, or package.json5) was found in "${projectDir}".`); + } + exports2.default = readProjectManifest; + async function readProjectManifestOnly(projectDir) { + const { manifest } = await readProjectManifest(projectDir); + return manifest; + } + exports2.readProjectManifestOnly = readProjectManifestOnly; + async function tryReadProjectManifest(projectDir) { + try { + const manifestPath = path_1.default.join(projectDir, "package.json"); + const { data, text } = await readFile_1.readJsonFile(manifestPath); + return { + fileName: "package.json", + manifest: data, + writeProjectManifest: createManifestWriter({ + ...detectFileFormatting(text), + initialManifest: data, + manifestPath + }) + }; + } catch (err) { + if (err.code !== "ENOENT") + throw err; + } + try { + const manifestPath = path_1.default.join(projectDir, "package.json5"); + const { data, text } = await readFile_1.readJson5File(manifestPath); + return { + fileName: "package.json5", + manifest: data, + writeProjectManifest: createManifestWriter({ + ...detectFileFormatting(text), + initialManifest: data, + manifestPath + }) + }; + } catch (err) { + if (err.code !== "ENOENT") + throw err; + } + try { + const manifestPath = path_1.default.join(projectDir, "package.yaml"); + const manifest = await readPackageYaml(manifestPath); + return { + fileName: "package.yaml", + manifest, + writeProjectManifest: createManifestWriter({ initialManifest: manifest, manifestPath }) + }; + } catch (err) { + if (err.code !== "ENOENT") + throw err; + } + if (is_windows_1.default()) { + let s; + try { + s = await fs_1.promises.stat(projectDir); + } catch (err) { + } + if (s != null && !s.isDirectory()) { + const err = new Error(`"${projectDir}" is not a directory`); + err["code"] = "ENOTDIR"; + throw err; + } + } + const filePath = path_1.default.join(projectDir, "package.json"); + return { + fileName: "package.json", + manifest: null, + writeProjectManifest: async (manifest) => write_project_manifest_1.default(filePath, manifest) + }; + } + exports2.tryReadProjectManifest = tryReadProjectManifest; + function detectFileFormatting(text) { + return { + indent: detect_indent_1.default(text).indent, + insertFinalNewline: text.endsWith("\n") + }; + } + async function readExactProjectManifest(manifestPath) { + const base = path_1.default.basename(manifestPath).toLowerCase(); + switch (base) { + case "package.json": { + const { data, text } = await readFile_1.readJsonFile(manifestPath); + return { + manifest: data, + writeProjectManifest: createManifestWriter({ + ...detectFileFormatting(text), + initialManifest: data, + manifestPath + }) + }; + } + case "package.json5": { + const { data, text } = await readFile_1.readJson5File(manifestPath); + return { + manifest: data, + writeProjectManifest: createManifestWriter({ + ...detectFileFormatting(text), + initialManifest: data, + manifestPath + }) + }; + } + case "package.yaml": { + const manifest = await readPackageYaml(manifestPath); + return { + manifest, + writeProjectManifest: createManifestWriter({ initialManifest: manifest, manifestPath }) + }; + } + } + throw new Error(`Not supported manifest name "${base}"`); + } + exports2.readExactProjectManifest = readExactProjectManifest; + async function readPackageYaml(filePath) { + try { + return await read_yaml_file_1.default(filePath); + } catch (err) { + if (err.name !== "YAMLException") + throw err; + err.message = `${err.message} +in ${filePath}`; + err.code = "ERR_PNPM_YAML_PARSE"; + throw err; + } + } + function createManifestWriter(opts) { + const initialManifest = normalize(JSON.parse(JSON.stringify(opts.initialManifest))); + return async (updatedManifest, force) => { + updatedManifest = normalize(updatedManifest); + if (force === true || !fast_deep_equal_1.default(initialManifest, updatedManifest)) { + return write_project_manifest_1.default(opts.manifestPath, updatedManifest, { + indent: opts.indent, + insertFinalNewline: opts.insertFinalNewline + }); + } + return Promise.resolve(void 0); + }; + } + var dependencyKeys = new Set([ + "dependencies", + "devDependencies", + "optionalDependencies", + "peerDependencies" + ]); + function normalize(manifest) { + const result = {}; + for (const key of Object.keys(manifest)) { + if (!dependencyKeys.has(key)) { + result[key] = manifest[key]; + } else if (Object.keys(manifest[key]).length !== 0) { + result[key] = sort_keys_1.default(manifest[key]); + } + } + return result; + } + } +}); + +// ../cli-utils/lib/readDepNameCompletions.js +var require_readDepNameCompletions = __commonJS({ + "../cli-utils/lib/readDepNameCompletions.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readDepNameCompletions = void 0; + var manifest_utils_1 = require_lib15(); + var read_project_manifest_1 = __importDefault(require_lib19()); + async function readDepNameCompletions(dir) { + const { manifest } = await read_project_manifest_1.default(dir !== null && dir !== void 0 ? dir : process.cwd()); + return Object.keys(manifest_utils_1.getAllDependenciesFromManifest(manifest)).map((name) => ({ name })); + } + exports2.readDepNameCompletions = readDepNameCompletions; + } +}); + +// ../cli-utils/lib/readProjectManifest.js +var require_readProjectManifest = __commonJS({ + "../cli-utils/lib/readProjectManifest.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tryReadProjectManifest = exports2.readProjectManifestOnly = exports2.readProjectManifest = void 0; + var read_project_manifest_1 = __importStar2(require_lib19()); + var utils = read_project_manifest_1; + var packageIsInstallable_1 = require_packageIsInstallable(); + async function readProjectManifest(projectDir, opts) { + const { fileName, manifest, writeProjectManifest } = await read_project_manifest_1.default(projectDir); + packageIsInstallable_1.packageIsInstallable(projectDir, manifest, opts); + return { fileName, manifest, writeProjectManifest }; + } + exports2.readProjectManifest = readProjectManifest; + async function readProjectManifestOnly(projectDir, opts) { + const manifest = await utils.readProjectManifestOnly(projectDir); + packageIsInstallable_1.packageIsInstallable(projectDir, manifest, opts); + return manifest; + } + exports2.readProjectManifestOnly = readProjectManifestOnly; + async function tryReadProjectManifest(projectDir, opts) { + const { fileName, manifest, writeProjectManifest } = await utils.tryReadProjectManifest(projectDir); + if (manifest == null) + return { fileName, manifest, writeProjectManifest }; + packageIsInstallable_1.packageIsInstallable(projectDir, manifest, opts); + return { fileName, manifest, writeProjectManifest }; + } + exports2.tryReadProjectManifest = tryReadProjectManifest; + } +}); + +// ../cli-utils/lib/recursiveSummary.js +var require_recursiveSummary = __commonJS({ + "../cli-utils/lib/recursiveSummary.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throwOnCommandFail = void 0; + var error_1 = __importDefault(require_lib8()); + var RecursiveFailError = class extends error_1.default { + constructor(command, recursiveSummary) { + super("RECURSIVE_FAIL", `"${command}" failed in ${recursiveSummary.fails.length} packages`); + this.fails = recursiveSummary.fails; + this.passes = recursiveSummary.passes; + } + }; + function throwOnCommandFail(command, recursiveSummary) { + if (recursiveSummary.fails.length > 0) { + throw new RecursiveFailError(command, recursiveSummary); + } + } + exports2.throwOnCommandFail = throwOnCommandFail; + } +}); + +// ../cli-utils/lib/style.js +var require_style = __commonJS({ + "../cli-utils/lib/style.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TABLE_OPTIONS = void 0; + var chalk_1 = __importDefault(require_source()); + exports2.TABLE_OPTIONS = { + border: { + topBody: "\u2500", + topJoin: "\u252C", + topLeft: "\u250C", + topRight: "\u2510", + bottomBody: "\u2500", + bottomJoin: "\u2534", + bottomLeft: "\u2514", + bottomRight: "\u2518", + bodyJoin: "\u2502", + bodyLeft: "\u2502", + bodyRight: "\u2502", + joinBody: "\u2500", + joinJoin: "\u253C", + joinLeft: "\u251C", + joinRight: "\u2524" + }, + columns: {} + }; + for (const [key, value] of Object.entries(exports2.TABLE_OPTIONS.border)) { + exports2.TABLE_OPTIONS.border[key] = chalk_1.default.grey(value); + } + } +}); + +// ../cli-utils/lib/index.js +var require_lib20 = __commonJS({ + "../cli-utils/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.docsUrl = exports2.getConfig = void 0; + var cli_meta_1 = __importDefault(require_lib4()); + var getConfig_1 = __importDefault(require_getConfig()); + exports2.getConfig = getConfig_1.default; + __exportStar(require_packageIsInstallable(), exports2); + __exportStar(require_readDepNameCompletions(), exports2); + __exportStar(require_readProjectManifest(), exports2); + __exportStar(require_recursiveSummary(), exports2); + __exportStar(require_style(), exports2); + var docsUrl = (cmd) => { + const [pnpmMajorVersion] = cli_meta_1.default.version.split("."); + return `https://pnpm.io/${pnpmMajorVersion}.x/cli/${cmd}`; + }; + exports2.docsUrl = docsUrl; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/array.js +var require_array2 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/array.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.splitWhen = exports2.flatten = void 0; + function flatten(items) { + return items.reduce((collection, item) => [].concat(collection, item), []); + } + exports2.flatten = flatten; + function splitWhen(items, predicate) { + const result = [[]]; + let groupIndex = 0; + for (const item of items) { + if (predicate(item)) { + groupIndex++; + result[groupIndex] = []; + } else { + result[groupIndex].push(item); + } + } + return result; + } + exports2.splitWhen = splitWhen; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/errno.js +var require_errno = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/errno.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isEnoentCodeError = void 0; + function isEnoentCodeError(error) { + return error.code === "ENOENT"; + } + exports2.isEnoentCodeError = isEnoentCodeError; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/fs.js +var require_fs = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/fs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDirentFromStats = void 0; + var DirentFromStats = class { + constructor(name, stats) { + this.name = name; + this.isBlockDevice = stats.isBlockDevice.bind(stats); + this.isCharacterDevice = stats.isCharacterDevice.bind(stats); + this.isDirectory = stats.isDirectory.bind(stats); + this.isFIFO = stats.isFIFO.bind(stats); + this.isFile = stats.isFile.bind(stats); + this.isSocket = stats.isSocket.bind(stats); + this.isSymbolicLink = stats.isSymbolicLink.bind(stats); + } + }; + function createDirentFromStats(name, stats) { + return new DirentFromStats(name, stats); + } + exports2.createDirentFromStats = createDirentFromStats; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/path.js +var require_path2 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/path.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.removeLeadingDotSegment = exports2.escape = exports2.makeAbsolute = exports2.unixify = void 0; + var path = require("path"); + var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; + var UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g; + function unixify(filepath) { + return filepath.replace(/\\/g, "/"); + } + exports2.unixify = unixify; + function makeAbsolute(cwd, filepath) { + return path.resolve(cwd, filepath); + } + exports2.makeAbsolute = makeAbsolute; + function escape(pattern) { + return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, "\\$2"); + } + exports2.escape = escape; + function removeLeadingDotSegment(entry) { + if (entry.charAt(0) === ".") { + const secondCharactery = entry.charAt(1); + if (secondCharactery === "/" || secondCharactery === "\\") { + return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT); + } + } + return entry; + } + exports2.removeLeadingDotSegment = removeLeadingDotSegment; + } +}); + +// ../../node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.js +var require_is_extglob = __commonJS({ + "../../node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.js"(exports2, module2) { + module2.exports = function isExtglob(str) { + if (typeof str !== "string" || str === "") { + return false; + } + var match; + while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str)) { + if (match[2]) + return true; + str = str.slice(match.index + match[0].length); + } + return false; + }; + } +}); + +// ../../node_modules/.pnpm/is-glob@4.0.1/node_modules/is-glob/index.js +var require_is_glob = __commonJS({ + "../../node_modules/.pnpm/is-glob@4.0.1/node_modules/is-glob/index.js"(exports2, module2) { + var isExtglob = require_is_extglob(); + var chars = { "{": "}", "(": ")", "[": "]" }; + var strictRegex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/; + var relaxedRegex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/; + module2.exports = function isGlob(str, options) { + if (typeof str !== "string" || str === "") { + return false; + } + if (isExtglob(str)) { + return true; + } + var regex = strictRegex; + var match; + if (options && options.strict === false) { + regex = relaxedRegex; + } + while (match = regex.exec(str)) { + if (match[2]) + return true; + var idx = match.index + match[0].length; + var open = match[1]; + var close = open ? chars[open] : null; + if (open && close) { + var n = str.indexOf(close, idx); + if (n !== -1) { + idx = n + 1; + } + } + str = str.slice(idx); + } + return false; + }; + } +}); + +// ../../node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.js +var require_glob_parent = __commonJS({ + "../../node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.js"(exports2, module2) { + "use strict"; + var isGlob = require_is_glob(); + var pathPosixDirname = require("path").posix.dirname; + var isWin32 = require("os").platform() === "win32"; + var slash = "/"; + var backslash = /\\/g; + var enclosure = /[\{\[].*[\}\]]$/; + var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; + var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; + module2.exports = function globParent(str, opts) { + var options = Object.assign({ flipBackslashes: true }, opts); + if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { + str = str.replace(backslash, slash); + } + if (enclosure.test(str)) { + str += slash; + } + str += "a"; + do { + str = pathPosixDirname(str); + } while (isGlob(str) || globby.test(str)); + return str.replace(escaped, "$1"); + }; + } +}); + +// ../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/utils.js +var require_utils3 = __commonJS({ + "../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/utils.js"(exports2) { + "use strict"; + exports2.isInteger = (num) => { + if (typeof num === "number") { + return Number.isInteger(num); + } + if (typeof num === "string" && num.trim() !== "") { + return Number.isInteger(Number(num)); + } + return false; + }; + exports2.find = (node, type) => node.nodes.find((node2) => node2.type === type); + exports2.exceedsLimit = (min, max, step = 1, limit) => { + if (limit === false) + return false; + if (!exports2.isInteger(min) || !exports2.isInteger(max)) + return false; + return (Number(max) - Number(min)) / Number(step) >= limit; + }; + exports2.escapeNode = (block, n = 0, type) => { + let node = block.nodes[n]; + if (!node) + return; + if (type && node.type === type || node.type === "open" || node.type === "close") { + if (node.escaped !== true) { + node.value = "\\" + node.value; + node.escaped = true; + } + } + }; + exports2.encloseBrace = (node) => { + if (node.type !== "brace") + return false; + if (node.commas >> 0 + node.ranges >> 0 === 0) { + node.invalid = true; + return true; + } + return false; + }; + exports2.isInvalidBrace = (block) => { + if (block.type !== "brace") + return false; + if (block.invalid === true || block.dollar) + return true; + if (block.commas >> 0 + block.ranges >> 0 === 0) { + block.invalid = true; + return true; + } + if (block.open !== true || block.close !== true) { + block.invalid = true; + return true; + } + return false; + }; + exports2.isOpenOrClose = (node) => { + if (node.type === "open" || node.type === "close") { + return true; + } + return node.open === true || node.close === true; + }; + exports2.reduce = (nodes) => nodes.reduce((acc, node) => { + if (node.type === "text") + acc.push(node.value); + if (node.type === "range") + node.type = "text"; + return acc; + }, []); + exports2.flatten = (...args2) => { + const result = []; + const flat = (arr) => { + for (let i = 0; i < arr.length; i++) { + let ele = arr[i]; + Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele); + } + return result; + }; + flat(args2); + return result; + }; + } +}); + +// ../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/stringify.js +var require_stringify3 = __commonJS({ + "../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/stringify.js"(exports2, module2) { + "use strict"; + var utils = require_utils3(); + module2.exports = (ast, options = {}) => { + let stringify = (node, parent = {}) => { + let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); + let invalidNode = node.invalid === true && options.escapeInvalid === true; + let output = ""; + if (node.value) { + if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { + return "\\" + node.value; + } + return node.value; + } + if (node.value) { + return node.value; + } + if (node.nodes) { + for (let child of node.nodes) { + output += stringify(child); + } + } + return output; + }; + return stringify(ast); + }; + } +}); + +// ../../node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.js +var require_is_number = __commonJS({ + "../../node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.js"(exports2, module2) { + "use strict"; + module2.exports = function(num) { + if (typeof num === "number") { + return num - num === 0; + } + if (typeof num === "string" && num.trim() !== "") { + return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); + } + return false; + }; + } +}); + +// ../../node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.js +var require_to_regex_range = __commonJS({ + "../../node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.js"(exports2, module2) { + "use strict"; + var isNumber = require_is_number(); + var toRegexRange = (min, max, options) => { + if (isNumber(min) === false) { + throw new TypeError("toRegexRange: expected the first argument to be a number"); + } + if (max === void 0 || min === max) { + return String(min); + } + if (isNumber(max) === false) { + throw new TypeError("toRegexRange: expected the second argument to be a number."); + } + let opts = { relaxZeros: true, ...options }; + if (typeof opts.strictZeros === "boolean") { + opts.relaxZeros = opts.strictZeros === false; + } + let relax = String(opts.relaxZeros); + let shorthand = String(opts.shorthand); + let capture = String(opts.capture); + let wrap = String(opts.wrap); + let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap; + if (toRegexRange.cache.hasOwnProperty(cacheKey)) { + return toRegexRange.cache[cacheKey].result; + } + let a = Math.min(min, max); + let b = Math.max(min, max); + if (Math.abs(a - b) === 1) { + let result = min + "|" + max; + if (opts.capture) { + return `(${result})`; + } + if (opts.wrap === false) { + return result; + } + return `(?:${result})`; + } + let isPadded = hasPadding(min) || hasPadding(max); + let state = { min, max, a, b }; + let positives = []; + let negatives = []; + if (isPadded) { + state.isPadded = isPadded; + state.maxLen = String(state.max).length; + } + if (a < 0) { + let newMin = b < 0 ? Math.abs(b) : 1; + negatives = splitToPatterns(newMin, Math.abs(a), state, opts); + a = state.a = 0; + } + if (b >= 0) { + positives = splitToPatterns(a, b, state, opts); + } + state.negatives = negatives; + state.positives = positives; + state.result = collatePatterns(negatives, positives, opts); + if (opts.capture === true) { + state.result = `(${state.result})`; + } else if (opts.wrap !== false && positives.length + negatives.length > 1) { + state.result = `(?:${state.result})`; + } + toRegexRange.cache[cacheKey] = state; + return state.result; + }; + function collatePatterns(neg, pos, options) { + let onlyNegative = filterPatterns(neg, pos, "-", false, options) || []; + let onlyPositive = filterPatterns(pos, neg, "", false, options) || []; + let intersected = filterPatterns(neg, pos, "-?", true, options) || []; + let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); + return subpatterns.join("|"); + } + function splitToRanges(min, max) { + let nines = 1; + let zeros = 1; + let stop = countNines(min, nines); + let stops = new Set([max]); + while (min <= stop && stop <= max) { + stops.add(stop); + nines += 1; + stop = countNines(min, nines); + } + stop = countZeros(max + 1, zeros) - 1; + while (min < stop && stop <= max) { + stops.add(stop); + zeros += 1; + stop = countZeros(max + 1, zeros) - 1; + } + stops = [...stops]; + stops.sort(compare); + return stops; + } + function rangeToPattern(start, stop, options) { + if (start === stop) { + return { pattern: start, count: [], digits: 0 }; + } + let zipped = zip(start, stop); + let digits = zipped.length; + let pattern = ""; + let count = 0; + for (let i = 0; i < digits; i++) { + let [startDigit, stopDigit] = zipped[i]; + if (startDigit === stopDigit) { + pattern += startDigit; + } else if (startDigit !== "0" || stopDigit !== "9") { + pattern += toCharacterClass(startDigit, stopDigit, options); + } else { + count++; + } + } + if (count) { + pattern += options.shorthand === true ? "\\d" : "[0-9]"; + } + return { pattern, count: [count], digits }; + } + function splitToPatterns(min, max, tok, options) { + let ranges = splitToRanges(min, max); + let tokens = []; + let start = min; + let prev; + for (let i = 0; i < ranges.length; i++) { + let max2 = ranges[i]; + let obj = rangeToPattern(String(start), String(max2), options); + let zeros = ""; + if (!tok.isPadded && prev && prev.pattern === obj.pattern) { + if (prev.count.length > 1) { + prev.count.pop(); + } + prev.count.push(obj.count[0]); + prev.string = prev.pattern + toQuantifier(prev.count); + start = max2 + 1; + continue; + } + if (tok.isPadded) { + zeros = padZeros(max2, tok, options); + } + obj.string = zeros + obj.pattern + toQuantifier(obj.count); + tokens.push(obj); + start = max2 + 1; + prev = obj; + } + return tokens; + } + function filterPatterns(arr, comparison, prefix, intersection, options) { + let result = []; + for (let ele of arr) { + let { string } = ele; + if (!intersection && !contains(comparison, "string", string)) { + result.push(prefix + string); + } + if (intersection && contains(comparison, "string", string)) { + result.push(prefix + string); + } + } + return result; + } + function zip(a, b) { + let arr = []; + for (let i = 0; i < a.length; i++) + arr.push([a[i], b[i]]); + return arr; + } + function compare(a, b) { + return a > b ? 1 : b > a ? -1 : 0; + } + function contains(arr, key, val) { + return arr.some((ele) => ele[key] === val); + } + function countNines(min, len) { + return Number(String(min).slice(0, -len) + "9".repeat(len)); + } + function countZeros(integer, zeros) { + return integer - integer % Math.pow(10, zeros); + } + function toQuantifier(digits) { + let [start = 0, stop = ""] = digits; + if (stop || start > 1) { + return `{${start + (stop ? "," + stop : "")}}`; + } + return ""; + } + function toCharacterClass(a, b, options) { + return `[${a}${b - a === 1 ? "" : "-"}${b}]`; + } + function hasPadding(str) { + return /^-?(0+)\d/.test(str); + } + function padZeros(value, tok, options) { + if (!tok.isPadded) { + return value; + } + let diff = Math.abs(tok.maxLen - String(value).length); + let relax = options.relaxZeros !== false; + switch (diff) { + case 0: + return ""; + case 1: + return relax ? "0?" : "0"; + case 2: + return relax ? "0{0,2}" : "00"; + default: { + return relax ? `0{0,${diff}}` : `0{${diff}}`; + } + } + } + toRegexRange.cache = {}; + toRegexRange.clearCache = () => toRegexRange.cache = {}; + module2.exports = toRegexRange; + } +}); + +// ../../node_modules/.pnpm/fill-range@7.0.1/node_modules/fill-range/index.js +var require_fill_range = __commonJS({ + "../../node_modules/.pnpm/fill-range@7.0.1/node_modules/fill-range/index.js"(exports2, module2) { + "use strict"; + var util = require("util"); + var toRegexRange = require_to_regex_range(); + var isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val); + var transform = (toNumber) => { + return (value) => toNumber === true ? Number(value) : String(value); + }; + var isValidValue = (value) => { + return typeof value === "number" || typeof value === "string" && value !== ""; + }; + var isNumber = (num) => Number.isInteger(+num); + var zeros = (input) => { + let value = `${input}`; + let index = -1; + if (value[0] === "-") + value = value.slice(1); + if (value === "0") + return false; + while (value[++index] === "0") + ; + return index > 0; + }; + var stringify = (start, end, options) => { + if (typeof start === "string" || typeof end === "string") { + return true; + } + return options.stringify === true; + }; + var pad = (input, maxLength, toNumber) => { + if (maxLength > 0) { + let dash = input[0] === "-" ? "-" : ""; + if (dash) + input = input.slice(1); + input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0"); + } + if (toNumber === false) { + return String(input); + } + return input; + }; + var toMaxLen = (input, maxLength) => { + let negative = input[0] === "-" ? "-" : ""; + if (negative) { + input = input.slice(1); + maxLength--; + } + while (input.length < maxLength) + input = "0" + input; + return negative ? "-" + input : input; + }; + var toSequence = (parts, options) => { + parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + let prefix = options.capture ? "" : "?:"; + let positives = ""; + let negatives = ""; + let result; + if (parts.positives.length) { + positives = parts.positives.join("|"); + } + if (parts.negatives.length) { + negatives = `-(${prefix}${parts.negatives.join("|")})`; + } + if (positives && negatives) { + result = `${positives}|${negatives}`; + } else { + result = positives || negatives; + } + if (options.wrap) { + return `(${prefix}${result})`; + } + return result; + }; + var toRange = (a, b, isNumbers, options) => { + if (isNumbers) { + return toRegexRange(a, b, { wrap: false, ...options }); + } + let start = String.fromCharCode(a); + if (a === b) + return start; + let stop = String.fromCharCode(b); + return `[${start}-${stop}]`; + }; + var toRegex = (start, end, options) => { + if (Array.isArray(start)) { + let wrap = options.wrap === true; + let prefix = options.capture ? "" : "?:"; + return wrap ? `(${prefix}${start.join("|")})` : start.join("|"); + } + return toRegexRange(start, end, options); + }; + var rangeError = (...args2) => { + return new RangeError("Invalid range arguments: " + util.inspect(...args2)); + }; + var invalidRange = (start, end, options) => { + if (options.strictRanges === true) + throw rangeError([start, end]); + return []; + }; + var invalidStep = (step, options) => { + if (options.strictRanges === true) { + throw new TypeError(`Expected step "${step}" to be a number`); + } + return []; + }; + var fillNumbers = (start, end, step = 1, options = {}) => { + let a = Number(start); + let b = Number(end); + if (!Number.isInteger(a) || !Number.isInteger(b)) { + if (options.strictRanges === true) + throw rangeError([start, end]); + return []; + } + if (a === 0) + a = 0; + if (b === 0) + b = 0; + let descending = a > b; + let startString = String(start); + let endString = String(end); + let stepString = String(step); + step = Math.max(Math.abs(step), 1); + let padded = zeros(startString) || zeros(endString) || zeros(stepString); + let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; + let toNumber = padded === false && stringify(start, end, options) === false; + let format = options.transform || transform(toNumber); + if (options.toRegex && step === 1) { + return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); + } + let parts = { negatives: [], positives: [] }; + let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)); + let range = []; + let index = 0; + while (descending ? a >= b : a <= b) { + if (options.toRegex === true && step > 1) { + push(a); + } else { + range.push(pad(format(a, index), maxLen, toNumber)); + } + a = descending ? a - step : a + step; + index++; + } + if (options.toRegex === true) { + return step > 1 ? toSequence(parts, options) : toRegex(range, null, { wrap: false, ...options }); + } + return range; + }; + var fillLetters = (start, end, step = 1, options = {}) => { + if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) { + return invalidRange(start, end, options); + } + let format = options.transform || ((val) => String.fromCharCode(val)); + let a = `${start}`.charCodeAt(0); + let b = `${end}`.charCodeAt(0); + let descending = a > b; + let min = Math.min(a, b); + let max = Math.max(a, b); + if (options.toRegex && step === 1) { + return toRange(min, max, false, options); + } + let range = []; + let index = 0; + while (descending ? a >= b : a <= b) { + range.push(format(a, index)); + a = descending ? a - step : a + step; + index++; + } + if (options.toRegex === true) { + return toRegex(range, null, { wrap: false, options }); + } + return range; + }; + var fill = (start, end, step, options = {}) => { + if (end == null && isValidValue(start)) { + return [start]; + } + if (!isValidValue(start) || !isValidValue(end)) { + return invalidRange(start, end, options); + } + if (typeof step === "function") { + return fill(start, end, 1, { transform: step }); + } + if (isObject(step)) { + return fill(start, end, 0, step); + } + let opts = { ...options }; + if (opts.capture === true) + opts.wrap = true; + step = step || opts.step || 1; + if (!isNumber(step)) { + if (step != null && !isObject(step)) + return invalidStep(step, opts); + return fill(start, end, 1, step); + } + if (isNumber(start) && isNumber(end)) { + return fillNumbers(start, end, step, opts); + } + return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); + }; + module2.exports = fill; + } +}); + +// ../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/compile.js +var require_compile = __commonJS({ + "../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/compile.js"(exports2, module2) { + "use strict"; + var fill = require_fill_range(); + var utils = require_utils3(); + var compile = (ast, options = {}) => { + let walk = (node, parent = {}) => { + let invalidBlock = utils.isInvalidBrace(parent); + let invalidNode = node.invalid === true && options.escapeInvalid === true; + let invalid = invalidBlock === true || invalidNode === true; + let prefix = options.escapeInvalid === true ? "\\" : ""; + let output = ""; + if (node.isOpen === true) { + return prefix + node.value; + } + if (node.isClose === true) { + return prefix + node.value; + } + if (node.type === "open") { + return invalid ? prefix + node.value : "("; + } + if (node.type === "close") { + return invalid ? prefix + node.value : ")"; + } + if (node.type === "comma") { + return node.prev.type === "comma" ? "" : invalid ? node.value : "|"; + } + if (node.value) { + return node.value; + } + if (node.nodes && node.ranges > 0) { + let args2 = utils.reduce(node.nodes); + let range = fill(...args2, { ...options, wrap: false, toRegex: true }); + if (range.length !== 0) { + return args2.length > 1 && range.length > 1 ? `(${range})` : range; + } + } + if (node.nodes) { + for (let child of node.nodes) { + output += walk(child, node); + } + } + return output; + }; + return walk(ast); + }; + module2.exports = compile; + } +}); + +// ../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/expand.js +var require_expand2 = __commonJS({ + "../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/expand.js"(exports2, module2) { + "use strict"; + var fill = require_fill_range(); + var stringify = require_stringify3(); + var utils = require_utils3(); + var append = (queue = "", stash = "", enclose = false) => { + let result = []; + queue = [].concat(queue); + stash = [].concat(stash); + if (!stash.length) + return queue; + if (!queue.length) { + return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash; + } + for (let item of queue) { + if (Array.isArray(item)) { + for (let value of item) { + result.push(append(value, stash, enclose)); + } + } else { + for (let ele of stash) { + if (enclose === true && typeof ele === "string") + ele = `{${ele}}`; + result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele); + } + } + } + return utils.flatten(result); + }; + var expand = (ast, options = {}) => { + let rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit; + let walk = (node, parent = {}) => { + node.queue = []; + let p = parent; + let q = parent.queue; + while (p.type !== "brace" && p.type !== "root" && p.parent) { + p = p.parent; + q = p.queue; + } + if (node.invalid || node.dollar) { + q.push(append(q.pop(), stringify(node, options))); + return; + } + if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) { + q.push(append(q.pop(), ["{}"])); + return; + } + if (node.nodes && node.ranges > 0) { + let args2 = utils.reduce(node.nodes); + if (utils.exceedsLimit(...args2, options.step, rangeLimit)) { + throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit."); + } + let range = fill(...args2, options); + if (range.length === 0) { + range = stringify(node, options); + } + q.push(append(q.pop(), range)); + node.nodes = []; + return; + } + let enclose = utils.encloseBrace(node); + let queue = node.queue; + let block = node; + while (block.type !== "brace" && block.type !== "root" && block.parent) { + block = block.parent; + queue = block.queue; + } + for (let i = 0; i < node.nodes.length; i++) { + let child = node.nodes[i]; + if (child.type === "comma" && node.type === "brace") { + if (i === 1) + queue.push(""); + queue.push(""); + continue; + } + if (child.type === "close") { + q.push(append(q.pop(), queue, enclose)); + continue; + } + if (child.value && child.type !== "open") { + queue.push(append(queue.pop(), child.value)); + continue; + } + if (child.nodes) { + walk(child, node); + } + } + return queue; + }; + return utils.flatten(walk(ast)); + }; + module2.exports = expand; + } +}); + +// ../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/constants.js +var require_constants4 = __commonJS({ + "../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/constants.js"(exports2, module2) { + "use strict"; + module2.exports = { + MAX_LENGTH: 1024 * 64, + CHAR_0: "0", + CHAR_9: "9", + CHAR_UPPERCASE_A: "A", + CHAR_LOWERCASE_A: "a", + CHAR_UPPERCASE_Z: "Z", + CHAR_LOWERCASE_Z: "z", + CHAR_LEFT_PARENTHESES: "(", + CHAR_RIGHT_PARENTHESES: ")", + CHAR_ASTERISK: "*", + CHAR_AMPERSAND: "&", + CHAR_AT: "@", + CHAR_BACKSLASH: "\\", + CHAR_BACKTICK: "`", + CHAR_CARRIAGE_RETURN: "\r", + CHAR_CIRCUMFLEX_ACCENT: "^", + CHAR_COLON: ":", + CHAR_COMMA: ",", + CHAR_DOLLAR: "$", + CHAR_DOT: ".", + CHAR_DOUBLE_QUOTE: '"', + CHAR_EQUAL: "=", + CHAR_EXCLAMATION_MARK: "!", + CHAR_FORM_FEED: "\f", + CHAR_FORWARD_SLASH: "/", + CHAR_HASH: "#", + CHAR_HYPHEN_MINUS: "-", + CHAR_LEFT_ANGLE_BRACKET: "<", + CHAR_LEFT_CURLY_BRACE: "{", + CHAR_LEFT_SQUARE_BRACKET: "[", + CHAR_LINE_FEED: "\n", + CHAR_NO_BREAK_SPACE: "\xA0", + CHAR_PERCENT: "%", + CHAR_PLUS: "+", + CHAR_QUESTION_MARK: "?", + CHAR_RIGHT_ANGLE_BRACKET: ">", + CHAR_RIGHT_CURLY_BRACE: "}", + CHAR_RIGHT_SQUARE_BRACKET: "]", + CHAR_SEMICOLON: ";", + CHAR_SINGLE_QUOTE: "'", + CHAR_SPACE: " ", + CHAR_TAB: " ", + CHAR_UNDERSCORE: "_", + CHAR_VERTICAL_LINE: "|", + CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF" + }; + } +}); + +// ../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.js +var require_parse3 = __commonJS({ + "../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.js"(exports2, module2) { + "use strict"; + var stringify = require_stringify3(); + var { + MAX_LENGTH, + CHAR_BACKSLASH, + CHAR_BACKTICK, + CHAR_COMMA, + CHAR_DOT, + CHAR_LEFT_PARENTHESES, + CHAR_RIGHT_PARENTHESES, + CHAR_LEFT_CURLY_BRACE, + CHAR_RIGHT_CURLY_BRACE, + CHAR_LEFT_SQUARE_BRACKET, + CHAR_RIGHT_SQUARE_BRACKET, + CHAR_DOUBLE_QUOTE, + CHAR_SINGLE_QUOTE, + CHAR_NO_BREAK_SPACE, + CHAR_ZERO_WIDTH_NOBREAK_SPACE + } = require_constants4(); + var parse = (input, options = {}) => { + if (typeof input !== "string") { + throw new TypeError("Expected a string"); + } + let opts = options || {}; + let max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + if (input.length > max) { + throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); + } + let ast = { type: "root", input, nodes: [] }; + let stack2 = [ast]; + let block = ast; + let prev = ast; + let brackets = 0; + let length = input.length; + let index = 0; + let depth = 0; + let value; + let memo = {}; + const advance = () => input[index++]; + const push = (node) => { + if (node.type === "text" && prev.type === "dot") { + prev.type = "text"; + } + if (prev && prev.type === "text" && node.type === "text") { + prev.value += node.value; + return; + } + block.nodes.push(node); + node.parent = block; + node.prev = prev; + prev = node; + return node; + }; + push({ type: "bos" }); + while (index < length) { + block = stack2[stack2.length - 1]; + value = advance(); + if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { + continue; + } + if (value === CHAR_BACKSLASH) { + push({ type: "text", value: (options.keepEscaping ? value : "") + advance() }); + continue; + } + if (value === CHAR_RIGHT_SQUARE_BRACKET) { + push({ type: "text", value: "\\" + value }); + continue; + } + if (value === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + let closed = true; + let next; + while (index < length && (next = advance())) { + value += next; + if (next === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + continue; + } + if (next === CHAR_BACKSLASH) { + value += advance(); + continue; + } + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + brackets--; + if (brackets === 0) { + break; + } + } + } + push({ type: "text", value }); + continue; + } + if (value === CHAR_LEFT_PARENTHESES) { + block = push({ type: "paren", nodes: [] }); + stack2.push(block); + push({ type: "text", value }); + continue; + } + if (value === CHAR_RIGHT_PARENTHESES) { + if (block.type !== "paren") { + push({ type: "text", value }); + continue; + } + block = stack2.pop(); + push({ type: "text", value }); + block = stack2[stack2.length - 1]; + continue; + } + if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { + let open = value; + let next; + if (options.keepQuotes !== true) { + value = ""; + } + while (index < length && (next = advance())) { + if (next === CHAR_BACKSLASH) { + value += next + advance(); + continue; + } + if (next === open) { + if (options.keepQuotes === true) + value += next; + break; + } + value += next; + } + push({ type: "text", value }); + continue; + } + if (value === CHAR_LEFT_CURLY_BRACE) { + depth++; + let dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true; + let brace = { + type: "brace", + open: true, + close: false, + dollar, + depth, + commas: 0, + ranges: 0, + nodes: [] + }; + block = push(brace); + stack2.push(block); + push({ type: "open", value }); + continue; + } + if (value === CHAR_RIGHT_CURLY_BRACE) { + if (block.type !== "brace") { + push({ type: "text", value }); + continue; + } + let type = "close"; + block = stack2.pop(); + block.close = true; + push({ type, value }); + depth--; + block = stack2[stack2.length - 1]; + continue; + } + if (value === CHAR_COMMA && depth > 0) { + if (block.ranges > 0) { + block.ranges = 0; + let open = block.nodes.shift(); + block.nodes = [open, { type: "text", value: stringify(block) }]; + } + push({ type: "comma", value }); + block.commas++; + continue; + } + if (value === CHAR_DOT && depth > 0 && block.commas === 0) { + let siblings = block.nodes; + if (depth === 0 || siblings.length === 0) { + push({ type: "text", value }); + continue; + } + if (prev.type === "dot") { + block.range = []; + prev.value += value; + prev.type = "range"; + if (block.nodes.length !== 3 && block.nodes.length !== 5) { + block.invalid = true; + block.ranges = 0; + prev.type = "text"; + continue; + } + block.ranges++; + block.args = []; + continue; + } + if (prev.type === "range") { + siblings.pop(); + let before = siblings[siblings.length - 1]; + before.value += prev.value + value; + prev = before; + block.ranges--; + continue; + } + push({ type: "dot", value }); + continue; + } + push({ type: "text", value }); + } + do { + block = stack2.pop(); + if (block.type !== "root") { + block.nodes.forEach((node) => { + if (!node.nodes) { + if (node.type === "open") + node.isOpen = true; + if (node.type === "close") + node.isClose = true; + if (!node.nodes) + node.type = "text"; + node.invalid = true; + } + }); + let parent = stack2[stack2.length - 1]; + let index2 = parent.nodes.indexOf(block); + parent.nodes.splice(index2, 1, ...block.nodes); + } + } while (stack2.length > 0); + push({ type: "eos" }); + return ast; + }; + module2.exports = parse; + } +}); + +// ../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/index.js +var require_braces = __commonJS({ + "../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/index.js"(exports2, module2) { + "use strict"; + var stringify = require_stringify3(); + var compile = require_compile(); + var expand = require_expand2(); + var parse = require_parse3(); + var braces = (input, options = {}) => { + let output = []; + if (Array.isArray(input)) { + for (let pattern of input) { + let result = braces.create(pattern, options); + if (Array.isArray(result)) { + output.push(...result); + } else { + output.push(result); + } + } + } else { + output = [].concat(braces.create(input, options)); + } + if (options && options.expand === true && options.nodupes === true) { + output = [...new Set(output)]; + } + return output; + }; + braces.parse = (input, options = {}) => parse(input, options); + braces.stringify = (input, options = {}) => { + if (typeof input === "string") { + return stringify(braces.parse(input, options), options); + } + return stringify(input, options); + }; + braces.compile = (input, options = {}) => { + if (typeof input === "string") { + input = braces.parse(input, options); + } + return compile(input, options); + }; + braces.expand = (input, options = {}) => { + if (typeof input === "string") { + input = braces.parse(input, options); + } + let result = expand(input, options); + if (options.noempty === true) { + result = result.filter(Boolean); + } + if (options.nodupes === true) { + result = [...new Set(result)]; + } + return result; + }; + braces.create = (input, options = {}) => { + if (input === "" || input.length < 3) { + return [input]; + } + return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options); + }; + module2.exports = braces; + } +}); + +// ../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/lib/constants.js +var require_constants5 = __commonJS({ + "../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/lib/constants.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var WIN_SLASH = "\\\\/"; + var WIN_NO_SLASH = `[^${WIN_SLASH}]`; + var DOT_LITERAL = "\\."; + var PLUS_LITERAL = "\\+"; + var QMARK_LITERAL = "\\?"; + var SLASH_LITERAL = "\\/"; + var ONE_CHAR = "(?=.)"; + var QMARK = "[^/]"; + var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; + var START_ANCHOR = `(?:^|${SLASH_LITERAL})`; + var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; + var NO_DOT = `(?!${DOT_LITERAL})`; + var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; + var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; + var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; + var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; + var STAR = `${QMARK}*?`; + var POSIX_CHARS = { + DOT_LITERAL, + PLUS_LITERAL, + QMARK_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + QMARK, + END_ANCHOR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK_NO_DOT, + STAR, + START_ANCHOR + }; + var WINDOWS_CHARS = { + ...POSIX_CHARS, + SLASH_LITERAL: `[${WIN_SLASH}]`, + QMARK: WIN_NO_SLASH, + STAR: `${WIN_NO_SLASH}*?`, + DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, + NO_DOT: `(?!${DOT_LITERAL})`, + NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, + NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + QMARK_NO_DOT: `[^.${WIN_SLASH}]`, + START_ANCHOR: `(?:^|[${WIN_SLASH}])`, + END_ANCHOR: `(?:[${WIN_SLASH}]|$)` + }; + var POSIX_REGEX_SOURCE = { + alnum: "a-zA-Z0-9", + alpha: "a-zA-Z", + ascii: "\\x00-\\x7F", + blank: " \\t", + cntrl: "\\x00-\\x1F\\x7F", + digit: "0-9", + graph: "\\x21-\\x7E", + lower: "a-z", + print: "\\x20-\\x7E ", + punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~", + space: " \\t\\r\\n\\v\\f", + upper: "A-Z", + word: "A-Za-z0-9_", + xdigit: "A-Fa-f0-9" + }; + module2.exports = { + MAX_LENGTH: 1024 * 64, + POSIX_REGEX_SOURCE, + REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, + REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, + REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, + REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, + REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, + REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, + REPLACEMENTS: { + "***": "*", + "**/**": "**", + "**/**/**": "**" + }, + CHAR_0: 48, + CHAR_9: 57, + CHAR_UPPERCASE_A: 65, + CHAR_LOWERCASE_A: 97, + CHAR_UPPERCASE_Z: 90, + CHAR_LOWERCASE_Z: 122, + CHAR_LEFT_PARENTHESES: 40, + CHAR_RIGHT_PARENTHESES: 41, + CHAR_ASTERISK: 42, + CHAR_AMPERSAND: 38, + CHAR_AT: 64, + CHAR_BACKWARD_SLASH: 92, + CHAR_CARRIAGE_RETURN: 13, + CHAR_CIRCUMFLEX_ACCENT: 94, + CHAR_COLON: 58, + CHAR_COMMA: 44, + CHAR_DOT: 46, + CHAR_DOUBLE_QUOTE: 34, + CHAR_EQUAL: 61, + CHAR_EXCLAMATION_MARK: 33, + CHAR_FORM_FEED: 12, + CHAR_FORWARD_SLASH: 47, + CHAR_GRAVE_ACCENT: 96, + CHAR_HASH: 35, + CHAR_HYPHEN_MINUS: 45, + CHAR_LEFT_ANGLE_BRACKET: 60, + CHAR_LEFT_CURLY_BRACE: 123, + CHAR_LEFT_SQUARE_BRACKET: 91, + CHAR_LINE_FEED: 10, + CHAR_NO_BREAK_SPACE: 160, + CHAR_PERCENT: 37, + CHAR_PLUS: 43, + CHAR_QUESTION_MARK: 63, + CHAR_RIGHT_ANGLE_BRACKET: 62, + CHAR_RIGHT_CURLY_BRACE: 125, + CHAR_RIGHT_SQUARE_BRACKET: 93, + CHAR_SEMICOLON: 59, + CHAR_SINGLE_QUOTE: 39, + CHAR_SPACE: 32, + CHAR_TAB: 9, + CHAR_UNDERSCORE: 95, + CHAR_VERTICAL_LINE: 124, + CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, + SEP: path.sep, + extglobChars(chars) { + return { + "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` }, + "?": { type: "qmark", open: "(?:", close: ")?" }, + "+": { type: "plus", open: "(?:", close: ")+" }, + "*": { type: "star", open: "(?:", close: ")*" }, + "@": { type: "at", open: "(?:", close: ")" } + }; + }, + globChars(win32) { + return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; + } + }; + } +}); + +// ../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/lib/utils.js +var require_utils4 = __commonJS({ + "../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/lib/utils.js"(exports2) { + "use strict"; + var path = require("path"); + var win32 = process.platform === "win32"; + var { + REGEX_BACKSLASH, + REGEX_REMOVE_BACKSLASH, + REGEX_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_GLOBAL + } = require_constants5(); + exports2.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val); + exports2.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str); + exports2.isRegexChar = (str) => str.length === 1 && exports2.hasRegexChars(str); + exports2.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); + exports2.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/"); + exports2.removeBackslashes = (str) => { + return str.replace(REGEX_REMOVE_BACKSLASH, (match) => { + return match === "\\" ? "" : match; + }); + }; + exports2.supportsLookbehinds = () => { + const segs = process.version.slice(1).split(".").map(Number); + if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) { + return true; + } + return false; + }; + exports2.isWindows = (options) => { + if (options && typeof options.windows === "boolean") { + return options.windows; + } + return win32 === true || path.sep === "\\"; + }; + exports2.escapeLast = (input, char, lastIdx) => { + const idx = input.lastIndexOf(char, lastIdx); + if (idx === -1) + return input; + if (input[idx - 1] === "\\") + return exports2.escapeLast(input, char, idx - 1); + return `${input.slice(0, idx)}\\${input.slice(idx)}`; + }; + exports2.removePrefix = (input, state = {}) => { + let output = input; + if (output.startsWith("./")) { + output = output.slice(2); + state.prefix = "./"; + } + return output; + }; + exports2.wrapOutput = (input, state = {}, options = {}) => { + const prepend = options.contains ? "" : "^"; + const append = options.contains ? "" : "$"; + let output = `${prepend}(?:${input})${append}`; + if (state.negated === true) { + output = `(?:^(?!${output}).*$)`; + } + return output; + }; + } +}); + +// ../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/lib/scan.js +var require_scan2 = __commonJS({ + "../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/lib/scan.js"(exports2, module2) { + "use strict"; + var utils = require_utils4(); + var { + CHAR_ASTERISK, + CHAR_AT, + CHAR_BACKWARD_SLASH, + CHAR_COMMA, + CHAR_DOT, + CHAR_EXCLAMATION_MARK, + CHAR_FORWARD_SLASH, + CHAR_LEFT_CURLY_BRACE, + CHAR_LEFT_PARENTHESES, + CHAR_LEFT_SQUARE_BRACKET, + CHAR_PLUS, + CHAR_QUESTION_MARK, + CHAR_RIGHT_CURLY_BRACE, + CHAR_RIGHT_PARENTHESES, + CHAR_RIGHT_SQUARE_BRACKET + } = require_constants5(); + var isPathSeparator = (code) => { + return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; + }; + var depth = (token) => { + if (token.isPrefix !== true) { + token.depth = token.isGlobstar ? Infinity : 1; + } + }; + var scan = (input, options) => { + const opts = options || {}; + const length = input.length - 1; + const scanToEnd = opts.parts === true || opts.scanToEnd === true; + const slashes = []; + const tokens = []; + const parts = []; + let str = input; + let index = -1; + let start = 0; + let lastIndex = 0; + let isBrace = false; + let isBracket = false; + let isGlob = false; + let isExtglob = false; + let isGlobstar = false; + let braceEscaped = false; + let backslashes = false; + let negated = false; + let negatedExtglob = false; + let finished = false; + let braces = 0; + let prev; + let code; + let token = { value: "", depth: 0, isGlob: false }; + const eos = () => index >= length; + const peek = () => str.charCodeAt(index + 1); + const advance = () => { + prev = code; + return str.charCodeAt(++index); + }; + while (index < length) { + code = advance(); + let next; + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + if (code === CHAR_LEFT_CURLY_BRACE) { + braceEscaped = true; + } + continue; + } + if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { + braces++; + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + if (code === CHAR_LEFT_CURLY_BRACE) { + braces++; + continue; + } + if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + if (braceEscaped !== true && code === CHAR_COMMA) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + if (code === CHAR_RIGHT_CURLY_BRACE) { + braces--; + if (braces === 0) { + braceEscaped = false; + isBrace = token.isBrace = true; + finished = true; + break; + } + } + } + if (scanToEnd === true) { + continue; + } + break; + } + if (code === CHAR_FORWARD_SLASH) { + slashes.push(index); + tokens.push(token); + token = { value: "", depth: 0, isGlob: false }; + if (finished === true) + continue; + if (prev === CHAR_DOT && index === start + 1) { + start += 2; + continue; + } + lastIndex = index + 1; + continue; + } + if (opts.noext !== true) { + const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK; + if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + isExtglob = token.isExtglob = true; + finished = true; + if (code === CHAR_EXCLAMATION_MARK && index === start) { + negatedExtglob = true; + } + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + if (code === CHAR_RIGHT_PARENTHESES) { + isGlob = token.isGlob = true; + finished = true; + break; + } + } + continue; + } + break; + } + } + if (code === CHAR_ASTERISK) { + if (prev === CHAR_ASTERISK) + isGlobstar = token.isGlobstar = true; + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + if (code === CHAR_QUESTION_MARK) { + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + if (code === CHAR_LEFT_SQUARE_BRACKET) { + while (eos() !== true && (next = advance())) { + if (next === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + isBracket = token.isBracket = true; + isGlob = token.isGlob = true; + finished = true; + break; + } + } + if (scanToEnd === true) { + continue; + } + break; + } + if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { + negated = token.negated = true; + start++; + continue; + } + if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_LEFT_PARENTHESES) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + if (code === CHAR_RIGHT_PARENTHESES) { + finished = true; + break; + } + } + continue; + } + break; + } + if (isGlob === true) { + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + } + if (opts.noext === true) { + isExtglob = false; + isGlob = false; + } + let base = str; + let prefix = ""; + let glob = ""; + if (start > 0) { + prefix = str.slice(0, start); + str = str.slice(start); + lastIndex -= start; + } + if (base && isGlob === true && lastIndex > 0) { + base = str.slice(0, lastIndex); + glob = str.slice(lastIndex); + } else if (isGlob === true) { + base = ""; + glob = str; + } else { + base = str; + } + if (base && base !== "" && base !== "/" && base !== str) { + if (isPathSeparator(base.charCodeAt(base.length - 1))) { + base = base.slice(0, -1); + } + } + if (opts.unescape === true) { + if (glob) + glob = utils.removeBackslashes(glob); + if (base && backslashes === true) { + base = utils.removeBackslashes(base); + } + } + const state = { + prefix, + input, + start, + base, + glob, + isBrace, + isBracket, + isGlob, + isExtglob, + isGlobstar, + negated, + negatedExtglob + }; + if (opts.tokens === true) { + state.maxDepth = 0; + if (!isPathSeparator(code)) { + tokens.push(token); + } + state.tokens = tokens; + } + if (opts.parts === true || opts.tokens === true) { + let prevIndex; + for (let idx = 0; idx < slashes.length; idx++) { + const n = prevIndex ? prevIndex + 1 : start; + const i = slashes[idx]; + const value = input.slice(n, i); + if (opts.tokens) { + if (idx === 0 && start !== 0) { + tokens[idx].isPrefix = true; + tokens[idx].value = prefix; + } else { + tokens[idx].value = value; + } + depth(tokens[idx]); + state.maxDepth += tokens[idx].depth; + } + if (idx !== 0 || value !== "") { + parts.push(value); + } + prevIndex = i; + } + if (prevIndex && prevIndex + 1 < input.length) { + const value = input.slice(prevIndex + 1); + parts.push(value); + if (opts.tokens) { + tokens[tokens.length - 1].value = value; + depth(tokens[tokens.length - 1]); + state.maxDepth += tokens[tokens.length - 1].depth; + } + } + state.slashes = slashes; + state.parts = parts; + } + return state; + }; + module2.exports = scan; + } +}); + +// ../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/lib/parse.js +var require_parse4 = __commonJS({ + "../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/lib/parse.js"(exports2, module2) { + "use strict"; + var constants = require_constants5(); + var utils = require_utils4(); + var { + MAX_LENGTH, + POSIX_REGEX_SOURCE, + REGEX_NON_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_BACKREF, + REPLACEMENTS + } = constants; + var expandRange = (args2, options) => { + if (typeof options.expandRange === "function") { + return options.expandRange(...args2, options); + } + args2.sort(); + const value = `[${args2.join("-")}]`; + try { + new RegExp(value); + } catch (ex) { + return args2.map((v) => utils.escapeRegex(v)).join(".."); + } + return value; + }; + var syntaxError = (type, char) => { + return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; + }; + var parse = (input, options) => { + if (typeof input !== "string") { + throw new TypeError("Expected a string"); + } + input = REPLACEMENTS[input] || input; + const opts = { ...options }; + const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + let len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + const bos = { type: "bos", value: "", output: opts.prepend || "" }; + const tokens = [bos]; + const capture = opts.capture ? "" : "?:"; + const win32 = utils.isWindows(options); + const PLATFORM_CHARS = constants.globChars(win32); + const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); + const { + DOT_LITERAL, + PLUS_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK, + QMARK_NO_DOT, + STAR, + START_ANCHOR + } = PLATFORM_CHARS; + const globstar = (opts2) => { + return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + const nodot = opts.dot ? "" : NO_DOT; + const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; + let star = opts.bash === true ? globstar(opts) : STAR; + if (opts.capture) { + star = `(${star})`; + } + if (typeof opts.noext === "boolean") { + opts.noextglob = opts.noext; + } + const state = { + input, + index: -1, + start: 0, + dot: opts.dot === true, + consumed: "", + output: "", + prefix: "", + backtrack: false, + negated: false, + brackets: 0, + braces: 0, + parens: 0, + quotes: 0, + globstar: false, + tokens + }; + input = utils.removePrefix(input, state); + len = input.length; + const extglobs = []; + const braces = []; + const stack2 = []; + let prev = bos; + let value; + const eos = () => state.index === len - 1; + const peek = state.peek = (n = 1) => input[state.index + n]; + const advance = state.advance = () => input[++state.index] || ""; + const remaining = () => input.slice(state.index + 1); + const consume = (value2 = "", num = 0) => { + state.consumed += value2; + state.index += num; + }; + const append = (token) => { + state.output += token.output != null ? token.output : token.value; + consume(token.value); + }; + const negate = () => { + let count = 1; + while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) { + advance(); + state.start++; + count++; + } + if (count % 2 === 0) { + return false; + } + state.negated = true; + state.start++; + return true; + }; + const increment = (type) => { + state[type]++; + stack2.push(type); + }; + const decrement = (type) => { + state[type]--; + stack2.pop(); + }; + const push = (tok) => { + if (prev.type === "globstar") { + const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace"); + const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren"); + if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) { + state.output = state.output.slice(0, -prev.output.length); + prev.type = "star"; + prev.value = "*"; + prev.output = star; + state.output += prev.output; + } + } + if (extglobs.length && tok.type !== "paren") { + extglobs[extglobs.length - 1].inner += tok.value; + } + if (tok.value || tok.output) + append(tok); + if (prev && prev.type === "text" && tok.type === "text") { + prev.value += tok.value; + prev.output = (prev.output || "") + tok.value; + return; + } + tok.prev = prev; + tokens.push(tok); + prev = tok; + }; + const extglobOpen = (type, value2) => { + const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" }; + token.prev = prev; + token.parens = state.parens; + token.output = state.output; + const output = (opts.capture ? "(" : "") + token.open; + increment("parens"); + push({ type, value: value2, output: state.output ? "" : ONE_CHAR }); + push({ type: "paren", extglob: true, value: advance(), output }); + extglobs.push(token); + }; + const extglobClose = (token) => { + let output = token.close + (opts.capture ? ")" : ""); + let rest; + if (token.type === "negate") { + let extglobStar = star; + if (token.inner && token.inner.length > 1 && token.inner.includes("/")) { + extglobStar = globstar(opts); + } + if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { + output = token.close = `)$))${extglobStar}`; + } + if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { + output = token.close = `)${rest})${extglobStar})`; + } + if (token.prev.type === "bos") { + state.negatedExtglob = true; + } + } + push({ type: "paren", extglob: true, value, output }); + decrement("parens"); + }; + if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { + let backslashes = false; + let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { + if (first === "\\") { + backslashes = true; + return m; + } + if (first === "?") { + if (esc) { + return esc + first + (rest ? QMARK.repeat(rest.length) : ""); + } + if (index === 0) { + return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ""); + } + return QMARK.repeat(chars.length); + } + if (first === ".") { + return DOT_LITERAL.repeat(chars.length); + } + if (first === "*") { + if (esc) { + return esc + first + (rest ? star : ""); + } + return star; + } + return esc ? m : `\\${m}`; + }); + if (backslashes === true) { + if (opts.unescape === true) { + output = output.replace(/\\/g, ""); + } else { + output = output.replace(/\\+/g, (m) => { + return m.length % 2 === 0 ? "\\\\" : m ? "\\" : ""; + }); + } + } + if (output === input && opts.contains === true) { + state.output = input; + return state; + } + state.output = utils.wrapOutput(output, state, options); + return state; + } + while (!eos()) { + value = advance(); + if (value === "\0") { + continue; + } + if (value === "\\") { + const next = peek(); + if (next === "/" && opts.bash !== true) { + continue; + } + if (next === "." || next === ";") { + continue; + } + if (!next) { + value += "\\"; + push({ type: "text", value }); + continue; + } + const match = /^\\+/.exec(remaining()); + let slashes = 0; + if (match && match[0].length > 2) { + slashes = match[0].length; + state.index += slashes; + if (slashes % 2 !== 0) { + value += "\\"; + } + } + if (opts.unescape === true) { + value = advance(); + } else { + value += advance(); + } + if (state.brackets === 0) { + push({ type: "text", value }); + continue; + } + } + if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) { + if (opts.posix !== false && value === ":") { + const inner = prev.value.slice(1); + if (inner.includes("[")) { + prev.posix = true; + if (inner.includes(":")) { + const idx = prev.value.lastIndexOf("["); + const pre = prev.value.slice(0, idx); + const rest2 = prev.value.slice(idx + 2); + const posix = POSIX_REGEX_SOURCE[rest2]; + if (posix) { + prev.value = pre + posix; + state.backtrack = true; + advance(); + if (!bos.output && tokens.indexOf(prev) === 1) { + bos.output = ONE_CHAR; + } + continue; + } + } + } + } + if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") { + value = `\\${value}`; + } + if (value === "]" && (prev.value === "[" || prev.value === "[^")) { + value = `\\${value}`; + } + if (opts.posix === true && value === "!" && prev.value === "[") { + value = "^"; + } + prev.value += value; + append({ value }); + continue; + } + if (state.quotes === 1 && value !== '"') { + value = utils.escapeRegex(value); + prev.value += value; + append({ value }); + continue; + } + if (value === '"') { + state.quotes = state.quotes === 1 ? 0 : 1; + if (opts.keepQuotes === true) { + push({ type: "text", value }); + } + continue; + } + if (value === "(") { + increment("parens"); + push({ type: "paren", value }); + continue; + } + if (value === ")") { + if (state.parens === 0 && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError("opening", "(")); + } + const extglob = extglobs[extglobs.length - 1]; + if (extglob && state.parens === extglob.parens + 1) { + extglobClose(extglobs.pop()); + continue; + } + push({ type: "paren", value, output: state.parens ? ")" : "\\)" }); + decrement("parens"); + continue; + } + if (value === "[") { + if (opts.nobracket === true || !remaining().includes("]")) { + if (opts.nobracket !== true && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError("closing", "]")); + } + value = `\\${value}`; + } else { + increment("brackets"); + } + push({ type: "bracket", value }); + continue; + } + if (value === "]") { + if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) { + push({ type: "text", value, output: `\\${value}` }); + continue; + } + if (state.brackets === 0) { + if (opts.strictBrackets === true) { + throw new SyntaxError(syntaxError("opening", "[")); + } + push({ type: "text", value, output: `\\${value}` }); + continue; + } + decrement("brackets"); + const prevValue = prev.value.slice(1); + if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) { + value = `/${value}`; + } + prev.value += value; + append({ value }); + if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { + continue; + } + const escaped = utils.escapeRegex(prev.value); + state.output = state.output.slice(0, -prev.value.length); + if (opts.literalBrackets === true) { + state.output += escaped; + prev.value = escaped; + continue; + } + prev.value = `(${capture}${escaped}|${prev.value})`; + state.output += prev.value; + continue; + } + if (value === "{" && opts.nobrace !== true) { + increment("braces"); + const open = { + type: "brace", + value, + output: "(", + outputIndex: state.output.length, + tokensIndex: state.tokens.length + }; + braces.push(open); + push(open); + continue; + } + if (value === "}") { + const brace = braces[braces.length - 1]; + if (opts.nobrace === true || !brace) { + push({ type: "text", value, output: value }); + continue; + } + let output = ")"; + if (brace.dots === true) { + const arr = tokens.slice(); + const range = []; + for (let i = arr.length - 1; i >= 0; i--) { + tokens.pop(); + if (arr[i].type === "brace") { + break; + } + if (arr[i].type !== "dots") { + range.unshift(arr[i].value); + } + } + output = expandRange(range, opts); + state.backtrack = true; + } + if (brace.comma !== true && brace.dots !== true) { + const out = state.output.slice(0, brace.outputIndex); + const toks = state.tokens.slice(brace.tokensIndex); + brace.value = brace.output = "\\{"; + value = output = "\\}"; + state.output = out; + for (const t of toks) { + state.output += t.output || t.value; + } + } + push({ type: "brace", value, output }); + decrement("braces"); + braces.pop(); + continue; + } + if (value === "|") { + if (extglobs.length > 0) { + extglobs[extglobs.length - 1].conditions++; + } + push({ type: "text", value }); + continue; + } + if (value === ",") { + let output = value; + const brace = braces[braces.length - 1]; + if (brace && stack2[stack2.length - 1] === "braces") { + brace.comma = true; + output = "|"; + } + push({ type: "comma", value, output }); + continue; + } + if (value === "/") { + if (prev.type === "dot" && state.index === state.start + 1) { + state.start = state.index + 1; + state.consumed = ""; + state.output = ""; + tokens.pop(); + prev = bos; + continue; + } + push({ type: "slash", value, output: SLASH_LITERAL }); + continue; + } + if (value === ".") { + if (state.braces > 0 && prev.type === "dot") { + if (prev.value === ".") + prev.output = DOT_LITERAL; + const brace = braces[braces.length - 1]; + prev.type = "dots"; + prev.output += value; + prev.value += value; + brace.dots = true; + continue; + } + if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") { + push({ type: "text", value, output: DOT_LITERAL }); + continue; + } + push({ type: "dot", value, output: DOT_LITERAL }); + continue; + } + if (value === "?") { + const isGroup = prev && prev.value === "("; + if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { + extglobOpen("qmark", value); + continue; + } + if (prev && prev.type === "paren") { + const next = peek(); + let output = value; + if (next === "<" && !utils.supportsLookbehinds()) { + throw new Error("Node.js v10 or higher is required for regex lookbehinds"); + } + if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) { + output = `\\${value}`; + } + push({ type: "text", value, output }); + continue; + } + if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) { + push({ type: "qmark", value, output: QMARK_NO_DOT }); + continue; + } + push({ type: "qmark", value, output: QMARK }); + continue; + } + if (value === "!") { + if (opts.noextglob !== true && peek() === "(") { + if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) { + extglobOpen("negate", value); + continue; + } + } + if (opts.nonegate !== true && state.index === 0) { + negate(); + continue; + } + } + if (value === "+") { + if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { + extglobOpen("plus", value); + continue; + } + if (prev && prev.value === "(" || opts.regex === false) { + push({ type: "plus", value, output: PLUS_LITERAL }); + continue; + } + if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) { + push({ type: "plus", value }); + continue; + } + push({ type: "plus", value: PLUS_LITERAL }); + continue; + } + if (value === "@") { + if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { + push({ type: "at", extglob: true, value, output: "" }); + continue; + } + push({ type: "text", value }); + continue; + } + if (value !== "*") { + if (value === "$" || value === "^") { + value = `\\${value}`; + } + const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); + if (match) { + value += match[0]; + state.index += match[0].length; + } + push({ type: "text", value }); + continue; + } + if (prev && (prev.type === "globstar" || prev.star === true)) { + prev.type = "star"; + prev.star = true; + prev.value += value; + prev.output = star; + state.backtrack = true; + state.globstar = true; + consume(value); + continue; + } + let rest = remaining(); + if (opts.noextglob !== true && /^\([^?]/.test(rest)) { + extglobOpen("star", value); + continue; + } + if (prev.type === "star") { + if (opts.noglobstar === true) { + consume(value); + continue; + } + const prior = prev.prev; + const before = prior.prev; + const isStart = prior.type === "slash" || prior.type === "bos"; + const afterStar = before && (before.type === "star" || before.type === "globstar"); + if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) { + push({ type: "star", value, output: "" }); + continue; + } + const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace"); + const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren"); + if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) { + push({ type: "star", value, output: "" }); + continue; + } + while (rest.slice(0, 3) === "/**") { + const after = input[state.index + 4]; + if (after && after !== "/") { + break; + } + rest = rest.slice(3); + consume("/**", 3); + } + if (prior.type === "bos" && eos()) { + prev.type = "globstar"; + prev.value += value; + prev.output = globstar(opts); + state.output = prev.output; + state.globstar = true; + consume(value); + continue; + } + if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) { + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + prev.type = "globstar"; + prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)"); + prev.value += value; + state.globstar = true; + state.output += prior.output + prev.output; + consume(value); + continue; + } + if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") { + const end = rest[1] !== void 0 ? "|$" : ""; + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + prev.type = "globstar"; + prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; + prev.value += value; + state.output += prior.output + prev.output; + state.globstar = true; + consume(value + advance()); + push({ type: "slash", value: "/", output: "" }); + continue; + } + if (prior.type === "bos" && rest[0] === "/") { + prev.type = "globstar"; + prev.value += value; + prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; + state.output = prev.output; + state.globstar = true; + consume(value + advance()); + push({ type: "slash", value: "/", output: "" }); + continue; + } + state.output = state.output.slice(0, -prev.output.length); + prev.type = "globstar"; + prev.output = globstar(opts); + prev.value += value; + state.output += prev.output; + state.globstar = true; + consume(value); + continue; + } + const token = { type: "star", value, output: star }; + if (opts.bash === true) { + token.output = ".*?"; + if (prev.type === "bos" || prev.type === "slash") { + token.output = nodot + token.output; + } + push(token); + continue; + } + if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) { + token.output = value; + push(token); + continue; + } + if (state.index === state.start || prev.type === "slash" || prev.type === "dot") { + if (prev.type === "dot") { + state.output += NO_DOT_SLASH; + prev.output += NO_DOT_SLASH; + } else if (opts.dot === true) { + state.output += NO_DOTS_SLASH; + prev.output += NO_DOTS_SLASH; + } else { + state.output += nodot; + prev.output += nodot; + } + if (peek() !== "*") { + state.output += ONE_CHAR; + prev.output += ONE_CHAR; + } + } + push(token); + } + while (state.brackets > 0) { + if (opts.strictBrackets === true) + throw new SyntaxError(syntaxError("closing", "]")); + state.output = utils.escapeLast(state.output, "["); + decrement("brackets"); + } + while (state.parens > 0) { + if (opts.strictBrackets === true) + throw new SyntaxError(syntaxError("closing", ")")); + state.output = utils.escapeLast(state.output, "("); + decrement("parens"); + } + while (state.braces > 0) { + if (opts.strictBrackets === true) + throw new SyntaxError(syntaxError("closing", "}")); + state.output = utils.escapeLast(state.output, "{"); + decrement("braces"); + } + if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) { + push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` }); + } + if (state.backtrack === true) { + state.output = ""; + for (const token of state.tokens) { + state.output += token.output != null ? token.output : token.value; + if (token.suffix) { + state.output += token.suffix; + } + } + } + return state; + }; + parse.fastpaths = (input, options) => { + const opts = { ...options }; + const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + const len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + input = REPLACEMENTS[input] || input; + const win32 = utils.isWindows(options); + const { + DOT_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOTS_SLASH, + STAR, + START_ANCHOR + } = constants.globChars(win32); + const nodot = opts.dot ? NO_DOTS : NO_DOT; + const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; + const capture = opts.capture ? "" : "?:"; + const state = { negated: false, prefix: "" }; + let star = opts.bash === true ? ".*?" : STAR; + if (opts.capture) { + star = `(${star})`; + } + const globstar = (opts2) => { + if (opts2.noglobstar === true) + return star; + return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + const create = (str) => { + switch (str) { + case "*": + return `${nodot}${ONE_CHAR}${star}`; + case ".*": + return `${DOT_LITERAL}${ONE_CHAR}${star}`; + case "*.*": + return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + case "*/*": + return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; + case "**": + return nodot + globstar(opts); + case "**/*": + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; + case "**/*.*": + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + case "**/.*": + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; + default: { + const match = /^(.*?)\.(\w+)$/.exec(str); + if (!match) + return; + const source2 = create(match[1]); + if (!source2) + return; + return source2 + DOT_LITERAL + match[2]; + } + } + }; + const output = utils.removePrefix(input, state); + let source = create(output); + if (source && opts.strictSlashes !== true) { + source += `${SLASH_LITERAL}?`; + } + return source; + }; + module2.exports = parse; + } +}); + +// ../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/lib/picomatch.js +var require_picomatch = __commonJS({ + "../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/lib/picomatch.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var scan = require_scan2(); + var parse = require_parse4(); + var utils = require_utils4(); + var constants = require_constants5(); + var isObject = (val) => val && typeof val === "object" && !Array.isArray(val); + var picomatch = (glob, options, returnState = false) => { + if (Array.isArray(glob)) { + const fns = glob.map((input) => picomatch(input, options, returnState)); + const arrayMatcher = (str) => { + for (const isMatch of fns) { + const state2 = isMatch(str); + if (state2) + return state2; + } + return false; + }; + return arrayMatcher; + } + const isState = isObject(glob) && glob.tokens && glob.input; + if (glob === "" || typeof glob !== "string" && !isState) { + throw new TypeError("Expected pattern to be a non-empty string"); + } + const opts = options || {}; + const posix = utils.isWindows(options); + const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true); + const state = regex.state; + delete regex.state; + let isIgnored = () => false; + if (opts.ignore) { + const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; + isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); + } + const matcher = (input, returnObject = false) => { + const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix }); + const result = { glob, state, regex, posix, input, output, match, isMatch }; + if (typeof opts.onResult === "function") { + opts.onResult(result); + } + if (isMatch === false) { + result.isMatch = false; + return returnObject ? result : false; + } + if (isIgnored(input)) { + if (typeof opts.onIgnore === "function") { + opts.onIgnore(result); + } + result.isMatch = false; + return returnObject ? result : false; + } + if (typeof opts.onMatch === "function") { + opts.onMatch(result); + } + return returnObject ? result : true; + }; + if (returnState) { + matcher.state = state; + } + return matcher; + }; + picomatch.test = (input, regex, options, { glob, posix } = {}) => { + if (typeof input !== "string") { + throw new TypeError("Expected input to be a string"); + } + if (input === "") { + return { isMatch: false, output: "" }; + } + const opts = options || {}; + const format = opts.format || (posix ? utils.toPosixSlashes : null); + let match = input === glob; + let output = match && format ? format(input) : input; + if (match === false) { + output = format ? format(input) : input; + match = output === glob; + } + if (match === false || opts.capture === true) { + if (opts.matchBase === true || opts.basename === true) { + match = picomatch.matchBase(input, regex, options, posix); + } else { + match = regex.exec(output); + } + } + return { isMatch: Boolean(match), match, output }; + }; + picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { + const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); + return regex.test(path.basename(input)); + }; + picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); + picomatch.parse = (pattern, options) => { + if (Array.isArray(pattern)) + return pattern.map((p) => picomatch.parse(p, options)); + return parse(pattern, { ...options, fastpaths: false }); + }; + picomatch.scan = (input, options) => scan(input, options); + picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { + if (returnOutput === true) { + return state.output; + } + const opts = options || {}; + const prepend = opts.contains ? "" : "^"; + const append = opts.contains ? "" : "$"; + let source = `${prepend}(?:${state.output})${append}`; + if (state && state.negated === true) { + source = `^(?!${source}).*$`; + } + const regex = picomatch.toRegex(source, options); + if (returnState === true) { + regex.state = state; + } + return regex; + }; + picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { + if (!input || typeof input !== "string") { + throw new TypeError("Expected a non-empty string"); + } + let parsed = { negated: false, fastpaths: true }; + if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) { + parsed.output = parse.fastpaths(input, options); + } + if (!parsed.output) { + parsed = parse(input, options); + } + return picomatch.compileRe(parsed, options, returnOutput, returnState); + }; + picomatch.toRegex = (source, options) => { + try { + const opts = options || {}; + return new RegExp(source, opts.flags || (opts.nocase ? "i" : "")); + } catch (err) { + if (options && options.debug === true) + throw err; + return /$^/; + } + }; + picomatch.constants = constants; + module2.exports = picomatch; + } +}); + +// ../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/index.js +var require_picomatch2 = __commonJS({ + "../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/index.js"(exports2, module2) { + "use strict"; + module2.exports = require_picomatch(); + } +}); + +// ../../node_modules/.pnpm/micromatch@4.0.4/node_modules/micromatch/index.js +var require_micromatch = __commonJS({ + "../../node_modules/.pnpm/micromatch@4.0.4/node_modules/micromatch/index.js"(exports2, module2) { + "use strict"; + var util = require("util"); + var braces = require_braces(); + var picomatch = require_picomatch2(); + var utils = require_utils4(); + var isEmptyString = (val) => val === "" || val === "./"; + var micromatch = (list, patterns, options) => { + patterns = [].concat(patterns); + list = [].concat(list); + let omit = new Set(); + let keep = new Set(); + let items = new Set(); + let negatives = 0; + let onResult = (state) => { + items.add(state.output); + if (options && options.onResult) { + options.onResult(state); + } + }; + for (let i = 0; i < patterns.length; i++) { + let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true); + let negated = isMatch.state.negated || isMatch.state.negatedExtglob; + if (negated) + negatives++; + for (let item of list) { + let matched = isMatch(item, true); + let match = negated ? !matched.isMatch : matched.isMatch; + if (!match) + continue; + if (negated) { + omit.add(matched.output); + } else { + omit.delete(matched.output); + keep.add(matched.output); + } + } + } + let result = negatives === patterns.length ? [...items] : [...keep]; + let matches = result.filter((item) => !omit.has(item)); + if (options && matches.length === 0) { + if (options.failglob === true) { + throw new Error(`No matches found for "${patterns.join(", ")}"`); + } + if (options.nonull === true || options.nullglob === true) { + return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns; + } + } + return matches; + }; + micromatch.match = micromatch; + micromatch.matcher = (pattern, options) => picomatch(pattern, options); + micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); + micromatch.any = micromatch.isMatch; + micromatch.not = (list, patterns, options = {}) => { + patterns = [].concat(patterns).map(String); + let result = new Set(); + let items = []; + let onResult = (state) => { + if (options.onResult) + options.onResult(state); + items.push(state.output); + }; + let matches = micromatch(list, patterns, { ...options, onResult }); + for (let item of items) { + if (!matches.includes(item)) { + result.add(item); + } + } + return [...result]; + }; + micromatch.contains = (str, pattern, options) => { + if (typeof str !== "string") { + throw new TypeError(`Expected a string: "${util.inspect(str)}"`); + } + if (Array.isArray(pattern)) { + return pattern.some((p) => micromatch.contains(str, p, options)); + } + if (typeof pattern === "string") { + if (isEmptyString(str) || isEmptyString(pattern)) { + return false; + } + if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) { + return true; + } + } + return micromatch.isMatch(str, pattern, { ...options, contains: true }); + }; + micromatch.matchKeys = (obj, patterns, options) => { + if (!utils.isObject(obj)) { + throw new TypeError("Expected the first argument to be an object"); + } + let keys = micromatch(Object.keys(obj), patterns, options); + let res = {}; + for (let key of keys) + res[key] = obj[key]; + return res; + }; + micromatch.some = (list, patterns, options) => { + let items = [].concat(list); + for (let pattern of [].concat(patterns)) { + let isMatch = picomatch(String(pattern), options); + if (items.some((item) => isMatch(item))) { + return true; + } + } + return false; + }; + micromatch.every = (list, patterns, options) => { + let items = [].concat(list); + for (let pattern of [].concat(patterns)) { + let isMatch = picomatch(String(pattern), options); + if (!items.every((item) => isMatch(item))) { + return false; + } + } + return true; + }; + micromatch.all = (str, patterns, options) => { + if (typeof str !== "string") { + throw new TypeError(`Expected a string: "${util.inspect(str)}"`); + } + return [].concat(patterns).every((p) => picomatch(p, options)(str)); + }; + micromatch.capture = (glob, input, options) => { + let posix = utils.isWindows(options); + let regex = picomatch.makeRe(String(glob), { ...options, capture: true }); + let match = regex.exec(posix ? utils.toPosixSlashes(input) : input); + if (match) { + return match.slice(1).map((v) => v === void 0 ? "" : v); + } + }; + micromatch.makeRe = (...args2) => picomatch.makeRe(...args2); + micromatch.scan = (...args2) => picomatch.scan(...args2); + micromatch.parse = (patterns, options) => { + let res = []; + for (let pattern of [].concat(patterns || [])) { + for (let str of braces(String(pattern), options)) { + res.push(picomatch.parse(str, options)); + } + } + return res; + }; + micromatch.braces = (pattern, options) => { + if (typeof pattern !== "string") + throw new TypeError("Expected a string"); + if (options && options.nobrace === true || !/\{.*\}/.test(pattern)) { + return [pattern]; + } + return braces(pattern, options); + }; + micromatch.braceExpand = (pattern, options) => { + if (typeof pattern !== "string") + throw new TypeError("Expected a string"); + return micromatch.braces(pattern, { ...options, expand: true }); + }; + module2.exports = micromatch; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/pattern.js +var require_pattern = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/pattern.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0; + var path = require("path"); + var globParent = require_glob_parent(); + var micromatch = require_micromatch(); + var GLOBSTAR = "**"; + var ESCAPE_SYMBOL = "\\"; + var COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/; + var REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[.*]/; + var REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\(.*\|.*\)/; + var GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\(.*\)/; + var BRACE_EXPANSIONS_SYMBOLS_RE = /{.*(?:,|\.\.).*}/; + function isStaticPattern(pattern, options = {}) { + return !isDynamicPattern(pattern, options); + } + exports2.isStaticPattern = isStaticPattern; + function isDynamicPattern(pattern, options = {}) { + if (pattern === "") { + return false; + } + if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) { + return true; + } + if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) { + return true; + } + if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) { + return true; + } + if (options.braceExpansion !== false && BRACE_EXPANSIONS_SYMBOLS_RE.test(pattern)) { + return true; + } + return false; + } + exports2.isDynamicPattern = isDynamicPattern; + function convertToPositivePattern(pattern) { + return isNegativePattern(pattern) ? pattern.slice(1) : pattern; + } + exports2.convertToPositivePattern = convertToPositivePattern; + function convertToNegativePattern(pattern) { + return "!" + pattern; + } + exports2.convertToNegativePattern = convertToNegativePattern; + function isNegativePattern(pattern) { + return pattern.startsWith("!") && pattern[1] !== "("; + } + exports2.isNegativePattern = isNegativePattern; + function isPositivePattern(pattern) { + return !isNegativePattern(pattern); + } + exports2.isPositivePattern = isPositivePattern; + function getNegativePatterns(patterns) { + return patterns.filter(isNegativePattern); + } + exports2.getNegativePatterns = getNegativePatterns; + function getPositivePatterns(patterns) { + return patterns.filter(isPositivePattern); + } + exports2.getPositivePatterns = getPositivePatterns; + function getPatternsInsideCurrentDirectory(patterns) { + return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern)); + } + exports2.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory; + function getPatternsOutsideCurrentDirectory(patterns) { + return patterns.filter(isPatternRelatedToParentDirectory); + } + exports2.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory; + function isPatternRelatedToParentDirectory(pattern) { + return pattern.startsWith("..") || pattern.startsWith("./.."); + } + exports2.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory; + function getBaseDirectory(pattern) { + return globParent(pattern, { flipBackslashes: false }); + } + exports2.getBaseDirectory = getBaseDirectory; + function hasGlobStar(pattern) { + return pattern.includes(GLOBSTAR); + } + exports2.hasGlobStar = hasGlobStar; + function endsWithSlashGlobStar(pattern) { + return pattern.endsWith("/" + GLOBSTAR); + } + exports2.endsWithSlashGlobStar = endsWithSlashGlobStar; + function isAffectDepthOfReadingPattern(pattern) { + const basename = path.basename(pattern); + return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); + } + exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; + function expandPatternsWithBraceExpansion(patterns) { + return patterns.reduce((collection, pattern) => { + return collection.concat(expandBraceExpansion(pattern)); + }, []); + } + exports2.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion; + function expandBraceExpansion(pattern) { + return micromatch.braces(pattern, { + expand: true, + nodupes: true + }); + } + exports2.expandBraceExpansion = expandBraceExpansion; + function getPatternParts(pattern, options) { + let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true })); + if (parts.length === 0) { + parts = [pattern]; + } + if (parts[0].startsWith("/")) { + parts[0] = parts[0].slice(1); + parts.unshift(""); + } + return parts; + } + exports2.getPatternParts = getPatternParts; + function makeRe(pattern, options) { + return micromatch.makeRe(pattern, options); + } + exports2.makeRe = makeRe; + function convertPatternsToRe(patterns, options) { + return patterns.map((pattern) => makeRe(pattern, options)); + } + exports2.convertPatternsToRe = convertPatternsToRe; + function matchAny(entry, patternsRe) { + return patternsRe.some((patternRe) => patternRe.test(entry)); + } + exports2.matchAny = matchAny; + } +}); + +// ../../node_modules/.pnpm/merge2@1.4.1/node_modules/merge2/index.js +var require_merge22 = __commonJS({ + "../../node_modules/.pnpm/merge2@1.4.1/node_modules/merge2/index.js"(exports2, module2) { + "use strict"; + var Stream = require("stream"); + var PassThrough = Stream.PassThrough; + var slice = Array.prototype.slice; + module2.exports = merge2; + function merge2() { + const streamsQueue = []; + const args2 = slice.call(arguments); + let merging = false; + let options = args2[args2.length - 1]; + if (options && !Array.isArray(options) && options.pipe == null) { + args2.pop(); + } else { + options = {}; + } + const doEnd = options.end !== false; + const doPipeError = options.pipeError === true; + if (options.objectMode == null) { + options.objectMode = true; + } + if (options.highWaterMark == null) { + options.highWaterMark = 64 * 1024; + } + const mergedStream = PassThrough(options); + function addStream() { + for (let i = 0, len = arguments.length; i < len; i++) { + streamsQueue.push(pauseStreams(arguments[i], options)); + } + mergeStream(); + return this; + } + function mergeStream() { + if (merging) { + return; + } + merging = true; + let streams = streamsQueue.shift(); + if (!streams) { + process.nextTick(endStream); + return; + } + if (!Array.isArray(streams)) { + streams = [streams]; + } + let pipesCount = streams.length + 1; + function next() { + if (--pipesCount > 0) { + return; + } + merging = false; + mergeStream(); + } + function pipe(stream) { + function onend() { + stream.removeListener("merge2UnpipeEnd", onend); + stream.removeListener("end", onend); + if (doPipeError) { + stream.removeListener("error", onerror); + } + next(); + } + function onerror(err) { + mergedStream.emit("error", err); + } + if (stream._readableState.endEmitted) { + return next(); + } + stream.on("merge2UnpipeEnd", onend); + stream.on("end", onend); + if (doPipeError) { + stream.on("error", onerror); + } + stream.pipe(mergedStream, { end: false }); + stream.resume(); + } + for (let i = 0; i < streams.length; i++) { + pipe(streams[i]); + } + next(); + } + function endStream() { + merging = false; + mergedStream.emit("queueDrain"); + if (doEnd) { + mergedStream.end(); + } + } + mergedStream.setMaxListeners(0); + mergedStream.add = addStream; + mergedStream.on("unpipe", function(stream) { + stream.emit("merge2UnpipeEnd"); + }); + if (args2.length) { + addStream.apply(null, args2); + } + return mergedStream; + } + function pauseStreams(streams, options) { + if (!Array.isArray(streams)) { + if (!streams._readableState && streams.pipe) { + streams = streams.pipe(PassThrough(options)); + } + if (!streams._readableState || !streams.pause || !streams.pipe) { + throw new Error("Only readable stream can be merged."); + } + streams.pause(); + } else { + for (let i = 0, len = streams.length; i < len; i++) { + streams[i] = pauseStreams(streams[i], options); + } + } + return streams; + } + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/stream.js +var require_stream2 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/stream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.merge = void 0; + var merge2 = require_merge22(); + function merge(streams) { + const mergedStream = merge2(streams); + streams.forEach((stream) => { + stream.once("error", (error) => mergedStream.emit("error", error)); + }); + mergedStream.once("close", () => propagateCloseEventToSources(streams)); + mergedStream.once("end", () => propagateCloseEventToSources(streams)); + return mergedStream; + } + exports2.merge = merge; + function propagateCloseEventToSources(streams) { + streams.forEach((stream) => stream.emit("close")); + } + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/string.js +var require_string2 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/string.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isEmpty = exports2.isString = void 0; + function isString(input) { + return typeof input === "string"; + } + exports2.isString = isString; + function isEmpty(input) { + return input === ""; + } + exports2.isEmpty = isEmpty; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/index.js +var require_utils5 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.string = exports2.stream = exports2.pattern = exports2.path = exports2.fs = exports2.errno = exports2.array = void 0; + var array = require_array2(); + exports2.array = array; + var errno = require_errno(); + exports2.errno = errno; + var fs = require_fs(); + exports2.fs = fs; + var path = require_path2(); + exports2.path = path; + var pattern = require_pattern(); + exports2.pattern = pattern; + var stream = require_stream2(); + exports2.stream = stream; + var string = require_string2(); + exports2.string = string; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/managers/tasks.js +var require_tasks = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/managers/tasks.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.convertPatternGroupToTask = exports2.convertPatternGroupsToTasks = exports2.groupPatternsByBaseDirectory = exports2.getNegativePatternsAsPositive = exports2.getPositivePatterns = exports2.convertPatternsToTasks = exports2.generate = void 0; + var utils = require_utils5(); + function generate(patterns, settings) { + const positivePatterns = getPositivePatterns(patterns); + const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore); + const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)); + const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)); + const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, false); + const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, true); + return staticTasks.concat(dynamicTasks); + } + exports2.generate = generate; + function convertPatternsToTasks(positive, negative, dynamic) { + const tasks = []; + const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive); + const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive); + const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory); + const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory); + tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic)); + if ("." in insideCurrentDirectoryGroup) { + tasks.push(convertPatternGroupToTask(".", patternsInsideCurrentDirectory, negative, dynamic)); + } else { + tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic)); + } + return tasks; + } + exports2.convertPatternsToTasks = convertPatternsToTasks; + function getPositivePatterns(patterns) { + return utils.pattern.getPositivePatterns(patterns); + } + exports2.getPositivePatterns = getPositivePatterns; + function getNegativePatternsAsPositive(patterns, ignore) { + const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore); + const positive = negative.map(utils.pattern.convertToPositivePattern); + return positive; + } + exports2.getNegativePatternsAsPositive = getNegativePatternsAsPositive; + function groupPatternsByBaseDirectory(patterns) { + const group = {}; + return patterns.reduce((collection, pattern) => { + const base = utils.pattern.getBaseDirectory(pattern); + if (base in collection) { + collection[base].push(pattern); + } else { + collection[base] = [pattern]; + } + return collection; + }, group); + } + exports2.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory; + function convertPatternGroupsToTasks(positive, negative, dynamic) { + return Object.keys(positive).map((base) => { + return convertPatternGroupToTask(base, positive[base], negative, dynamic); + }); + } + exports2.convertPatternGroupsToTasks = convertPatternGroupsToTasks; + function convertPatternGroupToTask(base, positive, negative, dynamic) { + return { + dynamic, + positive, + negative, + base, + patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern)) + }; + } + exports2.convertPatternGroupToTask = convertPatternGroupToTask; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js +var require_async2 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.read = void 0; + function read(path, settings, callback) { + settings.fs.lstat(path, (lstatError, lstat) => { + if (lstatError !== null) { + callFailureCallback(callback, lstatError); + return; + } + if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { + callSuccessCallback(callback, lstat); + return; + } + settings.fs.stat(path, (statError, stat) => { + if (statError !== null) { + if (settings.throwErrorOnBrokenSymbolicLink) { + callFailureCallback(callback, statError); + return; + } + callSuccessCallback(callback, lstat); + return; + } + if (settings.markSymbolicLink) { + stat.isSymbolicLink = () => true; + } + callSuccessCallback(callback, stat); + }); + }); + } + exports2.read = read; + function callFailureCallback(callback, error) { + callback(error); + } + function callSuccessCallback(callback, result) { + callback(null, result); + } + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js +var require_sync = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.read = void 0; + function read(path, settings) { + const lstat = settings.fs.lstatSync(path); + if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { + return lstat; + } + try { + const stat = settings.fs.statSync(path); + if (settings.markSymbolicLink) { + stat.isSymbolicLink = () => true; + } + return stat; + } catch (error) { + if (!settings.throwErrorOnBrokenSymbolicLink) { + return lstat; + } + throw error; + } + } + exports2.read = read; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.js +var require_fs2 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; + var fs = require("fs"); + exports2.FILE_SYSTEM_ADAPTER = { + lstat: fs.lstat, + stat: fs.stat, + lstatSync: fs.lstatSync, + statSync: fs.statSync + }; + function createFileSystemAdapter(fsMethods) { + if (fsMethods === void 0) { + return exports2.FILE_SYSTEM_ADAPTER; + } + return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods); + } + exports2.createFileSystemAdapter = createFileSystemAdapter; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js +var require_settings = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs = require_fs2(); + var Settings = class { + constructor(_options = {}) { + this._options = _options; + this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); + this.fs = fs.createFileSystemAdapter(this._options.fs); + this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } + }; + exports2.default = Settings; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.js +var require_out = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.statSync = exports2.stat = exports2.Settings = void 0; + var async = require_async2(); + var sync = require_sync(); + var settings_1 = require_settings(); + exports2.Settings = settings_1.default; + function stat(path, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === "function") { + async.read(path, getSettings(), optionsOrSettingsOrCallback); + return; + } + async.read(path, getSettings(optionsOrSettingsOrCallback), callback); + } + exports2.stat = stat; + function statSync(path, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return sync.read(path, settings); + } + exports2.statSync = statSync; + function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) { + return settingsOrOptions; + } + return new settings_1.default(settingsOrOptions); + } + } +}); + +// ../../node_modules/.pnpm/queue-microtask@1.2.3/node_modules/queue-microtask/index.js +var require_queue_microtask = __commonJS({ + "../../node_modules/.pnpm/queue-microtask@1.2.3/node_modules/queue-microtask/index.js"(exports2, module2) { + var promise; + module2.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => { + throw err; + }, 0)); + } +}); + +// ../../node_modules/.pnpm/run-parallel@1.2.0/node_modules/run-parallel/index.js +var require_run_parallel = __commonJS({ + "../../node_modules/.pnpm/run-parallel@1.2.0/node_modules/run-parallel/index.js"(exports2, module2) { + module2.exports = runParallel; + var queueMicrotask2 = require_queue_microtask(); + function runParallel(tasks, cb) { + let results, pending, keys; + let isSync = true; + if (Array.isArray(tasks)) { + results = []; + pending = tasks.length; + } else { + keys = Object.keys(tasks); + results = {}; + pending = keys.length; + } + function done(err) { + function end() { + if (cb) + cb(err, results); + cb = null; + } + if (isSync) + queueMicrotask2(end); + else + end(); + } + function each(i, err, result) { + results[i] = result; + if (--pending === 0 || err) { + done(err); + } + } + if (!pending) { + done(null); + } else if (keys) { + keys.forEach(function(key) { + tasks[key](function(err, result) { + each(key, err, result); + }); + }); + } else { + tasks.forEach(function(task, i) { + task(function(err, result) { + each(i, err, result); + }); + }); + } + isSync = false; + } + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js +var require_constants6 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; + var NODE_PROCESS_VERSION_PARTS = process.versions.node.split("."); + if (NODE_PROCESS_VERSION_PARTS[0] === void 0 || NODE_PROCESS_VERSION_PARTS[1] === void 0) { + throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); + } + var MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); + var MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); + var SUPPORTED_MAJOR_VERSION = 10; + var SUPPORTED_MINOR_VERSION = 10; + var IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION; + var IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION; + exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.js +var require_fs3 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDirentFromStats = void 0; + var DirentFromStats = class { + constructor(name, stats) { + this.name = name; + this.isBlockDevice = stats.isBlockDevice.bind(stats); + this.isCharacterDevice = stats.isCharacterDevice.bind(stats); + this.isDirectory = stats.isDirectory.bind(stats); + this.isFIFO = stats.isFIFO.bind(stats); + this.isFile = stats.isFile.bind(stats); + this.isSocket = stats.isSocket.bind(stats); + this.isSymbolicLink = stats.isSymbolicLink.bind(stats); + } + }; + function createDirentFromStats(name, stats) { + return new DirentFromStats(name, stats); + } + exports2.createDirentFromStats = createDirentFromStats; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.js +var require_utils6 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fs = void 0; + var fs = require_fs3(); + exports2.fs = fs; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.js +var require_common3 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.joinPathSegments = void 0; + function joinPathSegments(a, b, separator) { + if (a.endsWith(separator)) { + return a + b; + } + return a + separator + b; + } + exports2.joinPathSegments = joinPathSegments; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.js +var require_async3 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0; + var fsStat = require_out(); + var rpl = require_run_parallel(); + var constants_1 = require_constants6(); + var utils = require_utils6(); + var common = require_common3(); + function read(directory, settings, callback) { + if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { + readdirWithFileTypes(directory, settings, callback); + return; + } + readdir(directory, settings, callback); + } + exports2.read = read; + function readdirWithFileTypes(directory, settings, callback) { + settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { + if (readdirError !== null) { + callFailureCallback(callback, readdirError); + return; + } + const entries = dirents.map((dirent) => ({ + dirent, + name: dirent.name, + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + })); + if (!settings.followSymbolicLinks) { + callSuccessCallback(callback, entries); + return; + } + const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings)); + rpl(tasks, (rplError, rplEntries) => { + if (rplError !== null) { + callFailureCallback(callback, rplError); + return; + } + callSuccessCallback(callback, rplEntries); + }); + }); + } + exports2.readdirWithFileTypes = readdirWithFileTypes; + function makeRplTaskEntry(entry, settings) { + return (done) => { + if (!entry.dirent.isSymbolicLink()) { + done(null, entry); + return; + } + settings.fs.stat(entry.path, (statError, stats) => { + if (statError !== null) { + if (settings.throwErrorOnBrokenSymbolicLink) { + done(statError); + return; + } + done(null, entry); + return; + } + entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); + done(null, entry); + }); + }; + } + function readdir(directory, settings, callback) { + settings.fs.readdir(directory, (readdirError, names) => { + if (readdirError !== null) { + callFailureCallback(callback, readdirError); + return; + } + const tasks = names.map((name) => { + const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + return (done) => { + fsStat.stat(path, settings.fsStatSettings, (error, stats) => { + if (error !== null) { + done(error); + return; + } + const entry = { + name, + path, + dirent: utils.fs.createDirentFromStats(name, stats) + }; + if (settings.stats) { + entry.stats = stats; + } + done(null, entry); + }); + }; + }); + rpl(tasks, (rplError, entries) => { + if (rplError !== null) { + callFailureCallback(callback, rplError); + return; + } + callSuccessCallback(callback, entries); + }); + }); + } + exports2.readdir = readdir; + function callFailureCallback(callback, error) { + callback(error); + } + function callSuccessCallback(callback, result) { + callback(null, result); + } + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.js +var require_sync2 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0; + var fsStat = require_out(); + var constants_1 = require_constants6(); + var utils = require_utils6(); + var common = require_common3(); + function read(directory, settings) { + if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { + return readdirWithFileTypes(directory, settings); + } + return readdir(directory, settings); + } + exports2.read = read; + function readdirWithFileTypes(directory, settings) { + const dirents = settings.fs.readdirSync(directory, { withFileTypes: true }); + return dirents.map((dirent) => { + const entry = { + dirent, + name: dirent.name, + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + }; + if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { + try { + const stats = settings.fs.statSync(entry.path); + entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); + } catch (error) { + if (settings.throwErrorOnBrokenSymbolicLink) { + throw error; + } + } + } + return entry; + }); + } + exports2.readdirWithFileTypes = readdirWithFileTypes; + function readdir(directory, settings) { + const names = settings.fs.readdirSync(directory); + return names.map((name) => { + const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const stats = fsStat.statSync(entryPath, settings.fsStatSettings); + const entry = { + name, + path: entryPath, + dirent: utils.fs.createDirentFromStats(name, stats) + }; + if (settings.stats) { + entry.stats = stats; + } + return entry; + }); + } + exports2.readdir = readdir; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.js +var require_fs4 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; + var fs = require("fs"); + exports2.FILE_SYSTEM_ADAPTER = { + lstat: fs.lstat, + stat: fs.stat, + lstatSync: fs.lstatSync, + statSync: fs.statSync, + readdir: fs.readdir, + readdirSync: fs.readdirSync + }; + function createFileSystemAdapter(fsMethods) { + if (fsMethods === void 0) { + return exports2.FILE_SYSTEM_ADAPTER; + } + return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods); + } + exports2.createFileSystemAdapter = createFileSystemAdapter; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js +var require_settings2 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path = require("path"); + var fsStat = require_out(); + var fs = require_fs4(); + var Settings = class { + constructor(_options = {}) { + this._options = _options; + this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); + this.fs = fs.createFileSystemAdapter(this._options.fs); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); + this.stats = this._getValue(this._options.stats, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); + this.fsStatSettings = new fsStat.Settings({ + followSymbolicLink: this.followSymbolicLinks, + fs: this.fs, + throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink + }); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } + }; + exports2.default = Settings; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.js +var require_out2 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Settings = exports2.scandirSync = exports2.scandir = void 0; + var async = require_async3(); + var sync = require_sync2(); + var settings_1 = require_settings2(); + exports2.Settings = settings_1.default; + function scandir(path, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === "function") { + async.read(path, getSettings(), optionsOrSettingsOrCallback); + return; + } + async.read(path, getSettings(optionsOrSettingsOrCallback), callback); + } + exports2.scandir = scandir; + function scandirSync(path, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return sync.read(path, settings); + } + exports2.scandirSync = scandirSync; + function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) { + return settingsOrOptions; + } + return new settings_1.default(settingsOrOptions); + } + } +}); + +// ../../node_modules/.pnpm/reusify@1.0.4/node_modules/reusify/reusify.js +var require_reusify = __commonJS({ + "../../node_modules/.pnpm/reusify@1.0.4/node_modules/reusify/reusify.js"(exports2, module2) { + "use strict"; + function reusify(Constructor) { + var head = new Constructor(); + var tail = head; + function get() { + var current = head; + if (current.next) { + head = current.next; + } else { + head = new Constructor(); + tail = head; + } + current.next = null; + return current; + } + function release(obj) { + tail.next = obj; + tail = obj; + } + return { + get, + release + }; + } + module2.exports = reusify; + } +}); + +// ../../node_modules/.pnpm/fastq@1.13.0/node_modules/fastq/queue.js +var require_queue2 = __commonJS({ + "../../node_modules/.pnpm/fastq@1.13.0/node_modules/fastq/queue.js"(exports2, module2) { + "use strict"; + var reusify = require_reusify(); + function fastqueue(context, worker, concurrency) { + if (typeof context === "function") { + concurrency = worker; + worker = context; + context = null; + } + if (concurrency < 1) { + throw new Error("fastqueue concurrency must be greater than 1"); + } + var cache = reusify(Task); + var queueHead = null; + var queueTail = null; + var _running = 0; + var errorHandler = null; + var self2 = { + push, + drain: noop, + saturated: noop, + pause, + paused: false, + concurrency, + running, + resume, + idle, + length, + getQueue, + unshift, + empty: noop, + kill, + killAndDrain, + error + }; + return self2; + function running() { + return _running; + } + function pause() { + self2.paused = true; + } + function length() { + var current = queueHead; + var counter = 0; + while (current) { + current = current.next; + counter++; + } + return counter; + } + function getQueue() { + var current = queueHead; + var tasks = []; + while (current) { + tasks.push(current.value); + current = current.next; + } + return tasks; + } + function resume() { + if (!self2.paused) + return; + self2.paused = false; + for (var i = 0; i < self2.concurrency; i++) { + _running++; + release(); + } + } + function idle() { + return _running === 0 && self2.length() === 0; + } + function push(value, done) { + var current = cache.get(); + current.context = context; + current.release = release; + current.value = value; + current.callback = done || noop; + current.errorHandler = errorHandler; + if (_running === self2.concurrency || self2.paused) { + if (queueTail) { + queueTail.next = current; + queueTail = current; + } else { + queueHead = current; + queueTail = current; + self2.saturated(); + } + } else { + _running++; + worker.call(context, current.value, current.worked); + } + } + function unshift(value, done) { + var current = cache.get(); + current.context = context; + current.release = release; + current.value = value; + current.callback = done || noop; + if (_running === self2.concurrency || self2.paused) { + if (queueHead) { + current.next = queueHead; + queueHead = current; + } else { + queueHead = current; + queueTail = current; + self2.saturated(); + } + } else { + _running++; + worker.call(context, current.value, current.worked); + } + } + function release(holder) { + if (holder) { + cache.release(holder); + } + var next = queueHead; + if (next) { + if (!self2.paused) { + if (queueTail === queueHead) { + queueTail = null; + } + queueHead = next.next; + next.next = null; + worker.call(context, next.value, next.worked); + if (queueTail === null) { + self2.empty(); + } + } else { + _running--; + } + } else if (--_running === 0) { + self2.drain(); + } + } + function kill() { + queueHead = null; + queueTail = null; + self2.drain = noop; + } + function killAndDrain() { + queueHead = null; + queueTail = null; + self2.drain(); + self2.drain = noop; + } + function error(handler) { + errorHandler = handler; + } + } + function noop() { + } + function Task() { + this.value = null; + this.callback = noop; + this.next = null; + this.release = noop; + this.context = null; + this.errorHandler = null; + var self2 = this; + this.worked = function worked(err, result) { + var callback = self2.callback; + var errorHandler = self2.errorHandler; + var val = self2.value; + self2.value = null; + self2.callback = noop; + if (self2.errorHandler) { + errorHandler(err, val); + } + callback.call(self2.context, err, result); + self2.release(self2); + }; + } + function queueAsPromised(context, worker, concurrency) { + if (typeof context === "function") { + concurrency = worker; + worker = context; + context = null; + } + function asyncWrapper(arg, cb) { + worker.call(this, arg).then(function(res) { + cb(null, res); + }, cb); + } + var queue = fastqueue(context, asyncWrapper, concurrency); + var pushCb = queue.push; + var unshiftCb = queue.unshift; + queue.push = push; + queue.unshift = unshift; + queue.drained = drained; + return queue; + function push(value) { + var p = new Promise(function(resolve, reject) { + pushCb(value, function(err, result) { + if (err) { + reject(err); + return; + } + resolve(result); + }); + }); + p.catch(noop); + return p; + } + function unshift(value) { + var p = new Promise(function(resolve, reject) { + unshiftCb(value, function(err, result) { + if (err) { + reject(err); + return; + } + resolve(result); + }); + }); + p.catch(noop); + return p; + } + function drained() { + var previousDrain = queue.drain; + var p = new Promise(function(resolve) { + queue.drain = function() { + previousDrain(); + resolve(); + }; + }); + return p; + } + } + module2.exports = fastqueue; + module2.exports.promise = queueAsPromised; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js +var require_common4 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.joinPathSegments = exports2.replacePathSegmentSeparator = exports2.isAppliedFilter = exports2.isFatalError = void 0; + function isFatalError(settings, error) { + if (settings.errorFilter === null) { + return true; + } + return !settings.errorFilter(error); + } + exports2.isFatalError = isFatalError; + function isAppliedFilter(filter, value) { + return filter === null || filter(value); + } + exports2.isAppliedFilter = isAppliedFilter; + function replacePathSegmentSeparator(filepath, separator) { + return filepath.split(/[/\\]/).join(separator); + } + exports2.replacePathSegmentSeparator = replacePathSegmentSeparator; + function joinPathSegments(a, b, separator) { + if (a === "") { + return b; + } + if (a.endsWith(separator)) { + return a + b; + } + return a + separator + b; + } + exports2.joinPathSegments = joinPathSegments; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.js +var require_reader = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var common = require_common4(); + var Reader = class { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); + } + }; + exports2.default = Reader; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/async.js +var require_async4 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/async.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var events_1 = require("events"); + var fsScandir = require_out2(); + var fastq = require_queue2(); + var common = require_common4(); + var reader_1 = require_reader(); + var AsyncReader = class extends reader_1.default { + constructor(_root, _settings) { + super(_root, _settings); + this._settings = _settings; + this._scandir = fsScandir.scandir; + this._emitter = new events_1.EventEmitter(); + this._queue = fastq(this._worker.bind(this), this._settings.concurrency); + this._isFatalError = false; + this._isDestroyed = false; + this._queue.drain = () => { + if (!this._isFatalError) { + this._emitter.emit("end"); + } + }; + } + read() { + this._isFatalError = false; + this._isDestroyed = false; + setImmediate(() => { + this._pushToQueue(this._root, this._settings.basePath); + }); + return this._emitter; + } + get isDestroyed() { + return this._isDestroyed; + } + destroy() { + if (this._isDestroyed) { + throw new Error("The reader is already destroyed"); + } + this._isDestroyed = true; + this._queue.killAndDrain(); + } + onEntry(callback) { + this._emitter.on("entry", callback); + } + onError(callback) { + this._emitter.once("error", callback); + } + onEnd(callback) { + this._emitter.once("end", callback); + } + _pushToQueue(directory, base) { + const queueItem = { directory, base }; + this._queue.push(queueItem, (error) => { + if (error !== null) { + this._handleError(error); + } + }); + } + _worker(item, done) { + this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => { + if (error !== null) { + done(error, void 0); + return; + } + for (const entry of entries) { + this._handleEntry(entry, item.base); + } + done(null, void 0); + }); + } + _handleError(error) { + if (this._isDestroyed || !common.isFatalError(this._settings, error)) { + return; + } + this._isFatalError = true; + this._isDestroyed = true; + this._emitter.emit("error", error); + } + _handleEntry(entry, base) { + if (this._isDestroyed || this._isFatalError) { + return; + } + const fullpath = entry.path; + if (base !== void 0) { + entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + } + if (common.isAppliedFilter(this._settings.entryFilter, entry)) { + this._emitEntry(entry); + } + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { + this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); + } + } + _emitEntry(entry) { + this._emitter.emit("entry", entry); + } + }; + exports2.default = AsyncReader; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.js +var require_async5 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var async_1 = require_async4(); + var AsyncProvider = class { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new async_1.default(this._root, this._settings); + this._storage = []; + } + read(callback) { + this._reader.onError((error) => { + callFailureCallback(callback, error); + }); + this._reader.onEntry((entry) => { + this._storage.push(entry); + }); + this._reader.onEnd(() => { + callSuccessCallback(callback, this._storage); + }); + this._reader.read(); + } + }; + exports2.default = AsyncProvider; + function callFailureCallback(callback, error) { + callback(error); + } + function callSuccessCallback(callback, entries) { + callback(null, entries); + } + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/stream.js +var require_stream3 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/stream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var stream_1 = require("stream"); + var async_1 = require_async4(); + var StreamProvider = class { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new async_1.default(this._root, this._settings); + this._stream = new stream_1.Readable({ + objectMode: true, + read: () => { + }, + destroy: () => { + if (!this._reader.isDestroyed) { + this._reader.destroy(); + } + } + }); + } + read() { + this._reader.onError((error) => { + this._stream.emit("error", error); + }); + this._reader.onEntry((entry) => { + this._stream.push(entry); + }); + this._reader.onEnd(() => { + this._stream.push(null); + }); + this._reader.read(); + return this._stream; + } + }; + exports2.default = StreamProvider; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.js +var require_sync3 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fsScandir = require_out2(); + var common = require_common4(); + var reader_1 = require_reader(); + var SyncReader = class extends reader_1.default { + constructor() { + super(...arguments); + this._scandir = fsScandir.scandirSync; + this._storage = []; + this._queue = new Set(); + } + read() { + this._pushToQueue(this._root, this._settings.basePath); + this._handleQueue(); + return this._storage; + } + _pushToQueue(directory, base) { + this._queue.add({ directory, base }); + } + _handleQueue() { + for (const item of this._queue.values()) { + this._handleDirectory(item.directory, item.base); + } + } + _handleDirectory(directory, base) { + try { + const entries = this._scandir(directory, this._settings.fsScandirSettings); + for (const entry of entries) { + this._handleEntry(entry, base); + } + } catch (error) { + this._handleError(error); + } + } + _handleError(error) { + if (!common.isFatalError(this._settings, error)) { + return; + } + throw error; + } + _handleEntry(entry, base) { + const fullpath = entry.path; + if (base !== void 0) { + entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + } + if (common.isAppliedFilter(this._settings.entryFilter, entry)) { + this._pushToStorage(entry); + } + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { + this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); + } + } + _pushToStorage(entry) { + this._storage.push(entry); + } + }; + exports2.default = SyncReader; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.js +var require_sync4 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var sync_1 = require_sync3(); + var SyncProvider = class { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new sync_1.default(this._root, this._settings); + } + read() { + return this._reader.read(); + } + }; + exports2.default = SyncProvider; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js +var require_settings3 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path = require("path"); + var fsScandir = require_out2(); + var Settings = class { + constructor(_options = {}) { + this._options = _options; + this.basePath = this._getValue(this._options.basePath, void 0); + this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY); + this.deepFilter = this._getValue(this._options.deepFilter, null); + this.entryFilter = this._getValue(this._options.entryFilter, null); + this.errorFilter = this._getValue(this._options.errorFilter, null); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); + this.fsScandirSettings = new fsScandir.Settings({ + followSymbolicLinks: this._options.followSymbolicLinks, + fs: this._options.fs, + pathSegmentSeparator: this._options.pathSegmentSeparator, + stats: this._options.stats, + throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink + }); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } + }; + exports2.default = Settings; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.js +var require_out3 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Settings = exports2.walkStream = exports2.walkSync = exports2.walk = void 0; + var async_1 = require_async5(); + var stream_1 = require_stream3(); + var sync_1 = require_sync4(); + var settings_1 = require_settings3(); + exports2.Settings = settings_1.default; + function walk(directory, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === "function") { + new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); + return; + } + new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); + } + exports2.walk = walk; + function walkSync(directory, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + const provider = new sync_1.default(directory, settings); + return provider.read(); + } + exports2.walkSync = walkSync; + function walkStream(directory, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + const provider = new stream_1.default(directory, settings); + return provider.read(); + } + exports2.walkStream = walkStream; + function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) { + return settingsOrOptions; + } + return new settings_1.default(settingsOrOptions); + } + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/readers/reader.js +var require_reader2 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/readers/reader.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path = require("path"); + var fsStat = require_out(); + var utils = require_utils5(); + var Reader = class { + constructor(_settings) { + this._settings = _settings; + this._fsStatSettings = new fsStat.Settings({ + followSymbolicLink: this._settings.followSymbolicLinks, + fs: this._settings.fs, + throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks + }); + } + _getFullEntryPath(filepath) { + return path.resolve(this._settings.cwd, filepath); + } + _makeEntry(stats, pattern) { + const entry = { + name: pattern, + path: pattern, + dirent: utils.fs.createDirentFromStats(pattern, stats) + }; + if (this._settings.stats) { + entry.stats = stats; + } + return entry; + } + _isFatalError(error) { + return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors; + } + }; + exports2.default = Reader; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/readers/stream.js +var require_stream4 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/readers/stream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var stream_1 = require("stream"); + var fsStat = require_out(); + var fsWalk = require_out3(); + var reader_1 = require_reader2(); + var ReaderStream = class extends reader_1.default { + constructor() { + super(...arguments); + this._walkStream = fsWalk.walkStream; + this._stat = fsStat.stat; + } + dynamic(root, options) { + return this._walkStream(root, options); + } + static(patterns, options) { + const filepaths = patterns.map(this._getFullEntryPath, this); + const stream = new stream_1.PassThrough({ objectMode: true }); + stream._write = (index, _enc, done) => { + return this._getEntry(filepaths[index], patterns[index], options).then((entry) => { + if (entry !== null && options.entryFilter(entry)) { + stream.push(entry); + } + if (index === filepaths.length - 1) { + stream.end(); + } + done(); + }).catch(done); + }; + for (let i = 0; i < filepaths.length; i++) { + stream.write(i); + } + return stream; + } + _getEntry(filepath, pattern, options) { + return this._getStat(filepath).then((stats) => this._makeEntry(stats, pattern)).catch((error) => { + if (options.errorFilter(error)) { + return null; + } + throw error; + }); + } + _getStat(filepath) { + return new Promise((resolve, reject) => { + this._stat(filepath, this._fsStatSettings, (error, stats) => { + return error === null ? resolve(stats) : reject(error); + }); + }); + } + }; + exports2.default = ReaderStream; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/matchers/matcher.js +var require_matcher = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/matchers/matcher.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var utils = require_utils5(); + var Matcher = class { + constructor(_patterns, _settings, _micromatchOptions) { + this._patterns = _patterns; + this._settings = _settings; + this._micromatchOptions = _micromatchOptions; + this._storage = []; + this._fillStorage(); + } + _fillStorage() { + const patterns = utils.pattern.expandPatternsWithBraceExpansion(this._patterns); + for (const pattern of patterns) { + const segments = this._getPatternSegments(pattern); + const sections = this._splitSegmentsIntoSections(segments); + this._storage.push({ + complete: sections.length <= 1, + pattern, + segments, + sections + }); + } + } + _getPatternSegments(pattern) { + const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions); + return parts.map((part) => { + const dynamic = utils.pattern.isDynamicPattern(part, this._settings); + if (!dynamic) { + return { + dynamic: false, + pattern: part + }; + } + return { + dynamic: true, + pattern: part, + patternRe: utils.pattern.makeRe(part, this._micromatchOptions) + }; + }); + } + _splitSegmentsIntoSections(segments) { + return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern)); + } + }; + exports2.default = Matcher; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/matchers/partial.js +var require_partial = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/matchers/partial.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var matcher_1 = require_matcher(); + var PartialMatcher = class extends matcher_1.default { + match(filepath) { + const parts = filepath.split("/"); + const levels = parts.length; + const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels); + for (const pattern of patterns) { + const section = pattern.sections[0]; + if (!pattern.complete && levels > section.length) { + return true; + } + const match = parts.every((part, index) => { + const segment = pattern.segments[index]; + if (segment.dynamic && segment.patternRe.test(part)) { + return true; + } + if (!segment.dynamic && segment.pattern === part) { + return true; + } + return false; + }); + if (match) { + return true; + } + } + return false; + } + }; + exports2.default = PartialMatcher; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/filters/deep.js +var require_deep = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/filters/deep.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var utils = require_utils5(); + var partial_1 = require_partial(); + var DeepFilter = class { + constructor(_settings, _micromatchOptions) { + this._settings = _settings; + this._micromatchOptions = _micromatchOptions; + } + getFilter(basePath2, positive, negative) { + const matcher = this._getMatcher(positive); + const negativeRe = this._getNegativePatternsRe(negative); + return (entry) => this._filter(basePath2, entry, matcher, negativeRe); + } + _getMatcher(patterns) { + return new partial_1.default(patterns, this._settings, this._micromatchOptions); + } + _getNegativePatternsRe(patterns) { + const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern); + return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions); + } + _filter(basePath2, entry, matcher, negativeRe) { + if (this._isSkippedByDeep(basePath2, entry.path)) { + return false; + } + if (this._isSkippedSymbolicLink(entry)) { + return false; + } + const filepath = utils.path.removeLeadingDotSegment(entry.path); + if (this._isSkippedByPositivePatterns(filepath, matcher)) { + return false; + } + return this._isSkippedByNegativePatterns(filepath, negativeRe); + } + _isSkippedByDeep(basePath2, entryPath) { + if (this._settings.deep === Infinity) { + return false; + } + return this._getEntryLevel(basePath2, entryPath) >= this._settings.deep; + } + _getEntryLevel(basePath2, entryPath) { + const entryPathDepth = entryPath.split("/").length; + if (basePath2 === "") { + return entryPathDepth; + } + const basePathDepth = basePath2.split("/").length; + return entryPathDepth - basePathDepth; + } + _isSkippedSymbolicLink(entry) { + return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink(); + } + _isSkippedByPositivePatterns(entryPath, matcher) { + return !this._settings.baseNameMatch && !matcher.match(entryPath); + } + _isSkippedByNegativePatterns(entryPath, patternsRe) { + return !utils.pattern.matchAny(entryPath, patternsRe); + } + }; + exports2.default = DeepFilter; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/filters/entry.js +var require_entry = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/filters/entry.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var utils = require_utils5(); + var EntryFilter = class { + constructor(_settings, _micromatchOptions) { + this._settings = _settings; + this._micromatchOptions = _micromatchOptions; + this.index = new Map(); + } + getFilter(positive, negative) { + const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions); + const negativeRe = utils.pattern.convertPatternsToRe(negative, this._micromatchOptions); + return (entry) => this._filter(entry, positiveRe, negativeRe); + } + _filter(entry, positiveRe, negativeRe) { + if (this._settings.unique && this._isDuplicateEntry(entry)) { + return false; + } + if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) { + return false; + } + if (this._isSkippedByAbsoluteNegativePatterns(entry.path, negativeRe)) { + return false; + } + const filepath = this._settings.baseNameMatch ? entry.name : entry.path; + const isMatched = this._isMatchToPatterns(filepath, positiveRe) && !this._isMatchToPatterns(entry.path, negativeRe); + if (this._settings.unique && isMatched) { + this._createIndexRecord(entry); + } + return isMatched; + } + _isDuplicateEntry(entry) { + return this.index.has(entry.path); + } + _createIndexRecord(entry) { + this.index.set(entry.path, void 0); + } + _onlyFileFilter(entry) { + return this._settings.onlyFiles && !entry.dirent.isFile(); + } + _onlyDirectoryFilter(entry) { + return this._settings.onlyDirectories && !entry.dirent.isDirectory(); + } + _isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) { + if (!this._settings.absolute) { + return false; + } + const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath); + return utils.pattern.matchAny(fullpath, patternsRe); + } + _isMatchToPatterns(entryPath, patternsRe) { + const filepath = utils.path.removeLeadingDotSegment(entryPath); + return utils.pattern.matchAny(filepath, patternsRe); + } + }; + exports2.default = EntryFilter; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/filters/error.js +var require_error = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/filters/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var utils = require_utils5(); + var ErrorFilter = class { + constructor(_settings) { + this._settings = _settings; + } + getFilter() { + return (error) => this._isNonFatalError(error); + } + _isNonFatalError(error) { + return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors; + } + }; + exports2.default = ErrorFilter; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/transformers/entry.js +var require_entry2 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/transformers/entry.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var utils = require_utils5(); + var EntryTransformer = class { + constructor(_settings) { + this._settings = _settings; + } + getTransformer() { + return (entry) => this._transform(entry); + } + _transform(entry) { + let filepath = entry.path; + if (this._settings.absolute) { + filepath = utils.path.makeAbsolute(this._settings.cwd, filepath); + filepath = utils.path.unixify(filepath); + } + if (this._settings.markDirectories && entry.dirent.isDirectory()) { + filepath += "/"; + } + if (!this._settings.objectMode) { + return filepath; + } + return Object.assign(Object.assign({}, entry), { path: filepath }); + } + }; + exports2.default = EntryTransformer; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/provider.js +var require_provider = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/provider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path = require("path"); + var deep_1 = require_deep(); + var entry_1 = require_entry(); + var error_1 = require_error(); + var entry_2 = require_entry2(); + var Provider = class { + constructor(_settings) { + this._settings = _settings; + this.errorFilter = new error_1.default(this._settings); + this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions()); + this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions()); + this.entryTransformer = new entry_2.default(this._settings); + } + _getRootDirectory(task) { + return path.resolve(this._settings.cwd, task.base); + } + _getReaderOptions(task) { + const basePath2 = task.base === "." ? "" : task.base; + return { + basePath: basePath2, + pathSegmentSeparator: "/", + concurrency: this._settings.concurrency, + deepFilter: this.deepFilter.getFilter(basePath2, task.positive, task.negative), + entryFilter: this.entryFilter.getFilter(task.positive, task.negative), + errorFilter: this.errorFilter.getFilter(), + followSymbolicLinks: this._settings.followSymbolicLinks, + fs: this._settings.fs, + stats: this._settings.stats, + throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink, + transform: this.entryTransformer.getTransformer() + }; + } + _getMicromatchOptions() { + return { + dot: this._settings.dot, + matchBase: this._settings.baseNameMatch, + nobrace: !this._settings.braceExpansion, + nocase: !this._settings.caseSensitiveMatch, + noext: !this._settings.extglob, + noglobstar: !this._settings.globstar, + posix: true, + strictSlashes: false + }; + } + }; + exports2.default = Provider; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/async.js +var require_async6 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/async.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var stream_1 = require_stream4(); + var provider_1 = require_provider(); + var ProviderAsync = class extends provider_1.default { + constructor() { + super(...arguments); + this._reader = new stream_1.default(this._settings); + } + read(task) { + const root = this._getRootDirectory(task); + const options = this._getReaderOptions(task); + const entries = []; + return new Promise((resolve, reject) => { + const stream = this.api(root, task, options); + stream.once("error", reject); + stream.on("data", (entry) => entries.push(options.transform(entry))); + stream.once("end", () => resolve(entries)); + }); + } + api(root, task, options) { + if (task.dynamic) { + return this._reader.dynamic(root, options); + } + return this._reader.static(task.patterns, options); + } + }; + exports2.default = ProviderAsync; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/stream.js +var require_stream5 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/stream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var stream_1 = require("stream"); + var stream_2 = require_stream4(); + var provider_1 = require_provider(); + var ProviderStream = class extends provider_1.default { + constructor() { + super(...arguments); + this._reader = new stream_2.default(this._settings); + } + read(task) { + const root = this._getRootDirectory(task); + const options = this._getReaderOptions(task); + const source = this.api(root, task, options); + const destination = new stream_1.Readable({ objectMode: true, read: () => { + } }); + source.once("error", (error) => destination.emit("error", error)).on("data", (entry) => destination.emit("data", options.transform(entry))).once("end", () => destination.emit("end")); + destination.once("close", () => source.destroy()); + return destination; + } + api(root, task, options) { + if (task.dynamic) { + return this._reader.dynamic(root, options); + } + return this._reader.static(task.patterns, options); + } + }; + exports2.default = ProviderStream; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/readers/sync.js +var require_sync5 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/readers/sync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fsStat = require_out(); + var fsWalk = require_out3(); + var reader_1 = require_reader2(); + var ReaderSync = class extends reader_1.default { + constructor() { + super(...arguments); + this._walkSync = fsWalk.walkSync; + this._statSync = fsStat.statSync; + } + dynamic(root, options) { + return this._walkSync(root, options); + } + static(patterns, options) { + const entries = []; + for (const pattern of patterns) { + const filepath = this._getFullEntryPath(pattern); + const entry = this._getEntry(filepath, pattern, options); + if (entry === null || !options.entryFilter(entry)) { + continue; + } + entries.push(entry); + } + return entries; + } + _getEntry(filepath, pattern, options) { + try { + const stats = this._getStat(filepath); + return this._makeEntry(stats, pattern); + } catch (error) { + if (options.errorFilter(error)) { + return null; + } + throw error; + } + } + _getStat(filepath) { + return this._statSync(filepath, this._fsStatSettings); + } + }; + exports2.default = ReaderSync; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/sync.js +var require_sync6 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/sync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var sync_1 = require_sync5(); + var provider_1 = require_provider(); + var ProviderSync = class extends provider_1.default { + constructor() { + super(...arguments); + this._reader = new sync_1.default(this._settings); + } + read(task) { + const root = this._getRootDirectory(task); + const options = this._getReaderOptions(task); + const entries = this.api(root, task, options); + return entries.map(options.transform); + } + api(root, task, options) { + if (task.dynamic) { + return this._reader.dynamic(root, options); + } + return this._reader.static(task.patterns, options); + } + }; + exports2.default = ProviderSync; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/settings.js +var require_settings4 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/settings.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; + var fs = require("fs"); + var os = require("os"); + var CPU_COUNT = Math.max(os.cpus().length, 1); + exports2.DEFAULT_FILE_SYSTEM_ADAPTER = { + lstat: fs.lstat, + lstatSync: fs.lstatSync, + stat: fs.stat, + statSync: fs.statSync, + readdir: fs.readdir, + readdirSync: fs.readdirSync + }; + var Settings = class { + constructor(_options = {}) { + this._options = _options; + this.absolute = this._getValue(this._options.absolute, false); + this.baseNameMatch = this._getValue(this._options.baseNameMatch, false); + this.braceExpansion = this._getValue(this._options.braceExpansion, true); + this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true); + this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT); + this.cwd = this._getValue(this._options.cwd, process.cwd()); + this.deep = this._getValue(this._options.deep, Infinity); + this.dot = this._getValue(this._options.dot, false); + this.extglob = this._getValue(this._options.extglob, true); + this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true); + this.fs = this._getFileSystemMethods(this._options.fs); + this.globstar = this._getValue(this._options.globstar, true); + this.ignore = this._getValue(this._options.ignore, []); + this.markDirectories = this._getValue(this._options.markDirectories, false); + this.objectMode = this._getValue(this._options.objectMode, false); + this.onlyDirectories = this._getValue(this._options.onlyDirectories, false); + this.onlyFiles = this._getValue(this._options.onlyFiles, true); + this.stats = this._getValue(this._options.stats, false); + this.suppressErrors = this._getValue(this._options.suppressErrors, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false); + this.unique = this._getValue(this._options.unique, true); + if (this.onlyDirectories) { + this.onlyFiles = false; + } + if (this.stats) { + this.objectMode = true; + } + } + _getValue(option, value) { + return option === void 0 ? value : option; + } + _getFileSystemMethods(methods = {}) { + return Object.assign(Object.assign({}, exports2.DEFAULT_FILE_SYSTEM_ADAPTER), methods); + } + }; + exports2.default = Settings; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/index.js +var require_out4 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/index.js"(exports2, module2) { + "use strict"; + var taskManager = require_tasks(); + var async_1 = require_async6(); + var stream_1 = require_stream5(); + var sync_1 = require_sync6(); + var settings_1 = require_settings4(); + var utils = require_utils5(); + async function FastGlob(source, options) { + assertPatternsInput(source); + const works = getWorks(source, async_1.default, options); + const result = await Promise.all(works); + return utils.array.flatten(result); + } + (function(FastGlob2) { + function sync(source, options) { + assertPatternsInput(source); + const works = getWorks(source, sync_1.default, options); + return utils.array.flatten(works); + } + FastGlob2.sync = sync; + function stream(source, options) { + assertPatternsInput(source); + const works = getWorks(source, stream_1.default, options); + return utils.stream.merge(works); + } + FastGlob2.stream = stream; + function generateTasks(source, options) { + assertPatternsInput(source); + const patterns = [].concat(source); + const settings = new settings_1.default(options); + return taskManager.generate(patterns, settings); + } + FastGlob2.generateTasks = generateTasks; + function isDynamicPattern(source, options) { + assertPatternsInput(source); + const settings = new settings_1.default(options); + return utils.pattern.isDynamicPattern(source, settings); + } + FastGlob2.isDynamicPattern = isDynamicPattern; + function escapePath(source) { + assertPatternsInput(source); + return utils.path.escape(source); + } + FastGlob2.escapePath = escapePath; + })(FastGlob || (FastGlob = {})); + function getWorks(source, _Provider, options) { + const patterns = [].concat(source); + const settings = new settings_1.default(options); + const tasks = taskManager.generate(patterns, settings); + const provider = new _Provider(settings); + return tasks.map(provider.read, provider); + } + function assertPatternsInput(input) { + const source = [].concat(input); + const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); + if (!isValidSource) { + throw new TypeError("Patterns must be a string (non empty) or an array of strings"); + } + } + module2.exports = FastGlob; + } +}); + +// ../../node_modules/.pnpm/p-map@2.1.0/node_modules/p-map/index.js +var require_p_map = __commonJS({ + "../../node_modules/.pnpm/p-map@2.1.0/node_modules/p-map/index.js"(exports2, module2) { + "use strict"; + var pMap = (iterable, mapper, options) => new Promise((resolve, reject) => { + options = Object.assign({ + concurrency: Infinity + }, options); + if (typeof mapper !== "function") { + throw new TypeError("Mapper function is required"); + } + const { concurrency } = options; + if (!(typeof concurrency === "number" && concurrency >= 1)) { + throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${concurrency}\` (${typeof concurrency})`); + } + const ret = []; + const iterator = iterable[Symbol.iterator](); + let isRejected = false; + let isIterableDone = false; + let resolvingCount = 0; + let currentIndex = 0; + const next = () => { + if (isRejected) { + return; + } + const nextItem = iterator.next(); + const i = currentIndex; + currentIndex++; + if (nextItem.done) { + isIterableDone = true; + if (resolvingCount === 0) { + resolve(ret); + } + return; + } + resolvingCount++; + Promise.resolve(nextItem.value).then((element) => mapper(element, i)).then((value) => { + ret[i] = value; + resolvingCount--; + next(); + }, (error) => { + isRejected = true; + reject(error); + }); + }; + for (let i = 0; i < concurrency; i++) { + next(); + if (isIterableDone) { + break; + } + } + }); + module2.exports = pMap; + module2.exports.default = pMap; + } +}); + +// ../../node_modules/.pnpm/p-filter@2.1.0/node_modules/p-filter/index.js +var require_p_filter = __commonJS({ + "../../node_modules/.pnpm/p-filter@2.1.0/node_modules/p-filter/index.js"(exports2, module2) { + "use strict"; + var pMap = require_p_map(); + var pFilter = async (iterable, filterer, options) => { + const values = await pMap(iterable, (element, index) => Promise.all([filterer(element, index), element]), options); + return values.filter((value) => Boolean(value[0])).map((value) => value[1]); + }; + module2.exports = pFilter; + module2.exports.default = pFilter; + } +}); + +// ../find-packages/lib/index.js +var require_lib21 = __commonJS({ + "../find-packages/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var read_project_manifest_1 = require_lib19(); + var fast_glob_1 = __importDefault(require_out4()); + var p_filter_1 = __importDefault(require_p_filter()); + var DEFAULT_IGNORE = [ + "**/node_modules/**", + "**/bower_components/**", + "**/test/**", + "**/tests/**" + ]; + async function findPkgs(root, opts) { + var _a; + opts = opts !== null && opts !== void 0 ? opts : {}; + const globOpts = { ...opts, cwd: root, includeRoot: void 0 }; + globOpts.ignore = (_a = opts.ignore) !== null && _a !== void 0 ? _a : DEFAULT_IGNORE; + const patterns = normalizePatterns(opts.patterns != null ? opts.patterns : [".", "**"]); + const paths = await fast_glob_1.default(patterns, globOpts); + if (opts.includeRoot) { + Array.prototype.push.apply(paths, await fast_glob_1.default(normalizePatterns(["."]), globOpts)); + } + return p_filter_1.default(Array.from(new Set(paths.map((manifestPath) => path_1.default.join(root, manifestPath)).sort((path1, path2) => path_1.default.dirname(path1).localeCompare(path_1.default.dirname(path2)))), async (manifestPath) => { + try { + return { + dir: path_1.default.dirname(manifestPath), + ...await read_project_manifest_1.readExactProjectManifest(manifestPath) + }; + } catch (err) { + if (err.code === "ENOENT") { + return null; + } + throw err; + } + }), Boolean); + } + exports2.default = findPkgs; + function normalizePatterns(patterns) { + const normalizedPatterns = []; + for (const pattern of patterns) { + normalizedPatterns.push(pattern.replace(/\/?$/, "/package.json")); + normalizedPatterns.push(pattern.replace(/\/?$/, "/package.json5")); + normalizedPatterns.push(pattern.replace(/\/?$/, "/package.yaml")); + } + return normalizedPatterns; + } + } +}); + +// ../find-workspace-packages/lib/index.js +var require_lib22 = __commonJS({ + "../find-workspace-packages/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.arrayOfWorkspacePackagesToMap = exports2.findWorkspacePackagesNoCheck = void 0; + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var constants_1 = require_lib7(); + var find_packages_1 = __importDefault(require_lib21()); + var read_yaml_file_1 = __importDefault(require_read_yaml_file()); + exports2.default = async (workspaceRoot, opts) => { + const pkgs = await findWorkspacePackagesNoCheck(workspaceRoot, opts); + for (const pkg of pkgs) { + cli_utils_1.packageIsInstallable(pkg.dir, pkg.manifest, opts !== null && opts !== void 0 ? opts : {}); + } + return pkgs; + }; + async function findWorkspacePackagesNoCheck(workspaceRoot, opts) { + var _a; + let patterns = opts === null || opts === void 0 ? void 0 : opts.patterns; + if (patterns == null) { + const packagesManifest = await requirePackagesManifest(workspaceRoot); + patterns = (_a = packagesManifest === null || packagesManifest === void 0 ? void 0 : packagesManifest.packages) !== null && _a !== void 0 ? _a : void 0; + } + const pkgs = await find_packages_1.default(workspaceRoot, { + ignore: [ + "**/node_modules/**", + "**/bower_components/**" + ], + includeRoot: true, + patterns + }); + pkgs.sort((pkg1, pkg2) => pkg1.dir.localeCompare(pkg2.dir)); + return pkgs; + } + exports2.findWorkspacePackagesNoCheck = findWorkspacePackagesNoCheck; + async function requirePackagesManifest(dir) { + try { + return await read_yaml_file_1.default(path_1.default.join(dir, constants_1.WORKSPACE_MANIFEST_FILENAME)); + } catch (err) { + if (err["code"] === "ENOENT") { + return null; + } + throw err; + } + } + function arrayOfWorkspacePackagesToMap(pkgs) { + return pkgs.reduce((acc, pkg) => { + var _a; + if (!pkg.manifest.name) + return acc; + if (!acc[pkg.manifest.name]) { + acc[pkg.manifest.name] = {}; + } + acc[pkg.manifest.name][(_a = pkg.manifest.version) !== null && _a !== void 0 ? _a : "0.0.0"] = pkg; + return acc; + }, {}); + } + exports2.arrayOfWorkspacePackagesToMap = arrayOfWorkspacePackagesToMap; + } +}); + +// ../../node_modules/.pnpm/escape-string-regexp@4.0.0/node_modules/escape-string-regexp/index.js +var require_escape_string_regexp2 = __commonJS({ + "../../node_modules/.pnpm/escape-string-regexp@4.0.0/node_modules/escape-string-regexp/index.js"(exports2, module2) { + "use strict"; + module2.exports = (string) => { + if (typeof string !== "string") { + throw new TypeError("Expected a string"); + } + return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); + }; + } +}); + +// ../matcher/lib/index.js +var require_lib23 = __commonJS({ + "../matcher/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var escape_string_regexp_1 = __importDefault(require_escape_string_regexp2()); + function matcher(patterns) { + if (typeof patterns === "string") + return matcherFromPattern(patterns); + switch (patterns.length) { + case 0: + return () => false; + case 1: + return matcherFromPattern(patterns[0]); + } + const matchArr = patterns.map(matcherFromPattern); + return (input) => matchArr.some((match) => match(input)); + } + exports2.default = matcher; + function matcherFromPattern(pattern) { + if (pattern === "*") { + return () => true; + } + const escapedPattern = escape_string_regexp_1.default(pattern).replace(/\\\*/g, ".*"); + if (escapedPattern === pattern) { + return (input) => input === pattern; + } + const regexp = new RegExp(`^${escapedPattern}$`); + return (input) => regexp.test(input); + } + } +}); + +// ../resolve-workspace-range/lib/index.js +var require_lib24 = __commonJS({ + "../resolve-workspace-range/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var semver_1 = __importDefault(require_semver2()); + function default_1(range, versions) { + if (range === "*" || range === "^" || range === "~") { + return semver_1.default.maxSatisfying(versions, "*", { + includePrerelease: true + }); + } + return semver_1.default.maxSatisfying(versions, range, { + loose: true + }); + } + exports2.default = default_1; + } +}); + +// ../../node_modules/.pnpm/builtins@1.0.3/node_modules/builtins/builtins.json +var require_builtins = __commonJS({ + "../../node_modules/.pnpm/builtins@1.0.3/node_modules/builtins/builtins.json"(exports2, module2) { + module2.exports = [ + "assert", + "buffer", + "child_process", + "cluster", + "console", + "constants", + "crypto", + "dgram", + "dns", + "domain", + "events", + "fs", + "http", + "https", + "module", + "net", + "os", + "path", + "process", + "punycode", + "querystring", + "readline", + "repl", + "stream", + "string_decoder", + "timers", + "tls", + "tty", + "url", + "util", + "v8", + "vm", + "zlib" + ]; + } +}); + +// ../../node_modules/.pnpm/validate-npm-package-name@3.0.0/node_modules/validate-npm-package-name/index.js +var require_validate_npm_package_name = __commonJS({ + "../../node_modules/.pnpm/validate-npm-package-name@3.0.0/node_modules/validate-npm-package-name/index.js"(exports2, module2) { + "use strict"; + var scopedPackagePattern = new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"); + var builtins = require_builtins(); + var blacklist = [ + "node_modules", + "favicon.ico" + ]; + var validate = module2.exports = function(name) { + var warnings = []; + var errors = []; + if (name === null) { + errors.push("name cannot be null"); + return done(warnings, errors); + } + if (name === void 0) { + errors.push("name cannot be undefined"); + return done(warnings, errors); + } + if (typeof name !== "string") { + errors.push("name must be a string"); + return done(warnings, errors); + } + if (!name.length) { + errors.push("name length must be greater than zero"); + } + if (name.match(/^\./)) { + errors.push("name cannot start with a period"); + } + if (name.match(/^_/)) { + errors.push("name cannot start with an underscore"); + } + if (name.trim() !== name) { + errors.push("name cannot contain leading or trailing spaces"); + } + blacklist.forEach(function(blacklistedName) { + if (name.toLowerCase() === blacklistedName) { + errors.push(blacklistedName + " is a blacklisted name"); + } + }); + builtins.forEach(function(builtin) { + if (name.toLowerCase() === builtin) { + warnings.push(builtin + " is a core module name"); + } + }); + if (name.length > 214) { + warnings.push("name can no longer contain more than 214 characters"); + } + if (name.toLowerCase() !== name) { + warnings.push("name can no longer contain capital letters"); + } + if (/[~'!()*]/.test(name.split("/").slice(-1)[0])) { + warnings.push(`name can no longer contain special characters ("~'!()*")`); + } + if (encodeURIComponent(name) !== name) { + var nameMatch = name.match(scopedPackagePattern); + if (nameMatch) { + var user = nameMatch[1]; + var pkg = nameMatch[2]; + if (encodeURIComponent(user) === user && encodeURIComponent(pkg) === pkg) { + return done(warnings, errors); + } + } + errors.push("name can only contain URL-friendly characters"); + } + return done(warnings, errors); + }; + validate.scopedPackagePattern = scopedPackagePattern; + var done = function(warnings, errors) { + var result = { + validForNewPackages: errors.length === 0 && warnings.length === 0, + validForOldPackages: errors.length === 0, + warnings, + errors + }; + if (!result.warnings.length) + delete result.warnings; + if (!result.errors.length) + delete result.errors; + return result; + }; + } +}); + +// ../../node_modules/.pnpm/@zkochan+hosted-git-info@4.0.2/node_modules/@zkochan/hosted-git-info/git-host-info.js +var require_git_host_info = __commonJS({ + "../../node_modules/.pnpm/@zkochan+hosted-git-info@4.0.2/node_modules/@zkochan/hosted-git-info/git-host-info.js"(exports2, module2) { + "use strict"; + var maybeJoin = (...args2) => args2.every((arg) => arg) ? args2.join("") : ""; + var maybeEncode = (arg) => arg ? encodeURIComponent(arg) : ""; + var defaults = { + sshtemplate: ({ domain, user, project, committish }) => `git@${domain}:${user}/${project}.git${maybeJoin("#", committish)}`, + sshurltemplate: ({ domain, user, project, committish }) => `git+ssh://git@${domain}/${user}/${project}.git${maybeJoin("#", committish)}`, + browsetemplate: ({ domain, user, project, committish, treepath }) => `https://${domain}/${user}/${project}${maybeJoin("/", treepath, "/", maybeEncode(committish))}`, + browsefiletemplate: ({ domain, user, project, committish, treepath, path, fragment, hashformat }) => `https://${domain}/${user}/${project}/${treepath}/${maybeEncode(committish || "master")}/${path}${maybeJoin("#", hashformat(fragment || ""))}`, + docstemplate: ({ domain, user, project, treepath, committish }) => `https://${domain}/${user}/${project}${maybeJoin("/", treepath, "/", maybeEncode(committish))}#readme`, + httpstemplate: ({ auth, domain, user, project, committish }) => `git+https://${maybeJoin(auth, "@")}${domain}/${user}/${project}.git${maybeJoin("#", committish)}`, + filetemplate: ({ domain, user, project, committish, path }) => `https://${domain}/${user}/${project}/raw/${maybeEncode(committish) || "master"}/${path}`, + shortcuttemplate: ({ type, user, project, committish }) => `${type}:${user}/${project}${maybeJoin("#", committish)}`, + pathtemplate: ({ user, project, committish }) => `${user}/${project}${maybeJoin("#", committish)}`, + bugstemplate: ({ domain, user, project }) => `https://${domain}/${user}/${project}/issues`, + hashformat: formatHashFragment + }; + var gitHosts = {}; + gitHosts.github = Object.assign({}, defaults, { + protocols: ["git:", "http:", "git+ssh:", "git+https:", "ssh:", "https:"], + domain: "github.com", + treepath: "tree", + filetemplate: ({ auth, user, project, committish, path }) => `https://${maybeJoin(auth, "@")}raw.githubusercontent.com/${user}/${project}/${maybeEncode(committish) || "master"}/${path}`, + gittemplate: ({ auth, domain, user, project, committish }) => `git://${maybeJoin(auth, "@")}${domain}/${user}/${project}.git${maybeJoin("#", committish)}`, + tarballtemplate: ({ domain, user, project, committish }) => `https://codeload.${domain}/${user}/${project}/tar.gz/${maybeEncode(committish) || "master"}`, + extract: (url) => { + let [, user, project, type, committish] = url.pathname.split("/", 5); + if (type && type !== "tree") { + return; + } + if (!type) { + committish = url.hash.slice(1); + } + if (project && project.endsWith(".git")) { + project = project.slice(0, -4); + } + if (!user || !project) { + return; + } + return { user, project, committish }; + } + }); + gitHosts.bitbucket = Object.assign({}, defaults, { + protocols: ["git+ssh:", "git+https:", "ssh:", "https:"], + domain: "bitbucket.org", + treepath: "src", + tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/get/${maybeEncode(committish) || "master"}.tar.gz`, + extract: (url) => { + let [, user, project, aux] = url.pathname.split("/", 4); + if (["get"].includes(aux)) { + return; + } + if (project && project.endsWith(".git")) { + project = project.slice(0, -4); + } + if (!user || !project) { + return; + } + return { user, project, committish: url.hash.slice(1) }; + } + }); + gitHosts.gitlab = Object.assign({}, defaults, { + protocols: ["git+ssh:", "git+https:", "ssh:", "https:"], + domain: "gitlab.com", + treepath: "tree", + httpstemplate: ({ auth, domain, user, project, committish }) => `git+https://${maybeJoin(auth, "@")}${domain}/${user}/${project}.git${maybeJoin("#", committish)}`, + tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/api/v4/projects/${user}%2F${project}/repository/archive.tar.gz?ref=${maybeEncode(committish) || "master"}`, + extract: (url) => { + const path = url.pathname.slice(1); + if (path.includes("/-/") || path.includes("/archive.tar.gz")) { + return; + } + const segments = path.split("/"); + let project = segments.pop(); + if (project.endsWith(".git")) { + project = project.slice(0, -4); + } + const user = segments.join("/"); + if (!user || !project) { + return; + } + return { user, project, committish: url.hash.slice(1) }; + } + }); + gitHosts.gist = Object.assign({}, defaults, { + protocols: ["git:", "git+ssh:", "git+https:", "ssh:", "https:"], + domain: "gist.github.com", + sshtemplate: ({ domain, project, committish }) => `git@${domain}:${project}.git${maybeJoin("#", committish)}`, + sshurltemplate: ({ domain, project, committish }) => `git+ssh://git@${domain}/${project}.git${maybeJoin("#", committish)}`, + browsetemplate: ({ domain, project, committish }) => `https://${domain}/${project}${maybeJoin("/", maybeEncode(committish))}`, + browsefiletemplate: ({ domain, project, committish, path, hashformat }) => `https://${domain}/${project}${maybeJoin("/", maybeEncode(committish))}${maybeJoin("#", hashformat(path))}`, + docstemplate: ({ domain, project, committish }) => `https://${domain}/${project}${maybeJoin("/", maybeEncode(committish))}`, + httpstemplate: ({ domain, project, committish }) => `git+https://${domain}/${project}.git${maybeJoin("#", committish)}`, + filetemplate: ({ user, project, committish, path }) => `https://gist.githubusercontent.com/${user}/${project}/raw${maybeJoin("/", maybeEncode(committish))}/${path}`, + shortcuttemplate: ({ type, project, committish }) => `${type}:${project}${maybeJoin("#", committish)}`, + pathtemplate: ({ project, committish }) => `${project}${maybeJoin("#", committish)}`, + bugstemplate: ({ domain, project }) => `https://${domain}/${project}`, + gittemplate: ({ domain, project, committish }) => `git://${domain}/${project}.git${maybeJoin("#", committish)}`, + tarballtemplate: ({ project, committish }) => `https://codeload.github.com/gist/${project}/tar.gz/${maybeEncode(committish) || "master"}`, + extract: (url) => { + let [, user, project, aux] = url.pathname.split("/", 4); + if (aux === "raw") { + return; + } + if (!project) { + if (!user) { + return; + } + project = user; + user = null; + } + if (project.endsWith(".git")) { + project = project.slice(0, -4); + } + return { user, project, committish: url.hash.slice(1) }; + }, + hashformat: function(fragment) { + return fragment && "file-" + formatHashFragment(fragment); + } + }); + var names = Object.keys(gitHosts); + gitHosts.byShortcut = {}; + gitHosts.byDomain = {}; + for (const name of names) { + gitHosts.byShortcut[`${name}:`] = name; + gitHosts.byDomain[gitHosts[name].domain] = name; + } + function formatHashFragment(fragment) { + return fragment.toLowerCase().replace(/^\W+|\/|\W+$/g, "").replace(/\W+/g, "-"); + } + module2.exports = gitHosts; + } +}); + +// ../../node_modules/.pnpm/@zkochan+hosted-git-info@4.0.2/node_modules/@zkochan/hosted-git-info/git-host.js +var require_git_host = __commonJS({ + "../../node_modules/.pnpm/@zkochan+hosted-git-info@4.0.2/node_modules/@zkochan/hosted-git-info/git-host.js"(exports2, module2) { + "use strict"; + var gitHosts = require_git_host_info(); + var GitHost = class { + constructor(type, user, auth, project, committish, defaultRepresentation, opts = {}) { + Object.assign(this, gitHosts[type]); + this.type = type; + this.user = user; + this.auth = auth; + this.project = project; + this.committish = committish; + this.default = defaultRepresentation; + this.opts = opts; + } + hash() { + return this.committish ? `#${this.committish}` : ""; + } + ssh(opts) { + return this._fill(this.sshtemplate, opts); + } + _fill(template, opts) { + if (typeof template === "function") { + const options = { ...this, ...this.opts, ...opts }; + if (!options.path) { + options.path = ""; + } + if (options.path.startsWith("/")) { + options.path = options.path.slice(1); + } + if (options.noCommittish) { + options.committish = null; + } + const result = template(options); + return options.noGitPlus && result.startsWith("git+") ? result.slice(4) : result; + } + return null; + } + sshurl(opts) { + return this._fill(this.sshurltemplate, opts); + } + browse(path, fragment, opts) { + if (typeof path !== "string") { + return this._fill(this.browsetemplate, path); + } + if (typeof fragment !== "string") { + opts = fragment; + fragment = null; + } + return this._fill(this.browsefiletemplate, { ...opts, fragment, path }); + } + docs(opts) { + return this._fill(this.docstemplate, opts); + } + bugs(opts) { + return this._fill(this.bugstemplate, opts); + } + https(opts) { + return this._fill(this.httpstemplate, opts); + } + git(opts) { + return this._fill(this.gittemplate, opts); + } + shortcut(opts) { + return this._fill(this.shortcuttemplate, opts); + } + path(opts) { + return this._fill(this.pathtemplate, opts); + } + tarball(opts) { + return this._fill(this.tarballtemplate, { ...opts, noCommittish: false }); + } + file(path, opts) { + return this._fill(this.filetemplate, { ...opts, path }); + } + getDefaultRepresentation() { + return this.default; + } + toString(opts) { + if (this.default && typeof this[this.default] === "function") { + return this[this.default](opts); + } + return this.sshurl(opts); + } + }; + module2.exports = GitHost; + } +}); + +// ../../node_modules/.pnpm/@zkochan+hosted-git-info@4.0.2/node_modules/@zkochan/hosted-git-info/index.js +var require_hosted_git_info = __commonJS({ + "../../node_modules/.pnpm/@zkochan+hosted-git-info@4.0.2/node_modules/@zkochan/hosted-git-info/index.js"(exports2, module2) { + "use strict"; + var url = require("url"); + var gitHosts = require_git_host_info(); + var GitHost = module2.exports = require_git_host(); + var LRU = require_lru_cache(); + var cache = new LRU({ max: 1e3 }); + var protocolToRepresentationMap = { + "git+ssh:": "sshurl", + "git+https:": "https", + "ssh:": "sshurl", + "git:": "git" + }; + function protocolToRepresentation(protocol) { + return protocolToRepresentationMap[protocol] || protocol.slice(0, -1); + } + var authProtocols = { + "git:": true, + "https:": true, + "git+https:": true, + "http:": true, + "git+http:": true + }; + var knownProtocols = Object.keys(gitHosts.byShortcut).concat(["http:", "https:", "git:", "git+ssh:", "git+https:", "ssh:"]); + module2.exports.fromUrl = function(giturl, opts) { + if (typeof giturl !== "string") { + return; + } + const key = giturl + JSON.stringify(opts || {}); + if (!cache.has(key)) { + cache.set(key, fromUrl(giturl, opts)); + } + return cache.get(key); + }; + function fromUrl(giturl, opts) { + if (!giturl) { + return; + } + const url2 = isGitHubShorthand(giturl) ? "github:" + giturl : correctProtocol(giturl); + const parsed = parseGitUrl(url2); + if (!parsed) { + return parsed; + } + const gitHostShortcut = gitHosts.byShortcut[parsed.protocol]; + const gitHostDomain = gitHosts.byDomain[parsed.hostname.startsWith("www.") ? parsed.hostname.slice(4) : parsed.hostname]; + const gitHostName = gitHostShortcut || gitHostDomain; + if (!gitHostName) { + return; + } + const gitHostInfo = gitHosts[gitHostShortcut || gitHostDomain]; + let auth = null; + if (authProtocols[parsed.protocol] && (parsed.username || parsed.password)) { + auth = `${parsed.username}${parsed.password ? ":" + parsed.password : ""}`; + } + let committish = null; + let user = null; + let project = null; + let defaultRepresentation = null; + try { + if (gitHostShortcut) { + let pathname = parsed.pathname.startsWith("/") ? parsed.pathname.slice(1) : parsed.pathname; + const firstAt = pathname.indexOf("@"); + if (firstAt > -1) { + pathname = pathname.slice(firstAt + 1); + } + const lastSlash = pathname.lastIndexOf("/"); + if (lastSlash > -1) { + user = decodeURIComponent(pathname.slice(0, lastSlash)); + if (!user) { + user = null; + } + project = decodeURIComponent(pathname.slice(lastSlash + 1)); + } else { + project = decodeURIComponent(pathname); + } + if (project.endsWith(".git")) { + project = project.slice(0, -4); + } + if (parsed.hash) { + committish = decodeURIComponent(parsed.hash.slice(1)); + } + defaultRepresentation = "shortcut"; + } else { + if (!gitHostInfo.protocols.includes(parsed.protocol)) { + return; + } + const segments = gitHostInfo.extract(parsed); + if (!segments) { + return; + } + user = segments.user && decodeURIComponent(segments.user); + project = decodeURIComponent(segments.project); + committish = decodeURIComponent(segments.committish); + defaultRepresentation = protocolToRepresentation(parsed.protocol); + } + } catch (err) { + if (err instanceof URIError) { + return; + } else { + throw err; + } + } + return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation, opts); + } + var correctProtocol = (arg) => { + const firstColon = arg.indexOf(":"); + const proto = arg.slice(0, firstColon + 1); + if (knownProtocols.includes(proto)) { + return arg; + } + const firstAt = arg.indexOf("@"); + if (firstAt > -1) { + if (firstAt > firstColon) { + return `git+ssh://${arg}`; + } else { + return arg; + } + } + const doubleSlash = arg.indexOf("//"); + if (doubleSlash === firstColon + 1) { + return arg; + } + return arg.slice(0, firstColon + 1) + "//" + arg.slice(firstColon + 1); + }; + var isGitHubShorthand = (arg) => { + const firstHash = arg.indexOf("#"); + const firstSlash = arg.indexOf("/"); + const secondSlash = arg.indexOf("/", firstSlash + 1); + const firstColon = arg.indexOf(":"); + const firstSpace = /\s/.exec(arg); + const firstAt = arg.indexOf("@"); + const spaceOnlyAfterHash = !firstSpace || firstHash > -1 && firstSpace.index > firstHash; + const atOnlyAfterHash = firstAt === -1 || firstHash > -1 && firstAt > firstHash; + const colonOnlyAfterHash = firstColon === -1 || firstHash > -1 && firstColon > firstHash; + const secondSlashOnlyAfterHash = secondSlash === -1 || firstHash > -1 && secondSlash > firstHash; + const hasSlash = firstSlash > 0; + const doesNotEndWithSlash = firstHash > -1 ? arg[firstHash - 1] !== "/" : !arg.endsWith("/"); + const doesNotStartWithDot = !arg.startsWith("."); + return spaceOnlyAfterHash && hasSlash && doesNotEndWithSlash && doesNotStartWithDot && atOnlyAfterHash && colonOnlyAfterHash && secondSlashOnlyAfterHash; + }; + var correctUrl = (giturl) => { + const firstAt = giturl.indexOf("@"); + const lastHash = giturl.lastIndexOf("#"); + let firstColon = giturl.indexOf(":"); + let lastColon = giturl.lastIndexOf(":", lastHash > -1 ? lastHash : Infinity); + let corrected; + if (lastColon > firstAt) { + corrected = giturl.slice(0, lastColon) + "/" + giturl.slice(lastColon + 1); + firstColon = corrected.indexOf(":"); + lastColon = corrected.lastIndexOf(":"); + } + if (firstColon === -1 && giturl.indexOf("//") === -1) { + corrected = `git+ssh://${corrected}`; + } + return corrected; + }; + var parseGitUrl = (giturl) => { + let result; + try { + result = new url.URL(giturl); + } catch (err) { + } + if (result) { + return result; + } + const correctedUrl = correctUrl(giturl); + try { + result = new url.URL(correctedUrl); + } catch (err) { + } + return result; + }; + } +}); + +// ../../node_modules/.pnpm/@zkochan+npm-package-arg@2.0.1/node_modules/@zkochan/npm-package-arg/npa.js +var require_npa = __commonJS({ + "../../node_modules/.pnpm/@zkochan+npm-package-arg@2.0.1/node_modules/@zkochan/npm-package-arg/npa.js"(exports2, module2) { + "use strict"; + module2.exports = npa; + module2.exports.resolve = resolve; + module2.exports.Result = Result; + var url; + var HostedGit; + var semver; + var path; + var validatePackageName; + var os; + var isWindows = process.platform === "win32" || global.FAKE_WINDOWS; + var hasSlashes = isWindows ? /\\|[/]/ : /[/]/; + var isURL = /^(?:git[+])?[a-z]+:/i; + var isFilename = /[.](?:tgz|tar.gz|tar)$/i; + function npa(arg, where) { + let name; + let spec; + if (typeof arg === "object") { + if (arg instanceof Result && (!where || where === arg.where)) { + return arg; + } else if (arg.name && arg.rawSpec) { + return npa.resolve(arg.name, arg.rawSpec, where || arg.where); + } else { + return npa(arg.raw, where || arg.where); + } + } + const nameEndsAt = arg[0] === "@" ? arg.slice(1).indexOf("@") + 1 : arg.indexOf("@"); + const namePart = nameEndsAt > 0 ? arg.slice(0, nameEndsAt) : arg; + if (isURL.test(arg)) { + spec = arg; + } else if (namePart[0] !== "@" && (hasSlashes.test(namePart) || isFilename.test(namePart))) { + spec = arg; + } else if (nameEndsAt > 0) { + name = namePart; + spec = arg.slice(nameEndsAt + 1); + } else { + if (!validatePackageName) + validatePackageName = require_validate_npm_package_name(); + const valid = validatePackageName(arg); + if (valid.validForOldPackages) { + name = arg; + } else { + spec = arg; + } + } + return resolve(name, spec, where, arg); + } + var isFilespec = isWindows ? /^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/ : /^(?:[.]|~[/]|[/]|[a-zA-Z]:)/; + function resolve(name, spec, where, arg) { + const res = new Result({ + raw: arg, + name, + rawSpec: spec, + fromArgument: arg != null + }); + if (name) + res.setName(name); + if (spec && (isFilespec.test(spec) || /^file:/i.test(spec))) { + return fromFile(res, where); + } + if (spec && spec.startsWith("npm:")) { + return Object.assign(npa(spec.substr(4), where), { + alias: name, + raw: res.raw, + rawSpec: res.rawSpec + }); + } + if (!HostedGit) + HostedGit = require_hosted_git_info(); + const hosted = HostedGit.fromUrl(spec, { noGitPlus: true, noCommittish: true }); + if (hosted) { + return fromHostedGit(res, hosted); + } else if (spec && isURL.test(spec)) { + return fromURL(res); + } else if (spec && (hasSlashes.test(spec) || isFilename.test(spec))) { + return fromFile(res, where); + } else { + return fromRegistry(res); + } + } + function invalidPackageName(name, valid) { + const err = new Error(`Invalid package name "${name}": ${valid.errors.join("; ")}`); + err.code = "EINVALIDPACKAGENAME"; + return err; + } + function invalidTagName(name) { + const err = new Error(`Invalid tag name "${name}": Tags may not have any characters that encodeURIComponent encodes.`); + err.code = "EINVALIDTAGNAME"; + return err; + } + function Result(opts) { + this.type = opts.type; + this.registry = opts.registry; + this.where = opts.where; + if (opts.raw == null) { + this.raw = opts.name ? opts.name + "@" + opts.rawSpec : opts.rawSpec; + } else { + this.raw = opts.raw; + } + this.name = void 0; + this.escapedName = void 0; + this.scope = void 0; + this.rawSpec = opts.rawSpec == null ? "" : opts.rawSpec; + this.saveSpec = opts.saveSpec; + this.fetchSpec = opts.fetchSpec; + if (opts.name) + this.setName(opts.name); + this.gitRange = opts.gitRange; + this.gitCommittish = opts.gitCommittish; + this.hosted = opts.hosted; + } + Result.prototype = {}; + Result.prototype.setName = function(name) { + if (!validatePackageName) + validatePackageName = require_validate_npm_package_name(); + const valid = validatePackageName(name); + if (!valid.validForOldPackages) { + throw invalidPackageName(name, valid); + } + this.name = name; + this.scope = name[0] === "@" ? name.slice(0, name.indexOf("/")) : void 0; + this.escapedName = name.replace("/", "%2f"); + return this; + }; + Result.prototype.toString = function() { + const full = []; + if (this.name != null && this.name !== "") + full.push(this.name); + const spec = this.saveSpec || this.fetchSpec || this.rawSpec; + if (spec != null && spec !== "") + full.push(spec); + return full.length ? full.join("@") : this.raw; + }; + Result.prototype.toJSON = function() { + const result = Object.assign({}, this); + delete result.hosted; + return result; + }; + function setGitCommittish(res, committish) { + if (committish != null && committish.length >= 7 && committish.slice(0, 7) === "semver:") { + res.gitRange = decodeURIComponent(committish.slice(7)); + res.gitCommittish = null; + } else { + res.gitCommittish = committish === "" ? null : committish; + } + return res; + } + var isAbsolutePath = /^[/]|^[A-Za-z]:/; + function resolvePath(where, spec) { + if (isAbsolutePath.test(spec)) + return spec; + if (!path) + path = require("path"); + return path.resolve(where, spec); + } + function isAbsolute(dir) { + if (dir[0] === "/") + return true; + if (/^[A-Za-z]:/.test(dir)) + return true; + return false; + } + function fromFile(res, where) { + if (!where) + where = process.cwd(); + res.type = isFilename.test(res.rawSpec) ? "file" : "directory"; + res.where = where; + const spec = res.rawSpec.replace(/\\/g, "/").replace(/^file:[/]*([A-Za-z]:)/, "$1").replace(/^file:(?:[/]*([~./]))?/, "$1"); + if (/^~[/]/.test(spec)) { + if (!os) + os = require("os"); + res.fetchSpec = resolvePath(os.homedir(), spec.slice(2)); + res.saveSpec = "file:" + spec; + } else { + res.fetchSpec = resolvePath(where, spec); + if (isAbsolute(spec)) { + res.saveSpec = "file:" + spec; + } else { + if (!path) + path = require("path"); + res.saveSpec = "file:" + path.relative(where, res.fetchSpec); + } + } + return res; + } + function fromHostedGit(res, hosted) { + res.type = "git"; + res.hosted = hosted; + res.saveSpec = hosted.toString({ noGitPlus: false, noCommittish: false }); + res.fetchSpec = hosted.getDefaultRepresentation() === "shortcut" ? null : hosted.toString(); + return setGitCommittish(res, hosted.committish); + } + function unsupportedURLType(protocol, spec) { + const err = new Error(`Unsupported URL Type "${protocol}": ${spec}`); + err.code = "EUNSUPPORTEDPROTOCOL"; + return err; + } + function matchGitScp(spec) { + const matched = spec.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i); + return matched && !matched[1].match(/:[0-9]+\/?.*$/i) && { + fetchSpec: matched[1], + gitCommittish: matched[2] == null ? null : matched[2] + }; + } + function fromURL(res) { + if (!url) + url = require("url"); + const urlparse = url.parse(res.rawSpec); + res.saveSpec = res.rawSpec; + switch (urlparse.protocol) { + case "git:": + case "git+http:": + case "git+https:": + case "git+rsync:": + case "git+ftp:": + case "git+file:": + case "git+ssh:": { + res.type = "git"; + const match = urlparse.protocol === "git+ssh:" && matchGitScp(res.rawSpec); + if (match) { + res.fetchSpec = match.fetchSpec; + res.gitCommittish = match.gitCommittish; + } else { + setGitCommittish(res, urlparse.hash != null ? urlparse.hash.slice(1) : ""); + urlparse.protocol = urlparse.protocol.replace(/^git[+]/, ""); + delete urlparse.hash; + res.fetchSpec = url.format(urlparse); + } + break; + } + case "http:": + case "https:": + res.type = "remote"; + res.fetchSpec = res.saveSpec; + break; + default: + throw unsupportedURLType(urlparse.protocol, res.rawSpec); + } + return res; + } + function fromRegistry(res) { + res.registry = true; + const spec = res.rawSpec === "" ? "latest" : res.rawSpec; + res.saveSpec = null; + res.fetchSpec = spec; + if (!semver) + semver = require_semver2(); + const version = semver.valid(spec, true); + const range = semver.validRange(spec, true); + if (version) { + res.type = "version"; + } else if (range) { + res.type = "range"; + } else { + if (encodeURIComponent(spec) !== spec) { + throw invalidTagName(spec); + } + res.type = "tag"; + } + return res; + } + } +}); + +// ../pkgs-graph/lib/index.js +var require_lib25 = __commonJS({ + "../pkgs-graph/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var resolve_workspace_range_1 = __importDefault(require_lib24()); + var npm_package_arg_1 = __importDefault(require_npa()); + function default_1(pkgs, opts) { + const pkgMap = createPkgMap(pkgs); + const unmatched = []; + const graph = Object.keys(pkgMap).reduce((acc, pkgSpec) => { + acc[pkgSpec] = { + dependencies: createNode(pkgMap[pkgSpec]), + package: pkgMap[pkgSpec] + }; + return acc; + }, {}); + return { graph, unmatched }; + function createNode(pkg) { + const dependencies = { + ...!(opts === null || opts === void 0 ? void 0 : opts.ignoreDevDeps) && pkg.manifest.devDependencies, + ...pkg.manifest.optionalDependencies, + ...pkg.manifest.dependencies + }; + return Object.keys(dependencies).map((depName) => { + let spec; + let rawSpec = dependencies[depName]; + const isWorkspaceSpec = rawSpec.startsWith("workspace:"); + try { + if (isWorkspaceSpec) { + rawSpec = rawSpec.substr(10); + if (rawSpec === "^" || rawSpec === "~") { + rawSpec = "*"; + } + ; + } + spec = npm_package_arg_1.default.resolve(depName, rawSpec, pkg.dir); + } catch (err) { + return ""; + } + if (spec.type === "directory") { + const matchedPkg2 = Object.values(pkgMap).find((pkg2) => path_1.default.relative(pkg2.dir, spec.fetchSpec) === ""); + if (matchedPkg2 == null) { + return ""; + } + return matchedPkg2.dir; + } + if (spec.type !== "version" && spec.type !== "range") + return ""; + const pkgs2 = Object.values(pkgMap).filter((pkg2) => pkg2.manifest.name === depName); + if (pkgs2.length === 0) + return ""; + const versions = pkgs2.filter(({ manifest }) => manifest.version).map((pkg2) => pkg2.manifest.version); + const strictWorkspaceMatching = (opts === null || opts === void 0 ? void 0 : opts.linkWorkspacePackages) === false && !isWorkspaceSpec; + if (strictWorkspaceMatching) { + unmatched.push({ pkgName: depName, range: rawSpec }); + return ""; + } + if (versions.includes(rawSpec)) { + const matchedPkg2 = pkgs2.find((pkg2) => pkg2.manifest.name === depName && pkg2.manifest.version === rawSpec); + return matchedPkg2.dir; + } + const matched = resolve_workspace_range_1.default(rawSpec, versions); + if (!matched) { + unmatched.push({ pkgName: depName, range: rawSpec }); + return ""; + } + const matchedPkg = pkgs2.find((pkg2) => pkg2.manifest.name === depName && pkg2.manifest.version === matched); + return matchedPkg.dir; + }).filter(Boolean); + } + } + exports2.default = default_1; + function createPkgMap(pkgs) { + const pkgMap = {}; + for (const pkg of pkgs) { + pkgMap[pkg.dir] = pkg; + } + return pkgMap; + } + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isArray.js +var require_isArray = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isArray.js"(exports2, module2) { + module2.exports = Array.isArray || function _isArray(val) { + return val != null && val.length >= 0 && Object.prototype.toString.call(val) === "[object Array]"; + }; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isTransformer.js +var require_isTransformer = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isTransformer.js"(exports2, module2) { + function _isTransformer(obj) { + return obj != null && typeof obj["@@transducer/step"] === "function"; + } + module2.exports = _isTransformer; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_dispatchable.js +var require_dispatchable = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_dispatchable.js"(exports2, module2) { + var _isArray = require_isArray(); + var _isTransformer = require_isTransformer(); + function _dispatchable(methodNames, xf, fn2) { + return function() { + if (arguments.length === 0) { + return fn2(); + } + var args2 = Array.prototype.slice.call(arguments, 0); + var obj = args2.pop(); + if (!_isArray(obj)) { + var idx = 0; + while (idx < methodNames.length) { + if (typeof obj[methodNames[idx]] === "function") { + return obj[methodNames[idx]].apply(obj, args2); + } + idx += 1; + } + if (_isTransformer(obj)) { + var transducer = xf.apply(null, args2); + return transducer(obj); + } + } + return fn2.apply(this, arguments); + }; + } + module2.exports = _dispatchable; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_filter.js +var require_filter2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_filter.js"(exports2, module2) { + function _filter(fn2, list) { + var idx = 0; + var len = list.length; + var result = []; + while (idx < len) { + if (fn2(list[idx])) { + result[result.length] = list[idx]; + } + idx += 1; + } + return result; + } + module2.exports = _filter; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isObject.js +var require_isObject = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isObject.js"(exports2, module2) { + function _isObject(x) { + return Object.prototype.toString.call(x) === "[object Object]"; + } + module2.exports = _isObject; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isString.js +var require_isString = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isString.js"(exports2, module2) { + function _isString(x) { + return Object.prototype.toString.call(x) === "[object String]"; + } + module2.exports = _isString; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isArrayLike.js +var require_isArrayLike2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isArrayLike.js"(exports2, module2) { + var _curry1 = require_curry1(); + var _isArray = require_isArray(); + var _isString = require_isString(); + var _isArrayLike = /* @__PURE__ */ _curry1(function isArrayLike(x) { + if (_isArray(x)) { + return true; + } + if (!x) { + return false; + } + if (typeof x !== "object") { + return false; + } + if (_isString(x)) { + return false; + } + if (x.nodeType === 1) { + return !!x.length; + } + if (x.length === 0) { + return true; + } + if (x.length > 0) { + return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1); + } + return false; + }); + module2.exports = _isArrayLike; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xwrap.js +var require_xwrap = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xwrap.js"(exports2, module2) { + var XWrap = /* @__PURE__ */ function() { + function XWrap2(fn2) { + this.f = fn2; + } + XWrap2.prototype["@@transducer/init"] = function() { + throw new Error("init not implemented on XWrap"); + }; + XWrap2.prototype["@@transducer/result"] = function(acc) { + return acc; + }; + XWrap2.prototype["@@transducer/step"] = function(acc, x) { + return this.f(acc, x); + }; + return XWrap2; + }(); + function _xwrap(fn2) { + return new XWrap(fn2); + } + module2.exports = _xwrap; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_arity.js +var require_arity = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_arity.js"(exports2, module2) { + function _arity(n, fn2) { + switch (n) { + case 0: + return function() { + return fn2.apply(this, arguments); + }; + case 1: + return function(a0) { + return fn2.apply(this, arguments); + }; + case 2: + return function(a0, a1) { + return fn2.apply(this, arguments); + }; + case 3: + return function(a0, a1, a2) { + return fn2.apply(this, arguments); + }; + case 4: + return function(a0, a1, a2, a3) { + return fn2.apply(this, arguments); + }; + case 5: + return function(a0, a1, a2, a3, a4) { + return fn2.apply(this, arguments); + }; + case 6: + return function(a0, a1, a2, a3, a4, a5) { + return fn2.apply(this, arguments); + }; + case 7: + return function(a0, a1, a2, a3, a4, a5, a6) { + return fn2.apply(this, arguments); + }; + case 8: + return function(a0, a1, a2, a3, a4, a5, a6, a7) { + return fn2.apply(this, arguments); + }; + case 9: + return function(a0, a1, a2, a3, a4, a5, a6, a7, a8) { + return fn2.apply(this, arguments); + }; + case 10: + return function(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { + return fn2.apply(this, arguments); + }; + default: + throw new Error("First argument to _arity must be a non-negative integer no greater than ten"); + } + } + module2.exports = _arity; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/bind.js +var require_bind = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/bind.js"(exports2, module2) { + var _arity = require_arity(); + var _curry2 = require_curry2(); + var bind = /* @__PURE__ */ _curry2(function bind2(fn2, thisObj) { + return _arity(fn2.length, function() { + return fn2.apply(thisObj, arguments); + }); + }); + module2.exports = bind; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_reduce.js +var require_reduce2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_reduce.js"(exports2, module2) { + var _isArrayLike = require_isArrayLike2(); + var _xwrap = require_xwrap(); + var bind = require_bind(); + function _arrayReduce(xf, acc, list) { + var idx = 0; + var len = list.length; + while (idx < len) { + acc = xf["@@transducer/step"](acc, list[idx]); + if (acc && acc["@@transducer/reduced"]) { + acc = acc["@@transducer/value"]; + break; + } + idx += 1; + } + return xf["@@transducer/result"](acc); + } + function _iterableReduce(xf, acc, iter) { + var step = iter.next(); + while (!step.done) { + acc = xf["@@transducer/step"](acc, step.value); + if (acc && acc["@@transducer/reduced"]) { + acc = acc["@@transducer/value"]; + break; + } + step = iter.next(); + } + return xf["@@transducer/result"](acc); + } + function _methodReduce(xf, acc, obj, methodName) { + return xf["@@transducer/result"](obj[methodName](bind(xf["@@transducer/step"], xf), acc)); + } + var symIterator = typeof Symbol !== "undefined" ? Symbol.iterator : "@@iterator"; + function _reduce(fn2, acc, list) { + if (typeof fn2 === "function") { + fn2 = _xwrap(fn2); + } + if (_isArrayLike(list)) { + return _arrayReduce(fn2, acc, list); + } + if (typeof list["fantasy-land/reduce"] === "function") { + return _methodReduce(fn2, acc, list, "fantasy-land/reduce"); + } + if (list[symIterator] != null) { + return _iterableReduce(fn2, acc, list[symIterator]()); + } + if (typeof list.next === "function") { + return _iterableReduce(fn2, acc, list); + } + if (typeof list.reduce === "function") { + return _methodReduce(fn2, acc, list, "reduce"); + } + throw new TypeError("reduce: list must be array or iterable"); + } + module2.exports = _reduce; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xfBase.js +var require_xfBase = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xfBase.js"(exports2, module2) { + module2.exports = { + init: function() { + return this.xf["@@transducer/init"](); + }, + result: function(result) { + return this.xf["@@transducer/result"](result); + } + }; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xfilter.js +var require_xfilter = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xfilter.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _xfBase = require_xfBase(); + var XFilter = /* @__PURE__ */ function() { + function XFilter2(f, xf) { + this.xf = xf; + this.f = f; + } + XFilter2.prototype["@@transducer/init"] = _xfBase.init; + XFilter2.prototype["@@transducer/result"] = _xfBase.result; + XFilter2.prototype["@@transducer/step"] = function(result, input) { + return this.f(input) ? this.xf["@@transducer/step"](result, input) : result; + }; + return XFilter2; + }(); + var _xfilter = /* @__PURE__ */ _curry2(function _xfilter2(f, xf) { + return new XFilter(f, xf); + }); + module2.exports = _xfilter; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/filter.js +var require_filter3 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/filter.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _dispatchable = require_dispatchable(); + var _filter = require_filter2(); + var _isObject = require_isObject(); + var _reduce = require_reduce2(); + var _xfilter = require_xfilter(); + var keys = require_keys(); + var filter = /* @__PURE__ */ _curry2(/* @__PURE__ */ _dispatchable(["filter"], _xfilter, function(pred, filterable) { + return _isObject(filterable) ? _reduce(function(acc, key) { + if (pred(filterable[key])) { + acc[key] = filterable[key]; + } + return acc; + }, {}, keys(filterable)) : _filter(pred, filterable); + })); + module2.exports = filter; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_map.js +var require_map3 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_map.js"(exports2, module2) { + function _map(fn2, functor) { + var idx = 0; + var len = functor.length; + var result = Array(len); + while (idx < len) { + result[idx] = fn2(functor[idx]); + idx += 1; + } + return result; + } + module2.exports = _map; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_curryN.js +var require_curryN = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_curryN.js"(exports2, module2) { + var _arity = require_arity(); + var _isPlaceholder = require_isPlaceholder(); + function _curryN(length, received, fn2) { + return function() { + var combined = []; + var argsIdx = 0; + var left = length; + var combinedIdx = 0; + while (combinedIdx < received.length || argsIdx < arguments.length) { + var result; + if (combinedIdx < received.length && (!_isPlaceholder(received[combinedIdx]) || argsIdx >= arguments.length)) { + result = received[combinedIdx]; + } else { + result = arguments[argsIdx]; + argsIdx += 1; + } + combined[combinedIdx] = result; + if (!_isPlaceholder(result)) { + left -= 1; + } + combinedIdx += 1; + } + return left <= 0 ? fn2.apply(this, combined) : _arity(left, _curryN(length, combined, fn2)); + }; + } + module2.exports = _curryN; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/curryN.js +var require_curryN2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/curryN.js"(exports2, module2) { + var _arity = require_arity(); + var _curry1 = require_curry1(); + var _curry2 = require_curry2(); + var _curryN = require_curryN(); + var curryN = /* @__PURE__ */ _curry2(function curryN2(length, fn2) { + if (length === 1) { + return _curry1(fn2); + } + return _arity(length, _curryN(length, [], fn2)); + }); + module2.exports = curryN; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/max.js +var require_max2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/max.js"(exports2, module2) { + var _curry2 = require_curry2(); + var max = /* @__PURE__ */ _curry2(function max2(a, b) { + return b > a ? b : a; + }); + module2.exports = max; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xmap.js +var require_xmap = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xmap.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _xfBase = require_xfBase(); + var XMap = /* @__PURE__ */ function() { + function XMap2(f, xf) { + this.xf = xf; + this.f = f; + } + XMap2.prototype["@@transducer/init"] = _xfBase.init; + XMap2.prototype["@@transducer/result"] = _xfBase.result; + XMap2.prototype["@@transducer/step"] = function(result, input) { + return this.xf["@@transducer/step"](result, this.f(input)); + }; + return XMap2; + }(); + var _xmap = /* @__PURE__ */ _curry2(function _xmap2(f, xf) { + return new XMap(f, xf); + }); + module2.exports = _xmap; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/map.js +var require_map4 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/map.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _dispatchable = require_dispatchable(); + var _map = require_map3(); + var _reduce = require_reduce2(); + var _xmap = require_xmap(); + var curryN = require_curryN2(); + var keys = require_keys(); + var map = /* @__PURE__ */ _curry2(/* @__PURE__ */ _dispatchable(["fantasy-land/map", "map"], _xmap, function map2(fn2, functor) { + switch (Object.prototype.toString.call(functor)) { + case "[object Function]": + return curryN(functor.length, function() { + return fn2.call(this, functor.apply(this, arguments)); + }); + case "[object Object]": + return _reduce(function(acc, key) { + acc[key] = fn2(functor[key]); + return acc; + }, {}, keys(functor)); + default: + return _map(fn2, functor); + } + })); + module2.exports = map; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isInteger.js +var require_isInteger = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isInteger.js"(exports2, module2) { + module2.exports = Number.isInteger || function _isInteger(n) { + return n << 0 === n; + }; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/nth.js +var require_nth = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/nth.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _isString = require_isString(); + var nth = /* @__PURE__ */ _curry2(function nth2(offset, list) { + var idx = offset < 0 ? list.length + offset : offset; + return _isString(list) ? list.charAt(idx) : list[idx]; + }); + module2.exports = nth; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/paths.js +var require_paths = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/paths.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _isInteger = require_isInteger(); + var nth = require_nth(); + var paths = /* @__PURE__ */ _curry2(function paths2(pathsArray, obj) { + return pathsArray.map(function(paths3) { + var val = obj; + var idx = 0; + var p; + while (idx < paths3.length) { + if (val == null) { + return; + } + p = paths3[idx]; + val = _isInteger(p) ? nth(p, val) : val[p]; + idx += 1; + } + return val; + }); + }); + module2.exports = paths; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/path.js +var require_path3 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/path.js"(exports2, module2) { + var _curry2 = require_curry2(); + var paths = require_paths(); + var path = /* @__PURE__ */ _curry2(function path2(pathAr, obj) { + return paths([pathAr], obj)[0]; + }); + module2.exports = path; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/prop.js +var require_prop = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/prop.js"(exports2, module2) { + var _curry2 = require_curry2(); + var path = require_path3(); + var prop = /* @__PURE__ */ _curry2(function prop2(p, obj) { + return path([p], obj); + }); + module2.exports = prop; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/pluck.js +var require_pluck2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/pluck.js"(exports2, module2) { + var _curry2 = require_curry2(); + var map = require_map4(); + var prop = require_prop(); + var pluck = /* @__PURE__ */ _curry2(function pluck2(p, list) { + return map(prop(p), list); + }); + module2.exports = pluck; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_curry3.js +var require_curry3 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_curry3.js"(exports2, module2) { + var _curry1 = require_curry1(); + var _curry2 = require_curry2(); + var _isPlaceholder = require_isPlaceholder(); + function _curry3(fn2) { + return function f3(a, b, c) { + switch (arguments.length) { + case 0: + return f3; + case 1: + return _isPlaceholder(a) ? f3 : _curry2(function(_b, _c) { + return fn2(a, _b, _c); + }); + case 2: + return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function(_a, _c) { + return fn2(_a, b, _c); + }) : _isPlaceholder(b) ? _curry2(function(_b, _c) { + return fn2(a, _b, _c); + }) : _curry1(function(_c) { + return fn2(a, b, _c); + }); + default: + return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function(_a, _b) { + return fn2(_a, _b, c); + }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function(_a, _c) { + return fn2(_a, b, _c); + }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function(_b, _c) { + return fn2(a, _b, _c); + }) : _isPlaceholder(a) ? _curry1(function(_a) { + return fn2(_a, b, c); + }) : _isPlaceholder(b) ? _curry1(function(_b) { + return fn2(a, _b, c); + }) : _isPlaceholder(c) ? _curry1(function(_c) { + return fn2(a, b, _c); + }) : fn2(a, b, c); + } + }; + } + module2.exports = _curry3; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/reduce.js +var require_reduce3 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/reduce.js"(exports2, module2) { + var _curry3 = require_curry3(); + var _reduce = require_reduce2(); + var reduce = /* @__PURE__ */ _curry3(_reduce); + module2.exports = reduce; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/converge.js +var require_converge = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/converge.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _map = require_map3(); + var curryN = require_curryN2(); + var max = require_max2(); + var pluck = require_pluck2(); + var reduce = require_reduce3(); + var converge = /* @__PURE__ */ _curry2(function converge2(after, fns) { + return curryN(reduce(max, 0, pluck("length", fns)), function() { + var args2 = arguments; + var context = this; + return after.apply(context, _map(function(fn2) { + return fn2.apply(context, args2); + }, fns)); + }); + }); + module2.exports = converge; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/juxt.js +var require_juxt = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/juxt.js"(exports2, module2) { + var _curry1 = require_curry1(); + var converge = require_converge(); + var juxt = /* @__PURE__ */ _curry1(function juxt2(fns) { + return converge(function() { + return Array.prototype.slice.call(arguments, 0); + }, fns); + }); + module2.exports = juxt; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_complement.js +var require_complement = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_complement.js"(exports2, module2) { + function _complement(f) { + return function() { + return !f.apply(this, arguments); + }; + } + module2.exports = _complement; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/reject.js +var require_reject = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/reject.js"(exports2, module2) { + var _complement = require_complement(); + var _curry2 = require_curry2(); + var filter = require_filter3(); + var reject = /* @__PURE__ */ _curry2(function reject2(pred, filterable) { + return filter(_complement(pred), filterable); + }); + module2.exports = reject; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/partition.js +var require_partition4 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/partition.js"(exports2, module2) { + var filter = require_filter3(); + var juxt = require_juxt(); + var reject = require_reject(); + var partition = /* @__PURE__ */ juxt([filter, reject]); + module2.exports = partition; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/pick.js +var require_pick = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/pick.js"(exports2, module2) { + var _curry2 = require_curry2(); + var pick = /* @__PURE__ */ _curry2(function pick2(names, obj) { + var result = {}; + var idx = 0; + while (idx < names.length) { + if (names[idx] in obj) { + result[names[idx]] = obj[names[idx]]; + } + idx += 1; + } + return result; + }); + module2.exports = pick; + } +}); + +// ../../node_modules/.pnpm/@zkochan+which@2.0.3/node_modules/@zkochan/which/which.js +var require_which2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+which@2.0.3/node_modules/@zkochan/which/which.js"(exports2, module2) { + var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys"; + var path = require("path"); + var COLON = isWindows ? ";" : ":"; + var isexe = require_isexe(); + var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }); + var getPathInfo = (cmd, opt) => { + const colon = opt.colon || COLON; + const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : (opt.path || process.env.PATH || "").split(colon); + const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : ""; + const pathExt = isWindows ? pathExtExe.split(colon) : [""]; + if (isWindows) { + if (cmd.indexOf(".") !== -1 && pathExt[0] !== "") + pathExt.unshift(""); + } + return { + pathEnv, + pathExt, + pathExtExe + }; + }; + var which = (cmd, opt, cb) => { + if (typeof opt === "function") { + cb = opt; + opt = {}; + } + if (!opt) + opt = {}; + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); + const found = []; + const step = (i) => new Promise((resolve, reject) => { + if (i === pathEnv.length) + return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd)); + const ppRaw = pathEnv[i]; + const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; + const pCmd = path.join(pathPart, cmd); + const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; + resolve(subStep(p, i, 0)); + }); + const subStep = (p, i, ii) => new Promise((resolve, reject) => { + if (ii === pathExt.length) + return resolve(step(i + 1)); + const ext = pathExt[ii]; + isexe(p + ext, { pathExt: pathExtExe }, (er, is) => { + if (!er && is) { + if (opt.all) + found.push(p + ext); + else + return resolve(p + ext); + } + return resolve(subStep(p, i, ii + 1)); + }); + }); + return cb ? step(0).then((res) => cb(null, res), cb) : step(0); + }; + var whichSync = (cmd, opt) => { + opt = opt || {}; + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); + const found = []; + for (let i = 0; i < pathEnv.length; i++) { + const ppRaw = pathEnv[i]; + const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; + const pCmd = path.join(pathPart, cmd); + const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; + for (let j = 0; j < pathExt.length; j++) { + const cur = p + pathExt[j]; + try { + const is = isexe.sync(cur, { pathExt: pathExtExe }); + if (is) { + if (opt.all) + found.push(cur); + else + return cur; + } + } catch (ex) { + } + } + } + if (opt.all && found.length) + return found; + if (opt.nothrow) + return null; + throw getNotFoundError(cmd); + }; + module2.exports = which; + which.sync = whichSync; + } +}); + +// ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js +var require_path_key = __commonJS({ + "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports2, module2) { + "use strict"; + var pathKey = (options = {}) => { + const environment = options.env || process.env; + const platform = options.platform || process.platform; + if (platform !== "win32") { + return "PATH"; + } + return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path"; + }; + module2.exports = pathKey; + module2.exports.default = pathKey; + } +}); + +// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js +var require_resolveCommand = __commonJS({ + "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var which = require_which(); + var getPathKey = require_path_key(); + function resolveCommandAttempt(parsed, withoutPathExt) { + const env = parsed.options.env || process.env; + const cwd = process.cwd(); + const hasCustomCwd = parsed.options.cwd != null; + const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled; + if (shouldSwitchCwd) { + try { + process.chdir(parsed.options.cwd); + } catch (err) { + } + } + let resolved; + try { + resolved = which.sync(parsed.command, { + path: env[getPathKey({ env })], + pathExt: withoutPathExt ? path.delimiter : void 0 + }); + } catch (e) { + } finally { + if (shouldSwitchCwd) { + process.chdir(cwd); + } + } + if (resolved) { + resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved); + } + return resolved; + } + function resolveCommand(parsed) { + return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); + } + module2.exports = resolveCommand; + } +}); + +// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js +var require_escape = __commonJS({ + "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js"(exports2, module2) { + "use strict"; + var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; + function escapeCommand(arg) { + arg = arg.replace(metaCharsRegExp, "^$1"); + return arg; + } + function escapeArgument(arg, doubleEscapeMetaChars) { + arg = `${arg}`; + arg = arg.replace(/(\\*)"/g, '$1$1\\"'); + arg = arg.replace(/(\\*)$/, "$1$1"); + arg = `"${arg}"`; + arg = arg.replace(metaCharsRegExp, "^$1"); + if (doubleEscapeMetaChars) { + arg = arg.replace(metaCharsRegExp, "^$1"); + } + return arg; + } + module2.exports.command = escapeCommand; + module2.exports.argument = escapeArgument; + } +}); + +// ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js +var require_shebang_regex = __commonJS({ + "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports2, module2) { + "use strict"; + module2.exports = /^#!(.*)/; + } +}); + +// ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js +var require_shebang_command = __commonJS({ + "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports2, module2) { + "use strict"; + var shebangRegex = require_shebang_regex(); + module2.exports = (string = "") => { + const match = string.match(shebangRegex); + if (!match) { + return null; + } + const [path, argument] = match[0].replace(/#! ?/, "").split(" "); + const binary = path.split("/").pop(); + if (binary === "env") { + return argument; + } + return argument ? `${binary} ${argument}` : binary; + }; + } +}); + +// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js +var require_readShebang = __commonJS({ + "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var shebangCommand = require_shebang_command(); + function readShebang(command) { + const size = 150; + const buffer = Buffer.alloc(size); + let fd; + try { + fd = fs.openSync(command, "r"); + fs.readSync(fd, buffer, 0, size, 0); + fs.closeSync(fd); + } catch (e) { + } + return shebangCommand(buffer.toString()); + } + module2.exports = readShebang; + } +}); + +// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js +var require_parse5 = __commonJS({ + "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var resolveCommand = require_resolveCommand(); + var escape = require_escape(); + var readShebang = require_readShebang(); + var isWin = process.platform === "win32"; + var isExecutableRegExp = /\.(?:com|exe)$/i; + var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; + function detectShebang(parsed) { + parsed.file = resolveCommand(parsed); + const shebang = parsed.file && readShebang(parsed.file); + if (shebang) { + parsed.args.unshift(parsed.file); + parsed.command = shebang; + return resolveCommand(parsed); + } + return parsed.file; + } + function parseNonShell(parsed) { + if (!isWin) { + return parsed; + } + const commandFile = detectShebang(parsed); + const needsShell = !isExecutableRegExp.test(commandFile); + if (parsed.options.forceShell || needsShell) { + const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); + parsed.command = path.normalize(parsed.command); + parsed.command = escape.command(parsed.command); + parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); + const shellCommand = [parsed.command].concat(parsed.args).join(" "); + parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`]; + parsed.command = process.env.comspec || "cmd.exe"; + parsed.options.windowsVerbatimArguments = true; + } + return parsed; + } + function parse(command, args2, options) { + if (args2 && !Array.isArray(args2)) { + options = args2; + args2 = null; + } + args2 = args2 ? args2.slice(0) : []; + options = Object.assign({}, options); + const parsed = { + command, + args: args2, + options, + file: void 0, + original: { + command, + args: args2 + } + }; + return options.shell ? parsed : parseNonShell(parsed); + } + module2.exports = parse; + } +}); + +// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js +var require_enoent = __commonJS({ + "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js"(exports2, module2) { + "use strict"; + var isWin = process.platform === "win32"; + function notFoundError(original, syscall) { + return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { + code: "ENOENT", + errno: "ENOENT", + syscall: `${syscall} ${original.command}`, + path: original.command, + spawnargs: original.args + }); + } + function hookChildProcess(cp, parsed) { + if (!isWin) { + return; + } + const originalEmit = cp.emit; + cp.emit = function(name, arg1) { + if (name === "exit") { + const err = verifyENOENT(arg1, parsed, "spawn"); + if (err) { + return originalEmit.call(cp, "error", err); + } + } + return originalEmit.apply(cp, arguments); + }; + } + function verifyENOENT(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, "spawn"); + } + return null; + } + function verifyENOENTSync(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, "spawnSync"); + } + return null; + } + module2.exports = { + hookChildProcess, + verifyENOENT, + verifyENOENTSync, + notFoundError + }; + } +}); + +// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js +var require_cross_spawn = __commonJS({ + "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js"(exports2, module2) { + "use strict"; + var cp = require("child_process"); + var parse = require_parse5(); + var enoent = require_enoent(); + function spawn(command, args2, options) { + const parsed = parse(command, args2, options); + const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); + enoent.hookChildProcess(spawned, parsed); + return spawned; + } + function spawnSync(command, args2, options) { + const parsed = parse(command, args2, options); + const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); + result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); + return result; + } + module2.exports = spawn; + module2.exports.spawn = spawn; + module2.exports.sync = spawnSync; + module2.exports._parse = parse; + module2.exports._enoent = enoent; + } +}); + +// ../../node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js +var require_strip_final_newline = __commonJS({ + "../../node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js"(exports2, module2) { + "use strict"; + module2.exports = (input) => { + const LF = typeof input === "string" ? "\n" : "\n".charCodeAt(); + const CR = typeof input === "string" ? "\r" : "\r".charCodeAt(); + if (input[input.length - 1] === LF) { + input = input.slice(0, input.length - 1); + } + if (input[input.length - 1] === CR) { + input = input.slice(0, input.length - 1); + } + return input; + }; + } +}); + +// ../../node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js +var require_npm_run_path = __commonJS({ + "../../node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var pathKey = require_path_key(); + var npmRunPath = (options) => { + options = { + cwd: process.cwd(), + path: process.env[pathKey()], + execPath: process.execPath, + ...options + }; + let previous; + let cwdPath = path.resolve(options.cwd); + const result = []; + while (previous !== cwdPath) { + result.push(path.join(cwdPath, "node_modules/.bin")); + previous = cwdPath; + cwdPath = path.resolve(cwdPath, ".."); + } + const execPathDir = path.resolve(options.cwd, options.execPath, ".."); + result.push(execPathDir); + return result.concat(options.path).join(path.delimiter); + }; + module2.exports = npmRunPath; + module2.exports.default = npmRunPath; + module2.exports.env = (options) => { + options = { + env: process.env, + ...options + }; + const env = { ...options.env }; + const path2 = pathKey({ env }); + options.path = env[path2]; + env[path2] = module2.exports(options); + return env; + }; + } +}); + +// ../../node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js +var require_mimic_fn = __commonJS({ + "../../node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js"(exports2, module2) { + "use strict"; + var mimicFn = (to, from) => { + for (const prop of Reflect.ownKeys(from)) { + Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); + } + return to; + }; + module2.exports = mimicFn; + module2.exports.default = mimicFn; + } +}); + +// ../../node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js +var require_onetime = __commonJS({ + "../../node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js"(exports2, module2) { + "use strict"; + var mimicFn = require_mimic_fn(); + var calledFunctions = new WeakMap(); + var onetime = (function_, options = {}) => { + if (typeof function_ !== "function") { + throw new TypeError("Expected a function"); + } + let returnValue; + let callCount = 0; + const functionName = function_.displayName || function_.name || ""; + const onetime2 = function(...arguments_) { + calledFunctions.set(onetime2, ++callCount); + if (callCount === 1) { + returnValue = function_.apply(this, arguments_); + function_ = null; + } else if (options.throw === true) { + throw new Error(`Function \`${functionName}\` can only be called once`); + } + return returnValue; + }; + mimicFn(onetime2, function_); + calledFunctions.set(onetime2, callCount); + return onetime2; + }; + module2.exports = onetime; + module2.exports.default = onetime; + module2.exports.callCount = (function_) => { + if (!calledFunctions.has(function_)) { + throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`); + } + return calledFunctions.get(function_); + }; + } +}); + +// ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js +var require_core3 = __commonJS({ + "../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SIGNALS = void 0; + var SIGNALS = [ + { + name: "SIGHUP", + number: 1, + action: "terminate", + description: "Terminal closed", + standard: "posix" + }, + { + name: "SIGINT", + number: 2, + action: "terminate", + description: "User interruption with CTRL-C", + standard: "ansi" + }, + { + name: "SIGQUIT", + number: 3, + action: "core", + description: "User interruption with CTRL-\\", + standard: "posix" + }, + { + name: "SIGILL", + number: 4, + action: "core", + description: "Invalid machine instruction", + standard: "ansi" + }, + { + name: "SIGTRAP", + number: 5, + action: "core", + description: "Debugger breakpoint", + standard: "posix" + }, + { + name: "SIGABRT", + number: 6, + action: "core", + description: "Aborted", + standard: "ansi" + }, + { + name: "SIGIOT", + number: 6, + action: "core", + description: "Aborted", + standard: "bsd" + }, + { + name: "SIGBUS", + number: 7, + action: "core", + description: "Bus error due to misaligned, non-existing address or paging error", + standard: "bsd" + }, + { + name: "SIGEMT", + number: 7, + action: "terminate", + description: "Command should be emulated but is not implemented", + standard: "other" + }, + { + name: "SIGFPE", + number: 8, + action: "core", + description: "Floating point arithmetic error", + standard: "ansi" + }, + { + name: "SIGKILL", + number: 9, + action: "terminate", + description: "Forced termination", + standard: "posix", + forced: true + }, + { + name: "SIGUSR1", + number: 10, + action: "terminate", + description: "Application-specific signal", + standard: "posix" + }, + { + name: "SIGSEGV", + number: 11, + action: "core", + description: "Segmentation fault", + standard: "ansi" + }, + { + name: "SIGUSR2", + number: 12, + action: "terminate", + description: "Application-specific signal", + standard: "posix" + }, + { + name: "SIGPIPE", + number: 13, + action: "terminate", + description: "Broken pipe or socket", + standard: "posix" + }, + { + name: "SIGALRM", + number: 14, + action: "terminate", + description: "Timeout or timer", + standard: "posix" + }, + { + name: "SIGTERM", + number: 15, + action: "terminate", + description: "Termination", + standard: "ansi" + }, + { + name: "SIGSTKFLT", + number: 16, + action: "terminate", + description: "Stack is empty or overflowed", + standard: "other" + }, + { + name: "SIGCHLD", + number: 17, + action: "ignore", + description: "Child process terminated, paused or unpaused", + standard: "posix" + }, + { + name: "SIGCLD", + number: 17, + action: "ignore", + description: "Child process terminated, paused or unpaused", + standard: "other" + }, + { + name: "SIGCONT", + number: 18, + action: "unpause", + description: "Unpaused", + standard: "posix", + forced: true + }, + { + name: "SIGSTOP", + number: 19, + action: "pause", + description: "Paused", + standard: "posix", + forced: true + }, + { + name: "SIGTSTP", + number: 20, + action: "pause", + description: 'Paused using CTRL-Z or "suspend"', + standard: "posix" + }, + { + name: "SIGTTIN", + number: 21, + action: "pause", + description: "Background process cannot read terminal input", + standard: "posix" + }, + { + name: "SIGBREAK", + number: 21, + action: "terminate", + description: "User interruption with CTRL-BREAK", + standard: "other" + }, + { + name: "SIGTTOU", + number: 22, + action: "pause", + description: "Background process cannot write to terminal output", + standard: "posix" + }, + { + name: "SIGURG", + number: 23, + action: "ignore", + description: "Socket received out-of-band data", + standard: "bsd" + }, + { + name: "SIGXCPU", + number: 24, + action: "core", + description: "Process timed out", + standard: "bsd" + }, + { + name: "SIGXFSZ", + number: 25, + action: "core", + description: "File too big", + standard: "bsd" + }, + { + name: "SIGVTALRM", + number: 26, + action: "terminate", + description: "Timeout or timer", + standard: "bsd" + }, + { + name: "SIGPROF", + number: 27, + action: "terminate", + description: "Timeout or timer", + standard: "bsd" + }, + { + name: "SIGWINCH", + number: 28, + action: "ignore", + description: "Terminal window size changed", + standard: "bsd" + }, + { + name: "SIGIO", + number: 29, + action: "terminate", + description: "I/O is available", + standard: "other" + }, + { + name: "SIGPOLL", + number: 29, + action: "terminate", + description: "Watched event", + standard: "other" + }, + { + name: "SIGINFO", + number: 29, + action: "ignore", + description: "Request for process information", + standard: "other" + }, + { + name: "SIGPWR", + number: 30, + action: "terminate", + description: "Device running out of power", + standard: "systemv" + }, + { + name: "SIGSYS", + number: 31, + action: "core", + description: "Invalid system call", + standard: "other" + }, + { + name: "SIGUNUSED", + number: 31, + action: "terminate", + description: "Invalid system call", + standard: "other" + } + ]; + exports2.SIGNALS = SIGNALS; + } +}); + +// ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js +var require_realtime = __commonJS({ + "../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SIGRTMAX = exports2.getRealtimeSignals = void 0; + var getRealtimeSignals = function() { + const length = SIGRTMAX - SIGRTMIN + 1; + return Array.from({ length }, getRealtimeSignal); + }; + exports2.getRealtimeSignals = getRealtimeSignals; + var getRealtimeSignal = function(value, index) { + return { + name: `SIGRT${index + 1}`, + number: SIGRTMIN + index, + action: "terminate", + description: "Application-specific signal (realtime)", + standard: "posix" + }; + }; + var SIGRTMIN = 34; + var SIGRTMAX = 64; + exports2.SIGRTMAX = SIGRTMAX; + } +}); + +// ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js +var require_signals2 = __commonJS({ + "../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getSignals = void 0; + var _os = require("os"); + var _core = require_core3(); + var _realtime = require_realtime(); + var getSignals = function() { + const realtimeSignals = (0, _realtime.getRealtimeSignals)(); + const signals = [..._core.SIGNALS, ...realtimeSignals].map(normalizeSignal); + return signals; + }; + exports2.getSignals = getSignals; + var normalizeSignal = function({ + name, + number: defaultNumber, + description, + action, + forced = false, + standard + }) { + const { + signals: { [name]: constantSignal } + } = _os.constants; + const supported = constantSignal !== void 0; + const number = supported ? constantSignal : defaultNumber; + return { name, number, description, supported, action, forced, standard }; + }; + } +}); + +// ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js +var require_main = __commonJS({ + "../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.signalsByNumber = exports2.signalsByName = void 0; + var _os = require("os"); + var _signals = require_signals2(); + var _realtime = require_realtime(); + var getSignalsByName = function() { + const signals = (0, _signals.getSignals)(); + return signals.reduce(getSignalByName, {}); + }; + var getSignalByName = function(signalByNameMemo, { name, number, description, supported, action, forced, standard }) { + return { + ...signalByNameMemo, + [name]: { name, number, description, supported, action, forced, standard } + }; + }; + var signalsByName = getSignalsByName(); + exports2.signalsByName = signalsByName; + var getSignalsByNumber = function() { + const signals = (0, _signals.getSignals)(); + const length = _realtime.SIGRTMAX + 1; + const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals)); + return Object.assign({}, ...signalsA); + }; + var getSignalByNumber = function(number, signals) { + const signal = findSignalByNumber(number, signals); + if (signal === void 0) { + return {}; + } + const { name, description, supported, action, forced, standard } = signal; + return { + [number]: { + name, + number, + description, + supported, + action, + forced, + standard + } + }; + }; + var findSignalByNumber = function(number, signals) { + const signal = signals.find(({ name }) => _os.constants.signals[name] === number); + if (signal !== void 0) { + return signal; + } + return signals.find((signalA) => signalA.number === number); + }; + var signalsByNumber = getSignalsByNumber(); + exports2.signalsByNumber = signalsByNumber; + } +}); + +// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js +var require_error2 = __commonJS({ + "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js"(exports2, module2) { + "use strict"; + var { signalsByName } = require_main(); + var getErrorPrefix = ({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }) => { + if (timedOut) { + return `timed out after ${timeout} milliseconds`; + } + if (isCanceled) { + return "was canceled"; + } + if (errorCode !== void 0) { + return `failed with ${errorCode}`; + } + if (signal !== void 0) { + return `was killed with ${signal} (${signalDescription})`; + } + if (exitCode !== void 0) { + return `failed with exit code ${exitCode}`; + } + return "failed"; + }; + var makeError = ({ + stdout, + stderr, + all, + error, + signal, + exitCode, + command, + escapedCommand, + timedOut, + isCanceled, + killed, + parsed: { options: { timeout } } + }) => { + exitCode = exitCode === null ? void 0 : exitCode; + signal = signal === null ? void 0 : signal; + const signalDescription = signal === void 0 ? void 0 : signalsByName[signal].description; + const errorCode = error && error.code; + const prefix = getErrorPrefix({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }); + const execaMessage = `Command ${prefix}: ${command}`; + const isError = Object.prototype.toString.call(error) === "[object Error]"; + const shortMessage = isError ? `${execaMessage} +${error.message}` : execaMessage; + const message2 = [shortMessage, stderr, stdout].filter(Boolean).join("\n"); + if (isError) { + error.originalMessage = error.message; + error.message = message2; + } else { + error = new Error(message2); + } + error.shortMessage = shortMessage; + error.command = command; + error.escapedCommand = escapedCommand; + error.exitCode = exitCode; + error.signal = signal; + error.signalDescription = signalDescription; + error.stdout = stdout; + error.stderr = stderr; + if (all !== void 0) { + error.all = all; + } + if ("bufferedData" in error) { + delete error.bufferedData; + } + error.failed = true; + error.timedOut = Boolean(timedOut); + error.isCanceled = isCanceled; + error.killed = killed && !timedOut; + return error; + }; + module2.exports = makeError; + } +}); + +// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js +var require_stdio = __commonJS({ + "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js"(exports2, module2) { + "use strict"; + var aliases = ["stdin", "stdout", "stderr"]; + var hasAlias = (options) => aliases.some((alias) => options[alias] !== void 0); + var normalizeStdio = (options) => { + if (!options) { + return; + } + const { stdio } = options; + if (stdio === void 0) { + return aliases.map((alias) => options[alias]); + } + if (hasAlias(options)) { + throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map((alias) => `\`${alias}\``).join(", ")}`); + } + if (typeof stdio === "string") { + return stdio; + } + if (!Array.isArray(stdio)) { + throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); + } + const length = Math.max(stdio.length, aliases.length); + return Array.from({ length }, (value, index) => stdio[index]); + }; + module2.exports = normalizeStdio; + module2.exports.node = (options) => { + const stdio = normalizeStdio(options); + if (stdio === "ipc") { + return "ipc"; + } + if (stdio === void 0 || typeof stdio === "string") { + return [stdio, stdio, stdio, "ipc"]; + } + if (stdio.includes("ipc")) { + return stdio; + } + return [...stdio, "ipc"]; + }; + } +}); + +// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js +var require_kill = __commonJS({ + "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js"(exports2, module2) { + "use strict"; + var os = require("os"); + var onExit = require_signal_exit(); + var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5; + var spawnedKill = (kill, signal = "SIGTERM", options = {}) => { + const killResult = kill(signal); + setKillTimeout(kill, signal, options, killResult); + return killResult; + }; + var setKillTimeout = (kill, signal, options, killResult) => { + if (!shouldForceKill(signal, options, killResult)) { + return; + } + const timeout = getForceKillAfterTimeout(options); + const t = setTimeout(() => { + kill("SIGKILL"); + }, timeout); + if (t.unref) { + t.unref(); + } + }; + var shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => { + return isSigterm(signal) && forceKillAfterTimeout !== false && killResult; + }; + var isSigterm = (signal) => { + return signal === os.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM"; + }; + var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => { + if (forceKillAfterTimeout === true) { + return DEFAULT_FORCE_KILL_TIMEOUT; + } + if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) { + throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`); + } + return forceKillAfterTimeout; + }; + var spawnedCancel = (spawned, context) => { + const killResult = spawned.kill(); + if (killResult) { + context.isCanceled = true; + } + }; + var timeoutKill = (spawned, signal, reject) => { + spawned.kill(signal); + reject(Object.assign(new Error("Timed out"), { timedOut: true, signal })); + }; + var setupTimeout = (spawned, { timeout, killSignal = "SIGTERM" }, spawnedPromise) => { + if (timeout === 0 || timeout === void 0) { + return spawnedPromise; + } + let timeoutId; + const timeoutPromise = new Promise((resolve, reject) => { + timeoutId = setTimeout(() => { + timeoutKill(spawned, killSignal, reject); + }, timeout); + }); + const safeSpawnedPromise = spawnedPromise.finally(() => { + clearTimeout(timeoutId); + }); + return Promise.race([timeoutPromise, safeSpawnedPromise]); + }; + var validateTimeout = ({ timeout }) => { + if (timeout !== void 0 && (!Number.isFinite(timeout) || timeout < 0)) { + throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`); + } + }; + var setExitHandler = async (spawned, { cleanup, detached }, timedPromise) => { + if (!cleanup || detached) { + return timedPromise; + } + const removeExitHandler = onExit(() => { + spawned.kill(); + }); + return timedPromise.finally(() => { + removeExitHandler(); + }); + }; + module2.exports = { + spawnedKill, + spawnedCancel, + setupTimeout, + validateTimeout, + setExitHandler + }; + } +}); + +// ../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js +var require_is_stream = __commonJS({ + "../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js"(exports2, module2) { + "use strict"; + var isStream = (stream) => stream !== null && typeof stream === "object" && typeof stream.pipe === "function"; + isStream.writable = (stream) => isStream(stream) && stream.writable !== false && typeof stream._write === "function" && typeof stream._writableState === "object"; + isStream.readable = (stream) => isStream(stream) && stream.readable !== false && typeof stream._read === "function" && typeof stream._readableState === "object"; + isStream.duplex = (stream) => isStream.writable(stream) && isStream.readable(stream); + isStream.transform = (stream) => isStream.duplex(stream) && typeof stream._transform === "function"; + module2.exports = isStream; + } +}); + +// ../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js +var require_buffer_stream = __commonJS({ + "../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js"(exports2, module2) { + "use strict"; + var { PassThrough: PassThroughStream } = require("stream"); + module2.exports = (options) => { + options = { ...options }; + const { array } = options; + let { encoding } = options; + const isBuffer = encoding === "buffer"; + let objectMode = false; + if (array) { + objectMode = !(encoding || isBuffer); + } else { + encoding = encoding || "utf8"; + } + if (isBuffer) { + encoding = null; + } + const stream = new PassThroughStream({ objectMode }); + if (encoding) { + stream.setEncoding(encoding); + } + let length = 0; + const chunks = []; + stream.on("data", (chunk) => { + chunks.push(chunk); + if (objectMode) { + length = chunks.length; + } else { + length += chunk.length; + } + }); + stream.getBufferedValue = () => { + if (array) { + return chunks; + } + return isBuffer ? Buffer.concat(chunks, length) : chunks.join(""); + }; + stream.getBufferedLength = () => length; + return stream; + }; + } +}); + +// ../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js +var require_get_stream = __commonJS({ + "../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js"(exports2, module2) { + "use strict"; + var { constants: BufferConstants } = require("buffer"); + var stream = require("stream"); + var { promisify } = require("util"); + var bufferStream = require_buffer_stream(); + var streamPipelinePromisified = promisify(stream.pipeline); + var MaxBufferError = class extends Error { + constructor() { + super("maxBuffer exceeded"); + this.name = "MaxBufferError"; + } + }; + async function getStream(inputStream, options) { + if (!inputStream) { + throw new Error("Expected a stream"); + } + options = { + maxBuffer: Infinity, + ...options + }; + const { maxBuffer } = options; + const stream2 = bufferStream(options); + await new Promise((resolve, reject) => { + const rejectPromise = (error) => { + if (error && stream2.getBufferedLength() <= BufferConstants.MAX_LENGTH) { + error.bufferedData = stream2.getBufferedValue(); + } + reject(error); + }; + (async () => { + try { + await streamPipelinePromisified(inputStream, stream2); + resolve(); + } catch (error) { + rejectPromise(error); + } + })(); + stream2.on("data", () => { + if (stream2.getBufferedLength() > maxBuffer) { + rejectPromise(new MaxBufferError()); + } + }); + }); + return stream2.getBufferedValue(); + } + module2.exports = getStream; + module2.exports.buffer = (stream2, options) => getStream(stream2, { ...options, encoding: "buffer" }); + module2.exports.array = (stream2, options) => getStream(stream2, { ...options, array: true }); + module2.exports.MaxBufferError = MaxBufferError; + } +}); + +// ../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js +var require_merge_stream = __commonJS({ + "../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js"(exports2, module2) { + "use strict"; + var { PassThrough } = require("stream"); + module2.exports = function() { + var sources = []; + var output = new PassThrough({ objectMode: true }); + output.setMaxListeners(0); + output.add = add; + output.isEmpty = isEmpty; + output.on("unpipe", remove); + Array.prototype.slice.call(arguments).forEach(add); + return output; + function add(source) { + if (Array.isArray(source)) { + source.forEach(add); + return this; + } + sources.push(source); + source.once("end", remove.bind(null, source)); + source.once("error", output.emit.bind(output, "error")); + source.pipe(output, { end: false }); + return this; + } + function isEmpty() { + return sources.length == 0; + } + function remove(source) { + sources = sources.filter(function(it) { + return it !== source; + }); + if (!sources.length && output.readable) { + output.end(); + } + } + }; + } +}); + +// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js +var require_stream6 = __commonJS({ + "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js"(exports2, module2) { + "use strict"; + var isStream = require_is_stream(); + var getStream = require_get_stream(); + var mergeStream = require_merge_stream(); + var handleInput = (spawned, input) => { + if (input === void 0 || spawned.stdin === void 0) { + return; + } + if (isStream(input)) { + input.pipe(spawned.stdin); + } else { + spawned.stdin.end(input); + } + }; + var makeAllStream = (spawned, { all }) => { + if (!all || !spawned.stdout && !spawned.stderr) { + return; + } + const mixed = mergeStream(); + if (spawned.stdout) { + mixed.add(spawned.stdout); + } + if (spawned.stderr) { + mixed.add(spawned.stderr); + } + return mixed; + }; + var getBufferedData = async (stream, streamPromise) => { + if (!stream) { + return; + } + stream.destroy(); + try { + return await streamPromise; + } catch (error) { + return error.bufferedData; + } + }; + var getStreamPromise = (stream, { encoding, buffer, maxBuffer }) => { + if (!stream || !buffer) { + return; + } + if (encoding) { + return getStream(stream, { encoding, maxBuffer }); + } + return getStream.buffer(stream, { maxBuffer }); + }; + var getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => { + const stdoutPromise = getStreamPromise(stdout, { encoding, buffer, maxBuffer }); + const stderrPromise = getStreamPromise(stderr, { encoding, buffer, maxBuffer }); + const allPromise = getStreamPromise(all, { encoding, buffer, maxBuffer: maxBuffer * 2 }); + try { + return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]); + } catch (error) { + return Promise.all([ + { error, signal: error.signal, timedOut: error.timedOut }, + getBufferedData(stdout, stdoutPromise), + getBufferedData(stderr, stderrPromise), + getBufferedData(all, allPromise) + ]); + } + }; + var validateInputSync = ({ input }) => { + if (isStream(input)) { + throw new TypeError("The `input` option cannot be a stream in sync mode"); + } + }; + module2.exports = { + handleInput, + makeAllStream, + getSpawnedResult, + validateInputSync + }; + } +}); + +// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js +var require_promise = __commonJS({ + "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js"(exports2, module2) { + "use strict"; + var nativePromisePrototype = (async () => { + })().constructor.prototype; + var descriptors = ["then", "catch", "finally"].map((property) => [ + property, + Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property) + ]); + var mergePromise = (spawned, promise) => { + for (const [property, descriptor] of descriptors) { + const value = typeof promise === "function" ? (...args2) => Reflect.apply(descriptor.value, promise(), args2) : descriptor.value.bind(promise); + Reflect.defineProperty(spawned, property, { ...descriptor, value }); + } + return spawned; + }; + var getSpawnedPromise = (spawned) => { + return new Promise((resolve, reject) => { + spawned.on("exit", (exitCode, signal) => { + resolve({ exitCode, signal }); + }); + spawned.on("error", (error) => { + reject(error); + }); + if (spawned.stdin) { + spawned.stdin.on("error", (error) => { + reject(error); + }); + } + }); + }; + module2.exports = { + mergePromise, + getSpawnedPromise + }; + } +}); + +// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js +var require_command = __commonJS({ + "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js"(exports2, module2) { + "use strict"; + var normalizeArgs = (file, args2 = []) => { + if (!Array.isArray(args2)) { + return [file]; + } + return [file, ...args2]; + }; + var NO_ESCAPE_REGEXP = /^[\w.-]+$/; + var DOUBLE_QUOTES_REGEXP = /"/g; + var escapeArg = (arg) => { + if (typeof arg !== "string" || NO_ESCAPE_REGEXP.test(arg)) { + return arg; + } + return `"${arg.replace(DOUBLE_QUOTES_REGEXP, '\\"')}"`; + }; + var joinCommand = (file, args2) => { + return normalizeArgs(file, args2).join(" "); + }; + var getEscapedCommand = (file, args2) => { + return normalizeArgs(file, args2).map((arg) => escapeArg(arg)).join(" "); + }; + var SPACES_REGEXP = / +/g; + var parseCommand = (command) => { + const tokens = []; + for (const token of command.trim().split(SPACES_REGEXP)) { + const previousToken = tokens[tokens.length - 1]; + if (previousToken && previousToken.endsWith("\\")) { + tokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`; + } else { + tokens.push(token); + } + } + return tokens; + }; + module2.exports = { + joinCommand, + getEscapedCommand, + parseCommand + }; + } +}); + +// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js +var require_execa = __commonJS({ + "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var childProcess = require("child_process"); + var crossSpawn = require_cross_spawn(); + var stripFinalNewline = require_strip_final_newline(); + var npmRunPath = require_npm_run_path(); + var onetime = require_onetime(); + var makeError = require_error2(); + var normalizeStdio = require_stdio(); + var { spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler } = require_kill(); + var { handleInput, getSpawnedResult, makeAllStream, validateInputSync } = require_stream6(); + var { mergePromise, getSpawnedPromise } = require_promise(); + var { joinCommand, parseCommand, getEscapedCommand } = require_command(); + var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100; + var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => { + const env = extendEnv ? { ...process.env, ...envOption } : envOption; + if (preferLocal) { + return npmRunPath.env({ env, cwd: localDir, execPath }); + } + return env; + }; + var handleArguments = (file, args2, options = {}) => { + const parsed = crossSpawn._parse(file, args2, options); + file = parsed.command; + args2 = parsed.args; + options = parsed.options; + options = { + maxBuffer: DEFAULT_MAX_BUFFER, + buffer: true, + stripFinalNewline: true, + extendEnv: true, + preferLocal: false, + localDir: options.cwd || process.cwd(), + execPath: process.execPath, + encoding: "utf8", + reject: true, + cleanup: true, + all: false, + windowsHide: true, + ...options + }; + options.env = getEnv(options); + options.stdio = normalizeStdio(options); + if (process.platform === "win32" && path.basename(file, ".exe") === "cmd") { + args2.unshift("/q"); + } + return { file, args: args2, options, parsed }; + }; + var handleOutput = (options, value, error) => { + if (typeof value !== "string" && !Buffer.isBuffer(value)) { + return error === void 0 ? void 0 : ""; + } + if (options.stripFinalNewline) { + return stripFinalNewline(value); + } + return value; + }; + var execa = (file, args2, options) => { + const parsed = handleArguments(file, args2, options); + const command = joinCommand(file, args2); + const escapedCommand = getEscapedCommand(file, args2); + validateTimeout(parsed.options); + let spawned; + try { + spawned = childProcess.spawn(parsed.file, parsed.args, parsed.options); + } catch (error) { + const dummySpawned = new childProcess.ChildProcess(); + const errorPromise = Promise.reject(makeError({ + error, + stdout: "", + stderr: "", + all: "", + command, + escapedCommand, + parsed, + timedOut: false, + isCanceled: false, + killed: false + })); + return mergePromise(dummySpawned, errorPromise); + } + const spawnedPromise = getSpawnedPromise(spawned); + const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise); + const processDone = setExitHandler(spawned, parsed.options, timedPromise); + const context = { isCanceled: false }; + spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned)); + spawned.cancel = spawnedCancel.bind(null, spawned, context); + const handlePromise = async () => { + const [{ error, exitCode, signal, timedOut }, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone); + const stdout = handleOutput(parsed.options, stdoutResult); + const stderr = handleOutput(parsed.options, stderrResult); + const all = handleOutput(parsed.options, allResult); + if (error || exitCode !== 0 || signal !== null) { + const returnedError = makeError({ + error, + exitCode, + signal, + stdout, + stderr, + all, + command, + escapedCommand, + parsed, + timedOut, + isCanceled: context.isCanceled, + killed: spawned.killed + }); + if (!parsed.options.reject) { + return returnedError; + } + throw returnedError; + } + return { + command, + escapedCommand, + exitCode: 0, + stdout, + stderr, + all, + failed: false, + timedOut: false, + isCanceled: false, + killed: false + }; + }; + const handlePromiseOnce = onetime(handlePromise); + handleInput(spawned, parsed.options.input); + spawned.all = makeAllStream(spawned, parsed.options); + return mergePromise(spawned, handlePromiseOnce); + }; + module2.exports = execa; + module2.exports.sync = (file, args2, options) => { + const parsed = handleArguments(file, args2, options); + const command = joinCommand(file, args2); + const escapedCommand = getEscapedCommand(file, args2); + validateInputSync(parsed.options); + let result; + try { + result = childProcess.spawnSync(parsed.file, parsed.args, parsed.options); + } catch (error) { + throw makeError({ + error, + stdout: "", + stderr: "", + all: "", + command, + escapedCommand, + parsed, + timedOut: false, + isCanceled: false, + killed: false + }); + } + const stdout = handleOutput(parsed.options, result.stdout, result.error); + const stderr = handleOutput(parsed.options, result.stderr, result.error); + if (result.error || result.status !== 0 || result.signal !== null) { + const error = makeError({ + stdout, + stderr, + error: result.error, + signal: result.signal, + exitCode: result.status, + command, + escapedCommand, + parsed, + timedOut: result.error && result.error.code === "ETIMEDOUT", + isCanceled: false, + killed: result.signal !== null + }); + if (!parsed.options.reject) { + return error; + } + throw error; + } + return { + command, + escapedCommand, + exitCode: 0, + stdout, + stderr, + failed: false, + timedOut: false, + isCanceled: false, + killed: false + }; + }; + module2.exports.command = (command, options) => { + const [file, ...args2] = parseCommand(command); + return execa(file, args2, options); + }; + module2.exports.commandSync = (command, options) => { + const [file, ...args2] = parseCommand(command); + return execa.sync(file, args2, options); + }; + module2.exports.node = (scriptPath, args2, options = {}) => { + if (args2 && !Array.isArray(args2) && typeof args2 === "object") { + options = args2; + args2 = []; + } + const stdio = normalizeStdio.node(options); + const defaultExecArgv = process.execArgv.filter((arg) => !arg.startsWith("--inspect")); + const { + nodePath = process.execPath, + nodeOptions = defaultExecArgv + } = options; + return execa(nodePath, [ + ...nodeOptions, + scriptPath, + ...Array.isArray(args2) ? args2 : [] + ], { + ...options, + stdin: void 0, + stdout: void 0, + stderr: void 0, + stdio, + shell: false + }); + }; + } +}); + +// ../../node_modules/.pnpm/safe-execa@0.1.1/node_modules/safe-execa/lib/index.js +var require_lib26 = __commonJS({ + "../../node_modules/.pnpm/safe-execa@0.1.1/node_modules/safe-execa/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sync = void 0; + var which_1 = __importDefault(require_which2()); + var execa_1 = __importDefault(require_execa()); + var path_name_1 = __importDefault(require_path_name()); + var pathCache = new Map(); + function sync(file, args2, options) { + const fileAbsolutePath = getCommandAbsolutePathSync(file, options); + return execa_1.default.sync(fileAbsolutePath, args2, options); + } + exports2.sync = sync; + function getCommandAbsolutePathSync(file, options) { + var _a, _b; + if (file.includes("\\") || file.includes("/")) + return file; + const path = (_b = (_a = options === null || options === void 0 ? void 0 : options.env) === null || _a === void 0 ? void 0 : _a[path_name_1.default]) !== null && _b !== void 0 ? _b : process.env[path_name_1.default]; + const key = JSON.stringify([path, file]); + let fileAbsolutePath = pathCache.get(key); + if (fileAbsolutePath == null) { + fileAbsolutePath = which_1.default.sync(file, { path }); + pathCache.set(key, fileAbsolutePath); + } + if (fileAbsolutePath == null) { + throw new Error(`Couldn't find ${file}`); + } + return fileAbsolutePath; + } + function default_1(file, args2, options) { + const fileAbsolutePath = getCommandAbsolutePathSync(file, options); + return execa_1.default(fileAbsolutePath, args2, options); + } + exports2.default = default_1; + } +}); + +// ../../node_modules/.pnpm/yocto-queue@0.1.0/node_modules/yocto-queue/index.js +var require_yocto_queue = __commonJS({ + "../../node_modules/.pnpm/yocto-queue@0.1.0/node_modules/yocto-queue/index.js"(exports2, module2) { + var Node = class { + constructor(value) { + this.value = value; + this.next = void 0; + } + }; + var Queue = class { + constructor() { + this.clear(); + } + enqueue(value) { + const node = new Node(value); + if (this._head) { + this._tail.next = node; + this._tail = node; + } else { + this._head = node; + this._tail = node; + } + this._size++; + } + dequeue() { + const current = this._head; + if (!current) { + return; + } + this._head = this._head.next; + this._size--; + return current.value; + } + clear() { + this._head = void 0; + this._tail = void 0; + this._size = 0; + } + get size() { + return this._size; + } + *[Symbol.iterator]() { + let current = this._head; + while (current) { + yield current.value; + current = current.next; + } + } + }; + module2.exports = Queue; + } +}); + +// ../../node_modules/.pnpm/p-limit@3.1.0/node_modules/p-limit/index.js +var require_p_limit = __commonJS({ + "../../node_modules/.pnpm/p-limit@3.1.0/node_modules/p-limit/index.js"(exports2, module2) { + "use strict"; + var Queue = require_yocto_queue(); + var pLimit = (concurrency) => { + if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { + throw new TypeError("Expected `concurrency` to be a number from 1 and up"); + } + const queue = new Queue(); + let activeCount = 0; + const next = () => { + activeCount--; + if (queue.size > 0) { + queue.dequeue()(); + } + }; + const run = async (fn2, resolve, ...args2) => { + activeCount++; + const result = (async () => fn2(...args2))(); + resolve(result); + try { + await result; + } catch { + } + next(); + }; + const enqueue = (fn2, resolve, ...args2) => { + queue.enqueue(run.bind(null, fn2, resolve, ...args2)); + (async () => { + await Promise.resolve(); + if (activeCount < concurrency && queue.size > 0) { + queue.dequeue()(); + } + })(); + }; + const generator = (fn2, ...args2) => new Promise((resolve) => { + enqueue(fn2, resolve, ...args2); + }); + Object.defineProperties(generator, { + activeCount: { + get: () => activeCount + }, + pendingCount: { + get: () => queue.size + }, + clearQueue: { + value: () => { + queue.clear(); + } + } + }); + return generator; + }; + module2.exports = pLimit; + } +}); + +// ../../node_modules/.pnpm/p-locate@5.0.0/node_modules/p-locate/index.js +var require_p_locate = __commonJS({ + "../../node_modules/.pnpm/p-locate@5.0.0/node_modules/p-locate/index.js"(exports2, module2) { + "use strict"; + var pLimit = require_p_limit(); + var EndError = class extends Error { + constructor(value) { + super(); + this.value = value; + } + }; + var testElement = async (element, tester) => tester(await element); + var finder = async (element) => { + const values = await Promise.all(element); + if (values[1] === true) { + throw new EndError(values[0]); + } + return false; + }; + var pLocate = async (iterable, tester, options) => { + options = { + concurrency: Infinity, + preserveOrder: true, + ...options + }; + const limit = pLimit(options.concurrency); + const items = [...iterable].map((element) => [element, limit(testElement, element, tester)]); + const checkLimit = pLimit(options.preserveOrder ? 1 : Infinity); + try { + await Promise.all(items.map((element) => checkLimit(finder, element))); + } catch (error) { + if (error instanceof EndError) { + return error.value; + } + throw error; + } + }; + module2.exports = pLocate; + } +}); + +// ../../node_modules/.pnpm/locate-path@6.0.0/node_modules/locate-path/index.js +var require_locate_path = __commonJS({ + "../../node_modules/.pnpm/locate-path@6.0.0/node_modules/locate-path/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var fs = require("fs"); + var { promisify } = require("util"); + var pLocate = require_p_locate(); + var fsStat = promisify(fs.stat); + var fsLStat = promisify(fs.lstat); + var typeMappings = { + directory: "isDirectory", + file: "isFile" + }; + function checkType({ type }) { + if (type in typeMappings) { + return; + } + throw new Error(`Invalid type specified: ${type}`); + } + var matchType = (type, stat) => type === void 0 || stat[typeMappings[type]](); + module2.exports = async (paths, options) => { + options = { + cwd: process.cwd(), + type: "file", + allowSymlinks: true, + ...options + }; + checkType(options); + const statFn = options.allowSymlinks ? fsStat : fsLStat; + return pLocate(paths, async (path_) => { + try { + const stat = await statFn(path.resolve(options.cwd, path_)); + return matchType(options.type, stat); + } catch { + return false; + } + }, options); + }; + module2.exports.sync = (paths, options) => { + options = { + cwd: process.cwd(), + allowSymlinks: true, + type: "file", + ...options + }; + checkType(options); + const statFn = options.allowSymlinks ? fs.statSync : fs.lstatSync; + for (const path_ of paths) { + try { + const stat = statFn(path.resolve(options.cwd, path_)); + if (matchType(options.type, stat)) { + return path_; + } + } catch { + } + } + }; + } +}); + +// ../../node_modules/.pnpm/path-exists@4.0.0/node_modules/path-exists/index.js +var require_path_exists = __commonJS({ + "../../node_modules/.pnpm/path-exists@4.0.0/node_modules/path-exists/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var { promisify } = require("util"); + var pAccess = promisify(fs.access); + module2.exports = async (path) => { + try { + await pAccess(path); + return true; + } catch (_) { + return false; + } + }; + module2.exports.sync = (path) => { + try { + fs.accessSync(path); + return true; + } catch (_) { + return false; + } + }; + } +}); + +// ../../node_modules/.pnpm/find-up@5.0.0/node_modules/find-up/index.js +var require_find_up = __commonJS({ + "../../node_modules/.pnpm/find-up@5.0.0/node_modules/find-up/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var locatePath = require_locate_path(); + var pathExists = require_path_exists(); + var stop = Symbol("findUp.stop"); + module2.exports = async (name, options = {}) => { + let directory = path.resolve(options.cwd || ""); + const { root } = path.parse(directory); + const paths = [].concat(name); + const runMatcher = async (locateOptions) => { + if (typeof name !== "function") { + return locatePath(paths, locateOptions); + } + const foundPath = await name(locateOptions.cwd); + if (typeof foundPath === "string") { + return locatePath([foundPath], locateOptions); + } + return foundPath; + }; + while (true) { + const foundPath = await runMatcher({ ...options, cwd: directory }); + if (foundPath === stop) { + return; + } + if (foundPath) { + return path.resolve(directory, foundPath); + } + if (directory === root) { + return; + } + directory = path.dirname(directory); + } + }; + module2.exports.sync = (name, options = {}) => { + let directory = path.resolve(options.cwd || ""); + const { root } = path.parse(directory); + const paths = [].concat(name); + const runMatcher = (locateOptions) => { + if (typeof name !== "function") { + return locatePath.sync(paths, locateOptions); + } + const foundPath = name(locateOptions.cwd); + if (typeof foundPath === "string") { + return locatePath.sync([foundPath], locateOptions); + } + return foundPath; + }; + while (true) { + const foundPath = runMatcher({ ...options, cwd: directory }); + if (foundPath === stop) { + return; + } + if (foundPath) { + return path.resolve(directory, foundPath); + } + if (directory === root) { + return; + } + directory = path.dirname(directory); + } + }; + module2.exports.exists = pathExists; + module2.exports.sync.exists = pathExists.sync; + module2.exports.stop = stop; + } +}); + +// ../filter-workspace-packages/lib/getChangedPackages.js +var require_getChangedPackages = __commonJS({ + "../filter-workspace-packages/lib/getChangedPackages.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var micromatch = __importStar2(require_micromatch()); + var execa_1 = __importDefault(require_lib26()); + var find_up_1 = __importDefault(require_find_up()); + async function changedSince(packageDirs, commit, opts) { + var _a, _b, _c; + const repoRoot = path_1.default.resolve((_a = await find_up_1.default(".git", { cwd: opts.workspaceDir, type: "directory" })) !== null && _a !== void 0 ? _a : opts.workspaceDir, ".."); + const changedDirs = (await getChangedDirsSinceCommit(commit, opts.workspaceDir, (_b = opts.testPattern) !== null && _b !== void 0 ? _b : [], (_c = opts.changedFilesIgnorePattern) !== null && _c !== void 0 ? _c : [])).map((changedDir) => ({ ...changedDir, dir: path_1.default.join(repoRoot, changedDir.dir) })); + const pkgChangeTypes = new Map(); + for (const pkgDir of packageDirs) { + pkgChangeTypes.set(pkgDir, void 0); + } + for (const changedDir of changedDirs) { + let currentDir = changedDir.dir; + while (!pkgChangeTypes.has(currentDir)) { + const nextDir = path_1.default.dirname(currentDir); + if (nextDir === currentDir) + break; + currentDir = nextDir; + } + if (pkgChangeTypes.get(currentDir) === "source") + continue; + pkgChangeTypes.set(currentDir, changedDir.changeType); + } + const changedPkgs = []; + const ignoreDependentForPkgs = []; + for (const [changedDir, changeType] of pkgChangeTypes.entries()) { + switch (changeType) { + case "source": + changedPkgs.push(changedDir); + break; + case "test": + ignoreDependentForPkgs.push(changedDir); + break; + } + } + return [changedPkgs, ignoreDependentForPkgs]; + } + exports2.default = changedSince; + async function getChangedDirsSinceCommit(commit, workingDir, testPattern, changedFilesIgnorePattern) { + let diff; + try { + diff = (await execa_1.default("git", [ + "diff", + "--name-only", + commit, + "--", + workingDir + ], { cwd: workingDir })).stdout; + } catch (err) { + throw new error_1.default("FILTER_CHANGED", `Filtering by changed packages failed. ${err.stderr}`); + } + const changedDirs = new Map(); + if (!diff) { + return []; + } + const allChangedFiles = diff.split("\n"); + const patterns = changedFilesIgnorePattern.filter((pattern) => pattern.length); + const changedFiles = patterns.length > 0 ? micromatch.not(allChangedFiles, patterns, { + dot: true + }) : allChangedFiles; + for (const changedFile of changedFiles) { + const dir = path_1.default.dirname(changedFile); + if (changedDirs.get(dir) === "source") + continue; + const changeType = testPattern.some((pattern) => micromatch.isMatch(changedFile, pattern)) ? "test" : "source"; + changedDirs.set(dir, changeType); + } + return Array.from(changedDirs.entries()).map(([dir, changeType]) => ({ dir, changeType })); + } + } +}); + +// ../filter-workspace-packages/lib/parsePackageSelector.js +var require_parsePackageSelector = __commonJS({ + "../filter-workspace-packages/lib/parsePackageSelector.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + exports2.default = (rawSelector, prefix) => { + var _a; + let exclude = false; + if (rawSelector[0] === "!") { + exclude = true; + rawSelector = rawSelector.substring(1); + } + let excludeSelf = false; + const includeDependencies = rawSelector.endsWith("..."); + if (includeDependencies) { + rawSelector = rawSelector.substring(0, rawSelector.length - 3); + if (rawSelector.endsWith("^")) { + excludeSelf = true; + rawSelector = rawSelector.substr(0, rawSelector.length - 1); + } + } + const includeDependents = rawSelector.startsWith("..."); + if (includeDependents) { + rawSelector = rawSelector.substring(3); + if (rawSelector.startsWith("^")) { + excludeSelf = true; + rawSelector = rawSelector.substr(1); + } + } + const matches = rawSelector.match(/^([^.][^{}[\]]*)?(\{[^}]+\})?(\[[^\]]+\])?$/); + if (matches === null) { + if (isSelectorByLocation(rawSelector)) { + return { + exclude, + excludeSelf: false, + parentDir: path_1.default.join(prefix, rawSelector) + }; + } + return { + excludeSelf: false, + namePattern: rawSelector + }; + } + return { + diff: (_a = matches[3]) === null || _a === void 0 ? void 0 : _a.substr(1, matches[3].length - 2), + exclude, + excludeSelf, + includeDependencies, + includeDependents, + namePattern: matches[1], + parentDir: matches[2] && path_1.default.join(prefix, matches[2].substr(1, matches[2].length - 2)) + }; + }; + function isSelectorByLocation(rawSelector) { + if (rawSelector[0] !== ".") + return false; + if (rawSelector.length === 1 || rawSelector[1] === "/" || rawSelector[1] === "\\") + return true; + if (rawSelector[1] !== ".") + return false; + return rawSelector.length === 2 || rawSelector[2] === "/" || rawSelector[2] === "\\"; + } + } +}); + +// ../filter-workspace-packages/lib/index.js +var require_lib27 = __commonJS({ + "../filter-workspace-packages/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.filterPkgsBySelectorObjects = exports2.filterPackages = exports2.readProjects = exports2.parsePackageSelector = void 0; + var find_workspace_packages_1 = __importDefault(require_lib22()); + var matcher_1 = __importDefault(require_lib23()); + var pkgs_graph_1 = __importDefault(require_lib25()); + var is_subdir_1 = __importDefault(require_is_subdir()); + var difference_1 = __importDefault(require_difference()); + var partition_1 = __importDefault(require_partition4()); + var pick_1 = __importDefault(require_pick()); + var micromatch = __importStar2(require_micromatch()); + var getChangedPackages_1 = __importDefault(require_getChangedPackages()); + var parsePackageSelector_1 = __importDefault(require_parsePackageSelector()); + exports2.parsePackageSelector = parsePackageSelector_1.default; + async function readProjects(workspaceDir, pkgSelectors, opts) { + const allProjects = await find_workspace_packages_1.default(workspaceDir, {}); + const { selectedProjectsGraph } = await filterPkgsBySelectorObjects(allProjects, pkgSelectors, { + linkWorkspacePackages: opts === null || opts === void 0 ? void 0 : opts.linkWorkspacePackages, + workspaceDir, + changedFilesIgnorePattern: opts === null || opts === void 0 ? void 0 : opts.changedFilesIgnorePattern + }); + return { allProjects, selectedProjectsGraph }; + } + exports2.readProjects = readProjects; + async function filterPackages(pkgs, filter, opts) { + const packageSelectors = filter.map(({ filter: f, followProdDepsOnly }) => ({ ...parsePackageSelector_1.default(f, opts.prefix), followProdDepsOnly })); + return filterPkgsBySelectorObjects(pkgs, packageSelectors, opts); + } + exports2.filterPackages = filterPackages; + async function filterPkgsBySelectorObjects(pkgs, packageSelectors, opts) { + const [prodPackageSelectors, allPackageSelectors] = partition_1.default(({ followProdDepsOnly }) => !!followProdDepsOnly, packageSelectors); + if (allPackageSelectors.length > 0 || prodPackageSelectors.length > 0) { + let filteredGraph; + if (allPackageSelectors.length > 0) { + const { graph } = pkgs_graph_1.default(pkgs, { linkWorkspacePackages: opts.linkWorkspacePackages }); + filteredGraph = await filterGraph(graph, allPackageSelectors, { + workspaceDir: opts.workspaceDir, + testPattern: opts.testPattern, + changedFilesIgnorePattern: opts.changedFilesIgnorePattern, + useGlobDirFiltering: opts.useGlobDirFiltering + }); + } + let prodFilteredGraph; + if (prodPackageSelectors.length > 0) { + const { graph } = pkgs_graph_1.default(pkgs, { ignoreDevDeps: true, linkWorkspacePackages: opts.linkWorkspacePackages }); + prodFilteredGraph = await filterGraph(graph, prodPackageSelectors, { + workspaceDir: opts.workspaceDir, + testPattern: opts.testPattern, + changedFilesIgnorePattern: opts.changedFilesIgnorePattern, + useGlobDirFiltering: opts.useGlobDirFiltering + }); + } + return Promise.resolve({ + selectedProjectsGraph: { + ...prodFilteredGraph === null || prodFilteredGraph === void 0 ? void 0 : prodFilteredGraph.selectedProjectsGraph, + ...filteredGraph === null || filteredGraph === void 0 ? void 0 : filteredGraph.selectedProjectsGraph + }, + unmatchedFilters: [ + ...prodFilteredGraph !== void 0 ? prodFilteredGraph.unmatchedFilters : [], + ...filteredGraph !== void 0 ? filteredGraph.unmatchedFilters : [] + ] + }); + } else { + const { graph } = pkgs_graph_1.default(pkgs, { linkWorkspacePackages: opts.linkWorkspacePackages }); + return Promise.resolve({ selectedProjectsGraph: graph, unmatchedFilters: [] }); + } + } + exports2.filterPkgsBySelectorObjects = filterPkgsBySelectorObjects; + async function filterGraph(pkgGraph, packageSelectors, opts) { + const [excludeSelectors, includeSelectors] = partition_1.default((selector) => selector.exclude === true, packageSelectors); + const fg = _filterGraph.bind(null, pkgGraph, opts); + const include = includeSelectors.length === 0 ? { selected: Object.keys(pkgGraph), unmatchedFilters: [] } : await fg(includeSelectors); + const exclude = await fg(excludeSelectors); + return { + selectedProjectsGraph: pick_1.default(difference_1.default(include.selected, exclude.selected), pkgGraph), + unmatchedFilters: [...include.unmatchedFilters, ...exclude.unmatchedFilters] + }; + } + exports2.default = filterGraph; + async function _filterGraph(pkgGraph, opts, packageSelectors) { + var _a; + const cherryPickedPackages = []; + const walkedDependencies = new Set(); + const walkedDependents = new Set(); + const walkedDependentsDependencies = new Set(); + const graph = pkgGraphToGraph(pkgGraph); + const unmatchedFilters = []; + let reversedGraph; + const matchPackagesByPath = opts.useGlobDirFiltering === true ? matchPackagesByGlob : matchPackagesByExactPath; + for (const selector of packageSelectors) { + let entryPackages = null; + if (selector.diff) { + let ignoreDependentForPkgs = []; + [entryPackages, ignoreDependentForPkgs] = await getChangedPackages_1.default(Object.keys(pkgGraph), selector.diff, { workspaceDir: (_a = selector.parentDir) !== null && _a !== void 0 ? _a : opts.workspaceDir, testPattern: opts.testPattern, changedFilesIgnorePattern: opts.changedFilesIgnorePattern }); + selectEntries({ + ...selector, + includeDependents: false + }, ignoreDependentForPkgs); + } else if (selector.parentDir) { + entryPackages = matchPackagesByPath(pkgGraph, selector.parentDir); + } + if (selector.namePattern) { + if (entryPackages == null) { + entryPackages = matchPackages(pkgGraph, selector.namePattern); + } else { + entryPackages = matchPackages(pick_1.default(entryPackages, pkgGraph), selector.namePattern); + } + } + if (entryPackages == null) { + throw new Error(`Unsupported package selector: ${JSON.stringify(selector)}`); + } + if (entryPackages.length === 0) { + if (selector.namePattern) { + unmatchedFilters.push(selector.namePattern); + } + if (selector.parentDir) { + unmatchedFilters.push(selector.parentDir); + } + } + selectEntries(selector, entryPackages); + } + const walked = new Set([...walkedDependencies, ...walkedDependents, ...walkedDependentsDependencies]); + cherryPickedPackages.forEach((cherryPickedPackage) => walked.add(cherryPickedPackage)); + return { + selected: Array.from(walked), + unmatchedFilters + }; + function selectEntries(selector, entryPackages) { + if (selector.includeDependencies) { + pickSubgraph(graph, entryPackages, walkedDependencies, { includeRoot: !selector.excludeSelf }); + } + if (selector.includeDependents) { + if (reversedGraph == null) { + reversedGraph = reverseGraph(graph); + } + pickSubgraph(reversedGraph, entryPackages, walkedDependents, { includeRoot: !selector.excludeSelf }); + } + if (selector.includeDependencies && selector.includeDependents) { + pickSubgraph(graph, Array.from(walkedDependents), walkedDependentsDependencies, { includeRoot: false }); + } + if (!selector.includeDependencies && !selector.includeDependents) { + Array.prototype.push.apply(cherryPickedPackages, entryPackages); + } + } + } + function pkgGraphToGraph(pkgGraph) { + const graph = {}; + Object.keys(pkgGraph).forEach((nodeId) => { + graph[nodeId] = pkgGraph[nodeId].dependencies; + }); + return graph; + } + function reverseGraph(graph) { + const reversedGraph = {}; + Object.keys(graph).forEach((dependentNodeId) => { + graph[dependentNodeId].forEach((dependencyNodeId) => { + if (!reversedGraph[dependencyNodeId]) { + reversedGraph[dependencyNodeId] = [dependentNodeId]; + } else { + reversedGraph[dependencyNodeId].push(dependentNodeId); + } + }); + }); + return reversedGraph; + } + function matchPackages(graph, pattern) { + const match = matcher_1.default(pattern); + return Object.keys(graph).filter((id) => graph[id].package.manifest.name && match(graph[id].package.manifest.name)); + } + function matchPackagesByExactPath(graph, pathStartsWith) { + return Object.keys(graph).filter((parentDir) => is_subdir_1.default(pathStartsWith, parentDir)); + } + function matchPackagesByGlob(graph, pathStartsWith) { + const format = (str) => str.replace(/\/$/, ""); + const formattedFilter = pathStartsWith.replace(/\\/g, "/").replace(/\/$/, ""); + return Object.keys(graph).filter((parentDir) => micromatch.isMatch(parentDir, formattedFilter, { format })); + } + function pickSubgraph(graph, nextNodeIds, walked, opts) { + for (const nextNodeId of nextNodeIds) { + if (!walked.has(nextNodeId)) { + if (opts.includeRoot) { + walked.add(nextNodeId); + } + if (graph[nextNodeId]) + pickSubgraph(graph, graph[nextNodeId], walked, { includeRoot: true }); + } + } + } + } +}); + +// ../../node_modules/.pnpm/@zkochan+retry@0.2.0/node_modules/@zkochan/retry/lib/retry_operation.js +var require_retry_operation = __commonJS({ + "../../node_modules/.pnpm/@zkochan+retry@0.2.0/node_modules/@zkochan/retry/lib/retry_operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var RetryOperation = class { + constructor(timeouts, options) { + var _a; + this._originalTimeouts = [...timeouts]; + this._timeouts = timeouts; + this._maxRetryTime = (_a = options === null || options === void 0 ? void 0 : options.maxRetryTime) !== null && _a !== void 0 ? _a : Infinity; + this._fn = null; + this._errors = []; + this._attempts = 1; + this._operationStart = null; + this._timer = null; + } + reset() { + this._attempts = 1; + this._timeouts = this._originalTimeouts; + } + stop() { + if (this._timer) { + clearTimeout(this._timer); + } + this._timeouts = []; + } + retry(err) { + if (!err) { + return false; + } + var currentTime = new Date().getTime(); + if (err && currentTime - this._operationStart >= this._maxRetryTime) { + this._errors.unshift(new Error("RetryOperation timeout occurred")); + return false; + } + this._errors.push(err); + var timeout = this._timeouts.shift(); + if (timeout === void 0) { + return false; + } + this._timer = setTimeout(() => this._fn(++this._attempts), timeout); + return timeout; + } + attempt(fn2) { + this._fn = fn2; + this._operationStart = new Date().getTime(); + this._fn(this._attempts); + } + errors() { + return this._errors; + } + attempts() { + return this._attempts; + } + mainError() { + if (this._errors.length === 0) { + return null; + } + var counts = {}; + var mainError = null; + var mainErrorCount = 0; + for (var i = 0; i < this._errors.length; i++) { + var error = this._errors[i]; + var message2 = error.message; + var count = (counts[message2] || 0) + 1; + counts[message2] = count; + if (count >= mainErrorCount) { + mainError = error; + mainErrorCount = count; + } + } + return mainError; + } + }; + exports2.default = RetryOperation; + } +}); + +// ../../node_modules/.pnpm/@zkochan+retry@0.2.0/node_modules/@zkochan/retry/lib/retry.js +var require_retry2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+retry@0.2.0/node_modules/@zkochan/retry/lib/retry.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createTimeout = exports2.createTimeouts = exports2.operation = void 0; + var retry_operation_1 = require_retry_operation(); + function operation(options) { + var timeouts = createTimeouts(options); + return new retry_operation_1.default(timeouts, { + maxRetryTime: options && options.maxRetryTime + }); + } + exports2.operation = operation; + function createTimeouts(options) { + var opts = { + retries: 10, + factor: 2, + minTimeout: 1 * 1e3, + maxTimeout: Infinity, + randomize: false, + ...options + }; + if (opts.minTimeout > opts.maxTimeout) { + throw new Error("minTimeout is greater than maxTimeout"); + } + var timeouts = []; + for (var i = 0; i < opts.retries; i++) { + timeouts.push(createTimeout(i, opts)); + } + timeouts.sort(function(a, b) { + return a - b; + }); + return timeouts; + } + exports2.createTimeouts = createTimeouts; + function createTimeout(attempt, opts) { + var random = opts.randomize ? Math.random() + 1 : 1; + var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt)); + timeout = Math.min(timeout, opts.maxTimeout); + return timeout; + } + exports2.createTimeout = createTimeout; + } +}); + +// ../../node_modules/.pnpm/data-uri-to-buffer@3.0.1/node_modules/data-uri-to-buffer/dist/src/index.js +var require_src2 = __commonJS({ + "../../node_modules/.pnpm/data-uri-to-buffer@3.0.1/node_modules/data-uri-to-buffer/dist/src/index.js"(exports2, module2) { + "use strict"; + function dataUriToBuffer(uri) { + if (!/^data:/i.test(uri)) { + throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")'); + } + uri = uri.replace(/\r?\n/g, ""); + const firstComma = uri.indexOf(","); + if (firstComma === -1 || firstComma <= 4) { + throw new TypeError("malformed data: URI"); + } + const meta = uri.substring(5, firstComma).split(";"); + let charset = ""; + let base64 = false; + const type = meta[0] || "text/plain"; + let typeFull = type; + for (let i = 1; i < meta.length; i++) { + if (meta[i] === "base64") { + base64 = true; + } else { + typeFull += `;${meta[i]}`; + if (meta[i].indexOf("charset=") === 0) { + charset = meta[i].substring(8); + } + } + } + if (!meta[0] && !charset.length) { + typeFull += ";charset=US-ASCII"; + charset = "US-ASCII"; + } + const encoding = base64 ? "base64" : "ascii"; + const data = unescape(uri.substring(firstComma + 1)); + const buffer = Buffer.from(data, encoding); + buffer.type = type; + buffer.typeFull = typeFull; + buffer.charset = charset; + return buffer; + } + module2.exports = dataUriToBuffer; + } +}); + +// ../../node_modules/.pnpm/fetch-blob@2.1.2/node_modules/fetch-blob/index.js +var require_fetch_blob = __commonJS({ + "../../node_modules/.pnpm/fetch-blob@2.1.2/node_modules/fetch-blob/index.js"(exports2, module2) { + var { Readable } = require("stream"); + var wm = new WeakMap(); + async function* read(parts) { + for (const part of parts) { + if ("stream" in part) { + yield* part.stream(); + } else { + yield part; + } + } + } + var Blob = class { + constructor(blobParts = [], options = {}) { + let size = 0; + const parts = blobParts.map((element) => { + let buffer; + if (element instanceof Buffer) { + buffer = element; + } else if (ArrayBuffer.isView(element)) { + buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); + } else if (element instanceof ArrayBuffer) { + buffer = Buffer.from(element); + } else if (element instanceof Blob) { + buffer = element; + } else { + buffer = Buffer.from(typeof element === "string" ? element : String(element)); + } + size += buffer.length || buffer.size || 0; + return buffer; + }); + const type = options.type === void 0 ? "" : String(options.type).toLowerCase(); + wm.set(this, { + type: /[^\u0020-\u007E]/.test(type) ? "" : type, + size, + parts + }); + } + get size() { + return wm.get(this).size; + } + get type() { + return wm.get(this).type; + } + async text() { + return Buffer.from(await this.arrayBuffer()).toString(); + } + async arrayBuffer() { + const data = new Uint8Array(this.size); + let offset = 0; + for await (const chunk of this.stream()) { + data.set(chunk, offset); + offset += chunk.length; + } + return data.buffer; + } + stream() { + return Readable.from(read(wm.get(this).parts)); + } + slice(start = 0, end = this.size, type = "") { + const { size } = this; + let relativeStart = start < 0 ? Math.max(size + start, 0) : Math.min(start, size); + let relativeEnd = end < 0 ? Math.max(size + end, 0) : Math.min(end, size); + const span = Math.max(relativeEnd - relativeStart, 0); + const parts = wm.get(this).parts.values(); + const blobParts = []; + let added = 0; + for (const part of parts) { + const size2 = ArrayBuffer.isView(part) ? part.byteLength : part.size; + if (relativeStart && size2 <= relativeStart) { + relativeStart -= size2; + relativeEnd -= size2; + } else { + const chunk = part.slice(relativeStart, Math.min(size2, relativeEnd)); + blobParts.push(chunk); + added += ArrayBuffer.isView(chunk) ? chunk.byteLength : chunk.size; + relativeStart = 0; + if (added >= span) { + break; + } + } + } + const blob = new Blob([], { type: String(type).toLowerCase() }); + Object.assign(wm.get(blob), { size: span, parts: blobParts }); + return blob; + } + get [Symbol.toStringTag]() { + return "Blob"; + } + static [Symbol.hasInstance](object) { + return object && typeof object === "object" && typeof object.stream === "function" && object.stream.length === 0 && typeof object.constructor === "function" && /^(Blob|File)$/.test(object[Symbol.toStringTag]); + } + }; + Object.defineProperties(Blob.prototype, { + size: { enumerable: true }, + type: { enumerable: true }, + slice: { enumerable: true } + }); + module2.exports = Blob; + } +}); + +// ../../node_modules/.pnpm/node-fetch@3.0.0-beta.9/node_modules/node-fetch/dist/index.cjs +var require_dist2 = __commonJS({ + "../../node_modules/.pnpm/node-fetch@3.0.0-beta.9/node_modules/node-fetch/dist/index.cjs"(exports2, module2) { + "use strict"; + exports2 = module2.exports = fetch; + var http = require("http"); + var https = require("https"); + var zlib = require("zlib"); + var Stream = require("stream"); + var dataUriToBuffer = require_src2(); + var util = require("util"); + var Blob = require_fetch_blob(); + var crypto = require("crypto"); + var url = require("url"); + var FetchBaseError = class extends Error { + constructor(message2, type) { + super(message2); + Error.captureStackTrace(this, this.constructor); + this.type = type; + } + get name() { + return this.constructor.name; + } + get [Symbol.toStringTag]() { + return this.constructor.name; + } + }; + var FetchError = class extends FetchBaseError { + constructor(message2, type, systemError) { + super(message2, type); + if (systemError) { + this.code = this.errno = systemError.code; + this.erroredSysCall = systemError.syscall; + } + } + }; + var NAME = Symbol.toStringTag; + var isURLSearchParameters = (object) => { + return typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && typeof object.sort === "function" && object[NAME] === "URLSearchParams"; + }; + var isBlob = (object) => { + return typeof object === "object" && typeof object.arrayBuffer === "function" && typeof object.type === "string" && typeof object.stream === "function" && typeof object.constructor === "function" && /^(Blob|File)$/.test(object[NAME]); + }; + function isFormData(object) { + return typeof object === "object" && typeof object.append === "function" && typeof object.set === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.delete === "function" && typeof object.keys === "function" && typeof object.values === "function" && typeof object.entries === "function" && typeof object.constructor === "function" && object[NAME] === "FormData"; + } + var isAbortSignal = (object) => { + return typeof object === "object" && object[NAME] === "AbortSignal"; + }; + var carriage = "\r\n"; + var dashes = "-".repeat(2); + var carriageLength = Buffer.byteLength(carriage); + var getFooter = (boundary) => `${dashes}${boundary}${dashes}${carriage.repeat(2)}`; + function getHeader(boundary, name, field) { + let header = ""; + header += `${dashes}${boundary}${carriage}`; + header += `Content-Disposition: form-data; name="${name}"`; + if (isBlob(field)) { + header += `; filename="${field.name}"${carriage}`; + header += `Content-Type: ${field.type || "application/octet-stream"}`; + } + return `${header}${carriage.repeat(2)}`; + } + var getBoundary = () => crypto.randomBytes(8).toString("hex"); + async function* formDataIterator(form, boundary) { + for (const [name, value] of form) { + yield getHeader(boundary, name, value); + if (isBlob(value)) { + yield* value.stream(); + } else { + yield value; + } + yield carriage; + } + yield getFooter(boundary); + } + function getFormDataLength(form, boundary) { + let length = 0; + for (const [name, value] of form) { + length += Buffer.byteLength(getHeader(boundary, name, value)); + if (isBlob(value)) { + length += value.size; + } else { + length += Buffer.byteLength(String(value)); + } + length += carriageLength; + } + length += Buffer.byteLength(getFooter(boundary)); + return length; + } + var INTERNALS = Symbol("Body internals"); + var Body = class { + constructor(body, { + size = 0 + } = {}) { + let boundary = null; + if (body === null) { + body = null; + } else if (isURLSearchParameters(body)) { + body = Buffer.from(body.toString()); + } else if (isBlob(body)) + ; + else if (Buffer.isBuffer(body)) + ; + else if (util.types.isAnyArrayBuffer(body)) { + body = Buffer.from(body); + } else if (ArrayBuffer.isView(body)) { + body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); + } else if (body instanceof Stream) + ; + else if (isFormData(body)) { + boundary = `NodeFetchFormDataBoundary${getBoundary()}`; + body = Stream.Readable.from(formDataIterator(body, boundary)); + } else { + body = Buffer.from(String(body)); + } + this[INTERNALS] = { + body, + boundary, + disturbed: false, + error: null + }; + this.size = size; + if (body instanceof Stream) { + body.on("error", (err) => { + const error = err instanceof FetchBaseError ? err : new FetchError(`Invalid response body while trying to fetch ${this.url}: ${err.message}`, "system", err); + this[INTERNALS].error = error; + }); + } + } + get body() { + return this[INTERNALS].body; + } + get bodyUsed() { + return this[INTERNALS].disturbed; + } + async arrayBuffer() { + const { buffer, byteOffset, byteLength } = await consumeBody(this); + return buffer.slice(byteOffset, byteOffset + byteLength); + } + async blob() { + const ct = this.headers && this.headers.get("content-type") || this[INTERNALS].body && this[INTERNALS].body.type || ""; + const buf = await this.buffer(); + return new Blob([buf], { + type: ct + }); + } + async json() { + const buffer = await consumeBody(this); + return JSON.parse(buffer.toString()); + } + async text() { + const buffer = await consumeBody(this); + return buffer.toString(); + } + buffer() { + return consumeBody(this); + } + }; + Object.defineProperties(Body.prototype, { + body: { enumerable: true }, + bodyUsed: { enumerable: true }, + arrayBuffer: { enumerable: true }, + blob: { enumerable: true }, + json: { enumerable: true }, + text: { enumerable: true } + }); + async function consumeBody(data) { + if (data[INTERNALS].disturbed) { + throw new TypeError(`body used already for: ${data.url}`); + } + data[INTERNALS].disturbed = true; + if (data[INTERNALS].error) { + throw data[INTERNALS].error; + } + let { body } = data; + if (body === null) { + return Buffer.alloc(0); + } + if (isBlob(body)) { + body = body.stream(); + } + if (Buffer.isBuffer(body)) { + return body; + } + if (!(body instanceof Stream)) { + return Buffer.alloc(0); + } + const accum = []; + let accumBytes = 0; + try { + for await (const chunk of body) { + if (data.size > 0 && accumBytes + chunk.length > data.size) { + const err = new FetchError(`content size at ${data.url} over limit: ${data.size}`, "max-size"); + body.destroy(err); + throw err; + } + accumBytes += chunk.length; + accum.push(chunk); + } + } catch (error) { + if (error instanceof FetchBaseError) { + throw error; + } else { + throw new FetchError(`Invalid response body while trying to fetch ${data.url}: ${error.message}`, "system", error); + } + } + if (body.readableEnded === true || body._readableState.ended === true) { + try { + if (accum.every((c) => typeof c === "string")) { + return Buffer.from(accum.join("")); + } + return Buffer.concat(accum, accumBytes); + } catch (error) { + throw new FetchError(`Could not create Buffer from response body for ${data.url}: ${error.message}`, "system", error); + } + } else { + throw new FetchError(`Premature close of server response while trying to fetch ${data.url}`); + } + } + var clone = (instance, highWaterMark) => { + let p1; + let p2; + let { body } = instance; + if (instance.bodyUsed) { + throw new Error("cannot clone body after it is used"); + } + if (body instanceof Stream && typeof body.getBoundary !== "function") { + p1 = new Stream.PassThrough({ highWaterMark }); + p2 = new Stream.PassThrough({ highWaterMark }); + body.pipe(p1); + body.pipe(p2); + instance[INTERNALS].body = p1; + body = p2; + } + return body; + }; + var extractContentType = (body, request) => { + if (body === null) { + return null; + } + if (typeof body === "string") { + return "text/plain;charset=UTF-8"; + } + if (isURLSearchParameters(body)) { + return "application/x-www-form-urlencoded;charset=UTF-8"; + } + if (isBlob(body)) { + return body.type || null; + } + if (Buffer.isBuffer(body) || util.types.isAnyArrayBuffer(body) || ArrayBuffer.isView(body)) { + return null; + } + if (body && typeof body.getBoundary === "function") { + return `multipart/form-data;boundary=${body.getBoundary()}`; + } + if (isFormData(body)) { + return `multipart/form-data; boundary=${request[INTERNALS].boundary}`; + } + if (body instanceof Stream) { + return null; + } + return "text/plain;charset=UTF-8"; + }; + var getTotalBytes = (request) => { + const { body } = request; + if (body === null) { + return 0; + } + if (isBlob(body)) { + return body.size; + } + if (Buffer.isBuffer(body)) { + return body.length; + } + if (body && typeof body.getLengthSync === "function") { + return body.hasKnownLength && body.hasKnownLength() ? body.getLengthSync() : null; + } + if (isFormData(body)) { + return getFormDataLength(request[INTERNALS].boundary); + } + return null; + }; + var writeToStream = (dest, { body }) => { + if (body === null) { + dest.end(); + } else if (isBlob(body)) { + body.stream().pipe(dest); + } else if (Buffer.isBuffer(body)) { + dest.write(body); + dest.end(); + } else { + body.pipe(dest); + } + }; + var validateHeaderName = typeof http.validateHeaderName === "function" ? http.validateHeaderName : (name) => { + if (!/^[\^`\-\w!#$%&'*+.|~]+$/.test(name)) { + const err = new TypeError(`Header name must be a valid HTTP token [${name}]`); + Object.defineProperty(err, "code", { value: "ERR_INVALID_HTTP_TOKEN" }); + throw err; + } + }; + var validateHeaderValue = typeof http.validateHeaderValue === "function" ? http.validateHeaderValue : (name, value) => { + if (/[^\t\u0020-\u007E\u0080-\u00FF]/.test(value)) { + const err = new TypeError(`Invalid character in header content ["${name}"]`); + Object.defineProperty(err, "code", { value: "ERR_INVALID_CHAR" }); + throw err; + } + }; + var Headers = class extends URLSearchParams { + constructor(init) { + let result = []; + if (init instanceof Headers) { + const raw = init.raw(); + for (const [name, values] of Object.entries(raw)) { + result.push(...values.map((value) => [name, value])); + } + } else if (init == null) + ; + else if (typeof init === "object" && !util.types.isBoxedPrimitive(init)) { + const method = init[Symbol.iterator]; + if (method == null) { + result.push(...Object.entries(init)); + } else { + if (typeof method !== "function") { + throw new TypeError("Header pairs must be iterable"); + } + result = [...init].map((pair) => { + if (typeof pair !== "object" || util.types.isBoxedPrimitive(pair)) { + throw new TypeError("Each header pair must be an iterable object"); + } + return [...pair]; + }).map((pair) => { + if (pair.length !== 2) { + throw new TypeError("Each header pair must be a name/value tuple"); + } + return [...pair]; + }); + } + } else { + throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence> or record)"); + } + result = result.length > 0 ? result.map(([name, value]) => { + validateHeaderName(name); + validateHeaderValue(name, String(value)); + return [String(name).toLowerCase(), String(value)]; + }) : void 0; + super(result); + return new Proxy(this, { + get(target, p, receiver) { + switch (p) { + case "append": + case "set": + return (name, value) => { + validateHeaderName(name); + validateHeaderValue(name, String(value)); + return URLSearchParams.prototype[p].call(receiver, String(name).toLowerCase(), String(value)); + }; + case "delete": + case "has": + case "getAll": + return (name) => { + validateHeaderName(name); + return URLSearchParams.prototype[p].call(receiver, String(name).toLowerCase()); + }; + case "keys": + return () => { + target.sort(); + return new Set(URLSearchParams.prototype.keys.call(target)).keys(); + }; + default: + return Reflect.get(target, p, receiver); + } + } + }); + } + get [Symbol.toStringTag]() { + return this.constructor.name; + } + toString() { + return Object.prototype.toString.call(this); + } + get(name) { + const values = this.getAll(name); + if (values.length === 0) { + return null; + } + let value = values.join(", "); + if (/^content-encoding$/i.test(name)) { + value = value.toLowerCase(); + } + return value; + } + forEach(callback) { + for (const name of this.keys()) { + callback(this.get(name), name); + } + } + *values() { + for (const name of this.keys()) { + yield this.get(name); + } + } + *entries() { + for (const name of this.keys()) { + yield [name, this.get(name)]; + } + } + [Symbol.iterator]() { + return this.entries(); + } + raw() { + return [...this.keys()].reduce((result, key) => { + result[key] = this.getAll(key); + return result; + }, {}); + } + [Symbol.for("nodejs.util.inspect.custom")]() { + return [...this.keys()].reduce((result, key) => { + const values = this.getAll(key); + if (key === "host") { + result[key] = values[0]; + } else { + result[key] = values.length > 1 ? values : values[0]; + } + return result; + }, {}); + } + }; + Object.defineProperties(Headers.prototype, ["get", "entries", "forEach", "values"].reduce((result, property) => { + result[property] = { enumerable: true }; + return result; + }, {})); + function fromRawHeaders(headers = []) { + return new Headers(headers.reduce((result, value, index, array) => { + if (index % 2 === 0) { + result.push(array.slice(index, index + 2)); + } + return result; + }, []).filter(([name, value]) => { + try { + validateHeaderName(name); + validateHeaderValue(name, String(value)); + return true; + } catch { + return false; + } + })); + } + var redirectStatus = new Set([301, 302, 303, 307, 308]); + var isRedirect = (code) => { + return redirectStatus.has(code); + }; + var INTERNALS$1 = Symbol("Response internals"); + var Response = class extends Body { + constructor(body = null, options = {}) { + super(body, options); + const status = options.status || 200; + const headers = new Headers(options.headers); + if (body !== null && !headers.has("Content-Type")) { + const contentType = extractContentType(body); + if (contentType) { + headers.append("Content-Type", contentType); + } + } + this[INTERNALS$1] = { + url: options.url, + status, + statusText: options.statusText || "", + headers, + counter: options.counter, + highWaterMark: options.highWaterMark + }; + } + get url() { + return this[INTERNALS$1].url || ""; + } + get status() { + return this[INTERNALS$1].status; + } + get ok() { + return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; + } + get redirected() { + return this[INTERNALS$1].counter > 0; + } + get statusText() { + return this[INTERNALS$1].statusText; + } + get headers() { + return this[INTERNALS$1].headers; + } + get highWaterMark() { + return this[INTERNALS$1].highWaterMark; + } + clone() { + return new Response(clone(this, this.highWaterMark), { + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok, + redirected: this.redirected, + size: this.size + }); + } + static redirect(url2, status = 302) { + if (!isRedirect(status)) { + throw new RangeError('Failed to execute "redirect" on "response": Invalid status code'); + } + return new Response(null, { + headers: { + location: new URL(url2).toString() + }, + status + }); + } + get [Symbol.toStringTag]() { + return "Response"; + } + }; + Object.defineProperties(Response.prototype, { + url: { enumerable: true }, + status: { enumerable: true }, + ok: { enumerable: true }, + redirected: { enumerable: true }, + statusText: { enumerable: true }, + headers: { enumerable: true }, + clone: { enumerable: true } + }); + var getSearch = (parsedURL) => { + if (parsedURL.search) { + return parsedURL.search; + } + const lastOffset = parsedURL.href.length - 1; + const hash = parsedURL.hash || (parsedURL.href[lastOffset] === "#" ? "#" : ""); + return parsedURL.href[lastOffset - hash.length] === "?" ? "?" : ""; + }; + var INTERNALS$2 = Symbol("Request internals"); + var isRequest = (object) => { + return typeof object === "object" && typeof object[INTERNALS$2] === "object"; + }; + var Request = class extends Body { + constructor(input, init = {}) { + let parsedURL; + if (isRequest(input)) { + parsedURL = new URL(input.url); + } else { + parsedURL = new URL(input); + input = {}; + } + let method = init.method || input.method || "GET"; + method = method.toUpperCase(); + if ((init.body != null || isRequest(input)) && input.body !== null && (method === "GET" || method === "HEAD")) { + throw new TypeError("Request with GET/HEAD method cannot have body"); + } + const inputBody = init.body ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; + super(inputBody, { + size: init.size || input.size || 0 + }); + const headers = new Headers(init.headers || input.headers || {}); + if (inputBody !== null && !headers.has("Content-Type")) { + const contentType = extractContentType(inputBody, this); + if (contentType) { + headers.append("Content-Type", contentType); + } + } + let signal = isRequest(input) ? input.signal : null; + if ("signal" in init) { + signal = init.signal; + } + if (signal !== null && !isAbortSignal(signal)) { + throw new TypeError("Expected signal to be an instanceof AbortSignal"); + } + this[INTERNALS$2] = { + method, + redirect: init.redirect || input.redirect || "follow", + headers, + parsedURL, + signal + }; + this.follow = init.follow === void 0 ? input.follow === void 0 ? 20 : input.follow : init.follow; + this.compress = init.compress === void 0 ? input.compress === void 0 ? true : input.compress : init.compress; + this.counter = init.counter || input.counter || 0; + this.agent = init.agent || input.agent; + this.highWaterMark = init.highWaterMark || input.highWaterMark || 16384; + this.insecureHTTPParser = init.insecureHTTPParser || input.insecureHTTPParser || false; + } + get method() { + return this[INTERNALS$2].method; + } + get url() { + return url.format(this[INTERNALS$2].parsedURL); + } + get headers() { + return this[INTERNALS$2].headers; + } + get redirect() { + return this[INTERNALS$2].redirect; + } + get signal() { + return this[INTERNALS$2].signal; + } + clone() { + return new Request(this); + } + get [Symbol.toStringTag]() { + return "Request"; + } + }; + Object.defineProperties(Request.prototype, { + method: { enumerable: true }, + url: { enumerable: true }, + headers: { enumerable: true }, + redirect: { enumerable: true }, + clone: { enumerable: true }, + signal: { enumerable: true } + }); + var getNodeRequestOptions = (request) => { + const { parsedURL } = request[INTERNALS$2]; + const headers = new Headers(request[INTERNALS$2].headers); + if (!headers.has("Accept")) { + headers.set("Accept", "*/*"); + } + let contentLengthValue = null; + if (request.body === null && /^(post|put)$/i.test(request.method)) { + contentLengthValue = "0"; + } + if (request.body !== null) { + const totalBytes = getTotalBytes(request); + if (typeof totalBytes === "number" && !Number.isNaN(totalBytes)) { + contentLengthValue = String(totalBytes); + } + } + if (contentLengthValue) { + headers.set("Content-Length", contentLengthValue); + } + if (!headers.has("User-Agent")) { + headers.set("User-Agent", "node-fetch"); + } + if (request.compress && !headers.has("Accept-Encoding")) { + headers.set("Accept-Encoding", "gzip,deflate,br"); + } + let { agent } = request; + if (typeof agent === "function") { + agent = agent(parsedURL); + } + if (!headers.has("Connection") && !agent) { + headers.set("Connection", "close"); + } + const search = getSearch(parsedURL); + const requestOptions = { + path: parsedURL.pathname + search, + pathname: parsedURL.pathname, + hostname: parsedURL.hostname, + protocol: parsedURL.protocol, + port: parsedURL.port, + hash: parsedURL.hash, + search: parsedURL.search, + query: parsedURL.query, + href: parsedURL.href, + method: request.method, + headers: headers[Symbol.for("nodejs.util.inspect.custom")](), + insecureHTTPParser: request.insecureHTTPParser, + agent + }; + return requestOptions; + }; + var AbortError = class extends FetchBaseError { + constructor(message2, type = "aborted") { + super(message2, type); + } + }; + var supportedSchemas = new Set(["data:", "http:", "https:"]); + async function fetch(url2, options_) { + return new Promise((resolve, reject) => { + const request = new Request(url2, options_); + const options = getNodeRequestOptions(request); + if (!supportedSchemas.has(options.protocol)) { + throw new TypeError(`node-fetch cannot load ${url2}. URL scheme "${options.protocol.replace(/:$/, "")}" is not supported.`); + } + if (options.protocol === "data:") { + const data = dataUriToBuffer(request.url); + const response2 = new Response(data, { headers: { "Content-Type": data.typeFull } }); + resolve(response2); + return; + } + const send = (options.protocol === "https:" ? https : http).request; + const { signal } = request; + let response = null; + const abort = () => { + const error = new AbortError("The operation was aborted."); + reject(error); + if (request.body && request.body instanceof Stream.Readable) { + request.body.destroy(error); + } + if (!response || !response.body) { + return; + } + response.body.emit("error", error); + }; + if (signal && signal.aborted) { + abort(); + return; + } + const abortAndFinalize = () => { + abort(); + finalize(); + }; + const request_ = send(options); + if (signal) { + signal.addEventListener("abort", abortAndFinalize); + } + const finalize = () => { + request_.abort(); + if (signal) { + signal.removeEventListener("abort", abortAndFinalize); + } + }; + request_.on("error", (err) => { + reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, "system", err)); + finalize(); + }); + request_.on("response", (response_) => { + request_.setTimeout(0); + const headers = fromRawHeaders(response_.rawHeaders); + if (isRedirect(response_.statusCode)) { + const location = headers.get("Location"); + const locationURL = location === null ? null : new URL(location, request.url); + switch (request.redirect) { + case "error": + reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, "no-redirect")); + finalize(); + return; + case "manual": + if (locationURL !== null) { + try { + headers.set("Location", locationURL); + } catch (error) { + reject(error); + } + } + break; + case "follow": { + if (locationURL === null) { + break; + } + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${request.url}`, "max-redirect")); + finalize(); + return; + } + const requestOptions = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: request.body, + signal: request.signal, + size: request.size + }; + if (response_.statusCode !== 303 && request.body && options_.body instanceof Stream.Readable) { + reject(new FetchError("Cannot follow redirect with body being a readable stream", "unsupported-redirect")); + finalize(); + return; + } + if (response_.statusCode === 303 || (response_.statusCode === 301 || response_.statusCode === 302) && request.method === "POST") { + requestOptions.method = "GET"; + requestOptions.body = void 0; + requestOptions.headers.delete("content-length"); + } + resolve(fetch(new Request(locationURL, requestOptions))); + finalize(); + return; + } + } + } + response_.once("end", () => { + if (signal) { + signal.removeEventListener("abort", abortAndFinalize); + } + }); + let body = Stream.pipeline(response_, new Stream.PassThrough(), (error) => { + reject(error); + }); + if (process.version < "v12.10") { + response_.on("aborted", abortAndFinalize); + } + const responseOptions = { + url: request.url, + status: response_.statusCode, + statusText: response_.statusMessage, + headers, + size: request.size, + counter: request.counter, + highWaterMark: request.highWaterMark + }; + const codings = headers.get("Content-Encoding"); + if (!request.compress || request.method === "HEAD" || codings === null || response_.statusCode === 204 || response_.statusCode === 304) { + response = new Response(body, responseOptions); + resolve(response); + return; + } + const zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + }; + if (codings === "gzip" || codings === "x-gzip") { + body = Stream.pipeline(body, zlib.createGunzip(zlibOptions), (error) => { + reject(error); + }); + response = new Response(body, responseOptions); + resolve(response); + return; + } + if (codings === "deflate" || codings === "x-deflate") { + const raw = Stream.pipeline(response_, new Stream.PassThrough(), (error) => { + reject(error); + }); + raw.once("data", (chunk) => { + if ((chunk[0] & 15) === 8) { + body = Stream.pipeline(body, zlib.createInflate(), (error) => { + reject(error); + }); + } else { + body = Stream.pipeline(body, zlib.createInflateRaw(), (error) => { + reject(error); + }); + } + response = new Response(body, responseOptions); + resolve(response); + }); + return; + } + if (codings === "br") { + body = Stream.pipeline(body, zlib.createBrotliDecompress(), (error) => { + reject(error); + }); + response = new Response(body, responseOptions); + resolve(response); + return; + } + response = new Response(body, responseOptions); + resolve(response); + }); + writeToStream(request_, request); + }); + } + exports2.AbortError = AbortError; + exports2.FetchError = FetchError; + exports2.Headers = Headers; + exports2.Request = Request; + exports2.Response = Response; + exports2.default = fetch; + exports2.isRedirect = isRedirect; + } +}); + +// ../fetch/lib/fetch.js +var require_fetch = __commonJS({ + "../fetch/lib/fetch.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ResponseError = exports2.isRedirect = exports2.Response = void 0; + var core_loggers_1 = require_lib12(); + var retry_1 = require_retry2(); + var node_fetch_1 = __importStar2(require_dist2()); + Object.defineProperty(exports2, "Response", { enumerable: true, get: function() { + return node_fetch_1.Response; + } }); + var MIN_TIMEOUT = 10; + var MAX_RETRIES = 5; + var MAX_RETRY_AFTER = 20; + var FACTOR = 6; + exports2.isRedirect = node_fetch_1.default.isRedirect; + async function fetchRetry(url, opts = {}) { + const retryOpts = Object.assign({ + factor: FACTOR, + maxRetryAfter: MAX_RETRY_AFTER, + minTimeout: MIN_TIMEOUT, + retries: MAX_RETRIES + }, opts.retry); + const op = retry_1.operation(retryOpts); + try { + return await new Promise((resolve, reject) => op.attempt(async (attempt) => { + var _a; + try { + const res = await node_fetch_1.default(url, opts); + if (res.status >= 500 && res.status < 600 || res.status === 429) { + throw new ResponseError(res); + } else { + resolve(res); + return; + } + } catch (error) { + const timeout = op.retry(error); + if (timeout === false) { + reject(op.mainError()); + return; + } + core_loggers_1.requestRetryLogger.debug({ + attempt, + error, + maxRetries: retryOpts.retries, + method: (_a = opts.method) !== null && _a !== void 0 ? _a : "GET", + timeout, + url: url.toString() + }); + } + })); + } catch (err) { + if (err instanceof ResponseError) { + return err.res; + } + throw err; + } + } + exports2.default = fetchRetry; + var ResponseError = class extends Error { + constructor(res) { + super(res.statusText); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, ResponseError); + } + this.name = this.constructor.name; + this.res = res; + this.code = this.status = this.statusCode = res.status; + this.url = res.url; + } + }; + exports2.ResponseError = ResponseError; + } +}); + +// ../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js +var require_ms2 = __commonJS({ + "../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports2, module2) { + var s = 1e3; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var w = d * 7; + var y = d * 365.25; + module2.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === "string" && val.length > 0) { + return parse(val); + } else if (type === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val)); + }; + function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || "ms").toLowerCase(); + switch (type) { + case "years": + case "year": + case "yrs": + case "yr": + case "y": + return n * y; + case "weeks": + case "week": + case "w": + return n * w; + case "days": + case "day": + case "d": + return n * d; + case "hours": + case "hour": + case "hrs": + case "hr": + case "h": + return n * h; + case "minutes": + case "minute": + case "mins": + case "min": + case "m": + return n * m; + case "seconds": + case "second": + case "secs": + case "sec": + case "s": + return n * s; + case "milliseconds": + case "millisecond": + case "msecs": + case "msec": + case "ms": + return n; + default: + return void 0; + } + } + function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + "d"; + } + if (msAbs >= h) { + return Math.round(ms / h) + "h"; + } + if (msAbs >= m) { + return Math.round(ms / m) + "m"; + } + if (msAbs >= s) { + return Math.round(ms / s) + "s"; + } + return ms + "ms"; + } + function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, "day"); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, "hour"); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, "minute"); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, "second"); + } + return ms + " ms"; + } + function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); + } + } +}); + +// ../../node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/index.js +var require_humanize_ms = __commonJS({ + "../../node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/index.js"(exports2, module2) { + "use strict"; + var util = require("util"); + var ms = require_ms2(); + module2.exports = function(t) { + if (typeof t === "number") + return t; + var r = ms(t); + if (r === void 0) { + var err = new Error(util.format("humanize-ms(%j) result undefined", t)); + console.warn(err.stack); + } + return r; + }; + } +}); + +// ../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/lib/compat/callsite-tostring.js +var require_callsite_tostring = __commonJS({ + "../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/lib/compat/callsite-tostring.js"(exports2, module2) { + "use strict"; + module2.exports = callSiteToString2; + function callSiteFileLocation(callSite) { + var fileName; + var fileLocation = ""; + if (callSite.isNative()) { + fileLocation = "native"; + } else if (callSite.isEval()) { + fileName = callSite.getScriptNameOrSourceURL(); + if (!fileName) { + fileLocation = callSite.getEvalOrigin(); + } + } else { + fileName = callSite.getFileName(); + } + if (fileName) { + fileLocation += fileName; + var lineNumber = callSite.getLineNumber(); + if (lineNumber != null) { + fileLocation += ":" + lineNumber; + var columnNumber = callSite.getColumnNumber(); + if (columnNumber) { + fileLocation += ":" + columnNumber; + } + } + } + return fileLocation || "unknown source"; + } + function callSiteToString2(callSite) { + var addSuffix = true; + var fileLocation = callSiteFileLocation(callSite); + var functionName = callSite.getFunctionName(); + var isConstructor = callSite.isConstructor(); + var isMethodCall = !(callSite.isToplevel() || isConstructor); + var line = ""; + if (isMethodCall) { + var methodName = callSite.getMethodName(); + var typeName = getConstructorName(callSite); + if (functionName) { + if (typeName && functionName.indexOf(typeName) !== 0) { + line += typeName + "."; + } + line += functionName; + if (methodName && functionName.lastIndexOf("." + methodName) !== functionName.length - methodName.length - 1) { + line += " [as " + methodName + "]"; + } + } else { + line += typeName + "." + (methodName || ""); + } + } else if (isConstructor) { + line += "new " + (functionName || ""); + } else if (functionName) { + line += functionName; + } else { + addSuffix = false; + line += fileLocation; + } + if (addSuffix) { + line += " (" + fileLocation + ")"; + } + return line; + } + function getConstructorName(obj) { + var receiver = obj.receiver; + return receiver.constructor && receiver.constructor.name || null; + } + } +}); + +// ../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/lib/compat/event-listener-count.js +var require_event_listener_count = __commonJS({ + "../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/lib/compat/event-listener-count.js"(exports2, module2) { + "use strict"; + module2.exports = eventListenerCount2; + function eventListenerCount2(emitter, type) { + return emitter.listeners(type).length; + } + } +}); + +// ../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/lib/compat/index.js +var require_compat = __commonJS({ + "../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/lib/compat/index.js"(exports2, module2) { + "use strict"; + var EventEmitter = require("events").EventEmitter; + lazyProperty(module2.exports, "callSiteToString", function callSiteToString2() { + var limit = Error.stackTraceLimit; + var obj = {}; + var prep = Error.prepareStackTrace; + function prepareObjectStackTrace2(obj2, stack3) { + return stack3; + } + Error.prepareStackTrace = prepareObjectStackTrace2; + Error.stackTraceLimit = 2; + Error.captureStackTrace(obj); + var stack2 = obj.stack.slice(); + Error.prepareStackTrace = prep; + Error.stackTraceLimit = limit; + return stack2[0].toString ? toString : require_callsite_tostring(); + }); + lazyProperty(module2.exports, "eventListenerCount", function eventListenerCount2() { + return EventEmitter.listenerCount || require_event_listener_count(); + }); + function lazyProperty(obj, prop, getter) { + function get() { + var val = getter(); + Object.defineProperty(obj, prop, { + configurable: true, + enumerable: true, + value: val + }); + return val; + } + Object.defineProperty(obj, prop, { + configurable: true, + enumerable: true, + get + }); + } + function toString(obj) { + return obj.toString(); + } + } +}); + +// ../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/index.js +var require_depd = __commonJS({ + "../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/index.js"(exports, module) { + var callSiteToString = require_compat().callSiteToString; + var eventListenerCount = require_compat().eventListenerCount; + var relative = require("path").relative; + module.exports = depd; + var basePath = process.cwd(); + function containsNamespace(str, namespace) { + var vals = str.split(/[ ,]+/); + var ns = String(namespace).toLowerCase(); + for (var i = 0; i < vals.length; i++) { + var val = vals[i]; + if (val && (val === "*" || val.toLowerCase() === ns)) { + return true; + } + } + return false; + } + function convertDataDescriptorToAccessor(obj, prop, message2) { + var descriptor = Object.getOwnPropertyDescriptor(obj, prop); + var value = descriptor.value; + descriptor.get = function getter() { + return value; + }; + if (descriptor.writable) { + descriptor.set = function setter(val) { + return value = val; + }; + } + delete descriptor.value; + delete descriptor.writable; + Object.defineProperty(obj, prop, descriptor); + return descriptor; + } + function createArgumentsString(arity) { + var str = ""; + for (var i = 0; i < arity; i++) { + str += ", arg" + i; + } + return str.substr(2); + } + function createStackString(stack2) { + var str = this.name + ": " + this.namespace; + if (this.message) { + str += " deprecated " + this.message; + } + for (var i = 0; i < stack2.length; i++) { + str += "\n at " + callSiteToString(stack2[i]); + } + return str; + } + function depd(namespace) { + if (!namespace) { + throw new TypeError("argument namespace is required"); + } + var stack2 = getStack(); + var site2 = callSiteLocation(stack2[1]); + var file = site2[0]; + function deprecate2(message2) { + log.call(deprecate2, message2); + } + deprecate2._file = file; + deprecate2._ignored = isignored(namespace); + deprecate2._namespace = namespace; + deprecate2._traced = istraced(namespace); + deprecate2._warned = Object.create(null); + deprecate2.function = wrapfunction; + deprecate2.property = wrapproperty; + return deprecate2; + } + function isignored(namespace) { + if (process.noDeprecation) { + return true; + } + var str = process.env.NO_DEPRECATION || ""; + return containsNamespace(str, namespace); + } + function istraced(namespace) { + if (process.traceDeprecation) { + return true; + } + var str = process.env.TRACE_DEPRECATION || ""; + return containsNamespace(str, namespace); + } + function log(message2, site2) { + var haslisteners = eventListenerCount(process, "deprecation") !== 0; + if (!haslisteners && this._ignored) { + return; + } + var caller; + var callFile; + var callSite; + var depSite; + var i = 0; + var seen = false; + var stack2 = getStack(); + var file = this._file; + if (site2) { + depSite = site2; + callSite = callSiteLocation(stack2[1]); + callSite.name = depSite.name; + file = callSite[0]; + } else { + i = 2; + depSite = callSiteLocation(stack2[i]); + callSite = depSite; + } + for (; i < stack2.length; i++) { + caller = callSiteLocation(stack2[i]); + callFile = caller[0]; + if (callFile === file) { + seen = true; + } else if (callFile === this._file) { + file = this._file; + } else if (seen) { + break; + } + } + var key = caller ? depSite.join(":") + "__" + caller.join(":") : void 0; + if (key !== void 0 && key in this._warned) { + return; + } + this._warned[key] = true; + var msg = message2; + if (!msg) { + msg = callSite === depSite || !callSite.name ? defaultMessage(depSite) : defaultMessage(callSite); + } + if (haslisteners) { + var err = DeprecationError(this._namespace, msg, stack2.slice(i)); + process.emit("deprecation", err); + return; + } + var format = process.stderr.isTTY ? formatColor : formatPlain; + var output = format.call(this, msg, caller, stack2.slice(i)); + process.stderr.write(output + "\n", "utf8"); + } + function callSiteLocation(callSite) { + var file = callSite.getFileName() || ""; + var line = callSite.getLineNumber(); + var colm = callSite.getColumnNumber(); + if (callSite.isEval()) { + file = callSite.getEvalOrigin() + ", " + file; + } + var site2 = [file, line, colm]; + site2.callSite = callSite; + site2.name = callSite.getFunctionName(); + return site2; + } + function defaultMessage(site2) { + var callSite = site2.callSite; + var funcName = site2.name; + if (!funcName) { + funcName = ""; + } + var context = callSite.getThis(); + var typeName = context && callSite.getTypeName(); + if (typeName === "Object") { + typeName = void 0; + } + if (typeName === "Function") { + typeName = context.name || typeName; + } + return typeName && callSite.getMethodName() ? typeName + "." + funcName : funcName; + } + function formatPlain(msg, caller, stack2) { + var timestamp = new Date().toUTCString(); + var formatted = timestamp + " " + this._namespace + " deprecated " + msg; + if (this._traced) { + for (var i = 0; i < stack2.length; i++) { + formatted += "\n at " + callSiteToString(stack2[i]); + } + return formatted; + } + if (caller) { + formatted += " at " + formatLocation(caller); + } + return formatted; + } + function formatColor(msg, caller, stack2) { + var formatted = "" + this._namespace + " deprecated " + msg + ""; + if (this._traced) { + for (var i = 0; i < stack2.length; i++) { + formatted += "\n at " + callSiteToString(stack2[i]) + ""; + } + return formatted; + } + if (caller) { + formatted += " " + formatLocation(caller) + ""; + } + return formatted; + } + function formatLocation(callSite) { + return relative(basePath, callSite[0]) + ":" + callSite[1] + ":" + callSite[2]; + } + function getStack() { + var limit = Error.stackTraceLimit; + var obj = {}; + var prep = Error.prepareStackTrace; + Error.prepareStackTrace = prepareObjectStackTrace; + Error.stackTraceLimit = Math.max(10, limit); + Error.captureStackTrace(obj); + var stack2 = obj.stack.slice(1); + Error.prepareStackTrace = prep; + Error.stackTraceLimit = limit; + return stack2; + } + function prepareObjectStackTrace(obj, stack2) { + return stack2; + } + function wrapfunction(fn, message) { + if (typeof fn !== "function") { + throw new TypeError("argument fn must be a function"); + } + var args = createArgumentsString(fn.length); + var deprecate = this; + var stack = getStack(); + var site = callSiteLocation(stack[1]); + site.name = fn.name; + var deprecatedfn = eval("(function (" + args + ') {\n"use strict"\nlog.call(deprecate, message, site)\nreturn fn.apply(this, arguments)\n})'); + return deprecatedfn; + } + function wrapproperty(obj, prop, message2) { + if (!obj || typeof obj !== "object" && typeof obj !== "function") { + throw new TypeError("argument obj must be object"); + } + var descriptor = Object.getOwnPropertyDescriptor(obj, prop); + if (!descriptor) { + throw new TypeError("must call property on owner object"); + } + if (!descriptor.configurable) { + throw new TypeError("property must be configurable"); + } + var deprecate2 = this; + var stack2 = getStack(); + var site2 = callSiteLocation(stack2[1]); + site2.name = prop; + if ("value" in descriptor) { + descriptor = convertDataDescriptorToAccessor(obj, prop, message2); + } + var get = descriptor.get; + var set = descriptor.set; + if (typeof get === "function") { + descriptor.get = function getter() { + log.call(deprecate2, message2, site2); + return get.apply(this, arguments); + }; + } + if (typeof set === "function") { + descriptor.set = function setter() { + log.call(deprecate2, message2, site2); + return set.apply(this, arguments); + }; + } + Object.defineProperty(obj, prop, descriptor); + } + function DeprecationError(namespace, message2, stack2) { + var error = new Error(); + var stackString; + Object.defineProperty(error, "constructor", { + value: DeprecationError + }); + Object.defineProperty(error, "message", { + configurable: true, + enumerable: false, + value: message2, + writable: true + }); + Object.defineProperty(error, "name", { + enumerable: false, + configurable: true, + value: "DeprecationError", + writable: true + }); + Object.defineProperty(error, "namespace", { + configurable: true, + enumerable: false, + value: namespace, + writable: true + }); + Object.defineProperty(error, "stack", { + configurable: true, + enumerable: false, + get: function() { + if (stackString !== void 0) { + return stackString; + } + return stackString = createStackString.call(this, stack2); + }, + set: function setter(val) { + stackString = val; + } + }); + return error; + } + } +}); + +// ../../node_modules/.pnpm/agentkeepalive@4.1.4/node_modules/agentkeepalive/lib/constants.js +var require_constants7 = __commonJS({ + "../../node_modules/.pnpm/agentkeepalive@4.1.4/node_modules/agentkeepalive/lib/constants.js"(exports2, module2) { + "use strict"; + module2.exports = { + CURRENT_ID: Symbol("agentkeepalive#currentId"), + CREATE_ID: Symbol("agentkeepalive#createId"), + INIT_SOCKET: Symbol("agentkeepalive#initSocket"), + CREATE_HTTPS_CONNECTION: Symbol("agentkeepalive#createHttpsConnection"), + SOCKET_CREATED_TIME: Symbol("agentkeepalive#socketCreatedTime"), + SOCKET_NAME: Symbol("agentkeepalive#socketName"), + SOCKET_REQUEST_COUNT: Symbol("agentkeepalive#socketRequestCount"), + SOCKET_REQUEST_FINISHED_COUNT: Symbol("agentkeepalive#socketRequestFinishedCount") + }; + } +}); + +// ../../node_modules/.pnpm/agentkeepalive@4.1.4/node_modules/agentkeepalive/lib/agent.js +var require_agent = __commonJS({ + "../../node_modules/.pnpm/agentkeepalive@4.1.4/node_modules/agentkeepalive/lib/agent.js"(exports2, module2) { + "use strict"; + var OriginalAgent = require("http").Agent; + var ms = require_humanize_ms(); + var debug = require_src()("agentkeepalive"); + var deprecate2 = require_depd()("agentkeepalive"); + var { + INIT_SOCKET, + CURRENT_ID, + CREATE_ID, + SOCKET_CREATED_TIME, + SOCKET_NAME, + SOCKET_REQUEST_COUNT, + SOCKET_REQUEST_FINISHED_COUNT + } = require_constants7(); + var defaultTimeoutListenerCount = 1; + var majorVersion = parseInt(process.version.split(".", 1)[0].substring(1)); + if (majorVersion >= 11 && majorVersion <= 12) { + defaultTimeoutListenerCount = 2; + } else if (majorVersion >= 13) { + defaultTimeoutListenerCount = 3; + } + var Agent = class extends OriginalAgent { + constructor(options) { + options = options || {}; + options.keepAlive = options.keepAlive !== false; + if (options.freeSocketTimeout === void 0) { + options.freeSocketTimeout = 15e3; + } + if (options.keepAliveTimeout) { + deprecate2("options.keepAliveTimeout is deprecated, please use options.freeSocketTimeout instead"); + options.freeSocketTimeout = options.keepAliveTimeout; + delete options.keepAliveTimeout; + } + if (options.freeSocketKeepAliveTimeout) { + deprecate2("options.freeSocketKeepAliveTimeout is deprecated, please use options.freeSocketTimeout instead"); + options.freeSocketTimeout = options.freeSocketKeepAliveTimeout; + delete options.freeSocketKeepAliveTimeout; + } + if (options.timeout === void 0) { + options.timeout = Math.max(options.freeSocketTimeout * 2, 3e4); + } + options.timeout = ms(options.timeout); + options.freeSocketTimeout = ms(options.freeSocketTimeout); + options.socketActiveTTL = options.socketActiveTTL ? ms(options.socketActiveTTL) : 0; + super(options); + this[CURRENT_ID] = 0; + this.createSocketCount = 0; + this.createSocketCountLastCheck = 0; + this.createSocketErrorCount = 0; + this.createSocketErrorCountLastCheck = 0; + this.closeSocketCount = 0; + this.closeSocketCountLastCheck = 0; + this.errorSocketCount = 0; + this.errorSocketCountLastCheck = 0; + this.requestCount = 0; + this.requestCountLastCheck = 0; + this.timeoutSocketCount = 0; + this.timeoutSocketCountLastCheck = 0; + this.on("free", (socket) => { + const timeout = this.calcSocketTimeout(socket); + if (timeout > 0 && socket.timeout !== timeout) { + socket.setTimeout(timeout); + } + }); + } + get freeSocketKeepAliveTimeout() { + deprecate2("agent.freeSocketKeepAliveTimeout is deprecated, please use agent.options.freeSocketTimeout instead"); + return this.options.freeSocketTimeout; + } + get timeout() { + deprecate2("agent.timeout is deprecated, please use agent.options.timeout instead"); + return this.options.timeout; + } + get socketActiveTTL() { + deprecate2("agent.socketActiveTTL is deprecated, please use agent.options.socketActiveTTL instead"); + return this.options.socketActiveTTL; + } + calcSocketTimeout(socket) { + let freeSocketTimeout = this.options.freeSocketTimeout; + const socketActiveTTL = this.options.socketActiveTTL; + if (socketActiveTTL) { + const aliveTime = Date.now() - socket[SOCKET_CREATED_TIME]; + const diff = socketActiveTTL - aliveTime; + if (diff <= 0) { + return diff; + } + if (freeSocketTimeout && diff < freeSocketTimeout) { + freeSocketTimeout = diff; + } + } + if (freeSocketTimeout) { + const customFreeSocketTimeout = socket.freeSocketTimeout || socket.freeSocketKeepAliveTimeout; + return customFreeSocketTimeout || freeSocketTimeout; + } + } + keepSocketAlive(socket) { + const result = super.keepSocketAlive(socket); + if (!result) + return result; + const customTimeout = this.calcSocketTimeout(socket); + if (typeof customTimeout === "undefined") { + return true; + } + if (customTimeout <= 0) { + debug("%s(requests: %s, finished: %s) free but need to destroy by TTL, request count %s, diff is %s", socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], customTimeout); + return false; + } + if (socket.timeout !== customTimeout) { + socket.setTimeout(customTimeout); + } + return true; + } + reuseSocket(...args2) { + super.reuseSocket(...args2); + const socket = args2[0]; + const req = args2[1]; + req.reusedSocket = true; + const agentTimeout = this.options.timeout; + if (getSocketTimeout(socket) !== agentTimeout) { + socket.setTimeout(agentTimeout); + debug("%s reset timeout to %sms", socket[SOCKET_NAME], agentTimeout); + } + socket[SOCKET_REQUEST_COUNT]++; + debug("%s(requests: %s, finished: %s) reuse on addRequest, timeout %sms", socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], getSocketTimeout(socket)); + } + [CREATE_ID]() { + const id = this[CURRENT_ID]++; + if (this[CURRENT_ID] === Number.MAX_SAFE_INTEGER) + this[CURRENT_ID] = 0; + return id; + } + [INIT_SOCKET](socket, options) { + if (options.timeout) { + const timeout = getSocketTimeout(socket); + if (!timeout) { + socket.setTimeout(options.timeout); + } + } + if (this.options.keepAlive) { + socket.setNoDelay(true); + } + this.createSocketCount++; + if (this.options.socketActiveTTL) { + socket[SOCKET_CREATED_TIME] = Date.now(); + } + socket[SOCKET_NAME] = `sock[${this[CREATE_ID]()}#${options._agentKey}]`.split("-----BEGIN", 1)[0]; + socket[SOCKET_REQUEST_COUNT] = 1; + socket[SOCKET_REQUEST_FINISHED_COUNT] = 0; + installListeners(this, socket, options); + } + createConnection(options, oncreate) { + let called = false; + const onNewCreate = (err, socket) => { + if (called) + return; + called = true; + if (err) { + this.createSocketErrorCount++; + return oncreate(err); + } + this[INIT_SOCKET](socket, options); + oncreate(err, socket); + }; + const newSocket = super.createConnection(options, onNewCreate); + if (newSocket) + onNewCreate(null, newSocket); + } + get statusChanged() { + const changed = this.createSocketCount !== this.createSocketCountLastCheck || this.createSocketErrorCount !== this.createSocketErrorCountLastCheck || this.closeSocketCount !== this.closeSocketCountLastCheck || this.errorSocketCount !== this.errorSocketCountLastCheck || this.timeoutSocketCount !== this.timeoutSocketCountLastCheck || this.requestCount !== this.requestCountLastCheck; + if (changed) { + this.createSocketCountLastCheck = this.createSocketCount; + this.createSocketErrorCountLastCheck = this.createSocketErrorCount; + this.closeSocketCountLastCheck = this.closeSocketCount; + this.errorSocketCountLastCheck = this.errorSocketCount; + this.timeoutSocketCountLastCheck = this.timeoutSocketCount; + this.requestCountLastCheck = this.requestCount; + } + return changed; + } + getCurrentStatus() { + return { + createSocketCount: this.createSocketCount, + createSocketErrorCount: this.createSocketErrorCount, + closeSocketCount: this.closeSocketCount, + errorSocketCount: this.errorSocketCount, + timeoutSocketCount: this.timeoutSocketCount, + requestCount: this.requestCount, + freeSockets: inspect(this.freeSockets), + sockets: inspect(this.sockets), + requests: inspect(this.requests) + }; + } + }; + function getSocketTimeout(socket) { + return socket.timeout || socket._idleTimeout; + } + function installListeners(agent, socket, options) { + debug("%s create, timeout %sms", socket[SOCKET_NAME], getSocketTimeout(socket)); + function onFree() { + if (!socket._httpMessage && socket[SOCKET_REQUEST_COUNT] === 1) + return; + socket[SOCKET_REQUEST_FINISHED_COUNT]++; + agent.requestCount++; + debug("%s(requests: %s, finished: %s) free", socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]); + const name = agent.getName(options); + if (socket.writable && agent.requests[name] && agent.requests[name].length) { + socket[SOCKET_REQUEST_COUNT]++; + debug("%s(requests: %s, finished: %s) will be reuse on agent free event", socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]); + } + } + socket.on("free", onFree); + function onClose(isError) { + debug("%s(requests: %s, finished: %s) close, isError: %s", socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], isError); + agent.closeSocketCount++; + } + socket.on("close", onClose); + function onTimeout() { + const listenerCount = socket.listeners("timeout").length; + const timeout = getSocketTimeout(socket); + const req = socket._httpMessage; + const reqTimeoutListenerCount = req && req.listeners("timeout").length || 0; + debug("%s(requests: %s, finished: %s) timeout after %sms, listeners %s, defaultTimeoutListenerCount %s, hasHttpRequest %s, HttpRequest timeoutListenerCount %s", socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], timeout, listenerCount, defaultTimeoutListenerCount, !!req, reqTimeoutListenerCount); + if (debug.enabled) { + debug("timeout listeners: %s", socket.listeners("timeout").map((f) => f.name).join(", ")); + } + agent.timeoutSocketCount++; + const name = agent.getName(options); + if (agent.freeSockets[name] && agent.freeSockets[name].indexOf(socket) !== -1) { + socket.destroy(); + agent.removeSocket(socket, options); + debug("%s is free, destroy quietly", socket[SOCKET_NAME]); + } else { + if (reqTimeoutListenerCount === 0) { + const error = new Error("Socket timeout"); + error.code = "ERR_SOCKET_TIMEOUT"; + error.timeout = timeout; + socket.destroy(error); + agent.removeSocket(socket, options); + debug("%s destroy with timeout error", socket[SOCKET_NAME]); + } + } + } + socket.on("timeout", onTimeout); + function onError(err) { + const listenerCount = socket.listeners("error").length; + debug("%s(requests: %s, finished: %s) error: %s, listenerCount: %s", socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], err, listenerCount); + agent.errorSocketCount++; + if (listenerCount === 1) { + debug("%s emit uncaught error event", socket[SOCKET_NAME]); + socket.removeListener("error", onError); + socket.emit("error", err); + } + } + socket.on("error", onError); + function onRemove() { + debug("%s(requests: %s, finished: %s) agentRemove", socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]); + socket.removeListener("close", onClose); + socket.removeListener("error", onError); + socket.removeListener("free", onFree); + socket.removeListener("timeout", onTimeout); + socket.removeListener("agentRemove", onRemove); + } + socket.on("agentRemove", onRemove); + } + module2.exports = Agent; + function inspect(obj) { + const res = {}; + for (const key in obj) { + res[key] = obj[key].length; + } + return res; + } + } +}); + +// ../../node_modules/.pnpm/agentkeepalive@4.1.4/node_modules/agentkeepalive/lib/https_agent.js +var require_https_agent = __commonJS({ + "../../node_modules/.pnpm/agentkeepalive@4.1.4/node_modules/agentkeepalive/lib/https_agent.js"(exports2, module2) { + "use strict"; + var OriginalHttpsAgent = require("https").Agent; + var HttpAgent = require_agent(); + var { + INIT_SOCKET, + CREATE_HTTPS_CONNECTION + } = require_constants7(); + var HttpsAgent = class extends HttpAgent { + constructor(options) { + super(options); + this.defaultPort = 443; + this.protocol = "https:"; + this.maxCachedSessions = this.options.maxCachedSessions; + if (this.maxCachedSessions === void 0) { + this.maxCachedSessions = 100; + } + this._sessionCache = { + map: {}, + list: [] + }; + } + createConnection(options) { + const socket = this[CREATE_HTTPS_CONNECTION](options); + this[INIT_SOCKET](socket, options); + return socket; + } + }; + HttpsAgent.prototype[CREATE_HTTPS_CONNECTION] = OriginalHttpsAgent.prototype.createConnection; + [ + "getName", + "_getSession", + "_cacheSession", + "_evictSession" + ].forEach(function(method) { + if (typeof OriginalHttpsAgent.prototype[method] === "function") { + HttpsAgent.prototype[method] = OriginalHttpsAgent.prototype[method]; + } + }); + module2.exports = HttpsAgent; + } +}); + +// ../../node_modules/.pnpm/agentkeepalive@4.1.4/node_modules/agentkeepalive/index.js +var require_agentkeepalive = __commonJS({ + "../../node_modules/.pnpm/agentkeepalive@4.1.4/node_modules/agentkeepalive/index.js"(exports2, module2) { + "use strict"; + module2.exports = require_agent(); + module2.exports.HttpsAgent = require_https_agent(); + module2.exports.constants = require_constants7(); + } +}); + +// ../../node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/dist/index.js +var require_dist3 = __commonJS({ + "../../node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/dist/index.js"(exports2, module2) { + "use strict"; + function noop() { + } + function once(emitter, name) { + const o = once.spread(emitter, name); + const r = o.then((args2) => args2[0]); + r.cancel = o.cancel; + return r; + } + (function(once2) { + function spread(emitter, name) { + let c = null; + const p = new Promise((resolve, reject) => { + function cancel() { + emitter.removeListener(name, onEvent); + emitter.removeListener("error", onError); + p.cancel = noop; + } + function onEvent(...args2) { + cancel(); + resolve(args2); + } + function onError(err) { + cancel(); + reject(err); + } + c = cancel; + emitter.on(name, onEvent); + emitter.on("error", onError); + }); + if (!c) { + throw new TypeError("Could not get `cancel()` function"); + } + p.cancel = c; + return p; + } + once2.spread = spread; + })(once || (once = {})); + module2.exports = once; + } +}); + +// ../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.js +var require_promisify = __commonJS({ + "../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function promisify(fn2) { + return function(req, opts) { + return new Promise((resolve, reject) => { + fn2.call(this, req, opts, (err, rtn) => { + if (err) { + reject(err); + } else { + resolve(rtn); + } + }); + }); + }; + } + exports2.default = promisify; + } +}); + +// ../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js +var require_src3 = __commonJS({ + "../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js"(exports2, module2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + var events_1 = require("events"); + var debug_1 = __importDefault(require_src()); + var promisify_1 = __importDefault(require_promisify()); + var debug = debug_1.default("agent-base"); + function isAgent(v) { + return Boolean(v) && typeof v.addRequest === "function"; + } + function isSecureEndpoint() { + const { stack: stack2 } = new Error(); + if (typeof stack2 !== "string") + return false; + return stack2.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1); + } + function createAgent(callback, opts) { + return new createAgent.Agent(callback, opts); + } + (function(createAgent2) { + class Agent extends events_1.EventEmitter { + constructor(callback, _opts) { + super(); + let opts = _opts; + if (typeof callback === "function") { + this.callback = callback; + } else if (callback) { + opts = callback; + } + this.timeout = null; + if (opts && typeof opts.timeout === "number") { + this.timeout = opts.timeout; + } + this.maxFreeSockets = 1; + this.maxSockets = 1; + this.maxTotalSockets = Infinity; + this.sockets = {}; + this.freeSockets = {}; + this.requests = {}; + this.options = {}; + } + get defaultPort() { + if (typeof this.explicitDefaultPort === "number") { + return this.explicitDefaultPort; + } + return isSecureEndpoint() ? 443 : 80; + } + set defaultPort(v) { + this.explicitDefaultPort = v; + } + get protocol() { + if (typeof this.explicitProtocol === "string") { + return this.explicitProtocol; + } + return isSecureEndpoint() ? "https:" : "http:"; + } + set protocol(v) { + this.explicitProtocol = v; + } + callback(req, opts, fn2) { + throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`'); + } + addRequest(req, _opts) { + const opts = Object.assign({}, _opts); + if (typeof opts.secureEndpoint !== "boolean") { + opts.secureEndpoint = isSecureEndpoint(); + } + if (opts.host == null) { + opts.host = "localhost"; + } + if (opts.port == null) { + opts.port = opts.secureEndpoint ? 443 : 80; + } + if (opts.protocol == null) { + opts.protocol = opts.secureEndpoint ? "https:" : "http:"; + } + if (opts.host && opts.path) { + delete opts.path; + } + delete opts.agent; + delete opts.hostname; + delete opts._defaultAgent; + delete opts.defaultPort; + delete opts.createConnection; + req._last = true; + req.shouldKeepAlive = false; + let timedOut = false; + let timeoutId = null; + const timeoutMs = opts.timeout || this.timeout; + const onerror = (err) => { + if (req._hadError) + return; + req.emit("error", err); + req._hadError = true; + }; + const ontimeout = () => { + timeoutId = null; + timedOut = true; + const err = new Error(`A "socket" was not created for HTTP request before ${timeoutMs}ms`); + err.code = "ETIMEOUT"; + onerror(err); + }; + const callbackError = (err) => { + if (timedOut) + return; + if (timeoutId !== null) { + clearTimeout(timeoutId); + timeoutId = null; + } + onerror(err); + }; + const onsocket = (socket) => { + if (timedOut) + return; + if (timeoutId != null) { + clearTimeout(timeoutId); + timeoutId = null; + } + if (isAgent(socket)) { + debug("Callback returned another Agent instance %o", socket.constructor.name); + socket.addRequest(req, opts); + return; + } + if (socket) { + socket.once("free", () => { + this.freeSocket(socket, opts); + }); + req.onSocket(socket); + return; + } + const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``); + onerror(err); + }; + if (typeof this.callback !== "function") { + onerror(new Error("`callback` is not defined")); + return; + } + if (!this.promisifiedCallback) { + if (this.callback.length >= 3) { + debug("Converting legacy callback function to promise"); + this.promisifiedCallback = promisify_1.default(this.callback); + } else { + this.promisifiedCallback = this.callback; + } + } + if (typeof timeoutMs === "number" && timeoutMs > 0) { + timeoutId = setTimeout(ontimeout, timeoutMs); + } + if ("port" in opts && typeof opts.port !== "number") { + opts.port = Number(opts.port); + } + try { + debug("Resolving socket for %o request: %o", opts.protocol, `${req.method} ${req.path}`); + Promise.resolve(this.promisifiedCallback(req, opts)).then(onsocket, callbackError); + } catch (err) { + Promise.reject(err).catch(callbackError); + } + } + freeSocket(socket, opts) { + debug("Freeing socket %o %o", socket.constructor.name, opts); + socket.destroy(); + } + destroy() { + debug("Destroying agent %o", this.constructor.name); + } + } + createAgent2.Agent = Agent; + createAgent2.prototype = createAgent2.Agent.prototype; + })(createAgent || (createAgent = {})); + module2.exports = createAgent; + } +}); + +// ../../node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/agent.js +var require_agent2 = __commonJS({ + "../../node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/agent.js"(exports2) { + "use strict"; + var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var net_1 = __importDefault(require("net")); + var tls_1 = __importDefault(require("tls")); + var url_1 = __importDefault(require("url")); + var debug_1 = __importDefault(require_src()); + var once_1 = __importDefault(require_dist3()); + var agent_base_1 = require_src3(); + var debug = debug_1.default("http-proxy-agent"); + function isHTTPS(protocol) { + return typeof protocol === "string" ? /^https:?$/i.test(protocol) : false; + } + var HttpProxyAgent = class extends agent_base_1.Agent { + constructor(_opts) { + let opts; + if (typeof _opts === "string") { + opts = url_1.default.parse(_opts); + } else { + opts = _opts; + } + if (!opts) { + throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!"); + } + debug("Creating new HttpProxyAgent instance: %o", opts); + super(opts); + const proxy = Object.assign({}, opts); + this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol); + proxy.host = proxy.hostname || proxy.host; + if (typeof proxy.port === "string") { + proxy.port = parseInt(proxy.port, 10); + } + if (!proxy.port && proxy.host) { + proxy.port = this.secureProxy ? 443 : 80; + } + if (proxy.host && proxy.path) { + delete proxy.path; + delete proxy.pathname; + } + this.proxy = proxy; + } + callback(req, opts) { + return __awaiter(this, void 0, void 0, function* () { + const { proxy, secureProxy } = this; + const parsed = url_1.default.parse(req.path); + if (!parsed.protocol) { + parsed.protocol = "http:"; + } + if (!parsed.hostname) { + parsed.hostname = opts.hostname || opts.host || null; + } + if (parsed.port == null && typeof opts.port) { + parsed.port = String(opts.port); + } + if (parsed.port === "80") { + delete parsed.port; + } + req.path = url_1.default.format(parsed); + if (proxy.auth) { + req.setHeader("Proxy-Authorization", `Basic ${Buffer.from(proxy.auth).toString("base64")}`); + } + let socket; + if (secureProxy) { + debug("Creating `tls.Socket`: %o", proxy); + socket = tls_1.default.connect(proxy); + } else { + debug("Creating `net.Socket`: %o", proxy); + socket = net_1.default.connect(proxy); + } + if (req._header) { + let first; + let endOfHeaders; + debug("Regenerating stored HTTP header string for request"); + req._header = null; + req._implicitHeader(); + if (req.output && req.output.length > 0) { + debug("Patching connection write() output buffer with updated header"); + first = req.output[0]; + endOfHeaders = first.indexOf("\r\n\r\n") + 4; + req.output[0] = req._header + first.substring(endOfHeaders); + debug("Output buffer: %o", req.output); + } else if (req.outputData && req.outputData.length > 0) { + debug("Patching connection write() output buffer with updated header"); + first = req.outputData[0].data; + endOfHeaders = first.indexOf("\r\n\r\n") + 4; + req.outputData[0].data = req._header + first.substring(endOfHeaders); + debug("Output buffer: %o", req.outputData[0].data); + } + } + yield once_1.default(socket, "connect"); + return socket; + }); + } + }; + exports2.default = HttpProxyAgent; + } +}); + +// ../../node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/index.js +var require_dist4 = __commonJS({ + "../../node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/index.js"(exports2, module2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + var agent_1 = __importDefault(require_agent2()); + function createHttpProxyAgent(opts) { + return new agent_1.default(opts); + } + (function(createHttpProxyAgent2) { + createHttpProxyAgent2.HttpProxyAgent = agent_1.default; + createHttpProxyAgent2.prototype = agent_1.default.prototype; + })(createHttpProxyAgent || (createHttpProxyAgent = {})); + module2.exports = createHttpProxyAgent; + } +}); + +// ../../node_modules/.pnpm/agent-base@4.3.0/node_modules/agent-base/patch-core.js +var require_patch_core = __commonJS({ + "../../node_modules/.pnpm/agent-base@4.3.0/node_modules/agent-base/patch-core.js"() { + "use strict"; + var url = require("url"); + var https = require("https"); + var patchMarker = "__agent_base_https_request_patched__"; + if (!https.request[patchMarker]) { + https.request = function(request) { + return function(_options, cb) { + let options; + if (typeof _options === "string") { + options = url.parse(_options); + } else { + options = Object.assign({}, _options); + } + if (options.port == null) { + options.port = 443; + } + options.secureEndpoint = true; + return request.call(https, options, cb); + }; + }(https.request); + https.request[patchMarker] = true; + } + https.get = function(_url, _options, cb) { + let options; + if (typeof _url === "string" && _options && typeof _options !== "function") { + options = Object.assign({}, url.parse(_url), _options); + } else if (!_options && !cb) { + options = _url; + } else if (!cb) { + options = _url; + cb = _options; + } + const req = https.request(options, cb); + req.end(); + return req; + }; + } +}); + +// ../../node_modules/.pnpm/es6-promise@4.2.8/node_modules/es6-promise/dist/es6-promise.js +var require_es6_promise = __commonJS({ + "../../node_modules/.pnpm/es6-promise@4.2.8/node_modules/es6-promise/dist/es6-promise.js"(exports2, module2) { + (function(global2, factory) { + typeof exports2 === "object" && typeof module2 !== "undefined" ? module2.exports = factory() : typeof define === "function" && define.amd ? define(factory) : global2.ES6Promise = factory(); + })(exports2, function() { + "use strict"; + function objectOrFunction(x) { + var type = typeof x; + return x !== null && (type === "object" || type === "function"); + } + function isFunction(x) { + return typeof x === "function"; + } + var _isArray = void 0; + if (Array.isArray) { + _isArray = Array.isArray; + } else { + _isArray = function(x) { + return Object.prototype.toString.call(x) === "[object Array]"; + }; + } + var isArray = _isArray; + var len = 0; + var vertxNext = void 0; + var customSchedulerFn = void 0; + var asap = function asap2(callback, arg) { + queue[len] = callback; + queue[len + 1] = arg; + len += 2; + if (len === 2) { + if (customSchedulerFn) { + customSchedulerFn(flush); + } else { + scheduleFlush(); + } + } + }; + function setScheduler(scheduleFn) { + customSchedulerFn = scheduleFn; + } + function setAsap(asapFn) { + asap = asapFn; + } + var browserWindow = typeof window !== "undefined" ? window : void 0; + var browserGlobal = browserWindow || {}; + var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver; + var isNode = typeof self === "undefined" && typeof process !== "undefined" && {}.toString.call(process) === "[object process]"; + var isWorker = typeof Uint8ClampedArray !== "undefined" && typeof importScripts !== "undefined" && typeof MessageChannel !== "undefined"; + function useNextTick() { + return function() { + return process.nextTick(flush); + }; + } + function useVertxTimer() { + if (typeof vertxNext !== "undefined") { + return function() { + vertxNext(flush); + }; + } + return useSetTimeout(); + } + function useMutationObserver() { + var iterations = 0; + var observer = new BrowserMutationObserver(flush); + var node = document.createTextNode(""); + observer.observe(node, { characterData: true }); + return function() { + node.data = iterations = ++iterations % 2; + }; + } + function useMessageChannel() { + var channel = new MessageChannel(); + channel.port1.onmessage = flush; + return function() { + return channel.port2.postMessage(0); + }; + } + function useSetTimeout() { + var globalSetTimeout = setTimeout; + return function() { + return globalSetTimeout(flush, 1); + }; + } + var queue = new Array(1e3); + function flush() { + for (var i = 0; i < len; i += 2) { + var callback = queue[i]; + var arg = queue[i + 1]; + callback(arg); + queue[i] = void 0; + queue[i + 1] = void 0; + } + len = 0; + } + function attemptVertx() { + try { + var vertx = Function("return this")().require("vertx"); + vertxNext = vertx.runOnLoop || vertx.runOnContext; + return useVertxTimer(); + } catch (e) { + return useSetTimeout(); + } + } + var scheduleFlush = void 0; + if (isNode) { + scheduleFlush = useNextTick(); + } else if (BrowserMutationObserver) { + scheduleFlush = useMutationObserver(); + } else if (isWorker) { + scheduleFlush = useMessageChannel(); + } else if (browserWindow === void 0 && typeof require === "function") { + scheduleFlush = attemptVertx(); + } else { + scheduleFlush = useSetTimeout(); + } + function then(onFulfillment, onRejection) { + var parent = this; + var child = new this.constructor(noop); + if (child[PROMISE_ID] === void 0) { + makePromise(child); + } + var _state = parent._state; + if (_state) { + var callback = arguments[_state - 1]; + asap(function() { + return invokeCallback(_state, child, callback, parent._result); + }); + } else { + subscribe(parent, child, onFulfillment, onRejection); + } + return child; + } + function resolve$1(object) { + var Constructor = this; + if (object && typeof object === "object" && object.constructor === Constructor) { + return object; + } + var promise = new Constructor(noop); + resolve(promise, object); + return promise; + } + var PROMISE_ID = Math.random().toString(36).substring(2); + function noop() { + } + var PENDING = void 0; + var FULFILLED = 1; + var REJECTED = 2; + function selfFulfillment() { + return new TypeError("You cannot resolve a promise with itself"); + } + function cannotReturnOwn() { + return new TypeError("A promises callback cannot return that same promise."); + } + function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) { + try { + then$$1.call(value, fulfillmentHandler, rejectionHandler); + } catch (e) { + return e; + } + } + function handleForeignThenable(promise, thenable, then$$1) { + asap(function(promise2) { + var sealed = false; + var error = tryThen(then$$1, thenable, function(value) { + if (sealed) { + return; + } + sealed = true; + if (thenable !== value) { + resolve(promise2, value); + } else { + fulfill(promise2, value); + } + }, function(reason) { + if (sealed) { + return; + } + sealed = true; + reject(promise2, reason); + }, "Settle: " + (promise2._label || " unknown promise")); + if (!sealed && error) { + sealed = true; + reject(promise2, error); + } + }, promise); + } + function handleOwnThenable(promise, thenable) { + if (thenable._state === FULFILLED) { + fulfill(promise, thenable._result); + } else if (thenable._state === REJECTED) { + reject(promise, thenable._result); + } else { + subscribe(thenable, void 0, function(value) { + return resolve(promise, value); + }, function(reason) { + return reject(promise, reason); + }); + } + } + function handleMaybeThenable(promise, maybeThenable, then$$1) { + if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) { + handleOwnThenable(promise, maybeThenable); + } else { + if (then$$1 === void 0) { + fulfill(promise, maybeThenable); + } else if (isFunction(then$$1)) { + handleForeignThenable(promise, maybeThenable, then$$1); + } else { + fulfill(promise, maybeThenable); + } + } + } + function resolve(promise, value) { + if (promise === value) { + reject(promise, selfFulfillment()); + } else if (objectOrFunction(value)) { + var then$$1 = void 0; + try { + then$$1 = value.then; + } catch (error) { + reject(promise, error); + return; + } + handleMaybeThenable(promise, value, then$$1); + } else { + fulfill(promise, value); + } + } + function publishRejection(promise) { + if (promise._onerror) { + promise._onerror(promise._result); + } + publish(promise); + } + function fulfill(promise, value) { + if (promise._state !== PENDING) { + return; + } + promise._result = value; + promise._state = FULFILLED; + if (promise._subscribers.length !== 0) { + asap(publish, promise); + } + } + function reject(promise, reason) { + if (promise._state !== PENDING) { + return; + } + promise._state = REJECTED; + promise._result = reason; + asap(publishRejection, promise); + } + function subscribe(parent, child, onFulfillment, onRejection) { + var _subscribers = parent._subscribers; + var length = _subscribers.length; + parent._onerror = null; + _subscribers[length] = child; + _subscribers[length + FULFILLED] = onFulfillment; + _subscribers[length + REJECTED] = onRejection; + if (length === 0 && parent._state) { + asap(publish, parent); + } + } + function publish(promise) { + var subscribers = promise._subscribers; + var settled = promise._state; + if (subscribers.length === 0) { + return; + } + var child = void 0, callback = void 0, detail = promise._result; + for (var i = 0; i < subscribers.length; i += 3) { + child = subscribers[i]; + callback = subscribers[i + settled]; + if (child) { + invokeCallback(settled, child, callback, detail); + } else { + callback(detail); + } + } + promise._subscribers.length = 0; + } + function invokeCallback(settled, promise, callback, detail) { + var hasCallback = isFunction(callback), value = void 0, error = void 0, succeeded = true; + if (hasCallback) { + try { + value = callback(detail); + } catch (e) { + succeeded = false; + error = e; + } + if (promise === value) { + reject(promise, cannotReturnOwn()); + return; + } + } else { + value = detail; + } + if (promise._state !== PENDING) { + } else if (hasCallback && succeeded) { + resolve(promise, value); + } else if (succeeded === false) { + reject(promise, error); + } else if (settled === FULFILLED) { + fulfill(promise, value); + } else if (settled === REJECTED) { + reject(promise, value); + } + } + function initializePromise(promise, resolver) { + try { + resolver(function resolvePromise(value) { + resolve(promise, value); + }, function rejectPromise(reason) { + reject(promise, reason); + }); + } catch (e) { + reject(promise, e); + } + } + var id = 0; + function nextId() { + return id++; + } + function makePromise(promise) { + promise[PROMISE_ID] = id++; + promise._state = void 0; + promise._result = void 0; + promise._subscribers = []; + } + function validationError() { + return new Error("Array Methods must be provided an Array"); + } + var Enumerator = function() { + function Enumerator2(Constructor, input) { + this._instanceConstructor = Constructor; + this.promise = new Constructor(noop); + if (!this.promise[PROMISE_ID]) { + makePromise(this.promise); + } + if (isArray(input)) { + this.length = input.length; + this._remaining = input.length; + this._result = new Array(this.length); + if (this.length === 0) { + fulfill(this.promise, this._result); + } else { + this.length = this.length || 0; + this._enumerate(input); + if (this._remaining === 0) { + fulfill(this.promise, this._result); + } + } + } else { + reject(this.promise, validationError()); + } + } + Enumerator2.prototype._enumerate = function _enumerate(input) { + for (var i = 0; this._state === PENDING && i < input.length; i++) { + this._eachEntry(input[i], i); + } + }; + Enumerator2.prototype._eachEntry = function _eachEntry(entry, i) { + var c = this._instanceConstructor; + var resolve$$1 = c.resolve; + if (resolve$$1 === resolve$1) { + var _then = void 0; + var error = void 0; + var didError = false; + try { + _then = entry.then; + } catch (e) { + didError = true; + error = e; + } + if (_then === then && entry._state !== PENDING) { + this._settledAt(entry._state, i, entry._result); + } else if (typeof _then !== "function") { + this._remaining--; + this._result[i] = entry; + } else if (c === Promise$1) { + var promise = new c(noop); + if (didError) { + reject(promise, error); + } else { + handleMaybeThenable(promise, entry, _then); + } + this._willSettleAt(promise, i); + } else { + this._willSettleAt(new c(function(resolve$$12) { + return resolve$$12(entry); + }), i); + } + } else { + this._willSettleAt(resolve$$1(entry), i); + } + }; + Enumerator2.prototype._settledAt = function _settledAt(state, i, value) { + var promise = this.promise; + if (promise._state === PENDING) { + this._remaining--; + if (state === REJECTED) { + reject(promise, value); + } else { + this._result[i] = value; + } + } + if (this._remaining === 0) { + fulfill(promise, this._result); + } + }; + Enumerator2.prototype._willSettleAt = function _willSettleAt(promise, i) { + var enumerator = this; + subscribe(promise, void 0, function(value) { + return enumerator._settledAt(FULFILLED, i, value); + }, function(reason) { + return enumerator._settledAt(REJECTED, i, reason); + }); + }; + return Enumerator2; + }(); + function all(entries) { + return new Enumerator(this, entries).promise; + } + function race(entries) { + var Constructor = this; + if (!isArray(entries)) { + return new Constructor(function(_, reject2) { + return reject2(new TypeError("You must pass an array to race.")); + }); + } else { + return new Constructor(function(resolve2, reject2) { + var length = entries.length; + for (var i = 0; i < length; i++) { + Constructor.resolve(entries[i]).then(resolve2, reject2); + } + }); + } + } + function reject$1(reason) { + var Constructor = this; + var promise = new Constructor(noop); + reject(promise, reason); + return promise; + } + function needsResolver() { + throw new TypeError("You must pass a resolver function as the first argument to the promise constructor"); + } + function needsNew() { + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); + } + var Promise$1 = function() { + function Promise2(resolver) { + this[PROMISE_ID] = nextId(); + this._result = this._state = void 0; + this._subscribers = []; + if (noop !== resolver) { + typeof resolver !== "function" && needsResolver(); + this instanceof Promise2 ? initializePromise(this, resolver) : needsNew(); + } + } + Promise2.prototype.catch = function _catch(onRejection) { + return this.then(null, onRejection); + }; + Promise2.prototype.finally = function _finally(callback) { + var promise = this; + var constructor = promise.constructor; + if (isFunction(callback)) { + return promise.then(function(value) { + return constructor.resolve(callback()).then(function() { + return value; + }); + }, function(reason) { + return constructor.resolve(callback()).then(function() { + throw reason; + }); + }); + } + return promise.then(callback, callback); + }; + return Promise2; + }(); + Promise$1.prototype.then = then; + Promise$1.all = all; + Promise$1.race = race; + Promise$1.resolve = resolve$1; + Promise$1.reject = reject$1; + Promise$1._setScheduler = setScheduler; + Promise$1._setAsap = setAsap; + Promise$1._asap = asap; + function polyfill() { + var local = void 0; + if (typeof global !== "undefined") { + local = global; + } else if (typeof self !== "undefined") { + local = self; + } else { + try { + local = Function("return this")(); + } catch (e) { + throw new Error("polyfill failed because global object is unavailable in this environment"); + } + } + var P = local.Promise; + if (P) { + var promiseToString = null; + try { + promiseToString = Object.prototype.toString.call(P.resolve()); + } catch (e) { + } + if (promiseToString === "[object Promise]" && !P.cast) { + return; + } + } + local.Promise = Promise$1; + } + Promise$1.polyfill = polyfill; + Promise$1.Promise = Promise$1; + return Promise$1; + }); + } +}); + +// ../../node_modules/.pnpm/es6-promisify@5.0.0/node_modules/es6-promisify/dist/promise.js +var require_promise2 = __commonJS({ + "../../node_modules/.pnpm/es6-promisify@5.0.0/node_modules/es6-promisify/dist/promise.js"(exports2, module2) { + "use strict"; + module2.exports = function() { + "use strict"; + var globalObject = void 0; + function isFunction(x) { + return typeof x === "function"; + } + if (global !== void 0) { + globalObject = global; + } else if (window !== void 0 && window.document) { + globalObject = window; + } else { + globalObject = self; + } + var hasPromiseSupport = function() { + if (!globalObject.hasOwnProperty("Promise")) { + return false; + } + var P = globalObject.Promise; + if (!P.hasOwnProperty("resolve") || !P.hasOwnProperty("reject")) { + return false; + } + if (!P.hasOwnProperty("all") || !P.hasOwnProperty("race")) { + return false; + } + return function() { + var resolve = void 0; + var p = new globalObject.Promise(function(r) { + resolve = r; + }); + if (p) { + return isFunction(resolve); + } + return false; + }(); + }(); + if (hasPromiseSupport) { + return globalObject.Promise; + } + return require_es6_promise().Promise; + }(); + } +}); + +// ../../node_modules/.pnpm/es6-promisify@5.0.0/node_modules/es6-promisify/dist/promisify.js +var require_promisify2 = __commonJS({ + "../../node_modules/.pnpm/es6-promisify@5.0.0/node_modules/es6-promisify/dist/promisify.js"(exports2, module2) { + "use strict"; + module2.exports = function() { + "use strict"; + var ES6Promise = require_promise2(); + function thatLooksLikeAPromiseToMe(o) { + return o && typeof o.then === "function" && typeof o.catch === "function"; + } + return function promisify(original, settings) { + return function() { + for (var _len = arguments.length, args2 = Array(_len), _key = 0; _key < _len; _key++) { + args2[_key] = arguments[_key]; + } + var returnMultipleArguments = settings && settings.multiArgs; + var target = void 0; + if (settings && settings.thisArg) { + target = settings.thisArg; + } else if (settings) { + target = settings; + } + return new ES6Promise(function(resolve, reject) { + args2.push(function callback(err) { + if (err) { + return reject(err); + } + for (var _len2 = arguments.length, values = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + values[_key2 - 1] = arguments[_key2]; + } + if (!!returnMultipleArguments === false) { + return resolve(values[0]); + } + resolve(values); + }); + var response = original.apply(target, args2); + if (thatLooksLikeAPromiseToMe(response)) { + resolve(response); + } + }); + }; + }; + }(); + } +}); + +// ../../node_modules/.pnpm/agent-base@4.3.0/node_modules/agent-base/index.js +var require_agent_base = __commonJS({ + "../../node_modules/.pnpm/agent-base@4.3.0/node_modules/agent-base/index.js"(exports2, module2) { + "use strict"; + require_patch_core(); + var inherits = require("util").inherits; + var promisify = require_promisify2(); + var EventEmitter = require("events").EventEmitter; + module2.exports = Agent; + function isAgent(v) { + return v && typeof v.addRequest === "function"; + } + function Agent(callback, _opts) { + if (!(this instanceof Agent)) { + return new Agent(callback, _opts); + } + EventEmitter.call(this); + this._promisifiedCallback = false; + let opts = _opts; + if (typeof callback === "function") { + this.callback = callback; + } else if (callback) { + opts = callback; + } + this.timeout = opts && opts.timeout || null; + this.options = opts; + } + inherits(Agent, EventEmitter); + Agent.prototype.callback = function callback(req, opts) { + throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`'); + }; + Agent.prototype.addRequest = function addRequest(req, _opts) { + const ownOpts = Object.assign({}, _opts); + if (ownOpts.host == null) { + ownOpts.host = "localhost"; + } + if (ownOpts.port == null) { + ownOpts.port = ownOpts.secureEndpoint ? 443 : 80; + } + const opts = Object.assign({}, this.options, ownOpts); + if (opts.host && opts.path) { + delete opts.path; + } + delete opts.agent; + delete opts.hostname; + delete opts._defaultAgent; + delete opts.defaultPort; + delete opts.createConnection; + req._last = true; + req.shouldKeepAlive = false; + let timeout; + let timedOut = false; + const timeoutMs = this.timeout; + const freeSocket = this.freeSocket; + function onerror(err) { + if (req._hadError) + return; + req.emit("error", err); + req._hadError = true; + } + function ontimeout() { + timeout = null; + timedOut = true; + const err = new Error('A "socket" was not created for HTTP request before ' + timeoutMs + "ms"); + err.code = "ETIMEOUT"; + onerror(err); + } + function callbackError(err) { + if (timedOut) + return; + if (timeout != null) { + clearTimeout(timeout); + timeout = null; + } + onerror(err); + } + function onsocket(socket) { + if (timedOut) + return; + if (timeout != null) { + clearTimeout(timeout); + timeout = null; + } + if (isAgent(socket)) { + socket.addRequest(req, opts); + } else if (socket) { + let onfree = function() { + freeSocket(socket, opts); + }; + socket.on("free", onfree); + req.onSocket(socket); + } else { + const err = new Error("no Duplex stream was returned to agent-base for `" + req.method + " " + req.path + "`"); + onerror(err); + } + } + if (!this._promisifiedCallback && this.callback.length >= 3) { + this.callback = promisify(this.callback, this); + this._promisifiedCallback = true; + } + if (timeoutMs > 0) { + timeout = setTimeout(ontimeout, timeoutMs); + } + try { + Promise.resolve(this.callback(req, opts)).then(onsocket, callbackError); + } catch (err) { + Promise.reject(err).catch(callbackError); + } + }; + Agent.prototype.freeSocket = function freeSocket(socket, opts) { + socket.destroy(); + }; + } +}); + +// ../../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/common.js +var require_common5 = __commonJS({ + "../../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/common.js"(exports2, module2) { + "use strict"; + function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require_ms2(); + Object.keys(env).forEach(function(key) { + createDebug[key] = env[key]; + }); + createDebug.instances = []; + createDebug.names = []; + createDebug.skips = []; + createDebug.formatters = {}; + function selectColor(namespace) { + var hash = 0; + for (var i = 0; i < namespace.length; i++) { + hash = (hash << 5) - hash + namespace.charCodeAt(i); + hash |= 0; + } + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + function createDebug(namespace) { + var prevTime; + function debug() { + if (!debug.enabled) { + return; + } + for (var _len = arguments.length, args2 = new Array(_len), _key = 0; _key < _len; _key++) { + args2[_key] = arguments[_key]; + } + var self2 = debug; + var curr = Number(new Date()); + var ms = curr - (prevTime || curr); + self2.diff = ms; + self2.prev = prevTime; + self2.curr = curr; + prevTime = curr; + args2[0] = createDebug.coerce(args2[0]); + if (typeof args2[0] !== "string") { + args2.unshift("%O"); + } + var index = 0; + args2[0] = args2[0].replace(/%([a-zA-Z%])/g, function(match, format) { + if (match === "%%") { + return match; + } + index++; + var formatter = createDebug.formatters[format]; + if (typeof formatter === "function") { + var val = args2[index]; + match = formatter.call(self2, val); + args2.splice(index, 1); + index--; + } + return match; + }); + createDebug.formatArgs.call(self2, args2); + var logFn = self2.log || createDebug.log; + logFn.apply(self2, args2); + } + debug.namespace = namespace; + debug.enabled = createDebug.enabled(namespace); + debug.useColors = createDebug.useColors(); + debug.color = selectColor(namespace); + debug.destroy = destroy; + debug.extend = extend; + if (typeof createDebug.init === "function") { + createDebug.init(debug); + } + createDebug.instances.push(debug); + return debug; + } + function destroy() { + var index = createDebug.instances.indexOf(this); + if (index !== -1) { + createDebug.instances.splice(index, 1); + return true; + } + return false; + } + function extend(namespace, delimiter) { + return createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); + } + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.names = []; + createDebug.skips = []; + var i; + var split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); + var len = split.length; + for (i = 0; i < len; i++) { + if (!split[i]) { + continue; + } + namespaces = split[i].replace(/\*/g, ".*?"); + if (namespaces[0] === "-") { + createDebug.skips.push(new RegExp("^" + namespaces.substr(1) + "$")); + } else { + createDebug.names.push(new RegExp("^" + namespaces + "$")); + } + } + for (i = 0; i < createDebug.instances.length; i++) { + var instance = createDebug.instances[i]; + instance.enabled = createDebug.enabled(instance.namespace); + } + } + function disable() { + createDebug.enable(""); + } + function enabled(name) { + if (name[name.length - 1] === "*") { + return true; + } + var i; + var len; + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + return false; + } + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + createDebug.enable(createDebug.load()); + return createDebug; + } + module2.exports = setup; + } +}); + +// ../../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js +var require_browser2 = __commonJS({ + "../../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js"(exports2, module2) { + "use strict"; + function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof2(obj2) { + return typeof obj2; + }; + } else { + _typeof = function _typeof2(obj2) { + return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2; + }; + } + return _typeof(obj); + } + exports2.log = log2; + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.storage = localstorage(); + exports2.colors = ["#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC", "#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99", "#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC", "#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99", "#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00", "#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33", "#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300", "#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633", "#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066", "#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399", "#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00", "#FFCC33"]; + function useColors() { + if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { + return true; + } + if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); + } + function formatArgs(args2) { + args2[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args2[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); + if (!this.useColors) { + return; + } + var c = "color: " + this.color; + args2.splice(1, 0, c, "color: inherit"); + var index = 0; + var lastC = 0; + args2[0].replace(/%[a-zA-Z%]/g, function(match) { + if (match === "%%") { + return; + } + index++; + if (match === "%c") { + lastC = index; + } + }); + args2.splice(lastC, 0, c); + } + function log2() { + var _console; + return (typeof console === "undefined" ? "undefined" : _typeof(console)) === "object" && console.log && (_console = console).log.apply(_console, arguments); + } + function save(namespaces) { + try { + if (namespaces) { + exports2.storage.setItem("debug", namespaces); + } else { + exports2.storage.removeItem("debug"); + } + } catch (error) { + } + } + function load() { + var r; + try { + r = exports2.storage.getItem("debug"); + } catch (error) { + } + if (!r && typeof process !== "undefined" && "env" in process) { + r = process.env.DEBUG; + } + return r; + } + function localstorage() { + try { + return localStorage; + } catch (error) { + } + } + module2.exports = require_common5()(exports2); + var formatters = module2.exports.formatters; + formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (error) { + return "[UnexpectedJSONParseError]: " + error.message; + } + }; + } +}); + +// ../../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/node.js +var require_node3 = __commonJS({ + "../../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/node.js"(exports2, module2) { + "use strict"; + var tty = require("tty"); + var util = require("util"); + exports2.init = init; + exports2.log = log2; + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.colors = [6, 2, 3, 4, 5, 1]; + try { + supportsColor = require("supports-color"); + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports2.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221]; + } + } catch (error) { + } + var supportsColor; + exports2.inspectOpts = Object.keys(process.env).filter(function(key) { + return /^debug_/i.test(key); + }).reduce(function(obj, key) { + var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_, k) { + return k.toUpperCase(); + }); + var val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === "null") { + val = null; + } else { + val = Number(val); + } + obj[prop] = val; + return obj; + }, {}); + function useColors() { + return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd); + } + function formatArgs(args2) { + var name = this.namespace, useColors2 = this.useColors; + if (useColors2) { + var c = this.color; + var colorCode = "[3" + (c < 8 ? c : "8;5;" + c); + var prefix = " ".concat(colorCode, ";1m").concat(name, " "); + args2[0] = prefix + args2[0].split("\n").join("\n" + prefix); + args2.push(colorCode + "m+" + module2.exports.humanize(this.diff) + ""); + } else { + args2[0] = getDate() + name + " " + args2[0]; + } + } + function getDate() { + if (exports2.inspectOpts.hideDate) { + return ""; + } + return new Date().toISOString() + " "; + } + function log2() { + return process.stderr.write(util.format.apply(util, arguments) + "\n"); + } + function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + delete process.env.DEBUG; + } + } + function load() { + return process.env.DEBUG; + } + function init(debug) { + debug.inspectOpts = {}; + var keys = Object.keys(exports2.inspectOpts); + for (var i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; + } + } + module2.exports = require_common5()(exports2); + var formatters = module2.exports.formatters; + formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts).split("\n").map(function(str) { + return str.trim(); + }).join(" "); + }; + formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); + }; + } +}); + +// ../../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/index.js +var require_src4 = __commonJS({ + "../../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/index.js"(exports2, module2) { + "use strict"; + if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { + module2.exports = require_browser2(); + } else { + module2.exports = require_node3(); + } + } +}); + +// ../../node_modules/.pnpm/https-proxy-agent@3.0.1/node_modules/https-proxy-agent/index.js +var require_https_proxy_agent = __commonJS({ + "../../node_modules/.pnpm/https-proxy-agent@3.0.1/node_modules/https-proxy-agent/index.js"(exports2, module2) { + var net = require("net"); + var tls = require("tls"); + var url = require("url"); + var assert = require("assert"); + var Agent = require_agent_base(); + var inherits = require("util").inherits; + var debug = require_src4()("https-proxy-agent"); + module2.exports = HttpsProxyAgent; + function HttpsProxyAgent(opts) { + if (!(this instanceof HttpsProxyAgent)) + return new HttpsProxyAgent(opts); + if (typeof opts == "string") + opts = url.parse(opts); + if (!opts) + throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!"); + debug("creating new HttpsProxyAgent instance: %o", opts); + Agent.call(this, opts); + var proxy = Object.assign({}, opts); + this.secureProxy = proxy.protocol ? /^https:?$/i.test(proxy.protocol) : false; + proxy.host = proxy.hostname || proxy.host; + proxy.port = +proxy.port || (this.secureProxy ? 443 : 80); + if (this.secureProxy && !("ALPNProtocols" in proxy)) { + proxy.ALPNProtocols = ["http 1.1"]; + } + if (proxy.host && proxy.path) { + delete proxy.path; + delete proxy.pathname; + } + this.proxy = proxy; + this.defaultPort = 443; + } + inherits(HttpsProxyAgent, Agent); + HttpsProxyAgent.prototype.callback = function connect(req, opts, fn2) { + var proxy = this.proxy; + var socket; + if (this.secureProxy) { + socket = tls.connect(proxy); + } else { + socket = net.connect(proxy); + } + var buffers = []; + var buffersLength = 0; + function read() { + var b = socket.read(); + if (b) + ondata(b); + else + socket.once("readable", read); + } + function cleanup() { + socket.removeListener("end", onend); + socket.removeListener("error", onerror); + socket.removeListener("close", onclose); + socket.removeListener("readable", read); + } + function onclose(err) { + debug("onclose had error %o", err); + } + function onend() { + debug("onend"); + } + function onerror(err) { + cleanup(); + fn2(err); + } + function ondata(b) { + buffers.push(b); + buffersLength += b.length; + var buffered = Buffer.concat(buffers, buffersLength); + var str = buffered.toString("ascii"); + if (!~str.indexOf("\r\n\r\n")) { + debug("have not received end of HTTP headers yet..."); + read(); + return; + } + var firstLine = str.substring(0, str.indexOf("\r\n")); + var statusCode = +firstLine.split(" ")[1]; + debug("got proxy server response: %o", firstLine); + if (statusCode == 200) { + var sock = socket; + buffers = buffered = null; + if (opts.secureEndpoint) { + debug("upgrading proxy-connected socket to TLS connection: %o", opts.host); + opts.socket = socket; + opts.servername = opts.servername || opts.host; + opts.host = null; + opts.hostname = null; + opts.port = null; + sock = tls.connect(opts); + } + cleanup(); + req.once("socket", resume); + fn2(null, sock); + } else { + cleanup(); + socket.destroy(); + socket = new net.Socket(); + socket.readable = true; + buffers = buffered; + req.once("socket", onsocket); + fn2(null, socket); + } + } + function onsocket(socket2) { + debug("replaying proxy buffer for failed request"); + assert(socket2.listenerCount("data") > 0); + socket2.push(buffers); + buffers = null; + } + socket.on("error", onerror); + socket.on("close", onclose); + socket.on("end", onend); + read(); + var hostname = opts.host + ":" + opts.port; + var msg = "CONNECT " + hostname + " HTTP/1.1\r\n"; + var headers = Object.assign({}, proxy.headers); + if (proxy.auth) { + headers["Proxy-Authorization"] = "Basic " + Buffer.from(proxy.auth).toString("base64"); + } + var host = opts.host; + if (!isDefaultPort(opts.port, opts.secureEndpoint)) { + host += ":" + opts.port; + } + headers["Host"] = host; + headers["Connection"] = "close"; + Object.keys(headers).forEach(function(name) { + msg += name + ": " + headers[name] + "\r\n"; + }); + socket.write(msg + "\r\n"); + }; + function resume(socket) { + socket.resume(); + } + function isDefaultPort(port, secure) { + return Boolean(!secure && port === 80 || secure && port === 443); + } + } +}); + +// ../../node_modules/.pnpm/ip@1.1.5/node_modules/ip/lib/ip.js +var require_ip = __commonJS({ + "../../node_modules/.pnpm/ip@1.1.5/node_modules/ip/lib/ip.js"(exports2) { + "use strict"; + var ip = exports2; + var Buffer2 = require("buffer").Buffer; + var os = require("os"); + ip.toBuffer = function(ip2, buff, offset) { + offset = ~~offset; + var result; + if (this.isV4Format(ip2)) { + result = buff || new Buffer2(offset + 4); + ip2.split(/\./g).map(function(byte) { + result[offset++] = parseInt(byte, 10) & 255; + }); + } else if (this.isV6Format(ip2)) { + var sections = ip2.split(":", 8); + var i; + for (i = 0; i < sections.length; i++) { + var isv4 = this.isV4Format(sections[i]); + var v4Buffer; + if (isv4) { + v4Buffer = this.toBuffer(sections[i]); + sections[i] = v4Buffer.slice(0, 2).toString("hex"); + } + if (v4Buffer && ++i < 8) { + sections.splice(i, 0, v4Buffer.slice(2, 4).toString("hex")); + } + } + if (sections[0] === "") { + while (sections.length < 8) + sections.unshift("0"); + } else if (sections[sections.length - 1] === "") { + while (sections.length < 8) + sections.push("0"); + } else if (sections.length < 8) { + for (i = 0; i < sections.length && sections[i] !== ""; i++) + ; + var argv2 = [i, 1]; + for (i = 9 - sections.length; i > 0; i--) { + argv2.push("0"); + } + sections.splice.apply(sections, argv2); + } + result = buff || new Buffer2(offset + 16); + for (i = 0; i < sections.length; i++) { + var word = parseInt(sections[i], 16); + result[offset++] = word >> 8 & 255; + result[offset++] = word & 255; + } + } + if (!result) { + throw Error("Invalid ip address: " + ip2); + } + return result; + }; + ip.toString = function(buff, offset, length) { + offset = ~~offset; + length = length || buff.length - offset; + var result = []; + if (length === 4) { + for (var i = 0; i < length; i++) { + result.push(buff[offset + i]); + } + result = result.join("."); + } else if (length === 16) { + for (var i = 0; i < length; i += 2) { + result.push(buff.readUInt16BE(offset + i).toString(16)); + } + result = result.join(":"); + result = result.replace(/(^|:)0(:0)*:0(:|$)/, "$1::$3"); + result = result.replace(/:{3,4}/, "::"); + } + return result; + }; + var ipv4Regex = /^(\d{1,3}\.){3,3}\d{1,3}$/; + var ipv6Regex = /^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i; + ip.isV4Format = function(ip2) { + return ipv4Regex.test(ip2); + }; + ip.isV6Format = function(ip2) { + return ipv6Regex.test(ip2); + }; + function _normalizeFamily(family) { + return family ? family.toLowerCase() : "ipv4"; + } + ip.fromPrefixLen = function(prefixlen, family) { + if (prefixlen > 32) { + family = "ipv6"; + } else { + family = _normalizeFamily(family); + } + var len = 4; + if (family === "ipv6") { + len = 16; + } + var buff = new Buffer2(len); + for (var i = 0, n = buff.length; i < n; ++i) { + var bits = 8; + if (prefixlen < 8) { + bits = prefixlen; + } + prefixlen -= bits; + buff[i] = ~(255 >> bits) & 255; + } + return ip.toString(buff); + }; + ip.mask = function(addr, mask) { + addr = ip.toBuffer(addr); + mask = ip.toBuffer(mask); + var result = new Buffer2(Math.max(addr.length, mask.length)); + var i = 0; + if (addr.length === mask.length) { + for (i = 0; i < addr.length; i++) { + result[i] = addr[i] & mask[i]; + } + } else if (mask.length === 4) { + for (i = 0; i < mask.length; i++) { + result[i] = addr[addr.length - 4 + i] & mask[i]; + } + } else { + for (var i = 0; i < result.length - 6; i++) { + result[i] = 0; + } + result[10] = 255; + result[11] = 255; + for (i = 0; i < addr.length; i++) { + result[i + 12] = addr[i] & mask[i + 12]; + } + i = i + 12; + } + for (; i < result.length; i++) + result[i] = 0; + return ip.toString(result); + }; + ip.cidr = function(cidrString) { + var cidrParts = cidrString.split("/"); + var addr = cidrParts[0]; + if (cidrParts.length !== 2) + throw new Error("invalid CIDR subnet: " + addr); + var mask = ip.fromPrefixLen(parseInt(cidrParts[1], 10)); + return ip.mask(addr, mask); + }; + ip.subnet = function(addr, mask) { + var networkAddress = ip.toLong(ip.mask(addr, mask)); + var maskBuffer = ip.toBuffer(mask); + var maskLength = 0; + for (var i = 0; i < maskBuffer.length; i++) { + if (maskBuffer[i] === 255) { + maskLength += 8; + } else { + var octet = maskBuffer[i] & 255; + while (octet) { + octet = octet << 1 & 255; + maskLength++; + } + } + } + var numberOfAddresses = Math.pow(2, 32 - maskLength); + return { + networkAddress: ip.fromLong(networkAddress), + firstAddress: numberOfAddresses <= 2 ? ip.fromLong(networkAddress) : ip.fromLong(networkAddress + 1), + lastAddress: numberOfAddresses <= 2 ? ip.fromLong(networkAddress + numberOfAddresses - 1) : ip.fromLong(networkAddress + numberOfAddresses - 2), + broadcastAddress: ip.fromLong(networkAddress + numberOfAddresses - 1), + subnetMask: mask, + subnetMaskLength: maskLength, + numHosts: numberOfAddresses <= 2 ? numberOfAddresses : numberOfAddresses - 2, + length: numberOfAddresses, + contains: function(other) { + return networkAddress === ip.toLong(ip.mask(other, mask)); + } + }; + }; + ip.cidrSubnet = function(cidrString) { + var cidrParts = cidrString.split("/"); + var addr = cidrParts[0]; + if (cidrParts.length !== 2) + throw new Error("invalid CIDR subnet: " + addr); + var mask = ip.fromPrefixLen(parseInt(cidrParts[1], 10)); + return ip.subnet(addr, mask); + }; + ip.not = function(addr) { + var buff = ip.toBuffer(addr); + for (var i = 0; i < buff.length; i++) { + buff[i] = 255 ^ buff[i]; + } + return ip.toString(buff); + }; + ip.or = function(a, b) { + a = ip.toBuffer(a); + b = ip.toBuffer(b); + if (a.length === b.length) { + for (var i = 0; i < a.length; ++i) { + a[i] |= b[i]; + } + return ip.toString(a); + } else { + var buff = a; + var other = b; + if (b.length > a.length) { + buff = b; + other = a; + } + var offset = buff.length - other.length; + for (var i = offset; i < buff.length; ++i) { + buff[i] |= other[i - offset]; + } + return ip.toString(buff); + } + }; + ip.isEqual = function(a, b) { + a = ip.toBuffer(a); + b = ip.toBuffer(b); + if (a.length === b.length) { + for (var i = 0; i < a.length; i++) { + if (a[i] !== b[i]) + return false; + } + return true; + } + if (b.length === 4) { + var t = b; + b = a; + a = t; + } + for (var i = 0; i < 10; i++) { + if (b[i] !== 0) + return false; + } + var word = b.readUInt16BE(10); + if (word !== 0 && word !== 65535) + return false; + for (var i = 0; i < 4; i++) { + if (a[i] !== b[i + 12]) + return false; + } + return true; + }; + ip.isPrivate = function(addr) { + return /^(::f{4}:)?10\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || /^(::f{4}:)?192\.168\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || /^(::f{4}:)?172\.(1[6-9]|2\d|30|31)\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || /^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || /^(::f{4}:)?169\.254\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || /^f[cd][0-9a-f]{2}:/i.test(addr) || /^fe80:/i.test(addr) || /^::1$/.test(addr) || /^::$/.test(addr); + }; + ip.isPublic = function(addr) { + return !ip.isPrivate(addr); + }; + ip.isLoopback = function(addr) { + return /^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/.test(addr) || /^fe80::1$/.test(addr) || /^::1$/.test(addr) || /^::$/.test(addr); + }; + ip.loopback = function(family) { + family = _normalizeFamily(family); + if (family !== "ipv4" && family !== "ipv6") { + throw new Error("family must be ipv4 or ipv6"); + } + return family === "ipv4" ? "127.0.0.1" : "fe80::1"; + }; + ip.address = function(name, family) { + var interfaces = os.networkInterfaces(); + var all; + family = _normalizeFamily(family); + if (name && name !== "private" && name !== "public") { + var res = interfaces[name].filter(function(details) { + var itemFamily = details.family.toLowerCase(); + return itemFamily === family; + }); + if (res.length === 0) + return void 0; + return res[0].address; + } + var all = Object.keys(interfaces).map(function(nic) { + var addresses = interfaces[nic].filter(function(details) { + details.family = details.family.toLowerCase(); + if (details.family !== family || ip.isLoopback(details.address)) { + return false; + } else if (!name) { + return true; + } + return name === "public" ? ip.isPrivate(details.address) : ip.isPublic(details.address); + }); + return addresses.length ? addresses[0].address : void 0; + }).filter(Boolean); + return !all.length ? ip.loopback(family) : all[0]; + }; + ip.toLong = function(ip2) { + var ipl = 0; + ip2.split(".").forEach(function(octet) { + ipl <<= 8; + ipl += parseInt(octet); + }); + return ipl >>> 0; + }; + ip.fromLong = function(ipl) { + return (ipl >>> 24) + "." + (ipl >> 16 & 255) + "." + (ipl >> 8 & 255) + "." + (ipl & 255); + }; + } +}); + +// ../../node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/build/utils.js +var require_utils7 = __commonJS({ + "../../node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/build/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var buffer_1 = require("buffer"); + var ERRORS = { + INVALID_ENCODING: "Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.", + INVALID_SMARTBUFFER_SIZE: "Invalid size provided. Size must be a valid integer greater than zero.", + INVALID_SMARTBUFFER_BUFFER: "Invalid Buffer provided in SmartBufferOptions.", + INVALID_SMARTBUFFER_OBJECT: "Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.", + INVALID_OFFSET: "An invalid offset value was provided.", + INVALID_OFFSET_NON_NUMBER: "An invalid offset value was provided. A numeric value is required.", + INVALID_LENGTH: "An invalid length value was provided.", + INVALID_LENGTH_NON_NUMBER: "An invalid length value was provived. A numeric value is required.", + INVALID_TARGET_OFFSET: "Target offset is beyond the bounds of the internal SmartBuffer data.", + INVALID_TARGET_LENGTH: "Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.", + INVALID_READ_BEYOND_BOUNDS: "Attempted to read beyond the bounds of the managed data.", + INVALID_WRITE_BEYOND_BOUNDS: "Attempted to write beyond the bounds of the managed data." + }; + exports2.ERRORS = ERRORS; + function checkEncoding(encoding) { + if (!buffer_1.Buffer.isEncoding(encoding)) { + throw new Error(ERRORS.INVALID_ENCODING); + } + } + exports2.checkEncoding = checkEncoding; + function isFiniteInteger(value) { + return typeof value === "number" && isFinite(value) && isInteger(value); + } + exports2.isFiniteInteger = isFiniteInteger; + function checkOffsetOrLengthValue(value, offset) { + if (typeof value === "number") { + if (!isFiniteInteger(value) || value < 0) { + throw new Error(offset ? ERRORS.INVALID_OFFSET : ERRORS.INVALID_LENGTH); + } + } else { + throw new Error(offset ? ERRORS.INVALID_OFFSET_NON_NUMBER : ERRORS.INVALID_LENGTH_NON_NUMBER); + } + } + function checkLengthValue(length) { + checkOffsetOrLengthValue(length, false); + } + exports2.checkLengthValue = checkLengthValue; + function checkOffsetValue(offset) { + checkOffsetOrLengthValue(offset, true); + } + exports2.checkOffsetValue = checkOffsetValue; + function checkTargetOffset(offset, buff) { + if (offset < 0 || offset > buff.length) { + throw new Error(ERRORS.INVALID_TARGET_OFFSET); + } + } + exports2.checkTargetOffset = checkTargetOffset; + function isInteger(value) { + return typeof value === "number" && isFinite(value) && Math.floor(value) === value; + } + function bigIntAndBufferInt64Check(bufferMethod) { + if (typeof BigInt === "undefined") { + throw new Error("Platform does not support JS BigInt type."); + } + if (typeof buffer_1.Buffer.prototype[bufferMethod] === "undefined") { + throw new Error(`Platform does not support Buffer.prototype.${bufferMethod}.`); + } + } + exports2.bigIntAndBufferInt64Check = bigIntAndBufferInt64Check; + } +}); + +// ../../node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/build/smartbuffer.js +var require_smartbuffer = __commonJS({ + "../../node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/build/smartbuffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var utils_1 = require_utils7(); + var DEFAULT_SMARTBUFFER_SIZE = 4096; + var DEFAULT_SMARTBUFFER_ENCODING = "utf8"; + var SmartBuffer = class { + constructor(options) { + this.length = 0; + this._encoding = DEFAULT_SMARTBUFFER_ENCODING; + this._writeOffset = 0; + this._readOffset = 0; + if (SmartBuffer.isSmartBufferOptions(options)) { + if (options.encoding) { + utils_1.checkEncoding(options.encoding); + this._encoding = options.encoding; + } + if (options.size) { + if (utils_1.isFiniteInteger(options.size) && options.size > 0) { + this._buff = Buffer.allocUnsafe(options.size); + } else { + throw new Error(utils_1.ERRORS.INVALID_SMARTBUFFER_SIZE); + } + } else if (options.buff) { + if (Buffer.isBuffer(options.buff)) { + this._buff = options.buff; + this.length = options.buff.length; + } else { + throw new Error(utils_1.ERRORS.INVALID_SMARTBUFFER_BUFFER); + } + } else { + this._buff = Buffer.allocUnsafe(DEFAULT_SMARTBUFFER_SIZE); + } + } else { + if (typeof options !== "undefined") { + throw new Error(utils_1.ERRORS.INVALID_SMARTBUFFER_OBJECT); + } + this._buff = Buffer.allocUnsafe(DEFAULT_SMARTBUFFER_SIZE); + } + } + static fromSize(size, encoding) { + return new this({ + size, + encoding + }); + } + static fromBuffer(buff, encoding) { + return new this({ + buff, + encoding + }); + } + static fromOptions(options) { + return new this(options); + } + static isSmartBufferOptions(options) { + const castOptions = options; + return castOptions && (castOptions.encoding !== void 0 || castOptions.size !== void 0 || castOptions.buff !== void 0); + } + readInt8(offset) { + return this._readNumberValue(Buffer.prototype.readInt8, 1, offset); + } + readInt16BE(offset) { + return this._readNumberValue(Buffer.prototype.readInt16BE, 2, offset); + } + readInt16LE(offset) { + return this._readNumberValue(Buffer.prototype.readInt16LE, 2, offset); + } + readInt32BE(offset) { + return this._readNumberValue(Buffer.prototype.readInt32BE, 4, offset); + } + readInt32LE(offset) { + return this._readNumberValue(Buffer.prototype.readInt32LE, 4, offset); + } + readBigInt64BE(offset) { + utils_1.bigIntAndBufferInt64Check("readBigInt64BE"); + return this._readNumberValue(Buffer.prototype.readBigInt64BE, 8, offset); + } + readBigInt64LE(offset) { + utils_1.bigIntAndBufferInt64Check("readBigInt64LE"); + return this._readNumberValue(Buffer.prototype.readBigInt64LE, 8, offset); + } + writeInt8(value, offset) { + this._writeNumberValue(Buffer.prototype.writeInt8, 1, value, offset); + return this; + } + insertInt8(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeInt8, 1, value, offset); + } + writeInt16BE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeInt16BE, 2, value, offset); + } + insertInt16BE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeInt16BE, 2, value, offset); + } + writeInt16LE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeInt16LE, 2, value, offset); + } + insertInt16LE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeInt16LE, 2, value, offset); + } + writeInt32BE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeInt32BE, 4, value, offset); + } + insertInt32BE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeInt32BE, 4, value, offset); + } + writeInt32LE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeInt32LE, 4, value, offset); + } + insertInt32LE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeInt32LE, 4, value, offset); + } + writeBigInt64BE(value, offset) { + utils_1.bigIntAndBufferInt64Check("writeBigInt64BE"); + return this._writeNumberValue(Buffer.prototype.writeBigInt64BE, 8, value, offset); + } + insertBigInt64BE(value, offset) { + utils_1.bigIntAndBufferInt64Check("writeBigInt64BE"); + return this._insertNumberValue(Buffer.prototype.writeBigInt64BE, 8, value, offset); + } + writeBigInt64LE(value, offset) { + utils_1.bigIntAndBufferInt64Check("writeBigInt64LE"); + return this._writeNumberValue(Buffer.prototype.writeBigInt64LE, 8, value, offset); + } + insertBigInt64LE(value, offset) { + utils_1.bigIntAndBufferInt64Check("writeBigInt64LE"); + return this._insertNumberValue(Buffer.prototype.writeBigInt64LE, 8, value, offset); + } + readUInt8(offset) { + return this._readNumberValue(Buffer.prototype.readUInt8, 1, offset); + } + readUInt16BE(offset) { + return this._readNumberValue(Buffer.prototype.readUInt16BE, 2, offset); + } + readUInt16LE(offset) { + return this._readNumberValue(Buffer.prototype.readUInt16LE, 2, offset); + } + readUInt32BE(offset) { + return this._readNumberValue(Buffer.prototype.readUInt32BE, 4, offset); + } + readUInt32LE(offset) { + return this._readNumberValue(Buffer.prototype.readUInt32LE, 4, offset); + } + readBigUInt64BE(offset) { + utils_1.bigIntAndBufferInt64Check("readBigUInt64BE"); + return this._readNumberValue(Buffer.prototype.readBigUInt64BE, 8, offset); + } + readBigUInt64LE(offset) { + utils_1.bigIntAndBufferInt64Check("readBigUInt64LE"); + return this._readNumberValue(Buffer.prototype.readBigUInt64LE, 8, offset); + } + writeUInt8(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeUInt8, 1, value, offset); + } + insertUInt8(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeUInt8, 1, value, offset); + } + writeUInt16BE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeUInt16BE, 2, value, offset); + } + insertUInt16BE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeUInt16BE, 2, value, offset); + } + writeUInt16LE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeUInt16LE, 2, value, offset); + } + insertUInt16LE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeUInt16LE, 2, value, offset); + } + writeUInt32BE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeUInt32BE, 4, value, offset); + } + insertUInt32BE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeUInt32BE, 4, value, offset); + } + writeUInt32LE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeUInt32LE, 4, value, offset); + } + insertUInt32LE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeUInt32LE, 4, value, offset); + } + writeBigUInt64BE(value, offset) { + utils_1.bigIntAndBufferInt64Check("writeBigUInt64BE"); + return this._writeNumberValue(Buffer.prototype.writeBigUInt64BE, 8, value, offset); + } + insertBigUInt64BE(value, offset) { + utils_1.bigIntAndBufferInt64Check("writeBigUInt64BE"); + return this._insertNumberValue(Buffer.prototype.writeBigUInt64BE, 8, value, offset); + } + writeBigUInt64LE(value, offset) { + utils_1.bigIntAndBufferInt64Check("writeBigUInt64LE"); + return this._writeNumberValue(Buffer.prototype.writeBigUInt64LE, 8, value, offset); + } + insertBigUInt64LE(value, offset) { + utils_1.bigIntAndBufferInt64Check("writeBigUInt64LE"); + return this._insertNumberValue(Buffer.prototype.writeBigUInt64LE, 8, value, offset); + } + readFloatBE(offset) { + return this._readNumberValue(Buffer.prototype.readFloatBE, 4, offset); + } + readFloatLE(offset) { + return this._readNumberValue(Buffer.prototype.readFloatLE, 4, offset); + } + writeFloatBE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeFloatBE, 4, value, offset); + } + insertFloatBE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeFloatBE, 4, value, offset); + } + writeFloatLE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeFloatLE, 4, value, offset); + } + insertFloatLE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeFloatLE, 4, value, offset); + } + readDoubleBE(offset) { + return this._readNumberValue(Buffer.prototype.readDoubleBE, 8, offset); + } + readDoubleLE(offset) { + return this._readNumberValue(Buffer.prototype.readDoubleLE, 8, offset); + } + writeDoubleBE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeDoubleBE, 8, value, offset); + } + insertDoubleBE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeDoubleBE, 8, value, offset); + } + writeDoubleLE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeDoubleLE, 8, value, offset); + } + insertDoubleLE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeDoubleLE, 8, value, offset); + } + readString(arg1, encoding) { + let lengthVal; + if (typeof arg1 === "number") { + utils_1.checkLengthValue(arg1); + lengthVal = Math.min(arg1, this.length - this._readOffset); + } else { + encoding = arg1; + lengthVal = this.length - this._readOffset; + } + if (typeof encoding !== "undefined") { + utils_1.checkEncoding(encoding); + } + const value = this._buff.slice(this._readOffset, this._readOffset + lengthVal).toString(encoding || this._encoding); + this._readOffset += lengthVal; + return value; + } + insertString(value, offset, encoding) { + utils_1.checkOffsetValue(offset); + return this._handleString(value, true, offset, encoding); + } + writeString(value, arg2, encoding) { + return this._handleString(value, false, arg2, encoding); + } + readStringNT(encoding) { + if (typeof encoding !== "undefined") { + utils_1.checkEncoding(encoding); + } + let nullPos = this.length; + for (let i = this._readOffset; i < this.length; i++) { + if (this._buff[i] === 0) { + nullPos = i; + break; + } + } + const value = this._buff.slice(this._readOffset, nullPos); + this._readOffset = nullPos + 1; + return value.toString(encoding || this._encoding); + } + insertStringNT(value, offset, encoding) { + utils_1.checkOffsetValue(offset); + this.insertString(value, offset, encoding); + this.insertUInt8(0, offset + value.length); + return this; + } + writeStringNT(value, arg2, encoding) { + this.writeString(value, arg2, encoding); + this.writeUInt8(0, typeof arg2 === "number" ? arg2 + value.length : this.writeOffset); + return this; + } + readBuffer(length) { + if (typeof length !== "undefined") { + utils_1.checkLengthValue(length); + } + const lengthVal = typeof length === "number" ? length : this.length; + const endPoint = Math.min(this.length, this._readOffset + lengthVal); + const value = this._buff.slice(this._readOffset, endPoint); + this._readOffset = endPoint; + return value; + } + insertBuffer(value, offset) { + utils_1.checkOffsetValue(offset); + return this._handleBuffer(value, true, offset); + } + writeBuffer(value, offset) { + return this._handleBuffer(value, false, offset); + } + readBufferNT() { + let nullPos = this.length; + for (let i = this._readOffset; i < this.length; i++) { + if (this._buff[i] === 0) { + nullPos = i; + break; + } + } + const value = this._buff.slice(this._readOffset, nullPos); + this._readOffset = nullPos + 1; + return value; + } + insertBufferNT(value, offset) { + utils_1.checkOffsetValue(offset); + this.insertBuffer(value, offset); + this.insertUInt8(0, offset + value.length); + return this; + } + writeBufferNT(value, offset) { + if (typeof offset !== "undefined") { + utils_1.checkOffsetValue(offset); + } + this.writeBuffer(value, offset); + this.writeUInt8(0, typeof offset === "number" ? offset + value.length : this._writeOffset); + return this; + } + clear() { + this._writeOffset = 0; + this._readOffset = 0; + this.length = 0; + return this; + } + remaining() { + return this.length - this._readOffset; + } + get readOffset() { + return this._readOffset; + } + set readOffset(offset) { + utils_1.checkOffsetValue(offset); + utils_1.checkTargetOffset(offset, this); + this._readOffset = offset; + } + get writeOffset() { + return this._writeOffset; + } + set writeOffset(offset) { + utils_1.checkOffsetValue(offset); + utils_1.checkTargetOffset(offset, this); + this._writeOffset = offset; + } + get encoding() { + return this._encoding; + } + set encoding(encoding) { + utils_1.checkEncoding(encoding); + this._encoding = encoding; + } + get internalBuffer() { + return this._buff; + } + toBuffer() { + return this._buff.slice(0, this.length); + } + toString(encoding) { + const encodingVal = typeof encoding === "string" ? encoding : this._encoding; + utils_1.checkEncoding(encodingVal); + return this._buff.toString(encodingVal, 0, this.length); + } + destroy() { + this.clear(); + return this; + } + _handleString(value, isInsert, arg3, encoding) { + let offsetVal = this._writeOffset; + let encodingVal = this._encoding; + if (typeof arg3 === "number") { + offsetVal = arg3; + } else if (typeof arg3 === "string") { + utils_1.checkEncoding(arg3); + encodingVal = arg3; + } + if (typeof encoding === "string") { + utils_1.checkEncoding(encoding); + encodingVal = encoding; + } + const byteLength = Buffer.byteLength(value, encodingVal); + if (isInsert) { + this.ensureInsertable(byteLength, offsetVal); + } else { + this._ensureWriteable(byteLength, offsetVal); + } + this._buff.write(value, offsetVal, byteLength, encodingVal); + if (isInsert) { + this._writeOffset += byteLength; + } else { + if (typeof arg3 === "number") { + this._writeOffset = Math.max(this._writeOffset, offsetVal + byteLength); + } else { + this._writeOffset += byteLength; + } + } + return this; + } + _handleBuffer(value, isInsert, offset) { + const offsetVal = typeof offset === "number" ? offset : this._writeOffset; + if (isInsert) { + this.ensureInsertable(value.length, offsetVal); + } else { + this._ensureWriteable(value.length, offsetVal); + } + value.copy(this._buff, offsetVal); + if (isInsert) { + this._writeOffset += value.length; + } else { + if (typeof offset === "number") { + this._writeOffset = Math.max(this._writeOffset, offsetVal + value.length); + } else { + this._writeOffset += value.length; + } + } + return this; + } + ensureReadable(length, offset) { + let offsetVal = this._readOffset; + if (typeof offset !== "undefined") { + utils_1.checkOffsetValue(offset); + offsetVal = offset; + } + if (offsetVal < 0 || offsetVal + length > this.length) { + throw new Error(utils_1.ERRORS.INVALID_READ_BEYOND_BOUNDS); + } + } + ensureInsertable(dataLength, offset) { + utils_1.checkOffsetValue(offset); + this._ensureCapacity(this.length + dataLength); + if (offset < this.length) { + this._buff.copy(this._buff, offset + dataLength, offset, this._buff.length); + } + if (offset + dataLength > this.length) { + this.length = offset + dataLength; + } else { + this.length += dataLength; + } + } + _ensureWriteable(dataLength, offset) { + const offsetVal = typeof offset === "number" ? offset : this._writeOffset; + this._ensureCapacity(offsetVal + dataLength); + if (offsetVal + dataLength > this.length) { + this.length = offsetVal + dataLength; + } + } + _ensureCapacity(minLength) { + const oldLength = this._buff.length; + if (minLength > oldLength) { + let data = this._buff; + let newLength = oldLength * 3 / 2 + 1; + if (newLength < minLength) { + newLength = minLength; + } + this._buff = Buffer.allocUnsafe(newLength); + data.copy(this._buff, 0, 0, oldLength); + } + } + _readNumberValue(func, byteSize, offset) { + this.ensureReadable(byteSize, offset); + const value = func.call(this._buff, typeof offset === "number" ? offset : this._readOffset); + if (typeof offset === "undefined") { + this._readOffset += byteSize; + } + return value; + } + _insertNumberValue(func, byteSize, value, offset) { + utils_1.checkOffsetValue(offset); + this.ensureInsertable(byteSize, offset); + func.call(this._buff, value, offset); + this._writeOffset += byteSize; + return this; + } + _writeNumberValue(func, byteSize, value, offset) { + if (typeof offset === "number") { + if (offset < 0) { + throw new Error(utils_1.ERRORS.INVALID_WRITE_BEYOND_BOUNDS); + } + utils_1.checkOffsetValue(offset); + } + const offsetVal = typeof offset === "number" ? offset : this._writeOffset; + this._ensureWriteable(byteSize, offsetVal); + func.call(this._buff, value, offsetVal); + if (typeof offset === "number") { + this._writeOffset = Math.max(this._writeOffset, offsetVal + byteSize); + } else { + this._writeOffset += byteSize; + } + return this; + } + }; + exports2.SmartBuffer = SmartBuffer; + } +}); + +// ../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/common/constants.js +var require_constants8 = __commonJS({ + "../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/common/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SOCKS5_NO_ACCEPTABLE_AUTH = exports2.SOCKS5_CUSTOM_AUTH_END = exports2.SOCKS5_CUSTOM_AUTH_START = exports2.SOCKS_INCOMING_PACKET_SIZES = exports2.SocksClientState = exports2.Socks5Response = exports2.Socks5HostType = exports2.Socks5Auth = exports2.Socks4Response = exports2.SocksCommand = exports2.ERRORS = exports2.DEFAULT_TIMEOUT = void 0; + var DEFAULT_TIMEOUT = 3e4; + exports2.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT; + var ERRORS = { + InvalidSocksCommand: "An invalid SOCKS command was provided. Valid options are connect, bind, and associate.", + InvalidSocksCommandForOperation: "An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.", + InvalidSocksCommandChain: "An invalid SOCKS command was provided. Chaining currently only supports the connect command.", + InvalidSocksClientOptionsDestination: "An invalid destination host was provided.", + InvalidSocksClientOptionsExistingSocket: "An invalid existing socket was provided. This should be an instance of stream.Duplex.", + InvalidSocksClientOptionsProxy: "Invalid SOCKS proxy details were provided.", + InvalidSocksClientOptionsTimeout: "An invalid timeout value was provided. Please enter a value above 0 (in ms).", + InvalidSocksClientOptionsProxiesLength: "At least two socks proxies must be provided for chaining.", + InvalidSocksClientOptionsCustomAuthRange: "Custom auth must be a value between 0x80 and 0xFE.", + InvalidSocksClientOptionsCustomAuthOptions: "When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.", + NegotiationError: "Negotiation error", + SocketClosed: "Socket closed", + ProxyConnectionTimedOut: "Proxy connection timed out", + InternalError: "SocksClient internal error (this should not happen)", + InvalidSocks4HandshakeResponse: "Received invalid Socks4 handshake response", + Socks4ProxyRejectedConnection: "Socks4 Proxy rejected connection", + InvalidSocks4IncomingConnectionResponse: "Socks4 invalid incoming connection response", + Socks4ProxyRejectedIncomingBoundConnection: "Socks4 Proxy rejected incoming bound connection", + InvalidSocks5InitialHandshakeResponse: "Received invalid Socks5 initial handshake response", + InvalidSocks5IntiailHandshakeSocksVersion: "Received invalid Socks5 initial handshake (invalid socks version)", + InvalidSocks5InitialHandshakeNoAcceptedAuthType: "Received invalid Socks5 initial handshake (no accepted authentication type)", + InvalidSocks5InitialHandshakeUnknownAuthType: "Received invalid Socks5 initial handshake (unknown authentication type)", + Socks5AuthenticationFailed: "Socks5 Authentication failed", + InvalidSocks5FinalHandshake: "Received invalid Socks5 final handshake response", + InvalidSocks5FinalHandshakeRejected: "Socks5 proxy rejected connection", + InvalidSocks5IncomingConnectionResponse: "Received invalid Socks5 incoming connection response", + Socks5ProxyRejectedIncomingBoundConnection: "Socks5 Proxy rejected incoming bound connection" + }; + exports2.ERRORS = ERRORS; + var SOCKS_INCOMING_PACKET_SIZES = { + Socks5InitialHandshakeResponse: 2, + Socks5UserPassAuthenticationResponse: 2, + Socks5ResponseHeader: 5, + Socks5ResponseIPv4: 10, + Socks5ResponseIPv6: 22, + Socks5ResponseHostname: (hostNameLength) => hostNameLength + 7, + Socks4Response: 8 + }; + exports2.SOCKS_INCOMING_PACKET_SIZES = SOCKS_INCOMING_PACKET_SIZES; + var SocksCommand; + (function(SocksCommand2) { + SocksCommand2[SocksCommand2["connect"] = 1] = "connect"; + SocksCommand2[SocksCommand2["bind"] = 2] = "bind"; + SocksCommand2[SocksCommand2["associate"] = 3] = "associate"; + })(SocksCommand || (SocksCommand = {})); + exports2.SocksCommand = SocksCommand; + var Socks4Response; + (function(Socks4Response2) { + Socks4Response2[Socks4Response2["Granted"] = 90] = "Granted"; + Socks4Response2[Socks4Response2["Failed"] = 91] = "Failed"; + Socks4Response2[Socks4Response2["Rejected"] = 92] = "Rejected"; + Socks4Response2[Socks4Response2["RejectedIdent"] = 93] = "RejectedIdent"; + })(Socks4Response || (Socks4Response = {})); + exports2.Socks4Response = Socks4Response; + var Socks5Auth; + (function(Socks5Auth2) { + Socks5Auth2[Socks5Auth2["NoAuth"] = 0] = "NoAuth"; + Socks5Auth2[Socks5Auth2["GSSApi"] = 1] = "GSSApi"; + Socks5Auth2[Socks5Auth2["UserPass"] = 2] = "UserPass"; + })(Socks5Auth || (Socks5Auth = {})); + exports2.Socks5Auth = Socks5Auth; + var SOCKS5_CUSTOM_AUTH_START = 128; + exports2.SOCKS5_CUSTOM_AUTH_START = SOCKS5_CUSTOM_AUTH_START; + var SOCKS5_CUSTOM_AUTH_END = 254; + exports2.SOCKS5_CUSTOM_AUTH_END = SOCKS5_CUSTOM_AUTH_END; + var SOCKS5_NO_ACCEPTABLE_AUTH = 255; + exports2.SOCKS5_NO_ACCEPTABLE_AUTH = SOCKS5_NO_ACCEPTABLE_AUTH; + var Socks5Response; + (function(Socks5Response2) { + Socks5Response2[Socks5Response2["Granted"] = 0] = "Granted"; + Socks5Response2[Socks5Response2["Failure"] = 1] = "Failure"; + Socks5Response2[Socks5Response2["NotAllowed"] = 2] = "NotAllowed"; + Socks5Response2[Socks5Response2["NetworkUnreachable"] = 3] = "NetworkUnreachable"; + Socks5Response2[Socks5Response2["HostUnreachable"] = 4] = "HostUnreachable"; + Socks5Response2[Socks5Response2["ConnectionRefused"] = 5] = "ConnectionRefused"; + Socks5Response2[Socks5Response2["TTLExpired"] = 6] = "TTLExpired"; + Socks5Response2[Socks5Response2["CommandNotSupported"] = 7] = "CommandNotSupported"; + Socks5Response2[Socks5Response2["AddressNotSupported"] = 8] = "AddressNotSupported"; + })(Socks5Response || (Socks5Response = {})); + exports2.Socks5Response = Socks5Response; + var Socks5HostType; + (function(Socks5HostType2) { + Socks5HostType2[Socks5HostType2["IPv4"] = 1] = "IPv4"; + Socks5HostType2[Socks5HostType2["Hostname"] = 3] = "Hostname"; + Socks5HostType2[Socks5HostType2["IPv6"] = 4] = "IPv6"; + })(Socks5HostType || (Socks5HostType = {})); + exports2.Socks5HostType = Socks5HostType; + var SocksClientState; + (function(SocksClientState2) { + SocksClientState2[SocksClientState2["Created"] = 0] = "Created"; + SocksClientState2[SocksClientState2["Connecting"] = 1] = "Connecting"; + SocksClientState2[SocksClientState2["Connected"] = 2] = "Connected"; + SocksClientState2[SocksClientState2["SentInitialHandshake"] = 3] = "SentInitialHandshake"; + SocksClientState2[SocksClientState2["ReceivedInitialHandshakeResponse"] = 4] = "ReceivedInitialHandshakeResponse"; + SocksClientState2[SocksClientState2["SentAuthentication"] = 5] = "SentAuthentication"; + SocksClientState2[SocksClientState2["ReceivedAuthenticationResponse"] = 6] = "ReceivedAuthenticationResponse"; + SocksClientState2[SocksClientState2["SentFinalHandshake"] = 7] = "SentFinalHandshake"; + SocksClientState2[SocksClientState2["ReceivedFinalResponse"] = 8] = "ReceivedFinalResponse"; + SocksClientState2[SocksClientState2["BoundWaitingForConnection"] = 9] = "BoundWaitingForConnection"; + SocksClientState2[SocksClientState2["Established"] = 10] = "Established"; + SocksClientState2[SocksClientState2["Disconnected"] = 11] = "Disconnected"; + SocksClientState2[SocksClientState2["Error"] = 99] = "Error"; + })(SocksClientState || (SocksClientState = {})); + exports2.SocksClientState = SocksClientState; + } +}); + +// ../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/common/util.js +var require_util5 = __commonJS({ + "../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/common/util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.shuffleArray = exports2.SocksClientError = void 0; + var SocksClientError = class extends Error { + constructor(message2, options) { + super(message2); + this.options = options; + } + }; + exports2.SocksClientError = SocksClientError; + function shuffleArray(array) { + for (let i = array.length - 1; i > 0; i--) { + const j = Math.floor(Math.random() * (i + 1)); + [array[i], array[j]] = [array[j], array[i]]; + } + } + exports2.shuffleArray = shuffleArray; + } +}); + +// ../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/common/helpers.js +var require_helpers = __commonJS({ + "../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/common/helpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.validateSocksClientChainOptions = exports2.validateSocksClientOptions = void 0; + var util_1 = require_util5(); + var constants_1 = require_constants8(); + var stream = require("stream"); + function validateSocksClientOptions(options, acceptedCommands = ["connect", "bind", "associate"]) { + if (!constants_1.SocksCommand[options.command]) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksCommand, options); + } + if (acceptedCommands.indexOf(options.command) === -1) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksCommandForOperation, options); + } + if (!isValidSocksRemoteHost(options.destination)) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsDestination, options); + } + if (!isValidSocksProxy(options.proxy)) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsProxy, options); + } + validateCustomProxyAuth(options.proxy, options); + if (options.timeout && !isValidTimeoutValue(options.timeout)) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsTimeout, options); + } + if (options.existing_socket && !(options.existing_socket instanceof stream.Duplex)) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsExistingSocket, options); + } + } + exports2.validateSocksClientOptions = validateSocksClientOptions; + function validateSocksClientChainOptions(options) { + if (options.command !== "connect") { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksCommandChain, options); + } + if (!isValidSocksRemoteHost(options.destination)) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsDestination, options); + } + if (!(options.proxies && Array.isArray(options.proxies) && options.proxies.length >= 2)) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsProxiesLength, options); + } + options.proxies.forEach((proxy) => { + if (!isValidSocksProxy(proxy)) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsProxy, options); + } + validateCustomProxyAuth(proxy, options); + }); + if (options.timeout && !isValidTimeoutValue(options.timeout)) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsTimeout, options); + } + } + exports2.validateSocksClientChainOptions = validateSocksClientChainOptions; + function validateCustomProxyAuth(proxy, options) { + if (proxy.custom_auth_method !== void 0) { + if (proxy.custom_auth_method < constants_1.SOCKS5_CUSTOM_AUTH_START || proxy.custom_auth_method > constants_1.SOCKS5_CUSTOM_AUTH_END) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthRange, options); + } + if (proxy.custom_auth_request_handler === void 0 || typeof proxy.custom_auth_request_handler !== "function") { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthOptions, options); + } + if (proxy.custom_auth_response_size === void 0) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthOptions, options); + } + if (proxy.custom_auth_response_handler === void 0 || typeof proxy.custom_auth_response_handler !== "function") { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthOptions, options); + } + } + } + function isValidSocksRemoteHost(remoteHost) { + return remoteHost && typeof remoteHost.host === "string" && typeof remoteHost.port === "number" && remoteHost.port >= 0 && remoteHost.port <= 65535; + } + function isValidSocksProxy(proxy) { + return proxy && (typeof proxy.host === "string" || typeof proxy.ipaddress === "string") && typeof proxy.port === "number" && proxy.port >= 0 && proxy.port <= 65535 && (proxy.type === 4 || proxy.type === 5); + } + function isValidTimeoutValue(value) { + return typeof value === "number" && value > 0; + } + } +}); + +// ../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/common/receivebuffer.js +var require_receivebuffer = __commonJS({ + "../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/common/receivebuffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ReceiveBuffer = void 0; + var ReceiveBuffer = class { + constructor(size = 4096) { + this.buffer = Buffer.allocUnsafe(size); + this.offset = 0; + this.originalSize = size; + } + get length() { + return this.offset; + } + append(data) { + if (!Buffer.isBuffer(data)) { + throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer."); + } + if (this.offset + data.length >= this.buffer.length) { + const tmp = this.buffer; + this.buffer = Buffer.allocUnsafe(Math.max(this.buffer.length + this.originalSize, this.buffer.length + data.length)); + tmp.copy(this.buffer); + } + data.copy(this.buffer, this.offset); + return this.offset += data.length; + } + peek(length) { + if (length > this.offset) { + throw new Error("Attempted to read beyond the bounds of the managed internal data."); + } + return this.buffer.slice(0, length); + } + get(length) { + if (length > this.offset) { + throw new Error("Attempted to read beyond the bounds of the managed internal data."); + } + const value = Buffer.allocUnsafe(length); + this.buffer.slice(0, length).copy(value); + this.buffer.copyWithin(0, length, length + this.offset - length); + this.offset -= length; + return value; + } + }; + exports2.ReceiveBuffer = ReceiveBuffer; + } +}); + +// ../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/client/socksclient.js +var require_socksclient = __commonJS({ + "../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/client/socksclient.js"(exports2) { + "use strict"; + var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SocksClientError = exports2.SocksClient = void 0; + var events_1 = require("events"); + var net = require("net"); + var ip = require_ip(); + var smart_buffer_1 = require_smartbuffer(); + var constants_1 = require_constants8(); + var helpers_1 = require_helpers(); + var receivebuffer_1 = require_receivebuffer(); + var util_1 = require_util5(); + Object.defineProperty(exports2, "SocksClientError", { enumerable: true, get: function() { + return util_1.SocksClientError; + } }); + var SocksClient = class extends events_1.EventEmitter { + constructor(options) { + super(); + this.options = Object.assign({}, options); + helpers_1.validateSocksClientOptions(options); + this.setState(constants_1.SocksClientState.Created); + } + static createConnection(options, callback) { + return new Promise((resolve, reject) => { + try { + helpers_1.validateSocksClientOptions(options, ["connect"]); + } catch (err) { + if (typeof callback === "function") { + callback(err); + return resolve(err); + } else { + return reject(err); + } + } + const client = new SocksClient(options); + client.connect(options.existing_socket); + client.once("established", (info) => { + client.removeAllListeners(); + if (typeof callback === "function") { + callback(null, info); + resolve(info); + } else { + resolve(info); + } + }); + client.once("error", (err) => { + client.removeAllListeners(); + if (typeof callback === "function") { + callback(err); + resolve(err); + } else { + reject(err); + } + }); + }); + } + static createConnectionChain(options, callback) { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + try { + helpers_1.validateSocksClientChainOptions(options); + } catch (err) { + if (typeof callback === "function") { + callback(err); + return resolve(err); + } else { + return reject(err); + } + } + let sock; + if (options.randomizeChain) { + util_1.shuffleArray(options.proxies); + } + try { + for (let i = 0; i < options.proxies.length; i++) { + const nextProxy = options.proxies[i]; + const nextDestination = i === options.proxies.length - 1 ? options.destination : { + host: options.proxies[i + 1].ipaddress, + port: options.proxies[i + 1].port + }; + const result = yield SocksClient.createConnection({ + command: "connect", + proxy: nextProxy, + destination: nextDestination + }); + if (!sock) { + sock = result.socket; + } + } + if (typeof callback === "function") { + callback(null, { socket: sock }); + resolve({ socket: sock }); + } else { + resolve({ socket: sock }); + } + } catch (err) { + if (typeof callback === "function") { + callback(err); + resolve(err); + } else { + reject(err); + } + } + })); + } + static createUDPFrame(options) { + const buff = new smart_buffer_1.SmartBuffer(); + buff.writeUInt16BE(0); + buff.writeUInt8(options.frameNumber || 0); + if (net.isIPv4(options.remoteHost.host)) { + buff.writeUInt8(constants_1.Socks5HostType.IPv4); + buff.writeUInt32BE(ip.toLong(options.remoteHost.host)); + } else if (net.isIPv6(options.remoteHost.host)) { + buff.writeUInt8(constants_1.Socks5HostType.IPv6); + buff.writeBuffer(ip.toBuffer(options.remoteHost.host)); + } else { + buff.writeUInt8(constants_1.Socks5HostType.Hostname); + buff.writeUInt8(Buffer.byteLength(options.remoteHost.host)); + buff.writeString(options.remoteHost.host); + } + buff.writeUInt16BE(options.remoteHost.port); + buff.writeBuffer(options.data); + return buff.toBuffer(); + } + static parseUDPFrame(data) { + const buff = smart_buffer_1.SmartBuffer.fromBuffer(data); + buff.readOffset = 2; + const frameNumber = buff.readUInt8(); + const hostType = buff.readUInt8(); + let remoteHost; + if (hostType === constants_1.Socks5HostType.IPv4) { + remoteHost = ip.fromLong(buff.readUInt32BE()); + } else if (hostType === constants_1.Socks5HostType.IPv6) { + remoteHost = ip.toString(buff.readBuffer(16)); + } else { + remoteHost = buff.readString(buff.readUInt8()); + } + const remotePort = buff.readUInt16BE(); + return { + frameNumber, + remoteHost: { + host: remoteHost, + port: remotePort + }, + data: buff.readBuffer() + }; + } + setState(newState) { + if (this.state !== constants_1.SocksClientState.Error) { + this.state = newState; + } + } + connect(existingSocket) { + this.onDataReceived = (data) => this.onDataReceivedHandler(data); + this.onClose = () => this.onCloseHandler(); + this.onError = (err) => this.onErrorHandler(err); + this.onConnect = () => this.onConnectHandler(); + const timer = setTimeout(() => this.onEstablishedTimeout(), this.options.timeout || constants_1.DEFAULT_TIMEOUT); + if (timer.unref && typeof timer.unref === "function") { + timer.unref(); + } + if (existingSocket) { + this.socket = existingSocket; + } else { + this.socket = new net.Socket(); + } + this.socket.once("close", this.onClose); + this.socket.once("error", this.onError); + this.socket.once("connect", this.onConnect); + this.socket.on("data", this.onDataReceived); + this.setState(constants_1.SocksClientState.Connecting); + this.receiveBuffer = new receivebuffer_1.ReceiveBuffer(); + if (existingSocket) { + this.socket.emit("connect"); + } else { + this.socket.connect(this.getSocketOptions()); + if (this.options.set_tcp_nodelay !== void 0 && this.options.set_tcp_nodelay !== null) { + this.socket.setNoDelay(!!this.options.set_tcp_nodelay); + } + } + this.prependOnceListener("established", (info) => { + setImmediate(() => { + if (this.receiveBuffer.length > 0) { + const excessData = this.receiveBuffer.get(this.receiveBuffer.length); + info.socket.emit("data", excessData); + } + info.socket.resume(); + }); + }); + } + getSocketOptions() { + return Object.assign(Object.assign({}, this.options.socket_options), { host: this.options.proxy.host || this.options.proxy.ipaddress, port: this.options.proxy.port }); + } + onEstablishedTimeout() { + if (this.state !== constants_1.SocksClientState.Established && this.state !== constants_1.SocksClientState.BoundWaitingForConnection) { + this.closeSocket(constants_1.ERRORS.ProxyConnectionTimedOut); + } + } + onConnectHandler() { + this.setState(constants_1.SocksClientState.Connected); + if (this.options.proxy.type === 4) { + this.sendSocks4InitialHandshake(); + } else { + this.sendSocks5InitialHandshake(); + } + this.setState(constants_1.SocksClientState.SentInitialHandshake); + } + onDataReceivedHandler(data) { + this.receiveBuffer.append(data); + this.processData(); + } + processData() { + while (this.state !== constants_1.SocksClientState.Established && this.state !== constants_1.SocksClientState.Error && this.receiveBuffer.length >= this.nextRequiredPacketBufferSize) { + if (this.state === constants_1.SocksClientState.SentInitialHandshake) { + if (this.options.proxy.type === 4) { + this.handleSocks4FinalHandshakeResponse(); + } else { + this.handleInitialSocks5HandshakeResponse(); + } + } else if (this.state === constants_1.SocksClientState.SentAuthentication) { + this.handleInitialSocks5AuthenticationHandshakeResponse(); + } else if (this.state === constants_1.SocksClientState.SentFinalHandshake) { + this.handleSocks5FinalHandshakeResponse(); + } else if (this.state === constants_1.SocksClientState.BoundWaitingForConnection) { + if (this.options.proxy.type === 4) { + this.handleSocks4IncomingConnectionResponse(); + } else { + this.handleSocks5IncomingConnectionResponse(); + } + } else { + this.closeSocket(constants_1.ERRORS.InternalError); + break; + } + } + } + onCloseHandler() { + this.closeSocket(constants_1.ERRORS.SocketClosed); + } + onErrorHandler(err) { + this.closeSocket(err.message); + } + removeInternalSocketHandlers() { + this.socket.pause(); + this.socket.removeListener("data", this.onDataReceived); + this.socket.removeListener("close", this.onClose); + this.socket.removeListener("error", this.onError); + this.socket.removeListener("connect", this.onConnect); + } + closeSocket(err) { + if (this.state !== constants_1.SocksClientState.Error) { + this.setState(constants_1.SocksClientState.Error); + this.socket.destroy(); + this.removeInternalSocketHandlers(); + this.emit("error", new util_1.SocksClientError(err, this.options)); + } + } + sendSocks4InitialHandshake() { + const userId = this.options.proxy.userId || ""; + const buff = new smart_buffer_1.SmartBuffer(); + buff.writeUInt8(4); + buff.writeUInt8(constants_1.SocksCommand[this.options.command]); + buff.writeUInt16BE(this.options.destination.port); + if (net.isIPv4(this.options.destination.host)) { + buff.writeBuffer(ip.toBuffer(this.options.destination.host)); + buff.writeStringNT(userId); + } else { + buff.writeUInt8(0); + buff.writeUInt8(0); + buff.writeUInt8(0); + buff.writeUInt8(1); + buff.writeStringNT(userId); + buff.writeStringNT(this.options.destination.host); + } + this.nextRequiredPacketBufferSize = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks4Response; + this.socket.write(buff.toBuffer()); + } + handleSocks4FinalHandshakeResponse() { + const data = this.receiveBuffer.get(8); + if (data[1] !== constants_1.Socks4Response.Granted) { + this.closeSocket(`${constants_1.ERRORS.Socks4ProxyRejectedConnection} - (${constants_1.Socks4Response[data[1]]})`); + } else { + if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.bind) { + const buff = smart_buffer_1.SmartBuffer.fromBuffer(data); + buff.readOffset = 2; + const remoteHost = { + port: buff.readUInt16BE(), + host: ip.fromLong(buff.readUInt32BE()) + }; + if (remoteHost.host === "0.0.0.0") { + remoteHost.host = this.options.proxy.ipaddress; + } + this.setState(constants_1.SocksClientState.BoundWaitingForConnection); + this.emit("bound", { remoteHost, socket: this.socket }); + } else { + this.setState(constants_1.SocksClientState.Established); + this.removeInternalSocketHandlers(); + this.emit("established", { socket: this.socket }); + } + } + } + handleSocks4IncomingConnectionResponse() { + const data = this.receiveBuffer.get(8); + if (data[1] !== constants_1.Socks4Response.Granted) { + this.closeSocket(`${constants_1.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${constants_1.Socks4Response[data[1]]})`); + } else { + const buff = smart_buffer_1.SmartBuffer.fromBuffer(data); + buff.readOffset = 2; + const remoteHost = { + port: buff.readUInt16BE(), + host: ip.fromLong(buff.readUInt32BE()) + }; + this.setState(constants_1.SocksClientState.Established); + this.removeInternalSocketHandlers(); + this.emit("established", { remoteHost, socket: this.socket }); + } + } + sendSocks5InitialHandshake() { + const buff = new smart_buffer_1.SmartBuffer(); + const supportedAuthMethods = [constants_1.Socks5Auth.NoAuth]; + if (this.options.proxy.userId || this.options.proxy.password) { + supportedAuthMethods.push(constants_1.Socks5Auth.UserPass); + } + if (this.options.proxy.custom_auth_method !== void 0) { + supportedAuthMethods.push(this.options.proxy.custom_auth_method); + } + buff.writeUInt8(5); + buff.writeUInt8(supportedAuthMethods.length); + for (const authMethod of supportedAuthMethods) { + buff.writeUInt8(authMethod); + } + this.nextRequiredPacketBufferSize = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse; + this.socket.write(buff.toBuffer()); + this.setState(constants_1.SocksClientState.SentInitialHandshake); + } + handleInitialSocks5HandshakeResponse() { + const data = this.receiveBuffer.get(2); + if (data[0] !== 5) { + this.closeSocket(constants_1.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion); + } else if (data[1] === constants_1.SOCKS5_NO_ACCEPTABLE_AUTH) { + this.closeSocket(constants_1.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType); + } else { + if (data[1] === constants_1.Socks5Auth.NoAuth) { + this.socks5ChosenAuthType = constants_1.Socks5Auth.NoAuth; + this.sendSocks5CommandRequest(); + } else if (data[1] === constants_1.Socks5Auth.UserPass) { + this.socks5ChosenAuthType = constants_1.Socks5Auth.UserPass; + this.sendSocks5UserPassAuthentication(); + } else if (data[1] === this.options.proxy.custom_auth_method) { + this.socks5ChosenAuthType = this.options.proxy.custom_auth_method; + this.sendSocks5CustomAuthentication(); + } else { + this.closeSocket(constants_1.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType); + } + } + } + sendSocks5UserPassAuthentication() { + const userId = this.options.proxy.userId || ""; + const password = this.options.proxy.password || ""; + const buff = new smart_buffer_1.SmartBuffer(); + buff.writeUInt8(1); + buff.writeUInt8(Buffer.byteLength(userId)); + buff.writeString(userId); + buff.writeUInt8(Buffer.byteLength(password)); + buff.writeString(password); + this.nextRequiredPacketBufferSize = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse; + this.socket.write(buff.toBuffer()); + this.setState(constants_1.SocksClientState.SentAuthentication); + } + sendSocks5CustomAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + this.nextRequiredPacketBufferSize = this.options.proxy.custom_auth_response_size; + this.socket.write(yield this.options.proxy.custom_auth_request_handler()); + this.setState(constants_1.SocksClientState.SentAuthentication); + }); + } + handleSocks5CustomAuthHandshakeResponse(data) { + return __awaiter(this, void 0, void 0, function* () { + return yield this.options.proxy.custom_auth_response_handler(data); + }); + } + handleSocks5AuthenticationNoAuthHandshakeResponse(data) { + return __awaiter(this, void 0, void 0, function* () { + return data[1] === 0; + }); + } + handleSocks5AuthenticationUserPassHandshakeResponse(data) { + return __awaiter(this, void 0, void 0, function* () { + return data[1] === 0; + }); + } + handleInitialSocks5AuthenticationHandshakeResponse() { + return __awaiter(this, void 0, void 0, function* () { + this.setState(constants_1.SocksClientState.ReceivedAuthenticationResponse); + let authResult = false; + if (this.socks5ChosenAuthType === constants_1.Socks5Auth.NoAuth) { + authResult = yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2)); + } else if (this.socks5ChosenAuthType === constants_1.Socks5Auth.UserPass) { + authResult = yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2)); + } else if (this.socks5ChosenAuthType === this.options.proxy.custom_auth_method) { + authResult = yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size)); + } + if (!authResult) { + this.closeSocket(constants_1.ERRORS.Socks5AuthenticationFailed); + } else { + this.sendSocks5CommandRequest(); + } + }); + } + sendSocks5CommandRequest() { + const buff = new smart_buffer_1.SmartBuffer(); + buff.writeUInt8(5); + buff.writeUInt8(constants_1.SocksCommand[this.options.command]); + buff.writeUInt8(0); + if (net.isIPv4(this.options.destination.host)) { + buff.writeUInt8(constants_1.Socks5HostType.IPv4); + buff.writeBuffer(ip.toBuffer(this.options.destination.host)); + } else if (net.isIPv6(this.options.destination.host)) { + buff.writeUInt8(constants_1.Socks5HostType.IPv6); + buff.writeBuffer(ip.toBuffer(this.options.destination.host)); + } else { + buff.writeUInt8(constants_1.Socks5HostType.Hostname); + buff.writeUInt8(this.options.destination.host.length); + buff.writeString(this.options.destination.host); + } + buff.writeUInt16BE(this.options.destination.port); + this.nextRequiredPacketBufferSize = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader; + this.socket.write(buff.toBuffer()); + this.setState(constants_1.SocksClientState.SentFinalHandshake); + } + handleSocks5FinalHandshakeResponse() { + const header = this.receiveBuffer.peek(5); + if (header[0] !== 5 || header[1] !== constants_1.Socks5Response.Granted) { + this.closeSocket(`${constants_1.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${constants_1.Socks5Response[header[1]]}`); + } else { + const addressType = header[3]; + let remoteHost; + let buff; + if (addressType === constants_1.Socks5HostType.IPv4) { + const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4; + if (this.receiveBuffer.length < dataNeeded) { + this.nextRequiredPacketBufferSize = dataNeeded; + return; + } + buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4)); + remoteHost = { + host: ip.fromLong(buff.readUInt32BE()), + port: buff.readUInt16BE() + }; + if (remoteHost.host === "0.0.0.0") { + remoteHost.host = this.options.proxy.ipaddress; + } + } else if (addressType === constants_1.Socks5HostType.Hostname) { + const hostLength = header[4]; + const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(hostLength); + if (this.receiveBuffer.length < dataNeeded) { + this.nextRequiredPacketBufferSize = dataNeeded; + return; + } + buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(5)); + remoteHost = { + host: buff.readString(hostLength), + port: buff.readUInt16BE() + }; + } else if (addressType === constants_1.Socks5HostType.IPv6) { + const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6; + if (this.receiveBuffer.length < dataNeeded) { + this.nextRequiredPacketBufferSize = dataNeeded; + return; + } + buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4)); + remoteHost = { + host: ip.toString(buff.readBuffer(16)), + port: buff.readUInt16BE() + }; + } + this.setState(constants_1.SocksClientState.ReceivedFinalResponse); + if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.connect) { + this.setState(constants_1.SocksClientState.Established); + this.removeInternalSocketHandlers(); + this.emit("established", { remoteHost, socket: this.socket }); + } else if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.bind) { + this.setState(constants_1.SocksClientState.BoundWaitingForConnection); + this.nextRequiredPacketBufferSize = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader; + this.emit("bound", { remoteHost, socket: this.socket }); + } else if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.associate) { + this.setState(constants_1.SocksClientState.Established); + this.removeInternalSocketHandlers(); + this.emit("established", { + remoteHost, + socket: this.socket + }); + } + } + } + handleSocks5IncomingConnectionResponse() { + const header = this.receiveBuffer.peek(5); + if (header[0] !== 5 || header[1] !== constants_1.Socks5Response.Granted) { + this.closeSocket(`${constants_1.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${constants_1.Socks5Response[header[1]]}`); + } else { + const addressType = header[3]; + let remoteHost; + let buff; + if (addressType === constants_1.Socks5HostType.IPv4) { + const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4; + if (this.receiveBuffer.length < dataNeeded) { + this.nextRequiredPacketBufferSize = dataNeeded; + return; + } + buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4)); + remoteHost = { + host: ip.fromLong(buff.readUInt32BE()), + port: buff.readUInt16BE() + }; + if (remoteHost.host === "0.0.0.0") { + remoteHost.host = this.options.proxy.ipaddress; + } + } else if (addressType === constants_1.Socks5HostType.Hostname) { + const hostLength = header[4]; + const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(hostLength); + if (this.receiveBuffer.length < dataNeeded) { + this.nextRequiredPacketBufferSize = dataNeeded; + return; + } + buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(5)); + remoteHost = { + host: buff.readString(hostLength), + port: buff.readUInt16BE() + }; + } else if (addressType === constants_1.Socks5HostType.IPv6) { + const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6; + if (this.receiveBuffer.length < dataNeeded) { + this.nextRequiredPacketBufferSize = dataNeeded; + return; + } + buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4)); + remoteHost = { + host: ip.toString(buff.readBuffer(16)), + port: buff.readUInt16BE() + }; + } + this.setState(constants_1.SocksClientState.Established); + this.removeInternalSocketHandlers(); + this.emit("established", { remoteHost, socket: this.socket }); + } + } + get socksClientOptions() { + return Object.assign({}, this.options); + } + }; + exports2.SocksClient = SocksClient; + } +}); + +// ../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/index.js +var require_build = __commonJS({ + "../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar(require_socksclient(), exports2); + } +}); + +// ../../node_modules/.pnpm/socks-proxy-agent@5.0.1/node_modules/socks-proxy-agent/dist/agent.js +var require_agent3 = __commonJS({ + "../../node_modules/.pnpm/socks-proxy-agent@5.0.1/node_modules/socks-proxy-agent/dist/agent.js"(exports2) { + "use strict"; + var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var dns_1 = __importDefault(require("dns")); + var tls_1 = __importDefault(require("tls")); + var url_1 = __importDefault(require("url")); + var debug_1 = __importDefault(require_src()); + var agent_base_1 = require_src3(); + var socks_1 = require_build(); + var debug = debug_1.default("socks-proxy-agent"); + function dnsLookup(host) { + return new Promise((resolve, reject) => { + dns_1.default.lookup(host, (err, res) => { + if (err) { + reject(err); + } else { + resolve(res); + } + }); + }); + } + function parseSocksProxy(opts) { + let port = 0; + let lookup = false; + let type = 5; + const host = opts.hostname || opts.host; + if (!host) { + throw new TypeError('No "host"'); + } + if (typeof opts.port === "number") { + port = opts.port; + } else if (typeof opts.port === "string") { + port = parseInt(opts.port, 10); + } + if (!port) { + port = 1080; + } + if (opts.protocol) { + switch (opts.protocol.replace(":", "")) { + case "socks4": + lookup = true; + case "socks4a": + type = 4; + break; + case "socks5": + lookup = true; + case "socks": + case "socks5h": + type = 5; + break; + default: + throw new TypeError(`A "socks" protocol must be specified! Got: ${opts.protocol}`); + } + } + if (typeof opts.type !== "undefined") { + if (opts.type === 4 || opts.type === 5) { + type = opts.type; + } else { + throw new TypeError(`"type" must be 4 or 5, got: ${opts.type}`); + } + } + const proxy = { + host, + port, + type + }; + let userId = opts.userId || opts.username; + let password = opts.password; + if (opts.auth) { + const auth = opts.auth.split(":"); + userId = auth[0]; + password = auth[1]; + } + if (userId) { + Object.defineProperty(proxy, "userId", { + value: userId, + enumerable: false + }); + } + if (password) { + Object.defineProperty(proxy, "password", { + value: password, + enumerable: false + }); + } + return { lookup, proxy }; + } + var SocksProxyAgent = class extends agent_base_1.Agent { + constructor(_opts) { + let opts; + if (typeof _opts === "string") { + opts = url_1.default.parse(_opts); + } else { + opts = _opts; + } + if (!opts) { + throw new TypeError("a SOCKS proxy server `host` and `port` must be specified!"); + } + super(opts); + const parsedProxy = parseSocksProxy(opts); + this.lookup = parsedProxy.lookup; + this.proxy = parsedProxy.proxy; + } + callback(req, opts) { + return __awaiter(this, void 0, void 0, function* () { + const { lookup, proxy } = this; + let { host, port, timeout } = opts; + if (!host) { + throw new Error("No `host` defined!"); + } + if (lookup) { + host = yield dnsLookup(host); + } + const socksOpts = { + proxy, + destination: { host, port }, + command: "connect", + timeout + }; + debug("Creating socks proxy connection: %o", socksOpts); + const { socket } = yield socks_1.SocksClient.createConnection(socksOpts); + debug("Successfully created socks proxy connection"); + if (opts.secureEndpoint) { + debug("Upgrading socket connection to TLS"); + const servername = opts.servername || host; + return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, "host", "hostname", "path", "port")), { + socket, + servername + })); + } + return socket; + }); + } + }; + exports2.default = SocksProxyAgent; + function omit(obj, ...keys) { + const ret = {}; + let key; + for (key in obj) { + if (!keys.includes(key)) { + ret[key] = obj[key]; + } + } + return ret; + } + } +}); + +// ../../node_modules/.pnpm/socks-proxy-agent@5.0.1/node_modules/socks-proxy-agent/dist/index.js +var require_dist5 = __commonJS({ + "../../node_modules/.pnpm/socks-proxy-agent@5.0.1/node_modules/socks-proxy-agent/dist/index.js"(exports2, module2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + var agent_1 = __importDefault(require_agent3()); + function createSocksProxyAgent(opts) { + return new agent_1.default(opts); + } + (function(createSocksProxyAgent2) { + createSocksProxyAgent2.SocksProxyAgent = agent_1.default; + createSocksProxyAgent2.prototype = agent_1.default.prototype; + })(createSocksProxyAgent || (createSocksProxyAgent = {})); + module2.exports = createSocksProxyAgent; + } +}); + +// ../npm-registry-agent/lib/index.js +var require_lib28 = __commonJS({ + "../npm-registry-agent/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var url_1 = require("url"); + var agentkeepalive_1 = __importDefault(require_agentkeepalive()); + var http_proxy_agent_1 = __importDefault(require_dist4()); + var https_proxy_agent_1 = __importDefault(require_https_proxy_agent()); + var lru_cache_1 = __importDefault(require_lru_cache()); + var socks_proxy_agent_1 = __importDefault(require_dist5()); + var HttpsAgent = agentkeepalive_1.default.HttpsAgent; + var DEFAULT_MAX_SOCKETS = 50; + var AGENT_CACHE = new lru_cache_1.default({ max: 50 }); + function getAgent(uri, opts) { + var _a, _b, _c; + const parsedUri = new url_1.URL(uri); + const isHttps = parsedUri.protocol === "https:"; + const pxuri = getProxyUri(uri, opts); + const key = [ + `https:${isHttps.toString()}`, + pxuri ? `proxy:${pxuri.protocol}//${pxuri.host}:${pxuri.port}` : ">no-proxy<", + `local-address:${(_a = opts.localAddress) !== null && _a !== void 0 ? _a : ">no-local-address<"}`, + `strict-ssl:${isHttps ? Boolean(opts.strictSsl).toString() : ">no-strict-ssl<"}`, + `ca:${isHttps && opts.ca || ">no-ca<"}`, + `cert:${isHttps && opts.cert || ">no-cert<"}`, + `key:${isHttps && opts.key || ">no-key<"}` + ].join(":"); + if (AGENT_CACHE.peek(key)) { + return AGENT_CACHE.get(key); + } + if (pxuri) { + const proxy = getProxy(pxuri, opts, isHttps); + AGENT_CACHE.set(key, proxy); + return proxy; + } + const agentTimeout = typeof opts.timeout !== "number" || opts.timeout === 0 ? 0 : opts.timeout + 1; + const agent = isHttps ? new HttpsAgent({ + ca: opts.ca, + cert: opts.cert, + key: opts.key, + localAddress: opts.localAddress, + maxSockets: (_b = opts.maxSockets) !== null && _b !== void 0 ? _b : DEFAULT_MAX_SOCKETS, + rejectUnauthorized: opts.strictSsl, + timeout: agentTimeout + }) : new agentkeepalive_1.default({ + localAddress: opts.localAddress, + maxSockets: (_c = opts.maxSockets) !== null && _c !== void 0 ? _c : DEFAULT_MAX_SOCKETS, + timeout: agentTimeout + }); + AGENT_CACHE.set(key, agent); + return agent; + } + exports2.default = getAgent; + function checkNoProxy(uri, opts) { + const host = new url_1.URL(uri).hostname.split(".").filter((x) => x).reverse(); + if (typeof opts.noProxy === "string") { + const noproxyArr = opts.noProxy.split(/\s*,\s*/g); + return noproxyArr.some((no) => { + const noParts = no.split(".").filter((x) => x).reverse(); + if (noParts.length === 0) { + return false; + } + for (let i = 0; i < noParts.length; i++) { + if (host[i] !== noParts[i]) { + return false; + } + } + return true; + }); + } + return opts.noProxy; + } + function getProxyUri(uri, opts) { + const { protocol } = new url_1.URL(uri); + let proxy; + switch (protocol) { + case "http:": { + proxy = opts.httpProxy; + break; + } + case "https:": { + proxy = opts.httpsProxy; + break; + } + } + if (!proxy) { + return null; + } + if (!proxy.includes("://")) { + proxy = `${protocol}//${proxy}`; + } + const parsedProxy = typeof proxy === "string" ? new url_1.URL(proxy) : proxy; + return !checkNoProxy(uri, opts) && parsedProxy; + } + function getProxy(proxyUrl, opts, isHttps) { + var _a, _b; + const popts = { + auth: proxyUrl.username ? proxyUrl.password ? `${proxyUrl.username}:${proxyUrl.password}` : proxyUrl.username : void 0, + ca: opts.ca, + cert: opts.cert, + host: proxyUrl.hostname, + key: opts.key, + localAddress: opts.localAddress, + maxSockets: (_a = opts.maxSockets) !== null && _a !== void 0 ? _a : DEFAULT_MAX_SOCKETS, + path: proxyUrl.pathname, + port: proxyUrl.port, + protocol: proxyUrl.protocol, + rejectUnauthorized: opts.strictSsl, + timeout: typeof opts.timeout !== "number" || opts.timeout === 0 ? 0 : opts.timeout + 1 + }; + if (proxyUrl.protocol === "http:" || proxyUrl.protocol === "https:") { + if (!isHttps) { + return http_proxy_agent_1.default(popts); + } else { + return new https_proxy_agent_1.default(popts); + } + } + if ((_b = proxyUrl.protocol) === null || _b === void 0 ? void 0 : _b.startsWith("socks")) { + return new socks_proxy_agent_1.default(popts); + } + } + } +}); + +// ../fetch/lib/fetchFromRegistry.js +var require_fetchFromRegistry = __commonJS({ + "../fetch/lib/fetchFromRegistry.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var url_1 = require("url"); + var npm_registry_agent_1 = __importDefault(require_lib28()); + var fetch_1 = __importStar2(require_fetch()); + var USER_AGENT = "pnpm"; + var CORGI_DOC = "application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"; + var JSON_DOC = "application/json"; + var MAX_FOLLOWED_REDIRECTS = 20; + function default_1(defaultOpts) { + return async (url, opts) => { + var _a, _b, _c; + const headers = { + "user-agent": USER_AGENT, + ...getHeaders({ + auth: opts === null || opts === void 0 ? void 0 : opts.authHeaderValue, + fullMetadata: defaultOpts.fullMetadata, + userAgent: defaultOpts.userAgent + }) + }; + let redirects = 0; + let urlObject = new url_1.URL(url); + const originalHost = urlObject.host; + while (true) { + const agent = npm_registry_agent_1.default(urlObject.href, { + ...defaultOpts, + ...opts, + strictSsl: (_a = defaultOpts.strictSsl) !== null && _a !== void 0 ? _a : true + }); + headers["connection"] = agent ? "keep-alive" : "close"; + const response = await fetch_1.default(urlObject, { + agent, + compress: (_b = opts === null || opts === void 0 ? void 0 : opts.compress) !== null && _b !== void 0 ? _b : false, + headers, + redirect: "manual", + retry: opts === null || opts === void 0 ? void 0 : opts.retry, + timeout: (_c = opts === null || opts === void 0 ? void 0 : opts.timeout) !== null && _c !== void 0 ? _c : 6e4 + }); + if (!fetch_1.isRedirect(response.status) || redirects >= MAX_FOLLOWED_REDIRECTS) { + return response; + } + redirects++; + urlObject = new url_1.URL(response.headers.get("location")); + if (!headers["authorization"] || originalHost === urlObject.host) + continue; + delete headers.authorization; + } + }; + } + exports2.default = default_1; + function getHeaders(opts) { + const headers = { + accept: opts.fullMetadata === true ? JSON_DOC : CORGI_DOC + }; + if (opts.auth) { + headers["authorization"] = opts.auth; + } + if (opts.userAgent) { + headers["user-agent"] = opts.userAgent; + } + return headers; + } + } +}); + +// ../fetch/lib/index.js +var require_lib29 = __commonJS({ + "../fetch/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createFetchFromRegistry = void 0; + var fetch_1 = __importDefault(require_fetch()); + var fetchFromRegistry_1 = __importDefault(require_fetchFromRegistry()); + exports2.createFetchFromRegistry = fetchFromRegistry_1.default; + exports2.default = fetch_1.default; + } +}); + +// ../../node_modules/.pnpm/cmd-extension@1.0.2/node_modules/cmd-extension/index.js +var require_cmd_extension = __commonJS({ + "../../node_modules/.pnpm/cmd-extension@1.0.2/node_modules/cmd-extension/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var cmdExtension; + if (process.env.PATHEXT) { + cmdExtension = process.env.PATHEXT.split(path.delimiter).find((ext) => ext.toUpperCase() === ".CMD"); + } + module2.exports = cmdExtension || ".cmd"; + } +}); + +// ../../node_modules/.pnpm/@zkochan+cmd-shim@5.2.1/node_modules/@zkochan/cmd-shim/index.js +var require_cmd_shim = __commonJS({ + "../../node_modules/.pnpm/@zkochan+cmd-shim@5.2.1/node_modules/@zkochan/cmd-shim/index.js"(exports2, module2) { + "use strict"; + cmdShim.ifExists = cmdShimIfExists; + var util_1 = require("util"); + var path = require("path"); + var isWindows = require_is_windows(); + var CMD_EXTENSION = require_cmd_extension(); + var shebangExpr = /^#!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/; + var DEFAULT_OPTIONS = { + createPwshFile: true, + createCmdFile: isWindows(), + fs: require("fs") + }; + var extensionToProgramMap = new Map([ + [".js", "node"], + [".cjs", "node"], + [".mjs", "node"], + [".cmd", "cmd"], + [".bat", "cmd"], + [".ps1", "pwsh"], + [".sh", "sh"] + ]); + function ingestOptions(opts) { + const opts_ = { ...DEFAULT_OPTIONS, ...opts }; + const fs = opts_.fs; + opts_.fs_ = { + chmod: fs.chmod ? util_1.promisify(fs.chmod) : async () => { + }, + mkdir: util_1.promisify(fs.mkdir), + readFile: util_1.promisify(fs.readFile), + stat: util_1.promisify(fs.stat), + unlink: util_1.promisify(fs.unlink), + writeFile: util_1.promisify(fs.writeFile) + }; + return opts_; + } + async function cmdShim(src, to, opts) { + const opts_ = ingestOptions(opts); + await opts_.fs_.stat(src); + await cmdShim_(src, to, opts_); + } + function cmdShimIfExists(src, to, opts) { + return cmdShim(src, to, opts).catch(() => { + }); + } + function rm(path2, opts) { + return opts.fs_.unlink(path2).catch(() => { + }); + } + async function cmdShim_(src, to, opts) { + const srcRuntimeInfo = await searchScriptRuntime(src, opts); + await writeShimsPreCommon(to, opts); + return writeAllShims(src, to, srcRuntimeInfo, opts); + } + function writeShimsPreCommon(target, opts) { + return opts.fs_.mkdir(path.dirname(target), { recursive: true }); + } + function writeAllShims(src, to, srcRuntimeInfo, opts) { + const opts_ = ingestOptions(opts); + const generatorAndExts = [{ generator: generateShShim, extension: "" }]; + if (opts_.createCmdFile) { + generatorAndExts.push({ generator: generateCmdShim, extension: CMD_EXTENSION }); + } + if (opts_.createPwshFile) { + generatorAndExts.push({ generator: generatePwshShim, extension: ".ps1" }); + } + return Promise.all(generatorAndExts.map((generatorAndExt) => writeShim(src, to + generatorAndExt.extension, srcRuntimeInfo, generatorAndExt.generator, opts_))); + } + function writeShimPre(target, opts) { + return rm(target, opts); + } + function writeShimPost(target, opts) { + return chmodShim(target, opts); + } + async function searchScriptRuntime(target, opts) { + const data = await opts.fs_.readFile(target, "utf8"); + const firstLine = data.trim().split(/\r*\n/)[0]; + const shebang = firstLine.match(shebangExpr); + if (!shebang) { + const targetExtension = path.extname(target).toLowerCase(); + return { + program: extensionToProgramMap.get(targetExtension) || null, + additionalArgs: "" + }; + } + return { + program: shebang[1], + additionalArgs: shebang[2] + }; + } + async function writeShim(src, to, srcRuntimeInfo, generateShimScript, opts) { + const defaultArgs = opts.preserveSymlinks ? "--preserve-symlinks" : ""; + const args2 = [srcRuntimeInfo.additionalArgs, defaultArgs].filter((arg) => arg).join(" "); + opts = Object.assign({}, opts, { + prog: srcRuntimeInfo.program, + args: args2 + }); + await writeShimPre(to, opts); + await opts.fs_.writeFile(to, generateShimScript(src, to, opts), "utf8"); + return writeShimPost(to, opts); + } + function generateCmdShim(src, to, opts) { + const shTarget = path.relative(path.dirname(to), src); + let target = shTarget.split("/").join("\\"); + const quotedPathToTarget = path.isAbsolute(target) ? `"${target}"` : `"%~dp0\\${target}"`; + let longProg; + let prog = opts.prog; + let args2 = opts.args || ""; + const nodePath = normalizePathEnvVar(opts.nodePath).win32; + if (!prog) { + prog = quotedPathToTarget; + args2 = ""; + target = ""; + } else if (prog === "node" && opts.nodeExecPath) { + prog = `"${opts.nodeExecPath}"`; + target = quotedPathToTarget; + } else { + longProg = `"%~dp0\\${prog}.exe"`; + target = quotedPathToTarget; + } + let progArgs = opts.progArgs ? `${opts.progArgs.join(` `)} ` : ""; + let cmd = "@SETLOCAL\r\n"; + if (nodePath) { + cmd += `@IF NOT DEFINED NODE_PATH (\r + @SET "NODE_PATH=${nodePath}"\r +) ELSE (\r + @SET "NODE_PATH=%NODE_PATH%;${nodePath}"\r +)\r +`; + } + if (longProg) { + cmd += `@IF EXIST ${longProg} (\r + ${longProg} ${args2} ${target} ${progArgs}%*\r +) ELSE (\r + @SET PATHEXT=%PATHEXT:;.JS;=;%\r + ${prog} ${args2} ${target} ${progArgs}%*\r +)\r +`; + } else { + cmd += `@${prog} ${args2} ${target} ${progArgs}%*\r +`; + } + return cmd; + } + function generateShShim(src, to, opts) { + let shTarget = path.relative(path.dirname(to), src); + let shProg = opts.prog && opts.prog.split("\\").join("/"); + let shLongProg; + shTarget = shTarget.split("\\").join("/"); + const quotedPathToTarget = path.isAbsolute(shTarget) ? `"${shTarget}"` : `"$basedir/${shTarget}"`; + let args2 = opts.args || ""; + const shNodePath = normalizePathEnvVar(opts.nodePath).posix; + if (!shProg) { + shProg = quotedPathToTarget; + args2 = ""; + shTarget = ""; + } else if (opts.prog === "node" && opts.nodeExecPath) { + shProg = `"${opts.nodeExecPath}"`; + shTarget = quotedPathToTarget; + } else { + shLongProg = `"$basedir/${opts.prog}"`; + shTarget = quotedPathToTarget; + } + let progArgs = opts.progArgs ? `${opts.progArgs.join(` `)} ` : ""; + let sh = `#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')") + +case \`uname\` in + *CYGWIN*) basedir=\`cygpath -w "$basedir"\`;; +esac + +`; + if (opts.nodePath) { + sh += `if [ -z "$NODE_PATH" ]; then + export NODE_PATH="${shNodePath}" +else + export NODE_PATH="$NODE_PATH:${shNodePath}" +fi +`; + } + if (shLongProg) { + sh += `if [ -x ${shLongProg} ]; then + exec ${shLongProg} ${args2} ${shTarget} ${progArgs}"$@" +else + exec ${shProg} ${args2} ${shTarget} ${progArgs}"$@" +fi +`; + } else { + sh += `${shProg} ${args2} ${shTarget} ${progArgs}"$@" +exit $? +`; + } + return sh; + } + function generatePwshShim(src, to, opts) { + let shTarget = path.relative(path.dirname(to), src); + const shProg = opts.prog && opts.prog.split("\\").join("/"); + let pwshProg = shProg && `"${shProg}$exe"`; + let pwshLongProg; + shTarget = shTarget.split("\\").join("/"); + const quotedPathToTarget = path.isAbsolute(shTarget) ? `"${shTarget}"` : `"$basedir/${shTarget}"`; + let args2 = opts.args || ""; + let normalizedPathEnvVar = normalizePathEnvVar(opts.nodePath); + const nodePath = normalizedPathEnvVar.win32; + const shNodePath = normalizedPathEnvVar.posix; + if (!pwshProg) { + pwshProg = quotedPathToTarget; + args2 = ""; + shTarget = ""; + } else if (opts.prog === "node" && opts.nodeExecPath) { + pwshProg = `"${opts.nodeExecPath}"`; + shTarget = quotedPathToTarget; + } else { + pwshLongProg = `"$basedir/${opts.prog}$exe"`; + shTarget = quotedPathToTarget; + } + let progArgs = opts.progArgs ? `${opts.progArgs.join(` `)} ` : ""; + let pwsh = `#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +${opts.nodePath ? `$pathsep=":" +$env_node_path=$env:NODE_PATH +$new_node_path="${nodePath}" +` : ""}if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +${opts.nodePath ? ' $pathsep=";"\n' : ""}}`; + if (opts.nodePath) { + pwsh += ` else { + $new_node_path="${shNodePath}" +} +if ([string]::IsNullOrEmpty($env_node_path)) { + $env:NODE_PATH=$new_node_path +} else { + $env:NODE_PATH="$env_node_path$pathsep$new_node_path" +} +`; + } + if (pwshLongProg) { + pwsh += ` +$ret=0 +if (Test-Path ${pwshLongProg}) { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & ${pwshLongProg} ${args2} ${shTarget} ${progArgs}$args + } else { + & ${pwshLongProg} ${args2} ${shTarget} ${progArgs}$args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & ${pwshProg} ${args2} ${shTarget} ${progArgs}$args + } else { + & ${pwshProg} ${args2} ${shTarget} ${progArgs}$args + } + $ret=$LASTEXITCODE +} +${opts.nodePath ? "$env:NODE_PATH=$env_node_path\n" : ""}exit $ret +`; + } else { + pwsh += ` +# Support pipeline input +if ($MyInvocation.ExpectingInput) { + $input | & ${pwshProg} ${args2} ${shTarget} ${progArgs}$args +} else { + & ${pwshProg} ${args2} ${shTarget} ${progArgs}$args +} +${opts.nodePath ? "$env:NODE_PATH=$env_node_path\n" : ""}exit $LASTEXITCODE +`; + } + return pwsh; + } + function chmodShim(to, opts) { + return opts.fs_.chmod(to, 493); + } + function normalizePathEnvVar(nodePath) { + if (!nodePath) { + return { + win32: "", + posix: "" + }; + } + let split = typeof nodePath === "string" ? nodePath.split(path.delimiter) : Array.from(nodePath); + let result = {}; + for (let i = 0; i < split.length; i++) { + const win32 = split[i].split("/").join("\\"); + const posix = isWindows() ? split[i].split("\\").join("/").replace(/^([^:\\/]*):/, (_, $1) => `/mnt/${$1.toLowerCase()}`) : split[i]; + result.win32 = result.win32 ? `${result.win32};${win32}` : win32; + result.posix = result.posix ? `${result.posix}:${posix}` : posix; + result[i] = { win32, posix }; + } + return result; + } + module2.exports = cmdShim; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_freeGlobal.js +var require_freeGlobal = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_freeGlobal.js"(exports2, module2) { + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + module2.exports = freeGlobal; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js +var require_root = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js"(exports2, module2) { + var freeGlobal = require_freeGlobal(); + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + module2.exports = root; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js +var require_Symbol = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js"(exports2, module2) { + var root = require_root(); + var Symbol2 = root.Symbol; + module2.exports = Symbol2; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getRawTag.js +var require_getRawTag = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getRawTag.js"(exports2, module2) { + var Symbol2 = require_Symbol(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + var nativeObjectToString = objectProto.toString; + var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0; + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; + try { + value[symToStringTag] = void 0; + var unmasked = true; + } catch (e) { + } + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + module2.exports = getRawTag; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_objectToString.js +var require_objectToString = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_objectToString.js"(exports2, module2) { + var objectProto = Object.prototype; + var nativeObjectToString = objectProto.toString; + function objectToString(value) { + return nativeObjectToString.call(value); + } + module2.exports = objectToString; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js +var require_baseGetTag = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js"(exports2, module2) { + var Symbol2 = require_Symbol(); + var getRawTag = require_getRawTag(); + var objectToString = require_objectToString(); + var nullTag = "[object Null]"; + var undefinedTag = "[object Undefined]"; + var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0; + function baseGetTag(value) { + if (value == null) { + return value === void 0 ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); + } + module2.exports = baseGetTag; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js +var require_isObject2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js"(exports2, module2) { + function isObject(value) { + var type = typeof value; + return value != null && (type == "object" || type == "function"); + } + module2.exports = isObject; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isFunction.js +var require_isFunction2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isFunction.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isObject = require_isObject2(); + var asyncTag = "[object AsyncFunction]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var proxyTag = "[object Proxy]"; + function isFunction(value) { + if (!isObject(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + module2.exports = isFunction; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_coreJsData.js +var require_coreJsData = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_coreJsData.js"(exports2, module2) { + var root = require_root(); + var coreJsData = root["__core-js_shared__"]; + module2.exports = coreJsData; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isMasked.js +var require_isMasked = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isMasked.js"(exports2, module2) { + var coreJsData = require_coreJsData(); + var maskSrcKey = function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; + }(); + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + module2.exports = isMasked; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toSource.js +var require_toSource = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toSource.js"(exports2, module2) { + var funcProto = Function.prototype; + var funcToString = funcProto.toString; + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) { + } + try { + return func + ""; + } catch (e) { + } + } + return ""; + } + module2.exports = toSource; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNative.js +var require_baseIsNative = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNative.js"(exports2, module2) { + var isFunction = require_isFunction2(); + var isMasked = require_isMasked(); + var isObject = require_isObject2(); + var toSource = require_toSource(); + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var reIsHostCtor = /^\[object .+?Constructor\]$/; + var funcProto = Function.prototype; + var objectProto = Object.prototype; + var funcToString = funcProto.toString; + var hasOwnProperty = objectProto.hasOwnProperty; + var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"); + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + module2.exports = baseIsNative; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getValue.js +var require_getValue = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getValue.js"(exports2, module2) { + function getValue(object, key) { + return object == null ? void 0 : object[key]; + } + module2.exports = getValue; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getNative.js +var require_getNative = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getNative.js"(exports2, module2) { + var baseIsNative = require_baseIsNative(); + var getValue = require_getValue(); + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : void 0; + } + module2.exports = getNative; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_defineProperty.js +var require_defineProperty = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_defineProperty.js"(exports2, module2) { + var getNative = require_getNative(); + var defineProperty = function() { + try { + var func = getNative(Object, "defineProperty"); + func({}, "", {}); + return func; + } catch (e) { + } + }(); + module2.exports = defineProperty; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignValue.js +var require_baseAssignValue = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignValue.js"(exports2, module2) { + var defineProperty = require_defineProperty(); + function baseAssignValue(object, key, value) { + if (key == "__proto__" && defineProperty) { + defineProperty(object, key, { + "configurable": true, + "enumerable": true, + "value": value, + "writable": true + }); + } else { + object[key] = value; + } + } + module2.exports = baseAssignValue; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createBaseFor.js +var require_createBaseFor = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createBaseFor.js"(exports2, module2) { + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + module2.exports = createBaseFor; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFor.js +var require_baseFor = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFor.js"(exports2, module2) { + var createBaseFor = require_createBaseFor(); + var baseFor = createBaseFor(); + module2.exports = baseFor; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTimes.js +var require_baseTimes = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTimes.js"(exports2, module2) { + function baseTimes(n, iteratee) { + var index = -1, result = Array(n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + module2.exports = baseTimes; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js +var require_isObjectLike = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js"(exports2, module2) { + function isObjectLike(value) { + return value != null && typeof value == "object"; + } + module2.exports = isObjectLike; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsArguments.js +var require_baseIsArguments = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsArguments.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isObjectLike = require_isObjectLike(); + var argsTag = "[object Arguments]"; + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + module2.exports = baseIsArguments; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArguments.js +var require_isArguments2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArguments.js"(exports2, module2) { + var baseIsArguments = require_baseIsArguments(); + var isObjectLike = require_isObjectLike(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var isArguments = baseIsArguments(function() { + return arguments; + }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee"); + }; + module2.exports = isArguments; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js +var require_isArray2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js"(exports2, module2) { + var isArray = Array.isArray; + module2.exports = isArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/stubFalse.js +var require_stubFalse = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/stubFalse.js"(exports2, module2) { + function stubFalse() { + return false; + } + module2.exports = stubFalse; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBuffer.js +var require_isBuffer = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBuffer.js"(exports2, module2) { + var root = require_root(); + var stubFalse = require_stubFalse(); + var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2; + var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2; + var moduleExports = freeModule && freeModule.exports === freeExports; + var Buffer2 = moduleExports ? root.Buffer : void 0; + var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0; + var isBuffer = nativeIsBuffer || stubFalse; + module2.exports = isBuffer; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIndex.js +var require_isIndex = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIndex.js"(exports2, module2) { + var MAX_SAFE_INTEGER = 9007199254740991; + var reIsUint = /^(?:0|[1-9]\d*)$/; + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); + } + module2.exports = isIndex; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isLength.js +var require_isLength = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isLength.js"(exports2, module2) { + var MAX_SAFE_INTEGER = 9007199254740991; + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + module2.exports = isLength; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsTypedArray.js +var require_baseIsTypedArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsTypedArray.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isLength = require_isLength(); + var isObjectLike = require_isObjectLike(); + var argsTag = "[object Arguments]"; + var arrayTag = "[object Array]"; + var boolTag = "[object Boolean]"; + var dateTag = "[object Date]"; + var errorTag = "[object Error]"; + var funcTag = "[object Function]"; + var mapTag = "[object Map]"; + var numberTag = "[object Number]"; + var objectTag = "[object Object]"; + var regexpTag = "[object RegExp]"; + var setTag = "[object Set]"; + var stringTag = "[object String]"; + var weakMapTag = "[object WeakMap]"; + var arrayBufferTag = "[object ArrayBuffer]"; + var dataViewTag = "[object DataView]"; + var float32Tag = "[object Float32Array]"; + var float64Tag = "[object Float64Array]"; + var int8Tag = "[object Int8Array]"; + var int16Tag = "[object Int16Array]"; + var int32Tag = "[object Int32Array]"; + var uint8Tag = "[object Uint8Array]"; + var uint8ClampedTag = "[object Uint8ClampedArray]"; + var uint16Tag = "[object Uint16Array]"; + var uint32Tag = "[object Uint32Array]"; + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + module2.exports = baseIsTypedArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js +var require_baseUnary = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js"(exports2, module2) { + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + module2.exports = baseUnary; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nodeUtil.js +var require_nodeUtil = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nodeUtil.js"(exports2, module2) { + var freeGlobal = require_freeGlobal(); + var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2; + var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2; + var moduleExports = freeModule && freeModule.exports === freeExports; + var freeProcess = moduleExports && freeGlobal.process; + var nodeUtil = function() { + try { + var types = freeModule && freeModule.require && freeModule.require("util").types; + if (types) { + return types; + } + return freeProcess && freeProcess.binding && freeProcess.binding("util"); + } catch (e) { + } + }(); + module2.exports = nodeUtil; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isTypedArray.js +var require_isTypedArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isTypedArray.js"(exports2, module2) { + var baseIsTypedArray = require_baseIsTypedArray(); + var baseUnary = require_baseUnary(); + var nodeUtil = require_nodeUtil(); + var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + module2.exports = isTypedArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayLikeKeys.js +var require_arrayLikeKeys = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayLikeKeys.js"(exports2, module2) { + var baseTimes = require_baseTimes(); + var isArguments = require_isArguments2(); + var isArray = require_isArray2(); + var isBuffer = require_isBuffer(); + var isIndex = require_isIndex(); + var isTypedArray = require_isTypedArray(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) { + result.push(key); + } + } + return result; + } + module2.exports = arrayLikeKeys; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isPrototype.js +var require_isPrototype = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isPrototype.js"(exports2, module2) { + var objectProto = Object.prototype; + function isPrototype(value) { + var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto; + return value === proto; + } + module2.exports = isPrototype; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overArg.js +var require_overArg = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overArg.js"(exports2, module2) { + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + module2.exports = overArg; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeKeys.js +var require_nativeKeys = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeKeys.js"(exports2, module2) { + var overArg = require_overArg(); + var nativeKeys = overArg(Object.keys, Object); + module2.exports = nativeKeys; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeys.js +var require_baseKeys = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeys.js"(exports2, module2) { + var isPrototype = require_isPrototype(); + var nativeKeys = require_nativeKeys(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != "constructor") { + result.push(key); + } + } + return result; + } + module2.exports = baseKeys; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js +var require_isArrayLike3 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js"(exports2, module2) { + var isFunction = require_isFunction2(); + var isLength = require_isLength(); + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + module2.exports = isArrayLike; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keys.js +var require_keys2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keys.js"(exports2, module2) { + var arrayLikeKeys = require_arrayLikeKeys(); + var baseKeys = require_baseKeys(); + var isArrayLike = require_isArrayLike3(); + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + module2.exports = keys; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseForOwn.js +var require_baseForOwn = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseForOwn.js"(exports2, module2) { + var baseFor = require_baseFor(); + var keys = require_keys2(); + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + module2.exports = baseForOwn; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheClear.js +var require_listCacheClear = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheClear.js"(exports2, module2) { + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + module2.exports = listCacheClear; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js +var require_eq2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js"(exports2, module2) { + function eq(value, other) { + return value === other || value !== value && other !== other; + } + module2.exports = eq; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js +var require_assocIndexOf = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js"(exports2, module2) { + var eq = require_eq2(); + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + module2.exports = assocIndexOf; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js +var require_listCacheDelete = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js"(exports2, module2) { + var assocIndexOf = require_assocIndexOf(); + var arrayProto = Array.prototype; + var splice = arrayProto.splice; + function listCacheDelete(key) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + module2.exports = listCacheDelete; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheGet.js +var require_listCacheGet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheGet.js"(exports2, module2) { + var assocIndexOf = require_assocIndexOf(); + function listCacheGet(key) { + var data = this.__data__, index = assocIndexOf(data, key); + return index < 0 ? void 0 : data[index][1]; + } + module2.exports = listCacheGet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheHas.js +var require_listCacheHas = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheHas.js"(exports2, module2) { + var assocIndexOf = require_assocIndexOf(); + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + module2.exports = listCacheHas; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheSet.js +var require_listCacheSet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheSet.js"(exports2, module2) { + var assocIndexOf = require_assocIndexOf(); + function listCacheSet(key, value) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + module2.exports = listCacheSet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_ListCache.js +var require_ListCache = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_ListCache.js"(exports2, module2) { + var listCacheClear = require_listCacheClear(); + var listCacheDelete = require_listCacheDelete(); + var listCacheGet = require_listCacheGet(); + var listCacheHas = require_listCacheHas(); + var listCacheSet = require_listCacheSet(); + function ListCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + ListCache.prototype.clear = listCacheClear; + ListCache.prototype["delete"] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + module2.exports = ListCache; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackClear.js +var require_stackClear = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackClear.js"(exports2, module2) { + var ListCache = require_ListCache(); + function stackClear() { + this.__data__ = new ListCache(); + this.size = 0; + } + module2.exports = stackClear; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackDelete.js +var require_stackDelete = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackDelete.js"(exports2, module2) { + function stackDelete(key) { + var data = this.__data__, result = data["delete"](key); + this.size = data.size; + return result; + } + module2.exports = stackDelete; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackGet.js +var require_stackGet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackGet.js"(exports2, module2) { + function stackGet(key) { + return this.__data__.get(key); + } + module2.exports = stackGet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackHas.js +var require_stackHas = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackHas.js"(exports2, module2) { + function stackHas(key) { + return this.__data__.has(key); + } + module2.exports = stackHas; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Map.js +var require_Map = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Map.js"(exports2, module2) { + var getNative = require_getNative(); + var root = require_root(); + var Map2 = getNative(root, "Map"); + module2.exports = Map2; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeCreate.js +var require_nativeCreate = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeCreate.js"(exports2, module2) { + var getNative = require_getNative(); + var nativeCreate = getNative(Object, "create"); + module2.exports = nativeCreate; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashClear.js +var require_hashClear = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashClear.js"(exports2, module2) { + var nativeCreate = require_nativeCreate(); + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + module2.exports = hashClear; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashDelete.js +var require_hashDelete = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashDelete.js"(exports2, module2) { + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + module2.exports = hashDelete; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashGet.js +var require_hashGet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashGet.js"(exports2, module2) { + var nativeCreate = require_nativeCreate(); + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? void 0 : result; + } + return hasOwnProperty.call(data, key) ? data[key] : void 0; + } + module2.exports = hashGet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashHas.js +var require_hashHas = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashHas.js"(exports2, module2) { + var nativeCreate = require_nativeCreate(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key); + } + module2.exports = hashHas; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashSet.js +var require_hashSet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashSet.js"(exports2, module2) { + var nativeCreate = require_nativeCreate(); + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value; + return this; + } + module2.exports = hashSet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Hash.js +var require_Hash = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Hash.js"(exports2, module2) { + var hashClear = require_hashClear(); + var hashDelete = require_hashDelete(); + var hashGet = require_hashGet(); + var hashHas = require_hashHas(); + var hashSet = require_hashSet(); + function Hash(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + Hash.prototype.clear = hashClear; + Hash.prototype["delete"] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + module2.exports = Hash; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheClear.js +var require_mapCacheClear = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheClear.js"(exports2, module2) { + var Hash = require_Hash(); + var ListCache = require_ListCache(); + var Map2 = require_Map(); + function mapCacheClear() { + this.size = 0; + this.__data__ = { + "hash": new Hash(), + "map": new (Map2 || ListCache)(), + "string": new Hash() + }; + } + module2.exports = mapCacheClear; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKeyable.js +var require_isKeyable = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKeyable.js"(exports2, module2) { + function isKeyable(value) { + var type = typeof value; + return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; + } + module2.exports = isKeyable; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMapData.js +var require_getMapData = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMapData.js"(exports2, module2) { + var isKeyable = require_isKeyable(); + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; + } + module2.exports = getMapData; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheDelete.js +var require_mapCacheDelete = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheDelete.js"(exports2, module2) { + var getMapData = require_getMapData(); + function mapCacheDelete(key) { + var result = getMapData(this, key)["delete"](key); + this.size -= result ? 1 : 0; + return result; + } + module2.exports = mapCacheDelete; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheGet.js +var require_mapCacheGet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheGet.js"(exports2, module2) { + var getMapData = require_getMapData(); + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + module2.exports = mapCacheGet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheHas.js +var require_mapCacheHas = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheHas.js"(exports2, module2) { + var getMapData = require_getMapData(); + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + module2.exports = mapCacheHas; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheSet.js +var require_mapCacheSet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheSet.js"(exports2, module2) { + var getMapData = require_getMapData(); + function mapCacheSet(key, value) { + var data = getMapData(this, key), size = data.size; + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + module2.exports = mapCacheSet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_MapCache.js +var require_MapCache = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_MapCache.js"(exports2, module2) { + var mapCacheClear = require_mapCacheClear(); + var mapCacheDelete = require_mapCacheDelete(); + var mapCacheGet = require_mapCacheGet(); + var mapCacheHas = require_mapCacheHas(); + var mapCacheSet = require_mapCacheSet(); + function MapCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype["delete"] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + module2.exports = MapCache; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackSet.js +var require_stackSet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackSet.js"(exports2, module2) { + var ListCache = require_ListCache(); + var Map2 = require_Map(); + var MapCache = require_MapCache(); + var LARGE_ARRAY_SIZE = 200; + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + module2.exports = stackSet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Stack.js +var require_Stack = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Stack.js"(exports2, module2) { + var ListCache = require_ListCache(); + var stackClear = require_stackClear(); + var stackDelete = require_stackDelete(); + var stackGet = require_stackGet(); + var stackHas = require_stackHas(); + var stackSet = require_stackSet(); + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + Stack.prototype.clear = stackClear; + Stack.prototype["delete"] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + module2.exports = Stack; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setCacheAdd.js +var require_setCacheAdd = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setCacheAdd.js"(exports2, module2) { + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + module2.exports = setCacheAdd; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setCacheHas.js +var require_setCacheHas = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setCacheHas.js"(exports2, module2) { + function setCacheHas(value) { + return this.__data__.has(value); + } + module2.exports = setCacheHas; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_SetCache.js +var require_SetCache = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_SetCache.js"(exports2, module2) { + var MapCache = require_MapCache(); + var setCacheAdd = require_setCacheAdd(); + var setCacheHas = require_setCacheHas(); + function SetCache(values) { + var index = -1, length = values == null ? 0 : values.length; + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values[index]); + } + } + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + module2.exports = SetCache; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arraySome.js +var require_arraySome = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arraySome.js"(exports2, module2) { + function arraySome(array, predicate) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + module2.exports = arraySome; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cacheHas.js +var require_cacheHas = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cacheHas.js"(exports2, module2) { + function cacheHas(cache, key) { + return cache.has(key); + } + module2.exports = cacheHas; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalArrays.js +var require_equalArrays = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalArrays.js"(exports2, module2) { + var SetCache = require_SetCache(); + var arraySome = require_arraySome(); + var cacheHas = require_cacheHas(); + var COMPARE_PARTIAL_FLAG = 1; + var COMPARE_UNORDERED_FLAG = 2; + function equalArrays(array, other, bitmask, customizer, equalFunc, stack2) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + var arrStacked = stack2.get(array); + var othStacked = stack2.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : void 0; + stack2.set(array, other); + stack2.set(other, array); + while (++index < arrLength) { + var arrValue = array[index], othValue = other[index]; + if (customizer) { + var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack2) : customizer(arrValue, othValue, index, array, other, stack2); + } + if (compared !== void 0) { + if (compared) { + continue; + } + result = false; + break; + } + if (seen) { + if (!arraySome(other, function(othValue2, othIndex) { + if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack2))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack2))) { + result = false; + break; + } + } + stack2["delete"](array); + stack2["delete"](other); + return result; + } + module2.exports = equalArrays; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Uint8Array.js +var require_Uint8Array = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Uint8Array.js"(exports2, module2) { + var root = require_root(); + var Uint8Array2 = root.Uint8Array; + module2.exports = Uint8Array2; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapToArray.js +var require_mapToArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapToArray.js"(exports2, module2) { + function mapToArray(map) { + var index = -1, result = Array(map.size); + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + module2.exports = mapToArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setToArray.js +var require_setToArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setToArray.js"(exports2, module2) { + function setToArray(set) { + var index = -1, result = Array(set.size); + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + module2.exports = setToArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalByTag.js +var require_equalByTag = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalByTag.js"(exports2, module2) { + var Symbol2 = require_Symbol(); + var Uint8Array2 = require_Uint8Array(); + var eq = require_eq2(); + var equalArrays = require_equalArrays(); + var mapToArray = require_mapToArray(); + var setToArray = require_setToArray(); + var COMPARE_PARTIAL_FLAG = 1; + var COMPARE_UNORDERED_FLAG = 2; + var boolTag = "[object Boolean]"; + var dateTag = "[object Date]"; + var errorTag = "[object Error]"; + var mapTag = "[object Map]"; + var numberTag = "[object Number]"; + var regexpTag = "[object RegExp]"; + var setTag = "[object Set]"; + var stringTag = "[object String]"; + var symbolTag = "[object Symbol]"; + var arrayBufferTag = "[object ArrayBuffer]"; + var dataViewTag = "[object DataView]"; + var symbolProto = Symbol2 ? Symbol2.prototype : void 0; + var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0; + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack2) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + object = object.buffer; + other = other.buffer; + case arrayBufferTag: + if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) { + return false; + } + return true; + case boolTag: + case dateTag: + case numberTag: + return eq(+object, +other); + case errorTag: + return object.name == other.name && object.message == other.message; + case regexpTag: + case stringTag: + return object == other + ""; + case mapTag: + var convert = mapToArray; + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + if (object.size != other.size && !isPartial) { + return false; + } + var stacked = stack2.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + stack2.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack2); + stack2["delete"](object); + return result; + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + module2.exports = equalByTag; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayPush.js +var require_arrayPush = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayPush.js"(exports2, module2) { + function arrayPush(array, values) { + var index = -1, length = values.length, offset = array.length; + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + module2.exports = arrayPush; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetAllKeys.js +var require_baseGetAllKeys = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetAllKeys.js"(exports2, module2) { + var arrayPush = require_arrayPush(); + var isArray = require_isArray2(); + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + module2.exports = baseGetAllKeys; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayFilter.js +var require_arrayFilter = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayFilter.js"(exports2, module2) { + function arrayFilter(array, predicate) { + var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + module2.exports = arrayFilter; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/stubArray.js +var require_stubArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/stubArray.js"(exports2, module2) { + function stubArray() { + return []; + } + module2.exports = stubArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getSymbols.js +var require_getSymbols = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getSymbols.js"(exports2, module2) { + var arrayFilter = require_arrayFilter(); + var stubArray = require_stubArray(); + var objectProto = Object.prototype; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var nativeGetSymbols = Object.getOwnPropertySymbols; + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + module2.exports = getSymbols; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getAllKeys.js +var require_getAllKeys = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getAllKeys.js"(exports2, module2) { + var baseGetAllKeys = require_baseGetAllKeys(); + var getSymbols = require_getSymbols(); + var keys = require_keys2(); + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + module2.exports = getAllKeys; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalObjects.js +var require_equalObjects = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalObjects.js"(exports2, module2) { + var getAllKeys = require_getAllKeys(); + var COMPARE_PARTIAL_FLAG = 1; + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function equalObjects(object, other, bitmask, customizer, equalFunc, stack2) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var objStacked = stack2.get(object); + var othStacked = stack2.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack2.set(object, other); + stack2.set(other, object); + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], othValue = other[key]; + if (customizer) { + var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack2) : customizer(objValue, othValue, key, object, other, stack2); + } + if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack2) : compared)) { + result = false; + break; + } + skipCtor || (skipCtor = key == "constructor"); + } + if (result && !skipCtor) { + var objCtor = object.constructor, othCtor = other.constructor; + if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) { + result = false; + } + } + stack2["delete"](object); + stack2["delete"](other); + return result; + } + module2.exports = equalObjects; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_DataView.js +var require_DataView = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_DataView.js"(exports2, module2) { + var getNative = require_getNative(); + var root = require_root(); + var DataView2 = getNative(root, "DataView"); + module2.exports = DataView2; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Promise.js +var require_Promise = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Promise.js"(exports2, module2) { + var getNative = require_getNative(); + var root = require_root(); + var Promise2 = getNative(root, "Promise"); + module2.exports = Promise2; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Set.js +var require_Set2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Set.js"(exports2, module2) { + var getNative = require_getNative(); + var root = require_root(); + var Set2 = getNative(root, "Set"); + module2.exports = Set2; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_WeakMap.js +var require_WeakMap = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_WeakMap.js"(exports2, module2) { + var getNative = require_getNative(); + var root = require_root(); + var WeakMap2 = getNative(root, "WeakMap"); + module2.exports = WeakMap2; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getTag.js +var require_getTag = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getTag.js"(exports2, module2) { + var DataView2 = require_DataView(); + var Map2 = require_Map(); + var Promise2 = require_Promise(); + var Set2 = require_Set2(); + var WeakMap2 = require_WeakMap(); + var baseGetTag = require_baseGetTag(); + var toSource = require_toSource(); + var mapTag = "[object Map]"; + var objectTag = "[object Object]"; + var promiseTag = "[object Promise]"; + var setTag = "[object Set]"; + var weakMapTag = "[object WeakMap]"; + var dataViewTag = "[object DataView]"; + var dataViewCtorString = toSource(DataView2); + var mapCtorString = toSource(Map2); + var promiseCtorString = toSource(Promise2); + var setCtorString = toSource(Set2); + var weakMapCtorString = toSource(WeakMap2); + var getTag = baseGetTag; + if (DataView2 && getTag(new DataView2(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) { + getTag = function(value) { + var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : ""; + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + case mapCtorString: + return mapTag; + case promiseCtorString: + return promiseTag; + case setCtorString: + return setTag; + case weakMapCtorString: + return weakMapTag; + } + } + return result; + }; + } + module2.exports = getTag; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqualDeep.js +var require_baseIsEqualDeep = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqualDeep.js"(exports2, module2) { + var Stack = require_Stack(); + var equalArrays = require_equalArrays(); + var equalByTag = require_equalByTag(); + var equalObjects = require_equalObjects(); + var getTag = require_getTag(); + var isArray = require_isArray2(); + var isBuffer = require_isBuffer(); + var isTypedArray = require_isTypedArray(); + var COMPARE_PARTIAL_FLAG = 1; + var argsTag = "[object Arguments]"; + var arrayTag = "[object Array]"; + var objectTag = "[object Object]"; + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack2) { + var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack2 || (stack2 = new Stack()); + return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack2) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack2); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__"); + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; + stack2 || (stack2 = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack2); + } + } + if (!isSameTag) { + return false; + } + stack2 || (stack2 = new Stack()); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack2); + } + module2.exports = baseIsEqualDeep; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqual.js +var require_baseIsEqual = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqual.js"(exports2, module2) { + var baseIsEqualDeep = require_baseIsEqualDeep(); + var isObjectLike = require_isObjectLike(); + function baseIsEqual(value, other, bitmask, customizer, stack2) { + if (value === other) { + return true; + } + if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack2); + } + module2.exports = baseIsEqual; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsMatch.js +var require_baseIsMatch = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsMatch.js"(exports2, module2) { + var Stack = require_Stack(); + var baseIsEqual = require_baseIsEqual(); + var COMPARE_PARTIAL_FLAG = 1; + var COMPARE_UNORDERED_FLAG = 2; + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, length = index, noCustomizer = !customizer; + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], objValue = object[key], srcValue = data[1]; + if (noCustomizer && data[2]) { + if (objValue === void 0 && !(key in object)) { + return false; + } + } else { + var stack2 = new Stack(); + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack2); + } + if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack2) : result)) { + return false; + } + } + } + return true; + } + module2.exports = baseIsMatch; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isStrictComparable.js +var require_isStrictComparable = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isStrictComparable.js"(exports2, module2) { + var isObject = require_isObject2(); + function isStrictComparable(value) { + return value === value && !isObject(value); + } + module2.exports = isStrictComparable; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMatchData.js +var require_getMatchData = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMatchData.js"(exports2, module2) { + var isStrictComparable = require_isStrictComparable(); + var keys = require_keys2(); + function getMatchData(object) { + var result = keys(object), length = result.length; + while (length--) { + var key = result[length], value = object[key]; + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + module2.exports = getMatchData; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_matchesStrictComparable.js +var require_matchesStrictComparable = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_matchesStrictComparable.js"(exports2, module2) { + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && (srcValue !== void 0 || key in Object(object)); + }; + } + module2.exports = matchesStrictComparable; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseMatches.js +var require_baseMatches = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseMatches.js"(exports2, module2) { + var baseIsMatch = require_baseIsMatch(); + var getMatchData = require_getMatchData(); + var matchesStrictComparable = require_matchesStrictComparable(); + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + module2.exports = baseMatches; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSymbol.js +var require_isSymbol = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSymbol.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isObjectLike = require_isObjectLike(); + var symbolTag = "[object Symbol]"; + function isSymbol(value) { + return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag; + } + module2.exports = isSymbol; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKey.js +var require_isKey = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKey.js"(exports2, module2) { + var isArray = require_isArray2(); + var isSymbol = require_isSymbol(); + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/; + var reIsPlainProp = /^\w*$/; + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object); + } + module2.exports = isKey; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/memoize.js +var require_memoize = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/memoize.js"(exports2, module2) { + var MapCache = require_MapCache(); + var FUNC_ERROR_TEXT = "Expected a function"; + function memoize(func, resolver) { + if (typeof func != "function" || resolver != null && typeof resolver != "function") { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args2 = arguments, key = resolver ? resolver.apply(this, args2) : args2[0], cache = memoized.cache; + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args2); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache)(); + return memoized; + } + memoize.Cache = MapCache; + module2.exports = memoize; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_memoizeCapped.js +var require_memoizeCapped = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_memoizeCapped.js"(exports2, module2) { + var memoize = require_memoize(); + var MAX_MEMOIZE_SIZE = 500; + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + var cache = result.cache; + return result; + } + module2.exports = memoizeCapped; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stringToPath.js +var require_stringToPath = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stringToPath.js"(exports2, module2) { + var memoizeCapped = require_memoizeCapped(); + var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + var reEscapeChar = /\\(\\)?/g; + var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46) { + result.push(""); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match); + }); + return result; + }); + module2.exports = stringToPath; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js +var require_arrayMap = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js"(exports2, module2) { + function arrayMap(array, iteratee) { + var index = -1, length = array == null ? 0 : array.length, result = Array(length); + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + module2.exports = arrayMap; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseToString.js +var require_baseToString = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseToString.js"(exports2, module2) { + var Symbol2 = require_Symbol(); + var arrayMap = require_arrayMap(); + var isArray = require_isArray2(); + var isSymbol = require_isSymbol(); + var INFINITY = 1 / 0; + var symbolProto = Symbol2 ? Symbol2.prototype : void 0; + var symbolToString = symbolProto ? symbolProto.toString : void 0; + function baseToString(value) { + if (typeof value == "string") { + return value; + } + if (isArray(value)) { + return arrayMap(value, baseToString) + ""; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ""; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY ? "-0" : result; + } + module2.exports = baseToString; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toString.js +var require_toString = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toString.js"(exports2, module2) { + var baseToString = require_baseToString(); + function toString(value) { + return value == null ? "" : baseToString(value); + } + module2.exports = toString; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castPath.js +var require_castPath = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castPath.js"(exports2, module2) { + var isArray = require_isArray2(); + var isKey = require_isKey(); + var stringToPath = require_stringToPath(); + var toString = require_toString(); + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + module2.exports = castPath; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toKey.js +var require_toKey = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toKey.js"(exports2, module2) { + var isSymbol = require_isSymbol(); + var INFINITY = 1 / 0; + function toKey(value) { + if (typeof value == "string" || isSymbol(value)) { + return value; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY ? "-0" : result; + } + module2.exports = toKey; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGet.js +var require_baseGet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGet.js"(exports2, module2) { + var castPath = require_castPath(); + var toKey = require_toKey(); + function baseGet(object, path) { + path = castPath(path, object); + var index = 0, length = path.length; + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return index && index == length ? object : void 0; + } + module2.exports = baseGet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/get.js +var require_get = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/get.js"(exports2, module2) { + var baseGet = require_baseGet(); + function get(object, path, defaultValue) { + var result = object == null ? void 0 : baseGet(object, path); + return result === void 0 ? defaultValue : result; + } + module2.exports = get; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseHasIn.js +var require_baseHasIn = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseHasIn.js"(exports2, module2) { + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + module2.exports = baseHasIn; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hasPath.js +var require_hasPath = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hasPath.js"(exports2, module2) { + var castPath = require_castPath(); + var isArguments = require_isArguments2(); + var isArray = require_isArray2(); + var isIndex = require_isIndex(); + var isLength = require_isLength(); + var toKey = require_toKey(); + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + var index = -1, length = path.length, result = false; + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); + } + module2.exports = hasPath; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/hasIn.js +var require_hasIn = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/hasIn.js"(exports2, module2) { + var baseHasIn = require_baseHasIn(); + var hasPath = require_hasPath(); + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + module2.exports = hasIn; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseMatchesProperty.js +var require_baseMatchesProperty = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseMatchesProperty.js"(exports2, module2) { + var baseIsEqual = require_baseIsEqual(); + var get = require_get(); + var hasIn = require_hasIn(); + var isKey = require_isKey(); + var isStrictComparable = require_isStrictComparable(); + var matchesStrictComparable = require_matchesStrictComparable(); + var toKey = require_toKey(); + var COMPARE_PARTIAL_FLAG = 1; + var COMPARE_UNORDERED_FLAG = 2; + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + module2.exports = baseMatchesProperty; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/identity.js +var require_identity2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/identity.js"(exports2, module2) { + function identity(value) { + return value; + } + module2.exports = identity; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseProperty.js +var require_baseProperty = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseProperty.js"(exports2, module2) { + function baseProperty(key) { + return function(object) { + return object == null ? void 0 : object[key]; + }; + } + module2.exports = baseProperty; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePropertyDeep.js +var require_basePropertyDeep = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePropertyDeep.js"(exports2, module2) { + var baseGet = require_baseGet(); + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + module2.exports = basePropertyDeep; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/property.js +var require_property = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/property.js"(exports2, module2) { + var baseProperty = require_baseProperty(); + var basePropertyDeep = require_basePropertyDeep(); + var isKey = require_isKey(); + var toKey = require_toKey(); + function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); + } + module2.exports = property; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIteratee.js +var require_baseIteratee = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIteratee.js"(exports2, module2) { + var baseMatches = require_baseMatches(); + var baseMatchesProperty = require_baseMatchesProperty(); + var identity = require_identity2(); + var isArray = require_isArray2(); + var property = require_property(); + function baseIteratee(value) { + if (typeof value == "function") { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == "object") { + return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); + } + return property(value); + } + module2.exports = baseIteratee; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/mapValues.js +var require_mapValues = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/mapValues.js"(exports2, module2) { + var baseAssignValue = require_baseAssignValue(); + var baseForOwn = require_baseForOwn(); + var baseIteratee = require_baseIteratee(); + function mapValues(object, iteratee) { + var result = {}; + iteratee = baseIteratee(iteratee, 3); + baseForOwn(object, function(value, key, object2) { + baseAssignValue(result, key, iteratee(value, key, object2)); + }); + return result; + } + module2.exports = mapValues; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isNumber.js +var require_isNumber = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isNumber.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isObjectLike = require_isObjectLike(); + var numberTag = "[object Number]"; + function isNumber(value) { + return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag; + } + module2.exports = isNumber; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isString.js +var require_isString2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isString.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isArray = require_isArray2(); + var isObjectLike = require_isObjectLike(); + var stringTag = "[object String]"; + function isString(value) { + return typeof value == "string" || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag; + } + module2.exports = isString; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/alignString.js +var require_alignString = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/alignString.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _isNumber2 = _interopRequireDefault(require_isNumber()); + var _isString2 = _interopRequireDefault(require_isString2()); + var _stringWidth = _interopRequireDefault(require_string_width()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var alignments = ["left", "right", "center"]; + var alignLeft = (subject, width) => { + return subject + " ".repeat(width); + }; + var alignRight = (subject, width) => { + return " ".repeat(width) + subject; + }; + var alignCenter = (subject, width) => { + let halfWidth; + halfWidth = width / 2; + if (width % 2 === 0) { + return " ".repeat(halfWidth) + subject + " ".repeat(halfWidth); + } else { + halfWidth = Math.floor(halfWidth); + return " ".repeat(halfWidth) + subject + " ".repeat(halfWidth + 1); + } + }; + var alignString = (subject, containerWidth, alignment) => { + if (!(0, _isString2.default)(subject)) { + throw new TypeError("Subject parameter value must be a string."); + } + if (!(0, _isNumber2.default)(containerWidth)) { + throw new TypeError("Container width parameter value must be a number."); + } + const subjectWidth = (0, _stringWidth.default)(subject); + if (subjectWidth > containerWidth) { + throw new Error("Subject parameter value width cannot be greater than the container width."); + } + if (!(0, _isString2.default)(alignment)) { + throw new TypeError("Alignment parameter value must be a string."); + } + if (!alignments.includes(alignment)) { + throw new Error("Alignment parameter value must be a known alignment parameter value (left, right, center)."); + } + if (subjectWidth === 0) { + return " ".repeat(containerWidth); + } + const availableWidth = containerWidth - subjectWidth; + if (alignment === "left") { + return alignLeft(subject, availableWidth); + } + if (alignment === "right") { + return alignRight(subject, availableWidth); + } + return alignCenter(subject, availableWidth); + }; + var _default = alignString; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/alignTableData.js +var require_alignTableData = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/alignTableData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _stringWidth = _interopRequireDefault(require_string_width()); + var _alignString = _interopRequireDefault(require_alignString()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var alignTableData = (rows, config) => { + return rows.map((cells) => { + return cells.map((value, index1) => { + const column = config.columns[index1]; + if ((0, _stringWidth.default)(value) === column.width) { + return value; + } else { + return (0, _alignString.default)(value, column.width, column.alignment); + } + }); + }); + }; + var _default = alignTableData; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseExtremum.js +var require_baseExtremum = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseExtremum.js"(exports2, module2) { + var isSymbol = require_isSymbol(); + function baseExtremum(array, iteratee, comparator) { + var index = -1, length = array.length; + while (++index < length) { + var value = array[index], current = iteratee(value); + if (current != null && (computed === void 0 ? current === current && !isSymbol(current) : comparator(current, computed))) { + var computed = current, result = value; + } + } + return result; + } + module2.exports = baseExtremum; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGt.js +var require_baseGt = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGt.js"(exports2, module2) { + function baseGt(value, other) { + return value > other; + } + module2.exports = baseGt; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/max.js +var require_max3 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/max.js"(exports2, module2) { + var baseExtremum = require_baseExtremum(); + var baseGt = require_baseGt(); + var identity = require_identity2(); + function max(array) { + return array && array.length ? baseExtremum(array, identity, baseGt) : void 0; + } + module2.exports = max; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBoolean.js +var require_isBoolean = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBoolean.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isObjectLike = require_isObjectLike(); + var boolTag = "[object Boolean]"; + function isBoolean(value) { + return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag; + } + module2.exports = isBoolean; + } +}); + +// ../../node_modules/.pnpm/astral-regex@2.0.0/node_modules/astral-regex/index.js +var require_astral_regex = __commonJS({ + "../../node_modules/.pnpm/astral-regex@2.0.0/node_modules/astral-regex/index.js"(exports2, module2) { + "use strict"; + var regex = "[\uD800-\uDBFF][\uDC00-\uDFFF]"; + var astralRegex = (options) => options && options.exact ? new RegExp(`^${regex}$`) : new RegExp(regex, "g"); + module2.exports = astralRegex; + } +}); + +// ../../node_modules/.pnpm/slice-ansi@4.0.0/node_modules/slice-ansi/index.js +var require_slice_ansi = __commonJS({ + "../../node_modules/.pnpm/slice-ansi@4.0.0/node_modules/slice-ansi/index.js"(exports2, module2) { + "use strict"; + var isFullwidthCodePoint = require_is_fullwidth_code_point(); + var astralRegex = require_astral_regex(); + var ansiStyles = require_ansi_styles2(); + var ESCAPES = [ + "", + "\x9B" + ]; + var wrapAnsi = (code) => `${ESCAPES[0]}[${code}m`; + var checkAnsi = (ansiCodes, isEscapes, endAnsiCode) => { + let output = []; + ansiCodes = [...ansiCodes]; + for (let ansiCode of ansiCodes) { + const ansiCodeOrigin = ansiCode; + if (ansiCode.includes(";")) { + ansiCode = ansiCode.split(";")[0][0] + "0"; + } + const item = ansiStyles.codes.get(Number.parseInt(ansiCode, 10)); + if (item) { + const indexEscape = ansiCodes.indexOf(item.toString()); + if (indexEscape === -1) { + output.push(wrapAnsi(isEscapes ? item : ansiCodeOrigin)); + } else { + ansiCodes.splice(indexEscape, 1); + } + } else if (isEscapes) { + output.push(wrapAnsi(0)); + break; + } else { + output.push(wrapAnsi(ansiCodeOrigin)); + } + } + if (isEscapes) { + output = output.filter((element, index) => output.indexOf(element) === index); + if (endAnsiCode !== void 0) { + const fistEscapeCode = wrapAnsi(ansiStyles.codes.get(Number.parseInt(endAnsiCode, 10))); + output = output.reduce((current, next) => next === fistEscapeCode ? [next, ...current] : [...current, next], []); + } + } + return output.join(""); + }; + module2.exports = (string, begin, end) => { + const characters = [...string]; + const ansiCodes = []; + let stringEnd = typeof end === "number" ? end : characters.length; + let isInsideEscape = false; + let ansiCode; + let visible = 0; + let output = ""; + for (const [index, character] of characters.entries()) { + let leftEscape = false; + if (ESCAPES.includes(character)) { + const code = /\d[^m]*/.exec(string.slice(index, index + 18)); + ansiCode = code && code.length > 0 ? code[0] : void 0; + if (visible < stringEnd) { + isInsideEscape = true; + if (ansiCode !== void 0) { + ansiCodes.push(ansiCode); + } + } + } else if (isInsideEscape && character === "m") { + isInsideEscape = false; + leftEscape = true; + } + if (!isInsideEscape && !leftEscape) { + visible++; + } + if (!astralRegex({ exact: true }).test(character) && isFullwidthCodePoint(character.codePointAt())) { + visible++; + if (typeof end !== "number") { + stringEnd++; + } + } + if (visible > begin && visible <= stringEnd) { + output += character; + } else if (visible === begin && !isInsideEscape && ansiCode !== void 0) { + output = checkAnsi(ansiCodes); + } else if (visible >= stringEnd) { + output += checkAnsi(ansiCodes, true, ansiCode); + break; + } + } + return output; + }; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/wrapString.js +var require_wrapString = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/wrapString.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _sliceAnsi = _interopRequireDefault(require_slice_ansi()); + var _stringWidth = _interopRequireDefault(require_string_width()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var wrapString = (subject, size) => { + let subjectSlice; + subjectSlice = subject; + const chunks = []; + do { + chunks.push((0, _sliceAnsi.default)(subjectSlice, 0, size)); + subjectSlice = (0, _sliceAnsi.default)(subjectSlice, size).trim(); + } while ((0, _stringWidth.default)(subjectSlice)); + return chunks; + }; + var _default = wrapString; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/wrapWord.js +var require_wrapWord = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/wrapWord.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _sliceAnsi = _interopRequireDefault(require_slice_ansi()); + var _stringWidth = _interopRequireDefault(require_string_width()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var wrapWord = (input, size) => { + let subject; + subject = input; + const chunks = []; + const re = new RegExp("(^.{1," + size + "}(\\s+|$))|(^.{1," + (size - 1) + "}(\\\\|/|_|\\.|,|;|-))"); + do { + let chunk; + chunk = subject.match(re); + if (chunk) { + chunk = chunk[0]; + subject = (0, _sliceAnsi.default)(subject, (0, _stringWidth.default)(chunk)); + chunk = chunk.trim(); + } else { + chunk = (0, _sliceAnsi.default)(subject, 0, size); + subject = (0, _sliceAnsi.default)(subject, size); + } + chunks.push(chunk); + } while ((0, _stringWidth.default)(subject)); + return chunks; + }; + var _default = wrapWord; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/wrapCell.js +var require_wrapCell = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/wrapCell.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _wrapString = _interopRequireDefault(require_wrapString()); + var _wrapWord = _interopRequireDefault(require_wrapWord()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var wrapCell = (cellValue, columnWidth, useWrapWord) => { + const cellLines = cellValue.split("\n"); + for (let lineNr = 0; lineNr < cellLines.length; ) { + let lineChunks; + if (useWrapWord) { + lineChunks = (0, _wrapWord.default)(cellLines[lineNr], columnWidth); + } else { + lineChunks = (0, _wrapString.default)(cellLines[lineNr], columnWidth); + } + cellLines.splice(lineNr, 1, ...lineChunks); + lineNr += lineChunks.length; + } + return cellLines; + }; + var _default = wrapCell; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/calculateCellHeight.js +var require_calculateCellHeight = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/calculateCellHeight.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _isString2 = _interopRequireDefault(require_isString2()); + var _wrapCell = _interopRequireDefault(require_wrapCell()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var calculateCellHeight = (value, columnWidth, useWrapWord = false) => { + if (!(0, _isString2.default)(value)) { + throw new TypeError("Value must be a string."); + } + if (!Number.isInteger(columnWidth)) { + throw new TypeError("Column width must be an integer."); + } + if (columnWidth < 1) { + throw new Error("Column width must be greater than 0."); + } + return (0, _wrapCell.default)(value, columnWidth, useWrapWord).length; + }; + var _default = calculateCellHeight; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/calculateRowHeightIndex.js +var require_calculateRowHeightIndex = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/calculateRowHeightIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _max2 = _interopRequireDefault(require_max3()); + var _isBoolean2 = _interopRequireDefault(require_isBoolean()); + var _isNumber2 = _interopRequireDefault(require_isNumber()); + var _calculateCellHeight = _interopRequireDefault(require_calculateCellHeight()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var calculateRowHeightIndex = (rows, config) => { + const tableWidth = rows[0].length; + const rowSpanIndex = []; + rows.forEach((cells) => { + const cellHeightIndex = new Array(tableWidth).fill(1); + cells.forEach((value, index1) => { + if (!(0, _isNumber2.default)(config.columns[index1].width)) { + throw new TypeError("column[index].width must be a number."); + } + if (!(0, _isBoolean2.default)(config.columns[index1].wrapWord)) { + throw new TypeError("column[index].wrapWord must be a boolean."); + } + cellHeightIndex[index1] = (0, _calculateCellHeight.default)(value, config.columns[index1].width, config.columns[index1].wrapWord); + }); + rowSpanIndex.push((0, _max2.default)(cellHeightIndex)); + }); + return rowSpanIndex; + }; + var _default = calculateRowHeightIndex; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/drawBorder.js +var require_drawBorder = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/drawBorder.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.drawBorderTop = exports2.drawBorderJoin = exports2.drawBorderBottom = exports2.drawBorder = void 0; + var drawBorder = (columnSizeIndex, parts) => { + const columns = columnSizeIndex.map((size) => { + return parts.body.repeat(size); + }).join(parts.join); + return parts.left + columns + parts.right + "\n"; + }; + exports2.drawBorder = drawBorder; + var drawBorderTop = (columnSizeIndex, parts) => { + const border = drawBorder(columnSizeIndex, { + body: parts.topBody, + join: parts.topJoin, + left: parts.topLeft, + right: parts.topRight + }); + if (border === "\n") { + return ""; + } + return border; + }; + exports2.drawBorderTop = drawBorderTop; + var drawBorderJoin = (columnSizeIndex, parts) => { + return drawBorder(columnSizeIndex, { + body: parts.joinBody, + join: parts.joinJoin, + left: parts.joinLeft, + right: parts.joinRight + }); + }; + exports2.drawBorderJoin = drawBorderJoin; + var drawBorderBottom = (columnSizeIndex, parts) => { + return drawBorder(columnSizeIndex, { + body: parts.bottomBody, + join: parts.bottomJoin, + left: parts.bottomLeft, + right: parts.bottomRight + }); + }; + exports2.drawBorderBottom = drawBorderBottom; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/drawRow.js +var require_drawRow = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/drawRow.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var drawRow = (columns, border) => { + return border.bodyLeft + columns.join(border.bodyJoin) + border.bodyRight + "\n"; + }; + var _default = drawRow; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayEach.js +var require_arrayEach = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayEach.js"(exports2, module2) { + function arrayEach(array, iteratee) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + module2.exports = arrayEach; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assignValue.js +var require_assignValue = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assignValue.js"(exports2, module2) { + var baseAssignValue = require_baseAssignValue(); + var eq = require_eq2(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) { + baseAssignValue(object, key, value); + } + } + module2.exports = assignValue; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copyObject.js +var require_copyObject = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copyObject.js"(exports2, module2) { + var assignValue = require_assignValue(); + var baseAssignValue = require_baseAssignValue(); + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + var index = -1, length = props.length; + while (++index < length) { + var key = props[index]; + var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0; + if (newValue === void 0) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + module2.exports = copyObject; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssign.js +var require_baseAssign = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssign.js"(exports2, module2) { + var copyObject = require_copyObject(); + var keys = require_keys2(); + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + module2.exports = baseAssign; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeKeysIn.js +var require_nativeKeysIn = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeKeysIn.js"(exports2, module2) { + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + module2.exports = nativeKeysIn; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeysIn.js +var require_baseKeysIn = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeysIn.js"(exports2, module2) { + var isObject = require_isObject2(); + var isPrototype = require_isPrototype(); + var nativeKeysIn = require_nativeKeysIn(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), result = []; + for (var key in object) { + if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + module2.exports = baseKeysIn; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keysIn.js +var require_keysIn = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keysIn.js"(exports2, module2) { + var arrayLikeKeys = require_arrayLikeKeys(); + var baseKeysIn = require_baseKeysIn(); + var isArrayLike = require_isArrayLike3(); + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + module2.exports = keysIn; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignIn.js +var require_baseAssignIn = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignIn.js"(exports2, module2) { + var copyObject = require_copyObject(); + var keysIn = require_keysIn(); + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + module2.exports = baseAssignIn; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneBuffer.js +var require_cloneBuffer = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneBuffer.js"(exports2, module2) { + var root = require_root(); + var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2; + var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2; + var moduleExports = freeModule && freeModule.exports === freeExports; + var Buffer2 = moduleExports ? root.Buffer : void 0; + var allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0; + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + buffer.copy(result); + return result; + } + module2.exports = cloneBuffer; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copyArray.js +var require_copyArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copyArray.js"(exports2, module2) { + function copyArray(source, array) { + var index = -1, length = source.length; + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + module2.exports = copyArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copySymbols.js +var require_copySymbols = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copySymbols.js"(exports2, module2) { + var copyObject = require_copyObject(); + var getSymbols = require_getSymbols(); + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + module2.exports = copySymbols; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getPrototype.js +var require_getPrototype = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getPrototype.js"(exports2, module2) { + var overArg = require_overArg(); + var getPrototype = overArg(Object.getPrototypeOf, Object); + module2.exports = getPrototype; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getSymbolsIn.js +var require_getSymbolsIn = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getSymbolsIn.js"(exports2, module2) { + var arrayPush = require_arrayPush(); + var getPrototype = require_getPrototype(); + var getSymbols = require_getSymbols(); + var stubArray = require_stubArray(); + var nativeGetSymbols = Object.getOwnPropertySymbols; + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; + module2.exports = getSymbolsIn; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copySymbolsIn.js +var require_copySymbolsIn = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copySymbolsIn.js"(exports2, module2) { + var copyObject = require_copyObject(); + var getSymbolsIn = require_getSymbolsIn(); + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + module2.exports = copySymbolsIn; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getAllKeysIn.js +var require_getAllKeysIn = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getAllKeysIn.js"(exports2, module2) { + var baseGetAllKeys = require_baseGetAllKeys(); + var getSymbolsIn = require_getSymbolsIn(); + var keysIn = require_keysIn(); + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + module2.exports = getAllKeysIn; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_initCloneArray.js +var require_initCloneArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_initCloneArray.js"(exports2, module2) { + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function initCloneArray(array) { + var length = array.length, result = new array.constructor(length); + if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) { + result.index = array.index; + result.input = array.input; + } + return result; + } + module2.exports = initCloneArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneArrayBuffer.js +var require_cloneArrayBuffer = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneArrayBuffer.js"(exports2, module2) { + var Uint8Array2 = require_Uint8Array(); + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array2(result).set(new Uint8Array2(arrayBuffer)); + return result; + } + module2.exports = cloneArrayBuffer; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneDataView.js +var require_cloneDataView = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneDataView.js"(exports2, module2) { + var cloneArrayBuffer = require_cloneArrayBuffer(); + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + module2.exports = cloneDataView; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneRegExp.js +var require_cloneRegExp = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneRegExp.js"(exports2, module2) { + var reFlags = /\w*$/; + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + module2.exports = cloneRegExp; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneSymbol.js +var require_cloneSymbol = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneSymbol.js"(exports2, module2) { + var Symbol2 = require_Symbol(); + var symbolProto = Symbol2 ? Symbol2.prototype : void 0; + var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0; + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + module2.exports = cloneSymbol; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneTypedArray.js +var require_cloneTypedArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneTypedArray.js"(exports2, module2) { + var cloneArrayBuffer = require_cloneArrayBuffer(); + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + module2.exports = cloneTypedArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_initCloneByTag.js +var require_initCloneByTag = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_initCloneByTag.js"(exports2, module2) { + var cloneArrayBuffer = require_cloneArrayBuffer(); + var cloneDataView = require_cloneDataView(); + var cloneRegExp = require_cloneRegExp(); + var cloneSymbol = require_cloneSymbol(); + var cloneTypedArray = require_cloneTypedArray(); + var boolTag = "[object Boolean]"; + var dateTag = "[object Date]"; + var mapTag = "[object Map]"; + var numberTag = "[object Number]"; + var regexpTag = "[object RegExp]"; + var setTag = "[object Set]"; + var stringTag = "[object String]"; + var symbolTag = "[object Symbol]"; + var arrayBufferTag = "[object ArrayBuffer]"; + var dataViewTag = "[object DataView]"; + var float32Tag = "[object Float32Array]"; + var float64Tag = "[object Float64Array]"; + var int8Tag = "[object Int8Array]"; + var int16Tag = "[object Int16Array]"; + var int32Tag = "[object Int32Array]"; + var uint8Tag = "[object Uint8Array]"; + var uint8ClampedTag = "[object Uint8ClampedArray]"; + var uint16Tag = "[object Uint16Array]"; + var uint32Tag = "[object Uint32Array]"; + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + case boolTag: + case dateTag: + return new Ctor(+object); + case dataViewTag: + return cloneDataView(object, isDeep); + case float32Tag: + case float64Tag: + case int8Tag: + case int16Tag: + case int32Tag: + case uint8Tag: + case uint8ClampedTag: + case uint16Tag: + case uint32Tag: + return cloneTypedArray(object, isDeep); + case mapTag: + return new Ctor(); + case numberTag: + case stringTag: + return new Ctor(object); + case regexpTag: + return cloneRegExp(object); + case setTag: + return new Ctor(); + case symbolTag: + return cloneSymbol(object); + } + } + module2.exports = initCloneByTag; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseCreate.js +var require_baseCreate = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseCreate.js"(exports2, module2) { + var isObject = require_isObject2(); + var objectCreate = Object.create; + var baseCreate = function() { + function object() { + } + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object(); + object.prototype = void 0; + return result; + }; + }(); + module2.exports = baseCreate; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_initCloneObject.js +var require_initCloneObject = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_initCloneObject.js"(exports2, module2) { + var baseCreate = require_baseCreate(); + var getPrototype = require_getPrototype(); + var isPrototype = require_isPrototype(); + function initCloneObject(object) { + return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {}; + } + module2.exports = initCloneObject; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsMap.js +var require_baseIsMap = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsMap.js"(exports2, module2) { + var getTag = require_getTag(); + var isObjectLike = require_isObjectLike(); + var mapTag = "[object Map]"; + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + module2.exports = baseIsMap; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isMap.js +var require_isMap = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isMap.js"(exports2, module2) { + var baseIsMap = require_baseIsMap(); + var baseUnary = require_baseUnary(); + var nodeUtil = require_nodeUtil(); + var nodeIsMap = nodeUtil && nodeUtil.isMap; + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + module2.exports = isMap; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsSet.js +var require_baseIsSet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsSet.js"(exports2, module2) { + var getTag = require_getTag(); + var isObjectLike = require_isObjectLike(); + var setTag = "[object Set]"; + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + module2.exports = baseIsSet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSet.js +var require_isSet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSet.js"(exports2, module2) { + var baseIsSet = require_baseIsSet(); + var baseUnary = require_baseUnary(); + var nodeUtil = require_nodeUtil(); + var nodeIsSet = nodeUtil && nodeUtil.isSet; + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + module2.exports = isSet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseClone.js +var require_baseClone = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseClone.js"(exports2, module2) { + var Stack = require_Stack(); + var arrayEach = require_arrayEach(); + var assignValue = require_assignValue(); + var baseAssign = require_baseAssign(); + var baseAssignIn = require_baseAssignIn(); + var cloneBuffer = require_cloneBuffer(); + var copyArray = require_copyArray(); + var copySymbols = require_copySymbols(); + var copySymbolsIn = require_copySymbolsIn(); + var getAllKeys = require_getAllKeys(); + var getAllKeysIn = require_getAllKeysIn(); + var getTag = require_getTag(); + var initCloneArray = require_initCloneArray(); + var initCloneByTag = require_initCloneByTag(); + var initCloneObject = require_initCloneObject(); + var isArray = require_isArray2(); + var isBuffer = require_isBuffer(); + var isMap = require_isMap(); + var isObject = require_isObject2(); + var isSet = require_isSet(); + var keys = require_keys2(); + var keysIn = require_keysIn(); + var CLONE_DEEP_FLAG = 1; + var CLONE_FLAT_FLAG = 2; + var CLONE_SYMBOLS_FLAG = 4; + var argsTag = "[object Arguments]"; + var arrayTag = "[object Array]"; + var boolTag = "[object Boolean]"; + var dateTag = "[object Date]"; + var errorTag = "[object Error]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var mapTag = "[object Map]"; + var numberTag = "[object Number]"; + var objectTag = "[object Object]"; + var regexpTag = "[object RegExp]"; + var setTag = "[object Set]"; + var stringTag = "[object String]"; + var symbolTag = "[object Symbol]"; + var weakMapTag = "[object WeakMap]"; + var arrayBufferTag = "[object ArrayBuffer]"; + var dataViewTag = "[object DataView]"; + var float32Tag = "[object Float32Array]"; + var float64Tag = "[object Float64Array]"; + var int8Tag = "[object Int8Array]"; + var int16Tag = "[object Int16Array]"; + var int32Tag = "[object Int32Array]"; + var uint8Tag = "[object Uint8Array]"; + var uint8ClampedTag = "[object Uint8ClampedArray]"; + var uint16Tag = "[object Uint16Array]"; + var uint32Tag = "[object Uint32Array]"; + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; + function baseClone(value, bitmask, customizer, key, object, stack2) { + var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG; + if (customizer) { + result = object ? customizer(value, key, object, stack2) : customizer(value); + } + if (result !== void 0) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || isFunc && !object) { + result = isFlat || isFunc ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + stack2 || (stack2 = new Stack()); + var stacked = stack2.get(value); + if (stacked) { + return stacked; + } + stack2.set(value, result); + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack2)); + }); + } else if (isMap(value)) { + value.forEach(function(subValue, key2) { + result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack2)); + }); + } + var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys; + var props = isArr ? void 0 : keysFunc(value); + arrayEach(props || value, function(subValue, key2) { + if (props) { + key2 = subValue; + subValue = value[key2]; + } + assignValue(result, key2, baseClone(subValue, bitmask, customizer, key2, value, stack2)); + }); + return result; + } + module2.exports = baseClone; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/cloneDeep.js +var require_cloneDeep = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/cloneDeep.js"(exports2, module2) { + var baseClone = require_baseClone(); + var CLONE_DEEP_FLAG = 1; + var CLONE_SYMBOLS_FLAG = 4; + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + module2.exports = cloneDeep; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isUndefined.js +var require_isUndefined = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isUndefined.js"(exports2, module2) { + function isUndefined(value) { + return value === void 0; + } + module2.exports = isUndefined; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castFunction.js +var require_castFunction = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castFunction.js"(exports2, module2) { + var identity = require_identity2(); + function castFunction(value) { + return typeof value == "function" ? value : identity; + } + module2.exports = castFunction; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.js +var require_trimmedEndIndex = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.js"(exports2, module2) { + var reWhitespace = /\s/; + function trimmedEndIndex(string) { + var index = string.length; + while (index-- && reWhitespace.test(string.charAt(index))) { + } + return index; + } + module2.exports = trimmedEndIndex; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTrim.js +var require_baseTrim = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTrim.js"(exports2, module2) { + var trimmedEndIndex = require_trimmedEndIndex(); + var reTrimStart = /^\s+/; + function baseTrim(string) { + return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string; + } + module2.exports = baseTrim; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toNumber.js +var require_toNumber = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toNumber.js"(exports2, module2) { + var baseTrim = require_baseTrim(); + var isObject = require_isObject2(); + var isSymbol = require_isSymbol(); + var NAN = 0 / 0; + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + var reIsBinary = /^0b[01]+$/i; + var reIsOctal = /^0o[0-7]+$/i; + var freeParseInt = parseInt; + function toNumber(value) { + if (typeof value == "number") { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == "function" ? value.valueOf() : value; + value = isObject(other) ? other + "" : other; + } + if (typeof value != "string") { + return value === 0 ? value : +value; + } + value = baseTrim(value); + var isBinary = reIsBinary.test(value); + return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; + } + module2.exports = toNumber; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toFinite.js +var require_toFinite = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toFinite.js"(exports2, module2) { + var toNumber = require_toNumber(); + var INFINITY = 1 / 0; + var MAX_INTEGER = 17976931348623157e292; + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = value < 0 ? -1 : 1; + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + module2.exports = toFinite; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toInteger.js +var require_toInteger = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toInteger.js"(exports2, module2) { + var toFinite = require_toFinite(); + function toInteger(value) { + var result = toFinite(value), remainder = result % 1; + return result === result ? remainder ? result - remainder : result : 0; + } + module2.exports = toInteger; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/times.js +var require_times2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/times.js"(exports2, module2) { + var baseTimes = require_baseTimes(); + var castFunction = require_castFunction(); + var toInteger = require_toInteger(); + var MAX_SAFE_INTEGER = 9007199254740991; + var MAX_ARRAY_LENGTH = 4294967295; + var nativeMin = Math.min; + function times(n, iteratee) { + n = toInteger(n); + if (n < 1 || n > MAX_SAFE_INTEGER) { + return []; + } + var index = MAX_ARRAY_LENGTH, length = nativeMin(n, MAX_ARRAY_LENGTH); + iteratee = castFunction(iteratee); + n -= MAX_ARRAY_LENGTH; + var result = baseTimes(length, iteratee); + while (++index < n) { + iteratee(index); + } + return result; + } + module2.exports = times; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/getBorderCharacters.js +var require_getBorderCharacters = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/getBorderCharacters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var getBorderCharacters = (name) => { + if (name === "honeywell") { + return { + topBody: "\u2550", + topJoin: "\u2564", + topLeft: "\u2554", + topRight: "\u2557", + bottomBody: "\u2550", + bottomJoin: "\u2567", + bottomLeft: "\u255A", + bottomRight: "\u255D", + bodyLeft: "\u2551", + bodyRight: "\u2551", + bodyJoin: "\u2502", + joinBody: "\u2500", + joinLeft: "\u255F", + joinRight: "\u2562", + joinJoin: "\u253C" + }; + } + if (name === "norc") { + return { + topBody: "\u2500", + topJoin: "\u252C", + topLeft: "\u250C", + topRight: "\u2510", + bottomBody: "\u2500", + bottomJoin: "\u2534", + bottomLeft: "\u2514", + bottomRight: "\u2518", + bodyLeft: "\u2502", + bodyRight: "\u2502", + bodyJoin: "\u2502", + joinBody: "\u2500", + joinLeft: "\u251C", + joinRight: "\u2524", + joinJoin: "\u253C" + }; + } + if (name === "ramac") { + return { + topBody: "-", + topJoin: "+", + topLeft: "+", + topRight: "+", + bottomBody: "-", + bottomJoin: "+", + bottomLeft: "+", + bottomRight: "+", + bodyLeft: "|", + bodyRight: "|", + bodyJoin: "|", + joinBody: "-", + joinLeft: "|", + joinRight: "|", + joinJoin: "|" + }; + } + if (name === "void") { + return { + topBody: "", + topJoin: "", + topLeft: "", + topRight: "", + bottomBody: "", + bottomJoin: "", + bottomLeft: "", + bottomRight: "", + bodyLeft: "", + bodyRight: "", + bodyJoin: "", + joinBody: "", + joinLeft: "", + joinRight: "", + joinJoin: "" + }; + } + throw new Error('Unknown border template "' + name + '".'); + }; + var _default = getBorderCharacters; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/equal.js +var require_equal = __commonJS({ + "../../node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/equal.js"(exports2, module2) { + "use strict"; + module2.exports = require_fast_deep_equal(); + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/validateConfig.js +var require_validateConfig = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/validateConfig.js"(exports2, module2) { + "use strict"; + var equal = require_equal(); + var validate = function() { + var pattern0 = new RegExp("^[0-9]+$"); + var refVal = []; + var refVal1 = function() { + var pattern02 = new RegExp("^[0-9]+$"); + return function validate2(data, dataPath, parentData, parentDataProperty, rootData) { + "use strict"; + var vErrors = null; + var errors = 0; + if (rootData === void 0) + rootData = data; + if (data && typeof data === "object" && !Array.isArray(data)) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !validate2.schema.properties.hasOwnProperty(key0); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: "additionalProperties", + dataPath: (dataPath || "") + "", + schemaPath: "#/additionalProperties", + params: { + additionalProperty: "" + key0 + "" + }, + message: "should NOT have additional properties" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + } + if (data.topBody !== void 0) { + var errs_1 = errors; + if (!refVal2(data.topBody, (dataPath || "") + ".topBody", data, "topBody", rootData)) { + if (vErrors === null) + vErrors = refVal2.errors; + else + vErrors = vErrors.concat(refVal2.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topJoin !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.topJoin, (dataPath || "") + ".topJoin", data, "topJoin", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topLeft !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.topLeft, (dataPath || "") + ".topLeft", data, "topLeft", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topRight !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.topRight, (dataPath || "") + ".topRight", data, "topRight", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomBody !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bottomBody, (dataPath || "") + ".bottomBody", data, "bottomBody", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomJoin !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bottomJoin, (dataPath || "") + ".bottomJoin", data, "bottomJoin", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomLeft !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bottomLeft, (dataPath || "") + ".bottomLeft", data, "bottomLeft", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomRight !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bottomRight, (dataPath || "") + ".bottomRight", data, "bottomRight", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyLeft !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bodyLeft, (dataPath || "") + ".bodyLeft", data, "bodyLeft", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyRight !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bodyRight, (dataPath || "") + ".bodyRight", data, "bodyRight", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyJoin !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bodyJoin, (dataPath || "") + ".bodyJoin", data, "bodyJoin", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinBody !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.joinBody, (dataPath || "") + ".joinBody", data, "joinBody", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinLeft !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.joinLeft, (dataPath || "") + ".joinLeft", data, "joinLeft", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinRight !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.joinRight, (dataPath || "") + ".joinRight", data, "joinRight", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinJoin !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.joinJoin, (dataPath || "") + ".joinJoin", data, "joinJoin", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: "type", + dataPath: (dataPath || "") + "", + schemaPath: "#/type", + params: { + type: "object" + }, + message: "should be object" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + validate2.errors = vErrors; + return errors === 0; + }; + }(); + refVal1.schema = { + "type": "object", + "properties": { + "topBody": { + "$ref": "#/definitions/border" + }, + "topJoin": { + "$ref": "#/definitions/border" + }, + "topLeft": { + "$ref": "#/definitions/border" + }, + "topRight": { + "$ref": "#/definitions/border" + }, + "bottomBody": { + "$ref": "#/definitions/border" + }, + "bottomJoin": { + "$ref": "#/definitions/border" + }, + "bottomLeft": { + "$ref": "#/definitions/border" + }, + "bottomRight": { + "$ref": "#/definitions/border" + }, + "bodyLeft": { + "$ref": "#/definitions/border" + }, + "bodyRight": { + "$ref": "#/definitions/border" + }, + "bodyJoin": { + "$ref": "#/definitions/border" + }, + "joinBody": { + "$ref": "#/definitions/border" + }, + "joinLeft": { + "$ref": "#/definitions/border" + }, + "joinRight": { + "$ref": "#/definitions/border" + }, + "joinJoin": { + "$ref": "#/definitions/border" + } + }, + "additionalProperties": false + }; + refVal1.errors = null; + refVal[1] = refVal1; + var refVal2 = function() { + var pattern02 = new RegExp("^[0-9]+$"); + return function validate2(data, dataPath, parentData, parentDataProperty, rootData) { + "use strict"; + var vErrors = null; + var errors = 0; + if (rootData === void 0) + rootData = data; + if (typeof data !== "string") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + "", + schemaPath: "#/type", + params: { + type: "string" + }, + message: "should be string" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + validate2.errors = vErrors; + return errors === 0; + }; + }(); + refVal2.schema = { + "type": "string" + }; + refVal2.errors = null; + refVal[2] = refVal2; + var refVal3 = function() { + var pattern02 = new RegExp("^[0-9]+$"); + return function validate2(data, dataPath, parentData, parentDataProperty, rootData) { + "use strict"; + var vErrors = null; + var errors = 0; + if (rootData === void 0) + rootData = data; + if (data && typeof data === "object" && !Array.isArray(data)) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !pattern02.test(key0); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: "additionalProperties", + dataPath: (dataPath || "") + "", + schemaPath: "#/additionalProperties", + params: { + additionalProperty: "" + key0 + "" + }, + message: "should NOT have additional properties" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + } + for (var key0 in data) { + if (pattern02.test(key0)) { + var errs_1 = errors; + if (!refVal4(data[key0], (dataPath || "") + "['" + key0 + "']", data, key0, rootData)) { + if (vErrors === null) + vErrors = refVal4.errors; + else + vErrors = vErrors.concat(refVal4.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + } + } else { + var err = { + keyword: "type", + dataPath: (dataPath || "") + "", + schemaPath: "#/type", + params: { + type: "object" + }, + message: "should be object" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + validate2.errors = vErrors; + return errors === 0; + }; + }(); + refVal3.schema = { + "type": "object", + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/column" + } + }, + "additionalProperties": false + }; + refVal3.errors = null; + refVal[3] = refVal3; + var refVal4 = function() { + var pattern02 = new RegExp("^[0-9]+$"); + return function validate2(data, dataPath, parentData, parentDataProperty, rootData) { + "use strict"; + var vErrors = null; + var errors = 0; + if (rootData === void 0) + rootData = data; + if (data && typeof data === "object" && !Array.isArray(data)) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(key0 == "alignment" || key0 == "width" || key0 == "wrapWord" || key0 == "truncate" || key0 == "paddingLeft" || key0 == "paddingRight"); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: "additionalProperties", + dataPath: (dataPath || "") + "", + schemaPath: "#/additionalProperties", + params: { + additionalProperty: "" + key0 + "" + }, + message: "should NOT have additional properties" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + } + var data1 = data.alignment; + if (data1 !== void 0) { + var errs_1 = errors; + if (typeof data1 !== "string") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".alignment", + schemaPath: "#/properties/alignment/type", + params: { + type: "string" + }, + message: "should be string" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var schema1 = validate2.schema.properties.alignment.enum; + var valid1; + valid1 = false; + for (var i1 = 0; i1 < schema1.length; i1++) + if (equal(data1, schema1[i1])) { + valid1 = true; + break; + } + if (!valid1) { + var err = { + keyword: "enum", + dataPath: (dataPath || "") + ".alignment", + schemaPath: "#/properties/alignment/enum", + params: { + allowedValues: schema1 + }, + message: "should be equal to one of the allowed values" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.width !== void 0) { + var errs_1 = errors; + if (typeof data.width !== "number") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".width", + schemaPath: "#/properties/width/type", + params: { + type: "number" + }, + message: "should be number" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.wrapWord !== void 0) { + var errs_1 = errors; + if (typeof data.wrapWord !== "boolean") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".wrapWord", + schemaPath: "#/properties/wrapWord/type", + params: { + type: "boolean" + }, + message: "should be boolean" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.truncate !== void 0) { + var errs_1 = errors; + if (typeof data.truncate !== "number") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".truncate", + schemaPath: "#/properties/truncate/type", + params: { + type: "number" + }, + message: "should be number" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.paddingLeft !== void 0) { + var errs_1 = errors; + if (typeof data.paddingLeft !== "number") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".paddingLeft", + schemaPath: "#/properties/paddingLeft/type", + params: { + type: "number" + }, + message: "should be number" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.paddingRight !== void 0) { + var errs_1 = errors; + if (typeof data.paddingRight !== "number") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".paddingRight", + schemaPath: "#/properties/paddingRight/type", + params: { + type: "number" + }, + message: "should be number" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: "type", + dataPath: (dataPath || "") + "", + schemaPath: "#/type", + params: { + type: "object" + }, + message: "should be object" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + validate2.errors = vErrors; + return errors === 0; + }; + }(); + refVal4.schema = { + "type": "object", + "properties": { + "alignment": { + "type": "string", + "enum": ["left", "right", "center"] + }, + "width": { + "type": "number" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "number" + }, + "paddingLeft": { + "type": "number" + }, + "paddingRight": { + "type": "number" + } + }, + "additionalProperties": false + }; + refVal4.errors = null; + refVal[4] = refVal4; + return function validate2(data, dataPath, parentData, parentDataProperty, rootData) { + "use strict"; + var vErrors = null; + var errors = 0; + if (rootData === void 0) + rootData = data; + if (data && typeof data === "object" && !Array.isArray(data)) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(key0 == "border" || key0 == "columns" || key0 == "columnDefault" || key0 == "drawHorizontalLine"); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: "additionalProperties", + dataPath: (dataPath || "") + "", + schemaPath: "#/additionalProperties", + params: { + additionalProperty: "" + key0 + "" + }, + message: "should NOT have additional properties" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + } + if (data.border !== void 0) { + var errs_1 = errors; + if (!refVal1(data.border, (dataPath || "") + ".border", data, "border", rootData)) { + if (vErrors === null) + vErrors = refVal1.errors; + else + vErrors = vErrors.concat(refVal1.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.columns !== void 0) { + var errs_1 = errors; + if (!refVal3(data.columns, (dataPath || "") + ".columns", data, "columns", rootData)) { + if (vErrors === null) + vErrors = refVal3.errors; + else + vErrors = vErrors.concat(refVal3.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.columnDefault !== void 0) { + var errs_1 = errors; + if (!refVal[4](data.columnDefault, (dataPath || "") + ".columnDefault", data, "columnDefault", rootData)) { + if (vErrors === null) + vErrors = refVal[4].errors; + else + vErrors = vErrors.concat(refVal[4].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.drawHorizontalLine !== void 0) { + var errs_1 = errors; + var errs__1 = errors; + var valid1; + valid1 = typeof data.drawHorizontalLine == "function"; + if (!valid1) { + if (errs__1 == errors) { + var err = { + keyword: "typeof", + dataPath: (dataPath || "") + ".drawHorizontalLine", + schemaPath: "#/properties/drawHorizontalLine/typeof", + params: { + keyword: "typeof" + }, + message: 'should pass "typeof" keyword validation' + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } else { + for (var i1 = errs__1; i1 < errors; i1++) { + var ruleErr1 = vErrors[i1]; + if (ruleErr1.dataPath === void 0) + ruleErr1.dataPath = (dataPath || "") + ".drawHorizontalLine"; + if (ruleErr1.schemaPath === void 0) { + ruleErr1.schemaPath = "#/properties/drawHorizontalLine/typeof"; + } + } + } + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: "type", + dataPath: (dataPath || "") + "", + schemaPath: "#/type", + params: { + type: "object" + }, + message: "should be object" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + validate2.errors = vErrors; + return errors === 0; + }; + }(); + validate.schema = { + "$id": "config.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "border": { + "$ref": "#/definitions/borders" + }, + "columns": { + "$ref": "#/definitions/columns" + }, + "columnDefault": { + "$ref": "#/definitions/column" + }, + "drawHorizontalLine": { + "typeof": "function" + } + }, + "additionalProperties": false, + "definitions": { + "columns": { + "type": "object", + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/column" + } + }, + "additionalProperties": false + }, + "column": { + "type": "object", + "properties": { + "alignment": { + "type": "string", + "enum": ["left", "right", "center"] + }, + "width": { + "type": "number" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "number" + }, + "paddingLeft": { + "type": "number" + }, + "paddingRight": { + "type": "number" + } + }, + "additionalProperties": false + }, + "borders": { + "type": "object", + "properties": { + "topBody": { + "$ref": "#/definitions/border" + }, + "topJoin": { + "$ref": "#/definitions/border" + }, + "topLeft": { + "$ref": "#/definitions/border" + }, + "topRight": { + "$ref": "#/definitions/border" + }, + "bottomBody": { + "$ref": "#/definitions/border" + }, + "bottomJoin": { + "$ref": "#/definitions/border" + }, + "bottomLeft": { + "$ref": "#/definitions/border" + }, + "bottomRight": { + "$ref": "#/definitions/border" + }, + "bodyLeft": { + "$ref": "#/definitions/border" + }, + "bodyRight": { + "$ref": "#/definitions/border" + }, + "bodyJoin": { + "$ref": "#/definitions/border" + }, + "joinBody": { + "$ref": "#/definitions/border" + }, + "joinLeft": { + "$ref": "#/definitions/border" + }, + "joinRight": { + "$ref": "#/definitions/border" + }, + "joinJoin": { + "$ref": "#/definitions/border" + } + }, + "additionalProperties": false + }, + "border": { + "type": "string" + } + } + }; + validate.errors = null; + module2.exports = validate; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/makeStreamConfig.js +var require_makeStreamConfig = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/makeStreamConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _cloneDeep2 = _interopRequireDefault(require_cloneDeep()); + var _isUndefined2 = _interopRequireDefault(require_isUndefined()); + var _times2 = _interopRequireDefault(require_times2()); + var _getBorderCharacters = _interopRequireDefault(require_getBorderCharacters()); + var _validateConfig = _interopRequireDefault(require_validateConfig()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var makeBorder = (border = {}) => { + return Object.assign({}, (0, _getBorderCharacters.default)("honeywell"), border); + }; + var makeColumns = (columnCount, columns = {}, columnDefault = {}) => { + (0, _times2.default)(columnCount, (index) => { + if ((0, _isUndefined2.default)(columns[index])) { + columns[index] = {}; + } + columns[index] = Object.assign({ + alignment: "left", + paddingLeft: 1, + paddingRight: 1, + truncate: Infinity, + wrapWord: false + }, columnDefault, columns[index]); + }); + return columns; + }; + var makeStreamConfig = (userConfig = {}) => { + (0, _validateConfig.default)("streamConfig.json", userConfig); + const config = (0, _cloneDeep2.default)(userConfig); + if (!config.columnDefault || !config.columnDefault.width) { + throw new Error("Must provide config.columnDefault.width when creating a stream."); + } + if (!config.columnCount) { + throw new Error("Must provide config.columnCount."); + } + config.border = makeBorder(config.border); + config.columns = makeColumns(config.columnCount, config.columns, config.columnDefault); + return config; + }; + var _default = makeStreamConfig; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isFlattenable.js +var require_isFlattenable = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isFlattenable.js"(exports2, module2) { + var Symbol2 = require_Symbol(); + var isArguments = require_isArguments2(); + var isArray = require_isArray2(); + var spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : void 0; + function isFlattenable(value) { + return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); + } + module2.exports = isFlattenable; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js +var require_baseFlatten = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js"(exports2, module2) { + var arrayPush = require_arrayPush(); + var isFlattenable = require_isFlattenable(); + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, length = array.length; + predicate || (predicate = isFlattenable); + result || (result = []); + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + module2.exports = baseFlatten; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/flatten.js +var require_flatten = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/flatten.js"(exports2, module2) { + var baseFlatten = require_baseFlatten(); + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + module2.exports = flatten; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/mapDataUsingRowHeightIndex.js +var require_mapDataUsingRowHeightIndex = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/mapDataUsingRowHeightIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _flatten2 = _interopRequireDefault(require_flatten()); + var _times2 = _interopRequireDefault(require_times2()); + var _wrapCell = _interopRequireDefault(require_wrapCell()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var mapDataUsingRowHeightIndex = (unmappedRows, rowHeightIndex, config) => { + const tableWidth = unmappedRows[0].length; + const mappedRows = unmappedRows.map((cells, index0) => { + const rowHeight = (0, _times2.default)(rowHeightIndex[index0], () => { + return new Array(tableWidth).fill(""); + }); + cells.forEach((value, index1) => { + const cellLines = (0, _wrapCell.default)(value, config.columns[index1].width, config.columns[index1].wrapWord); + cellLines.forEach((cellLine, index2) => { + rowHeight[index2][index1] = cellLine; + }); + }); + return rowHeight; + }); + return (0, _flatten2.default)(mappedRows); + }; + var _default = mapDataUsingRowHeightIndex; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/padTableData.js +var require_padTableData = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/padTableData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var padTableData = (rows, config) => { + return rows.map((cells) => { + return cells.map((value, index1) => { + const column = config.columns[index1]; + return " ".repeat(column.paddingLeft) + value + " ".repeat(column.paddingRight); + }); + }); + }; + var _default = padTableData; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/stringifyTableData.js +var require_stringifyTableData = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/stringifyTableData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var stringifyTableData = (rows) => { + return rows.map((cells) => { + return cells.map(String); + }); + }; + var _default = stringifyTableData; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSlice.js +var require_baseSlice = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSlice.js"(exports2, module2) { + function baseSlice(array, start, end) { + var index = -1, length = array.length; + if (start < 0) { + start = -start > length ? 0 : length + start; + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : end - start >>> 0; + start >>>= 0; + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + module2.exports = baseSlice; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castSlice.js +var require_castSlice = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castSlice.js"(exports2, module2) { + var baseSlice = require_baseSlice(); + function castSlice(array, start, end) { + var length = array.length; + end = end === void 0 ? length : end; + return !start && end >= length ? array : baseSlice(array, start, end); + } + module2.exports = castSlice; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hasUnicode.js +var require_hasUnicode = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hasUnicode.js"(exports2, module2) { + var rsAstralRange = "\\ud800-\\udfff"; + var rsComboMarksRange = "\\u0300-\\u036f"; + var reComboHalfMarksRange = "\\ufe20-\\ufe2f"; + var rsComboSymbolsRange = "\\u20d0-\\u20ff"; + var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; + var rsVarRange = "\\ufe0e\\ufe0f"; + var rsZWJ = "\\u200d"; + var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]"); + function hasUnicode(string) { + return reHasUnicode.test(string); + } + module2.exports = hasUnicode; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsRegExp.js +var require_baseIsRegExp = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsRegExp.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isObjectLike = require_isObjectLike(); + var regexpTag = "[object RegExp]"; + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + module2.exports = baseIsRegExp; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isRegExp.js +var require_isRegExp = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isRegExp.js"(exports2, module2) { + var baseIsRegExp = require_baseIsRegExp(); + var baseUnary = require_baseUnary(); + var nodeUtil = require_nodeUtil(); + var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp; + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + module2.exports = isRegExp; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_asciiSize.js +var require_asciiSize = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_asciiSize.js"(exports2, module2) { + var baseProperty = require_baseProperty(); + var asciiSize = baseProperty("length"); + module2.exports = asciiSize; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_unicodeSize.js +var require_unicodeSize = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_unicodeSize.js"(exports2, module2) { + var rsAstralRange = "\\ud800-\\udfff"; + var rsComboMarksRange = "\\u0300-\\u036f"; + var reComboHalfMarksRange = "\\ufe20-\\ufe2f"; + var rsComboSymbolsRange = "\\u20d0-\\u20ff"; + var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; + var rsVarRange = "\\ufe0e\\ufe0f"; + var rsAstral = "[" + rsAstralRange + "]"; + var rsCombo = "[" + rsComboRange + "]"; + var rsFitz = "\\ud83c[\\udffb-\\udfff]"; + var rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")"; + var rsNonAstral = "[^" + rsAstralRange + "]"; + var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}"; + var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]"; + var rsZWJ = "\\u200d"; + var reOptMod = rsModifier + "?"; + var rsOptVar = "[" + rsVarRange + "]?"; + var rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*"; + var rsSeq = rsOptVar + reOptMod + rsOptJoin; + var rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")"; + var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g"); + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } + module2.exports = unicodeSize; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stringSize.js +var require_stringSize = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stringSize.js"(exports2, module2) { + var asciiSize = require_asciiSize(); + var hasUnicode = require_hasUnicode(); + var unicodeSize = require_unicodeSize(); + function stringSize(string) { + return hasUnicode(string) ? unicodeSize(string) : asciiSize(string); + } + module2.exports = stringSize; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_asciiToArray.js +var require_asciiToArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_asciiToArray.js"(exports2, module2) { + function asciiToArray(string) { + return string.split(""); + } + module2.exports = asciiToArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_unicodeToArray.js +var require_unicodeToArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_unicodeToArray.js"(exports2, module2) { + var rsAstralRange = "\\ud800-\\udfff"; + var rsComboMarksRange = "\\u0300-\\u036f"; + var reComboHalfMarksRange = "\\ufe20-\\ufe2f"; + var rsComboSymbolsRange = "\\u20d0-\\u20ff"; + var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; + var rsVarRange = "\\ufe0e\\ufe0f"; + var rsAstral = "[" + rsAstralRange + "]"; + var rsCombo = "[" + rsComboRange + "]"; + var rsFitz = "\\ud83c[\\udffb-\\udfff]"; + var rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")"; + var rsNonAstral = "[^" + rsAstralRange + "]"; + var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}"; + var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]"; + var rsZWJ = "\\u200d"; + var reOptMod = rsModifier + "?"; + var rsOptVar = "[" + rsVarRange + "]?"; + var rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*"; + var rsSeq = rsOptVar + reOptMod + rsOptJoin; + var rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")"; + var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g"); + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + module2.exports = unicodeToArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stringToArray.js +var require_stringToArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stringToArray.js"(exports2, module2) { + var asciiToArray = require_asciiToArray(); + var hasUnicode = require_hasUnicode(); + var unicodeToArray = require_unicodeToArray(); + function stringToArray(string) { + return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string); + } + module2.exports = stringToArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/truncate.js +var require_truncate = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/truncate.js"(exports2, module2) { + var baseToString = require_baseToString(); + var castSlice = require_castSlice(); + var hasUnicode = require_hasUnicode(); + var isObject = require_isObject2(); + var isRegExp = require_isRegExp(); + var stringSize = require_stringSize(); + var stringToArray = require_stringToArray(); + var toInteger = require_toInteger(); + var toString = require_toString(); + var DEFAULT_TRUNC_LENGTH = 30; + var DEFAULT_TRUNC_OMISSION = "..."; + var reFlags = /\w*$/; + function truncate(string, options) { + var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION; + if (isObject(options)) { + var separator = "separator" in options ? options.separator : separator; + length = "length" in options ? toInteger(options.length) : length; + omission = "omission" in options ? baseToString(options.omission) : omission; + } + string = toString(string); + var strLength = string.length; + if (hasUnicode(string)) { + var strSymbols = stringToArray(string); + strLength = strSymbols.length; + } + if (length >= strLength) { + return string; + } + var end = length - stringSize(omission); + if (end < 1) { + return omission; + } + var result = strSymbols ? castSlice(strSymbols, 0, end).join("") : string.slice(0, end); + if (separator === void 0) { + return result + omission; + } + if (strSymbols) { + end += result.length - end; + } + if (isRegExp(separator)) { + if (string.slice(end).search(separator)) { + var match, substring = result; + if (!separator.global) { + separator = RegExp(separator.source, toString(reFlags.exec(separator)) + "g"); + } + separator.lastIndex = 0; + while (match = separator.exec(substring)) { + var newEnd = match.index; + } + result = result.slice(0, newEnd === void 0 ? end : newEnd); + } + } else if (string.indexOf(baseToString(separator), end) != end) { + var index = result.lastIndexOf(separator); + if (index > -1) { + result = result.slice(0, index); + } + } + return result + omission; + } + module2.exports = truncate; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/truncateTableData.js +var require_truncateTableData = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/truncateTableData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _truncate2 = _interopRequireDefault(require_truncate()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var truncateTableData = (rows, config) => { + return rows.map((cells) => { + return cells.map((content, index) => { + return (0, _truncate2.default)(content, { + length: config.columns[index].truncate + }); + }); + }); + }; + var _default = truncateTableData; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/createStream.js +var require_createStream = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/createStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _mapValues2 = _interopRequireDefault(require_mapValues()); + var _alignTableData = _interopRequireDefault(require_alignTableData()); + var _calculateRowHeightIndex = _interopRequireDefault(require_calculateRowHeightIndex()); + var _drawBorder = require_drawBorder(); + var _drawRow = _interopRequireDefault(require_drawRow()); + var _makeStreamConfig = _interopRequireDefault(require_makeStreamConfig()); + var _mapDataUsingRowHeightIndex = _interopRequireDefault(require_mapDataUsingRowHeightIndex()); + var _padTableData = _interopRequireDefault(require_padTableData()); + var _stringifyTableData = _interopRequireDefault(require_stringifyTableData()); + var _truncateTableData = _interopRequireDefault(require_truncateTableData()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var prepareData = (data, config) => { + let rows; + rows = (0, _stringifyTableData.default)(data); + rows = (0, _truncateTableData.default)(data, config); + const rowHeightIndex = (0, _calculateRowHeightIndex.default)(rows, config); + rows = (0, _mapDataUsingRowHeightIndex.default)(rows, rowHeightIndex, config); + rows = (0, _alignTableData.default)(rows, config); + rows = (0, _padTableData.default)(rows, config); + return rows; + }; + var create = (row, columnWidthIndex, config) => { + const rows = prepareData([row], config); + const body = rows.map((literalRow) => { + return (0, _drawRow.default)(literalRow, config.border); + }).join(""); + let output; + output = ""; + output += (0, _drawBorder.drawBorderTop)(columnWidthIndex, config.border); + output += body; + output += (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border); + output = output.trimEnd(); + process.stdout.write(output); + }; + var append = (row, columnWidthIndex, config) => { + const rows = prepareData([row], config); + const body = rows.map((literalRow) => { + return (0, _drawRow.default)(literalRow, config.border); + }).join(""); + let output = ""; + const bottom = (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border); + if (bottom !== "\n") { + output = "\r"; + } + output += (0, _drawBorder.drawBorderJoin)(columnWidthIndex, config.border); + output += body; + output += bottom; + output = output.trimEnd(); + process.stdout.write(output); + }; + var createStream = (userConfig = {}) => { + const config = (0, _makeStreamConfig.default)(userConfig); + const columnWidthIndex = Object.values((0, _mapValues2.default)(config.columns, (column) => { + return column.width + column.paddingLeft + column.paddingRight; + })); + let empty; + empty = true; + return { + write: (row) => { + if (row.length !== config.columnCount) { + throw new Error("Row cell count does not match the config.columnCount."); + } + if (empty) { + empty = false; + return create(row, columnWidthIndex, config); + } else { + return append(row, columnWidthIndex, config); + } + } + }; + }; + var _default = createStream; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/calculateCellWidthIndex.js +var require_calculateCellWidthIndex = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/calculateCellWidthIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _stringWidth = _interopRequireDefault(require_string_width()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var calculateCellWidthIndex = (cells) => { + return cells.map((value) => { + return Math.max(...value.split("\n").map((line) => { + return (0, _stringWidth.default)(line); + })); + }); + }; + var _default = calculateCellWidthIndex; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/drawTable.js +var require_drawTable = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/drawTable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _drawBorder = require_drawBorder(); + var _drawRow = _interopRequireDefault(require_drawRow()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var drawTable = (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine, singleLine) => { + let output; + let realRowIndex; + let rowHeight; + const rowCount = rows.length; + realRowIndex = 0; + output = ""; + if (drawHorizontalLine(realRowIndex, rowCount)) { + output += (0, _drawBorder.drawBorderTop)(columnSizeIndex, border); + } + rows.forEach((row, index0) => { + output += (0, _drawRow.default)(row, border); + if (!rowHeight) { + rowHeight = rowSpanIndex[realRowIndex]; + realRowIndex++; + } + rowHeight--; + if (!singleLine && rowHeight === 0 && index0 !== rowCount - 1 && drawHorizontalLine(realRowIndex, rowCount)) { + output += (0, _drawBorder.drawBorderJoin)(columnSizeIndex, border); + } + }); + if (drawHorizontalLine(realRowIndex, rowCount)) { + output += (0, _drawBorder.drawBorderBottom)(columnSizeIndex, border); + } + return output; + }; + var _default = drawTable; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/calculateMaximumColumnWidthIndex.js +var require_calculateMaximumColumnWidthIndex = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/calculateMaximumColumnWidthIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _calculateCellWidthIndex = _interopRequireDefault(require_calculateCellWidthIndex()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var calculateMaximumColumnWidthIndex = (rows) => { + if (!rows[0]) { + throw new Error("Dataset must have at least one row."); + } + const columns = new Array(rows[0].length).fill(0); + rows.forEach((row) => { + const columnWidthIndex = (0, _calculateCellWidthIndex.default)(row); + columnWidthIndex.forEach((valueWidth, index0) => { + if (columns[index0] < valueWidth) { + columns[index0] = valueWidth; + } + }); + }); + return columns; + }; + var _default = calculateMaximumColumnWidthIndex; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/makeConfig.js +var require_makeConfig = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/makeConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _cloneDeep2 = _interopRequireDefault(require_cloneDeep()); + var _isUndefined2 = _interopRequireDefault(require_isUndefined()); + var _times2 = _interopRequireDefault(require_times2()); + var _calculateMaximumColumnWidthIndex = _interopRequireDefault(require_calculateMaximumColumnWidthIndex()); + var _getBorderCharacters = _interopRequireDefault(require_getBorderCharacters()); + var _validateConfig = _interopRequireDefault(require_validateConfig()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var makeBorder = (border = {}) => { + return Object.assign({}, (0, _getBorderCharacters.default)("honeywell"), border); + }; + var makeColumns = (rows, columns = {}, columnDefault = {}) => { + const maximumColumnWidthIndex = (0, _calculateMaximumColumnWidthIndex.default)(rows); + (0, _times2.default)(rows[0].length, (index) => { + if ((0, _isUndefined2.default)(columns[index])) { + columns[index] = {}; + } + columns[index] = Object.assign({ + alignment: "left", + paddingLeft: 1, + paddingRight: 1, + truncate: Infinity, + width: maximumColumnWidthIndex[index], + wrapWord: false + }, columnDefault, columns[index]); + }); + return columns; + }; + var makeConfig = (rows, userConfig = {}) => { + (0, _validateConfig.default)("config.json", userConfig); + const config = (0, _cloneDeep2.default)(userConfig); + config.border = makeBorder(config.border); + config.columns = makeColumns(rows, config.columns, config.columnDefault); + if (!config.drawHorizontalLine) { + config.drawHorizontalLine = () => { + return true; + }; + } + if (config.singleLine === void 0) { + config.singleLine = false; + } + return config; + }; + var _default = makeConfig; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/validateTableData.js +var require_validateTableData = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/validateTableData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var validateTableData = (rows) => { + if (!Array.isArray(rows)) { + throw new TypeError("Table data must be an array."); + } + if (rows.length === 0) { + throw new Error("Table must define at least one row."); + } + if (rows[0].length === 0) { + throw new Error("Table must define at least one column."); + } + const columnNumber = rows[0].length; + for (const cells of rows) { + if (!Array.isArray(cells)) { + throw new TypeError("Table row data must be an array."); + } + if (cells.length !== columnNumber) { + throw new Error("Table must have a consistent number of cells."); + } + for (const cell of cells) { + if (/[\u0001-\u0006\u0008\u0009\u000B-\u001A]/.test(cell)) { + throw new Error("Table data must not contain control characters."); + } + } + } + }; + var _default = validateTableData; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/table.js +var require_table = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/table.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _alignTableData = _interopRequireDefault(require_alignTableData()); + var _calculateCellWidthIndex = _interopRequireDefault(require_calculateCellWidthIndex()); + var _calculateRowHeightIndex = _interopRequireDefault(require_calculateRowHeightIndex()); + var _drawTable = _interopRequireDefault(require_drawTable()); + var _makeConfig = _interopRequireDefault(require_makeConfig()); + var _mapDataUsingRowHeightIndex = _interopRequireDefault(require_mapDataUsingRowHeightIndex()); + var _padTableData = _interopRequireDefault(require_padTableData()); + var _stringifyTableData = _interopRequireDefault(require_stringifyTableData()); + var _truncateTableData = _interopRequireDefault(require_truncateTableData()); + var _validateTableData = _interopRequireDefault(require_validateTableData()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var table = (data, userConfig = {}) => { + let rows; + (0, _validateTableData.default)(data); + rows = (0, _stringifyTableData.default)(data); + const config = (0, _makeConfig.default)(rows, userConfig); + rows = (0, _truncateTableData.default)(data, config); + const rowHeightIndex = (0, _calculateRowHeightIndex.default)(rows, config); + rows = (0, _mapDataUsingRowHeightIndex.default)(rows, rowHeightIndex, config); + rows = (0, _alignTableData.default)(rows, config); + rows = (0, _padTableData.default)(rows, config); + const cellWidthIndex = (0, _calculateCellWidthIndex.default)(rows[0]); + return (0, _drawTable.default)(rows, config.border, cellWidthIndex, rowHeightIndex, config.drawHorizontalLine, config.singleLine); + }; + var _default = table; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/index.js +var require_dist6 = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + Object.defineProperty(exports2, "createStream", { + enumerable: true, + get: function() { + return _createStream.default; + } + }); + Object.defineProperty(exports2, "getBorderCharacters", { + enumerable: true, + get: function() { + return _getBorderCharacters.default; + } + }); + Object.defineProperty(exports2, "table", { + enumerable: true, + get: function() { + return _table.default; + } + }); + var _createStream = _interopRequireDefault(require_createStream()); + var _getBorderCharacters = _interopRequireDefault(require_getBorderCharacters()); + var _table = _interopRequireDefault(require_table()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + } +}); + +// ../../node_modules/.pnpm/render-help@1.0.2/node_modules/render-help/lib/index.js +var require_lib30 = __commonJS({ + "../../node_modules/.pnpm/render-help@1.0.2/node_modules/render-help/lib/index.js"(exports2, module2) { + "use strict"; + var table_1 = require_dist6(); + var NO_BORDERS = { + topBody: "", + topJoin: "", + topLeft: "", + topRight: "", + bottomBody: "", + bottomJoin: "", + bottomLeft: "", + bottomRight: "", + bodyJoin: "", + bodyLeft: "", + bodyRight: "", + joinBody: "", + joinLeft: "", + joinRight: "" + }; + var TABLE_OPTIONS = { + border: NO_BORDERS, + singleLine: true + }; + var FIRST_COLUMN = { paddingLeft: 2, width: 3 }; + var SHORT_OPTION_COLUMN = { alignment: "right" }; + var LONG_OPTION_COLUMN = { paddingLeft: 0 }; + var DESCRIPTION_COLUMN = { + paddingRight: 0, + wrapWord: true + }; + function renderDescriptionList(descriptionItems, width) { + const data = descriptionItems.sort((item1, item2) => item1.name.localeCompare(item2.name)).map(({ shortAlias, name, description }) => [shortAlias && `${shortAlias},` || " ", name, description || ""]); + const firstColumnMaxWidth = getColumnMaxWidth(data, 0); + const nameColumnWidth = Math.max(getColumnMaxWidth(data, 1), 19); + const descriptionColumnWidth = Math.max(2, width - firstColumnMaxWidth - nameColumnWidth - 2 - 2 - 1); + return multiTrim(table_1.table(data, Object.assign(Object.assign({}, TABLE_OPTIONS), { columns: { + 0: Object.assign(Object.assign({}, SHORT_OPTION_COLUMN), FIRST_COLUMN), + 1: Object.assign({ width: nameColumnWidth }, LONG_OPTION_COLUMN), + 2: Object.assign({ width: descriptionColumnWidth }, DESCRIPTION_COLUMN) + } }))); + } + function multiTrim(str) { + return str.split("\n").map((line) => line.trimRight()).filter(Boolean).join("\n"); + } + function getColumnMaxWidth(data, columnNumber) { + return data.reduce((maxWidth, row) => Math.max(maxWidth, row[columnNumber].length), 0); + } + module2.exports = function renderHelp(config) { + var _a, _b; + const width = (_b = (_a = config.width) !== null && _a !== void 0 ? _a : process.stdout.columns) !== null && _b !== void 0 ? _b : 80; + let outputSections = []; + if (config.usages.length > 0) { + const [firstUsage, ...restUsages] = config.usages; + let usageOutput = `Usage: ${firstUsage}`; + for (let usage of restUsages) { + usageOutput += ` + ${usage}`; + } + outputSections.push(usageOutput); + } + if (config.aliases && config.aliases.length) { + outputSections.push(`${config.aliases.length === 1 ? "Alias" : "Aliases"}: ${config.aliases.join(", ")}`); + } + if (config.description) + outputSections.push(`${config.description}`); + if (config.descriptionLists) { + for (let { title, list } of config.descriptionLists) { + outputSections.push(`${title}: +` + renderDescriptionList(list, width)); + } + } + if (config.url) { + outputSections.push(`Visit ${config.url} for documentation about this command.`); + } + return outputSections.join("\n\n"); + }; + } +}); + +// ../../node_modules/.pnpm/version-selector-type@3.0.0/node_modules/version-selector-type/index.js +var require_version_selector_type = __commonJS({ + "../../node_modules/.pnpm/version-selector-type@3.0.0/node_modules/version-selector-type/index.js"(exports2, module2) { + "use strict"; + var semver = require_semver2(); + module2.exports = (selector) => versionSelectorType(true, selector); + module2.exports.strict = (selector) => versionSelectorType(false, selector); + function versionSelectorType(loose, selector) { + if (typeof selector !== "string") { + throw new TypeError("`selector` should be a string"); + } + let normalizedSelector; + if (normalizedSelector = semver.valid(selector, loose)) { + return { + normalized: normalizedSelector, + type: "version" + }; + } + if (normalizedSelector = semver.validRange(selector, loose)) { + return { + normalized: normalizedSelector, + type: "range" + }; + } + if (encodeURIComponent(selector) === selector) { + return { + normalized: selector, + type: "tag" + }; + } + return null; + } + } +}); + +// ../../node_modules/.pnpm/@zkochan+rimraf@2.1.1/node_modules/@zkochan/rimraf/index.js +var require_rimraf = __commonJS({ + "../../node_modules/.pnpm/@zkochan+rimraf@2.1.1/node_modules/@zkochan/rimraf/index.js"(exports2, module2) { + var fs = require("fs"); + var rm = fs.promises.rm ? fs.promises.rm : fs.promises.rmdir; + var rmdirSync = fs.rmSync ? fs.rmSync : fs.rmdirSync; + module2.exports = async (p) => { + try { + await rm(p, { recursive: true, maxRetries: 3 }); + } catch (err) { + if (err.code === "ENOTDIR" || err.code === "ENOENT") + return; + throw err; + } + }; + module2.exports.sync = (p) => { + try { + rmdirSync(p, { recursive: true, maxRetries: 3 }); + } catch (err) { + if (err.code === "ENOTDIR" || err.code === "ENOENT") + return; + throw err; + } + }; + } +}); + +// ../../node_modules/.pnpm/rename-overwrite@4.0.0/node_modules/rename-overwrite/index.js +var require_rename_overwrite = __commonJS({ + "../../node_modules/.pnpm/rename-overwrite@4.0.0/node_modules/rename-overwrite/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var path = require("path"); + var rimraf = require_rimraf(); + module2.exports = async function renameOverwrite(oldPath, newPath) { + try { + await fs.promises.rename(oldPath, newPath); + } catch (err) { + switch (err.code) { + case "ENOTEMPTY": + case "EEXIST": + await rimraf(newPath); + await renameOverwrite(oldPath, newPath); + break; + case "EPERM": + case "EACCESS": { + await rimraf(newPath); + const start = Date.now(); + let backoff = 0; + let lastError = err; + while (Date.now() - start < 6e4 && (lastError.code === "EPERM" || lastError.code === "EACCESS")) { + await new Promise((resolve) => setTimeout(resolve, backoff)); + try { + await fs.promises.rename(oldPath, newPath); + return; + } catch (err2) { + lastError = err2; + } + if (backoff < 100) { + backoff += 10; + } + } + throw lastError; + } + case "ENOENT": + try { + await fs.promises.stat(oldPath); + } catch (statErr) { + if (statErr.code === "ENOENT") { + throw statErr; + } + } + await fs.promises.mkdir(path.dirname(newPath), { recursive: true }); + await renameOverwrite(oldPath, newPath); + break; + default: + throw err; + } + } + }; + module2.exports.sync = function renameOverwriteSync(oldPath, newPath) { + try { + fs.renameSync(oldPath, newPath); + } catch (err) { + switch (err.code) { + case "ENOTEMPTY": + case "EEXIST": + case "EPERM": + rimraf.sync(newPath); + fs.renameSync(oldPath, newPath); + return; + case "ENOENT": + fs.mkdirSync(path.dirname(newPath), { recursive: true }); + renameOverwriteSync(oldPath, newPath); + return; + default: + throw err; + } + } + }; + } +}); + +// ../../node_modules/.pnpm/minipass@3.1.5/node_modules/minipass/index.js +var require_minipass = __commonJS({ + "../../node_modules/.pnpm/minipass@3.1.5/node_modules/minipass/index.js"(exports2, module2) { + "use strict"; + var proc = typeof process === "object" && process ? process : { + stdout: null, + stderr: null + }; + var EE = require("events"); + var Stream = require("stream"); + var Yallist = require_yallist(); + var SD = require("string_decoder").StringDecoder; + var EOF = Symbol("EOF"); + var MAYBE_EMIT_END = Symbol("maybeEmitEnd"); + var EMITTED_END = Symbol("emittedEnd"); + var EMITTING_END = Symbol("emittingEnd"); + var EMITTED_ERROR = Symbol("emittedError"); + var CLOSED = Symbol("closed"); + var READ = Symbol("read"); + var FLUSH = Symbol("flush"); + var FLUSHCHUNK = Symbol("flushChunk"); + var ENCODING = Symbol("encoding"); + var DECODER = Symbol("decoder"); + var FLOWING = Symbol("flowing"); + var PAUSED = Symbol("paused"); + var RESUME = Symbol("resume"); + var BUFFERLENGTH = Symbol("bufferLength"); + var BUFFERPUSH = Symbol("bufferPush"); + var BUFFERSHIFT = Symbol("bufferShift"); + var OBJECTMODE = Symbol("objectMode"); + var DESTROYED = Symbol("destroyed"); + var doIter = global._MP_NO_ITERATOR_SYMBOLS_ !== "1"; + var ASYNCITERATOR = doIter && Symbol.asyncIterator || Symbol("asyncIterator not implemented"); + var ITERATOR = doIter && Symbol.iterator || Symbol("iterator not implemented"); + var isEndish = (ev) => ev === "end" || ev === "finish" || ev === "prefinish"; + var isArrayBuffer = (b) => b instanceof ArrayBuffer || typeof b === "object" && b.constructor && b.constructor.name === "ArrayBuffer" && b.byteLength >= 0; + var isArrayBufferView = (b) => !Buffer.isBuffer(b) && ArrayBuffer.isView(b); + module2.exports = class Minipass extends Stream { + constructor(options) { + super(); + this[FLOWING] = false; + this[PAUSED] = false; + this.pipes = new Yallist(); + this.buffer = new Yallist(); + this[OBJECTMODE] = options && options.objectMode || false; + if (this[OBJECTMODE]) + this[ENCODING] = null; + else + this[ENCODING] = options && options.encoding || null; + if (this[ENCODING] === "buffer") + this[ENCODING] = null; + this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null; + this[EOF] = false; + this[EMITTED_END] = false; + this[EMITTING_END] = false; + this[CLOSED] = false; + this[EMITTED_ERROR] = null; + this.writable = true; + this.readable = true; + this[BUFFERLENGTH] = 0; + this[DESTROYED] = false; + } + get bufferLength() { + return this[BUFFERLENGTH]; + } + get encoding() { + return this[ENCODING]; + } + set encoding(enc) { + if (this[OBJECTMODE]) + throw new Error("cannot set encoding in objectMode"); + if (this[ENCODING] && enc !== this[ENCODING] && (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH])) + throw new Error("cannot change encoding"); + if (this[ENCODING] !== enc) { + this[DECODER] = enc ? new SD(enc) : null; + if (this.buffer.length) + this.buffer = this.buffer.map((chunk) => this[DECODER].write(chunk)); + } + this[ENCODING] = enc; + } + setEncoding(enc) { + this.encoding = enc; + } + get objectMode() { + return this[OBJECTMODE]; + } + set objectMode(om) { + this[OBJECTMODE] = this[OBJECTMODE] || !!om; + } + write(chunk, encoding, cb) { + if (this[EOF]) + throw new Error("write after end"); + if (this[DESTROYED]) { + this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })); + return true; + } + if (typeof encoding === "function") + cb = encoding, encoding = "utf8"; + if (!encoding) + encoding = "utf8"; + if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) { + if (isArrayBufferView(chunk)) + chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength); + else if (isArrayBuffer(chunk)) + chunk = Buffer.from(chunk); + else if (typeof chunk !== "string") + this.objectMode = true; + } + if (!this.objectMode && !chunk.length) { + if (this[BUFFERLENGTH] !== 0) + this.emit("readable"); + if (cb) + cb(); + return this.flowing; + } + if (typeof chunk === "string" && !this[OBJECTMODE] && !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) { + chunk = Buffer.from(chunk, encoding); + } + if (Buffer.isBuffer(chunk) && this[ENCODING]) + chunk = this[DECODER].write(chunk); + if (this.flowing) { + if (this[BUFFERLENGTH] !== 0) + this[FLUSH](true); + this.emit("data", chunk); + } else + this[BUFFERPUSH](chunk); + if (this[BUFFERLENGTH] !== 0) + this.emit("readable"); + if (cb) + cb(); + return this.flowing; + } + read(n) { + if (this[DESTROYED]) + return null; + try { + if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) + return null; + if (this[OBJECTMODE]) + n = null; + if (this.buffer.length > 1 && !this[OBJECTMODE]) { + if (this.encoding) + this.buffer = new Yallist([ + Array.from(this.buffer).join("") + ]); + else + this.buffer = new Yallist([ + Buffer.concat(Array.from(this.buffer), this[BUFFERLENGTH]) + ]); + } + return this[READ](n || null, this.buffer.head.value); + } finally { + this[MAYBE_EMIT_END](); + } + } + [READ](n, chunk) { + if (n === chunk.length || n === null) + this[BUFFERSHIFT](); + else { + this.buffer.head.value = chunk.slice(n); + chunk = chunk.slice(0, n); + this[BUFFERLENGTH] -= n; + } + this.emit("data", chunk); + if (!this.buffer.length && !this[EOF]) + this.emit("drain"); + return chunk; + } + end(chunk, encoding, cb) { + if (typeof chunk === "function") + cb = chunk, chunk = null; + if (typeof encoding === "function") + cb = encoding, encoding = "utf8"; + if (chunk) + this.write(chunk, encoding); + if (cb) + this.once("end", cb); + this[EOF] = true; + this.writable = false; + if (this.flowing || !this[PAUSED]) + this[MAYBE_EMIT_END](); + return this; + } + [RESUME]() { + if (this[DESTROYED]) + return; + this[PAUSED] = false; + this[FLOWING] = true; + this.emit("resume"); + if (this.buffer.length) + this[FLUSH](); + else if (this[EOF]) + this[MAYBE_EMIT_END](); + else + this.emit("drain"); + } + resume() { + return this[RESUME](); + } + pause() { + this[FLOWING] = false; + this[PAUSED] = true; + } + get destroyed() { + return this[DESTROYED]; + } + get flowing() { + return this[FLOWING]; + } + get paused() { + return this[PAUSED]; + } + [BUFFERPUSH](chunk) { + if (this[OBJECTMODE]) + this[BUFFERLENGTH] += 1; + else + this[BUFFERLENGTH] += chunk.length; + return this.buffer.push(chunk); + } + [BUFFERSHIFT]() { + if (this.buffer.length) { + if (this[OBJECTMODE]) + this[BUFFERLENGTH] -= 1; + else + this[BUFFERLENGTH] -= this.buffer.head.value.length; + } + return this.buffer.shift(); + } + [FLUSH](noDrain) { + do { + } while (this[FLUSHCHUNK](this[BUFFERSHIFT]())); + if (!noDrain && !this.buffer.length && !this[EOF]) + this.emit("drain"); + } + [FLUSHCHUNK](chunk) { + return chunk ? (this.emit("data", chunk), this.flowing) : false; + } + pipe(dest, opts) { + if (this[DESTROYED]) + return; + const ended = this[EMITTED_END]; + opts = opts || {}; + if (dest === proc.stdout || dest === proc.stderr) + opts.end = false; + else + opts.end = opts.end !== false; + const p = { dest, opts, ondrain: (_) => this[RESUME]() }; + this.pipes.push(p); + dest.on("drain", p.ondrain); + this[RESUME](); + if (ended && p.opts.end) + p.dest.end(); + return dest; + } + addListener(ev, fn2) { + return this.on(ev, fn2); + } + on(ev, fn2) { + try { + return super.on(ev, fn2); + } finally { + if (ev === "data" && !this.pipes.length && !this.flowing) + this[RESUME](); + else if (isEndish(ev) && this[EMITTED_END]) { + super.emit(ev); + this.removeAllListeners(ev); + } else if (ev === "error" && this[EMITTED_ERROR]) { + fn2.call(this, this[EMITTED_ERROR]); + } + } + } + get emittedEnd() { + return this[EMITTED_END]; + } + [MAYBE_EMIT_END]() { + if (!this[EMITTING_END] && !this[EMITTED_END] && !this[DESTROYED] && this.buffer.length === 0 && this[EOF]) { + this[EMITTING_END] = true; + this.emit("end"); + this.emit("prefinish"); + this.emit("finish"); + if (this[CLOSED]) + this.emit("close"); + this[EMITTING_END] = false; + } + } + emit(ev, data) { + if (ev !== "error" && ev !== "close" && ev !== DESTROYED && this[DESTROYED]) + return; + else if (ev === "data") { + if (!data) + return; + if (this.pipes.length) + this.pipes.forEach((p) => p.dest.write(data) === false && this.pause()); + } else if (ev === "end") { + if (this[EMITTED_END] === true) + return; + this[EMITTED_END] = true; + this.readable = false; + if (this[DECODER]) { + data = this[DECODER].end(); + if (data) { + this.pipes.forEach((p) => p.dest.write(data)); + super.emit("data", data); + } + } + this.pipes.forEach((p) => { + p.dest.removeListener("drain", p.ondrain); + if (p.opts.end) + p.dest.end(); + }); + } else if (ev === "close") { + this[CLOSED] = true; + if (!this[EMITTED_END] && !this[DESTROYED]) + return; + } else if (ev === "error") { + this[EMITTED_ERROR] = data; + } + const args2 = new Array(arguments.length); + args2[0] = ev; + args2[1] = data; + if (arguments.length > 2) { + for (let i = 2; i < arguments.length; i++) { + args2[i] = arguments[i]; + } + } + try { + return super.emit.apply(this, args2); + } finally { + if (!isEndish(ev)) + this[MAYBE_EMIT_END](); + else + this.removeAllListeners(ev); + } + } + collect() { + const buf = []; + if (!this[OBJECTMODE]) + buf.dataLength = 0; + const p = this.promise(); + this.on("data", (c) => { + buf.push(c); + if (!this[OBJECTMODE]) + buf.dataLength += c.length; + }); + return p.then(() => buf); + } + concat() { + return this[OBJECTMODE] ? Promise.reject(new Error("cannot concat in objectMode")) : this.collect().then((buf) => this[OBJECTMODE] ? Promise.reject(new Error("cannot concat in objectMode")) : this[ENCODING] ? buf.join("") : Buffer.concat(buf, buf.dataLength)); + } + promise() { + return new Promise((resolve, reject) => { + this.on(DESTROYED, () => reject(new Error("stream destroyed"))); + this.on("error", (er) => reject(er)); + this.on("end", () => resolve()); + }); + } + [ASYNCITERATOR]() { + const next = () => { + const res = this.read(); + if (res !== null) + return Promise.resolve({ done: false, value: res }); + if (this[EOF]) + return Promise.resolve({ done: true }); + let resolve = null; + let reject = null; + const onerr = (er) => { + this.removeListener("data", ondata); + this.removeListener("end", onend); + reject(er); + }; + const ondata = (value) => { + this.removeListener("error", onerr); + this.removeListener("end", onend); + this.pause(); + resolve({ value, done: !!this[EOF] }); + }; + const onend = () => { + this.removeListener("error", onerr); + this.removeListener("data", ondata); + resolve({ done: true }); + }; + const ondestroy = () => onerr(new Error("stream destroyed")); + return new Promise((res2, rej) => { + reject = rej; + resolve = res2; + this.once(DESTROYED, ondestroy); + this.once("error", onerr); + this.once("end", onend); + this.once("data", ondata); + }); + }; + return { next }; + } + [ITERATOR]() { + const next = () => { + const value = this.read(); + const done = value === null; + return { value, done }; + }; + return { next }; + } + destroy(er) { + if (this[DESTROYED]) { + if (er) + this.emit("error", er); + else + this.emit(DESTROYED); + return this; + } + this[DESTROYED] = true; + this.buffer = new Yallist(); + this[BUFFERLENGTH] = 0; + if (typeof this.close === "function" && !this[CLOSED]) + this.close(); + if (er) + this.emit("error", er); + else + this.emit(DESTROYED); + return this; + } + static isStream(s) { + return !!s && (s instanceof Minipass || s instanceof Stream || s instanceof EE && (typeof s.pipe === "function" || typeof s.write === "function" && typeof s.end === "function")); + } + }; + } +}); + +// ../../node_modules/.pnpm/ssri@8.0.1/node_modules/ssri/index.js +var require_ssri = __commonJS({ + "../../node_modules/.pnpm/ssri@8.0.1/node_modules/ssri/index.js"(exports2, module2) { + "use strict"; + var crypto = require("crypto"); + var MiniPass = require_minipass(); + var SPEC_ALGORITHMS = ["sha256", "sha384", "sha512"]; + var BASE64_REGEX = /^[a-z0-9+/]+(?:=?=?)$/i; + var SRI_REGEX = /^([a-z0-9]+)-([^?]+)([?\S*]*)$/; + var STRICT_SRI_REGEX = /^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)?$/; + var VCHAR_REGEX = /^[\x21-\x7E]+$/; + var defaultOpts = { + algorithms: ["sha512"], + error: false, + options: [], + pickAlgorithm: getPrioritizedHash, + sep: " ", + single: false, + strict: false + }; + var ssriOpts = (opts = {}) => ({ ...defaultOpts, ...opts }); + var getOptString = (options) => !options || !options.length ? "" : `?${options.join("?")}`; + var _onEnd = Symbol("_onEnd"); + var _getOptions = Symbol("_getOptions"); + var IntegrityStream = class extends MiniPass { + constructor(opts) { + super(); + this.size = 0; + this.opts = opts; + this[_getOptions](); + const { algorithms = defaultOpts.algorithms } = opts; + this.algorithms = Array.from(new Set(algorithms.concat(this.algorithm ? [this.algorithm] : []))); + this.hashes = this.algorithms.map(crypto.createHash); + } + [_getOptions]() { + const { + integrity, + size, + options + } = { ...defaultOpts, ...this.opts }; + this.sri = integrity ? parse(integrity, this.opts) : null; + this.expectedSize = size; + this.goodSri = this.sri ? !!Object.keys(this.sri).length : false; + this.algorithm = this.goodSri ? this.sri.pickAlgorithm(this.opts) : null; + this.digests = this.goodSri ? this.sri[this.algorithm] : null; + this.optString = getOptString(options); + } + emit(ev, data) { + if (ev === "end") + this[_onEnd](); + return super.emit(ev, data); + } + write(data) { + this.size += data.length; + this.hashes.forEach((h) => h.update(data)); + return super.write(data); + } + [_onEnd]() { + if (!this.goodSri) { + this[_getOptions](); + } + const newSri = parse(this.hashes.map((h, i) => { + return `${this.algorithms[i]}-${h.digest("base64")}${this.optString}`; + }).join(" "), this.opts); + const match = this.goodSri && newSri.match(this.sri, this.opts); + if (typeof this.expectedSize === "number" && this.size !== this.expectedSize) { + const err = new Error(`stream size mismatch when checking ${this.sri}. + Wanted: ${this.expectedSize} + Found: ${this.size}`); + err.code = "EBADSIZE"; + err.found = this.size; + err.expected = this.expectedSize; + err.sri = this.sri; + this.emit("error", err); + } else if (this.sri && !match) { + const err = new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${newSri}. (${this.size} bytes)`); + err.code = "EINTEGRITY"; + err.found = newSri; + err.expected = this.digests; + err.algorithm = this.algorithm; + err.sri = this.sri; + this.emit("error", err); + } else { + this.emit("size", this.size); + this.emit("integrity", newSri); + match && this.emit("verified", match); + } + } + }; + var Hash = class { + get isHash() { + return true; + } + constructor(hash, opts) { + opts = ssriOpts(opts); + const strict = !!opts.strict; + this.source = hash.trim(); + this.digest = ""; + this.algorithm = ""; + this.options = []; + const match = this.source.match(strict ? STRICT_SRI_REGEX : SRI_REGEX); + if (!match) { + return; + } + if (strict && !SPEC_ALGORITHMS.some((a) => a === match[1])) { + return; + } + this.algorithm = match[1]; + this.digest = match[2]; + const rawOpts = match[3]; + if (rawOpts) { + this.options = rawOpts.slice(1).split("?"); + } + } + hexDigest() { + return this.digest && Buffer.from(this.digest, "base64").toString("hex"); + } + toJSON() { + return this.toString(); + } + toString(opts) { + opts = ssriOpts(opts); + if (opts.strict) { + if (!(SPEC_ALGORITHMS.some((x) => x === this.algorithm) && this.digest.match(BASE64_REGEX) && this.options.every((opt) => opt.match(VCHAR_REGEX)))) { + return ""; + } + } + const options = this.options && this.options.length ? `?${this.options.join("?")}` : ""; + return `${this.algorithm}-${this.digest}${options}`; + } + }; + var Integrity = class { + get isIntegrity() { + return true; + } + toJSON() { + return this.toString(); + } + isEmpty() { + return Object.keys(this).length === 0; + } + toString(opts) { + opts = ssriOpts(opts); + let sep = opts.sep || " "; + if (opts.strict) { + sep = sep.replace(/\S+/g, " "); + } + return Object.keys(this).map((k) => { + return this[k].map((hash) => { + return Hash.prototype.toString.call(hash, opts); + }).filter((x) => x.length).join(sep); + }).filter((x) => x.length).join(sep); + } + concat(integrity, opts) { + opts = ssriOpts(opts); + const other = typeof integrity === "string" ? integrity : stringify(integrity, opts); + return parse(`${this.toString(opts)} ${other}`, opts); + } + hexDigest() { + return parse(this, { single: true }).hexDigest(); + } + merge(integrity, opts) { + opts = ssriOpts(opts); + const other = parse(integrity, opts); + for (const algo in other) { + if (this[algo]) { + if (!this[algo].find((hash) => other[algo].find((otherhash) => hash.digest === otherhash.digest))) { + throw new Error("hashes do not match, cannot update integrity"); + } + } else { + this[algo] = other[algo]; + } + } + } + match(integrity, opts) { + opts = ssriOpts(opts); + const other = parse(integrity, opts); + const algo = other.pickAlgorithm(opts); + return this[algo] && other[algo] && this[algo].find((hash) => other[algo].find((otherhash) => hash.digest === otherhash.digest)) || false; + } + pickAlgorithm(opts) { + opts = ssriOpts(opts); + const pickAlgorithm = opts.pickAlgorithm; + const keys = Object.keys(this); + return keys.reduce((acc, algo) => { + return pickAlgorithm(acc, algo) || acc; + }); + } + }; + module2.exports.parse = parse; + function parse(sri, opts) { + if (!sri) + return null; + opts = ssriOpts(opts); + if (typeof sri === "string") { + return _parse(sri, opts); + } else if (sri.algorithm && sri.digest) { + const fullSri = new Integrity(); + fullSri[sri.algorithm] = [sri]; + return _parse(stringify(fullSri, opts), opts); + } else { + return _parse(stringify(sri, opts), opts); + } + } + function _parse(integrity, opts) { + if (opts.single) { + return new Hash(integrity, opts); + } + const hashes = integrity.trim().split(/\s+/).reduce((acc, string) => { + const hash = new Hash(string, opts); + if (hash.algorithm && hash.digest) { + const algo = hash.algorithm; + if (!acc[algo]) { + acc[algo] = []; + } + acc[algo].push(hash); + } + return acc; + }, new Integrity()); + return hashes.isEmpty() ? null : hashes; + } + module2.exports.stringify = stringify; + function stringify(obj, opts) { + opts = ssriOpts(opts); + if (obj.algorithm && obj.digest) { + return Hash.prototype.toString.call(obj, opts); + } else if (typeof obj === "string") { + return stringify(parse(obj, opts), opts); + } else { + return Integrity.prototype.toString.call(obj, opts); + } + } + module2.exports.fromHex = fromHex; + function fromHex(hexDigest, algorithm, opts) { + opts = ssriOpts(opts); + const optString = getOptString(opts.options); + return parse(`${algorithm}-${Buffer.from(hexDigest, "hex").toString("base64")}${optString}`, opts); + } + module2.exports.fromData = fromData; + function fromData(data, opts) { + opts = ssriOpts(opts); + const algorithms = opts.algorithms; + const optString = getOptString(opts.options); + return algorithms.reduce((acc, algo) => { + const digest = crypto.createHash(algo).update(data).digest("base64"); + const hash = new Hash(`${algo}-${digest}${optString}`, opts); + if (hash.algorithm && hash.digest) { + const algo2 = hash.algorithm; + if (!acc[algo2]) { + acc[algo2] = []; + } + acc[algo2].push(hash); + } + return acc; + }, new Integrity()); + } + module2.exports.fromStream = fromStream; + function fromStream(stream, opts) { + opts = ssriOpts(opts); + const istream = integrityStream(opts); + return new Promise((resolve, reject) => { + stream.pipe(istream); + stream.on("error", reject); + istream.on("error", reject); + let sri; + istream.on("integrity", (s) => { + sri = s; + }); + istream.on("end", () => resolve(sri)); + istream.on("data", () => { + }); + }); + } + module2.exports.checkData = checkData; + function checkData(data, sri, opts) { + opts = ssriOpts(opts); + sri = parse(sri, opts); + if (!sri || !Object.keys(sri).length) { + if (opts.error) { + throw Object.assign(new Error("No valid integrity hashes to check against"), { + code: "EINTEGRITY" + }); + } else { + return false; + } + } + const algorithm = sri.pickAlgorithm(opts); + const digest = crypto.createHash(algorithm).update(data).digest("base64"); + const newSri = parse({ algorithm, digest }); + const match = newSri.match(sri, opts); + if (match || !opts.error) { + return match; + } else if (typeof opts.size === "number" && data.length !== opts.size) { + const err = new Error(`data size mismatch when checking ${sri}. + Wanted: ${opts.size} + Found: ${data.length}`); + err.code = "EBADSIZE"; + err.found = data.length; + err.expected = opts.size; + err.sri = sri; + throw err; + } else { + const err = new Error(`Integrity checksum failed when using ${algorithm}: Wanted ${sri}, but got ${newSri}. (${data.length} bytes)`); + err.code = "EINTEGRITY"; + err.found = newSri; + err.expected = sri; + err.algorithm = algorithm; + err.sri = sri; + throw err; + } + } + module2.exports.checkStream = checkStream; + function checkStream(stream, sri, opts) { + opts = ssriOpts(opts); + opts.integrity = sri; + sri = parse(sri, opts); + if (!sri || !Object.keys(sri).length) { + return Promise.reject(Object.assign(new Error("No valid integrity hashes to check against"), { + code: "EINTEGRITY" + })); + } + const checker = integrityStream(opts); + return new Promise((resolve, reject) => { + stream.pipe(checker); + stream.on("error", reject); + checker.on("error", reject); + let sri2; + checker.on("verified", (s) => { + sri2 = s; + }); + checker.on("end", () => resolve(sri2)); + checker.on("data", () => { + }); + }); + } + module2.exports.integrityStream = integrityStream; + function integrityStream(opts = {}) { + return new IntegrityStream(opts); + } + module2.exports.create = createIntegrity; + function createIntegrity(opts) { + opts = ssriOpts(opts); + const algorithms = opts.algorithms; + const optString = getOptString(opts.options); + const hashes = algorithms.map(crypto.createHash); + return { + update: function(chunk, enc) { + hashes.forEach((h) => h.update(chunk, enc)); + return this; + }, + digest: function(enc) { + const integrity = algorithms.reduce((acc, algo) => { + const digest = hashes.shift().digest("base64"); + const hash = new Hash(`${algo}-${digest}${optString}`, opts); + if (hash.algorithm && hash.digest) { + const algo2 = hash.algorithm; + if (!acc[algo2]) { + acc[algo2] = []; + } + acc[algo2].push(hash); + } + return acc; + }, new Integrity()); + return integrity; + } + }; + } + var NODE_HASHES = new Set(crypto.getHashes()); + var DEFAULT_PRIORITY = [ + "md5", + "whirlpool", + "sha1", + "sha224", + "sha256", + "sha384", + "sha512", + "sha3", + "sha3-256", + "sha3-384", + "sha3-512", + "sha3_256", + "sha3_384", + "sha3_512" + ].filter((algo) => NODE_HASHES.has(algo)); + function getPrioritizedHash(algo1, algo2) { + return DEFAULT_PRIORITY.indexOf(algo1.toLowerCase()) >= DEFAULT_PRIORITY.indexOf(algo2.toLowerCase()) ? algo1 : algo2; + } + } +}); + +// ../../node_modules/.pnpm/buffer-from@1.1.2/node_modules/buffer-from/index.js +var require_buffer_from = __commonJS({ + "../../node_modules/.pnpm/buffer-from@1.1.2/node_modules/buffer-from/index.js"(exports2, module2) { + var toString = Object.prototype.toString; + var isModern = typeof Buffer !== "undefined" && typeof Buffer.alloc === "function" && typeof Buffer.allocUnsafe === "function" && typeof Buffer.from === "function"; + function isArrayBuffer(input) { + return toString.call(input).slice(8, -1) === "ArrayBuffer"; + } + function fromArrayBuffer(obj, byteOffset, length) { + byteOffset >>>= 0; + var maxLength = obj.byteLength - byteOffset; + if (maxLength < 0) { + throw new RangeError("'offset' is out of bounds"); + } + if (length === void 0) { + length = maxLength; + } else { + length >>>= 0; + if (length > maxLength) { + throw new RangeError("'length' is out of bounds"); + } + } + return isModern ? Buffer.from(obj.slice(byteOffset, byteOffset + length)) : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length))); + } + function fromString(string, encoding) { + if (typeof encoding !== "string" || encoding === "") { + encoding = "utf8"; + } + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding'); + } + return isModern ? Buffer.from(string, encoding) : new Buffer(string, encoding); + } + function bufferFrom(value, encodingOrOffset, length) { + if (typeof value === "number") { + throw new TypeError('"value" argument must not be a number'); + } + if (isArrayBuffer(value)) { + return fromArrayBuffer(value, encodingOrOffset, length); + } + if (typeof value === "string") { + return fromString(value, encodingOrOffset); + } + return isModern ? Buffer.from(value) : new Buffer(value); + } + module2.exports = bufferFrom; + } +}); + +// ../../node_modules/.pnpm/typedarray@0.0.6/node_modules/typedarray/index.js +var require_typedarray = __commonJS({ + "../../node_modules/.pnpm/typedarray@0.0.6/node_modules/typedarray/index.js"(exports2) { + var undefined2 = void 0; + var MAX_ARRAY_LENGTH = 1e5; + var ECMAScript = function() { + var opts = Object.prototype.toString, ophop = Object.prototype.hasOwnProperty; + return { + Class: function(v) { + return opts.call(v).replace(/^\[object *|\]$/g, ""); + }, + HasProperty: function(o, p) { + return p in o; + }, + HasOwnProperty: function(o, p) { + return ophop.call(o, p); + }, + IsCallable: function(o) { + return typeof o === "function"; + }, + ToInt32: function(v) { + return v >> 0; + }, + ToUint32: function(v) { + return v >>> 0; + } + }; + }(); + var LN2 = Math.LN2; + var abs = Math.abs; + var floor = Math.floor; + var log2 = Math.log; + var min = Math.min; + var pow = Math.pow; + var round = Math.round; + function configureProperties(obj) { + if (getOwnPropNames && defineProp) { + var props = getOwnPropNames(obj), i; + for (i = 0; i < props.length; i += 1) { + defineProp(obj, props[i], { + value: obj[props[i]], + writable: false, + enumerable: false, + configurable: false + }); + } + } + } + var defineProp; + if (Object.defineProperty && function() { + try { + Object.defineProperty({}, "x", {}); + return true; + } catch (e) { + return false; + } + }()) { + defineProp = Object.defineProperty; + } else { + defineProp = function(o, p, desc) { + if (!o === Object(o)) + throw new TypeError("Object.defineProperty called on non-object"); + if (ECMAScript.HasProperty(desc, "get") && Object.prototype.__defineGetter__) { + Object.prototype.__defineGetter__.call(o, p, desc.get); + } + if (ECMAScript.HasProperty(desc, "set") && Object.prototype.__defineSetter__) { + Object.prototype.__defineSetter__.call(o, p, desc.set); + } + if (ECMAScript.HasProperty(desc, "value")) { + o[p] = desc.value; + } + return o; + }; + } + var getOwnPropNames = Object.getOwnPropertyNames || function(o) { + if (o !== Object(o)) + throw new TypeError("Object.getOwnPropertyNames called on non-object"); + var props = [], p; + for (p in o) { + if (ECMAScript.HasOwnProperty(o, p)) { + props.push(p); + } + } + return props; + }; + function makeArrayAccessors(obj) { + if (!defineProp) { + return; + } + if (obj.length > MAX_ARRAY_LENGTH) + throw new RangeError("Array too large for polyfill"); + function makeArrayAccessor(index) { + defineProp(obj, index, { + "get": function() { + return obj._getter(index); + }, + "set": function(v) { + obj._setter(index, v); + }, + enumerable: true, + configurable: false + }); + } + var i; + for (i = 0; i < obj.length; i += 1) { + makeArrayAccessor(i); + } + } + function as_signed(value, bits) { + var s = 32 - bits; + return value << s >> s; + } + function as_unsigned(value, bits) { + var s = 32 - bits; + return value << s >>> s; + } + function packI8(n) { + return [n & 255]; + } + function unpackI8(bytes) { + return as_signed(bytes[0], 8); + } + function packU8(n) { + return [n & 255]; + } + function unpackU8(bytes) { + return as_unsigned(bytes[0], 8); + } + function packU8Clamped(n) { + n = round(Number(n)); + return [n < 0 ? 0 : n > 255 ? 255 : n & 255]; + } + function packI16(n) { + return [n >> 8 & 255, n & 255]; + } + function unpackI16(bytes) { + return as_signed(bytes[0] << 8 | bytes[1], 16); + } + function packU16(n) { + return [n >> 8 & 255, n & 255]; + } + function unpackU16(bytes) { + return as_unsigned(bytes[0] << 8 | bytes[1], 16); + } + function packI32(n) { + return [n >> 24 & 255, n >> 16 & 255, n >> 8 & 255, n & 255]; + } + function unpackI32(bytes) { + return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); + } + function packU32(n) { + return [n >> 24 & 255, n >> 16 & 255, n >> 8 & 255, n & 255]; + } + function unpackU32(bytes) { + return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); + } + function packIEEE754(v, ebits, fbits) { + var bias = (1 << ebits - 1) - 1, s, e, f, ln, i, bits, str, bytes; + function roundToEven(n) { + var w = floor(n), f2 = n - w; + if (f2 < 0.5) + return w; + if (f2 > 0.5) + return w + 1; + return w % 2 ? w + 1 : w; + } + if (v !== v) { + e = (1 << ebits) - 1; + f = pow(2, fbits - 1); + s = 0; + } else if (v === Infinity || v === -Infinity) { + e = (1 << ebits) - 1; + f = 0; + s = v < 0 ? 1 : 0; + } else if (v === 0) { + e = 0; + f = 0; + s = 1 / v === -Infinity ? 1 : 0; + } else { + s = v < 0; + v = abs(v); + if (v >= pow(2, 1 - bias)) { + e = min(floor(log2(v) / LN2), 1023); + f = roundToEven(v / pow(2, e) * pow(2, fbits)); + if (f / pow(2, fbits) >= 2) { + e = e + 1; + f = 1; + } + if (e > bias) { + e = (1 << ebits) - 1; + f = 0; + } else { + e = e + bias; + f = f - pow(2, fbits); + } + } else { + e = 0; + f = roundToEven(v / pow(2, 1 - bias - fbits)); + } + } + bits = []; + for (i = fbits; i; i -= 1) { + bits.push(f % 2 ? 1 : 0); + f = floor(f / 2); + } + for (i = ebits; i; i -= 1) { + bits.push(e % 2 ? 1 : 0); + e = floor(e / 2); + } + bits.push(s ? 1 : 0); + bits.reverse(); + str = bits.join(""); + bytes = []; + while (str.length) { + bytes.push(parseInt(str.substring(0, 8), 2)); + str = str.substring(8); + } + return bytes; + } + function unpackIEEE754(bytes, ebits, fbits) { + var bits = [], i, j, b, str, bias, s, e, f; + for (i = bytes.length; i; i -= 1) { + b = bytes[i - 1]; + for (j = 8; j; j -= 1) { + bits.push(b % 2 ? 1 : 0); + b = b >> 1; + } + } + bits.reverse(); + str = bits.join(""); + bias = (1 << ebits - 1) - 1; + s = parseInt(str.substring(0, 1), 2) ? -1 : 1; + e = parseInt(str.substring(1, 1 + ebits), 2); + f = parseInt(str.substring(1 + ebits), 2); + if (e === (1 << ebits) - 1) { + return f !== 0 ? NaN : s * Infinity; + } else if (e > 0) { + return s * pow(2, e - bias) * (1 + f / pow(2, fbits)); + } else if (f !== 0) { + return s * pow(2, -(bias - 1)) * (f / pow(2, fbits)); + } else { + return s < 0 ? -0 : 0; + } + } + function unpackF64(b) { + return unpackIEEE754(b, 11, 52); + } + function packF64(v) { + return packIEEE754(v, 11, 52); + } + function unpackF32(b) { + return unpackIEEE754(b, 8, 23); + } + function packF32(v) { + return packIEEE754(v, 8, 23); + } + (function() { + var ArrayBuffer2 = function ArrayBuffer3(length) { + length = ECMAScript.ToInt32(length); + if (length < 0) + throw new RangeError("ArrayBuffer size is not a small enough positive integer"); + this.byteLength = length; + this._bytes = []; + this._bytes.length = length; + var i; + for (i = 0; i < this.byteLength; i += 1) { + this._bytes[i] = 0; + } + configureProperties(this); + }; + exports2.ArrayBuffer = exports2.ArrayBuffer || ArrayBuffer2; + var ArrayBufferView = function ArrayBufferView2() { + }; + function makeConstructor(bytesPerElement, pack, unpack) { + var ctor; + ctor = function(buffer, byteOffset, length) { + var array, sequence, i, s; + if (!arguments.length || typeof arguments[0] === "number") { + this.length = ECMAScript.ToInt32(arguments[0]); + if (length < 0) + throw new RangeError("ArrayBufferView size is not a small enough positive integer"); + this.byteLength = this.length * this.BYTES_PER_ELEMENT; + this.buffer = new ArrayBuffer2(this.byteLength); + this.byteOffset = 0; + } else if (typeof arguments[0] === "object" && arguments[0].constructor === ctor) { + array = arguments[0]; + this.length = array.length; + this.byteLength = this.length * this.BYTES_PER_ELEMENT; + this.buffer = new ArrayBuffer2(this.byteLength); + this.byteOffset = 0; + for (i = 0; i < this.length; i += 1) { + this._setter(i, array._getter(i)); + } + } else if (typeof arguments[0] === "object" && !(arguments[0] instanceof ArrayBuffer2 || ECMAScript.Class(arguments[0]) === "ArrayBuffer")) { + sequence = arguments[0]; + this.length = ECMAScript.ToUint32(sequence.length); + this.byteLength = this.length * this.BYTES_PER_ELEMENT; + this.buffer = new ArrayBuffer2(this.byteLength); + this.byteOffset = 0; + for (i = 0; i < this.length; i += 1) { + s = sequence[i]; + this._setter(i, Number(s)); + } + } else if (typeof arguments[0] === "object" && (arguments[0] instanceof ArrayBuffer2 || ECMAScript.Class(arguments[0]) === "ArrayBuffer")) { + this.buffer = buffer; + this.byteOffset = ECMAScript.ToUint32(byteOffset); + if (this.byteOffset > this.buffer.byteLength) { + throw new RangeError("byteOffset out of range"); + } + if (this.byteOffset % this.BYTES_PER_ELEMENT) { + throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size."); + } + if (arguments.length < 3) { + this.byteLength = this.buffer.byteLength - this.byteOffset; + if (this.byteLength % this.BYTES_PER_ELEMENT) { + throw new RangeError("length of buffer minus byteOffset not a multiple of the element size"); + } + this.length = this.byteLength / this.BYTES_PER_ELEMENT; + } else { + this.length = ECMAScript.ToUint32(length); + this.byteLength = this.length * this.BYTES_PER_ELEMENT; + } + if (this.byteOffset + this.byteLength > this.buffer.byteLength) { + throw new RangeError("byteOffset and length reference an area beyond the end of the buffer"); + } + } else { + throw new TypeError("Unexpected argument type(s)"); + } + this.constructor = ctor; + configureProperties(this); + makeArrayAccessors(this); + }; + ctor.prototype = new ArrayBufferView(); + ctor.prototype.BYTES_PER_ELEMENT = bytesPerElement; + ctor.prototype._pack = pack; + ctor.prototype._unpack = unpack; + ctor.BYTES_PER_ELEMENT = bytesPerElement; + ctor.prototype._getter = function(index) { + if (arguments.length < 1) + throw new SyntaxError("Not enough arguments"); + index = ECMAScript.ToUint32(index); + if (index >= this.length) { + return undefined2; + } + var bytes = [], i, o; + for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; i < this.BYTES_PER_ELEMENT; i += 1, o += 1) { + bytes.push(this.buffer._bytes[o]); + } + return this._unpack(bytes); + }; + ctor.prototype.get = ctor.prototype._getter; + ctor.prototype._setter = function(index, value) { + if (arguments.length < 2) + throw new SyntaxError("Not enough arguments"); + index = ECMAScript.ToUint32(index); + if (index >= this.length) { + return undefined2; + } + var bytes = this._pack(value), i, o; + for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; i < this.BYTES_PER_ELEMENT; i += 1, o += 1) { + this.buffer._bytes[o] = bytes[i]; + } + }; + ctor.prototype.set = function(index, value) { + if (arguments.length < 1) + throw new SyntaxError("Not enough arguments"); + var array, sequence, offset, len, i, s, d, byteOffset, byteLength, tmp; + if (typeof arguments[0] === "object" && arguments[0].constructor === this.constructor) { + array = arguments[0]; + offset = ECMAScript.ToUint32(arguments[1]); + if (offset + array.length > this.length) { + throw new RangeError("Offset plus length of array is out of range"); + } + byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT; + byteLength = array.length * this.BYTES_PER_ELEMENT; + if (array.buffer === this.buffer) { + tmp = []; + for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) { + tmp[i] = array.buffer._bytes[s]; + } + for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) { + this.buffer._bytes[d] = tmp[i]; + } + } else { + for (i = 0, s = array.byteOffset, d = byteOffset; i < byteLength; i += 1, s += 1, d += 1) { + this.buffer._bytes[d] = array.buffer._bytes[s]; + } + } + } else if (typeof arguments[0] === "object" && typeof arguments[0].length !== "undefined") { + sequence = arguments[0]; + len = ECMAScript.ToUint32(sequence.length); + offset = ECMAScript.ToUint32(arguments[1]); + if (offset + len > this.length) { + throw new RangeError("Offset plus length of array is out of range"); + } + for (i = 0; i < len; i += 1) { + s = sequence[i]; + this._setter(offset + i, Number(s)); + } + } else { + throw new TypeError("Unexpected argument type(s)"); + } + }; + ctor.prototype.subarray = function(start, end) { + function clamp(v, min2, max) { + return v < min2 ? min2 : v > max ? max : v; + } + start = ECMAScript.ToInt32(start); + end = ECMAScript.ToInt32(end); + if (arguments.length < 1) { + start = 0; + } + if (arguments.length < 2) { + end = this.length; + } + if (start < 0) { + start = this.length + start; + } + if (end < 0) { + end = this.length + end; + } + start = clamp(start, 0, this.length); + end = clamp(end, 0, this.length); + var len = end - start; + if (len < 0) { + len = 0; + } + return new this.constructor(this.buffer, this.byteOffset + start * this.BYTES_PER_ELEMENT, len); + }; + return ctor; + } + var Int8Array2 = makeConstructor(1, packI8, unpackI8); + var Uint8Array2 = makeConstructor(1, packU8, unpackU8); + var Uint8ClampedArray2 = makeConstructor(1, packU8Clamped, unpackU8); + var Int16Array2 = makeConstructor(2, packI16, unpackI16); + var Uint16Array2 = makeConstructor(2, packU16, unpackU16); + var Int32Array2 = makeConstructor(4, packI32, unpackI32); + var Uint32Array2 = makeConstructor(4, packU32, unpackU32); + var Float32Array2 = makeConstructor(4, packF32, unpackF32); + var Float64Array2 = makeConstructor(8, packF64, unpackF64); + exports2.Int8Array = exports2.Int8Array || Int8Array2; + exports2.Uint8Array = exports2.Uint8Array || Uint8Array2; + exports2.Uint8ClampedArray = exports2.Uint8ClampedArray || Uint8ClampedArray2; + exports2.Int16Array = exports2.Int16Array || Int16Array2; + exports2.Uint16Array = exports2.Uint16Array || Uint16Array2; + exports2.Int32Array = exports2.Int32Array || Int32Array2; + exports2.Uint32Array = exports2.Uint32Array || Uint32Array2; + exports2.Float32Array = exports2.Float32Array || Float32Array2; + exports2.Float64Array = exports2.Float64Array || Float64Array2; + })(); + (function() { + function r(array, index) { + return ECMAScript.IsCallable(array.get) ? array.get(index) : array[index]; + } + var IS_BIG_ENDIAN = function() { + var u16array = new exports2.Uint16Array([4660]), u8array = new exports2.Uint8Array(u16array.buffer); + return r(u8array, 0) === 18; + }(); + var DataView2 = function DataView3(buffer, byteOffset, byteLength) { + if (arguments.length === 0) { + buffer = new exports2.ArrayBuffer(0); + } else if (!(buffer instanceof exports2.ArrayBuffer || ECMAScript.Class(buffer) === "ArrayBuffer")) { + throw new TypeError("TypeError"); + } + this.buffer = buffer || new exports2.ArrayBuffer(0); + this.byteOffset = ECMAScript.ToUint32(byteOffset); + if (this.byteOffset > this.buffer.byteLength) { + throw new RangeError("byteOffset out of range"); + } + if (arguments.length < 3) { + this.byteLength = this.buffer.byteLength - this.byteOffset; + } else { + this.byteLength = ECMAScript.ToUint32(byteLength); + } + if (this.byteOffset + this.byteLength > this.buffer.byteLength) { + throw new RangeError("byteOffset and length reference an area beyond the end of the buffer"); + } + configureProperties(this); + }; + function makeGetter(arrayType) { + return function(byteOffset, littleEndian) { + byteOffset = ECMAScript.ToUint32(byteOffset); + if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) { + throw new RangeError("Array index out of range"); + } + byteOffset += this.byteOffset; + var uint8Array = new exports2.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT), bytes = [], i; + for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) { + bytes.push(r(uint8Array, i)); + } + if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) { + bytes.reverse(); + } + return r(new arrayType(new exports2.Uint8Array(bytes).buffer), 0); + }; + } + DataView2.prototype.getUint8 = makeGetter(exports2.Uint8Array); + DataView2.prototype.getInt8 = makeGetter(exports2.Int8Array); + DataView2.prototype.getUint16 = makeGetter(exports2.Uint16Array); + DataView2.prototype.getInt16 = makeGetter(exports2.Int16Array); + DataView2.prototype.getUint32 = makeGetter(exports2.Uint32Array); + DataView2.prototype.getInt32 = makeGetter(exports2.Int32Array); + DataView2.prototype.getFloat32 = makeGetter(exports2.Float32Array); + DataView2.prototype.getFloat64 = makeGetter(exports2.Float64Array); + function makeSetter(arrayType) { + return function(byteOffset, value, littleEndian) { + byteOffset = ECMAScript.ToUint32(byteOffset); + if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) { + throw new RangeError("Array index out of range"); + } + var typeArray = new arrayType([value]), byteArray = new exports2.Uint8Array(typeArray.buffer), bytes = [], i, byteView; + for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) { + bytes.push(r(byteArray, i)); + } + if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) { + bytes.reverse(); + } + byteView = new exports2.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT); + byteView.set(bytes); + }; + } + DataView2.prototype.setUint8 = makeSetter(exports2.Uint8Array); + DataView2.prototype.setInt8 = makeSetter(exports2.Int8Array); + DataView2.prototype.setUint16 = makeSetter(exports2.Uint16Array); + DataView2.prototype.setInt16 = makeSetter(exports2.Int16Array); + DataView2.prototype.setUint32 = makeSetter(exports2.Uint32Array); + DataView2.prototype.setInt32 = makeSetter(exports2.Int32Array); + DataView2.prototype.setFloat32 = makeSetter(exports2.Float32Array); + DataView2.prototype.setFloat64 = makeSetter(exports2.Float64Array); + exports2.DataView = exports2.DataView || DataView2; + })(); + } +}); + +// ../../node_modules/.pnpm/concat-stream@2.0.0/node_modules/concat-stream/index.js +var require_concat_stream = __commonJS({ + "../../node_modules/.pnpm/concat-stream@2.0.0/node_modules/concat-stream/index.js"(exports2, module2) { + var Writable = require_readable().Writable; + var inherits = require_inherits(); + var bufferFrom = require_buffer_from(); + if (typeof Uint8Array === "undefined") { + U8 = require_typedarray().Uint8Array; + } else { + U8 = Uint8Array; + } + var U8; + function ConcatStream(opts, cb) { + if (!(this instanceof ConcatStream)) + return new ConcatStream(opts, cb); + if (typeof opts === "function") { + cb = opts; + opts = {}; + } + if (!opts) + opts = {}; + var encoding = opts.encoding; + var shouldInferEncoding = false; + if (!encoding) { + shouldInferEncoding = true; + } else { + encoding = String(encoding).toLowerCase(); + if (encoding === "u8" || encoding === "uint8") { + encoding = "uint8array"; + } + } + Writable.call(this, { objectMode: true }); + this.encoding = encoding; + this.shouldInferEncoding = shouldInferEncoding; + if (cb) + this.on("finish", function() { + cb(this.getBody()); + }); + this.body = []; + } + module2.exports = ConcatStream; + inherits(ConcatStream, Writable); + ConcatStream.prototype._write = function(chunk, enc, next) { + this.body.push(chunk); + next(); + }; + ConcatStream.prototype.inferEncoding = function(buff) { + var firstBuffer = buff === void 0 ? this.body[0] : buff; + if (Buffer.isBuffer(firstBuffer)) + return "buffer"; + if (typeof Uint8Array !== "undefined" && firstBuffer instanceof Uint8Array) + return "uint8array"; + if (Array.isArray(firstBuffer)) + return "array"; + if (typeof firstBuffer === "string") + return "string"; + if (Object.prototype.toString.call(firstBuffer) === "[object Object]") + return "object"; + return "buffer"; + }; + ConcatStream.prototype.getBody = function() { + if (!this.encoding && this.body.length === 0) + return []; + if (this.shouldInferEncoding) + this.encoding = this.inferEncoding(); + if (this.encoding === "array") + return arrayConcat(this.body); + if (this.encoding === "string") + return stringConcat(this.body); + if (this.encoding === "buffer") + return bufferConcat(this.body); + if (this.encoding === "uint8array") + return u8Concat(this.body); + return this.body; + }; + var isArray = Array.isArray || function(arr) { + return Object.prototype.toString.call(arr) == "[object Array]"; + }; + function isArrayish(arr) { + return /Array\]$/.test(Object.prototype.toString.call(arr)); + } + function isBufferish(p) { + return typeof p === "string" || isArrayish(p) || p && typeof p.subarray === "function"; + } + function stringConcat(parts) { + var strings = []; + var needsToString = false; + for (var i = 0; i < parts.length; i++) { + var p = parts[i]; + if (typeof p === "string") { + strings.push(p); + } else if (Buffer.isBuffer(p)) { + strings.push(p); + } else if (isBufferish(p)) { + strings.push(bufferFrom(p)); + } else { + strings.push(bufferFrom(String(p))); + } + } + if (Buffer.isBuffer(parts[0])) { + strings = Buffer.concat(strings); + strings = strings.toString("utf8"); + } else { + strings = strings.join(""); + } + return strings; + } + function bufferConcat(parts) { + var bufs = []; + for (var i = 0; i < parts.length; i++) { + var p = parts[i]; + if (Buffer.isBuffer(p)) { + bufs.push(p); + } else if (isBufferish(p)) { + bufs.push(bufferFrom(p)); + } else { + bufs.push(bufferFrom(String(p))); + } + } + return Buffer.concat(bufs); + } + function arrayConcat(parts) { + var res = []; + for (var i = 0; i < parts.length; i++) { + res.push.apply(res, parts[i]); + } + return res; + } + function u8Concat(parts) { + var len = 0; + for (var i = 0; i < parts.length; i++) { + if (typeof parts[i] === "string") { + parts[i] = bufferFrom(parts[i]); + } + len += parts[i].length; + } + var u8 = new U8(len); + for (var i = 0, offset = 0; i < parts.length; i++) { + var part = parts[i]; + for (var j = 0; j < part.length; j++) { + u8[offset++] = part[j]; + } + } + return u8; + } + } +}); + +// ../cafs/lib/parseJson.js +var require_parseJson = __commonJS({ + "../cafs/lib/parseJson.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.parseJsonStream = exports2.parseJsonBuffer = void 0; + var concat_stream_1 = __importDefault(require_concat_stream()); + var strip_bom_1 = __importDefault(require_strip_bom()); + function parseJsonBuffer(buffer, deferred) { + try { + deferred.resolve(JSON.parse(strip_bom_1.default(buffer.toString()))); + } catch (err) { + deferred.reject(err); + } + } + exports2.parseJsonBuffer = parseJsonBuffer; + function parseJsonStream(stream, deferred) { + stream.pipe(concat_stream_1.default((buffer) => parseJsonBuffer(buffer, deferred))); + } + exports2.parseJsonStream = parseJsonStream; + } +}); + +// ../cafs/lib/addFilesFromDir.js +var require_addFilesFromDir = __commonJS({ + "../cafs/lib/addFilesFromDir.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var graceful_fs_1 = __importDefault(require_lib18()); + var p_limit_1 = __importDefault(require_p_limit()); + var parseJson_1 = require_parseJson(); + var limit = p_limit_1.default(20); + var MAX_BULK_SIZE = 1 * 1024 * 1024; + async function default_1(cafs, dirname, manifest) { + const index = {}; + await _retrieveFileIntegrities(cafs, dirname, dirname, index, manifest); + return index; + } + exports2.default = default_1; + async function _retrieveFileIntegrities(cafs, rootDir, currDir, index, deferredManifest) { + try { + const files = await fs_1.promises.readdir(currDir); + await Promise.all(files.map(async (file) => { + const fullPath = path_1.default.join(currDir, file); + const stat = await fs_1.promises.stat(fullPath); + if (stat.isDirectory()) { + await _retrieveFileIntegrities(cafs, rootDir, fullPath, index); + return; + } + if (stat.isFile()) { + const relativePath = path_1.default.relative(rootDir, fullPath); + const writeResult = limit(async () => { + if (deferredManifest != null && rootDir === currDir && file === "package.json") { + const buffer = await graceful_fs_1.default.readFile(fullPath); + parseJson_1.parseJsonBuffer(buffer, deferredManifest); + return cafs.addBuffer(buffer, stat.mode); + } + if (stat.size < MAX_BULK_SIZE) { + const buffer = await graceful_fs_1.default.readFile(fullPath); + return cafs.addBuffer(buffer, stat.mode); + } + return cafs.addStream(graceful_fs_1.default.createReadStream(fullPath), stat.mode); + }); + index[relativePath] = { + mode: stat.mode, + size: stat.size, + writeResult + }; + } + })); + } catch (err) { + if (err.code !== "ENOENT") { + throw err; + } + } + } + } +}); + +// ../../node_modules/.pnpm/through@2.3.8/node_modules/through/index.js +var require_through = __commonJS({ + "../../node_modules/.pnpm/through@2.3.8/node_modules/through/index.js"(exports2, module2) { + var Stream = require("stream"); + exports2 = module2.exports = through; + through.through = through; + function through(write, end, opts) { + write = write || function(data) { + this.queue(data); + }; + end = end || function() { + this.queue(null); + }; + var ended = false, destroyed = false, buffer = [], _ended = false; + var stream = new Stream(); + stream.readable = stream.writable = true; + stream.paused = false; + stream.autoDestroy = !(opts && opts.autoDestroy === false); + stream.write = function(data) { + write.call(this, data); + return !stream.paused; + }; + function drain() { + while (buffer.length && !stream.paused) { + var data = buffer.shift(); + if (data === null) + return stream.emit("end"); + else + stream.emit("data", data); + } + } + stream.queue = stream.push = function(data) { + if (_ended) + return stream; + if (data === null) + _ended = true; + buffer.push(data); + drain(); + return stream; + }; + stream.on("end", function() { + stream.readable = false; + if (!stream.writable && stream.autoDestroy) + process.nextTick(function() { + stream.destroy(); + }); + }); + function _end() { + stream.writable = false; + end.call(stream); + if (!stream.readable && stream.autoDestroy) + stream.destroy(); + } + stream.end = function(data) { + if (ended) + return; + ended = true; + if (arguments.length) + stream.write(data); + _end(); + return stream; + }; + stream.destroy = function() { + if (destroyed) + return; + destroyed = true; + ended = true; + buffer.length = 0; + stream.writable = stream.readable = false; + stream.emit("close"); + return stream; + }; + stream.pause = function() { + if (stream.paused) + return; + stream.paused = true; + return stream; + }; + stream.resume = function() { + if (stream.paused) { + stream.paused = false; + stream.emit("resume"); + } + drain(); + if (!stream.paused) + stream.emit("drain"); + return stream; + }; + return stream; + } + } +}); + +// ../../node_modules/.pnpm/unbzip2-stream@1.4.3/node_modules/unbzip2-stream/lib/bzip2.js +var require_bzip2 = __commonJS({ + "../../node_modules/.pnpm/unbzip2-stream@1.4.3/node_modules/unbzip2-stream/lib/bzip2.js"(exports2, module2) { + function Bzip2Error(message3) { + this.name = "Bzip2Error"; + this.message = message3; + this.stack = new Error().stack; + } + Bzip2Error.prototype = new Error(); + var message2 = { + Error: function(message3) { + throw new Bzip2Error(message3); + } + }; + var bzip2 = {}; + bzip2.Bzip2Error = Bzip2Error; + bzip2.crcTable = [ + 0, + 79764919, + 159529838, + 222504665, + 319059676, + 398814059, + 445009330, + 507990021, + 638119352, + 583659535, + 797628118, + 726387553, + 890018660, + 835552979, + 1015980042, + 944750013, + 1276238704, + 1221641927, + 1167319070, + 1095957929, + 1595256236, + 1540665371, + 1452775106, + 1381403509, + 1780037320, + 1859660671, + 1671105958, + 1733955601, + 2031960084, + 2111593891, + 1889500026, + 1952343757, + 2552477408, + 2632100695, + 2443283854, + 2506133561, + 2334638140, + 2414271883, + 2191915858, + 2254759653, + 3190512472, + 3135915759, + 3081330742, + 3009969537, + 2905550212, + 2850959411, + 2762807018, + 2691435357, + 3560074640, + 3505614887, + 3719321342, + 3648080713, + 3342211916, + 3287746299, + 3467911202, + 3396681109, + 4063920168, + 4143685023, + 4223187782, + 4286162673, + 3779000052, + 3858754371, + 3904687514, + 3967668269, + 881225847, + 809987520, + 1023691545, + 969234094, + 662832811, + 591600412, + 771767749, + 717299826, + 311336399, + 374308984, + 453813921, + 533576470, + 25881363, + 88864420, + 134795389, + 214552010, + 2023205639, + 2086057648, + 1897238633, + 1976864222, + 1804852699, + 1867694188, + 1645340341, + 1724971778, + 1587496639, + 1516133128, + 1461550545, + 1406951526, + 1302016099, + 1230646740, + 1142491917, + 1087903418, + 2896545431, + 2825181984, + 2770861561, + 2716262478, + 3215044683, + 3143675388, + 3055782693, + 3001194130, + 2326604591, + 2389456536, + 2200899649, + 2280525302, + 2578013683, + 2640855108, + 2418763421, + 2498394922, + 3769900519, + 3832873040, + 3912640137, + 3992402750, + 4088425275, + 4151408268, + 4197601365, + 4277358050, + 3334271071, + 3263032808, + 3476998961, + 3422541446, + 3585640067, + 3514407732, + 3694837229, + 3640369242, + 1762451694, + 1842216281, + 1619975040, + 1682949687, + 2047383090, + 2127137669, + 1938468188, + 2001449195, + 1325665622, + 1271206113, + 1183200824, + 1111960463, + 1543535498, + 1489069629, + 1434599652, + 1363369299, + 622672798, + 568075817, + 748617968, + 677256519, + 907627842, + 853037301, + 1067152940, + 995781531, + 51762726, + 131386257, + 177728840, + 240578815, + 269590778, + 349224269, + 429104020, + 491947555, + 4046411278, + 4126034873, + 4172115296, + 4234965207, + 3794477266, + 3874110821, + 3953728444, + 4016571915, + 3609705398, + 3555108353, + 3735388376, + 3664026991, + 3290680682, + 3236090077, + 3449943556, + 3378572211, + 3174993278, + 3120533705, + 3032266256, + 2961025959, + 2923101090, + 2868635157, + 2813903052, + 2742672763, + 2604032198, + 2683796849, + 2461293480, + 2524268063, + 2284983834, + 2364738477, + 2175806836, + 2238787779, + 1569362073, + 1498123566, + 1409854455, + 1355396672, + 1317987909, + 1246755826, + 1192025387, + 1137557660, + 2072149281, + 2135122070, + 1912620623, + 1992383480, + 1753615357, + 1816598090, + 1627664531, + 1707420964, + 295390185, + 358241886, + 404320391, + 483945776, + 43990325, + 106832002, + 186451547, + 266083308, + 932423249, + 861060070, + 1041341759, + 986742920, + 613929101, + 542559546, + 756411363, + 701822548, + 3316196985, + 3244833742, + 3425377559, + 3370778784, + 3601682597, + 3530312978, + 3744426955, + 3689838204, + 3819031489, + 3881883254, + 3928223919, + 4007849240, + 4037393693, + 4100235434, + 4180117107, + 4259748804, + 2310601993, + 2373574846, + 2151335527, + 2231098320, + 2596047829, + 2659030626, + 2470359227, + 2550115596, + 2947551409, + 2876312838, + 2788305887, + 2733848168, + 3165939309, + 3094707162, + 3040238851, + 2985771188 + ]; + bzip2.array = function(bytes) { + var bit = 0, byte = 0; + var BITMASK = [0, 1, 3, 7, 15, 31, 63, 127, 255]; + return function(n) { + var result = 0; + while (n > 0) { + var left = 8 - bit; + if (n >= left) { + result <<= left; + result |= BITMASK[left] & bytes[byte++]; + bit = 0; + n -= left; + } else { + result <<= n; + result |= (bytes[byte] & BITMASK[n] << 8 - n - bit) >> 8 - n - bit; + bit += n; + n = 0; + } + } + return result; + }; + }; + bzip2.simple = function(srcbuffer, stream) { + var bits = bzip2.array(srcbuffer); + var size = bzip2.header(bits); + var ret = false; + var bufsize = 1e5 * size; + var buf = new Int32Array(bufsize); + do { + ret = bzip2.decompress(bits, stream, buf, bufsize); + } while (!ret); + }; + bzip2.header = function(bits) { + this.byteCount = new Int32Array(256); + this.symToByte = new Uint8Array(256); + this.mtfSymbol = new Int32Array(256); + this.selectors = new Uint8Array(32768); + if (bits(8 * 3) != 4348520) + message2.Error("No magic number found"); + var i = bits(8) - 48; + if (i < 1 || i > 9) + message2.Error("Not a BZIP archive"); + return i; + }; + bzip2.decompress = function(bits, stream, buf, bufsize, streamCRC) { + var MAX_HUFCODE_BITS = 20; + var MAX_SYMBOLS = 258; + var SYMBOL_RUNA = 0; + var SYMBOL_RUNB = 1; + var GROUP_SIZE = 50; + var crc = 0 ^ -1; + for (var h = "", i = 0; i < 6; i++) + h += bits(8).toString(16); + if (h == "177245385090") { + var finalCRC = bits(32) | 0; + if (finalCRC !== streamCRC) + message2.Error("Error in bzip2: crc32 do not match"); + bits(null); + return null; + } + if (h != "314159265359") + message2.Error("eek not valid bzip data"); + var crcblock = bits(32) | 0; + if (bits(1)) + message2.Error("unsupported obsolete version"); + var origPtr = bits(24); + if (origPtr > bufsize) + message2.Error("Initial position larger than buffer size"); + var t = bits(16); + var symTotal = 0; + for (i = 0; i < 16; i++) { + if (t & 1 << 15 - i) { + var k = bits(16); + for (j = 0; j < 16; j++) { + if (k & 1 << 15 - j) { + this.symToByte[symTotal++] = 16 * i + j; + } + } + } + } + var groupCount = bits(3); + if (groupCount < 2 || groupCount > 6) + message2.Error("another error"); + var nSelectors = bits(15); + if (nSelectors == 0) + message2.Error("meh"); + for (var i = 0; i < groupCount; i++) + this.mtfSymbol[i] = i; + for (var i = 0; i < nSelectors; i++) { + for (var j = 0; bits(1); j++) + if (j >= groupCount) + message2.Error("whoops another error"); + var uc = this.mtfSymbol[j]; + for (var k = j - 1; k >= 0; k--) { + this.mtfSymbol[k + 1] = this.mtfSymbol[k]; + } + this.mtfSymbol[0] = uc; + this.selectors[i] = uc; + } + var symCount = symTotal + 2; + var groups = []; + var length = new Uint8Array(MAX_SYMBOLS), temp = new Uint16Array(MAX_HUFCODE_BITS + 1); + var hufGroup; + for (var j = 0; j < groupCount; j++) { + t = bits(5); + for (var i = 0; i < symCount; i++) { + while (true) { + if (t < 1 || t > MAX_HUFCODE_BITS) + message2.Error("I gave up a while ago on writing error messages"); + if (!bits(1)) + break; + if (!bits(1)) + t++; + else + t--; + } + length[i] = t; + } + var minLen, maxLen; + minLen = maxLen = length[0]; + for (var i = 1; i < symCount; i++) { + if (length[i] > maxLen) + maxLen = length[i]; + else if (length[i] < minLen) + minLen = length[i]; + } + hufGroup = groups[j] = {}; + hufGroup.permute = new Int32Array(MAX_SYMBOLS); + hufGroup.limit = new Int32Array(MAX_HUFCODE_BITS + 1); + hufGroup.base = new Int32Array(MAX_HUFCODE_BITS + 1); + hufGroup.minLen = minLen; + hufGroup.maxLen = maxLen; + var base = hufGroup.base; + var limit = hufGroup.limit; + var pp = 0; + for (var i = minLen; i <= maxLen; i++) + for (var t = 0; t < symCount; t++) + if (length[t] == i) + hufGroup.permute[pp++] = t; + for (i = minLen; i <= maxLen; i++) + temp[i] = limit[i] = 0; + for (i = 0; i < symCount; i++) + temp[length[i]]++; + pp = t = 0; + for (i = minLen; i < maxLen; i++) { + pp += temp[i]; + limit[i] = pp - 1; + pp <<= 1; + base[i + 1] = pp - (t += temp[i]); + } + limit[maxLen] = pp + temp[maxLen] - 1; + base[minLen] = 0; + } + for (var i = 0; i < 256; i++) { + this.mtfSymbol[i] = i; + this.byteCount[i] = 0; + } + var runPos, count, symCount, selector; + runPos = count = symCount = selector = 0; + while (true) { + if (!symCount--) { + symCount = GROUP_SIZE - 1; + if (selector >= nSelectors) + message2.Error("meow i'm a kitty, that's an error"); + hufGroup = groups[this.selectors[selector++]]; + base = hufGroup.base; + limit = hufGroup.limit; + } + i = hufGroup.minLen; + j = bits(i); + while (true) { + if (i > hufGroup.maxLen) + message2.Error("rawr i'm a dinosaur"); + if (j <= limit[i]) + break; + i++; + j = j << 1 | bits(1); + } + j -= base[i]; + if (j < 0 || j >= MAX_SYMBOLS) + message2.Error("moo i'm a cow"); + var nextSym = hufGroup.permute[j]; + if (nextSym == SYMBOL_RUNA || nextSym == SYMBOL_RUNB) { + if (!runPos) { + runPos = 1; + t = 0; + } + if (nextSym == SYMBOL_RUNA) + t += runPos; + else + t += 2 * runPos; + runPos <<= 1; + continue; + } + if (runPos) { + runPos = 0; + if (count + t > bufsize) + message2.Error("Boom."); + uc = this.symToByte[this.mtfSymbol[0]]; + this.byteCount[uc] += t; + while (t--) + buf[count++] = uc; + } + if (nextSym > symTotal) + break; + if (count >= bufsize) + message2.Error("I can't think of anything. Error"); + i = nextSym - 1; + uc = this.mtfSymbol[i]; + for (var k = i - 1; k >= 0; k--) { + this.mtfSymbol[k + 1] = this.mtfSymbol[k]; + } + this.mtfSymbol[0] = uc; + uc = this.symToByte[uc]; + this.byteCount[uc]++; + buf[count++] = uc; + } + if (origPtr < 0 || origPtr >= count) + message2.Error("I'm a monkey and I'm throwing something at someone, namely you"); + var j = 0; + for (var i = 0; i < 256; i++) { + k = j + this.byteCount[i]; + this.byteCount[i] = j; + j = k; + } + for (var i = 0; i < count; i++) { + uc = buf[i] & 255; + buf[this.byteCount[uc]] |= i << 8; + this.byteCount[uc]++; + } + var pos = 0, current = 0, run = 0; + if (count) { + pos = buf[origPtr]; + current = pos & 255; + pos >>= 8; + run = -1; + } + count = count; + var copies, previous, outbyte; + while (count) { + count--; + previous = current; + pos = buf[pos]; + current = pos & 255; + pos >>= 8; + if (run++ == 3) { + copies = current; + outbyte = previous; + current = -1; + } else { + copies = 1; + outbyte = current; + } + while (copies--) { + crc = (crc << 8 ^ this.crcTable[(crc >> 24 ^ outbyte) & 255]) & 4294967295; + stream(outbyte); + } + if (current != previous) + run = 0; + } + crc = (crc ^ -1) >>> 0; + if ((crc | 0) != (crcblock | 0)) + message2.Error("Error in bzip2: crc32 do not match"); + streamCRC = (crc ^ (streamCRC << 1 | streamCRC >>> 31)) & 4294967295; + return streamCRC; + }; + module2.exports = bzip2; + } +}); + +// ../../node_modules/.pnpm/unbzip2-stream@1.4.3/node_modules/unbzip2-stream/lib/bit_iterator.js +var require_bit_iterator = __commonJS({ + "../../node_modules/.pnpm/unbzip2-stream@1.4.3/node_modules/unbzip2-stream/lib/bit_iterator.js"(exports2, module2) { + var BITMASK = [0, 1, 3, 7, 15, 31, 63, 127, 255]; + module2.exports = function bitIterator(nextBuffer) { + var bit = 0, byte = 0; + var bytes = nextBuffer(); + var f = function(n) { + if (n === null && bit != 0) { + bit = 0; + byte++; + return; + } + var result = 0; + while (n > 0) { + if (byte >= bytes.length) { + byte = 0; + bytes = nextBuffer(); + } + var left = 8 - bit; + if (bit === 0 && n > 0) + f.bytesRead++; + if (n >= left) { + result <<= left; + result |= BITMASK[left] & bytes[byte++]; + bit = 0; + n -= left; + } else { + result <<= n; + result |= (bytes[byte] & BITMASK[n] << 8 - n - bit) >> 8 - n - bit; + bit += n; + n = 0; + } + } + return result; + }; + f.bytesRead = 0; + return f; + }; + } +}); + +// ../../node_modules/.pnpm/unbzip2-stream@1.4.3/node_modules/unbzip2-stream/index.js +var require_unbzip2_stream = __commonJS({ + "../../node_modules/.pnpm/unbzip2-stream@1.4.3/node_modules/unbzip2-stream/index.js"(exports2, module2) { + var through = require_through(); + var bz2 = require_bzip2(); + var bitIterator = require_bit_iterator(); + module2.exports = unbzip2Stream; + function unbzip2Stream() { + var bufferQueue = []; + var hasBytes = 0; + var blockSize = 0; + var broken = false; + var done = false; + var bitReader = null; + var streamCRC = null; + function decompressBlock(push) { + if (!blockSize) { + blockSize = bz2.header(bitReader); + streamCRC = 0; + return true; + } else { + var bufsize = 1e5 * blockSize; + var buf = new Int32Array(bufsize); + var chunk = []; + var f = function(b) { + chunk.push(b); + }; + streamCRC = bz2.decompress(bitReader, f, buf, bufsize, streamCRC); + if (streamCRC === null) { + blockSize = 0; + return false; + } else { + push(Buffer.from(chunk)); + return true; + } + } + } + var outlength = 0; + function decompressAndQueue(stream) { + if (broken) + return; + try { + return decompressBlock(function(d) { + stream.queue(d); + if (d !== null) { + outlength += d.length; + } else { + } + }); + } catch (e) { + stream.emit("error", e); + broken = true; + return false; + } + } + return through(function write(data) { + bufferQueue.push(data); + hasBytes += data.length; + if (bitReader === null) { + bitReader = bitIterator(function() { + return bufferQueue.shift(); + }); + } + while (!broken && hasBytes - bitReader.bytesRead + 1 >= (25e3 + 1e5 * blockSize || 4)) { + decompressAndQueue(this); + } + }, function end(x) { + while (!broken && bitReader && hasBytes > bitReader.bytesRead) { + decompressAndQueue(this); + } + if (!broken) { + if (streamCRC !== null) + this.emit("error", new Error("input stream ended prematurely")); + this.queue(null); + } + }); + } + } +}); + +// ../../node_modules/.pnpm/is-bzip2@1.0.0/node_modules/is-bzip2/index.js +var require_is_bzip2 = __commonJS({ + "../../node_modules/.pnpm/is-bzip2@1.0.0/node_modules/is-bzip2/index.js"(exports2, module2) { + "use strict"; + module2.exports = function(buf) { + if (!buf || buf.length < 3) { + return false; + } + return buf[0] === 66 && buf[1] === 90 && buf[2] === 104; + }; + } +}); + +// ../../node_modules/.pnpm/process-nextick-args@2.0.1/node_modules/process-nextick-args/index.js +var require_process_nextick_args = __commonJS({ + "../../node_modules/.pnpm/process-nextick-args@2.0.1/node_modules/process-nextick-args/index.js"(exports2, module2) { + "use strict"; + if (typeof process === "undefined" || !process.version || process.version.indexOf("v0.") === 0 || process.version.indexOf("v1.") === 0 && process.version.indexOf("v1.8.") !== 0) { + module2.exports = { nextTick }; + } else { + module2.exports = process; + } + function nextTick(fn2, arg1, arg2, arg3) { + if (typeof fn2 !== "function") { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args2, i; + switch (len) { + case 0: + case 1: + return process.nextTick(fn2); + case 2: + return process.nextTick(function afterTickOne() { + fn2.call(null, arg1); + }); + case 3: + return process.nextTick(function afterTickTwo() { + fn2.call(null, arg1, arg2); + }); + case 4: + return process.nextTick(function afterTickThree() { + fn2.call(null, arg1, arg2, arg3); + }); + default: + args2 = new Array(len - 1); + i = 0; + while (i < args2.length) { + args2[i++] = arguments[i]; + } + return process.nextTick(function afterTick() { + fn2.apply(null, args2); + }); + } + } + } +}); + +// ../../node_modules/.pnpm/isarray@1.0.0/node_modules/isarray/index.js +var require_isarray = __commonJS({ + "../../node_modules/.pnpm/isarray@1.0.0/node_modules/isarray/index.js"(exports2, module2) { + var toString = {}.toString; + module2.exports = Array.isArray || function(arr) { + return toString.call(arr) == "[object Array]"; + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/internal/streams/stream.js +var require_stream7 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/internal/streams/stream.js"(exports2, module2) { + module2.exports = require("stream"); + } +}); + +// ../../node_modules/.pnpm/safe-buffer@5.1.2/node_modules/safe-buffer/index.js +var require_safe_buffer = __commonJS({ + "../../node_modules/.pnpm/safe-buffer@5.1.2/node_modules/safe-buffer/index.js"(exports2, module2) { + var buffer = require("buffer"); + var Buffer2 = buffer.Buffer; + function copyProps(src, dst) { + for (var key in src) { + dst[key] = src[key]; + } + } + if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) { + module2.exports = buffer; + } else { + copyProps(buffer, exports2); + exports2.Buffer = SafeBuffer; + } + function SafeBuffer(arg, encodingOrOffset, length) { + return Buffer2(arg, encodingOrOffset, length); + } + copyProps(Buffer2, SafeBuffer); + SafeBuffer.from = function(arg, encodingOrOffset, length) { + if (typeof arg === "number") { + throw new TypeError("Argument must not be a number"); + } + return Buffer2(arg, encodingOrOffset, length); + }; + SafeBuffer.alloc = function(size, fill, encoding) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + var buf = Buffer2(size); + if (fill !== void 0) { + if (typeof encoding === "string") { + buf.fill(fill, encoding); + } else { + buf.fill(fill); + } + } else { + buf.fill(0); + } + return buf; + }; + SafeBuffer.allocUnsafe = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return Buffer2(size); + }; + SafeBuffer.allocUnsafeSlow = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return buffer.SlowBuffer(size); + }; + } +}); + +// ../../node_modules/.pnpm/core-util-is@1.0.3/node_modules/core-util-is/lib/util.js +var require_util6 = __commonJS({ + "../../node_modules/.pnpm/core-util-is@1.0.3/node_modules/core-util-is/lib/util.js"(exports2) { + function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === "[object Array]"; + } + exports2.isArray = isArray; + function isBoolean(arg) { + return typeof arg === "boolean"; + } + exports2.isBoolean = isBoolean; + function isNull(arg) { + return arg === null; + } + exports2.isNull = isNull; + function isNullOrUndefined(arg) { + return arg == null; + } + exports2.isNullOrUndefined = isNullOrUndefined; + function isNumber(arg) { + return typeof arg === "number"; + } + exports2.isNumber = isNumber; + function isString(arg) { + return typeof arg === "string"; + } + exports2.isString = isString; + function isSymbol(arg) { + return typeof arg === "symbol"; + } + exports2.isSymbol = isSymbol; + function isUndefined(arg) { + return arg === void 0; + } + exports2.isUndefined = isUndefined; + function isRegExp(re) { + return objectToString(re) === "[object RegExp]"; + } + exports2.isRegExp = isRegExp; + function isObject(arg) { + return typeof arg === "object" && arg !== null; + } + exports2.isObject = isObject; + function isDate(d) { + return objectToString(d) === "[object Date]"; + } + exports2.isDate = isDate; + function isError(e) { + return objectToString(e) === "[object Error]" || e instanceof Error; + } + exports2.isError = isError; + function isFunction(arg) { + return typeof arg === "function"; + } + exports2.isFunction = isFunction; + function isPrimitive(arg) { + return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || typeof arg === "undefined"; + } + exports2.isPrimitive = isPrimitive; + exports2.isBuffer = require("buffer").Buffer.isBuffer; + function objectToString(o) { + return Object.prototype.toString.call(o); + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/internal/streams/BufferList.js +var require_BufferList = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/internal/streams/BufferList.js"(exports2, module2) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + var Buffer2 = require_safe_buffer().Buffer; + var util = require("util"); + function copyBuffer(src, target, offset) { + src.copy(target, offset); + } + module2.exports = function() { + function BufferList() { + _classCallCheck(this, BufferList); + this.head = null; + this.tail = null; + this.length = 0; + } + BufferList.prototype.push = function push(v) { + var entry = { data: v, next: null }; + if (this.length > 0) + this.tail.next = entry; + else + this.head = entry; + this.tail = entry; + ++this.length; + }; + BufferList.prototype.unshift = function unshift(v) { + var entry = { data: v, next: this.head }; + if (this.length === 0) + this.tail = entry; + this.head = entry; + ++this.length; + }; + BufferList.prototype.shift = function shift() { + if (this.length === 0) + return; + var ret = this.head.data; + if (this.length === 1) + this.head = this.tail = null; + else + this.head = this.head.next; + --this.length; + return ret; + }; + BufferList.prototype.clear = function clear() { + this.head = this.tail = null; + this.length = 0; + }; + BufferList.prototype.join = function join(s) { + if (this.length === 0) + return ""; + var p = this.head; + var ret = "" + p.data; + while (p = p.next) { + ret += s + p.data; + } + return ret; + }; + BufferList.prototype.concat = function concat(n) { + if (this.length === 0) + return Buffer2.alloc(0); + if (this.length === 1) + return this.head.data; + var ret = Buffer2.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } + return ret; + }; + return BufferList; + }(); + if (util && util.inspect && util.inspect.custom) { + module2.exports.prototype[util.inspect.custom] = function() { + var obj = util.inspect({ length: this.length }); + return this.constructor.name + " " + obj; + }; + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/internal/streams/destroy.js +var require_destroy2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/internal/streams/destroy.js"(exports2, module2) { + "use strict"; + var pna = require_process_nextick_args(); + function destroy(err, cb) { + var _this = this; + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { + pna.nextTick(emitErrorNT, this, err); + } + return this; + } + if (this._readableState) { + this._readableState.destroyed = true; + } + if (this._writableState) { + this._writableState.destroyed = true; + } + this._destroy(err || null, function(err2) { + if (!cb && err2) { + pna.nextTick(emitErrorNT, _this, err2); + if (_this._writableState) { + _this._writableState.errorEmitted = true; + } + } else if (cb) { + cb(err2); + } + }); + return this; + } + function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } + } + function emitErrorNT(self2, err) { + self2.emit("error", err); + } + module2.exports = { + destroy, + undestroy + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/_stream_writable.js +var require_stream_writable2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/_stream_writable.js"(exports2, module2) { + "use strict"; + var pna = require_process_nextick_args(); + module2.exports = Writable; + function CorkedRequest(state) { + var _this = this; + this.next = null; + this.entry = null; + this.finish = function() { + onCorkedFinish(_this, state); + }; + } + var asyncWrite = !process.browser && ["v0.10", "v0.9."].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; + var Duplex; + Writable.WritableState = WritableState; + var util = Object.create(require_util6()); + util.inherits = require_inherits(); + var internalUtil = { + deprecate: require_node2() + }; + var Stream = require_stream7(); + var Buffer2 = require_safe_buffer().Buffer; + var OurUint8Array = global.Uint8Array || function() { + }; + function _uint8ArrayToBuffer(chunk) { + return Buffer2.from(chunk); + } + function _isUint8Array(obj) { + return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; + } + var destroyImpl = require_destroy2(); + util.inherits(Writable, Stream); + function nop() { + } + function WritableState(options, stream) { + Duplex = Duplex || require_stream_duplex2(); + options = options || {}; + var isDuplex = stream instanceof Duplex; + this.objectMode = !!options.objectMode; + if (isDuplex) + this.objectMode = this.objectMode || !!options.writableObjectMode; + var hwm = options.highWaterMark; + var writableHwm = options.writableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + if (hwm || hwm === 0) + this.highWaterMark = hwm; + else if (isDuplex && (writableHwm || writableHwm === 0)) + this.highWaterMark = writableHwm; + else + this.highWaterMark = defaultHwm; + this.highWaterMark = Math.floor(this.highWaterMark); + this.finalCalled = false; + this.needDrain = false; + this.ending = false; + this.ended = false; + this.finished = false; + this.destroyed = false; + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + this.defaultEncoding = options.defaultEncoding || "utf8"; + this.length = 0; + this.writing = false; + this.corked = 0; + this.sync = true; + this.bufferProcessing = false; + this.onwrite = function(er) { + onwrite(stream, er); + }; + this.writecb = null; + this.writelen = 0; + this.bufferedRequest = null; + this.lastBufferedRequest = null; + this.pendingcb = 0; + this.prefinished = false; + this.errorEmitted = false; + this.bufferedRequestCount = 0; + this.corkedRequestsFree = new CorkedRequest(this); + } + WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; + }; + (function() { + try { + Object.defineProperty(WritableState.prototype, "buffer", { + get: internalUtil.deprecate(function() { + return this.getBuffer(); + }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") + }); + } catch (_) { + } + })(); + var realHasInstance; + if (typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function") { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function(object) { + if (realHasInstance.call(this, object)) + return true; + if (this !== Writable) + return false; + return object && object._writableState instanceof WritableState; + } + }); + } else { + realHasInstance = function(object) { + return object instanceof this; + }; + } + function Writable(options) { + Duplex = Duplex || require_stream_duplex2(); + if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { + return new Writable(options); + } + this._writableState = new WritableState(options, this); + this.writable = true; + if (options) { + if (typeof options.write === "function") + this._write = options.write; + if (typeof options.writev === "function") + this._writev = options.writev; + if (typeof options.destroy === "function") + this._destroy = options.destroy; + if (typeof options.final === "function") + this._final = options.final; + } + Stream.call(this); + } + Writable.prototype.pipe = function() { + this.emit("error", new Error("Cannot pipe, not readable")); + }; + function writeAfterEnd(stream, cb) { + var er = new Error("write after end"); + stream.emit("error", er); + pna.nextTick(cb, er); + } + function validChunk(stream, state, chunk, cb) { + var valid = true; + var er = false; + if (chunk === null) { + er = new TypeError("May not write null values to stream"); + } else if (typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) { + er = new TypeError("Invalid non-string/buffer chunk"); + } + if (er) { + stream.emit("error", er); + pna.nextTick(cb, er); + valid = false; + } + return valid; + } + Writable.prototype.write = function(chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + if (isBuf && !Buffer2.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (typeof encoding === "function") { + cb = encoding; + encoding = null; + } + if (isBuf) + encoding = "buffer"; + else if (!encoding) + encoding = state.defaultEncoding; + if (typeof cb !== "function") + cb = nop; + if (state.ended) + writeAfterEnd(this, cb); + else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + return ret; + }; + Writable.prototype.cork = function() { + var state = this._writableState; + state.corked++; + }; + Writable.prototype.uncork = function() { + var state = this._writableState; + if (state.corked) { + state.corked--; + if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) + clearBuffer(this, state); + } + }; + Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + if (typeof encoding === "string") + encoding = encoding.toLowerCase(); + if (!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((encoding + "").toLowerCase()) > -1)) + throw new TypeError("Unknown encoding: " + encoding); + this._writableState.defaultEncoding = encoding; + return this; + }; + function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === "string") { + chunk = Buffer2.from(chunk, encoding); + } + return chunk; + } + Object.defineProperty(Writable.prototype, "writableHighWaterMark", { + enumerable: false, + get: function() { + return this._writableState.highWaterMark; + } + }); + function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = "buffer"; + chunk = newChunk; + } + } + var len = state.objectMode ? 1 : chunk.length; + state.length += len; + var ret = state.length < state.highWaterMark; + if (!ret) + state.needDrain = true; + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk, + encoding, + isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + return ret; + } + function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) + stream._writev(chunk, state.onwrite); + else + stream._write(chunk, encoding, state.onwrite); + state.sync = false; + } + function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + if (sync) { + pna.nextTick(cb, er); + pna.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + stream.emit("error", er); + } else { + cb(er); + stream._writableState.errorEmitted = true; + stream.emit("error", er); + finishMaybe(stream, state); + } + } + function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; + } + function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + onwriteStateUpdate(state); + if (er) + onwriteError(stream, state, sync, er, cb); + else { + var finished = needFinish(state); + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + if (sync) { + asyncWrite(afterWrite, stream, state, finished, cb); + } else { + afterWrite(stream, state, finished, cb); + } + } + } + function afterWrite(stream, state, finished, cb) { + if (!finished) + onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); + } + function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit("drain"); + } + } + function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + if (stream._writev && entry && entry.next) { + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) + allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + doWrite(stream, state, true, state.length, buffer, "", holder.finish); + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + state.bufferedRequestCount = 0; + } else { + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + if (state.writing) { + break; + } + } + if (entry === null) + state.lastBufferedRequest = null; + } + state.bufferedRequest = entry; + state.bufferProcessing = false; + } + Writable.prototype._write = function(chunk, encoding, cb) { + cb(new Error("_write() is not implemented")); + }; + Writable.prototype._writev = null; + Writable.prototype.end = function(chunk, encoding, cb) { + var state = this._writableState; + if (typeof chunk === "function") { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === "function") { + cb = encoding; + encoding = null; + } + if (chunk !== null && chunk !== void 0) + this.write(chunk, encoding); + if (state.corked) { + state.corked = 1; + this.uncork(); + } + if (!state.ending && !state.finished) + endWritable(this, state, cb); + }; + function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; + } + function callFinal(stream, state) { + stream._final(function(err) { + state.pendingcb--; + if (err) { + stream.emit("error", err); + } + state.prefinished = true; + stream.emit("prefinish"); + finishMaybe(stream, state); + }); + } + function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === "function") { + state.pendingcb++; + state.finalCalled = true; + pna.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit("prefinish"); + } + } + } + function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit("finish"); + } + } + return need; + } + function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) + pna.nextTick(cb); + else + stream.once("finish", cb); + } + state.ended = true; + stream.writable = false; + } + function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + if (state.corkedRequestsFree) { + state.corkedRequestsFree.next = corkReq; + } else { + state.corkedRequestsFree = corkReq; + } + } + Object.defineProperty(Writable.prototype, "destroyed", { + get: function() { + if (this._writableState === void 0) { + return false; + } + return this._writableState.destroyed; + }, + set: function(value) { + if (!this._writableState) { + return; + } + this._writableState.destroyed = value; + } + }); + Writable.prototype.destroy = destroyImpl.destroy; + Writable.prototype._undestroy = destroyImpl.undestroy; + Writable.prototype._destroy = function(err, cb) { + this.end(); + cb(err); + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/_stream_duplex.js +var require_stream_duplex2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/_stream_duplex.js"(exports2, module2) { + "use strict"; + var pna = require_process_nextick_args(); + var objectKeys = Object.keys || function(obj) { + var keys2 = []; + for (var key in obj) { + keys2.push(key); + } + return keys2; + }; + module2.exports = Duplex; + var util = Object.create(require_util6()); + util.inherits = require_inherits(); + var Readable = require_stream_readable2(); + var Writable = require_stream_writable2(); + util.inherits(Duplex, Readable); + { + keys = objectKeys(Writable.prototype); + for (v = 0; v < keys.length; v++) { + method = keys[v]; + if (!Duplex.prototype[method]) + Duplex.prototype[method] = Writable.prototype[method]; + } + } + var keys; + var method; + var v; + function Duplex(options) { + if (!(this instanceof Duplex)) + return new Duplex(options); + Readable.call(this, options); + Writable.call(this, options); + if (options && options.readable === false) + this.readable = false; + if (options && options.writable === false) + this.writable = false; + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) + this.allowHalfOpen = false; + this.once("end", onend); + } + Object.defineProperty(Duplex.prototype, "writableHighWaterMark", { + enumerable: false, + get: function() { + return this._writableState.highWaterMark; + } + }); + function onend() { + if (this.allowHalfOpen || this._writableState.ended) + return; + pna.nextTick(onEndNT, this); + } + function onEndNT(self2) { + self2.end(); + } + Object.defineProperty(Duplex.prototype, "destroyed", { + get: function() { + if (this._readableState === void 0 || this._writableState === void 0) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function(value) { + if (this._readableState === void 0 || this._writableState === void 0) { + return; + } + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } + }); + Duplex.prototype._destroy = function(err, cb) { + this.push(null); + this.end(); + pna.nextTick(cb, err); + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/_stream_readable.js +var require_stream_readable2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/_stream_readable.js"(exports2, module2) { + "use strict"; + var pna = require_process_nextick_args(); + module2.exports = Readable; + var isArray = require_isarray(); + var Duplex; + Readable.ReadableState = ReadableState; + var EE = require("events").EventEmitter; + var EElistenerCount = function(emitter, type) { + return emitter.listeners(type).length; + }; + var Stream = require_stream7(); + var Buffer2 = require_safe_buffer().Buffer; + var OurUint8Array = global.Uint8Array || function() { + }; + function _uint8ArrayToBuffer(chunk) { + return Buffer2.from(chunk); + } + function _isUint8Array(obj) { + return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; + } + var util = Object.create(require_util6()); + util.inherits = require_inherits(); + var debugUtil = require("util"); + var debug = void 0; + if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog("stream"); + } else { + debug = function() { + }; + } + var BufferList = require_BufferList(); + var destroyImpl = require_destroy2(); + var StringDecoder; + util.inherits(Readable, Stream); + var kProxyEvents = ["error", "close", "destroy", "pause", "resume"]; + function prependListener(emitter, event, fn2) { + if (typeof emitter.prependListener === "function") + return emitter.prependListener(event, fn2); + if (!emitter._events || !emitter._events[event]) + emitter.on(event, fn2); + else if (isArray(emitter._events[event])) + emitter._events[event].unshift(fn2); + else + emitter._events[event] = [fn2, emitter._events[event]]; + } + function ReadableState(options, stream) { + Duplex = Duplex || require_stream_duplex2(); + options = options || {}; + var isDuplex = stream instanceof Duplex; + this.objectMode = !!options.objectMode; + if (isDuplex) + this.objectMode = this.objectMode || !!options.readableObjectMode; + var hwm = options.highWaterMark; + var readableHwm = options.readableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + if (hwm || hwm === 0) + this.highWaterMark = hwm; + else if (isDuplex && (readableHwm || readableHwm === 0)) + this.highWaterMark = readableHwm; + else + this.highWaterMark = defaultHwm; + this.highWaterMark = Math.floor(this.highWaterMark); + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + this.sync = true; + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + this.destroyed = false; + this.defaultEncoding = options.defaultEncoding || "utf8"; + this.awaitDrain = 0; + this.readingMore = false; + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) + StringDecoder = require("string_decoder/").StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } + } + function Readable(options) { + Duplex = Duplex || require_stream_duplex2(); + if (!(this instanceof Readable)) + return new Readable(options); + this._readableState = new ReadableState(options, this); + this.readable = true; + if (options) { + if (typeof options.read === "function") + this._read = options.read; + if (typeof options.destroy === "function") + this._destroy = options.destroy; + } + Stream.call(this); + } + Object.defineProperty(Readable.prototype, "destroyed", { + get: function() { + if (this._readableState === void 0) { + return false; + } + return this._readableState.destroyed; + }, + set: function(value) { + if (!this._readableState) { + return; + } + this._readableState.destroyed = value; + } + }); + Readable.prototype.destroy = destroyImpl.destroy; + Readable.prototype._undestroy = destroyImpl.undestroy; + Readable.prototype._destroy = function(err, cb) { + this.push(null); + cb(err); + }; + Readable.prototype.push = function(chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + if (!state.objectMode) { + if (typeof chunk === "string") { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer2.from(chunk, encoding); + encoding = ""; + } + skipChunkCheck = true; + } + } else { + skipChunkCheck = true; + } + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); + }; + Readable.prototype.unshift = function(chunk) { + return readableAddChunk(this, chunk, null, true, false); + }; + function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) + er = chunkInvalid(state, chunk); + if (er) { + stream.emit("error", er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== "string" && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer2.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (addToFront) { + if (state.endEmitted) + stream.emit("error", new Error("stream.unshift() after end event")); + else + addChunk(stream, state, chunk, true); + } else if (state.ended) { + stream.emit("error", new Error("stream.push() after EOF")); + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) + addChunk(stream, state, chunk, false); + else + maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); + } + } + } else if (!addToFront) { + state.reading = false; + } + } + return needMoreData(state); + } + function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit("data", chunk); + stream.read(0); + } else { + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) + state.buffer.unshift(chunk); + else + state.buffer.push(chunk); + if (state.needReadable) + emitReadable(stream); + } + maybeReadMore(stream, state); + } + function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) { + er = new TypeError("Invalid non-string/buffer chunk"); + } + return er; + } + function needMoreData(state) { + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); + } + Readable.prototype.isPaused = function() { + return this._readableState.flowing === false; + }; + Readable.prototype.setEncoding = function(enc) { + if (!StringDecoder) + StringDecoder = require("string_decoder/").StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; + }; + var MAX_HWM = 8388608; + function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; + } + function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) + return 0; + if (state.objectMode) + return 1; + if (n !== n) { + if (state.flowing && state.length) + return state.buffer.head.data.length; + else + return state.length; + } + if (n > state.highWaterMark) + state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) + return n; + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; + } + Readable.prototype.read = function(n) { + debug("read", n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + if (n !== 0) + state.emittedReadable = false; + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { + debug("read: emitReadable", state.length, state.ended); + if (state.length === 0 && state.ended) + endReadable(this); + else + emitReadable(this); + return null; + } + n = howMuchToRead(n, state); + if (n === 0 && state.ended) { + if (state.length === 0) + endReadable(this); + return null; + } + var doRead = state.needReadable; + debug("need readable", doRead); + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug("length less than watermark", doRead); + } + if (state.ended || state.reading) { + doRead = false; + debug("reading or ended", doRead); + } else if (doRead) { + debug("do read"); + state.reading = true; + state.sync = true; + if (state.length === 0) + state.needReadable = true; + this._read(state.highWaterMark); + state.sync = false; + if (!state.reading) + n = howMuchToRead(nOrig, state); + } + var ret; + if (n > 0) + ret = fromList(n, state); + else + ret = null; + if (ret === null) { + state.needReadable = true; + n = 0; + } else { + state.length -= n; + } + if (state.length === 0) { + if (!state.ended) + state.needReadable = true; + if (nOrig !== n && state.ended) + endReadable(this); + } + if (ret !== null) + this.emit("data", ret); + return ret; + }; + function onEofChunk(stream, state) { + if (state.ended) + return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + emitReadable(stream); + } + function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug("emitReadable", state.flowing); + state.emittedReadable = true; + if (state.sync) + pna.nextTick(emitReadable_, stream); + else + emitReadable_(stream); + } + } + function emitReadable_(stream) { + debug("emit readable"); + stream.emit("readable"); + flow(stream); + } + function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + pna.nextTick(maybeReadMore_, stream, state); + } + } + function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { + debug("maybeReadMore read 0"); + stream.read(0); + if (len === state.length) + break; + else + len = state.length; + } + state.readingMore = false; + } + Readable.prototype._read = function(n) { + this.emit("error", new Error("_read() is not implemented")); + }; + Readable.prototype.pipe = function(dest, pipeOpts) { + var src = this; + var state = this._readableState; + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug("pipe count=%d opts=%j", state.pipesCount, pipeOpts); + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) + pna.nextTick(endFn); + else + src.once("end", endFn); + dest.on("unpipe", onunpipe); + function onunpipe(readable, unpipeInfo) { + debug("onunpipe"); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } + } + } + function onend() { + debug("onend"); + dest.end(); + } + var ondrain = pipeOnDrain(src); + dest.on("drain", ondrain); + var cleanedUp = false; + function cleanup() { + debug("cleanup"); + dest.removeListener("close", onclose); + dest.removeListener("finish", onfinish); + dest.removeListener("drain", ondrain); + dest.removeListener("error", onerror); + dest.removeListener("unpipe", onunpipe); + src.removeListener("end", onend); + src.removeListener("end", unpipe); + src.removeListener("data", ondata); + cleanedUp = true; + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) + ondrain(); + } + var increasedAwaitDrain = false; + src.on("data", ondata); + function ondata(chunk) { + debug("ondata"); + increasedAwaitDrain = false; + var ret = dest.write(chunk); + if (ret === false && !increasedAwaitDrain) { + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug("false write response, pause", src._readableState.awaitDrain); + src._readableState.awaitDrain++; + increasedAwaitDrain = true; + } + src.pause(); + } + } + function onerror(er) { + debug("onerror", er); + unpipe(); + dest.removeListener("error", onerror); + if (EElistenerCount(dest, "error") === 0) + dest.emit("error", er); + } + prependListener(dest, "error", onerror); + function onclose() { + dest.removeListener("finish", onfinish); + unpipe(); + } + dest.once("close", onclose); + function onfinish() { + debug("onfinish"); + dest.removeListener("close", onclose); + unpipe(); + } + dest.once("finish", onfinish); + function unpipe() { + debug("unpipe"); + src.unpipe(dest); + } + dest.emit("pipe", src); + if (!state.flowing) { + debug("pipe resume"); + src.resume(); + } + return dest; + }; + function pipeOnDrain(src) { + return function() { + var state = src._readableState; + debug("pipeOnDrain", state.awaitDrain); + if (state.awaitDrain) + state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, "data")) { + state.flowing = true; + flow(src); + } + }; + } + Readable.prototype.unpipe = function(dest) { + var state = this._readableState; + var unpipeInfo = { hasUnpiped: false }; + if (state.pipesCount === 0) + return this; + if (state.pipesCount === 1) { + if (dest && dest !== state.pipes) + return this; + if (!dest) + dest = state.pipes; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) + dest.emit("unpipe", this, unpipeInfo); + return this; + } + if (!dest) { + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + for (var i = 0; i < len; i++) { + dests[i].emit("unpipe", this, unpipeInfo); + } + return this; + } + var index = indexOf(state.pipes, dest); + if (index === -1) + return this; + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) + state.pipes = state.pipes[0]; + dest.emit("unpipe", this, unpipeInfo); + return this; + }; + Readable.prototype.on = function(ev, fn2) { + var res = Stream.prototype.on.call(this, ev, fn2); + if (ev === "data") { + if (this._readableState.flowing !== false) + this.resume(); + } else if (ev === "readable") { + var state = this._readableState; + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.emittedReadable = false; + if (!state.reading) { + pna.nextTick(nReadingNextTick, this); + } else if (state.length) { + emitReadable(this); + } + } + } + return res; + }; + Readable.prototype.addListener = Readable.prototype.on; + function nReadingNextTick(self2) { + debug("readable nexttick read 0"); + self2.read(0); + } + Readable.prototype.resume = function() { + var state = this._readableState; + if (!state.flowing) { + debug("resume"); + state.flowing = true; + resume(this, state); + } + return this; + }; + function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + pna.nextTick(resume_, stream, state); + } + } + function resume_(stream, state) { + if (!state.reading) { + debug("resume read 0"); + stream.read(0); + } + state.resumeScheduled = false; + state.awaitDrain = 0; + stream.emit("resume"); + flow(stream); + if (state.flowing && !state.reading) + stream.read(0); + } + Readable.prototype.pause = function() { + debug("call pause flowing=%j", this._readableState.flowing); + if (this._readableState.flowing !== false) { + debug("pause"); + this._readableState.flowing = false; + this.emit("pause"); + } + return this; + }; + function flow(stream) { + var state = stream._readableState; + debug("flow", state.flowing); + while (state.flowing && stream.read() !== null) { + } + } + Readable.prototype.wrap = function(stream) { + var _this = this; + var state = this._readableState; + var paused = false; + stream.on("end", function() { + debug("wrapped end"); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) + _this.push(chunk); + } + _this.push(null); + }); + stream.on("data", function(chunk) { + debug("wrapped data"); + if (state.decoder) + chunk = state.decoder.write(chunk); + if (state.objectMode && (chunk === null || chunk === void 0)) + return; + else if (!state.objectMode && (!chunk || !chunk.length)) + return; + var ret = _this.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + for (var i in stream) { + if (this[i] === void 0 && typeof stream[i] === "function") { + this[i] = function(method) { + return function() { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } + this._read = function(n2) { + debug("wrapped _read", n2); + if (paused) { + paused = false; + stream.resume(); + } + }; + return this; + }; + Object.defineProperty(Readable.prototype, "readableHighWaterMark", { + enumerable: false, + get: function() { + return this._readableState.highWaterMark; + } + }); + Readable._fromList = fromList; + function fromList(n, state) { + if (state.length === 0) + return null; + var ret; + if (state.objectMode) + ret = state.buffer.shift(); + else if (!n || n >= state.length) { + if (state.decoder) + ret = state.buffer.join(""); + else if (state.buffer.length === 1) + ret = state.buffer.head.data; + else + ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + ret = fromListPartial(n, state.buffer, state.decoder); + } + return ret; + } + function fromListPartial(n, list, hasStrings) { + var ret; + if (n < list.head.data.length) { + ret = list.head.data.slice(0, n); + list.head.data = list.head.data.slice(n); + } else if (n === list.head.data.length) { + ret = list.shift(); + } else { + ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); + } + return ret; + } + function copyFromBufferString(n, list) { + var p = list.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) + ret += str; + else + ret += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) + list.head = p.next; + else + list.head = list.tail = null; + } else { + list.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; + } + function copyFromBuffer(n, list) { + var ret = Buffer2.allocUnsafe(n); + var p = list.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) + list.head = p.next; + else + list.head = list.tail = null; + } else { + list.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; + } + function endReadable(stream) { + var state = stream._readableState; + if (state.length > 0) + throw new Error('"endReadable()" called on non-empty stream'); + if (!state.endEmitted) { + state.ended = true; + pna.nextTick(endReadableNT, state, stream); + } + } + function endReadableNT(state, stream) { + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit("end"); + } + } + function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) + return i; + } + return -1; + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/_stream_transform.js +var require_stream_transform2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/_stream_transform.js"(exports2, module2) { + "use strict"; + module2.exports = Transform; + var Duplex = require_stream_duplex2(); + var util = Object.create(require_util6()); + util.inherits = require_inherits(); + util.inherits(Transform, Duplex); + function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + var cb = ts.writecb; + if (!cb) { + return this.emit("error", new Error("write callback called multiple times")); + } + ts.writechunk = null; + ts.writecb = null; + if (data != null) + this.push(data); + cb(er); + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } + } + function Transform(options) { + if (!(this instanceof Transform)) + return new Transform(options); + Duplex.call(this, options); + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; + this._readableState.needReadable = true; + this._readableState.sync = false; + if (options) { + if (typeof options.transform === "function") + this._transform = options.transform; + if (typeof options.flush === "function") + this._flush = options.flush; + } + this.on("prefinish", prefinish); + } + function prefinish() { + var _this = this; + if (typeof this._flush === "function") { + this._flush(function(er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } + } + Transform.prototype.push = function(chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); + }; + Transform.prototype._transform = function(chunk, encoding, cb) { + throw new Error("_transform() is not implemented"); + }; + Transform.prototype._write = function(chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) + this._read(rs.highWaterMark); + } + }; + Transform.prototype._read = function(n) { + var ts = this._transformState; + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + ts.needTransform = true; + } + }; + Transform.prototype._destroy = function(err, cb) { + var _this2 = this; + Duplex.prototype._destroy.call(this, err, function(err2) { + cb(err2); + _this2.emit("close"); + }); + }; + function done(stream, er, data) { + if (er) + return stream.emit("error", er); + if (data != null) + stream.push(data); + if (stream._writableState.length) + throw new Error("Calling transform done when ws.length != 0"); + if (stream._transformState.transforming) + throw new Error("Calling transform done when still transforming"); + return stream.push(null); + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/_stream_passthrough.js +var require_stream_passthrough2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/_stream_passthrough.js"(exports2, module2) { + "use strict"; + module2.exports = PassThrough; + var Transform = require_stream_transform2(); + var util = Object.create(require_util6()); + util.inherits = require_inherits(); + util.inherits(PassThrough, Transform); + function PassThrough(options) { + if (!(this instanceof PassThrough)) + return new PassThrough(options); + Transform.call(this, options); + } + PassThrough.prototype._transform = function(chunk, encoding, cb) { + cb(null, chunk); + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/readable.js +var require_readable2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/readable.js"(exports2, module2) { + var Stream = require("stream"); + if (process.env.READABLE_STREAM === "disable" && Stream) { + module2.exports = Stream; + exports2 = module2.exports = Stream.Readable; + exports2.Readable = Stream.Readable; + exports2.Writable = Stream.Writable; + exports2.Duplex = Stream.Duplex; + exports2.Transform = Stream.Transform; + exports2.PassThrough = Stream.PassThrough; + exports2.Stream = Stream; + } else { + exports2 = module2.exports = require_stream_readable2(); + exports2.Stream = Stream || exports2; + exports2.Readable = exports2; + exports2.Writable = require_stream_writable2(); + exports2.Duplex = require_stream_duplex2(); + exports2.Transform = require_stream_transform2(); + exports2.PassThrough = require_stream_passthrough2(); + } + } +}); + +// ../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js +var require_wrappy = __commonJS({ + "../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js"(exports2, module2) { + module2.exports = wrappy; + function wrappy(fn2, cb) { + if (fn2 && cb) + return wrappy(fn2)(cb); + if (typeof fn2 !== "function") + throw new TypeError("need wrapper function"); + Object.keys(fn2).forEach(function(k) { + wrapper[k] = fn2[k]; + }); + return wrapper; + function wrapper() { + var args2 = new Array(arguments.length); + for (var i = 0; i < args2.length; i++) { + args2[i] = arguments[i]; + } + var ret = fn2.apply(this, args2); + var cb2 = args2[args2.length - 1]; + if (typeof ret === "function" && ret !== cb2) { + Object.keys(cb2).forEach(function(k) { + ret[k] = cb2[k]; + }); + } + return ret; + } + } + } +}); + +// ../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js +var require_once = __commonJS({ + "../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js"(exports2, module2) { + var wrappy = require_wrappy(); + module2.exports = wrappy(once); + module2.exports.strict = wrappy(onceStrict); + once.proto = once(function() { + Object.defineProperty(Function.prototype, "once", { + value: function() { + return once(this); + }, + configurable: true + }); + Object.defineProperty(Function.prototype, "onceStrict", { + value: function() { + return onceStrict(this); + }, + configurable: true + }); + }); + function once(fn2) { + var f = function() { + if (f.called) + return f.value; + f.called = true; + return f.value = fn2.apply(this, arguments); + }; + f.called = false; + return f; + } + function onceStrict(fn2) { + var f = function() { + if (f.called) + throw new Error(f.onceError); + f.called = true; + return f.value = fn2.apply(this, arguments); + }; + var name = fn2.name || "Function wrapped with `once`"; + f.onceError = name + " shouldn't be called more than once"; + f.called = false; + return f; + } + } +}); + +// ../../node_modules/.pnpm/end-of-stream@1.4.4/node_modules/end-of-stream/index.js +var require_end_of_stream2 = __commonJS({ + "../../node_modules/.pnpm/end-of-stream@1.4.4/node_modules/end-of-stream/index.js"(exports2, module2) { + var once = require_once(); + var noop = function() { + }; + var isRequest = function(stream) { + return stream.setHeader && typeof stream.abort === "function"; + }; + var isChildProcess = function(stream) { + return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3; + }; + var eos = function(stream, opts, callback) { + if (typeof opts === "function") + return eos(stream, null, opts); + if (!opts) + opts = {}; + callback = once(callback || noop); + var ws = stream._writableState; + var rs = stream._readableState; + var readable = opts.readable || opts.readable !== false && stream.readable; + var writable = opts.writable || opts.writable !== false && stream.writable; + var cancelled = false; + var onlegacyfinish = function() { + if (!stream.writable) + onfinish(); + }; + var onfinish = function() { + writable = false; + if (!readable) + callback.call(stream); + }; + var onend = function() { + readable = false; + if (!writable) + callback.call(stream); + }; + var onexit = function(exitCode) { + callback.call(stream, exitCode ? new Error("exited with error code: " + exitCode) : null); + }; + var onerror = function(err) { + callback.call(stream, err); + }; + var onclose = function() { + process.nextTick(onclosenexttick); + }; + var onclosenexttick = function() { + if (cancelled) + return; + if (readable && !(rs && (rs.ended && !rs.destroyed))) + return callback.call(stream, new Error("premature close")); + if (writable && !(ws && (ws.ended && !ws.destroyed))) + return callback.call(stream, new Error("premature close")); + }; + var onrequest = function() { + stream.req.on("finish", onfinish); + }; + if (isRequest(stream)) { + stream.on("complete", onfinish); + stream.on("abort", onclose); + if (stream.req) + onrequest(); + else + stream.on("request", onrequest); + } else if (writable && !ws) { + stream.on("end", onlegacyfinish); + stream.on("close", onlegacyfinish); + } + if (isChildProcess(stream)) + stream.on("exit", onexit); + stream.on("end", onend); + stream.on("finish", onfinish); + if (opts.error !== false) + stream.on("error", onerror); + stream.on("close", onclose); + return function() { + cancelled = true; + stream.removeListener("complete", onfinish); + stream.removeListener("abort", onclose); + stream.removeListener("request", onrequest); + if (stream.req) + stream.req.removeListener("finish", onfinish); + stream.removeListener("end", onlegacyfinish); + stream.removeListener("close", onlegacyfinish); + stream.removeListener("finish", onfinish); + stream.removeListener("exit", onexit); + stream.removeListener("end", onend); + stream.removeListener("error", onerror); + stream.removeListener("close", onclose); + }; + }; + module2.exports = eos; + } +}); + +// ../../node_modules/.pnpm/stream-shift@1.0.1/node_modules/stream-shift/index.js +var require_stream_shift = __commonJS({ + "../../node_modules/.pnpm/stream-shift@1.0.1/node_modules/stream-shift/index.js"(exports2, module2) { + module2.exports = shift; + function shift(stream) { + var rs = stream._readableState; + if (!rs) + return null; + return rs.objectMode || typeof stream._duplexState === "number" ? stream.read() : stream.read(getStateLength(rs)); + } + function getStateLength(state) { + if (state.buffer.length) { + if (state.buffer.head) { + return state.buffer.head.data.length; + } + return state.buffer[0].length; + } + return state.length; + } + } +}); + +// ../../node_modules/.pnpm/duplexify@3.7.1/node_modules/duplexify/index.js +var require_duplexify = __commonJS({ + "../../node_modules/.pnpm/duplexify@3.7.1/node_modules/duplexify/index.js"(exports2, module2) { + var stream = require_readable2(); + var eos = require_end_of_stream2(); + var inherits = require_inherits(); + var shift = require_stream_shift(); + var SIGNAL_FLUSH = Buffer.from && Buffer.from !== Uint8Array.from ? Buffer.from([0]) : new Buffer([0]); + var onuncork = function(self2, fn2) { + if (self2._corked) + self2.once("uncork", fn2); + else + fn2(); + }; + var autoDestroy = function(self2, err) { + if (self2._autoDestroy) + self2.destroy(err); + }; + var destroyer = function(self2, end2) { + return function(err) { + if (err) + autoDestroy(self2, err.message === "premature close" ? null : err); + else if (end2 && !self2._ended) + self2.end(); + }; + }; + var end = function(ws, fn2) { + if (!ws) + return fn2(); + if (ws._writableState && ws._writableState.finished) + return fn2(); + if (ws._writableState) + return ws.end(fn2); + ws.end(); + fn2(); + }; + var toStreams2 = function(rs) { + return new stream.Readable({ objectMode: true, highWaterMark: 16 }).wrap(rs); + }; + var Duplexify = function(writable, readable, opts) { + if (!(this instanceof Duplexify)) + return new Duplexify(writable, readable, opts); + stream.Duplex.call(this, opts); + this._writable = null; + this._readable = null; + this._readable2 = null; + this._autoDestroy = !opts || opts.autoDestroy !== false; + this._forwardDestroy = !opts || opts.destroy !== false; + this._forwardEnd = !opts || opts.end !== false; + this._corked = 1; + this._ondrain = null; + this._drained = false; + this._forwarding = false; + this._unwrite = null; + this._unread = null; + this._ended = false; + this.destroyed = false; + if (writable) + this.setWritable(writable); + if (readable) + this.setReadable(readable); + }; + inherits(Duplexify, stream.Duplex); + Duplexify.obj = function(writable, readable, opts) { + if (!opts) + opts = {}; + opts.objectMode = true; + opts.highWaterMark = 16; + return new Duplexify(writable, readable, opts); + }; + Duplexify.prototype.cork = function() { + if (++this._corked === 1) + this.emit("cork"); + }; + Duplexify.prototype.uncork = function() { + if (this._corked && --this._corked === 0) + this.emit("uncork"); + }; + Duplexify.prototype.setWritable = function(writable) { + if (this._unwrite) + this._unwrite(); + if (this.destroyed) { + if (writable && writable.destroy) + writable.destroy(); + return; + } + if (writable === null || writable === false) { + this.end(); + return; + } + var self2 = this; + var unend = eos(writable, { writable: true, readable: false }, destroyer(this, this._forwardEnd)); + var ondrain = function() { + var ondrain2 = self2._ondrain; + self2._ondrain = null; + if (ondrain2) + ondrain2(); + }; + var clear = function() { + self2._writable.removeListener("drain", ondrain); + unend(); + }; + if (this._unwrite) + process.nextTick(ondrain); + this._writable = writable; + this._writable.on("drain", ondrain); + this._unwrite = clear; + this.uncork(); + }; + Duplexify.prototype.setReadable = function(readable) { + if (this._unread) + this._unread(); + if (this.destroyed) { + if (readable && readable.destroy) + readable.destroy(); + return; + } + if (readable === null || readable === false) { + this.push(null); + this.resume(); + return; + } + var self2 = this; + var unend = eos(readable, { writable: false, readable: true }, destroyer(this)); + var onreadable = function() { + self2._forward(); + }; + var onend = function() { + self2.push(null); + }; + var clear = function() { + self2._readable2.removeListener("readable", onreadable); + self2._readable2.removeListener("end", onend); + unend(); + }; + this._drained = true; + this._readable = readable; + this._readable2 = readable._readableState ? readable : toStreams2(readable); + this._readable2.on("readable", onreadable); + this._readable2.on("end", onend); + this._unread = clear; + this._forward(); + }; + Duplexify.prototype._read = function() { + this._drained = true; + this._forward(); + }; + Duplexify.prototype._forward = function() { + if (this._forwarding || !this._readable2 || !this._drained) + return; + this._forwarding = true; + var data; + while (this._drained && (data = shift(this._readable2)) !== null) { + if (this.destroyed) + continue; + this._drained = this.push(data); + } + this._forwarding = false; + }; + Duplexify.prototype.destroy = function(err) { + if (this.destroyed) + return; + this.destroyed = true; + var self2 = this; + process.nextTick(function() { + self2._destroy(err); + }); + }; + Duplexify.prototype._destroy = function(err) { + if (err) { + var ondrain = this._ondrain; + this._ondrain = null; + if (ondrain) + ondrain(err); + else + this.emit("error", err); + } + if (this._forwardDestroy) { + if (this._readable && this._readable.destroy) + this._readable.destroy(); + if (this._writable && this._writable.destroy) + this._writable.destroy(); + } + this.emit("close"); + }; + Duplexify.prototype._write = function(data, enc, cb) { + if (this.destroyed) + return cb(); + if (this._corked) + return onuncork(this, this._write.bind(this, data, enc, cb)); + if (data === SIGNAL_FLUSH) + return this._finish(cb); + if (!this._writable) + return cb(); + if (this._writable.write(data) === false) + this._ondrain = cb; + else + cb(); + }; + Duplexify.prototype._finish = function(cb) { + var self2 = this; + this.emit("preend"); + onuncork(this, function() { + end(self2._forwardEnd && self2._writable, function() { + if (self2._writableState.prefinished === false) + self2._writableState.prefinished = true; + self2.emit("prefinish"); + onuncork(self2, cb); + }); + }); + }; + Duplexify.prototype.end = function(data, enc, cb) { + if (typeof data === "function") + return this.end(null, null, data); + if (typeof enc === "function") + return this.end(data, null, enc); + this._ended = true; + if (data) + this.write(data); + if (!this._writableState.ending) + this.write(SIGNAL_FLUSH); + return stream.Writable.prototype.end.call(this, cb); + }; + module2.exports = Duplexify; + } +}); + +// ../../node_modules/.pnpm/xtend@4.0.2/node_modules/xtend/immutable.js +var require_immutable = __commonJS({ + "../../node_modules/.pnpm/xtend@4.0.2/node_modules/xtend/immutable.js"(exports2, module2) { + module2.exports = extend; + var hasOwnProperty = Object.prototype.hasOwnProperty; + function extend() { + var target = {}; + for (var i = 0; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + } + } +}); + +// ../../node_modules/.pnpm/through2@2.0.5/node_modules/through2/through2.js +var require_through22 = __commonJS({ + "../../node_modules/.pnpm/through2@2.0.5/node_modules/through2/through2.js"(exports2, module2) { + var Transform = require_readable2().Transform; + var inherits = require("util").inherits; + var xtend = require_immutable(); + function DestroyableTransform(opts) { + Transform.call(this, opts); + this._destroyed = false; + } + inherits(DestroyableTransform, Transform); + DestroyableTransform.prototype.destroy = function(err) { + if (this._destroyed) + return; + this._destroyed = true; + var self2 = this; + process.nextTick(function() { + if (err) + self2.emit("error", err); + self2.emit("close"); + }); + }; + function noop(chunk, enc, callback) { + callback(null, chunk); + } + function through2(construct) { + return function(options, transform, flush) { + if (typeof options == "function") { + flush = transform; + transform = options; + options = {}; + } + if (typeof transform != "function") + transform = noop; + if (typeof flush != "function") + flush = null; + return construct(options, transform, flush); + }; + } + module2.exports = through2(function(options, transform, flush) { + var t2 = new DestroyableTransform(options); + t2._transform = transform; + if (flush) + t2._flush = flush; + return t2; + }); + module2.exports.ctor = through2(function(options, transform, flush) { + function Through2(override) { + if (!(this instanceof Through2)) + return new Through2(override); + this.options = xtend(options, override); + DestroyableTransform.call(this, this.options); + } + inherits(Through2, DestroyableTransform); + Through2.prototype._transform = transform; + if (flush) + Through2.prototype._flush = flush; + return Through2; + }); + module2.exports.obj = through2(function(options, transform, flush) { + var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options)); + t2._transform = transform; + if (flush) + t2._flush = flush; + return t2; + }); + } +}); + +// ../../node_modules/.pnpm/peek-stream@1.1.3/node_modules/peek-stream/index.js +var require_peek_stream = __commonJS({ + "../../node_modules/.pnpm/peek-stream@1.1.3/node_modules/peek-stream/index.js"(exports2, module2) { + var duplexify = require_duplexify(); + var through = require_through22(); + var bufferFrom = require_buffer_from(); + var isObject = function(data) { + return !Buffer.isBuffer(data) && typeof data !== "string"; + }; + var peek = function(opts, onpeek) { + if (typeof opts === "number") + opts = { maxBuffer: opts }; + if (typeof opts === "function") + return peek(null, opts); + if (!opts) + opts = {}; + var maxBuffer = typeof opts.maxBuffer === "number" ? opts.maxBuffer : 65535; + var strict = opts.strict; + var newline = opts.newline !== false; + var buffer = []; + var bufferSize = 0; + var dup = duplexify.obj(); + var peeker = through.obj({ highWaterMark: 1 }, function(data, enc, cb) { + if (isObject(data)) + return ready(data, null, cb); + if (!Buffer.isBuffer(data)) + data = bufferFrom(data); + if (newline) { + var nl = Array.prototype.indexOf.call(data, 10); + if (nl > 0 && data[nl - 1] === 13) + nl--; + if (nl > -1) { + buffer.push(data.slice(0, nl)); + return ready(Buffer.concat(buffer), data.slice(nl), cb); + } + } + buffer.push(data); + bufferSize += data.length; + if (bufferSize < maxBuffer) + return cb(); + if (strict) + return cb(new Error("No newline found")); + ready(Buffer.concat(buffer), null, cb); + }); + var onpreend = function() { + if (strict) + return dup.destroy(new Error("No newline found")); + dup.cork(); + ready(Buffer.concat(buffer), null, function(err) { + if (err) + return dup.destroy(err); + dup.uncork(); + }); + }; + var ready = function(data, overflow, cb) { + dup.removeListener("preend", onpreend); + onpeek(data, function(err, parser) { + if (err) + return cb(err); + dup.setWritable(parser); + dup.setReadable(parser); + if (data) + parser.write(data); + if (overflow) + parser.write(overflow); + overflow = buffer = peeker = null; + cb(); + }); + }; + dup.on("preend", onpreend); + dup.setWritable(peeker); + return dup; + }; + module2.exports = peek; + } +}); + +// ../../node_modules/.pnpm/pump@2.0.1/node_modules/pump/index.js +var require_pump = __commonJS({ + "../../node_modules/.pnpm/pump@2.0.1/node_modules/pump/index.js"(exports2, module2) { + var once = require_once(); + var eos = require_end_of_stream2(); + var fs = require("fs"); + var noop = function() { + }; + var ancient = /^v?\.0/.test(process.version); + var isFn = function(fn2) { + return typeof fn2 === "function"; + }; + var isFS = function(stream) { + if (!ancient) + return false; + if (!fs) + return false; + return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close); + }; + var isRequest = function(stream) { + return stream.setHeader && isFn(stream.abort); + }; + var destroyer = function(stream, reading, writing, callback) { + callback = once(callback); + var closed = false; + stream.on("close", function() { + closed = true; + }); + eos(stream, { readable: reading, writable: writing }, function(err) { + if (err) + return callback(err); + closed = true; + callback(); + }); + var destroyed = false; + return function(err) { + if (closed) + return; + if (destroyed) + return; + destroyed = true; + if (isFS(stream)) + return stream.close(noop); + if (isRequest(stream)) + return stream.abort(); + if (isFn(stream.destroy)) + return stream.destroy(); + callback(err || new Error("stream was destroyed")); + }; + }; + var call = function(fn2) { + fn2(); + }; + var pipe = function(from, to) { + return from.pipe(to); + }; + var pump = function() { + var streams = Array.prototype.slice.call(arguments); + var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop; + if (Array.isArray(streams[0])) + streams = streams[0]; + if (streams.length < 2) + throw new Error("pump requires two streams per minimum"); + var error; + var destroys = streams.map(function(stream, i) { + var reading = i < streams.length - 1; + var writing = i > 0; + return destroyer(stream, reading, writing, function(err) { + if (!error) + error = err; + if (err) + destroys.forEach(call); + if (reading) + return; + destroys.forEach(call); + callback(error); + }); + }); + streams.reduce(pipe); + }; + module2.exports = pump; + } +}); + +// ../../node_modules/.pnpm/pumpify@1.5.1/node_modules/pumpify/index.js +var require_pumpify = __commonJS({ + "../../node_modules/.pnpm/pumpify@1.5.1/node_modules/pumpify/index.js"(exports2, module2) { + var pump = require_pump(); + var inherits = require_inherits(); + var Duplexify = require_duplexify(); + var toArray = function(args2) { + if (!args2.length) + return []; + return Array.isArray(args2[0]) ? args2[0] : Array.prototype.slice.call(args2); + }; + var define2 = function(opts) { + var Pumpify = function() { + var streams = toArray(arguments); + if (!(this instanceof Pumpify)) + return new Pumpify(streams); + Duplexify.call(this, null, null, opts); + if (streams.length) + this.setPipeline(streams); + }; + inherits(Pumpify, Duplexify); + Pumpify.prototype.setPipeline = function() { + var streams = toArray(arguments); + var self2 = this; + var ended = false; + var w = streams[0]; + var r = streams[streams.length - 1]; + r = r.readable ? r : null; + w = w.writable ? w : null; + var onclose = function() { + streams[0].emit("error", new Error("stream was destroyed")); + }; + this.on("close", onclose); + this.on("prefinish", function() { + if (!ended) + self2.cork(); + }); + pump(streams, function(err) { + self2.removeListener("close", onclose); + if (err) + return self2.destroy(err.message === "premature close" ? null : err); + ended = true; + if (self2._autoDestroy === false) + self2._autoDestroy = true; + self2.uncork(); + }); + if (this.destroyed) + return onclose(); + this.setWritable(w); + this.setReadable(r); + }; + return Pumpify; + }; + module2.exports = define2({ autoDestroy: false, destroy: false }); + module2.exports.obj = define2({ autoDestroy: false, destroy: false, objectMode: true, highWaterMark: 16 }); + module2.exports.ctor = define2; + } +}); + +// ../../node_modules/.pnpm/bzip2-maybe@1.0.0/node_modules/bzip2-maybe/index.js +var require_bzip2_maybe = __commonJS({ + "../../node_modules/.pnpm/bzip2-maybe@1.0.0/node_modules/bzip2-maybe/index.js"(exports2, module2) { + var bz2 = require_unbzip2_stream(); + var isBzip2 = require_is_bzip2(); + var peek = require_peek_stream(); + var pumpify = require_pumpify(); + var through = require_through22(); + var bzip2 = function() { + return peek({ newline: false, maxBuffer: 10 }, function(data, swap) { + if (isBzip2(data)) { + return swap(null, pumpify(bz2(), bzip2())); + } + swap(null, through()); + }); + }; + module2.exports = bzip2; + } +}); + +// ../../node_modules/.pnpm/is-gzip@1.0.0/node_modules/is-gzip/index.js +var require_is_gzip = __commonJS({ + "../../node_modules/.pnpm/is-gzip@1.0.0/node_modules/is-gzip/index.js"(exports2, module2) { + "use strict"; + module2.exports = function(buf) { + if (!buf || buf.length < 3) { + return false; + } + return buf[0] === 31 && buf[1] === 139 && buf[2] === 8; + }; + } +}); + +// ../../node_modules/.pnpm/is-deflate@1.0.0/node_modules/is-deflate/index.js +var require_is_deflate = __commonJS({ + "../../node_modules/.pnpm/is-deflate@1.0.0/node_modules/is-deflate/index.js"(exports2, module2) { + "use strict"; + module2.exports = function(buf) { + if (!buf || buf.length < 2) + return false; + return buf[0] === 120 && (buf[1] === 1 || buf[1] === 156 || buf[1] === 218); + }; + } +}); + +// ../../node_modules/.pnpm/gunzip-maybe@1.4.2/node_modules/gunzip-maybe/index.js +var require_gunzip_maybe = __commonJS({ + "../../node_modules/.pnpm/gunzip-maybe@1.4.2/node_modules/gunzip-maybe/index.js"(exports2, module2) { + var zlib = require("zlib"); + var peek = require_peek_stream(); + var through = require_through22(); + var pumpify = require_pumpify(); + var isGzip = require_is_gzip(); + var isDeflate = require_is_deflate(); + var isCompressed = function(data) { + if (isGzip(data)) + return 1; + if (isDeflate(data)) + return 2; + return 0; + }; + var gunzip = function(maxRecursion) { + if (maxRecursion === void 0) + maxRecursion = 3; + return peek({ newline: false, maxBuffer: 10 }, function(data, swap) { + if (maxRecursion < 0) + return swap(new Error("Maximum recursion reached")); + switch (isCompressed(data)) { + case 1: + swap(null, pumpify(zlib.createGunzip(), gunzip(maxRecursion - 1))); + break; + case 2: + swap(null, pumpify(zlib.createInflate(), gunzip(maxRecursion - 1))); + break; + default: + swap(null, through()); + } + }); + }; + module2.exports = gunzip; + } +}); + +// ../../node_modules/.pnpm/decompress-maybe@1.0.0/node_modules/decompress-maybe/index.js +var require_decompress_maybe = __commonJS({ + "../../node_modules/.pnpm/decompress-maybe@1.0.0/node_modules/decompress-maybe/index.js"(exports2, module2) { + var bzipMaybe = require_bzip2_maybe(); + var gunzipMaybe = require_gunzip_maybe(); + var pumpify = require_pumpify(); + module2.exports = function() { + return pumpify(bzipMaybe(), gunzipMaybe()); + }; + } +}); + +// ../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/BufferList.js +var require_BufferList2 = __commonJS({ + "../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/BufferList.js"(exports2, module2) { + "use strict"; + var { Buffer: Buffer2 } = require("buffer"); + var symbol = Symbol.for("BufferList"); + function BufferList(buf) { + if (!(this instanceof BufferList)) { + return new BufferList(buf); + } + BufferList._init.call(this, buf); + } + BufferList._init = function _init(buf) { + Object.defineProperty(this, symbol, { value: true }); + this._bufs = []; + this.length = 0; + if (buf) { + this.append(buf); + } + }; + BufferList.prototype._new = function _new(buf) { + return new BufferList(buf); + }; + BufferList.prototype._offset = function _offset(offset) { + if (offset === 0) { + return [0, 0]; + } + let tot = 0; + for (let i = 0; i < this._bufs.length; i++) { + const _t = tot + this._bufs[i].length; + if (offset < _t || i === this._bufs.length - 1) { + return [i, offset - tot]; + } + tot = _t; + } + }; + BufferList.prototype._reverseOffset = function(blOffset) { + const bufferId = blOffset[0]; + let offset = blOffset[1]; + for (let i = 0; i < bufferId; i++) { + offset += this._bufs[i].length; + } + return offset; + }; + BufferList.prototype.get = function get(index) { + if (index > this.length || index < 0) { + return void 0; + } + const offset = this._offset(index); + return this._bufs[offset[0]][offset[1]]; + }; + BufferList.prototype.slice = function slice(start, end) { + if (typeof start === "number" && start < 0) { + start += this.length; + } + if (typeof end === "number" && end < 0) { + end += this.length; + } + return this.copy(null, 0, start, end); + }; + BufferList.prototype.copy = function copy(dst, dstStart, srcStart, srcEnd) { + if (typeof srcStart !== "number" || srcStart < 0) { + srcStart = 0; + } + if (typeof srcEnd !== "number" || srcEnd > this.length) { + srcEnd = this.length; + } + if (srcStart >= this.length) { + return dst || Buffer2.alloc(0); + } + if (srcEnd <= 0) { + return dst || Buffer2.alloc(0); + } + const copy2 = !!dst; + const off = this._offset(srcStart); + const len = srcEnd - srcStart; + let bytes = len; + let bufoff = copy2 && dstStart || 0; + let start = off[1]; + if (srcStart === 0 && srcEnd === this.length) { + if (!copy2) { + return this._bufs.length === 1 ? this._bufs[0] : Buffer2.concat(this._bufs, this.length); + } + for (let i = 0; i < this._bufs.length; i++) { + this._bufs[i].copy(dst, bufoff); + bufoff += this._bufs[i].length; + } + return dst; + } + if (bytes <= this._bufs[off[0]].length - start) { + return copy2 ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes) : this._bufs[off[0]].slice(start, start + bytes); + } + if (!copy2) { + dst = Buffer2.allocUnsafe(len); + } + for (let i = off[0]; i < this._bufs.length; i++) { + const l = this._bufs[i].length - start; + if (bytes > l) { + this._bufs[i].copy(dst, bufoff, start); + bufoff += l; + } else { + this._bufs[i].copy(dst, bufoff, start, start + bytes); + bufoff += l; + break; + } + bytes -= l; + if (start) { + start = 0; + } + } + if (dst.length > bufoff) + return dst.slice(0, bufoff); + return dst; + }; + BufferList.prototype.shallowSlice = function shallowSlice(start, end) { + start = start || 0; + end = typeof end !== "number" ? this.length : end; + if (start < 0) { + start += this.length; + } + if (end < 0) { + end += this.length; + } + if (start === end) { + return this._new(); + } + const startOffset = this._offset(start); + const endOffset = this._offset(end); + const buffers = this._bufs.slice(startOffset[0], endOffset[0] + 1); + if (endOffset[1] === 0) { + buffers.pop(); + } else { + buffers[buffers.length - 1] = buffers[buffers.length - 1].slice(0, endOffset[1]); + } + if (startOffset[1] !== 0) { + buffers[0] = buffers[0].slice(startOffset[1]); + } + return this._new(buffers); + }; + BufferList.prototype.toString = function toString(encoding, start, end) { + return this.slice(start, end).toString(encoding); + }; + BufferList.prototype.consume = function consume(bytes) { + bytes = Math.trunc(bytes); + if (Number.isNaN(bytes) || bytes <= 0) + return this; + while (this._bufs.length) { + if (bytes >= this._bufs[0].length) { + bytes -= this._bufs[0].length; + this.length -= this._bufs[0].length; + this._bufs.shift(); + } else { + this._bufs[0] = this._bufs[0].slice(bytes); + this.length -= bytes; + break; + } + } + return this; + }; + BufferList.prototype.duplicate = function duplicate() { + const copy = this._new(); + for (let i = 0; i < this._bufs.length; i++) { + copy.append(this._bufs[i]); + } + return copy; + }; + BufferList.prototype.append = function append(buf) { + if (buf == null) { + return this; + } + if (buf.buffer) { + this._appendBuffer(Buffer2.from(buf.buffer, buf.byteOffset, buf.byteLength)); + } else if (Array.isArray(buf)) { + for (let i = 0; i < buf.length; i++) { + this.append(buf[i]); + } + } else if (this._isBufferList(buf)) { + for (let i = 0; i < buf._bufs.length; i++) { + this.append(buf._bufs[i]); + } + } else { + if (typeof buf === "number") { + buf = buf.toString(); + } + this._appendBuffer(Buffer2.from(buf)); + } + return this; + }; + BufferList.prototype._appendBuffer = function appendBuffer(buf) { + this._bufs.push(buf); + this.length += buf.length; + }; + BufferList.prototype.indexOf = function(search, offset, encoding) { + if (encoding === void 0 && typeof offset === "string") { + encoding = offset; + offset = void 0; + } + if (typeof search === "function" || Array.isArray(search)) { + throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.'); + } else if (typeof search === "number") { + search = Buffer2.from([search]); + } else if (typeof search === "string") { + search = Buffer2.from(search, encoding); + } else if (this._isBufferList(search)) { + search = search.slice(); + } else if (Array.isArray(search.buffer)) { + search = Buffer2.from(search.buffer, search.byteOffset, search.byteLength); + } else if (!Buffer2.isBuffer(search)) { + search = Buffer2.from(search); + } + offset = Number(offset || 0); + if (isNaN(offset)) { + offset = 0; + } + if (offset < 0) { + offset = this.length + offset; + } + if (offset < 0) { + offset = 0; + } + if (search.length === 0) { + return offset > this.length ? this.length : offset; + } + const blOffset = this._offset(offset); + let blIndex = blOffset[0]; + let buffOffset = blOffset[1]; + for (; blIndex < this._bufs.length; blIndex++) { + const buff = this._bufs[blIndex]; + while (buffOffset < buff.length) { + const availableWindow = buff.length - buffOffset; + if (availableWindow >= search.length) { + const nativeSearchResult = buff.indexOf(search, buffOffset); + if (nativeSearchResult !== -1) { + return this._reverseOffset([blIndex, nativeSearchResult]); + } + buffOffset = buff.length - search.length + 1; + } else { + const revOffset = this._reverseOffset([blIndex, buffOffset]); + if (this._match(revOffset, search)) { + return revOffset; + } + buffOffset++; + } + } + buffOffset = 0; + } + return -1; + }; + BufferList.prototype._match = function(offset, search) { + if (this.length - offset < search.length) { + return false; + } + for (let searchOffset = 0; searchOffset < search.length; searchOffset++) { + if (this.get(offset + searchOffset) !== search[searchOffset]) { + return false; + } + } + return true; + }; + (function() { + const methods = { + readDoubleBE: 8, + readDoubleLE: 8, + readFloatBE: 4, + readFloatLE: 4, + readInt32BE: 4, + readInt32LE: 4, + readUInt32BE: 4, + readUInt32LE: 4, + readInt16BE: 2, + readInt16LE: 2, + readUInt16BE: 2, + readUInt16LE: 2, + readInt8: 1, + readUInt8: 1, + readIntBE: null, + readIntLE: null, + readUIntBE: null, + readUIntLE: null + }; + for (const m in methods) { + (function(m2) { + if (methods[m2] === null) { + BufferList.prototype[m2] = function(offset, byteLength) { + return this.slice(offset, offset + byteLength)[m2](0, byteLength); + }; + } else { + BufferList.prototype[m2] = function(offset = 0) { + return this.slice(offset, offset + methods[m2])[m2](0); + }; + } + })(m); + } + })(); + BufferList.prototype._isBufferList = function _isBufferList(b) { + return b instanceof BufferList || BufferList.isBufferList(b); + }; + BufferList.isBufferList = function isBufferList(b) { + return b != null && b[symbol]; + }; + module2.exports = BufferList; + } +}); + +// ../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/bl.js +var require_bl = __commonJS({ + "../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/bl.js"(exports2, module2) { + "use strict"; + var DuplexStream = require_readable().Duplex; + var inherits = require_inherits(); + var BufferList = require_BufferList2(); + function BufferListStream(callback) { + if (!(this instanceof BufferListStream)) { + return new BufferListStream(callback); + } + if (typeof callback === "function") { + this._callback = callback; + const piper = function piper2(err) { + if (this._callback) { + this._callback(err); + this._callback = null; + } + }.bind(this); + this.on("pipe", function onPipe(src) { + src.on("error", piper); + }); + this.on("unpipe", function onUnpipe(src) { + src.removeListener("error", piper); + }); + callback = null; + } + BufferList._init.call(this, callback); + DuplexStream.call(this); + } + inherits(BufferListStream, DuplexStream); + Object.assign(BufferListStream.prototype, BufferList.prototype); + BufferListStream.prototype._new = function _new(callback) { + return new BufferListStream(callback); + }; + BufferListStream.prototype._write = function _write(buf, encoding, callback) { + this._appendBuffer(buf); + if (typeof callback === "function") { + callback(); + } + }; + BufferListStream.prototype._read = function _read(size) { + if (!this.length) { + return this.push(null); + } + size = Math.min(size, this.length); + this.push(this.slice(0, size)); + this.consume(size); + }; + BufferListStream.prototype.end = function end(chunk) { + DuplexStream.prototype.end.call(this, chunk); + if (this._callback) { + this._callback(null, this.slice()); + this._callback = null; + } + }; + BufferListStream.prototype._destroy = function _destroy(err, cb) { + this._bufs.length = 0; + this.length = 0; + cb(err); + }; + BufferListStream.prototype._isBufferList = function _isBufferList(b) { + return b instanceof BufferListStream || b instanceof BufferList || BufferListStream.isBufferList(b); + }; + BufferListStream.isBufferList = BufferList.isBufferList; + module2.exports = BufferListStream; + module2.exports.BufferListStream = BufferListStream; + module2.exports.BufferList = BufferList; + } +}); + +// ../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/headers.js +var require_headers = __commonJS({ + "../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/headers.js"(exports2) { + var alloc = Buffer.alloc; + var ZEROS = "0000000000000000000"; + var SEVENS = "7777777777777777777"; + var ZERO_OFFSET = "0".charCodeAt(0); + var USTAR_MAGIC = Buffer.from("ustar\0", "binary"); + var USTAR_VER = Buffer.from("00", "binary"); + var GNU_MAGIC = Buffer.from("ustar ", "binary"); + var GNU_VER = Buffer.from(" \0", "binary"); + var MASK = parseInt("7777", 8); + var MAGIC_OFFSET = 257; + var VERSION_OFFSET = 263; + var clamp = function(index, len, defaultValue) { + if (typeof index !== "number") + return defaultValue; + index = ~~index; + if (index >= len) + return len; + if (index >= 0) + return index; + index += len; + if (index >= 0) + return index; + return 0; + }; + var toType = function(flag) { + switch (flag) { + case 0: + return "file"; + case 1: + return "link"; + case 2: + return "symlink"; + case 3: + return "character-device"; + case 4: + return "block-device"; + case 5: + return "directory"; + case 6: + return "fifo"; + case 7: + return "contiguous-file"; + case 72: + return "pax-header"; + case 55: + return "pax-global-header"; + case 27: + return "gnu-long-link-path"; + case 28: + case 30: + return "gnu-long-path"; + } + return null; + }; + var toTypeflag = function(flag) { + switch (flag) { + case "file": + return 0; + case "link": + return 1; + case "symlink": + return 2; + case "character-device": + return 3; + case "block-device": + return 4; + case "directory": + return 5; + case "fifo": + return 6; + case "contiguous-file": + return 7; + case "pax-header": + return 72; + } + return 0; + }; + var indexOf = function(block, num, offset, end) { + for (; offset < end; offset++) { + if (block[offset] === num) + return offset; + } + return end; + }; + var cksum = function(block) { + var sum = 8 * 32; + for (var i = 0; i < 148; i++) + sum += block[i]; + for (var j = 156; j < 512; j++) + sum += block[j]; + return sum; + }; + var encodeOct = function(val, n) { + val = val.toString(8); + if (val.length > n) + return SEVENS.slice(0, n) + " "; + else + return ZEROS.slice(0, n - val.length) + val + " "; + }; + function parse256(buf) { + var positive; + if (buf[0] === 128) + positive = true; + else if (buf[0] === 255) + positive = false; + else + return null; + var tuple = []; + for (var i = buf.length - 1; i > 0; i--) { + var byte = buf[i]; + if (positive) + tuple.push(byte); + else + tuple.push(255 - byte); + } + var sum = 0; + var l = tuple.length; + for (i = 0; i < l; i++) { + sum += tuple[i] * Math.pow(256, i); + } + return positive ? sum : -1 * sum; + } + var decodeOct = function(val, offset, length) { + val = val.slice(offset, offset + length); + offset = 0; + if (val[offset] & 128) { + return parse256(val); + } else { + while (offset < val.length && val[offset] === 32) + offset++; + var end = clamp(indexOf(val, 32, offset, val.length), val.length, val.length); + while (offset < end && val[offset] === 0) + offset++; + if (end === offset) + return 0; + return parseInt(val.slice(offset, end).toString(), 8); + } + }; + var decodeStr = function(val, offset, length, encoding) { + return val.slice(offset, indexOf(val, 0, offset, offset + length)).toString(encoding); + }; + var addLength = function(str) { + var len = Buffer.byteLength(str); + var digits = Math.floor(Math.log(len) / Math.log(10)) + 1; + if (len + digits >= Math.pow(10, digits)) + digits++; + return len + digits + str; + }; + exports2.decodeLongPath = function(buf, encoding) { + return decodeStr(buf, 0, buf.length, encoding); + }; + exports2.encodePax = function(opts) { + var result = ""; + if (opts.name) + result += addLength(" path=" + opts.name + "\n"); + if (opts.linkname) + result += addLength(" linkpath=" + opts.linkname + "\n"); + var pax = opts.pax; + if (pax) { + for (var key in pax) { + result += addLength(" " + key + "=" + pax[key] + "\n"); + } + } + return Buffer.from(result); + }; + exports2.decodePax = function(buf) { + var result = {}; + while (buf.length) { + var i = 0; + while (i < buf.length && buf[i] !== 32) + i++; + var len = parseInt(buf.slice(0, i).toString(), 10); + if (!len) + return result; + var b = buf.slice(i + 1, len - 1).toString(); + var keyIndex = b.indexOf("="); + if (keyIndex === -1) + return result; + result[b.slice(0, keyIndex)] = b.slice(keyIndex + 1); + buf = buf.slice(len); + } + return result; + }; + exports2.encode = function(opts) { + var buf = alloc(512); + var name = opts.name; + var prefix = ""; + if (opts.typeflag === 5 && name[name.length - 1] !== "/") + name += "/"; + if (Buffer.byteLength(name) !== name.length) + return null; + while (Buffer.byteLength(name) > 100) { + var i = name.indexOf("/"); + if (i === -1) + return null; + prefix += prefix ? "/" + name.slice(0, i) : name.slice(0, i); + name = name.slice(i + 1); + } + if (Buffer.byteLength(name) > 100 || Buffer.byteLength(prefix) > 155) + return null; + if (opts.linkname && Buffer.byteLength(opts.linkname) > 100) + return null; + buf.write(name); + buf.write(encodeOct(opts.mode & MASK, 6), 100); + buf.write(encodeOct(opts.uid, 6), 108); + buf.write(encodeOct(opts.gid, 6), 116); + buf.write(encodeOct(opts.size, 11), 124); + buf.write(encodeOct(opts.mtime.getTime() / 1e3 | 0, 11), 136); + buf[156] = ZERO_OFFSET + toTypeflag(opts.type); + if (opts.linkname) + buf.write(opts.linkname, 157); + USTAR_MAGIC.copy(buf, MAGIC_OFFSET); + USTAR_VER.copy(buf, VERSION_OFFSET); + if (opts.uname) + buf.write(opts.uname, 265); + if (opts.gname) + buf.write(opts.gname, 297); + buf.write(encodeOct(opts.devmajor || 0, 6), 329); + buf.write(encodeOct(opts.devminor || 0, 6), 337); + if (prefix) + buf.write(prefix, 345); + buf.write(encodeOct(cksum(buf), 6), 148); + return buf; + }; + exports2.decode = function(buf, filenameEncoding, allowUnknownFormat) { + var typeflag = buf[156] === 0 ? 0 : buf[156] - ZERO_OFFSET; + var name = decodeStr(buf, 0, 100, filenameEncoding); + var mode = decodeOct(buf, 100, 8); + var uid = decodeOct(buf, 108, 8); + var gid = decodeOct(buf, 116, 8); + var size = decodeOct(buf, 124, 12); + var mtime = decodeOct(buf, 136, 12); + var type = toType(typeflag); + var linkname = buf[157] === 0 ? null : decodeStr(buf, 157, 100, filenameEncoding); + var uname = decodeStr(buf, 265, 32); + var gname = decodeStr(buf, 297, 32); + var devmajor = decodeOct(buf, 329, 8); + var devminor = decodeOct(buf, 337, 8); + var c = cksum(buf); + if (c === 8 * 32) + return null; + if (c !== decodeOct(buf, 148, 8)) + throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?"); + if (USTAR_MAGIC.compare(buf, MAGIC_OFFSET, MAGIC_OFFSET + 6) === 0) { + if (buf[345]) + name = decodeStr(buf, 345, 155, filenameEncoding) + "/" + name; + } else if (GNU_MAGIC.compare(buf, MAGIC_OFFSET, MAGIC_OFFSET + 6) === 0 && GNU_VER.compare(buf, VERSION_OFFSET, VERSION_OFFSET + 2) === 0) { + } else { + if (!allowUnknownFormat) { + throw new Error("Invalid tar header: unknown format."); + } + } + if (typeflag === 0 && name && name[name.length - 1] === "/") + typeflag = 5; + return { + name, + mode, + uid, + gid, + size, + mtime: new Date(1e3 * mtime), + type, + linkname, + uname, + gname, + devmajor, + devminor + }; + }; + } +}); + +// ../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/extract.js +var require_extract = __commonJS({ + "../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/extract.js"(exports2, module2) { + var util = require("util"); + var bl = require_bl(); + var headers = require_headers(); + var Writable = require_readable().Writable; + var PassThrough = require_readable().PassThrough; + var noop = function() { + }; + var overflow = function(size) { + size &= 511; + return size && 512 - size; + }; + var emptyStream = function(self2, offset) { + var s = new Source(self2, offset); + s.end(); + return s; + }; + var mixinPax = function(header, pax) { + if (pax.path) + header.name = pax.path; + if (pax.linkpath) + header.linkname = pax.linkpath; + if (pax.size) + header.size = parseInt(pax.size, 10); + header.pax = pax; + return header; + }; + var Source = function(self2, offset) { + this._parent = self2; + this.offset = offset; + PassThrough.call(this, { autoDestroy: false }); + }; + util.inherits(Source, PassThrough); + Source.prototype.destroy = function(err) { + this._parent.destroy(err); + }; + var Extract = function(opts) { + if (!(this instanceof Extract)) + return new Extract(opts); + Writable.call(this, opts); + opts = opts || {}; + this._offset = 0; + this._buffer = bl(); + this._missing = 0; + this._partial = false; + this._onparse = noop; + this._header = null; + this._stream = null; + this._overflow = null; + this._cb = null; + this._locked = false; + this._destroyed = false; + this._pax = null; + this._paxGlobal = null; + this._gnuLongPath = null; + this._gnuLongLinkPath = null; + var self2 = this; + var b = self2._buffer; + var oncontinue = function() { + self2._continue(); + }; + var onunlock = function(err) { + self2._locked = false; + if (err) + return self2.destroy(err); + if (!self2._stream) + oncontinue(); + }; + var onstreamend = function() { + self2._stream = null; + var drain = overflow(self2._header.size); + if (drain) + self2._parse(drain, ondrain); + else + self2._parse(512, onheader); + if (!self2._locked) + oncontinue(); + }; + var ondrain = function() { + self2._buffer.consume(overflow(self2._header.size)); + self2._parse(512, onheader); + oncontinue(); + }; + var onpaxglobalheader = function() { + var size = self2._header.size; + self2._paxGlobal = headers.decodePax(b.slice(0, size)); + b.consume(size); + onstreamend(); + }; + var onpaxheader = function() { + var size = self2._header.size; + self2._pax = headers.decodePax(b.slice(0, size)); + if (self2._paxGlobal) + self2._pax = Object.assign({}, self2._paxGlobal, self2._pax); + b.consume(size); + onstreamend(); + }; + var ongnulongpath = function() { + var size = self2._header.size; + this._gnuLongPath = headers.decodeLongPath(b.slice(0, size), opts.filenameEncoding); + b.consume(size); + onstreamend(); + }; + var ongnulonglinkpath = function() { + var size = self2._header.size; + this._gnuLongLinkPath = headers.decodeLongPath(b.slice(0, size), opts.filenameEncoding); + b.consume(size); + onstreamend(); + }; + var onheader = function() { + var offset = self2._offset; + var header; + try { + header = self2._header = headers.decode(b.slice(0, 512), opts.filenameEncoding, opts.allowUnknownFormat); + } catch (err) { + self2.emit("error", err); + } + b.consume(512); + if (!header) { + self2._parse(512, onheader); + oncontinue(); + return; + } + if (header.type === "gnu-long-path") { + self2._parse(header.size, ongnulongpath); + oncontinue(); + return; + } + if (header.type === "gnu-long-link-path") { + self2._parse(header.size, ongnulonglinkpath); + oncontinue(); + return; + } + if (header.type === "pax-global-header") { + self2._parse(header.size, onpaxglobalheader); + oncontinue(); + return; + } + if (header.type === "pax-header") { + self2._parse(header.size, onpaxheader); + oncontinue(); + return; + } + if (self2._gnuLongPath) { + header.name = self2._gnuLongPath; + self2._gnuLongPath = null; + } + if (self2._gnuLongLinkPath) { + header.linkname = self2._gnuLongLinkPath; + self2._gnuLongLinkPath = null; + } + if (self2._pax) { + self2._header = header = mixinPax(header, self2._pax); + self2._pax = null; + } + self2._locked = true; + if (!header.size || header.type === "directory") { + self2._parse(512, onheader); + self2.emit("entry", header, emptyStream(self2, offset), onunlock); + return; + } + self2._stream = new Source(self2, offset); + self2.emit("entry", header, self2._stream, onunlock); + self2._parse(header.size, onstreamend); + oncontinue(); + }; + this._onheader = onheader; + this._parse(512, onheader); + }; + util.inherits(Extract, Writable); + Extract.prototype.destroy = function(err) { + if (this._destroyed) + return; + this._destroyed = true; + if (err) + this.emit("error", err); + this.emit("close"); + if (this._stream) + this._stream.emit("close"); + }; + Extract.prototype._parse = function(size, onparse) { + if (this._destroyed) + return; + this._offset += size; + this._missing = size; + if (onparse === this._onheader) + this._partial = false; + this._onparse = onparse; + }; + Extract.prototype._continue = function() { + if (this._destroyed) + return; + var cb = this._cb; + this._cb = noop; + if (this._overflow) + this._write(this._overflow, void 0, cb); + else + cb(); + }; + Extract.prototype._write = function(data, enc, cb) { + if (this._destroyed) + return; + var s = this._stream; + var b = this._buffer; + var missing = this._missing; + if (data.length) + this._partial = true; + if (data.length < missing) { + this._missing -= data.length; + this._overflow = null; + if (s) + return s.write(data, cb); + b.append(data); + return cb(); + } + this._cb = cb; + this._missing = 0; + var overflow2 = null; + if (data.length > missing) { + overflow2 = data.slice(missing); + data = data.slice(0, missing); + } + if (s) + s.end(data); + else + b.append(data); + this._overflow = overflow2; + this._onparse(); + }; + Extract.prototype._final = function(cb) { + if (this._partial) + return this.destroy(new Error("Unexpected end of data")); + cb(); + }; + module2.exports = Extract; + } +}); + +// ../../node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/index.js +var require_fs_constants = __commonJS({ + "../../node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/index.js"(exports2, module2) { + module2.exports = require("fs").constants || require("constants"); + } +}); + +// ../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/pack.js +var require_pack = __commonJS({ + "../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/pack.js"(exports2, module2) { + var constants = require_fs_constants(); + var eos = require_end_of_stream2(); + var inherits = require_inherits(); + var alloc = Buffer.alloc; + var Readable = require_readable().Readable; + var Writable = require_readable().Writable; + var StringDecoder = require("string_decoder").StringDecoder; + var headers = require_headers(); + var DMODE = parseInt("755", 8); + var FMODE = parseInt("644", 8); + var END_OF_TAR = alloc(1024); + var noop = function() { + }; + var overflow = function(self2, size) { + size &= 511; + if (size) + self2.push(END_OF_TAR.slice(0, 512 - size)); + }; + function modeToType(mode) { + switch (mode & constants.S_IFMT) { + case constants.S_IFBLK: + return "block-device"; + case constants.S_IFCHR: + return "character-device"; + case constants.S_IFDIR: + return "directory"; + case constants.S_IFIFO: + return "fifo"; + case constants.S_IFLNK: + return "symlink"; + } + return "file"; + } + var Sink = function(to) { + Writable.call(this); + this.written = 0; + this._to = to; + this._destroyed = false; + }; + inherits(Sink, Writable); + Sink.prototype._write = function(data, enc, cb) { + this.written += data.length; + if (this._to.push(data)) + return cb(); + this._to._drain = cb; + }; + Sink.prototype.destroy = function() { + if (this._destroyed) + return; + this._destroyed = true; + this.emit("close"); + }; + var LinkSink = function() { + Writable.call(this); + this.linkname = ""; + this._decoder = new StringDecoder("utf-8"); + this._destroyed = false; + }; + inherits(LinkSink, Writable); + LinkSink.prototype._write = function(data, enc, cb) { + this.linkname += this._decoder.write(data); + cb(); + }; + LinkSink.prototype.destroy = function() { + if (this._destroyed) + return; + this._destroyed = true; + this.emit("close"); + }; + var Void = function() { + Writable.call(this); + this._destroyed = false; + }; + inherits(Void, Writable); + Void.prototype._write = function(data, enc, cb) { + cb(new Error("No body allowed for this entry")); + }; + Void.prototype.destroy = function() { + if (this._destroyed) + return; + this._destroyed = true; + this.emit("close"); + }; + var Pack = function(opts) { + if (!(this instanceof Pack)) + return new Pack(opts); + Readable.call(this, opts); + this._drain = noop; + this._finalized = false; + this._finalizing = false; + this._destroyed = false; + this._stream = null; + }; + inherits(Pack, Readable); + Pack.prototype.entry = function(header, buffer, callback) { + if (this._stream) + throw new Error("already piping an entry"); + if (this._finalized || this._destroyed) + return; + if (typeof buffer === "function") { + callback = buffer; + buffer = null; + } + if (!callback) + callback = noop; + var self2 = this; + if (!header.size || header.type === "symlink") + header.size = 0; + if (!header.type) + header.type = modeToType(header.mode); + if (!header.mode) + header.mode = header.type === "directory" ? DMODE : FMODE; + if (!header.uid) + header.uid = 0; + if (!header.gid) + header.gid = 0; + if (!header.mtime) + header.mtime = new Date(); + if (typeof buffer === "string") + buffer = Buffer.from(buffer); + if (Buffer.isBuffer(buffer)) { + header.size = buffer.length; + this._encode(header); + var ok = this.push(buffer); + overflow(self2, header.size); + if (ok) + process.nextTick(callback); + else + this._drain = callback; + return new Void(); + } + if (header.type === "symlink" && !header.linkname) { + var linkSink = new LinkSink(); + eos(linkSink, function(err) { + if (err) { + self2.destroy(); + return callback(err); + } + header.linkname = linkSink.linkname; + self2._encode(header); + callback(); + }); + return linkSink; + } + this._encode(header); + if (header.type !== "file" && header.type !== "contiguous-file") { + process.nextTick(callback); + return new Void(); + } + var sink = new Sink(this); + this._stream = sink; + eos(sink, function(err) { + self2._stream = null; + if (err) { + self2.destroy(); + return callback(err); + } + if (sink.written !== header.size) { + self2.destroy(); + return callback(new Error("size mismatch")); + } + overflow(self2, header.size); + if (self2._finalizing) + self2.finalize(); + callback(); + }); + return sink; + }; + Pack.prototype.finalize = function() { + if (this._stream) { + this._finalizing = true; + return; + } + if (this._finalized) + return; + this._finalized = true; + this.push(END_OF_TAR); + this.push(null); + }; + Pack.prototype.destroy = function(err) { + if (this._destroyed) + return; + this._destroyed = true; + if (err) + this.emit("error", err); + this.emit("close"); + if (this._stream && this._stream.destroy) + this._stream.destroy(); + }; + Pack.prototype._encode = function(header) { + if (!header.pax) { + var buf = headers.encode(header); + if (buf) { + this.push(buf); + return; + } + } + this._encodePax(header); + }; + Pack.prototype._encodePax = function(header) { + var paxHeader = headers.encodePax({ + name: header.name, + linkname: header.linkname, + pax: header.pax + }); + var newHeader = { + name: "PaxHeader", + mode: header.mode, + uid: header.uid, + gid: header.gid, + size: paxHeader.length, + mtime: header.mtime, + type: "pax-header", + linkname: header.linkname && "PaxHeader", + uname: header.uname, + gname: header.gname, + devmajor: header.devmajor, + devminor: header.devminor + }; + this.push(headers.encode(newHeader)); + this.push(paxHeader); + overflow(this, paxHeader.length); + newHeader.size = header.size; + newHeader.type = header.type; + this.push(headers.encode(newHeader)); + }; + Pack.prototype._read = function(n) { + var drain = this._drain; + this._drain = noop; + drain(); + }; + module2.exports = Pack; + } +}); + +// ../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/index.js +var require_tar_stream = __commonJS({ + "../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/index.js"(exports2) { + exports2.extract = require_extract(); + exports2.pack = require_pack(); + } +}); + +// ../cafs/lib/addFilesFromTarball.js +var require_addFilesFromTarball = __commonJS({ + "../cafs/lib/addFilesFromTarball.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var decompress_maybe_1 = __importDefault(require_decompress_maybe()); + var tar_stream_1 = __importDefault(require_tar_stream()); + var parseJson_1 = require_parseJson(); + async function default_1(addStreamToCafs, _ignore, stream, manifest) { + const ignore = _ignore !== null && _ignore !== void 0 ? _ignore : () => false; + const extract = tar_stream_1.default.extract(); + const filesIndex = {}; + await new Promise((resolve, reject) => { + extract.on("entry", (header, fileStream, next) => { + const filename = header.name.substr(header.name.indexOf("/") + 1).replace(/\/\//g, "/"); + if (header.type !== "file" || ignore(filename) || filesIndex[filename]) { + fileStream.resume(); + next(); + return; + } + if (filename === "package.json" && manifest != null) { + parseJson_1.parseJsonStream(fileStream, manifest); + } + const writeResult = addStreamToCafs(fileStream, header.mode); + filesIndex[filename] = { + mode: header.mode, + size: header.size, + writeResult + }; + next(); + }); + extract.on("finish", () => resolve()); + extract.on("error", reject); + stream.on("error", reject).pipe(decompress_maybe_1.default()).on("error", reject).pipe(extract); + }); + return filesIndex; + } + exports2.default = default_1; + } +}); + +// ../cafs/lib/getFilePathInCafs.js +var require_getFilePathInCafs = __commonJS({ + "../cafs/lib/getFilePathInCafs.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.contentPathFromHex = exports2.getFilePathByModeInCafs = exports2.modeIsExecutable = void 0; + var path_1 = __importDefault(require("path")); + var ssri_1 = __importDefault(require_ssri()); + var modeIsExecutable = (mode) => (mode & 73) === 73; + exports2.modeIsExecutable = modeIsExecutable; + function getFilePathByModeInCafs(cafsDir, integrity, mode) { + const fileType = exports2.modeIsExecutable(mode) ? "exec" : "nonexec"; + return path_1.default.join(cafsDir, contentPathFromIntegrity(integrity, fileType)); + } + exports2.getFilePathByModeInCafs = getFilePathByModeInCafs; + function getFilePathInCafs(cafsDir, integrity, fileType) { + return path_1.default.join(cafsDir, contentPathFromIntegrity(integrity, fileType)); + } + exports2.default = getFilePathInCafs; + function contentPathFromIntegrity(integrity, fileType) { + const sri = ssri_1.default.parse(integrity, { single: true }); + return contentPathFromHex(fileType, sri.hexDigest()); + } + function contentPathFromHex(fileType, hex) { + const p = path_1.default.join(hex.slice(0, 2), hex.slice(2)); + switch (fileType) { + case "exec": + return `${p}-exec`; + case "nonexec": + return p; + case "index": + return `${p}-index.json`; + } + } + exports2.contentPathFromHex = contentPathFromHex; + } +}); + +// ../cafs/lib/checkFilesIntegrity.js +var require_checkFilesIntegrity = __commonJS({ + "../cafs/lib/checkFilesIntegrity.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.verifyFileIntegrity = void 0; + var fs_1 = require("fs"); + var graceful_fs_1 = __importDefault(require_lib18()); + var rimraf_1 = __importDefault(require_rimraf()); + var p_limit_1 = __importDefault(require_p_limit()); + var ssri_1 = __importDefault(require_ssri()); + var getFilePathInCafs_1 = require_getFilePathInCafs(); + var parseJson_1 = require_parseJson(); + var limit = p_limit_1.default(20); + var MAX_BULK_SIZE = 1 * 1024 * 1024; + async function default_1(cafsDir, pkgIndex, manifest) { + let verified = true; + await Promise.all(Object.keys(pkgIndex).map(async (f) => limit(async () => { + const fstat = pkgIndex[f]; + if (!fstat.integrity) { + throw new Error(`Integrity checksum is missing for ${f}`); + } + if (!await verifyFile(getFilePathInCafs_1.getFilePathByModeInCafs(cafsDir, fstat.integrity, fstat.mode), fstat, f === "package.json" ? manifest : void 0)) { + verified = false; + } + }))); + return verified; + } + exports2.default = default_1; + async function verifyFile(filename, fstat, deferredManifest) { + const currentFile = await checkFile(filename, fstat.checkedAt); + if (currentFile == null) + return false; + if (currentFile.isModified) { + if (currentFile.size !== fstat.size) { + await rimraf_1.default(filename); + return false; + } + return verifyFileIntegrity(filename, fstat, deferredManifest); + } + if (deferredManifest != null) { + parseJson_1.parseJsonBuffer(await graceful_fs_1.default.readFile(filename), deferredManifest); + } + return true; + } + async function verifyFileIntegrity(filename, expectedFile, deferredManifest) { + try { + if (expectedFile.size > MAX_BULK_SIZE && deferredManifest == null) { + const ok2 = Boolean(await ssri_1.default.checkStream(graceful_fs_1.default.createReadStream(filename), expectedFile.integrity)); + if (!ok2) { + await rimraf_1.default(filename); + } + return ok2; + } + const data = await graceful_fs_1.default.readFile(filename); + const ok = Boolean(ssri_1.default.checkData(data, expectedFile.integrity)); + if (!ok) { + await rimraf_1.default(filename); + } else if (deferredManifest != null) { + parseJson_1.parseJsonBuffer(data, deferredManifest); + } + return ok; + } catch (err) { + switch (err.code) { + case "ENOENT": + return false; + case "EINTEGRITY": { + await rimraf_1.default(filename); + return false; + } + } + throw err; + } + } + exports2.verifyFileIntegrity = verifyFileIntegrity; + async function checkFile(filename, checkedAt) { + try { + const { mtimeMs, size } = await fs_1.promises.stat(filename); + return { + isModified: mtimeMs - (checkedAt !== null && checkedAt !== void 0 ? checkedAt : 0) > 100, + size + }; + } catch (err) { + if (err.code === "ENOENT") + return null; + throw err; + } + } + } +}); + +// ../cafs/lib/writeFile.js +var require_writeFile = __commonJS({ + "../cafs/lib/writeFile.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var graceful_fs_1 = __importDefault(require_lib18()); + var dirs = new Set(); + async function default_1(fileDest, buffer, mode) { + await makeDirForFile(fileDest); + await graceful_fs_1.default.writeFile(fileDest, buffer, { mode }); + } + exports2.default = default_1; + async function makeDirForFile(fileDest) { + const dir = path_1.default.dirname(fileDest); + if (!dirs.has(dir)) { + await fs_1.promises.mkdir(dir, { recursive: true }); + dirs.add(dir); + } + } + } +}); + +// ../cafs/lib/index.js +var require_lib31 = __commonJS({ + "../cafs/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getFilePathInCafs = exports2.getFilePathByModeInCafs = exports2.checkFilesIntegrity = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var get_stream_1 = __importDefault(require_get_stream()); + var path_temp_1 = __importDefault(require_path_temp()); + var rename_overwrite_1 = __importDefault(require_rename_overwrite()); + var ssri_1 = __importDefault(require_ssri()); + var addFilesFromDir_1 = __importDefault(require_addFilesFromDir()); + var addFilesFromTarball_1 = __importDefault(require_addFilesFromTarball()); + var checkFilesIntegrity_1 = __importStar2(require_checkFilesIntegrity()); + exports2.checkFilesIntegrity = checkFilesIntegrity_1.default; + var getFilePathInCafs_1 = __importStar2(require_getFilePathInCafs()); + exports2.getFilePathInCafs = getFilePathInCafs_1.default; + Object.defineProperty(exports2, "getFilePathByModeInCafs", { enumerable: true, get: function() { + return getFilePathInCafs_1.getFilePathByModeInCafs; + } }); + var writeFile_1 = __importDefault(require_writeFile()); + function createCafs(cafsDir, ignore) { + const locker = new Map(); + const _writeBufferToCafs = writeBufferToCafs.bind(null, locker, cafsDir); + const addStream = addStreamToCafs.bind(null, _writeBufferToCafs); + const addBuffer = addBufferToCafs.bind(null, _writeBufferToCafs); + return { + addFilesFromDir: addFilesFromDir_1.default.bind(null, { addBuffer, addStream }), + addFilesFromTarball: addFilesFromTarball_1.default.bind(null, addStream, ignore !== null && ignore !== void 0 ? ignore : null) + }; + } + exports2.default = createCafs; + async function addStreamToCafs(writeBufferToCafs2, fileStream, mode) { + const buffer = await get_stream_1.default.buffer(fileStream); + return addBufferToCafs(writeBufferToCafs2, buffer, mode); + } + async function addBufferToCafs(writeBufferToCafs2, buffer, mode) { + const integrity = ssri_1.default.fromData(buffer); + const isExecutable = getFilePathInCafs_1.modeIsExecutable(mode); + const fileDest = getFilePathInCafs_1.contentPathFromHex(isExecutable ? "exec" : "nonexec", integrity.hexDigest()); + const checkedAt = await writeBufferToCafs2(buffer, fileDest, isExecutable ? 493 : void 0, integrity); + return { checkedAt, integrity }; + } + async function writeBufferToCafs(locker, cafsDir, buffer, fileDest, mode, integrity) { + fileDest = path_1.default.join(cafsDir, fileDest); + if (locker.has(fileDest)) { + return locker.get(fileDest); + } + const p = (async () => { + if (await existsSame(fileDest, integrity)) { + return Date.now(); + } + const temp = path_temp_1.default(path_1.default.dirname(fileDest)); + await writeFile_1.default(temp, buffer, mode); + const birthtimeMs = Date.now(); + await rename_overwrite_1.default(temp, fileDest); + return birthtimeMs; + })(); + locker.set(fileDest, p); + return p; + } + async function existsSame(filename, integrity) { + let existingFile; + try { + existingFile = await fs_1.promises.stat(filename); + } catch (err) { + return false; + } + return checkFilesIntegrity_1.verifyFileIntegrity(filename, { + size: existingFile.size, + integrity + }); + } + } +}); + +// ../../node_modules/.pnpm/spdx-license-ids@3.0.10/node_modules/spdx-license-ids/index.json +var require_spdx_license_ids = __commonJS({ + "../../node_modules/.pnpm/spdx-license-ids@3.0.10/node_modules/spdx-license-ids/index.json"(exports2, module2) { + module2.exports = [ + "0BSD", + "AAL", + "ADSL", + "AFL-1.1", + "AFL-1.2", + "AFL-2.0", + "AFL-2.1", + "AFL-3.0", + "AGPL-1.0-only", + "AGPL-1.0-or-later", + "AGPL-3.0-only", + "AGPL-3.0-or-later", + "AMDPLPA", + "AML", + "AMPAS", + "ANTLR-PD", + "ANTLR-PD-fallback", + "APAFML", + "APL-1.0", + "APSL-1.0", + "APSL-1.1", + "APSL-1.2", + "APSL-2.0", + "Abstyles", + "Adobe-2006", + "Adobe-Glyph", + "Afmparse", + "Aladdin", + "Apache-1.0", + "Apache-1.1", + "Apache-2.0", + "Artistic-1.0", + "Artistic-1.0-Perl", + "Artistic-1.0-cl8", + "Artistic-2.0", + "BSD-1-Clause", + "BSD-2-Clause", + "BSD-2-Clause-Patent", + "BSD-2-Clause-Views", + "BSD-3-Clause", + "BSD-3-Clause-Attribution", + "BSD-3-Clause-Clear", + "BSD-3-Clause-LBNL", + "BSD-3-Clause-Modification", + "BSD-3-Clause-No-Military-License", + "BSD-3-Clause-No-Nuclear-License", + "BSD-3-Clause-No-Nuclear-License-2014", + "BSD-3-Clause-No-Nuclear-Warranty", + "BSD-3-Clause-Open-MPI", + "BSD-4-Clause", + "BSD-4-Clause-Shortened", + "BSD-4-Clause-UC", + "BSD-Protection", + "BSD-Source-Code", + "BSL-1.0", + "BUSL-1.1", + "Bahyph", + "Barr", + "Beerware", + "BitTorrent-1.0", + "BitTorrent-1.1", + "BlueOak-1.0.0", + "Borceux", + "C-UDA-1.0", + "CAL-1.0", + "CAL-1.0-Combined-Work-Exception", + "CATOSL-1.1", + "CC-BY-1.0", + "CC-BY-2.0", + "CC-BY-2.5", + "CC-BY-2.5-AU", + "CC-BY-3.0", + "CC-BY-3.0-AT", + "CC-BY-3.0-DE", + "CC-BY-3.0-NL", + "CC-BY-3.0-US", + "CC-BY-4.0", + "CC-BY-NC-1.0", + "CC-BY-NC-2.0", + "CC-BY-NC-2.5", + "CC-BY-NC-3.0", + "CC-BY-NC-3.0-DE", + "CC-BY-NC-4.0", + "CC-BY-NC-ND-1.0", + "CC-BY-NC-ND-2.0", + "CC-BY-NC-ND-2.5", + "CC-BY-NC-ND-3.0", + "CC-BY-NC-ND-3.0-DE", + "CC-BY-NC-ND-3.0-IGO", + "CC-BY-NC-ND-4.0", + "CC-BY-NC-SA-1.0", + "CC-BY-NC-SA-2.0", + "CC-BY-NC-SA-2.0-FR", + "CC-BY-NC-SA-2.0-UK", + "CC-BY-NC-SA-2.5", + "CC-BY-NC-SA-3.0", + "CC-BY-NC-SA-3.0-DE", + "CC-BY-NC-SA-3.0-IGO", + "CC-BY-NC-SA-4.0", + "CC-BY-ND-1.0", + "CC-BY-ND-2.0", + "CC-BY-ND-2.5", + "CC-BY-ND-3.0", + "CC-BY-ND-3.0-DE", + "CC-BY-ND-4.0", + "CC-BY-SA-1.0", + "CC-BY-SA-2.0", + "CC-BY-SA-2.0-UK", + "CC-BY-SA-2.1-JP", + "CC-BY-SA-2.5", + "CC-BY-SA-3.0", + "CC-BY-SA-3.0-AT", + "CC-BY-SA-3.0-DE", + "CC-BY-SA-4.0", + "CC-PDDC", + "CC0-1.0", + "CDDL-1.0", + "CDDL-1.1", + "CDL-1.0", + "CDLA-Permissive-1.0", + "CDLA-Permissive-2.0", + "CDLA-Sharing-1.0", + "CECILL-1.0", + "CECILL-1.1", + "CECILL-2.0", + "CECILL-2.1", + "CECILL-B", + "CECILL-C", + "CERN-OHL-1.1", + "CERN-OHL-1.2", + "CERN-OHL-P-2.0", + "CERN-OHL-S-2.0", + "CERN-OHL-W-2.0", + "CNRI-Jython", + "CNRI-Python", + "CNRI-Python-GPL-Compatible", + "CPAL-1.0", + "CPL-1.0", + "CPOL-1.02", + "CUA-OPL-1.0", + "Caldera", + "ClArtistic", + "Condor-1.1", + "Crossword", + "CrystalStacker", + "Cube", + "D-FSL-1.0", + "DOC", + "DRL-1.0", + "DSDP", + "Dotseqn", + "ECL-1.0", + "ECL-2.0", + "EFL-1.0", + "EFL-2.0", + "EPICS", + "EPL-1.0", + "EPL-2.0", + "EUDatagrid", + "EUPL-1.0", + "EUPL-1.1", + "EUPL-1.2", + "Entessa", + "ErlPL-1.1", + "Eurosym", + "FSFAP", + "FSFUL", + "FSFULLR", + "FTL", + "Fair", + "Frameworx-1.0", + "FreeBSD-DOC", + "FreeImage", + "GD", + "GFDL-1.1-invariants-only", + "GFDL-1.1-invariants-or-later", + "GFDL-1.1-no-invariants-only", + "GFDL-1.1-no-invariants-or-later", + "GFDL-1.1-only", + "GFDL-1.1-or-later", + "GFDL-1.2-invariants-only", + "GFDL-1.2-invariants-or-later", + "GFDL-1.2-no-invariants-only", + "GFDL-1.2-no-invariants-or-later", + "GFDL-1.2-only", + "GFDL-1.2-or-later", + "GFDL-1.3-invariants-only", + "GFDL-1.3-invariants-or-later", + "GFDL-1.3-no-invariants-only", + "GFDL-1.3-no-invariants-or-later", + "GFDL-1.3-only", + "GFDL-1.3-or-later", + "GL2PS", + "GLWTPL", + "GPL-1.0-only", + "GPL-1.0-or-later", + "GPL-2.0-only", + "GPL-2.0-or-later", + "GPL-3.0-only", + "GPL-3.0-or-later", + "Giftware", + "Glide", + "Glulxe", + "HPND", + "HPND-sell-variant", + "HTMLTIDY", + "HaskellReport", + "Hippocratic-2.1", + "IBM-pibs", + "ICU", + "IJG", + "IPA", + "IPL-1.0", + "ISC", + "ImageMagick", + "Imlib2", + "Info-ZIP", + "Intel", + "Intel-ACPI", + "Interbase-1.0", + "JPNIC", + "JSON", + "JasPer-2.0", + "LAL-1.2", + "LAL-1.3", + "LGPL-2.0-only", + "LGPL-2.0-or-later", + "LGPL-2.1-only", + "LGPL-2.1-or-later", + "LGPL-3.0-only", + "LGPL-3.0-or-later", + "LGPLLR", + "LPL-1.0", + "LPL-1.02", + "LPPL-1.0", + "LPPL-1.1", + "LPPL-1.2", + "LPPL-1.3a", + "LPPL-1.3c", + "Latex2e", + "Leptonica", + "LiLiQ-P-1.1", + "LiLiQ-R-1.1", + "LiLiQ-Rplus-1.1", + "Libpng", + "Linux-OpenIB", + "MIT", + "MIT-0", + "MIT-CMU", + "MIT-Modern-Variant", + "MIT-advertising", + "MIT-enna", + "MIT-feh", + "MIT-open-group", + "MITNFA", + "MPL-1.0", + "MPL-1.1", + "MPL-2.0", + "MPL-2.0-no-copyleft-exception", + "MS-PL", + "MS-RL", + "MTLL", + "MakeIndex", + "MirOS", + "Motosoto", + "MulanPSL-1.0", + "MulanPSL-2.0", + "Multics", + "Mup", + "NAIST-2003", + "NASA-1.3", + "NBPL-1.0", + "NCGL-UK-2.0", + "NCSA", + "NGPL", + "NIST-PD", + "NIST-PD-fallback", + "NLOD-1.0", + "NLOD-2.0", + "NLPL", + "NOSL", + "NPL-1.0", + "NPL-1.1", + "NPOSL-3.0", + "NRL", + "NTP", + "NTP-0", + "Naumen", + "Net-SNMP", + "NetCDF", + "Newsletr", + "Nokia", + "Noweb", + "O-UDA-1.0", + "OCCT-PL", + "OCLC-2.0", + "ODC-By-1.0", + "ODbL-1.0", + "OFL-1.0", + "OFL-1.0-RFN", + "OFL-1.0-no-RFN", + "OFL-1.1", + "OFL-1.1-RFN", + "OFL-1.1-no-RFN", + "OGC-1.0", + "OGDL-Taiwan-1.0", + "OGL-Canada-2.0", + "OGL-UK-1.0", + "OGL-UK-2.0", + "OGL-UK-3.0", + "OGTSL", + "OLDAP-1.1", + "OLDAP-1.2", + "OLDAP-1.3", + "OLDAP-1.4", + "OLDAP-2.0", + "OLDAP-2.0.1", + "OLDAP-2.1", + "OLDAP-2.2", + "OLDAP-2.2.1", + "OLDAP-2.2.2", + "OLDAP-2.3", + "OLDAP-2.4", + "OLDAP-2.5", + "OLDAP-2.6", + "OLDAP-2.7", + "OLDAP-2.8", + "OML", + "OPL-1.0", + "OPUBL-1.0", + "OSET-PL-2.1", + "OSL-1.0", + "OSL-1.1", + "OSL-2.0", + "OSL-2.1", + "OSL-3.0", + "OpenSSL", + "PDDL-1.0", + "PHP-3.0", + "PHP-3.01", + "PSF-2.0", + "Parity-6.0.0", + "Parity-7.0.0", + "Plexus", + "PolyForm-Noncommercial-1.0.0", + "PolyForm-Small-Business-1.0.0", + "PostgreSQL", + "Python-2.0", + "QPL-1.0", + "Qhull", + "RHeCos-1.1", + "RPL-1.1", + "RPL-1.5", + "RPSL-1.0", + "RSA-MD", + "RSCPL", + "Rdisc", + "Ruby", + "SAX-PD", + "SCEA", + "SGI-B-1.0", + "SGI-B-1.1", + "SGI-B-2.0", + "SHL-0.5", + "SHL-0.51", + "SISSL", + "SISSL-1.2", + "SMLNJ", + "SMPPL", + "SNIA", + "SPL-1.0", + "SSH-OpenSSH", + "SSH-short", + "SSPL-1.0", + "SWL", + "Saxpath", + "Sendmail", + "Sendmail-8.23", + "SimPL-2.0", + "Sleepycat", + "Spencer-86", + "Spencer-94", + "Spencer-99", + "SugarCRM-1.1.3", + "TAPR-OHL-1.0", + "TCL", + "TCP-wrappers", + "TMate", + "TORQUE-1.1", + "TOSL", + "TU-Berlin-1.0", + "TU-Berlin-2.0", + "UCL-1.0", + "UPL-1.0", + "Unicode-DFS-2015", + "Unicode-DFS-2016", + "Unicode-TOU", + "Unlicense", + "VOSTROM", + "VSL-1.0", + "Vim", + "W3C", + "W3C-19980720", + "W3C-20150513", + "WTFPL", + "Watcom-1.0", + "Wsuipa", + "X11", + "XFree86-1.1", + "XSkat", + "Xerox", + "Xnet", + "YPL-1.0", + "YPL-1.1", + "ZPL-1.1", + "ZPL-2.0", + "ZPL-2.1", + "Zed", + "Zend-2.0", + "Zimbra-1.3", + "Zimbra-1.4", + "Zlib", + "blessing", + "bzip2-1.0.5", + "bzip2-1.0.6", + "copyleft-next-0.3.0", + "copyleft-next-0.3.1", + "curl", + "diffmark", + "dvipdfm", + "eGenix", + "etalab-2.0", + "gSOAP-1.3b", + "gnuplot", + "iMatix", + "libpng-2.0", + "libselinux-1.0", + "libtiff", + "mpich2", + "psfrag", + "psutils", + "xinetd", + "xpp", + "zlib-acknowledgement" + ]; + } +}); + +// ../../node_modules/.pnpm/spdx-license-ids@3.0.10/node_modules/spdx-license-ids/deprecated.json +var require_deprecated = __commonJS({ + "../../node_modules/.pnpm/spdx-license-ids@3.0.10/node_modules/spdx-license-ids/deprecated.json"(exports2, module2) { + module2.exports = [ + "AGPL-1.0", + "AGPL-3.0", + "BSD-2-Clause-FreeBSD", + "BSD-2-Clause-NetBSD", + "GFDL-1.1", + "GFDL-1.2", + "GFDL-1.3", + "GPL-1.0", + "GPL-2.0", + "GPL-2.0-with-GCC-exception", + "GPL-2.0-with-autoconf-exception", + "GPL-2.0-with-bison-exception", + "GPL-2.0-with-classpath-exception", + "GPL-2.0-with-font-exception", + "GPL-3.0", + "GPL-3.0-with-GCC-exception", + "GPL-3.0-with-autoconf-exception", + "LGPL-2.0", + "LGPL-2.1", + "LGPL-3.0", + "Nunit", + "StandardML-NJ", + "eCos-2.0", + "wxWindows" + ]; + } +}); + +// ../../node_modules/.pnpm/spdx-exceptions@2.3.0/node_modules/spdx-exceptions/index.json +var require_spdx_exceptions = __commonJS({ + "../../node_modules/.pnpm/spdx-exceptions@2.3.0/node_modules/spdx-exceptions/index.json"(exports2, module2) { + module2.exports = [ + "389-exception", + "Autoconf-exception-2.0", + "Autoconf-exception-3.0", + "Bison-exception-2.2", + "Bootloader-exception", + "Classpath-exception-2.0", + "CLISP-exception-2.0", + "DigiRule-FOSS-exception", + "eCos-exception-2.0", + "Fawkes-Runtime-exception", + "FLTK-exception", + "Font-exception-2.0", + "freertos-exception-2.0", + "GCC-exception-2.0", + "GCC-exception-3.1", + "gnu-javamail-exception", + "GPL-3.0-linking-exception", + "GPL-3.0-linking-source-exception", + "GPL-CC-1.0", + "i2p-gpl-java-exception", + "Libtool-exception", + "Linux-syscall-note", + "LLVM-exception", + "LZMA-exception", + "mif-exception", + "Nokia-Qt-exception-1.1", + "OCaml-LGPL-linking-exception", + "OCCT-exception-1.0", + "OpenJDK-assembly-exception-1.0", + "openvpn-openssl-exception", + "PS-or-PDF-font-exception-20170817", + "Qt-GPL-exception-1.0", + "Qt-LGPL-exception-1.1", + "Qwt-exception-1.0", + "Swift-exception", + "u-boot-exception-2.0", + "Universal-FOSS-exception-1.0", + "WxWindows-exception-3.1" + ]; + } +}); + +// ../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/scan.js +var require_scan3 = __commonJS({ + "../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/scan.js"(exports2, module2) { + "use strict"; + var licenses = [].concat(require_spdx_license_ids()).concat(require_deprecated()); + var exceptions = require_spdx_exceptions(); + module2.exports = function(source) { + var index = 0; + function hasMore() { + return index < source.length; + } + function read(value) { + if (value instanceof RegExp) { + var chars = source.slice(index); + var match = chars.match(value); + if (match) { + index += match[0].length; + return match[0]; + } + } else { + if (source.indexOf(value, index) === index) { + index += value.length; + return value; + } + } + } + function skipWhitespace() { + read(/[ ]*/); + } + function operator() { + var string; + var possibilities = ["WITH", "AND", "OR", "(", ")", ":", "+"]; + for (var i = 0; i < possibilities.length; i++) { + string = read(possibilities[i]); + if (string) { + break; + } + } + if (string === "+" && index > 1 && source[index - 2] === " ") { + throw new Error("Space before `+`"); + } + return string && { + type: "OPERATOR", + string + }; + } + function idstring() { + return read(/[A-Za-z0-9-.]+/); + } + function expectIdstring() { + var string = idstring(); + if (!string) { + throw new Error("Expected idstring at offset " + index); + } + return string; + } + function documentRef() { + if (read("DocumentRef-")) { + var string = expectIdstring(); + return { type: "DOCUMENTREF", string }; + } + } + function licenseRef() { + if (read("LicenseRef-")) { + var string = expectIdstring(); + return { type: "LICENSEREF", string }; + } + } + function identifier() { + var begin = index; + var string = idstring(); + if (licenses.indexOf(string) !== -1) { + return { + type: "LICENSE", + string + }; + } else if (exceptions.indexOf(string) !== -1) { + return { + type: "EXCEPTION", + string + }; + } + index = begin; + } + function parseToken() { + return operator() || documentRef() || licenseRef() || identifier(); + } + var tokens = []; + while (hasMore()) { + skipWhitespace(); + if (!hasMore()) { + break; + } + var token = parseToken(); + if (!token) { + throw new Error("Unexpected `" + source[index] + "` at offset " + index); + } + tokens.push(token); + } + return tokens; + }; + } +}); + +// ../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/parse.js +var require_parse6 = __commonJS({ + "../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/parse.js"(exports2, module2) { + "use strict"; + module2.exports = function(tokens) { + var index = 0; + function hasMore() { + return index < tokens.length; + } + function token() { + return hasMore() ? tokens[index] : null; + } + function next() { + if (!hasMore()) { + throw new Error(); + } + index++; + } + function parseOperator(operator) { + var t = token(); + if (t && t.type === "OPERATOR" && operator === t.string) { + next(); + return t.string; + } + } + function parseWith() { + if (parseOperator("WITH")) { + var t = token(); + if (t && t.type === "EXCEPTION") { + next(); + return t.string; + } + throw new Error("Expected exception after `WITH`"); + } + } + function parseLicenseRef() { + var begin = index; + var string = ""; + var t = token(); + if (t.type === "DOCUMENTREF") { + next(); + string += "DocumentRef-" + t.string + ":"; + if (!parseOperator(":")) { + throw new Error("Expected `:` after `DocumentRef-...`"); + } + } + t = token(); + if (t.type === "LICENSEREF") { + next(); + string += "LicenseRef-" + t.string; + return { license: string }; + } + index = begin; + } + function parseLicense() { + var t = token(); + if (t && t.type === "LICENSE") { + next(); + var node2 = { license: t.string }; + if (parseOperator("+")) { + node2.plus = true; + } + var exception = parseWith(); + if (exception) { + node2.exception = exception; + } + return node2; + } + } + function parseParenthesizedExpression() { + var left = parseOperator("("); + if (!left) { + return; + } + var expr = parseExpression(); + if (!parseOperator(")")) { + throw new Error("Expected `)`"); + } + return expr; + } + function parseAtom() { + return parseParenthesizedExpression() || parseLicenseRef() || parseLicense(); + } + function makeBinaryOpParser(operator, nextParser) { + return function parseBinaryOp() { + var left = nextParser(); + if (!left) { + return; + } + if (!parseOperator(operator)) { + return left; + } + var right = parseBinaryOp(); + if (!right) { + throw new Error("Expected expression"); + } + return { + left, + conjunction: operator.toLowerCase(), + right + }; + }; + } + var parseAnd = makeBinaryOpParser("AND", parseAtom); + var parseExpression = makeBinaryOpParser("OR", parseAnd); + var node = parseExpression(); + if (!node || hasMore()) { + throw new Error("Syntax error"); + } + return node; + }; + } +}); + +// ../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/index.js +var require_spdx_expression_parse = __commonJS({ + "../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/index.js"(exports2, module2) { + "use strict"; + var scan = require_scan3(); + var parse = require_parse6(); + module2.exports = function(source) { + return parse(scan(source)); + }; + } +}); + +// ../../node_modules/.pnpm/spdx-correct@3.1.1/node_modules/spdx-correct/index.js +var require_spdx_correct = __commonJS({ + "../../node_modules/.pnpm/spdx-correct@3.1.1/node_modules/spdx-correct/index.js"(exports2, module2) { + var parse = require_spdx_expression_parse(); + var spdxLicenseIds = require_spdx_license_ids(); + function valid(string) { + try { + parse(string); + return true; + } catch (error) { + return false; + } + } + var transpositions = [ + ["APGL", "AGPL"], + ["Gpl", "GPL"], + ["GLP", "GPL"], + ["APL", "Apache"], + ["ISD", "ISC"], + ["GLP", "GPL"], + ["IST", "ISC"], + ["Claude", "Clause"], + [" or later", "+"], + [" International", ""], + ["GNU", "GPL"], + ["GUN", "GPL"], + ["+", ""], + ["GNU GPL", "GPL"], + ["GNU/GPL", "GPL"], + ["GNU GLP", "GPL"], + ["GNU General Public License", "GPL"], + ["Gnu public license", "GPL"], + ["GNU Public License", "GPL"], + ["GNU GENERAL PUBLIC LICENSE", "GPL"], + ["MTI", "MIT"], + ["Mozilla Public License", "MPL"], + ["Universal Permissive License", "UPL"], + ["WTH", "WTF"], + ["-License", ""] + ]; + var TRANSPOSED = 0; + var CORRECT = 1; + var transforms = [ + function(argument) { + return argument.toUpperCase(); + }, + function(argument) { + return argument.trim(); + }, + function(argument) { + return argument.replace(/\./g, ""); + }, + function(argument) { + return argument.replace(/\s+/g, ""); + }, + function(argument) { + return argument.replace(/\s+/g, "-"); + }, + function(argument) { + return argument.replace("v", "-"); + }, + function(argument) { + return argument.replace(/,?\s*(\d)/, "-$1"); + }, + function(argument) { + return argument.replace(/,?\s*(\d)/, "-$1.0"); + }, + function(argument) { + return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, "-$2"); + }, + function(argument) { + return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, "-$2.0"); + }, + function(argument) { + return argument[0].toUpperCase() + argument.slice(1); + }, + function(argument) { + return argument.replace("/", "-"); + }, + function(argument) { + return argument.replace(/\s*V\s*(\d)/, "-$1").replace(/(\d)$/, "$1.0"); + }, + function(argument) { + if (argument.indexOf("3.0") !== -1) { + return argument + "-or-later"; + } else { + return argument + "-only"; + } + }, + function(argument) { + return argument + "only"; + }, + function(argument) { + return argument.replace(/(\d)$/, "-$1.0"); + }, + function(argument) { + return argument.replace(/(-| )?(\d)$/, "-$2-Clause"); + }, + function(argument) { + return argument.replace(/(-| )clause(-| )(\d)/, "-$3-Clause"); + }, + function(argument) { + return argument.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i, "BSD-3-Clause"); + }, + function(argument) { + return argument.replace(/\bSimplified(-| )?BSD((-| )License)?/i, "BSD-2-Clause"); + }, + function(argument) { + return argument.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i, "BSD-2-Clause-$1BSD"); + }, + function(argument) { + return argument.replace(/\bClear(-| )?BSD((-| )License)?/i, "BSD-3-Clause-Clear"); + }, + function(argument) { + return argument.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i, "BSD-4-Clause"); + }, + function(argument) { + return "CC-" + argument; + }, + function(argument) { + return "CC-" + argument + "-4.0"; + }, + function(argument) { + return argument.replace("Attribution", "BY").replace("NonCommercial", "NC").replace("NoDerivatives", "ND").replace(/ (\d)/, "-$1").replace(/ ?International/, ""); + }, + function(argument) { + return "CC-" + argument.replace("Attribution", "BY").replace("NonCommercial", "NC").replace("NoDerivatives", "ND").replace(/ (\d)/, "-$1").replace(/ ?International/, "") + "-4.0"; + } + ]; + var licensesWithVersions = spdxLicenseIds.map(function(id) { + var match = /^(.*)-\d+\.\d+$/.exec(id); + return match ? [match[0], match[1]] : [id, null]; + }).reduce(function(objectMap, item) { + var key = item[1]; + objectMap[key] = objectMap[key] || []; + objectMap[key].push(item[0]); + return objectMap; + }, {}); + var licensesWithOneVersion = Object.keys(licensesWithVersions).map(function makeEntries(key) { + return [key, licensesWithVersions[key]]; + }).filter(function identifySoleVersions(item) { + return item[1].length === 1 && item[0] !== null && item[0] !== "APL"; + }).map(function createLastResorts(item) { + return [item[0], item[1][0]]; + }); + licensesWithVersions = void 0; + var lastResorts = [ + ["UNLI", "Unlicense"], + ["WTF", "WTFPL"], + ["2 CLAUSE", "BSD-2-Clause"], + ["2-CLAUSE", "BSD-2-Clause"], + ["3 CLAUSE", "BSD-3-Clause"], + ["3-CLAUSE", "BSD-3-Clause"], + ["AFFERO", "AGPL-3.0-or-later"], + ["AGPL", "AGPL-3.0-or-later"], + ["APACHE", "Apache-2.0"], + ["ARTISTIC", "Artistic-2.0"], + ["Affero", "AGPL-3.0-or-later"], + ["BEER", "Beerware"], + ["BOOST", "BSL-1.0"], + ["BSD", "BSD-2-Clause"], + ["CDDL", "CDDL-1.1"], + ["ECLIPSE", "EPL-1.0"], + ["FUCK", "WTFPL"], + ["GNU", "GPL-3.0-or-later"], + ["LGPL", "LGPL-3.0-or-later"], + ["GPLV1", "GPL-1.0-only"], + ["GPL-1", "GPL-1.0-only"], + ["GPLV2", "GPL-2.0-only"], + ["GPL-2", "GPL-2.0-only"], + ["GPL", "GPL-3.0-or-later"], + ["MIT +NO-FALSE-ATTRIBS", "MITNFA"], + ["MIT", "MIT"], + ["MPL", "MPL-2.0"], + ["X11", "X11"], + ["ZLIB", "Zlib"] + ].concat(licensesWithOneVersion); + var SUBSTRING = 0; + var IDENTIFIER = 1; + var validTransformation = function(identifier) { + for (var i = 0; i < transforms.length; i++) { + var transformed = transforms[i](identifier).trim(); + if (transformed !== identifier && valid(transformed)) { + return transformed; + } + } + return null; + }; + var validLastResort = function(identifier) { + var upperCased = identifier.toUpperCase(); + for (var i = 0; i < lastResorts.length; i++) { + var lastResort = lastResorts[i]; + if (upperCased.indexOf(lastResort[SUBSTRING]) > -1) { + return lastResort[IDENTIFIER]; + } + } + return null; + }; + var anyCorrection = function(identifier, check) { + for (var i = 0; i < transpositions.length; i++) { + var transposition = transpositions[i]; + var transposed = transposition[TRANSPOSED]; + if (identifier.indexOf(transposed) > -1) { + var corrected = identifier.replace(transposed, transposition[CORRECT]); + var checked = check(corrected); + if (checked !== null) { + return checked; + } + } + } + return null; + }; + module2.exports = function(identifier, options) { + options = options || {}; + var upgrade = options.upgrade === void 0 ? true : !!options.upgrade; + function postprocess(value) { + return upgrade ? upgradeGPLs(value) : value; + } + var validArugment = typeof identifier === "string" && identifier.trim().length !== 0; + if (!validArugment) { + throw Error("Invalid argument. Expected non-empty string."); + } + identifier = identifier.trim(); + if (valid(identifier)) { + return postprocess(identifier); + } + var noPlus = identifier.replace(/\+$/, "").trim(); + if (valid(noPlus)) { + return postprocess(noPlus); + } + var transformed = validTransformation(identifier); + if (transformed !== null) { + return postprocess(transformed); + } + transformed = anyCorrection(identifier, function(argument) { + if (valid(argument)) { + return argument; + } + return validTransformation(argument); + }); + if (transformed !== null) { + return postprocess(transformed); + } + transformed = validLastResort(identifier); + if (transformed !== null) { + return postprocess(transformed); + } + transformed = anyCorrection(identifier, validLastResort); + if (transformed !== null) { + return postprocess(transformed); + } + return null; + }; + function upgradeGPLs(value) { + if ([ + "GPL-1.0", + "LGPL-1.0", + "AGPL-1.0", + "GPL-2.0", + "LGPL-2.0", + "AGPL-2.0", + "LGPL-2.1" + ].indexOf(value) !== -1) { + return value + "-only"; + } else if ([ + "GPL-1.0+", + "GPL-2.0+", + "GPL-3.0+", + "LGPL-2.0+", + "LGPL-2.1+", + "LGPL-3.0+", + "AGPL-1.0+", + "AGPL-3.0+" + ].indexOf(value) !== -1) { + return value.replace(/\+$/, "-or-later"); + } else if (["GPL-3.0", "LGPL-3.0", "AGPL-3.0"].indexOf(value) !== -1) { + return value + "-or-later"; + } else { + return value; + } + } + } +}); + +// ../../node_modules/.pnpm/validate-npm-package-license@3.0.4/node_modules/validate-npm-package-license/index.js +var require_validate_npm_package_license = __commonJS({ + "../../node_modules/.pnpm/validate-npm-package-license@3.0.4/node_modules/validate-npm-package-license/index.js"(exports2, module2) { + var parse = require_spdx_expression_parse(); + var correct = require_spdx_correct(); + var genericWarning = 'license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN "'; + var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/; + function startsWith(prefix, string) { + return string.slice(0, prefix.length) === prefix; + } + function usesLicenseRef(ast) { + if (ast.hasOwnProperty("license")) { + var license = ast.license; + return startsWith("LicenseRef", license) || startsWith("DocumentRef", license); + } else { + return usesLicenseRef(ast.left) || usesLicenseRef(ast.right); + } + } + module2.exports = function(argument) { + var ast; + try { + ast = parse(argument); + } catch (e) { + var match; + if (argument === "UNLICENSED" || argument === "UNLICENCED") { + return { + validForOldPackages: true, + validForNewPackages: true, + unlicensed: true + }; + } else if (match = fileReferenceRE.exec(argument)) { + return { + validForOldPackages: true, + validForNewPackages: true, + inFile: match[1] + }; + } else { + var result = { + validForOldPackages: false, + validForNewPackages: false, + warnings: [genericWarning] + }; + if (argument.trim().length !== 0) { + var corrected = correct(argument); + if (corrected) { + result.warnings.push('license is similar to the valid expression "' + corrected + '"'); + } + } + return result; + } + } + if (usesLicenseRef(ast)) { + return { + validForNewPackages: false, + validForOldPackages: false, + spdx: true, + warnings: [genericWarning] + }; + } else { + return { + validForNewPackages: true, + validForOldPackages: true, + spdx: true + }; + } + }; + } +}); + +// ../../node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js +var require_implementation = __commonJS({ + "../../node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js"(exports2, module2) { + "use strict"; + var ERROR_MESSAGE = "Function.prototype.bind called on incompatible "; + var slice = Array.prototype.slice; + var toStr = Object.prototype.toString; + var funcType = "[object Function]"; + module2.exports = function bind(that) { + var target = this; + if (typeof target !== "function" || toStr.call(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args2 = slice.call(arguments, 1); + var bound; + var binder = function() { + if (this instanceof bound) { + var result = target.apply(this, args2.concat(slice.call(arguments))); + if (Object(result) === result) { + return result; + } + return this; + } else { + return target.apply(that, args2.concat(slice.call(arguments))); + } + }; + var boundLength = Math.max(0, target.length - args2.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs.push("$" + i); + } + bound = Function("binder", "return function (" + boundArgs.join(",") + "){ return binder.apply(this,arguments); }")(binder); + if (target.prototype) { + var Empty = function Empty2() { + }; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + return bound; + }; + } +}); + +// ../../node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js +var require_function_bind = __commonJS({ + "../../node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js"(exports2, module2) { + "use strict"; + var implementation = require_implementation(); + module2.exports = Function.prototype.bind || implementation; + } +}); + +// ../../node_modules/.pnpm/has@1.0.3/node_modules/has/src/index.js +var require_src5 = __commonJS({ + "../../node_modules/.pnpm/has@1.0.3/node_modules/has/src/index.js"(exports2, module2) { + "use strict"; + var bind = require_function_bind(); + module2.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); + } +}); + +// ../../node_modules/.pnpm/is-core-module@2.6.0/node_modules/is-core-module/core.json +var require_core4 = __commonJS({ + "../../node_modules/.pnpm/is-core-module@2.6.0/node_modules/is-core-module/core.json"(exports2, module2) { + module2.exports = { + assert: true, + "node:assert": ">= 16", + "assert/strict": ">= 15", + "node:assert/strict": ">= 16", + async_hooks: ">= 8", + "node:async_hooks": ">= 16", + buffer_ieee754: "< 0.9.7", + buffer: true, + "node:buffer": ">= 16", + child_process: true, + "node:child_process": ">= 16", + cluster: true, + "node:cluster": ">= 16", + console: true, + "node:console": ">= 16", + constants: true, + "node:constants": ">= 16", + crypto: true, + "node:crypto": ">= 16", + _debug_agent: ">= 1 && < 8", + _debugger: "< 8", + dgram: true, + "node:dgram": ">= 16", + diagnostics_channel: [">= 14.17 && < 15", ">= 15.1"], + "node:diagnostics_channel": ">= 16", + dns: true, + "node:dns": ">= 16", + "dns/promises": ">= 15", + "node:dns/promises": ">= 16", + domain: ">= 0.7.12", + "node:domain": ">= 16", + events: true, + "node:events": ">= 16", + freelist: "< 6", + fs: true, + "node:fs": ">= 16", + "fs/promises": [">= 10 && < 10.1", ">= 14"], + "node:fs/promises": ">= 16", + _http_agent: ">= 0.11.1", + "node:_http_agent": ">= 16", + _http_client: ">= 0.11.1", + "node:_http_client": ">= 16", + _http_common: ">= 0.11.1", + "node:_http_common": ">= 16", + _http_incoming: ">= 0.11.1", + "node:_http_incoming": ">= 16", + _http_outgoing: ">= 0.11.1", + "node:_http_outgoing": ">= 16", + _http_server: ">= 0.11.1", + "node:_http_server": ">= 16", + http: true, + "node:http": ">= 16", + http2: ">= 8.8", + "node:http2": ">= 16", + https: true, + "node:https": ">= 16", + inspector: ">= 8", + "node:inspector": ">= 16", + _linklist: "< 8", + module: true, + "node:module": ">= 16", + net: true, + "node:net": ">= 16", + "node-inspect/lib/_inspect": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12", + os: true, + "node:os": ">= 16", + path: true, + "node:path": ">= 16", + "path/posix": ">= 15.3", + "node:path/posix": ">= 16", + "path/win32": ">= 15.3", + "node:path/win32": ">= 16", + perf_hooks: ">= 8.5", + "node:perf_hooks": ">= 16", + process: ">= 1", + "node:process": ">= 16", + punycode: true, + "node:punycode": ">= 16", + querystring: true, + "node:querystring": ">= 16", + readline: true, + "node:readline": ">= 16", + repl: true, + "node:repl": ">= 16", + smalloc: ">= 0.11.5 && < 3", + _stream_duplex: ">= 0.9.4", + "node:_stream_duplex": ">= 16", + _stream_transform: ">= 0.9.4", + "node:_stream_transform": ">= 16", + _stream_wrap: ">= 1.4.1", + "node:_stream_wrap": ">= 16", + _stream_passthrough: ">= 0.9.4", + "node:_stream_passthrough": ">= 16", + _stream_readable: ">= 0.9.4", + "node:_stream_readable": ">= 16", + _stream_writable: ">= 0.9.4", + "node:_stream_writable": ">= 16", + stream: true, + "node:stream": ">= 16", + "stream/consumers": ">= 16.7", + "node:stream/consumers": ">= 16.7", + "stream/promises": ">= 15", + "node:stream/promises": ">= 16", + "stream/web": ">= 16.5", + "node:stream/web": ">= 16.5", + string_decoder: true, + "node:string_decoder": ">= 16", + sys: [">= 0.6 && < 0.7", ">= 0.8"], + "node:sys": ">= 16", + timers: true, + "node:timers": ">= 16", + "timers/promises": ">= 15", + "node:timers/promises": ">= 16", + _tls_common: ">= 0.11.13", + "node:_tls_common": ">= 16", + _tls_legacy: ">= 0.11.3 && < 10", + _tls_wrap: ">= 0.11.3", + "node:_tls_wrap": ">= 16", + tls: true, + "node:tls": ">= 16", + trace_events: ">= 10", + "node:trace_events": ">= 16", + tty: true, + "node:tty": ">= 16", + url: true, + "node:url": ">= 16", + util: true, + "node:util": ">= 16", + "util/types": ">= 15.3", + "node:util/types": ">= 16", + "v8/tools/arguments": ">= 10 && < 12", + "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"], + v8: ">= 1", + "node:v8": ">= 16", + vm: true, + "node:vm": ">= 16", + wasi: ">= 13.4 && < 13.5", + worker_threads: ">= 11.7", + "node:worker_threads": ">= 16", + zlib: true, + "node:zlib": ">= 16" + }; + } +}); + +// ../../node_modules/.pnpm/is-core-module@2.6.0/node_modules/is-core-module/index.js +var require_is_core_module = __commonJS({ + "../../node_modules/.pnpm/is-core-module@2.6.0/node_modules/is-core-module/index.js"(exports2, module2) { + "use strict"; + var has = require_src5(); + function specifierIncluded(current, specifier) { + var nodeParts = current.split("."); + var parts = specifier.split(" "); + var op = parts.length > 1 ? parts[0] : "="; + var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split("."); + for (var i = 0; i < 3; ++i) { + var cur = parseInt(nodeParts[i] || 0, 10); + var ver = parseInt(versionParts[i] || 0, 10); + if (cur === ver) { + continue; + } + if (op === "<") { + return cur < ver; + } + if (op === ">=") { + return cur >= ver; + } + return false; + } + return op === ">="; + } + function matchesRange(current, range) { + var specifiers = range.split(/ ?&& ?/); + if (specifiers.length === 0) { + return false; + } + for (var i = 0; i < specifiers.length; ++i) { + if (!specifierIncluded(current, specifiers[i])) { + return false; + } + } + return true; + } + function versionIncluded(nodeVersion, specifierValue) { + if (typeof specifierValue === "boolean") { + return specifierValue; + } + var current = typeof nodeVersion === "undefined" ? process.versions && process.versions.node : nodeVersion; + if (typeof current !== "string") { + throw new TypeError(typeof nodeVersion === "undefined" ? "Unable to determine current node version" : "If provided, a valid node version is required"); + } + if (specifierValue && typeof specifierValue === "object") { + for (var i = 0; i < specifierValue.length; ++i) { + if (matchesRange(current, specifierValue[i])) { + return true; + } + } + return false; + } + return matchesRange(current, specifierValue); + } + var data = require_core4(); + module2.exports = function isCore(x, nodeVersion) { + return has(data, x) && versionIncluded(nodeVersion, data[x]); + }; + } +}); + +// ../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/extract_description.js +var require_extract_description = __commonJS({ + "../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/extract_description.js"(exports2, module2) { + module2.exports = extractDescription; + function extractDescription(d) { + if (!d) { + return; + } + if (d === "ERROR: No README data found!") { + return; + } + d = d.trim().split("\n"); + for (var s = 0; d[s] && d[s].trim().match(/^(#|$)/); s++) { + ; + } + var l = d.length; + for (var e = s + 1; e < l && d[e].trim(); e++) { + ; + } + return d.slice(s, e).join(" ").trim(); + } + } +}); + +// ../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/typos.json +var require_typos = __commonJS({ + "../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/typos.json"(exports2, module2) { + module2.exports = { + topLevel: { + dependancies: "dependencies", + dependecies: "dependencies", + depdenencies: "dependencies", + devEependencies: "devDependencies", + depends: "dependencies", + "dev-dependencies": "devDependencies", + devDependences: "devDependencies", + devDepenencies: "devDependencies", + devdependencies: "devDependencies", + repostitory: "repository", + repo: "repository", + prefereGlobal: "preferGlobal", + hompage: "homepage", + hampage: "homepage", + autohr: "author", + autor: "author", + contributers: "contributors", + publicationConfig: "publishConfig", + script: "scripts" + }, + bugs: { web: "url", name: "url" }, + script: { server: "start", tests: "test" } + }; + } +}); + +// ../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/fixer.js +var require_fixer = __commonJS({ + "../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/fixer.js"(exports2, module2) { + var isValidSemver = require_valid(); + var cleanSemver = require_clean(); + var validateLicense = require_validate_npm_package_license(); + var hostedGitInfo = require_hosted_git_info(); + var isBuiltinModule = require_is_core_module(); + var depTypes = ["dependencies", "devDependencies", "optionalDependencies"]; + var extractDescription = require_extract_description(); + var url = require("url"); + var typos = require_typos(); + module2.exports = { + warn: function() { + }, + fixRepositoryField: function(data) { + if (data.repositories) { + this.warn("repositories"); + data.repository = data.repositories[0]; + } + if (!data.repository) { + return this.warn("missingRepository"); + } + if (typeof data.repository === "string") { + data.repository = { + type: "git", + url: data.repository + }; + } + var r = data.repository.url || ""; + if (r) { + var hosted = hostedGitInfo.fromUrl(r); + if (hosted) { + r = data.repository.url = hosted.getDefaultRepresentation() === "shortcut" ? hosted.https() : hosted.toString(); + } + } + if (r.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)) { + this.warn("brokenGitUrl", r); + } + }, + fixTypos: function(data) { + Object.keys(typos.topLevel).forEach(function(d) { + if (Object.prototype.hasOwnProperty.call(data, d)) { + this.warn("typo", d, typos.topLevel[d]); + } + }, this); + }, + fixScriptsField: function(data) { + if (!data.scripts) { + return; + } + if (typeof data.scripts !== "object") { + this.warn("nonObjectScripts"); + delete data.scripts; + return; + } + Object.keys(data.scripts).forEach(function(k) { + if (typeof data.scripts[k] !== "string") { + this.warn("nonStringScript"); + delete data.scripts[k]; + } else if (typos.script[k] && !data.scripts[typos.script[k]]) { + this.warn("typo", k, typos.script[k], "scripts"); + } + }, this); + }, + fixFilesField: function(data) { + var files = data.files; + if (files && !Array.isArray(files)) { + this.warn("nonArrayFiles"); + delete data.files; + } else if (data.files) { + data.files = data.files.filter(function(file) { + if (!file || typeof file !== "string") { + this.warn("invalidFilename", file); + return false; + } else { + return true; + } + }, this); + } + }, + fixBinField: function(data) { + if (!data.bin) { + return; + } + if (typeof data.bin === "string") { + var b = {}; + var match; + if (match = data.name.match(/^@[^/]+[/](.*)$/)) { + b[match[1]] = data.bin; + } else { + b[data.name] = data.bin; + } + data.bin = b; + } + }, + fixManField: function(data) { + if (!data.man) { + return; + } + if (typeof data.man === "string") { + data.man = [data.man]; + } + }, + fixBundleDependenciesField: function(data) { + var bdd = "bundledDependencies"; + var bd = "bundleDependencies"; + if (data[bdd] && !data[bd]) { + data[bd] = data[bdd]; + delete data[bdd]; + } + if (data[bd] && !Array.isArray(data[bd])) { + this.warn("nonArrayBundleDependencies"); + delete data[bd]; + } else if (data[bd]) { + data[bd] = data[bd].filter(function(bd2) { + if (!bd2 || typeof bd2 !== "string") { + this.warn("nonStringBundleDependency", bd2); + return false; + } else { + if (!data.dependencies) { + data.dependencies = {}; + } + if (Object.prototype.hasOwnProperty.call(data.dependencies, bd2)) { + this.warn("nonDependencyBundleDependency", bd2); + data.dependencies[bd2] = "*"; + } + return true; + } + }, this); + } + }, + fixDependencies: function(data, strict) { + objectifyDeps(data, this.warn); + addOptionalDepsToDeps(data, this.warn); + this.fixBundleDependenciesField(data); + ["dependencies", "devDependencies"].forEach(function(deps) { + if (!(deps in data)) { + return; + } + if (!data[deps] || typeof data[deps] !== "object") { + this.warn("nonObjectDependencies", deps); + delete data[deps]; + return; + } + Object.keys(data[deps]).forEach(function(d) { + var r = data[deps][d]; + if (typeof r !== "string") { + this.warn("nonStringDependency", d, JSON.stringify(r)); + delete data[deps][d]; + } + var hosted = hostedGitInfo.fromUrl(data[deps][d]); + if (hosted) { + data[deps][d] = hosted.toString(); + } + }, this); + }, this); + }, + fixModulesField: function(data) { + if (data.modules) { + this.warn("deprecatedModules"); + delete data.modules; + } + }, + fixKeywordsField: function(data) { + if (typeof data.keywords === "string") { + data.keywords = data.keywords.split(/,\s+/); + } + if (data.keywords && !Array.isArray(data.keywords)) { + delete data.keywords; + this.warn("nonArrayKeywords"); + } else if (data.keywords) { + data.keywords = data.keywords.filter(function(kw) { + if (typeof kw !== "string" || !kw) { + this.warn("nonStringKeyword"); + return false; + } else { + return true; + } + }, this); + } + }, + fixVersionField: function(data, strict) { + var loose = !strict; + if (!data.version) { + data.version = ""; + return true; + } + if (!isValidSemver(data.version, loose)) { + throw new Error('Invalid version: "' + data.version + '"'); + } + data.version = cleanSemver(data.version, loose); + return true; + }, + fixPeople: function(data) { + modifyPeople(data, unParsePerson); + modifyPeople(data, parsePerson); + }, + fixNameField: function(data, options) { + if (typeof options === "boolean") { + options = { strict: options }; + } else if (typeof options === "undefined") { + options = {}; + } + var strict = options.strict; + if (!data.name && !strict) { + data.name = ""; + return; + } + if (typeof data.name !== "string") { + throw new Error("name field must be a string."); + } + if (!strict) { + data.name = data.name.trim(); + } + ensureValidName(data.name, strict, options.allowLegacyCase); + if (isBuiltinModule(data.name)) { + this.warn("conflictingName", data.name); + } + }, + fixDescriptionField: function(data) { + if (data.description && typeof data.description !== "string") { + this.warn("nonStringDescription"); + delete data.description; + } + if (data.readme && !data.description) { + data.description = extractDescription(data.readme); + } + if (data.description === void 0) { + delete data.description; + } + if (!data.description) { + this.warn("missingDescription"); + } + }, + fixReadmeField: function(data) { + if (!data.readme) { + this.warn("missingReadme"); + data.readme = "ERROR: No README data found!"; + } + }, + fixBugsField: function(data) { + if (!data.bugs && data.repository && data.repository.url) { + var hosted = hostedGitInfo.fromUrl(data.repository.url); + if (hosted && hosted.bugs()) { + data.bugs = { url: hosted.bugs() }; + } + } else if (data.bugs) { + var emailRe = /^.+@.*\..+$/; + if (typeof data.bugs === "string") { + if (emailRe.test(data.bugs)) { + data.bugs = { email: data.bugs }; + } else if (url.parse(data.bugs).protocol) { + data.bugs = { url: data.bugs }; + } else { + this.warn("nonEmailUrlBugsString"); + } + } else { + bugsTypos(data.bugs, this.warn); + var oldBugs = data.bugs; + data.bugs = {}; + if (oldBugs.url) { + if (typeof oldBugs.url === "string" && url.parse(oldBugs.url).protocol) { + data.bugs.url = oldBugs.url; + } else { + this.warn("nonUrlBugsUrlField"); + } + } + if (oldBugs.email) { + if (typeof oldBugs.email === "string" && emailRe.test(oldBugs.email)) { + data.bugs.email = oldBugs.email; + } else { + this.warn("nonEmailBugsEmailField"); + } + } + } + if (!data.bugs.email && !data.bugs.url) { + delete data.bugs; + this.warn("emptyNormalizedBugs"); + } + } + }, + fixHomepageField: function(data) { + if (!data.homepage && data.repository && data.repository.url) { + var hosted = hostedGitInfo.fromUrl(data.repository.url); + if (hosted && hosted.docs()) { + data.homepage = hosted.docs(); + } + } + if (!data.homepage) { + return; + } + if (typeof data.homepage !== "string") { + this.warn("nonUrlHomepage"); + return delete data.homepage; + } + if (!url.parse(data.homepage).protocol) { + data.homepage = "http://" + data.homepage; + } + }, + fixLicenseField: function(data) { + const license = data.license || data.licence; + if (!license) { + return this.warn("missingLicense"); + } + if (typeof license !== "string" || license.length < 1 || license.trim() === "") { + return this.warn("invalidLicense"); + } + if (!validateLicense(license).validForNewPackages) { + return this.warn("invalidLicense"); + } + } + }; + function isValidScopedPackageName(spec) { + if (spec.charAt(0) !== "@") { + return false; + } + var rest = spec.slice(1).split("/"); + if (rest.length !== 2) { + return false; + } + return rest[0] && rest[1] && rest[0] === encodeURIComponent(rest[0]) && rest[1] === encodeURIComponent(rest[1]); + } + function isCorrectlyEncodedName(spec) { + return !spec.match(/[/@\s+%:]/) && spec === encodeURIComponent(spec); + } + function ensureValidName(name, strict, allowLegacyCase) { + if (name.charAt(0) === "." || !(isValidScopedPackageName(name) || isCorrectlyEncodedName(name)) || strict && !allowLegacyCase && name !== name.toLowerCase() || name.toLowerCase() === "node_modules" || name.toLowerCase() === "favicon.ico") { + throw new Error("Invalid name: " + JSON.stringify(name)); + } + } + function modifyPeople(data, fn2) { + if (data.author) { + data.author = fn2(data.author); + } + ["maintainers", "contributors"].forEach(function(set) { + if (!Array.isArray(data[set])) { + return; + } + data[set] = data[set].map(fn2); + }); + return data; + } + function unParsePerson(person) { + if (typeof person === "string") { + return person; + } + var name = person.name || ""; + var u = person.url || person.web; + var url2 = u ? " (" + u + ")" : ""; + var e = person.email || person.mail; + var email = e ? " <" + e + ">" : ""; + return name + email + url2; + } + function parsePerson(person) { + if (typeof person !== "string") { + return person; + } + var name = person.match(/^([^(<]+)/); + var url2 = person.match(/\(([^)]+)\)/); + var email = person.match(/<([^>]+)>/); + var obj = {}; + if (name && name[0].trim()) { + obj.name = name[0].trim(); + } + if (email) { + obj.email = email[1]; + } + if (url2) { + obj.url = url2[1]; + } + return obj; + } + function addOptionalDepsToDeps(data, warn) { + var o = data.optionalDependencies; + if (!o) { + return; + } + var d = data.dependencies || {}; + Object.keys(o).forEach(function(k) { + d[k] = o[k]; + }); + data.dependencies = d; + } + function depObjectify(deps, type, warn) { + if (!deps) { + return {}; + } + if (typeof deps === "string") { + deps = deps.trim().split(/[\n\r\s\t ,]+/); + } + if (!Array.isArray(deps)) { + return deps; + } + warn("deprecatedArrayDependencies", type); + var o = {}; + deps.filter(function(d) { + return typeof d === "string"; + }).forEach(function(d) { + d = d.trim().split(/(:?[@\s><=])/); + var dn = d.shift(); + var dv = d.join(""); + dv = dv.trim(); + dv = dv.replace(/^@/, ""); + o[dn] = dv; + }); + return o; + } + function objectifyDeps(data, warn) { + depTypes.forEach(function(type) { + if (!data[type]) { + return; + } + data[type] = depObjectify(data[type], type, warn); + }); + } + function bugsTypos(bugs, warn) { + if (!bugs) { + return; + } + Object.keys(bugs).forEach(function(k) { + if (typos.bugs[k]) { + warn("typo", k, typos.bugs[k], "bugs"); + bugs[typos.bugs[k]] = bugs[k]; + delete bugs[k]; + } + }); + } + } +}); + +// ../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/warning_messages.json +var require_warning_messages = __commonJS({ + "../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/warning_messages.json"(exports2, module2) { + module2.exports = { + repositories: "'repositories' (plural) Not supported. Please pick one as the 'repository' field", + missingRepository: "No repository field.", + brokenGitUrl: "Probably broken git url: %s", + nonObjectScripts: "scripts must be an object", + nonStringScript: "script values must be string commands", + nonArrayFiles: "Invalid 'files' member", + invalidFilename: "Invalid filename in 'files' list: %s", + nonArrayBundleDependencies: "Invalid 'bundleDependencies' list. Must be array of package names", + nonStringBundleDependency: "Invalid bundleDependencies member: %s", + nonDependencyBundleDependency: "Non-dependency in bundleDependencies: %s", + nonObjectDependencies: "%s field must be an object", + nonStringDependency: "Invalid dependency: %s %s", + deprecatedArrayDependencies: "specifying %s as array is deprecated", + deprecatedModules: "modules field is deprecated", + nonArrayKeywords: "keywords should be an array of strings", + nonStringKeyword: "keywords should be an array of strings", + conflictingName: "%s is also the name of a node core module.", + nonStringDescription: "'description' field should be a string", + missingDescription: "No description", + missingReadme: "No README data", + missingLicense: "No license field.", + nonEmailUrlBugsString: "Bug string field must be url, email, or {email,url}", + nonUrlBugsUrlField: "bugs.url field must be a string url. Deleted.", + nonEmailBugsEmailField: "bugs.email field must be a string email. Deleted.", + emptyNormalizedBugs: "Normalized value of bugs field is an empty object. Deleted.", + nonUrlHomepage: "homepage field must be a string url. Deleted.", + invalidLicense: "license should be a valid SPDX license expression", + typo: "%s should probably be %s." + }; + } +}); + +// ../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/make_warning.js +var require_make_warning = __commonJS({ + "../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/make_warning.js"(exports2, module2) { + var util = require("util"); + var messages = require_warning_messages(); + module2.exports = function() { + var args2 = Array.prototype.slice.call(arguments, 0); + var warningName = args2.shift(); + if (warningName === "typo") { + return makeTypoWarning.apply(null, args2); + } else { + var msgTemplate = messages[warningName] ? messages[warningName] : warningName + ": '%s'"; + args2.unshift(msgTemplate); + return util.format.apply(null, args2); + } + }; + function makeTypoWarning(providedName, probableName, field) { + if (field) { + providedName = field + "['" + providedName + "']"; + probableName = field + "['" + probableName + "']"; + } + return util.format(messages.typo, providedName, probableName); + } + } +}); + +// ../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/normalize.js +var require_normalize = __commonJS({ + "../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/normalize.js"(exports2, module2) { + module2.exports = normalize; + var fixer = require_fixer(); + normalize.fixer = fixer; + var makeWarning = require_make_warning(); + var fieldsToFix = [ + "name", + "version", + "description", + "repository", + "modules", + "scripts", + "files", + "bin", + "man", + "bugs", + "keywords", + "readme", + "homepage", + "license" + ]; + var otherThingsToFix = ["dependencies", "people", "typos"]; + var thingsToFix = fieldsToFix.map(function(fieldName) { + return ucFirst(fieldName) + "Field"; + }); + thingsToFix = thingsToFix.concat(otherThingsToFix); + function normalize(data, warn, strict) { + if (warn === true) { + warn = null; + strict = true; + } + if (!strict) { + strict = false; + } + if (!warn || data.private) { + warn = function(msg) { + }; + } + if (data.scripts && data.scripts.install === "node-gyp rebuild" && !data.scripts.preinstall) { + data.gypfile = true; + } + fixer.warn = function() { + warn(makeWarning.apply(null, arguments)); + }; + thingsToFix.forEach(function(thingName) { + fixer["fix" + ucFirst(thingName)](data, strict); + }); + data._id = data.name + "@" + data.version; + } + function ucFirst(string) { + return string.charAt(0).toUpperCase() + string.slice(1); + } + } +}); + +// ../read-package-json/lib/index.js +var require_lib32 = __commonJS({ + "../read-package-json/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.safeReadPackageFromDir = exports2.safeReadPackage = exports2.fromDir = void 0; + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var load_json_file_1 = __importDefault(require_load_json_file()); + var normalize_package_data_1 = __importDefault(require_normalize()); + async function readPkg(pkgPath) { + try { + const manifest = await load_json_file_1.default(pkgPath); + normalize_package_data_1.default(manifest); + return manifest; + } catch (err) { + if (err.code) + throw err; + throw new error_1.default("BAD_PACKAGE_JSON", `${pkgPath}: ${err.message}`); + } + } + exports2.default = readPkg; + async function fromDir(pkgPath) { + return readPkg(path_1.default.join(pkgPath, "package.json")); + } + exports2.fromDir = fromDir; + async function safeReadPackage(pkgPath) { + try { + return await readPkg(pkgPath); + } catch (err) { + if (err.code !== "ENOENT") + throw err; + return null; + } + } + exports2.safeReadPackage = safeReadPackage; + async function safeReadPackageFromDir(pkgPath) { + return safeReadPackage(path_1.default.join(pkgPath, "package.json")); + } + exports2.safeReadPackageFromDir = safeReadPackageFromDir; + } +}); + +// ../../node_modules/.pnpm/mimic-fn@3.1.0/node_modules/mimic-fn/index.js +var require_mimic_fn2 = __commonJS({ + "../../node_modules/.pnpm/mimic-fn@3.1.0/node_modules/mimic-fn/index.js"(exports2, module2) { + "use strict"; + var copyProperty = (to, from, property, ignoreNonConfigurable) => { + if (property === "length" || property === "prototype") { + return; + } + if (property === "arguments" || property === "caller") { + return; + } + const toDescriptor = Object.getOwnPropertyDescriptor(to, property); + const fromDescriptor = Object.getOwnPropertyDescriptor(from, property); + if (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) { + return; + } + Object.defineProperty(to, property, fromDescriptor); + }; + var canCopyProperty = function(toDescriptor, fromDescriptor) { + return toDescriptor === void 0 || toDescriptor.configurable || toDescriptor.writable === fromDescriptor.writable && toDescriptor.enumerable === fromDescriptor.enumerable && toDescriptor.configurable === fromDescriptor.configurable && (toDescriptor.writable || toDescriptor.value === fromDescriptor.value); + }; + var changePrototype = (to, from) => { + const fromPrototype = Object.getPrototypeOf(from); + if (fromPrototype === Object.getPrototypeOf(to)) { + return; + } + Object.setPrototypeOf(to, fromPrototype); + }; + var wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/ +${fromBody}`; + var toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, "toString"); + var toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, "name"); + var changeToString = (to, from, name) => { + const withName = name === "" ? "" : `with ${name.trim()}() `; + const newToString = wrappedToString.bind(null, withName, from.toString()); + Object.defineProperty(newToString, "name", toStringName); + Object.defineProperty(to, "toString", { ...toStringDescriptor, value: newToString }); + }; + var mimicFn = (to, from, { ignoreNonConfigurable = false } = {}) => { + const { name } = to; + for (const property of Reflect.ownKeys(from)) { + copyProperty(to, from, property, ignoreNonConfigurable); + } + changePrototype(to, from); + changeToString(to, from, name); + return to; + }; + module2.exports = mimicFn; + } +}); + +// ../../node_modules/.pnpm/p-defer@1.0.0/node_modules/p-defer/index.js +var require_p_defer = __commonJS({ + "../../node_modules/.pnpm/p-defer@1.0.0/node_modules/p-defer/index.js"(exports2, module2) { + "use strict"; + module2.exports = () => { + const ret = {}; + ret.promise = new Promise((resolve, reject) => { + ret.resolve = resolve; + ret.reject = reject; + }); + return ret; + }; + } +}); + +// ../../node_modules/.pnpm/map-age-cleaner@0.1.3/node_modules/map-age-cleaner/dist/index.js +var require_dist7 = __commonJS({ + "../../node_modules/.pnpm/map-age-cleaner@0.1.3/node_modules/map-age-cleaner/dist/index.js"(exports2, module2) { + "use strict"; + var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : new P(function(resolve2) { + resolve2(result.value); + }).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var p_defer_1 = __importDefault(require_p_defer()); + function mapAgeCleaner(map, property = "maxAge") { + let processingKey; + let processingTimer; + let processingDeferred; + const cleanup = () => __awaiter(this, void 0, void 0, function* () { + if (processingKey !== void 0) { + return; + } + const setupTimer = (item) => __awaiter(this, void 0, void 0, function* () { + processingDeferred = p_defer_1.default(); + const delay = item[1][property] - Date.now(); + if (delay <= 0) { + map.delete(item[0]); + processingDeferred.resolve(); + return; + } + processingKey = item[0]; + processingTimer = setTimeout(() => { + map.delete(item[0]); + if (processingDeferred) { + processingDeferred.resolve(); + } + }, delay); + if (typeof processingTimer.unref === "function") { + processingTimer.unref(); + } + return processingDeferred.promise; + }); + try { + for (const entry of map) { + yield setupTimer(entry); + } + } catch (_a) { + } + processingKey = void 0; + }); + const reset = () => { + processingKey = void 0; + if (processingTimer !== void 0) { + clearTimeout(processingTimer); + processingTimer = void 0; + } + if (processingDeferred !== void 0) { + processingDeferred.reject(void 0); + processingDeferred = void 0; + } + }; + const originalSet = map.set.bind(map); + map.set = (key, value) => { + if (map.has(key)) { + map.delete(key); + } + const result = originalSet(key, value); + if (processingKey && processingKey === key) { + reset(); + } + cleanup(); + return result; + }; + cleanup(); + return map; + } + exports2.default = mapAgeCleaner; + module2.exports = mapAgeCleaner; + module2.exports.default = mapAgeCleaner; + } +}); + +// ../../node_modules/.pnpm/mem@8.1.1/node_modules/mem/dist/index.js +var require_dist8 = __commonJS({ + "../../node_modules/.pnpm/mem@8.1.1/node_modules/mem/dist/index.js"(exports2, module2) { + "use strict"; + var mimicFn = require_mimic_fn2(); + var mapAgeCleaner = require_dist7(); + var decoratorInstanceMap = new WeakMap(); + var cacheStore = new WeakMap(); + var mem = (fn2, { cacheKey, cache = new Map(), maxAge } = {}) => { + if (typeof maxAge === "number") { + mapAgeCleaner(cache); + } + const memoized = function(...arguments_) { + const key = cacheKey ? cacheKey(arguments_) : arguments_[0]; + const cacheItem = cache.get(key); + if (cacheItem) { + return cacheItem.data; + } + const result = fn2.apply(this, arguments_); + cache.set(key, { + data: result, + maxAge: maxAge ? Date.now() + maxAge : Number.POSITIVE_INFINITY + }); + return result; + }; + mimicFn(memoized, fn2, { + ignoreNonConfigurable: true + }); + cacheStore.set(memoized, cache); + return memoized; + }; + mem.decorator = (options = {}) => (target, propertyKey, descriptor) => { + const input = target[propertyKey]; + if (typeof input !== "function") { + throw new TypeError("The decorated value must be a function"); + } + delete descriptor.value; + delete descriptor.writable; + descriptor.get = function() { + if (!decoratorInstanceMap.has(this)) { + const value = mem(input, options); + decoratorInstanceMap.set(this, value); + return value; + } + return decoratorInstanceMap.get(this); + }; + }; + mem.clear = (fn2) => { + const cache = cacheStore.get(fn2); + if (!cache) { + throw new TypeError("Can't clear a function that was not memoized!"); + } + if (typeof cache.clear !== "function") { + throw new TypeError("The cache Map can't be cleared!"); + } + cache.clear(); + }; + module2.exports = mem; + } +}); + +// ../../node_modules/.pnpm/encode-registry@3.0.0/node_modules/encode-registry/index.js +var require_encode_registry = __commonJS({ + "../../node_modules/.pnpm/encode-registry@3.0.0/node_modules/encode-registry/index.js"(exports2, module2) { + "use strict"; + var assert = require("assert"); + var { URL: URL2 } = require("url"); + var mem = require_dist8(); + module2.exports = mem(encodeRegistry); + function encodeRegistry(registry) { + assert(registry, "`registry` is required"); + assert(typeof registry === "string", "`registry` should be a string"); + const host = getHost(registry); + return escapeHost(host); + } + function escapeHost(host) { + return host.replace(":", "+"); + } + function getHost(rawUrl) { + const urlObj = new URL2(rawUrl); + if (!urlObj || !urlObj.host) { + throw new Error(`Couldn't get host from ${rawUrl}`); + } + return urlObj.host; + } + } +}); + +// ../dependency-path/lib/index.js +var require_lib33 = __commonJS({ + "../dependency-path/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.depPathToFilename = exports2.parse = exports2.refToRelative = exports2.relative = exports2.getRegistryByPackageName = exports2.refToAbsolute = exports2.tryGetPackageId = exports2.resolve = exports2.isAbsolute = void 0; + var crypto_1 = __importDefault(require("crypto")); + var path_1 = __importDefault(require("path")); + var encode_registry_1 = __importDefault(require_encode_registry()); + var normalize_path_1 = __importDefault(require_normalize_path()); + var semver_1 = __importDefault(require_semver2()); + function isAbsolute(dependencyPath) { + return dependencyPath[0] !== "/"; + } + exports2.isAbsolute = isAbsolute; + function resolve(registries, resolutionLocation) { + if (!isAbsolute(resolutionLocation)) { + let registryUrl; + if (resolutionLocation[1] === "@") { + const scope = resolutionLocation.substr(1, resolutionLocation.indexOf("/", 1) - 1); + registryUrl = registries[scope] || registries.default; + } else { + registryUrl = registries.default; + } + const registryDirectory = encode_registry_1.default(registryUrl); + return `${registryDirectory}${resolutionLocation}`; + } + return resolutionLocation; + } + exports2.resolve = resolve; + function tryGetPackageId(registries, relDepPath) { + if (relDepPath[0] !== "/") { + return null; + } + const underscoreIndex = relDepPath.indexOf("_", relDepPath.lastIndexOf("/")); + if (underscoreIndex !== -1) { + return resolve(registries, relDepPath.substr(0, underscoreIndex)); + } + return resolve(registries, relDepPath); + } + exports2.tryGetPackageId = tryGetPackageId; + function refToAbsolute(reference, pkgName, registries) { + if (reference.startsWith("link:")) { + return null; + } + if (!reference.includes("/")) { + const registryName2 = encode_registry_1.default(getRegistryByPackageName(registries, pkgName)); + return `${registryName2}/${pkgName}/${reference}`; + } + if (reference[0] !== "/") + return reference; + const registryName = encode_registry_1.default(getRegistryByPackageName(registries, pkgName)); + return `${registryName}${reference}`; + } + exports2.refToAbsolute = refToAbsolute; + function getRegistryByPackageName(registries, packageName) { + if (packageName[0] !== "@") + return registries.default; + const scope = packageName.substr(0, packageName.indexOf("/")); + return registries[scope] || registries.default; + } + exports2.getRegistryByPackageName = getRegistryByPackageName; + function relative2(registries, packageName, absoluteResolutionLoc) { + const registryName = encode_registry_1.default(getRegistryByPackageName(registries, packageName)); + if (absoluteResolutionLoc.startsWith(`${registryName}/`)) { + return absoluteResolutionLoc.substr(absoluteResolutionLoc.indexOf("/")); + } + return absoluteResolutionLoc; + } + exports2.relative = relative2; + function refToRelative(reference, pkgName) { + if (reference.startsWith("link:")) { + return null; + } + if (reference.startsWith("file:")) { + return reference; + } + if (!reference.includes("/")) { + return `/${pkgName}/${reference}`; + } + return reference; + } + exports2.refToRelative = refToRelative; + function parse(dependencyPath) { + if (typeof dependencyPath !== "string") { + throw new TypeError(`Expected \`dependencyPath\` to be of type \`string\`, got \`${dependencyPath === null ? "null" : typeof dependencyPath}\``); + } + const _isAbsolute = isAbsolute(dependencyPath); + const parts = dependencyPath.split("/"); + if (!_isAbsolute) + parts.shift(); + const host = _isAbsolute ? parts.shift() : void 0; + const name = parts[0].startsWith("@") ? `${parts.shift()}/${parts.shift()}` : parts.shift(); + let version = parts.shift(); + if (version) { + const underscoreIndex = version.indexOf("_"); + let peersSuffix; + if (underscoreIndex !== -1) { + peersSuffix = version.substring(underscoreIndex + 1); + version = version.substring(0, underscoreIndex); + } + if (semver_1.default.valid(version)) { + return { + host, + isAbsolute: _isAbsolute, + name, + peersSuffix, + version + }; + } + } + if (!_isAbsolute) + throw new Error(`${dependencyPath} is an invalid relative dependency path`); + return { + host, + isAbsolute: _isAbsolute + }; + } + exports2.parse = parse; + function depPathToFilename(depPath, lockfileDir) { + const filename = depPathToFilenameUnescaped(depPath, lockfileDir).replace(/\//g, "+"); + if (filename.length > 120 || filename !== filename.toLowerCase() && !filename.startsWith("local+")) { + return `${filename.substring(0, 50)}_${crypto_1.default.createHash("md5").update(filename).digest("hex")}`; + } + return filename; + } + exports2.depPathToFilename = depPathToFilename; + function depPathToFilenameUnescaped(depPath, lockfileDir) { + if (depPath.indexOf("file:") !== 0) { + if (depPath.startsWith("/")) { + depPath = depPath.substring(1); + } + const index = depPath.lastIndexOf("/"); + return `${depPath.substring(0, index)}@${depPath.substr(index + 1)}`; + } + const absolutePath = normalize_path_1.default(path_1.default.join(lockfileDir, depPath.slice(5))); + return `local+${absolutePath.replace(":", "+")}`; + } + } +}); + +// ../../node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js +var require_eventemitter3 = __commonJS({ + "../../node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js"(exports2, module2) { + "use strict"; + var has = Object.prototype.hasOwnProperty; + var prefix = "~"; + function Events() { + } + if (Object.create) { + Events.prototype = Object.create(null); + if (!new Events().__proto__) + prefix = false; + } + function EE(fn2, context, once) { + this.fn = fn2; + this.context = context; + this.once = once || false; + } + function addListener(emitter, event, fn2, context, once) { + if (typeof fn2 !== "function") { + throw new TypeError("The listener must be a function"); + } + var listener = new EE(fn2, context || emitter, once), evt = prefix ? prefix + event : event; + if (!emitter._events[evt]) + emitter._events[evt] = listener, emitter._eventsCount++; + else if (!emitter._events[evt].fn) + emitter._events[evt].push(listener); + else + emitter._events[evt] = [emitter._events[evt], listener]; + return emitter; + } + function clearEvent(emitter, evt) { + if (--emitter._eventsCount === 0) + emitter._events = new Events(); + else + delete emitter._events[evt]; + } + function EventEmitter() { + this._events = new Events(); + this._eventsCount = 0; + } + EventEmitter.prototype.eventNames = function eventNames() { + var names = [], events, name; + if (this._eventsCount === 0) + return names; + for (name in events = this._events) { + if (has.call(events, name)) + names.push(prefix ? name.slice(1) : name); + } + if (Object.getOwnPropertySymbols) { + return names.concat(Object.getOwnPropertySymbols(events)); + } + return names; + }; + EventEmitter.prototype.listeners = function listeners(event) { + var evt = prefix ? prefix + event : event, handlers = this._events[evt]; + if (!handlers) + return []; + if (handlers.fn) + return [handlers.fn]; + for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) { + ee[i] = handlers[i].fn; + } + return ee; + }; + EventEmitter.prototype.listenerCount = function listenerCount(event) { + var evt = prefix ? prefix + event : event, listeners = this._events[evt]; + if (!listeners) + return 0; + if (listeners.fn) + return 1; + return listeners.length; + }; + EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { + var evt = prefix ? prefix + event : event; + if (!this._events[evt]) + return false; + var listeners = this._events[evt], len = arguments.length, args2, i; + if (listeners.fn) { + if (listeners.once) + this.removeListener(event, listeners.fn, void 0, true); + switch (len) { + case 1: + return listeners.fn.call(listeners.context), true; + case 2: + return listeners.fn.call(listeners.context, a1), true; + case 3: + return listeners.fn.call(listeners.context, a1, a2), true; + case 4: + return listeners.fn.call(listeners.context, a1, a2, a3), true; + case 5: + return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; + case 6: + return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; + } + for (i = 1, args2 = new Array(len - 1); i < len; i++) { + args2[i - 1] = arguments[i]; + } + listeners.fn.apply(listeners.context, args2); + } else { + var length = listeners.length, j; + for (i = 0; i < length; i++) { + if (listeners[i].once) + this.removeListener(event, listeners[i].fn, void 0, true); + switch (len) { + case 1: + listeners[i].fn.call(listeners[i].context); + break; + case 2: + listeners[i].fn.call(listeners[i].context, a1); + break; + case 3: + listeners[i].fn.call(listeners[i].context, a1, a2); + break; + case 4: + listeners[i].fn.call(listeners[i].context, a1, a2, a3); + break; + default: + if (!args2) + for (j = 1, args2 = new Array(len - 1); j < len; j++) { + args2[j - 1] = arguments[j]; + } + listeners[i].fn.apply(listeners[i].context, args2); + } + } + } + return true; + }; + EventEmitter.prototype.on = function on(event, fn2, context) { + return addListener(this, event, fn2, context, false); + }; + EventEmitter.prototype.once = function once(event, fn2, context) { + return addListener(this, event, fn2, context, true); + }; + EventEmitter.prototype.removeListener = function removeListener(event, fn2, context, once) { + var evt = prefix ? prefix + event : event; + if (!this._events[evt]) + return this; + if (!fn2) { + clearEvent(this, evt); + return this; + } + var listeners = this._events[evt]; + if (listeners.fn) { + if (listeners.fn === fn2 && (!once || listeners.once) && (!context || listeners.context === context)) { + clearEvent(this, evt); + } + } else { + for (var i = 0, events = [], length = listeners.length; i < length; i++) { + if (listeners[i].fn !== fn2 || once && !listeners[i].once || context && listeners[i].context !== context) { + events.push(listeners[i]); + } + } + if (events.length) + this._events[evt] = events.length === 1 ? events[0] : events; + else + clearEvent(this, evt); + } + return this; + }; + EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { + var evt; + if (event) { + evt = prefix ? prefix + event : event; + if (this._events[evt]) + clearEvent(this, evt); + } else { + this._events = new Events(); + this._eventsCount = 0; + } + return this; + }; + EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + EventEmitter.prototype.addListener = EventEmitter.prototype.on; + EventEmitter.prefixed = prefix; + EventEmitter.EventEmitter = EventEmitter; + if (typeof module2 !== "undefined") { + module2.exports = EventEmitter; + } + } +}); + +// ../../node_modules/.pnpm/p-finally@1.0.0/node_modules/p-finally/index.js +var require_p_finally = __commonJS({ + "../../node_modules/.pnpm/p-finally@1.0.0/node_modules/p-finally/index.js"(exports2, module2) { + "use strict"; + module2.exports = (promise, onFinally) => { + onFinally = onFinally || (() => { + }); + return promise.then((val) => new Promise((resolve) => { + resolve(onFinally()); + }).then(() => val), (err) => new Promise((resolve) => { + resolve(onFinally()); + }).then(() => { + throw err; + })); + }; + } +}); + +// ../../node_modules/.pnpm/p-timeout@3.2.0/node_modules/p-timeout/index.js +var require_p_timeout = __commonJS({ + "../../node_modules/.pnpm/p-timeout@3.2.0/node_modules/p-timeout/index.js"(exports2, module2) { + "use strict"; + var pFinally = require_p_finally(); + var TimeoutError = class extends Error { + constructor(message2) { + super(message2); + this.name = "TimeoutError"; + } + }; + var pTimeout = (promise, milliseconds, fallback) => new Promise((resolve, reject) => { + if (typeof milliseconds !== "number" || milliseconds < 0) { + throw new TypeError("Expected `milliseconds` to be a positive number"); + } + if (milliseconds === Infinity) { + resolve(promise); + return; + } + const timer = setTimeout(() => { + if (typeof fallback === "function") { + try { + resolve(fallback()); + } catch (error) { + reject(error); + } + return; + } + const message2 = typeof fallback === "string" ? fallback : `Promise timed out after ${milliseconds} milliseconds`; + const timeoutError = fallback instanceof Error ? fallback : new TimeoutError(message2); + if (typeof promise.cancel === "function") { + promise.cancel(); + } + reject(timeoutError); + }, milliseconds); + pFinally(promise.then(resolve, reject), () => { + clearTimeout(timer); + }); + }); + module2.exports = pTimeout; + module2.exports.default = pTimeout; + module2.exports.TimeoutError = TimeoutError; + } +}); + +// ../../node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/lower-bound.js +var require_lower_bound = __commonJS({ + "../../node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/lower-bound.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function lowerBound(array, value, comparator) { + let first = 0; + let count = array.length; + while (count > 0) { + const step = count / 2 | 0; + let it = first + step; + if (comparator(array[it], value) <= 0) { + first = ++it; + count -= step + 1; + } else { + count = step; + } + } + return first; + } + exports2.default = lowerBound; + } +}); + +// ../../node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/priority-queue.js +var require_priority_queue = __commonJS({ + "../../node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/priority-queue.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var lower_bound_1 = require_lower_bound(); + var PriorityQueue = class { + constructor() { + this._queue = []; + } + enqueue(run, options) { + options = Object.assign({ priority: 0 }, options); + const element = { + priority: options.priority, + run + }; + if (this.size && this._queue[this.size - 1].priority >= options.priority) { + this._queue.push(element); + return; + } + const index = lower_bound_1.default(this._queue, element, (a, b) => b.priority - a.priority); + this._queue.splice(index, 0, element); + } + dequeue() { + const item = this._queue.shift(); + return item === null || item === void 0 ? void 0 : item.run; + } + filter(options) { + return this._queue.filter((element) => element.priority === options.priority).map((element) => element.run); + } + get size() { + return this._queue.length; + } + }; + exports2.default = PriorityQueue; + } +}); + +// ../../node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.js +var require_dist9 = __commonJS({ + "../../node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var EventEmitter = require_eventemitter3(); + var p_timeout_1 = require_p_timeout(); + var priority_queue_1 = require_priority_queue(); + var empty = () => { + }; + var timeoutError = new p_timeout_1.TimeoutError(); + var PQueue = class extends EventEmitter { + constructor(options) { + var _a, _b, _c, _d; + super(); + this._intervalCount = 0; + this._intervalEnd = 0; + this._pendingCount = 0; + this._resolveEmpty = empty; + this._resolveIdle = empty; + options = Object.assign({ carryoverConcurrencyCount: false, intervalCap: Infinity, interval: 0, concurrency: Infinity, autoStart: true, queueClass: priority_queue_1.default }, options); + if (!(typeof options.intervalCap === "number" && options.intervalCap >= 1)) { + throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(_b = (_a = options.intervalCap) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""}\` (${typeof options.intervalCap})`); + } + if (options.interval === void 0 || !(Number.isFinite(options.interval) && options.interval >= 0)) { + throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(_d = (_c = options.interval) === null || _c === void 0 ? void 0 : _c.toString()) !== null && _d !== void 0 ? _d : ""}\` (${typeof options.interval})`); + } + this._carryoverConcurrencyCount = options.carryoverConcurrencyCount; + this._isIntervalIgnored = options.intervalCap === Infinity || options.interval === 0; + this._intervalCap = options.intervalCap; + this._interval = options.interval; + this._queue = new options.queueClass(); + this._queueClass = options.queueClass; + this.concurrency = options.concurrency; + this._timeout = options.timeout; + this._throwOnTimeout = options.throwOnTimeout === true; + this._isPaused = options.autoStart === false; + } + get _doesIntervalAllowAnother() { + return this._isIntervalIgnored || this._intervalCount < this._intervalCap; + } + get _doesConcurrentAllowAnother() { + return this._pendingCount < this._concurrency; + } + _next() { + this._pendingCount--; + this._tryToStartAnother(); + this.emit("next"); + } + _resolvePromises() { + this._resolveEmpty(); + this._resolveEmpty = empty; + if (this._pendingCount === 0) { + this._resolveIdle(); + this._resolveIdle = empty; + this.emit("idle"); + } + } + _onResumeInterval() { + this._onInterval(); + this._initializeIntervalIfNeeded(); + this._timeoutId = void 0; + } + _isIntervalPaused() { + const now = Date.now(); + if (this._intervalId === void 0) { + const delay = this._intervalEnd - now; + if (delay < 0) { + this._intervalCount = this._carryoverConcurrencyCount ? this._pendingCount : 0; + } else { + if (this._timeoutId === void 0) { + this._timeoutId = setTimeout(() => { + this._onResumeInterval(); + }, delay); + } + return true; + } + } + return false; + } + _tryToStartAnother() { + if (this._queue.size === 0) { + if (this._intervalId) { + clearInterval(this._intervalId); + } + this._intervalId = void 0; + this._resolvePromises(); + return false; + } + if (!this._isPaused) { + const canInitializeInterval = !this._isIntervalPaused(); + if (this._doesIntervalAllowAnother && this._doesConcurrentAllowAnother) { + const job = this._queue.dequeue(); + if (!job) { + return false; + } + this.emit("active"); + job(); + if (canInitializeInterval) { + this._initializeIntervalIfNeeded(); + } + return true; + } + } + return false; + } + _initializeIntervalIfNeeded() { + if (this._isIntervalIgnored || this._intervalId !== void 0) { + return; + } + this._intervalId = setInterval(() => { + this._onInterval(); + }, this._interval); + this._intervalEnd = Date.now() + this._interval; + } + _onInterval() { + if (this._intervalCount === 0 && this._pendingCount === 0 && this._intervalId) { + clearInterval(this._intervalId); + this._intervalId = void 0; + } + this._intervalCount = this._carryoverConcurrencyCount ? this._pendingCount : 0; + this._processQueue(); + } + _processQueue() { + while (this._tryToStartAnother()) { + } + } + get concurrency() { + return this._concurrency; + } + set concurrency(newConcurrency) { + if (!(typeof newConcurrency === "number" && newConcurrency >= 1)) { + throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${newConcurrency}\` (${typeof newConcurrency})`); + } + this._concurrency = newConcurrency; + this._processQueue(); + } + async add(fn2, options = {}) { + return new Promise((resolve, reject) => { + const run = async () => { + this._pendingCount++; + this._intervalCount++; + try { + const operation = this._timeout === void 0 && options.timeout === void 0 ? fn2() : p_timeout_1.default(Promise.resolve(fn2()), options.timeout === void 0 ? this._timeout : options.timeout, () => { + if (options.throwOnTimeout === void 0 ? this._throwOnTimeout : options.throwOnTimeout) { + reject(timeoutError); + } + return void 0; + }); + resolve(await operation); + } catch (error) { + reject(error); + } + this._next(); + }; + this._queue.enqueue(run, options); + this._tryToStartAnother(); + this.emit("add"); + }); + } + async addAll(functions, options) { + return Promise.all(functions.map(async (function_) => this.add(function_, options))); + } + start() { + if (!this._isPaused) { + return this; + } + this._isPaused = false; + this._processQueue(); + return this; + } + pause() { + this._isPaused = true; + } + clear() { + this._queue = new this._queueClass(); + } + async onEmpty() { + if (this._queue.size === 0) { + return; + } + return new Promise((resolve) => { + const existingResolve = this._resolveEmpty; + this._resolveEmpty = () => { + existingResolve(); + resolve(); + }; + }); + } + async onIdle() { + if (this._pendingCount === 0 && this._queue.size === 0) { + return; + } + return new Promise((resolve) => { + const existingResolve = this._resolveIdle; + this._resolveIdle = () => { + existingResolve(); + resolve(); + }; + }); + } + get size() { + return this._queue.size; + } + sizeBy(options) { + return this._queue.filter(options).length; + } + get pending() { + return this._pendingCount; + } + get isPaused() { + return this._isPaused; + } + get timeout() { + return this._timeout; + } + set timeout(milliseconds) { + this._timeout = milliseconds; + } + }; + exports2.default = PQueue; + } +}); + +// ../../node_modules/.pnpm/p-defer@3.0.0/node_modules/p-defer/index.js +var require_p_defer2 = __commonJS({ + "../../node_modules/.pnpm/p-defer@3.0.0/node_modules/p-defer/index.js"(exports2, module2) { + "use strict"; + var pDefer = () => { + const deferred = {}; + deferred.promise = new Promise((resolve, reject) => { + deferred.resolve = resolve; + deferred.reject = reject; + }); + return deferred; + }; + module2.exports = pDefer; + } +}); + +// ../../node_modules/.pnpm/p-reflect@2.1.0/node_modules/p-reflect/index.js +var require_p_reflect = __commonJS({ + "../../node_modules/.pnpm/p-reflect@2.1.0/node_modules/p-reflect/index.js"(exports2, module2) { + "use strict"; + var pReflect = async (promise) => { + try { + const value = await promise; + return { + isFulfilled: true, + isRejected: false, + value + }; + } catch (error) { + return { + isFulfilled: false, + isRejected: true, + reason: error + }; + } + }; + module2.exports = pReflect; + module2.exports.default = pReflect; + } +}); + +// ../../node_modules/.pnpm/promise-share@1.0.0/node_modules/promise-share/index.js +var require_promise_share = __commonJS({ + "../../node_modules/.pnpm/promise-share@1.0.0/node_modules/promise-share/index.js"(exports2, module2) { + "use strict"; + var pReflect = require_p_reflect(); + module2.exports = function pShare(p) { + const reflected = pReflect(p); + return async () => { + const reflection = await reflected; + if (reflection.isRejected) + throw reflection.reason; + return reflection.value; + }; + }; + } +}); + +// ../package-requester/lib/safeDeferredPromise.js +var require_safeDeferredPromise = __commonJS({ + "../package-requester/lib/safeDeferredPromise.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var promise_share_1 = __importDefault(require_promise_share()); + function safeDeferredPromise() { + let _resolve; + let _reject; + const promiseFn = promise_share_1.default(new Promise((resolve, reject) => { + _resolve = resolve; + _reject = reject; + })); + return Object.assign(promiseFn, { resolve: _resolve, reject: _reject }); + } + exports2.default = safeDeferredPromise; + } +}); + +// ../package-requester/lib/packageRequester.js +var require_packageRequester = __commonJS({ + "../package-requester/lib/packageRequester.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var cafs_1 = require_lib31(); + var core_loggers_1 = require_lib12(); + var error_1 = __importDefault(require_lib8()); + var graceful_fs_1 = __importDefault(require_lib18()); + var logger_1 = __importDefault(require_lib6()); + var package_is_installable_1 = __importDefault(require_lib13()); + var read_package_json_1 = __importDefault(require_lib32()); + var dependency_path_1 = require_lib33(); + var p_queue_1 = __importDefault(require_dist9()); + var load_json_file_1 = __importDefault(require_load_json_file()); + var p_defer_1 = __importDefault(require_p_defer2()); + var path_temp_1 = __importDefault(require_path_temp()); + var promise_share_1 = __importDefault(require_promise_share()); + var pick_1 = __importDefault(require_pick()); + var rename_overwrite_1 = __importDefault(require_rename_overwrite()); + var ssri_1 = __importDefault(require_ssri()); + var safeDeferredPromise_1 = __importDefault(require_safeDeferredPromise()); + var TARBALL_INTEGRITY_FILENAME = "tarball-integrity"; + var packageRequestLogger = logger_1.default("package-requester"); + var pickBundledManifest = pick_1.default([ + "bin", + "bundledDependencies", + "bundleDependencies", + "dependencies", + "directories", + "engines", + "name", + "optionalDependencies", + "os", + "peerDependencies", + "peerDependenciesMeta", + "scripts", + "version" + ]); + function default_1(opts) { + var _a; + opts = opts || {}; + const networkConcurrency = (_a = opts.networkConcurrency) !== null && _a !== void 0 ? _a : 16; + const requestsQueue = new p_queue_1.default({ + concurrency: networkConcurrency + }); + requestsQueue["counter"] = 0; + requestsQueue["concurrency"] = networkConcurrency; + const cafsDir = path_1.default.join(opts.storeDir, "files"); + const getFilePathInCafs = cafs_1.getFilePathInCafs.bind(null, cafsDir); + const fetch = fetcher.bind(null, opts.fetchers, opts.cafs); + const fetchPackageToStore = fetchToStore.bind(null, { + checkFilesIntegrity: cafs_1.checkFilesIntegrity.bind(null, cafsDir), + fetch, + fetchingLocker: new Map(), + getFilePathByModeInCafs: cafs_1.getFilePathByModeInCafs.bind(null, cafsDir), + getFilePathInCafs, + requestsQueue, + storeDir: opts.storeDir, + verifyStoreIntegrity: opts.verifyStoreIntegrity + }); + const requestPackage = resolveAndFetch.bind(null, { + engineStrict: opts.engineStrict, + nodeVersion: opts.nodeVersion, + pnpmVersion: opts.pnpmVersion, + force: opts.force, + fetchPackageToStore, + requestsQueue, + resolve: opts.resolve, + storeDir: opts.storeDir, + verifyStoreIntegrity: opts.verifyStoreIntegrity + }); + return Object.assign(requestPackage, { fetchPackageToStore, requestPackage }); + } + exports2.default = default_1; + async function resolveAndFetch(ctx, wantedDependency, options) { + var _a, _b, _c, _d, _e, _f; + let latest; + let manifest; + let normalizedPref; + let resolution = (_a = options.currentPkg) === null || _a === void 0 ? void 0 : _a.resolution; + let pkgId = (_b = options.currentPkg) === null || _b === void 0 ? void 0 : _b.id; + const skipResolution = resolution && !options.update; + let forceFetch = false; + let updated = false; + let resolvedVia; + if (!skipResolution || options.skipFetch === true || Boolean(pkgId === null || pkgId === void 0 ? void 0 : pkgId.startsWith("file:")) || wantedDependency.optional === true) { + const resolveResult = await ctx.requestsQueue.add(async () => ctx.resolve(wantedDependency, { + alwaysTryWorkspacePackages: options.alwaysTryWorkspacePackages, + defaultTag: options.defaultTag, + lockfileDir: options.lockfileDir, + preferredVersions: options.preferredVersions, + preferWorkspacePackages: options.preferWorkspacePackages, + projectDir: options.projectDir, + registry: options.registry, + workspacePackages: options.workspacePackages + }), { priority: options.downloadPriority }); + manifest = resolveResult.manifest; + latest = resolveResult.latest; + resolvedVia = resolveResult.resolvedVia; + forceFetch = Boolean(((_c = options.currentPkg) === null || _c === void 0 ? void 0 : _c.resolution) != null && (pkgId === null || pkgId === void 0 ? void 0 : pkgId.startsWith("file:")) && ((_d = options.currentPkg) === null || _d === void 0 ? void 0 : _d.resolution["integrity"]) !== resolveResult.resolution["integrity"]); + updated = pkgId !== resolveResult.id || !resolution || forceFetch; + resolution = resolveResult.resolution; + pkgId = resolveResult.id; + normalizedPref = resolveResult.normalizedPref; + } + const id = pkgId; + if (resolution.type === "directory") { + if (manifest == null) { + throw new Error(`Couldn't read package.json of local dependency ${wantedDependency.alias ? wantedDependency.alias + "@" : ""}${(_e = wantedDependency.pref) !== null && _e !== void 0 ? _e : ""}`); + } + return { + body: { + id, + isLocal: true, + manifest, + normalizedPref, + resolution, + resolvedVia, + updated + } + }; + } + const isInstallable = ctx.force === true || (manifest == null ? void 0 : package_is_installable_1.default(id, manifest, { + engineStrict: ctx.engineStrict, + lockfileDir: options.lockfileDir, + nodeVersion: ctx.nodeVersion, + optional: wantedDependency.optional === true, + pnpmVersion: ctx.pnpmVersion + })); + if ((options.skipFetch === true || isInstallable === false) && manifest != null) { + return { + body: { + id, + isLocal: false, + isInstallable: isInstallable !== null && isInstallable !== void 0 ? isInstallable : void 0, + latest, + manifest, + normalizedPref, + resolution, + resolvedVia, + updated + } + }; + } + const fetchResult = ctx.fetchPackageToStore({ + fetchRawManifest: true, + force: forceFetch, + lockfileDir: options.lockfileDir, + pkg: { + ...pick_1.default(["name", "version"], (_f = manifest !== null && manifest !== void 0 ? manifest : options.currentPkg) !== null && _f !== void 0 ? _f : {}), + id, + resolution + } + }); + return { + body: { + id, + isLocal: false, + isInstallable: isInstallable !== null && isInstallable !== void 0 ? isInstallable : void 0, + latest, + manifest, + normalizedPref, + resolution, + resolvedVia, + updated + }, + bundledManifest: fetchResult.bundledManifest, + files: fetchResult.files, + filesIndexFile: fetchResult.filesIndexFile, + finishing: fetchResult.finishing + }; + } + function fetchToStore(ctx, opts) { + const targetRelative = dependency_path_1.depPathToFilename(opts.pkg.id, opts.lockfileDir); + const target = path_1.default.join(ctx.storeDir, targetRelative); + if (!ctx.fetchingLocker.has(opts.pkg.id)) { + const bundledManifest = p_defer_1.default(); + const files = p_defer_1.default(); + const finishing = p_defer_1.default(); + const filesIndexFile = opts.pkg.resolution["integrity"] ? ctx.getFilePathInCafs(opts.pkg.resolution["integrity"], "index") : path_1.default.join(target, "integrity.json"); + doFetchToStore(filesIndexFile, bundledManifest, files, finishing); + if (opts.fetchRawManifest) { + ctx.fetchingLocker.set(opts.pkg.id, { + bundledManifest: removeKeyOnFail(bundledManifest.promise), + files: removeKeyOnFail(files.promise), + filesIndexFile, + finishing: removeKeyOnFail(finishing.promise) + }); + } else { + ctx.fetchingLocker.set(opts.pkg.id, { + files: removeKeyOnFail(files.promise), + filesIndexFile, + finishing: removeKeyOnFail(finishing.promise) + }); + } + files.promise.then((cache) => { + if (cache.fromStore) { + return; + } + const tmp = ctx.fetchingLocker.get(opts.pkg.id); + if (tmp == null) + return; + ctx.fetchingLocker.set(opts.pkg.id, { + ...tmp, + files: Promise.resolve({ + ...cache, + fromStore: true + }) + }); + }).catch(() => { + ctx.fetchingLocker.delete(opts.pkg.id); + }); + } + const result = ctx.fetchingLocker.get(opts.pkg.id); + if (opts.fetchRawManifest && result.bundledManifest == null) { + result.bundledManifest = removeKeyOnFail(result.files.then(async ({ filesIndex }) => { + const { integrity, mode } = filesIndex["package.json"]; + const manifestPath = ctx.getFilePathByModeInCafs(integrity, mode); + return readBundledManifest(manifestPath); + })); + } + return { + bundledManifest: result.bundledManifest != null ? promise_share_1.default(result.bundledManifest) : void 0, + files: promise_share_1.default(result.files), + filesIndexFile: result.filesIndexFile, + finishing: promise_share_1.default(result.finishing) + }; + async function removeKeyOnFail(p) { + try { + return await p; + } catch (err) { + ctx.fetchingLocker.delete(opts.pkg.id); + throw err; + } + } + async function doFetchToStore(filesIndexFile, bundledManifest, files, finishing) { + try { + const isLocalTarballDep = opts.pkg.id.startsWith("file:"); + if (!opts.force && (!isLocalTarballDep || await tarballIsUpToDate(opts.pkg.resolution, target, opts.lockfileDir))) { + let pkgFilesIndex; + try { + pkgFilesIndex = await load_json_file_1.default(filesIndexFile); + } catch (err) { + } + if ((pkgFilesIndex === null || pkgFilesIndex === void 0 ? void 0 : pkgFilesIndex.files) != null) { + const manifest = opts.fetchRawManifest ? safeDeferredPromise_1.default() : void 0; + if (pkgFilesIndex.name != null && opts.pkg.name != null && pkgFilesIndex.name !== opts.pkg.name || pkgFilesIndex.version != null && opts.pkg.version != null && pkgFilesIndex.version !== opts.pkg.version) { + throw new error_1.default("UNEXPECTED_PKG_CONTENT_IN_STORE", `Package name mismatch found while reading ${JSON.stringify(opts.pkg.resolution)} from the store. This means that the lockfile is broken. Expected package: ${opts.pkg.name}@${opts.pkg.version}. Actual package in the store by the given integrity: ${pkgFilesIndex.name}@${pkgFilesIndex.version}.`); + } + const verified = await ctx.checkFilesIntegrity(pkgFilesIndex.files, manifest); + if (verified) { + files.resolve({ + filesIndex: pkgFilesIndex.files, + fromStore: true, + sideEffects: pkgFilesIndex.sideEffects + }); + if (manifest != null) { + manifest().then((manifest2) => bundledManifest.resolve(pickBundledManifest(manifest2))).catch(bundledManifest.reject); + } + finishing.resolve(void 0); + return; + } + packageRequestLogger.warn({ + message: `Refetching ${target} to store. It was either modified or had no integrity checksums`, + prefix: opts.lockfileDir + }); + } + } + const priority = (++ctx.requestsQueue["counter"] % ctx.requestsQueue["concurrency"] === 0 ? -1 : 1) * 1e3; + const fetchManifest = opts.fetchRawManifest ? safeDeferredPromise_1.default() : void 0; + if (fetchManifest != null) { + fetchManifest().then((manifest) => bundledManifest.resolve(pickBundledManifest(manifest))).catch(bundledManifest.reject); + } + const fetchedPackage = await ctx.requestsQueue.add(async () => ctx.fetch(opts.pkg.id, opts.pkg.resolution, { + lockfileDir: opts.lockfileDir, + manifest: fetchManifest, + onProgress: (downloaded) => { + core_loggers_1.fetchingProgressLogger.debug({ + downloaded, + packageId: opts.pkg.id, + status: "in_progress" + }); + }, + onStart: (size, attempt) => { + core_loggers_1.fetchingProgressLogger.debug({ + attempt, + packageId: opts.pkg.id, + size, + status: "started" + }); + } + }), { priority }); + const filesIndex = fetchedPackage.filesIndex; + const integrity = {}; + await Promise.all(Object.keys(filesIndex).map(async (filename) => { + const { checkedAt, integrity: fileIntegrity } = await filesIndex[filename].writeResult; + integrity[filename] = { + checkedAt, + integrity: fileIntegrity.toString(), + mode: filesIndex[filename].mode, + size: filesIndex[filename].size + }; + })); + await writeJsonFile(filesIndexFile, { + name: opts.pkg.name, + version: opts.pkg.version, + files: integrity + }); + if (isLocalTarballDep && opts.pkg.resolution["integrity"]) { + await fs_1.promises.mkdir(target, { recursive: true }); + await graceful_fs_1.default.writeFile(path_1.default.join(target, TARBALL_INTEGRITY_FILENAME), opts.pkg.resolution["integrity"], "utf8"); + } + files.resolve({ + filesIndex: integrity, + fromStore: false + }); + finishing.resolve(void 0); + } catch (err) { + files.reject(err); + if (opts.fetchRawManifest) { + bundledManifest.reject(err); + } + } + } + } + async function writeJsonFile(filePath, data) { + const targetDir = path_1.default.dirname(filePath); + await fs_1.promises.mkdir(targetDir, { recursive: true }); + const temp = path_temp_1.default(targetDir); + await graceful_fs_1.default.writeFile(temp, JSON.stringify(data)); + await rename_overwrite_1.default(temp, filePath); + } + async function readBundledManifest(pkgJsonPath) { + return pickBundledManifest(await read_package_json_1.default(pkgJsonPath)); + } + async function tarballIsUpToDate(resolution, pkgInStoreLocation, lockfileDir) { + let currentIntegrity; + try { + currentIntegrity = await graceful_fs_1.default.readFile(path_1.default.join(pkgInStoreLocation, TARBALL_INTEGRITY_FILENAME), "utf8"); + } catch (err) { + return false; + } + if (resolution.integrity && currentIntegrity !== resolution.integrity) + return false; + const tarball = path_1.default.join(lockfileDir, resolution.tarball.slice(5)); + const tarballStream = fs_1.createReadStream(tarball); + try { + return Boolean(await ssri_1.default.checkStream(tarballStream, currentIntegrity)); + } catch (err) { + return false; + } + } + async function fetcher(fetcherByHostingType, cafs, packageId, resolution, opts) { + var _a, _b; + const fetch = fetcherByHostingType[(_a = resolution.type) !== null && _a !== void 0 ? _a : "tarball"]; + if (!fetch) { + throw new Error(`Fetching for dependency type "${(_b = resolution.type) !== null && _b !== void 0 ? _b : "undefined"}" is not supported`); + } + try { + return await fetch(cafs, resolution, opts); + } catch (err) { + packageRequestLogger.warn({ + message: `Fetching ${packageId} failed!`, + prefix: opts.lockfileDir + }); + throw err; + } + } + } +}); + +// ../package-requester/lib/index.js +var require_lib34 = __commonJS({ + "../package-requester/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var packageRequester_1 = __importDefault(require_packageRequester()); + exports2.default = packageRequester_1.default; + } +}); + +// ../../node_modules/.pnpm/semver@6.3.0/node_modules/semver/semver.js +var require_semver3 = __commonJS({ + "../../node_modules/.pnpm/semver@6.3.0/node_modules/semver/semver.js"(exports2, module2) { + exports2 = module2.exports = SemVer; + var debug; + if (typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function() { + var args2 = Array.prototype.slice.call(arguments, 0); + args2.unshift("SEMVER"); + console.log.apply(console, args2); + }; + } else { + debug = function() { + }; + } + exports2.SEMVER_SPEC_VERSION = "2.0.0"; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; + var MAX_SAFE_COMPONENT_LENGTH = 16; + var re = exports2.re = []; + var src = exports2.src = []; + var t = exports2.tokens = {}; + var R = 0; + function tok(n) { + t[n] = R++; + } + tok("NUMERICIDENTIFIER"); + src[t.NUMERICIDENTIFIER] = "0|[1-9]\\d*"; + tok("NUMERICIDENTIFIERLOOSE"); + src[t.NUMERICIDENTIFIERLOOSE] = "[0-9]+"; + tok("NONNUMERICIDENTIFIER"); + src[t.NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-][a-zA-Z0-9-]*"; + tok("MAINVERSION"); + src[t.MAINVERSION] = "(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")"; + tok("MAINVERSIONLOOSE"); + src[t.MAINVERSIONLOOSE] = "(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")"; + tok("PRERELEASEIDENTIFIER"); + src[t.PRERELEASEIDENTIFIER] = "(?:" + src[t.NUMERICIDENTIFIER] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; + tok("PRERELEASEIDENTIFIERLOOSE"); + src[t.PRERELEASEIDENTIFIERLOOSE] = "(?:" + src[t.NUMERICIDENTIFIERLOOSE] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; + tok("PRERELEASE"); + src[t.PRERELEASE] = "(?:-(" + src[t.PRERELEASEIDENTIFIER] + "(?:\\." + src[t.PRERELEASEIDENTIFIER] + ")*))"; + tok("PRERELEASELOOSE"); + src[t.PRERELEASELOOSE] = "(?:-?(" + src[t.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t.PRERELEASEIDENTIFIERLOOSE] + ")*))"; + tok("BUILDIDENTIFIER"); + src[t.BUILDIDENTIFIER] = "[0-9A-Za-z-]+"; + tok("BUILD"); + src[t.BUILD] = "(?:\\+(" + src[t.BUILDIDENTIFIER] + "(?:\\." + src[t.BUILDIDENTIFIER] + ")*))"; + tok("FULL"); + tok("FULLPLAIN"); + src[t.FULLPLAIN] = "v?" + src[t.MAINVERSION] + src[t.PRERELEASE] + "?" + src[t.BUILD] + "?"; + src[t.FULL] = "^" + src[t.FULLPLAIN] + "$"; + tok("LOOSEPLAIN"); + src[t.LOOSEPLAIN] = "[v=\\s]*" + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + "?" + src[t.BUILD] + "?"; + tok("LOOSE"); + src[t.LOOSE] = "^" + src[t.LOOSEPLAIN] + "$"; + tok("GTLT"); + src[t.GTLT] = "((?:<|>)?=?)"; + tok("XRANGEIDENTIFIERLOOSE"); + src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*"; + tok("XRANGEIDENTIFIER"); + src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + "|x|X|\\*"; + tok("XRANGEPLAIN"); + src[t.XRANGEPLAIN] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:" + src[t.PRERELEASE] + ")?" + src[t.BUILD] + "?)?)?"; + tok("XRANGEPLAINLOOSE"); + src[t.XRANGEPLAINLOOSE] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:" + src[t.PRERELEASELOOSE] + ")?" + src[t.BUILD] + "?)?)?"; + tok("XRANGE"); + src[t.XRANGE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAIN] + "$"; + tok("XRANGELOOSE"); + src[t.XRANGELOOSE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAINLOOSE] + "$"; + tok("COERCE"); + src[t.COERCE] = "(^|[^\\d])(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:$|[^\\d])"; + tok("COERCERTL"); + re[t.COERCERTL] = new RegExp(src[t.COERCE], "g"); + tok("LONETILDE"); + src[t.LONETILDE] = "(?:~>?)"; + tok("TILDETRIM"); + src[t.TILDETRIM] = "(\\s*)" + src[t.LONETILDE] + "\\s+"; + re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], "g"); + var tildeTrimReplace = "$1~"; + tok("TILDE"); + src[t.TILDE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAIN] + "$"; + tok("TILDELOOSE"); + src[t.TILDELOOSE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + "$"; + tok("LONECARET"); + src[t.LONECARET] = "(?:\\^)"; + tok("CARETTRIM"); + src[t.CARETTRIM] = "(\\s*)" + src[t.LONECARET] + "\\s+"; + re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], "g"); + var caretTrimReplace = "$1^"; + tok("CARET"); + src[t.CARET] = "^" + src[t.LONECARET] + src[t.XRANGEPLAIN] + "$"; + tok("CARETLOOSE"); + src[t.CARETLOOSE] = "^" + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + "$"; + tok("COMPARATORLOOSE"); + src[t.COMPARATORLOOSE] = "^" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + ")$|^$"; + tok("COMPARATOR"); + src[t.COMPARATOR] = "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$"; + tok("COMPARATORTRIM"); + src[t.COMPARATORTRIM] = "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")"; + re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], "g"); + var comparatorTrimReplace = "$1$2$3"; + tok("HYPHENRANGE"); + src[t.HYPHENRANGE] = "^\\s*(" + src[t.XRANGEPLAIN] + ")\\s+-\\s+(" + src[t.XRANGEPLAIN] + ")\\s*$"; + tok("HYPHENRANGELOOSE"); + src[t.HYPHENRANGELOOSE] = "^\\s*(" + src[t.XRANGEPLAINLOOSE] + ")\\s+-\\s+(" + src[t.XRANGEPLAINLOOSE] + ")\\s*$"; + tok("STAR"); + src[t.STAR] = "(<|>)?=?\\s*\\*"; + for (i = 0; i < R; i++) { + debug(i, src[i]); + if (!re[i]) { + re[i] = new RegExp(src[i]); + } + } + var i; + exports2.parse = parse; + function parse(version, options) { + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + if (version instanceof SemVer) { + return version; + } + if (typeof version !== "string") { + return null; + } + if (version.length > MAX_LENGTH) { + return null; + } + var r = options.loose ? re[t.LOOSE] : re[t.FULL]; + if (!r.test(version)) { + return null; + } + try { + return new SemVer(version, options); + } catch (er) { + return null; + } + } + exports2.valid = valid; + function valid(version, options) { + var v = parse(version, options); + return v ? v.version : null; + } + exports2.clean = clean; + function clean(version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ""), options); + return s ? s.version : null; + } + exports2.SemVer = SemVer; + function SemVer(version, options) { + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + if (version instanceof SemVer) { + if (version.loose === options.loose) { + return version; + } else { + version = version.version; + } + } else if (typeof version !== "string") { + throw new TypeError("Invalid Version: " + version); + } + if (version.length > MAX_LENGTH) { + throw new TypeError("version is longer than " + MAX_LENGTH + " characters"); + } + if (!(this instanceof SemVer)) { + return new SemVer(version, options); + } + debug("SemVer", version, options); + this.options = options; + this.loose = !!options.loose; + var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); + if (!m) { + throw new TypeError("Invalid Version: " + version); + } + this.raw = version; + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError("Invalid major version"); + } + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError("Invalid minor version"); + } + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError("Invalid patch version"); + } + if (!m[4]) { + this.prerelease = []; + } else { + this.prerelease = m[4].split(".").map(function(id) { + if (/^[0-9]+$/.test(id)) { + var num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num; + } + } + return id; + }); + } + this.build = m[5] ? m[5].split(".") : []; + this.format(); + } + SemVer.prototype.format = function() { + this.version = this.major + "." + this.minor + "." + this.patch; + if (this.prerelease.length) { + this.version += "-" + this.prerelease.join("."); + } + return this.version; + }; + SemVer.prototype.toString = function() { + return this.version; + }; + SemVer.prototype.compare = function(other) { + debug("SemVer.compare", this.version, this.options, other); + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + return this.compareMain(other) || this.comparePre(other); + }; + SemVer.prototype.compareMain = function(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); + }; + SemVer.prototype.comparePre = function(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + if (this.prerelease.length && !other.prerelease.length) { + return -1; + } else if (!this.prerelease.length && other.prerelease.length) { + return 1; + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0; + } + var i2 = 0; + do { + var a = this.prerelease[i2]; + var b = other.prerelease[i2]; + debug("prerelease compare", i2, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i2); + }; + SemVer.prototype.compareBuild = function(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + var i2 = 0; + do { + var a = this.build[i2]; + var b = other.build[i2]; + debug("prerelease compare", i2, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i2); + }; + SemVer.prototype.inc = function(release, identifier) { + switch (release) { + case "premajor": + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc("pre", identifier); + break; + case "preminor": + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc("pre", identifier); + break; + case "prepatch": + this.prerelease.length = 0; + this.inc("patch", identifier); + this.inc("pre", identifier); + break; + case "prerelease": + if (this.prerelease.length === 0) { + this.inc("patch", identifier); + } + this.inc("pre", identifier); + break; + case "major": + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { + this.major++; + } + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case "minor": + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++; + } + this.patch = 0; + this.prerelease = []; + break; + case "patch": + if (this.prerelease.length === 0) { + this.patch++; + } + this.prerelease = []; + break; + case "pre": + if (this.prerelease.length === 0) { + this.prerelease = [0]; + } else { + var i2 = this.prerelease.length; + while (--i2 >= 0) { + if (typeof this.prerelease[i2] === "number") { + this.prerelease[i2]++; + i2 = -2; + } + } + if (i2 === -1) { + this.prerelease.push(0); + } + } + if (identifier) { + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0]; + } + } else { + this.prerelease = [identifier, 0]; + } + } + break; + default: + throw new Error("invalid increment argument: " + release); + } + this.format(); + this.raw = this.version; + return this; + }; + exports2.inc = inc; + function inc(version, release, loose, identifier) { + if (typeof loose === "string") { + identifier = loose; + loose = void 0; + } + try { + return new SemVer(version, loose).inc(release, identifier).version; + } catch (er) { + return null; + } + } + exports2.diff = diff; + function diff(version1, version2) { + if (eq(version1, version2)) { + return null; + } else { + var v1 = parse(version1); + var v2 = parse(version2); + var prefix = ""; + if (v1.prerelease.length || v2.prerelease.length) { + prefix = "pre"; + var defaultResult = "prerelease"; + } + for (var key in v1) { + if (key === "major" || key === "minor" || key === "patch") { + if (v1[key] !== v2[key]) { + return prefix + key; + } + } + } + return defaultResult; + } + } + exports2.compareIdentifiers = compareIdentifiers; + var numeric = /^[0-9]+$/; + function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); + if (anum && bnum) { + a = +a; + b = +b; + } + return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; + } + exports2.rcompareIdentifiers = rcompareIdentifiers; + function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); + } + exports2.major = major; + function major(a, loose) { + return new SemVer(a, loose).major; + } + exports2.minor = minor; + function minor(a, loose) { + return new SemVer(a, loose).minor; + } + exports2.patch = patch; + function patch(a, loose) { + return new SemVer(a, loose).patch; + } + exports2.compare = compare; + function compare(a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)); + } + exports2.compareLoose = compareLoose; + function compareLoose(a, b) { + return compare(a, b, true); + } + exports2.compareBuild = compareBuild; + function compareBuild(a, b, loose) { + var versionA = new SemVer(a, loose); + var versionB = new SemVer(b, loose); + return versionA.compare(versionB) || versionA.compareBuild(versionB); + } + exports2.rcompare = rcompare; + function rcompare(a, b, loose) { + return compare(b, a, loose); + } + exports2.sort = sort; + function sort(list, loose) { + return list.sort(function(a, b) { + return exports2.compareBuild(a, b, loose); + }); + } + exports2.rsort = rsort; + function rsort(list, loose) { + return list.sort(function(a, b) { + return exports2.compareBuild(b, a, loose); + }); + } + exports2.gt = gt; + function gt(a, b, loose) { + return compare(a, b, loose) > 0; + } + exports2.lt = lt; + function lt(a, b, loose) { + return compare(a, b, loose) < 0; + } + exports2.eq = eq; + function eq(a, b, loose) { + return compare(a, b, loose) === 0; + } + exports2.neq = neq; + function neq(a, b, loose) { + return compare(a, b, loose) !== 0; + } + exports2.gte = gte; + function gte(a, b, loose) { + return compare(a, b, loose) >= 0; + } + exports2.lte = lte; + function lte(a, b, loose) { + return compare(a, b, loose) <= 0; + } + exports2.cmp = cmp; + function cmp(a, op, b, loose) { + switch (op) { + case "===": + if (typeof a === "object") + a = a.version; + if (typeof b === "object") + b = b.version; + return a === b; + case "!==": + if (typeof a === "object") + a = a.version; + if (typeof b === "object") + b = b.version; + return a !== b; + case "": + case "=": + case "==": + return eq(a, b, loose); + case "!=": + return neq(a, b, loose); + case ">": + return gt(a, b, loose); + case ">=": + return gte(a, b, loose); + case "<": + return lt(a, b, loose); + case "<=": + return lte(a, b, loose); + default: + throw new TypeError("Invalid operator: " + op); + } + } + exports2.Comparator = Comparator; + function Comparator(comp, options) { + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp; + } else { + comp = comp.value; + } + } + if (!(this instanceof Comparator)) { + return new Comparator(comp, options); + } + debug("comparator", comp, options); + this.options = options; + this.loose = !!options.loose; + this.parse(comp); + if (this.semver === ANY) { + this.value = ""; + } else { + this.value = this.operator + this.semver.version; + } + debug("comp", this); + } + var ANY = {}; + Comparator.prototype.parse = function(comp) { + var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; + var m = comp.match(r); + if (!m) { + throw new TypeError("Invalid comparator: " + comp); + } + this.operator = m[1] !== void 0 ? m[1] : ""; + if (this.operator === "=") { + this.operator = ""; + } + if (!m[2]) { + this.semver = ANY; + } else { + this.semver = new SemVer(m[2], this.options.loose); + } + }; + Comparator.prototype.toString = function() { + return this.value; + }; + Comparator.prototype.test = function(version) { + debug("Comparator.test", version, this.options.loose); + if (this.semver === ANY || version === ANY) { + return true; + } + if (typeof version === "string") { + try { + version = new SemVer(version, this.options); + } catch (er) { + return false; + } + } + return cmp(version, this.operator, this.semver, this.options); + }; + Comparator.prototype.intersects = function(comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError("a Comparator is required"); + } + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + var rangeTmp; + if (this.operator === "") { + if (this.value === "") { + return true; + } + rangeTmp = new Range(comp.value, options); + return satisfies(this.value, rangeTmp, options); + } else if (comp.operator === "") { + if (comp.value === "") { + return true; + } + rangeTmp = new Range(this.value, options); + return satisfies(comp.semver, rangeTmp, options); + } + var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">"); + var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<"); + var sameSemVer = this.semver.version === comp.semver.version; + var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<="); + var oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && ((this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<")); + var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && ((this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">")); + return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; + }; + exports2.Range = Range; + function Range(range, options) { + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + if (range instanceof Range) { + if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { + return range; + } else { + return new Range(range.raw, options); + } + } + if (range instanceof Comparator) { + return new Range(range.value, options); + } + if (!(this instanceof Range)) { + return new Range(range, options); + } + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + this.raw = range; + this.set = range.split(/\s*\|\|\s*/).map(function(range2) { + return this.parseRange(range2.trim()); + }, this).filter(function(c) { + return c.length; + }); + if (!this.set.length) { + throw new TypeError("Invalid SemVer Range: " + range); + } + this.format(); + } + Range.prototype.format = function() { + this.range = this.set.map(function(comps) { + return comps.join(" ").trim(); + }).join("||").trim(); + return this.range; + }; + Range.prototype.toString = function() { + return this.range; + }; + Range.prototype.parseRange = function(range) { + var loose = this.options.loose; + range = range.trim(); + var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + debug("hyphen replace", range); + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); + debug("comparator trim", range, re[t.COMPARATORTRIM]); + range = range.replace(re[t.TILDETRIM], tildeTrimReplace); + range = range.replace(re[t.CARETTRIM], caretTrimReplace); + range = range.split(/\s+/).join(" "); + var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; + var set = range.split(" ").map(function(comp) { + return parseComparator(comp, this.options); + }, this).join(" ").split(/\s+/); + if (this.options.loose) { + set = set.filter(function(comp) { + return !!comp.match(compRe); + }); + } + set = set.map(function(comp) { + return new Comparator(comp, this.options); + }, this); + return set; + }; + Range.prototype.intersects = function(range, options) { + if (!(range instanceof Range)) { + throw new TypeError("a Range is required"); + } + return this.set.some(function(thisComparators) { + return isSatisfiable(thisComparators, options) && range.set.some(function(rangeComparators) { + return isSatisfiable(rangeComparators, options) && thisComparators.every(function(thisComparator) { + return rangeComparators.every(function(rangeComparator) { + return thisComparator.intersects(rangeComparator, options); + }); + }); + }); + }); + }; + function isSatisfiable(comparators, options) { + var result = true; + var remainingComparators = comparators.slice(); + var testComparator = remainingComparators.pop(); + while (result && remainingComparators.length) { + result = remainingComparators.every(function(otherComparator) { + return testComparator.intersects(otherComparator, options); + }); + testComparator = remainingComparators.pop(); + } + return result; + } + exports2.toComparators = toComparators; + function toComparators(range, options) { + return new Range(range, options).set.map(function(comp) { + return comp.map(function(c) { + return c.value; + }).join(" ").trim().split(" "); + }); + } + function parseComparator(comp, options) { + debug("comp", comp, options); + comp = replaceCarets(comp, options); + debug("caret", comp); + comp = replaceTildes(comp, options); + debug("tildes", comp); + comp = replaceXRanges(comp, options); + debug("xrange", comp); + comp = replaceStars(comp, options); + debug("stars", comp); + return comp; + } + function isX(id) { + return !id || id.toLowerCase() === "x" || id === "*"; + } + function replaceTildes(comp, options) { + return comp.trim().split(/\s+/).map(function(comp2) { + return replaceTilde(comp2, options); + }).join(" "); + } + function replaceTilde(comp, options) { + var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; + return comp.replace(r, function(_, M, m, p, pr) { + debug("tilde", comp, _, M, m, p, pr); + var ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; + } else if (isX(p)) { + ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; + } else if (pr) { + debug("replaceTilde pr", pr); + ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; + } else { + ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; + } + debug("tilde return", ret); + return ret; + }); + } + function replaceCarets(comp, options) { + return comp.trim().split(/\s+/).map(function(comp2) { + return replaceCaret(comp2, options); + }).join(" "); + } + function replaceCaret(comp, options) { + debug("caret", comp, options); + var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; + return comp.replace(r, function(_, M, m, p, pr) { + debug("caret", comp, _, M, m, p, pr); + var ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; + } else if (isX(p)) { + if (M === "0") { + ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; + } else { + ret = ">=" + M + "." + m + ".0 <" + (+M + 1) + ".0.0"; + } + } else if (pr) { + debug("replaceCaret pr", pr); + if (M === "0") { + if (m === "0") { + ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1); + } else { + ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; + } + } else { + ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0"; + } + } else { + debug("no pr"); + if (M === "0") { + if (m === "0") { + ret = ">=" + M + "." + m + "." + p + " <" + M + "." + m + "." + (+p + 1); + } else { + ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; + } + } else { + ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0"; + } + } + debug("caret return", ret); + return ret; + }); + } + function replaceXRanges(comp, options) { + debug("replaceXRanges", comp, options); + return comp.split(/\s+/).map(function(comp2) { + return replaceXRange(comp2, options); + }).join(" "); + } + function replaceXRange(comp, options) { + comp = comp.trim(); + var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; + return comp.replace(r, function(ret, gtlt, M, m, p, pr) { + debug("xRange", comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + if (gtlt === "=" && anyX) { + gtlt = ""; + } + pr = options.includePrerelease ? "-0" : ""; + if (xM) { + if (gtlt === ">" || gtlt === "<") { + ret = "<0.0.0-0"; + } else { + ret = "*"; + } + } else if (gtlt && anyX) { + if (xm) { + m = 0; + } + p = 0; + if (gtlt === ">") { + gtlt = ">="; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else { + m = +m + 1; + p = 0; + } + } else if (gtlt === "<=") { + gtlt = "<"; + if (xm) { + M = +M + 1; + } else { + m = +m + 1; + } + } + ret = gtlt + M + "." + m + "." + p + pr; + } else if (xm) { + ret = ">=" + M + ".0.0" + pr + " <" + (+M + 1) + ".0.0" + pr; + } else if (xp) { + ret = ">=" + M + "." + m + ".0" + pr + " <" + M + "." + (+m + 1) + ".0" + pr; + } + debug("xRange return", ret); + return ret; + }); + } + function replaceStars(comp, options) { + debug("replaceStars", comp, options); + return comp.trim().replace(re[t.STAR], ""); + } + function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = ""; + } else if (isX(fm)) { + from = ">=" + fM + ".0.0"; + } else if (isX(fp)) { + from = ">=" + fM + "." + fm + ".0"; + } else { + from = ">=" + from; + } + if (isX(tM)) { + to = ""; + } else if (isX(tm)) { + to = "<" + (+tM + 1) + ".0.0"; + } else if (isX(tp)) { + to = "<" + tM + "." + (+tm + 1) + ".0"; + } else if (tpr) { + to = "<=" + tM + "." + tm + "." + tp + "-" + tpr; + } else { + to = "<=" + to; + } + return (from + " " + to).trim(); + } + Range.prototype.test = function(version) { + if (!version) { + return false; + } + if (typeof version === "string") { + try { + version = new SemVer(version, this.options); + } catch (er) { + return false; + } + } + for (var i2 = 0; i2 < this.set.length; i2++) { + if (testSet(this.set[i2], version, this.options)) { + return true; + } + } + return false; + }; + function testSet(set, version, options) { + for (var i2 = 0; i2 < set.length; i2++) { + if (!set[i2].test(version)) { + return false; + } + } + if (version.prerelease.length && !options.includePrerelease) { + for (i2 = 0; i2 < set.length; i2++) { + debug(set[i2].semver); + if (set[i2].semver === ANY) { + continue; + } + if (set[i2].semver.prerelease.length > 0) { + var allowed = set[i2].semver; + if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) { + return true; + } + } + } + return false; + } + return true; + } + exports2.satisfies = satisfies; + function satisfies(version, range, options) { + try { + range = new Range(range, options); + } catch (er) { + return false; + } + return range.test(version); + } + exports2.maxSatisfying = maxSatisfying; + function maxSatisfying(versions, range, options) { + var max = null; + var maxSV = null; + try { + var rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach(function(v) { + if (rangeObj.test(v)) { + if (!max || maxSV.compare(v) === -1) { + max = v; + maxSV = new SemVer(max, options); + } + } + }); + return max; + } + exports2.minSatisfying = minSatisfying; + function minSatisfying(versions, range, options) { + var min = null; + var minSV = null; + try { + var rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach(function(v) { + if (rangeObj.test(v)) { + if (!min || minSV.compare(v) === 1) { + min = v; + minSV = new SemVer(min, options); + } + } + }); + return min; + } + exports2.minVersion = minVersion; + function minVersion(range, loose) { + range = new Range(range, loose); + var minver = new SemVer("0.0.0"); + if (range.test(minver)) { + return minver; + } + minver = new SemVer("0.0.0-0"); + if (range.test(minver)) { + return minver; + } + minver = null; + for (var i2 = 0; i2 < range.set.length; ++i2) { + var comparators = range.set[i2]; + comparators.forEach(function(comparator) { + var compver = new SemVer(comparator.semver.version); + switch (comparator.operator) { + case ">": + if (compver.prerelease.length === 0) { + compver.patch++; + } else { + compver.prerelease.push(0); + } + compver.raw = compver.format(); + case "": + case ">=": + if (!minver || gt(minver, compver)) { + minver = compver; + } + break; + case "<": + case "<=": + break; + default: + throw new Error("Unexpected operation: " + comparator.operator); + } + }); + } + if (minver && range.test(minver)) { + return minver; + } + return null; + } + exports2.validRange = validRange; + function validRange(range, options) { + try { + return new Range(range, options).range || "*"; + } catch (er) { + return null; + } + } + exports2.ltr = ltr; + function ltr(version, range, options) { + return outside(version, range, "<", options); + } + exports2.gtr = gtr; + function gtr(version, range, options) { + return outside(version, range, ">", options); + } + exports2.outside = outside; + function outside(version, range, hilo, options) { + version = new SemVer(version, options); + range = new Range(range, options); + var gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case ">": + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = ">"; + ecomp = ">="; + break; + case "<": + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = "<"; + ecomp = "<="; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + if (satisfies(version, range, options)) { + return false; + } + for (var i2 = 0; i2 < range.set.length; ++i2) { + var comparators = range.set[i2]; + var high = null; + var low = null; + comparators.forEach(function(comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator(">=0.0.0"); + } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator; + } + }); + if (high.operator === comp || high.operator === ecomp) { + return false; + } + if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false; + } + } + return true; + } + exports2.prerelease = prerelease; + function prerelease(version, options) { + var parsed = parse(version, options); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; + } + exports2.intersects = intersects; + function intersects(r1, r2, options) { + r1 = new Range(r1, options); + r2 = new Range(r2, options); + return r1.intersects(r2); + } + exports2.coerce = coerce; + function coerce(version, options) { + if (version instanceof SemVer) { + return version; + } + if (typeof version === "number") { + version = String(version); + } + if (typeof version !== "string") { + return null; + } + options = options || {}; + var match = null; + if (!options.rtl) { + match = version.match(re[t.COERCE]); + } else { + var next; + while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) { + if (!match || next.index + next[0].length !== match.index + match[0].length) { + match = next; + } + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; + } + re[t.COERCERTL].lastIndex = -1; + } + if (match === null) { + return null; + } + return parse(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); + } + } +}); + +// ../../node_modules/.pnpm/make-dir@3.1.0/node_modules/make-dir/index.js +var require_make_dir = __commonJS({ + "../../node_modules/.pnpm/make-dir@3.1.0/node_modules/make-dir/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var path = require("path"); + var { promisify } = require("util"); + var semver = require_semver3(); + var useNativeRecursiveOption = semver.satisfies(process.version, ">=10.12.0"); + var checkPath = (pth) => { + if (process.platform === "win32") { + const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, "")); + if (pathHasInvalidWinCharacters) { + const error = new Error(`Path contains invalid characters: ${pth}`); + error.code = "EINVAL"; + throw error; + } + } + }; + var processOptions = (options) => { + const defaults = { + mode: 511, + fs + }; + return { + ...defaults, + ...options + }; + }; + var permissionError = (pth) => { + const error = new Error(`operation not permitted, mkdir '${pth}'`); + error.code = "EPERM"; + error.errno = -4048; + error.path = pth; + error.syscall = "mkdir"; + return error; + }; + var makeDir = async (input, options) => { + checkPath(input); + options = processOptions(options); + const mkdir = promisify(options.fs.mkdir); + const stat = promisify(options.fs.stat); + if (useNativeRecursiveOption && options.fs.mkdir === fs.mkdir) { + const pth = path.resolve(input); + await mkdir(pth, { + mode: options.mode, + recursive: true + }); + return pth; + } + const make = async (pth) => { + try { + await mkdir(pth, options.mode); + return pth; + } catch (error) { + if (error.code === "EPERM") { + throw error; + } + if (error.code === "ENOENT") { + if (path.dirname(pth) === pth) { + throw permissionError(pth); + } + if (error.message.includes("null bytes")) { + throw error; + } + await make(path.dirname(pth)); + return make(pth); + } + try { + const stats = await stat(pth); + if (!stats.isDirectory()) { + throw new Error("The path is not a directory"); + } + } catch (_) { + throw error; + } + return pth; + } + }; + return make(path.resolve(input)); + }; + module2.exports = makeDir; + module2.exports.sync = (input, options) => { + checkPath(input); + options = processOptions(options); + if (useNativeRecursiveOption && options.fs.mkdirSync === fs.mkdirSync) { + const pth = path.resolve(input); + fs.mkdirSync(pth, { + mode: options.mode, + recursive: true + }); + return pth; + } + const make = (pth) => { + try { + options.fs.mkdirSync(pth, options.mode); + } catch (error) { + if (error.code === "EPERM") { + throw error; + } + if (error.code === "ENOENT") { + if (path.dirname(pth) === pth) { + throw permissionError(pth); + } + if (error.message.includes("null bytes")) { + throw error; + } + make(path.dirname(pth)); + return make(pth); + } + try { + if (!options.fs.statSync(pth).isDirectory()) { + throw new Error("The path is not a directory"); + } + } catch (_) { + throw error; + } + } + return pth; + }; + return make(path.resolve(input)); + }; + } +}); + +// ../../node_modules/.pnpm/write-json-file@4.3.0/node_modules/write-json-file/index.js +var require_write_json_file = __commonJS({ + "../../node_modules/.pnpm/write-json-file@4.3.0/node_modules/write-json-file/index.js"(exports2, module2) { + "use strict"; + var { promisify } = require("util"); + var path = require("path"); + var fs = require_graceful_fs(); + var writeFileAtomic = require_write_file_atomic(); + var sortKeys = require_sort_keys(); + var makeDir = require_make_dir(); + var detectIndent = require_detect_indent(); + var isPlainObj = require_is_plain_obj(); + var readFile = promisify(fs.readFile); + var init = (fn2, filePath, data, options) => { + if (!filePath) { + throw new TypeError("Expected a filepath"); + } + if (data === void 0) { + throw new TypeError("Expected data to stringify"); + } + options = { + indent: " ", + sortKeys: false, + ...options + }; + if (options.sortKeys && isPlainObj(data)) { + data = sortKeys(data, { + deep: true, + compare: typeof options.sortKeys === "function" ? options.sortKeys : void 0 + }); + } + return fn2(filePath, data, options); + }; + var main = async (filePath, data, options) => { + let { indent } = options; + let trailingNewline = "\n"; + try { + const file = await readFile(filePath, "utf8"); + if (!file.endsWith("\n")) { + trailingNewline = ""; + } + if (options.detectIndent) { + indent = detectIndent(file).indent; + } + } catch (error) { + if (error.code !== "ENOENT") { + throw error; + } + } + const json = JSON.stringify(data, options.replacer, indent); + return writeFileAtomic(filePath, `${json}${trailingNewline}`, { mode: options.mode, chown: false }); + }; + var mainSync = (filePath, data, options) => { + let { indent } = options; + let trailingNewline = "\n"; + try { + const file = fs.readFileSync(filePath, "utf8"); + if (!file.endsWith("\n")) { + trailingNewline = ""; + } + if (options.detectIndent) { + indent = detectIndent(file).indent; + } + } catch (error) { + if (error.code !== "ENOENT") { + throw error; + } + } + const json = JSON.stringify(data, options.replacer, indent); + return writeFileAtomic.sync(filePath, `${json}${trailingNewline}`, { mode: options.mode, chown: false }); + }; + module2.exports = async (filePath, data, options) => { + await makeDir(path.dirname(filePath), { fs }); + return init(main, filePath, data, options); + }; + module2.exports.sync = (filePath, data, options) => { + makeDir.sync(path.dirname(filePath), { fs }); + init(mainSync, filePath, data, options); + }; + } +}); + +// ../../node_modules/.pnpm/truncate-utf8-bytes@1.0.2/node_modules/truncate-utf8-bytes/lib/truncate.js +var require_truncate2 = __commonJS({ + "../../node_modules/.pnpm/truncate-utf8-bytes@1.0.2/node_modules/truncate-utf8-bytes/lib/truncate.js"(exports2, module2) { + "use strict"; + function isHighSurrogate(codePoint) { + return codePoint >= 55296 && codePoint <= 56319; + } + function isLowSurrogate(codePoint) { + return codePoint >= 56320 && codePoint <= 57343; + } + module2.exports = function truncate(getLength, string, byteLength) { + if (typeof string !== "string") { + throw new Error("Input must be string"); + } + var charLength = string.length; + var curByteLength = 0; + var codePoint; + var segment; + for (var i = 0; i < charLength; i += 1) { + codePoint = string.charCodeAt(i); + segment = string[i]; + if (isHighSurrogate(codePoint) && isLowSurrogate(string.charCodeAt(i + 1))) { + i += 1; + segment += string[i]; + } + curByteLength += getLength(segment); + if (curByteLength === byteLength) { + return string.slice(0, i + 1); + } else if (curByteLength > byteLength) { + return string.slice(0, i - segment.length + 1); + } + } + return string; + }; + } +}); + +// ../../node_modules/.pnpm/truncate-utf8-bytes@1.0.2/node_modules/truncate-utf8-bytes/index.js +var require_truncate_utf8_bytes = __commonJS({ + "../../node_modules/.pnpm/truncate-utf8-bytes@1.0.2/node_modules/truncate-utf8-bytes/index.js"(exports2, module2) { + "use strict"; + var truncate = require_truncate2(); + var getLength = Buffer.byteLength.bind(Buffer); + module2.exports = truncate.bind(null, getLength); + } +}); + +// ../../node_modules/.pnpm/sanitize-filename@1.6.3/node_modules/sanitize-filename/index.js +var require_sanitize_filename = __commonJS({ + "../../node_modules/.pnpm/sanitize-filename@1.6.3/node_modules/sanitize-filename/index.js"(exports2, module2) { + "use strict"; + var truncate = require_truncate_utf8_bytes(); + var illegalRe = /[\/\?<>\\:\*\|"]/g; + var controlRe = /[\x00-\x1f\x80-\x9f]/g; + var reservedRe = /^\.+$/; + var windowsReservedRe = /^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i; + var windowsTrailingRe = /[\. ]+$/; + function sanitize(input, replacement) { + if (typeof input !== "string") { + throw new Error("Input must be string"); + } + var sanitized = input.replace(illegalRe, replacement).replace(controlRe, replacement).replace(reservedRe, replacement).replace(windowsReservedRe, replacement).replace(windowsTrailingRe, replacement); + return truncate(sanitized, 255); + } + module2.exports = function(input, options) { + var replacement = options && options.replacement || ""; + var output = sanitize(input, replacement); + if (replacement === "") { + return output; + } + return sanitize(output, ""); + }; + } +}); + +// ../../node_modules/.pnpm/make-empty-dir@2.0.0/node_modules/make-empty-dir/index.js +var require_make_empty_dir = __commonJS({ + "../../node_modules/.pnpm/make-empty-dir@2.0.0/node_modules/make-empty-dir/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs").promises; + var path = require("path"); + var rimraf = require_rimraf(); + module2.exports = async function makeEmptyDir(dir, opts) { + if (opts && opts.recursive) { + await fs.mkdir(path.dirname(dir), { recursive: true }); + } + try { + await fs.mkdir(dir); + return "created"; + } catch (err) { + if (err.code === "EEXIST") { + await removeContentsOfDir(dir); + return "emptied"; + } + throw err; + } + }; + async function removeContentsOfDir(dir) { + const items = await fs.readdir(dir); + for (const item of items) { + await rimraf(path.join(dir, item)); + } + } + } +}); + +// ../package-store/lib/fs/importIndexedDir.js +var require_importIndexedDir = __commonJS({ + "../package-store/lib/fs/importIndexedDir.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var logger_1 = __importStar2(require_lib6()); + var rimraf_1 = __importDefault(require_rimraf()); + var sanitize_filename_1 = __importDefault(require_sanitize_filename()); + var make_empty_dir_1 = __importDefault(require_make_empty_dir()); + var path_temp_1 = __importDefault(require_path_temp()); + var rename_overwrite_1 = __importDefault(require_rename_overwrite()); + var filenameConflictsLogger = logger_1.default("_filename-conflicts"); + async function importIndexedDir(importFile, newDir, filenames) { + const stage = path_temp_1.default(path_1.default.dirname(newDir)); + try { + await tryImportIndexedDir(importFile, stage, filenames); + await rename_overwrite_1.default(stage, newDir); + } catch (err) { + try { + await rimraf_1.default(stage); + } catch (err2) { + } + if (err["code"] === "EEXIST") { + const { uniqueFileMap, conflictingFileNames } = getUniqueFileMap(filenames); + if (Object.keys(conflictingFileNames).length === 0) + throw err; + filenameConflictsLogger.debug({ + conflicts: conflictingFileNames, + writingTo: newDir + }); + logger_1.globalWarn(`Not all files were linked to "${path_1.default.relative(process.cwd(), newDir)}". Some of the files have equal names in different case, which is an issue on case-insensitive filesystems. The conflicting file names are: ${JSON.stringify(conflictingFileNames)}`); + await importIndexedDir(importFile, newDir, uniqueFileMap); + return; + } + if (err["code"] === "ENOENT") { + const { sanitizedFilenames, invalidFilenames } = sanitizeFilenames(filenames); + if (invalidFilenames.length === 0) + throw err; + logger_1.globalWarn(`The package linked to "${path_1.default.relative(process.cwd(), newDir)}" had files with invalid names: ${invalidFilenames.join(", ")}. They were renamed.`); + await importIndexedDir(importFile, newDir, sanitizedFilenames); + return; + } + throw err; + } + } + exports2.default = importIndexedDir; + function sanitizeFilenames(filenames) { + const sanitizedFilenames = {}; + const invalidFilenames = []; + for (const [filename, src] of Object.entries(filenames)) { + const sanitizedFilename = filename.split("/").map((f) => sanitize_filename_1.default(f)).join("/"); + if (sanitizedFilename !== filename) { + invalidFilenames.push(filename); + } + sanitizedFilenames[sanitizedFilename] = src; + } + return { sanitizedFilenames, invalidFilenames }; + } + async function tryImportIndexedDir(importFile, newDir, filenames) { + await make_empty_dir_1.default(newDir, { recursive: true }); + const alldirs = new Set(); + Object.keys(filenames).forEach((f) => { + const dir = path_1.default.dirname(f); + if (dir === ".") + return; + alldirs.add(dir); + }); + await Promise.all(Array.from(alldirs).sort((d1, d2) => d1.length - d2.length).map(async (dir) => fs_1.promises.mkdir(path_1.default.join(newDir, dir), { recursive: true }))); + await Promise.all(Object.entries(filenames).map(async ([f, src]) => { + const dest = path_1.default.join(newDir, f); + await importFile(src, dest); + })); + } + function getUniqueFileMap(fileMap) { + const lowercaseFiles = new Map(); + const conflictingFileNames = {}; + const uniqueFileMap = {}; + for (const filename of Object.keys(fileMap).sort()) { + const lowercaseFilename = filename.toLowerCase(); + if (lowercaseFiles.has(lowercaseFilename)) { + conflictingFileNames[filename] = lowercaseFiles.get(lowercaseFilename); + continue; + } + lowercaseFiles.set(lowercaseFilename, filename); + uniqueFileMap[filename] = fileMap[filename]; + } + return { + conflictingFileNames, + uniqueFileMap + }; + } + } +}); + +// ../package-store/lib/storeController/createImportPackage.js +var require_createImportPackage = __commonJS({ + "../package-store/lib/storeController/createImportPackage.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.copyPkg = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var logger_1 = require_lib6(); + var core_loggers_1 = require_lib12(); + var p_limit_1 = __importDefault(require_p_limit()); + var path_exists_1 = __importDefault(require_path_exists()); + var importIndexedDir_1 = __importDefault(require_importIndexedDir()); + var limitLinking = p_limit_1.default(16); + exports2.default = (packageImportMethod) => { + const importPackage = createImportPackage(packageImportMethod); + return async (to, opts) => limitLinking(async () => importPackage(to, opts)); + }; + function createImportPackage(packageImportMethod) { + switch (packageImportMethod !== null && packageImportMethod !== void 0 ? packageImportMethod : "auto") { + case "clone": + core_loggers_1.packageImportMethodLogger.debug({ method: "clone" }); + return clonePkg; + case "hardlink": + core_loggers_1.packageImportMethodLogger.debug({ method: "hardlink" }); + return hardlinkPkg.bind(null, linkOrCopy); + case "auto": { + return createAutoImporter(); + } + case "copy": + core_loggers_1.packageImportMethodLogger.debug({ method: "copy" }); + return copyPkg; + default: + throw new Error(`Unknown package import method ${packageImportMethod}`); + } + } + function createAutoImporter() { + let auto = initialAuto; + return async (to, opts) => auto(to, opts); + async function initialAuto(to, opts) { + try { + if (!await clonePkg(to, opts)) + return void 0; + core_loggers_1.packageImportMethodLogger.debug({ method: "clone" }); + auto = clonePkg; + return "clone"; + } catch (err) { + } + try { + if (!await hardlinkPkg(fs_1.promises.link, to, opts)) + return void 0; + core_loggers_1.packageImportMethodLogger.debug({ method: "hardlink" }); + auto = hardlinkPkg.bind(null, linkOrCopy); + return "hardlink"; + } catch (err) { + if (err.message.startsWith("EXDEV: cross-device link not permitted")) { + logger_1.globalWarn(err.message); + logger_1.globalInfo("Falling back to copying packages from store"); + core_loggers_1.packageImportMethodLogger.debug({ method: "copy" }); + auto = copyPkg; + return auto(to, opts); + } + core_loggers_1.packageImportMethodLogger.debug({ method: "hardlink" }); + auto = hardlinkPkg.bind(null, linkOrCopy); + return auto(to, opts); + } + } + } + async function clonePkg(to, opts) { + const pkgJsonPath = path_1.default.join(to, "package.json"); + if (!opts.fromStore || opts.force || !await path_exists_1.default(pkgJsonPath)) { + await importIndexedDir_1.default(cloneFile, to, opts.filesMap); + return "clone"; + } + return void 0; + } + async function cloneFile(from, to) { + await fs_1.promises.copyFile(from, to, fs_1.constants.COPYFILE_FICLONE_FORCE); + } + async function hardlinkPkg(importFile, to, opts) { + const pkgJsonPath = path_1.default.join(to, "package.json"); + if (!opts.fromStore || opts.force || !await path_exists_1.default(pkgJsonPath) || !await pkgLinkedToStore(pkgJsonPath, opts.filesMap["package.json"], to)) { + await importIndexedDir_1.default(importFile, to, opts.filesMap); + return "hardlink"; + } + return void 0; + } + async function linkOrCopy(existingPath, newPath) { + try { + await fs_1.promises.link(existingPath, newPath); + } catch (err) { + if (err["code"] === "EEXIST") + return; + await fs_1.promises.copyFile(existingPath, newPath); + } + } + async function pkgLinkedToStore(pkgJsonPath, pkgJsonPathInStore, to) { + if (await isSameFile(pkgJsonPath, pkgJsonPathInStore)) + return true; + logger_1.globalInfo(`Relinking ${to} from the store`); + return false; + } + async function isSameFile(file1, file2) { + const stats = await Promise.all([fs_1.promises.stat(file1), fs_1.promises.stat(file2)]); + return stats[0].ino === stats[1].ino; + } + async function copyPkg(to, opts) { + const pkgJsonPath = path_1.default.join(to, "package.json"); + if (!opts.fromStore || opts.force || !await path_exists_1.default(pkgJsonPath)) { + await importIndexedDir_1.default(fs_1.promises.copyFile, to, opts.filesMap); + return "copy"; + } + return void 0; + } + exports2.copyPkg = copyPkg; + } +}); + +// ../package-store/lib/storeController/prune.js +var require_prune = __commonJS({ + "../package-store/lib/storeController/prune.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var logger_1 = require_lib6(); + var rimraf_1 = __importDefault(require_rimraf()); + var load_json_file_1 = __importDefault(require_load_json_file()); + var ssri_1 = __importDefault(require_ssri()); + var BIG_ONE = BigInt(1); + async function prune(storeDir) { + const cafsDir = path_1.default.join(storeDir, "files"); + await rimraf_1.default(path_1.default.join(storeDir, "metadata")); + await rimraf_1.default(path_1.default.join(storeDir, "metadata-full")); + await rimraf_1.default(path_1.default.join(storeDir, "tmp")); + logger_1.globalInfo("Removed all cached metadata files"); + const pkgIndexFiles = []; + const removedHashes = new Set(); + const dirs = (await fs_1.promises.readdir(cafsDir, { withFileTypes: true })).filter((entry) => entry.isDirectory()).map((dir) => dir.name); + let fileCounter = 0; + for (const dir of dirs) { + const subdir = path_1.default.join(cafsDir, dir); + for (const fileName of await fs_1.promises.readdir(subdir)) { + const filePath = path_1.default.join(subdir, fileName); + if (fileName.endsWith("-index.json")) { + pkgIndexFiles.push(filePath); + continue; + } + const stat = await fs_1.promises.stat(filePath); + if (stat.nlink === 1 || stat.nlink === BIG_ONE) { + await fs_1.promises.unlink(filePath); + fileCounter++; + removedHashes.add(ssri_1.default.fromHex(`${dir}${fileName}`, "sha512").toString()); + } + } + } + logger_1.globalInfo(`Removed ${fileCounter} file${fileCounter === 1 ? "" : "s"}`); + let pkgCounter = 0; + for (const pkgIndexFilePath of pkgIndexFiles) { + const { files: pkgFilesIndex } = await load_json_file_1.default(pkgIndexFilePath); + if (removedHashes.has(pkgFilesIndex["package.json"].integrity)) { + await fs_1.promises.unlink(pkgIndexFilePath); + pkgCounter++; + } + } + logger_1.globalInfo(`Removed ${pkgCounter} package${pkgCounter === 1 ? "" : "s"}`); + } + exports2.default = prune; + } +}); + +// ../package-store/lib/storeController/index.js +var require_storeController = __commonJS({ + "../package-store/lib/storeController/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createCafsStore = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var cafs_1 = __importStar2(require_lib31()); + var package_requester_1 = __importDefault(require_lib34()); + var load_json_file_1 = __importDefault(require_load_json_file()); + var path_temp_1 = __importDefault(require_path_temp()); + var write_json_file_1 = __importDefault(require_write_json_file()); + var createImportPackage_1 = __importDefault(require_createImportPackage()); + var prune_1 = __importDefault(require_prune()); + function createPackageImporter(opts) { + const impPkg = createImportPackage_1.default(opts.packageImportMethod); + const getFilePathByModeInCafs = cafs_1.getFilePathByModeInCafs.bind(null, opts.cafsDir); + return async (to, opts2) => { + var _a, _b; + const filesMap = {}; + let isBuilt; + let filesIndex; + if (opts2.targetEngine && ((_a = opts2.filesResponse.sideEffects) === null || _a === void 0 ? void 0 : _a[opts2.targetEngine]) != null) { + filesIndex = (_b = opts2.filesResponse.sideEffects) === null || _b === void 0 ? void 0 : _b[opts2.targetEngine]; + isBuilt = true; + } else { + filesIndex = opts2.filesResponse.filesIndex; + isBuilt = false; + } + for (const [fileName, fileMeta] of Object.entries(filesIndex)) { + filesMap[fileName] = getFilePathByModeInCafs(fileMeta.integrity, fileMeta.mode); + } + const importMethod = await impPkg(to, { filesMap, fromStore: opts2.filesResponse.fromStore, force: opts2.force }); + return { importMethod, isBuilt }; + }; + } + function createCafsStore(storeDir, opts) { + const cafsDir = path_1.default.join(storeDir, "files"); + const baseTempDir = path_1.default.join(storeDir, "tmp"); + const importPackage = createPackageImporter({ + packageImportMethod: opts === null || opts === void 0 ? void 0 : opts.packageImportMethod, + cafsDir + }); + return { + ...cafs_1.default(cafsDir, opts === null || opts === void 0 ? void 0 : opts.ignoreFile), + importPackage, + tempDir: async () => { + const tmpDir = path_temp_1.default(baseTempDir); + await fs_1.promises.mkdir(tmpDir, { recursive: true }); + return tmpDir; + } + }; + } + exports2.createCafsStore = createCafsStore; + async function default_1(resolve, fetchers, initOpts) { + const storeDir = initOpts.storeDir; + const cafs = createCafsStore(storeDir, initOpts); + const packageRequester = package_requester_1.default({ + force: initOpts.force, + engineStrict: initOpts.engineStrict, + nodeVersion: initOpts.nodeVersion, + pnpmVersion: initOpts.pnpmVersion, + resolve, + fetchers, + cafs, + ignoreFile: initOpts.ignoreFile, + networkConcurrency: initOpts.networkConcurrency, + storeDir: initOpts.storeDir, + verifyStoreIntegrity: initOpts.verifyStoreIntegrity + }); + return { + close: async () => { + }, + fetchPackage: packageRequester.fetchPackageToStore, + importPackage: cafs.importPackage, + prune: prune_1.default.bind(null, storeDir), + requestPackage: packageRequester.requestPackage, + upload + }; + async function upload(builtPkgLocation, opts) { + var _a; + const sideEffectsIndex = await cafs.addFilesFromDir(builtPkgLocation); + const integrity = {}; + await Promise.all(Object.keys(sideEffectsIndex).map(async (filename) => { + const { checkedAt, integrity: fileIntegrity } = await sideEffectsIndex[filename].writeResult; + integrity[filename] = { + checkedAt, + integrity: fileIntegrity.toString(), + mode: sideEffectsIndex[filename].mode, + size: sideEffectsIndex[filename].size + }; + })); + let filesIndex; + try { + filesIndex = await load_json_file_1.default(opts.filesIndexFile); + } catch (err) { + filesIndex = { files: integrity }; + } + filesIndex.sideEffects = (_a = filesIndex.sideEffects) !== null && _a !== void 0 ? _a : {}; + filesIndex.sideEffects[opts.engine] = integrity; + await write_json_file_1.default(opts.filesIndexFile, filesIndex, { indent: void 0 }); + } + } + exports2.default = default_1; + } +}); + +// ../resolver-base/lib/index.js +var require_lib35 = __commonJS({ + "../resolver-base/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../store-controller-types/lib/index.js +var require_lib36 = __commonJS({ + "../store-controller-types/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar(require_lib35(), exports2); + } +}); + +// ../package-store/lib/index.js +var require_lib37 = __commonJS({ + "../package-store/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createCafsStore = void 0; + var storeController_1 = __importStar2(require_storeController()); + Object.defineProperty(exports2, "createCafsStore", { enumerable: true, get: function() { + return storeController_1.createCafsStore; + } }); + exports2.default = storeController_1.default; + __exportStar(require_lib36(), exports2); + } +}); + +// ../../node_modules/.pnpm/can-link@2.0.0/node_modules/can-link/index.js +var require_can_link = __commonJS({ + "../../node_modules/.pnpm/can-link@2.0.0/node_modules/can-link/index.js"(exports2, module2) { + "use strict"; + var defaultFS = require("fs"); + module2.exports = async (existingPath, newPath, customFS) => { + const fs = customFS || defaultFS; + try { + await fs.promises.link(existingPath, newPath); + fs.promises.unlink(newPath).catch(() => { + }); + return true; + } catch (err) { + if (err.code === "EXDEV" || err.code === "EACCES" || err.code === "EPERM") { + return false; + } + throw err; + } + }; + module2.exports.sync = (existingPath, newPath, customFS) => { + const fs = customFS || defaultFS; + try { + fs.linkSync(existingPath, newPath); + fs.unlinkSync(newPath); + return true; + } catch (err) { + if (err.code === "EXDEV" || err.code === "EACCES" || err.code === "EPERM") { + return false; + } + throw err; + } + }; + } +}); + +// ../../node_modules/.pnpm/path-absolute@1.0.1/node_modules/path-absolute/index.js +var require_path_absolute = __commonJS({ + "../../node_modules/.pnpm/path-absolute@1.0.1/node_modules/path-absolute/index.js"(exports2, module2) { + "use strict"; + var os = require("os"); + var path = require("path"); + module2.exports = function(filepath, cwd) { + const home = getHomedir(); + if (isHomepath(filepath)) { + return path.join(home, filepath.substr(2)); + } + if (path.isAbsolute(filepath)) { + return filepath; + } + if (cwd) { + return path.join(cwd, filepath); + } + return path.resolve(filepath); + }; + function getHomedir() { + const home = os.homedir(); + if (!home) + throw new Error("Could not find the homedir"); + return home; + } + function isHomepath(filepath) { + return filepath.indexOf("~/") === 0 || filepath.indexOf("~\\") === 0; + } + } +}); + +// ../../node_modules/.pnpm/next-path@1.0.0/node_modules/next-path/index.js +var require_next_path = __commonJS({ + "../../node_modules/.pnpm/next-path@1.0.0/node_modules/next-path/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var nextPath = (from, to) => { + const diff = path.relative(from, to); + const sepIndex = diff.indexOf(path.sep); + const next = sepIndex >= 0 ? diff.substring(0, sepIndex) : diff; + return path.join(from, next); + }; + module2.exports = nextPath; + } +}); + +// ../../node_modules/.pnpm/root-link-target@3.1.0/node_modules/root-link-target/index.js +var require_root_link_target = __commonJS({ + "../../node_modules/.pnpm/root-link-target@3.1.0/node_modules/root-link-target/index.js"(exports2, module2) { + "use strict"; + var canLink = require_can_link(); + var path = require("path"); + var pathTemp = require_path_temp(); + var nextPath = require_next_path(); + module2.exports = async (filePath) => { + filePath = path.resolve(filePath); + const end = path.dirname(filePath); + let dir = path.parse(end).root; + while (true) { + const result = await canLink(filePath, pathTemp(dir)); + if (result) { + return dir; + } else if (dir === end) { + throw new Error(`${filePath} cannot be linked to anywhere`); + } else { + dir = nextPath(dir, end); + } + } + }; + module2.exports.sync = (filePath) => { + filePath = path.resolve(filePath); + const end = path.dirname(filePath); + let dir = path.parse(end).root; + while (true) { + const result = canLink.sync(filePath, pathTemp(dir)); + if (result) { + return dir; + } else if (dir === end) { + throw new Error(`${filePath} cannot be linked to anywhere`); + } else { + dir = nextPath(dir, end); + } + } + }; + } +}); + +// ../../node_modules/.pnpm/touch@3.1.0/node_modules/touch/index.js +var require_touch = __commonJS({ + "../../node_modules/.pnpm/touch@3.1.0/node_modules/touch/index.js"(exports2, module2) { + "use strict"; + var EE = require("events").EventEmitter; + var cons = require("constants"); + var fs = require("fs"); + module2.exports = (f, options, cb) => { + if (typeof options === "function") + cb = options, options = {}; + const p = new Promise((res, rej) => { + new Touch(validOpts(options, f, null)).on("done", res).on("error", rej); + }); + return cb ? p.then((res) => cb(null, res), cb) : p; + }; + module2.exports.sync = module2.exports.touchSync = (f, options) => (new TouchSync(validOpts(options, f, null)), void 0); + module2.exports.ftouch = (fd, options, cb) => { + if (typeof options === "function") + cb = options, options = {}; + const p = new Promise((res, rej) => { + new Touch(validOpts(options, null, fd)).on("done", res).on("error", rej); + }); + return cb ? p.then((res) => cb(null, res), cb) : p; + }; + module2.exports.ftouchSync = (fd, opt) => (new TouchSync(validOpts(opt, null, fd)), void 0); + var validOpts = (options, path, fd) => { + options = Object.create(options || {}); + options.fd = fd; + options.path = path; + const now = parseInt(new Date(options.time || Date.now()).getTime() / 1e3); + if (!options.atime && !options.mtime) + options.atime = options.mtime = now; + else { + if (options.atime === true) + options.atime = now; + if (options.mtime === true) + options.mtime = now; + } + let oflags = 0; + if (!options.force) + oflags = oflags | cons.O_RDWR; + if (!options.nocreate) + oflags = oflags | cons.O_CREAT; + options.oflags = oflags; + return options; + }; + var Touch = class extends EE { + constructor(options) { + super(options); + this.fd = options.fd; + this.path = options.path; + this.atime = options.atime; + this.mtime = options.mtime; + this.ref = options.ref; + this.nocreate = !!options.nocreate; + this.force = !!options.force; + this.closeAfter = options.closeAfter; + this.oflags = options.oflags; + this.options = options; + if (typeof this.fd !== "number") { + this.closeAfter = true; + this.open(); + } else + this.onopen(null, this.fd); + } + emit(ev, data) { + this.close(); + return super.emit(ev, data); + } + close() { + if (typeof this.fd === "number" && this.closeAfter) + fs.close(this.fd, () => { + }); + } + open() { + fs.open(this.path, this.oflags, (er, fd) => this.onopen(er, fd)); + } + onopen(er, fd) { + if (er) { + if (er.code === "EISDIR") + this.onopen(null, null); + else if (er.code === "ENOENT" && this.nocreate) + this.emit("done"); + else + this.emit("error", er); + } else { + this.fd = fd; + if (this.ref) + this.statref(); + else if (!this.atime || !this.mtime) + this.fstat(); + else + this.futimes(); + } + } + statref() { + fs.stat(this.ref, (er, st) => { + if (er) + this.emit("error", er); + else + this.onstatref(st); + }); + } + onstatref(st) { + this.atime = this.atime && parseInt(st.atime.getTime() / 1e3, 10); + this.mtime = this.mtime && parseInt(st.mtime.getTime() / 1e3, 10); + if (!this.atime || !this.mtime) + this.fstat(); + else + this.futimes(); + } + fstat() { + const stat = this.fd ? "fstat" : "stat"; + const target = this.fd || this.path; + fs[stat](target, (er, st) => { + if (er) + this.emit("error", er); + else + this.onfstat(st); + }); + } + onfstat(st) { + if (typeof this.atime !== "number") + this.atime = parseInt(st.atime.getTime() / 1e3, 10); + if (typeof this.mtime !== "number") + this.mtime = parseInt(st.mtime.getTime() / 1e3, 10); + this.futimes(); + } + futimes() { + const utimes = this.fd ? "futimes" : "utimes"; + const target = this.fd || this.path; + fs[utimes](target, "" + this.atime, "" + this.mtime, (er) => { + if (er) + this.emit("error", er); + else + this.emit("done"); + }); + } + }; + var TouchSync = class extends Touch { + open() { + try { + this.onopen(null, fs.openSync(this.path, this.oflags)); + } catch (er) { + this.onopen(er); + } + } + statref() { + let threw = true; + try { + this.onstatref(fs.statSync(this.ref)); + threw = false; + } finally { + if (threw) + this.close(); + } + } + fstat() { + let threw = true; + const stat = this.fd ? "fstatSync" : "statSync"; + const target = this.fd || this.path; + try { + this.onfstat(fs[stat](target)); + threw = false; + } finally { + if (threw) + this.close(); + } + } + futimes() { + let threw = true; + const utimes = this.fd ? "futimesSync" : "utimesSync"; + const target = this.fd || this.path; + try { + fs[utimes](target, this.atime, this.mtime); + threw = false; + } finally { + if (threw) + this.close(); + } + this.emit("done"); + } + close() { + if (typeof this.fd === "number" && this.closeAfter) + try { + fs.closeSync(this.fd); + } catch (er) { + } + } + }; + } +}); + +// ../../node_modules/.pnpm/@pnpm+store-path@5.0.0/node_modules/@pnpm/store-path/lib/index.js +var require_lib38 = __commonJS({ + "../../node_modules/.pnpm/@pnpm+store-path@5.0.0/node_modules/@pnpm/store-path/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var rimraf = require_rimraf(); + var canLink = require_can_link(); + var os = require("os"); + var path = require("path"); + var pathAbsolute = require_path_absolute(); + var pathTemp = require_path_temp(); + var rootLinkTarget = require_root_link_target(); + var touch = require_touch(); + var STORE_VERSION = "v3"; + async function default_1(pkgRoot, storePath) { + if (!storePath || isHomepath(storePath)) { + const relStorePath = storePath ? storePath.substr(2) : ".pnpm-store"; + return await storePathRelativeToHome(pkgRoot, relStorePath); + } + const storeBasePath = pathAbsolute(storePath, pkgRoot); + if (storeBasePath.endsWith(`${path.sep}${STORE_VERSION}`)) { + return storeBasePath; + } + return path.join(storeBasePath, STORE_VERSION); + } + exports2.default = default_1; + async function storePathRelativeToHome(pkgRoot, relStore) { + const tempFile = pathTemp(pkgRoot); + await fs_1.promises.mkdir(path.dirname(tempFile), { recursive: true }); + await touch(tempFile); + const homedir = getHomedir(); + if (await canLinkToSubdir(tempFile, homedir)) { + await fs_1.promises.unlink(tempFile); + return path.join(homedir, relStore, STORE_VERSION); + } + try { + let mountpoint = await rootLinkTarget(tempFile); + const mountpointParent = path.join(mountpoint, ".."); + if (!dirsAreEqual(mountpointParent, mountpoint) && await canLinkToSubdir(tempFile, mountpointParent)) { + mountpoint = mountpointParent; + } + if (dirsAreEqual(pkgRoot, mountpoint)) { + return path.join(homedir, relStore, STORE_VERSION); + } + return path.join(mountpoint, relStore, STORE_VERSION); + } catch (err) { + return path.join(homedir, relStore, STORE_VERSION); + } finally { + await fs_1.promises.unlink(tempFile); + } + } + async function canLinkToSubdir(fileToLink, dir) { + let result = false; + const tmpDir = pathTemp(dir); + try { + await fs_1.promises.mkdir(tmpDir, { recursive: true }); + result = await canLink(fileToLink, pathTemp(tmpDir)); + } catch (err) { + result = false; + } finally { + await safeRmdir(tmpDir); + } + return result; + } + async function safeRmdir(dir) { + try { + await rimraf(dir); + } catch (err) { + } + } + function dirsAreEqual(dir1, dir2) { + return path.relative(dir1, dir2) === "."; + } + function getHomedir() { + const home = os.homedir(); + if (!home) + throw new Error("Could not find the homedir"); + return home; + } + function isHomepath(filepath) { + return filepath.indexOf("~/") === 0 || filepath.indexOf("~\\") === 0; + } + } +}); + +// ../../node_modules/.pnpm/p-try@2.2.0/node_modules/p-try/index.js +var require_p_try = __commonJS({ + "../../node_modules/.pnpm/p-try@2.2.0/node_modules/p-try/index.js"(exports2, module2) { + "use strict"; + var pTry = (fn2, ...arguments_) => new Promise((resolve) => { + resolve(fn2(...arguments_)); + }); + module2.exports = pTry; + module2.exports.default = pTry; + } +}); + +// ../../node_modules/.pnpm/p-limit@2.3.0/node_modules/p-limit/index.js +var require_p_limit2 = __commonJS({ + "../../node_modules/.pnpm/p-limit@2.3.0/node_modules/p-limit/index.js"(exports2, module2) { + "use strict"; + var pTry = require_p_try(); + var pLimit = (concurrency) => { + if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { + return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up")); + } + const queue = []; + let activeCount = 0; + const next = () => { + activeCount--; + if (queue.length > 0) { + queue.shift()(); + } + }; + const run = (fn2, resolve, ...args2) => { + activeCount++; + const result = pTry(fn2, ...args2); + resolve(result); + result.then(next, next); + }; + const enqueue = (fn2, resolve, ...args2) => { + if (activeCount < concurrency) { + run(fn2, resolve, ...args2); + } else { + queue.push(run.bind(null, fn2, resolve, ...args2)); + } + }; + const generator = (fn2, ...args2) => new Promise((resolve) => enqueue(fn2, resolve, ...args2)); + Object.defineProperties(generator, { + activeCount: { + get: () => activeCount + }, + pendingCount: { + get: () => queue.length + }, + clearQueue: { + value: () => { + queue.length = 0; + } + } + }); + return generator; + }; + module2.exports = pLimit; + module2.exports.default = pLimit; + } +}); + +// ../../node_modules/.pnpm/p-locate@4.1.0/node_modules/p-locate/index.js +var require_p_locate2 = __commonJS({ + "../../node_modules/.pnpm/p-locate@4.1.0/node_modules/p-locate/index.js"(exports2, module2) { + "use strict"; + var pLimit = require_p_limit2(); + var EndError = class extends Error { + constructor(value) { + super(); + this.value = value; + } + }; + var testElement = async (element, tester) => tester(await element); + var finder = async (element) => { + const values = await Promise.all(element); + if (values[1] === true) { + throw new EndError(values[0]); + } + return false; + }; + var pLocate = async (iterable, tester, options) => { + options = { + concurrency: Infinity, + preserveOrder: true, + ...options + }; + const limit = pLimit(options.concurrency); + const items = [...iterable].map((element) => [element, limit(testElement, element, tester)]); + const checkLimit = pLimit(options.preserveOrder ? 1 : Infinity); + try { + await Promise.all(items.map((element) => checkLimit(finder, element))); + } catch (error) { + if (error instanceof EndError) { + return error.value; + } + throw error; + } + }; + module2.exports = pLocate; + module2.exports.default = pLocate; + } +}); + +// ../../node_modules/.pnpm/locate-path@5.0.0/node_modules/locate-path/index.js +var require_locate_path2 = __commonJS({ + "../../node_modules/.pnpm/locate-path@5.0.0/node_modules/locate-path/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var fs = require("fs"); + var { promisify } = require("util"); + var pLocate = require_p_locate2(); + var fsStat = promisify(fs.stat); + var fsLStat = promisify(fs.lstat); + var typeMappings = { + directory: "isDirectory", + file: "isFile" + }; + function checkType({ type }) { + if (type in typeMappings) { + return; + } + throw new Error(`Invalid type specified: ${type}`); + } + var matchType = (type, stat) => type === void 0 || stat[typeMappings[type]](); + module2.exports = async (paths, options) => { + options = { + cwd: process.cwd(), + type: "file", + allowSymlinks: true, + ...options + }; + checkType(options); + const statFn = options.allowSymlinks ? fsStat : fsLStat; + return pLocate(paths, async (path_) => { + try { + const stat = await statFn(path.resolve(options.cwd, path_)); + return matchType(options.type, stat); + } catch (_) { + return false; + } + }, options); + }; + module2.exports.sync = (paths, options) => { + options = { + cwd: process.cwd(), + allowSymlinks: true, + type: "file", + ...options + }; + checkType(options); + const statFn = options.allowSymlinks ? fs.statSync : fs.lstatSync; + for (const path_ of paths) { + try { + const stat = statFn(path.resolve(options.cwd, path_)); + if (matchType(options.type, stat)) { + return path_; + } + } catch (_) { + } + } + }; + } +}); + +// ../../node_modules/.pnpm/find-up@4.1.0/node_modules/find-up/index.js +var require_find_up2 = __commonJS({ + "../../node_modules/.pnpm/find-up@4.1.0/node_modules/find-up/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var locatePath = require_locate_path2(); + var pathExists = require_path_exists(); + var stop = Symbol("findUp.stop"); + module2.exports = async (name, options = {}) => { + let directory = path.resolve(options.cwd || ""); + const { root } = path.parse(directory); + const paths = [].concat(name); + const runMatcher = async (locateOptions) => { + if (typeof name !== "function") { + return locatePath(paths, locateOptions); + } + const foundPath = await name(locateOptions.cwd); + if (typeof foundPath === "string") { + return locatePath([foundPath], locateOptions); + } + return foundPath; + }; + while (true) { + const foundPath = await runMatcher({ ...options, cwd: directory }); + if (foundPath === stop) { + return; + } + if (foundPath) { + return path.resolve(directory, foundPath); + } + if (directory === root) { + return; + } + directory = path.dirname(directory); + } + }; + module2.exports.sync = (name, options = {}) => { + let directory = path.resolve(options.cwd || ""); + const { root } = path.parse(directory); + const paths = [].concat(name); + const runMatcher = (locateOptions) => { + if (typeof name !== "function") { + return locatePath.sync(paths, locateOptions); + } + const foundPath = name(locateOptions.cwd); + if (typeof foundPath === "string") { + return locatePath.sync([foundPath], locateOptions); + } + return foundPath; + }; + while (true) { + const foundPath = runMatcher({ ...options, cwd: directory }); + if (foundPath === stop) { + return; + } + if (foundPath) { + return path.resolve(directory, foundPath); + } + if (directory === root) { + return; + } + directory = path.dirname(directory); + } + }; + module2.exports.exists = pathExists; + module2.exports.sync.exists = pathExists.sync; + module2.exports.stop = stop; + } +}); + +// ../../node_modules/.pnpm/pkg-dir@4.2.0/node_modules/pkg-dir/index.js +var require_pkg_dir = __commonJS({ + "../../node_modules/.pnpm/pkg-dir@4.2.0/node_modules/pkg-dir/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var findUp = require_find_up2(); + var pkgDir = async (cwd) => { + const filePath = await findUp("package.json", { cwd }); + return filePath && path.dirname(filePath); + }; + module2.exports = pkgDir; + module2.exports.default = pkgDir; + module2.exports.sync = (cwd) => { + const filePath = findUp.sync("package.json", { cwd }); + return filePath && path.dirname(filePath); + }; + } +}); + +// ../../node_modules/.pnpm/find-yarn-workspace-root2@1.2.16/node_modules/find-yarn-workspace-root2/core.js +var require_core5 = __commonJS({ + "../../node_modules/.pnpm/find-yarn-workspace-root2@1.2.16/node_modules/find-yarn-workspace-root2/core.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readPackageJSON = exports2.extractWorkspaces = exports2.isMatchWorkspaces = exports2.checkWorkspaces = exports2.findWorkspaceRoot = void 0; + var path_1 = __importDefault(require("path")); + var pkg_dir_1 = __importDefault(require_pkg_dir()); + var fs_1 = require("fs"); + var micromatch_1 = __importDefault(require_micromatch()); + function findWorkspaceRoot(initial) { + if (!initial) { + initial = process.cwd(); + } + let _pkg = pkg_dir_1.default.sync(initial); + if (!_pkg) { + return null; + } + initial = path_1.default.normalize(_pkg); + let previous = null; + let current = initial; + do { + const manifest = readPackageJSON(current); + const workspaces = extractWorkspaces(manifest); + let { done, found } = checkWorkspaces(current, initial); + if (done) { + return found; + } + previous = current; + current = path_1.default.dirname(current); + } while (current !== previous); + return null; + } + exports2.findWorkspaceRoot = findWorkspaceRoot; + function checkWorkspaces(current, initial) { + const manifest = readPackageJSON(current); + const workspaces = extractWorkspaces(manifest); + let done = false; + let found; + let relativePath; + if (workspaces) { + done = true; + relativePath = path_1.default.relative(current, initial); + if (relativePath === "" || isMatchWorkspaces(relativePath, workspaces)) { + found = current; + } else { + found = null; + } + } + return { + done, + found, + relativePath + }; + } + exports2.checkWorkspaces = checkWorkspaces; + function isMatchWorkspaces(relativePath, workspaces) { + let ls = micromatch_1.default([relativePath], workspaces); + return ls.length > 0; + } + exports2.isMatchWorkspaces = isMatchWorkspaces; + function extractWorkspaces(manifest) { + const workspaces = (manifest || {}).workspaces; + return workspaces && workspaces.packages || (Array.isArray(workspaces) ? workspaces : null); + } + exports2.extractWorkspaces = extractWorkspaces; + function readPackageJSON(dir) { + const file = path_1.default.join(dir, "package.json"); + if (fs_1.existsSync(file)) { + return JSON.parse(fs_1.readFileSync(file, "utf8")); + } + return null; + } + exports2.readPackageJSON = readPackageJSON; + findWorkspaceRoot.findWorkspaceRoot = findWorkspaceRoot; + findWorkspaceRoot.readPackageJSON = readPackageJSON; + findWorkspaceRoot.extractWorkspaces = extractWorkspaces; + findWorkspaceRoot.isMatchWorkspaces = isMatchWorkspaces; + findWorkspaceRoot.default = findWorkspaceRoot; + exports2.default = findWorkspaceRoot; + } +}); + +// ../../node_modules/.pnpm/find-yarn-workspace-root2@1.2.16/node_modules/find-yarn-workspace-root2/index.js +var require_find_yarn_workspace_root2 = __commonJS({ + "../../node_modules/.pnpm/find-yarn-workspace-root2@1.2.16/node_modules/find-yarn-workspace-root2/index.js"(exports2, module2) { + "use strict"; + var core_1 = require_core5(); + module2.exports = core_1.findWorkspaceRoot; + } +}); + +// ../../node_modules/.pnpm/pify@4.0.1/node_modules/pify/index.js +var require_pify = __commonJS({ + "../../node_modules/.pnpm/pify@4.0.1/node_modules/pify/index.js"(exports2, module2) { + "use strict"; + var processFn = (fn2, options) => function(...args2) { + const P = options.promiseModule; + return new P((resolve, reject) => { + if (options.multiArgs) { + args2.push((...result) => { + if (options.errorFirst) { + if (result[0]) { + reject(result); + } else { + result.shift(); + resolve(result); + } + } else { + resolve(result); + } + }); + } else if (options.errorFirst) { + args2.push((error, result) => { + if (error) { + reject(error); + } else { + resolve(result); + } + }); + } else { + args2.push(resolve); + } + fn2.apply(this, args2); + }); + }; + module2.exports = (input, options) => { + options = Object.assign({ + exclude: [/.+(Sync|Stream)$/], + errorFirst: true, + promiseModule: Promise + }, options); + const objType = typeof input; + if (!(input !== null && (objType === "object" || objType === "function"))) { + throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${input === null ? "null" : objType}\``); + } + const filter = (key) => { + const match = (pattern) => typeof pattern === "string" ? key === pattern : pattern.test(key); + return options.include ? options.include.some(match) : !options.exclude.some(match); + }; + let ret; + if (objType === "function") { + ret = function(...args2) { + return options.excludeMain ? input(...args2) : processFn(input, options).apply(this, args2); + }; + } else { + ret = Object.create(Object.getPrototypeOf(input)); + } + for (const key in input) { + const property = input[key]; + ret[key] = typeof property === "function" && filter(key) ? processFn(property, options) : property; + } + return ret; + }; + } +}); + +// ../../node_modules/.pnpm/strip-bom@3.0.0/node_modules/strip-bom/index.js +var require_strip_bom2 = __commonJS({ + "../../node_modules/.pnpm/strip-bom@3.0.0/node_modules/strip-bom/index.js"(exports2, module2) { + "use strict"; + module2.exports = (x) => { + if (typeof x !== "string") { + throw new TypeError("Expected a string, got " + typeof x); + } + if (x.charCodeAt(0) === 65279) { + return x.slice(1); + } + return x; + }; + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/common.js +var require_common6 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/common.js"(exports2, module2) { + "use strict"; + function isNothing(subject) { + return typeof subject === "undefined" || subject === null; + } + function isObject(subject) { + return typeof subject === "object" && subject !== null; + } + function toArray(sequence) { + if (Array.isArray(sequence)) + return sequence; + else if (isNothing(sequence)) + return []; + return [sequence]; + } + function extend(target, source) { + var index, length, key, sourceKeys; + if (source) { + sourceKeys = Object.keys(source); + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + return target; + } + function repeat(string, count) { + var result = "", cycle; + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + return result; + } + function isNegativeZero(number) { + return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; + } + module2.exports.isNothing = isNothing; + module2.exports.isObject = isObject; + module2.exports.toArray = toArray; + module2.exports.repeat = repeat; + module2.exports.isNegativeZero = isNegativeZero; + module2.exports.extend = extend; + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/exception.js +var require_exception2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/exception.js"(exports2, module2) { + "use strict"; + function YAMLException(reason, mark) { + Error.call(this); + this.name = "YAMLException"; + this.reason = reason; + this.mark = mark; + this.message = (this.reason || "(unknown reason)") + (this.mark ? " " + this.mark.toString() : ""); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + this.stack = new Error().stack || ""; + } + } + YAMLException.prototype = Object.create(Error.prototype); + YAMLException.prototype.constructor = YAMLException; + YAMLException.prototype.toString = function toString(compact) { + var result = this.name + ": "; + result += this.reason || "(unknown reason)"; + if (!compact && this.mark) { + result += " " + this.mark.toString(); + } + return result; + }; + module2.exports = YAMLException; + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/mark.js +var require_mark = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/mark.js"(exports2, module2) { + "use strict"; + var common = require_common6(); + function Mark(name, buffer, position, line, column) { + this.name = name; + this.buffer = buffer; + this.position = position; + this.line = line; + this.column = column; + } + Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { + var head, start, tail, end, snippet; + if (!this.buffer) + return null; + indent = indent || 4; + maxLength = maxLength || 75; + head = ""; + start = this.position; + while (start > 0 && "\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(start - 1)) === -1) { + start -= 1; + if (this.position - start > maxLength / 2 - 1) { + head = " ... "; + start += 5; + break; + } + } + tail = ""; + end = this.position; + while (end < this.buffer.length && "\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(end)) === -1) { + end += 1; + if (end - this.position > maxLength / 2 - 1) { + tail = " ... "; + end -= 5; + break; + } + } + snippet = this.buffer.slice(start, end); + return common.repeat(" ", indent) + head + snippet + tail + "\n" + common.repeat(" ", indent + this.position - start + head.length) + "^"; + }; + Mark.prototype.toString = function toString(compact) { + var snippet, where = ""; + if (this.name) { + where += 'in "' + this.name + '" '; + } + where += "at line " + (this.line + 1) + ", column " + (this.column + 1); + if (!compact) { + snippet = this.getSnippet(); + if (snippet) { + where += ":\n" + snippet; + } + } + return where; + }; + module2.exports = Mark; + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type.js +var require_type3 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type.js"(exports2, module2) { + "use strict"; + var YAMLException = require_exception2(); + var TYPE_CONSTRUCTOR_OPTIONS = [ + "kind", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "defaultStyle", + "styleAliases" + ]; + var YAML_NODE_KINDS = [ + "scalar", + "sequence", + "mapping" + ]; + function compileStyleAliases(map) { + var result = {}; + if (map !== null) { + Object.keys(map).forEach(function(style) { + map[style].forEach(function(alias) { + result[String(alias)] = style; + }); + }); + } + return result; + } + function Type(tag, options) { + options = options || {}; + Object.keys(options).forEach(function(name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + this.tag = tag; + this.kind = options["kind"] || null; + this.resolve = options["resolve"] || function() { + return true; + }; + this.construct = options["construct"] || function(data) { + return data; + }; + this.instanceOf = options["instanceOf"] || null; + this.predicate = options["predicate"] || null; + this.represent = options["represent"] || null; + this.defaultStyle = options["defaultStyle"] || null; + this.styleAliases = compileStyleAliases(options["styleAliases"] || null); + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } + } + module2.exports = Type; + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema.js +var require_schema2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema.js"(exports2, module2) { + "use strict"; + var common = require_common6(); + var YAMLException = require_exception2(); + var Type = require_type3(); + function compileList(schema, name, result) { + var exclude = []; + schema.include.forEach(function(includedSchema) { + result = compileList(includedSchema, name, result); + }); + schema[name].forEach(function(currentType) { + result.forEach(function(previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) { + exclude.push(previousIndex); + } + }); + result.push(currentType); + }); + return result.filter(function(type, index) { + return exclude.indexOf(index) === -1; + }); + } + function compileMap() { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {} + }, index, length; + function collectType(type) { + result[type.kind][type.tag] = result["fallback"][type.tag] = type; + } + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; + } + function Schema(definition) { + this.include = definition.include || []; + this.implicit = definition.implicit || []; + this.explicit = definition.explicit || []; + this.implicit.forEach(function(type) { + if (type.loadKind && type.loadKind !== "scalar") { + throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); + } + }); + this.compiledImplicit = compileList(this, "implicit", []); + this.compiledExplicit = compileList(this, "explicit", []); + this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); + } + Schema.DEFAULT = null; + Schema.create = function createSchema() { + var schemas, types; + switch (arguments.length) { + case 1: + schemas = Schema.DEFAULT; + types = arguments[0]; + break; + case 2: + schemas = arguments[0]; + types = arguments[1]; + break; + default: + throw new YAMLException("Wrong number of arguments for Schema.create function"); + } + schemas = common.toArray(schemas); + types = common.toArray(types); + if (!schemas.every(function(schema) { + return schema instanceof Schema; + })) { + throw new YAMLException("Specified list of super schemas (or a single Schema object) contains a non-Schema object."); + } + if (!types.every(function(type) { + return type instanceof Type; + })) { + throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + return new Schema({ + include: schemas, + explicit: types + }); + }; + module2.exports = Schema; + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/str.js +var require_str2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/str.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + module2.exports = new Type("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(data) { + return data !== null ? data : ""; + } + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/seq.js +var require_seq2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/seq.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + module2.exports = new Type("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(data) { + return data !== null ? data : []; + } + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/map.js +var require_map5 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/map.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + module2.exports = new Type("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(data) { + return data !== null ? data : {}; + } + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +var require_failsafe2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js"(exports2, module2) { + "use strict"; + var Schema = require_schema2(); + module2.exports = new Schema({ + explicit: [ + require_str2(), + require_seq2(), + require_map5() + ] + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/null.js +var require_null2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/null.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + function resolveYamlNull(data) { + if (data === null) + return true; + var max = data.length; + return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); + } + function constructYamlNull() { + return null; + } + function isNull(object) { + return object === null; + } + module2.exports = new Type("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function() { + return "~"; + }, + lowercase: function() { + return "null"; + }, + uppercase: function() { + return "NULL"; + }, + camelcase: function() { + return "Null"; + } + }, + defaultStyle: "lowercase" + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/bool.js +var require_bool2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/bool.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + function resolveYamlBoolean(data) { + if (data === null) + return false; + var max = data.length; + return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE"); + } + function constructYamlBoolean(data) { + return data === "true" || data === "True" || data === "TRUE"; + } + function isBoolean(object) { + return Object.prototype.toString.call(object) === "[object Boolean]"; + } + module2.exports = new Type("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function(object) { + return object ? "true" : "false"; + }, + uppercase: function(object) { + return object ? "TRUE" : "FALSE"; + }, + camelcase: function(object) { + return object ? "True" : "False"; + } + }, + defaultStyle: "lowercase" + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/int.js +var require_int2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/int.js"(exports2, module2) { + "use strict"; + var common = require_common6(); + var Type = require_type3(); + function isHexCode(c) { + return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102; + } + function isOctCode(c) { + return 48 <= c && c <= 55; + } + function isDecCode(c) { + return 48 <= c && c <= 57; + } + function resolveYamlInteger(data) { + if (data === null) + return false; + var max = data.length, index = 0, hasDigits = false, ch; + if (!max) + return false; + ch = data[index]; + if (ch === "-" || ch === "+") { + ch = data[++index]; + } + if (ch === "0") { + if (index + 1 === max) + return true; + ch = data[++index]; + if (ch === "b") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (ch !== "0" && ch !== "1") + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "x") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (!isHexCode(data.charCodeAt(index))) + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (!isOctCode(data.charCodeAt(index))) + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "_") + return false; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (ch === ":") + break; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + if (!hasDigits || ch === "_") + return false; + if (ch !== ":") + return true; + return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); + } + function constructYamlInteger(data) { + var value = data, sign = 1, ch, base, digits = []; + if (value.indexOf("_") !== -1) { + value = value.replace(/_/g, ""); + } + ch = value[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") + sign = -1; + value = value.slice(1); + ch = value[0]; + } + if (value === "0") + return 0; + if (ch === "0") { + if (value[1] === "b") + return sign * parseInt(value.slice(2), 2); + if (value[1] === "x") + return sign * parseInt(value, 16); + return sign * parseInt(value, 8); + } + if (value.indexOf(":") !== -1) { + value.split(":").forEach(function(v) { + digits.unshift(parseInt(v, 10)); + }); + value = 0; + base = 1; + digits.forEach(function(d) { + value += d * base; + base *= 60; + }); + return sign * value; + } + return sign * parseInt(value, 10); + } + function isInteger(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object)); + } + module2.exports = new Type("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function(obj) { + return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); + }, + octal: function(obj) { + return obj >= 0 ? "0" + obj.toString(8) : "-0" + obj.toString(8).slice(1); + }, + decimal: function(obj) { + return obj.toString(10); + }, + hexadecimal: function(obj) { + return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); + } + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] + } + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/float.js +var require_float2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/float.js"(exports2, module2) { + "use strict"; + var common = require_common6(); + var Type = require_type3(); + var YAML_FLOAT_PATTERN = new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); + function resolveYamlFloat(data) { + if (data === null) + return false; + if (!YAML_FLOAT_PATTERN.test(data) || data[data.length - 1] === "_") { + return false; + } + return true; + } + function constructYamlFloat(data) { + var value, sign, base, digits; + value = data.replace(/_/g, "").toLowerCase(); + sign = value[0] === "-" ? -1 : 1; + digits = []; + if ("+-".indexOf(value[0]) >= 0) { + value = value.slice(1); + } + if (value === ".inf") { + return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + } else if (value === ".nan") { + return NaN; + } else if (value.indexOf(":") >= 0) { + value.split(":").forEach(function(v) { + digits.unshift(parseFloat(v, 10)); + }); + value = 0; + base = 1; + digits.forEach(function(d) { + value += d * base; + base *= 60; + }); + return sign * value; + } + return sign * parseFloat(value, 10); + } + var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + function representYamlFloat(object, style) { + var res; + if (isNaN(object)) { + switch (style) { + case "lowercase": + return ".nan"; + case "uppercase": + return ".NAN"; + case "camelcase": + return ".NaN"; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return ".inf"; + case "uppercase": + return ".INF"; + case "camelcase": + return ".Inf"; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return "-.inf"; + case "uppercase": + return "-.INF"; + case "camelcase": + return "-.Inf"; + } + } else if (common.isNegativeZero(object)) { + return "-0.0"; + } + res = object.toString(10); + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; + } + function isFloat(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); + } + module2.exports = new Type("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: "lowercase" + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/json.js +var require_json2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/json.js"(exports2, module2) { + "use strict"; + var Schema = require_schema2(); + module2.exports = new Schema({ + include: [ + require_failsafe2() + ], + implicit: [ + require_null2(), + require_bool2(), + require_int2(), + require_float2() + ] + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/core.js +var require_core6 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/core.js"(exports2, module2) { + "use strict"; + var Schema = require_schema2(); + module2.exports = new Schema({ + include: [ + require_json2() + ] + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +var require_timestamp3 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/timestamp.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + var YAML_DATE_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"); + var YAML_TIMESTAMP_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"); + function resolveYamlTimestamp(data) { + if (data === null) + return false; + if (YAML_DATE_REGEXP.exec(data) !== null) + return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) + return true; + return false; + } + function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; + match = YAML_DATE_REGEXP.exec(data); + if (match === null) + match = YAML_TIMESTAMP_REGEXP.exec(data); + if (match === null) + throw new Error("Date resolve error"); + year = +match[1]; + month = +match[2] - 1; + day = +match[3]; + if (!match[4]) { + return new Date(Date.UTC(year, month, day)); + } + hour = +match[4]; + minute = +match[5]; + second = +match[6]; + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { + fraction += "0"; + } + fraction = +fraction; + } + if (match[9]) { + tz_hour = +match[10]; + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 6e4; + if (match[9] === "-") + delta = -delta; + } + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + if (delta) + date.setTime(date.getTime() - delta); + return date; + } + function representYamlTimestamp(object) { + return object.toISOString(); + } + module2.exports = new Type("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/merge.js +var require_merge5 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/merge.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + function resolveYamlMerge(data) { + return data === "<<" || data === null; + } + module2.exports = new Type("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/binary.js +var require_binary2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/binary.js"(exports2, module2) { + "use strict"; + var NodeBuffer; + try { + _require = require; + NodeBuffer = _require("buffer").Buffer; + } catch (__) { + } + var _require; + var Type = require_type3(); + var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; + function resolveYamlBinary(data) { + if (data === null) + return false; + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + if (code > 64) + continue; + if (code < 0) + return false; + bitlen += 6; + } + return bitlen % 8 === 0; + } + function constructYamlBinary(data) { + var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map = BASE64_MAP, bits = 0, result = []; + for (idx = 0; idx < max; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } + bits = bits << 6 | map.indexOf(input.charAt(idx)); + } + tailbits = max % 4 * 6; + if (tailbits === 0) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } else if (tailbits === 18) { + result.push(bits >> 10 & 255); + result.push(bits >> 2 & 255); + } else if (tailbits === 12) { + result.push(bits >> 4 & 255); + } + if (NodeBuffer) { + return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result); + } + return result; + } + function representYamlBinary(object) { + var result = "", bits = 0, idx, tail, max = object.length, map = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } + bits = (bits << 8) + object[idx]; + } + tail = max % 3; + if (tail === 0) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } else if (tail === 2) { + result += map[bits >> 10 & 63]; + result += map[bits >> 4 & 63]; + result += map[bits << 2 & 63]; + result += map[64]; + } else if (tail === 1) { + result += map[bits >> 2 & 63]; + result += map[bits << 4 & 63]; + result += map[64]; + result += map[64]; + } + return result; + } + function isBinary(object) { + return NodeBuffer && NodeBuffer.isBuffer(object); + } + module2.exports = new Type("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/omap.js +var require_omap2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/omap.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var _toString = Object.prototype.toString; + function resolveYamlOmap(data) { + if (data === null) + return true; + var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data; + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + if (_toString.call(pair) !== "[object Object]") + return false; + for (pairKey in pair) { + if (_hasOwnProperty.call(pair, pairKey)) { + if (!pairHasKey) + pairHasKey = true; + else + return false; + } + } + if (!pairHasKey) + return false; + if (objectKeys.indexOf(pairKey) === -1) + objectKeys.push(pairKey); + else + return false; + } + return true; + } + function constructYamlOmap(data) { + return data !== null ? data : []; + } + module2.exports = new Type("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap, + construct: constructYamlOmap + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/pairs.js +var require_pairs3 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/pairs.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + var _toString = Object.prototype.toString; + function resolveYamlPairs(data) { + if (data === null) + return true; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + if (_toString.call(pair) !== "[object Object]") + return false; + keys = Object.keys(pair); + if (keys.length !== 1) + return false; + result[index] = [keys[0], pair[keys[0]]]; + } + return true; + } + function constructYamlPairs(data) { + if (data === null) + return []; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + keys = Object.keys(pair); + result[index] = [keys[0], pair[keys[0]]]; + } + return result; + } + module2.exports = new Type("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs, + construct: constructYamlPairs + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/set.js +var require_set2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/set.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + function resolveYamlSet(data) { + if (data === null) + return true; + var key, object = data; + for (key in object) { + if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) + return false; + } + } + return true; + } + function constructYamlSet(data) { + return data !== null ? data : {}; + } + module2.exports = new Type("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet, + construct: constructYamlSet + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +var require_default_safe = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js"(exports2, module2) { + "use strict"; + var Schema = require_schema2(); + module2.exports = new Schema({ + include: [ + require_core6() + ], + implicit: [ + require_timestamp3(), + require_merge5() + ], + explicit: [ + require_binary2(), + require_omap2(), + require_pairs3(), + require_set2() + ] + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +var require_undefined = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + function resolveJavascriptUndefined() { + return true; + } + function constructJavascriptUndefined() { + return void 0; + } + function representJavascriptUndefined() { + return ""; + } + function isUndefined(object) { + return typeof object === "undefined"; + } + module2.exports = new Type("tag:yaml.org,2002:js/undefined", { + kind: "scalar", + resolve: resolveJavascriptUndefined, + construct: constructJavascriptUndefined, + predicate: isUndefined, + represent: representJavascriptUndefined + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +var require_regexp = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + function resolveJavascriptRegExp(data) { + if (data === null) + return false; + if (data.length === 0) + return false; + var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = ""; + if (regexp[0] === "/") { + if (tail) + modifiers = tail[1]; + if (modifiers.length > 3) + return false; + if (regexp[regexp.length - modifiers.length - 1] !== "/") + return false; + } + return true; + } + function constructJavascriptRegExp(data) { + var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = ""; + if (regexp[0] === "/") { + if (tail) + modifiers = tail[1]; + regexp = regexp.slice(1, regexp.length - modifiers.length - 1); + } + return new RegExp(regexp, modifiers); + } + function representJavascriptRegExp(object) { + var result = "/" + object.source + "/"; + if (object.global) + result += "g"; + if (object.multiline) + result += "m"; + if (object.ignoreCase) + result += "i"; + return result; + } + function isRegExp(object) { + return Object.prototype.toString.call(object) === "[object RegExp]"; + } + module2.exports = new Type("tag:yaml.org,2002:js/regexp", { + kind: "scalar", + resolve: resolveJavascriptRegExp, + construct: constructJavascriptRegExp, + predicate: isRegExp, + represent: representJavascriptRegExp + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/js/function.js +var require_function = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/js/function.js"(exports2, module2) { + "use strict"; + var esprima; + try { + _require = require; + esprima = _require("esprima"); + } catch (_) { + if (typeof window !== "undefined") + esprima = window.esprima; + } + var _require; + var Type = require_type3(); + function resolveJavascriptFunction(data) { + if (data === null) + return false; + try { + var source = "(" + data + ")", ast = esprima.parse(source, { range: true }); + if (ast.type !== "Program" || ast.body.length !== 1 || ast.body[0].type !== "ExpressionStatement" || ast.body[0].expression.type !== "ArrowFunctionExpression" && ast.body[0].expression.type !== "FunctionExpression") { + return false; + } + return true; + } catch (err) { + return false; + } + } + function constructJavascriptFunction(data) { + var source = "(" + data + ")", ast = esprima.parse(source, { range: true }), params = [], body; + if (ast.type !== "Program" || ast.body.length !== 1 || ast.body[0].type !== "ExpressionStatement" || ast.body[0].expression.type !== "ArrowFunctionExpression" && ast.body[0].expression.type !== "FunctionExpression") { + throw new Error("Failed to resolve function"); + } + ast.body[0].expression.params.forEach(function(param) { + params.push(param.name); + }); + body = ast.body[0].expression.body.range; + if (ast.body[0].expression.body.type === "BlockStatement") { + return new Function(params, source.slice(body[0] + 1, body[1] - 1)); + } + return new Function(params, "return " + source.slice(body[0], body[1])); + } + function representJavascriptFunction(object) { + return object.toString(); + } + function isFunction(object) { + return Object.prototype.toString.call(object) === "[object Function]"; + } + module2.exports = new Type("tag:yaml.org,2002:js/function", { + kind: "scalar", + resolve: resolveJavascriptFunction, + construct: constructJavascriptFunction, + predicate: isFunction, + represent: representJavascriptFunction + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +var require_default_full = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/default_full.js"(exports2, module2) { + "use strict"; + var Schema = require_schema2(); + module2.exports = Schema.DEFAULT = new Schema({ + include: [ + require_default_safe() + ], + explicit: [ + require_undefined(), + require_regexp(), + require_function() + ] + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/loader.js +var require_loader2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/loader.js"(exports2, module2) { + "use strict"; + var common = require_common6(); + var YAMLException = require_exception2(); + var Mark = require_mark(); + var DEFAULT_SAFE_SCHEMA = require_default_safe(); + var DEFAULT_FULL_SCHEMA = require_default_full(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CONTEXT_FLOW_IN = 1; + var CONTEXT_FLOW_OUT = 2; + var CONTEXT_BLOCK_IN = 3; + var CONTEXT_BLOCK_OUT = 4; + var CHOMPING_CLIP = 1; + var CHOMPING_STRIP = 2; + var CHOMPING_KEEP = 3; + var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; + var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; + var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; + var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + function _class(obj) { + return Object.prototype.toString.call(obj); + } + function is_EOL(c) { + return c === 10 || c === 13; + } + function is_WHITE_SPACE(c) { + return c === 9 || c === 32; + } + function is_WS_OR_EOL(c) { + return c === 9 || c === 32 || c === 10 || c === 13; + } + function is_FLOW_INDICATOR(c) { + return c === 44 || c === 91 || c === 93 || c === 123 || c === 125; + } + function fromHexCode(c) { + var lc; + if (48 <= c && c <= 57) { + return c - 48; + } + lc = c | 32; + if (97 <= lc && lc <= 102) { + return lc - 97 + 10; + } + return -1; + } + function escapedHexLen(c) { + if (c === 120) { + return 2; + } + if (c === 117) { + return 4; + } + if (c === 85) { + return 8; + } + return 0; + } + function fromDecimalCode(c) { + if (48 <= c && c <= 57) { + return c - 48; + } + return -1; + } + function simpleEscapeSequence(c) { + return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\x85" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : ""; + } + function charFromCodepoint(c) { + if (c <= 65535) { + return String.fromCharCode(c); + } + return String.fromCharCode((c - 65536 >> 10) + 55296, (c - 65536 & 1023) + 56320); + } + var simpleEscapeCheck = new Array(256); + var simpleEscapeMap = new Array(256); + for (i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); + } + var i; + function State(input, options) { + this.input = input; + this.filename = options["filename"] || null; + this.schema = options["schema"] || DEFAULT_FULL_SCHEMA; + this.onWarning = options["onWarning"] || null; + this.legacy = options["legacy"] || false; + this.json = options["json"] || false; + this.listener = options["listener"] || null; + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + this.documents = []; + } + function generateError(state, message2) { + return new YAMLException(message2, new Mark(state.filename, state.input, state.position, state.line, state.position - state.lineStart)); + } + function throwError(state, message2) { + throw generateError(state, message2); + } + function throwWarning(state, message2) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message2)); + } + } + var directiveHandlers = { + YAML: function handleYamlDirective(state, name, args2) { + var match, major, minor; + if (state.version !== null) { + throwError(state, "duplication of %YAML directive"); + } + if (args2.length !== 1) { + throwError(state, "YAML directive accepts exactly one argument"); + } + match = /^([0-9]+)\.([0-9]+)$/.exec(args2[0]); + if (match === null) { + throwError(state, "ill-formed argument of the YAML directive"); + } + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + if (major !== 1) { + throwError(state, "unacceptable YAML version of the document"); + } + state.version = args2[0]; + state.checkLineBreaks = minor < 2; + if (minor !== 1 && minor !== 2) { + throwWarning(state, "unsupported YAML version of the document"); + } + }, + TAG: function handleTagDirective(state, name, args2) { + var handle, prefix; + if (args2.length !== 2) { + throwError(state, "TAG directive accepts exactly two arguments"); + } + handle = args2[0]; + prefix = args2[1]; + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, "ill-formed tag handle (first argument) of the TAG directive"); + } + if (_hasOwnProperty.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, "ill-formed tag prefix (second argument) of the TAG directive"); + } + state.tagMap[handle] = prefix; + } + }; + function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + if (start < end) { + _result = state.input.slice(start, end); + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 9 || 32 <= _character && _character <= 1114111)) { + throwError(state, "expected valid JSON character"); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, "the stream contains non-printable characters"); + } + state.result += _result; + } + } + function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + if (!common.isObject(source)) { + throwError(state, "cannot merge mappings; the provided source object is unacceptable"); + } + sourceKeys = Object.keys(source); + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + if (!_hasOwnProperty.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } + } + function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) { + var index, quantity; + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state, "nested arrays are not supported inside keys"); + } + if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") { + keyNode[index] = "[object Object]"; + } + } + } + if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") { + keyNode = "[object Object]"; + } + keyNode = String(keyNode); + if (_result === null) { + _result = {}; + } + if (keyTag === "tag:yaml.org,2002:merge") { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) { + state.line = startLine || state.line; + state.position = startPos || state.position; + throwError(state, "duplicated mapping key"); + } + _result[keyNode] = valueNode; + delete overridableKeys[keyNode]; + } + return _result; + } + function readLineBreak(state) { + var ch; + ch = state.input.charCodeAt(state.position); + if (ch === 10) { + state.position++; + } else if (ch === 13) { + state.position++; + if (state.input.charCodeAt(state.position) === 10) { + state.position++; + } + } else { + throwError(state, "a line break is expected"); + } + state.line += 1; + state.lineStart = state.position; + } + function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (allowComments && ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 10 && ch !== 13 && ch !== 0); + } + if (is_EOL(ch)) { + readLineBreak(state); + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + while (ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, "deficient indentation"); + } + return lineBreaks; + } + function testDocumentSeparator(state) { + var _position = state.position, ch; + ch = state.input.charCodeAt(_position); + if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) { + _position += 3; + ch = state.input.charCodeAt(_position); + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + return false; + } + function writeFoldedLines(state, count) { + if (count === 1) { + state.result += " "; + } else if (count > 1) { + state.result += common.repeat("\n", count - 1); + } + } + function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch; + ch = state.input.charCodeAt(state.position); + if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) { + return false; + } + if (ch === 63 || ch === 45) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + state.kind = "scalar"; + state.result = ""; + captureStart = captureEnd = state.position; + hasPendingContent = false; + while (ch !== 0) { + if (ch === 58) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + } else if (ch === 35) { + preceding = state.input.charCodeAt(state.position - 1); + if (is_WS_OR_EOL(preceding)) { + break; + } + } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + ch = state.input.charCodeAt(++state.position); + } + captureSegment(state, captureStart, captureEnd, false); + if (state.result) { + return true; + } + state.kind = _kind; + state.result = _result; + return false; + } + function readSingleQuotedScalar(state, nodeIndent) { + var ch, captureStart, captureEnd; + ch = state.input.charCodeAt(state.position); + if (ch !== 39) { + return false; + } + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 39) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (ch === 39) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, "unexpected end of the document within a single quoted scalar"); + } else { + state.position++; + captureEnd = state.position; + } + } + throwError(state, "unexpected end of the stream within a single quoted scalar"); + } + function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, captureEnd, hexLength, hexResult, tmp, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 34) { + return false; + } + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 34) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + } else if (ch === 92) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + } else { + throwError(state, "expected hexadecimal character"); + } + } + state.result += charFromCodepoint(hexResult); + state.position++; + } else { + throwError(state, "unknown escape sequence"); + } + captureStart = captureEnd = state.position; + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, "unexpected end of the document within a double quoted scalar"); + } else { + state.position++; + captureEnd = state.position; + } + } + throwError(state, "unexpected end of the stream within a double quoted scalar"); + } + function readFlowCollection(state, nodeIndent) { + var readNext = true, _line, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = {}, keyNode, keyTag, valueNode, ch; + ch = state.input.charCodeAt(state.position); + if (ch === 91) { + terminator = 93; + isMapping = false; + _result = []; + } else if (ch === 123) { + terminator = 125; + isMapping = true; + _result = {}; + } else { + return false; + } + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(++state.position); + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? "mapping" : "sequence"; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, "missed comma between flow collection entries"); + } + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + if (ch === 63) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if ((isExplicitPair || state.line === _line) && ch === 58) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode)); + } else { + _result.push(keyNode); + } + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === 44) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + throwError(state, "unexpected end of the stream within a flow collection"); + } + function readBlockScalar(state, nodeIndent) { + var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch; + ch = state.input.charCodeAt(state.position); + if (ch === 124) { + folding = false; + } else if (ch === 62) { + folding = true; + } else { + return false; + } + state.kind = "scalar"; + state.result = ""; + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + if (ch === 43 || ch === 45) { + if (CHOMPING_CLIP === chomping) { + chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, "repeat of a chomping mode identifier"); + } + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one"); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, "repeat of an indentation width identifier"); + } + } else { + break; + } + } + if (is_WHITE_SPACE(ch)) { + do { + ch = state.input.charCodeAt(++state.position); + } while (is_WHITE_SPACE(ch)); + if (ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (!is_EOL(ch) && ch !== 0); + } + } + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + ch = state.input.charCodeAt(state.position); + while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + if (is_EOL(ch)) { + emptyLines++; + continue; + } + if (state.lineIndent < textIndent) { + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { + state.result += "\n"; + } + } + break; + } + if (folding) { + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat("\n", emptyLines + 1); + } else if (emptyLines === 0) { + if (didReadContent) { + state.result += " "; + } + } else { + state.result += common.repeat("\n", emptyLines); + } + } else { + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + while (!is_EOL(ch) && ch !== 0) { + ch = state.input.charCodeAt(++state.position); + } + captureSegment(state, captureStart, state.position, false); + } + return true; + } + function readBlockSequence(state, nodeIndent) { + var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + if (ch !== 45) { + break; + } + following = state.input.charCodeAt(state.position + 1); + if (!is_WS_OR_EOL(following)) { + break; + } + detected = true; + state.position++; + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { + throwError(state, "bad indentation of a sequence entry"); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "sequence"; + state.result = _result; + return true; + } + return false; + } + function readBlockMapping(state, nodeIndent, flowIndent) { + var following, allowCompact, _line, _pos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = {}, keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + following = state.input.charCodeAt(state.position + 1); + _line = state.line; + _pos = state.position; + if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) { + if (ch === 63) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = true; + allowCompact = true; + } else if (atExplicitKey) { + atExplicitKey = false; + allowCompact = true; + } else { + throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"); + } + state.position += 1; + ch = following; + } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (ch === 58) { + ch = state.input.charCodeAt(++state.position); + if (!is_WS_OR_EOL(ch)) { + throwError(state, "a whitespace character is expected after the key-value separator within a block mapping"); + } + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + } else if (detected) { + throwError(state, "can not read an implicit mapping pair; a colon is missed"); + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } else if (detected) { + throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key"); + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } else { + break; + } + if (state.line === _line || state.lineIndent > nodeIndent) { + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos); + keyTag = keyNode = valueNode = null; + } + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + if (state.lineIndent > nodeIndent && ch !== 0) { + throwError(state, "bad indentation of a mapping entry"); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "mapping"; + state.result = _result; + } + return detected; + } + function readTagProperty(state) { + var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 33) + return false; + if (state.tag !== null) { + throwError(state, "duplication of a tag property"); + } + ch = state.input.charCodeAt(++state.position); + if (ch === 60) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + } else if (ch === 33) { + isNamed = true; + tagHandle = "!!"; + ch = state.input.charCodeAt(++state.position); + } else { + tagHandle = "!"; + } + _position = state.position; + if (isVerbatim) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0 && ch !== 62); + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, "unexpected end of the stream within a verbatim tag"); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + if (ch === 33) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, "named tag handle cannot contain such characters"); + } + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, "tag suffix cannot contain exclamation marks"); + } + } + ch = state.input.charCodeAt(++state.position); + } + tagName = state.input.slice(_position, state.position); + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, "tag suffix cannot contain flow indicator characters"); + } + } + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, "tag name cannot contain such characters: " + tagName); + } + if (isVerbatim) { + state.tag = tagName; + } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + } else if (tagHandle === "!") { + state.tag = "!" + tagName; + } else if (tagHandle === "!!") { + state.tag = "tag:yaml.org,2002:" + tagName; + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + return true; + } + function readAnchorProperty(state) { + var _position, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 38) + return false; + if (state.anchor !== null) { + throwError(state, "duplication of an anchor property"); + } + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position === _position) { + throwError(state, "name of an anchor node must contain at least one character"); + } + state.anchor = state.input.slice(_position, state.position); + return true; + } + function readAlias(state) { + var _position, alias, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 42) + return false; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position === _position) { + throwError(state, "name of an alias node must contain at least one character"); + } + alias = state.input.slice(_position, state.position); + if (!_hasOwnProperty.call(state.anchorMap, alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; + } + function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, type, flowIndent, blockIndent; + if (state.listener !== null) { + state.listener("open", state); + } + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext; + if (allowToSeek) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + blockIndent = state.position - state.lineStart; + if (indentStatus === 1) { + if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + } else if (readAlias(state)) { + hasContent = true; + if (state.tag !== null || state.anchor !== null) { + throwError(state, "alias node should not have any properties"); + } + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + if (state.tag === null) { + state.tag = "?"; + } + } + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + if (state.tag !== null && state.tag !== "!") { + if (state.tag === "?") { + if (state.result !== null && state.kind !== "scalar") { + throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); + } + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + if (type.resolve(state.result)) { + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) { + type = state.typeMap[state.kind || "fallback"][state.tag]; + if (state.result !== null && type.kind !== state.kind) { + throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + if (!type.resolve(state.result)) { + throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag"); + } else { + state.result = type.construct(state.result); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else { + throwError(state, "unknown tag !<" + state.tag + ">"); + } + } + if (state.listener !== null) { + state.listener("close", state); + } + return state.tag !== null || state.anchor !== null || hasContent; + } + function readDocument(state) { + var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = {}; + state.anchorMap = {}; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if (state.lineIndent > 0 || ch !== 37) { + break; + } + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + if (directiveName.length < 1) { + throwError(state, "directive name must not be less than one character in length"); + } + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0 && !is_EOL(ch)); + break; + } + if (is_EOL(ch)) + break; + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveArgs.push(state.input.slice(_position, state.position)); + } + if (ch !== 0) + readLineBreak(state); + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + skipSeparationSpace(state, true, -1); + if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } else if (hasDirectives) { + throwError(state, "directives end mark is expected"); + } + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, "non-ASCII line breaks are interpreted as content"); + } + state.documents.push(state.result); + if (state.position === state.lineStart && testDocumentSeparator(state)) { + if (state.input.charCodeAt(state.position) === 46) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + if (state.position < state.length - 1) { + throwError(state, "end of the stream or a document separator is expected"); + } else { + return; + } + } + function loadDocuments(input, options) { + input = String(input); + options = options || {}; + if (input.length !== 0) { + if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) { + input += "\n"; + } + if (input.charCodeAt(0) === 65279) { + input = input.slice(1); + } + } + var state = new State(input, options); + var nullpos = input.indexOf("\0"); + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, "null byte is not allowed in input"); + } + state.input += "\0"; + while (state.input.charCodeAt(state.position) === 32) { + state.lineIndent += 1; + state.position += 1; + } + while (state.position < state.length - 1) { + readDocument(state); + } + return state.documents; + } + function loadAll(input, iterator, options) { + if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") { + options = iterator; + iterator = null; + } + var documents = loadDocuments(input, options); + if (typeof iterator !== "function") { + return documents; + } + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } + } + function load(input, options) { + var documents = loadDocuments(input, options); + if (documents.length === 0) { + return void 0; + } else if (documents.length === 1) { + return documents[0]; + } + throw new YAMLException("expected a single document in the stream, but found more"); + } + function safeLoadAll(input, iterator, options) { + if (typeof iterator === "object" && iterator !== null && typeof options === "undefined") { + options = iterator; + iterator = null; + } + return loadAll(input, iterator, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } + function safeLoad(input, options) { + return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } + module2.exports.loadAll = loadAll; + module2.exports.load = load; + module2.exports.safeLoadAll = safeLoadAll; + module2.exports.safeLoad = safeLoad; + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/dumper.js +var require_dumper2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/dumper.js"(exports2, module2) { + "use strict"; + var common = require_common6(); + var YAMLException = require_exception2(); + var DEFAULT_FULL_SCHEMA = require_default_full(); + var DEFAULT_SAFE_SCHEMA = require_default_safe(); + var _toString = Object.prototype.toString; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CHAR_TAB = 9; + var CHAR_LINE_FEED = 10; + var CHAR_CARRIAGE_RETURN = 13; + var CHAR_SPACE = 32; + var CHAR_EXCLAMATION = 33; + var CHAR_DOUBLE_QUOTE = 34; + var CHAR_SHARP = 35; + var CHAR_PERCENT = 37; + var CHAR_AMPERSAND = 38; + var CHAR_SINGLE_QUOTE = 39; + var CHAR_ASTERISK = 42; + var CHAR_COMMA = 44; + var CHAR_MINUS = 45; + var CHAR_COLON = 58; + var CHAR_EQUALS = 61; + var CHAR_GREATER_THAN = 62; + var CHAR_QUESTION = 63; + var CHAR_COMMERCIAL_AT = 64; + var CHAR_LEFT_SQUARE_BRACKET = 91; + var CHAR_RIGHT_SQUARE_BRACKET = 93; + var CHAR_GRAVE_ACCENT = 96; + var CHAR_LEFT_CURLY_BRACKET = 123; + var CHAR_VERTICAL_LINE = 124; + var CHAR_RIGHT_CURLY_BRACKET = 125; + var ESCAPE_SEQUENCES = {}; + ESCAPE_SEQUENCES[0] = "\\0"; + ESCAPE_SEQUENCES[7] = "\\a"; + ESCAPE_SEQUENCES[8] = "\\b"; + ESCAPE_SEQUENCES[9] = "\\t"; + ESCAPE_SEQUENCES[10] = "\\n"; + ESCAPE_SEQUENCES[11] = "\\v"; + ESCAPE_SEQUENCES[12] = "\\f"; + ESCAPE_SEQUENCES[13] = "\\r"; + ESCAPE_SEQUENCES[27] = "\\e"; + ESCAPE_SEQUENCES[34] = '\\"'; + ESCAPE_SEQUENCES[92] = "\\\\"; + ESCAPE_SEQUENCES[133] = "\\N"; + ESCAPE_SEQUENCES[160] = "\\_"; + ESCAPE_SEQUENCES[8232] = "\\L"; + ESCAPE_SEQUENCES[8233] = "\\P"; + var DEPRECATED_BOOLEANS_SYNTAX = [ + "y", + "Y", + "yes", + "Yes", + "YES", + "on", + "On", + "ON", + "n", + "N", + "no", + "No", + "NO", + "off", + "Off", + "OFF" + ]; + function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + if (map === null) + return {}; + result = {}; + keys = Object.keys(map); + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + if (tag.slice(0, 2) === "!!") { + tag = "tag:yaml.org,2002:" + tag.slice(2); + } + type = schema.compiledTypeMap["fallback"][tag]; + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + result[tag] = style; + } + return result; + } + function encodeHex(character) { + var string, handle, length; + string = character.toString(16).toUpperCase(); + if (character <= 255) { + handle = "x"; + length = 2; + } else if (character <= 65535) { + handle = "u"; + length = 4; + } else if (character <= 4294967295) { + handle = "U"; + length = 8; + } else { + throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF"); + } + return "\\" + handle + common.repeat("0", length - string.length) + string; + } + function State(options) { + this.schema = options["schema"] || DEFAULT_FULL_SCHEMA; + this.indent = Math.max(1, options["indent"] || 2); + this.noArrayIndent = options["noArrayIndent"] || false; + this.skipInvalid = options["skipInvalid"] || false; + this.flowLevel = common.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"]; + this.styleMap = compileStyleMap(this.schema, options["styles"] || null); + this.sortKeys = options["sortKeys"] || false; + this.lineWidth = options["lineWidth"] || 80; + this.noRefs = options["noRefs"] || false; + this.noCompatMode = options["noCompatMode"] || false; + this.condenseFlow = options["condenseFlow"] || false; + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + this.tag = null; + this.result = ""; + this.duplicates = []; + this.usedDuplicates = null; + } + function indentString(string, spaces) { + var ind = common.repeat(" ", spaces), position = 0, next = -1, result = "", line, length = string.length; + while (position < length) { + next = string.indexOf("\n", position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + if (line.length && line !== "\n") + result += ind; + result += line; + } + return result; + } + function generateNextLine(state, level) { + return "\n" + common.repeat(" ", state.indent * level); + } + function testImplicitResolving(state, str) { + var index, length, type; + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + if (type.resolve(str)) { + return true; + } + } + return false; + } + function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; + } + function isPrintable(c) { + return 32 <= c && c <= 126 || 161 <= c && c <= 55295 && c !== 8232 && c !== 8233 || 57344 <= c && c <= 65533 && c !== 65279 || 65536 <= c && c <= 1114111; + } + function isNsChar(c) { + return isPrintable(c) && !isWhitespace(c) && c !== 65279 && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED; + } + function isPlainSafe(c, prev) { + return isPrintable(c) && c !== 65279 && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_COLON && (c !== CHAR_SHARP || prev && isNsChar(prev)); + } + function isPlainSafeFirst(c) { + return isPrintable(c) && c !== 65279 && !isWhitespace(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT; + } + function needIndentIndicator(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); + } + var STYLE_PLAIN = 1; + var STYLE_SINGLE = 2; + var STYLE_LITERAL = 3; + var STYLE_FOLDED = 4; + var STYLE_DOUBLE = 5; + function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { + var i; + var char, prev_char; + var hasLineBreak = false; + var hasFoldableLine = false; + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; + var plain = isPlainSafeFirst(string.charCodeAt(0)) && !isWhitespace(string.charCodeAt(string.length - 1)); + if (singleLineOnly) { + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + prev_char = i > 0 ? string.charCodeAt(i - 1) : null; + plain = plain && isPlainSafe(char, prev_char); + } + } else { + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "; + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + prev_char = i > 0 ? string.charCodeAt(i - 1) : null; + plain = plain && isPlainSafe(char, prev_char); + } + hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "); + } + if (!hasLineBreak && !hasFoldableLine) { + return plain && !testAmbiguousType(string) ? STYLE_PLAIN : STYLE_SINGLE; + } + if (indentPerLevel > 9 && needIndentIndicator(string)) { + return STYLE_DOUBLE; + } + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; + } + function writeScalar(state, string, level, iskey) { + state.dump = function() { + if (string.length === 0) { + return "''"; + } + if (!state.noCompatMode && DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) { + return "'" + string + "'"; + } + var indent = state.indent * Math.max(1, level); + var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + var singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel; + function testAmbiguity(string2) { + return testImplicitResolving(state, string2); + } + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) { + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return "|" + blockHeader(string, state.indent) + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return ">" + blockHeader(string, state.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + default: + throw new YAMLException("impossible error: invalid scalar style"); + } + }(); + } + function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ""; + var clip = string[string.length - 1] === "\n"; + var keep = clip && (string[string.length - 2] === "\n" || string === "\n"); + var chomp = keep ? "+" : clip ? "" : "-"; + return indentIndicator + chomp + "\n"; + } + function dropEndingNewline(string) { + return string[string.length - 1] === "\n" ? string.slice(0, -1) : string; + } + function foldString(string, width) { + var lineRe = /(\n+)([^\n]*)/g; + var result = function() { + var nextLF = string.indexOf("\n"); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }(); + var prevMoreIndented = string[0] === "\n" || string[0] === " "; + var moreIndented; + var match; + while (match = lineRe.exec(string)) { + var prefix = match[1], line = match[2]; + moreIndented = line[0] === " "; + result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); + prevMoreIndented = moreIndented; + } + return result; + } + function foldLine(line, width) { + if (line === "" || line[0] === " ") + return line; + var breakRe = / [^ ]/g; + var match; + var start = 0, end, curr = 0, next = 0; + var result = ""; + while (match = breakRe.exec(line)) { + next = match.index; + if (next - start > width) { + end = curr > start ? curr : next; + result += "\n" + line.slice(start, end); + start = end + 1; + } + curr = next; + } + result += "\n"; + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + "\n" + line.slice(curr + 1); + } else { + result += line.slice(start); + } + return result.slice(1); + } + function escapeString(string) { + var result = ""; + var char, nextChar; + var escapeSeq; + for (var i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (char >= 55296 && char <= 56319) { + nextChar = string.charCodeAt(i + 1); + if (nextChar >= 56320 && nextChar <= 57343) { + result += encodeHex((char - 55296) * 1024 + nextChar - 56320 + 65536); + i++; + continue; + } + } + escapeSeq = ESCAPE_SEQUENCES[char]; + result += !escapeSeq && isPrintable(char) ? string[i] : escapeSeq || encodeHex(char); + } + return result; + } + function writeFlowSequence(state, level, object) { + var _result = "", _tag = state.tag, index, length; + for (index = 0, length = object.length; index < length; index += 1) { + if (writeNode(state, level, object[index], false, false)) { + if (index !== 0) + _result += "," + (!state.condenseFlow ? " " : ""); + _result += state.dump; + } + } + state.tag = _tag; + state.dump = "[" + _result + "]"; + } + function writeBlockSequence(state, level, object, compact) { + var _result = "", _tag = state.tag, index, length; + for (index = 0, length = object.length; index < length; index += 1) { + if (writeNode(state, level + 1, object[index], true, true)) { + if (!compact || index !== 0) { + _result += generateNextLine(state, level); + } + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += "-"; + } else { + _result += "- "; + } + _result += state.dump; + } + } + state.tag = _tag; + state.dump = _result || "[]"; + } + function writeFlowMapping(state, level, object) { + var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer; + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ""; + if (index !== 0) + pairBuffer += ", "; + if (state.condenseFlow) + pairBuffer += '"'; + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (!writeNode(state, level, objectKey, false, false)) { + continue; + } + if (state.dump.length > 1024) + pairBuffer += "? "; + pairBuffer += state.dump + (state.condenseFlow ? '"' : "") + ":" + (state.condenseFlow ? "" : " "); + if (!writeNode(state, level, objectValue, false, false)) { + continue; + } + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = "{" + _result + "}"; + } + function writeBlockMapping(state, level, object, compact) { + var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer; + if (state.sortKeys === true) { + objectKeyList.sort(); + } else if (typeof state.sortKeys === "function") { + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + throw new YAMLException("sortKeys must be a boolean or a function"); + } + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ""; + if (!compact || index !== 0) { + pairBuffer += generateNextLine(state, level); + } + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; + } + explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024; + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += "?"; + } else { + pairBuffer += "? "; + } + } + pairBuffer += state.dump; + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; + } + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ":"; + } else { + pairBuffer += ": "; + } + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = _result || "{}"; + } + function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + typeList = explicit ? state.explicitTypes : state.implicitTypes; + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) { + state.tag = explicit ? type.tag : "?"; + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + if (_toString.call(type.represent) === "[object Function]") { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new YAMLException("!<" + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + state.dump = _result; + } + return true; + } + } + return false; + } + function writeNode(state, level, object, block, compact, iskey) { + state.tag = null; + state.dump = object; + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + var type = _toString.call(state.dump); + if (block) { + block = state.flowLevel < 0 || state.flowLevel > level; + } + var objectOrArray = type === "[object Object]" || type === "[object Array]", duplicateIndex, duplicate; + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) { + compact = false; + } + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = "*ref_" + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === "[object Object]") { + if (block && Object.keys(state.dump).length !== 0) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + } + } else if (type === "[object Array]") { + var arrayLevel = state.noArrayIndent && level > 0 ? level - 1 : level; + if (block && state.dump.length !== 0) { + writeBlockSequence(state, arrayLevel, state.dump, compact); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, arrayLevel, state.dump); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + } + } else if (type === "[object String]") { + if (state.tag !== "?") { + writeScalar(state, state.dump, level, iskey); + } + } else { + if (state.skipInvalid) + return false; + throw new YAMLException("unacceptable kind of an object to dump " + type); + } + if (state.tag !== null && state.tag !== "?") { + state.dump = "!<" + state.tag + "> " + state.dump; + } + } + return true; + } + function getDuplicateReferences(object, state) { + var objects = [], duplicatesIndexes = [], index, length; + inspectNode(object, objects, duplicatesIndexes); + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); + } + function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, index, length; + if (object !== null && typeof object === "object") { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } + } + function dump(input, options) { + options = options || {}; + var state = new State(options); + if (!state.noRefs) + getDuplicateReferences(input, state); + if (writeNode(state, 0, input, true, true)) + return state.dump + "\n"; + return ""; + } + function safeDump(input, options) { + return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } + module2.exports.dump = dump; + module2.exports.safeDump = safeDump; + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml.js +var require_js_yaml2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml.js"(exports2, module2) { + "use strict"; + var loader = require_loader2(); + var dumper = require_dumper2(); + function deprecated(name) { + return function() { + throw new Error("Function " + name + " is deprecated and cannot be used."); + }; + } + module2.exports.Type = require_type3(); + module2.exports.Schema = require_schema2(); + module2.exports.FAILSAFE_SCHEMA = require_failsafe2(); + module2.exports.JSON_SCHEMA = require_json2(); + module2.exports.CORE_SCHEMA = require_core6(); + module2.exports.DEFAULT_SAFE_SCHEMA = require_default_safe(); + module2.exports.DEFAULT_FULL_SCHEMA = require_default_full(); + module2.exports.load = loader.load; + module2.exports.loadAll = loader.loadAll; + module2.exports.safeLoad = loader.safeLoad; + module2.exports.safeLoadAll = loader.safeLoadAll; + module2.exports.dump = dumper.dump; + module2.exports.safeDump = dumper.safeDump; + module2.exports.YAMLException = require_exception2(); + module2.exports.MINIMAL_SCHEMA = require_failsafe2(); + module2.exports.SAFE_SCHEMA = require_default_safe(); + module2.exports.DEFAULT_SCHEMA = require_default_full(); + module2.exports.scan = deprecated("scan"); + module2.exports.parse = deprecated("parse"); + module2.exports.compose = deprecated("compose"); + module2.exports.addConstructor = deprecated("addConstructor"); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/index.js +var require_js_yaml3 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/index.js"(exports2, module2) { + "use strict"; + var yaml = require_js_yaml2(); + module2.exports = yaml; + } +}); + +// ../../node_modules/.pnpm/load-yaml-file@0.2.0/node_modules/load-yaml-file/index.js +var require_load_yaml_file = __commonJS({ + "../../node_modules/.pnpm/load-yaml-file@0.2.0/node_modules/load-yaml-file/index.js"(exports2, module2) { + "use strict"; + var fs = require_graceful_fs(); + var pify = require_pify(); + var stripBom = require_strip_bom2(); + var yaml = require_js_yaml3(); + var parse = (data) => yaml.safeLoad(stripBom(data)); + module2.exports = (fp) => pify(fs.readFile)(fp, "utf8").then((data) => parse(data)); + module2.exports.sync = (fp) => parse(fs.readFileSync(fp, "utf8")); + } +}); + +// ../../node_modules/.pnpm/which-pm@2.0.0/node_modules/which-pm/index.js +var require_which_pm = __commonJS({ + "../../node_modules/.pnpm/which-pm@2.0.0/node_modules/which-pm/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var pathExists = require_path_exists(); + var loadYamlFile = require_load_yaml_file(); + module2.exports = async function(pkgPath) { + const modulesPath = path.join(pkgPath, "node_modules"); + const exists = await pathExists(path.join(modulesPath, ".yarn-integrity")); + if (exists) + return { name: "yarn" }; + try { + const modules = await loadYamlFile(path.join(modulesPath, ".modules.yaml")); + return toNameAndVersion(modules.packageManager); + } catch (err) { + if (err.code !== "ENOENT") + throw err; + } + const modulesExists = await pathExists(modulesPath); + return modulesExists ? { name: "npm" } : null; + }; + function toNameAndVersion(pkgSpec) { + if (pkgSpec[0] === "@") { + const woPrefix = pkgSpec.substr(1); + const parts2 = woPrefix.split("@"); + return { + name: `@${parts2[0]}`, + version: parts2[1] + }; + } + const parts = pkgSpec.split("@"); + return { + name: parts[0], + version: parts[1] + }; + } + } +}); + +// ../../node_modules/.pnpm/preferred-pm@3.0.3/node_modules/preferred-pm/index.js +var require_preferred_pm = __commonJS({ + "../../node_modules/.pnpm/preferred-pm@3.0.3/node_modules/preferred-pm/index.js"(exports2, module2) { + "use strict"; + var findYarnWorkspaceRoot = require_find_yarn_workspace_root2(); + var findUp = require_find_up(); + var path = require("path"); + var pathExists = require_path_exists(); + var whichPM = require_which_pm(); + module2.exports = async function preferredPM(pkgPath) { + if (typeof pkgPath !== "string") { + throw new TypeError(`pkgPath should be a string, got ${typeof pkgPath}`); + } + if (await pathExists(path.join(pkgPath, "package-lock.json"))) { + return { + name: "npm", + version: ">=5" + }; + } + if (await pathExists(path.join(pkgPath, "yarn.lock"))) { + return { + name: "yarn", + version: "*" + }; + } + if (await pathExists(path.join(pkgPath, "pnpm-lock.yaml"))) { + return { + name: "pnpm", + version: ">=3" + }; + } + if (await pathExists(path.join(pkgPath, "shrinkwrap.yaml"))) { + return { + name: "pnpm", + version: "1 || 2" + }; + } + if (await findUp("pnpm-lock.yaml", { cwd: pkgPath })) { + return { + name: "pnpm", + version: ">=3" + }; + } + try { + if (typeof findYarnWorkspaceRoot(pkgPath) === "string") { + return { + name: "yarn", + version: "*" + }; + } + } catch (err) { + } + const pm = await whichPM(pkgPath); + return pm && { name: pm.name, version: pm.version || "*" }; + }; + } +}); + +// ../prepare-package/lib/index.js +var require_lib39 = __commonJS({ + "../prepare-package/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var read_package_json_1 = require_lib32(); + var rimraf_1 = __importDefault(require_rimraf()); + var execa_1 = __importDefault(require_lib26()); + var preferred_pm_1 = __importDefault(require_preferred_pm()); + async function preparePackage(pkgDir) { + var _a, _b, _c; + const manifest = await read_package_json_1.fromDir(pkgDir); + if (((_a = manifest.scripts) === null || _a === void 0 ? void 0 : _a.prepare) != null && manifest.scripts.prepare !== "") { + const pm = (_c = (_b = await preferred_pm_1.default(pkgDir)) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : "npm"; + await execa_1.default(pm, ["install"], { cwd: pkgDir }); + await rimraf_1.default(path_1.default.join(pkgDir, "node_modules")); + } + } + exports2.default = preparePackage; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/omit.js +var require_omit = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/omit.js"(exports2, module2) { + var _curry2 = require_curry2(); + var omit = /* @__PURE__ */ _curry2(function omit2(names, obj) { + var result = {}; + var index = {}; + var idx = 0; + var len = names.length; + while (idx < len) { + index[names[idx]] = 1; + idx += 1; + } + for (var prop in obj) { + if (!index.hasOwnProperty(prop)) { + result[prop] = obj[prop]; + } + } + return result; + }); + module2.exports = omit; + } +}); + +// ../tarball-fetcher/lib/errorTypes/BadTarballError.js +var require_BadTarballError = __commonJS({ + "../tarball-fetcher/lib/errorTypes/BadTarballError.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var BadTarballError = class extends error_1.default { + constructor(opts) { + const message2 = `Actual size (${opts.receivedSize}) of tarball (${opts.tarballUrl}) did not match the one specified in 'Content-Length' header (${opts.expectedSize})`; + super("BAD_TARBALL_SIZE", message2, { + attempts: opts === null || opts === void 0 ? void 0 : opts.attempts + }); + this.expectedSize = opts.expectedSize; + this.receivedSize = opts.receivedSize; + } + }; + exports2.default = BadTarballError; + } +}); + +// ../tarball-fetcher/lib/errorTypes/index.js +var require_errorTypes = __commonJS({ + "../tarball-fetcher/lib/errorTypes/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BadTarballError = void 0; + var BadTarballError_1 = __importDefault(require_BadTarballError()); + exports2.BadTarballError = BadTarballError_1.default; + } +}); + +// ../tarball-fetcher/lib/createDownloader.js +var require_createDownloader = __commonJS({ + "../tarball-fetcher/lib/createDownloader.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.waitForFilesIndex = exports2.TarballIntegrityError = void 0; + var url_1 = __importDefault(require("url")); + var core_loggers_1 = require_lib12(); + var error_1 = __importStar2(require_lib8()); + var prepare_package_1 = __importDefault(require_lib39()); + var retry = __importStar2(require_retry2()); + var fromPairs_1 = __importDefault(require_fromPairs()); + var omit_1 = __importDefault(require_omit()); + var ssri_1 = __importDefault(require_ssri()); + var errorTypes_1 = require_errorTypes(); + var BIG_TARBALL_SIZE = 1024 * 1024 * 5; + var TarballIntegrityError = class extends error_1.default { + constructor(opts) { + super("TARBALL_INTEGRITY", `Got unexpected checksum for "${opts.url}". Wanted "${opts.expected}". Got "${opts.found}".`, { attempts: opts.attempts }); + this.found = opts.found; + this.expected = opts.expected; + this.algorithm = opts.algorithm; + this.sri = opts.sri; + this.url = opts.url; + } + }; + exports2.TarballIntegrityError = TarballIntegrityError; + exports2.default = (fetchFromRegistry, gotOpts) => { + const retryOpts = { + factor: 10, + maxTimeout: 6e4, + minTimeout: 1e4, + retries: 2, + ...gotOpts.retry + }; + return async function download(url, opts) { + const shouldAuth = opts.auth != null && (opts.auth.alwaysAuth === true || !opts.registry || new url_1.default.URL(url).host === new url_1.default.URL(opts.registry).host); + const op = retry.operation(retryOpts); + return new Promise((resolve, reject) => { + op.attempt(async (attempt) => { + var _a, _b; + try { + resolve(await fetch(attempt)); + } catch (error) { + if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 401 || ((_b = error.response) === null || _b === void 0 ? void 0 : _b.status) === 403) { + reject(error); + } + const timeout = op.retry(error); + if (timeout === false) { + reject(op.mainError()); + return; + } + core_loggers_1.requestRetryLogger.debug({ + attempt, + error, + maxRetries: retryOpts.retries, + method: "GET", + timeout, + url + }); + } + }); + }); + async function fetch(currentAttempt) { + var _a; + try { + const authHeaderValue = shouldAuth ? (_a = opts.auth) === null || _a === void 0 ? void 0 : _a.authHeaderValue : void 0; + const res = await fetchFromRegistry(url, { + authHeaderValue, + retry: { retries: 0 }, + timeout: gotOpts.timeout + }); + if (res.status !== 200) { + throw new error_1.FetchError({ url, authHeaderValue }, res); + } + const contentLength = res.headers.has("content-length") && res.headers.get("content-length"); + const size = typeof contentLength === "string" ? parseInt(contentLength, 10) : null; + if (opts.onStart != null) { + opts.onStart(size, currentAttempt); + } + const onProgress = size != null && size >= BIG_TARBALL_SIZE ? opts.onProgress : void 0; + let downloaded = 0; + res.body.on("data", (chunk) => { + downloaded += chunk.length; + if (onProgress != null) + onProgress(downloaded); + }); + return await new Promise(async (resolve, reject) => { + const stream = res.body.on("error", reject); + try { + const [integrityCheckResult, filesIndex] = await Promise.all([ + opts.integrity ? safeCheckStream(res.body, opts.integrity, url) : true, + opts.cafs.addFilesFromTarball(res.body, opts.manifest), + waitTillClosed({ stream, size, getDownloaded: () => downloaded, url }) + ]); + if (integrityCheckResult !== true) { + throw integrityCheckResult; + } + if (!isGitHostedPkgUrl(url)) { + resolve({ filesIndex }); + return; + } + resolve({ filesIndex: await prepareGitHostedPkg(filesIndex, opts.cafs) }); + } catch (err) { + reject(err); + } + }); + } catch (err) { + err.attempts = currentAttempt; + err.resource = url; + throw err; + } + } + }; + }; + function isGitHostedPkgUrl(url) { + return (url.startsWith("https://codeload.github.com/") || url.startsWith("https://bitbucket.org/") || url.startsWith("https://gitlab.com/")) && url.includes("tar.gz"); + } + async function waitForFilesIndex(filesIndex) { + return fromPairs_1.default(await Promise.all(Object.entries(filesIndex).map(async ([fileName, fileInfo]) => { + const { integrity, checkedAt } = await fileInfo.writeResult; + return [ + fileName, + { + ...omit_1.default(["writeResult"], fileInfo), + checkedAt, + integrity: integrity.toString() + } + ]; + }))); + } + exports2.waitForFilesIndex = waitForFilesIndex; + async function prepareGitHostedPkg(filesIndex, cafs) { + const tempLocation = await cafs.tempDir(); + await cafs.importPackage(tempLocation, { + filesResponse: { + filesIndex: await waitForFilesIndex(filesIndex), + fromStore: false + }, + force: true + }); + await prepare_package_1.default(tempLocation); + const newFilesIndex = await cafs.addFilesFromDir(tempLocation); + return newFilesIndex; + } + async function safeCheckStream(stream, integrity, url) { + try { + await ssri_1.default.checkStream(stream, integrity); + return true; + } catch (err) { + return new TarballIntegrityError({ + algorithm: err["algorithm"], + expected: err["expected"], + found: err["found"], + sri: err["sri"], + url + }); + } + } + async function waitTillClosed(opts) { + return new Promise((resolve, reject) => { + opts.stream.on("end", () => { + const downloaded = opts.getDownloaded(); + if (opts.size !== null && opts.size !== downloaded) { + const err = new errorTypes_1.BadTarballError({ + expectedSize: opts.size, + receivedSize: downloaded, + tarballUrl: opts.url + }); + reject(err); + return; + } + resolve(); + }); + }); + } + } +}); + +// ../tarball-fetcher/lib/index.js +var require_lib40 = __commonJS({ + "../tarball-fetcher/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.waitForFilesIndex = exports2.TarballIntegrityError = exports2.BadTarballError = void 0; + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var graceful_fs_1 = __importDefault(require_lib18()); + var ssri_1 = __importDefault(require_ssri()); + var createDownloader_1 = __importStar2(require_createDownloader()); + Object.defineProperty(exports2, "TarballIntegrityError", { enumerable: true, get: function() { + return createDownloader_1.TarballIntegrityError; + } }); + Object.defineProperty(exports2, "waitForFilesIndex", { enumerable: true, get: function() { + return createDownloader_1.waitForFilesIndex; + } }); + var errorTypes_1 = require_errorTypes(); + Object.defineProperty(exports2, "BadTarballError", { enumerable: true, get: function() { + return errorTypes_1.BadTarballError; + } }); + function default_1(fetchFromRegistry, getCredentials, opts) { + const download = createDownloader_1.default(fetchFromRegistry, { + retry: opts.retry, + timeout: opts.timeout + }); + return { + tarball: fetchFromTarball.bind(null, { + download, + getCredentialsByURI: getCredentials, + offline: opts.offline + }) + }; + } + exports2.default = default_1; + async function fetchFromTarball(ctx, cafs, resolution, opts) { + if (resolution.tarball.startsWith("file:")) { + const tarball = resolvePath(opts.lockfileDir, resolution.tarball.slice(5)); + return fetchFromLocalTarball(cafs, tarball, { + integrity: resolution.integrity, + manifest: opts.manifest + }); + } + if (ctx.offline) { + throw new error_1.default("NO_OFFLINE_TARBALL", `A package is missing from the store but cannot download it in offline mode. The missing package may be downloaded from ${resolution.tarball}.`); + } + const auth = resolution.registry ? ctx.getCredentialsByURI(resolution.registry) : void 0; + return ctx.download(resolution.tarball, { + auth, + cafs, + integrity: resolution.integrity, + manifest: opts.manifest, + onProgress: opts.onProgress, + onStart: opts.onStart, + registry: resolution.registry + }); + } + var isAbsolutePath = /^[/]|^[A-Za-z]:/; + function resolvePath(where, spec) { + if (isAbsolutePath.test(spec)) + return spec; + return path_1.default.resolve(where, spec); + } + async function fetchFromLocalTarball(cafs, tarball, opts) { + try { + const tarballStream = graceful_fs_1.default.createReadStream(tarball); + const [fetchResult] = await Promise.all([ + cafs.addFilesFromTarball(tarballStream, opts.manifest), + opts.integrity && ssri_1.default.checkStream(tarballStream, opts.integrity) + ]); + return { filesIndex: fetchResult }; + } catch (err) { + const error = new createDownloader_1.TarballIntegrityError({ + attempts: 1, + algorithm: err["algorithm"], + expected: err["expected"], + found: err["found"], + sri: err["sri"], + url: tarball + }); + error["resource"] = tarball; + throw error; + } + } + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/fileSystem.js +var require_fileSystem = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/fileSystem.js"(exports2) { + exports2.require = function() { + if (typeof process === "object" && process.versions && process.versions["electron"]) { + try { + const originalFs = require("original-fs"); + if (Object.keys(originalFs).length > 0) { + return originalFs; + } + } catch (e) { + } + } + return require("fs"); + }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/constants.js +var require_constants9 = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/constants.js"(exports2, module2) { + module2.exports = { + LOCHDR: 30, + LOCSIG: 67324752, + LOCVER: 4, + LOCFLG: 6, + LOCHOW: 8, + LOCTIM: 10, + LOCCRC: 14, + LOCSIZ: 18, + LOCLEN: 22, + LOCNAM: 26, + LOCEXT: 28, + EXTSIG: 134695760, + EXTHDR: 16, + EXTCRC: 4, + EXTSIZ: 8, + EXTLEN: 12, + CENHDR: 46, + CENSIG: 33639248, + CENVEM: 4, + CENVER: 6, + CENFLG: 8, + CENHOW: 10, + CENTIM: 12, + CENCRC: 16, + CENSIZ: 20, + CENLEN: 24, + CENNAM: 28, + CENEXT: 30, + CENCOM: 32, + CENDSK: 34, + CENATT: 36, + CENATX: 38, + CENOFF: 42, + ENDHDR: 22, + ENDSIG: 101010256, + ENDSUB: 8, + ENDTOT: 10, + ENDSIZ: 12, + ENDOFF: 16, + ENDCOM: 20, + END64HDR: 20, + END64SIG: 117853008, + END64START: 4, + END64OFF: 8, + END64NUMDISKS: 16, + ZIP64SIG: 101075792, + ZIP64HDR: 56, + ZIP64LEAD: 12, + ZIP64SIZE: 4, + ZIP64VEM: 12, + ZIP64VER: 14, + ZIP64DSK: 16, + ZIP64DSKDIR: 20, + ZIP64SUB: 24, + ZIP64TOT: 32, + ZIP64SIZB: 40, + ZIP64OFF: 48, + ZIP64EXTRA: 56, + STORED: 0, + SHRUNK: 1, + REDUCED1: 2, + REDUCED2: 3, + REDUCED3: 4, + REDUCED4: 5, + IMPLODED: 6, + DEFLATED: 8, + ENHANCED_DEFLATED: 9, + PKWARE: 10, + BZIP2: 12, + LZMA: 14, + IBM_TERSE: 18, + IBM_LZ77: 19, + AES_ENCRYPT: 99, + FLG_ENC: 1, + FLG_COMP1: 2, + FLG_COMP2: 4, + FLG_DESC: 8, + FLG_ENH: 16, + FLG_PATCH: 32, + FLG_STR: 64, + FLG_EFS: 2048, + FLG_MSK: 4096, + FILE: 2, + BUFFER: 1, + NONE: 0, + EF_ID: 0, + EF_SIZE: 2, + ID_ZIP64: 1, + ID_AVINFO: 7, + ID_PFS: 8, + ID_OS2: 9, + ID_NTFS: 10, + ID_OPENVMS: 12, + ID_UNIX: 13, + ID_FORK: 14, + ID_PATCH: 15, + ID_X509_PKCS7: 20, + ID_X509_CERTID_F: 21, + ID_X509_CERTID_C: 22, + ID_STRONGENC: 23, + ID_RECORD_MGT: 24, + ID_X509_PKCS7_RL: 25, + ID_IBM1: 101, + ID_IBM2: 102, + ID_POSZIP: 18064, + EF_ZIP64_OR_32: 4294967295, + EF_ZIP64_OR_16: 65535, + EF_ZIP64_SUNCOMP: 0, + EF_ZIP64_SCOMP: 8, + EF_ZIP64_RHO: 16, + EF_ZIP64_DSN: 24 + }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/utils.js +var require_utils8 = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/utils.js"(exports2, module2) { + var fs = require_fileSystem().require(); + var pth = require("path"); + var Constants = require_constants9(); + var isWin = typeof process === "object" && process.platform === "win32"; + module2.exports = function() { + const crcTable = []; + const PATH_SEPARATOR = pth.sep; + function genCRCTable() { + for (let n = 0; n < 256; n++) { + let c = n; + for (let k = 8; --k >= 0; ) + if ((c & 1) !== 0) { + c = 3988292384 ^ c >>> 1; + } else { + c = c >>> 1; + } + crcTable[n] = c >>> 0; + } + } + function mkdirSync(path) { + var resolvedPath = path.split(PATH_SEPARATOR)[0]; + path.split(PATH_SEPARATOR).forEach(function(name) { + if (!name || name.substr(-1, 1) === ":") + return; + resolvedPath += PATH_SEPARATOR + name; + var stat; + try { + stat = fs.statSync(resolvedPath); + } catch (e) { + fs.mkdirSync(resolvedPath); + } + if (stat && stat.isFile()) + throw Errors.FILE_IN_THE_WAY.replace("%s", resolvedPath); + }); + } + function findSync(dir, pattern, recoursive) { + if (typeof pattern === "boolean") { + recoursive = pattern; + pattern = void 0; + } + var files = []; + fs.readdirSync(dir).forEach(function(file) { + var path = pth.join(dir, file); + if (fs.statSync(path).isDirectory() && recoursive) + files = files.concat(findSync(path, pattern, recoursive)); + if (!pattern || pattern.test(path)) { + files.push(pth.normalize(path) + (fs.statSync(path).isDirectory() ? PATH_SEPARATOR : "")); + } + }); + return files; + } + function readBigUInt64LE(buffer, index) { + var slice = Buffer.from(buffer.slice(index, index + 8)); + slice.swap64(); + return parseInt(`0x${slice.toString("hex")}`); + } + return { + makeDir: function(path) { + mkdirSync(path); + }, + crc32: function(buf) { + if (typeof buf === "string") { + buf = Buffer.from(buf, "utf8"); + } + if (!crcTable.length) + genCRCTable(); + let off = 0; + let len = buf.length; + let crc = ~0; + while (--len >= 0) + crc = crcTable[(crc ^ buf[off++]) & 255] ^ crc >>> 8; + return ~crc >>> 0; + }, + methodToString: function(method) { + switch (method) { + case Constants.STORED: + return "STORED (" + method + ")"; + case Constants.DEFLATED: + return "DEFLATED (" + method + ")"; + default: + return "UNSUPPORTED (" + method + ")"; + } + }, + writeFileTo: function(path, content, overwrite, attr) { + if (fs.existsSync(path)) { + if (!overwrite) + return false; + var stat = fs.statSync(path); + if (stat.isDirectory()) { + return false; + } + } + var folder = pth.dirname(path); + if (!fs.existsSync(folder)) { + mkdirSync(folder); + } + var fd; + try { + fd = fs.openSync(path, "w", 438); + } catch (e) { + fs.chmodSync(path, 438); + fd = fs.openSync(path, "w", 438); + } + if (fd) { + try { + fs.writeSync(fd, content, 0, content.length, 0); + } finally { + fs.closeSync(fd); + } + } + fs.chmodSync(path, attr || 438); + return true; + }, + canonical: function(p) { + if (!p) + return ""; + var safeSuffix = pth.posix.normalize("/" + p.split("\\").join("/")); + return pth.join(".", safeSuffix); + }, + sanitize: function(prefix, name) { + prefix = pth.resolve(pth.normalize(prefix)); + var parts = name.split("/"); + for (var i = 0, l = parts.length; i < l; i++) { + var path = pth.normalize(pth.join(prefix, parts.slice(i, l).join(pth.sep))); + if (path.indexOf(prefix) === 0) { + return path; + } + } + return pth.normalize(pth.join(prefix, pth.basename(name))); + }, + writeFileToAsync: function(path, content, overwrite, attr, callback) { + if (typeof attr === "function") { + callback = attr; + attr = void 0; + } + fs.exists(path, function(exist) { + if (exist && !overwrite) + return callback(false); + fs.stat(path, function(err, stat) { + if (exist && stat.isDirectory()) { + return callback(false); + } + var folder = pth.dirname(path); + fs.exists(folder, function(exists) { + if (!exists) + mkdirSync(folder); + fs.open(path, "w", 438, function(err2, fd) { + if (err2) { + fs.chmod(path, 438, function() { + fs.open(path, "w", 438, function(err3, fd2) { + fs.write(fd2, content, 0, content.length, 0, function() { + fs.close(fd2, function() { + fs.chmod(path, attr || 438, function() { + callback(true); + }); + }); + }); + }); + }); + } else if (fd) { + fs.write(fd, content, 0, content.length, 0, function() { + fs.close(fd, function() { + fs.chmod(path, attr || 438, function() { + callback(true); + }); + }); + }); + } else { + fs.chmod(path, attr || 438, function() { + callback(true); + }); + } + }); + }); + }); + }); + }, + findFiles: function(path) { + return findSync(path, true); + }, + getAttributes: function() { + }, + setAttributes: function() { + }, + toBuffer: function(input) { + if (Buffer.isBuffer(input)) { + return input; + } else if (input instanceof Uint8Array) { + return Buffer.from(input); + } else { + return typeof input === "string" ? Buffer.from(input, "utf8") : Buffer.alloc(0); + } + }, + isWin, + readBigUInt64LE + }; + }(); + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/errors.js +var require_errors2 = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/errors.js"(exports2, module2) { + module2.exports = { + INVALID_LOC: "Invalid LOC header (bad signature)", + INVALID_CEN: "Invalid CEN header (bad signature)", + INVALID_END: "Invalid END header (bad signature)", + NO_DATA: "Nothing to decompress", + BAD_CRC: "CRC32 checksum failed", + FILE_IN_THE_WAY: "There is a file in the way: %s", + UNKNOWN_METHOD: "Invalid/unsupported compression method", + AVAIL_DATA: "inflate::Available inflate data did not terminate", + INVALID_DISTANCE: "inflate::Invalid literal/length or distance code in fixed or dynamic block", + TO_MANY_CODES: "inflate::Dynamic block code description: too many length or distance codes", + INVALID_REPEAT_LEN: "inflate::Dynamic block code description: repeat more than specified lengths", + INVALID_REPEAT_FIRST: "inflate::Dynamic block code description: repeat lengths with no first length", + INCOMPLETE_CODES: "inflate::Dynamic block code description: code lengths codes incomplete", + INVALID_DYN_DISTANCE: "inflate::Dynamic block code description: invalid distance code lengths", + INVALID_CODES_LEN: "inflate::Dynamic block code description: invalid literal/length code lengths", + INVALID_STORE_BLOCK: "inflate::Stored block length did not match one's complement", + INVALID_BLOCK_TYPE: "inflate::Invalid block type (type == 3)", + CANT_EXTRACT_FILE: "Could not extract the file", + CANT_OVERRIDE: "Target file already exists", + NO_ZIP: "No zip file was loaded", + NO_ENTRY: "Entry doesn't exist", + DIRECTORY_CONTENT_ERROR: "A directory cannot have content", + FILE_NOT_FOUND: "File not found: %s", + NOT_IMPLEMENTED: "Not implemented", + INVALID_FILENAME: "Invalid filename", + INVALID_FORMAT: "Invalid or unsupported zip format. No END header found" + }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/fattr.js +var require_fattr = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/fattr.js"(exports2, module2) { + var fs = require_fileSystem().require(); + var pth = require("path"); + fs.existsSync = fs.existsSync || pth.existsSync; + module2.exports = function(path) { + var _path = path || "", _obj = newAttr(), _stat = null; + function newAttr() { + return { + directory: false, + readonly: false, + hidden: false, + executable: false, + mtime: 0, + atime: 0 + }; + } + if (_path && fs.existsSync(_path)) { + _stat = fs.statSync(_path); + _obj.directory = _stat.isDirectory(); + _obj.mtime = _stat.mtime; + _obj.atime = _stat.atime; + _obj.executable = (73 & _stat.mode) !== 0; + _obj.readonly = (128 & _stat.mode) === 0; + _obj.hidden = pth.basename(_path)[0] === "."; + } else { + console.warn("Invalid path: " + _path); + } + return { + get directory() { + return _obj.directory; + }, + get readOnly() { + return _obj.readonly; + }, + get hidden() { + return _obj.hidden; + }, + get mtime() { + return _obj.mtime; + }, + get atime() { + return _obj.atime; + }, + get executable() { + return _obj.executable; + }, + decodeAttributes: function() { + }, + encodeAttributes: function() { + }, + toJSON: function() { + return { + path: _path, + isDirectory: _obj.directory, + isReadOnly: _obj.readonly, + isHidden: _obj.hidden, + isExecutable: _obj.executable, + mTime: _obj.mtime, + aTime: _obj.atime + }; + }, + toString: function() { + return JSON.stringify(this.toJSON(), null, " "); + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/index.js +var require_util7 = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/index.js"(exports2, module2) { + module2.exports = require_utils8(); + module2.exports.FileSystem = require_fileSystem(); + module2.exports.Constants = require_constants9(); + module2.exports.Errors = require_errors2(); + module2.exports.FileAttr = require_fattr(); + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/headers/entryHeader.js +var require_entryHeader = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/headers/entryHeader.js"(exports2, module2) { + var Utils = require_util7(); + var Constants = Utils.Constants; + module2.exports = function() { + var _verMade = 20, _version = 10, _flags = 0, _method = 0, _time = 0, _crc = 0, _compressedSize = 0, _size = 0, _fnameLen = 0, _extraLen = 0, _comLen = 0, _diskStart = 0, _inattr = 0, _attr = 0, _offset = 0; + _verMade |= Utils.isWin ? 2560 : 768; + _flags |= Constants.FLG_EFS; + var _dataHeader = {}; + function setTime(val) { + val = new Date(val); + _time = (val.getFullYear() - 1980 & 127) << 25 | val.getMonth() + 1 << 21 | val.getDate() << 16 | val.getHours() << 11 | val.getMinutes() << 5 | val.getSeconds() >> 1; + } + setTime(+new Date()); + return { + get made() { + return _verMade; + }, + set made(val) { + _verMade = val; + }, + get version() { + return _version; + }, + set version(val) { + _version = val; + }, + get flags() { + return _flags; + }, + set flags(val) { + _flags = val; + }, + get method() { + return _method; + }, + set method(val) { + switch (val) { + case Constants.STORED: + this.version = 10; + case Constants.DEFLATED: + default: + this.version = 20; + } + _method = val; + }, + get time() { + return new Date((_time >> 25 & 127) + 1980, (_time >> 21 & 15) - 1, _time >> 16 & 31, _time >> 11 & 31, _time >> 5 & 63, (_time & 31) << 1); + }, + set time(val) { + setTime(val); + }, + get crc() { + return _crc; + }, + set crc(val) { + _crc = Math.max(0, val) >>> 0; + }, + get compressedSize() { + return _compressedSize; + }, + set compressedSize(val) { + _compressedSize = Math.max(0, val) >>> 0; + }, + get size() { + return _size; + }, + set size(val) { + _size = Math.max(0, val) >>> 0; + }, + get fileNameLength() { + return _fnameLen; + }, + set fileNameLength(val) { + _fnameLen = val; + }, + get extraLength() { + return _extraLen; + }, + set extraLength(val) { + _extraLen = val; + }, + get commentLength() { + return _comLen; + }, + set commentLength(val) { + _comLen = val; + }, + get diskNumStart() { + return _diskStart; + }, + set diskNumStart(val) { + _diskStart = Math.max(0, val) >>> 0; + }, + get inAttr() { + return _inattr; + }, + set inAttr(val) { + _inattr = Math.max(0, val) >>> 0; + }, + get attr() { + return _attr; + }, + set attr(val) { + _attr = Math.max(0, val) >>> 0; + }, + get fileAttr() { + return (_attr >>> 0 | 0) >> 16 & 4095; + }, + get offset() { + return _offset; + }, + set offset(val) { + _offset = Math.max(0, val) >>> 0; + }, + get encripted() { + return (_flags & 1) === 1; + }, + get entryHeaderSize() { + return Constants.CENHDR + _fnameLen + _extraLen + _comLen; + }, + get realDataOffset() { + return _offset + Constants.LOCHDR + _dataHeader.fnameLen + _dataHeader.extraLen; + }, + get dataHeader() { + return _dataHeader; + }, + loadDataHeaderFromBinary: function(input) { + var data = input.slice(_offset, _offset + Constants.LOCHDR); + if (data.readUInt32LE(0) !== Constants.LOCSIG) { + throw new Error(Utils.Errors.INVALID_LOC); + } + _dataHeader = { + version: data.readUInt16LE(Constants.LOCVER), + flags: data.readUInt16LE(Constants.LOCFLG), + method: data.readUInt16LE(Constants.LOCHOW), + time: data.readUInt32LE(Constants.LOCTIM), + crc: data.readUInt32LE(Constants.LOCCRC), + compressedSize: data.readUInt32LE(Constants.LOCSIZ), + size: data.readUInt32LE(Constants.LOCLEN), + fnameLen: data.readUInt16LE(Constants.LOCNAM), + extraLen: data.readUInt16LE(Constants.LOCEXT) + }; + }, + loadFromBinary: function(data) { + if (data.length !== Constants.CENHDR || data.readUInt32LE(0) !== Constants.CENSIG) { + throw new Error(Utils.Errors.INVALID_CEN); + } + _verMade = data.readUInt16LE(Constants.CENVEM); + _version = data.readUInt16LE(Constants.CENVER); + _flags = data.readUInt16LE(Constants.CENFLG); + _method = data.readUInt16LE(Constants.CENHOW); + _time = data.readUInt32LE(Constants.CENTIM); + _crc = data.readUInt32LE(Constants.CENCRC); + _compressedSize = data.readUInt32LE(Constants.CENSIZ); + _size = data.readUInt32LE(Constants.CENLEN); + _fnameLen = data.readUInt16LE(Constants.CENNAM); + _extraLen = data.readUInt16LE(Constants.CENEXT); + _comLen = data.readUInt16LE(Constants.CENCOM); + _diskStart = data.readUInt16LE(Constants.CENDSK); + _inattr = data.readUInt16LE(Constants.CENATT); + _attr = data.readUInt32LE(Constants.CENATX); + _offset = data.readUInt32LE(Constants.CENOFF); + }, + dataHeaderToBinary: function() { + var data = Buffer.alloc(Constants.LOCHDR); + data.writeUInt32LE(Constants.LOCSIG, 0); + data.writeUInt16LE(_version, Constants.LOCVER); + data.writeUInt16LE(_flags, Constants.LOCFLG); + data.writeUInt16LE(_method, Constants.LOCHOW); + data.writeUInt32LE(_time, Constants.LOCTIM); + data.writeUInt32LE(_crc, Constants.LOCCRC); + data.writeUInt32LE(_compressedSize, Constants.LOCSIZ); + data.writeUInt32LE(_size, Constants.LOCLEN); + data.writeUInt16LE(_fnameLen, Constants.LOCNAM); + data.writeUInt16LE(_extraLen, Constants.LOCEXT); + return data; + }, + entryHeaderToBinary: function() { + var data = Buffer.alloc(Constants.CENHDR + _fnameLen + _extraLen + _comLen); + data.writeUInt32LE(Constants.CENSIG, 0); + data.writeUInt16LE(_verMade, Constants.CENVEM); + data.writeUInt16LE(_version, Constants.CENVER); + data.writeUInt16LE(_flags, Constants.CENFLG); + data.writeUInt16LE(_method, Constants.CENHOW); + data.writeUInt32LE(_time, Constants.CENTIM); + data.writeUInt32LE(_crc, Constants.CENCRC); + data.writeUInt32LE(_compressedSize, Constants.CENSIZ); + data.writeUInt32LE(_size, Constants.CENLEN); + data.writeUInt16LE(_fnameLen, Constants.CENNAM); + data.writeUInt16LE(_extraLen, Constants.CENEXT); + data.writeUInt16LE(_comLen, Constants.CENCOM); + data.writeUInt16LE(_diskStart, Constants.CENDSK); + data.writeUInt16LE(_inattr, Constants.CENATT); + data.writeUInt32LE(_attr, Constants.CENATX); + data.writeUInt32LE(_offset, Constants.CENOFF); + data.fill(0, Constants.CENHDR); + return data; + }, + toJSON: function() { + const bytes = function(nr) { + return nr + " bytes"; + }; + return { + made: _verMade, + version: _version, + flags: _flags, + method: Utils.methodToString(_method), + time: this.time, + crc: "0x" + _crc.toString(16).toUpperCase(), + compressedSize: bytes(_compressedSize), + size: bytes(_size), + fileNameLength: bytes(_fnameLen), + extraLength: bytes(_extraLen), + commentLength: bytes(_comLen), + diskNumStart: _diskStart, + inAttr: _inattr, + attr: _attr, + offset: _offset, + entryHeaderSize: bytes(Constants.CENHDR + _fnameLen + _extraLen + _comLen) + }; + }, + toString: function() { + return JSON.stringify(this.toJSON(), null, " "); + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/headers/mainHeader.js +var require_mainHeader = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/headers/mainHeader.js"(exports2, module2) { + var Utils = require_util7(); + var Constants = Utils.Constants; + module2.exports = function() { + var _volumeEntries = 0, _totalEntries = 0, _size = 0, _offset = 0, _commentLength = 0; + return { + get diskEntries() { + return _volumeEntries; + }, + set diskEntries(val) { + _volumeEntries = _totalEntries = val; + }, + get totalEntries() { + return _totalEntries; + }, + set totalEntries(val) { + _totalEntries = _volumeEntries = val; + }, + get size() { + return _size; + }, + set size(val) { + _size = val; + }, + get offset() { + return _offset; + }, + set offset(val) { + _offset = val; + }, + get commentLength() { + return _commentLength; + }, + set commentLength(val) { + _commentLength = val; + }, + get mainHeaderSize() { + return Constants.ENDHDR + _commentLength; + }, + loadFromBinary: function(data) { + if ((data.length !== Constants.ENDHDR || data.readUInt32LE(0) !== Constants.ENDSIG) && (data.length < Constants.ZIP64HDR || data.readUInt32LE(0) !== Constants.ZIP64SIG)) { + throw new Error(Utils.Errors.INVALID_END); + } + if (data.readUInt32LE(0) === Constants.ENDSIG) { + _volumeEntries = data.readUInt16LE(Constants.ENDSUB); + _totalEntries = data.readUInt16LE(Constants.ENDTOT); + _size = data.readUInt32LE(Constants.ENDSIZ); + _offset = data.readUInt32LE(Constants.ENDOFF); + _commentLength = data.readUInt16LE(Constants.ENDCOM); + } else { + _volumeEntries = Utils.readBigUInt64LE(data, Constants.ZIP64SUB); + _totalEntries = Utils.readBigUInt64LE(data, Constants.ZIP64TOT); + _size = Utils.readBigUInt64LE(data, Constants.ZIP64SIZ); + _offset = Utils.readBigUInt64LE(data, Constants.ZIP64OFF); + _commentLength = 0; + } + }, + toBinary: function() { + var b = Buffer.alloc(Constants.ENDHDR + _commentLength); + b.writeUInt32LE(Constants.ENDSIG, 0); + b.writeUInt32LE(0, 4); + b.writeUInt16LE(_volumeEntries, Constants.ENDSUB); + b.writeUInt16LE(_totalEntries, Constants.ENDTOT); + b.writeUInt32LE(_size, Constants.ENDSIZ); + b.writeUInt32LE(_offset, Constants.ENDOFF); + b.writeUInt16LE(_commentLength, Constants.ENDCOM); + b.fill(" ", Constants.ENDHDR); + return b; + }, + toJSON: function() { + const offset = function(nr, len) { + let offs = nr.toString(16).toUpperCase(); + while (offs.length < len) + offs = "0" + offs; + return "0x" + offs; + }; + return { + diskEntries: _volumeEntries, + totalEntries: _totalEntries, + size: _size + " bytes", + offset: offset(_offset, 4), + commentLength: _commentLength + }; + }, + toString: function() { + return JSON.stringify(this.toJSON(), null, " "); + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/headers/index.js +var require_headers2 = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/headers/index.js"(exports2) { + exports2.EntryHeader = require_entryHeader(); + exports2.MainHeader = require_mainHeader(); + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/methods/deflater.js +var require_deflater = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/methods/deflater.js"(exports2, module2) { + module2.exports = function(inbuf) { + var zlib = require("zlib"); + var opts = { chunkSize: (parseInt(inbuf.length / 1024) + 1) * 1024 }; + return { + deflate: function() { + return zlib.deflateRawSync(inbuf, opts); + }, + deflateAsync: function(callback) { + var tmp = zlib.createDeflateRaw(opts), parts = [], total = 0; + tmp.on("data", function(data) { + parts.push(data); + total += data.length; + }); + tmp.on("end", function() { + var buf = Buffer.alloc(total), written = 0; + buf.fill(0); + for (var i = 0; i < parts.length; i++) { + var part = parts[i]; + part.copy(buf, written); + written += part.length; + } + callback && callback(buf); + }); + tmp.end(inbuf); + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/methods/inflater.js +var require_inflater = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/methods/inflater.js"(exports2, module2) { + module2.exports = function(inbuf) { + var zlib = require("zlib"); + return { + inflate: function() { + return zlib.inflateRawSync(inbuf); + }, + inflateAsync: function(callback) { + var tmp = zlib.createInflateRaw(), parts = [], total = 0; + tmp.on("data", function(data) { + parts.push(data); + total += data.length; + }); + tmp.on("end", function() { + var buf = Buffer.alloc(total), written = 0; + buf.fill(0); + for (var i = 0; i < parts.length; i++) { + var part = parts[i]; + part.copy(buf, written); + written += part.length; + } + callback && callback(buf); + }); + tmp.end(inbuf); + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/methods/zipcrypto.js +var require_zipcrypto = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/methods/zipcrypto.js"(exports2, module2) { + "use strict"; + var { randomFillSync } = require("crypto"); + var crctable = new Uint32Array(256).map((t, crc) => { + for (let j = 0; j < 8; j++) { + if ((crc & 1) !== 0) { + crc = crc >>> 1 ^ 3988292384; + } else { + crc >>>= 1; + } + } + return crc >>> 0; + }); + var uMul = (a, b) => Math.imul(a, b) >>> 0; + var crc32update = (pCrc32, bval) => { + return crctable[(pCrc32 ^ bval) & 255] ^ pCrc32 >>> 8; + }; + var genSalt = () => { + if (typeof randomFillSync === "function") { + return randomFillSync(Buffer.alloc(12)); + } else { + return genSalt.node(); + } + }; + genSalt.node = () => { + const salt = Buffer.alloc(12); + const len = salt.length; + for (let i = 0; i < len; i++) + salt[i] = Math.random() * 256 & 255; + return salt; + }; + var config = { + genSalt + }; + function Initkeys(pw) { + const pass = Buffer.isBuffer(pw) ? pw : Buffer.from(pw); + this.keys = new Uint32Array([305419896, 591751049, 878082192]); + for (let i = 0; i < pass.length; i++) { + this.updateKeys(pass[i]); + } + } + Initkeys.prototype.updateKeys = function(byteValue) { + const keys = this.keys; + keys[0] = crc32update(keys[0], byteValue); + keys[1] += keys[0] & 255; + keys[1] = uMul(keys[1], 134775813) + 1; + keys[2] = crc32update(keys[2], keys[1] >>> 24); + return byteValue; + }; + Initkeys.prototype.next = function() { + const k = (this.keys[2] | 2) >>> 0; + return uMul(k, k ^ 1) >> 8 & 255; + }; + function make_decrypter(pwd) { + const keys = new Initkeys(pwd); + return function(data) { + const result = Buffer.alloc(data.length); + let pos = 0; + for (let c of data) { + result[pos++] = keys.updateKeys(c ^ keys.next()); + } + return result; + }; + } + function make_encrypter(pwd) { + const keys = new Initkeys(pwd); + return function(data, result, pos = 0) { + if (!result) + result = Buffer.alloc(data.length); + for (let c of data) { + const k = keys.next(); + result[pos++] = c ^ k; + keys.updateKeys(c); + } + return result; + }; + } + function decrypt(data, header, pwd) { + if (!data || !Buffer.isBuffer(data) || data.length < 12) { + return Buffer.alloc(0); + } + const decrypter = make_decrypter(pwd); + const salt = decrypter(data.slice(0, 12)); + if (salt[11] !== header.crc >>> 24) { + throw "ADM-ZIP: Wrong Password"; + } + return decrypter(data.slice(12)); + } + function _salter(data) { + if (Buffer.isBuffer(data) && data.length >= 12) { + config.genSalt = function() { + return data.slice(0, 12); + }; + } else if (data === "node") { + config.genSalt = genSalt.node; + } else { + config.genSalt = genSalt; + } + } + function encrypt(data, header, pwd, oldlike = false) { + if (data == null) + data = Buffer.alloc(0); + if (!Buffer.isBuffer(data)) + data = Buffer.from(data.toString()); + const encrypter = make_encrypter(pwd); + const salt = config.genSalt(); + salt[11] = header.crc >>> 24 & 255; + if (oldlike) + salt[10] = header.crc >>> 16 & 255; + const result = Buffer.alloc(data.length + 12); + encrypter(salt, result); + return encrypter(data, result, 12); + } + module2.exports = { decrypt, encrypt, _salter }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/methods/index.js +var require_methods = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/methods/index.js"(exports2) { + exports2.Deflater = require_deflater(); + exports2.Inflater = require_inflater(); + exports2.ZipCrypto = require_zipcrypto(); + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/zipEntry.js +var require_zipEntry = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/zipEntry.js"(exports2, module2) { + var Utils = require_util7(); + var Headers = require_headers2(); + var Constants = Utils.Constants; + var Methods = require_methods(); + module2.exports = function(input) { + var _entryHeader = new Headers.EntryHeader(), _entryName = Buffer.alloc(0), _comment = Buffer.alloc(0), _isDirectory = false, uncompressedData = null, _extra = Buffer.alloc(0); + function getCompressedDataFromZip() { + if (!input || !Buffer.isBuffer(input)) { + return Buffer.alloc(0); + } + _entryHeader.loadDataHeaderFromBinary(input); + return input.slice(_entryHeader.realDataOffset, _entryHeader.realDataOffset + _entryHeader.compressedSize); + } + function crc32OK(data) { + if ((_entryHeader.flags & 8) !== 8) { + if (Utils.crc32(data) !== _entryHeader.dataHeader.crc) { + return false; + } + } else { + } + return true; + } + function decompress(async, callback, pass) { + if (typeof callback === "undefined" && typeof async === "string") { + pass = async; + async = void 0; + } + if (_isDirectory) { + if (async && callback) { + callback(Buffer.alloc(0), Utils.Errors.DIRECTORY_CONTENT_ERROR); + } + return Buffer.alloc(0); + } + var compressedData = getCompressedDataFromZip(); + if (compressedData.length === 0) { + if (async && callback) + callback(compressedData); + return compressedData; + } + if (_entryHeader.encripted) { + if (typeof pass !== "string" && !Buffer.isBuffer(pass)) { + throw new Error("ADM-ZIP: Incompatible password parameter"); + } + compressedData = Methods.ZipCrypto.decrypt(compressedData, _entryHeader, pass); + } + var data = Buffer.alloc(_entryHeader.size); + switch (_entryHeader.method) { + case Utils.Constants.STORED: + compressedData.copy(data); + if (!crc32OK(data)) { + if (async && callback) + callback(data, Utils.Errors.BAD_CRC); + throw new Error(Utils.Errors.BAD_CRC); + } else { + if (async && callback) + callback(data); + return data; + } + case Utils.Constants.DEFLATED: + var inflater = new Methods.Inflater(compressedData); + if (!async) { + const result = inflater.inflate(data); + result.copy(data, 0); + if (!crc32OK(data)) { + throw new Error(Utils.Errors.BAD_CRC + " " + _entryName.toString()); + } + return data; + } else { + inflater.inflateAsync(function(result) { + result.copy(result, 0); + if (callback) { + if (!crc32OK(result)) { + callback(result, Utils.Errors.BAD_CRC); + } else { + callback(result); + } + } + }); + } + break; + default: + if (async && callback) + callback(Buffer.alloc(0), Utils.Errors.UNKNOWN_METHOD); + throw new Error(Utils.Errors.UNKNOWN_METHOD); + } + } + function compress(async, callback) { + if ((!uncompressedData || !uncompressedData.length) && Buffer.isBuffer(input)) { + if (async && callback) + callback(getCompressedDataFromZip()); + return getCompressedDataFromZip(); + } + if (uncompressedData.length && !_isDirectory) { + var compressedData; + switch (_entryHeader.method) { + case Utils.Constants.STORED: + _entryHeader.compressedSize = _entryHeader.size; + compressedData = Buffer.alloc(uncompressedData.length); + uncompressedData.copy(compressedData); + if (async && callback) + callback(compressedData); + return compressedData; + default: + case Utils.Constants.DEFLATED: + var deflater = new Methods.Deflater(uncompressedData); + if (!async) { + var deflated = deflater.deflate(); + _entryHeader.compressedSize = deflated.length; + return deflated; + } else { + deflater.deflateAsync(function(data) { + compressedData = Buffer.alloc(data.length); + _entryHeader.compressedSize = data.length; + data.copy(compressedData); + callback && callback(compressedData); + }); + } + deflater = null; + break; + } + } else if (async && callback) { + callback(Buffer.alloc(0)); + } else { + return Buffer.alloc(0); + } + } + function readUInt64LE(buffer, offset) { + return (buffer.readUInt32LE(offset + 4) << 4) + buffer.readUInt32LE(offset); + } + function parseExtra(data) { + var offset = 0; + var signature, size, part; + while (offset < data.length) { + signature = data.readUInt16LE(offset); + offset += 2; + size = data.readUInt16LE(offset); + offset += 2; + part = data.slice(offset, offset + size); + offset += size; + if (Constants.ID_ZIP64 === signature) { + parseZip64ExtendedInformation(part); + } + } + } + function parseZip64ExtendedInformation(data) { + var size, compressedSize, offset, diskNumStart; + if (data.length >= Constants.EF_ZIP64_SCOMP) { + size = readUInt64LE(data, Constants.EF_ZIP64_SUNCOMP); + if (_entryHeader.size === Constants.EF_ZIP64_OR_32) { + _entryHeader.size = size; + } + } + if (data.length >= Constants.EF_ZIP64_RHO) { + compressedSize = readUInt64LE(data, Constants.EF_ZIP64_SCOMP); + if (_entryHeader.compressedSize === Constants.EF_ZIP64_OR_32) { + _entryHeader.compressedSize = compressedSize; + } + } + if (data.length >= Constants.EF_ZIP64_DSN) { + offset = readUInt64LE(data, Constants.EF_ZIP64_RHO); + if (_entryHeader.offset === Constants.EF_ZIP64_OR_32) { + _entryHeader.offset = offset; + } + } + if (data.length >= Constants.EF_ZIP64_DSN + 4) { + diskNumStart = data.readUInt32LE(Constants.EF_ZIP64_DSN); + if (_entryHeader.diskNumStart === Constants.EF_ZIP64_OR_16) { + _entryHeader.diskNumStart = diskNumStart; + } + } + } + return { + get entryName() { + return _entryName.toString(); + }, + get rawEntryName() { + return _entryName; + }, + set entryName(val) { + _entryName = Utils.toBuffer(val); + var lastChar = _entryName[_entryName.length - 1]; + _isDirectory = lastChar === 47 || lastChar === 92; + _entryHeader.fileNameLength = _entryName.length; + }, + get extra() { + return _extra; + }, + set extra(val) { + _extra = val; + _entryHeader.extraLength = val.length; + parseExtra(val); + }, + get comment() { + return _comment.toString(); + }, + set comment(val) { + _comment = Utils.toBuffer(val); + _entryHeader.commentLength = _comment.length; + }, + get name() { + var n = _entryName.toString(); + return _isDirectory ? n.substr(n.length - 1).split("/").pop() : n.split("/").pop(); + }, + get isDirectory() { + return _isDirectory; + }, + getCompressedData: function() { + return compress(false, null); + }, + getCompressedDataAsync: function(callback) { + compress(true, callback); + }, + setData: function(value) { + uncompressedData = Utils.toBuffer(value); + if (!_isDirectory && uncompressedData.length) { + _entryHeader.size = uncompressedData.length; + _entryHeader.method = Utils.Constants.DEFLATED; + _entryHeader.crc = Utils.crc32(value); + _entryHeader.changed = true; + } else { + _entryHeader.method = Utils.Constants.STORED; + } + }, + getData: function(pass) { + if (_entryHeader.changed) { + return uncompressedData; + } else { + return decompress(false, null, pass); + } + }, + getDataAsync: function(callback, pass) { + if (_entryHeader.changed) { + callback(uncompressedData); + } else { + decompress(true, callback, pass); + } + }, + set attr(attr) { + _entryHeader.attr = attr; + }, + get attr() { + return _entryHeader.attr; + }, + set header(data) { + _entryHeader.loadFromBinary(data); + }, + get header() { + return _entryHeader; + }, + packHeader: function() { + var header = _entryHeader.entryHeaderToBinary(); + var addpos = Utils.Constants.CENHDR; + _entryName.copy(header, addpos); + addpos += _entryName.length; + if (_entryHeader.extraLength) { + _extra.copy(header, addpos); + addpos += _entryHeader.extraLength; + } + if (_entryHeader.commentLength) { + _comment.copy(header, addpos); + } + return header; + }, + toJSON: function() { + const bytes = function(nr) { + return "<" + (nr && nr.length + " bytes buffer" || "null") + ">"; + }; + return { + entryName: this.entryName, + name: this.name, + comment: this.comment, + isDirectory: this.isDirectory, + header: _entryHeader.toJSON(), + compressedData: bytes(input), + data: bytes(uncompressedData) + }; + }, + toString: function() { + return JSON.stringify(this.toJSON(), null, " "); + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/zipFile.js +var require_zipFile = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/zipFile.js"(exports2, module2) { + var ZipEntry = require_zipEntry(); + var Headers = require_headers2(); + var Utils = require_util7(); + module2.exports = function(inBuffer, options) { + var entryList = [], entryTable = {}, _comment = Buffer.alloc(0), mainHeader = new Headers.MainHeader(), loadedEntries = false; + const opts = Object.assign(Object.create(null), options); + const { noSort } = opts; + if (inBuffer) { + readMainHeader(opts.readEntries); + } else { + loadedEntries = true; + } + function iterateEntries(callback) { + const totalEntries = mainHeader.diskEntries; + let index = mainHeader.offset; + for (let i = 0; i < totalEntries; i++) { + let tmp = index; + const entry = new ZipEntry(inBuffer); + entry.header = inBuffer.slice(tmp, tmp += Utils.Constants.CENHDR); + entry.entryName = inBuffer.slice(tmp, tmp += entry.header.fileNameLength); + index += entry.header.entryHeaderSize; + callback(entry); + } + } + function readEntries() { + loadedEntries = true; + entryTable = {}; + entryList = new Array(mainHeader.diskEntries); + var index = mainHeader.offset; + for (var i = 0; i < entryList.length; i++) { + var tmp = index, entry = new ZipEntry(inBuffer); + entry.header = inBuffer.slice(tmp, tmp += Utils.Constants.CENHDR); + entry.entryName = inBuffer.slice(tmp, tmp += entry.header.fileNameLength); + if (entry.header.extraLength) { + entry.extra = inBuffer.slice(tmp, tmp += entry.header.extraLength); + } + if (entry.header.commentLength) + entry.comment = inBuffer.slice(tmp, tmp + entry.header.commentLength); + index += entry.header.entryHeaderSize; + entryList[i] = entry; + entryTable[entry.entryName] = entry; + } + } + function readMainHeader(readNow) { + var i = inBuffer.length - Utils.Constants.ENDHDR, max = Math.max(0, i - 65535), n = max, endStart = inBuffer.length, endOffset = -1, commentEnd = 0; + for (i; i >= n; i--) { + if (inBuffer[i] !== 80) + continue; + if (inBuffer.readUInt32LE(i) === Utils.Constants.ENDSIG) { + endOffset = i; + commentEnd = i; + endStart = i + Utils.Constants.ENDHDR; + n = i - Utils.Constants.END64HDR; + continue; + } + if (inBuffer.readUInt32LE(i) === Utils.Constants.END64SIG) { + n = max; + continue; + } + if (inBuffer.readUInt32LE(i) === Utils.Constants.ZIP64SIG) { + endOffset = i; + endStart = i + Utils.readBigUInt64LE(inBuffer, i + Utils.Constants.ZIP64SIZE) + Utils.Constants.ZIP64LEAD; + break; + } + } + if (!~endOffset) + throw new Error(Utils.Errors.INVALID_FORMAT); + mainHeader.loadFromBinary(inBuffer.slice(endOffset, endStart)); + if (mainHeader.commentLength) { + _comment = inBuffer.slice(commentEnd + Utils.Constants.ENDHDR); + } + if (readNow) + readEntries(); + } + function sortEntries() { + if (entryList.length > 1 && !noSort) { + entryList.sort((a, b) => a.entryName.toLowerCase().localeCompare(b.entryName.toLowerCase())); + } + } + return { + get entries() { + if (!loadedEntries) { + readEntries(); + } + return entryList; + }, + get comment() { + return _comment.toString(); + }, + set comment(val) { + _comment = Utils.toBuffer(val); + mainHeader.commentLength = _comment.length; + }, + getEntryCount: function() { + if (!loadedEntries) { + return mainHeader.diskEntries; + } + return entryList.length; + }, + forEach: function(callback) { + if (!loadedEntries) { + iterateEntries(callback); + return; + } + entryList.forEach(callback); + }, + getEntry: function(entryName) { + if (!loadedEntries) { + readEntries(); + } + return entryTable[entryName] || null; + }, + setEntry: function(entry) { + if (!loadedEntries) { + readEntries(); + } + entryList.push(entry); + entryTable[entry.entryName] = entry; + mainHeader.totalEntries = entryList.length; + }, + deleteEntry: function(entryName) { + if (!loadedEntries) { + readEntries(); + } + var entry = entryTable[entryName]; + if (entry && entry.isDirectory) { + var _self = this; + this.getEntryChildren(entry).forEach(function(child) { + if (child.entryName !== entryName) { + _self.deleteEntry(child.entryName); + } + }); + } + entryList.splice(entryList.indexOf(entry), 1); + delete entryTable[entryName]; + mainHeader.totalEntries = entryList.length; + }, + getEntryChildren: function(entry) { + if (!loadedEntries) { + readEntries(); + } + if (entry && entry.isDirectory) { + const list = []; + const name = entry.entryName; + const len = name.length; + entryList.forEach(function(zipEntry) { + if (zipEntry.entryName.substr(0, len) === name) { + list.push(zipEntry); + } + }); + return list; + } + return []; + }, + compressToBuffer: function() { + if (!loadedEntries) { + readEntries(); + } + sortEntries(); + const dataBlock = []; + const entryHeaders = []; + let totalSize = 0; + let dindex = 0; + mainHeader.size = 0; + mainHeader.offset = 0; + for (const entry of entryList) { + const compressedData = entry.getCompressedData(); + entry.header.offset = dindex; + const dataHeader = entry.header.dataHeaderToBinary(); + const entryNameLen = entry.rawEntryName.length; + const postHeader = Buffer.alloc(entryNameLen + entry.extra.length); + entry.rawEntryName.copy(postHeader, 0); + postHeader.copy(entry.extra, entryNameLen); + const dataLength = dataHeader.length + postHeader.length + compressedData.length; + dindex += dataLength; + dataBlock.push(dataHeader); + dataBlock.push(postHeader); + dataBlock.push(compressedData); + const entryHeader = entry.packHeader(); + entryHeaders.push(entryHeader); + mainHeader.size += entryHeader.length; + totalSize += dataLength + entryHeader.length; + } + totalSize += mainHeader.mainHeaderSize; + mainHeader.offset = dindex; + dindex = 0; + const outBuffer = Buffer.alloc(totalSize); + for (const content of dataBlock) { + content.copy(outBuffer, dindex); + dindex += content.length; + } + for (const content of entryHeaders) { + content.copy(outBuffer, dindex); + dindex += content.length; + } + const mh = mainHeader.toBinary(); + if (_comment) { + _comment.copy(mh, Utils.Constants.ENDHDR); + } + mh.copy(outBuffer, dindex); + return outBuffer; + }, + toAsyncBuffer: function(onSuccess, onFail, onItemStart, onItemEnd) { + try { + if (!loadedEntries) { + readEntries(); + } + sortEntries(); + const dataBlock = []; + const entryHeaders = []; + let totalSize = 0; + let dindex = 0; + mainHeader.size = 0; + mainHeader.offset = 0; + const compress2Buffer = function(entryLists) { + if (entryLists.length) { + const entry = entryLists.pop(); + const name = entry.entryName + entry.extra.toString(); + if (onItemStart) + onItemStart(name); + entry.getCompressedDataAsync(function(compressedData) { + if (onItemEnd) + onItemEnd(name); + entry.header.offset = dindex; + const dataHeader = entry.header.dataHeaderToBinary(); + const postHeader = Buffer.alloc(name.length, name); + const dataLength = dataHeader.length + postHeader.length + compressedData.length; + dindex += dataLength; + dataBlock.push(dataHeader); + dataBlock.push(postHeader); + dataBlock.push(compressedData); + const entryHeader = entry.packHeader(); + entryHeaders.push(entryHeader); + mainHeader.size += entryHeader.length; + totalSize += dataLength + entryHeader.length; + compress2Buffer(entryLists); + }); + } else { + totalSize += mainHeader.mainHeaderSize; + mainHeader.offset = dindex; + dindex = 0; + const outBuffer = Buffer.alloc(totalSize); + dataBlock.forEach(function(content) { + content.copy(outBuffer, dindex); + dindex += content.length; + }); + entryHeaders.forEach(function(content) { + content.copy(outBuffer, dindex); + dindex += content.length; + }); + const mh = mainHeader.toBinary(); + if (_comment) { + _comment.copy(mh, Utils.Constants.ENDHDR); + } + mh.copy(outBuffer, dindex); + onSuccess(outBuffer); + } + }; + compress2Buffer(entryList); + } catch (e) { + onFail(e); + } + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/adm-zip.js +var require_adm_zip = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/adm-zip.js"(exports2, module2) { + var Utils = require_util7(); + var pth = require("path"); + var ZipEntry = require_zipEntry(); + var ZipFile = require_zipFile(); + var fs = Utils.FileSystem.require(); + fs.existsSync = fs.existsSync || pth.existsSync; + var defaultOptions = { + noSort: false, + readEntries: false, + method: Utils.Constants.NONE + }; + module2.exports = function(input, options) { + let inBuffer = null; + const opts = Object.assign(Object.create(null), defaultOptions); + if (input && typeof input === "object") { + if (!(input instanceof Uint8Array)) { + Object.assign(opts, input); + input = opts.input ? opts.input : void 0; + if (opts.input) + delete opts.input; + } + if (Buffer.isBuffer(input)) { + inBuffer = input; + opts.method = Utils.Constants.BUFFER; + input = void 0; + } + } + Object.assign(opts, options); + if (input && typeof input === "string") { + if (fs.existsSync(input)) { + opts.method = Utils.Constants.FILE; + opts.filename = input; + inBuffer = fs.readFileSync(input); + } else { + throw new Error(Utils.Errors.INVALID_FILENAME); + } + } + const _zip = new ZipFile(inBuffer, opts); + const { canonical, sanitize } = Utils; + function getEntry(entry) { + if (entry && _zip) { + var item; + if (typeof entry === "string") + item = _zip.getEntry(entry); + if (typeof entry === "object" && typeof entry.entryName !== "undefined" && typeof entry.header !== "undefined") + item = _zip.getEntry(entry.entryName); + if (item) { + return item; + } + } + return null; + } + function fixPath(zipPath) { + const { join, normalize, sep } = pth.posix; + return join(".", normalize(sep + zipPath.split("\\").join(sep) + sep)); + } + return { + readFile: function(entry, pass) { + var item = getEntry(entry); + return item && item.getData(pass) || null; + }, + readFileAsync: function(entry, callback) { + var item = getEntry(entry); + if (item) { + item.getDataAsync(callback); + } else { + callback(null, "getEntry failed for:" + entry); + } + }, + readAsText: function(entry, encoding) { + var item = getEntry(entry); + if (item) { + var data = item.getData(); + if (data && data.length) { + return data.toString(encoding || "utf8"); + } + } + return ""; + }, + readAsTextAsync: function(entry, callback, encoding) { + var item = getEntry(entry); + if (item) { + item.getDataAsync(function(data, err) { + if (err) { + callback(data, err); + return; + } + if (data && data.length) { + callback(data.toString(encoding || "utf8")); + } else { + callback(""); + } + }); + } else { + callback(""); + } + }, + deleteFile: function(entry) { + var item = getEntry(entry); + if (item) { + _zip.deleteEntry(item.entryName); + } + }, + addZipComment: function(comment) { + _zip.comment = comment; + }, + getZipComment: function() { + return _zip.comment || ""; + }, + addZipEntryComment: function(entry, comment) { + var item = getEntry(entry); + if (item) { + item.comment = comment; + } + }, + getZipEntryComment: function(entry) { + var item = getEntry(entry); + if (item) { + return item.comment || ""; + } + return ""; + }, + updateFile: function(entry, content) { + var item = getEntry(entry); + if (item) { + item.setData(content); + } + }, + addLocalFile: function(localPath, zipPath, zipName, comment) { + if (fs.existsSync(localPath)) { + zipPath = zipPath ? fixPath(zipPath) : ""; + var p = localPath.split("\\").join("/").split("/").pop(); + zipPath += zipName ? zipName : p; + const _attr = fs.statSync(localPath); + this.addFile(zipPath, fs.readFileSync(localPath), comment, _attr); + } else { + throw new Error(Utils.Errors.FILE_NOT_FOUND.replace("%s", localPath)); + } + }, + addLocalFolder: function(localPath, zipPath, filter) { + if (filter instanceof RegExp) { + filter = function(rx) { + return function(filename) { + return rx.test(filename); + }; + }(filter); + } else if (typeof filter !== "function") { + filter = function() { + return true; + }; + } + zipPath = zipPath ? fixPath(zipPath) : ""; + localPath = pth.normalize(localPath); + if (fs.existsSync(localPath)) { + const items = Utils.findFiles(localPath); + const self2 = this; + if (items.length) { + items.forEach(function(filepath) { + var p = pth.relative(localPath, filepath).split("\\").join("/"); + if (filter(p)) { + var stats = fs.statSync(filepath); + if (stats.isFile()) { + self2.addFile(zipPath + p, fs.readFileSync(filepath), "", stats); + } else { + self2.addFile(zipPath + p + "/", Buffer.alloc(0), "", stats); + } + } + }); + } + } else { + throw new Error(Utils.Errors.FILE_NOT_FOUND.replace("%s", localPath)); + } + }, + addLocalFolderAsync: function(localPath, callback, zipPath, filter) { + if (filter instanceof RegExp) { + filter = function(rx) { + return function(filename) { + return rx.test(filename); + }; + }(filter); + } else if (typeof filter !== "function") { + filter = function() { + return true; + }; + } + zipPath = zipPath ? fixPath(zipPath) : ""; + localPath = pth.normalize(localPath); + var self2 = this; + fs.open(localPath, "r", function(err) { + if (err && err.code === "ENOENT") { + callback(void 0, Utils.Errors.FILE_NOT_FOUND.replace("%s", localPath)); + } else if (err) { + callback(void 0, err); + } else { + var items = Utils.findFiles(localPath); + var i = -1; + var next = function() { + i += 1; + if (i < items.length) { + var filepath = items[i]; + var p = pth.relative(localPath, filepath).split("\\").join("/"); + p = p.normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^\x20-\x7E]/g, ""); + if (filter(p)) { + fs.stat(filepath, function(er0, stats) { + if (er0) + callback(void 0, er0); + if (stats.isFile()) { + fs.readFile(filepath, function(er1, data) { + if (er1) { + callback(void 0, er1); + } else { + self2.addFile(zipPath + p, data, "", stats); + next(); + } + }); + } else { + self2.addFile(zipPath + p + "/", Buffer.alloc(0), "", stats); + next(); + } + }); + } else { + next(); + } + } else { + callback(true, void 0); + } + }; + next(); + } + }); + }, + addLocalFolderPromise: function(localPath, props) { + return new Promise((resolve, reject) => { + const { filter, zipPath } = Object.assign({}, props); + this.addLocalFolderAsync(localPath, (done, err) => { + if (err) + reject(err); + if (done) + resolve(this); + }, zipPath, filter); + }); + }, + addFile: function(entryName, content, comment, attr) { + let entry = getEntry(entryName); + const update = entry != null; + if (!update) { + entry = new ZipEntry(); + entry.entryName = entryName; + } + entry.comment = comment || ""; + const isStat = typeof attr === "object" && attr instanceof fs.Stats; + if (isStat) { + entry.header.time = attr.mtime; + } + var fileattr = entry.isDirectory ? 16 : 0; + if (!Utils.isWin) { + let unix = entry.isDirectory ? 16384 : 32768; + if (isStat) { + unix |= 4095 & attr.mode; + } else if (typeof attr === "number") { + unix |= 4095 & attr; + } else { + unix |= entry.isDirectory ? 493 : 420; + } + fileattr = (fileattr | unix << 16) >>> 0; + } + entry.attr = fileattr; + entry.setData(content); + if (!update) + _zip.setEntry(entry); + }, + getEntries: function() { + return _zip ? _zip.entries : []; + }, + getEntry: function(name) { + return getEntry(name); + }, + getEntryCount: function() { + return _zip.getEntryCount(); + }, + forEach: function(callback) { + return _zip.forEach(callback); + }, + extractEntryTo: function(entry, targetPath, maintainEntryPath, overwrite, outFileName) { + overwrite = overwrite || false; + maintainEntryPath = typeof maintainEntryPath === "undefined" ? true : maintainEntryPath; + var item = getEntry(entry); + if (!item) { + throw new Error(Utils.Errors.NO_ENTRY); + } + var entryName = canonical(item.entryName); + var target = sanitize(targetPath, outFileName && !item.isDirectory ? outFileName : maintainEntryPath ? entryName : pth.basename(entryName)); + if (item.isDirectory) { + var children = _zip.getEntryChildren(item); + children.forEach(function(child) { + if (child.isDirectory) + return; + var content2 = child.getData(); + if (!content2) { + throw new Error(Utils.Errors.CANT_EXTRACT_FILE); + } + var name = canonical(child.entryName); + var childName = sanitize(targetPath, maintainEntryPath ? name : pth.basename(name)); + var fileAttr2 = child.attr ? (child.attr >>> 0 | 0) >> 16 & 4095 : 0; + Utils.writeFileTo(childName, content2, overwrite, fileAttr2); + }); + return true; + } + var content = item.getData(); + if (!content) + throw new Error(Utils.Errors.CANT_EXTRACT_FILE); + if (fs.existsSync(target) && !overwrite) { + throw new Error(Utils.Errors.CANT_OVERRIDE); + } + var fileAttr = item.attr ? (item.attr >>> 0 | 0) >> 16 & 4095 : 0; + Utils.writeFileTo(target, content, overwrite, fileAttr); + return true; + }, + test: function(pass) { + if (!_zip) { + return false; + } + for (var entry in _zip.entries) { + try { + if (entry.isDirectory) { + continue; + } + var content = _zip.entries[entry].getData(pass); + if (!content) { + return false; + } + } catch (err) { + return false; + } + } + return true; + }, + extractAllTo: function(targetPath, overwrite, pass) { + overwrite = overwrite || false; + if (!_zip) { + throw new Error(Utils.Errors.NO_ZIP); + } + _zip.entries.forEach(function(entry) { + var entryName = sanitize(targetPath, canonical(entry.entryName.toString())); + if (entry.isDirectory) { + Utils.makeDir(entryName); + return; + } + var content = entry.getData(pass); + if (!content) { + throw new Error(Utils.Errors.CANT_EXTRACT_FILE); + } + var fileAttr = entry.attr ? (entry.attr >>> 0 | 0) >> 16 & 4095 : 0; + Utils.writeFileTo(entryName, content, overwrite, fileAttr); + try { + fs.utimesSync(entryName, entry.header.time, entry.header.time); + } catch (err) { + throw new Error(Utils.Errors.CANT_EXTRACT_FILE); + } + }); + }, + extractAllToAsync: function(targetPath, overwrite, callback) { + if (!callback) { + callback = function() { + }; + } + overwrite = overwrite || false; + if (!_zip) { + callback(new Error(Utils.Errors.NO_ZIP)); + return; + } + targetPath = pth.resolve(targetPath); + const getPath = (entry) => sanitize(targetPath, pth.normalize(canonical(entry.entryName.toString()))); + const getError = (msg, file) => new Error(msg + ': "' + file + '"'); + const entries = _zip.entries; + for (const entry of entries.filter((e) => e.isDirectory)) { + const filePath = getPath(entry); + const fileAttr = entry.header.fileAttr; + try { + Utils.makeDir(filePath); + if (fileAttr) + fs.chmodSync(filePath, fileAttr); + fs.utimesSync(filePath, entry.header.time, entry.header.time); + } catch (er) { + callback(getError("Unable to create folder", filePath)); + } + } + for (const entry of entries.filter((e) => !e.isDirectory)) { + const entryName = pth.normalize(canonical(entry.entryName.toString())); + const filePath = sanitize(targetPath, entryName); + entry.getDataAsync(function(content, err_1) { + if (err_1) { + callback(new Error(err_1)); + return; + } + if (!content) { + callback(new Error(Utils.Errors.CANT_EXTRACT_FILE)); + } else { + Utils.writeFileToAsync(filePath, content, overwrite, entry.header.fileAttr, function(succ) { + if (!succ) + callback(getError("Unable to write file", filePath)); + fs.utimes(filePath, entry.header.time, entry.header.time, function(err_2) { + if (err_2) + callback(getError("Unable to set times", filePath)); + }); + }); + } + }); + } + callback(); + }, + writeZip: function(targetFileName, callback) { + if (arguments.length === 1) { + if (typeof targetFileName === "function") { + callback = targetFileName; + targetFileName = ""; + } + } + if (!targetFileName && opts.filename) { + targetFileName = opts.filename; + } + if (!targetFileName) + return; + var zipData = _zip.compressToBuffer(); + if (zipData) { + var ok = Utils.writeFileTo(targetFileName, zipData, true); + if (typeof callback === "function") + callback(!ok ? new Error("failed") : null, ""); + } + }, + writeZipPromise: function(targetFileName, props) { + const { overwrite, perm } = Object.assign({ overwrite: true }, props); + return new Promise((resolve, reject) => { + if (!targetFileName && opts.filename) + targetFileName = opts.filename; + if (!targetFileName) + reject("ADM-ZIP: ZIP File Name Missing"); + this.toBufferPromise().then((zipData) => { + const ret = (done) => done ? resolve(done) : reject("ADM-ZIP: Wasn't able to write zip file"); + Utils.writeFileToAsync(targetFileName, zipData, overwrite, perm, ret); + }, reject); + }); + }, + toBufferPromise: function() { + return new Promise((resolve, reject) => { + _zip.toAsyncBuffer(resolve, reject); + }); + }, + toBuffer: function(onSuccess, onFail, onItemStart, onItemEnd) { + this.valueOf = 2; + if (typeof onSuccess === "function") { + _zip.toAsyncBuffer(onSuccess, onFail, onItemStart, onItemEnd); + return null; + } + return _zip.compressToBuffer(); + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/temp-dir@2.0.0/node_modules/temp-dir/index.js +var require_temp_dir = __commonJS({ + "../../node_modules/.pnpm/temp-dir@2.0.0/node_modules/temp-dir/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var os = require("os"); + var tempDirectorySymbol = Symbol.for("__RESOLVED_TEMP_DIRECTORY__"); + if (!global[tempDirectorySymbol]) { + Object.defineProperty(global, tempDirectorySymbol, { + value: fs.realpathSync(os.tmpdir()) + }); + } + module2.exports = global[tempDirectorySymbol]; + } +}); + +// ../../node_modules/.pnpm/array-union@2.1.0/node_modules/array-union/index.js +var require_array_union = __commonJS({ + "../../node_modules/.pnpm/array-union@2.1.0/node_modules/array-union/index.js"(exports2, module2) { + "use strict"; + module2.exports = (...arguments_) => { + return [...new Set([].concat(...arguments_))]; + }; + } +}); + +// ../../node_modules/.pnpm/path-type@4.0.0/node_modules/path-type/index.js +var require_path_type = __commonJS({ + "../../node_modules/.pnpm/path-type@4.0.0/node_modules/path-type/index.js"(exports2) { + "use strict"; + var { promisify } = require("util"); + var fs = require("fs"); + async function isType(fsStatType, statsMethodName, filePath) { + if (typeof filePath !== "string") { + throw new TypeError(`Expected a string, got ${typeof filePath}`); + } + try { + const stats = await promisify(fs[fsStatType])(filePath); + return stats[statsMethodName](); + } catch (error) { + if (error.code === "ENOENT") { + return false; + } + throw error; + } + } + function isTypeSync(fsStatType, statsMethodName, filePath) { + if (typeof filePath !== "string") { + throw new TypeError(`Expected a string, got ${typeof filePath}`); + } + try { + return fs[fsStatType](filePath)[statsMethodName](); + } catch (error) { + if (error.code === "ENOENT") { + return false; + } + throw error; + } + } + exports2.isFile = isType.bind(null, "stat", "isFile"); + exports2.isDirectory = isType.bind(null, "stat", "isDirectory"); + exports2.isSymlink = isType.bind(null, "lstat", "isSymbolicLink"); + exports2.isFileSync = isTypeSync.bind(null, "statSync", "isFile"); + exports2.isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory"); + exports2.isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink"); + } +}); + +// ../../node_modules/.pnpm/dir-glob@3.0.1/node_modules/dir-glob/index.js +var require_dir_glob = __commonJS({ + "../../node_modules/.pnpm/dir-glob@3.0.1/node_modules/dir-glob/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var pathType = require_path_type(); + var getExtensions = (extensions) => extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]; + var getPath = (filepath, cwd) => { + const pth = filepath[0] === "!" ? filepath.slice(1) : filepath; + return path.isAbsolute(pth) ? pth : path.join(cwd, pth); + }; + var addExtensions = (file, extensions) => { + if (path.extname(file)) { + return `**/${file}`; + } + return `**/${file}.${getExtensions(extensions)}`; + }; + var getGlob = (directory, options) => { + if (options.files && !Array.isArray(options.files)) { + throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof options.files}\``); + } + if (options.extensions && !Array.isArray(options.extensions)) { + throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof options.extensions}\``); + } + if (options.files && options.extensions) { + return options.files.map((x) => path.posix.join(directory, addExtensions(x, options.extensions))); + } + if (options.files) { + return options.files.map((x) => path.posix.join(directory, `**/${x}`)); + } + if (options.extensions) { + return [path.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)]; + } + return [path.posix.join(directory, "**")]; + }; + module2.exports = async (input, options) => { + options = { + cwd: process.cwd(), + ...options + }; + if (typeof options.cwd !== "string") { + throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); + } + const globs = await Promise.all([].concat(input).map(async (x) => { + const isDirectory = await pathType.isDirectory(getPath(x, options.cwd)); + return isDirectory ? getGlob(x, options) : x; + })); + return [].concat.apply([], globs); + }; + module2.exports.sync = (input, options) => { + options = { + cwd: process.cwd(), + ...options + }; + if (typeof options.cwd !== "string") { + throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); + } + const globs = [].concat(input).map((x) => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x); + return [].concat.apply([], globs); + }; + } +}); + +// ../../node_modules/.pnpm/ignore@5.1.8/node_modules/ignore/index.js +var require_ignore = __commonJS({ + "../../node_modules/.pnpm/ignore@5.1.8/node_modules/ignore/index.js"(exports2, module2) { + function makeArray(subject) { + return Array.isArray(subject) ? subject : [subject]; + } + var EMPTY = ""; + var SPACE = " "; + var ESCAPE = "\\"; + var REGEX_TEST_BLANK_LINE = /^\s+$/; + var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; + var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; + var REGEX_SPLITALL_CRLF = /\r?\n/g; + var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; + var SLASH = "/"; + var KEY_IGNORE = typeof Symbol !== "undefined" ? Symbol.for("node-ignore") : "node-ignore"; + var define2 = (object, key, value) => Object.defineProperty(object, key, { value }); + var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; + var sanitizeRange = (range) => range.replace(REGEX_REGEXP_RANGE, (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY); + var cleanRangeBackSlash = (slashes) => { + const { length } = slashes; + return slashes.slice(0, length - length % 2); + }; + var REPLACERS = [ + [ + /\\?\s+$/, + (match) => match.indexOf("\\") === 0 ? SPACE : EMPTY + ], + [ + /\\\s/g, + () => SPACE + ], + [ + /[\\$.|*+(){^]/g, + (match) => `\\${match}` + ], + [ + /(?!\\)\?/g, + () => "[^/]" + ], + [ + /^\//, + () => "^" + ], + [ + /\//g, + () => "\\/" + ], + [ + /^\^*\\\*\\\*\\\//, + () => "^(?:.*\\/)?" + ], + [ + /^(?=[^^])/, + function startingReplacer() { + return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^"; + } + ], + [ + /\\\/\\\*\\\*(?=\\\/|$)/g, + (_, index, str) => index + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+" + ], + [ + /(^|[^\\]+)\\\*(?=.+)/g, + (_, p1) => `${p1}[^\\/]*` + ], + [ + /\\\\\\(?=[$.|*+(){^])/g, + () => ESCAPE + ], + [ + /\\\\/g, + () => ESCAPE + ], + [ + /(\\)?\[([^\]/]*?)(\\*)($|\])/g, + (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]" + ], + [ + /(?:[^*])$/, + (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)` + ], + [ + /(\^|\\\/)?\\\*$/, + (_, p1) => { + const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; + return `${prefix}(?=$|\\/$)`; + } + ] + ]; + var regexCache = Object.create(null); + var makeRegex = (pattern, negative, ignorecase) => { + const r = regexCache[pattern]; + if (r) { + return r; + } + const source = REPLACERS.reduce((prev, current) => prev.replace(current[0], current[1].bind(pattern)), pattern); + return regexCache[pattern] = ignorecase ? new RegExp(source, "i") : new RegExp(source); + }; + var isString = (subject) => typeof subject === "string"; + var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && pattern.indexOf("#") !== 0; + var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF); + var IgnoreRule = class { + constructor(origin, pattern, negative, regex) { + this.origin = origin; + this.pattern = pattern; + this.negative = negative; + this.regex = regex; + } + }; + var createRule = (pattern, ignorecase) => { + const origin = pattern; + let negative = false; + if (pattern.indexOf("!") === 0) { + negative = true; + pattern = pattern.substr(1); + } + pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); + const regex = makeRegex(pattern, negative, ignorecase); + return new IgnoreRule(origin, pattern, negative, regex); + }; + var throwError = (message2, Ctor) => { + throw new Ctor(message2); + }; + var checkPath = (path, originalPath, doThrow) => { + if (!isString(path)) { + return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError); + } + if (!path) { + return doThrow(`path must not be empty`, TypeError); + } + if (checkPath.isNotRelative(path)) { + const r = "`path.relative()`d"; + return doThrow(`path should be a ${r} string, but got "${originalPath}"`, RangeError); + } + return true; + }; + var isNotRelative = (path) => REGEX_TEST_INVALID_PATH.test(path); + checkPath.isNotRelative = isNotRelative; + checkPath.convert = (p) => p; + var Ignore = class { + constructor({ + ignorecase = true + } = {}) { + this._rules = []; + this._ignorecase = ignorecase; + define2(this, KEY_IGNORE, true); + this._initCache(); + } + _initCache() { + this._ignoreCache = Object.create(null); + this._testCache = Object.create(null); + } + _addPattern(pattern) { + if (pattern && pattern[KEY_IGNORE]) { + this._rules = this._rules.concat(pattern._rules); + this._added = true; + return; + } + if (checkPattern(pattern)) { + const rule = createRule(pattern, this._ignorecase); + this._added = true; + this._rules.push(rule); + } + } + add(pattern) { + this._added = false; + makeArray(isString(pattern) ? splitPattern(pattern) : pattern).forEach(this._addPattern, this); + if (this._added) { + this._initCache(); + } + return this; + } + addPattern(pattern) { + return this.add(pattern); + } + _testOne(path, checkUnignored) { + let ignored = false; + let unignored = false; + this._rules.forEach((rule) => { + const { negative } = rule; + if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { + return; + } + const matched = rule.regex.test(path); + if (matched) { + ignored = !negative; + unignored = negative; + } + }); + return { + ignored, + unignored + }; + } + _test(originalPath, cache, checkUnignored, slices) { + const path = originalPath && checkPath.convert(originalPath); + checkPath(path, originalPath, throwError); + return this._t(path, cache, checkUnignored, slices); + } + _t(path, cache, checkUnignored, slices) { + if (path in cache) { + return cache[path]; + } + if (!slices) { + slices = path.split(SLASH); + } + slices.pop(); + if (!slices.length) { + return cache[path] = this._testOne(path, checkUnignored); + } + const parent = this._t(slices.join(SLASH) + SLASH, cache, checkUnignored, slices); + return cache[path] = parent.ignored ? parent : this._testOne(path, checkUnignored); + } + ignores(path) { + return this._test(path, this._ignoreCache, false).ignored; + } + createFilter() { + return (path) => !this.ignores(path); + } + filter(paths) { + return makeArray(paths).filter(this.createFilter()); + } + test(path) { + return this._test(path, this._testCache, true); + } + }; + var factory = (options) => new Ignore(options); + var returnFalse = () => false; + var isPathValid = (path) => checkPath(path && checkPath.convert(path), path, returnFalse); + factory.isPathValid = isPathValid; + factory.default = factory; + module2.exports = factory; + if (typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32")) { + const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/"); + checkPath.convert = makePosix; + const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; + checkPath.isNotRelative = (path) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path) || isNotRelative(path); + } + } +}); + +// ../../node_modules/.pnpm/slash@3.0.0/node_modules/slash/index.js +var require_slash = __commonJS({ + "../../node_modules/.pnpm/slash@3.0.0/node_modules/slash/index.js"(exports2, module2) { + "use strict"; + module2.exports = (path) => { + const isExtendedLengthPath = /^\\\\\?\\/.test(path); + const hasNonAscii = /[^\u0000-\u0080]+/.test(path); + if (isExtendedLengthPath || hasNonAscii) { + return path; + } + return path.replace(/\\/g, "/"); + }; + } +}); + +// ../../node_modules/.pnpm/globby@11.0.4/node_modules/globby/gitignore.js +var require_gitignore = __commonJS({ + "../../node_modules/.pnpm/globby@11.0.4/node_modules/globby/gitignore.js"(exports2, module2) { + "use strict"; + var { promisify } = require("util"); + var fs = require("fs"); + var path = require("path"); + var fastGlob = require_out4(); + var gitIgnore = require_ignore(); + var slash = require_slash(); + var DEFAULT_IGNORE = [ + "**/node_modules/**", + "**/flow-typed/**", + "**/coverage/**", + "**/.git" + ]; + var readFileP = promisify(fs.readFile); + var mapGitIgnorePatternTo = (base) => (ignore) => { + if (ignore.startsWith("!")) { + return "!" + path.posix.join(base, ignore.slice(1)); + } + return path.posix.join(base, ignore); + }; + var parseGitIgnore = (content, options) => { + const base = slash(path.relative(options.cwd, path.dirname(options.fileName))); + return content.split(/\r?\n/).filter(Boolean).filter((line) => !line.startsWith("#")).map(mapGitIgnorePatternTo(base)); + }; + var reduceIgnore = (files) => { + const ignores = gitIgnore(); + for (const file of files) { + ignores.add(parseGitIgnore(file.content, { + cwd: file.cwd, + fileName: file.filePath + })); + } + return ignores; + }; + var ensureAbsolutePathForCwd = (cwd, p) => { + cwd = slash(cwd); + if (path.isAbsolute(p)) { + if (slash(p).startsWith(cwd)) { + return p; + } + throw new Error(`Path ${p} is not in cwd ${cwd}`); + } + return path.join(cwd, p); + }; + var getIsIgnoredPredecate = (ignores, cwd) => { + return (p) => ignores.ignores(slash(path.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p)))); + }; + var getFile = async (file, cwd) => { + const filePath = path.join(cwd, file); + const content = await readFileP(filePath, "utf8"); + return { + cwd, + filePath, + content + }; + }; + var getFileSync = (file, cwd) => { + const filePath = path.join(cwd, file); + const content = fs.readFileSync(filePath, "utf8"); + return { + cwd, + filePath, + content + }; + }; + var normalizeOptions = ({ + ignore = [], + cwd = slash(process.cwd()) + } = {}) => { + return { ignore, cwd }; + }; + module2.exports = async (options) => { + options = normalizeOptions(options); + const paths = await fastGlob("**/.gitignore", { + ignore: DEFAULT_IGNORE.concat(options.ignore), + cwd: options.cwd + }); + const files = await Promise.all(paths.map((file) => getFile(file, options.cwd))); + const ignores = reduceIgnore(files); + return getIsIgnoredPredecate(ignores, options.cwd); + }; + module2.exports.sync = (options) => { + options = normalizeOptions(options); + const paths = fastGlob.sync("**/.gitignore", { + ignore: DEFAULT_IGNORE.concat(options.ignore), + cwd: options.cwd + }); + const files = paths.map((file) => getFileSync(file, options.cwd)); + const ignores = reduceIgnore(files); + return getIsIgnoredPredecate(ignores, options.cwd); + }; + } +}); + +// ../../node_modules/.pnpm/globby@11.0.4/node_modules/globby/stream-utils.js +var require_stream_utils = __commonJS({ + "../../node_modules/.pnpm/globby@11.0.4/node_modules/globby/stream-utils.js"(exports2, module2) { + "use strict"; + var { Transform } = require("stream"); + var ObjectTransform = class extends Transform { + constructor() { + super({ + objectMode: true + }); + } + }; + var FilterStream = class extends ObjectTransform { + constructor(filter) { + super(); + this._filter = filter; + } + _transform(data, encoding, callback) { + if (this._filter(data)) { + this.push(data); + } + callback(); + } + }; + var UniqueStream = class extends ObjectTransform { + constructor() { + super(); + this._pushed = new Set(); + } + _transform(data, encoding, callback) { + if (!this._pushed.has(data)) { + this.push(data); + this._pushed.add(data); + } + callback(); + } + }; + module2.exports = { + FilterStream, + UniqueStream + }; + } +}); + +// ../../node_modules/.pnpm/globby@11.0.4/node_modules/globby/index.js +var require_globby = __commonJS({ + "../../node_modules/.pnpm/globby@11.0.4/node_modules/globby/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var arrayUnion = require_array_union(); + var merge2 = require_merge22(); + var fastGlob = require_out4(); + var dirGlob = require_dir_glob(); + var gitignore = require_gitignore(); + var { FilterStream, UniqueStream } = require_stream_utils(); + var DEFAULT_FILTER = () => false; + var isNegative = (pattern) => pattern[0] === "!"; + var assertPatternsInput = (patterns) => { + if (!patterns.every((pattern) => typeof pattern === "string")) { + throw new TypeError("Patterns must be a string or an array of strings"); + } + }; + var checkCwdOption = (options = {}) => { + if (!options.cwd) { + return; + } + let stat; + try { + stat = fs.statSync(options.cwd); + } catch { + return; + } + if (!stat.isDirectory()) { + throw new Error("The `cwd` option must be a path to a directory"); + } + }; + var getPathString = (p) => p.stats instanceof fs.Stats ? p.path : p; + var generateGlobTasks = (patterns, taskOptions) => { + patterns = arrayUnion([].concat(patterns)); + assertPatternsInput(patterns); + checkCwdOption(taskOptions); + const globTasks = []; + taskOptions = { + ignore: [], + expandDirectories: true, + ...taskOptions + }; + for (const [index, pattern] of patterns.entries()) { + if (isNegative(pattern)) { + continue; + } + const ignore = patterns.slice(index).filter((pattern2) => isNegative(pattern2)).map((pattern2) => pattern2.slice(1)); + const options = { + ...taskOptions, + ignore: taskOptions.ignore.concat(ignore) + }; + globTasks.push({ pattern, options }); + } + return globTasks; + }; + var globDirs = (task, fn2) => { + let options = {}; + if (task.options.cwd) { + options.cwd = task.options.cwd; + } + if (Array.isArray(task.options.expandDirectories)) { + options = { + ...options, + files: task.options.expandDirectories + }; + } else if (typeof task.options.expandDirectories === "object") { + options = { + ...options, + ...task.options.expandDirectories + }; + } + return fn2(task.pattern, options); + }; + var getPattern = (task, fn2) => task.options.expandDirectories ? globDirs(task, fn2) : [task.pattern]; + var getFilterSync = (options) => { + return options && options.gitignore ? gitignore.sync({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; + }; + var globToTask = (task) => (glob) => { + const { options } = task; + if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) { + options.ignore = dirGlob.sync(options.ignore); + } + return { + pattern: glob, + options + }; + }; + module2.exports = async (patterns, options) => { + const globTasks = generateGlobTasks(patterns, options); + const getFilter = async () => { + return options && options.gitignore ? gitignore({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; + }; + const getTasks = async () => { + const tasks2 = await Promise.all(globTasks.map(async (task) => { + const globs = await getPattern(task, dirGlob); + return Promise.all(globs.map(globToTask(task))); + })); + return arrayUnion(...tasks2); + }; + const [filter, tasks] = await Promise.all([getFilter(), getTasks()]); + const paths = await Promise.all(tasks.map((task) => fastGlob(task.pattern, task.options))); + return arrayUnion(...paths).filter((path_) => !filter(getPathString(path_))); + }; + module2.exports.sync = (patterns, options) => { + const globTasks = generateGlobTasks(patterns, options); + const tasks = []; + for (const task of globTasks) { + const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); + tasks.push(...newTask); + } + const filter = getFilterSync(options); + let matches = []; + for (const task of tasks) { + matches = arrayUnion(matches, fastGlob.sync(task.pattern, task.options)); + } + return matches.filter((path_) => !filter(path_)); + }; + module2.exports.stream = (patterns, options) => { + const globTasks = generateGlobTasks(patterns, options); + const tasks = []; + for (const task of globTasks) { + const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); + tasks.push(...newTask); + } + const filter = getFilterSync(options); + const filterStream = new FilterStream((p) => !filter(p)); + const uniqueStream = new UniqueStream(); + return merge2(tasks.map((task) => fastGlob.stream(task.pattern, task.options))).pipe(filterStream).pipe(uniqueStream); + }; + module2.exports.generateGlobTasks = generateGlobTasks; + module2.exports.hasMagic = (patterns, options) => [].concat(patterns).some((pattern) => fastGlob.isDynamicPattern(pattern, options)); + module2.exports.gitignore = gitignore; + } +}); + +// ../../node_modules/.pnpm/is-path-cwd@2.2.0/node_modules/is-path-cwd/index.js +var require_is_path_cwd = __commonJS({ + "../../node_modules/.pnpm/is-path-cwd@2.2.0/node_modules/is-path-cwd/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + module2.exports = (path_) => { + let cwd = process.cwd(); + path_ = path.resolve(path_); + if (process.platform === "win32") { + cwd = cwd.toLowerCase(); + path_ = path_.toLowerCase(); + } + return path_ === cwd; + }; + } +}); + +// ../../node_modules/.pnpm/is-path-inside@3.0.3/node_modules/is-path-inside/index.js +var require_is_path_inside = __commonJS({ + "../../node_modules/.pnpm/is-path-inside@3.0.3/node_modules/is-path-inside/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + module2.exports = (childPath, parentPath) => { + const relation = path.relative(parentPath, childPath); + return Boolean(relation && relation !== ".." && !relation.startsWith(`..${path.sep}`) && relation !== path.resolve(childPath)); + }; + } +}); + +// ../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js +var require_old = __commonJS({ + "../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js"(exports2) { + var pathModule = require("path"); + var isWindows = process.platform === "win32"; + var fs = require("fs"); + var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); + function rethrow() { + var callback; + if (DEBUG) { + var backtrace = new Error(); + callback = debugCallback; + } else + callback = missingCallback; + return callback; + function debugCallback(err) { + if (err) { + backtrace.message = err.message; + err = backtrace; + missingCallback(err); + } + } + function missingCallback(err) { + if (err) { + if (process.throwDeprecation) + throw err; + else if (!process.noDeprecation) { + var msg = "fs: missing callback " + (err.stack || err.message); + if (process.traceDeprecation) + console.trace(msg); + else + console.error(msg); + } + } + } + } + function maybeCallback(cb) { + return typeof cb === "function" ? cb : rethrow(); + } + var normalize = pathModule.normalize; + if (isWindows) { + nextPartRe = /(.*?)(?:[\/\\]+|$)/g; + } else { + nextPartRe = /(.*?)(?:[\/]+|$)/g; + } + var nextPartRe; + if (isWindows) { + splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; + } else { + splitRootRe = /^[\/]*/; + } + var splitRootRe; + exports2.realpathSync = function realpathSync(p, cache) { + p = pathModule.resolve(p); + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return cache[p]; + } + var original = p, seenLinks = {}, knownHard = {}; + var pos; + var current; + var base; + var previous; + start(); + function start() { + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ""; + if (isWindows && !knownHard[base]) { + fs.lstatSync(base); + knownHard[base] = true; + } + } + while (pos < p.length) { + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + if (knownHard[base] || cache && cache[base] === base) { + continue; + } + var resolvedLink; + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + resolvedLink = cache[base]; + } else { + var stat = fs.lstatSync(base); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) + cache[base] = base; + continue; + } + var linkTarget = null; + if (!isWindows) { + var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + linkTarget = seenLinks[id]; + } + } + if (linkTarget === null) { + fs.statSync(base); + linkTarget = fs.readlinkSync(base); + } + resolvedLink = pathModule.resolve(previous, linkTarget); + if (cache) + cache[base] = resolvedLink; + if (!isWindows) + seenLinks[id] = linkTarget; + } + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + if (cache) + cache[original] = p; + return p; + }; + exports2.realpath = function realpath(p, cache, cb) { + if (typeof cb !== "function") { + cb = maybeCallback(cache); + cache = null; + } + p = pathModule.resolve(p); + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return process.nextTick(cb.bind(null, null, cache[p])); + } + var original = p, seenLinks = {}, knownHard = {}; + var pos; + var current; + var base; + var previous; + start(); + function start() { + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ""; + if (isWindows && !knownHard[base]) { + fs.lstat(base, function(err) { + if (err) + return cb(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); + } + } + function LOOP() { + if (pos >= p.length) { + if (cache) + cache[original] = p; + return cb(null, p); + } + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + if (knownHard[base] || cache && cache[base] === base) { + return process.nextTick(LOOP); + } + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + return gotResolvedLink(cache[base]); + } + return fs.lstat(base, gotStat); + } + function gotStat(err, stat) { + if (err) + return cb(err); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) + cache[base] = base; + return process.nextTick(LOOP); + } + if (!isWindows) { + var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + return gotTarget(null, seenLinks[id], base); + } + } + fs.stat(base, function(err2) { + if (err2) + return cb(err2); + fs.readlink(base, function(err3, target) { + if (!isWindows) + seenLinks[id] = target; + gotTarget(err3, target); + }); + }); + } + function gotTarget(err, target, base2) { + if (err) + return cb(err); + var resolvedLink = pathModule.resolve(previous, target); + if (cache) + cache[base2] = resolvedLink; + gotResolvedLink(resolvedLink); + } + function gotResolvedLink(resolvedLink) { + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + }; + } +}); + +// ../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js +var require_fs5 = __commonJS({ + "../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js"(exports2, module2) { + module2.exports = realpath; + realpath.realpath = realpath; + realpath.sync = realpathSync; + realpath.realpathSync = realpathSync; + realpath.monkeypatch = monkeypatch; + realpath.unmonkeypatch = unmonkeypatch; + var fs = require("fs"); + var origRealpath = fs.realpath; + var origRealpathSync = fs.realpathSync; + var version = process.version; + var ok = /^v[0-5]\./.test(version); + var old = require_old(); + function newError(er) { + return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG"); + } + function realpath(p, cache, cb) { + if (ok) { + return origRealpath(p, cache, cb); + } + if (typeof cache === "function") { + cb = cache; + cache = null; + } + origRealpath(p, cache, function(er, result) { + if (newError(er)) { + old.realpath(p, cache, cb); + } else { + cb(er, result); + } + }); + } + function realpathSync(p, cache) { + if (ok) { + return origRealpathSync(p, cache); + } + try { + return origRealpathSync(p, cache); + } catch (er) { + if (newError(er)) { + return old.realpathSync(p, cache); + } else { + throw er; + } + } + } + function monkeypatch() { + fs.realpath = realpath; + fs.realpathSync = realpathSync; + } + function unmonkeypatch() { + fs.realpath = origRealpath; + fs.realpathSync = origRealpathSync; + } + } +}); + +// ../../node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/index.js +var require_concat_map = __commonJS({ + "../../node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/index.js"(exports2, module2) { + module2.exports = function(xs, fn2) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn2(xs[i], i); + if (isArray(x)) + res.push.apply(res, x); + else + res.push(x); + } + return res; + }; + var isArray = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + } +}); + +// ../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js +var require_balanced_match = __commonJS({ + "../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js"(exports2, module2) { + "use strict"; + module2.exports = balanced; + function balanced(a, b, str) { + if (a instanceof RegExp) + a = maybeMatch(a, str); + if (b instanceof RegExp) + b = maybeMatch(b, str); + var r = range(a, b, str); + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; + } + function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; + } + balanced.range = range; + function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + if (ai >= 0 && bi > 0) { + if (a === b) { + return [ai, bi]; + } + begs = []; + left = str.length; + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [begs.pop(), bi]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + bi = str.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length) { + result = [left, right]; + } + } + return result; + } + } +}); + +// ../../node_modules/.pnpm/brace-expansion@1.1.11/node_modules/brace-expansion/index.js +var require_brace_expansion = __commonJS({ + "../../node_modules/.pnpm/brace-expansion@1.1.11/node_modules/brace-expansion/index.js"(exports2, module2) { + var concatMap = require_concat_map(); + var balanced = require_balanced_match(); + module2.exports = expandTop; + var escSlash = "\0SLASH" + Math.random() + "\0"; + var escOpen = "\0OPEN" + Math.random() + "\0"; + var escClose = "\0CLOSE" + Math.random() + "\0"; + var escComma = "\0COMMA" + Math.random() + "\0"; + var escPeriod = "\0PERIOD" + Math.random() + "\0"; + function numeric(str) { + return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); + } + function escapeBraces(str) { + return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); + } + function unescapeBraces(str) { + return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); + } + function parseCommaParts(str) { + if (!str) + return [""]; + var parts = []; + var m = balanced("{", "}", str); + if (!m) + return str.split(","); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(","); + p[p.length - 1] += "{" + body + "}"; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; + } + function expandTop(str) { + if (!str) + return []; + if (str.substr(0, 2) === "{}") { + str = "\\{\\}" + str.substr(2); + } + return expand(escapeBraces(str), true).map(unescapeBraces); + } + function embrace(str) { + return "{" + str + "}"; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + function lte(i, y) { + return i <= y; + } + function gte(i, y) { + return i >= y; + } + function expand(str, isTop) { + var expansions = []; + var m = balanced("{", "}", str); + if (!m || /\$$/.test(m.pre)) + return [str]; + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,.*\}/)) { + str = m.pre + "{" + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length ? expand(m.post, false) : [""]; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + var pre = m.pre; + var post = m.post.length ? expand(m.post, false) : [""]; + var N; + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + N = []; + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") + c = ""; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) + c = "-" + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { + return expand(el, false); + }); + } + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + return expansions; + } + } +}); + +// ../../node_modules/.pnpm/minimatch@3.0.4/node_modules/minimatch/minimatch.js +var require_minimatch = __commonJS({ + "../../node_modules/.pnpm/minimatch@3.0.4/node_modules/minimatch/minimatch.js"(exports2, module2) { + module2.exports = minimatch; + minimatch.Minimatch = Minimatch; + var path = { sep: "/" }; + try { + path = require("path"); + } catch (er) { + } + var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var expand = require_brace_expansion(); + var plTypes = { + "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, + "?": { open: "(?:", close: ")?" }, + "+": { open: "(?:", close: ")+" }, + "*": { open: "(?:", close: ")*" }, + "@": { open: "(?:", close: ")" } + }; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials = charSet("().*{}+?[]^$\\!"); + function charSet(s) { + return s.split("").reduce(function(set, c) { + set[c] = true; + return set; + }, {}); + } + var slashSplit = /\/+/; + minimatch.filter = filter; + function filter(pattern, options) { + options = options || {}; + return function(p, i, list) { + return minimatch(p, pattern, options); + }; + } + function ext(a, b) { + a = a || {}; + b = b || {}; + var t = {}; + Object.keys(b).forEach(function(k) { + t[k] = b[k]; + }); + Object.keys(a).forEach(function(k) { + t[k] = a[k]; + }); + return t; + } + minimatch.defaults = function(def) { + if (!def || !Object.keys(def).length) + return minimatch; + var orig = minimatch; + var m = function minimatch2(p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)); + }; + m.Minimatch = function Minimatch2(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + return m; + }; + Minimatch.defaults = function(def) { + if (!def || !Object.keys(def).length) + return Minimatch; + return minimatch.defaults(def).Minimatch; + }; + function minimatch(p, pattern, options) { + if (typeof pattern !== "string") { + throw new TypeError("glob pattern string required"); + } + if (!options) + options = {}; + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } + if (pattern.trim() === "") + return p === ""; + return new Minimatch(pattern, options).match(p); + } + function Minimatch(pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options); + } + if (typeof pattern !== "string") { + throw new TypeError("glob pattern string required"); + } + if (!options) + options = {}; + pattern = pattern.trim(); + if (path.sep !== "/") { + pattern = pattern.split(path.sep).join("/"); + } + this.options = options; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.make(); + } + Minimatch.prototype.debug = function() { + }; + Minimatch.prototype.make = make; + function make() { + if (this._made) + return; + var pattern = this.pattern; + var options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + var set = this.globSet = this.braceExpand(); + if (options.debug) + this.debug = console.error; + this.debug(this.pattern, set); + set = this.globParts = set.map(function(s) { + return s.split(slashSplit); + }); + this.debug(this.pattern, set); + set = set.map(function(s, si, set2) { + return s.map(this.parse, this); + }, this); + this.debug(this.pattern, set); + set = set.filter(function(s) { + return s.indexOf(false) === -1; + }); + this.debug(this.pattern, set); + this.set = set; + } + Minimatch.prototype.parseNegate = parseNegate; + function parseNegate() { + var pattern = this.pattern; + var negate = false; + var options = this.options; + var negateOffset = 0; + if (options.nonegate) + return; + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { + negate = !negate; + negateOffset++; + } + if (negateOffset) + this.pattern = pattern.substr(negateOffset); + this.negate = negate; + } + minimatch.braceExpand = function(pattern, options) { + return braceExpand(pattern, options); + }; + Minimatch.prototype.braceExpand = braceExpand; + function braceExpand(pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options; + } else { + options = {}; + } + } + pattern = typeof pattern === "undefined" ? this.pattern : pattern; + if (typeof pattern === "undefined") { + throw new TypeError("undefined pattern"); + } + if (options.nobrace || !pattern.match(/\{.*\}/)) { + return [pattern]; + } + return expand(pattern); + } + Minimatch.prototype.parse = parse; + var SUBPARSE = {}; + function parse(pattern, isSub) { + if (pattern.length > 1024 * 64) { + throw new TypeError("pattern is too long"); + } + var options = this.options; + if (!options.noglobstar && pattern === "**") + return GLOBSTAR; + if (pattern === "") + return ""; + var re = ""; + var hasMagic = !!options.nocase; + var escaping = false; + var patternListStack = []; + var negativeLists = []; + var stateChar; + var inClass = false; + var reClassStart = -1; + var classStart = -1; + var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + var self2 = this; + function clearStateChar() { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; + } + self2.debug("clearStateChar %j %j", stateChar, re); + stateChar = false; + } + } + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + this.debug("%s %s %s %j", pattern, i, re, c); + if (escaping && reSpecials[c]) { + re += "\\" + c; + escaping = false; + continue; + } + switch (c) { + case "/": + return false; + case "\\": + clearStateChar(); + escaping = true; + continue; + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); + if (inClass) { + this.debug(" in class"); + if (c === "!" && i === classStart + 1) + c = "^"; + re += c; + continue; + } + self2.debug("call clearStateChar %j", stateChar); + clearStateChar(); + stateChar = c; + if (options.noext) + clearStateChar(); + continue; + case "(": + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }); + re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; + this.debug("plType %j %j", stateChar, re); + stateChar = false; + continue; + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + clearStateChar(); + hasMagic = true; + var pl = patternListStack.pop(); + re += pl.close; + if (pl.type === "!") { + negativeLists.push(pl); + } + pl.reEnd = re.length; + continue; + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + clearStateChar(); + re += "|"; + continue; + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + escaping = false; + continue; + } + if (inClass) { + var cs = pattern.substring(classStart + 1, i); + try { + RegExp("[" + cs + "]"); + } catch (er) { + var sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; + hasMagic = hasMagic || sp[1]; + inClass = false; + continue; + } + } + hasMagic = true; + inClass = false; + re += c; + continue; + default: + clearStateChar(); + if (escaping) { + escaping = false; + } else if (reSpecials[c] && !(c === "^" && inClass)) { + re += "\\"; + } + re += c; + } + } + if (inClass) { + cs = pattern.substr(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length); + this.debug("setting tail", re, pl); + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { + if (!$2) { + $2 = "\\"; + } + return $1 + $1 + $2 + "|"; + }); + this.debug("tail=%j\n %s", tail, tail, pl, re); + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) { + re += "\\\\"; + } + var addPatternStart = false; + switch (re.charAt(0)) { + case ".": + case "[": + case "(": + addPatternStart = true; + } + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n]; + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); + nlLast += nlAfter; + var openParensBefore = nlBefore.split("(").length - 1; + var cleanAfter = nlAfter; + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); + } + nlAfter = cleanAfter; + var dollar = ""; + if (nlAfter === "" && isSub !== SUBPARSE) { + dollar = "$"; + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; + re = newRe; + } + if (re !== "" && hasMagic) { + re = "(?=.)" + re; + } + if (addPatternStart) { + re = patternStart + re; + } + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + if (!hasMagic) { + return globUnescape(pattern); + } + var flags = options.nocase ? "i" : ""; + try { + var regExp = new RegExp("^" + re + "$", flags); + } catch (er) { + return new RegExp("$."); + } + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + minimatch.makeRe = function(pattern, options) { + return new Minimatch(pattern, options || {}).makeRe(); + }; + Minimatch.prototype.makeRe = makeRe; + function makeRe() { + if (this.regexp || this.regexp === false) + return this.regexp; + var set = this.set; + if (!set.length) { + this.regexp = false; + return this.regexp; + } + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + var flags = options.nocase ? "i" : ""; + var re = set.map(function(pattern) { + return pattern.map(function(p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) + re = "^(?!" + re + ").*$"; + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + return this.regexp; + } + minimatch.match = function(list, pattern, options) { + options = options || {}; + var mm = new Minimatch(pattern, options); + list = list.filter(function(f) { + return mm.match(f); + }); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; + }; + Minimatch.prototype.match = match; + function match(f, partial) { + this.debug("match", f, this.pattern); + if (this.comment) + return false; + if (this.empty) + return f === ""; + if (f === "/" && partial) + return true; + var options = this.options; + if (path.sep !== "/") { + f = f.split(path.sep).join("/"); + } + f = f.split(slashSplit); + this.debug(this.pattern, "split", f); + var set = this.set; + this.debug(this.pattern, "set", set); + var filename; + var i; + for (i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) + break; + } + for (i = 0; i < set.length; i++) { + var pattern = set[i]; + var file = f; + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + var hit = this.matchOne(file, pattern, partial); + if (hit) { + if (options.flipNegate) + return true; + return !this.negate; + } + } + if (options.flipNegate) + return false; + return this.negate; + } + Minimatch.prototype.matchOne = function(file, pattern, partial) { + var options = this.options; + this.debug("matchOne", { "this": this, file, pattern }); + this.debug("matchOne", file.length, pattern.length); + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug("matchOne loop"); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); + if (p === false) + return false; + if (p === GLOBSTAR) { + this.debug("GLOBSTAR", [pattern, p, f]); + var fr = fi; + var pr = pi + 1; + if (pr === pl) { + this.debug("** at the end"); + for (; fi < fl; fi++) { + if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") + return false; + } + return true; + } + while (fr < fl) { + var swallowee = file[fr]; + this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug("globstar found match!", fr, fl, swallowee); + return true; + } else { + if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { + this.debug("dot detected!", file, fr, pattern, pr); + break; + } + this.debug("globstar swallow a segment, and continue"); + fr++; + } + } + if (partial) { + this.debug("\n>>> no match, partial?", file, fr, pattern, pr); + if (fr === fl) + return true; + } + return false; + } + var hit; + if (typeof p === "string") { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase(); + } else { + hit = f === p; + } + this.debug("string match", p, f, hit); + } else { + hit = f.match(p); + this.debug("pattern match", p, f, hit); + } + if (!hit) + return false; + } + if (fi === fl && pi === pl) { + return true; + } else if (fi === fl) { + return partial; + } else if (pi === pl) { + var emptyFileEnd = fi === fl - 1 && file[fi] === ""; + return emptyFileEnd; + } + throw new Error("wtf?"); + }; + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); + } + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } + } +}); + +// ../../node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js +var require_path_is_absolute = __commonJS({ + "../../node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js"(exports2, module2) { + "use strict"; + function posix(path) { + return path.charAt(0) === "/"; + } + function win32(path) { + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ""; + var isUnc = Boolean(device && device.charAt(1) !== ":"); + return Boolean(result[2] || isUnc); + } + module2.exports = process.platform === "win32" ? win32 : posix; + module2.exports.posix = posix; + module2.exports.win32 = win32; + } +}); + +// ../../node_modules/.pnpm/glob@7.2.0/node_modules/glob/common.js +var require_common7 = __commonJS({ + "../../node_modules/.pnpm/glob@7.2.0/node_modules/glob/common.js"(exports2) { + exports2.setopts = setopts; + exports2.ownProp = ownProp; + exports2.makeAbs = makeAbs; + exports2.finish = finish; + exports2.mark = mark; + exports2.isIgnored = isIgnored; + exports2.childrenIgnored = childrenIgnored; + function ownProp(obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field); + } + var fs = require("fs"); + var path = require("path"); + var minimatch = require_minimatch(); + var isAbsolute = require_path_is_absolute(); + var Minimatch = minimatch.Minimatch; + function alphasort(a, b) { + return a.localeCompare(b, "en"); + } + function setupIgnores(self2, options) { + self2.ignore = options.ignore || []; + if (!Array.isArray(self2.ignore)) + self2.ignore = [self2.ignore]; + if (self2.ignore.length) { + self2.ignore = self2.ignore.map(ignoreMap); + } + } + function ignoreMap(pattern) { + var gmatcher = null; + if (pattern.slice(-3) === "/**") { + var gpattern = pattern.replace(/(\/\*\*)+$/, ""); + gmatcher = new Minimatch(gpattern, { dot: true }); + } + return { + matcher: new Minimatch(pattern, { dot: true }), + gmatcher + }; + } + function setopts(self2, pattern, options) { + if (!options) + options = {}; + if (options.matchBase && pattern.indexOf("/") === -1) { + if (options.noglobstar) { + throw new Error("base matching requires globstar"); + } + pattern = "**/" + pattern; + } + self2.silent = !!options.silent; + self2.pattern = pattern; + self2.strict = options.strict !== false; + self2.realpath = !!options.realpath; + self2.realpathCache = options.realpathCache || Object.create(null); + self2.follow = !!options.follow; + self2.dot = !!options.dot; + self2.mark = !!options.mark; + self2.nodir = !!options.nodir; + if (self2.nodir) + self2.mark = true; + self2.sync = !!options.sync; + self2.nounique = !!options.nounique; + self2.nonull = !!options.nonull; + self2.nosort = !!options.nosort; + self2.nocase = !!options.nocase; + self2.stat = !!options.stat; + self2.noprocess = !!options.noprocess; + self2.absolute = !!options.absolute; + self2.fs = options.fs || fs; + self2.maxLength = options.maxLength || Infinity; + self2.cache = options.cache || Object.create(null); + self2.statCache = options.statCache || Object.create(null); + self2.symlinks = options.symlinks || Object.create(null); + setupIgnores(self2, options); + self2.changedCwd = false; + var cwd = process.cwd(); + if (!ownProp(options, "cwd")) + self2.cwd = cwd; + else { + self2.cwd = path.resolve(options.cwd); + self2.changedCwd = self2.cwd !== cwd; + } + self2.root = options.root || path.resolve(self2.cwd, "/"); + self2.root = path.resolve(self2.root); + if (process.platform === "win32") + self2.root = self2.root.replace(/\\/g, "/"); + self2.cwdAbs = isAbsolute(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd); + if (process.platform === "win32") + self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/"); + self2.nomount = !!options.nomount; + options.nonegate = true; + options.nocomment = true; + self2.minimatch = new Minimatch(pattern, options); + self2.options = self2.minimatch.options; + } + function finish(self2) { + var nou = self2.nounique; + var all = nou ? [] : Object.create(null); + for (var i = 0, l = self2.matches.length; i < l; i++) { + var matches = self2.matches[i]; + if (!matches || Object.keys(matches).length === 0) { + if (self2.nonull) { + var literal = self2.minimatch.globSet[i]; + if (nou) + all.push(literal); + else + all[literal] = true; + } + } else { + var m = Object.keys(matches); + if (nou) + all.push.apply(all, m); + else + m.forEach(function(m2) { + all[m2] = true; + }); + } + } + if (!nou) + all = Object.keys(all); + if (!self2.nosort) + all = all.sort(alphasort); + if (self2.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self2._mark(all[i]); + } + if (self2.nodir) { + all = all.filter(function(e) { + var notDir = !/\/$/.test(e); + var c = self2.cache[e] || self2.cache[makeAbs(self2, e)]; + if (notDir && c) + notDir = c !== "DIR" && !Array.isArray(c); + return notDir; + }); + } + } + if (self2.ignore.length) + all = all.filter(function(m2) { + return !isIgnored(self2, m2); + }); + self2.found = all; + } + function mark(self2, p) { + var abs = makeAbs(self2, p); + var c = self2.cache[abs]; + var m = p; + if (c) { + var isDir = c === "DIR" || Array.isArray(c); + var slash = p.slice(-1) === "/"; + if (isDir && !slash) + m += "/"; + else if (!isDir && slash) + m = m.slice(0, -1); + if (m !== p) { + var mabs = makeAbs(self2, m); + self2.statCache[mabs] = self2.statCache[abs]; + self2.cache[mabs] = self2.cache[abs]; + } + } + return m; + } + function makeAbs(self2, f) { + var abs = f; + if (f.charAt(0) === "/") { + abs = path.join(self2.root, f); + } else if (isAbsolute(f) || f === "") { + abs = f; + } else if (self2.changedCwd) { + abs = path.resolve(self2.cwd, f); + } else { + abs = path.resolve(f); + } + if (process.platform === "win32") + abs = abs.replace(/\\/g, "/"); + return abs; + } + function isIgnored(self2, path2) { + if (!self2.ignore.length) + return false; + return self2.ignore.some(function(item) { + return item.matcher.match(path2) || !!(item.gmatcher && item.gmatcher.match(path2)); + }); + } + function childrenIgnored(self2, path2) { + if (!self2.ignore.length) + return false; + return self2.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path2)); + }); + } + } +}); + +// ../../node_modules/.pnpm/glob@7.2.0/node_modules/glob/sync.js +var require_sync7 = __commonJS({ + "../../node_modules/.pnpm/glob@7.2.0/node_modules/glob/sync.js"(exports2, module2) { + module2.exports = globSync; + globSync.GlobSync = GlobSync; + var rp = require_fs5(); + var minimatch = require_minimatch(); + var Minimatch = minimatch.Minimatch; + var Glob = require_glob().Glob; + var util = require("util"); + var path = require("path"); + var assert = require("assert"); + var isAbsolute = require_path_is_absolute(); + var common = require_common7(); + var setopts = common.setopts; + var ownProp = common.ownProp; + var childrenIgnored = common.childrenIgnored; + var isIgnored = common.isIgnored; + function globSync(pattern, options) { + if (typeof options === "function" || arguments.length === 3) + throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); + return new GlobSync(pattern, options).found; + } + function GlobSync(pattern, options) { + if (!pattern) + throw new Error("must provide pattern"); + if (typeof options === "function" || arguments.length === 3) + throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options); + setopts(this, pattern, options); + if (this.noprocess) + return this; + var n = this.minimatch.set.length; + this.matches = new Array(n); + for (var i = 0; i < n; i++) { + this._process(this.minimatch.set[i], i, false); + } + this._finish(); + } + GlobSync.prototype._finish = function() { + assert(this instanceof GlobSync); + if (this.realpath) { + var self2 = this; + this.matches.forEach(function(matchset, index) { + var set = self2.matches[index] = Object.create(null); + for (var p in matchset) { + try { + p = self2._makeAbs(p); + var real = rp.realpathSync(p, self2.realpathCache); + set[real] = true; + } catch (er) { + if (er.syscall === "stat") + set[self2._makeAbs(p)] = true; + else + throw er; + } + } + }); + } + common.finish(this); + }; + GlobSync.prototype._process = function(pattern, index, inGlobStar) { + assert(this instanceof GlobSync); + var n = 0; + while (typeof pattern[n] === "string") { + n++; + } + var prefix; + switch (n) { + case pattern.length: + this._processSimple(pattern.join("/"), index); + return; + case 0: + prefix = null; + break; + default: + prefix = pattern.slice(0, n).join("/"); + break; + } + var remain = pattern.slice(n); + var read; + if (prefix === null) + read = "."; + else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { + if (!prefix || !isAbsolute(prefix)) + prefix = "/" + prefix; + read = prefix; + } else + read = prefix; + var abs = this._makeAbs(read); + if (childrenIgnored(this, read)) + return; + var isGlobStar = remain[0] === minimatch.GLOBSTAR; + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar); + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar); + }; + GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar); + if (!entries) + return; + var pn = remain[0]; + var negate = !!this.minimatch.negate; + var rawGlob = pn._glob; + var dotOk = this.dot || rawGlob.charAt(0) === "."; + var matchedEntries = []; + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (e.charAt(0) !== "." || dotOk) { + var m; + if (negate && !prefix) { + m = !e.match(pn); + } else { + m = e.match(pn); + } + if (m) + matchedEntries.push(e); + } + } + var len = matchedEntries.length; + if (len === 0) + return; + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + if (prefix) { + if (prefix.slice(-1) !== "/") + e = prefix + "/" + e; + else + e = prefix + e; + } + if (e.charAt(0) === "/" && !this.nomount) { + e = path.join(this.root, e); + } + this._emitMatch(index, e); + } + return; + } + remain.shift(); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + var newPattern; + if (prefix) + newPattern = [prefix, e]; + else + newPattern = [e]; + this._process(newPattern.concat(remain), index, inGlobStar); + } + }; + GlobSync.prototype._emitMatch = function(index, e) { + if (isIgnored(this, e)) + return; + var abs = this._makeAbs(e); + if (this.mark) + e = this._mark(e); + if (this.absolute) { + e = abs; + } + if (this.matches[index][e]) + return; + if (this.nodir) { + var c = this.cache[abs]; + if (c === "DIR" || Array.isArray(c)) + return; + } + this.matches[index][e] = true; + if (this.stat) + this._stat(e); + }; + GlobSync.prototype._readdirInGlobStar = function(abs) { + if (this.follow) + return this._readdir(abs, false); + var entries; + var lstat; + var stat; + try { + lstat = this.fs.lstatSync(abs); + } catch (er) { + if (er.code === "ENOENT") { + return null; + } + } + var isSym = lstat && lstat.isSymbolicLink(); + this.symlinks[abs] = isSym; + if (!isSym && lstat && !lstat.isDirectory()) + this.cache[abs] = "FILE"; + else + entries = this._readdir(abs, false); + return entries; + }; + GlobSync.prototype._readdir = function(abs, inGlobStar) { + var entries; + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs); + if (ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (!c || c === "FILE") + return null; + if (Array.isArray(c)) + return c; + } + try { + return this._readdirEntries(abs, this.fs.readdirSync(abs)); + } catch (er) { + this._readdirError(abs, er); + return null; + } + }; + GlobSync.prototype._readdirEntries = function(abs, entries) { + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (abs === "/") + e = abs + e; + else + e = abs + "/" + e; + this.cache[e] = true; + } + } + this.cache[abs] = entries; + return entries; + }; + GlobSync.prototype._readdirError = function(f, er) { + switch (er.code) { + case "ENOTSUP": + case "ENOTDIR": + var abs = this._makeAbs(f); + this.cache[abs] = "FILE"; + if (abs === this.cwdAbs) { + var error = new Error(er.code + " invalid cwd " + this.cwd); + error.path = this.cwd; + error.code = er.code; + throw error; + } + break; + case "ENOENT": + case "ELOOP": + case "ENAMETOOLONG": + case "UNKNOWN": + this.cache[this._makeAbs(f)] = false; + break; + default: + this.cache[this._makeAbs(f)] = false; + if (this.strict) + throw er; + if (!this.silent) + console.error("glob error", er); + break; + } + }; + GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar); + if (!entries) + return; + var remainWithoutGlobStar = remain.slice(1); + var gspref = prefix ? [prefix] : []; + var noGlobStar = gspref.concat(remainWithoutGlobStar); + this._process(noGlobStar, index, false); + var len = entries.length; + var isSym = this.symlinks[abs]; + if (isSym && inGlobStar) + return; + for (var i = 0; i < len; i++) { + var e = entries[i]; + if (e.charAt(0) === "." && !this.dot) + continue; + var instead = gspref.concat(entries[i], remainWithoutGlobStar); + this._process(instead, index, true); + var below = gspref.concat(entries[i], remain); + this._process(below, index, true); + } + }; + GlobSync.prototype._processSimple = function(prefix, index) { + var exists = this._stat(prefix); + if (!this.matches[index]) + this.matches[index] = Object.create(null); + if (!exists) + return; + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix); + if (prefix.charAt(0) === "/") { + prefix = path.join(this.root, prefix); + } else { + prefix = path.resolve(this.root, prefix); + if (trail) + prefix += "/"; + } + } + if (process.platform === "win32") + prefix = prefix.replace(/\\/g, "/"); + this._emitMatch(index, prefix); + }; + GlobSync.prototype._stat = function(f) { + var abs = this._makeAbs(f); + var needDir = f.slice(-1) === "/"; + if (f.length > this.maxLength) + return false; + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (Array.isArray(c)) + c = "DIR"; + if (!needDir || c === "DIR") + return c; + if (needDir && c === "FILE") + return false; + } + var exists; + var stat = this.statCache[abs]; + if (!stat) { + var lstat; + try { + lstat = this.fs.lstatSync(abs); + } catch (er) { + if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { + this.statCache[abs] = false; + return false; + } + } + if (lstat && lstat.isSymbolicLink()) { + try { + stat = this.fs.statSync(abs); + } catch (er) { + stat = lstat; + } + } else { + stat = lstat; + } + } + this.statCache[abs] = stat; + var c = true; + if (stat) + c = stat.isDirectory() ? "DIR" : "FILE"; + this.cache[abs] = this.cache[abs] || c; + if (needDir && c === "FILE") + return false; + return c; + }; + GlobSync.prototype._mark = function(p) { + return common.mark(this, p); + }; + GlobSync.prototype._makeAbs = function(f) { + return common.makeAbs(this, f); + }; + } +}); + +// ../../node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js +var require_inflight = __commonJS({ + "../../node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js"(exports2, module2) { + var wrappy = require_wrappy(); + var reqs = Object.create(null); + var once = require_once(); + module2.exports = wrappy(inflight); + function inflight(key, cb) { + if (reqs[key]) { + reqs[key].push(cb); + return null; + } else { + reqs[key] = [cb]; + return makeres(key); + } + } + function makeres(key) { + return once(function RES() { + var cbs = reqs[key]; + var len = cbs.length; + var args2 = slice(arguments); + try { + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args2); + } + } finally { + if (cbs.length > len) { + cbs.splice(0, len); + process.nextTick(function() { + RES.apply(null, args2); + }); + } else { + delete reqs[key]; + } + } + }); + } + function slice(args2) { + var length = args2.length; + var array = []; + for (var i = 0; i < length; i++) + array[i] = args2[i]; + return array; + } + } +}); + +// ../../node_modules/.pnpm/glob@7.2.0/node_modules/glob/glob.js +var require_glob = __commonJS({ + "../../node_modules/.pnpm/glob@7.2.0/node_modules/glob/glob.js"(exports2, module2) { + module2.exports = glob; + var rp = require_fs5(); + var minimatch = require_minimatch(); + var Minimatch = minimatch.Minimatch; + var inherits = require_inherits(); + var EE = require("events").EventEmitter; + var path = require("path"); + var assert = require("assert"); + var isAbsolute = require_path_is_absolute(); + var globSync = require_sync7(); + var common = require_common7(); + var setopts = common.setopts; + var ownProp = common.ownProp; + var inflight = require_inflight(); + var util = require("util"); + var childrenIgnored = common.childrenIgnored; + var isIgnored = common.isIgnored; + var once = require_once(); + function glob(pattern, options, cb) { + if (typeof options === "function") + cb = options, options = {}; + if (!options) + options = {}; + if (options.sync) { + if (cb) + throw new TypeError("callback provided to sync glob"); + return globSync(pattern, options); + } + return new Glob(pattern, options, cb); + } + glob.sync = globSync; + var GlobSync = glob.GlobSync = globSync.GlobSync; + glob.glob = glob; + function extend(origin, add) { + if (add === null || typeof add !== "object") { + return origin; + } + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; + } + glob.hasMagic = function(pattern, options_) { + var options = extend({}, options_); + options.noprocess = true; + var g = new Glob(pattern, options); + var set = g.minimatch.set; + if (!pattern) + return false; + if (set.length > 1) + return true; + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== "string") + return true; + } + return false; + }; + glob.Glob = Glob; + inherits(Glob, EE); + function Glob(pattern, options, cb) { + if (typeof options === "function") { + cb = options; + options = null; + } + if (options && options.sync) { + if (cb) + throw new TypeError("callback provided to sync glob"); + return new GlobSync(pattern, options); + } + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb); + setopts(this, pattern, options); + this._didRealPath = false; + var n = this.minimatch.set.length; + this.matches = new Array(n); + if (typeof cb === "function") { + cb = once(cb); + this.on("error", cb); + this.on("end", function(matches) { + cb(null, matches); + }); + } + var self2 = this; + this._processing = 0; + this._emitQueue = []; + this._processQueue = []; + this.paused = false; + if (this.noprocess) + return this; + if (n === 0) + return done(); + var sync = true; + for (var i = 0; i < n; i++) { + this._process(this.minimatch.set[i], i, false, done); + } + sync = false; + function done() { + --self2._processing; + if (self2._processing <= 0) { + if (sync) { + process.nextTick(function() { + self2._finish(); + }); + } else { + self2._finish(); + } + } + } + } + Glob.prototype._finish = function() { + assert(this instanceof Glob); + if (this.aborted) + return; + if (this.realpath && !this._didRealpath) + return this._realpath(); + common.finish(this); + this.emit("end", this.found); + }; + Glob.prototype._realpath = function() { + if (this._didRealpath) + return; + this._didRealpath = true; + var n = this.matches.length; + if (n === 0) + return this._finish(); + var self2 = this; + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next); + function next() { + if (--n === 0) + self2._finish(); + } + }; + Glob.prototype._realpathSet = function(index, cb) { + var matchset = this.matches[index]; + if (!matchset) + return cb(); + var found = Object.keys(matchset); + var self2 = this; + var n = found.length; + if (n === 0) + return cb(); + var set = this.matches[index] = Object.create(null); + found.forEach(function(p, i) { + p = self2._makeAbs(p); + rp.realpath(p, self2.realpathCache, function(er, real) { + if (!er) + set[real] = true; + else if (er.syscall === "stat") + set[p] = true; + else + self2.emit("error", er); + if (--n === 0) { + self2.matches[index] = set; + cb(); + } + }); + }); + }; + Glob.prototype._mark = function(p) { + return common.mark(this, p); + }; + Glob.prototype._makeAbs = function(f) { + return common.makeAbs(this, f); + }; + Glob.prototype.abort = function() { + this.aborted = true; + this.emit("abort"); + }; + Glob.prototype.pause = function() { + if (!this.paused) { + this.paused = true; + this.emit("pause"); + } + }; + Glob.prototype.resume = function() { + if (this.paused) { + this.emit("resume"); + this.paused = false; + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0); + this._emitQueue.length = 0; + for (var i = 0; i < eq.length; i++) { + var e = eq[i]; + this._emitMatch(e[0], e[1]); + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0); + this._processQueue.length = 0; + for (var i = 0; i < pq.length; i++) { + var p = pq[i]; + this._processing--; + this._process(p[0], p[1], p[2], p[3]); + } + } + } + }; + Glob.prototype._process = function(pattern, index, inGlobStar, cb) { + assert(this instanceof Glob); + assert(typeof cb === "function"); + if (this.aborted) + return; + this._processing++; + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]); + return; + } + var n = 0; + while (typeof pattern[n] === "string") { + n++; + } + var prefix; + switch (n) { + case pattern.length: + this._processSimple(pattern.join("/"), index, cb); + return; + case 0: + prefix = null; + break; + default: + prefix = pattern.slice(0, n).join("/"); + break; + } + var remain = pattern.slice(n); + var read; + if (prefix === null) + read = "."; + else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { + if (!prefix || !isAbsolute(prefix)) + prefix = "/" + prefix; + read = prefix; + } else + read = prefix; + var abs = this._makeAbs(read); + if (childrenIgnored(this, read)) + return cb(); + var isGlobStar = remain[0] === minimatch.GLOBSTAR; + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb); + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); + }; + Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) { + var self2 = this; + this._readdir(abs, inGlobStar, function(er, entries) { + return self2._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb); + }); + }; + Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { + if (!entries) + return cb(); + var pn = remain[0]; + var negate = !!this.minimatch.negate; + var rawGlob = pn._glob; + var dotOk = this.dot || rawGlob.charAt(0) === "."; + var matchedEntries = []; + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (e.charAt(0) !== "." || dotOk) { + var m; + if (negate && !prefix) { + m = !e.match(pn); + } else { + m = e.match(pn); + } + if (m) + matchedEntries.push(e); + } + } + var len = matchedEntries.length; + if (len === 0) + return cb(); + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + if (prefix) { + if (prefix !== "/") + e = prefix + "/" + e; + else + e = prefix + e; + } + if (e.charAt(0) === "/" && !this.nomount) { + e = path.join(this.root, e); + } + this._emitMatch(index, e); + } + return cb(); + } + remain.shift(); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + var newPattern; + if (prefix) { + if (prefix !== "/") + e = prefix + "/" + e; + else + e = prefix + e; + } + this._process([e].concat(remain), index, inGlobStar, cb); + } + cb(); + }; + Glob.prototype._emitMatch = function(index, e) { + if (this.aborted) + return; + if (isIgnored(this, e)) + return; + if (this.paused) { + this._emitQueue.push([index, e]); + return; + } + var abs = isAbsolute(e) ? e : this._makeAbs(e); + if (this.mark) + e = this._mark(e); + if (this.absolute) + e = abs; + if (this.matches[index][e]) + return; + if (this.nodir) { + var c = this.cache[abs]; + if (c === "DIR" || Array.isArray(c)) + return; + } + this.matches[index][e] = true; + var st = this.statCache[abs]; + if (st) + this.emit("stat", e, st); + this.emit("match", e); + }; + Glob.prototype._readdirInGlobStar = function(abs, cb) { + if (this.aborted) + return; + if (this.follow) + return this._readdir(abs, false, cb); + var lstatkey = "lstat\0" + abs; + var self2 = this; + var lstatcb = inflight(lstatkey, lstatcb_); + if (lstatcb) + self2.fs.lstat(abs, lstatcb); + function lstatcb_(er, lstat) { + if (er && er.code === "ENOENT") + return cb(); + var isSym = lstat && lstat.isSymbolicLink(); + self2.symlinks[abs] = isSym; + if (!isSym && lstat && !lstat.isDirectory()) { + self2.cache[abs] = "FILE"; + cb(); + } else + self2._readdir(abs, false, cb); + } + }; + Glob.prototype._readdir = function(abs, inGlobStar, cb) { + if (this.aborted) + return; + cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb); + if (!cb) + return; + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb); + if (ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (!c || c === "FILE") + return cb(); + if (Array.isArray(c)) + return cb(null, c); + } + var self2 = this; + self2.fs.readdir(abs, readdirCb(this, abs, cb)); + }; + function readdirCb(self2, abs, cb) { + return function(er, entries) { + if (er) + self2._readdirError(abs, er, cb); + else + self2._readdirEntries(abs, entries, cb); + }; + } + Glob.prototype._readdirEntries = function(abs, entries, cb) { + if (this.aborted) + return; + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (abs === "/") + e = abs + e; + else + e = abs + "/" + e; + this.cache[e] = true; + } + } + this.cache[abs] = entries; + return cb(null, entries); + }; + Glob.prototype._readdirError = function(f, er, cb) { + if (this.aborted) + return; + switch (er.code) { + case "ENOTSUP": + case "ENOTDIR": + var abs = this._makeAbs(f); + this.cache[abs] = "FILE"; + if (abs === this.cwdAbs) { + var error = new Error(er.code + " invalid cwd " + this.cwd); + error.path = this.cwd; + error.code = er.code; + this.emit("error", error); + this.abort(); + } + break; + case "ENOENT": + case "ELOOP": + case "ENAMETOOLONG": + case "UNKNOWN": + this.cache[this._makeAbs(f)] = false; + break; + default: + this.cache[this._makeAbs(f)] = false; + if (this.strict) { + this.emit("error", er); + this.abort(); + } + if (!this.silent) + console.error("glob error", er); + break; + } + return cb(); + }; + Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) { + var self2 = this; + this._readdir(abs, inGlobStar, function(er, entries) { + self2._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); + }); + }; + Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { + if (!entries) + return cb(); + var remainWithoutGlobStar = remain.slice(1); + var gspref = prefix ? [prefix] : []; + var noGlobStar = gspref.concat(remainWithoutGlobStar); + this._process(noGlobStar, index, false, cb); + var isSym = this.symlinks[abs]; + var len = entries.length; + if (isSym && inGlobStar) + return cb(); + for (var i = 0; i < len; i++) { + var e = entries[i]; + if (e.charAt(0) === "." && !this.dot) + continue; + var instead = gspref.concat(entries[i], remainWithoutGlobStar); + this._process(instead, index, true, cb); + var below = gspref.concat(entries[i], remain); + this._process(below, index, true, cb); + } + cb(); + }; + Glob.prototype._processSimple = function(prefix, index, cb) { + var self2 = this; + this._stat(prefix, function(er, exists) { + self2._processSimple2(prefix, index, er, exists, cb); + }); + }; + Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) { + if (!this.matches[index]) + this.matches[index] = Object.create(null); + if (!exists) + return cb(); + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix); + if (prefix.charAt(0) === "/") { + prefix = path.join(this.root, prefix); + } else { + prefix = path.resolve(this.root, prefix); + if (trail) + prefix += "/"; + } + } + if (process.platform === "win32") + prefix = prefix.replace(/\\/g, "/"); + this._emitMatch(index, prefix); + cb(); + }; + Glob.prototype._stat = function(f, cb) { + var abs = this._makeAbs(f); + var needDir = f.slice(-1) === "/"; + if (f.length > this.maxLength) + return cb(); + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (Array.isArray(c)) + c = "DIR"; + if (!needDir || c === "DIR") + return cb(null, c); + if (needDir && c === "FILE") + return cb(); + } + var exists; + var stat = this.statCache[abs]; + if (stat !== void 0) { + if (stat === false) + return cb(null, stat); + else { + var type = stat.isDirectory() ? "DIR" : "FILE"; + if (needDir && type === "FILE") + return cb(); + else + return cb(null, type, stat); + } + } + var self2 = this; + var statcb = inflight("stat\0" + abs, lstatcb_); + if (statcb) + self2.fs.lstat(abs, statcb); + function lstatcb_(er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + return self2.fs.stat(abs, function(er2, stat2) { + if (er2) + self2._stat2(f, abs, null, lstat, cb); + else + self2._stat2(f, abs, er2, stat2, cb); + }); + } else { + self2._stat2(f, abs, er, lstat, cb); + } + } + }; + Glob.prototype._stat2 = function(f, abs, er, stat, cb) { + if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { + this.statCache[abs] = false; + return cb(); + } + var needDir = f.slice(-1) === "/"; + this.statCache[abs] = stat; + if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) + return cb(null, false, stat); + var c = true; + if (stat) + c = stat.isDirectory() ? "DIR" : "FILE"; + this.cache[abs] = this.cache[abs] || c; + if (needDir && c === "FILE") + return cb(); + return cb(null, c, stat); + }; + } +}); + +// ../../node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/rimraf.js +var require_rimraf2 = __commonJS({ + "../../node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/rimraf.js"(exports2, module2) { + var assert = require("assert"); + var path = require("path"); + var fs = require("fs"); + var glob = void 0; + try { + glob = require_glob(); + } catch (_err) { + } + var defaultGlobOpts = { + nosort: true, + silent: true + }; + var timeout = 0; + var isWindows = process.platform === "win32"; + var defaults = (options) => { + const methods = [ + "unlink", + "chmod", + "stat", + "lstat", + "rmdir", + "readdir" + ]; + methods.forEach((m) => { + options[m] = options[m] || fs[m]; + m = m + "Sync"; + options[m] = options[m] || fs[m]; + }); + options.maxBusyTries = options.maxBusyTries || 3; + options.emfileWait = options.emfileWait || 1e3; + if (options.glob === false) { + options.disableGlob = true; + } + if (options.disableGlob !== true && glob === void 0) { + throw Error("glob dependency not found, set `options.disableGlob = true` if intentional"); + } + options.disableGlob = options.disableGlob || false; + options.glob = options.glob || defaultGlobOpts; + }; + var rimraf = (p, options, cb) => { + if (typeof options === "function") { + cb = options; + options = {}; + } + assert(p, "rimraf: missing path"); + assert.equal(typeof p, "string", "rimraf: path should be a string"); + assert.equal(typeof cb, "function", "rimraf: callback function required"); + assert(options, "rimraf: invalid options argument provided"); + assert.equal(typeof options, "object", "rimraf: options should be object"); + defaults(options); + let busyTries = 0; + let errState = null; + let n = 0; + const next = (er) => { + errState = errState || er; + if (--n === 0) + cb(errState); + }; + const afterGlob = (er, results) => { + if (er) + return cb(er); + n = results.length; + if (n === 0) + return cb(); + results.forEach((p2) => { + const CB = (er2) => { + if (er2) { + if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) { + busyTries++; + return setTimeout(() => rimraf_(p2, options, CB), busyTries * 100); + } + if (er2.code === "EMFILE" && timeout < options.emfileWait) { + return setTimeout(() => rimraf_(p2, options, CB), timeout++); + } + if (er2.code === "ENOENT") + er2 = null; + } + timeout = 0; + next(er2); + }; + rimraf_(p2, options, CB); + }); + }; + if (options.disableGlob || !glob.hasMagic(p)) + return afterGlob(null, [p]); + options.lstat(p, (er, stat) => { + if (!er) + return afterGlob(null, [p]); + glob(p, options.glob, afterGlob); + }); + }; + var rimraf_ = (p, options, cb) => { + assert(p); + assert(options); + assert(typeof cb === "function"); + options.lstat(p, (er, st) => { + if (er && er.code === "ENOENT") + return cb(null); + if (er && er.code === "EPERM" && isWindows) + fixWinEPERM(p, options, er, cb); + if (st && st.isDirectory()) + return rmdir(p, options, er, cb); + options.unlink(p, (er2) => { + if (er2) { + if (er2.code === "ENOENT") + return cb(null); + if (er2.code === "EPERM") + return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb); + if (er2.code === "EISDIR") + return rmdir(p, options, er2, cb); + } + return cb(er2); + }); + }); + }; + var fixWinEPERM = (p, options, er, cb) => { + assert(p); + assert(options); + assert(typeof cb === "function"); + options.chmod(p, 438, (er2) => { + if (er2) + cb(er2.code === "ENOENT" ? null : er); + else + options.stat(p, (er3, stats) => { + if (er3) + cb(er3.code === "ENOENT" ? null : er); + else if (stats.isDirectory()) + rmdir(p, options, er, cb); + else + options.unlink(p, cb); + }); + }); + }; + var fixWinEPERMSync = (p, options, er) => { + assert(p); + assert(options); + try { + options.chmodSync(p, 438); + } catch (er2) { + if (er2.code === "ENOENT") + return; + else + throw er; + } + let stats; + try { + stats = options.statSync(p); + } catch (er3) { + if (er3.code === "ENOENT") + return; + else + throw er; + } + if (stats.isDirectory()) + rmdirSync(p, options, er); + else + options.unlinkSync(p); + }; + var rmdir = (p, options, originalEr, cb) => { + assert(p); + assert(options); + assert(typeof cb === "function"); + options.rmdir(p, (er) => { + if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) + rmkids(p, options, cb); + else if (er && er.code === "ENOTDIR") + cb(originalEr); + else + cb(er); + }); + }; + var rmkids = (p, options, cb) => { + assert(p); + assert(options); + assert(typeof cb === "function"); + options.readdir(p, (er, files) => { + if (er) + return cb(er); + let n = files.length; + if (n === 0) + return options.rmdir(p, cb); + let errState; + files.forEach((f) => { + rimraf(path.join(p, f), options, (er2) => { + if (errState) + return; + if (er2) + return cb(errState = er2); + if (--n === 0) + options.rmdir(p, cb); + }); + }); + }); + }; + var rimrafSync = (p, options) => { + options = options || {}; + defaults(options); + assert(p, "rimraf: missing path"); + assert.equal(typeof p, "string", "rimraf: path should be a string"); + assert(options, "rimraf: missing options"); + assert.equal(typeof options, "object", "rimraf: options should be object"); + let results; + if (options.disableGlob || !glob.hasMagic(p)) { + results = [p]; + } else { + try { + options.lstatSync(p); + results = [p]; + } catch (er) { + results = glob.sync(p, options.glob); + } + } + if (!results.length) + return; + for (let i = 0; i < results.length; i++) { + const p2 = results[i]; + let st; + try { + st = options.lstatSync(p2); + } catch (er) { + if (er.code === "ENOENT") + return; + if (er.code === "EPERM" && isWindows) + fixWinEPERMSync(p2, options, er); + } + try { + if (st && st.isDirectory()) + rmdirSync(p2, options, null); + else + options.unlinkSync(p2); + } catch (er) { + if (er.code === "ENOENT") + return; + if (er.code === "EPERM") + return isWindows ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er); + if (er.code !== "EISDIR") + throw er; + rmdirSync(p2, options, er); + } + } + }; + var rmdirSync = (p, options, originalEr) => { + assert(p); + assert(options); + try { + options.rmdirSync(p); + } catch (er) { + if (er.code === "ENOENT") + return; + if (er.code === "ENOTDIR") + throw originalEr; + if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") + rmkidsSync(p, options); + } + }; + var rmkidsSync = (p, options) => { + assert(p); + assert(options); + options.readdirSync(p).forEach((f) => rimrafSync(path.join(p, f), options)); + const retries = isWindows ? 100 : 1; + let i = 0; + do { + let threw = true; + try { + const ret = options.rmdirSync(p, options); + threw = false; + return ret; + } finally { + if (++i < retries && threw) + continue; + } + } while (true); + }; + module2.exports = rimraf; + rimraf.sync = rimrafSync; + } +}); + +// ../../node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js +var require_indent_string = __commonJS({ + "../../node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js"(exports2, module2) { + "use strict"; + module2.exports = (string, count = 1, options) => { + options = { + indent: " ", + includeEmptyLines: false, + ...options + }; + if (typeof string !== "string") { + throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof string}\``); + } + if (typeof count !== "number") { + throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof count}\``); + } + if (typeof options.indent !== "string") { + throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\``); + } + if (count === 0) { + return string; + } + const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; + return string.replace(regex, options.indent.repeat(count)); + }; + } +}); + +// ../../node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/index.js +var require_clean_stack = __commonJS({ + "../../node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/index.js"(exports2, module2) { + "use strict"; + var os = require("os"); + var extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; + var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; + var homeDir = typeof os.homedir === "undefined" ? "" : os.homedir(); + module2.exports = (stack2, options) => { + options = Object.assign({ pretty: false }, options); + return stack2.replace(/\\/g, "/").split("\n").filter((line) => { + const pathMatches = line.match(extractPathRegex); + if (pathMatches === null || !pathMatches[1]) { + return true; + } + const match = pathMatches[1]; + if (match.includes(".app/Contents/Resources/electron.asar") || match.includes(".app/Contents/Resources/default_app.asar")) { + return false; + } + return !pathRegex.test(match); + }).filter((line) => line.trim() !== "").map((line) => { + if (options.pretty) { + return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, "~"))); + } + return line; + }).join("\n"); + }; + } +}); + +// ../../node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/index.js +var require_aggregate_error = __commonJS({ + "../../node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/index.js"(exports2, module2) { + "use strict"; + var indentString = require_indent_string(); + var cleanStack = require_clean_stack(); + var cleanInternalStack = (stack2) => stack2.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ""); + var AggregateError2 = class extends Error { + constructor(errors) { + if (!Array.isArray(errors)) { + throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); + } + errors = [...errors].map((error) => { + if (error instanceof Error) { + return error; + } + if (error !== null && typeof error === "object") { + return Object.assign(new Error(error.message), error); + } + return new Error(error); + }); + let message2 = errors.map((error) => { + return typeof error.stack === "string" ? cleanInternalStack(cleanStack(error.stack)) : String(error); + }).join("\n"); + message2 = "\n" + indentString(message2, 4); + super(message2); + this.name = "AggregateError"; + Object.defineProperty(this, "_errors", { value: errors }); + } + *[Symbol.iterator]() { + for (const error of this._errors) { + yield error; + } + } + }; + module2.exports = AggregateError2; + } +}); + +// ../../node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/index.js +var require_p_map2 = __commonJS({ + "../../node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/index.js"(exports2, module2) { + "use strict"; + var AggregateError2 = require_aggregate_error(); + module2.exports = async (iterable, mapper, { + concurrency = Infinity, + stopOnError = true + } = {}) => { + return new Promise((resolve, reject) => { + if (typeof mapper !== "function") { + throw new TypeError("Mapper function is required"); + } + if (!((Number.isSafeInteger(concurrency) || concurrency === Infinity) && concurrency >= 1)) { + throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); + } + const result = []; + const errors = []; + const iterator = iterable[Symbol.iterator](); + let isRejected = false; + let isIterableDone = false; + let resolvingCount = 0; + let currentIndex = 0; + const next = () => { + if (isRejected) { + return; + } + const nextItem = iterator.next(); + const index = currentIndex; + currentIndex++; + if (nextItem.done) { + isIterableDone = true; + if (resolvingCount === 0) { + if (!stopOnError && errors.length !== 0) { + reject(new AggregateError2(errors)); + } else { + resolve(result); + } + } + return; + } + resolvingCount++; + (async () => { + try { + const element = await nextItem.value; + result[index] = await mapper(element, index); + resolvingCount--; + next(); + } catch (error) { + if (stopOnError) { + isRejected = true; + reject(error); + } else { + errors.push(error); + resolvingCount--; + next(); + } + } + })(); + }; + for (let i = 0; i < concurrency; i++) { + next(); + if (isIterableDone) { + break; + } + } + }); + }; + } +}); + +// ../../node_modules/.pnpm/del@6.0.0/node_modules/del/index.js +var require_del = __commonJS({ + "../../node_modules/.pnpm/del@6.0.0/node_modules/del/index.js"(exports2, module2) { + "use strict"; + var { promisify } = require("util"); + var path = require("path"); + var globby = require_globby(); + var isGlob = require_is_glob(); + var slash = require_slash(); + var gracefulFs = require_graceful_fs(); + var isPathCwd = require_is_path_cwd(); + var isPathInside = require_is_path_inside(); + var rimraf = require_rimraf2(); + var pMap = require_p_map2(); + var rimrafP = promisify(rimraf); + var rimrafOptions = { + glob: false, + unlink: gracefulFs.unlink, + unlinkSync: gracefulFs.unlinkSync, + chmod: gracefulFs.chmod, + chmodSync: gracefulFs.chmodSync, + stat: gracefulFs.stat, + statSync: gracefulFs.statSync, + lstat: gracefulFs.lstat, + lstatSync: gracefulFs.lstatSync, + rmdir: gracefulFs.rmdir, + rmdirSync: gracefulFs.rmdirSync, + readdir: gracefulFs.readdir, + readdirSync: gracefulFs.readdirSync + }; + function safeCheck(file, cwd) { + if (isPathCwd(file)) { + throw new Error("Cannot delete the current working directory. Can be overridden with the `force` option."); + } + if (!isPathInside(file, cwd)) { + throw new Error("Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option."); + } + } + function normalizePatterns(patterns) { + patterns = Array.isArray(patterns) ? patterns : [patterns]; + patterns = patterns.map((pattern) => { + if (process.platform === "win32" && isGlob(pattern) === false) { + return slash(pattern); + } + return pattern; + }); + return patterns; + } + module2.exports = async (patterns, { force, dryRun, cwd = process.cwd(), ...options } = {}) => { + options = { + expandDirectories: false, + onlyFiles: false, + followSymbolicLinks: false, + cwd, + ...options + }; + patterns = normalizePatterns(patterns); + const files = (await globby(patterns, options)).sort((a, b) => b.localeCompare(a)); + const mapper = async (file) => { + file = path.resolve(cwd, file); + if (!force) { + safeCheck(file, cwd); + } + if (!dryRun) { + await rimrafP(file, rimrafOptions); + } + return file; + }; + const removedFiles = await pMap(files, mapper, options); + removedFiles.sort((a, b) => a.localeCompare(b)); + return removedFiles; + }; + module2.exports.sync = (patterns, { force, dryRun, cwd = process.cwd(), ...options } = {}) => { + options = { + expandDirectories: false, + onlyFiles: false, + followSymbolicLinks: false, + cwd, + ...options + }; + patterns = normalizePatterns(patterns); + const files = globby.sync(patterns, options).sort((a, b) => b.localeCompare(a)); + const removedFiles = files.map((file) => { + file = path.resolve(cwd, file); + if (!force) { + safeCheck(file, cwd); + } + if (!dryRun) { + rimraf.sync(file, rimrafOptions); + } + return file; + }); + removedFiles.sort((a, b) => a.localeCompare(b)); + return removedFiles; + }; + } +}); + +// ../../node_modules/.pnpm/tempy@1.0.1/node_modules/tempy/index.js +var require_tempy = __commonJS({ + "../../node_modules/.pnpm/tempy@1.0.1/node_modules/tempy/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var path = require("path"); + var uniqueString = require_unique_string(); + var tempDir = require_temp_dir(); + var isStream = require_is_stream(); + var del = require_del(); + var stream = require("stream"); + var { promisify } = require("util"); + var pipeline = promisify(stream.pipeline); + var { writeFile } = fs.promises; + var getPath = (prefix = "") => path.join(tempDir, prefix + uniqueString()); + var writeStream = async (filePath, data) => pipeline(data, fs.createWriteStream(filePath)); + var createTask = (tempyFunction, { extraArguments = 0 } = {}) => async (...arguments_) => { + const [callback, options] = arguments_.slice(extraArguments); + const result = await tempyFunction(...arguments_.slice(0, extraArguments), options); + try { + return await callback(result); + } finally { + await del(result, { force: true }); + } + }; + module2.exports.file = (options) => { + options = { + ...options + }; + if (options.name) { + if (options.extension !== void 0 && options.extension !== null) { + throw new Error("The `name` and `extension` options are mutually exclusive"); + } + return path.join(module2.exports.directory(), options.name); + } + return getPath() + (options.extension === void 0 || options.extension === null ? "" : "." + options.extension.replace(/^\./, "")); + }; + module2.exports.file.task = createTask(module2.exports.file); + module2.exports.directory = ({ prefix = "" } = {}) => { + const directory = getPath(prefix); + fs.mkdirSync(directory); + return directory; + }; + module2.exports.directory.task = createTask(module2.exports.directory); + module2.exports.write = async (data, options) => { + const filename = module2.exports.file(options); + const write = isStream(data) ? writeStream : writeFile; + await write(filename, data); + return filename; + }; + module2.exports.write.task = createTask(module2.exports.write, { extraArguments: 1 }); + module2.exports.writeSync = (data, options) => { + const filename = module2.exports.file(options); + fs.writeFileSync(filename, data); + return filename; + }; + Object.defineProperty(module2.exports, "root", { + get() { + return tempDir; + } + }); + } +}); + +// ../plugin-commands-env/lib/node.js +var require_node4 = __commonJS({ + "../plugin-commands-env/lib/node.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getNodeDir = exports2.getNodeBinDir = void 0; + var fs_1 = __importDefault(require("fs")); + var path_1 = __importDefault(require("path")); + var fetch_1 = __importStar2(require_lib29()); + var package_store_1 = require_lib37(); + var store_path_1 = __importDefault(require_lib38()); + var tarball_fetcher_1 = __importStar2(require_lib40()); + var adm_zip_1 = __importDefault(require_adm_zip()); + var rename_overwrite_1 = __importDefault(require_rename_overwrite()); + var tempy_1 = __importDefault(require_tempy()); + var load_json_file_1 = __importDefault(require_load_json_file()); + var write_json_file_1 = __importDefault(require_write_json_file()); + async function getNodeBinDir(opts) { + const nodeDir = await getNodeDir(opts); + return process.platform === "win32" ? nodeDir : path_1.default.join(nodeDir, "bin"); + } + exports2.getNodeBinDir = getNodeBinDir; + async function getNodeDir(opts) { + var _a, _b; + const nodesDir = path_1.default.join(opts.pnpmHomeDir, "nodejs"); + let wantedNodeVersion = (_a = opts.useNodeVersion) !== null && _a !== void 0 ? _a : (_b = await readNodeVersionsManifest(nodesDir)) === null || _b === void 0 ? void 0 : _b.default; + await fs_1.default.promises.mkdir(nodesDir, { recursive: true }); + if (wantedNodeVersion == null) { + const response = await fetch_1.default("https://registry.npmjs.org/node"); + wantedNodeVersion = (await response.json())["dist-tags"].lts; + if (wantedNodeVersion == null) { + throw new Error("Could not resolve LTS version of Node.js"); + } + await write_json_file_1.default(path_1.default.join(nodesDir, "versions.json"), { + default: wantedNodeVersion + }); + } + const versionDir = path_1.default.join(nodesDir, wantedNodeVersion); + if (!fs_1.default.existsSync(versionDir)) { + await installNode(wantedNodeVersion, versionDir, opts); + } + return versionDir; + } + exports2.getNodeDir = getNodeDir; + async function installNode(wantedNodeVersion, versionDir, opts) { + await fs_1.default.promises.mkdir(versionDir, { recursive: true }); + const { tarball, pkgName } = getNodeJSTarball(wantedNodeVersion); + const fetchFromRegistry = fetch_1.createFetchFromRegistry(opts); + if (tarball.endsWith(".zip")) { + await downloadAndUnpackZip(fetchFromRegistry, tarball, versionDir, pkgName); + return; + } + const getCredentials = () => ({ authHeaderValue: void 0, alwaysAuth: void 0 }); + const fetch = tarball_fetcher_1.default(fetchFromRegistry, getCredentials, { + retry: { + maxTimeout: opts.fetchRetryMaxtimeout, + minTimeout: opts.fetchRetryMintimeout, + retries: opts.fetchRetries, + factor: opts.fetchRetryFactor + }, + timeout: opts.fetchTimeout + }); + const storeDir = await store_path_1.default(process.cwd(), opts.storeDir); + const cafsDir = path_1.default.join(storeDir, "files"); + const cafs = package_store_1.createCafsStore(cafsDir); + const { filesIndex } = await fetch.tarball(cafs, { tarball }, { + lockfileDir: process.cwd() + }); + await cafs.importPackage(versionDir, { + filesResponse: { + filesIndex: await tarball_fetcher_1.waitForFilesIndex(filesIndex), + fromStore: false + }, + force: true + }); + } + async function downloadAndUnpackZip(fetchFromRegistry, zipUrl, targetDir, pkgName) { + const response = await fetchFromRegistry(zipUrl); + const tmp = path_1.default.join(tempy_1.default.directory(), "pnpm.zip"); + const dest = fs_1.default.createWriteStream(tmp); + await new Promise((resolve, reject) => { + response.body.pipe(dest).on("error", reject).on("close", resolve); + }); + const zip = new adm_zip_1.default(tmp); + const nodeDir = path_1.default.dirname(targetDir); + zip.extractAllTo(nodeDir, true); + await rename_overwrite_1.default(path_1.default.join(nodeDir, pkgName), targetDir); + await fs_1.default.promises.unlink(tmp); + } + function getNodeJSTarball(nodeVersion) { + const platform = process.platform === "win32" ? "win" : process.platform; + const arch = platform === "win" && process.arch === "ia32" ? "x86" : process.arch; + const extension = platform === "win" ? "zip" : "tar.gz"; + const pkgName = `node-v${nodeVersion}-${platform}-${arch}`; + return { + pkgName, + tarball: `https://nodejs.org/download/release/v${nodeVersion}/${pkgName}.${extension}` + }; + } + async function readNodeVersionsManifest(nodesDir) { + try { + return await load_json_file_1.default(path_1.default.join(nodesDir, "versions.json")); + } catch (err) { + if (err.code === "ENOENT") { + return {}; + } + throw err; + } + } + } +}); + +// ../plugin-commands-env/lib/env.js +var require_env = __commonJS({ + "../plugin-commands-env/lib/env.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var error_1 = __importDefault(require_lib8()); + var fetch_1 = __importDefault(require_lib29()); + var cmd_shim_1 = __importDefault(require_cmd_shim()); + var render_help_1 = __importDefault(require_lib30()); + var semver_1 = __importDefault(require_semver2()); + var version_selector_type_1 = __importDefault(require_version_selector_type()); + var node_1 = require_node4(); + function rcOptionsTypes() { + return {}; + } + exports2.rcOptionsTypes = rcOptionsTypes; + function cliOptionsTypes() { + return { + global: Boolean + }; + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["env"]; + function help() { + return render_help_1.default({ + description: "Install and use the specified version of Node.js. The npm CLI bundled with the given Node.js version gets installed as well.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "Installs Node.js globally", + name: "--global", + shortAlias: "-g" + } + ] + } + ], + url: cli_utils_1.docsUrl("env"), + usages: [ + "pnpm env use --global ", + "pnpm env use --global 16", + "pnpm env use --global lts", + "pnpm env use --global argon" + ] + }); + } + exports2.help = help; + async function handler(opts, params) { + if (params.length === 0) { + throw new error_1.default("ENV_NO_SUBCOMMAND", "Please specify the subcommand"); + } + switch (params[0]) { + case "use": { + if (!opts.global) { + throw new error_1.default("NOT_IMPLEMENTED_YET", '"pnpm env use " can only be used with the "--global" option currently'); + } + const nodeVersion = await resolveNodeVersion(params[1]); + if (!nodeVersion) { + throw new error_1.default("COULD_NOT_RESOLVE_NODEJS", `Couldn't find Node.js version matching ${params[1]}`); + } + const nodeDir = await node_1.getNodeDir({ + ...opts, + useNodeVersion: nodeVersion + }); + const src = path_1.default.join(nodeDir, process.platform === "win32" ? "node.exe" : "bin/node"); + const dest = path_1.default.join(opts.bin, "node"); + const cmdShimOpts = { createPwshFile: false }; + await cmd_shim_1.default(src, dest, cmdShimOpts); + try { + let npmDir = nodeDir; + if (process.platform !== "win32") { + npmDir = path_1.default.join(npmDir, "lib"); + } + npmDir = path_1.default.join(npmDir, "node_modules/npm/bin"); + await cmd_shim_1.default(path_1.default.join(npmDir, "npm-cli.js"), path_1.default.join(opts.bin, "npm"), cmdShimOpts); + await cmd_shim_1.default(path_1.default.join(npmDir, "npx-cli.js"), path_1.default.join(opts.bin, "npx"), cmdShimOpts); + } catch (err) { + } + return `Node.js ${nodeVersion} is activated + ${dest} -> ${src}`; + } + default: { + throw new error_1.default("ENV_UNKNOWN_SUBCOMMAND", "This subcommand is not known"); + } + } + } + exports2.handler = handler; + async function resolveNodeVersion(rawVersionSelector) { + const response = await fetch_1.default("https://nodejs.org/download/release/index.json"); + const allVersions = await response.json(); + const { versions, versionSelector } = filterVersions(allVersions, rawVersionSelector); + const pickedVersion = semver_1.default.maxSatisfying(versions.map(({ version }) => version), versionSelector); + if (!pickedVersion) + return null; + return pickedVersion.substring(1); + } + function filterVersions(versions, versionSelector) { + if (versionSelector === "lts") { + return { + versions: versions.filter(({ lts }) => lts !== false), + versionSelector: "*" + }; + } + const vst = version_selector_type_1.default(versionSelector); + if ((vst === null || vst === void 0 ? void 0 : vst.type) === "tag") { + const wantedLtsVersion = vst.normalized.toLowerCase(); + return { + versions: versions.filter(({ lts }) => typeof lts === "string" && lts.toLowerCase() === wantedLtsVersion), + versionSelector: "*" + }; + } + return { versions, versionSelector }; + } + } +}); + +// ../plugin-commands-env/lib/index.js +var require_lib41 = __commonJS({ + "../plugin-commands-env/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.node = exports2.env = void 0; + var env = __importStar2(require_env()); + exports2.env = env; + var node = __importStar2(require_node4()); + exports2.node = node; + } +}); + +// ../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry_operation.js +var require_retry_operation2 = __commonJS({ + "../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry_operation.js"(exports2, module2) { + function RetryOperation(timeouts, options) { + if (typeof options === "boolean") { + options = { forever: options }; + } + this._originalTimeouts = JSON.parse(JSON.stringify(timeouts)); + this._timeouts = timeouts; + this._options = options || {}; + this._maxRetryTime = options && options.maxRetryTime || Infinity; + this._fn = null; + this._errors = []; + this._attempts = 1; + this._operationTimeout = null; + this._operationTimeoutCb = null; + this._timeout = null; + this._operationStart = null; + if (this._options.forever) { + this._cachedTimeouts = this._timeouts.slice(0); + } + } + module2.exports = RetryOperation; + RetryOperation.prototype.reset = function() { + this._attempts = 1; + this._timeouts = this._originalTimeouts; + }; + RetryOperation.prototype.stop = function() { + if (this._timeout) { + clearTimeout(this._timeout); + } + this._timeouts = []; + this._cachedTimeouts = null; + }; + RetryOperation.prototype.retry = function(err) { + if (this._timeout) { + clearTimeout(this._timeout); + } + if (!err) { + return false; + } + var currentTime = new Date().getTime(); + if (err && currentTime - this._operationStart >= this._maxRetryTime) { + this._errors.unshift(new Error("RetryOperation timeout occurred")); + return false; + } + this._errors.push(err); + var timeout = this._timeouts.shift(); + if (timeout === void 0) { + if (this._cachedTimeouts) { + this._errors.splice(this._errors.length - 1, this._errors.length); + this._timeouts = this._cachedTimeouts.slice(0); + timeout = this._timeouts.shift(); + } else { + return false; + } + } + var self2 = this; + var timer = setTimeout(function() { + self2._attempts++; + if (self2._operationTimeoutCb) { + self2._timeout = setTimeout(function() { + self2._operationTimeoutCb(self2._attempts); + }, self2._operationTimeout); + if (self2._options.unref) { + self2._timeout.unref(); + } + } + self2._fn(self2._attempts); + }, timeout); + if (this._options.unref) { + timer.unref(); + } + return true; + }; + RetryOperation.prototype.attempt = function(fn2, timeoutOps) { + this._fn = fn2; + if (timeoutOps) { + if (timeoutOps.timeout) { + this._operationTimeout = timeoutOps.timeout; + } + if (timeoutOps.cb) { + this._operationTimeoutCb = timeoutOps.cb; + } + } + var self2 = this; + if (this._operationTimeoutCb) { + this._timeout = setTimeout(function() { + self2._operationTimeoutCb(); + }, self2._operationTimeout); + } + this._operationStart = new Date().getTime(); + this._fn(this._attempts); + }; + RetryOperation.prototype.try = function(fn2) { + console.log("Using RetryOperation.try() is deprecated"); + this.attempt(fn2); + }; + RetryOperation.prototype.start = function(fn2) { + console.log("Using RetryOperation.start() is deprecated"); + this.attempt(fn2); + }; + RetryOperation.prototype.start = RetryOperation.prototype.try; + RetryOperation.prototype.errors = function() { + return this._errors; + }; + RetryOperation.prototype.attempts = function() { + return this._attempts; + }; + RetryOperation.prototype.mainError = function() { + if (this._errors.length === 0) { + return null; + } + var counts = {}; + var mainError = null; + var mainErrorCount = 0; + for (var i = 0; i < this._errors.length; i++) { + var error = this._errors[i]; + var message2 = error.message; + var count = (counts[message2] || 0) + 1; + counts[message2] = count; + if (count >= mainErrorCount) { + mainError = error; + mainErrorCount = count; + } + } + return mainError; + }; + } +}); + +// ../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry.js +var require_retry3 = __commonJS({ + "../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry.js"(exports2) { + var RetryOperation = require_retry_operation2(); + exports2.operation = function(options) { + var timeouts = exports2.timeouts(options); + return new RetryOperation(timeouts, { + forever: options && options.forever, + unref: options && options.unref, + maxRetryTime: options && options.maxRetryTime + }); + }; + exports2.timeouts = function(options) { + if (options instanceof Array) { + return [].concat(options); + } + var opts = { + retries: 10, + factor: 2, + minTimeout: 1 * 1e3, + maxTimeout: Infinity, + randomize: false + }; + for (var key in options) { + opts[key] = options[key]; + } + if (opts.minTimeout > opts.maxTimeout) { + throw new Error("minTimeout is greater than maxTimeout"); + } + var timeouts = []; + for (var i = 0; i < opts.retries; i++) { + timeouts.push(this.createTimeout(i, opts)); + } + if (options && options.forever && !timeouts.length) { + timeouts.push(this.createTimeout(i, opts)); + } + timeouts.sort(function(a, b) { + return a - b; + }); + return timeouts; + }; + exports2.createTimeout = function(attempt, opts) { + var random = opts.randomize ? Math.random() + 1 : 1; + var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt)); + timeout = Math.min(timeout, opts.maxTimeout); + return timeout; + }; + exports2.wrap = function(obj, options, methods) { + if (options instanceof Array) { + methods = options; + options = null; + } + if (!methods) { + methods = []; + for (var key in obj) { + if (typeof obj[key] === "function") { + methods.push(key); + } + } + } + for (var i = 0; i < methods.length; i++) { + var method = methods[i]; + var original = obj[method]; + obj[method] = function retryWrapper(original2) { + var op = exports2.operation(options); + var args2 = Array.prototype.slice.call(arguments, 1); + var callback = args2.pop(); + args2.push(function(err) { + if (op.retry(err)) { + return; + } + if (err) { + arguments[0] = op.mainError(); + } + callback.apply(this, arguments); + }); + op.attempt(function() { + original2.apply(obj, args2); + }); + }.bind(obj, original); + obj[method].options = options; + } + }; + } +}); + +// ../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/index.js +var require_retry4 = __commonJS({ + "../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/index.js"(exports2, module2) { + module2.exports = require_retry3(); + } +}); + +// ../../node_modules/.pnpm/graceful-git@3.1.2/node_modules/graceful-git/index.js +var require_graceful_git = __commonJS({ + "../../node_modules/.pnpm/graceful-git@3.1.2/node_modules/graceful-git/index.js"(exports2, module2) { + "use strict"; + var execa = require_lib26().default; + var retry = require_retry4(); + var RETRY_OPTIONS = { + retries: 3, + minTimeout: 1 * 1e3, + maxTimeout: 10 * 1e3, + randomize: true + }; + module2.exports = gracefulGit; + module2.exports.noRetry = noRetry; + async function gracefulGit(args2, opts) { + opts = opts || {}; + const operation = retry.operation(Object.assign({}, RETRY_OPTIONS, opts)); + return new Promise((resolve, reject) => { + operation.attempt((currentAttempt) => { + noRetry(args2, opts).then(resolve).catch((err) => { + if (operation.retry(err)) { + return; + } + reject(operation.mainError()); + }); + }); + }); + } + async function noRetry(args2, opts) { + opts = opts || {}; + return execa("git", args2, { cwd: opts.cwd || process.cwd() }); + } + } +}); + +// ../git-resolver/lib/parsePref.js +var require_parsePref = __commonJS({ + "../git-resolver/lib/parsePref.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var url_1 = __importStar2(require("url")); + var fetch_1 = __importDefault(require_lib29()); + var graceful_git_1 = __importDefault(require_graceful_git()); + var hosted_git_info_1 = __importDefault(require_hosted_git_info()); + var gitProtocols = new Set([ + "git", + "git+http", + "git+https", + "git+rsync", + "git+ftp", + "git+file", + "git+ssh", + "ssh" + ]); + async function parsePref(pref) { + var _a; + const hosted = hosted_git_info_1.default.fromUrl(pref); + if (hosted != null) { + return fromHostedGit(hosted); + } + const colonsPos = pref.indexOf(":"); + if (colonsPos === -1) + return null; + const protocol = pref.substr(0, colonsPos); + if (protocol && gitProtocols.has(protocol.toLocaleLowerCase())) { + const urlparse = new url_1.URL(pref); + if (!urlparse || !urlparse.protocol) + return null; + const match = urlparse.protocol === "git+ssh:" && matchGitScp(pref); + if (match) { + return { + ...match, + normalizedPref: pref + }; + } + const committish = ((_a = urlparse.hash) === null || _a === void 0 ? void 0 : _a.length) > 1 ? decodeURIComponent(urlparse.hash.slice(1)) : null; + return { + fetchSpec: urlToFetchSpec(urlparse), + normalizedPref: pref, + ...setGitCommittish(committish) + }; + } + return null; + } + exports2.default = parsePref; + function urlToFetchSpec(urlparse) { + urlparse.hash = ""; + const fetchSpec = url_1.default.format(urlparse); + if (fetchSpec.startsWith("git+")) { + return fetchSpec.substr(4); + } + return fetchSpec; + } + async function fromHostedGit(hosted) { + let fetchSpec = null; + const gitUrl = hosted.git({ noCommittish: true }); + if (gitUrl && await accessRepository(gitUrl)) { + fetchSpec = gitUrl; + } + if (!fetchSpec) { + const httpsUrl = hosted.https({ noGitPlus: true, noCommittish: true }); + if (httpsUrl) { + if (hosted.auth && await accessRepository(httpsUrl)) { + return { + fetchSpec: httpsUrl, + hosted: { + ...hosted, + _fill: hosted._fill, + tarball: void 0 + }, + normalizedPref: `git+${httpsUrl}`, + ...setGitCommittish(hosted.committish) + }; + } else { + try { + const response = await fetch_1.default(httpsUrl.substr(0, httpsUrl.length - 4), { method: "HEAD", follow: 0 }); + if (response.ok) { + fetchSpec = httpsUrl; + } + } catch (e) { + } + } + } + } + if (!fetchSpec) { + fetchSpec = hosted.sshurl({ noCommittish: true }); + } + return { + fetchSpec, + hosted: { + ...hosted, + _fill: hosted._fill, + tarball: hosted.tarball + }, + normalizedPref: hosted.shortcut(), + ...setGitCommittish(hosted.committish) + }; + } + async function accessRepository(repository) { + try { + await graceful_git_1.default(["ls-remote", "--exit-code", repository, "HEAD"], { retries: 0 }); + return true; + } catch (err) { + return false; + } + } + function setGitCommittish(committish) { + if (committish !== null && committish.length >= 7 && committish.slice(0, 7) === "semver:") { + return { + gitCommittish: null, + gitRange: committish.slice(7) + }; + } + return { gitCommittish: committish }; + } + function matchGitScp(spec) { + const matched = spec.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i); + return matched != null && matched[1].match(/:[0-9]+\/?.*$/i) == null && { + fetchSpec: matched[1], + gitCommittish: matched[2] + }; + } + } +}); + +// ../git-resolver/lib/index.js +var require_lib42 = __commonJS({ + "../git-resolver/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var graceful_git_1 = __importDefault(require_graceful_git()); + var semver_1 = __importDefault(require_semver2()); + var parsePref_1 = __importDefault(require_parsePref()); + function default_1(opts) { + return async function resolveGit(wantedDependency) { + var _a; + const parsedSpec = await parsePref_1.default(wantedDependency.pref); + if (parsedSpec == null) + return null; + const pref = parsedSpec.gitCommittish == null || parsedSpec.gitCommittish === "" ? "HEAD" : parsedSpec.gitCommittish; + const commit = await resolveRef(parsedSpec.fetchSpec, pref, parsedSpec.gitRange); + let resolution; + if (parsedSpec.hosted != null && !isSsh(parsedSpec.fetchSpec)) { + const hosted = parsedSpec.hosted; + hosted.committish = commit; + const tarball = (_a = hosted.tarball) === null || _a === void 0 ? void 0 : _a.call(hosted); + if (tarball) { + resolution = { tarball }; + } + } + if (resolution == null) { + resolution = { + commit, + repo: parsedSpec.fetchSpec, + type: "git" + }; + } + return { + id: parsedSpec.fetchSpec.replace(/^.*:\/\/(git@)?/, "").replace(/:/g, "+").replace(/\.git$/, "") + "/" + commit, + normalizedPref: parsedSpec.normalizedPref, + resolution, + resolvedVia: "git-repository" + }; + }; + } + exports2.default = default_1; + function resolveVTags(vTags, range) { + return semver_1.default.maxSatisfying(vTags, range, true); + } + async function getRepoRefs(repo, ref) { + const gitArgs = [repo]; + if (ref !== "HEAD") { + gitArgs.unshift("--refs"); + } + if (ref) { + gitArgs.push(ref); + } + const result = await graceful_git_1.default(["ls-remote", ...gitArgs], { retries: 1 }); + const refs = result.stdout.split("\n").reduce((obj, line) => { + const [commit, refName] = line.split(" "); + obj[refName] = commit; + return obj; + }, {}); + return refs; + } + async function resolveRef(repo, ref, range) { + if (ref.match(/^[0-9a-f]{7,40}$/) != null) { + return ref; + } + const refs = await getRepoRefs(repo, range ? null : ref); + return resolveRefFromRefs(refs, repo, ref, range); + } + function resolveRefFromRefs(refs, repo, ref, range) { + if (!range) { + const commitId = refs[ref] || refs[`refs/tags/${ref}^{}`] || refs[`refs/tags/${ref}`] || refs[`refs/heads/${ref}`]; + if (!commitId) { + throw new Error(`Could not resolve ${ref} to a commit of ${repo}.`); + } + return commitId; + } else { + const vTags = Object.keys(refs).filter((key) => /^refs\/tags\/v?(\d+\.\d+\.\d+(?:[-+].+)?)(\^{})?$/.test(key)).map((key) => { + return key.replace(/^refs\/tags\//, "").replace(/\^{}$/, ""); + }).filter((key) => semver_1.default.valid(key, true)); + const refVTag = resolveVTags(vTags, range); + const commitId = refVTag && (refs[`refs/tags/${refVTag}^{}`] || refs[`refs/tags/${refVTag}`]); + if (!commitId) { + throw new Error(`Could not resolve ${range} to a commit of ${repo}. Available versions are: ${vTags.join(", ")}`); + } + return commitId; + } + } + function isSsh(gitSpec) { + return gitSpec.substr(0, 10) === "git+ssh://" || gitSpec.substr(0, 4) === "git@"; + } + } +}); + +// ../local-resolver/lib/parsePref.js +var require_parsePref2 = __commonJS({ + "../local-resolver/lib/parsePref.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var os_1 = __importDefault(require("os")); + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var normalize_path_1 = __importDefault(require_normalize_path()); + var isWindows = process.platform === "win32" || global["FAKE_WINDOWS"]; + var isFilespec = isWindows ? /^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/ : /^(?:[.]|~[/]|[/]|[a-zA-Z]:)/; + var isFilename = /[.](?:tgz|tar.gz|tar)$/i; + var isAbsolutePath = /^[/]|^[A-Za-z]:/; + function parsePref(pref, projectDir, lockfileDir) { + if (pref.startsWith("link:") || pref.startsWith("workspace:")) { + return fromLocal(pref, projectDir, lockfileDir, "directory"); + } + if (pref.endsWith(".tgz") || pref.endsWith(".tar.gz") || pref.endsWith(".tar") || pref.includes(path_1.default.sep) || pref.startsWith("file:") || isFilespec.test(pref)) { + const type = isFilename.test(pref) ? "file" : "directory"; + return fromLocal(pref, projectDir, lockfileDir, type); + } + if (pref.startsWith("path:")) { + const err = new error_1.default("PATH_IS_UNSUPPORTED_PROTOCOL", "Local dependencies via `path:` protocol are not supported. Use the `link:` protocol for folder dependencies and `file:` for local tarballs"); + err["pref"] = pref; + err["protocol"] = "path:"; + throw err; + } + return null; + } + exports2.default = parsePref; + function fromLocal(pref, projectDir, lockfileDir, type) { + const spec = pref.replace(/\\/g, "/").replace(/^(file|link|workspace):[/]*([A-Za-z]:)/, "$2").replace(/^(file|link|workspace):(?:[/]*([~./]))?/, "$2"); + const protocol = type === "directory" ? "link:" : "file:"; + let fetchSpec; + let normalizedPref; + if (/^~[/]/.test(spec)) { + fetchSpec = resolvePath(os_1.default.homedir(), spec.slice(2)); + normalizedPref = `${protocol}${spec}`; + } else { + fetchSpec = resolvePath(projectDir, spec); + if (isAbsolute(spec)) { + normalizedPref = `${protocol}${spec}`; + } else { + normalizedPref = `${protocol}${path_1.default.relative(projectDir, fetchSpec)}`; + } + } + const dependencyPath = normalize_path_1.default(path_1.default.relative(projectDir, fetchSpec)); + const id = type === "directory" || projectDir === lockfileDir ? `${protocol}${dependencyPath}` : `${protocol}${normalize_path_1.default(path_1.default.relative(lockfileDir, fetchSpec))}`; + return { + dependencyPath, + fetchSpec, + id, + normalizedPref, + type + }; + } + function resolvePath(where, spec) { + if (isAbsolutePath.test(spec)) + return spec; + return path_1.default.resolve(where, spec); + } + function isAbsolute(dir) { + if (dir[0] === "/") + return true; + if (/^[A-Za-z]:/.test(dir)) + return true; + return false; + } + } +}); + +// ../local-resolver/lib/index.js +var require_lib43 = __commonJS({ + "../local-resolver/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var graceful_fs_1 = __importDefault(require_lib18()); + var read_project_manifest_1 = require_lib19(); + var ssri_1 = __importDefault(require_ssri()); + var parsePref_1 = __importDefault(require_parsePref2()); + async function resolveLocal(wantedDependency, opts) { + var _a; + const spec = parsePref_1.default(wantedDependency.pref, opts.projectDir, (_a = opts.lockfileDir) !== null && _a !== void 0 ? _a : opts.projectDir); + if (spec == null) + return null; + if (spec.type === "file") { + return { + id: spec.id, + normalizedPref: spec.normalizedPref, + resolution: { + integrity: await getFileIntegrity(spec.fetchSpec), + tarball: spec.id + }, + resolvedVia: "local-filesystem" + }; + } + let localDependencyManifest; + try { + localDependencyManifest = await read_project_manifest_1.readProjectManifestOnly(spec.fetchSpec); + } catch (internalErr) { + if (!fs_1.existsSync(spec.fetchSpec)) { + throw new error_1.default("LINKED_PKG_DIR_NOT_FOUND", `Could not install from "${spec.fetchSpec}" as it does not exist.`); + } + switch (internalErr.code) { + case "ENOTDIR": { + throw new error_1.default("NOT_PACKAGE_DIRECTORY", `Could not install from "${spec.fetchSpec}" as it is not a directory.`); + } + case "ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND": + case "ENOENT": { + localDependencyManifest = { + name: path_1.default.basename(spec.fetchSpec), + version: "0.0.0" + }; + break; + } + default: { + throw internalErr; + } + } + } + return { + id: spec.id, + manifest: localDependencyManifest, + normalizedPref: spec.normalizedPref, + resolution: { + directory: spec.dependencyPath, + type: "directory" + }, + resolvedVia: "local-filesystem" + }; + } + exports2.default = resolveLocal; + async function getFileIntegrity(filename) { + return (await ssri_1.default.fromStream(graceful_fs_1.default.createReadStream(filename))).toString(); + } + } +}); + +// ../../node_modules/.pnpm/p-memoize@4.0.2/node_modules/p-memoize/index.js +var require_p_memoize = __commonJS({ + "../../node_modules/.pnpm/p-memoize@4.0.2/node_modules/p-memoize/index.js"(exports2, module2) { + "use strict"; + var mimicFn = require_mimic_fn2(); + var mapAgeCleaner = require_dist7(); + var cacheStore = new WeakMap(); + var pMemoize = (fn2, { cachePromiseRejection = false, ...options } = {}) => { + const { maxAge, cacheKey } = options; + const cache = options.cache || new Map(); + if (Number.isSafeInteger(maxAge)) { + mapAgeCleaner(cache); + } else if (typeof maxAge !== "undefined") { + throw new TypeError("maxAge is not a safe integer."); + } + const memoized = async function(...arguments_) { + const key = cacheKey ? cacheKey(arguments_) : arguments_[0]; + const cacheItem = cache.get(key); + if (cacheItem) { + return cacheItem.data; + } + const result = fn2.apply(this, arguments_); + let resultError; + try { + return await Promise.resolve(result); + } catch (error) { + resultError = error; + throw error; + } finally { + cache.set(key, { + data: result, + maxAge: maxAge ? Date.now() + maxAge : Number.POSITIVE_INFINITY + }); + if (!cachePromiseRejection && resultError) { + cache.delete(key); + } + } + }; + mimicFn(memoized, fn2); + cacheStore.set(memoized, cache); + return memoized; + }; + module2.exports = pMemoize; + module2.exports.clear = (memoized) => { + if (!cacheStore.has(memoized)) { + throw new Error("Can't clear a function that was not memoized!"); + } + const cache = cacheStore.get(memoized); + if (typeof cache.clear !== "function") { + throw new TypeError("The cache Map can't be cleared!"); + } + cache.clear(); + }; + } +}); + +// ../npm-resolver/lib/toRaw.js +var require_toRaw = __commonJS({ + "../npm-resolver/lib/toRaw.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function toRaw(spec) { + return `${spec.name}@${spec.fetchSpec}`; + } + exports2.default = toRaw; + } +}); + +// ../npm-resolver/lib/pickPackageFromMeta.js +var require_pickPackageFromMeta = __commonJS({ + "../npm-resolver/lib/pickPackageFromMeta.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var semver_1 = __importDefault(require_semver2()); + function default_1(spec, preferredVersionSelectors, meta) { + try { + let version; + switch (spec.type) { + case "version": + version = spec.fetchSpec; + break; + case "tag": + version = meta["dist-tags"][spec.fetchSpec]; + break; + case "range": + version = pickVersionByVersionRange(meta, spec.fetchSpec, preferredVersionSelectors); + break; + } + const manifest = meta.versions[version]; + if (manifest && meta["name"]) { + manifest.name = meta["name"]; + } + return manifest; + } catch (err) { + throw new error_1.default("MALFORMED_METADATA", `Received malformed metadata for "${spec.name}"`, { hint: "This might mean that the package was unpublished from the registry" }); + } + } + exports2.default = default_1; + function pickVersionByVersionRange(meta, versionRange, preferredVerSels) { + let versions; + const latest = meta["dist-tags"].latest; + const preferredVerSelsArr = Object.entries(preferredVerSels !== null && preferredVerSels !== void 0 ? preferredVerSels : {}); + if (preferredVerSelsArr.length > 0) { + const preferredVersions = []; + for (const [preferredSelector, preferredSelectorType] of preferredVerSelsArr) { + if (preferredSelector === versionRange) + continue; + switch (preferredSelectorType) { + case "tag": { + preferredVersions.push(meta["dist-tags"][preferredSelector]); + break; + } + case "range": { + versions = Object.keys(meta.versions); + for (const version of versions) { + if (semver_1.default.satisfies(version, preferredSelector, true)) { + preferredVersions.push(version); + } + } + break; + } + case "version": { + if (meta.versions[preferredSelector]) { + preferredVersions.push(preferredSelector); + } + break; + } + } + } + if (preferredVersions.includes(latest) && semver_1.default.satisfies(latest, versionRange, true)) { + return latest; + } + const preferredVersion = semver_1.default.maxSatisfying(preferredVersions, versionRange, true); + if (preferredVersion) { + return preferredVersion; + } + } + if (versionRange === "*" || semver_1.default.satisfies(latest, versionRange, true)) { + return latest; + } + versions = versions !== null && versions !== void 0 ? versions : Object.keys(meta.versions); + const maxVersion = semver_1.default.maxSatisfying(versions, versionRange, true); + if (maxVersion && meta.versions[maxVersion].deprecated && versions.length > 1) { + const nonDeprecatedVersions = versions.map((version) => meta.versions[version]).filter((versionMeta) => !versionMeta.deprecated).map((versionMeta) => versionMeta.version); + const maxNonDeprecatedVersion = semver_1.default.maxSatisfying(nonDeprecatedVersions, versionRange, true); + if (maxNonDeprecatedVersion) + return maxNonDeprecatedVersion; + } + return maxVersion; + } + } +}); + +// ../npm-resolver/lib/pickPackage.js +var require_pickPackage = __commonJS({ + "../npm-resolver/lib/pickPackage.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var crypto_1 = __importDefault(require("crypto")); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var logger_1 = __importDefault(require_lib6()); + var graceful_fs_1 = __importDefault(require_lib18()); + var encode_registry_1 = __importDefault(require_encode_registry()); + var load_json_file_1 = __importDefault(require_load_json_file()); + var p_limit_1 = __importDefault(require_p_limit()); + var path_temp_1 = __importDefault(require_path_temp()); + var rename_overwrite_1 = __importDefault(require_rename_overwrite()); + var toRaw_1 = __importDefault(require_toRaw()); + var pickPackageFromMeta_1 = __importDefault(require_pickPackageFromMeta()); + var metafileOperationLimits = {}; + exports2.default = async (ctx, spec, opts) => { + var _a; + opts = opts || {}; + validatePackageName(spec.name); + const cachedMeta = ctx.metaCache.get(spec.name); + if (cachedMeta != null) { + return { + meta: cachedMeta, + pickedPackage: pickPackageFromMeta_1.default(spec, opts.preferredVersionSelectors, cachedMeta) + }; + } + const registryName = encode_registry_1.default(opts.registry); + const pkgMirror = path_1.default.join(ctx.cacheDir, ctx.metaDir, registryName, `${encodePkgName(spec.name)}.json`); + const limit = metafileOperationLimits[pkgMirror] = metafileOperationLimits[pkgMirror] || p_limit_1.default(1); + let metaCachedInStore; + if (ctx.offline === true || ctx.preferOffline) { + metaCachedInStore = await limit(async () => loadMeta(pkgMirror)); + if (ctx.offline) { + if (metaCachedInStore != null) + return { + meta: metaCachedInStore, + pickedPackage: pickPackageFromMeta_1.default(spec, opts.preferredVersionSelectors, metaCachedInStore) + }; + throw new error_1.default("NO_OFFLINE_META", `Failed to resolve ${toRaw_1.default(spec)} in package mirror ${pkgMirror}`); + } + if (metaCachedInStore != null) { + const pickedPackage = pickPackageFromMeta_1.default(spec, opts.preferredVersionSelectors, metaCachedInStore); + if (pickedPackage) { + return { + meta: metaCachedInStore, + pickedPackage + }; + } + } + } + if (spec.type === "version") { + metaCachedInStore = metaCachedInStore !== null && metaCachedInStore !== void 0 ? metaCachedInStore : await limit(async () => loadMeta(pkgMirror)); + if (((_a = metaCachedInStore === null || metaCachedInStore === void 0 ? void 0 : metaCachedInStore.versions) === null || _a === void 0 ? void 0 : _a[spec.fetchSpec]) != null) { + return { + meta: metaCachedInStore, + pickedPackage: metaCachedInStore.versions[spec.fetchSpec] + }; + } + } + try { + const meta = await ctx.fetch(spec.name, opts.registry, opts.authHeaderValue); + meta.cachedAt = Date.now(); + ctx.metaCache.set(spec.name, meta); + if (!opts.dryRun) { + limit(async () => { + try { + await saveMeta(pkgMirror, meta); + } catch (err) { + } + }); + } + return { + meta, + pickedPackage: pickPackageFromMeta_1.default(spec, opts.preferredVersionSelectors, meta) + }; + } catch (err) { + const meta = await loadMeta(pkgMirror); + if (meta == null) + throw err; + logger_1.default.error(err, err); + logger_1.default.debug({ message: `Using cached meta from ${pkgMirror}` }); + return { + meta, + pickedPackage: pickPackageFromMeta_1.default(spec, opts.preferredVersionSelectors, meta) + }; + } + }; + function encodePkgName(pkgName) { + if (pkgName !== pkgName.toLowerCase()) { + return `${pkgName}_${crypto_1.default.createHash("md5").update(pkgName).digest("hex")}`; + } + return pkgName; + } + async function loadMeta(pkgMirror) { + try { + return await load_json_file_1.default(pkgMirror); + } catch (err) { + return null; + } + } + var createdDirs = new Set(); + async function saveMeta(pkgMirror, meta) { + const dir = path_1.default.dirname(pkgMirror); + if (!createdDirs.has(dir)) { + await fs_1.promises.mkdir(dir, { recursive: true }); + createdDirs.add(dir); + } + const temp = path_temp_1.default(dir); + await graceful_fs_1.default.writeFile(temp, JSON.stringify(meta)); + await rename_overwrite_1.default(temp, pkgMirror); + } + function validatePackageName(pkgName) { + if (pkgName.includes("/") && pkgName[0] !== "@") { + throw new error_1.default("INVALID_PACKAGE_NAME", `Package name ${pkgName} is invalid, it should have a @scope`); + } + } + } +}); + +// ../../node_modules/.pnpm/parse-npm-tarball-url@3.0.0/node_modules/parse-npm-tarball-url/lib/index.js +var require_lib44 = __commonJS({ + "../../node_modules/.pnpm/parse-npm-tarball-url@3.0.0/node_modules/parse-npm-tarball-url/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var url_1 = require("url"); + var assert = require("assert"); + var semver_1 = require_semver3(); + function parseNpmTarballUrl(url) { + assert(url, "url is required"); + assert(typeof url === "string", "url should be a string"); + const { path, host } = url_1.parse(url); + if (!path || !host) + return null; + const pkg = parsePath(path); + if (!pkg) + return null; + return { + host, + name: pkg.name, + version: pkg.version + }; + } + exports2.default = parseNpmTarballUrl; + function parsePath(path) { + const parts = path.split("/-/"); + if (parts.length !== 2) + return null; + const name = parts[0] && decodeURIComponent(parts[0].substr(1)); + if (!name) + return null; + const pathWithNoExtension = parts[1].replace(/\.tgz$/, ""); + const scopelessNameLength = name.length - (name.indexOf("/") + 1); + const version = pathWithNoExtension.substr(scopelessNameLength + 1); + if (!semver_1.valid(version, true)) + return null; + return { name, version }; + } + } +}); + +// ../npm-resolver/lib/parsePref.js +var require_parsePref3 = __commonJS({ + "../npm-resolver/lib/parsePref.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var parse_npm_tarball_url_1 = __importDefault(require_lib44()); + var version_selector_type_1 = __importDefault(require_version_selector_type()); + function parsePref(pref, alias, defaultTag, registry) { + let name = alias; + if (pref.startsWith("npm:")) { + pref = pref.substr(4); + const index = pref.lastIndexOf("@"); + if (index < 1) { + name = pref; + pref = defaultTag; + } else { + name = pref.substr(0, index); + pref = pref.substr(index + 1); + } + } + if (name) { + const selector = version_selector_type_1.default(pref); + if (selector != null) { + return { + fetchSpec: selector.normalized, + name, + type: selector.type + }; + } + } + if (pref.startsWith(registry)) { + const pkg = parse_npm_tarball_url_1.default(pref); + if (pkg != null) { + return { + fetchSpec: pkg.version, + name: pkg.name, + normalizedPref: pref, + type: "version" + }; + } + } + return null; + } + exports2.default = parsePref; + } +}); + +// ../npm-resolver/lib/fetch.js +var require_fetch2 = __commonJS({ + "../npm-resolver/lib/fetch.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RegistryResponseError = void 0; + var url_1 = __importDefault(require("url")); + var core_loggers_1 = require_lib12(); + var error_1 = __importStar2(require_lib8()); + var retry = __importStar2(require_retry2()); + var semverRegex = /(.*)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/; + var RegistryResponseError = class extends error_1.FetchError { + constructor(request, response, pkgName) { + let hint; + if (response.status === 404) { + hint = `${pkgName} is not in the npm registry, or you have no permission to fetch it.`; + const matched = pkgName.match(semverRegex); + if (matched != null) { + hint += ` Did you mean ${matched[1]}?`; + } + } + super(request, response, hint); + this.pkgName = pkgName; + } + }; + exports2.RegistryResponseError = RegistryResponseError; + async function fromRegistry(fetch, fetchOpts, pkgName, registry, authHeaderValue) { + const uri = toUri(pkgName, registry); + const op = retry.operation(fetchOpts.retry); + return new Promise((resolve, reject) => op.attempt(async (attempt) => { + let response; + try { + response = await fetch(uri, { + authHeaderValue, + compress: true, + retry: fetchOpts.retry, + timeout: fetchOpts.timeout + }); + } catch (error) { + reject(new error_1.default("META_FETCH_FAIL", `GET ${uri}: ${error.message}`, { attempts: attempt })); + return; + } + if (response.status > 400) { + const request = { + authHeaderValue, + url: uri + }; + reject(new RegistryResponseError(request, response, pkgName)); + return; + } + try { + resolve(await response.json()); + } catch (error) { + const timeout = op.retry(new error_1.default("BROKEN_METADATA_JSON", error.message)); + if (timeout === false) { + reject(op.mainError()); + return; + } + core_loggers_1.requestRetryLogger.debug({ + attempt, + error, + maxRetries: fetchOpts.retry.retries, + method: "GET", + timeout, + url: uri + }); + } + })); + } + exports2.default = fromRegistry; + function toUri(pkgName, registry) { + let encodedName; + if (pkgName[0] === "@") { + encodedName = `@${encodeURIComponent(pkgName.substr(1))}`; + } else { + encodedName = encodeURIComponent(pkgName); + } + return new url_1.default.URL(encodedName, registry).toString(); + } + } +}); + +// ../npm-resolver/lib/createNpmPkgId.js +var require_createNpmPkgId = __commonJS({ + "../npm-resolver/lib/createNpmPkgId.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var encode_registry_1 = __importDefault(require_encode_registry()); + function createPkgId(registry, pkgName, pkgVersion) { + const escapedRegistryHost = encode_registry_1.default(registry); + return `${escapedRegistryHost}/${pkgName}/${pkgVersion}`; + } + exports2.default = createPkgId; + } +}); + +// ../npm-resolver/lib/index.js +var require_lib45 = __commonJS({ + "../npm-resolver/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RegistryResponseError = exports2.NoMatchingVersionError = void 0; + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var resolve_workspace_range_1 = __importDefault(require_lib24()); + var lru_cache_1 = __importDefault(require_lru_cache()); + var normalize_path_1 = __importDefault(require_normalize_path()); + var p_memoize_1 = __importDefault(require_p_memoize()); + var semver_1 = __importDefault(require_semver2()); + var ssri_1 = __importDefault(require_ssri()); + var pickPackage_1 = __importDefault(require_pickPackage()); + var parsePref_1 = __importDefault(require_parsePref3()); + var fetch_1 = __importStar2(require_fetch2()); + Object.defineProperty(exports2, "RegistryResponseError", { enumerable: true, get: function() { + return fetch_1.RegistryResponseError; + } }); + var createNpmPkgId_1 = __importDefault(require_createNpmPkgId()); + var NoMatchingVersionError = class extends error_1.default { + constructor(opts) { + var _a; + const dep = opts.wantedDependency.alias ? `${opts.wantedDependency.alias}@${(_a = opts.wantedDependency.pref) !== null && _a !== void 0 ? _a : ""}` : opts.wantedDependency.pref; + super("NO_MATCHING_VERSION", `No matching version found for ${dep}`); + this.packageMeta = opts.packageMeta; + } + }; + exports2.NoMatchingVersionError = NoMatchingVersionError; + var META_DIR = "metadata"; + var FULL_META_DIR = "metadata-full"; + function createResolver(fetchFromRegistry, getCredentials, opts) { + var _a, _b; + if (typeof opts.cacheDir !== "string") { + throw new TypeError("`opts.cacheDir` is required and needs to be a string"); + } + const fetchOpts = { + retry: (_a = opts.retry) !== null && _a !== void 0 ? _a : {}, + timeout: (_b = opts.timeout) !== null && _b !== void 0 ? _b : 6e4 + }; + const fetch = p_memoize_1.default(fetch_1.default.bind(null, fetchFromRegistry, fetchOpts), { + cacheKey: (...args2) => JSON.stringify(args2), + maxAge: 1e3 * 20 + }); + const getAuthHeaderValueByURI = (registry) => getCredentials(registry).authHeaderValue; + const metaCache = new lru_cache_1.default({ + max: 1e4, + maxAge: 120 * 1e3 + }); + return resolveNpm.bind(null, { + getAuthHeaderValueByURI, + pickPackage: pickPackage_1.default.bind(null, { + fetch, + metaCache, + metaDir: opts.fullMetadata ? FULL_META_DIR : META_DIR, + offline: opts.offline, + preferOffline: opts.preferOffline, + cacheDir: opts.cacheDir + }) + }); + } + exports2.default = createResolver; + async function resolveNpm(ctx, wantedDependency, opts) { + var _a, _b, _c; + const defaultTag = (_a = opts.defaultTag) !== null && _a !== void 0 ? _a : "latest"; + if ((_b = wantedDependency.pref) === null || _b === void 0 ? void 0 : _b.startsWith("workspace:")) { + if (wantedDependency.pref.startsWith("workspace:.")) + return null; + const resolvedFromWorkspace = tryResolveFromWorkspace(wantedDependency, { + defaultTag, + projectDir: opts.projectDir, + registry: opts.registry, + workspacePackages: opts.workspacePackages + }); + if (resolvedFromWorkspace != null) { + return resolvedFromWorkspace; + } + } + const workspacePackages = opts.alwaysTryWorkspacePackages !== false ? opts.workspacePackages : void 0; + const spec = wantedDependency.pref ? parsePref_1.default(wantedDependency.pref, wantedDependency.alias, defaultTag, opts.registry) : defaultTagForAlias(wantedDependency.alias, defaultTag); + if (spec == null) + return null; + const authHeaderValue = ctx.getAuthHeaderValueByURI(opts.registry); + let pickResult; + try { + pickResult = await ctx.pickPackage(spec, { + authHeaderValue, + dryRun: opts.dryRun === true, + preferredVersionSelectors: (_c = opts.preferredVersions) === null || _c === void 0 ? void 0 : _c[spec.name], + registry: opts.registry + }); + } catch (err) { + if (workspacePackages != null && opts.projectDir) { + const resolvedFromLocal = tryResolveFromWorkspacePackages(workspacePackages, spec, opts.projectDir); + if (resolvedFromLocal != null) + return resolvedFromLocal; + } + throw err; + } + const pickedPackage = pickResult.pickedPackage; + const meta = pickResult.meta; + if (pickedPackage == null) { + if (workspacePackages != null && opts.projectDir) { + const resolvedFromLocal = tryResolveFromWorkspacePackages(workspacePackages, spec, opts.projectDir); + if (resolvedFromLocal != null) + return resolvedFromLocal; + } + throw new NoMatchingVersionError({ wantedDependency, packageMeta: meta }); + } + if ((workspacePackages === null || workspacePackages === void 0 ? void 0 : workspacePackages[pickedPackage.name]) != null && opts.projectDir) { + if (workspacePackages[pickedPackage.name][pickedPackage.version]) { + return { + ...resolveFromLocalPackage(workspacePackages[pickedPackage.name][pickedPackage.version], spec.normalizedPref, opts.projectDir), + latest: meta["dist-tags"].latest + }; + } + const localVersion = pickMatchingLocalVersionOrNull(workspacePackages[pickedPackage.name], spec); + if (localVersion && (semver_1.default.gt(localVersion, pickedPackage.version) || opts.preferWorkspacePackages)) { + return { + ...resolveFromLocalPackage(workspacePackages[pickedPackage.name][localVersion], spec.normalizedPref, opts.projectDir), + latest: meta["dist-tags"].latest + }; + } + } + const id = createNpmPkgId_1.default(pickedPackage.dist.tarball, pickedPackage.name, pickedPackage.version); + const resolution = { + integrity: getIntegrity(pickedPackage.dist), + registry: opts.registry, + tarball: pickedPackage.dist.tarball + }; + return { + id, + latest: meta["dist-tags"].latest, + manifest: pickedPackage, + normalizedPref: spec.normalizedPref, + resolution, + resolvedVia: "npm-registry" + }; + } + function workspacePrefToNpm(workspacePref) { + const prefParts = /^workspace:([^@]+@)?(.*)$/.exec(workspacePref); + if (prefParts == null) { + throw new Error(`Invalid workspace spec: ${workspacePref}`); + } + const [workspacePkgAlias, workspaceVersion] = prefParts.slice(1); + const pkgAliasPart = workspacePkgAlias != null && workspacePkgAlias ? `npm:${workspacePkgAlias}` : ""; + const versionPart = workspaceVersion === "^" || workspaceVersion === "~" ? "*" : workspaceVersion; + return `${pkgAliasPart}${versionPart}`; + } + function tryResolveFromWorkspace(wantedDependency, opts) { + var _a, _b; + if (!((_a = wantedDependency.pref) === null || _a === void 0 ? void 0 : _a.startsWith("workspace:"))) { + return null; + } + const pref = workspacePrefToNpm(wantedDependency.pref); + const spec = parsePref_1.default(pref, wantedDependency.alias, opts.defaultTag, opts.registry); + if (spec == null) + throw new Error(`Invalid workspace: spec (${wantedDependency.pref})`); + if (opts.workspacePackages == null) { + throw new Error("Cannot resolve package from workspace because opts.workspacePackages is not defined"); + } + if (!opts.projectDir) { + throw new Error("Cannot resolve package from workspace because opts.projectDir is not defined"); + } + const resolvedFromLocal = tryResolveFromWorkspacePackages(opts.workspacePackages, spec, opts.projectDir); + if (resolvedFromLocal == null) { + throw new error_1.default("NO_MATCHING_VERSION_INSIDE_WORKSPACE", `In ${path_1.default.relative(process.cwd(), opts.projectDir)}: No matching version found for ${(_b = wantedDependency.alias) !== null && _b !== void 0 ? _b : ""}@${pref} inside the workspace`); + } + return resolvedFromLocal; + } + function tryResolveFromWorkspacePackages(workspacePackages, spec, projectDir) { + if (!workspacePackages[spec.name]) + return null; + const localVersion = pickMatchingLocalVersionOrNull(workspacePackages[spec.name], spec); + if (!localVersion) + return null; + return resolveFromLocalPackage(workspacePackages[spec.name][localVersion], spec.normalizedPref, projectDir); + } + function pickMatchingLocalVersionOrNull(versions, spec) { + const localVersions = Object.keys(versions); + switch (spec.type) { + case "tag": + return semver_1.default.maxSatisfying(localVersions, "*"); + case "version": + return versions[spec.fetchSpec] ? spec.fetchSpec : null; + case "range": + return resolve_workspace_range_1.default(spec.fetchSpec, localVersions); + default: + return null; + } + } + function resolveFromLocalPackage(localPackage, normalizedPref, projectDir) { + return { + id: `link:${normalize_path_1.default(path_1.default.relative(projectDir, localPackage.dir))}`, + manifest: localPackage.manifest, + normalizedPref, + resolution: { + directory: localPackage.dir, + type: "directory" + }, + resolvedVia: "local-filesystem" + }; + } + function defaultTagForAlias(alias, defaultTag) { + return { + fetchSpec: defaultTag, + name: alias, + type: "tag" + }; + } + function getIntegrity(dist) { + if (dist.integrity) { + return dist.integrity; + } + if (!dist.shasum) { + return void 0; + } + const integrity = ssri_1.default.fromHex(dist.shasum, "sha1"); + if (!integrity) { + throw new error_1.default("INVALID_TARBALL_INTEGRITY", `Tarball "${dist.tarball}" has invalid shasum specified in its metadata: ${dist.shasum}`); + } + return integrity.toString(); + } + } +}); + +// ../tarball-resolver/lib/index.js +var require_lib46 = __commonJS({ + "../tarball-resolver/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + async function resolveTarball(wantedDependency) { + if (!wantedDependency.pref.startsWith("http:") && !wantedDependency.pref.startsWith("https:")) { + return null; + } + if (isRepository(wantedDependency.pref)) + return null; + return { + id: `@${wantedDependency.pref.replace(/^.*:\/\/(git@)?/, "").replace(":", "+")}`, + normalizedPref: wantedDependency.pref, + resolution: { + tarball: wantedDependency.pref + }, + resolvedVia: "url" + }; + } + exports2.default = resolveTarball; + var GIT_HOSTERS = new Set([ + "github.com", + "gitlab.com", + "bitbucket.org" + ]); + function isRepository(pref) { + if (pref.endsWith("/")) { + pref = pref.substr(0, pref.length - 1); + } + const parts = pref.split("/"); + return parts.length === 5 && GIT_HOSTERS.has(parts[2]); + } + } +}); + +// ../default-resolver/lib/index.js +var require_lib47 = __commonJS({ + "../default-resolver/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var git_resolver_1 = __importDefault(require_lib42()); + var local_resolver_1 = __importDefault(require_lib43()); + var npm_resolver_1 = __importDefault(require_lib45()); + var tarball_resolver_1 = __importDefault(require_lib46()); + function createResolver(fetchFromRegistry, getCredentials, pnpmOpts) { + const resolveFromNpm = npm_resolver_1.default(fetchFromRegistry, getCredentials, pnpmOpts); + const resolveFromGit = git_resolver_1.default(pnpmOpts); + return async (wantedDependency, opts) => { + var _a, _b, _c, _d; + const resolution = (_a = await resolveFromNpm(wantedDependency, opts)) !== null && _a !== void 0 ? _a : wantedDependency.pref && ((_c = (_b = await tarball_resolver_1.default(wantedDependency)) !== null && _b !== void 0 ? _b : await resolveFromGit(wantedDependency)) !== null && _c !== void 0 ? _c : await local_resolver_1.default(wantedDependency, opts)); + if (!resolution) { + throw new error_1.default("SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER", `${wantedDependency.alias ? wantedDependency.alias + "@" : ""}${(_d = wantedDependency.pref) !== null && _d !== void 0 ? _d : ""} isn't supported by any available resolver.`); + } + return resolution; + }; + } + exports2.default = createResolver; + } +}); + +// ../git-fetcher/lib/index.js +var require_lib48 = __commonJS({ + "../git-fetcher/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var prepare_package_1 = __importDefault(require_lib39()); + var rimraf_1 = __importDefault(require_rimraf()); + var execa_1 = __importDefault(require_lib26()); + exports2.default = () => { + return { + git: async function fetchFromGit(cafs, resolution, opts) { + const tempLocation = await cafs.tempDir(); + await execGit(["clone", resolution.repo, tempLocation]); + await execGit(["checkout", resolution.commit], { cwd: tempLocation }); + await prepare_package_1.default(tempLocation); + await rimraf_1.default(path_1.default.join(tempLocation, ".git")); + const filesIndex = await cafs.addFilesFromDir(tempLocation, opts.manifest); + return { filesIndex }; + } + }; + }; + function prefixGitArgs() { + return process.platform === "win32" ? ["-c", "core.longpaths=true"] : []; + } + function execGit(args2, opts) { + const fullArgs = prefixGitArgs().concat(args2 || []); + return execa_1.default("git", fullArgs, opts); + } + } +}); + +// ../../node_modules/.pnpm/nerf-dart@1.0.0/node_modules/nerf-dart/index.js +var require_nerf_dart = __commonJS({ + "../../node_modules/.pnpm/nerf-dart@1.0.0/node_modules/nerf-dart/index.js"(exports2, module2) { + var url = require("url"); + module2.exports = toNerfDart; + function toNerfDart(uri) { + var parsed = url.parse(uri); + delete parsed.protocol; + delete parsed.auth; + delete parsed.query; + delete parsed.search; + delete parsed.hash; + return url.resolve(url.format(parsed), "."); + } + } +}); + +// ../../node_modules/.pnpm/credentials-by-uri@2.0.0/node_modules/credentials-by-uri/index.js +var require_credentials_by_uri = __commonJS({ + "../../node_modules/.pnpm/credentials-by-uri@2.0.0/node_modules/credentials-by-uri/index.js"(exports2, module2) { + "use strict"; + var assert = require("assert"); + var toNerfDart = require_nerf_dart(); + module2.exports = function getCredentialsByURI(config, uri) { + assert(uri && typeof uri === "string", "registry URL is required"); + const nerfed = toNerfDart(uri); + const defnerf = toNerfDart(config.registry); + const creds = getScopedCredentials(nerfed, `${nerfed}:`, config); + if (nerfed !== defnerf) + return creds; + return { + ...getScopedCredentials(nerfed, "", config), + ...creds + }; + }; + function getScopedCredentials(nerfed, scope, config) { + const c = {}; + if (config[`${scope}always-auth`] !== void 0) { + const val = config[`${scope}always-auth`]; + c.alwaysAuth = val === "false" ? false : !!val; + } + if (config[`${scope}_authToken`]) { + c.authHeaderValue = `Bearer ${config[`${scope}_authToken`]}`; + return c; + } + if (config[`${scope}_auth`]) { + c.authHeaderValue = `Basic ${config[`${scope}_auth`]}`; + return c; + } + let username, password; + if (config[`${scope}username`]) { + username = config[`${scope}username`]; + } + if (config[`${scope}_password`]) { + if (scope === "") { + password = config[`${scope}_password`]; + } else { + password = Buffer.from(config[`${scope}_password`], "base64").toString("utf8"); + } + } + if (username && password) { + c.authHeaderValue = `Basic ${Buffer.from(`${username}:${password}`).toString("base64")}`; + } + return c; + } + } +}); + +// ../client/lib/index.js +var require_lib49 = __commonJS({ + "../client/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createResolver = void 0; + var default_resolver_1 = __importDefault(require_lib47()); + var fetch_1 = require_lib29(); + var git_fetcher_1 = __importDefault(require_lib48()); + var tarball_fetcher_1 = __importDefault(require_lib40()); + var credentials_by_uri_1 = __importDefault(require_credentials_by_uri()); + var mem_1 = __importDefault(require_dist8()); + function default_1(opts) { + const fetchFromRegistry = fetch_1.createFetchFromRegistry(opts); + const getCredentials = mem_1.default((registry) => credentials_by_uri_1.default(opts.authConfig, registry)); + return { + fetchers: createFetchers(fetchFromRegistry, getCredentials, opts), + resolve: default_resolver_1.default(fetchFromRegistry, getCredentials, opts) + }; + } + exports2.default = default_1; + function createResolver(opts) { + const fetchFromRegistry = fetch_1.createFetchFromRegistry(opts); + const getCredentials = mem_1.default((registry) => credentials_by_uri_1.default(opts.authConfig, registry)); + return default_resolver_1.default(fetchFromRegistry, getCredentials, opts); + } + exports2.createResolver = createResolver; + function createFetchers(fetchFromRegistry, getCredentials, opts) { + return { + ...tarball_fetcher_1.default(fetchFromRegistry, getCredentials, opts), + ...git_fetcher_1.default() + }; + } + } +}); + +// ../pick-registry-for-package/lib/index.js +var require_lib50 = __commonJS({ + "../pick-registry-for-package/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = (registries, packageName, pref) => { + var _a; + const scope = getScope(packageName, pref); + return (_a = scope && registries[scope]) !== null && _a !== void 0 ? _a : registries.default; + }; + function getScope(pkgName, pref) { + if (pref === null || pref === void 0 ? void 0 : pref.startsWith("npm:")) { + pref = pref.substr(4); + if (pref[0] === "@") { + return pref.substr(0, pref.indexOf("/")); + } + } + if (pkgName[0] === "@") { + return pkgName.substr(0, pkgName.indexOf("/")); + } + return null; + } + } +}); + +// lib/checkForUpdates.js +var require_checkForUpdates = __commonJS({ + "lib/checkForUpdates.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var cli_meta_1 = __importDefault(require_lib4()); + var client_1 = require_lib49(); + var pick_registry_for_package_1 = __importDefault(require_lib50()); + var core_loggers_1 = require_lib12(); + var load_json_file_1 = __importDefault(require_load_json_file()); + var write_json_file_1 = __importDefault(require_write_json_file()); + var UPDATE_CHECK_FREQUENCY = 24 * 60 * 60 * 1e3; + async function default_1(config) { + var _a, _b; + const stateFile = path_1.default.join(config.stateDir, "pnpm-state.json"); + let state; + try { + state = await load_json_file_1.default(stateFile); + } catch (err) { + } + if ((state === null || state === void 0 ? void 0 : state.lastUpdateCheck) && Date.now() - new Date(state.lastUpdateCheck).valueOf() < UPDATE_CHECK_FREQUENCY) + return; + const resolve = client_1.createResolver({ + ...config, + authConfig: config.rawConfig, + retry: { + retries: 0 + } + }); + const resolution = await resolve({ alias: cli_meta_1.default.name, pref: "latest" }, { + lockfileDir: (_a = config.lockfileDir) !== null && _a !== void 0 ? _a : config.dir, + preferredVersions: {}, + projectDir: config.dir, + registry: pick_registry_for_package_1.default(config.registries, cli_meta_1.default.name, "latest") + }); + if ((_b = resolution === null || resolution === void 0 ? void 0 : resolution.manifest) === null || _b === void 0 ? void 0 : _b.version) { + core_loggers_1.updateCheckLogger.debug({ + currentVersion: cli_meta_1.default.version, + latestVersion: resolution === null || resolution === void 0 ? void 0 : resolution.manifest.version + }); + } + await write_json_file_1.default(stateFile, { + ...state, + lastUpdateCheck: new Date().toUTCString() + }); + } + exports2.default = default_1; + } +}); + +// ../lockfile-utils/lib/nameVerFromPkgSnapshot.js +var require_nameVerFromPkgSnapshot = __commonJS({ + "../lockfile-utils/lib/nameVerFromPkgSnapshot.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var dp = __importStar2(require_lib33()); + exports2.default = (depPath, pkgSnapshot) => { + if (!pkgSnapshot.name) { + const pkgInfo = dp.parse(depPath); + return { + name: pkgInfo.name, + peersSuffix: pkgInfo.peersSuffix, + version: pkgInfo.version + }; + } + return { + name: pkgSnapshot.name, + peersSuffix: void 0, + version: pkgSnapshot.version + }; + }; + } +}); + +// ../lockfile-utils/lib/packageIdFromSnapshot.js +var require_packageIdFromSnapshot = __commonJS({ + "../lockfile-utils/lib/packageIdFromSnapshot.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var dp = __importStar2(require_lib33()); + exports2.default = (depPath, pkgSnapshot, registries) => { + var _a; + if (pkgSnapshot.id) + return pkgSnapshot.id; + return (_a = dp.tryGetPackageId(registries, depPath)) !== null && _a !== void 0 ? _a : depPath; + }; + } +}); + +// ../lockfile-utils/lib/packageIsIndependent.js +var require_packageIsIndependent = __commonJS({ + "../lockfile-utils/lib/packageIsIndependent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = ({ dependencies, optionalDependencies }) => { + return dependencies === void 0 && optionalDependencies === void 0; + }; + } +}); + +// ../../node_modules/.pnpm/normalize-registry-url@1.0.0/node_modules/normalize-registry-url/index.js +var require_normalize_registry_url = __commonJS({ + "../../node_modules/.pnpm/normalize-registry-url@1.0.0/node_modules/normalize-registry-url/index.js"(exports2, module2) { + "use strict"; + module2.exports = function(registry) { + if (typeof registry !== "string") { + throw new TypeError("`registry` should be a string"); + } + if (registry[registry.length - 1] === "/") + return registry; + return `${registry}/`; + }; + } +}); + +// ../../node_modules/.pnpm/get-npm-tarball-url@2.0.2/node_modules/get-npm-tarball-url/lib/index.js +var require_lib51 = __commonJS({ + "../../node_modules/.pnpm/get-npm-tarball-url@2.0.2/node_modules/get-npm-tarball-url/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var normalizeRegistry = require_normalize_registry_url(); + function default_1(pkgName, pkgVersion, opts) { + const registry = normalizeRegistry(opts && opts.registry || "https://registry.npmjs.org/"); + const scopelessName = getScopelessName(pkgName); + return `${registry}${pkgName}/-/${scopelessName}-${removeBuildMetadataFromVersion(pkgVersion)}.tgz`; + } + exports2.default = default_1; + function removeBuildMetadataFromVersion(version) { + const plusPos = version.indexOf("+"); + if (plusPos === -1) + return version; + return version.substring(0, plusPos); + } + function getScopelessName(name) { + if (name[0] !== "@") { + return name; + } + return name.split("/")[1]; + } + } +}); + +// ../lockfile-utils/lib/pkgSnapshotToResolution.js +var require_pkgSnapshotToResolution = __commonJS({ + "../lockfile-utils/lib/pkgSnapshotToResolution.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var url_1 = __importDefault(require("url")); + var dp = __importStar2(require_lib33()); + var get_npm_tarball_url_1 = __importDefault(require_lib51()); + var nameVerFromPkgSnapshot_1 = __importDefault(require_nameVerFromPkgSnapshot()); + exports2.default = (depPath, pkgSnapshot, registries) => { + var _a; + if (pkgSnapshot.resolution["type"] || ((_a = pkgSnapshot.resolution["tarball"]) === null || _a === void 0 ? void 0 : _a.startsWith("file:"))) { + return pkgSnapshot.resolution; + } + const { name } = nameVerFromPkgSnapshot_1.default(depPath, pkgSnapshot); + const registry = pkgSnapshot.resolution["registry"] || name[0] === "@" && registries[name.split("/")[0]] || registries.default; + let tarball; + if (!pkgSnapshot.resolution["tarball"]) { + tarball = getTarball(registry); + } else { + tarball = new url_1.default.URL(pkgSnapshot.resolution["tarball"], registry).toString(); + } + return { + ...pkgSnapshot.resolution, + registry, + tarball + }; + function getTarball(registry2) { + const { name: name2, version } = dp.parse(depPath); + if (!name2 || !version) { + throw new Error(`Couldn't get tarball URL from dependency path ${depPath}`); + } + return get_npm_tarball_url_1.default(name2, version, { registry: registry2 }); + } + }; + } +}); + +// ../lockfile-utils/lib/satisfiesPackageManifest.js +var require_satisfiesPackageManifest = __commonJS({ + "../lockfile-utils/lib/satisfiesPackageManifest.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var types_1 = require_lib14(); + var equals_1 = __importDefault(require_equals2()); + exports2.default = (lockfile, pkg, importerId) => { + var _a, _b; + const importer = lockfile.importers[importerId]; + if (!importer) + return false; + if (!equals_1.default({ ...pkg.devDependencies, ...pkg.dependencies, ...pkg.optionalDependencies }, importer.specifiers)) { + return false; + } + for (const depField of types_1.DEPENDENCIES_FIELDS) { + const importerDeps = (_a = importer[depField]) !== null && _a !== void 0 ? _a : {}; + const pkgDeps = (_b = pkg[depField]) !== null && _b !== void 0 ? _b : {}; + let pkgDepNames; + switch (depField) { + case "optionalDependencies": + pkgDepNames = Object.keys(pkgDeps); + break; + case "devDependencies": + pkgDepNames = Object.keys(pkgDeps).filter((depName) => (pkg.optionalDependencies == null || !pkg.optionalDependencies[depName]) && (pkg.dependencies == null || !pkg.dependencies[depName])); + break; + case "dependencies": + pkgDepNames = Object.keys(pkgDeps).filter((depName) => pkg.optionalDependencies == null || !pkg.optionalDependencies[depName]); + break; + default: + throw new Error(`Unknown dependency type "${depField}"`); + } + if (pkgDepNames.length !== Object.keys(importerDeps).length && pkgDepNames.length !== countOfNonLinkedDeps(importerDeps)) { + return false; + } + for (const depName of pkgDepNames) { + if (!importerDeps[depName] || importer.specifiers[depName] !== pkgDeps[depName]) + return false; + } + } + return true; + }; + function countOfNonLinkedDeps(lockfileDeps) { + return Object.values(lockfileDeps).filter((ref) => !ref.includes("link:") && !ref.includes("file:")).length; + } + } +}); + +// ../lockfile-types/lib/index.js +var require_lib52 = __commonJS({ + "../lockfile-types/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../lockfile-utils/lib/index.js +var require_lib53 = __commonJS({ + "../lockfile-utils/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getPkgShortId = exports2.satisfiesPackageManifest = exports2.pkgSnapshotToResolution = exports2.packageIsIndependent = exports2.packageIdFromSnapshot = exports2.nameVerFromPkgSnapshot = void 0; + var dependency_path_1 = require_lib33(); + var nameVerFromPkgSnapshot_1 = __importDefault(require_nameVerFromPkgSnapshot()); + exports2.nameVerFromPkgSnapshot = nameVerFromPkgSnapshot_1.default; + var packageIdFromSnapshot_1 = __importDefault(require_packageIdFromSnapshot()); + exports2.packageIdFromSnapshot = packageIdFromSnapshot_1.default; + var packageIsIndependent_1 = __importDefault(require_packageIsIndependent()); + exports2.packageIsIndependent = packageIsIndependent_1.default; + var pkgSnapshotToResolution_1 = __importDefault(require_pkgSnapshotToResolution()); + exports2.pkgSnapshotToResolution = pkgSnapshotToResolution_1.default; + var satisfiesPackageManifest_1 = __importDefault(require_satisfiesPackageManifest()); + exports2.satisfiesPackageManifest = satisfiesPackageManifest_1.default; + __exportStar(require_lib52(), exports2); + exports2.getPkgShortId = dependency_path_1.refToRelative; + } +}); + +// ../lockfile-walker/lib/index.js +var require_lib54 = __commonJS({ + "../lockfile-walker/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.lockfileWalkerGroupImporterSteps = void 0; + var dp = __importStar2(require_lib33()); + function lockfileWalkerGroupImporterSteps(lockfile, importerIds, opts) { + const walked = new Set((opts === null || opts === void 0 ? void 0 : opts.skipped) != null ? Array.from(opts === null || opts === void 0 ? void 0 : opts.skipped) : []); + return importerIds.map((importerId) => { + var _a, _b, _c, _d; + const projectSnapshot = lockfile.importers[importerId]; + const entryNodes = Object.entries({ + ...((_a = opts === null || opts === void 0 ? void 0 : opts.include) === null || _a === void 0 ? void 0 : _a.devDependencies) === false ? {} : projectSnapshot.devDependencies, + ...((_b = opts === null || opts === void 0 ? void 0 : opts.include) === null || _b === void 0 ? void 0 : _b.dependencies) === false ? {} : projectSnapshot.dependencies, + ...((_c = opts === null || opts === void 0 ? void 0 : opts.include) === null || _c === void 0 ? void 0 : _c.optionalDependencies) === false ? {} : projectSnapshot.optionalDependencies + }).map(([pkgName, reference]) => dp.refToRelative(reference, pkgName)).filter((nodeId) => nodeId !== null); + return { + importerId, + step: step({ + includeOptionalDependencies: ((_d = opts === null || opts === void 0 ? void 0 : opts.include) === null || _d === void 0 ? void 0 : _d.optionalDependencies) !== false, + lockfile, + walked + }, entryNodes) + }; + }); + } + exports2.lockfileWalkerGroupImporterSteps = lockfileWalkerGroupImporterSteps; + function lockfileWalker(lockfile, importerIds, opts) { + var _a; + const walked = new Set((opts === null || opts === void 0 ? void 0 : opts.skipped) != null ? Array.from(opts === null || opts === void 0 ? void 0 : opts.skipped) : []); + const entryNodes = []; + const directDeps = []; + importerIds.forEach((importerId) => { + var _a2, _b, _c; + const projectSnapshot = lockfile.importers[importerId]; + Object.entries({ + ...((_a2 = opts === null || opts === void 0 ? void 0 : opts.include) === null || _a2 === void 0 ? void 0 : _a2.devDependencies) === false ? {} : projectSnapshot.devDependencies, + ...((_b = opts === null || opts === void 0 ? void 0 : opts.include) === null || _b === void 0 ? void 0 : _b.dependencies) === false ? {} : projectSnapshot.dependencies, + ...((_c = opts === null || opts === void 0 ? void 0 : opts.include) === null || _c === void 0 ? void 0 : _c.optionalDependencies) === false ? {} : projectSnapshot.optionalDependencies + }).forEach(([pkgName, reference]) => { + const depPath = dp.refToRelative(reference, pkgName); + if (depPath === null) + return; + entryNodes.push(depPath); + directDeps.push({ alias: pkgName, depPath }); + }); + }); + return { + directDeps, + step: step({ + includeOptionalDependencies: ((_a = opts === null || opts === void 0 ? void 0 : opts.include) === null || _a === void 0 ? void 0 : _a.optionalDependencies) !== false, + lockfile, + walked + }, entryNodes) + }; + } + exports2.default = lockfileWalker; + function step(ctx, nextDepPaths) { + var _a; + const result = { + dependencies: [], + links: [], + missing: [] + }; + for (const depPath of nextDepPaths) { + if (ctx.walked.has(depPath)) + continue; + ctx.walked.add(depPath); + const pkgSnapshot = (_a = ctx.lockfile.packages) === null || _a === void 0 ? void 0 : _a[depPath]; + if (pkgSnapshot == null) { + if (depPath.startsWith("link:")) { + result.links.push(depPath); + continue; + } + result.missing.push(depPath); + continue; + } + result.dependencies.push({ + depPath, + next: () => step(ctx, next({ includeOptionalDependencies: ctx.includeOptionalDependencies }, pkgSnapshot)), + pkgSnapshot + }); + } + return result; + } + function next(opts, nextPkg) { + return Object.entries({ + ...nextPkg.dependencies, + ...opts.includeOptionalDependencies ? nextPkg.optionalDependencies : {} + }).map(([pkgName, reference]) => dp.refToRelative(reference, pkgName)).filter((nodeId) => nodeId !== null); + } + } +}); + +// ../audit/lib/lockfileToAuditTree.js +var require_lockfileToAuditTree = __commonJS({ + "../audit/lib/lockfileToAuditTree.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var lockfile_utils_1 = require_lib53(); + var lockfile_walker_1 = require_lib54(); + function lockfileToAuditTree(lockfile, opts) { + const importerWalkers = lockfile_walker_1.lockfileWalkerGroupImporterSteps(lockfile, Object.keys(lockfile.importers), { include: opts === null || opts === void 0 ? void 0 : opts.include }); + const dependencies = {}; + importerWalkers.forEach((importerWalker) => { + const importerDeps = lockfileToAuditNode(importerWalker.step); + const depName = importerWalker.importerId.replace(/\//g, "__"); + dependencies[depName] = { + dependencies: importerDeps, + requires: toRequires(importerDeps), + version: "0.0.0" + }; + }); + const auditTree = { + name: void 0, + version: void 0, + dependencies, + dev: false, + install: [], + integrity: void 0, + metadata: {}, + remove: [], + requires: toRequires(dependencies) + }; + return auditTree; + } + exports2.default = lockfileToAuditTree; + function lockfileToAuditNode(step) { + const dependencies = {}; + for (const { depPath, pkgSnapshot, next } of step.dependencies) { + const { name, version } = lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot); + const subdeps = lockfileToAuditNode(next()); + const dep = { + dev: pkgSnapshot.dev === true, + integrity: pkgSnapshot.resolution["integrity"], + version + }; + if (Object.keys(subdeps).length > 0) { + dep.dependencies = subdeps; + dep.requires = toRequires(subdeps); + } + dependencies[name] = dep; + } + return dependencies; + } + function toRequires(auditNodesByDepName) { + const requires = {}; + for (const subdepName of Object.keys(auditNodesByDepName)) { + requires[subdepName] = auditNodesByDepName[subdepName].version; + } + return requires; + } + } +}); + +// ../audit/lib/types.js +var require_types4 = __commonJS({ + "../audit/lib/types.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../audit/lib/index.js +var require_lib55 = __commonJS({ + "../audit/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var fetch_1 = __importDefault(require_lib29()); + var lockfileToAuditTree_1 = __importDefault(require_lockfileToAuditTree()); + __exportStar(require_types4(), exports2); + async function audit(lockfile, opts) { + const auditTree = lockfileToAuditTree_1.default(lockfile, { include: opts.include }); + const registry = opts.registry.endsWith("/") ? opts.registry : `${opts.registry}/`; + const auditUrl = `${registry}-/npm/v1/security/audits`; + const res = await fetch_1.default(auditUrl, { + body: JSON.stringify(auditTree), + headers: { "Content-Type": "application/json" }, + method: "post", + retry: opts.retry, + timeout: opts.timeout + }); + if (res.status !== 200) { + throw new error_1.default("AUDIT_BAD_RESPONSE", `The audit endpoint (at ${auditUrl}) responded with ${res.status}: ${await res.text()}`); + } + return res.json(); + } + exports2.default = audit; + } +}); + +// ../lockfile-file/lib/existsWantedLockfile.js +var require_existsWantedLockfile = __commonJS({ + "../lockfile-file/lib/existsWantedLockfile.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = __importDefault(require("fs")); + var path_1 = __importDefault(require("path")); + var constants_1 = require_lib7(); + exports2.default = async (pkgPath) => new Promise((resolve, reject) => { + fs_1.default.access(path_1.default.join(pkgPath, constants_1.WANTED_LOCKFILE), (err) => { + if (err == null) { + resolve(true); + return; + } + if (err.code === "ENOENT") { + resolve(false); + return; + } + reject(err); + }); + }); + } +}); + +// ../lockfile-file/lib/getLockfileImporterId.js +var require_getLockfileImporterId = __commonJS({ + "../lockfile-file/lib/getLockfileImporterId.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var normalize_path_1 = __importDefault(require_normalize_path()); + exports2.default = (lockfileDir, prefix) => normalize_path_1.default(path_1.default.relative(lockfileDir, prefix)) || "."; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/empty.js +var require_empty2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/empty.js"(exports2, module2) { + var _curry1 = require_curry1(); + var _isArguments = require_isArguments(); + var _isArray = require_isArray(); + var _isObject = require_isObject(); + var _isString = require_isString(); + var empty = /* @__PURE__ */ _curry1(function empty2(x) { + return x != null && typeof x["fantasy-land/empty"] === "function" ? x["fantasy-land/empty"]() : x != null && x.constructor != null && typeof x.constructor["fantasy-land/empty"] === "function" ? x.constructor["fantasy-land/empty"]() : x != null && typeof x.empty === "function" ? x.empty() : x != null && x.constructor != null && typeof x.constructor.empty === "function" ? x.constructor.empty() : _isArray(x) ? [] : _isString(x) ? "" : _isObject(x) ? {} : _isArguments(x) ? function() { + return arguments; + }() : void 0; + }); + module2.exports = empty; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/isEmpty.js +var require_isEmpty2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/isEmpty.js"(exports2, module2) { + var _curry1 = require_curry1(); + var empty = require_empty2(); + var equals = require_equals2(); + var isEmpty = /* @__PURE__ */ _curry1(function isEmpty2(x) { + return x != null && equals(x, empty(x)); + }); + module2.exports = isEmpty; + } +}); + +// ../lockfile-file/lib/logger.js +var require_logger2 = __commonJS({ + "../lockfile-file/lib/logger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var logger_1 = __importDefault(require_lib6()); + exports2.default = logger_1.default("lockfile"); + } +}); + +// ../lockfile-file/lib/sortLockfileKeys.js +var require_sortLockfileKeys = __commonJS({ + "../lockfile-file/lib/sortLockfileKeys.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sortLockfileKeys = void 0; + var sort_keys_1 = __importDefault(require_sort_keys()); + var ORDERED_KEYS = { + resolution: 1, + id: 2, + name: 3, + version: 4, + engines: 5, + cpu: 6, + os: 7, + deprecated: 8, + hasBin: 9, + prepare: 10, + requiresBuild: 11, + bundleDependencies: 12, + peerDependencies: 13, + peerDependenciesMeta: 14, + dependencies: 15, + optionalDependencies: 16, + transitivePeerDependencies: 17, + dev: 18, + optional: 19 + }; + var ROOT_KEYS_ORDER = { + lockfileVersion: 1, + neverBuiltDependencies: 2, + overrides: 3, + packageExtensionsChecksum: 4, + specifiers: 10, + dependencies: 11, + optionalDependencies: 12, + devDependencies: 13, + importers: 14, + packages: 15 + }; + function compareWithPriority(priority, left, right) { + const leftPriority = priority[left]; + const rightPriority = priority[right]; + if (leftPriority && rightPriority) + return leftPriority - rightPriority; + if (leftPriority) + return -1; + if (rightPriority) + return 1; + return left.localeCompare(right); + } + function sortLockfileKeys(lockfile) { + const compareRootKeys = compareWithPriority.bind(null, ROOT_KEYS_ORDER); + if (lockfile.importers != null) { + lockfile.importers = sort_keys_1.default(lockfile.importers); + for (const importerId of Object.keys(lockfile.importers)) { + lockfile.importers[importerId] = sort_keys_1.default(lockfile.importers[importerId], { + compare: compareRootKeys, + deep: true + }); + } + } + if (lockfile.packages != null) { + lockfile.packages = sort_keys_1.default(lockfile.packages); + for (const pkgId of Object.keys(lockfile.packages)) { + lockfile.packages[pkgId] = sort_keys_1.default(lockfile.packages[pkgId], { + compare: compareWithPriority.bind(null, ORDERED_KEYS), + deep: true + }); + } + } + for (const key of ["specifiers", "dependencies", "devDependencies", "optionalDependencies"]) { + if (!lockfile[key]) + continue; + lockfile[key] = sort_keys_1.default(lockfile[key]); + } + return sort_keys_1.default(lockfile, { compare: compareRootKeys }); + } + exports2.sortLockfileKeys = sortLockfileKeys; + } +}); + +// ../lockfile-file/lib/write.js +var require_write = __commonJS({ + "../lockfile-file/lib/write.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.normalizeLockfile = exports2.writeCurrentLockfile = exports2.writeWantedLockfile = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var types_1 = require_lib14(); + var constants_1 = require_lib7(); + var rimraf_1 = __importDefault(require_rimraf()); + var js_yaml_1 = __importDefault(require_js_yaml()); + var equals_1 = __importDefault(require_equals2()); + var isEmpty_1 = __importDefault(require_isEmpty2()); + var write_file_atomic_1 = __importDefault(require_write_file_atomic()); + var logger_1 = __importDefault(require_logger2()); + var sortLockfileKeys_1 = require_sortLockfileKeys(); + async function writeFileAtomic(filename, data) { + return new Promise((resolve, reject) => write_file_atomic_1.default(filename, data, {}, (err) => err != null ? reject(err) : resolve())); + } + var LOCKFILE_YAML_FORMAT = { + blankLines: true, + lineWidth: 1e3, + noCompatMode: true, + noRefs: true, + sortKeys: false + }; + async function writeWantedLockfile(pkgPath, wantedLockfile, opts) { + return writeLockfile(constants_1.WANTED_LOCKFILE, pkgPath, wantedLockfile, opts); + } + exports2.writeWantedLockfile = writeWantedLockfile; + async function writeCurrentLockfile(virtualStoreDir, currentLockfile, opts) { + await fs_1.promises.mkdir(virtualStoreDir, { recursive: true }); + return writeLockfile("lock.yaml", virtualStoreDir, currentLockfile, opts); + } + exports2.writeCurrentLockfile = writeCurrentLockfile; + async function writeLockfile(lockfileFilename, pkgPath, wantedLockfile, opts) { + const lockfilePath = path_1.default.join(pkgPath, lockfileFilename); + if (isEmptyLockfile(wantedLockfile)) { + return rimraf_1.default(lockfilePath); + } + const yamlDoc = yamlStringify(wantedLockfile, (opts === null || opts === void 0 ? void 0 : opts.forceSharedFormat) === true); + return writeFileAtomic(lockfilePath, yamlDoc); + } + function yamlStringify(lockfile, forceSharedFormat) { + let normalizedLockfile = normalizeLockfile(lockfile, forceSharedFormat); + normalizedLockfile = sortLockfileKeys_1.sortLockfileKeys(normalizedLockfile); + return js_yaml_1.default.dump(normalizedLockfile, LOCKFILE_YAML_FORMAT); + } + function isEmptyLockfile(lockfile) { + return Object.values(lockfile.importers).every((importer) => { + var _a, _b; + return isEmpty_1.default((_a = importer.specifiers) !== null && _a !== void 0 ? _a : {}) && isEmpty_1.default((_b = importer.dependencies) !== null && _b !== void 0 ? _b : {}); + }); + } + function normalizeLockfile(lockfile, forceSharedFormat) { + let lockfileToSave; + if (!forceSharedFormat && equals_1.default(Object.keys(lockfile.importers), ["."])) { + lockfileToSave = { + ...lockfile, + ...lockfile.importers["."] + }; + delete lockfileToSave.importers; + for (const depType of types_1.DEPENDENCIES_FIELDS) { + if (isEmpty_1.default(lockfileToSave[depType])) { + delete lockfileToSave[depType]; + } + } + if (isEmpty_1.default(lockfileToSave.packages) || lockfileToSave.packages == null) { + delete lockfileToSave.packages; + } + } else { + lockfileToSave = { + ...lockfile, + importers: Object.keys(lockfile.importers).reduce((acc, alias) => { + var _a, _b; + const importer = lockfile.importers[alias]; + const normalizedImporter = { + specifiers: (_a = importer.specifiers) !== null && _a !== void 0 ? _a : {} + }; + for (const depType of types_1.DEPENDENCIES_FIELDS) { + if (!isEmpty_1.default((_b = importer[depType]) !== null && _b !== void 0 ? _b : {})) { + normalizedImporter[depType] = importer[depType]; + } + } + acc[alias] = normalizedImporter; + return acc; + }, {}) + }; + if (isEmpty_1.default(lockfileToSave.packages) || lockfileToSave.packages == null) { + delete lockfileToSave.packages; + } + } + if (lockfileToSave.overrides != null && isEmpty_1.default(lockfileToSave.overrides)) { + delete lockfileToSave.overrides; + } + if (lockfileToSave.neverBuiltDependencies != null) { + if (isEmpty_1.default(lockfileToSave.neverBuiltDependencies)) { + delete lockfileToSave.neverBuiltDependencies; + } else { + lockfileToSave.neverBuiltDependencies = lockfileToSave.neverBuiltDependencies.sort(); + } + } + if (!lockfileToSave.packageExtensionsChecksum) { + delete lockfileToSave.packageExtensionsChecksum; + } + return lockfileToSave; + } + exports2.normalizeLockfile = normalizeLockfile; + async function writeLockfiles(opts) { + const wantedLockfilePath = path_1.default.join(opts.wantedLockfileDir, constants_1.WANTED_LOCKFILE); + const currentLockfilePath = path_1.default.join(opts.currentLockfileDir, "lock.yaml"); + if (isEmptyLockfile(opts.wantedLockfile)) { + await Promise.all([ + rimraf_1.default(wantedLockfilePath), + rimraf_1.default(currentLockfilePath) + ]); + return; + } + const forceSharedFormat = (opts === null || opts === void 0 ? void 0 : opts.forceSharedFormat) === true; + const yamlDoc = yamlStringify(opts.wantedLockfile, forceSharedFormat); + if (opts.wantedLockfile === opts.currentLockfile) { + await Promise.all([ + writeFileAtomic(wantedLockfilePath, yamlDoc), + (async () => { + await fs_1.promises.mkdir(path_1.default.dirname(currentLockfilePath), { recursive: true }); + await writeFileAtomic(currentLockfilePath, yamlDoc); + })() + ]); + return; + } + logger_1.default.debug({ + message: `\`${constants_1.WANTED_LOCKFILE}\` differs from \`${path_1.default.relative(opts.wantedLockfileDir, currentLockfilePath)}\``, + prefix: opts.wantedLockfileDir + }); + const currentYamlDoc = yamlStringify(opts.currentLockfile, forceSharedFormat); + await Promise.all([ + writeFileAtomic(wantedLockfilePath, yamlDoc), + (async () => { + await fs_1.promises.mkdir(path_1.default.dirname(currentLockfilePath), { recursive: true }); + await writeFileAtomic(currentLockfilePath, currentYamlDoc); + })() + ]); + } + exports2.default = writeLockfiles; + } +}); + +// ../../node_modules/.pnpm/comver-to-semver@1.0.0/node_modules/comver-to-semver/index.js +var require_comver_to_semver = __commonJS({ + "../../node_modules/.pnpm/comver-to-semver@1.0.0/node_modules/comver-to-semver/index.js"(exports2, module2) { + "use strict"; + module2.exports = function comverToSemver(comver) { + if (!comver.includes(".")) + return `${comver}.0.0`; + return `${comver}.0`; + }; + } +}); + +// ../lockfile-file/lib/errors/LockfileBreakingChangeError.js +var require_LockfileBreakingChangeError = __commonJS({ + "../lockfile-file/lib/errors/LockfileBreakingChangeError.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var LockfileBreakingChangeError = class extends error_1.default { + constructor(filename) { + super("LOCKFILE_BREAKING_CHANGE", `Lockfile ${filename} not compatible with current pnpm`); + this.filename = filename; + } + }; + exports2.default = LockfileBreakingChangeError; + } +}); + +// ../lockfile-file/lib/errors/index.js +var require_errors3 = __commonJS({ + "../lockfile-file/lib/errors/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LockfileBreakingChangeError = void 0; + var LockfileBreakingChangeError_1 = __importDefault(require_LockfileBreakingChangeError()); + exports2.LockfileBreakingChangeError = LockfileBreakingChangeError_1.default; + } +}); + +// ../merge-lockfile-changes/lib/index.js +var require_lib56 = __commonJS({ + "../merge-lockfile-changes/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var comver_to_semver_1 = __importDefault(require_comver_to_semver()); + var semver_1 = __importDefault(require_semver2()); + function mergeLockfileChanges(ours, theirs) { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; + const newLockfile = { + importers: {}, + lockfileVersion: semver_1.default.gt(comver_to_semver_1.default(theirs.lockfileVersion.toString()), comver_to_semver_1.default(ours.lockfileVersion.toString())) ? theirs.lockfileVersion : ours.lockfileVersion + }; + for (const importerId of Array.from(new Set([...Object.keys(ours.importers), ...Object.keys(theirs.importers)]))) { + newLockfile.importers[importerId] = { + specifiers: {} + }; + for (const key of ["dependencies", "devDependencies", "optionalDependencies"]) { + newLockfile.importers[importerId][key] = mergeDict((_b = (_a = ours.importers[importerId]) === null || _a === void 0 ? void 0 : _a[key]) !== null && _b !== void 0 ? _b : {}, (_d = (_c = theirs.importers[importerId]) === null || _c === void 0 ? void 0 : _c[key]) !== null && _d !== void 0 ? _d : {}, mergeVersions); + if (Object.keys(newLockfile.importers[importerId][key]).length === 0) { + delete newLockfile.importers[importerId][key]; + } + } + newLockfile.importers[importerId].specifiers = mergeDict((_f = (_e = ours.importers[importerId]) === null || _e === void 0 ? void 0 : _e.specifiers) !== null && _f !== void 0 ? _f : {}, (_h = (_g = theirs.importers[importerId]) === null || _g === void 0 ? void 0 : _g.specifiers) !== null && _h !== void 0 ? _h : {}, takeChangedValue); + } + const packages = {}; + for (const depPath of Array.from(new Set([...Object.keys((_j = ours.packages) !== null && _j !== void 0 ? _j : {}), ...Object.keys((_k = theirs.packages) !== null && _k !== void 0 ? _k : {})]))) { + const ourPkg = (_l = ours.packages) === null || _l === void 0 ? void 0 : _l[depPath]; + const theirPkg = (_m = theirs.packages) === null || _m === void 0 ? void 0 : _m[depPath]; + const pkg = { + ...ourPkg, + ...theirPkg + }; + for (const key of ["dependencies", "optionalDependencies"]) { + pkg[key] = mergeDict((_o = ourPkg === null || ourPkg === void 0 ? void 0 : ourPkg[key]) !== null && _o !== void 0 ? _o : {}, (_p = theirPkg === null || theirPkg === void 0 ? void 0 : theirPkg[key]) !== null && _p !== void 0 ? _p : {}, mergeVersions); + if (Object.keys(pkg[key]).length === 0) { + delete pkg[key]; + } + } + packages[depPath] = pkg; + } + newLockfile.packages = packages; + return newLockfile; + } + exports2.default = mergeLockfileChanges; + function mergeDict(ourDict, theirDict, valueMerger) { + const newDict = {}; + for (const key of Object.keys(ourDict).concat(Object.keys(theirDict))) { + const changedValue = valueMerger(ourDict[key], theirDict[key]); + if (changedValue) { + newDict[key] = changedValue; + } + } + return newDict; + } + function takeChangedValue(ourValue, theirValue) { + if (ourValue === theirValue || theirValue == null) + return ourValue; + return theirValue; + } + function mergeVersions(ourValue, theirValue) { + if (ourValue === theirValue || !theirValue) + return ourValue; + if (!ourValue) + return theirValue; + const [ourVersion] = ourValue.split("_"); + const [theirVersion] = theirValue.split("_"); + if (semver_1.default.gt(ourVersion, theirVersion)) { + return ourValue; + } + return theirValue; + } + } +}); + +// ../lockfile-file/lib/gitMergeFile.js +var require_gitMergeFile = __commonJS({ + "../lockfile-file/lib/gitMergeFile.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isDiff = exports2.autofixMergeConflicts = void 0; + var merge_lockfile_changes_1 = __importDefault(require_lib56()); + var js_yaml_1 = __importDefault(require_js_yaml()); + var MERGE_CONFLICT_PARENT = "|||||||"; + var MERGE_CONFLICT_END = ">>>>>>>"; + var MERGE_CONFLICT_THEIRS = "======="; + var MERGE_CONFLICT_OURS = "<<<<<<<"; + function autofixMergeConflicts(fileContent) { + const { ours, theirs } = parseMergeFile(fileContent); + return merge_lockfile_changes_1.default(js_yaml_1.default.load(ours), js_yaml_1.default.load(theirs)); + } + exports2.autofixMergeConflicts = autofixMergeConflicts; + function parseMergeFile(fileContent) { + const lines = fileContent.split(/[\n\r]+/g); + let state = "top"; + const ours = []; + const theirs = []; + while (lines.length > 0) { + const line = lines.shift(); + if (line.startsWith(MERGE_CONFLICT_PARENT)) { + state = "parent"; + continue; + } + if (line.startsWith(MERGE_CONFLICT_OURS)) { + state = "ours"; + continue; + } + if (line === MERGE_CONFLICT_THEIRS) { + state = "theirs"; + continue; + } + if (line.startsWith(MERGE_CONFLICT_END)) { + state = "top"; + continue; + } + if (state === "top" || state === "ours") + ours.push(line); + if (state === "top" || state === "theirs") + theirs.push(line); + } + return { ours: ours.join("\n"), theirs: theirs.join("\n") }; + } + function isDiff(fileContent) { + return fileContent.includes(MERGE_CONFLICT_OURS) && fileContent.includes(MERGE_CONFLICT_THEIRS) && fileContent.includes(MERGE_CONFLICT_END); + } + exports2.isDiff = isDiff; + } +}); + +// ../lockfile-file/lib/read.js +var require_read = __commonJS({ + "../lockfile-file/lib/read.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createLockfileObject = exports2.readWantedLockfile = exports2.readWantedLockfileAndAutofixConflicts = exports2.readCurrentLockfile = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var constants_1 = require_lib7(); + var error_1 = __importDefault(require_lib8()); + var types_1 = require_lib14(); + var comver_to_semver_1 = __importDefault(require_comver_to_semver()); + var js_yaml_1 = __importDefault(require_js_yaml()); + var semver_1 = __importDefault(require_semver2()); + var strip_bom_1 = __importDefault(require_strip_bom()); + var errors_1 = require_errors3(); + var gitMergeFile_1 = require_gitMergeFile(); + var logger_1 = __importDefault(require_logger2()); + async function readCurrentLockfile(virtualStoreDir, opts) { + const lockfilePath = path_1.default.join(virtualStoreDir, "lock.yaml"); + return (await _read(lockfilePath, virtualStoreDir, opts)).lockfile; + } + exports2.readCurrentLockfile = readCurrentLockfile; + async function readWantedLockfileAndAutofixConflicts(pkgPath, opts) { + const lockfilePath = path_1.default.join(pkgPath, constants_1.WANTED_LOCKFILE); + return _read(lockfilePath, pkgPath, { ...opts, autofixMergeConflicts: true }); + } + exports2.readWantedLockfileAndAutofixConflicts = readWantedLockfileAndAutofixConflicts; + async function readWantedLockfile(pkgPath, opts) { + const lockfilePath = path_1.default.join(pkgPath, constants_1.WANTED_LOCKFILE); + return (await _read(lockfilePath, pkgPath, opts)).lockfile; + } + exports2.readWantedLockfile = readWantedLockfile; + async function _read(lockfilePath, prefix, opts) { + var _a; + let lockfileRawContent; + try { + lockfileRawContent = strip_bom_1.default(await fs_1.promises.readFile(lockfilePath, "utf8")); + } catch (err) { + if (err.code !== "ENOENT") { + throw err; + } + return { + lockfile: null, + hadConflicts: false + }; + } + let lockfile; + let hadConflicts; + try { + lockfile = js_yaml_1.default.load(lockfileRawContent); + hadConflicts = false; + } catch (err) { + if (!opts.autofixMergeConflicts || !gitMergeFile_1.isDiff(lockfileRawContent)) { + throw new error_1.default("BROKEN_LOCKFILE", `The lockfile at "${lockfilePath}" is broken: ${err.message}`); + } + hadConflicts = true; + lockfile = gitMergeFile_1.autofixMergeConflicts(lockfileRawContent); + logger_1.default.info({ + message: `Merge conflict detected in ${constants_1.WANTED_LOCKFILE} and successfully merged`, + prefix: path_1.default.dirname(lockfilePath) + }); + } + if (typeof (lockfile === null || lockfile === void 0 ? void 0 : lockfile["specifiers"]) !== "undefined") { + lockfile.importers = { + ".": { + specifiers: lockfile["specifiers"] + } + }; + delete lockfile.specifiers; + for (const depType of types_1.DEPENDENCIES_FIELDS) { + if (lockfile[depType] != null) { + lockfile.importers["."][depType] = lockfile[depType]; + delete lockfile[depType]; + } + } + } + if (lockfile) { + const lockfileSemver = comver_to_semver_1.default(((_a = lockfile.lockfileVersion) !== null && _a !== void 0 ? _a : 0).toString()); + if (typeof opts.wantedVersion !== "number" || semver_1.default.major(lockfileSemver) === semver_1.default.major(comver_to_semver_1.default(opts.wantedVersion.toString()))) { + if (typeof opts.wantedVersion === "number" && semver_1.default.gt(lockfileSemver, comver_to_semver_1.default(opts.wantedVersion.toString()))) { + logger_1.default.warn({ + message: `Your ${constants_1.WANTED_LOCKFILE} was generated by a newer version of pnpm. It is a compatible version but it might get downgraded to version ${opts.wantedVersion}`, + prefix + }); + } + return { lockfile, hadConflicts }; + } + } + if (opts.ignoreIncompatible) { + logger_1.default.warn({ + message: `Ignoring not compatible lockfile at ${lockfilePath}`, + prefix + }); + return { lockfile: null, hadConflicts: false }; + } + throw new errors_1.LockfileBreakingChangeError(lockfilePath); + } + function createLockfileObject(importerIds, opts) { + const importers = importerIds.reduce((acc, importerId) => { + acc[importerId] = { + dependencies: {}, + specifiers: {} + }; + return acc; + }, {}); + return { + importers, + lockfileVersion: opts.lockfileVersion || constants_1.LOCKFILE_VERSION + }; + } + exports2.createLockfileObject = createLockfileObject; + } +}); + +// ../lockfile-file/lib/index.js +var require_lib57 = __commonJS({ + "../lockfile-file/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.writeWantedLockfile = exports2.writeCurrentLockfile = exports2.writeLockfiles = exports2.getLockfileImporterId = exports2.existsWantedLockfile = void 0; + var existsWantedLockfile_1 = __importDefault(require_existsWantedLockfile()); + exports2.existsWantedLockfile = existsWantedLockfile_1.default; + var getLockfileImporterId_1 = __importDefault(require_getLockfileImporterId()); + exports2.getLockfileImporterId = getLockfileImporterId_1.default; + var write_1 = __importStar2(require_write()); + exports2.writeLockfiles = write_1.default; + Object.defineProperty(exports2, "writeCurrentLockfile", { enumerable: true, get: function() { + return write_1.writeCurrentLockfile; + } }); + Object.defineProperty(exports2, "writeWantedLockfile", { enumerable: true, get: function() { + return write_1.writeWantedLockfile; + } }); + __exportStar(require_lib52(), exports2); + __exportStar(require_read(), exports2); + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseValues.js +var require_baseValues = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseValues.js"(exports2, module2) { + var arrayMap = require_arrayMap(); + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } + module2.exports = baseValues; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/values.js +var require_values = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/values.js"(exports2, module2) { + var baseValues = require_baseValues(); + var keys = require_keys2(); + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + module2.exports = values; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFindIndex.js +var require_baseFindIndex = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFindIndex.js"(exports2, module2) { + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, index = fromIndex + (fromRight ? 1 : -1); + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + module2.exports = baseFindIndex; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNaN.js +var require_baseIsNaN = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNaN.js"(exports2, module2) { + function baseIsNaN(value) { + return value !== value; + } + module2.exports = baseIsNaN; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_strictIndexOf.js +var require_strictIndexOf = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_strictIndexOf.js"(exports2, module2) { + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, length = array.length; + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + module2.exports = strictIndexOf; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIndexOf.js +var require_baseIndexOf = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIndexOf.js"(exports2, module2) { + var baseFindIndex = require_baseFindIndex(); + var baseIsNaN = require_baseIsNaN(); + var strictIndexOf = require_strictIndexOf(); + function baseIndexOf(array, value, fromIndex) { + return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); + } + module2.exports = baseIndexOf; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_charsEndIndex.js +var require_charsEndIndex = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_charsEndIndex.js"(exports2, module2) { + var baseIndexOf = require_baseIndexOf(); + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) { + } + return index; + } + module2.exports = charsEndIndex; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/trimEnd.js +var require_trimEnd = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/trimEnd.js"(exports2, module2) { + var baseToString = require_baseToString(); + var castSlice = require_castSlice(); + var charsEndIndex = require_charsEndIndex(); + var stringToArray = require_stringToArray(); + var toString = require_toString(); + var trimmedEndIndex = require_trimmedEndIndex(); + function trimEnd(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === void 0)) { + return string.slice(0, trimmedEndIndex(string) + 1); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; + return castSlice(strSymbols, 0, end).join(""); + } + module2.exports = trimEnd; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/alignString.js +var require_alignString2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/alignString.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _isNumber2 = _interopRequireDefault(require_isNumber()); + var _isString2 = _interopRequireDefault(require_isString2()); + var _stringWidth = _interopRequireDefault(require_string_width()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var alignments = ["left", "right", "center"]; + var alignLeft = (subject, width) => { + return subject + " ".repeat(width); + }; + var alignRight = (subject, width) => { + return " ".repeat(width) + subject; + }; + var alignCenter = (subject, width) => { + let halfWidth; + halfWidth = width / 2; + if (width % 2 === 0) { + return " ".repeat(halfWidth) + subject + " ".repeat(halfWidth); + } else { + halfWidth = Math.floor(halfWidth); + return " ".repeat(halfWidth) + subject + " ".repeat(halfWidth + 1); + } + }; + var alignString = (subject, containerWidth, alignment) => { + if (!(0, _isString2.default)(subject)) { + throw new TypeError("Subject parameter value must be a string."); + } + if (!(0, _isNumber2.default)(containerWidth)) { + throw new TypeError("Container width parameter value must be a number."); + } + const subjectWidth = (0, _stringWidth.default)(subject); + if (subjectWidth > containerWidth) { + throw new Error("Subject parameter value width cannot be greater than the container width."); + } + if (!(0, _isString2.default)(alignment)) { + throw new TypeError("Alignment parameter value must be a string."); + } + if (!alignments.includes(alignment)) { + throw new Error("Alignment parameter value must be a known alignment parameter value (left, right, center)."); + } + if (subjectWidth === 0) { + return " ".repeat(containerWidth); + } + const availableWidth = containerWidth - subjectWidth; + if (alignment === "left") { + return alignLeft(subject, availableWidth); + } + if (alignment === "right") { + return alignRight(subject, availableWidth); + } + return alignCenter(subject, availableWidth); + }; + var _default = alignString; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/alignTableData.js +var require_alignTableData2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/alignTableData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _stringWidth = _interopRequireDefault(require_string_width()); + var _alignString = _interopRequireDefault(require_alignString2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var alignTableData = (rows, config) => { + return rows.map((cells) => { + return cells.map((value, index1) => { + const column = config.columns[index1]; + if ((0, _stringWidth.default)(value) === column.width) { + return value; + } else { + return (0, _alignString.default)(value, column.width, column.alignment); + } + }); + }); + }; + var _default = alignTableData; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/grapheme-splitter@1.0.4/node_modules/grapheme-splitter/index.js +var require_grapheme_splitter = __commonJS({ + "../../node_modules/.pnpm/grapheme-splitter@1.0.4/node_modules/grapheme-splitter/index.js"(exports2, module2) { + function GraphemeSplitter() { + var CR = 0, LF = 1, Control = 2, Extend = 3, Regional_Indicator = 4, SpacingMark = 5, L = 6, V = 7, T = 8, LV = 9, LVT = 10, Other = 11, Prepend = 12, E_Base = 13, E_Modifier = 14, ZWJ = 15, Glue_After_Zwj = 16, E_Base_GAZ = 17; + var NotBreak = 0, BreakStart = 1, Break = 2, BreakLastRegional = 3, BreakPenultimateRegional = 4; + function isSurrogate(str, pos) { + return 55296 <= str.charCodeAt(pos) && str.charCodeAt(pos) <= 56319 && 56320 <= str.charCodeAt(pos + 1) && str.charCodeAt(pos + 1) <= 57343; + } + function codePointAt(str, idx) { + if (idx === void 0) { + idx = 0; + } + var code = str.charCodeAt(idx); + if (55296 <= code && code <= 56319 && idx < str.length - 1) { + var hi = code; + var low = str.charCodeAt(idx + 1); + if (56320 <= low && low <= 57343) { + return (hi - 55296) * 1024 + (low - 56320) + 65536; + } + return hi; + } + if (56320 <= code && code <= 57343 && idx >= 1) { + var hi = str.charCodeAt(idx - 1); + var low = code; + if (55296 <= hi && hi <= 56319) { + return (hi - 55296) * 1024 + (low - 56320) + 65536; + } + return low; + } + return code; + } + function shouldBreak(start, mid, end) { + var all = [start].concat(mid).concat([end]); + var previous = all[all.length - 2]; + var next = end; + var eModifierIndex = all.lastIndexOf(E_Modifier); + if (eModifierIndex > 1 && all.slice(1, eModifierIndex).every(function(c) { + return c == Extend; + }) && [Extend, E_Base, E_Base_GAZ].indexOf(start) == -1) { + return Break; + } + var rIIndex = all.lastIndexOf(Regional_Indicator); + if (rIIndex > 0 && all.slice(1, rIIndex).every(function(c) { + return c == Regional_Indicator; + }) && [Prepend, Regional_Indicator].indexOf(previous) == -1) { + if (all.filter(function(c) { + return c == Regional_Indicator; + }).length % 2 == 1) { + return BreakLastRegional; + } else { + return BreakPenultimateRegional; + } + } + if (previous == CR && next == LF) { + return NotBreak; + } else if (previous == Control || previous == CR || previous == LF) { + if (next == E_Modifier && mid.every(function(c) { + return c == Extend; + })) { + return Break; + } else { + return BreakStart; + } + } else if (next == Control || next == CR || next == LF) { + return BreakStart; + } else if (previous == L && (next == L || next == V || next == LV || next == LVT)) { + return NotBreak; + } else if ((previous == LV || previous == V) && (next == V || next == T)) { + return NotBreak; + } else if ((previous == LVT || previous == T) && next == T) { + return NotBreak; + } else if (next == Extend || next == ZWJ) { + return NotBreak; + } else if (next == SpacingMark) { + return NotBreak; + } else if (previous == Prepend) { + return NotBreak; + } + var previousNonExtendIndex = all.indexOf(Extend) != -1 ? all.lastIndexOf(Extend) - 1 : all.length - 2; + if ([E_Base, E_Base_GAZ].indexOf(all[previousNonExtendIndex]) != -1 && all.slice(previousNonExtendIndex + 1, -1).every(function(c) { + return c == Extend; + }) && next == E_Modifier) { + return NotBreak; + } + if (previous == ZWJ && [Glue_After_Zwj, E_Base_GAZ].indexOf(next) != -1) { + return NotBreak; + } + if (mid.indexOf(Regional_Indicator) != -1) { + return Break; + } + if (previous == Regional_Indicator && next == Regional_Indicator) { + return NotBreak; + } + return BreakStart; + } + this.nextBreak = function(string, index) { + if (index === void 0) { + index = 0; + } + if (index < 0) { + return 0; + } + if (index >= string.length - 1) { + return string.length; + } + var prev = getGraphemeBreakProperty(codePointAt(string, index)); + var mid = []; + for (var i = index + 1; i < string.length; i++) { + if (isSurrogate(string, i - 1)) { + continue; + } + var next = getGraphemeBreakProperty(codePointAt(string, i)); + if (shouldBreak(prev, mid, next)) { + return i; + } + mid.push(next); + } + return string.length; + }; + this.splitGraphemes = function(str) { + var res = []; + var index = 0; + var brk; + while ((brk = this.nextBreak(str, index)) < str.length) { + res.push(str.slice(index, brk)); + index = brk; + } + if (index < str.length) { + res.push(str.slice(index)); + } + return res; + }; + this.iterateGraphemes = function(str) { + var index = 0; + var res = { + next: function() { + var value; + var brk; + if ((brk = this.nextBreak(str, index)) < str.length) { + value = str.slice(index, brk); + index = brk; + return { value, done: false }; + } + if (index < str.length) { + value = str.slice(index); + index = str.length; + return { value, done: false }; + } + return { value: void 0, done: true }; + }.bind(this) + }; + if (typeof Symbol !== "undefined" && Symbol.iterator) { + res[Symbol.iterator] = function() { + return res; + }; + } + return res; + }; + this.countGraphemes = function(str) { + var count = 0; + var index = 0; + var brk; + while ((brk = this.nextBreak(str, index)) < str.length) { + index = brk; + count++; + } + if (index < str.length) { + count++; + } + return count; + }; + function getGraphemeBreakProperty(code) { + if (1536 <= code && code <= 1541 || code == 1757 || code == 1807 || code == 2274 || code == 3406 || code == 69821 || 70082 <= code && code <= 70083 || code == 72250 || 72326 <= code && code <= 72329 || code == 73030) { + return Prepend; + } + if (code == 13) { + return CR; + } + if (code == 10) { + return LF; + } + if (0 <= code && code <= 9 || 11 <= code && code <= 12 || 14 <= code && code <= 31 || 127 <= code && code <= 159 || code == 173 || code == 1564 || code == 6158 || code == 8203 || 8206 <= code && code <= 8207 || code == 8232 || code == 8233 || 8234 <= code && code <= 8238 || 8288 <= code && code <= 8292 || code == 8293 || 8294 <= code && code <= 8303 || 55296 <= code && code <= 57343 || code == 65279 || 65520 <= code && code <= 65528 || 65529 <= code && code <= 65531 || 113824 <= code && code <= 113827 || 119155 <= code && code <= 119162 || code == 917504 || code == 917505 || 917506 <= code && code <= 917535 || 917632 <= code && code <= 917759 || 918e3 <= code && code <= 921599) { + return Control; + } + if (768 <= code && code <= 879 || 1155 <= code && code <= 1159 || 1160 <= code && code <= 1161 || 1425 <= code && code <= 1469 || code == 1471 || 1473 <= code && code <= 1474 || 1476 <= code && code <= 1477 || code == 1479 || 1552 <= code && code <= 1562 || 1611 <= code && code <= 1631 || code == 1648 || 1750 <= code && code <= 1756 || 1759 <= code && code <= 1764 || 1767 <= code && code <= 1768 || 1770 <= code && code <= 1773 || code == 1809 || 1840 <= code && code <= 1866 || 1958 <= code && code <= 1968 || 2027 <= code && code <= 2035 || 2070 <= code && code <= 2073 || 2075 <= code && code <= 2083 || 2085 <= code && code <= 2087 || 2089 <= code && code <= 2093 || 2137 <= code && code <= 2139 || 2260 <= code && code <= 2273 || 2275 <= code && code <= 2306 || code == 2362 || code == 2364 || 2369 <= code && code <= 2376 || code == 2381 || 2385 <= code && code <= 2391 || 2402 <= code && code <= 2403 || code == 2433 || code == 2492 || code == 2494 || 2497 <= code && code <= 2500 || code == 2509 || code == 2519 || 2530 <= code && code <= 2531 || 2561 <= code && code <= 2562 || code == 2620 || 2625 <= code && code <= 2626 || 2631 <= code && code <= 2632 || 2635 <= code && code <= 2637 || code == 2641 || 2672 <= code && code <= 2673 || code == 2677 || 2689 <= code && code <= 2690 || code == 2748 || 2753 <= code && code <= 2757 || 2759 <= code && code <= 2760 || code == 2765 || 2786 <= code && code <= 2787 || 2810 <= code && code <= 2815 || code == 2817 || code == 2876 || code == 2878 || code == 2879 || 2881 <= code && code <= 2884 || code == 2893 || code == 2902 || code == 2903 || 2914 <= code && code <= 2915 || code == 2946 || code == 3006 || code == 3008 || code == 3021 || code == 3031 || code == 3072 || 3134 <= code && code <= 3136 || 3142 <= code && code <= 3144 || 3146 <= code && code <= 3149 || 3157 <= code && code <= 3158 || 3170 <= code && code <= 3171 || code == 3201 || code == 3260 || code == 3263 || code == 3266 || code == 3270 || 3276 <= code && code <= 3277 || 3285 <= code && code <= 3286 || 3298 <= code && code <= 3299 || 3328 <= code && code <= 3329 || 3387 <= code && code <= 3388 || code == 3390 || 3393 <= code && code <= 3396 || code == 3405 || code == 3415 || 3426 <= code && code <= 3427 || code == 3530 || code == 3535 || 3538 <= code && code <= 3540 || code == 3542 || code == 3551 || code == 3633 || 3636 <= code && code <= 3642 || 3655 <= code && code <= 3662 || code == 3761 || 3764 <= code && code <= 3769 || 3771 <= code && code <= 3772 || 3784 <= code && code <= 3789 || 3864 <= code && code <= 3865 || code == 3893 || code == 3895 || code == 3897 || 3953 <= code && code <= 3966 || 3968 <= code && code <= 3972 || 3974 <= code && code <= 3975 || 3981 <= code && code <= 3991 || 3993 <= code && code <= 4028 || code == 4038 || 4141 <= code && code <= 4144 || 4146 <= code && code <= 4151 || 4153 <= code && code <= 4154 || 4157 <= code && code <= 4158 || 4184 <= code && code <= 4185 || 4190 <= code && code <= 4192 || 4209 <= code && code <= 4212 || code == 4226 || 4229 <= code && code <= 4230 || code == 4237 || code == 4253 || 4957 <= code && code <= 4959 || 5906 <= code && code <= 5908 || 5938 <= code && code <= 5940 || 5970 <= code && code <= 5971 || 6002 <= code && code <= 6003 || 6068 <= code && code <= 6069 || 6071 <= code && code <= 6077 || code == 6086 || 6089 <= code && code <= 6099 || code == 6109 || 6155 <= code && code <= 6157 || 6277 <= code && code <= 6278 || code == 6313 || 6432 <= code && code <= 6434 || 6439 <= code && code <= 6440 || code == 6450 || 6457 <= code && code <= 6459 || 6679 <= code && code <= 6680 || code == 6683 || code == 6742 || 6744 <= code && code <= 6750 || code == 6752 || code == 6754 || 6757 <= code && code <= 6764 || 6771 <= code && code <= 6780 || code == 6783 || 6832 <= code && code <= 6845 || code == 6846 || 6912 <= code && code <= 6915 || code == 6964 || 6966 <= code && code <= 6970 || code == 6972 || code == 6978 || 7019 <= code && code <= 7027 || 7040 <= code && code <= 7041 || 7074 <= code && code <= 7077 || 7080 <= code && code <= 7081 || 7083 <= code && code <= 7085 || code == 7142 || 7144 <= code && code <= 7145 || code == 7149 || 7151 <= code && code <= 7153 || 7212 <= code && code <= 7219 || 7222 <= code && code <= 7223 || 7376 <= code && code <= 7378 || 7380 <= code && code <= 7392 || 7394 <= code && code <= 7400 || code == 7405 || code == 7412 || 7416 <= code && code <= 7417 || 7616 <= code && code <= 7673 || 7675 <= code && code <= 7679 || code == 8204 || 8400 <= code && code <= 8412 || 8413 <= code && code <= 8416 || code == 8417 || 8418 <= code && code <= 8420 || 8421 <= code && code <= 8432 || 11503 <= code && code <= 11505 || code == 11647 || 11744 <= code && code <= 11775 || 12330 <= code && code <= 12333 || 12334 <= code && code <= 12335 || 12441 <= code && code <= 12442 || code == 42607 || 42608 <= code && code <= 42610 || 42612 <= code && code <= 42621 || 42654 <= code && code <= 42655 || 42736 <= code && code <= 42737 || code == 43010 || code == 43014 || code == 43019 || 43045 <= code && code <= 43046 || 43204 <= code && code <= 43205 || 43232 <= code && code <= 43249 || 43302 <= code && code <= 43309 || 43335 <= code && code <= 43345 || 43392 <= code && code <= 43394 || code == 43443 || 43446 <= code && code <= 43449 || code == 43452 || code == 43493 || 43561 <= code && code <= 43566 || 43569 <= code && code <= 43570 || 43573 <= code && code <= 43574 || code == 43587 || code == 43596 || code == 43644 || code == 43696 || 43698 <= code && code <= 43700 || 43703 <= code && code <= 43704 || 43710 <= code && code <= 43711 || code == 43713 || 43756 <= code && code <= 43757 || code == 43766 || code == 44005 || code == 44008 || code == 44013 || code == 64286 || 65024 <= code && code <= 65039 || 65056 <= code && code <= 65071 || 65438 <= code && code <= 65439 || code == 66045 || code == 66272 || 66422 <= code && code <= 66426 || 68097 <= code && code <= 68099 || 68101 <= code && code <= 68102 || 68108 <= code && code <= 68111 || 68152 <= code && code <= 68154 || code == 68159 || 68325 <= code && code <= 68326 || code == 69633 || 69688 <= code && code <= 69702 || 69759 <= code && code <= 69761 || 69811 <= code && code <= 69814 || 69817 <= code && code <= 69818 || 69888 <= code && code <= 69890 || 69927 <= code && code <= 69931 || 69933 <= code && code <= 69940 || code == 70003 || 70016 <= code && code <= 70017 || 70070 <= code && code <= 70078 || 70090 <= code && code <= 70092 || 70191 <= code && code <= 70193 || code == 70196 || 70198 <= code && code <= 70199 || code == 70206 || code == 70367 || 70371 <= code && code <= 70378 || 70400 <= code && code <= 70401 || code == 70460 || code == 70462 || code == 70464 || code == 70487 || 70502 <= code && code <= 70508 || 70512 <= code && code <= 70516 || 70712 <= code && code <= 70719 || 70722 <= code && code <= 70724 || code == 70726 || code == 70832 || 70835 <= code && code <= 70840 || code == 70842 || code == 70845 || 70847 <= code && code <= 70848 || 70850 <= code && code <= 70851 || code == 71087 || 71090 <= code && code <= 71093 || 71100 <= code && code <= 71101 || 71103 <= code && code <= 71104 || 71132 <= code && code <= 71133 || 71219 <= code && code <= 71226 || code == 71229 || 71231 <= code && code <= 71232 || code == 71339 || code == 71341 || 71344 <= code && code <= 71349 || code == 71351 || 71453 <= code && code <= 71455 || 71458 <= code && code <= 71461 || 71463 <= code && code <= 71467 || 72193 <= code && code <= 72198 || 72201 <= code && code <= 72202 || 72243 <= code && code <= 72248 || 72251 <= code && code <= 72254 || code == 72263 || 72273 <= code && code <= 72278 || 72281 <= code && code <= 72283 || 72330 <= code && code <= 72342 || 72344 <= code && code <= 72345 || 72752 <= code && code <= 72758 || 72760 <= code && code <= 72765 || code == 72767 || 72850 <= code && code <= 72871 || 72874 <= code && code <= 72880 || 72882 <= code && code <= 72883 || 72885 <= code && code <= 72886 || 73009 <= code && code <= 73014 || code == 73018 || 73020 <= code && code <= 73021 || 73023 <= code && code <= 73029 || code == 73031 || 92912 <= code && code <= 92916 || 92976 <= code && code <= 92982 || 94095 <= code && code <= 94098 || 113821 <= code && code <= 113822 || code == 119141 || 119143 <= code && code <= 119145 || 119150 <= code && code <= 119154 || 119163 <= code && code <= 119170 || 119173 <= code && code <= 119179 || 119210 <= code && code <= 119213 || 119362 <= code && code <= 119364 || 121344 <= code && code <= 121398 || 121403 <= code && code <= 121452 || code == 121461 || code == 121476 || 121499 <= code && code <= 121503 || 121505 <= code && code <= 121519 || 122880 <= code && code <= 122886 || 122888 <= code && code <= 122904 || 122907 <= code && code <= 122913 || 122915 <= code && code <= 122916 || 122918 <= code && code <= 122922 || 125136 <= code && code <= 125142 || 125252 <= code && code <= 125258 || 917536 <= code && code <= 917631 || 917760 <= code && code <= 917999) { + return Extend; + } + if (127462 <= code && code <= 127487) { + return Regional_Indicator; + } + if (code == 2307 || code == 2363 || 2366 <= code && code <= 2368 || 2377 <= code && code <= 2380 || 2382 <= code && code <= 2383 || 2434 <= code && code <= 2435 || 2495 <= code && code <= 2496 || 2503 <= code && code <= 2504 || 2507 <= code && code <= 2508 || code == 2563 || 2622 <= code && code <= 2624 || code == 2691 || 2750 <= code && code <= 2752 || code == 2761 || 2763 <= code && code <= 2764 || 2818 <= code && code <= 2819 || code == 2880 || 2887 <= code && code <= 2888 || 2891 <= code && code <= 2892 || code == 3007 || 3009 <= code && code <= 3010 || 3014 <= code && code <= 3016 || 3018 <= code && code <= 3020 || 3073 <= code && code <= 3075 || 3137 <= code && code <= 3140 || 3202 <= code && code <= 3203 || code == 3262 || 3264 <= code && code <= 3265 || 3267 <= code && code <= 3268 || 3271 <= code && code <= 3272 || 3274 <= code && code <= 3275 || 3330 <= code && code <= 3331 || 3391 <= code && code <= 3392 || 3398 <= code && code <= 3400 || 3402 <= code && code <= 3404 || 3458 <= code && code <= 3459 || 3536 <= code && code <= 3537 || 3544 <= code && code <= 3550 || 3570 <= code && code <= 3571 || code == 3635 || code == 3763 || 3902 <= code && code <= 3903 || code == 3967 || code == 4145 || 4155 <= code && code <= 4156 || 4182 <= code && code <= 4183 || code == 4228 || code == 6070 || 6078 <= code && code <= 6085 || 6087 <= code && code <= 6088 || 6435 <= code && code <= 6438 || 6441 <= code && code <= 6443 || 6448 <= code && code <= 6449 || 6451 <= code && code <= 6456 || 6681 <= code && code <= 6682 || code == 6741 || code == 6743 || 6765 <= code && code <= 6770 || code == 6916 || code == 6965 || code == 6971 || 6973 <= code && code <= 6977 || 6979 <= code && code <= 6980 || code == 7042 || code == 7073 || 7078 <= code && code <= 7079 || code == 7082 || code == 7143 || 7146 <= code && code <= 7148 || code == 7150 || 7154 <= code && code <= 7155 || 7204 <= code && code <= 7211 || 7220 <= code && code <= 7221 || code == 7393 || 7410 <= code && code <= 7411 || code == 7415 || 43043 <= code && code <= 43044 || code == 43047 || 43136 <= code && code <= 43137 || 43188 <= code && code <= 43203 || 43346 <= code && code <= 43347 || code == 43395 || 43444 <= code && code <= 43445 || 43450 <= code && code <= 43451 || 43453 <= code && code <= 43456 || 43567 <= code && code <= 43568 || 43571 <= code && code <= 43572 || code == 43597 || code == 43755 || 43758 <= code && code <= 43759 || code == 43765 || 44003 <= code && code <= 44004 || 44006 <= code && code <= 44007 || 44009 <= code && code <= 44010 || code == 44012 || code == 69632 || code == 69634 || code == 69762 || 69808 <= code && code <= 69810 || 69815 <= code && code <= 69816 || code == 69932 || code == 70018 || 70067 <= code && code <= 70069 || 70079 <= code && code <= 70080 || 70188 <= code && code <= 70190 || 70194 <= code && code <= 70195 || code == 70197 || 70368 <= code && code <= 70370 || 70402 <= code && code <= 70403 || code == 70463 || 70465 <= code && code <= 70468 || 70471 <= code && code <= 70472 || 70475 <= code && code <= 70477 || 70498 <= code && code <= 70499 || 70709 <= code && code <= 70711 || 70720 <= code && code <= 70721 || code == 70725 || 70833 <= code && code <= 70834 || code == 70841 || 70843 <= code && code <= 70844 || code == 70846 || code == 70849 || 71088 <= code && code <= 71089 || 71096 <= code && code <= 71099 || code == 71102 || 71216 <= code && code <= 71218 || 71227 <= code && code <= 71228 || code == 71230 || code == 71340 || 71342 <= code && code <= 71343 || code == 71350 || 71456 <= code && code <= 71457 || code == 71462 || 72199 <= code && code <= 72200 || code == 72249 || 72279 <= code && code <= 72280 || code == 72343 || code == 72751 || code == 72766 || code == 72873 || code == 72881 || code == 72884 || 94033 <= code && code <= 94078 || code == 119142 || code == 119149) { + return SpacingMark; + } + if (4352 <= code && code <= 4447 || 43360 <= code && code <= 43388) { + return L; + } + if (4448 <= code && code <= 4519 || 55216 <= code && code <= 55238) { + return V; + } + if (4520 <= code && code <= 4607 || 55243 <= code && code <= 55291) { + return T; + } + if (code == 44032 || code == 44060 || code == 44088 || code == 44116 || code == 44144 || code == 44172 || code == 44200 || code == 44228 || code == 44256 || code == 44284 || code == 44312 || code == 44340 || code == 44368 || code == 44396 || code == 44424 || code == 44452 || code == 44480 || code == 44508 || code == 44536 || code == 44564 || code == 44592 || code == 44620 || code == 44648 || code == 44676 || code == 44704 || code == 44732 || code == 44760 || code == 44788 || code == 44816 || code == 44844 || code == 44872 || code == 44900 || code == 44928 || code == 44956 || code == 44984 || code == 45012 || code == 45040 || code == 45068 || code == 45096 || code == 45124 || code == 45152 || code == 45180 || code == 45208 || code == 45236 || code == 45264 || code == 45292 || code == 45320 || code == 45348 || code == 45376 || code == 45404 || code == 45432 || code == 45460 || code == 45488 || code == 45516 || code == 45544 || code == 45572 || code == 45600 || code == 45628 || code == 45656 || code == 45684 || code == 45712 || code == 45740 || code == 45768 || code == 45796 || code == 45824 || code == 45852 || code == 45880 || code == 45908 || code == 45936 || code == 45964 || code == 45992 || code == 46020 || code == 46048 || code == 46076 || code == 46104 || code == 46132 || code == 46160 || code == 46188 || code == 46216 || code == 46244 || code == 46272 || code == 46300 || code == 46328 || code == 46356 || code == 46384 || code == 46412 || code == 46440 || code == 46468 || code == 46496 || code == 46524 || code == 46552 || code == 46580 || code == 46608 || code == 46636 || code == 46664 || code == 46692 || code == 46720 || code == 46748 || code == 46776 || code == 46804 || code == 46832 || code == 46860 || code == 46888 || code == 46916 || code == 46944 || code == 46972 || code == 47e3 || code == 47028 || code == 47056 || code == 47084 || code == 47112 || code == 47140 || code == 47168 || code == 47196 || code == 47224 || code == 47252 || code == 47280 || code == 47308 || code == 47336 || code == 47364 || code == 47392 || code == 47420 || code == 47448 || code == 47476 || code == 47504 || code == 47532 || code == 47560 || code == 47588 || code == 47616 || code == 47644 || code == 47672 || code == 47700 || code == 47728 || code == 47756 || code == 47784 || code == 47812 || code == 47840 || code == 47868 || code == 47896 || code == 47924 || code == 47952 || code == 47980 || code == 48008 || code == 48036 || code == 48064 || code == 48092 || code == 48120 || code == 48148 || code == 48176 || code == 48204 || code == 48232 || code == 48260 || code == 48288 || code == 48316 || code == 48344 || code == 48372 || code == 48400 || code == 48428 || code == 48456 || code == 48484 || code == 48512 || code == 48540 || code == 48568 || code == 48596 || code == 48624 || code == 48652 || code == 48680 || code == 48708 || code == 48736 || code == 48764 || code == 48792 || code == 48820 || code == 48848 || code == 48876 || code == 48904 || code == 48932 || code == 48960 || code == 48988 || code == 49016 || code == 49044 || code == 49072 || code == 49100 || code == 49128 || code == 49156 || code == 49184 || code == 49212 || code == 49240 || code == 49268 || code == 49296 || code == 49324 || code == 49352 || code == 49380 || code == 49408 || code == 49436 || code == 49464 || code == 49492 || code == 49520 || code == 49548 || code == 49576 || code == 49604 || code == 49632 || code == 49660 || code == 49688 || code == 49716 || code == 49744 || code == 49772 || code == 49800 || code == 49828 || code == 49856 || code == 49884 || code == 49912 || code == 49940 || code == 49968 || code == 49996 || code == 50024 || code == 50052 || code == 50080 || code == 50108 || code == 50136 || code == 50164 || code == 50192 || code == 50220 || code == 50248 || code == 50276 || code == 50304 || code == 50332 || code == 50360 || code == 50388 || code == 50416 || code == 50444 || code == 50472 || code == 50500 || code == 50528 || code == 50556 || code == 50584 || code == 50612 || code == 50640 || code == 50668 || code == 50696 || code == 50724 || code == 50752 || code == 50780 || code == 50808 || code == 50836 || code == 50864 || code == 50892 || code == 50920 || code == 50948 || code == 50976 || code == 51004 || code == 51032 || code == 51060 || code == 51088 || code == 51116 || code == 51144 || code == 51172 || code == 51200 || code == 51228 || code == 51256 || code == 51284 || code == 51312 || code == 51340 || code == 51368 || code == 51396 || code == 51424 || code == 51452 || code == 51480 || code == 51508 || code == 51536 || code == 51564 || code == 51592 || code == 51620 || code == 51648 || code == 51676 || code == 51704 || code == 51732 || code == 51760 || code == 51788 || code == 51816 || code == 51844 || code == 51872 || code == 51900 || code == 51928 || code == 51956 || code == 51984 || code == 52012 || code == 52040 || code == 52068 || code == 52096 || code == 52124 || code == 52152 || code == 52180 || code == 52208 || code == 52236 || code == 52264 || code == 52292 || code == 52320 || code == 52348 || code == 52376 || code == 52404 || code == 52432 || code == 52460 || code == 52488 || code == 52516 || code == 52544 || code == 52572 || code == 52600 || code == 52628 || code == 52656 || code == 52684 || code == 52712 || code == 52740 || code == 52768 || code == 52796 || code == 52824 || code == 52852 || code == 52880 || code == 52908 || code == 52936 || code == 52964 || code == 52992 || code == 53020 || code == 53048 || code == 53076 || code == 53104 || code == 53132 || code == 53160 || code == 53188 || code == 53216 || code == 53244 || code == 53272 || code == 53300 || code == 53328 || code == 53356 || code == 53384 || code == 53412 || code == 53440 || code == 53468 || code == 53496 || code == 53524 || code == 53552 || code == 53580 || code == 53608 || code == 53636 || code == 53664 || code == 53692 || code == 53720 || code == 53748 || code == 53776 || code == 53804 || code == 53832 || code == 53860 || code == 53888 || code == 53916 || code == 53944 || code == 53972 || code == 54e3 || code == 54028 || code == 54056 || code == 54084 || code == 54112 || code == 54140 || code == 54168 || code == 54196 || code == 54224 || code == 54252 || code == 54280 || code == 54308 || code == 54336 || code == 54364 || code == 54392 || code == 54420 || code == 54448 || code == 54476 || code == 54504 || code == 54532 || code == 54560 || code == 54588 || code == 54616 || code == 54644 || code == 54672 || code == 54700 || code == 54728 || code == 54756 || code == 54784 || code == 54812 || code == 54840 || code == 54868 || code == 54896 || code == 54924 || code == 54952 || code == 54980 || code == 55008 || code == 55036 || code == 55064 || code == 55092 || code == 55120 || code == 55148 || code == 55176) { + return LV; + } + if (44033 <= code && code <= 44059 || 44061 <= code && code <= 44087 || 44089 <= code && code <= 44115 || 44117 <= code && code <= 44143 || 44145 <= code && code <= 44171 || 44173 <= code && code <= 44199 || 44201 <= code && code <= 44227 || 44229 <= code && code <= 44255 || 44257 <= code && code <= 44283 || 44285 <= code && code <= 44311 || 44313 <= code && code <= 44339 || 44341 <= code && code <= 44367 || 44369 <= code && code <= 44395 || 44397 <= code && code <= 44423 || 44425 <= code && code <= 44451 || 44453 <= code && code <= 44479 || 44481 <= code && code <= 44507 || 44509 <= code && code <= 44535 || 44537 <= code && code <= 44563 || 44565 <= code && code <= 44591 || 44593 <= code && code <= 44619 || 44621 <= code && code <= 44647 || 44649 <= code && code <= 44675 || 44677 <= code && code <= 44703 || 44705 <= code && code <= 44731 || 44733 <= code && code <= 44759 || 44761 <= code && code <= 44787 || 44789 <= code && code <= 44815 || 44817 <= code && code <= 44843 || 44845 <= code && code <= 44871 || 44873 <= code && code <= 44899 || 44901 <= code && code <= 44927 || 44929 <= code && code <= 44955 || 44957 <= code && code <= 44983 || 44985 <= code && code <= 45011 || 45013 <= code && code <= 45039 || 45041 <= code && code <= 45067 || 45069 <= code && code <= 45095 || 45097 <= code && code <= 45123 || 45125 <= code && code <= 45151 || 45153 <= code && code <= 45179 || 45181 <= code && code <= 45207 || 45209 <= code && code <= 45235 || 45237 <= code && code <= 45263 || 45265 <= code && code <= 45291 || 45293 <= code && code <= 45319 || 45321 <= code && code <= 45347 || 45349 <= code && code <= 45375 || 45377 <= code && code <= 45403 || 45405 <= code && code <= 45431 || 45433 <= code && code <= 45459 || 45461 <= code && code <= 45487 || 45489 <= code && code <= 45515 || 45517 <= code && code <= 45543 || 45545 <= code && code <= 45571 || 45573 <= code && code <= 45599 || 45601 <= code && code <= 45627 || 45629 <= code && code <= 45655 || 45657 <= code && code <= 45683 || 45685 <= code && code <= 45711 || 45713 <= code && code <= 45739 || 45741 <= code && code <= 45767 || 45769 <= code && code <= 45795 || 45797 <= code && code <= 45823 || 45825 <= code && code <= 45851 || 45853 <= code && code <= 45879 || 45881 <= code && code <= 45907 || 45909 <= code && code <= 45935 || 45937 <= code && code <= 45963 || 45965 <= code && code <= 45991 || 45993 <= code && code <= 46019 || 46021 <= code && code <= 46047 || 46049 <= code && code <= 46075 || 46077 <= code && code <= 46103 || 46105 <= code && code <= 46131 || 46133 <= code && code <= 46159 || 46161 <= code && code <= 46187 || 46189 <= code && code <= 46215 || 46217 <= code && code <= 46243 || 46245 <= code && code <= 46271 || 46273 <= code && code <= 46299 || 46301 <= code && code <= 46327 || 46329 <= code && code <= 46355 || 46357 <= code && code <= 46383 || 46385 <= code && code <= 46411 || 46413 <= code && code <= 46439 || 46441 <= code && code <= 46467 || 46469 <= code && code <= 46495 || 46497 <= code && code <= 46523 || 46525 <= code && code <= 46551 || 46553 <= code && code <= 46579 || 46581 <= code && code <= 46607 || 46609 <= code && code <= 46635 || 46637 <= code && code <= 46663 || 46665 <= code && code <= 46691 || 46693 <= code && code <= 46719 || 46721 <= code && code <= 46747 || 46749 <= code && code <= 46775 || 46777 <= code && code <= 46803 || 46805 <= code && code <= 46831 || 46833 <= code && code <= 46859 || 46861 <= code && code <= 46887 || 46889 <= code && code <= 46915 || 46917 <= code && code <= 46943 || 46945 <= code && code <= 46971 || 46973 <= code && code <= 46999 || 47001 <= code && code <= 47027 || 47029 <= code && code <= 47055 || 47057 <= code && code <= 47083 || 47085 <= code && code <= 47111 || 47113 <= code && code <= 47139 || 47141 <= code && code <= 47167 || 47169 <= code && code <= 47195 || 47197 <= code && code <= 47223 || 47225 <= code && code <= 47251 || 47253 <= code && code <= 47279 || 47281 <= code && code <= 47307 || 47309 <= code && code <= 47335 || 47337 <= code && code <= 47363 || 47365 <= code && code <= 47391 || 47393 <= code && code <= 47419 || 47421 <= code && code <= 47447 || 47449 <= code && code <= 47475 || 47477 <= code && code <= 47503 || 47505 <= code && code <= 47531 || 47533 <= code && code <= 47559 || 47561 <= code && code <= 47587 || 47589 <= code && code <= 47615 || 47617 <= code && code <= 47643 || 47645 <= code && code <= 47671 || 47673 <= code && code <= 47699 || 47701 <= code && code <= 47727 || 47729 <= code && code <= 47755 || 47757 <= code && code <= 47783 || 47785 <= code && code <= 47811 || 47813 <= code && code <= 47839 || 47841 <= code && code <= 47867 || 47869 <= code && code <= 47895 || 47897 <= code && code <= 47923 || 47925 <= code && code <= 47951 || 47953 <= code && code <= 47979 || 47981 <= code && code <= 48007 || 48009 <= code && code <= 48035 || 48037 <= code && code <= 48063 || 48065 <= code && code <= 48091 || 48093 <= code && code <= 48119 || 48121 <= code && code <= 48147 || 48149 <= code && code <= 48175 || 48177 <= code && code <= 48203 || 48205 <= code && code <= 48231 || 48233 <= code && code <= 48259 || 48261 <= code && code <= 48287 || 48289 <= code && code <= 48315 || 48317 <= code && code <= 48343 || 48345 <= code && code <= 48371 || 48373 <= code && code <= 48399 || 48401 <= code && code <= 48427 || 48429 <= code && code <= 48455 || 48457 <= code && code <= 48483 || 48485 <= code && code <= 48511 || 48513 <= code && code <= 48539 || 48541 <= code && code <= 48567 || 48569 <= code && code <= 48595 || 48597 <= code && code <= 48623 || 48625 <= code && code <= 48651 || 48653 <= code && code <= 48679 || 48681 <= code && code <= 48707 || 48709 <= code && code <= 48735 || 48737 <= code && code <= 48763 || 48765 <= code && code <= 48791 || 48793 <= code && code <= 48819 || 48821 <= code && code <= 48847 || 48849 <= code && code <= 48875 || 48877 <= code && code <= 48903 || 48905 <= code && code <= 48931 || 48933 <= code && code <= 48959 || 48961 <= code && code <= 48987 || 48989 <= code && code <= 49015 || 49017 <= code && code <= 49043 || 49045 <= code && code <= 49071 || 49073 <= code && code <= 49099 || 49101 <= code && code <= 49127 || 49129 <= code && code <= 49155 || 49157 <= code && code <= 49183 || 49185 <= code && code <= 49211 || 49213 <= code && code <= 49239 || 49241 <= code && code <= 49267 || 49269 <= code && code <= 49295 || 49297 <= code && code <= 49323 || 49325 <= code && code <= 49351 || 49353 <= code && code <= 49379 || 49381 <= code && code <= 49407 || 49409 <= code && code <= 49435 || 49437 <= code && code <= 49463 || 49465 <= code && code <= 49491 || 49493 <= code && code <= 49519 || 49521 <= code && code <= 49547 || 49549 <= code && code <= 49575 || 49577 <= code && code <= 49603 || 49605 <= code && code <= 49631 || 49633 <= code && code <= 49659 || 49661 <= code && code <= 49687 || 49689 <= code && code <= 49715 || 49717 <= code && code <= 49743 || 49745 <= code && code <= 49771 || 49773 <= code && code <= 49799 || 49801 <= code && code <= 49827 || 49829 <= code && code <= 49855 || 49857 <= code && code <= 49883 || 49885 <= code && code <= 49911 || 49913 <= code && code <= 49939 || 49941 <= code && code <= 49967 || 49969 <= code && code <= 49995 || 49997 <= code && code <= 50023 || 50025 <= code && code <= 50051 || 50053 <= code && code <= 50079 || 50081 <= code && code <= 50107 || 50109 <= code && code <= 50135 || 50137 <= code && code <= 50163 || 50165 <= code && code <= 50191 || 50193 <= code && code <= 50219 || 50221 <= code && code <= 50247 || 50249 <= code && code <= 50275 || 50277 <= code && code <= 50303 || 50305 <= code && code <= 50331 || 50333 <= code && code <= 50359 || 50361 <= code && code <= 50387 || 50389 <= code && code <= 50415 || 50417 <= code && code <= 50443 || 50445 <= code && code <= 50471 || 50473 <= code && code <= 50499 || 50501 <= code && code <= 50527 || 50529 <= code && code <= 50555 || 50557 <= code && code <= 50583 || 50585 <= code && code <= 50611 || 50613 <= code && code <= 50639 || 50641 <= code && code <= 50667 || 50669 <= code && code <= 50695 || 50697 <= code && code <= 50723 || 50725 <= code && code <= 50751 || 50753 <= code && code <= 50779 || 50781 <= code && code <= 50807 || 50809 <= code && code <= 50835 || 50837 <= code && code <= 50863 || 50865 <= code && code <= 50891 || 50893 <= code && code <= 50919 || 50921 <= code && code <= 50947 || 50949 <= code && code <= 50975 || 50977 <= code && code <= 51003 || 51005 <= code && code <= 51031 || 51033 <= code && code <= 51059 || 51061 <= code && code <= 51087 || 51089 <= code && code <= 51115 || 51117 <= code && code <= 51143 || 51145 <= code && code <= 51171 || 51173 <= code && code <= 51199 || 51201 <= code && code <= 51227 || 51229 <= code && code <= 51255 || 51257 <= code && code <= 51283 || 51285 <= code && code <= 51311 || 51313 <= code && code <= 51339 || 51341 <= code && code <= 51367 || 51369 <= code && code <= 51395 || 51397 <= code && code <= 51423 || 51425 <= code && code <= 51451 || 51453 <= code && code <= 51479 || 51481 <= code && code <= 51507 || 51509 <= code && code <= 51535 || 51537 <= code && code <= 51563 || 51565 <= code && code <= 51591 || 51593 <= code && code <= 51619 || 51621 <= code && code <= 51647 || 51649 <= code && code <= 51675 || 51677 <= code && code <= 51703 || 51705 <= code && code <= 51731 || 51733 <= code && code <= 51759 || 51761 <= code && code <= 51787 || 51789 <= code && code <= 51815 || 51817 <= code && code <= 51843 || 51845 <= code && code <= 51871 || 51873 <= code && code <= 51899 || 51901 <= code && code <= 51927 || 51929 <= code && code <= 51955 || 51957 <= code && code <= 51983 || 51985 <= code && code <= 52011 || 52013 <= code && code <= 52039 || 52041 <= code && code <= 52067 || 52069 <= code && code <= 52095 || 52097 <= code && code <= 52123 || 52125 <= code && code <= 52151 || 52153 <= code && code <= 52179 || 52181 <= code && code <= 52207 || 52209 <= code && code <= 52235 || 52237 <= code && code <= 52263 || 52265 <= code && code <= 52291 || 52293 <= code && code <= 52319 || 52321 <= code && code <= 52347 || 52349 <= code && code <= 52375 || 52377 <= code && code <= 52403 || 52405 <= code && code <= 52431 || 52433 <= code && code <= 52459 || 52461 <= code && code <= 52487 || 52489 <= code && code <= 52515 || 52517 <= code && code <= 52543 || 52545 <= code && code <= 52571 || 52573 <= code && code <= 52599 || 52601 <= code && code <= 52627 || 52629 <= code && code <= 52655 || 52657 <= code && code <= 52683 || 52685 <= code && code <= 52711 || 52713 <= code && code <= 52739 || 52741 <= code && code <= 52767 || 52769 <= code && code <= 52795 || 52797 <= code && code <= 52823 || 52825 <= code && code <= 52851 || 52853 <= code && code <= 52879 || 52881 <= code && code <= 52907 || 52909 <= code && code <= 52935 || 52937 <= code && code <= 52963 || 52965 <= code && code <= 52991 || 52993 <= code && code <= 53019 || 53021 <= code && code <= 53047 || 53049 <= code && code <= 53075 || 53077 <= code && code <= 53103 || 53105 <= code && code <= 53131 || 53133 <= code && code <= 53159 || 53161 <= code && code <= 53187 || 53189 <= code && code <= 53215 || 53217 <= code && code <= 53243 || 53245 <= code && code <= 53271 || 53273 <= code && code <= 53299 || 53301 <= code && code <= 53327 || 53329 <= code && code <= 53355 || 53357 <= code && code <= 53383 || 53385 <= code && code <= 53411 || 53413 <= code && code <= 53439 || 53441 <= code && code <= 53467 || 53469 <= code && code <= 53495 || 53497 <= code && code <= 53523 || 53525 <= code && code <= 53551 || 53553 <= code && code <= 53579 || 53581 <= code && code <= 53607 || 53609 <= code && code <= 53635 || 53637 <= code && code <= 53663 || 53665 <= code && code <= 53691 || 53693 <= code && code <= 53719 || 53721 <= code && code <= 53747 || 53749 <= code && code <= 53775 || 53777 <= code && code <= 53803 || 53805 <= code && code <= 53831 || 53833 <= code && code <= 53859 || 53861 <= code && code <= 53887 || 53889 <= code && code <= 53915 || 53917 <= code && code <= 53943 || 53945 <= code && code <= 53971 || 53973 <= code && code <= 53999 || 54001 <= code && code <= 54027 || 54029 <= code && code <= 54055 || 54057 <= code && code <= 54083 || 54085 <= code && code <= 54111 || 54113 <= code && code <= 54139 || 54141 <= code && code <= 54167 || 54169 <= code && code <= 54195 || 54197 <= code && code <= 54223 || 54225 <= code && code <= 54251 || 54253 <= code && code <= 54279 || 54281 <= code && code <= 54307 || 54309 <= code && code <= 54335 || 54337 <= code && code <= 54363 || 54365 <= code && code <= 54391 || 54393 <= code && code <= 54419 || 54421 <= code && code <= 54447 || 54449 <= code && code <= 54475 || 54477 <= code && code <= 54503 || 54505 <= code && code <= 54531 || 54533 <= code && code <= 54559 || 54561 <= code && code <= 54587 || 54589 <= code && code <= 54615 || 54617 <= code && code <= 54643 || 54645 <= code && code <= 54671 || 54673 <= code && code <= 54699 || 54701 <= code && code <= 54727 || 54729 <= code && code <= 54755 || 54757 <= code && code <= 54783 || 54785 <= code && code <= 54811 || 54813 <= code && code <= 54839 || 54841 <= code && code <= 54867 || 54869 <= code && code <= 54895 || 54897 <= code && code <= 54923 || 54925 <= code && code <= 54951 || 54953 <= code && code <= 54979 || 54981 <= code && code <= 55007 || 55009 <= code && code <= 55035 || 55037 <= code && code <= 55063 || 55065 <= code && code <= 55091 || 55093 <= code && code <= 55119 || 55121 <= code && code <= 55147 || 55149 <= code && code <= 55175 || 55177 <= code && code <= 55203) { + return LVT; + } + if (code == 9757 || code == 9977 || 9994 <= code && code <= 9997 || code == 127877 || 127938 <= code && code <= 127940 || code == 127943 || 127946 <= code && code <= 127948 || 128066 <= code && code <= 128067 || 128070 <= code && code <= 128080 || code == 128110 || 128112 <= code && code <= 128120 || code == 128124 || 128129 <= code && code <= 128131 || 128133 <= code && code <= 128135 || code == 128170 || 128372 <= code && code <= 128373 || code == 128378 || code == 128400 || 128405 <= code && code <= 128406 || 128581 <= code && code <= 128583 || 128587 <= code && code <= 128591 || code == 128675 || 128692 <= code && code <= 128694 || code == 128704 || code == 128716 || 129304 <= code && code <= 129308 || 129310 <= code && code <= 129311 || code == 129318 || 129328 <= code && code <= 129337 || 129341 <= code && code <= 129342 || 129489 <= code && code <= 129501) { + return E_Base; + } + if (127995 <= code && code <= 127999) { + return E_Modifier; + } + if (code == 8205) { + return ZWJ; + } + if (code == 9792 || code == 9794 || 9877 <= code && code <= 9878 || code == 9992 || code == 10084 || code == 127752 || code == 127806 || code == 127859 || code == 127891 || code == 127908 || code == 127912 || code == 127979 || code == 127981 || code == 128139 || 128187 <= code && code <= 128188 || code == 128295 || code == 128300 || code == 128488 || code == 128640 || code == 128658) { + return Glue_After_Zwj; + } + if (128102 <= code && code <= 128105) { + return E_Base_GAZ; + } + return Other; + } + return this; + } + if (typeof module2 != "undefined" && module2.exports) { + module2.exports = GraphemeSplitter; + } + } +}); + +// ../../node_modules/.pnpm/@arcanis+slice-ansi@1.0.2/node_modules/@arcanis/slice-ansi/index.js +var require_slice_ansi2 = __commonJS({ + "../../node_modules/.pnpm/@arcanis+slice-ansi@1.0.2/node_modules/@arcanis/slice-ansi/index.js"(exports2, module2) { + var GraphemeSplitter = require_grapheme_splitter(); + var ANSI_SEQUENCE = /^(.*?)(\x1b\[[^m]+m|\x1b\]8;;.*?(\x1b\\|\u0007))/; + var splitter = new GraphemeSplitter(); + module2.exports = (orig, at = 0, until = orig.length) => { + if (at < 0 || until < 0) + throw new RangeError(`Negative indices aren't supported by this implementation`); + const length = until - at; + let output = ``; + let skipped = 0; + let visible = 0; + while (orig.length > 0) { + const lookup = orig.match(ANSI_SEQUENCE) || [orig, orig, void 0]; + let graphemes = splitter.splitGraphemes(lookup[1]); + const skipping = Math.min(at - skipped, graphemes.length); + graphemes = graphemes.slice(skipping); + const displaying = Math.min(length - visible, graphemes.length); + output += graphemes.slice(0, displaying).join(``); + skipped += skipping; + visible += displaying; + if (typeof lookup[2] !== `undefined`) + output += lookup[2]; + orig = orig.slice(lookup[0].length); + } + return output; + }; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/wrapString.js +var require_wrapString2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/wrapString.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _sliceAnsi = _interopRequireDefault(require_slice_ansi2()); + var _stringWidth = _interopRequireDefault(require_string_width()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var wrapString = (subject, size) => { + let subjectSlice; + subjectSlice = subject; + const chunks = []; + do { + chunks.push((0, _sliceAnsi.default)(subjectSlice, 0, size)); + subjectSlice = (0, _sliceAnsi.default)(subjectSlice, size).trim(); + } while ((0, _stringWidth.default)(subjectSlice)); + return chunks; + }; + var _default = wrapString; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/wrapWord.js +var require_wrapWord2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/wrapWord.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _sliceAnsi = _interopRequireDefault(require_slice_ansi2()); + var _stringWidth = _interopRequireDefault(require_string_width()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var wrapWord = (input, size) => { + let subject; + subject = input; + const chunks = []; + const re = new RegExp("(^.{1," + size + "}(\\s+|$))|(^.{1," + (size - 1) + "}(\\\\|/|_|\\.|,|;|-))"); + do { + let chunk; + chunk = subject.match(re); + if (chunk) { + chunk = chunk[0]; + subject = (0, _sliceAnsi.default)(subject, (0, _stringWidth.default)(chunk)); + chunk = chunk.trim(); + } else { + chunk = (0, _sliceAnsi.default)(subject, 0, size); + subject = (0, _sliceAnsi.default)(subject, size); + } + chunks.push(chunk); + } while ((0, _stringWidth.default)(subject)); + return chunks; + }; + var _default = wrapWord; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/wrapCell.js +var require_wrapCell2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/wrapCell.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _wrapString = _interopRequireDefault(require_wrapString2()); + var _wrapWord = _interopRequireDefault(require_wrapWord2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var wrapCell = (cellValue, columnWidth, useWrapWord) => { + const cellLines = cellValue.split("\n"); + for (let lineNr = 0; lineNr < cellLines.length; ) { + let lineChunks; + if (useWrapWord) { + lineChunks = (0, _wrapWord.default)(cellLines[lineNr], columnWidth); + } else { + lineChunks = (0, _wrapString.default)(cellLines[lineNr], columnWidth); + } + cellLines.splice(lineNr, 1, ...lineChunks); + lineNr += lineChunks.length; + } + return cellLines; + }; + var _default = wrapCell; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/calculateCellHeight.js +var require_calculateCellHeight2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/calculateCellHeight.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _isString2 = _interopRequireDefault(require_isString2()); + var _wrapCell = _interopRequireDefault(require_wrapCell2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var calculateCellHeight = (value, columnWidth, useWrapWord = false) => { + if (!(0, _isString2.default)(value)) { + throw new TypeError("Value must be a string."); + } + if (!Number.isInteger(columnWidth)) { + throw new TypeError("Column width must be an integer."); + } + if (columnWidth < 1) { + throw new Error("Column width must be greater than 0."); + } + return (0, _wrapCell.default)(value, columnWidth, useWrapWord).length; + }; + var _default = calculateCellHeight; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/calculateRowHeightIndex.js +var require_calculateRowHeightIndex2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/calculateRowHeightIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _max2 = _interopRequireDefault(require_max3()); + var _isBoolean2 = _interopRequireDefault(require_isBoolean()); + var _isNumber2 = _interopRequireDefault(require_isNumber()); + var _calculateCellHeight = _interopRequireDefault(require_calculateCellHeight2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var calculateRowHeightIndex = (rows, config) => { + const tableWidth = rows[0].length; + const rowSpanIndex = []; + rows.forEach((cells) => { + const cellHeightIndex = new Array(tableWidth).fill(1); + cells.forEach((value, index1) => { + if (!(0, _isNumber2.default)(config.columns[index1].width)) { + throw new TypeError("column[index].width must be a number."); + } + if (!(0, _isBoolean2.default)(config.columns[index1].wrapWord)) { + throw new TypeError("column[index].wrapWord must be a boolean."); + } + cellHeightIndex[index1] = (0, _calculateCellHeight.default)(value, config.columns[index1].width, config.columns[index1].wrapWord); + }); + rowSpanIndex.push((0, _max2.default)(cellHeightIndex)); + }); + return rowSpanIndex; + }; + var _default = calculateRowHeightIndex; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/drawBorder.js +var require_drawBorder2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/drawBorder.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.drawBorderTop = exports2.drawBorderJoin = exports2.drawBorderBottom = exports2.drawBorder = void 0; + var drawBorder = (columnSizeIndex, parts) => { + const columns = columnSizeIndex.map((size) => { + return parts.body.repeat(size); + }).join(parts.join); + return parts.left + columns + parts.right + "\n"; + }; + exports2.drawBorder = drawBorder; + var drawBorderTop = (columnSizeIndex, parts) => { + const border = drawBorder(columnSizeIndex, { + body: parts.topBody, + join: parts.topJoin, + left: parts.topLeft, + right: parts.topRight + }); + if (border === "\n") { + return ""; + } + return border; + }; + exports2.drawBorderTop = drawBorderTop; + var drawBorderJoin = (columnSizeIndex, parts) => { + return drawBorder(columnSizeIndex, { + body: parts.joinBody, + join: parts.joinJoin, + left: parts.joinLeft, + right: parts.joinRight + }); + }; + exports2.drawBorderJoin = drawBorderJoin; + var drawBorderBottom = (columnSizeIndex, parts) => { + return drawBorder(columnSizeIndex, { + body: parts.bottomBody, + join: parts.bottomJoin, + left: parts.bottomLeft, + right: parts.bottomRight + }); + }; + exports2.drawBorderBottom = drawBorderBottom; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/drawRow.js +var require_drawRow2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/drawRow.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var drawRow = (columns, border) => { + return border.bodyLeft + columns.join(border.bodyJoin) + border.bodyRight + "\n"; + }; + var _default = drawRow; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/getBorderCharacters.js +var require_getBorderCharacters2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/getBorderCharacters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var getBorderCharacters = (name) => { + if (name === "honeywell") { + return { + topBody: "\u2550", + topJoin: "\u2564", + topLeft: "\u2554", + topRight: "\u2557", + bottomBody: "\u2550", + bottomJoin: "\u2567", + bottomLeft: "\u255A", + bottomRight: "\u255D", + bodyLeft: "\u2551", + bodyRight: "\u2551", + bodyJoin: "\u2502", + joinBody: "\u2500", + joinLeft: "\u255F", + joinRight: "\u2562", + joinJoin: "\u253C" + }; + } + if (name === "norc") { + return { + topBody: "\u2500", + topJoin: "\u252C", + topLeft: "\u250C", + topRight: "\u2510", + bottomBody: "\u2500", + bottomJoin: "\u2534", + bottomLeft: "\u2514", + bottomRight: "\u2518", + bodyLeft: "\u2502", + bodyRight: "\u2502", + bodyJoin: "\u2502", + joinBody: "\u2500", + joinLeft: "\u251C", + joinRight: "\u2524", + joinJoin: "\u253C" + }; + } + if (name === "ramac") { + return { + topBody: "-", + topJoin: "+", + topLeft: "+", + topRight: "+", + bottomBody: "-", + bottomJoin: "+", + bottomLeft: "+", + bottomRight: "+", + bodyLeft: "|", + bodyRight: "|", + bodyJoin: "|", + joinBody: "-", + joinLeft: "|", + joinRight: "|", + joinJoin: "|" + }; + } + if (name === "void") { + return { + topBody: "", + topJoin: "", + topLeft: "", + topRight: "", + bottomBody: "", + bottomJoin: "", + bottomLeft: "", + bottomRight: "", + bodyLeft: "", + bodyRight: "", + bodyJoin: "", + joinBody: "", + joinLeft: "", + joinRight: "", + joinJoin: "" + }; + } + throw new Error('Unknown border template "' + name + '".'); + }; + var _default = getBorderCharacters; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/validateConfig.js +var require_validateConfig2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/validateConfig.js"(exports2, module2) { + "use strict"; + var equal = require_equal(); + var validate = function() { + var pattern0 = new RegExp("^[0-9]+$"); + var refVal = []; + var refVal1 = function() { + var pattern02 = new RegExp("^[0-9]+$"); + return function validate2(data, dataPath, parentData, parentDataProperty, rootData) { + "use strict"; + var vErrors = null; + var errors = 0; + if (rootData === void 0) + rootData = data; + if (data && typeof data === "object" && !Array.isArray(data)) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !validate2.schema.properties.hasOwnProperty(key0); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: "additionalProperties", + dataPath: (dataPath || "") + "", + schemaPath: "#/additionalProperties", + params: { + additionalProperty: "" + key0 + "" + }, + message: "should NOT have additional properties" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + } + if (data.topBody !== void 0) { + var errs_1 = errors; + if (!refVal2(data.topBody, (dataPath || "") + ".topBody", data, "topBody", rootData)) { + if (vErrors === null) + vErrors = refVal2.errors; + else + vErrors = vErrors.concat(refVal2.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topJoin !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.topJoin, (dataPath || "") + ".topJoin", data, "topJoin", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topLeft !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.topLeft, (dataPath || "") + ".topLeft", data, "topLeft", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topRight !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.topRight, (dataPath || "") + ".topRight", data, "topRight", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomBody !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bottomBody, (dataPath || "") + ".bottomBody", data, "bottomBody", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomJoin !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bottomJoin, (dataPath || "") + ".bottomJoin", data, "bottomJoin", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomLeft !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bottomLeft, (dataPath || "") + ".bottomLeft", data, "bottomLeft", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomRight !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bottomRight, (dataPath || "") + ".bottomRight", data, "bottomRight", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyLeft !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bodyLeft, (dataPath || "") + ".bodyLeft", data, "bodyLeft", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyRight !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bodyRight, (dataPath || "") + ".bodyRight", data, "bodyRight", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyJoin !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bodyJoin, (dataPath || "") + ".bodyJoin", data, "bodyJoin", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinBody !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.joinBody, (dataPath || "") + ".joinBody", data, "joinBody", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinLeft !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.joinLeft, (dataPath || "") + ".joinLeft", data, "joinLeft", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinRight !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.joinRight, (dataPath || "") + ".joinRight", data, "joinRight", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinJoin !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.joinJoin, (dataPath || "") + ".joinJoin", data, "joinJoin", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: "type", + dataPath: (dataPath || "") + "", + schemaPath: "#/type", + params: { + type: "object" + }, + message: "should be object" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + validate2.errors = vErrors; + return errors === 0; + }; + }(); + refVal1.schema = { + "type": "object", + "properties": { + "topBody": { + "$ref": "#/definitions/border" + }, + "topJoin": { + "$ref": "#/definitions/border" + }, + "topLeft": { + "$ref": "#/definitions/border" + }, + "topRight": { + "$ref": "#/definitions/border" + }, + "bottomBody": { + "$ref": "#/definitions/border" + }, + "bottomJoin": { + "$ref": "#/definitions/border" + }, + "bottomLeft": { + "$ref": "#/definitions/border" + }, + "bottomRight": { + "$ref": "#/definitions/border" + }, + "bodyLeft": { + "$ref": "#/definitions/border" + }, + "bodyRight": { + "$ref": "#/definitions/border" + }, + "bodyJoin": { + "$ref": "#/definitions/border" + }, + "joinBody": { + "$ref": "#/definitions/border" + }, + "joinLeft": { + "$ref": "#/definitions/border" + }, + "joinRight": { + "$ref": "#/definitions/border" + }, + "joinJoin": { + "$ref": "#/definitions/border" + } + }, + "additionalProperties": false + }; + refVal1.errors = null; + refVal[1] = refVal1; + var refVal2 = function() { + var pattern02 = new RegExp("^[0-9]+$"); + return function validate2(data, dataPath, parentData, parentDataProperty, rootData) { + "use strict"; + var vErrors = null; + var errors = 0; + if (rootData === void 0) + rootData = data; + if (typeof data !== "string") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + "", + schemaPath: "#/type", + params: { + type: "string" + }, + message: "should be string" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + validate2.errors = vErrors; + return errors === 0; + }; + }(); + refVal2.schema = { + "type": "string" + }; + refVal2.errors = null; + refVal[2] = refVal2; + var refVal3 = function() { + var pattern02 = new RegExp("^[0-9]+$"); + return function validate2(data, dataPath, parentData, parentDataProperty, rootData) { + "use strict"; + var vErrors = null; + var errors = 0; + if (rootData === void 0) + rootData = data; + if (data && typeof data === "object" && !Array.isArray(data)) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !pattern02.test(key0); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: "additionalProperties", + dataPath: (dataPath || "") + "", + schemaPath: "#/additionalProperties", + params: { + additionalProperty: "" + key0 + "" + }, + message: "should NOT have additional properties" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + } + for (var key0 in data) { + if (pattern02.test(key0)) { + var errs_1 = errors; + if (!refVal4(data[key0], (dataPath || "") + "['" + key0 + "']", data, key0, rootData)) { + if (vErrors === null) + vErrors = refVal4.errors; + else + vErrors = vErrors.concat(refVal4.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + } + } else { + var err = { + keyword: "type", + dataPath: (dataPath || "") + "", + schemaPath: "#/type", + params: { + type: "object" + }, + message: "should be object" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + validate2.errors = vErrors; + return errors === 0; + }; + }(); + refVal3.schema = { + "type": "object", + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/column" + } + }, + "additionalProperties": false + }; + refVal3.errors = null; + refVal[3] = refVal3; + var refVal4 = function() { + var pattern02 = new RegExp("^[0-9]+$"); + return function validate2(data, dataPath, parentData, parentDataProperty, rootData) { + "use strict"; + var vErrors = null; + var errors = 0; + if (rootData === void 0) + rootData = data; + if (data && typeof data === "object" && !Array.isArray(data)) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(key0 == "alignment" || key0 == "width" || key0 == "wrapWord" || key0 == "truncate" || key0 == "paddingLeft" || key0 == "paddingRight"); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: "additionalProperties", + dataPath: (dataPath || "") + "", + schemaPath: "#/additionalProperties", + params: { + additionalProperty: "" + key0 + "" + }, + message: "should NOT have additional properties" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + } + var data1 = data.alignment; + if (data1 !== void 0) { + var errs_1 = errors; + if (typeof data1 !== "string") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".alignment", + schemaPath: "#/properties/alignment/type", + params: { + type: "string" + }, + message: "should be string" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var schema1 = validate2.schema.properties.alignment.enum; + var valid1; + valid1 = false; + for (var i1 = 0; i1 < schema1.length; i1++) + if (equal(data1, schema1[i1])) { + valid1 = true; + break; + } + if (!valid1) { + var err = { + keyword: "enum", + dataPath: (dataPath || "") + ".alignment", + schemaPath: "#/properties/alignment/enum", + params: { + allowedValues: schema1 + }, + message: "should be equal to one of the allowed values" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.width !== void 0) { + var errs_1 = errors; + if (typeof data.width !== "number") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".width", + schemaPath: "#/properties/width/type", + params: { + type: "number" + }, + message: "should be number" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.wrapWord !== void 0) { + var errs_1 = errors; + if (typeof data.wrapWord !== "boolean") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".wrapWord", + schemaPath: "#/properties/wrapWord/type", + params: { + type: "boolean" + }, + message: "should be boolean" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.truncate !== void 0) { + var errs_1 = errors; + if (typeof data.truncate !== "number") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".truncate", + schemaPath: "#/properties/truncate/type", + params: { + type: "number" + }, + message: "should be number" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.paddingLeft !== void 0) { + var errs_1 = errors; + if (typeof data.paddingLeft !== "number") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".paddingLeft", + schemaPath: "#/properties/paddingLeft/type", + params: { + type: "number" + }, + message: "should be number" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.paddingRight !== void 0) { + var errs_1 = errors; + if (typeof data.paddingRight !== "number") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".paddingRight", + schemaPath: "#/properties/paddingRight/type", + params: { + type: "number" + }, + message: "should be number" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: "type", + dataPath: (dataPath || "") + "", + schemaPath: "#/type", + params: { + type: "object" + }, + message: "should be object" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + validate2.errors = vErrors; + return errors === 0; + }; + }(); + refVal4.schema = { + "type": "object", + "properties": { + "alignment": { + "type": "string", + "enum": ["left", "right", "center"] + }, + "width": { + "type": "number" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "number" + }, + "paddingLeft": { + "type": "number" + }, + "paddingRight": { + "type": "number" + } + }, + "additionalProperties": false + }; + refVal4.errors = null; + refVal[4] = refVal4; + return function validate2(data, dataPath, parentData, parentDataProperty, rootData) { + "use strict"; + var vErrors = null; + var errors = 0; + if (rootData === void 0) + rootData = data; + if (data && typeof data === "object" && !Array.isArray(data)) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(key0 == "border" || key0 == "columns" || key0 == "columnDefault" || key0 == "drawHorizontalLine"); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: "additionalProperties", + dataPath: (dataPath || "") + "", + schemaPath: "#/additionalProperties", + params: { + additionalProperty: "" + key0 + "" + }, + message: "should NOT have additional properties" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + } + if (data.border !== void 0) { + var errs_1 = errors; + if (!refVal1(data.border, (dataPath || "") + ".border", data, "border", rootData)) { + if (vErrors === null) + vErrors = refVal1.errors; + else + vErrors = vErrors.concat(refVal1.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.columns !== void 0) { + var errs_1 = errors; + if (!refVal3(data.columns, (dataPath || "") + ".columns", data, "columns", rootData)) { + if (vErrors === null) + vErrors = refVal3.errors; + else + vErrors = vErrors.concat(refVal3.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.columnDefault !== void 0) { + var errs_1 = errors; + if (!refVal[4](data.columnDefault, (dataPath || "") + ".columnDefault", data, "columnDefault", rootData)) { + if (vErrors === null) + vErrors = refVal[4].errors; + else + vErrors = vErrors.concat(refVal[4].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.drawHorizontalLine !== void 0) { + var errs_1 = errors; + var errs__1 = errors; + var valid1; + valid1 = typeof data.drawHorizontalLine == "function"; + if (!valid1) { + if (errs__1 == errors) { + var err = { + keyword: "typeof", + dataPath: (dataPath || "") + ".drawHorizontalLine", + schemaPath: "#/properties/drawHorizontalLine/typeof", + params: { + keyword: "typeof" + }, + message: 'should pass "typeof" keyword validation' + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } else { + for (var i1 = errs__1; i1 < errors; i1++) { + var ruleErr1 = vErrors[i1]; + if (ruleErr1.dataPath === void 0) + ruleErr1.dataPath = (dataPath || "") + ".drawHorizontalLine"; + if (ruleErr1.schemaPath === void 0) { + ruleErr1.schemaPath = "#/properties/drawHorizontalLine/typeof"; + } + } + } + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: "type", + dataPath: (dataPath || "") + "", + schemaPath: "#/type", + params: { + type: "object" + }, + message: "should be object" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + validate2.errors = vErrors; + return errors === 0; + }; + }(); + validate.schema = { + "$id": "config.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "border": { + "$ref": "#/definitions/borders" + }, + "columns": { + "$ref": "#/definitions/columns" + }, + "columnDefault": { + "$ref": "#/definitions/column" + }, + "drawHorizontalLine": { + "typeof": "function" + } + }, + "additionalProperties": false, + "definitions": { + "columns": { + "type": "object", + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/column" + } + }, + "additionalProperties": false + }, + "column": { + "type": "object", + "properties": { + "alignment": { + "type": "string", + "enum": ["left", "right", "center"] + }, + "width": { + "type": "number" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "number" + }, + "paddingLeft": { + "type": "number" + }, + "paddingRight": { + "type": "number" + } + }, + "additionalProperties": false + }, + "borders": { + "type": "object", + "properties": { + "topBody": { + "$ref": "#/definitions/border" + }, + "topJoin": { + "$ref": "#/definitions/border" + }, + "topLeft": { + "$ref": "#/definitions/border" + }, + "topRight": { + "$ref": "#/definitions/border" + }, + "bottomBody": { + "$ref": "#/definitions/border" + }, + "bottomJoin": { + "$ref": "#/definitions/border" + }, + "bottomLeft": { + "$ref": "#/definitions/border" + }, + "bottomRight": { + "$ref": "#/definitions/border" + }, + "bodyLeft": { + "$ref": "#/definitions/border" + }, + "bodyRight": { + "$ref": "#/definitions/border" + }, + "bodyJoin": { + "$ref": "#/definitions/border" + }, + "joinBody": { + "$ref": "#/definitions/border" + }, + "joinLeft": { + "$ref": "#/definitions/border" + }, + "joinRight": { + "$ref": "#/definitions/border" + }, + "joinJoin": { + "$ref": "#/definitions/border" + } + }, + "additionalProperties": false + }, + "border": { + "type": "string" + } + } + }; + validate.errors = null; + module2.exports = validate; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/makeStreamConfig.js +var require_makeStreamConfig2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/makeStreamConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _cloneDeep2 = _interopRequireDefault(require_cloneDeep()); + var _isUndefined2 = _interopRequireDefault(require_isUndefined()); + var _times2 = _interopRequireDefault(require_times2()); + var _getBorderCharacters = _interopRequireDefault(require_getBorderCharacters2()); + var _validateConfig = _interopRequireDefault(require_validateConfig2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var makeBorder = (border = {}) => { + return Object.assign({}, (0, _getBorderCharacters.default)("honeywell"), border); + }; + var makeColumns = (columnCount, columns = {}, columnDefault = {}) => { + (0, _times2.default)(columnCount, (index) => { + if ((0, _isUndefined2.default)(columns[index])) { + columns[index] = {}; + } + columns[index] = Object.assign({ + alignment: "left", + paddingLeft: 1, + paddingRight: 1, + truncate: Infinity, + wrapWord: false + }, columnDefault, columns[index]); + }); + return columns; + }; + var makeStreamConfig = (userConfig = {}) => { + (0, _validateConfig.default)("streamConfig.json", userConfig); + const config = (0, _cloneDeep2.default)(userConfig); + if (!config.columnDefault || !config.columnDefault.width) { + throw new Error("Must provide config.columnDefault.width when creating a stream."); + } + if (!config.columnCount) { + throw new Error("Must provide config.columnCount."); + } + config.border = makeBorder(config.border); + config.columns = makeColumns(config.columnCount, config.columns, config.columnDefault); + return config; + }; + var _default = makeStreamConfig; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/mapDataUsingRowHeightIndex.js +var require_mapDataUsingRowHeightIndex2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/mapDataUsingRowHeightIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _flatten2 = _interopRequireDefault(require_flatten()); + var _times2 = _interopRequireDefault(require_times2()); + var _wrapCell = _interopRequireDefault(require_wrapCell2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var mapDataUsingRowHeightIndex = (unmappedRows, rowHeightIndex, config) => { + const tableWidth = unmappedRows[0].length; + const mappedRows = unmappedRows.map((cells, index0) => { + const rowHeight = (0, _times2.default)(rowHeightIndex[index0], () => { + return new Array(tableWidth).fill(""); + }); + cells.forEach((value, index1) => { + const cellLines = (0, _wrapCell.default)(value, config.columns[index1].width, config.columns[index1].wrapWord); + cellLines.forEach((cellLine, index2) => { + rowHeight[index2][index1] = cellLine; + }); + }); + return rowHeight; + }); + return (0, _flatten2.default)(mappedRows); + }; + var _default = mapDataUsingRowHeightIndex; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/padTableData.js +var require_padTableData2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/padTableData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var padTableData = (rows, config) => { + return rows.map((cells) => { + return cells.map((value, index1) => { + const column = config.columns[index1]; + return " ".repeat(column.paddingLeft) + value + " ".repeat(column.paddingRight); + }); + }); + }; + var _default = padTableData; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/stringifyTableData.js +var require_stringifyTableData2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/stringifyTableData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var stringifyTableData = (rows) => { + return rows.map((cells) => { + return cells.map(String); + }); + }; + var _default = stringifyTableData; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/truncateTableData.js +var require_truncateTableData2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/truncateTableData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _truncate2 = _interopRequireDefault(require_truncate()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var truncateTableData = (rows, config) => { + return rows.map((cells) => { + return cells.map((content, index) => { + return (0, _truncate2.default)(content, { + length: config.columns[index].truncate + }); + }); + }); + }; + var _default = truncateTableData; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/createStream.js +var require_createStream2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/createStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _mapValues2 = _interopRequireDefault(require_mapValues()); + var _values2 = _interopRequireDefault(require_values()); + var _trimEnd2 = _interopRequireDefault(require_trimEnd()); + var _alignTableData = _interopRequireDefault(require_alignTableData2()); + var _calculateRowHeightIndex = _interopRequireDefault(require_calculateRowHeightIndex2()); + var _drawBorder = require_drawBorder2(); + var _drawRow = _interopRequireDefault(require_drawRow2()); + var _makeStreamConfig = _interopRequireDefault(require_makeStreamConfig2()); + var _mapDataUsingRowHeightIndex = _interopRequireDefault(require_mapDataUsingRowHeightIndex2()); + var _padTableData = _interopRequireDefault(require_padTableData2()); + var _stringifyTableData = _interopRequireDefault(require_stringifyTableData2()); + var _truncateTableData = _interopRequireDefault(require_truncateTableData2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var prepareData = (data, config) => { + let rows; + rows = (0, _stringifyTableData.default)(data); + rows = (0, _truncateTableData.default)(data, config); + const rowHeightIndex = (0, _calculateRowHeightIndex.default)(rows, config); + rows = (0, _mapDataUsingRowHeightIndex.default)(rows, rowHeightIndex, config); + rows = (0, _alignTableData.default)(rows, config); + rows = (0, _padTableData.default)(rows, config); + return rows; + }; + var create = (row, columnWidthIndex, config) => { + const rows = prepareData([row], config); + const body = rows.map((literalRow) => { + return (0, _drawRow.default)(literalRow, config.border); + }).join(""); + let output; + output = ""; + output += (0, _drawBorder.drawBorderTop)(columnWidthIndex, config.border); + output += body; + output += (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border); + output = (0, _trimEnd2.default)(output); + process.stdout.write(output); + }; + var append = (row, columnWidthIndex, config) => { + const rows = prepareData([row], config); + const body = rows.map((literalRow) => { + return (0, _drawRow.default)(literalRow, config.border); + }).join(""); + let output = ""; + const bottom = (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border); + if (bottom !== "\n") { + output = "\r"; + } + output += (0, _drawBorder.drawBorderJoin)(columnWidthIndex, config.border); + output += body; + output += bottom; + output = (0, _trimEnd2.default)(output); + process.stdout.write(output); + }; + var createStream = (userConfig = {}) => { + const config = (0, _makeStreamConfig.default)(userConfig); + const columnWidthIndex = (0, _values2.default)((0, _mapValues2.default)(config.columns, (column) => { + return column.width + column.paddingLeft + column.paddingRight; + })); + let empty; + empty = true; + return { + write: (row) => { + if (row.length !== config.columnCount) { + throw new Error("Row cell count does not match the config.columnCount."); + } + if (empty) { + empty = false; + return create(row, columnWidthIndex, config); + } else { + return append(row, columnWidthIndex, config); + } + } + }; + }; + var _default = createStream; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/calculateCellWidthIndex.js +var require_calculateCellWidthIndex2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/calculateCellWidthIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _stringWidth = _interopRequireDefault(require_string_width()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var calculateCellWidthIndex = (cells) => { + return cells.map((value) => { + return Math.max(...value.split("\n").map((line) => { + return (0, _stringWidth.default)(line); + })); + }); + }; + var _default = calculateCellWidthIndex; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/drawTable.js +var require_drawTable2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/drawTable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _drawBorder = require_drawBorder2(); + var _drawRow = _interopRequireDefault(require_drawRow2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var drawTable = (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine, singleLine) => { + let output; + let realRowIndex; + let rowHeight; + const rowCount = rows.length; + realRowIndex = 0; + output = ""; + if (drawHorizontalLine(realRowIndex, rowCount)) { + output += (0, _drawBorder.drawBorderTop)(columnSizeIndex, border); + } + rows.forEach((row, index0) => { + output += (0, _drawRow.default)(row, border); + if (!rowHeight) { + rowHeight = rowSpanIndex[realRowIndex]; + realRowIndex++; + } + rowHeight--; + if (!singleLine && rowHeight === 0 && index0 !== rowCount - 1 && drawHorizontalLine(realRowIndex, rowCount)) { + output += (0, _drawBorder.drawBorderJoin)(columnSizeIndex, border); + } + }); + if (drawHorizontalLine(realRowIndex, rowCount)) { + output += (0, _drawBorder.drawBorderBottom)(columnSizeIndex, border); + } + return output; + }; + var _default = drawTable; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/calculateMaximumColumnWidthIndex.js +var require_calculateMaximumColumnWidthIndex2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/calculateMaximumColumnWidthIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _calculateCellWidthIndex = _interopRequireDefault(require_calculateCellWidthIndex2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var calculateMaximumColumnWidthIndex = (rows) => { + if (!rows[0]) { + throw new Error("Dataset must have at least one row."); + } + const columns = new Array(rows[0].length).fill(0); + rows.forEach((row) => { + const columnWidthIndex = (0, _calculateCellWidthIndex.default)(row); + columnWidthIndex.forEach((valueWidth, index0) => { + if (columns[index0] < valueWidth) { + columns[index0] = valueWidth; + } + }); + }); + return columns; + }; + var _default = calculateMaximumColumnWidthIndex; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/makeConfig.js +var require_makeConfig2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/makeConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _cloneDeep2 = _interopRequireDefault(require_cloneDeep()); + var _isUndefined2 = _interopRequireDefault(require_isUndefined()); + var _times2 = _interopRequireDefault(require_times2()); + var _calculateMaximumColumnWidthIndex = _interopRequireDefault(require_calculateMaximumColumnWidthIndex2()); + var _getBorderCharacters = _interopRequireDefault(require_getBorderCharacters2()); + var _validateConfig = _interopRequireDefault(require_validateConfig2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var makeBorder = (border = {}) => { + return Object.assign({}, (0, _getBorderCharacters.default)("honeywell"), border); + }; + var makeColumns = (rows, columns = {}, columnDefault = {}) => { + const maximumColumnWidthIndex = (0, _calculateMaximumColumnWidthIndex.default)(rows); + (0, _times2.default)(rows[0].length, (index) => { + if ((0, _isUndefined2.default)(columns[index])) { + columns[index] = {}; + } + columns[index] = Object.assign({ + alignment: "left", + paddingLeft: 1, + paddingRight: 1, + truncate: Infinity, + width: maximumColumnWidthIndex[index], + wrapWord: false + }, columnDefault, columns[index]); + }); + return columns; + }; + var makeConfig = (rows, userConfig = {}) => { + (0, _validateConfig.default)("config.json", userConfig); + const config = (0, _cloneDeep2.default)(userConfig); + config.border = makeBorder(config.border); + config.columns = makeColumns(rows, config.columns, config.columnDefault); + if (!config.drawHorizontalLine) { + config.drawHorizontalLine = () => { + return true; + }; + } + if (config.singleLine === void 0) { + config.singleLine = false; + } + return config; + }; + var _default = makeConfig; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/validateTableData.js +var require_validateTableData2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/validateTableData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + function _createForOfIteratorHelper(o, allowArrayLike) { + var it; + if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { + if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { + if (it) + o = it; + var i = 0; + var F = function F2() { + }; + return { s: F, n: function n() { + if (i >= o.length) + return { done: true }; + return { done: false, value: o[i++] }; + }, e: function e(_e) { + throw _e; + }, f: F }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + var normalCompletion = true, didErr = false, err; + return { s: function s() { + it = o[Symbol.iterator](); + }, n: function n() { + var step = it.next(); + normalCompletion = step.done; + return step; + }, e: function e(_e2) { + didErr = true; + err = _e2; + }, f: function f() { + try { + if (!normalCompletion && it.return != null) + it.return(); + } finally { + if (didErr) + throw err; + } + } }; + } + function _unsupportedIterableToArray(o, minLen) { + if (!o) + return; + if (typeof o === "string") + return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) + n = o.constructor.name; + if (n === "Map" || n === "Set") + return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return _arrayLikeToArray(o, minLen); + } + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) + len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) + arr2[i] = arr[i]; + return arr2; + } + var validateTableData = (rows) => { + if (!Array.isArray(rows)) { + throw new TypeError("Table data must be an array."); + } + if (rows.length === 0) { + throw new Error("Table must define at least one row."); + } + if (rows[0].length === 0) { + throw new Error("Table must define at least one column."); + } + const columnNumber = rows[0].length; + var _iterator = _createForOfIteratorHelper(rows), _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done; ) { + const cells = _step.value; + if (!Array.isArray(cells)) { + throw new TypeError("Table row data must be an array."); + } + if (cells.length !== columnNumber) { + throw new Error("Table must have a consistent number of cells."); + } + var _iterator2 = _createForOfIteratorHelper(cells), _step2; + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) { + const cell = _step2.value; + if (/[\u0001-\u0006\u0008\u0009\u000B-\u001A]/.test(cell)) { + throw new Error("Table data must not contain control characters."); + } + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + }; + var _default = validateTableData; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/table.js +var require_table2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/table.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _alignTableData = _interopRequireDefault(require_alignTableData2()); + var _calculateCellWidthIndex = _interopRequireDefault(require_calculateCellWidthIndex2()); + var _calculateRowHeightIndex = _interopRequireDefault(require_calculateRowHeightIndex2()); + var _drawTable = _interopRequireDefault(require_drawTable2()); + var _makeConfig = _interopRequireDefault(require_makeConfig2()); + var _mapDataUsingRowHeightIndex = _interopRequireDefault(require_mapDataUsingRowHeightIndex2()); + var _padTableData = _interopRequireDefault(require_padTableData2()); + var _stringifyTableData = _interopRequireDefault(require_stringifyTableData2()); + var _truncateTableData = _interopRequireDefault(require_truncateTableData2()); + var _validateTableData = _interopRequireDefault(require_validateTableData2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var table = (data, userConfig = {}) => { + let rows; + (0, _validateTableData.default)(data); + rows = (0, _stringifyTableData.default)(data); + const config = (0, _makeConfig.default)(rows, userConfig); + rows = (0, _truncateTableData.default)(data, config); + const rowHeightIndex = (0, _calculateRowHeightIndex.default)(rows, config); + rows = (0, _mapDataUsingRowHeightIndex.default)(rows, rowHeightIndex, config); + rows = (0, _alignTableData.default)(rows, config); + rows = (0, _padTableData.default)(rows, config); + const cellWidthIndex = (0, _calculateCellWidthIndex.default)(rows[0]); + return (0, _drawTable.default)(rows, config.border, cellWidthIndex, rowHeightIndex, config.drawHorizontalLine, config.singleLine); + }; + var _default = table; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/index.js +var require_dist10 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + Object.defineProperty(exports2, "createStream", { + enumerable: true, + get: function get() { + return _createStream.default; + } + }); + Object.defineProperty(exports2, "getBorderCharacters", { + enumerable: true, + get: function get() { + return _getBorderCharacters.default; + } + }); + Object.defineProperty(exports2, "table", { + enumerable: true, + get: function get() { + return _table.default; + } + }); + var _createStream = _interopRequireDefault(require_createStream2()); + var _getBorderCharacters = _interopRequireDefault(require_getBorderCharacters2()); + var _table = _interopRequireDefault(require_table2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + } +}); + +// ../plugin-commands-audit/lib/fix.js +var require_fix = __commonJS({ + "../plugin-commands-audit/lib/fix.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var read_project_manifest_1 = __importDefault(require_lib19()); + var fromPairs_1 = __importDefault(require_fromPairs()); + async function fix(dir, auditReport) { + var _a; + const { manifest, writeProjectManifest } = await read_project_manifest_1.default(dir); + const vulnOverrides = createOverrides(Object.values(auditReport.advisories)); + if (Object.values(vulnOverrides).length === 0) + return vulnOverrides; + await writeProjectManifest({ + ...manifest, + pnpm: { + ...manifest.pnpm, + overrides: { + ...(_a = manifest.pnpm) === null || _a === void 0 ? void 0 : _a.overrides, + ...vulnOverrides + } + } + }); + return vulnOverrides; + } + exports2.default = fix; + function createOverrides(advisories) { + return fromPairs_1.default(advisories.filter(({ vulnerable_versions }) => vulnerable_versions !== ">=0.0.0").map((advisory) => [ + `${advisory.module_name}@${advisory.vulnerable_versions}`, + advisory.patched_versions + ])); + } + } +}); + +// ../plugin-commands-audit/lib/audit.js +var require_audit2 = __commonJS({ + "../plugin-commands-audit/lib/audit.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.shorthands = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var audit_1 = __importDefault(require_lib55()); + var cli_utils_1 = require_lib20(); + var config_1 = require_lib10(); + var constants_1 = require_lib7(); + var error_1 = __importDefault(require_lib8()); + var lockfile_file_1 = require_lib57(); + var table_1 = require_dist10(); + var chalk_1 = __importDefault(require_source()); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + var fix_1 = __importDefault(require_fix()); + var AUDIT_LEVEL_NUMBER = { + low: 0, + moderate: 1, + high: 2, + critical: 3 + }; + var AUDIT_COLOR = { + low: chalk_1.default.bold, + moderate: chalk_1.default.bold.yellow, + high: chalk_1.default.bold.red, + critical: chalk_1.default.bold.red + }; + exports2.rcOptionsTypes = cliOptionsTypes; + function cliOptionsTypes() { + return { + ...pick_1.default([ + "dev", + "json", + "only", + "optional", + "production", + "registry" + ], config_1.types), + "audit-level": ["low", "moderate", "high", "critical"], + fix: Boolean, + "ignore-registry-errors": Boolean + }; + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.shorthands = { + D: "--dev", + P: "--production" + }; + exports2.commandNames = ["audit"]; + function help() { + return render_help_1.default({ + description: "Checks for known security issues with the installed packages.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "Add overrides to the package.json file in order to force non-vulnerable versions of the dependencies", + name: "--fix" + }, + { + description: "Output audit report in JSON format", + name: "--json" + }, + { + description: "Only print advisories with severity greater than or equal to one of the following: low|moderate|high|critical. Default: low", + name: "--audit-level " + }, + { + description: 'Only audit "devDependencies"', + name: "--dev", + shortAlias: "-D" + }, + { + description: 'Only audit "dependencies" and "optionalDependencies"', + name: "--prod", + shortAlias: "-P" + }, + { + description: `Don't audit "optionalDependencies"`, + name: "--no-optional" + }, + { + description: "Use exit code 0 if the registry responds with an error. Useful when audit checks are used in CI. A build should fail because the registry has issues.", + name: "--ignore-registry-errors" + } + ] + } + ], + url: cli_utils_1.docsUrl("audit"), + usages: ["pnpm audit [options]"] + }); + } + exports2.help = help; + async function handler(opts) { + var _a, _b; + const lockfile = await lockfile_file_1.readWantedLockfile((_a = opts.lockfileDir) !== null && _a !== void 0 ? _a : opts.dir, { ignoreIncompatible: true }); + if (lockfile == null) { + throw new error_1.default("AUDIT_NO_LOCKFILE", `No ${constants_1.WANTED_LOCKFILE} found: Cannot audit a project without a lockfile`); + } + const include = { + dependencies: opts.production !== false, + devDependencies: opts.dev !== false, + optionalDependencies: opts.optional !== false + }; + let auditReport; + try { + auditReport = await audit_1.default(lockfile, { + include, + registry: opts.registries.default, + retry: { + factor: opts.fetchRetryFactor, + maxTimeout: opts.fetchRetryMaxtimeout, + minTimeout: opts.fetchRetryMintimeout, + retries: opts.fetchRetries + }, + timeout: opts.fetchTimeout + }); + } catch (err) { + if (opts.ignoreRegistryErrors) { + return { + exitCode: 0, + output: err.message + }; + } + } + if (opts.fix) { + const newOverrides = await fix_1.default(opts.dir, auditReport); + if (Object.values(newOverrides).length === 0) { + return { + exitCode: 0, + output: "No fixes were made" + }; + } + return { + exitCode: 0, + output: `${Object.values(newOverrides).length} overrides were added to package.json to fix vulnerabilities. +Run "pnpm install" to apply the fixes. + +The added overrides: +${JSON.stringify(newOverrides, null, 2)}` + }; + } + const vulnerabilities = auditReport.metadata.vulnerabilities; + const totalVulnerabilityCount = Object.values(vulnerabilities).reduce((sum, vulnerabilitiesCount) => sum + vulnerabilitiesCount, 0); + if (opts.json) { + return { + exitCode: totalVulnerabilityCount > 0 ? 1 : 0, + output: JSON.stringify(auditReport, null, 2) + }; + } + let output = ""; + const auditLevel = AUDIT_LEVEL_NUMBER[(_b = opts.auditLevel) !== null && _b !== void 0 ? _b : "low"]; + const advisories = Object.values(auditReport.advisories).filter(({ severity }) => AUDIT_LEVEL_NUMBER[severity] >= auditLevel).sort((a1, a2) => AUDIT_LEVEL_NUMBER[a2.severity] - AUDIT_LEVEL_NUMBER[a1.severity]); + for (const advisory of advisories) { + output += table_1.table([ + [AUDIT_COLOR[advisory.severity](advisory.severity), chalk_1.default.bold(advisory.title)], + ["Package", advisory.module_name], + ["Vulnerable versions", advisory.vulnerable_versions], + ["Patched versions", advisory.patched_versions], + ["More info", advisory.url] + ], cli_utils_1.TABLE_OPTIONS); + } + return { + exitCode: output ? 1 : 0, + output: `${output}${reportSummary(auditReport.metadata.vulnerabilities, totalVulnerabilityCount)}` + }; + } + exports2.handler = handler; + function reportSummary(vulnerabilities, totalVulnerabilityCount) { + if (totalVulnerabilityCount === 0) + return "No known vulnerabilities found\n"; + return `${chalk_1.default.red(totalVulnerabilityCount)} vulnerabilities found +Severity: ${Object.entries(vulnerabilities).filter(([auditLevel, vulnerabilitiesCount]) => vulnerabilitiesCount > 0).map(([auditLevel, vulnerabilitiesCount]) => AUDIT_COLOR[auditLevel](`${vulnerabilitiesCount} ${auditLevel}`)).join(" | ")}`; + } + } +}); + +// ../plugin-commands-audit/lib/index.js +var require_lib58 = __commonJS({ + "../plugin-commands-audit/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.audit = void 0; + var audit = __importStar2(require_audit2()); + exports2.audit = audit; + } +}); + +// ../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/lib/rng.js +var require_rng = __commonJS({ + "../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/lib/rng.js"(exports2, module2) { + var crypto = require("crypto"); + module2.exports = function nodeRNG() { + return crypto.randomBytes(16); + }; + } +}); + +// ../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/lib/bytesToUuid.js +var require_bytesToUuid = __commonJS({ + "../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/lib/bytesToUuid.js"(exports2, module2) { + var byteToHex = []; + for (i = 0; i < 256; ++i) { + byteToHex[i] = (i + 256).toString(16).substr(1); + } + var i; + function bytesToUuid(buf, offset) { + var i2 = offset || 0; + var bth = byteToHex; + return [ + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + "-", + bth[buf[i2++]], + bth[buf[i2++]], + "-", + bth[buf[i2++]], + bth[buf[i2++]], + "-", + bth[buf[i2++]], + bth[buf[i2++]], + "-", + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]] + ].join(""); + } + module2.exports = bytesToUuid; + } +}); + +// ../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/v1.js +var require_v1 = __commonJS({ + "../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/v1.js"(exports2, module2) { + var rng = require_rng(); + var bytesToUuid = require_bytesToUuid(); + var _nodeId; + var _clockseq; + var _lastMSecs = 0; + var _lastNSecs = 0; + function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + options = options || {}; + var node = options.node || _nodeId; + var clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq; + if (node == null || clockseq == null) { + var seedBytes = rng(); + if (node == null) { + node = _nodeId = [ + seedBytes[0] | 1, + seedBytes[1], + seedBytes[2], + seedBytes[3], + seedBytes[4], + seedBytes[5] + ]; + } + if (clockseq == null) { + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383; + } + } + var msecs = options.msecs !== void 0 ? options.msecs : new Date().getTime(); + var nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1; + var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4; + if (dt < 0 && options.clockseq === void 0) { + clockseq = clockseq + 1 & 16383; + } + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) { + nsecs = 0; + } + if (nsecs >= 1e4) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + msecs += 122192928e5; + var tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; + b[i++] = tl >>> 24 & 255; + b[i++] = tl >>> 16 & 255; + b[i++] = tl >>> 8 & 255; + b[i++] = tl & 255; + var tmh = msecs / 4294967296 * 1e4 & 268435455; + b[i++] = tmh >>> 8 & 255; + b[i++] = tmh & 255; + b[i++] = tmh >>> 24 & 15 | 16; + b[i++] = tmh >>> 16 & 255; + b[i++] = clockseq >>> 8 | 128; + b[i++] = clockseq & 255; + for (var n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + return buf ? buf : bytesToUuid(b); + } + module2.exports = v1; + } +}); + +// ../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/v4.js +var require_v4 = __commonJS({ + "../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/v4.js"(exports2, module2) { + var rng = require_rng(); + var bytesToUuid = require_bytesToUuid(); + function v4(options, buf, offset) { + var i = buf && offset || 0; + if (typeof options == "string") { + buf = options === "binary" ? new Array(16) : null; + options = null; + } + options = options || {}; + var rnds = options.random || (options.rng || rng)(); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + return buf || bytesToUuid(rnds); + } + module2.exports = v4; + } +}); + +// ../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/index.js +var require_uuid = __commonJS({ + "../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/index.js"(exports2, module2) { + var v1 = require_v1(); + var v4 = require_v4(); + var uuid = v4; + uuid.v1 = v1; + uuid.v4 = v4; + module2.exports = uuid; + } +}); + +// ../server/lib/connectStoreController.js +var require_connectStoreController = __commonJS({ + "../server/lib/connectStoreController.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fetch_1 = __importDefault(require_lib29()); + var p_limit_1 = __importDefault(require_p_limit()); + var promise_share_1 = __importDefault(require_promise_share()); + var uuid_1 = __importDefault(require_uuid()); + async function default_1(initOpts) { + var _a; + const remotePrefix = initOpts.remotePrefix; + const limitedFetch = limitFetch.bind(null, p_limit_1.default((_a = initOpts.concurrency) !== null && _a !== void 0 ? _a : 100)); + return new Promise((resolve, reject) => { + resolve({ + close: async () => { + }, + fetchPackage: fetchPackage.bind(null, remotePrefix, limitedFetch), + importPackage: async (to, opts) => { + return limitedFetch(`${remotePrefix}/importPackage`, { + opts, + to + }); + }, + prune: async () => { + await limitedFetch(`${remotePrefix}/prune`, {}); + }, + requestPackage: requestPackage.bind(null, remotePrefix, limitedFetch), + stop: async () => { + await limitedFetch(`${remotePrefix}/stop`, {}); + }, + upload: async (builtPkgLocation, opts) => { + await limitedFetch(`${remotePrefix}/upload`, { + builtPkgLocation, + opts + }); + } + }); + }); + } + exports2.default = default_1; + function limitFetch(limit, url, body) { + return limit(async () => { + if (url.startsWith("http://unix:")) { + url = url.replace("http://unix:", "unix:"); + } + const response = await fetch_1.default(url, { + body: JSON.stringify(body), + headers: { "Content-Type": "application/json" }, + method: "POST", + retry: { + retries: 100 + } + }); + if (!response.ok) { + throw await response.json(); + } + const json = await response.json(); + if (json.error) { + throw json.error; + } + return json; + }); + } + async function requestPackage(remotePrefix, limitedFetch, wantedDependency, options) { + const msgId = uuid_1.default.v4(); + return limitedFetch(`${remotePrefix}/requestPackage`, { + msgId, + options, + wantedDependency + }).then((packageResponseBody) => { + const fetchingBundledManifest = !packageResponseBody["fetchingBundledManifestInProgress"] ? void 0 : limitedFetch(`${remotePrefix}/rawManifestResponse`, { + msgId + }); + delete packageResponseBody["fetchingBundledManifestInProgress"]; + if (options.skipFetch) { + return { + body: packageResponseBody, + bundledManifest: fetchingBundledManifest && promise_share_1.default(fetchingBundledManifest) + }; + } + const fetchingFiles = limitedFetch(`${remotePrefix}/packageFilesResponse`, { + msgId + }); + return { + body: packageResponseBody, + bundledManifest: fetchingBundledManifest && promise_share_1.default(fetchingBundledManifest), + files: promise_share_1.default(fetchingFiles), + finishing: promise_share_1.default(Promise.all([fetchingBundledManifest, fetchingFiles]).then(() => void 0)) + }; + }); + } + function fetchPackage(remotePrefix, limitedFetch, options) { + const msgId = uuid_1.default.v4(); + return limitedFetch(`${remotePrefix}/fetchPackage`, { + msgId, + options + }).then((fetchResponseBody) => { + const fetchingBundledManifest = options.fetchRawManifest ? limitedFetch(`${remotePrefix}/rawManifestResponse`, { msgId }) : void 0; + const fetchingFiles = limitedFetch(`${remotePrefix}/packageFilesResponse`, { + msgId + }); + return { + bundledManifest: fetchingBundledManifest && promise_share_1.default(fetchingBundledManifest), + files: promise_share_1.default(fetchingFiles), + filesIndexFile: fetchResponseBody.filesIndexFile, + finishing: promise_share_1.default(Promise.all([fetchingBundledManifest, fetchingFiles]).then(() => void 0)), + inStoreLocation: fetchResponseBody.inStoreLocation + }; + }); + } + } +}); + +// ../server/lib/lock.js +var require_lock = __commonJS({ + "../server/lib/lock.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function lock() { + const locks = {}; + return async (key, fn2) => { + if (locks[key] != null) + return locks[key]; + locks[key] = fn2(); + fn2().then(() => delete locks[key], () => delete locks[key]); + return locks[key]; + }; + } + exports2.default = lock; + } +}); + +// ../server/lib/createServer.js +var require_createServer = __commonJS({ + "../server/lib/createServer.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var http_1 = __importDefault(require("http")); + var logger_1 = require_lib6(); + var lock_1 = __importDefault(require_lock()); + function default_1(store, opts) { + const rawManifestPromises = {}; + const filesPromises = {}; + const lock = lock_1.default(); + const server = http_1.default.createServer(async (req, res) => { + var _a; + if (req.method !== "POST") { + res.statusCode = 405; + const responseError = { error: `Only POST is allowed, received ${(_a = req.method) !== null && _a !== void 0 ? _a : "unknown"}` }; + res.setHeader("Allow", "POST"); + res.end(JSON.stringify(responseError)); + return; + } + const bodyPromise = new Promise((resolve, reject) => { + let body = ""; + req.on("data", (data) => { + body += data; + }); + req.on("end", async () => { + try { + if (body.length > 0) { + body = JSON.parse(body); + } else { + body = {}; + } + resolve(body); + } catch (e) { + reject(e); + } + }); + }); + try { + let body; + switch (req.url) { + case "/requestPackage": { + try { + body = await bodyPromise; + const pkgResponse = await store.requestPackage(body.wantedDependency, body.options); + if (pkgResponse["bundledManifest"]) { + rawManifestPromises[body.msgId] = pkgResponse["bundledManifest"]; + pkgResponse.body["fetchingBundledManifestInProgress"] = true; + } + if (pkgResponse["files"]) { + filesPromises[body.msgId] = pkgResponse["files"]; + } + res.end(JSON.stringify(pkgResponse.body)); + } catch (err) { + res.end(JSON.stringify({ + error: { + message: err.message, + ...JSON.parse(JSON.stringify(err)) + } + })); + } + break; + } + case "/fetchPackage": { + try { + body = await bodyPromise; + const pkgResponse = store.fetchPackage(body.options); + if (pkgResponse["bundledManifest"]) { + rawManifestPromises[body.msgId] = pkgResponse["bundledManifest"]; + } + if (pkgResponse["files"]) { + filesPromises[body.msgId] = pkgResponse["files"]; + } + res.end(JSON.stringify({ filesIndexFile: pkgResponse.filesIndexFile })); + } catch (err) { + res.end(JSON.stringify({ + error: { + message: err.message, + ...JSON.parse(JSON.stringify(err)) + } + })); + } + break; + } + case "/packageFilesResponse": { + body = await bodyPromise; + const filesResponse = await filesPromises[body.msgId](); + delete filesPromises[body.msgId]; + res.end(JSON.stringify(filesResponse)); + break; + } + case "/rawManifestResponse": { + body = await bodyPromise; + const manifestResponse = await rawManifestPromises[body.msgId](); + delete rawManifestPromises[body.msgId]; + res.end(JSON.stringify(manifestResponse)); + break; + } + case "/prune": + res.statusCode = 403; + res.end(); + break; + case "/importPackage": { + const importPackageBody = await bodyPromise; + await store.importPackage(importPackageBody.to, importPackageBody.opts); + res.end(JSON.stringify("OK")); + break; + } + case "/upload": { + if (opts.ignoreUploadRequests) { + res.statusCode = 403; + res.end(); + break; + } + const uploadBody = await bodyPromise; + await lock(uploadBody.builtPkgLocation, async () => store.upload(uploadBody.builtPkgLocation, uploadBody.opts)); + res.end(JSON.stringify("OK")); + break; + } + case "/stop": + if (opts.ignoreStopRequests) { + res.statusCode = 403; + res.end(); + break; + } + logger_1.globalInfo("Got request to stop the server"); + await close(); + res.end(JSON.stringify("OK")); + logger_1.globalInfo("Server stopped"); + break; + default: { + res.statusCode = 404; + const error = { error: `${req.url} does not match any route` }; + res.end(JSON.stringify(error)); + } + } + } catch (e) { + res.statusCode = 503; + const jsonErr = JSON.parse(JSON.stringify(e)); + jsonErr.message = e.message; + res.end(JSON.stringify(jsonErr)); + } + }); + let listener; + if (opts.path) { + listener = server.listen(opts.path); + } else { + listener = server.listen(opts.port, opts.hostname); + } + return { close }; + async function close() { + listener.close(); + return store.close(); + } + } + exports2.default = default_1; + } +}); + +// ../server/lib/index.js +var require_lib59 = __commonJS({ + "../server/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.connectStoreController = exports2.createServer = void 0; + var connectStoreController_1 = __importDefault(require_connectStoreController()); + exports2.connectStoreController = connectStoreController_1.default; + var createServer_1 = __importDefault(require_createServer()); + exports2.createServer = createServer_1.default; + } +}); + +// ../../node_modules/.pnpm/delay@5.0.0/node_modules/delay/index.js +var require_delay2 = __commonJS({ + "../../node_modules/.pnpm/delay@5.0.0/node_modules/delay/index.js"(exports2, module2) { + "use strict"; + var randomInteger = (minimum, maximum) => Math.floor(Math.random() * (maximum - minimum + 1) + minimum); + var createAbortError = () => { + const error = new Error("Delay aborted"); + error.name = "AbortError"; + return error; + }; + var createDelay = ({ clearTimeout: defaultClear, setTimeout: set, willResolve }) => (ms, { value, signal } = {}) => { + if (signal && signal.aborted) { + return Promise.reject(createAbortError()); + } + let timeoutId; + let settle; + let rejectFn; + const clear = defaultClear || clearTimeout; + const signalListener = () => { + clear(timeoutId); + rejectFn(createAbortError()); + }; + const cleanup = () => { + if (signal) { + signal.removeEventListener("abort", signalListener); + } + }; + const delayPromise = new Promise((resolve, reject) => { + settle = () => { + cleanup(); + if (willResolve) { + resolve(value); + } else { + reject(value); + } + }; + rejectFn = reject; + timeoutId = (set || setTimeout)(settle, ms); + }); + if (signal) { + signal.addEventListener("abort", signalListener, { once: true }); + } + delayPromise.clear = () => { + clear(timeoutId); + timeoutId = null; + settle(); + }; + return delayPromise; + }; + var createWithTimers = (clearAndSet) => { + const delay2 = createDelay({ ...clearAndSet, willResolve: true }); + delay2.reject = createDelay({ ...clearAndSet, willResolve: false }); + delay2.range = (minimum, maximum, options) => delay2(randomInteger(minimum, maximum), options); + return delay2; + }; + var delay = createWithTimers(); + delay.createWithTimers = createWithTimers; + module2.exports = delay; + module2.exports.default = delay; + } +}); + +// ../store-connection-manager/lib/createNewStoreController.js +var require_createNewStoreController = __commonJS({ + "../store-connection-manager/lib/createNewStoreController.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var client_1 = __importDefault(require_lib49()); + var package_store_1 = __importDefault(require_lib37()); + var cli_meta_1 = __importDefault(require_lib4()); + exports2.default = async (opts) => { + var _a; + const { resolve, fetchers } = client_1.default({ + authConfig: opts.rawConfig, + ca: opts.ca, + cacheDir: opts.cacheDir, + cert: opts.cert, + fullMetadata: false, + httpProxy: opts.httpProxy, + httpsProxy: opts.httpsProxy, + key: opts.key, + localAddress: opts.localAddress, + noProxy: opts.noProxy, + offline: opts.offline, + preferOffline: opts.preferOffline, + retry: { + factor: opts.fetchRetryFactor, + maxTimeout: opts.fetchRetryMaxtimeout, + minTimeout: opts.fetchRetryMintimeout, + retries: opts.fetchRetries + }, + strictSsl: (_a = opts.strictSsl) !== null && _a !== void 0 ? _a : true, + timeout: opts.fetchTimeout, + userAgent: opts.userAgent, + maxSockets: opts.networkConcurrency != null ? opts.networkConcurrency * 3 : void 0 + }); + await fs_1.promises.mkdir(opts.storeDir, { recursive: true }); + return { + ctrl: await package_store_1.default(resolve, fetchers, { + engineStrict: opts.engineStrict, + force: opts.force, + nodeVersion: opts.nodeVersion, + pnpmVersion: cli_meta_1.default.version, + ignoreFile: opts.ignoreFile, + networkConcurrency: opts.networkConcurrency, + packageImportMethod: opts.packageImportMethod, + storeDir: opts.storeDir, + verifyStoreIntegrity: typeof opts.verifyStoreIntegrity === "boolean" ? opts.verifyStoreIntegrity : true + }), + dir: opts.storeDir + }; + }; + } +}); + +// ../../node_modules/.pnpm/proc-output@1.0.8/node_modules/proc-output/lib/index.js +var require_lib60 = __commonJS({ + "../../node_modules/.pnpm/proc-output@1.0.8/node_modules/proc-output/lib/index.js"(exports2, module2) { + "use strict"; + module2.exports = function procOutput(proc, cb) { + var stdout = "", stderr = ""; + proc.on("error", function(err) { + cb(err); + }); + proc.stdout.on("data", function(chunk) { + return stdout += chunk; + }); + proc.stderr.on("data", function(chunk) { + return stderr += chunk; + }); + proc.on("close", function(code) { + return cb(null, stdout, stderr, code); + }); + return proc; + }; + } +}); + +// ../../node_modules/.pnpm/spawno@2.1.1/node_modules/spawno/lib/index.js +var require_lib61 = __commonJS({ + "../../node_modules/.pnpm/spawno@2.1.1/node_modules/spawno/lib/index.js"(exports2, module2) { + "use strict"; + var spawn = require("child_process").spawn; + var procOutput = require_lib60(); + module2.exports = function spawno(command, args2, options, cb) { + if (typeof args2 === "function") { + cb = args2; + args2 = []; + options = {}; + } + if (typeof options === "function") { + cb = options; + if (!Array.isArray(args2)) { + options = args2; + args2 = []; + } else { + options = {}; + } + } + options = options || {}; + if (options.input !== false) { + options.input = options.input || ""; + } + var showOutput = options.output, inputData = options.input; + delete options.output; + delete options.input; + var proc = spawn(command, args2, options); + if (showOutput) { + proc.stdout.pipe(process.stdout); + proc.stderr.pipe(process.stderr); + } + if (inputData !== false) { + proc.stdin && proc.stdin.end(inputData); + } + if (cb) { + procOutput(proc, cb); + } + return proc; + }; + module2.exports.promise = function(command, args2, options) { + return new Promise(function(resolve, reject) { + module2.exports(command, args2, options, function(err, stdout, stderr, code) { + if (err) { + return reject(err); + } + resolve({ + code, + stdout, + stderr + }); + }); + }); + }; + } +}); + +// ../../node_modules/.pnpm/@zkochan+diable@1.0.2/node_modules/@zkochan/diable/lib/index.js +var require_lib62 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+diable@1.0.2/node_modules/@zkochan/diable/lib/index.js"(exports2, module2) { + "use strict"; + var spawn = require_lib61(); + function Diable(opts) { + if (Diable.isDaemon()) { + return false; + } + opts = opts || {}; + const args2 = [].concat(process.argv); + args2.shift(); + const script = args2.shift(), env = opts.env || process.env; + Diable.daemonize(script, args2, opts); + return process.exit(); + } + Diable.isDaemon = function() { + return !!process.env.__is_daemon; + }; + Diable.daemonize = function(script, args2, opts) { + opts = opts || {}; + const stdout = opts.stdout || "ignore", stderr = opts.stderr || "ignore", env = opts.env || process.env, cwd = opts.cwd || process.cwd(); + env.__is_daemon = true; + const spawnOptions = { + stdio: ["inherit", stdout, stderr], + env, + cwd, + detached: true, + input: false + }; + const cmd = opts.command || process.execPath; + delete opts.command; + const child = spawn(cmd, [script].concat(args2).filter(Boolean), spawnOptions); + child.unref(); + return child; + }; + module2.exports = Diable; + } +}); + +// ../store-connection-manager/lib/runServerInBackground.js +var require_runServerInBackground = __commonJS({ + "../store-connection-manager/lib/runServerInBackground.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var diable_1 = __importDefault(require_lib62()); + exports2.default = (storePath) => { + if (require.main == null) { + throw new error_1.default("CANNOT_START_SERVER", "pnpm server cannot be started when pnpm is streamed to Node.js"); + } + return diable_1.default.daemonize(require.main.filename, ["server", "start", "--store-dir", storePath], { stdio: "inherit" }); + }; + } +}); + +// ../store-connection-manager/lib/serverConnectionInfoDir.js +var require_serverConnectionInfoDir = __commonJS({ + "../store-connection-manager/lib/serverConnectionInfoDir.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + exports2.default = (storePath) => path_1.default.join(storePath, "server"); + } +}); + +// ../store-connection-manager/lib/index.js +var require_lib63 = __commonJS({ + "../store-connection-manager/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tryLoadServerJson = exports2.createOrConnectStoreController = exports2.createOrConnectStoreControllerCached = exports2.serverConnectionInfoDir = exports2.createNewStoreController = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var cli_meta_1 = __importDefault(require_lib4()); + var error_1 = __importDefault(require_lib8()); + var logger_1 = __importDefault(require_lib6()); + var server_1 = require_lib59(); + var store_path_1 = __importDefault(require_lib38()); + var delay_1 = __importDefault(require_delay2()); + var createNewStoreController_1 = __importDefault(require_createNewStoreController()); + exports2.createNewStoreController = createNewStoreController_1.default; + var runServerInBackground_1 = __importDefault(require_runServerInBackground()); + var serverConnectionInfoDir_1 = __importDefault(require_serverConnectionInfoDir()); + exports2.serverConnectionInfoDir = serverConnectionInfoDir_1.default; + async function createOrConnectStoreControllerCached(storeControllerCache, opts) { + const storeDir = await store_path_1.default(opts.dir, opts.storeDir); + if (!storeControllerCache.has(storeDir)) { + storeControllerCache.set(storeDir, createOrConnectStoreController(opts)); + } + return await storeControllerCache.get(storeDir); + } + exports2.createOrConnectStoreControllerCached = createOrConnectStoreControllerCached; + async function createOrConnectStoreController(opts) { + const storeDir = await store_path_1.default(opts.dir, opts.storeDir); + const connectionInfoDir = serverConnectionInfoDir_1.default(storeDir); + const serverJsonPath = path_1.default.join(connectionInfoDir, "server.json"); + let serverJson = await tryLoadServerJson({ serverJsonPath, shouldRetryOnNoent: false }); + if (serverJson !== null) { + if (serverJson.pnpmVersion !== cli_meta_1.default.version) { + logger_1.default.warn({ + message: `The store server runs on pnpm v${serverJson.pnpmVersion}. It is recommended to connect with the same version (current is v${cli_meta_1.default.version})`, + prefix: opts.dir + }); + } + logger_1.default.info({ + message: "A store server is running. All store manipulations are delegated to it.", + prefix: opts.dir + }); + return { + ctrl: await server_1.connectStoreController(serverJson.connectionOptions), + dir: storeDir + }; + } + if (opts.useRunningStoreServer) { + throw new error_1.default("NO_STORE_SERVER", "No store server is running."); + } + if (opts.useStoreServer) { + runServerInBackground_1.default(storeDir); + serverJson = await tryLoadServerJson({ serverJsonPath, shouldRetryOnNoent: true }); + logger_1.default.info({ + message: "A store server has been started. To stop it, use `pnpm server stop`", + prefix: opts.dir + }); + return { + ctrl: await server_1.connectStoreController(serverJson.connectionOptions), + dir: storeDir + }; + } + return createNewStoreController_1.default(Object.assign(opts, { + storeDir + })); + } + exports2.createOrConnectStoreController = createOrConnectStoreController; + async function tryLoadServerJson(options) { + let beforeFirstAttempt = true; + const startHRTime = process.hrtime(); + while (true) { + if (!beforeFirstAttempt) { + const elapsedHRTime = process.hrtime(startHRTime); + if (elapsedHRTime[0] >= 10) { + try { + await fs_1.promises.unlink(options.serverJsonPath); + } catch (error) { + if (error.code !== "ENOENT") { + throw error; + } + } + return null; + } + await delay_1.default(200); + } + beforeFirstAttempt = false; + let serverJsonStr; + try { + serverJsonStr = await fs_1.promises.readFile(options.serverJsonPath, "utf8"); + } catch (error) { + if (error.code !== "ENOENT") { + throw error; + } + if (!options.shouldRetryOnNoent) { + return null; + } + continue; + } + let serverJson; + try { + serverJson = JSON.parse(serverJsonStr); + } catch (error) { + continue; + } + if (serverJson === null) { + throw new Error("server.json was modified by a third party"); + } + return serverJson; + } + } + exports2.tryLoadServerJson = tryLoadServerJson; + } +}); + +// ../modules-yaml/lib/index.js +var require_lib64 = __commonJS({ + "../modules-yaml/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.write = exports2.read = void 0; + var path_1 = __importDefault(require("path")); + var read_yaml_file_1 = __importDefault(require_read_yaml_file()); + var is_windows_1 = __importDefault(require_is_windows()); + var write_yaml_file_1 = __importDefault(require_write_yaml_file()); + var MODULES_FILENAME = ".modules.yaml"; + async function read(modulesDir) { + const modulesYamlPath = path_1.default.join(modulesDir, MODULES_FILENAME); + let modules; + try { + modules = await read_yaml_file_1.default(modulesYamlPath); + } catch (err) { + if (err.code !== "ENOENT") { + throw err; + } + return null; + } + if (!modules.virtualStoreDir) { + modules.virtualStoreDir = path_1.default.join(modulesDir, ".pnpm"); + } else if (!path_1.default.isAbsolute(modules.virtualStoreDir)) { + modules.virtualStoreDir = path_1.default.join(modulesDir, modules.virtualStoreDir); + } + switch (modules.shamefullyHoist) { + case true: + if (modules.publicHoistPattern == null) { + modules.publicHoistPattern = ["*"]; + } + if (modules.hoistedAliases != null && !modules.hoistedDependencies) { + modules.hoistedDependencies = {}; + for (const depPath of Object.keys(modules.hoistedAliases)) { + modules.hoistedDependencies[depPath] = {}; + for (const alias of modules.hoistedAliases[depPath]) { + modules.hoistedDependencies[depPath][alias] = "public"; + } + } + } + break; + case false: + if (modules.publicHoistPattern == null) { + modules.publicHoistPattern = []; + } + if (modules.hoistedAliases != null && !modules.hoistedDependencies) { + modules.hoistedDependencies = {}; + for (const depPath of Object.keys(modules.hoistedAliases)) { + modules.hoistedDependencies[depPath] = {}; + for (const alias of modules.hoistedAliases[depPath]) { + modules.hoistedDependencies[depPath][alias] = "private"; + } + } + } + break; + } + if (!modules.prunedAt) { + modules.prunedAt = new Date().toUTCString(); + } + return modules; + } + exports2.read = read; + var YAML_OPTS = { + noCompatMode: true, + noRefs: true, + sortKeys: true + }; + async function write(modulesDir, modules) { + const modulesYamlPath = path_1.default.join(modulesDir, MODULES_FILENAME); + const saveModules = { ...modules }; + if (saveModules.skipped) + saveModules.skipped.sort(); + if (saveModules.hoistPattern == null || saveModules.hoistPattern === "") { + delete saveModules.hoistPattern; + } + if (saveModules.publicHoistPattern == null) { + delete saveModules.publicHoistPattern; + } + if (saveModules.hoistedAliases == null || saveModules.hoistPattern == null && saveModules.publicHoistPattern == null) { + delete saveModules.hoistedAliases; + } + if (!is_windows_1.default()) { + saveModules.virtualStoreDir = path_1.default.relative(modulesDir, saveModules.virtualStoreDir); + } + return write_yaml_file_1.default(modulesYamlPath, saveModules, YAML_OPTS); + } + exports2.write = write; + } +}); + +// ../normalize-registries/lib/index.js +var require_lib65 = __commonJS({ + "../normalize-registries/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_REGISTRIES = void 0; + var normalize_registry_url_1 = __importDefault(require_normalize_registry_url()); + exports2.DEFAULT_REGISTRIES = { + default: "https://registry.npmjs.org/" + }; + function normalizeRegistries(registries) { + if (registries == null) + return exports2.DEFAULT_REGISTRIES; + const normalizeRegistries2 = {}; + for (const scope of Object.keys(registries)) { + normalizeRegistries2[scope] = normalize_registry_url_1.default(registries[scope]); + } + return { + ...exports2.DEFAULT_REGISTRIES, + ...normalizeRegistries2 + }; + } + exports2.default = normalizeRegistries; + } +}); + +// ../read-projects-context/lib/index.js +var require_lib66 = __commonJS({ + "../read-projects-context/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var lockfile_file_1 = require_lib57(); + var modules_yaml_1 = require_lib64(); + var normalize_registries_1 = __importDefault(require_lib65()); + var realpath_missing_1 = __importDefault(require_realpath_missing()); + async function default_1(projects, opts) { + var _a, _b, _c, _d, _e; + const relativeModulesDir = (_a = opts.modulesDir) !== null && _a !== void 0 ? _a : "node_modules"; + const rootModulesDir = await realpath_missing_1.default(path_1.default.join(opts.lockfileDir, relativeModulesDir)); + const modules = await modules_yaml_1.read(rootModulesDir); + return { + currentHoistPattern: modules === null || modules === void 0 ? void 0 : modules.hoistPattern, + currentPublicHoistPattern: modules === null || modules === void 0 ? void 0 : modules.publicHoistPattern, + hoist: modules == null ? void 0 : Boolean(modules.hoistPattern), + hoistedDependencies: (_b = modules === null || modules === void 0 ? void 0 : modules.hoistedDependencies) !== null && _b !== void 0 ? _b : {}, + include: (_c = modules === null || modules === void 0 ? void 0 : modules.included) !== null && _c !== void 0 ? _c : { dependencies: true, devDependencies: true, optionalDependencies: true }, + modules, + pendingBuilds: (_d = modules === null || modules === void 0 ? void 0 : modules.pendingBuilds) !== null && _d !== void 0 ? _d : [], + projects: await Promise.all(projects.map(async (project) => { + var _a2, _b2; + const modulesDir = await realpath_missing_1.default(path_1.default.join(project.rootDir, (_a2 = project.modulesDir) !== null && _a2 !== void 0 ? _a2 : relativeModulesDir)); + const importerId = lockfile_file_1.getLockfileImporterId(opts.lockfileDir, project.rootDir); + return { + ...project, + binsDir: (_b2 = project.binsDir) !== null && _b2 !== void 0 ? _b2 : path_1.default.join(project.rootDir, relativeModulesDir, ".bin"), + id: importerId, + modulesDir + }; + })), + registries: (modules === null || modules === void 0 ? void 0 : modules.registries) != null ? normalize_registries_1.default(modules.registries) : void 0, + rootModulesDir, + skipped: new Set((_e = modules === null || modules === void 0 ? void 0 : modules.skipped) !== null && _e !== void 0 ? _e : []) + }; + } + exports2.default = default_1; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_cloneRegExp.js +var require_cloneRegExp2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_cloneRegExp.js"(exports2, module2) { + function _cloneRegExp(pattern) { + return new RegExp(pattern.source, (pattern.global ? "g" : "") + (pattern.ignoreCase ? "i" : "") + (pattern.multiline ? "m" : "") + (pattern.sticky ? "y" : "") + (pattern.unicode ? "u" : "")); + } + module2.exports = _cloneRegExp; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_clone.js +var require_clone2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_clone.js"(exports2, module2) { + var _cloneRegExp = require_cloneRegExp2(); + var type = require_type(); + function _clone(value, refFrom, refTo, deep) { + var copy = function copy2(copiedValue) { + var len = refFrom.length; + var idx = 0; + while (idx < len) { + if (value === refFrom[idx]) { + return refTo[idx]; + } + idx += 1; + } + refFrom[idx + 1] = value; + refTo[idx + 1] = copiedValue; + for (var key in value) { + copiedValue[key] = deep ? _clone(value[key], refFrom, refTo, true) : value[key]; + } + return copiedValue; + }; + switch (type(value)) { + case "Object": + return copy({}); + case "Array": + return copy([]); + case "Date": + return new Date(value.valueOf()); + case "RegExp": + return _cloneRegExp(value); + default: + return value; + } + } + module2.exports = _clone; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/clone.js +var require_clone3 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/clone.js"(exports2, module2) { + var _clone = require_clone2(); + var _curry1 = require_curry1(); + var clone = /* @__PURE__ */ _curry1(function clone2(value) { + return value != null && typeof value.clone === "function" ? value.clone() : _clone(value, [], [], true); + }); + module2.exports = clone; + } +}); + +// ../get-context/lib/checkCompatibility/BreakingChangeError.js +var require_BreakingChangeError = __commonJS({ + "../get-context/lib/checkCompatibility/BreakingChangeError.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var BreakingChangeError = class extends error_1.default { + constructor(opts) { + super(opts.code, opts.message); + this.relatedIssue = opts.relatedIssue; + this.relatedPR = opts.relatedPR; + this.additionalInformation = opts.additionalInformation; + } + }; + exports2.default = BreakingChangeError; + } +}); + +// ../get-context/lib/checkCompatibility/ModulesBreakingChangeError.js +var require_ModulesBreakingChangeError = __commonJS({ + "../get-context/lib/checkCompatibility/ModulesBreakingChangeError.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var BreakingChangeError_1 = __importDefault(require_BreakingChangeError()); + var ModulesBreakingChangeError = class extends BreakingChangeError_1.default { + constructor(opts) { + super({ + additionalInformation: opts.additionalInformation, + code: "MODULES_BREAKING_CHANGE", + message: `The node_modules structure at "${opts.modulesPath}" is not compatible with the current pnpm version. Run "pnpm install --force" to recreate node_modules.`, + relatedIssue: opts.relatedIssue, + relatedPR: opts.relatedPR + }); + this.modulesPath = opts.modulesPath; + } + }; + exports2.default = ModulesBreakingChangeError; + } +}); + +// ../get-context/lib/checkCompatibility/UnexpectedStoreError.js +var require_UnexpectedStoreError = __commonJS({ + "../get-context/lib/checkCompatibility/UnexpectedStoreError.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var UnexpectedStoreError = class extends error_1.default { + constructor(opts) { + super("UNEXPECTED_STORE", "Unexpected store location"); + this.expectedStorePath = opts.expectedStorePath; + this.actualStorePath = opts.actualStorePath; + this.modulesDir = opts.modulesDir; + } + }; + exports2.default = UnexpectedStoreError; + } +}); + +// ../get-context/lib/checkCompatibility/UnexpectedVirtualStoreDirError.js +var require_UnexpectedVirtualStoreDirError = __commonJS({ + "../get-context/lib/checkCompatibility/UnexpectedVirtualStoreDirError.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var UnexpectedVirtualStoreDirError = class extends error_1.default { + constructor(opts) { + super("UNEXPECTED_VIRTUAL_STORE", "Unexpected virtual store location"); + this.expected = opts.expected; + this.actual = opts.actual; + this.modulesDir = opts.modulesDir; + } + }; + exports2.default = UnexpectedVirtualStoreDirError; + } +}); + +// ../get-context/lib/checkCompatibility/index.js +var require_checkCompatibility = __commonJS({ + "../get-context/lib/checkCompatibility/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var constants_1 = require_lib7(); + var ModulesBreakingChangeError_1 = __importDefault(require_ModulesBreakingChangeError()); + var UnexpectedStoreError_1 = __importDefault(require_UnexpectedStoreError()); + var UnexpectedVirtualStoreDirError_1 = __importDefault(require_UnexpectedVirtualStoreDirError()); + function checkCompatibility(modules, opts) { + if (!modules.layoutVersion || modules.layoutVersion !== constants_1.LAYOUT_VERSION) { + throw new ModulesBreakingChangeError_1.default({ + modulesPath: opts.modulesDir + }); + } + if (!modules.storeDir || path_1.default.relative(modules.storeDir, opts.storeDir) !== "") { + throw new UnexpectedStoreError_1.default({ + actualStorePath: opts.storeDir, + expectedStorePath: modules.storeDir, + modulesDir: opts.modulesDir + }); + } + if (modules.virtualStoreDir && path_1.default.relative(modules.virtualStoreDir, opts.virtualStoreDir) !== "") { + throw new UnexpectedVirtualStoreDirError_1.default({ + actual: opts.virtualStoreDir, + expected: modules.virtualStoreDir, + modulesDir: opts.modulesDir + }); + } + } + exports2.default = checkCompatibility; + } +}); + +// ../../node_modules/.pnpm/ci-info@3.2.0/node_modules/ci-info/vendors.json +var require_vendors = __commonJS({ + "../../node_modules/.pnpm/ci-info@3.2.0/node_modules/ci-info/vendors.json"(exports2, module2) { + module2.exports = [ + { + name: "AppVeyor", + constant: "APPVEYOR", + env: "APPVEYOR", + pr: "APPVEYOR_PULL_REQUEST_NUMBER" + }, + { + name: "Azure Pipelines", + constant: "AZURE_PIPELINES", + env: "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI", + pr: "SYSTEM_PULLREQUEST_PULLREQUESTID" + }, + { + name: "Appcircle", + constant: "APPCIRCLE", + env: "AC_APPCIRCLE" + }, + { + name: "Bamboo", + constant: "BAMBOO", + env: "bamboo_planKey" + }, + { + name: "Bitbucket Pipelines", + constant: "BITBUCKET", + env: "BITBUCKET_COMMIT", + pr: "BITBUCKET_PR_ID" + }, + { + name: "Bitrise", + constant: "BITRISE", + env: "BITRISE_IO", + pr: "BITRISE_PULL_REQUEST" + }, + { + name: "Buddy", + constant: "BUDDY", + env: "BUDDY_WORKSPACE_ID", + pr: "BUDDY_EXECUTION_PULL_REQUEST_ID" + }, + { + name: "Buildkite", + constant: "BUILDKITE", + env: "BUILDKITE", + pr: { env: "BUILDKITE_PULL_REQUEST", ne: "false" } + }, + { + name: "CircleCI", + constant: "CIRCLE", + env: "CIRCLECI", + pr: "CIRCLE_PULL_REQUEST" + }, + { + name: "Cirrus CI", + constant: "CIRRUS", + env: "CIRRUS_CI", + pr: "CIRRUS_PR" + }, + { + name: "AWS CodeBuild", + constant: "CODEBUILD", + env: "CODEBUILD_BUILD_ARN" + }, + { + name: "Codefresh", + constant: "CODEFRESH", + env: "CF_BUILD_ID", + pr: { any: ["CF_PULL_REQUEST_NUMBER", "CF_PULL_REQUEST_ID"] } + }, + { + name: "Codeship", + constant: "CODESHIP", + env: { CI_NAME: "codeship" } + }, + { + name: "Drone", + constant: "DRONE", + env: "DRONE", + pr: { DRONE_BUILD_EVENT: "pull_request" } + }, + { + name: "dsari", + constant: "DSARI", + env: "DSARI" + }, + { + name: "GitHub Actions", + constant: "GITHUB_ACTIONS", + env: "GITHUB_ACTIONS", + pr: { GITHUB_EVENT_NAME: "pull_request" } + }, + { + name: "GitLab CI", + constant: "GITLAB", + env: "GITLAB_CI", + pr: "CI_MERGE_REQUEST_ID" + }, + { + name: "GoCD", + constant: "GOCD", + env: "GO_PIPELINE_LABEL" + }, + { + name: "LayerCI", + constant: "LAYERCI", + env: "LAYERCI", + pr: "LAYERCI_PULL_REQUEST" + }, + { + name: "Hudson", + constant: "HUDSON", + env: "HUDSON_URL" + }, + { + name: "Jenkins", + constant: "JENKINS", + env: ["JENKINS_URL", "BUILD_ID"], + pr: { any: ["ghprbPullId", "CHANGE_ID"] } + }, + { + name: "Magnum CI", + constant: "MAGNUM", + env: "MAGNUM" + }, + { + name: "Netlify CI", + constant: "NETLIFY", + env: "NETLIFY", + pr: { env: "PULL_REQUEST", ne: "false" } + }, + { + name: "Nevercode", + constant: "NEVERCODE", + env: "NEVERCODE", + pr: { env: "NEVERCODE_PULL_REQUEST", ne: "false" } + }, + { + name: "Render", + constant: "RENDER", + env: "RENDER", + pr: { IS_PULL_REQUEST: "true" } + }, + { + name: "Sail CI", + constant: "SAIL", + env: "SAILCI", + pr: "SAIL_PULL_REQUEST_NUMBER" + }, + { + name: "Semaphore", + constant: "SEMAPHORE", + env: "SEMAPHORE", + pr: "PULL_REQUEST_NUMBER" + }, + { + name: "Screwdriver", + constant: "SCREWDRIVER", + env: "SCREWDRIVER", + pr: { env: "SD_PULL_REQUEST", ne: "false" } + }, + { + name: "Shippable", + constant: "SHIPPABLE", + env: "SHIPPABLE", + pr: { IS_PULL_REQUEST: "true" } + }, + { + name: "Solano CI", + constant: "SOLANO", + env: "TDDIUM", + pr: "TDDIUM_PR_ID" + }, + { + name: "Strider CD", + constant: "STRIDER", + env: "STRIDER" + }, + { + name: "TaskCluster", + constant: "TASKCLUSTER", + env: ["TASK_ID", "RUN_ID"] + }, + { + name: "TeamCity", + constant: "TEAMCITY", + env: "TEAMCITY_VERSION" + }, + { + name: "Travis CI", + constant: "TRAVIS", + env: "TRAVIS", + pr: { env: "TRAVIS_PULL_REQUEST", ne: "false" } + }, + { + name: "Vercel", + constant: "VERCEL", + env: "NOW_BUILDER" + }, + { + name: "Visual Studio App Center", + constant: "APPCENTER", + env: "APPCENTER_BUILD_ID" + } + ]; + } +}); + +// ../../node_modules/.pnpm/ci-info@3.2.0/node_modules/ci-info/index.js +var require_ci_info = __commonJS({ + "../../node_modules/.pnpm/ci-info@3.2.0/node_modules/ci-info/index.js"(exports2) { + "use strict"; + var vendors = require_vendors(); + var env = process.env; + Object.defineProperty(exports2, "_vendors", { + value: vendors.map(function(v) { + return v.constant; + }) + }); + exports2.name = null; + exports2.isPR = null; + vendors.forEach(function(vendor) { + const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env]; + const isCI = envs.every(function(obj) { + return checkEnv(obj); + }); + exports2[vendor.constant] = isCI; + if (isCI) { + exports2.name = vendor.name; + switch (typeof vendor.pr) { + case "string": + exports2.isPR = !!env[vendor.pr]; + break; + case "object": + if ("env" in vendor.pr) { + exports2.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne; + } else if ("any" in vendor.pr) { + exports2.isPR = vendor.pr.any.some(function(key) { + return !!env[key]; + }); + } else { + exports2.isPR = checkEnv(vendor.pr); + } + break; + default: + exports2.isPR = null; + } + } + }); + exports2.isCI = !!(env.CI || env.CONTINUOUS_INTEGRATION || env.BUILD_NUMBER || env.RUN_ID || exports2.name || false); + function checkEnv(obj) { + if (typeof obj === "string") + return !!env[obj]; + return Object.keys(obj).every(function(k) { + return env[k] === obj[k]; + }); + } + } +}); + +// ../../node_modules/.pnpm/is-ci@3.0.0/node_modules/is-ci/index.js +var require_is_ci = __commonJS({ + "../../node_modules/.pnpm/is-ci@3.0.0/node_modules/is-ci/index.js"(exports2, module2) { + "use strict"; + module2.exports = require_ci_info().isCI; + } +}); + +// ../get-context/lib/readLockfiles.js +var require_readLockfiles = __commonJS({ + "../get-context/lib/readLockfiles.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var constants_1 = require_lib7(); + var lockfile_file_1 = require_lib57(); + var logger_1 = __importDefault(require_lib6()); + var is_ci_1 = __importDefault(require_is_ci()); + var clone_1 = __importDefault(require_clone3()); + var equals_1 = __importDefault(require_equals2()); + async function default_1(opts) { + var _a, _b, _c; + const lockfileOpts = { + ignoreIncompatible: opts.force || is_ci_1.default, + wantedVersion: constants_1.LOCKFILE_VERSION + }; + const fileReads = []; + let lockfileHadConflicts = false; + if (opts.useLockfile) { + if (!opts.frozenLockfile) { + fileReads.push((async () => { + try { + const { lockfile, hadConflicts } = await lockfile_file_1.readWantedLockfileAndAutofixConflicts(opts.lockfileDir, lockfileOpts); + lockfileHadConflicts = hadConflicts; + return lockfile; + } catch (err) { + logger_1.default.warn({ + message: `Ignoring broken lockfile at ${opts.lockfileDir}: ${err.message}`, + prefix: opts.lockfileDir + }); + return void 0; + } + })()); + } else { + fileReads.push(lockfile_file_1.readWantedLockfile(opts.lockfileDir, lockfileOpts)); + } + } else { + if (await lockfile_file_1.existsWantedLockfile(opts.lockfileDir)) { + logger_1.default.warn({ + message: `A ${constants_1.WANTED_LOCKFILE} file exists. The current configuration prohibits to read or write a lockfile`, + prefix: opts.lockfileDir + }); + } + fileReads.push(Promise.resolve(void 0)); + } + fileReads.push((async () => { + try { + return await lockfile_file_1.readCurrentLockfile(opts.virtualStoreDir, lockfileOpts); + } catch (err) { + logger_1.default.warn({ + message: `Ignoring broken lockfile at ${opts.virtualStoreDir}: ${err.message}`, + prefix: opts.lockfileDir + }); + return void 0; + } + })()); + const files = await Promise.all(fileReads); + const sopts = { lockfileVersion: constants_1.LOCKFILE_VERSION }; + const importerIds = opts.projects.map((importer) => importer.id); + const currentLockfile = (_a = files[1]) !== null && _a !== void 0 ? _a : lockfile_file_1.createLockfileObject(importerIds, sopts); + for (const importerId of importerIds) { + if (!currentLockfile.importers[importerId]) { + currentLockfile.importers[importerId] = { + specifiers: {} + }; + } + } + const wantedLockfile = (_c = (_b = files[0]) !== null && _b !== void 0 ? _b : currentLockfile && clone_1.default(currentLockfile)) !== null && _c !== void 0 ? _c : lockfile_file_1.createLockfileObject(importerIds, sopts); + for (const importerId of importerIds) { + if (!wantedLockfile.importers[importerId]) { + wantedLockfile.importers[importerId] = { + specifiers: {} + }; + } + } + return { + currentLockfile, + currentLockfileIsUpToDate: equals_1.default(currentLockfile, wantedLockfile), + existsCurrentLockfile: files[1] != null, + existsWantedLockfile: files[0] != null, + wantedLockfile, + lockfileHadConflicts + }; + } + exports2.default = default_1; + } +}); + +// ../get-context/lib/index.js +var require_lib67 = __commonJS({ + "../get-context/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getContextForSingleImporter = exports2.UnexpectedVirtualStoreDirError = exports2.UnexpectedStoreError = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var core_loggers_1 = require_lib12(); + var error_1 = __importDefault(require_lib8()); + var logger_1 = __importDefault(require_lib6()); + var read_projects_context_1 = __importDefault(require_lib66()); + var types_1 = require_lib14(); + var rimraf_1 = __importDefault(require_rimraf()); + var path_absolute_1 = __importDefault(require_path_absolute()); + var clone_1 = __importDefault(require_clone3()); + var equals_1 = __importDefault(require_equals2()); + var checkCompatibility_1 = __importDefault(require_checkCompatibility()); + var UnexpectedStoreError_1 = __importDefault(require_UnexpectedStoreError()); + exports2.UnexpectedStoreError = UnexpectedStoreError_1.default; + var UnexpectedVirtualStoreDirError_1 = __importDefault(require_UnexpectedVirtualStoreDirError()); + exports2.UnexpectedVirtualStoreDirError = UnexpectedVirtualStoreDirError_1.default; + var readLockfiles_1 = __importDefault(require_readLockfiles()); + async function getContext(projects, opts) { + var _a, _b, _c, _d, _e, _f, _g; + const modulesDir = (_a = opts.modulesDir) !== null && _a !== void 0 ? _a : "node_modules"; + let importersContext = await read_projects_context_1.default(projects, { lockfileDir: opts.lockfileDir, modulesDir }); + const virtualStoreDir = path_absolute_1.default((_b = opts.virtualStoreDir) !== null && _b !== void 0 ? _b : path_1.default.join(modulesDir, ".pnpm"), opts.lockfileDir); + if (importersContext.modules != null) { + const { purged } = await validateModules(importersContext.modules, importersContext.projects, { + currentHoistPattern: importersContext.currentHoistPattern, + currentPublicHoistPattern: importersContext.currentPublicHoistPattern, + forceNewModules: opts.forceNewModules === true, + include: opts.include, + lockfileDir: opts.lockfileDir, + modulesDir, + registries: opts.registries, + storeDir: opts.storeDir, + virtualStoreDir, + forceHoistPattern: opts.forceHoistPattern, + hoistPattern: opts.hoistPattern, + forcePublicHoistPattern: opts.forcePublicHoistPattern, + publicHoistPattern: opts.publicHoistPattern + }); + if (purged) { + importersContext = await read_projects_context_1.default(projects, { + lockfileDir: opts.lockfileDir, + modulesDir + }); + } + } + await fs_1.promises.mkdir(opts.storeDir, { recursive: true }); + projects.forEach((project) => { + core_loggers_1.packageManifestLogger.debug({ + initial: project.manifest, + prefix: project.rootDir + }); + }); + if (((_c = opts.hooks) === null || _c === void 0 ? void 0 : _c.readPackage) != null) { + for (const project of importersContext.projects) { + project.originalManifest = project.manifest; + project.manifest = opts.hooks.readPackage(clone_1.default(project.manifest), project.rootDir); + } + } + const extraBinPaths = [ + ...opts.extraBinPaths || [] + ]; + const hoistedModulesDir = path_1.default.join(virtualStoreDir, "node_modules"); + if ((_d = opts.hoistPattern) === null || _d === void 0 ? void 0 : _d.length) { + extraBinPaths.unshift(path_1.default.join(hoistedModulesDir, ".bin")); + } + const ctx = { + extraBinPaths, + hoistedDependencies: importersContext.hoistedDependencies, + hoistedModulesDir, + hoistPattern: (_e = importersContext.currentHoistPattern) !== null && _e !== void 0 ? _e : opts.hoistPattern, + include: (_f = opts.include) !== null && _f !== void 0 ? _f : importersContext.include, + lockfileDir: opts.lockfileDir, + modulesFile: importersContext.modules, + pendingBuilds: importersContext.pendingBuilds, + projects: importersContext.projects, + publicHoistPattern: (_g = importersContext.currentPublicHoistPattern) !== null && _g !== void 0 ? _g : opts.publicHoistPattern, + registries: { + ...opts.registries, + ...importersContext.registries + }, + rootModulesDir: importersContext.rootModulesDir, + skipped: importersContext.skipped, + storeDir: opts.storeDir, + virtualStoreDir, + ...await readLockfiles_1.default({ + force: opts.force, + forceSharedLockfile: opts.forceSharedLockfile, + frozenLockfile: opts.frozenLockfile === true, + lockfileDir: opts.lockfileDir, + projects: importersContext.projects, + registry: opts.registries.default, + useLockfile: opts.useLockfile, + virtualStoreDir + }) + }; + core_loggers_1.contextLogger.debug({ + currentLockfileExists: ctx.existsCurrentLockfile, + storeDir: opts.storeDir, + virtualStoreDir + }); + return ctx; + } + exports2.default = getContext; + async function validateModules(modules, projects, opts) { + const rootProject = projects.find(({ id }) => id === "."); + if (opts.forcePublicHoistPattern && !equals_1.default(modules.publicHoistPattern, opts.publicHoistPattern || void 0)) { + if (opts.forceNewModules && rootProject != null) { + await purgeModulesDirsOfImporter(opts.virtualStoreDir, rootProject); + return { purged: true }; + } + throw new error_1.default("PUBLIC_HOIST_PATTERN_DIFF", 'This modules directory was created using a different public-hoist-pattern value. Run "pnpm install" to recreate the modules directory.'); + } + let purged = false; + if (opts.forceHoistPattern && rootProject != null) { + try { + if (!equals_1.default(opts.currentHoistPattern, opts.hoistPattern || void 0)) { + throw new error_1.default("HOIST_PATTERN_DIFF", 'This modules directory was created using a different hoist-pattern value. Run "pnpm install" to recreate the modules directory.'); + } + } catch (err) { + if (!opts.forceNewModules) + throw err; + await purgeModulesDirsOfImporter(opts.virtualStoreDir, rootProject); + purged = true; + } + } + await Promise.all(projects.map(async (project) => { + try { + checkCompatibility_1.default(modules, { + modulesDir: project.modulesDir, + storeDir: opts.storeDir, + virtualStoreDir: opts.virtualStoreDir + }); + if (opts.lockfileDir !== project.rootDir && opts.include != null && modules.included) { + for (const depsField of types_1.DEPENDENCIES_FIELDS) { + if (opts.include[depsField] !== modules.included[depsField]) { + throw new error_1.default("INCLUDED_DEPS_CONFLICT", `modules directory (at "${opts.lockfileDir}") was installed with ${stringifyIncludedDeps(modules.included)}. Current install wants ${stringifyIncludedDeps(opts.include)}.`); + } + } + } + } catch (err) { + if (!opts.forceNewModules) + throw err; + await purgeModulesDirsOfImporter(opts.virtualStoreDir, project); + purged = true; + } + })); + if (modules.registries != null && !equals_1.default(opts.registries, modules.registries)) { + if (opts.forceNewModules) { + await Promise.all(projects.map(purgeModulesDirsOfImporter.bind(null, opts.virtualStoreDir))); + return { purged: true }; + } + throw new error_1.default("REGISTRIES_MISMATCH", `This modules directory was created using the following registries configuration: ${JSON.stringify(modules.registries)}. The current configuration is ${JSON.stringify(opts.registries)}. To recreate the modules directory using the new settings, run "pnpm install".`); + } + if (purged && rootProject == null) { + await purgeModulesDirsOfImporter(opts.virtualStoreDir, { + modulesDir: path_1.default.join(opts.lockfileDir, opts.modulesDir), + rootDir: opts.lockfileDir + }); + } + return { purged }; + } + async function purgeModulesDirsOfImporter(virtualStoreDir, importer) { + logger_1.default.info({ + message: `Recreating ${importer.modulesDir}`, + prefix: importer.rootDir + }); + try { + await removeContentsOfDir(importer.modulesDir, virtualStoreDir); + } catch (err) { + if (err.code !== "ENOENT") + throw err; + } + } + async function removeContentsOfDir(dir, virtualStoreDir) { + const items = await fs_1.promises.readdir(dir); + for (const item of items) { + if (item.startsWith(".") && item !== ".bin" && item !== ".modules.yaml" && !dirsAreEqual(path_1.default.join(dir, item), virtualStoreDir)) { + continue; + } + await rimraf_1.default(path_1.default.join(dir, item)); + } + } + function dirsAreEqual(dir1, dir2) { + return path_1.default.relative(dir1, dir2) === ""; + } + function stringifyIncludedDeps(included) { + return types_1.DEPENDENCIES_FIELDS.filter((depsField) => included[depsField]).join(", "); + } + async function getContextForSingleImporter(manifest, opts, alreadyPurged = false) { + var _a, _b, _c, _d, _e, _f, _g; + const { currentHoistPattern, currentPublicHoistPattern, hoistedDependencies, projects, include, modules, pendingBuilds, registries, skipped, rootModulesDir } = await read_projects_context_1.default([ + { + rootDir: opts.dir + } + ], { + lockfileDir: opts.lockfileDir, + modulesDir: opts.modulesDir + }); + const storeDir = opts.storeDir; + const importer = projects[0]; + const modulesDir = importer.modulesDir; + const importerId = importer.id; + const virtualStoreDir = path_absolute_1.default((_a = opts.virtualStoreDir) !== null && _a !== void 0 ? _a : "node_modules/.pnpm", opts.lockfileDir); + if (modules != null && !alreadyPurged) { + const { purged } = await validateModules(modules, projects, { + currentHoistPattern, + currentPublicHoistPattern, + forceNewModules: opts.forceNewModules === true, + include: opts.include, + lockfileDir: opts.lockfileDir, + modulesDir: (_b = opts.modulesDir) !== null && _b !== void 0 ? _b : "node_modules", + registries: opts.registries, + storeDir: opts.storeDir, + virtualStoreDir, + forceHoistPattern: opts.forceHoistPattern, + hoistPattern: opts.hoistPattern, + forcePublicHoistPattern: opts.forcePublicHoistPattern, + publicHoistPattern: opts.publicHoistPattern + }); + if (purged) { + return getContextForSingleImporter(manifest, opts, true); + } + } + await fs_1.promises.mkdir(storeDir, { recursive: true }); + const extraBinPaths = [ + ...opts.extraBinPaths || [] + ]; + const hoistedModulesDir = path_1.default.join(virtualStoreDir, "node_modules"); + if ((_c = opts.hoistPattern) === null || _c === void 0 ? void 0 : _c.length) { + extraBinPaths.unshift(path_1.default.join(hoistedModulesDir, ".bin")); + } + const ctx = { + extraBinPaths, + hoistedDependencies, + hoistedModulesDir, + hoistPattern: currentHoistPattern !== null && currentHoistPattern !== void 0 ? currentHoistPattern : opts.hoistPattern, + importerId, + include: (_d = opts.include) !== null && _d !== void 0 ? _d : include, + lockfileDir: opts.lockfileDir, + manifest: (_g = (_f = (_e = opts.hooks) === null || _e === void 0 ? void 0 : _e.readPackage) === null || _f === void 0 ? void 0 : _f.call(_e, manifest)) !== null && _g !== void 0 ? _g : manifest, + modulesDir, + modulesFile: modules, + pendingBuilds, + prefix: opts.dir, + publicHoistPattern: currentPublicHoistPattern !== null && currentPublicHoistPattern !== void 0 ? currentPublicHoistPattern : opts.publicHoistPattern, + registries: { + ...opts.registries, + ...registries + }, + rootModulesDir, + skipped, + storeDir, + virtualStoreDir, + ...await readLockfiles_1.default({ + force: opts.force, + forceSharedLockfile: opts.forceSharedLockfile, + frozenLockfile: false, + lockfileDir: opts.lockfileDir, + projects: [{ id: importerId, rootDir: opts.dir }], + registry: opts.registries.default, + useLockfile: opts.useLockfile, + virtualStoreDir + }) + }; + core_loggers_1.packageManifestLogger.debug({ + initial: manifest, + prefix: opts.dir + }); + core_loggers_1.contextLogger.debug({ + currentLockfileExists: ctx.existsCurrentLockfile, + storeDir: opts.storeDir, + virtualStoreDir + }); + return ctx; + } + exports2.getContextForSingleImporter = getContextForSingleImporter; + } +}); + +// ../package-bins/lib/index.js +var require_lib68 = __commonJS({ + "../package-bins/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var fast_glob_1 = __importDefault(require_out4()); + var is_subdir_1 = __importDefault(require_is_subdir()); + async function binify(manifest, pkgPath) { + var _a; + if (manifest.bin) { + return commandsFromBin(manifest.bin, manifest.name, pkgPath); + } + if ((_a = manifest.directories) === null || _a === void 0 ? void 0 : _a.bin) { + const binDir = path_1.default.join(pkgPath, manifest.directories.bin); + const files = await findFiles(binDir); + return files.map((file) => ({ + name: path_1.default.basename(file), + path: path_1.default.join(binDir, file) + })); + } + return []; + } + exports2.default = binify; + async function findFiles(dir) { + try { + return await fast_glob_1.default("**", { + cwd: dir, + onlyFiles: true, + followSymbolicLinks: false + }); + } catch (err) { + if (err.code !== "ENOENT") { + throw err; + } + return []; + } + } + function commandsFromBin(bin, pkgName, pkgPath) { + if (typeof bin === "string") { + return [ + { + name: pkgName.startsWith("@") ? pkgName.substr(pkgName.indexOf("/") + 1) : pkgName, + path: path_1.default.join(pkgPath, bin) + } + ]; + } + return Object.keys(bin).filter((commandName) => encodeURIComponent(commandName) === commandName || commandName === "$").map((commandName) => ({ + name: commandName, + path: path_1.default.join(pkgPath, bin[commandName]) + })).filter((cmd) => is_subdir_1.default(pkgPath, cmd.path)); + } + } +}); + +// ../read-modules-dir/lib/index.js +var require_lib69 = __commonJS({ + "../read-modules-dir/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var util_1 = __importDefault(require("util")); + var graceful_fs_1 = __importDefault(require_graceful_fs()); + var readdir = util_1.default.promisify(graceful_fs_1.default.readdir); + async function readModulesDir(modulesDir) { + try { + return await _readModulesDir(modulesDir); + } catch (err) { + if (err["code"] === "ENOENT") + return null; + throw err; + } + } + exports2.default = readModulesDir; + async function _readModulesDir(modulesDir, scope) { + let pkgNames = []; + const parentDir = scope ? path_1.default.join(modulesDir, scope) : modulesDir; + for (const dir of await readdir(parentDir, { withFileTypes: true })) { + if (dir.isFile() || dir.name[0] === ".") + continue; + if (!scope && dir.name[0] === "@") { + pkgNames = [ + ...pkgNames, + ...await _readModulesDir(modulesDir, dir.name) + ]; + continue; + } + const pkgName = scope ? `${scope}/${dir.name}` : dir.name; + pkgNames.push(pkgName); + } + return pkgNames; + } + } +}); + +// ../../node_modules/.pnpm/p-settle@4.1.1/node_modules/p-settle/index.js +var require_p_settle = __commonJS({ + "../../node_modules/.pnpm/p-settle@4.1.1/node_modules/p-settle/index.js"(exports2, module2) { + "use strict"; + var pReflect = require_p_reflect(); + var pLimit = require_p_limit2(); + module2.exports = async (array, options = {}) => { + const { concurrency = Infinity } = options; + const limit = pLimit(concurrency); + return Promise.all(array.map((element) => { + if (element && typeof element.then === "function") { + return pReflect(element); + } + if (typeof element === "function") { + return pReflect(limit(() => element())); + } + return pReflect(Promise.resolve(element)); + })); + }; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_concat.js +var require_concat3 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_concat.js"(exports2, module2) { + function _concat(set1, set2) { + set1 = set1 || []; + set2 = set2 || []; + var idx; + var len1 = set1.length; + var len2 = set2.length; + var result = []; + idx = 0; + while (idx < len1) { + result[result.length] = set1[idx]; + idx += 1; + } + idx = 0; + while (idx < len2) { + result[result.length] = set2[idx]; + idx += 1; + } + return result; + } + module2.exports = _concat; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_pipe.js +var require_pipe2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_pipe.js"(exports2, module2) { + function _pipe(f, g) { + return function() { + return g.call(this, f.apply(this, arguments)); + }; + } + module2.exports = _pipe; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_checkForMethod.js +var require_checkForMethod = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_checkForMethod.js"(exports2, module2) { + var _isArray = require_isArray(); + function _checkForMethod(methodname, fn2) { + return function() { + var length = arguments.length; + if (length === 0) { + return fn2(); + } + var obj = arguments[length - 1]; + return _isArray(obj) || typeof obj[methodname] !== "function" ? fn2.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1)); + }; + } + module2.exports = _checkForMethod; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/slice.js +var require_slice = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/slice.js"(exports2, module2) { + var _checkForMethod = require_checkForMethod(); + var _curry3 = require_curry3(); + var slice = /* @__PURE__ */ _curry3(/* @__PURE__ */ _checkForMethod("slice", function slice2(fromIndex, toIndex, list) { + return Array.prototype.slice.call(list, fromIndex, toIndex); + })); + module2.exports = slice; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/tail.js +var require_tail = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/tail.js"(exports2, module2) { + var _checkForMethod = require_checkForMethod(); + var _curry1 = require_curry1(); + var slice = require_slice(); + var tail = /* @__PURE__ */ _curry1(/* @__PURE__ */ _checkForMethod("tail", /* @__PURE__ */ slice(1, Infinity))); + module2.exports = tail; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/pipe.js +var require_pipe3 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/pipe.js"(exports2, module2) { + var _arity = require_arity(); + var _pipe = require_pipe2(); + var reduce = require_reduce3(); + var tail = require_tail(); + function pipe() { + if (arguments.length === 0) { + throw new Error("pipe requires at least one argument"); + } + return _arity(arguments[0].length, reduce(_pipe, arguments[0], tail(arguments))); + } + module2.exports = pipe; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/reverse.js +var require_reverse = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/reverse.js"(exports2, module2) { + var _curry1 = require_curry1(); + var _isString = require_isString(); + var reverse = /* @__PURE__ */ _curry1(function reverse2(list) { + return _isString(list) ? list.split("").reverse().join("") : Array.prototype.slice.call(list, 0).reverse(); + }); + module2.exports = reverse; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/compose.js +var require_compose = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/compose.js"(exports2, module2) { + var pipe = require_pipe3(); + var reverse = require_reverse(); + function compose() { + if (arguments.length === 0) { + throw new Error("compose requires at least one argument"); + } + return pipe.apply(this, reverse(arguments)); + } + module2.exports = compose; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_identity.js +var require_identity3 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_identity.js"(exports2, module2) { + function _identity(x) { + return x; + } + module2.exports = _identity; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/identity.js +var require_identity4 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/identity.js"(exports2, module2) { + var _curry1 = require_curry1(); + var _identity = require_identity3(); + var identity = /* @__PURE__ */ _curry1(_identity); + module2.exports = identity; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/uniqBy.js +var require_uniqBy = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/uniqBy.js"(exports2, module2) { + var _Set = require_Set(); + var _curry2 = require_curry2(); + var uniqBy = /* @__PURE__ */ _curry2(function uniqBy2(fn2, list) { + var set = new _Set(); + var result = []; + var idx = 0; + var appliedItem, item; + while (idx < list.length) { + item = list[idx]; + appliedItem = fn2(item); + if (set.add(appliedItem)) { + result.push(item); + } + idx += 1; + } + return result; + }); + module2.exports = uniqBy; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/uniq.js +var require_uniq = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/uniq.js"(exports2, module2) { + var identity = require_identity4(); + var uniqBy = require_uniqBy(); + var uniq = /* @__PURE__ */ uniqBy(identity); + module2.exports = uniq; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/union.js +var require_union = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/union.js"(exports2, module2) { + var _concat = require_concat3(); + var _curry2 = require_curry2(); + var compose = require_compose(); + var uniq = require_uniq(); + var union = /* @__PURE__ */ _curry2(/* @__PURE__ */ compose(uniq, _concat)); + module2.exports = union; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_makeFlat.js +var require_makeFlat = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_makeFlat.js"(exports2, module2) { + var _isArrayLike = require_isArrayLike2(); + function _makeFlat(recursive) { + return function flatt(list) { + var value, jlen, j; + var result = []; + var idx = 0; + var ilen = list.length; + while (idx < ilen) { + if (_isArrayLike(list[idx])) { + value = recursive ? flatt(list[idx]) : list[idx]; + j = 0; + jlen = value.length; + while (j < jlen) { + result[result.length] = value[j]; + j += 1; + } + } else { + result[result.length] = list[idx]; + } + idx += 1; + } + return result; + }; + } + module2.exports = _makeFlat; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_forceReduced.js +var require_forceReduced = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_forceReduced.js"(exports2, module2) { + function _forceReduced(x) { + return { + "@@transducer/value": x, + "@@transducer/reduced": true + }; + } + module2.exports = _forceReduced; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_flatCat.js +var require_flatCat = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_flatCat.js"(exports2, module2) { + var _forceReduced = require_forceReduced(); + var _isArrayLike = require_isArrayLike2(); + var _reduce = require_reduce2(); + var _xfBase = require_xfBase(); + var preservingReduced = function(xf) { + return { + "@@transducer/init": _xfBase.init, + "@@transducer/result": function(result) { + return xf["@@transducer/result"](result); + }, + "@@transducer/step": function(result, input) { + var ret = xf["@@transducer/step"](result, input); + return ret["@@transducer/reduced"] ? _forceReduced(ret) : ret; + } + }; + }; + var _flatCat = function _xcat(xf) { + var rxf = preservingReduced(xf); + return { + "@@transducer/init": _xfBase.init, + "@@transducer/result": function(result) { + return rxf["@@transducer/result"](result); + }, + "@@transducer/step": function(result, input) { + return !_isArrayLike(input) ? _reduce(rxf, result, [input]) : _reduce(rxf, result, input); + } + }; + }; + module2.exports = _flatCat; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xchain.js +var require_xchain = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xchain.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _flatCat = require_flatCat(); + var map = require_map4(); + var _xchain = /* @__PURE__ */ _curry2(function _xchain2(f, xf) { + return map(f, _flatCat(xf)); + }); + module2.exports = _xchain; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/chain.js +var require_chain = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/chain.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _dispatchable = require_dispatchable(); + var _makeFlat = require_makeFlat(); + var _xchain = require_xchain(); + var map = require_map4(); + var chain = /* @__PURE__ */ _curry2(/* @__PURE__ */ _dispatchable(["fantasy-land/chain", "chain"], _xchain, function chain2(fn2, monad) { + if (typeof monad === "function") { + return function(x) { + return fn2(monad(x))(x); + }; + } + return _makeFlat(false)(map(fn2, monad)); + })); + module2.exports = chain; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/unnest.js +var require_unnest = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/unnest.js"(exports2, module2) { + var _identity = require_identity3(); + var chain = require_chain(); + var unnest = /* @__PURE__ */ chain(_identity); + module2.exports = unnest; + } +}); + +// ../link-bins/lib/index.js +var require_lib70 = __commonJS({ + "../link-bins/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.linkBinsOfPackages = void 0; + var fs_1 = require("fs"); + var module_1 = __importDefault(require("module")); + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var manifest_utils_1 = require_lib15(); + var package_bins_1 = __importDefault(require_lib68()); + var read_modules_dir_1 = __importDefault(require_lib69()); + var read_package_json_1 = require_lib32(); + var read_project_manifest_1 = require_lib19(); + var cmd_shim_1 = __importDefault(require_cmd_shim()); + var is_subdir_1 = __importDefault(require_is_subdir()); + var is_windows_1 = __importDefault(require_is_windows()); + var normalize_path_1 = __importDefault(require_normalize_path()); + var p_settle_1 = __importDefault(require_p_settle()); + var fromPairs_1 = __importDefault(require_fromPairs()); + var isEmpty_1 = __importDefault(require_isEmpty2()); + var union_1 = __importDefault(require_union()); + var unnest_1 = __importDefault(require_unnest()); + var partition_1 = __importDefault(require_partition4()); + var IS_WINDOWS = is_windows_1.default(); + var EXECUTABLE_SHEBANG_SUPPORTED = !IS_WINDOWS; + var POWER_SHELL_IS_SUPPORTED = IS_WINDOWS; + exports2.default = async (modulesDir, binsDir, opts) => { + const allDeps = await read_modules_dir_1.default(modulesDir); + if (allDeps === null) + return []; + const pkgBinOpts = { + allowExoticManifests: false, + ...opts + }; + const directDependencies = opts.projectManifest == null ? void 0 : new Set(Object.keys(manifest_utils_1.getAllDependenciesFromManifest(opts.projectManifest))); + const allCmds = unnest_1.default((await Promise.all(allDeps.map((alias) => { + var _a; + return { + depDir: path_1.default.resolve(modulesDir, alias), + isDirectDependency: directDependencies === null || directDependencies === void 0 ? void 0 : directDependencies.has(alias), + nodeExecPath: (_a = opts.nodeExecPathByAlias) === null || _a === void 0 ? void 0 : _a[alias] + }; + }).filter(({ depDir }) => !is_subdir_1.default(depDir, binsDir)).map(async ({ depDir, isDirectDependency, nodeExecPath }) => { + const target = normalize_path_1.default(depDir); + const cmds = await getPackageBins(pkgBinOpts, target, nodeExecPath); + return cmds.map((cmd) => ({ ...cmd, isDirectDependency })); + }))).filter((cmds) => cmds.length)); + const cmdsToLink = directDependencies != null ? preferDirectCmds(allCmds) : allCmds; + return linkBins(cmdsToLink, binsDir, opts); + }; + function preferDirectCmds(allCmds) { + const [directCmds, hoistedCmds] = partition_1.default((cmd) => cmd.isDirectDependency === true, allCmds); + const usedDirectCmds = new Set(directCmds.map((directCmd) => directCmd.name)); + return [ + ...directCmds, + ...hoistedCmds.filter(({ name }) => !usedDirectCmds.has(name)) + ]; + } + async function linkBinsOfPackages(pkgs, binsTarget, opts) { + if (pkgs.length === 0) + return []; + const allCmds = unnest_1.default((await Promise.all(pkgs.map(async (pkg) => getPackageBinsFromManifest(pkg.manifest, pkg.location, pkg.nodeExecPath)))).filter((cmds) => cmds.length)); + return linkBins(allCmds, binsTarget, opts); + } + exports2.linkBinsOfPackages = linkBinsOfPackages; + async function linkBins(allCmds, binsDir, opts) { + if (allCmds.length === 0) + return []; + await fs_1.promises.mkdir(binsDir, { recursive: true }); + const [cmdsWithOwnName, cmdsWithOtherNames] = partition_1.default(({ ownName }) => ownName, allCmds); + const results1 = await p_settle_1.default(cmdsWithOwnName.map(async (cmd) => linkBin(cmd, binsDir, opts))); + const usedNames = fromPairs_1.default(cmdsWithOwnName.map((cmd) => [cmd.name, cmd.name])); + const results2 = await p_settle_1.default(cmdsWithOtherNames.map(async (cmd) => { + if (usedNames[cmd.name]) { + opts.warn(`Cannot link binary '${cmd.name}' of '${cmd.pkgName}' to '${binsDir}': binary of '${usedNames[cmd.name]}' is already linked`, "BINARIES_CONFLICT"); + return Promise.resolve(void 0); + } + usedNames[cmd.name] = cmd.pkgName; + return linkBin(cmd, binsDir, opts); + })); + for (const result of [...results1, ...results2]) { + if (result.isRejected) { + throw result.reason; + } + } + return allCmds.map((cmd) => cmd.pkgName); + } + async function isFromModules(filename) { + const real = await fs_1.promises.realpath(filename); + return normalize_path_1.default(real).includes("/node_modules/"); + } + async function getPackageBins(opts, target, nodeExecPath) { + const manifest = opts.allowExoticManifests ? await read_project_manifest_1.safeReadProjectManifestOnly(target) : await safeReadPkgJson(target); + if (manifest == null) { + return []; + } + if (isEmpty_1.default(manifest.bin) && !await isFromModules(target)) { + opts.warn(`Package in ${target} must have a non-empty bin field to get bin linked.`, "EMPTY_BIN"); + } + if (typeof manifest.bin === "string" && !manifest.name) { + throw new error_1.default("INVALID_PACKAGE_NAME", `Package in ${target} must have a name to get bin linked.`); + } + return getPackageBinsFromManifest(manifest, target, nodeExecPath); + } + async function getPackageBinsFromManifest(manifest, pkgDir, nodeExecPath) { + const cmds = await package_bins_1.default(manifest, pkgDir); + return cmds.map((cmd) => ({ + ...cmd, + ownName: cmd.name === manifest.name, + pkgName: manifest.name, + makePowerShellShim: POWER_SHELL_IS_SUPPORTED && manifest.name !== "pnpm", + nodeExecPath + })); + } + async function linkBin(cmd, binsDir, opts) { + const externalBinPath = path_1.default.join(binsDir, cmd.name); + if (EXECUTABLE_SHEBANG_SUPPORTED) { + await fs_1.promises.chmod(cmd.path, 493); + } + let nodePath; + if ((opts === null || opts === void 0 ? void 0 : opts.extendNodePath) !== false) { + nodePath = await getBinNodePaths(cmd.path); + const binsParentDir = path_1.default.dirname(binsDir); + if (path_1.default.relative(cmd.path, binsParentDir) !== "") { + nodePath = union_1.default(nodePath, await getBinNodePaths(binsParentDir)); + } + } + return cmd_shim_1.default(cmd.path, externalBinPath, { + createPwshFile: cmd.makePowerShellShim, + nodePath, + nodeExecPath: cmd.nodeExecPath + }); + } + async function getBinNodePaths(target) { + const targetDir = path_1.default.dirname(target); + const targetRealPath = await fs_1.promises.realpath(targetDir); + return union_1.default(module_1.default["_nodeModulePaths"](targetRealPath), module_1.default["_nodeModulePaths"](targetDir)); + } + async function safeReadPkgJson(pkgDir) { + try { + return await read_package_json_1.fromDir(pkgDir); + } catch (err) { + if (err.code === "ENOENT") { + return null; + } + throw err; + } + } + } +}); + +// ../filter-lockfile/lib/filterImporter.js +var require_filterImporter = __commonJS({ + "../filter-lockfile/lib/filterImporter.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function filterImporter(importer, include) { + var _a, _b, _c; + return { + dependencies: !include.dependencies ? {} : (_a = importer.dependencies) !== null && _a !== void 0 ? _a : {}, + devDependencies: !include.devDependencies ? {} : (_b = importer.devDependencies) !== null && _b !== void 0 ? _b : {}, + optionalDependencies: !include.optionalDependencies ? {} : (_c = importer.optionalDependencies) !== null && _c !== void 0 ? _c : {}, + specifiers: importer.specifiers + }; + } + exports2.default = filterImporter; + } +}); + +// ../filter-lockfile/lib/filterLockfile.js +var require_filterLockfile = __commonJS({ + "../filter-lockfile/lib/filterLockfile.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fromPairs_1 = __importDefault(require_fromPairs()); + var filterImporter_1 = __importDefault(require_filterImporter()); + function filterLockfile(lockfile, opts) { + var _a; + let pairs = Object.entries((_a = lockfile.packages) !== null && _a !== void 0 ? _a : {}).filter(([depPath, pkg]) => !opts.skipped.has(depPath)); + if (!opts.include.dependencies) { + pairs = pairs.filter(([depPath, pkg]) => pkg.dev !== false || pkg.optional); + } + if (!opts.include.devDependencies) { + pairs = pairs.filter(([depPath, pkg]) => pkg.dev !== true); + } + if (!opts.include.optionalDependencies) { + pairs = pairs.filter(([depPath, pkg]) => !pkg.optional); + } + return { + ...lockfile, + importers: Object.keys(lockfile.importers).reduce((acc, importerId) => { + acc[importerId] = filterImporter_1.default(lockfile.importers[importerId], opts.include); + return acc; + }, {}), + packages: fromPairs_1.default(pairs) + }; + } + exports2.default = filterLockfile; + } +}); + +// ../filter-lockfile/lib/LockfileMissingDependencyError.js +var require_LockfileMissingDependencyError = __commonJS({ + "../filter-lockfile/lib/LockfileMissingDependencyError.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var constants_1 = require_lib7(); + var error_1 = __importDefault(require_lib8()); + var LockfileMissingDependencyError = class extends error_1.default { + constructor(depPath) { + const message2 = `Broken lockfile: no entry for '${depPath}' in ${constants_1.WANTED_LOCKFILE}`; + super("LOCKFILE_MISSING_DEPENDENCY", message2, { + hint: "This issue is probably caused by a badly resolved merge conflict.\nTo fix the lockfile, run 'pnpm install --no-frozen-lockfile'." + }); + } + }; + exports2.default = LockfileMissingDependencyError; + } +}); + +// ../filter-lockfile/lib/filterLockfileByImporters.js +var require_filterLockfileByImporters = __commonJS({ + "../filter-lockfile/lib/filterLockfileByImporters.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var constants_1 = require_lib7(); + var lockfile_walker_1 = __importDefault(require_lib54()); + var logger_1 = __importDefault(require_lib6()); + var filterImporter_1 = __importDefault(require_filterImporter()); + var LockfileMissingDependencyError_1 = __importDefault(require_LockfileMissingDependencyError()); + var logger = logger_1.default("lockfile"); + function filterByImporters(lockfile, importerIds, opts) { + const packages = {}; + if (lockfile.packages != null) { + pkgAllDeps(lockfile_walker_1.default(lockfile, importerIds, { include: opts.include, skipped: opts.skipped }).step, packages, { + failOnMissingDependencies: opts.failOnMissingDependencies + }); + } + const importers = importerIds.reduce((acc, importerId) => { + acc[importerId] = filterImporter_1.default(lockfile.importers[importerId], opts.include); + return acc; + }, { ...lockfile.importers }); + return { + ...lockfile, + importers, + packages + }; + } + exports2.default = filterByImporters; + function pkgAllDeps(step, pickedPackages, opts) { + for (const { pkgSnapshot, depPath, next } of step.dependencies) { + pickedPackages[depPath] = pkgSnapshot; + pkgAllDeps(next(), pickedPackages, opts); + } + for (const depPath of step.missing) { + if (opts.failOnMissingDependencies) { + throw new LockfileMissingDependencyError_1.default(depPath); + } + logger.debug(`No entry for "${depPath}" in ${constants_1.WANTED_LOCKFILE}`); + } + } + } +}); + +// ../filter-lockfile/lib/filterLockfileByImportersAndEngine.js +var require_filterLockfileByImportersAndEngine = __commonJS({ + "../filter-lockfile/lib/filterLockfileByImportersAndEngine.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var constants_1 = require_lib7(); + var lockfile_utils_1 = require_lib53(); + var logger_1 = __importDefault(require_lib6()); + var package_is_installable_1 = __importDefault(require_lib13()); + var dp = __importStar2(require_lib33()); + var unnest_1 = __importDefault(require_unnest()); + var filterImporter_1 = __importDefault(require_filterImporter()); + var LockfileMissingDependencyError_1 = __importDefault(require_LockfileMissingDependencyError()); + var logger = logger_1.default("lockfile"); + function filterByImportersAndEngine(lockfile, importerIds, opts) { + const importerDeps = importerIds.map((importerId) => lockfile.importers[importerId]).map((importer) => ({ + ...opts.include.dependencies ? importer.dependencies : {}, + ...opts.include.devDependencies ? importer.devDependencies : {}, + ...opts.include.optionalDependencies ? importer.optionalDependencies : {} + })).map(Object.entries); + const directDepPaths = unnest_1.default(importerDeps).map(([pkgName, ref]) => dp.refToRelative(ref, pkgName)).filter((nodeId) => nodeId !== null); + const packages = lockfile.packages != null ? pickPkgsWithAllDeps(lockfile.packages, directDepPaths, { + currentEngine: opts.currentEngine, + engineStrict: opts.engineStrict, + failOnMissingDependencies: opts.failOnMissingDependencies, + include: opts.include, + includeIncompatiblePackages: opts.includeIncompatiblePackages === true, + lockfileDir: opts.lockfileDir, + skipped: opts.skipped + }) : {}; + const importers = importerIds.reduce((acc, importerId) => { + var _a; + acc[importerId] = filterImporter_1.default(lockfile.importers[importerId], opts.include); + if (acc[importerId].optionalDependencies != null) { + for (const depName of Object.keys((_a = acc[importerId].optionalDependencies) !== null && _a !== void 0 ? _a : {})) { + const depPath = dp.refToRelative(acc[importerId].optionalDependencies[depName], depName); + if (depPath && !packages[depPath]) { + delete acc[importerId].optionalDependencies[depName]; + } + } + } + return acc; + }, { ...lockfile.importers }); + return { + ...lockfile, + importers, + packages + }; + } + exports2.default = filterByImportersAndEngine; + function pickPkgsWithAllDeps(pkgSnapshots, depPaths, opts) { + const pickedPackages = {}; + pkgAllDeps({ pkgSnapshots, pickedPackages }, depPaths, true, opts); + return pickedPackages; + } + function pkgAllDeps(ctx, depPaths, parentIsInstallable, opts) { + var _a; + for (const depPath of depPaths) { + if (ctx.pickedPackages[depPath]) + continue; + const pkgSnapshot = ctx.pkgSnapshots[depPath]; + if (!pkgSnapshot && !depPath.startsWith("link:")) { + if (opts.failOnMissingDependencies) { + throw new LockfileMissingDependencyError_1.default(depPath); + } + logger.debug(`No entry for "${depPath}" in ${constants_1.WANTED_LOCKFILE}`); + continue; + } + let installable; + if (!parentIsInstallable) { + installable = false; + if (!ctx.pickedPackages[depPath] && pkgSnapshot.optional === true) { + opts.skipped.add(depPath); + } + } else { + const pkg = { + ...lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot), + cpu: pkgSnapshot.cpu, + engines: pkgSnapshot.engines, + os: pkgSnapshot.os + }; + installable = opts.includeIncompatiblePackages || package_is_installable_1.default((_a = pkgSnapshot.id) !== null && _a !== void 0 ? _a : depPath, pkg, { + engineStrict: opts.engineStrict, + lockfileDir: opts.lockfileDir, + nodeVersion: opts.currentEngine.nodeVersion, + optional: pkgSnapshot.optional === true, + pnpmVersion: opts.currentEngine.pnpmVersion + }) !== false; + if (!installable) { + if (!ctx.pickedPackages[depPath] && pkgSnapshot.optional === true) { + opts.skipped.add(depPath); + } + } else { + opts.skipped.delete(depPath); + } + } + ctx.pickedPackages[depPath] = pkgSnapshot; + const nextRelDepPaths = Object.entries({ + ...pkgSnapshot.dependencies, + ...opts.include.optionalDependencies ? pkgSnapshot.optionalDependencies : {} + }).map(([pkgName, ref]) => { + var _a2; + if ((_a2 = pkgSnapshot.peerDependencies) === null || _a2 === void 0 ? void 0 : _a2[pkgName]) + return null; + return dp.refToRelative(ref, pkgName); + }).filter((nodeId) => nodeId !== null); + pkgAllDeps(ctx, nextRelDepPaths, installable, opts); + } + } + } +}); + +// ../filter-lockfile/lib/index.js +var require_lib71 = __commonJS({ + "../filter-lockfile/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.filterLockfileByImportersAndEngine = exports2.filterLockfileByImporters = void 0; + var filterLockfile_1 = __importDefault(require_filterLockfile()); + var filterLockfileByImporters_1 = __importDefault(require_filterLockfileByImporters()); + exports2.filterLockfileByImporters = filterLockfileByImporters_1.default; + var filterLockfileByImportersAndEngine_1 = __importDefault(require_filterLockfileByImportersAndEngine()); + exports2.filterLockfileByImportersAndEngine = filterLockfileByImportersAndEngine_1.default; + exports2.default = filterLockfile_1.default; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/mergeAll.js +var require_mergeAll2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/mergeAll.js"(exports2, module2) { + var _objectAssign = require_objectAssign(); + var _curry1 = require_curry1(); + var mergeAll = /* @__PURE__ */ _curry1(function mergeAll2(list) { + return _objectAssign.apply(null, [{}].concat(list)); + }); + module2.exports = mergeAll; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/pickAll.js +var require_pickAll = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/pickAll.js"(exports2, module2) { + var _curry2 = require_curry2(); + var pickAll = /* @__PURE__ */ _curry2(function pickAll2(names, obj) { + var result = {}; + var idx = 0; + var len = names.length; + while (idx < len) { + var name = names[idx]; + result[name] = obj[name]; + idx += 1; + } + return result; + }); + module2.exports = pickAll; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/props.js +var require_props = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/props.js"(exports2, module2) { + var _curry2 = require_curry2(); + var path = require_path3(); + var props = /* @__PURE__ */ _curry2(function props2(ps, obj) { + return ps.map(function(p) { + return path([p], obj); + }); + }); + module2.exports = props; + } +}); + +// ../remove-bins/lib/removeBins.js +var require_removeBins = __commonJS({ + "../remove-bins/lib/removeBins.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.removeBinsOfDependency = exports2.removeBin = void 0; + var path_1 = __importDefault(require("path")); + var core_loggers_1 = require_lib12(); + var package_bins_1 = __importDefault(require_lib68()); + var read_package_json_1 = require_lib32(); + var rimraf_1 = __importDefault(require_rimraf()); + var cmd_extension_1 = __importDefault(require_cmd_extension()); + var is_windows_1 = __importDefault(require_is_windows()); + async function removeOnWin(cmd) { + core_loggers_1.removalLogger.debug(cmd); + await Promise.all([ + rimraf_1.default(cmd), + rimraf_1.default(`${cmd}.ps1`), + rimraf_1.default(`${cmd}${cmd_extension_1.default}`) + ]); + } + async function removeOnNonWin(p) { + core_loggers_1.removalLogger.debug(p); + return rimraf_1.default(p); + } + exports2.removeBin = is_windows_1.default() ? removeOnWin : removeOnNonWin; + async function removeBinsOfDependency(dependencyDir, opts) { + const uninstalledPkgJson = await read_package_json_1.safeReadPackageFromDir(dependencyDir); + if (!uninstalledPkgJson) + return; + const cmds = await package_bins_1.default(uninstalledPkgJson, dependencyDir); + if (!opts.dryRun) { + await Promise.all(cmds.map((cmd) => path_1.default.join(opts.binsDir, cmd.name)).map(exports2.removeBin)); + } + return uninstalledPkgJson; + } + exports2.removeBinsOfDependency = removeBinsOfDependency; + } +}); + +// ../remove-bins/lib/index.js +var require_lib72 = __commonJS({ + "../remove-bins/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.removeBinsOfDependency = exports2.removeBin = void 0; + var removeBins_1 = require_removeBins(); + Object.defineProperty(exports2, "removeBin", { enumerable: true, get: function() { + return removeBins_1.removeBin; + } }); + Object.defineProperty(exports2, "removeBinsOfDependency", { enumerable: true, get: function() { + return removeBins_1.removeBinsOfDependency; + } }); + } +}); + +// ../modules-cleaner/lib/removeDirectDependency.js +var require_removeDirectDependency = __commonJS({ + "../modules-cleaner/lib/removeDirectDependency.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var core_loggers_1 = require_lib12(); + var remove_bins_1 = require_lib72(); + async function removeDirectDependency(dependency, opts) { + const dependencyDir = path_1.default.join(opts.modulesDir, dependency.name); + const results = await Promise.all([ + remove_bins_1.removeBinsOfDependency(dependencyDir, opts), + !opts.dryRun && remove_bins_1.removeBin(dependencyDir) + ]); + const uninstalledPkg = results[0]; + if (!opts.muteLogs) { + core_loggers_1.rootLogger.debug({ + prefix: opts.rootDir, + removed: { + dependencyType: dependency.dependenciesField === "devDependencies" && "dev" || dependency.dependenciesField === "optionalDependencies" && "optional" || dependency.dependenciesField === "dependencies" && "prod" || void 0, + name: dependency.name, + version: uninstalledPkg === null || uninstalledPkg === void 0 ? void 0 : uninstalledPkg.version + } + }); + } + } + exports2.default = removeDirectDependency; + } +}); + +// ../modules-cleaner/lib/prune.js +var require_prune2 = __commonJS({ + "../modules-cleaner/lib/prune.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var core_loggers_1 = require_lib12(); + var filter_lockfile_1 = __importStar2(require_lib71()); + var lockfile_utils_1 = require_lib53(); + var logger_1 = __importDefault(require_lib6()); + var read_modules_dir_1 = __importDefault(require_lib69()); + var types_1 = require_lib14(); + var dependency_path_1 = require_lib33(); + var rimraf_1 = __importDefault(require_rimraf()); + var difference_1 = __importDefault(require_difference()); + var equals_1 = __importDefault(require_equals2()); + var mergeAll_1 = __importDefault(require_mergeAll2()); + var pickAll_1 = __importDefault(require_pickAll()); + var props_1 = __importDefault(require_props()); + var removeDirectDependency_1 = __importDefault(require_removeDirectDependency()); + async function prune(importers, opts) { + var _a, _b, _c; + const wantedLockfile = filter_lockfile_1.default(opts.wantedLockfile, { + include: opts.include, + skipped: opts.skipped + }); + await Promise.all(importers.map(async ({ binsDir, id, modulesDir, pruneDirectDependencies, removePackages, rootDir }) => { + var _a2; + const currentImporter = opts.currentLockfile.importers[id] || {}; + const currentPkgs = Object.entries(mergeDependencies(currentImporter)); + const wantedPkgs = Object.entries(mergeDependencies(wantedLockfile.importers[id])); + const allCurrentPackages = new Set(pruneDirectDependencies === true || (removePackages === null || removePackages === void 0 ? void 0 : removePackages.length) ? (_a2 = await read_modules_dir_1.default(modulesDir)) !== null && _a2 !== void 0 ? _a2 : [] : []); + const depsToRemove = new Set([ + ...(removePackages !== null && removePackages !== void 0 ? removePackages : []).filter((removePackage) => allCurrentPackages.has(removePackage)), + ...difference_1.default(currentPkgs, wantedPkgs).map(([depName]) => depName) + ]); + if (pruneDirectDependencies) { + if (allCurrentPackages.size > 0) { + const newPkgsSet = new Set(wantedPkgs.map(([depName]) => depName)); + for (const currentPackage of Array.from(allCurrentPackages)) { + if (!newPkgsSet.has(currentPackage)) { + depsToRemove.add(currentPackage); + } + } + } + } + return Promise.all(Array.from(depsToRemove).map(async (depName) => { + var _a3, _b2, _c2; + return removeDirectDependency_1.default({ + dependenciesField: ((_a3 = currentImporter.devDependencies) === null || _a3 === void 0 ? void 0 : _a3[depName]) != null && "devDependencies" || ((_b2 = currentImporter.optionalDependencies) === null || _b2 === void 0 ? void 0 : _b2[depName]) != null && "optionalDependencies" || ((_c2 = currentImporter.dependencies) === null || _c2 === void 0 ? void 0 : _c2[depName]) != null && "dependencies" || void 0, + name: depName + }, { + binsDir, + dryRun: opts.dryRun, + modulesDir, + rootDir + }); + })); + })); + const selectedImporterIds = importers.map((importer) => importer.id).sort(); + const currentPkgIdsByDepPaths = equals_1.default(selectedImporterIds, Object.keys(opts.wantedLockfile.importers)) ? getPkgsDepPaths(opts.registries, (_a = opts.currentLockfile.packages) !== null && _a !== void 0 ? _a : {}, opts.skipped) : getPkgsDepPathsOwnedOnlyByImporters(selectedImporterIds, opts.registries, opts.currentLockfile, opts.include, opts.skipped); + const wantedPkgIdsByDepPaths = getPkgsDepPaths(opts.registries, (_b = wantedLockfile.packages) !== null && _b !== void 0 ? _b : {}, opts.skipped); + const oldDepPaths = Object.keys(currentPkgIdsByDepPaths); + const newDepPaths = Object.keys(wantedPkgIdsByDepPaths); + const orphanDepPaths = difference_1.default(oldDepPaths, newDepPaths); + const orphanPkgIds = new Set(props_1.default(orphanDepPaths, currentPkgIdsByDepPaths)); + core_loggers_1.statsLogger.debug({ + prefix: opts.lockfileDir, + removed: orphanPkgIds.size + }); + if (!opts.dryRun) { + if (orphanDepPaths.length > 0 && opts.currentLockfile.packages != null && (opts.hoistedModulesDir != null || opts.publicHoistedModulesDir != null)) { + const prefix = path_1.default.join(opts.virtualStoreDir, "../.."); + await Promise.all(orphanDepPaths.map(async (orphanDepPath) => { + if (opts.hoistedDependencies[orphanDepPath]) { + await Promise.all(Object.entries(opts.hoistedDependencies[orphanDepPath]).map(([alias, hoistType]) => { + const modulesDir = hoistType === "public" ? opts.publicHoistedModulesDir : opts.hoistedModulesDir; + if (!modulesDir) + return void 0; + return removeDirectDependency_1.default({ + name: alias + }, { + binsDir: path_1.default.join(modulesDir, ".bin"), + modulesDir, + muteLogs: true, + rootDir: prefix + }); + })); + } + delete opts.hoistedDependencies[orphanDepPath]; + })); + } + if (opts.pruneVirtualStore !== false) { + const _tryRemovePkg = tryRemovePkg.bind(null, opts.lockfileDir, opts.virtualStoreDir); + await Promise.all(orphanDepPaths.map((orphanDepPath) => dependency_path_1.depPathToFilename(orphanDepPath, opts.lockfileDir)).map(async (orphanDepPath) => _tryRemovePkg(orphanDepPath))); + const neededPkgs = new Set(); + for (const depPath of Object.keys((_c = opts.wantedLockfile.packages) !== null && _c !== void 0 ? _c : {})) { + if (opts.skipped.has(depPath)) + continue; + neededPkgs.add(dependency_path_1.depPathToFilename(depPath, opts.lockfileDir)); + } + const availablePkgs = await readVirtualStoreDir(opts.virtualStoreDir, opts.lockfileDir); + await Promise.all(availablePkgs.filter((availablePkg) => !neededPkgs.has(availablePkg)).map(async (orphanDepPath) => _tryRemovePkg(orphanDepPath))); + } + } + return new Set(orphanDepPaths); + } + exports2.default = prune; + async function readVirtualStoreDir(virtualStoreDir, lockfileDir) { + try { + return await fs_1.promises.readdir(virtualStoreDir); + } catch (err) { + if (err.code !== "ENOENT") { + logger_1.default.warn({ + error: err, + message: `Failed to read virtualStoreDir at "${virtualStoreDir}"`, + prefix: lockfileDir + }); + } + return []; + } + } + async function tryRemovePkg(lockfileDir, virtualStoreDir, pkgDir) { + const pathToRemove = path_1.default.join(virtualStoreDir, pkgDir); + core_loggers_1.removalLogger.debug(pathToRemove); + try { + await rimraf_1.default(pathToRemove); + } catch (err) { + logger_1.default.warn({ + error: err, + message: `Failed to remove "${pathToRemove}"`, + prefix: lockfileDir + }); + } + } + function mergeDependencies(projectSnapshot) { + return mergeAll_1.default(types_1.DEPENDENCIES_FIELDS.map((depType) => { + var _a; + return (_a = projectSnapshot[depType]) !== null && _a !== void 0 ? _a : {}; + })); + } + function getPkgsDepPaths(registries, packages, skipped) { + const pkgIdsByDepPath = {}; + for (const depPath of Object.keys(packages)) { + if (skipped.has(depPath)) + continue; + pkgIdsByDepPath[depPath] = lockfile_utils_1.packageIdFromSnapshot(depPath, packages[depPath], registries); + } + return pkgIdsByDepPath; + } + function getPkgsDepPathsOwnedOnlyByImporters(importerIds, registries, lockfile, include, skipped) { + const selected = filter_lockfile_1.filterLockfileByImporters(lockfile, importerIds, { + failOnMissingDependencies: false, + include, + skipped + }); + const other = filter_lockfile_1.filterLockfileByImporters(lockfile, difference_1.default(Object.keys(lockfile.importers), importerIds), { + failOnMissingDependencies: false, + include, + skipped + }); + const packagesOfSelectedOnly = pickAll_1.default(difference_1.default(Object.keys(selected.packages), Object.keys(other.packages)), selected.packages); + return getPkgsDepPaths(registries, packagesOfSelectedOnly, skipped); + } + } +}); + +// ../modules-cleaner/lib/index.js +var require_lib73 = __commonJS({ + "../modules-cleaner/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prune = void 0; + var prune_1 = __importDefault(require_prune2()); + exports2.prune = prune_1.default; + } +}); + +// ../prune-lockfile/lib/index.js +var require_lib74 = __commonJS({ + "../prune-lockfile/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pruneLockfile = exports2.pruneSharedLockfile = void 0; + var constants_1 = require_lib7(); + var dependency_path_1 = require_lib33(); + var difference_1 = __importDefault(require_difference()); + var isEmpty_1 = __importDefault(require_isEmpty2()); + var omit_1 = __importDefault(require_omit()); + var unnest_1 = __importDefault(require_unnest()); + __exportStar(require_lib52(), exports2); + function pruneSharedLockfile(lockfile, opts) { + var _a; + const copiedPackages = lockfile.packages == null ? {} : copyPackageSnapshots(lockfile.packages, { + devDepPaths: unnest_1.default(Object.values(lockfile.importers).map((deps) => { + var _a2; + return resolvedDepsToDepPaths((_a2 = deps.devDependencies) !== null && _a2 !== void 0 ? _a2 : {}); + })), + optionalDepPaths: unnest_1.default(Object.values(lockfile.importers).map((deps) => { + var _a2; + return resolvedDepsToDepPaths((_a2 = deps.optionalDependencies) !== null && _a2 !== void 0 ? _a2 : {}); + })), + prodDepPaths: unnest_1.default(Object.values(lockfile.importers).map((deps) => { + var _a2; + return resolvedDepsToDepPaths((_a2 = deps.dependencies) !== null && _a2 !== void 0 ? _a2 : {}); + })), + warn: (_a = opts === null || opts === void 0 ? void 0 : opts.warn) !== null && _a !== void 0 ? _a : (msg) => void 0 + }); + const prunnedLockfile = { + ...lockfile, + packages: copiedPackages + }; + if (isEmpty_1.default(prunnedLockfile.packages)) { + delete prunnedLockfile.packages; + } + return prunnedLockfile; + } + exports2.pruneSharedLockfile = pruneSharedLockfile; + function pruneLockfile(lockfile, pkg, importerId, opts) { + var _a, _b, _c, _d; + const packages = {}; + const importer = lockfile.importers[importerId]; + const lockfileSpecs = (_a = importer.specifiers) !== null && _a !== void 0 ? _a : {}; + const optionalDependencies = Object.keys((_b = pkg.optionalDependencies) !== null && _b !== void 0 ? _b : {}); + const dependencies = difference_1.default(Object.keys((_c = pkg.dependencies) !== null && _c !== void 0 ? _c : {}), optionalDependencies); + const devDependencies = difference_1.default(difference_1.default(Object.keys((_d = pkg.devDependencies) !== null && _d !== void 0 ? _d : {}), optionalDependencies), dependencies); + const allDeps = [ + ...optionalDependencies, + ...devDependencies, + ...dependencies + ]; + const specifiers = {}; + const lockfileDependencies = {}; + const lockfileOptionalDependencies = {}; + const lockfileDevDependencies = {}; + Object.keys(lockfileSpecs).forEach((depName) => { + var _a2, _b2, _c2; + if (!allDeps.includes(depName)) + return; + specifiers[depName] = lockfileSpecs[depName]; + if ((_a2 = importer.dependencies) === null || _a2 === void 0 ? void 0 : _a2[depName]) { + lockfileDependencies[depName] = importer.dependencies[depName]; + } else if ((_b2 = importer.optionalDependencies) === null || _b2 === void 0 ? void 0 : _b2[depName]) { + lockfileOptionalDependencies[depName] = importer.optionalDependencies[depName]; + } else if ((_c2 = importer.devDependencies) === null || _c2 === void 0 ? void 0 : _c2[depName]) { + lockfileDevDependencies[depName] = importer.devDependencies[depName]; + } + }); + if (importer.dependencies != null) { + for (const dep of Object.keys(importer.dependencies)) { + if (!lockfileDependencies[dep] && importer.dependencies[dep].startsWith("link:") && !(lockfileSpecs[dep] && !allDeps[dep])) { + lockfileDependencies[dep] = importer.dependencies[dep]; + } + } + } + const updatedImporter = { + specifiers + }; + const prunnedLockfile = { + importers: { + ...lockfile.importers, + [importerId]: updatedImporter + }, + lockfileVersion: lockfile.lockfileVersion || constants_1.LOCKFILE_VERSION, + packages: lockfile.packages + }; + if (!isEmpty_1.default(packages)) { + prunnedLockfile.packages = packages; + } + if (!isEmpty_1.default(lockfileDependencies)) { + updatedImporter.dependencies = lockfileDependencies; + } + if (!isEmpty_1.default(lockfileOptionalDependencies)) { + updatedImporter.optionalDependencies = lockfileOptionalDependencies; + } + if (!isEmpty_1.default(lockfileDevDependencies)) { + updatedImporter.devDependencies = lockfileDevDependencies; + } + return pruneSharedLockfile(prunnedLockfile, opts); + } + exports2.pruneLockfile = pruneLockfile; + function copyPackageSnapshots(originalPackages, opts) { + const copiedSnapshots = {}; + const ctx = { + copiedSnapshots, + nonOptional: new Set(), + notProdOnly: new Set(), + originalPackages, + walked: new Set(), + warn: opts.warn + }; + copyDependencySubGraph(ctx, opts.devDepPaths, { + dev: true, + optional: false + }); + copyDependencySubGraph(ctx, opts.optionalDepPaths, { + dev: false, + optional: true + }); + copyDependencySubGraph(ctx, opts.prodDepPaths, { + dev: false, + optional: false + }); + return copiedSnapshots; + } + function resolvedDepsToDepPaths(deps) { + return Object.entries(deps).map(([alias, ref]) => dependency_path_1.refToRelative(ref, alias)).filter((depPath) => depPath !== null); + } + function copyDependencySubGraph(ctx, depPaths, opts) { + var _a, _b, _c, _d; + for (const depPath of depPaths) { + const key = `${depPath}:${opts.optional.toString()}:${opts.dev.toString()}`; + if (ctx.walked.has(key)) + continue; + ctx.walked.add(key); + if (!ctx.originalPackages[depPath]) { + if (depPath.startsWith("link:") || depPath.startsWith("file:") && !depPath.endsWith(".tar.gz")) + continue; + ctx.warn(`Cannot find resolution of ${depPath} in lockfile`); + continue; + } + const depLockfile = ctx.originalPackages[depPath]; + ctx.copiedSnapshots[depPath] = depLockfile; + if (opts.optional && !ctx.nonOptional.has(depPath)) { + depLockfile.optional = true; + } else { + ctx.nonOptional.add(depPath); + delete depLockfile.optional; + } + if (opts.dev) { + ctx.notProdOnly.add(depPath); + depLockfile.dev = true; + } else if (depLockfile.dev === true) { + delete depLockfile.dev; + } else if (depLockfile.dev === void 0 && !ctx.notProdOnly.has(depPath)) { + depLockfile.dev = false; + } + const newDependencies = resolvedDepsToDepPaths(omit_1.default((_b = Object.keys((_a = depLockfile.peerDependencies) !== null && _a !== void 0 ? _a : {})) !== null && _b !== void 0 ? _b : [], (_c = depLockfile.dependencies) !== null && _c !== void 0 ? _c : {})); + copyDependencySubGraph(ctx, newDependencies, opts); + const newOptionalDependencies = resolvedDepsToDepPaths((_d = depLockfile.optionalDependencies) !== null && _d !== void 0 ? _d : {}); + copyDependencySubGraph(ctx, newOptionalDependencies, { dev: opts.dev, optional: true }); + } + } + } +}); + +// ../../node_modules/.pnpm/symlink-dir@5.0.1/node_modules/symlink-dir/dist/index.js +var require_dist11 = __commonJS({ + "../../node_modules/.pnpm/symlink-dir@5.0.1/node_modules/symlink-dir/dist/index.js"(exports2, module2) { + "use strict"; + var betterPathResolve = require_better_path_resolve(); + var fs_1 = require("fs"); + var path = require("path"); + var renameOverwrite = require_rename_overwrite(); + var IS_WINDOWS = process.platform === "win32" || /^(msys|cygwin)$/.test(process.env.OSTYPE); + var symlinkType = IS_WINDOWS ? "junction" : "dir"; + var resolveSrc = IS_WINDOWS ? resolveSrcOnWin : resolveSrcOnNonWin; + function resolveSrcOnWin(src, dest) { + return `${src}\\`; + } + function resolveSrcOnNonWin(src, dest) { + return path.relative(path.dirname(dest), src); + } + function symlinkDir(src, dest) { + dest = betterPathResolve(dest); + src = betterPathResolve(src); + if (src === dest) + throw new Error(`Symlink path is the same as the target path (${src})`); + src = resolveSrc(src, dest); + return forceSymlink(src, dest); + } + async function forceSymlink(src, dest) { + try { + await fs_1.promises.symlink(src, dest, symlinkType); + return { reused: false }; + } catch (err) { + switch (err.code) { + case "ENOENT": + try { + await fs_1.promises.mkdir(path.dirname(dest), { recursive: true }); + } catch (mkdirError) { + mkdirError.message = `Error while trying to symlink "${src}" to "${dest}". The error happened while trying to create the parent directory for the symlink target. Details: ${mkdirError}`; + throw mkdirError; + } + await forceSymlink(src, dest); + return { reused: false }; + case "EEXIST": + case "EISDIR": + break; + default: + throw err; + } + } + let linkString; + try { + linkString = await fs_1.promises.readlink(dest); + } catch (err) { + const parentDir = path.dirname(dest); + const ignore = `.ignored_${path.basename(dest)}`; + await renameOverwrite(dest, path.join(parentDir, ignore)); + return { + ...await forceSymlink(src, dest), + warn: `Symlink wanted name was occupied by directory or file. Old entity moved: "${parentDir}${path.sep}{${path.basename(dest)} => ${ignore}}".` + }; + } + if (src === linkString) { + return { reused: true }; + } + await fs_1.promises.unlink(dest); + return await forceSymlink(src, dest); + } + symlinkDir["default"] = symlinkDir; + module2.exports = symlinkDir; + } +}); + +// ../symlink-dependency/lib/symlinkDirectRootDependency.js +var require_symlinkDirectRootDependency = __commonJS({ + "../symlink-dependency/lib/symlinkDirectRootDependency.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var core_loggers_1 = require_lib12(); + var symlink_dir_1 = __importDefault(require_dist11()); + var DEP_TYPE_BY_DEPS_FIELD_NAME = { + dependencies: "prod", + devDependencies: "dev", + optionalDependencies: "optional" + }; + async function symlinkDirectRootDependency(dependencyLocation, destModulesDir, importAs, opts) { + let destModulesDirReal; + try { + destModulesDirReal = await fs_1.promises.realpath(destModulesDir); + } catch (err) { + if (err.code === "ENOENT") { + await fs_1.promises.mkdir(destModulesDir, { recursive: true }); + destModulesDirReal = await fs_1.promises.realpath(destModulesDir); + } else { + throw err; + } + } + const dependencyRealocation = await fs_1.promises.realpath(dependencyLocation); + const dest = path_1.default.join(destModulesDirReal, importAs); + const { reused } = await symlink_dir_1.default(dependencyRealocation, dest); + if (reused) + return; + core_loggers_1.rootLogger.debug({ + added: { + dependencyType: opts.fromDependenciesField && DEP_TYPE_BY_DEPS_FIELD_NAME[opts.fromDependenciesField], + linkedFrom: dependencyRealocation, + name: importAs, + realName: opts.linkedPackage.name, + version: opts.linkedPackage.version + }, + prefix: opts.prefix + }); + } + exports2.default = symlinkDirectRootDependency; + } +}); + +// ../symlink-dependency/lib/index.js +var require_lib75 = __commonJS({ + "../symlink-dependency/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.symlinkDirectRootDependency = void 0; + var path_1 = __importDefault(require("path")); + var core_loggers_1 = require_lib12(); + var symlink_dir_1 = __importDefault(require_dist11()); + var symlinkDirectRootDependency_1 = __importDefault(require_symlinkDirectRootDependency()); + exports2.symlinkDirectRootDependency = symlinkDirectRootDependency_1.default; + async function symlinkDependency(dependencyRealLocation, destModulesDir, importAs) { + const link = path_1.default.join(destModulesDir, importAs); + core_loggers_1.linkLogger.debug({ target: dependencyRealLocation, link }); + return symlink_dir_1.default(dependencyRealLocation, link); + } + exports2.default = symlinkDependency; + } +}); + +// ../supi/lib/link/options.js +var require_options2 = __commonJS({ + "../supi/lib/link/options.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.extendOptions = void 0; + var path_1 = __importDefault(require("path")); + var normalize_registries_1 = __importStar2(require_lib65()); + async function extendOptions(opts) { + if (opts) { + for (const key in opts) { + if (opts[key] === void 0) { + delete opts[key]; + } + } + } + const defaultOpts = await defaults(opts); + const extendedOpts = { ...defaultOpts, ...opts, storeDir: defaultOpts.storeDir }; + extendedOpts.registries = normalize_registries_1.default(extendedOpts.registries); + return extendedOpts; + } + exports2.extendOptions = extendOptions; + async function defaults(opts) { + var _a, _b; + const dir = (_a = opts.dir) !== null && _a !== void 0 ? _a : process.cwd(); + return { + binsDir: path_1.default.join(dir, "node_modules", ".bin"), + dir, + force: false, + forceSharedLockfile: false, + hoistPattern: void 0, + lockfileDir: (_b = opts.lockfileDir) !== null && _b !== void 0 ? _b : dir, + registries: normalize_registries_1.DEFAULT_REGISTRIES, + storeController: opts.storeController, + storeDir: opts.storeDir, + useLockfile: true + }; + } + } +}); + +// ../supi/lib/link/index.js +var require_link = __commonJS({ + "../supi/lib/link/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.linkToGlobal = exports2.linkFromGlobal = void 0; + var path_1 = __importDefault(require("path")); + var core_loggers_1 = require_lib12(); + var error_1 = __importDefault(require_lib8()); + var get_context_1 = require_lib67(); + var link_bins_1 = require_lib70(); + var lockfile_file_1 = require_lib57(); + var logger_1 = __importStar2(require_lib6()); + var manifest_utils_1 = require_lib15(); + var modules_cleaner_1 = require_lib73(); + var prune_lockfile_1 = require_lib74(); + var read_project_manifest_1 = __importDefault(require_lib19()); + var symlink_dependency_1 = require_lib75(); + var types_1 = require_lib14(); + var normalize_path_1 = __importDefault(require_normalize_path()); + var path_absolute_1 = __importDefault(require_path_absolute()); + var clone_1 = __importDefault(require_clone3()); + var options_1 = require_options2(); + async function link(linkFromPkgs, destModules, maybeOpts) { + var _a, _b, _c; + const reporter = maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.reporter; + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.on("data", reporter); + } + const opts = await options_1.extendOptions(maybeOpts); + const ctx = await get_context_1.getContextForSingleImporter(opts.manifest, { + ...opts, + extraBinPaths: [] + }, true); + const importerId = lockfile_file_1.getLockfileImporterId(ctx.lockfileDir, opts.dir); + const currentLockfile = clone_1.default(ctx.currentLockfile); + const linkedPkgs = []; + const specsToUpsert = []; + for (const linkFrom of linkFromPkgs) { + let linkFromPath; + let linkFromAlias; + if (typeof linkFrom === "string") { + linkFromPath = linkFrom; + } else { + linkFromPath = linkFrom.path; + linkFromAlias = linkFrom.alias; + } + const { manifest } = await read_project_manifest_1.default(linkFromPath); + if (typeof linkFrom === "string" && manifest.name === void 0) { + throw new error_1.default("INVALID_PACKAGE_NAME", `Package in ${linkFromPath} must have a name field to be linked`); + } + specsToUpsert.push({ + alias: manifest.name, + pref: manifest_utils_1.getPref(manifest.name, manifest.name, manifest.version, { + pinnedVersion: opts.pinnedVersion + }), + saveType: (_a = opts.targetDependenciesField) !== null && _a !== void 0 ? _a : ctx.manifest && manifest_utils_1.guessDependencyType(manifest.name, ctx.manifest) + }); + const packagePath = normalize_path_1.default(path_1.default.relative(opts.dir, linkFromPath)); + const addLinkOpts = { + linkedPkgName: linkFromAlias !== null && linkFromAlias !== void 0 ? linkFromAlias : manifest.name, + manifest: ctx.manifest, + packagePath + }; + addLinkToLockfile(ctx.currentLockfile.importers[importerId], addLinkOpts); + addLinkToLockfile(ctx.wantedLockfile.importers[importerId], addLinkOpts); + linkedPkgs.push({ + alias: linkFromAlias !== null && linkFromAlias !== void 0 ? linkFromAlias : manifest.name, + manifest, + path: linkFromPath + }); + } + const updatedCurrentLockfile = prune_lockfile_1.pruneSharedLockfile(ctx.currentLockfile); + const warn = (message2) => logger_1.default.warn({ message: message2, prefix: opts.dir }); + const updatedWantedLockfile = prune_lockfile_1.pruneSharedLockfile(ctx.wantedLockfile, { warn }); + await modules_cleaner_1.prune([ + { + binsDir: opts.binsDir, + id: importerId, + modulesDir: ctx.modulesDir, + rootDir: opts.dir + } + ], { + currentLockfile, + hoistedDependencies: ctx.hoistedDependencies, + hoistedModulesDir: opts.hoistPattern != null ? ctx.hoistedModulesDir : void 0, + include: ctx.include, + lockfileDir: opts.lockfileDir, + publicHoistedModulesDir: opts.publicHoistPattern != null ? ctx.rootModulesDir : void 0, + registries: ctx.registries, + skipped: ctx.skipped, + storeController: opts.storeController, + virtualStoreDir: ctx.virtualStoreDir, + wantedLockfile: updatedCurrentLockfile + }); + for (const { alias, manifest, path } of linkedPkgs) { + const stu = specsToUpsert.find((s) => s.alias === manifest.name); + await symlink_dependency_1.symlinkDirectRootDependency(path, destModules, alias, { + fromDependenciesField: (_b = stu === null || stu === void 0 ? void 0 : stu.saveType) !== null && _b !== void 0 ? _b : opts.targetDependenciesField, + linkedPackage: manifest, + prefix: opts.dir + }); + } + const linkToBin = (_c = maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.linkToBin) !== null && _c !== void 0 ? _c : path_1.default.join(destModules, ".bin"); + await link_bins_1.linkBinsOfPackages(linkedPkgs.map((p) => ({ manifest: p.manifest, location: p.path })), linkToBin, { + warn: (message2) => logger_1.default.info({ message: message2, prefix: opts.dir }) + }); + let newPkg; + if (opts.targetDependenciesField) { + newPkg = await manifest_utils_1.updateProjectManifestObject(opts.dir, opts.manifest, specsToUpsert); + for (const { alias } of specsToUpsert) { + updatedWantedLockfile.importers[importerId].specifiers[alias] = manifest_utils_1.getSpecFromPackageManifest(newPkg, alias); + } + } else { + newPkg = opts.manifest; + } + const lockfileOpts = { forceSharedFormat: opts.forceSharedLockfile }; + if (opts.useLockfile) { + await lockfile_file_1.writeLockfiles({ + currentLockfile: updatedCurrentLockfile, + currentLockfileDir: ctx.virtualStoreDir, + wantedLockfile: updatedWantedLockfile, + wantedLockfileDir: ctx.lockfileDir, + ...lockfileOpts + }); + } else { + await lockfile_file_1.writeCurrentLockfile(ctx.virtualStoreDir, updatedCurrentLockfile, lockfileOpts); + } + core_loggers_1.summaryLogger.debug({ prefix: opts.dir }); + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.removeListener("data", reporter); + } + return newPkg; + } + exports2.default = link; + function addLinkToLockfile(projectSnapshot, opts) { + var _a, _b, _c; + const id = `link:${opts.packagePath}`; + let addedTo; + for (const depType of types_1.DEPENDENCIES_FIELDS) { + if (!addedTo && ((_b = (_a = opts.manifest) === null || _a === void 0 ? void 0 : _a[depType]) === null || _b === void 0 ? void 0 : _b[opts.linkedPkgName])) { + addedTo = depType; + projectSnapshot[depType] = (_c = projectSnapshot[depType]) !== null && _c !== void 0 ? _c : {}; + projectSnapshot[depType][opts.linkedPkgName] = id; + } else if (projectSnapshot[depType] != null) { + delete projectSnapshot[depType][opts.linkedPkgName]; + } + } + if (opts.manifest == null) + return; + const availableSpec = manifest_utils_1.getSpecFromPackageManifest(opts.manifest, opts.linkedPkgName); + if (availableSpec) { + projectSnapshot.specifiers[opts.linkedPkgName] = availableSpec; + } else { + delete projectSnapshot.specifiers[opts.linkedPkgName]; + } + } + async function linkFromGlobal(pkgNames, linkTo, maybeOpts) { + const reporter = maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.reporter; + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.on("data", reporter); + } + const opts = await options_1.extendOptions(maybeOpts); + const globalPkgPath = path_absolute_1.default(maybeOpts.globalDir); + const linkFromPkgs = pkgNames.map((pkgName) => path_1.default.join(globalPkgPath, "node_modules", pkgName)); + const newManifest = await link(linkFromPkgs, path_1.default.join(linkTo, "node_modules"), opts); + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.removeListener("data", reporter); + } + return newManifest; + } + exports2.linkFromGlobal = linkFromGlobal; + async function linkToGlobal(linkFrom, maybeOpts) { + var _a; + const reporter = maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.reporter; + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.on("data", reporter); + } + maybeOpts.lockfileDir = (_a = maybeOpts.lockfileDir) !== null && _a !== void 0 ? _a : maybeOpts.globalDir; + const opts = await options_1.extendOptions(maybeOpts); + const globalPkgPath = path_absolute_1.default(maybeOpts.globalDir); + const newManifest = await link([linkFrom], path_1.default.join(globalPkgPath, "node_modules"), { + ...opts, + dir: maybeOpts.globalDir, + linkToBin: maybeOpts.globalBin + }); + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.removeListener("data", reporter); + } + return newManifest; + } + exports2.linkToGlobal = linkToGlobal; + } +}); + +// ../../node_modules/.pnpm/@zkochan+npm-lifecycle@5.1.2/node_modules/@zkochan/npm-lifecycle/lib/spawn.js +var require_spawn = __commonJS({ + "../../node_modules/.pnpm/@zkochan+npm-lifecycle@5.1.2/node_modules/@zkochan/npm-lifecycle/lib/spawn.js"(exports2, module2) { + "use strict"; + module2.exports = spawn; + var _spawn = require("child_process").spawn; + var EventEmitter = require("events").EventEmitter; + var progressEnabled; + var running = 0; + function startRunning(log2) { + if (progressEnabled == null) + progressEnabled = log2.progressEnabled; + if (progressEnabled) + log2.disableProgress(); + ++running; + } + function stopRunning(log2) { + --running; + if (progressEnabled && running === 0) + log2.enableProgress(); + } + function willCmdOutput(stdio) { + if (stdio === "inherit") + return true; + if (!Array.isArray(stdio)) + return false; + for (let fh = 1; fh <= 2; ++fh) { + if (stdio[fh] === "inherit") + return true; + if (stdio[fh] === 1 || stdio[fh] === 2) + return true; + } + return false; + } + function spawn(cmd, args2, options, log2) { + const cmdWillOutput = willCmdOutput(options && options.stdio); + if (cmdWillOutput) + startRunning(log2); + const raw = _spawn(cmd, args2, options); + const cooked = new EventEmitter(); + raw.on("error", function(er) { + if (cmdWillOutput) + stopRunning(log2); + er.file = cmd; + cooked.emit("error", er); + }).on("close", function(code, signal) { + if (cmdWillOutput) + stopRunning(log2); + if (code === 127) { + const er = new Error("spawn ENOENT"); + er.code = "ENOENT"; + er.errno = "ENOENT"; + er.syscall = "spawn"; + er.file = cmd; + cooked.emit("error", er); + } else { + cooked.emit("close", code, signal); + } + }); + cooked.stdin = raw.stdin; + cooked.stdout = raw.stdout; + cooked.stderr = raw.stderr; + cooked.kill = function(sig) { + return raw.kill(sig); + }; + return cooked; + } + } +}); + +// ../../node_modules/.pnpm/tslib@1.14.1/node_modules/tslib/tslib.js +var require_tslib = __commonJS({ + "../../node_modules/.pnpm/tslib@1.14.1/node_modules/tslib/tslib.js"(exports2, module2) { + var __extends; + var __assign; + var __rest; + var __decorate; + var __param; + var __metadata; + var __awaiter; + var __generator; + var __exportStar; + var __values; + var __read; + var __spread; + var __spreadArrays; + var __await; + var __asyncGenerator; + var __asyncDelegator; + var __asyncValues; + var __makeTemplateObject; + var __importStar2; + var __importDefault; + var __classPrivateFieldGet; + var __classPrivateFieldSet; + var __createBinding2; + (function(factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function(exports3) { + factory(createExporter(root, createExporter(exports3))); + }); + } else if (typeof module2 === "object" && typeof module2.exports === "object") { + factory(createExporter(root, createExporter(module2.exports))); + } else { + factory(createExporter(root)); + } + function createExporter(exports3, previous) { + if (exports3 !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports3, "__esModule", { value: true }); + } else { + exports3.__esModule = true; + } + } + return function(id, v) { + return exports3[id] = previous ? previous(id, v) : v; + }; + } + })(function(exporter) { + var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) { + d.__proto__ = b; + } || function(d, b) { + for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; + }; + __extends = function(d, b) { + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + __rest = function(s, e) { + var t = {}; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + __decorate = function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") + r = Reflect.decorate(decorators, target, key, desc); + else + for (var i = decorators.length - 1; i >= 0; i--) + if (d = decorators[i]) + r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + __param = function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + __metadata = function(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") + return Reflect.metadata(metadataKey, metadataValue); + }; + __awaiter = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + __generator = function(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) + throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) + throw new TypeError("Generator is already executing."); + while (_) + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) + return t; + if (y = 0, t) + op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + __createBinding2 = function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }; + __exportStar = function(m, exports3) { + for (var p in m) + if (p !== "default" && !exports3.hasOwnProperty(p)) + exports3[p] = m[p]; + }; + __values = function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + __read = function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + __spread = function() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + __spreadArrays = function() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) + s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + __await = function(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + __asyncGenerator = function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) + i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) + resume(q[0][0], q[0][1]); + } + }; + __asyncDelegator = function(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function(e) { + throw e; + }), verb("return"), i[Symbol.iterator] = function() { + return this; + }, i; + function verb(n, f) { + i[n] = o[n] ? function(v) { + return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; + } : f; + } + }; + __asyncValues = function(o) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve({ value: v2, done: d }); + }, reject); + } + }; + __makeTemplateObject = function(cooked, raw) { + if (Object.defineProperty) { + Object.defineProperty(cooked, "raw", { value: raw }); + } else { + cooked.raw = raw; + } + return cooked; + }; + __importStar2 = function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) + result[k] = mod[k]; + } + result["default"] = mod; + return result; + }; + __importDefault = function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + __classPrivateFieldGet = function(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); + }; + __classPrivateFieldSet = function(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; + }; + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding2); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar2); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + }); + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/constants.js +var require_constants10 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.S_IFLNK = exports2.S_IFREG = exports2.S_IFDIR = exports2.S_IFMT = void 0; + exports2.S_IFMT = 61440; + exports2.S_IFDIR = 16384; + exports2.S_IFREG = 32768; + exports2.S_IFLNK = 40960; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/statUtils.js +var require_statUtils = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/statUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.areStatsEqual = exports2.convertToBigIntStats = exports2.clearStats = exports2.makeEmptyStats = exports2.makeDefaultStats = exports2.BigIntStatsEntry = exports2.StatEntry = exports2.DirEntry = void 0; + var tslib_1 = require_tslib(); + var nodeUtils = (0, tslib_1.__importStar)(require("util")); + var constants_1 = require_constants10(); + var DirEntry = class { + constructor() { + this.name = ``; + this.mode = 0; + } + isBlockDevice() { + return false; + } + isCharacterDevice() { + return false; + } + isDirectory() { + return (this.mode & constants_1.S_IFMT) === constants_1.S_IFDIR; + } + isFIFO() { + return false; + } + isFile() { + return (this.mode & constants_1.S_IFMT) === constants_1.S_IFREG; + } + isSocket() { + return false; + } + isSymbolicLink() { + return (this.mode & constants_1.S_IFMT) === constants_1.S_IFLNK; + } + }; + exports2.DirEntry = DirEntry; + var StatEntry = class { + constructor() { + this.uid = 0; + this.gid = 0; + this.size = 0; + this.blksize = 0; + this.atimeMs = 0; + this.mtimeMs = 0; + this.ctimeMs = 0; + this.birthtimeMs = 0; + this.atime = new Date(0); + this.mtime = new Date(0); + this.ctime = new Date(0); + this.birthtime = new Date(0); + this.dev = 0; + this.ino = 0; + this.mode = constants_1.S_IFREG | 420; + this.nlink = 1; + this.rdev = 0; + this.blocks = 1; + } + isBlockDevice() { + return false; + } + isCharacterDevice() { + return false; + } + isDirectory() { + return (this.mode & constants_1.S_IFMT) === constants_1.S_IFDIR; + } + isFIFO() { + return false; + } + isFile() { + return (this.mode & constants_1.S_IFMT) === constants_1.S_IFREG; + } + isSocket() { + return false; + } + isSymbolicLink() { + return (this.mode & constants_1.S_IFMT) === constants_1.S_IFLNK; + } + }; + exports2.StatEntry = StatEntry; + var BigIntStatsEntry = class { + constructor() { + this.uid = BigInt(0); + this.gid = BigInt(0); + this.size = BigInt(0); + this.blksize = BigInt(0); + this.atimeMs = BigInt(0); + this.mtimeMs = BigInt(0); + this.ctimeMs = BigInt(0); + this.birthtimeMs = BigInt(0); + this.atimeNs = BigInt(0); + this.mtimeNs = BigInt(0); + this.ctimeNs = BigInt(0); + this.birthtimeNs = BigInt(0); + this.atime = new Date(0); + this.mtime = new Date(0); + this.ctime = new Date(0); + this.birthtime = new Date(0); + this.dev = BigInt(0); + this.ino = BigInt(0); + this.mode = BigInt(constants_1.S_IFREG | 420); + this.nlink = BigInt(1); + this.rdev = BigInt(0); + this.blocks = BigInt(1); + } + isBlockDevice() { + return false; + } + isCharacterDevice() { + return false; + } + isDirectory() { + return (this.mode & BigInt(constants_1.S_IFMT)) === BigInt(constants_1.S_IFDIR); + } + isFIFO() { + return false; + } + isFile() { + return (this.mode & BigInt(constants_1.S_IFMT)) === BigInt(constants_1.S_IFREG); + } + isSocket() { + return false; + } + isSymbolicLink() { + return (this.mode & BigInt(constants_1.S_IFMT)) === BigInt(constants_1.S_IFLNK); + } + }; + exports2.BigIntStatsEntry = BigIntStatsEntry; + function makeDefaultStats() { + return new StatEntry(); + } + exports2.makeDefaultStats = makeDefaultStats; + function makeEmptyStats() { + return clearStats(makeDefaultStats()); + } + exports2.makeEmptyStats = makeEmptyStats; + function clearStats(stats) { + for (const key in stats) { + if (Object.prototype.hasOwnProperty.call(stats, key)) { + const element = stats[key]; + if (typeof element === `number`) { + stats[key] = 0; + } else if (typeof element === `bigint`) { + stats[key] = BigInt(0); + } else if (nodeUtils.types.isDate(element)) { + stats[key] = new Date(0); + } + } + } + return stats; + } + exports2.clearStats = clearStats; + function convertToBigIntStats(stats) { + const bigintStats = new BigIntStatsEntry(); + for (const key in stats) { + if (Object.prototype.hasOwnProperty.call(stats, key)) { + const element = stats[key]; + if (typeof element === `number`) { + bigintStats[key] = BigInt(element); + } else if (nodeUtils.types.isDate(element)) { + bigintStats[key] = new Date(element); + } + } + } + bigintStats.atimeNs = bigintStats.atimeMs * BigInt(1e6); + bigintStats.mtimeNs = bigintStats.mtimeMs * BigInt(1e6); + bigintStats.ctimeNs = bigintStats.ctimeMs * BigInt(1e6); + bigintStats.birthtimeNs = bigintStats.birthtimeMs * BigInt(1e6); + return bigintStats; + } + exports2.convertToBigIntStats = convertToBigIntStats; + function areStatsEqual(a, b) { + if (a.atimeMs !== b.atimeMs) + return false; + if (a.birthtimeMs !== b.birthtimeMs) + return false; + if (a.blksize !== b.blksize) + return false; + if (a.blocks !== b.blocks) + return false; + if (a.ctimeMs !== b.ctimeMs) + return false; + if (a.dev !== b.dev) + return false; + if (a.gid !== b.gid) + return false; + if (a.ino !== b.ino) + return false; + if (a.isBlockDevice() !== b.isBlockDevice()) + return false; + if (a.isCharacterDevice() !== b.isCharacterDevice()) + return false; + if (a.isDirectory() !== b.isDirectory()) + return false; + if (a.isFIFO() !== b.isFIFO()) + return false; + if (a.isFile() !== b.isFile()) + return false; + if (a.isSocket() !== b.isSocket()) + return false; + if (a.isSymbolicLink() !== b.isSymbolicLink()) + return false; + if (a.mode !== b.mode) + return false; + if (a.mtimeMs !== b.mtimeMs) + return false; + if (a.nlink !== b.nlink) + return false; + if (a.rdev !== b.rdev) + return false; + if (a.size !== b.size) + return false; + if (a.uid !== b.uid) + return false; + const aN = a; + const bN = b; + if (aN.atimeNs !== bN.atimeNs) + return false; + if (aN.mtimeNs !== bN.mtimeNs) + return false; + if (aN.ctimeNs !== bN.ctimeNs) + return false; + if (aN.birthtimeNs !== bN.birthtimeNs) + return false; + return true; + } + exports2.areStatsEqual = areStatsEqual; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/path.js +var require_path4 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/path.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toFilename = exports2.convertPath = exports2.ppath = exports2.npath = exports2.Filename = exports2.PortablePath = void 0; + var tslib_1 = require_tslib(); + var path_1 = (0, tslib_1.__importDefault)(require("path")); + var PathType; + (function(PathType2) { + PathType2[PathType2["File"] = 0] = "File"; + PathType2[PathType2["Portable"] = 1] = "Portable"; + PathType2[PathType2["Native"] = 2] = "Native"; + })(PathType || (PathType = {})); + exports2.PortablePath = { + root: `/`, + dot: `.` + }; + exports2.Filename = { + nodeModules: `node_modules`, + manifest: `package.json`, + lockfile: `yarn.lock`, + virtual: `__virtual__`, + pnpJs: `.pnp.js`, + pnpCjs: `.pnp.cjs`, + rc: `.yarnrc.yml` + }; + exports2.npath = Object.create(path_1.default); + exports2.ppath = Object.create(path_1.default.posix); + exports2.npath.cwd = () => process.cwd(); + exports2.ppath.cwd = () => toPortablePath(process.cwd()); + exports2.ppath.resolve = (...segments) => { + if (segments.length > 0 && exports2.ppath.isAbsolute(segments[0])) { + return path_1.default.posix.resolve(...segments); + } else { + return path_1.default.posix.resolve(exports2.ppath.cwd(), ...segments); + } + }; + var contains = function(pathUtils, from, to) { + from = pathUtils.normalize(from); + to = pathUtils.normalize(to); + if (from === to) + return `.`; + if (!from.endsWith(pathUtils.sep)) + from = from + pathUtils.sep; + if (to.startsWith(from)) { + return to.slice(from.length); + } else { + return null; + } + }; + exports2.npath.fromPortablePath = fromPortablePath; + exports2.npath.toPortablePath = toPortablePath; + exports2.npath.contains = (from, to) => contains(exports2.npath, from, to); + exports2.ppath.contains = (from, to) => contains(exports2.ppath, from, to); + var WINDOWS_PATH_REGEXP = /^([a-zA-Z]:.*)$/; + var UNC_WINDOWS_PATH_REGEXP = /^\\\\(\.\\)?(.*)$/; + var PORTABLE_PATH_REGEXP = /^\/([a-zA-Z]:.*)$/; + var UNC_PORTABLE_PATH_REGEXP = /^\/unc\/(\.dot\/)?(.*)$/; + function fromPortablePath(p) { + if (process.platform !== `win32`) + return p; + if (p.match(PORTABLE_PATH_REGEXP)) + p = p.replace(PORTABLE_PATH_REGEXP, `$1`); + else if (p.match(UNC_PORTABLE_PATH_REGEXP)) + p = p.replace(UNC_PORTABLE_PATH_REGEXP, (match, p1, p2) => `\\\\${p1 ? `.\\` : ``}${p2}`); + else + return p; + return p.replace(/\//g, `\\`); + } + function toPortablePath(p) { + if (process.platform !== `win32`) + return p; + if (p.match(WINDOWS_PATH_REGEXP)) + p = p.replace(WINDOWS_PATH_REGEXP, `/$1`); + else if (p.match(UNC_WINDOWS_PATH_REGEXP)) + p = p.replace(UNC_WINDOWS_PATH_REGEXP, (match, p1, p2) => `/unc/${p1 ? `.dot/` : ``}${p2}`); + return p.replace(/\\/g, `/`); + } + function convertPath(targetPathUtils, sourcePath) { + return targetPathUtils === exports2.npath ? fromPortablePath(sourcePath) : toPortablePath(sourcePath); + } + exports2.convertPath = convertPath; + function toFilename(filename) { + if (exports2.npath.parse(filename).dir !== `` || exports2.ppath.parse(filename).dir !== ``) + throw new Error(`Invalid filename: "${filename}"`); + return filename; + } + exports2.toFilename = toFilename; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/algorithms/copyPromise.js +var require_copyPromise = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/algorithms/copyPromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.copyPromise = exports2.LinkStrategy = void 0; + var tslib_1 = require_tslib(); + var fs_1 = (0, tslib_1.__importDefault)(require("fs")); + var path_1 = require_path4(); + var defaultTime = new Date(315532800 * 1e3); + var LinkStrategy; + (function(LinkStrategy2) { + LinkStrategy2["Allow"] = "allow"; + LinkStrategy2["ReadOnly"] = "readOnly"; + })(LinkStrategy = exports2.LinkStrategy || (exports2.LinkStrategy = {})); + async function copyPromise(destinationFs, destination, sourceFs, source, opts) { + const normalizedDestination = destinationFs.pathUtils.normalize(destination); + const normalizedSource = sourceFs.pathUtils.normalize(source); + const prelayout = []; + const postlayout = []; + await destinationFs.mkdirPromise(destinationFs.pathUtils.dirname(destination), { recursive: true }); + const updateTime = typeof destinationFs.lutimesPromise === `function` ? destinationFs.lutimesPromise.bind(destinationFs) : destinationFs.utimesPromise.bind(destinationFs); + await copyImpl(prelayout, postlayout, updateTime, destinationFs, normalizedDestination, sourceFs, normalizedSource, opts); + for (const operation of prelayout) + await operation(); + await Promise.all(postlayout.map((operation) => { + return operation(); + })); + } + exports2.copyPromise = copyPromise; + async function copyImpl(prelayout, postlayout, updateTime, destinationFs, destination, sourceFs, source, opts) { + var _a, _b; + const destinationStat = await maybeLStat(destinationFs, destination); + const sourceStat = await sourceFs.lstatPromise(source); + const referenceTime = opts.stableTime ? { mtime: defaultTime, atime: defaultTime } : sourceStat; + let updated; + switch (true) { + case sourceStat.isDirectory(): + { + updated = await copyFolder(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts); + } + break; + case sourceStat.isFile(): + { + updated = await copyFile(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts); + } + break; + case sourceStat.isSymbolicLink(): + { + updated = await copySymlink(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts); + } + break; + default: + { + throw new Error(`Unsupported file type (${sourceStat.mode})`); + } + break; + } + if (updated || ((_a = destinationStat === null || destinationStat === void 0 ? void 0 : destinationStat.mtime) === null || _a === void 0 ? void 0 : _a.getTime()) !== referenceTime.mtime.getTime() || ((_b = destinationStat === null || destinationStat === void 0 ? void 0 : destinationStat.atime) === null || _b === void 0 ? void 0 : _b.getTime()) !== referenceTime.atime.getTime()) { + postlayout.push(() => updateTime(destination, referenceTime.atime, referenceTime.mtime)); + updated = true; + } + if (destinationStat === null || (destinationStat.mode & 511) !== (sourceStat.mode & 511)) { + postlayout.push(() => destinationFs.chmodPromise(destination, sourceStat.mode & 511)); + updated = true; + } + return updated; + } + async function maybeLStat(baseFs, p) { + try { + return await baseFs.lstatPromise(p); + } catch (e) { + return null; + } + } + async function copyFolder(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts) { + if (destinationStat !== null && !destinationStat.isDirectory()) { + if (opts.overwrite) { + prelayout.push(async () => destinationFs.removePromise(destination)); + destinationStat = null; + } else { + return false; + } + } + let updated = false; + if (destinationStat === null) { + prelayout.push(async () => destinationFs.mkdirPromise(destination, { mode: sourceStat.mode })); + updated = true; + } + const entries = await sourceFs.readdirPromise(source); + if (opts.stableSort) { + for (const entry of entries.sort()) { + if (await copyImpl(prelayout, postlayout, updateTime, destinationFs, destinationFs.pathUtils.join(destination, entry), sourceFs, sourceFs.pathUtils.join(source, entry), opts)) { + updated = true; + } + } + } else { + const entriesUpdateStatus = await Promise.all(entries.map(async (entry) => { + await copyImpl(prelayout, postlayout, updateTime, destinationFs, destinationFs.pathUtils.join(destination, entry), sourceFs, sourceFs.pathUtils.join(source, entry), opts); + })); + if (entriesUpdateStatus.some((status) => status)) { + updated = true; + } + } + return updated; + } + var isCloneSupportedCache = new WeakMap(); + function makeLinkOperation(opFs, destination, source, sourceStat, linkStrategy) { + return async () => { + await opFs.linkPromise(source, destination); + if (linkStrategy === LinkStrategy.ReadOnly) { + sourceStat.mode &= ~146; + await opFs.chmodPromise(destination, sourceStat.mode); + } + }; + } + function makeCloneLinkOperation(opFs, destination, source, sourceStat, linkStrategy) { + const isCloneSupported = isCloneSupportedCache.get(opFs); + if (typeof isCloneSupported === `undefined`) { + return async () => { + try { + await opFs.copyFilePromise(source, destination, fs_1.default.constants.COPYFILE_FICLONE_FORCE); + isCloneSupportedCache.set(opFs, true); + } catch (err) { + if (err.code === `ENOSYS` || err.code === `ENOTSUP`) { + isCloneSupportedCache.set(opFs, false); + await makeLinkOperation(opFs, destination, source, sourceStat, linkStrategy)(); + } else { + throw err; + } + } + }; + } else { + if (isCloneSupported) { + return async () => opFs.copyFilePromise(source, destination, fs_1.default.constants.COPYFILE_FICLONE_FORCE); + } else { + return makeLinkOperation(opFs, destination, source, sourceStat, linkStrategy); + } + } + } + async function copyFile(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts) { + var _a; + if (destinationStat !== null) { + if (opts.overwrite) { + prelayout.push(async () => destinationFs.removePromise(destination)); + destinationStat = null; + } else { + return false; + } + } + const linkStrategy = (_a = opts.linkStrategy) !== null && _a !== void 0 ? _a : null; + const op = destinationFs === sourceFs ? linkStrategy !== null ? makeCloneLinkOperation(destinationFs, destination, source, sourceStat, linkStrategy) : async () => destinationFs.copyFilePromise(source, destination, fs_1.default.constants.COPYFILE_FICLONE) : linkStrategy !== null ? makeLinkOperation(destinationFs, destination, source, sourceStat, linkStrategy) : async () => destinationFs.writeFilePromise(destination, await sourceFs.readFilePromise(source)); + prelayout.push(async () => op()); + return true; + } + async function copySymlink(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts) { + if (destinationStat !== null) { + if (opts.overwrite) { + prelayout.push(async () => destinationFs.removePromise(destination)); + destinationStat = null; + } else { + return false; + } + } + prelayout.push(async () => { + await destinationFs.symlinkPromise((0, path_1.convertPath)(destinationFs.pathUtils, await sourceFs.readlinkPromise(source)), destination); + }); + return true; + } + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/errors.js +var require_errors4 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/errors.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LibzipError = exports2.ERR_DIR_CLOSED = exports2.EOPNOTSUPP = exports2.ENOTEMPTY = exports2.EROFS = exports2.EEXIST = exports2.EISDIR = exports2.ENOTDIR = exports2.ENOENT = exports2.EBADF = exports2.EINVAL = exports2.ENOSYS = exports2.EBUSY = void 0; + function makeError(code, message2) { + return Object.assign(new Error(`${code}: ${message2}`), { code }); + } + function EBUSY(message2) { + return makeError(`EBUSY`, message2); + } + exports2.EBUSY = EBUSY; + function ENOSYS(message2, reason) { + return makeError(`ENOSYS`, `${message2}, ${reason}`); + } + exports2.ENOSYS = ENOSYS; + function EINVAL(reason) { + return makeError(`EINVAL`, `invalid argument, ${reason}`); + } + exports2.EINVAL = EINVAL; + function EBADF(reason) { + return makeError(`EBADF`, `bad file descriptor, ${reason}`); + } + exports2.EBADF = EBADF; + function ENOENT(reason) { + return makeError(`ENOENT`, `no such file or directory, ${reason}`); + } + exports2.ENOENT = ENOENT; + function ENOTDIR(reason) { + return makeError(`ENOTDIR`, `not a directory, ${reason}`); + } + exports2.ENOTDIR = ENOTDIR; + function EISDIR(reason) { + return makeError(`EISDIR`, `illegal operation on a directory, ${reason}`); + } + exports2.EISDIR = EISDIR; + function EEXIST(reason) { + return makeError(`EEXIST`, `file already exists, ${reason}`); + } + exports2.EEXIST = EEXIST; + function EROFS(reason) { + return makeError(`EROFS`, `read-only filesystem, ${reason}`); + } + exports2.EROFS = EROFS; + function ENOTEMPTY(reason) { + return makeError(`ENOTEMPTY`, `directory not empty, ${reason}`); + } + exports2.ENOTEMPTY = ENOTEMPTY; + function EOPNOTSUPP(reason) { + return makeError(`EOPNOTSUPP`, `operation not supported, ${reason}`); + } + exports2.EOPNOTSUPP = EOPNOTSUPP; + function ERR_DIR_CLOSED() { + return makeError(`ERR_DIR_CLOSED`, `Directory handle was closed`); + } + exports2.ERR_DIR_CLOSED = ERR_DIR_CLOSED; + var LibzipError = class extends Error { + constructor(message2, code) { + super(message2); + this.name = `Libzip Error`; + this.code = code; + } + }; + exports2.LibzipError = LibzipError; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/algorithms/opendir.js +var require_opendir = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/algorithms/opendir.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.opendir = exports2.CustomDir = void 0; + var tslib_1 = require_tslib(); + var errors = (0, tslib_1.__importStar)(require_errors4()); + var CustomDir = class { + constructor(path, nextDirent, opts = {}) { + this.path = path; + this.nextDirent = nextDirent; + this.opts = opts; + this.closed = false; + } + throwIfClosed() { + if (this.closed) { + throw errors.ERR_DIR_CLOSED(); + } + } + async *[Symbol.asyncIterator]() { + try { + let dirent; + while ((dirent = await this.read()) !== null) { + yield dirent; + } + } finally { + await this.close(); + } + } + read(cb) { + const dirent = this.readSync(); + if (typeof cb !== `undefined`) + return cb(null, dirent); + return Promise.resolve(dirent); + } + readSync() { + this.throwIfClosed(); + return this.nextDirent(); + } + close(cb) { + this.closeSync(); + if (typeof cb !== `undefined`) + return cb(null); + return Promise.resolve(); + } + closeSync() { + var _a, _b; + this.throwIfClosed(); + (_b = (_a = this.opts).onClose) === null || _b === void 0 ? void 0 : _b.call(_a); + this.closed = true; + } + }; + exports2.CustomDir = CustomDir; + function opendir(fakeFs, path, entries, opts) { + const nextDirent = () => { + const filename = entries.shift(); + if (typeof filename === `undefined`) + return null; + return Object.assign(fakeFs.statSync(fakeFs.pathUtils.join(path, filename)), { + name: filename + }); + }; + return new CustomDir(path, nextDirent, opts); + } + exports2.opendir = opendir; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/FakeFS.js +var require_FakeFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/FakeFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.normalizeLineEndings = exports2.BasePortableFakeFS = exports2.FakeFS = void 0; + var os_1 = require("os"); + var copyPromise_1 = require_copyPromise(); + var path_1 = require_path4(); + var FakeFS = class { + constructor(pathUtils) { + this.pathUtils = pathUtils; + } + async *genTraversePromise(init, { stableSort = false } = {}) { + const stack2 = [init]; + while (stack2.length > 0) { + const p = stack2.shift(); + const entry = await this.lstatPromise(p); + if (entry.isDirectory()) { + const entries = await this.readdirPromise(p); + if (stableSort) { + for (const entry2 of entries.sort()) { + stack2.push(this.pathUtils.join(p, entry2)); + } + } else { + throw new Error(`Not supported`); + } + } else { + yield p; + } + } + } + async removePromise(p, { recursive = true, maxRetries = 5 } = {}) { + let stat; + try { + stat = await this.lstatPromise(p); + } catch (error) { + if (error.code === `ENOENT`) { + return; + } else { + throw error; + } + } + if (stat.isDirectory()) { + if (recursive) { + const entries = await this.readdirPromise(p); + await Promise.all(entries.map((entry) => { + return this.removePromise(this.pathUtils.resolve(p, entry)); + })); + } + let t = 0; + do { + try { + await this.rmdirPromise(p); + break; + } catch (error) { + if (error.code === `EBUSY` || error.code === `ENOTEMPTY`) { + if (maxRetries === 0) { + break; + } else { + await new Promise((resolve) => setTimeout(resolve, t * 100)); + continue; + } + } else { + throw error; + } + } + } while (t++ < maxRetries); + } else { + await this.unlinkPromise(p); + } + } + removeSync(p, { recursive = true } = {}) { + let stat; + try { + stat = this.lstatSync(p); + } catch (error) { + if (error.code === `ENOENT`) { + return; + } else { + throw error; + } + } + if (stat.isDirectory()) { + if (recursive) + for (const entry of this.readdirSync(p)) + this.removeSync(this.pathUtils.resolve(p, entry)); + this.rmdirSync(p); + } else { + this.unlinkSync(p); + } + } + async mkdirpPromise(p, { chmod, utimes } = {}) { + p = this.resolve(p); + if (p === this.pathUtils.dirname(p)) + return; + const parts = p.split(this.pathUtils.sep); + for (let u = 2; u <= parts.length; ++u) { + const subPath = parts.slice(0, u).join(this.pathUtils.sep); + if (!this.existsSync(subPath)) { + try { + await this.mkdirPromise(subPath); + } catch (error) { + if (error.code === `EEXIST`) { + continue; + } else { + throw error; + } + } + if (chmod != null) + await this.chmodPromise(subPath, chmod); + if (utimes != null) { + await this.utimesPromise(subPath, utimes[0], utimes[1]); + } else { + const parentStat = await this.statPromise(this.pathUtils.dirname(subPath)); + await this.utimesPromise(subPath, parentStat.atime, parentStat.mtime); + } + } + } + } + mkdirpSync(p, { chmod, utimes } = {}) { + p = this.resolve(p); + if (p === this.pathUtils.dirname(p)) + return; + const parts = p.split(this.pathUtils.sep); + for (let u = 2; u <= parts.length; ++u) { + const subPath = parts.slice(0, u).join(this.pathUtils.sep); + if (!this.existsSync(subPath)) { + try { + this.mkdirSync(subPath); + } catch (error) { + if (error.code === `EEXIST`) { + continue; + } else { + throw error; + } + } + if (chmod != null) + this.chmodSync(subPath, chmod); + if (utimes != null) { + this.utimesSync(subPath, utimes[0], utimes[1]); + } else { + const parentStat = this.statSync(this.pathUtils.dirname(subPath)); + this.utimesSync(subPath, parentStat.atime, parentStat.mtime); + } + } + } + } + async copyPromise(destination, source, { baseFs = this, overwrite = true, stableSort = false, stableTime = false, linkStrategy = null } = {}) { + return await (0, copyPromise_1.copyPromise)(this, destination, baseFs, source, { overwrite, stableSort, stableTime, linkStrategy }); + } + copySync(destination, source, { baseFs = this, overwrite = true } = {}) { + const stat = baseFs.lstatSync(source); + const exists = this.existsSync(destination); + if (stat.isDirectory()) { + this.mkdirpSync(destination); + const directoryListing = baseFs.readdirSync(source); + for (const entry of directoryListing) { + this.copySync(this.pathUtils.join(destination, entry), baseFs.pathUtils.join(source, entry), { baseFs, overwrite }); + } + } else if (stat.isFile()) { + if (!exists || overwrite) { + if (exists) + this.removeSync(destination); + const content = baseFs.readFileSync(source); + this.writeFileSync(destination, content); + } + } else if (stat.isSymbolicLink()) { + if (!exists || overwrite) { + if (exists) + this.removeSync(destination); + const target = baseFs.readlinkSync(source); + this.symlinkSync((0, path_1.convertPath)(this.pathUtils, target), destination); + } + } else { + throw new Error(`Unsupported file type (file: ${source}, mode: 0o${stat.mode.toString(8).padStart(6, `0`)})`); + } + const mode = stat.mode & 511; + this.chmodSync(destination, mode); + } + async changeFilePromise(p, content, opts = {}) { + if (Buffer.isBuffer(content)) { + return this.changeFileBufferPromise(p, content); + } else { + return this.changeFileTextPromise(p, content, opts); + } + } + async changeFileBufferPromise(p, content) { + let current = Buffer.alloc(0); + try { + current = await this.readFilePromise(p); + } catch (error) { + } + if (Buffer.compare(current, content) === 0) + return; + await this.writeFilePromise(p, content); + } + async changeFileTextPromise(p, content, { automaticNewlines } = {}) { + let current = ``; + try { + current = await this.readFilePromise(p, `utf8`); + } catch (error) { + } + const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; + if (current === normalizedContent) + return; + await this.writeFilePromise(p, normalizedContent); + } + changeFileSync(p, content, opts = {}) { + if (Buffer.isBuffer(content)) { + return this.changeFileBufferSync(p, content); + } else { + return this.changeFileTextSync(p, content, opts); + } + } + changeFileBufferSync(p, content) { + let current = Buffer.alloc(0); + try { + current = this.readFileSync(p); + } catch (error) { + } + if (Buffer.compare(current, content) === 0) + return; + this.writeFileSync(p, content); + } + changeFileTextSync(p, content, { automaticNewlines = false } = {}) { + let current = ``; + try { + current = this.readFileSync(p, `utf8`); + } catch (error) { + } + const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; + if (current === normalizedContent) + return; + this.writeFileSync(p, normalizedContent); + } + async movePromise(fromP, toP) { + try { + await this.renamePromise(fromP, toP); + } catch (error) { + if (error.code === `EXDEV`) { + await this.copyPromise(toP, fromP); + await this.removePromise(fromP); + } else { + throw error; + } + } + } + moveSync(fromP, toP) { + try { + this.renameSync(fromP, toP); + } catch (error) { + if (error.code === `EXDEV`) { + this.copySync(toP, fromP); + this.removeSync(fromP); + } else { + throw error; + } + } + } + async lockPromise(affectedPath, callback) { + const lockPath = `${affectedPath}.flock`; + const interval = 1e3 / 60; + const startTime = Date.now(); + let fd = null; + const isAlive = async () => { + let pid; + try { + [pid] = await this.readJsonPromise(lockPath); + } catch (error) { + return Date.now() - startTime < 500; + } + try { + process.kill(pid, 0); + return true; + } catch (error) { + return false; + } + }; + while (fd === null) { + try { + fd = await this.openPromise(lockPath, `wx`); + } catch (error) { + if (error.code === `EEXIST`) { + if (!await isAlive()) { + try { + await this.unlinkPromise(lockPath); + continue; + } catch (error2) { + } + } + if (Date.now() - startTime < 60 * 1e3) { + await new Promise((resolve) => setTimeout(resolve, interval)); + } else { + throw new Error(`Couldn't acquire a lock in a reasonable time (via ${lockPath})`); + } + } else { + throw error; + } + } + } + await this.writePromise(fd, JSON.stringify([process.pid])); + try { + return await callback(); + } finally { + try { + await this.closePromise(fd); + await this.unlinkPromise(lockPath); + } catch (error) { + } + } + } + async readJsonPromise(p) { + const content = await this.readFilePromise(p, `utf8`); + try { + return JSON.parse(content); + } catch (error) { + error.message += ` (in ${p})`; + throw error; + } + } + readJsonSync(p) { + const content = this.readFileSync(p, `utf8`); + try { + return JSON.parse(content); + } catch (error) { + error.message += ` (in ${p})`; + throw error; + } + } + async writeJsonPromise(p, data) { + return await this.writeFilePromise(p, `${JSON.stringify(data, null, 2)} +`); + } + writeJsonSync(p, data) { + return this.writeFileSync(p, `${JSON.stringify(data, null, 2)} +`); + } + async preserveTimePromise(p, cb) { + const stat = await this.lstatPromise(p); + const result = await cb(); + if (typeof result !== `undefined`) + p = result; + if (this.lutimesPromise) { + await this.lutimesPromise(p, stat.atime, stat.mtime); + } else if (!stat.isSymbolicLink()) { + await this.utimesPromise(p, stat.atime, stat.mtime); + } + } + async preserveTimeSync(p, cb) { + const stat = this.lstatSync(p); + const result = cb(); + if (typeof result !== `undefined`) + p = result; + if (this.lutimesSync) { + this.lutimesSync(p, stat.atime, stat.mtime); + } else if (!stat.isSymbolicLink()) { + this.utimesSync(p, stat.atime, stat.mtime); + } + } + }; + exports2.FakeFS = FakeFS; + FakeFS.DEFAULT_TIME = 315532800; + var BasePortableFakeFS = class extends FakeFS { + constructor() { + super(path_1.ppath); + } + }; + exports2.BasePortableFakeFS = BasePortableFakeFS; + function getEndOfLine(content) { + const matches = content.match(/\r?\n/g); + if (matches === null) + return os_1.EOL; + const crlf = matches.filter((nl) => nl === `\r +`).length; + const lf = matches.length - crlf; + return crlf > lf ? `\r +` : ` +`; + } + function normalizeLineEndings(originalContent, newContent) { + return newContent.replace(/\r?\n/g, getEndOfLine(originalContent)); + } + exports2.normalizeLineEndings = normalizeLineEndings; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/NodeFS.js +var require_NodeFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/NodeFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NodeFS = void 0; + var tslib_1 = require_tslib(); + var fs_1 = (0, tslib_1.__importDefault)(require("fs")); + var FakeFS_1 = require_FakeFS(); + var errors_1 = require_errors4(); + var path_1 = require_path4(); + var NodeFS = class extends FakeFS_1.BasePortableFakeFS { + constructor(realFs = fs_1.default) { + super(); + this.realFs = realFs; + if (typeof this.realFs.lutimes !== `undefined`) { + this.lutimesPromise = this.lutimesPromiseImpl; + this.lutimesSync = this.lutimesSyncImpl; + } + } + getExtractHint() { + return false; + } + getRealPath() { + return path_1.PortablePath.root; + } + resolve(p) { + return path_1.ppath.resolve(p); + } + async openPromise(p, flags, mode) { + return await new Promise((resolve, reject) => { + this.realFs.open(path_1.npath.fromPortablePath(p), flags, mode, this.makeCallback(resolve, reject)); + }); + } + openSync(p, flags, mode) { + return this.realFs.openSync(path_1.npath.fromPortablePath(p), flags, mode); + } + async opendirPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (typeof opts !== `undefined`) { + this.realFs.opendir(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.opendir(path_1.npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + } + }).then((dir) => { + return Object.defineProperty(dir, `path`, { value: p, configurable: true, writable: true }); + }); + } + opendirSync(p, opts) { + const dir = typeof opts !== `undefined` ? this.realFs.opendirSync(path_1.npath.fromPortablePath(p), opts) : this.realFs.opendirSync(path_1.npath.fromPortablePath(p)); + return Object.defineProperty(dir, `path`, { value: p, configurable: true, writable: true }); + } + async readPromise(fd, buffer, offset = 0, length = 0, position = -1) { + return await new Promise((resolve, reject) => { + this.realFs.read(fd, buffer, offset, length, position, (error, bytesRead) => { + if (error) { + reject(error); + } else { + resolve(bytesRead); + } + }); + }); + } + readSync(fd, buffer, offset, length, position) { + return this.realFs.readSync(fd, buffer, offset, length, position); + } + async writePromise(fd, buffer, offset, length, position) { + return await new Promise((resolve, reject) => { + if (typeof buffer === `string`) { + return this.realFs.write(fd, buffer, offset, this.makeCallback(resolve, reject)); + } else { + return this.realFs.write(fd, buffer, offset, length, position, this.makeCallback(resolve, reject)); + } + }); + } + writeSync(fd, buffer, offset, length, position) { + if (typeof buffer === `string`) { + return this.realFs.writeSync(fd, buffer, offset); + } else { + return this.realFs.writeSync(fd, buffer, offset, length, position); + } + } + async closePromise(fd) { + await new Promise((resolve, reject) => { + this.realFs.close(fd, this.makeCallback(resolve, reject)); + }); + } + closeSync(fd) { + this.realFs.closeSync(fd); + } + createReadStream(p, opts) { + const realPath = p !== null ? path_1.npath.fromPortablePath(p) : p; + return this.realFs.createReadStream(realPath, opts); + } + createWriteStream(p, opts) { + const realPath = p !== null ? path_1.npath.fromPortablePath(p) : p; + return this.realFs.createWriteStream(realPath, opts); + } + async realpathPromise(p) { + return await new Promise((resolve, reject) => { + this.realFs.realpath(path_1.npath.fromPortablePath(p), {}, this.makeCallback(resolve, reject)); + }).then((path) => { + return path_1.npath.toPortablePath(path); + }); + } + realpathSync(p) { + return path_1.npath.toPortablePath(this.realFs.realpathSync(path_1.npath.fromPortablePath(p), {})); + } + async existsPromise(p) { + return await new Promise((resolve) => { + this.realFs.exists(path_1.npath.fromPortablePath(p), resolve); + }); + } + accessSync(p, mode) { + return this.realFs.accessSync(path_1.npath.fromPortablePath(p), mode); + } + async accessPromise(p, mode) { + return await new Promise((resolve, reject) => { + this.realFs.access(path_1.npath.fromPortablePath(p), mode, this.makeCallback(resolve, reject)); + }); + } + existsSync(p) { + return this.realFs.existsSync(path_1.npath.fromPortablePath(p)); + } + async statPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (opts) { + this.realFs.stat(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.stat(path_1.npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + } + }); + } + statSync(p, opts) { + if (opts) { + return this.realFs.statSync(path_1.npath.fromPortablePath(p), opts); + } else { + return this.realFs.statSync(path_1.npath.fromPortablePath(p)); + } + } + async fstatPromise(fd, opts) { + return await new Promise((resolve, reject) => { + if (opts) { + this.realFs.fstat(fd, opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.fstat(fd, this.makeCallback(resolve, reject)); + } + }); + } + fstatSync(fd, opts) { + if (opts) { + return this.realFs.fstatSync(fd, opts); + } else { + return this.realFs.fstatSync(fd); + } + } + async lstatPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (opts) { + this.realFs.lstat(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.lstat(path_1.npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + } + }); + } + lstatSync(p, opts) { + if (opts) { + return this.realFs.lstatSync(path_1.npath.fromPortablePath(p), opts); + } else { + return this.realFs.lstatSync(path_1.npath.fromPortablePath(p)); + } + } + async chmodPromise(p, mask) { + return await new Promise((resolve, reject) => { + this.realFs.chmod(path_1.npath.fromPortablePath(p), mask, this.makeCallback(resolve, reject)); + }); + } + chmodSync(p, mask) { + return this.realFs.chmodSync(path_1.npath.fromPortablePath(p), mask); + } + async chownPromise(p, uid, gid) { + return await new Promise((resolve, reject) => { + this.realFs.chown(path_1.npath.fromPortablePath(p), uid, gid, this.makeCallback(resolve, reject)); + }); + } + chownSync(p, uid, gid) { + return this.realFs.chownSync(path_1.npath.fromPortablePath(p), uid, gid); + } + async renamePromise(oldP, newP) { + return await new Promise((resolve, reject) => { + this.realFs.rename(path_1.npath.fromPortablePath(oldP), path_1.npath.fromPortablePath(newP), this.makeCallback(resolve, reject)); + }); + } + renameSync(oldP, newP) { + return this.realFs.renameSync(path_1.npath.fromPortablePath(oldP), path_1.npath.fromPortablePath(newP)); + } + async copyFilePromise(sourceP, destP, flags = 0) { + return await new Promise((resolve, reject) => { + this.realFs.copyFile(path_1.npath.fromPortablePath(sourceP), path_1.npath.fromPortablePath(destP), flags, this.makeCallback(resolve, reject)); + }); + } + copyFileSync(sourceP, destP, flags = 0) { + return this.realFs.copyFileSync(path_1.npath.fromPortablePath(sourceP), path_1.npath.fromPortablePath(destP), flags); + } + async appendFilePromise(p, content, opts) { + return await new Promise((resolve, reject) => { + const fsNativePath = typeof p === `string` ? path_1.npath.fromPortablePath(p) : p; + if (opts) { + this.realFs.appendFile(fsNativePath, content, opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.appendFile(fsNativePath, content, this.makeCallback(resolve, reject)); + } + }); + } + appendFileSync(p, content, opts) { + const fsNativePath = typeof p === `string` ? path_1.npath.fromPortablePath(p) : p; + if (opts) { + this.realFs.appendFileSync(fsNativePath, content, opts); + } else { + this.realFs.appendFileSync(fsNativePath, content); + } + } + async writeFilePromise(p, content, opts) { + return await new Promise((resolve, reject) => { + const fsNativePath = typeof p === `string` ? path_1.npath.fromPortablePath(p) : p; + if (opts) { + this.realFs.writeFile(fsNativePath, content, opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.writeFile(fsNativePath, content, this.makeCallback(resolve, reject)); + } + }); + } + writeFileSync(p, content, opts) { + const fsNativePath = typeof p === `string` ? path_1.npath.fromPortablePath(p) : p; + if (opts) { + this.realFs.writeFileSync(fsNativePath, content, opts); + } else { + this.realFs.writeFileSync(fsNativePath, content); + } + } + async unlinkPromise(p) { + return await new Promise((resolve, reject) => { + this.realFs.unlink(path_1.npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + }); + } + unlinkSync(p) { + return this.realFs.unlinkSync(path_1.npath.fromPortablePath(p)); + } + async utimesPromise(p, atime, mtime) { + return await new Promise((resolve, reject) => { + this.realFs.utimes(path_1.npath.fromPortablePath(p), atime, mtime, this.makeCallback(resolve, reject)); + }); + } + utimesSync(p, atime, mtime) { + this.realFs.utimesSync(path_1.npath.fromPortablePath(p), atime, mtime); + } + async lutimesPromiseImpl(p, atime, mtime) { + const lutimes = this.realFs.lutimes; + if (typeof lutimes === `undefined`) + throw (0, errors_1.ENOSYS)(`unavailable Node binding`, `lutimes '${p}'`); + return await new Promise((resolve, reject) => { + lutimes.call(this.realFs, path_1.npath.fromPortablePath(p), atime, mtime, this.makeCallback(resolve, reject)); + }); + } + lutimesSyncImpl(p, atime, mtime) { + const lutimesSync = this.realFs.lutimesSync; + if (typeof lutimesSync === `undefined`) + throw (0, errors_1.ENOSYS)(`unavailable Node binding`, `lutimes '${p}'`); + lutimesSync.call(this.realFs, path_1.npath.fromPortablePath(p), atime, mtime); + } + async mkdirPromise(p, opts) { + return await new Promise((resolve, reject) => { + this.realFs.mkdir(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + }); + } + mkdirSync(p, opts) { + return this.realFs.mkdirSync(path_1.npath.fromPortablePath(p), opts); + } + async rmdirPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (opts) { + this.realFs.rmdir(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.rmdir(path_1.npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + } + }); + } + rmdirSync(p, opts) { + return this.realFs.rmdirSync(path_1.npath.fromPortablePath(p), opts); + } + async linkPromise(existingP, newP) { + return await new Promise((resolve, reject) => { + this.realFs.link(path_1.npath.fromPortablePath(existingP), path_1.npath.fromPortablePath(newP), this.makeCallback(resolve, reject)); + }); + } + linkSync(existingP, newP) { + return this.realFs.linkSync(path_1.npath.fromPortablePath(existingP), path_1.npath.fromPortablePath(newP)); + } + async symlinkPromise(target, p, type) { + return await new Promise((resolve, reject) => { + this.realFs.symlink(path_1.npath.fromPortablePath(target.replace(/\/+$/, ``)), path_1.npath.fromPortablePath(p), type, this.makeCallback(resolve, reject)); + }); + } + symlinkSync(target, p, type) { + return this.realFs.symlinkSync(path_1.npath.fromPortablePath(target.replace(/\/+$/, ``)), path_1.npath.fromPortablePath(p), type); + } + async readFilePromise(p, encoding) { + return await new Promise((resolve, reject) => { + const fsNativePath = typeof p === `string` ? path_1.npath.fromPortablePath(p) : p; + this.realFs.readFile(fsNativePath, encoding, this.makeCallback(resolve, reject)); + }); + } + readFileSync(p, encoding) { + const fsNativePath = typeof p === `string` ? path_1.npath.fromPortablePath(p) : p; + return this.realFs.readFileSync(fsNativePath, encoding); + } + async readdirPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (opts === null || opts === void 0 ? void 0 : opts.withFileTypes) { + this.realFs.readdir(path_1.npath.fromPortablePath(p), { withFileTypes: true }, this.makeCallback(resolve, reject)); + } else { + this.realFs.readdir(path_1.npath.fromPortablePath(p), this.makeCallback((value) => resolve(value), reject)); + } + }); + } + readdirSync(p, opts) { + if (opts === null || opts === void 0 ? void 0 : opts.withFileTypes) { + return this.realFs.readdirSync(path_1.npath.fromPortablePath(p), { withFileTypes: true }); + } else { + return this.realFs.readdirSync(path_1.npath.fromPortablePath(p)); + } + } + async readlinkPromise(p) { + return await new Promise((resolve, reject) => { + this.realFs.readlink(path_1.npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + }).then((path) => { + return path_1.npath.toPortablePath(path); + }); + } + readlinkSync(p) { + return path_1.npath.toPortablePath(this.realFs.readlinkSync(path_1.npath.fromPortablePath(p))); + } + async truncatePromise(p, len) { + return await new Promise((resolve, reject) => { + this.realFs.truncate(path_1.npath.fromPortablePath(p), len, this.makeCallback(resolve, reject)); + }); + } + truncateSync(p, len) { + return this.realFs.truncateSync(path_1.npath.fromPortablePath(p), len); + } + watch(p, a, b) { + return this.realFs.watch(path_1.npath.fromPortablePath(p), a, b); + } + watchFile(p, a, b) { + return this.realFs.watchFile(path_1.npath.fromPortablePath(p), a, b); + } + unwatchFile(p, cb) { + return this.realFs.unwatchFile(path_1.npath.fromPortablePath(p), cb); + } + makeCallback(resolve, reject) { + return (err, result) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }; + } + }; + exports2.NodeFS = NodeFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/algorithms/watchFile/CustomStatWatcher.js +var require_CustomStatWatcher = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/algorithms/watchFile/CustomStatWatcher.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CustomStatWatcher = exports2.assertStatus = exports2.Status = exports2.Event = void 0; + var tslib_1 = require_tslib(); + var events_1 = require("events"); + var statUtils = (0, tslib_1.__importStar)(require_statUtils()); + var Event; + (function(Event2) { + Event2["Change"] = "change"; + Event2["Stop"] = "stop"; + })(Event = exports2.Event || (exports2.Event = {})); + var Status; + (function(Status2) { + Status2["Ready"] = "ready"; + Status2["Running"] = "running"; + Status2["Stopped"] = "stopped"; + })(Status = exports2.Status || (exports2.Status = {})); + function assertStatus(current, expected) { + if (current !== expected) { + throw new Error(`Invalid StatWatcher status: expected '${expected}', got '${current}'`); + } + } + exports2.assertStatus = assertStatus; + var CustomStatWatcher = class extends events_1.EventEmitter { + constructor(fakeFs, path, { bigint = false } = {}) { + super(); + this.status = Status.Ready; + this.changeListeners = new Map(); + this.startTimeout = null; + this.fakeFs = fakeFs; + this.path = path; + this.bigint = bigint; + this.lastStats = this.stat(); + } + static create(fakeFs, path, opts) { + const statWatcher = new CustomStatWatcher(fakeFs, path, opts); + statWatcher.start(); + return statWatcher; + } + start() { + assertStatus(this.status, Status.Ready); + this.status = Status.Running; + this.startTimeout = setTimeout(() => { + this.startTimeout = null; + if (!this.fakeFs.existsSync(this.path)) { + this.emit(Event.Change, this.lastStats, this.lastStats); + } + }, 3); + } + stop() { + assertStatus(this.status, Status.Running); + this.status = Status.Stopped; + if (this.startTimeout !== null) { + clearTimeout(this.startTimeout); + this.startTimeout = null; + } + this.emit(Event.Stop); + } + stat() { + try { + return this.fakeFs.statSync(this.path, { bigint: this.bigint }); + } catch (error) { + if (error.code === `ENOENT`) { + const statInstance = this.bigint ? new statUtils.BigIntStatsEntry() : new statUtils.StatEntry(); + return statUtils.clearStats(statInstance); + } else { + throw error; + } + } + } + makeInterval(opts) { + const interval = setInterval(() => { + const currentStats = this.stat(); + const previousStats = this.lastStats; + if (statUtils.areStatsEqual(currentStats, previousStats)) + return; + this.lastStats = currentStats; + this.emit(Event.Change, currentStats, previousStats); + }, opts.interval); + return opts.persistent ? interval : interval.unref(); + } + registerChangeListener(listener, opts) { + this.addListener(Event.Change, listener); + this.changeListeners.set(listener, this.makeInterval(opts)); + } + unregisterChangeListener(listener) { + this.removeListener(Event.Change, listener); + const interval = this.changeListeners.get(listener); + if (typeof interval !== `undefined`) + clearInterval(interval); + this.changeListeners.delete(listener); + } + unregisterAllChangeListeners() { + for (const listener of this.changeListeners.keys()) { + this.unregisterChangeListener(listener); + } + } + hasChangeListeners() { + return this.changeListeners.size > 0; + } + ref() { + for (const interval of this.changeListeners.values()) + interval.ref(); + return this; + } + unref() { + for (const interval of this.changeListeners.values()) + interval.unref(); + return this; + } + }; + exports2.CustomStatWatcher = CustomStatWatcher; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/algorithms/watchFile.js +var require_watchFile = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/algorithms/watchFile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.unwatchAllFiles = exports2.unwatchFile = exports2.watchFile = void 0; + var CustomStatWatcher_1 = require_CustomStatWatcher(); + var statWatchersByFakeFS = new WeakMap(); + function watchFile(fakeFs, path, a, b) { + let bigint; + let persistent; + let interval; + let listener; + switch (typeof a) { + case `function`: + { + bigint = false; + persistent = true; + interval = 5007; + listener = a; + } + break; + default: + { + ({ + bigint = false, + persistent = true, + interval = 5007 + } = a); + listener = b; + } + break; + } + let statWatchers = statWatchersByFakeFS.get(fakeFs); + if (typeof statWatchers === `undefined`) + statWatchersByFakeFS.set(fakeFs, statWatchers = new Map()); + let statWatcher = statWatchers.get(path); + if (typeof statWatcher === `undefined`) { + statWatcher = CustomStatWatcher_1.CustomStatWatcher.create(fakeFs, path, { bigint }); + statWatchers.set(path, statWatcher); + } + statWatcher.registerChangeListener(listener, { persistent, interval }); + return statWatcher; + } + exports2.watchFile = watchFile; + function unwatchFile(fakeFs, path, cb) { + const statWatchers = statWatchersByFakeFS.get(fakeFs); + if (typeof statWatchers === `undefined`) + return; + const statWatcher = statWatchers.get(path); + if (typeof statWatcher === `undefined`) + return; + if (typeof cb === `undefined`) + statWatcher.unregisterAllChangeListeners(); + else + statWatcher.unregisterChangeListener(cb); + if (!statWatcher.hasChangeListeners()) { + statWatcher.stop(); + statWatchers.delete(path); + } + } + exports2.unwatchFile = unwatchFile; + function unwatchAllFiles(fakeFs) { + const statWatchers = statWatchersByFakeFS.get(fakeFs); + if (typeof statWatchers === `undefined`) + return; + for (const path of statWatchers.keys()) { + unwatchFile(fakeFs, path); + } + } + exports2.unwatchAllFiles = unwatchAllFiles; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/ZipFS.js +var require_ZipFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/ZipFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ZipFS = exports2.DEFAULT_COMPRESSION_LEVEL = void 0; + var tslib_1 = require_tslib(); + var fs_1 = require("fs"); + var stream_1 = require("stream"); + var util_1 = require("util"); + var zlib_1 = (0, tslib_1.__importDefault)(require("zlib")); + var FakeFS_1 = require_FakeFS(); + var NodeFS_1 = require_NodeFS(); + var opendir_1 = require_opendir(); + var watchFile_1 = require_watchFile(); + var constants_1 = require_constants10(); + var errors = (0, tslib_1.__importStar)(require_errors4()); + var path_1 = require_path4(); + var statUtils = (0, tslib_1.__importStar)(require_statUtils()); + exports2.DEFAULT_COMPRESSION_LEVEL = `mixed`; + function toUnixTimestamp(time) { + if (typeof time === `string` && String(+time) === time) + return +time; + if (Number.isFinite(time)) { + if (time < 0) { + return Date.now() / 1e3; + } else { + return time; + } + } + if ((0, util_1.isDate)(time)) + return time.getTime() / 1e3; + throw new Error(`Invalid time`); + } + var ZipFS = class extends FakeFS_1.BasePortableFakeFS { + constructor(source, opts) { + super(); + this.lzSource = null; + this.listings = new Map(); + this.entries = new Map(); + this.fileSources = new Map(); + this.fds = new Map(); + this.nextFd = 0; + this.ready = false; + this.readOnly = false; + this.libzip = opts.libzip; + const pathOptions = opts; + this.level = typeof pathOptions.level !== `undefined` ? pathOptions.level : exports2.DEFAULT_COMPRESSION_LEVEL; + if (source === null) { + source = Buffer.from([ + 80, + 75, + 5, + 6, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + } + if (typeof source === `string`) { + const { baseFs = new NodeFS_1.NodeFS() } = pathOptions; + this.baseFs = baseFs; + this.path = source; + } else { + this.path = null; + this.baseFs = null; + } + if (opts.stats) { + this.stats = opts.stats; + } else { + if (typeof source === `string`) { + try { + this.stats = this.baseFs.statSync(source); + } catch (error) { + if (error.code === `ENOENT` && pathOptions.create) { + this.stats = statUtils.makeDefaultStats(); + } else { + throw error; + } + } + } else { + this.stats = statUtils.makeDefaultStats(); + } + } + const errPtr = this.libzip.malloc(4); + try { + let flags = 0; + if (typeof source === `string` && pathOptions.create) + flags |= this.libzip.ZIP_CREATE | this.libzip.ZIP_TRUNCATE; + if (opts.readOnly) { + flags |= this.libzip.ZIP_RDONLY; + this.readOnly = true; + } + if (typeof source === `string`) { + this.zip = this.libzip.open(path_1.npath.fromPortablePath(source), flags, errPtr); + } else { + const lzSource = this.allocateUnattachedSource(source); + try { + this.zip = this.libzip.openFromSource(lzSource, flags, errPtr); + this.lzSource = lzSource; + } catch (error) { + this.libzip.source.free(lzSource); + throw error; + } + } + if (this.zip === 0) { + const error = this.libzip.struct.errorS(); + this.libzip.error.initWithCode(error, this.libzip.getValue(errPtr, `i32`)); + throw this.makeLibzipError(error); + } + } finally { + this.libzip.free(errPtr); + } + this.listings.set(path_1.PortablePath.root, new Set()); + const entryCount = this.libzip.getNumEntries(this.zip, 0); + for (let t = 0; t < entryCount; ++t) { + const raw = this.libzip.getName(this.zip, t, 0); + if (path_1.ppath.isAbsolute(raw)) + continue; + const p = path_1.ppath.resolve(path_1.PortablePath.root, raw); + this.registerEntry(p, t); + if (raw.endsWith(`/`)) { + this.registerListing(p); + } + } + this.symlinkCount = this.libzip.ext.countSymlinks(this.zip); + if (this.symlinkCount === -1) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + this.ready = true; + } + makeLibzipError(error) { + const errorCode = this.libzip.struct.errorCodeZip(error); + const strerror = this.libzip.error.strerror(error); + const libzipError = new errors.LibzipError(strerror, this.libzip.errors[errorCode]); + if (errorCode === this.libzip.errors.ZIP_ER_CHANGED) + throw new Error(`Assertion failed: Unexpected libzip error: ${libzipError.message}`); + return libzipError; + } + getExtractHint(hints) { + for (const fileName of this.entries.keys()) { + const ext = this.pathUtils.extname(fileName); + if (hints.relevantExtensions.has(ext)) { + return true; + } + } + return false; + } + getAllFiles() { + return Array.from(this.entries.keys()); + } + getRealPath() { + if (!this.path) + throw new Error(`ZipFS don't have real paths when loaded from a buffer`); + return this.path; + } + getBufferAndClose() { + this.prepareClose(); + if (!this.lzSource) + throw new Error(`ZipFS was not created from a Buffer`); + try { + this.libzip.source.keep(this.lzSource); + if (this.libzip.close(this.zip) === -1) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + if (this.libzip.source.open(this.lzSource) === -1) + throw this.makeLibzipError(this.libzip.source.error(this.lzSource)); + if (this.libzip.source.seek(this.lzSource, 0, 0, this.libzip.SEEK_END) === -1) + throw this.makeLibzipError(this.libzip.source.error(this.lzSource)); + const size = this.libzip.source.tell(this.lzSource); + if (size === -1) + throw this.makeLibzipError(this.libzip.source.error(this.lzSource)); + if (this.libzip.source.seek(this.lzSource, 0, 0, this.libzip.SEEK_SET) === -1) + throw this.makeLibzipError(this.libzip.source.error(this.lzSource)); + const buffer = this.libzip.malloc(size); + if (!buffer) + throw new Error(`Couldn't allocate enough memory`); + try { + const rc = this.libzip.source.read(this.lzSource, buffer, size); + if (rc === -1) + throw this.makeLibzipError(this.libzip.source.error(this.lzSource)); + else if (rc < size) + throw new Error(`Incomplete read`); + else if (rc > size) + throw new Error(`Overread`); + const memory = this.libzip.HEAPU8.subarray(buffer, buffer + size); + return Buffer.from(memory); + } finally { + this.libzip.free(buffer); + } + } finally { + this.libzip.source.close(this.lzSource); + this.libzip.source.free(this.lzSource); + this.ready = false; + } + } + prepareClose() { + if (!this.ready) + throw errors.EBUSY(`archive closed, close`); + (0, watchFile_1.unwatchAllFiles)(this); + } + saveAndClose() { + if (!this.path || !this.baseFs) + throw new Error(`ZipFS cannot be saved and must be discarded when loaded from a buffer`); + this.prepareClose(); + if (this.readOnly) { + this.discardAndClose(); + return; + } + const previousMod = this.baseFs.existsSync(this.path) ? this.baseFs.statSync(this.path).mode & 511 : null; + const rc = this.libzip.close(this.zip); + if (rc === -1) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + if (previousMod === null) + this.baseFs.chmodSync(this.path, this.stats.mode); + else if (previousMod !== (this.baseFs.statSync(this.path).mode & 511)) + this.baseFs.chmodSync(this.path, previousMod); + this.ready = false; + } + discardAndClose() { + this.prepareClose(); + this.libzip.discard(this.zip); + this.ready = false; + } + resolve(p) { + return path_1.ppath.resolve(path_1.PortablePath.root, p); + } + async openPromise(p, flags, mode) { + return this.openSync(p, flags, mode); + } + openSync(p, flags, mode) { + const fd = this.nextFd++; + this.fds.set(fd, { cursor: 0, p }); + return fd; + } + hasOpenFileHandles() { + return !!this.fds.size; + } + async opendirPromise(p, opts) { + return this.opendirSync(p, opts); + } + opendirSync(p, opts = {}) { + const resolvedP = this.resolveFilename(`opendir '${p}'`, p); + if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) + throw errors.ENOENT(`opendir '${p}'`); + const directoryListing = this.listings.get(resolvedP); + if (!directoryListing) + throw errors.ENOTDIR(`opendir '${p}'`); + const entries = [...directoryListing]; + const fd = this.openSync(resolvedP, `r`); + const onClose = () => { + this.closeSync(fd); + }; + return (0, opendir_1.opendir)(this, resolvedP, entries, { onClose }); + } + async readPromise(fd, buffer, offset, length, position) { + return this.readSync(fd, buffer, offset, length, position); + } + readSync(fd, buffer, offset = 0, length = 0, position = -1) { + const entry = this.fds.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`read`); + let realPosition; + if (position === -1 || position === null) + realPosition = entry.cursor; + else + realPosition = position; + const source = this.readFileSync(entry.p); + source.copy(buffer, offset, realPosition, realPosition + length); + const bytesRead = Math.max(0, Math.min(source.length - realPosition, length)); + if (position === -1 || position === null) + entry.cursor += bytesRead; + return bytesRead; + } + async writePromise(fd, buffer, offset, length, position) { + if (typeof buffer === `string`) { + return this.writeSync(fd, buffer, position); + } else { + return this.writeSync(fd, buffer, offset, length, position); + } + } + writeSync(fd, buffer, offset, length, position) { + const entry = this.fds.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`read`); + throw new Error(`Unimplemented`); + } + async closePromise(fd) { + return this.closeSync(fd); + } + closeSync(fd) { + const entry = this.fds.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`read`); + this.fds.delete(fd); + } + createReadStream(p, { encoding } = {}) { + if (p === null) + throw new Error(`Unimplemented`); + const fd = this.openSync(p, `r`); + const stream = Object.assign(new stream_1.PassThrough({ + emitClose: true, + autoDestroy: true, + destroy: (error, callback) => { + clearImmediate(immediate); + this.closeSync(fd); + callback(error); + } + }), { + close() { + stream.destroy(); + }, + bytesRead: 0, + path: p + }); + const immediate = setImmediate(async () => { + try { + const data = await this.readFilePromise(p, encoding); + stream.bytesRead = data.length; + stream.end(data); + } catch (error) { + stream.destroy(error); + } + }); + return stream; + } + createWriteStream(p, { encoding } = {}) { + if (this.readOnly) + throw errors.EROFS(`open '${p}'`); + if (p === null) + throw new Error(`Unimplemented`); + const chunks = []; + const fd = this.openSync(p, `w`); + const stream = Object.assign(new stream_1.PassThrough({ + autoDestroy: true, + emitClose: true, + destroy: (error, callback) => { + try { + if (error) { + callback(error); + } else { + this.writeFileSync(p, Buffer.concat(chunks), encoding); + callback(null); + } + } catch (err) { + callback(err); + } finally { + this.closeSync(fd); + } + } + }), { + bytesWritten: 0, + path: p, + close() { + stream.destroy(); + } + }); + stream.on(`data`, (chunk) => { + const chunkBuffer = Buffer.from(chunk); + stream.bytesWritten += chunkBuffer.length; + chunks.push(chunkBuffer); + }); + return stream; + } + async realpathPromise(p) { + return this.realpathSync(p); + } + realpathSync(p) { + const resolvedP = this.resolveFilename(`lstat '${p}'`, p); + if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) + throw errors.ENOENT(`lstat '${p}'`); + return resolvedP; + } + async existsPromise(p) { + return this.existsSync(p); + } + existsSync(p) { + if (!this.ready) + throw errors.EBUSY(`archive closed, existsSync '${p}'`); + if (this.symlinkCount === 0) { + const resolvedP2 = path_1.ppath.resolve(path_1.PortablePath.root, p); + return this.entries.has(resolvedP2) || this.listings.has(resolvedP2); + } + let resolvedP; + try { + resolvedP = this.resolveFilename(`stat '${p}'`, p); + } catch (error) { + return false; + } + return this.entries.has(resolvedP) || this.listings.has(resolvedP); + } + async accessPromise(p, mode) { + return this.accessSync(p, mode); + } + accessSync(p, mode = fs_1.constants.F_OK) { + const resolvedP = this.resolveFilename(`access '${p}'`, p); + if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) + throw errors.ENOENT(`access '${p}'`); + if (this.readOnly && mode & fs_1.constants.W_OK) { + throw errors.EROFS(`access '${p}'`); + } + } + async statPromise(p, opts) { + return this.statSync(p, opts); + } + statSync(p, opts) { + const resolvedP = this.resolveFilename(`stat '${p}'`, p); + if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) + throw errors.ENOENT(`stat '${p}'`); + if (p[p.length - 1] === `/` && !this.listings.has(resolvedP)) + throw errors.ENOTDIR(`stat '${p}'`); + return this.statImpl(`stat '${p}'`, resolvedP, opts); + } + async fstatPromise(fd, opts) { + return this.fstatSync(fd, opts); + } + fstatSync(fd, opts) { + const entry = this.fds.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`fstatSync`); + const { p } = entry; + const resolvedP = this.resolveFilename(`stat '${p}'`, p); + if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) + throw errors.ENOENT(`stat '${p}'`); + if (p[p.length - 1] === `/` && !this.listings.has(resolvedP)) + throw errors.ENOTDIR(`stat '${p}'`); + return this.statImpl(`fstat '${p}'`, resolvedP, opts); + } + async lstatPromise(p, opts) { + return this.lstatSync(p, opts); + } + lstatSync(p, opts) { + const resolvedP = this.resolveFilename(`lstat '${p}'`, p, false); + if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) + throw errors.ENOENT(`lstat '${p}'`); + if (p[p.length - 1] === `/` && !this.listings.has(resolvedP)) + throw errors.ENOTDIR(`lstat '${p}'`); + return this.statImpl(`lstat '${p}'`, resolvedP, opts); + } + statImpl(reason, p, opts = {}) { + const entry = this.entries.get(p); + if (typeof entry !== `undefined`) { + const stat = this.libzip.struct.statS(); + const rc = this.libzip.statIndex(this.zip, entry, 0, 0, stat); + if (rc === -1) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + const uid = this.stats.uid; + const gid = this.stats.gid; + const size = this.libzip.struct.statSize(stat) >>> 0; + const blksize = 512; + const blocks = Math.ceil(size / blksize); + const mtimeMs = (this.libzip.struct.statMtime(stat) >>> 0) * 1e3; + const atimeMs = mtimeMs; + const birthtimeMs = mtimeMs; + const ctimeMs = mtimeMs; + const atime = new Date(atimeMs); + const birthtime = new Date(birthtimeMs); + const ctime = new Date(ctimeMs); + const mtime = new Date(mtimeMs); + const type = this.listings.has(p) ? constants_1.S_IFDIR : this.isSymbolicLink(entry) ? constants_1.S_IFLNK : constants_1.S_IFREG; + const defaultMode = type === constants_1.S_IFDIR ? 493 : 420; + const mode = type | this.getUnixMode(entry, defaultMode) & 511; + const crc = this.libzip.struct.statCrc(stat); + const statInstance = Object.assign(new statUtils.StatEntry(), { uid, gid, size, blksize, blocks, atime, birthtime, ctime, mtime, atimeMs, birthtimeMs, ctimeMs, mtimeMs, mode, crc }); + return opts.bigint === true ? statUtils.convertToBigIntStats(statInstance) : statInstance; + } + if (this.listings.has(p)) { + const uid = this.stats.uid; + const gid = this.stats.gid; + const size = 0; + const blksize = 512; + const blocks = 0; + const atimeMs = this.stats.mtimeMs; + const birthtimeMs = this.stats.mtimeMs; + const ctimeMs = this.stats.mtimeMs; + const mtimeMs = this.stats.mtimeMs; + const atime = new Date(atimeMs); + const birthtime = new Date(birthtimeMs); + const ctime = new Date(ctimeMs); + const mtime = new Date(mtimeMs); + const mode = constants_1.S_IFDIR | 493; + const crc = 0; + const statInstance = Object.assign(new statUtils.StatEntry(), { uid, gid, size, blksize, blocks, atime, birthtime, ctime, mtime, atimeMs, birthtimeMs, ctimeMs, mtimeMs, mode, crc }); + return opts.bigint === true ? statUtils.convertToBigIntStats(statInstance) : statInstance; + } + throw new Error(`Unreachable`); + } + getUnixMode(index, defaultMode) { + const rc = this.libzip.file.getExternalAttributes(this.zip, index, 0, 0, this.libzip.uint08S, this.libzip.uint32S); + if (rc === -1) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + const opsys = this.libzip.getValue(this.libzip.uint08S, `i8`) >>> 0; + if (opsys !== this.libzip.ZIP_OPSYS_UNIX) + return defaultMode; + return this.libzip.getValue(this.libzip.uint32S, `i32`) >>> 16; + } + registerListing(p) { + let listing = this.listings.get(p); + if (listing) + return listing; + const parentListing = this.registerListing(path_1.ppath.dirname(p)); + listing = new Set(); + parentListing.add(path_1.ppath.basename(p)); + this.listings.set(p, listing); + return listing; + } + registerEntry(p, index) { + const parentListing = this.registerListing(path_1.ppath.dirname(p)); + parentListing.add(path_1.ppath.basename(p)); + this.entries.set(p, index); + } + unregisterListing(p) { + this.listings.delete(p); + const parentListing = this.listings.get(path_1.ppath.dirname(p)); + parentListing === null || parentListing === void 0 ? void 0 : parentListing.delete(path_1.ppath.basename(p)); + } + unregisterEntry(p) { + this.unregisterListing(p); + const entry = this.entries.get(p); + this.entries.delete(p); + if (typeof entry === `undefined`) + return; + this.fileSources.delete(entry); + if (this.isSymbolicLink(entry)) { + this.symlinkCount--; + } + } + deleteEntry(p, index) { + this.unregisterEntry(p); + const rc = this.libzip.delete(this.zip, index); + if (rc === -1) { + throw this.makeLibzipError(this.libzip.getError(this.zip)); + } + } + resolveFilename(reason, p, resolveLastComponent = true) { + if (!this.ready) + throw errors.EBUSY(`archive closed, ${reason}`); + let resolvedP = path_1.ppath.resolve(path_1.PortablePath.root, p); + if (resolvedP === `/`) + return path_1.PortablePath.root; + const fileIndex = this.entries.get(resolvedP); + if (resolveLastComponent && fileIndex !== void 0) { + if (this.symlinkCount !== 0 && this.isSymbolicLink(fileIndex)) { + const target = this.getFileSource(fileIndex).toString(); + return this.resolveFilename(reason, path_1.ppath.resolve(path_1.ppath.dirname(resolvedP), target), true); + } else { + return resolvedP; + } + } + while (true) { + const parentP = this.resolveFilename(reason, path_1.ppath.dirname(resolvedP), true); + const isDir = this.listings.has(parentP); + const doesExist = this.entries.has(parentP); + if (!isDir && !doesExist) + throw errors.ENOENT(reason); + if (!isDir) + throw errors.ENOTDIR(reason); + resolvedP = path_1.ppath.resolve(parentP, path_1.ppath.basename(resolvedP)); + if (!resolveLastComponent || this.symlinkCount === 0) + break; + const index = this.libzip.name.locate(this.zip, resolvedP.slice(1)); + if (index === -1) + break; + if (this.isSymbolicLink(index)) { + const target = this.getFileSource(index).toString(); + resolvedP = path_1.ppath.resolve(path_1.ppath.dirname(resolvedP), target); + } else { + break; + } + } + return resolvedP; + } + allocateBuffer(content) { + if (!Buffer.isBuffer(content)) + content = Buffer.from(content); + const buffer = this.libzip.malloc(content.byteLength); + if (!buffer) + throw new Error(`Couldn't allocate enough memory`); + const heap = new Uint8Array(this.libzip.HEAPU8.buffer, buffer, content.byteLength); + heap.set(content); + return { buffer, byteLength: content.byteLength }; + } + allocateUnattachedSource(content) { + const error = this.libzip.struct.errorS(); + const { buffer, byteLength } = this.allocateBuffer(content); + const source = this.libzip.source.fromUnattachedBuffer(buffer, byteLength, 0, true, error); + if (source === 0) { + this.libzip.free(error); + throw this.makeLibzipError(error); + } + return source; + } + allocateSource(content) { + const { buffer, byteLength } = this.allocateBuffer(content); + const source = this.libzip.source.fromBuffer(this.zip, buffer, byteLength, 0, true); + if (source === 0) { + this.libzip.free(buffer); + throw this.makeLibzipError(this.libzip.getError(this.zip)); + } + return source; + } + setFileSource(p, content) { + const buffer = Buffer.isBuffer(content) ? content : Buffer.from(content); + const target = path_1.ppath.relative(path_1.PortablePath.root, p); + const lzSource = this.allocateSource(content); + try { + const newIndex = this.libzip.file.add(this.zip, target, lzSource, this.libzip.ZIP_FL_OVERWRITE); + if (newIndex === -1) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + if (this.level !== `mixed`) { + let method; + if (this.level === 0) + method = this.libzip.ZIP_CM_STORE; + else + method = this.libzip.ZIP_CM_DEFLATE; + const rc = this.libzip.file.setCompression(this.zip, newIndex, 0, method, this.level); + if (rc === -1) { + throw this.makeLibzipError(this.libzip.getError(this.zip)); + } + } + this.fileSources.set(newIndex, buffer); + return newIndex; + } catch (error) { + this.libzip.source.free(lzSource); + throw error; + } + } + isSymbolicLink(index) { + if (this.symlinkCount === 0) + return false; + const attrs = this.libzip.file.getExternalAttributes(this.zip, index, 0, 0, this.libzip.uint08S, this.libzip.uint32S); + if (attrs === -1) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + const opsys = this.libzip.getValue(this.libzip.uint08S, `i8`) >>> 0; + if (opsys !== this.libzip.ZIP_OPSYS_UNIX) + return false; + const attributes = this.libzip.getValue(this.libzip.uint32S, `i32`) >>> 16; + return (attributes & constants_1.S_IFMT) === constants_1.S_IFLNK; + } + getFileSource(index, opts = { asyncDecompress: false }) { + const cachedFileSource = this.fileSources.get(index); + if (typeof cachedFileSource !== `undefined`) + return cachedFileSource; + const stat = this.libzip.struct.statS(); + const rc = this.libzip.statIndex(this.zip, index, 0, 0, stat); + if (rc === -1) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + const size = this.libzip.struct.statCompSize(stat); + const compressionMethod = this.libzip.struct.statCompMethod(stat); + const buffer = this.libzip.malloc(size); + try { + const file = this.libzip.fopenIndex(this.zip, index, 0, this.libzip.ZIP_FL_COMPRESSED); + if (file === 0) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + try { + const rc2 = this.libzip.fread(file, buffer, size, 0); + if (rc2 === -1) + throw this.makeLibzipError(this.libzip.file.getError(file)); + else if (rc2 < size) + throw new Error(`Incomplete read`); + else if (rc2 > size) + throw new Error(`Overread`); + const memory = this.libzip.HEAPU8.subarray(buffer, buffer + size); + const data = Buffer.from(memory); + if (compressionMethod === 0) { + this.fileSources.set(index, data); + return data; + } else if (opts.asyncDecompress) { + return new Promise((resolve, reject) => { + zlib_1.default.inflateRaw(data, (error, result) => { + if (error) { + reject(error); + } else { + this.fileSources.set(index, result); + resolve(result); + } + }); + }); + } else { + const decompressedData = zlib_1.default.inflateRawSync(data); + this.fileSources.set(index, decompressedData); + return decompressedData; + } + } finally { + this.libzip.fclose(file); + } + } finally { + this.libzip.free(buffer); + } + } + async chmodPromise(p, mask) { + return this.chmodSync(p, mask); + } + chmodSync(p, mask) { + if (this.readOnly) + throw errors.EROFS(`chmod '${p}'`); + mask &= 493; + const resolvedP = this.resolveFilename(`chmod '${p}'`, p, false); + const entry = this.entries.get(resolvedP); + if (typeof entry === `undefined`) + throw new Error(`Assertion failed: The entry should have been registered (${resolvedP})`); + const oldMod = this.getUnixMode(entry, constants_1.S_IFREG | 0); + const newMod = oldMod & ~511 | mask; + const rc = this.libzip.file.setExternalAttributes(this.zip, entry, 0, 0, this.libzip.ZIP_OPSYS_UNIX, newMod << 16); + if (rc === -1) { + throw this.makeLibzipError(this.libzip.getError(this.zip)); + } + } + async chownPromise(p, uid, gid) { + return this.chownSync(p, uid, gid); + } + chownSync(p, uid, gid) { + throw new Error(`Unimplemented`); + } + async renamePromise(oldP, newP) { + return this.renameSync(oldP, newP); + } + renameSync(oldP, newP) { + throw new Error(`Unimplemented`); + } + async copyFilePromise(sourceP, destP, flags) { + const { indexSource, indexDest, resolvedDestP } = this.prepareCopyFile(sourceP, destP, flags); + const source = await this.getFileSource(indexSource, { asyncDecompress: true }); + const newIndex = this.setFileSource(resolvedDestP, source); + if (newIndex !== indexDest) { + this.registerEntry(resolvedDestP, newIndex); + } + } + copyFileSync(sourceP, destP, flags = 0) { + const { indexSource, indexDest, resolvedDestP } = this.prepareCopyFile(sourceP, destP, flags); + const source = this.getFileSource(indexSource); + const newIndex = this.setFileSource(resolvedDestP, source); + if (newIndex !== indexDest) { + this.registerEntry(resolvedDestP, newIndex); + } + } + prepareCopyFile(sourceP, destP, flags = 0) { + if (this.readOnly) + throw errors.EROFS(`copyfile '${sourceP} -> '${destP}'`); + if ((flags & fs_1.constants.COPYFILE_FICLONE_FORCE) !== 0) + throw errors.ENOSYS(`unsupported clone operation`, `copyfile '${sourceP}' -> ${destP}'`); + const resolvedSourceP = this.resolveFilename(`copyfile '${sourceP} -> ${destP}'`, sourceP); + const indexSource = this.entries.get(resolvedSourceP); + if (typeof indexSource === `undefined`) + throw errors.EINVAL(`copyfile '${sourceP}' -> '${destP}'`); + const resolvedDestP = this.resolveFilename(`copyfile '${sourceP}' -> ${destP}'`, destP); + const indexDest = this.entries.get(resolvedDestP); + if ((flags & (fs_1.constants.COPYFILE_EXCL | fs_1.constants.COPYFILE_FICLONE_FORCE)) !== 0 && typeof indexDest !== `undefined`) + throw errors.EEXIST(`copyfile '${sourceP}' -> '${destP}'`); + return { + indexSource, + resolvedDestP, + indexDest + }; + } + async appendFilePromise(p, content, opts) { + if (this.readOnly) + throw errors.EROFS(`open '${p}'`); + if (typeof opts === `undefined`) + opts = { flag: `a` }; + else if (typeof opts === `string`) + opts = { flag: `a`, encoding: opts }; + else if (typeof opts.flag === `undefined`) + opts = { flag: `a`, ...opts }; + return this.writeFilePromise(p, content, opts); + } + appendFileSync(p, content, opts = {}) { + if (this.readOnly) + throw errors.EROFS(`open '${p}'`); + if (typeof opts === `undefined`) + opts = { flag: `a` }; + else if (typeof opts === `string`) + opts = { flag: `a`, encoding: opts }; + else if (typeof opts.flag === `undefined`) + opts = { flag: `a`, ...opts }; + return this.writeFileSync(p, content, opts); + } + async writeFilePromise(p, content, opts) { + const { encoding, index, resolvedP } = this.prepareWriteFile(p, opts); + if (index !== void 0 && typeof opts === `object` && opts.flag && opts.flag.includes(`a`)) + content = Buffer.concat([await this.getFileSource(index, { asyncDecompress: true }), Buffer.from(content)]); + if (encoding !== null) + content = content.toString(encoding); + const newIndex = this.setFileSource(resolvedP, content); + if (newIndex !== index) { + this.registerEntry(resolvedP, newIndex); + } + } + writeFileSync(p, content, opts) { + const { encoding, index, resolvedP } = this.prepareWriteFile(p, opts); + if (index !== void 0 && typeof opts === `object` && opts.flag && opts.flag.includes(`a`)) + content = Buffer.concat([this.getFileSource(index), Buffer.from(content)]); + if (encoding !== null) + content = content.toString(encoding); + const newIndex = this.setFileSource(resolvedP, content); + if (newIndex !== index) { + this.registerEntry(resolvedP, newIndex); + } + } + prepareWriteFile(p, opts) { + if (typeof p !== `string`) + throw errors.EBADF(`read`); + if (this.readOnly) + throw errors.EROFS(`open '${p}'`); + const resolvedP = this.resolveFilename(`open '${p}'`, p); + if (this.listings.has(resolvedP)) + throw errors.EISDIR(`open '${p}'`); + let encoding = null; + if (typeof opts === `string`) + encoding = opts; + else if (typeof opts === `object` && opts.encoding) + encoding = opts.encoding; + const index = this.entries.get(resolvedP); + return { + encoding, + resolvedP, + index + }; + } + async unlinkPromise(p) { + return this.unlinkSync(p); + } + unlinkSync(p) { + if (this.readOnly) + throw errors.EROFS(`unlink '${p}'`); + const resolvedP = this.resolveFilename(`unlink '${p}'`, p); + if (this.listings.has(resolvedP)) + throw errors.EISDIR(`unlink '${p}'`); + const index = this.entries.get(resolvedP); + if (typeof index === `undefined`) + throw errors.EINVAL(`unlink '${p}'`); + this.deleteEntry(resolvedP, index); + } + async utimesPromise(p, atime, mtime) { + return this.utimesSync(p, atime, mtime); + } + utimesSync(p, atime, mtime) { + if (this.readOnly) + throw errors.EROFS(`utimes '${p}'`); + const resolvedP = this.resolveFilename(`utimes '${p}'`, p); + this.utimesImpl(resolvedP, mtime); + } + async lutimesPromise(p, atime, mtime) { + return this.lutimesSync(p, atime, mtime); + } + lutimesSync(p, atime, mtime) { + if (this.readOnly) + throw errors.EROFS(`lutimes '${p}'`); + const resolvedP = this.resolveFilename(`utimes '${p}'`, p, false); + this.utimesImpl(resolvedP, mtime); + } + utimesImpl(resolvedP, mtime) { + if (this.listings.has(resolvedP)) { + if (!this.entries.has(resolvedP)) + this.hydrateDirectory(resolvedP); + } + const entry = this.entries.get(resolvedP); + if (entry === void 0) + throw new Error(`Unreachable`); + const rc = this.libzip.file.setMtime(this.zip, entry, 0, toUnixTimestamp(mtime), 0); + if (rc === -1) { + throw this.makeLibzipError(this.libzip.getError(this.zip)); + } + } + async mkdirPromise(p, opts) { + return this.mkdirSync(p, opts); + } + mkdirSync(p, { mode = 493, recursive = false } = {}) { + if (recursive) { + this.mkdirpSync(p, { chmod: mode }); + return; + } + if (this.readOnly) + throw errors.EROFS(`mkdir '${p}'`); + const resolvedP = this.resolveFilename(`mkdir '${p}'`, p); + if (this.entries.has(resolvedP) || this.listings.has(resolvedP)) + throw errors.EEXIST(`mkdir '${p}'`); + this.hydrateDirectory(resolvedP); + this.chmodSync(resolvedP, mode); + } + async rmdirPromise(p, opts) { + return this.rmdirSync(p, opts); + } + rmdirSync(p, { recursive = false } = {}) { + if (this.readOnly) + throw errors.EROFS(`rmdir '${p}'`); + if (recursive) { + this.removeSync(p); + return; + } + const resolvedP = this.resolveFilename(`rmdir '${p}'`, p); + const directoryListing = this.listings.get(resolvedP); + if (!directoryListing) + throw errors.ENOTDIR(`rmdir '${p}'`); + if (directoryListing.size > 0) + throw errors.ENOTEMPTY(`rmdir '${p}'`); + const index = this.entries.get(resolvedP); + if (typeof index === `undefined`) + throw errors.EINVAL(`rmdir '${p}'`); + this.deleteEntry(p, index); + } + hydrateDirectory(resolvedP) { + const index = this.libzip.dir.add(this.zip, path_1.ppath.relative(path_1.PortablePath.root, resolvedP)); + if (index === -1) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + this.registerListing(resolvedP); + this.registerEntry(resolvedP, index); + return index; + } + async linkPromise(existingP, newP) { + return this.linkSync(existingP, newP); + } + linkSync(existingP, newP) { + throw errors.EOPNOTSUPP(`link '${existingP}' -> '${newP}'`); + } + async symlinkPromise(target, p) { + return this.symlinkSync(target, p); + } + symlinkSync(target, p) { + if (this.readOnly) + throw errors.EROFS(`symlink '${target}' -> '${p}'`); + const resolvedP = this.resolveFilename(`symlink '${target}' -> '${p}'`, p); + if (this.listings.has(resolvedP)) + throw errors.EISDIR(`symlink '${target}' -> '${p}'`); + if (this.entries.has(resolvedP)) + throw errors.EEXIST(`symlink '${target}' -> '${p}'`); + const index = this.setFileSource(resolvedP, target); + this.registerEntry(resolvedP, index); + const rc = this.libzip.file.setExternalAttributes(this.zip, index, 0, 0, this.libzip.ZIP_OPSYS_UNIX, (constants_1.S_IFLNK | 511) << 16); + if (rc === -1) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + this.symlinkCount += 1; + } + async readFilePromise(p, encoding) { + if (typeof encoding === `object`) + encoding = encoding ? encoding.encoding : void 0; + const data = await this.readFileBuffer(p, { asyncDecompress: true }); + return encoding ? data.toString(encoding) : data; + } + readFileSync(p, encoding) { + if (typeof encoding === `object`) + encoding = encoding ? encoding.encoding : void 0; + const data = this.readFileBuffer(p); + return encoding ? data.toString(encoding) : data; + } + readFileBuffer(p, opts = { asyncDecompress: false }) { + const resolvedP = this.resolveFilename(`open '${p}'`, p); + if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) + throw errors.ENOENT(`open '${p}'`); + if (p[p.length - 1] === `/` && !this.listings.has(resolvedP)) + throw errors.ENOTDIR(`open '${p}'`); + if (this.listings.has(resolvedP)) + throw errors.EISDIR(`read`); + const entry = this.entries.get(resolvedP); + if (entry === void 0) + throw new Error(`Unreachable`); + return this.getFileSource(entry, opts); + } + async readdirPromise(p, opts) { + return this.readdirSync(p, opts); + } + readdirSync(p, opts) { + const resolvedP = this.resolveFilename(`scandir '${p}'`, p); + if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) + throw errors.ENOENT(`scandir '${p}'`); + const directoryListing = this.listings.get(resolvedP); + if (!directoryListing) + throw errors.ENOTDIR(`scandir '${p}'`); + const entries = [...directoryListing]; + if (!(opts === null || opts === void 0 ? void 0 : opts.withFileTypes)) + return entries; + return entries.map((name) => { + return Object.assign(this.statImpl(`lstat`, path_1.ppath.join(p, name)), { + name + }); + }); + } + async readlinkPromise(p) { + const entry = this.prepareReadlink(p); + return (await this.getFileSource(entry, { asyncDecompress: true })).toString(); + } + readlinkSync(p) { + const entry = this.prepareReadlink(p); + return this.getFileSource(entry).toString(); + } + prepareReadlink(p) { + const resolvedP = this.resolveFilename(`readlink '${p}'`, p, false); + if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) + throw errors.ENOENT(`readlink '${p}'`); + if (p[p.length - 1] === `/` && !this.listings.has(resolvedP)) + throw errors.ENOTDIR(`open '${p}'`); + if (this.listings.has(resolvedP)) + throw errors.EINVAL(`readlink '${p}'`); + const entry = this.entries.get(resolvedP); + if (entry === void 0) + throw new Error(`Unreachable`); + if (!this.isSymbolicLink(entry)) + throw errors.EINVAL(`readlink '${p}'`); + return entry; + } + async truncatePromise(p, len = 0) { + const resolvedP = this.resolveFilename(`open '${p}'`, p); + const index = this.entries.get(resolvedP); + if (typeof index === `undefined`) + throw errors.EINVAL(`open '${p}'`); + const source = await this.getFileSource(index, { asyncDecompress: true }); + const truncated = Buffer.alloc(len, 0); + source.copy(truncated); + return await this.writeFilePromise(p, truncated); + } + truncateSync(p, len = 0) { + const resolvedP = this.resolveFilename(`open '${p}'`, p); + const index = this.entries.get(resolvedP); + if (typeof index === `undefined`) + throw errors.EINVAL(`open '${p}'`); + const source = this.getFileSource(index); + const truncated = Buffer.alloc(len, 0); + source.copy(truncated); + return this.writeFileSync(p, truncated); + } + watch(p, a, b) { + let persistent; + switch (typeof a) { + case `function`: + case `string`: + case `undefined`: + { + persistent = true; + } + break; + default: + { + ({ persistent = true } = a); + } + break; + } + if (!persistent) + return { on: () => { + }, close: () => { + } }; + const interval = setInterval(() => { + }, 24 * 60 * 60 * 1e3); + return { on: () => { + }, close: () => { + clearInterval(interval); + } }; + } + watchFile(p, a, b) { + const resolvedP = this.resolveFilename(`open '${p}'`, p); + return (0, watchFile_1.watchFile)(this, resolvedP, a, b); + } + unwatchFile(p, cb) { + const resolvedP = this.resolveFilename(`open '${p}'`, p); + return (0, watchFile_1.unwatchFile)(this, resolvedP, cb); + } + }; + exports2.ZipFS = ZipFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/ProxiedFS.js +var require_ProxiedFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/ProxiedFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ProxiedFS = void 0; + var FakeFS_1 = require_FakeFS(); + var ProxiedFS = class extends FakeFS_1.FakeFS { + getExtractHint(hints) { + return this.baseFs.getExtractHint(hints); + } + resolve(path) { + return this.mapFromBase(this.baseFs.resolve(this.mapToBase(path))); + } + getRealPath() { + return this.mapFromBase(this.baseFs.getRealPath()); + } + async openPromise(p, flags, mode) { + return this.baseFs.openPromise(this.mapToBase(p), flags, mode); + } + openSync(p, flags, mode) { + return this.baseFs.openSync(this.mapToBase(p), flags, mode); + } + async opendirPromise(p, opts) { + return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(p), opts), { path: p }); + } + opendirSync(p, opts) { + return Object.assign(this.baseFs.opendirSync(this.mapToBase(p), opts), { path: p }); + } + async readPromise(fd, buffer, offset, length, position) { + return await this.baseFs.readPromise(fd, buffer, offset, length, position); + } + readSync(fd, buffer, offset, length, position) { + return this.baseFs.readSync(fd, buffer, offset, length, position); + } + async writePromise(fd, buffer, offset, length, position) { + if (typeof buffer === `string`) { + return await this.baseFs.writePromise(fd, buffer, offset); + } else { + return await this.baseFs.writePromise(fd, buffer, offset, length, position); + } + } + writeSync(fd, buffer, offset, length, position) { + if (typeof buffer === `string`) { + return this.baseFs.writeSync(fd, buffer, offset); + } else { + return this.baseFs.writeSync(fd, buffer, offset, length, position); + } + } + async closePromise(fd) { + return this.baseFs.closePromise(fd); + } + closeSync(fd) { + this.baseFs.closeSync(fd); + } + createReadStream(p, opts) { + return this.baseFs.createReadStream(p !== null ? this.mapToBase(p) : p, opts); + } + createWriteStream(p, opts) { + return this.baseFs.createWriteStream(p !== null ? this.mapToBase(p) : p, opts); + } + async realpathPromise(p) { + return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(p))); + } + realpathSync(p) { + return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(p))); + } + async existsPromise(p) { + return this.baseFs.existsPromise(this.mapToBase(p)); + } + existsSync(p) { + return this.baseFs.existsSync(this.mapToBase(p)); + } + accessSync(p, mode) { + return this.baseFs.accessSync(this.mapToBase(p), mode); + } + async accessPromise(p, mode) { + return this.baseFs.accessPromise(this.mapToBase(p), mode); + } + async statPromise(p, opts) { + return this.baseFs.statPromise(this.mapToBase(p), opts); + } + statSync(p, opts) { + return this.baseFs.statSync(this.mapToBase(p), opts); + } + async fstatPromise(fd, opts) { + return this.baseFs.fstatPromise(fd, opts); + } + fstatSync(fd, opts) { + return this.baseFs.fstatSync(fd, opts); + } + async lstatPromise(p, opts) { + return this.baseFs.lstatPromise(this.mapToBase(p), opts); + } + lstatSync(p, opts) { + return this.baseFs.lstatSync(this.mapToBase(p), opts); + } + async chmodPromise(p, mask) { + return this.baseFs.chmodPromise(this.mapToBase(p), mask); + } + chmodSync(p, mask) { + return this.baseFs.chmodSync(this.mapToBase(p), mask); + } + async chownPromise(p, uid, gid) { + return this.baseFs.chownPromise(this.mapToBase(p), uid, gid); + } + chownSync(p, uid, gid) { + return this.baseFs.chownSync(this.mapToBase(p), uid, gid); + } + async renamePromise(oldP, newP) { + return this.baseFs.renamePromise(this.mapToBase(oldP), this.mapToBase(newP)); + } + renameSync(oldP, newP) { + return this.baseFs.renameSync(this.mapToBase(oldP), this.mapToBase(newP)); + } + async copyFilePromise(sourceP, destP, flags = 0) { + return this.baseFs.copyFilePromise(this.mapToBase(sourceP), this.mapToBase(destP), flags); + } + copyFileSync(sourceP, destP, flags = 0) { + return this.baseFs.copyFileSync(this.mapToBase(sourceP), this.mapToBase(destP), flags); + } + async appendFilePromise(p, content, opts) { + return this.baseFs.appendFilePromise(this.fsMapToBase(p), content, opts); + } + appendFileSync(p, content, opts) { + return this.baseFs.appendFileSync(this.fsMapToBase(p), content, opts); + } + async writeFilePromise(p, content, opts) { + return this.baseFs.writeFilePromise(this.fsMapToBase(p), content, opts); + } + writeFileSync(p, content, opts) { + return this.baseFs.writeFileSync(this.fsMapToBase(p), content, opts); + } + async unlinkPromise(p) { + return this.baseFs.unlinkPromise(this.mapToBase(p)); + } + unlinkSync(p) { + return this.baseFs.unlinkSync(this.mapToBase(p)); + } + async utimesPromise(p, atime, mtime) { + return this.baseFs.utimesPromise(this.mapToBase(p), atime, mtime); + } + utimesSync(p, atime, mtime) { + return this.baseFs.utimesSync(this.mapToBase(p), atime, mtime); + } + async mkdirPromise(p, opts) { + return this.baseFs.mkdirPromise(this.mapToBase(p), opts); + } + mkdirSync(p, opts) { + return this.baseFs.mkdirSync(this.mapToBase(p), opts); + } + async rmdirPromise(p, opts) { + return this.baseFs.rmdirPromise(this.mapToBase(p), opts); + } + rmdirSync(p, opts) { + return this.baseFs.rmdirSync(this.mapToBase(p), opts); + } + async linkPromise(existingP, newP) { + return this.baseFs.linkPromise(this.mapToBase(existingP), this.mapToBase(newP)); + } + linkSync(existingP, newP) { + return this.baseFs.linkSync(this.mapToBase(existingP), this.mapToBase(newP)); + } + async symlinkPromise(target, p, type) { + const mappedP = this.mapToBase(p); + if (this.pathUtils.isAbsolute(target)) + return this.baseFs.symlinkPromise(this.mapToBase(target), mappedP, type); + const mappedAbsoluteTarget = this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(p), target)); + const mappedTarget = this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(mappedP), mappedAbsoluteTarget); + return this.baseFs.symlinkPromise(mappedTarget, mappedP, type); + } + symlinkSync(target, p, type) { + const mappedP = this.mapToBase(p); + if (this.pathUtils.isAbsolute(target)) + return this.baseFs.symlinkSync(this.mapToBase(target), mappedP, type); + const mappedAbsoluteTarget = this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(p), target)); + const mappedTarget = this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(mappedP), mappedAbsoluteTarget); + return this.baseFs.symlinkSync(mappedTarget, mappedP, type); + } + async readFilePromise(p, encoding) { + if (encoding === `utf8`) { + return this.baseFs.readFilePromise(this.fsMapToBase(p), encoding); + } else { + return this.baseFs.readFilePromise(this.fsMapToBase(p), encoding); + } + } + readFileSync(p, encoding) { + if (encoding === `utf8`) { + return this.baseFs.readFileSync(this.fsMapToBase(p), encoding); + } else { + return this.baseFs.readFileSync(this.fsMapToBase(p), encoding); + } + } + async readdirPromise(p, opts) { + return this.baseFs.readdirPromise(this.mapToBase(p), opts); + } + readdirSync(p, opts) { + return this.baseFs.readdirSync(this.mapToBase(p), opts); + } + async readlinkPromise(p) { + return this.mapFromBase(await this.baseFs.readlinkPromise(this.mapToBase(p))); + } + readlinkSync(p) { + return this.mapFromBase(this.baseFs.readlinkSync(this.mapToBase(p))); + } + async truncatePromise(p, len) { + return this.baseFs.truncatePromise(this.mapToBase(p), len); + } + truncateSync(p, len) { + return this.baseFs.truncateSync(this.mapToBase(p), len); + } + watch(p, a, b) { + return this.baseFs.watch(this.mapToBase(p), a, b); + } + watchFile(p, a, b) { + return this.baseFs.watchFile(this.mapToBase(p), a, b); + } + unwatchFile(p, cb) { + return this.baseFs.unwatchFile(this.mapToBase(p), cb); + } + fsMapToBase(p) { + if (typeof p === `number`) { + return p; + } else { + return this.mapToBase(p); + } + } + }; + exports2.ProxiedFS = ProxiedFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/AliasFS.js +var require_AliasFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/AliasFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AliasFS = void 0; + var ProxiedFS_1 = require_ProxiedFS(); + var AliasFS = class extends ProxiedFS_1.ProxiedFS { + constructor(target, { baseFs, pathUtils }) { + super(pathUtils); + this.target = target; + this.baseFs = baseFs; + } + getRealPath() { + return this.target; + } + getBaseFs() { + return this.baseFs; + } + mapFromBase(p) { + return p; + } + mapToBase(p) { + return p; + } + }; + exports2.AliasFS = AliasFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/CwdFS.js +var require_CwdFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/CwdFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CwdFS = void 0; + var NodeFS_1 = require_NodeFS(); + var ProxiedFS_1 = require_ProxiedFS(); + var path_1 = require_path4(); + var CwdFS = class extends ProxiedFS_1.ProxiedFS { + constructor(target, { baseFs = new NodeFS_1.NodeFS() } = {}) { + super(path_1.ppath); + this.target = this.pathUtils.normalize(target); + this.baseFs = baseFs; + } + getRealPath() { + return this.pathUtils.resolve(this.baseFs.getRealPath(), this.target); + } + resolve(p) { + if (this.pathUtils.isAbsolute(p)) { + return path_1.ppath.normalize(p); + } else { + return this.baseFs.resolve(path_1.ppath.join(this.target, p)); + } + } + mapFromBase(path) { + return path; + } + mapToBase(path) { + if (this.pathUtils.isAbsolute(path)) { + return path; + } else { + return this.pathUtils.join(this.target, path); + } + } + }; + exports2.CwdFS = CwdFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/JailFS.js +var require_JailFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/JailFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.JailFS = void 0; + var NodeFS_1 = require_NodeFS(); + var ProxiedFS_1 = require_ProxiedFS(); + var path_1 = require_path4(); + var JAIL_ROOT = path_1.PortablePath.root; + var JailFS = class extends ProxiedFS_1.ProxiedFS { + constructor(target, { baseFs = new NodeFS_1.NodeFS() } = {}) { + super(path_1.ppath); + this.target = this.pathUtils.resolve(path_1.PortablePath.root, target); + this.baseFs = baseFs; + } + getRealPath() { + return this.pathUtils.resolve(this.baseFs.getRealPath(), this.pathUtils.relative(path_1.PortablePath.root, this.target)); + } + getTarget() { + return this.target; + } + getBaseFs() { + return this.baseFs; + } + mapToBase(p) { + const normalized = this.pathUtils.normalize(p); + if (this.pathUtils.isAbsolute(p)) + return this.pathUtils.resolve(this.target, this.pathUtils.relative(JAIL_ROOT, p)); + if (normalized.match(/^\.\.\/?/)) + throw new Error(`Resolving this path (${p}) would escape the jail`); + return this.pathUtils.resolve(this.target, p); + } + mapFromBase(p) { + return this.pathUtils.resolve(JAIL_ROOT, this.pathUtils.relative(this.target, p)); + } + }; + exports2.JailFS = JailFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/LazyFS.js +var require_LazyFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/LazyFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LazyFS = void 0; + var ProxiedFS_1 = require_ProxiedFS(); + var LazyFS = class extends ProxiedFS_1.ProxiedFS { + constructor(factory, pathUtils) { + super(pathUtils); + this.instance = null; + this.factory = factory; + } + get baseFs() { + if (!this.instance) + this.instance = this.factory(); + return this.instance; + } + set baseFs(value) { + this.instance = value; + } + mapFromBase(p) { + return p; + } + mapToBase(p) { + return p; + } + }; + exports2.LazyFS = LazyFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/NoFS.js +var require_NoFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/NoFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NoFS = void 0; + var FakeFS_1 = require_FakeFS(); + var path_1 = require_path4(); + var makeError = () => Object.assign(new Error(`ENOSYS: unsupported filesystem access`), { code: `ENOSYS` }); + var NoFS = class extends FakeFS_1.FakeFS { + constructor() { + super(path_1.ppath); + } + getExtractHint() { + throw makeError(); + } + getRealPath() { + throw makeError(); + } + resolve() { + throw makeError(); + } + async openPromise() { + throw makeError(); + } + openSync() { + throw makeError(); + } + async opendirPromise() { + throw makeError(); + } + opendirSync() { + throw makeError(); + } + async readPromise() { + throw makeError(); + } + readSync() { + throw makeError(); + } + async writePromise() { + throw makeError(); + } + writeSync() { + throw makeError(); + } + async closePromise() { + throw makeError(); + } + closeSync() { + throw makeError(); + } + createWriteStream() { + throw makeError(); + } + createReadStream() { + throw makeError(); + } + async realpathPromise() { + throw makeError(); + } + realpathSync() { + throw makeError(); + } + async readdirPromise() { + throw makeError(); + } + readdirSync() { + throw makeError(); + } + async existsPromise(p) { + throw makeError(); + } + existsSync(p) { + throw makeError(); + } + async accessPromise() { + throw makeError(); + } + accessSync() { + throw makeError(); + } + async statPromise() { + throw makeError(); + } + statSync() { + throw makeError(); + } + async fstatPromise(fd) { + throw makeError(); + } + fstatSync(fd) { + throw makeError(); + } + async lstatPromise(p) { + throw makeError(); + } + lstatSync(p) { + throw makeError(); + } + async chmodPromise() { + throw makeError(); + } + chmodSync() { + throw makeError(); + } + async chownPromise() { + throw makeError(); + } + chownSync() { + throw makeError(); + } + async mkdirPromise() { + throw makeError(); + } + mkdirSync() { + throw makeError(); + } + async rmdirPromise() { + throw makeError(); + } + rmdirSync() { + throw makeError(); + } + async linkPromise() { + throw makeError(); + } + linkSync() { + throw makeError(); + } + async symlinkPromise() { + throw makeError(); + } + symlinkSync() { + throw makeError(); + } + async renamePromise() { + throw makeError(); + } + renameSync() { + throw makeError(); + } + async copyFilePromise() { + throw makeError(); + } + copyFileSync() { + throw makeError(); + } + async appendFilePromise() { + throw makeError(); + } + appendFileSync() { + throw makeError(); + } + async writeFilePromise() { + throw makeError(); + } + writeFileSync() { + throw makeError(); + } + async unlinkPromise() { + throw makeError(); + } + unlinkSync() { + throw makeError(); + } + async utimesPromise() { + throw makeError(); + } + utimesSync() { + throw makeError(); + } + async readFilePromise() { + throw makeError(); + } + readFileSync() { + throw makeError(); + } + async readlinkPromise() { + throw makeError(); + } + readlinkSync() { + throw makeError(); + } + async truncatePromise() { + throw makeError(); + } + truncateSync() { + throw makeError(); + } + watch() { + throw makeError(); + } + watchFile() { + throw makeError(); + } + unwatchFile() { + throw makeError(); + } + }; + exports2.NoFS = NoFS; + NoFS.instance = new NoFS(); + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/PosixFS.js +var require_PosixFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/PosixFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PosixFS = void 0; + var ProxiedFS_1 = require_ProxiedFS(); + var path_1 = require_path4(); + var PosixFS = class extends ProxiedFS_1.ProxiedFS { + constructor(baseFs) { + super(path_1.npath); + this.baseFs = baseFs; + } + mapFromBase(path) { + return path_1.npath.fromPortablePath(path); + } + mapToBase(path) { + return path_1.npath.toPortablePath(path); + } + }; + exports2.PosixFS = PosixFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/VirtualFS.js +var require_VirtualFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/VirtualFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.VirtualFS = void 0; + var NodeFS_1 = require_NodeFS(); + var ProxiedFS_1 = require_ProxiedFS(); + var path_1 = require_path4(); + var NUMBER_REGEXP = /^[0-9]+$/; + var VIRTUAL_REGEXP = /^(\/(?:[^/]+\/)*?(?:\$\$virtual|__virtual__))((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/; + var VALID_COMPONENT = /^([^/]+-)?[a-f0-9]+$/; + var VirtualFS = class extends ProxiedFS_1.ProxiedFS { + constructor({ baseFs = new NodeFS_1.NodeFS() } = {}) { + super(path_1.ppath); + this.baseFs = baseFs; + } + static makeVirtualPath(base, component, to) { + if (path_1.ppath.basename(base) !== `__virtual__`) + throw new Error(`Assertion failed: Virtual folders must be named "__virtual__"`); + if (!path_1.ppath.basename(component).match(VALID_COMPONENT)) + throw new Error(`Assertion failed: Virtual components must be ended by an hexadecimal hash`); + const target = path_1.ppath.relative(path_1.ppath.dirname(base), to); + const segments = target.split(`/`); + let depth = 0; + while (depth < segments.length && segments[depth] === `..`) + depth += 1; + const finalSegments = segments.slice(depth); + const fullVirtualPath = path_1.ppath.join(base, component, String(depth), ...finalSegments); + return fullVirtualPath; + } + static resolveVirtual(p) { + const match = p.match(VIRTUAL_REGEXP); + if (!match || !match[3] && match[5]) + return p; + const target = path_1.ppath.dirname(match[1]); + if (!match[3] || !match[4]) + return target; + const isnum = NUMBER_REGEXP.test(match[4]); + if (!isnum) + return p; + const depth = Number(match[4]); + const backstep = `../`.repeat(depth); + const subpath = match[5] || `.`; + return VirtualFS.resolveVirtual(path_1.ppath.join(target, backstep, subpath)); + } + getExtractHint(hints) { + return this.baseFs.getExtractHint(hints); + } + getRealPath() { + return this.baseFs.getRealPath(); + } + realpathSync(p) { + const match = p.match(VIRTUAL_REGEXP); + if (!match) + return this.baseFs.realpathSync(p); + if (!match[5]) + return p; + const realpath = this.baseFs.realpathSync(this.mapToBase(p)); + return VirtualFS.makeVirtualPath(match[1], match[3], realpath); + } + async realpathPromise(p) { + const match = p.match(VIRTUAL_REGEXP); + if (!match) + return await this.baseFs.realpathPromise(p); + if (!match[5]) + return p; + const realpath = await this.baseFs.realpathPromise(this.mapToBase(p)); + return VirtualFS.makeVirtualPath(match[1], match[3], realpath); + } + mapToBase(p) { + if (this.pathUtils.isAbsolute(p)) + return VirtualFS.resolveVirtual(p); + const resolvedRoot = VirtualFS.resolveVirtual(this.baseFs.resolve(path_1.PortablePath.dot)); + const resolvedP = VirtualFS.resolveVirtual(this.baseFs.resolve(p)); + return path_1.ppath.relative(resolvedRoot, resolvedP) || path_1.PortablePath.dot; + } + mapFromBase(p) { + return p; + } + }; + exports2.VirtualFS = VirtualFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/ZipOpenFS.js +var require_ZipOpenFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/ZipOpenFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ZipOpenFS = exports2.getArchivePart = void 0; + var tslib_1 = require_tslib(); + var fs_1 = require("fs"); + var FakeFS_1 = require_FakeFS(); + var NodeFS_1 = require_NodeFS(); + var ZipFS_1 = require_ZipFS(); + var watchFile_1 = require_watchFile(); + var errors = (0, tslib_1.__importStar)(require_errors4()); + var path_1 = require_path4(); + var ZIP_FD = 2147483648; + var DOT_ZIP = `.zip`; + var getArchivePart = (path) => { + let idx = path.indexOf(DOT_ZIP); + if (idx <= 0) + return null; + let nextCharIdx = idx; + while (idx >= 0) { + nextCharIdx = idx + DOT_ZIP.length; + if (path[nextCharIdx] === path_1.ppath.sep) + break; + if (path[idx - 1] === path_1.ppath.sep) + return null; + idx = path.indexOf(DOT_ZIP, nextCharIdx); + } + if (path.length > nextCharIdx && path[nextCharIdx] !== path_1.ppath.sep) + return null; + return path.slice(0, nextCharIdx); + }; + exports2.getArchivePart = getArchivePart; + var ZipOpenFS = class extends FakeFS_1.BasePortableFakeFS { + constructor({ libzip, baseFs = new NodeFS_1.NodeFS(), filter = null, maxOpenFiles = Infinity, readOnlyArchives = false, useCache = true, maxAge = 5e3 }) { + super(); + this.fdMap = new Map(); + this.nextFd = 3; + this.isZip = new Set(); + this.notZip = new Set(); + this.realPaths = new Map(); + this.limitOpenFilesTimeout = null; + this.libzipFactory = typeof libzip !== `function` ? () => libzip : libzip; + this.baseFs = baseFs; + this.zipInstances = useCache ? new Map() : null; + this.filter = filter; + this.maxOpenFiles = maxOpenFiles; + this.readOnlyArchives = readOnlyArchives; + this.maxAge = maxAge; + } + static async openPromise(fn2, opts) { + const zipOpenFs = new ZipOpenFS(opts); + try { + return await fn2(zipOpenFs); + } finally { + zipOpenFs.saveAndClose(); + } + } + get libzip() { + if (typeof this.libzipInstance === `undefined`) + this.libzipInstance = this.libzipFactory(); + return this.libzipInstance; + } + getExtractHint(hints) { + return this.baseFs.getExtractHint(hints); + } + getRealPath() { + return this.baseFs.getRealPath(); + } + saveAndClose() { + (0, watchFile_1.unwatchAllFiles)(this); + if (this.zipInstances) { + for (const [path, { zipFs }] of this.zipInstances.entries()) { + zipFs.saveAndClose(); + this.zipInstances.delete(path); + } + } + } + discardAndClose() { + (0, watchFile_1.unwatchAllFiles)(this); + if (this.zipInstances) { + for (const [path, { zipFs }] of this.zipInstances.entries()) { + zipFs.discardAndClose(); + this.zipInstances.delete(path); + } + } + } + resolve(p) { + return this.baseFs.resolve(p); + } + remapFd(zipFs, fd) { + const remappedFd = this.nextFd++ | ZIP_FD; + this.fdMap.set(remappedFd, [zipFs, fd]); + return remappedFd; + } + async openPromise(p, flags, mode) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.openPromise(p, flags, mode); + }, async (zipFs, { subPath }) => { + return this.remapFd(zipFs, await zipFs.openPromise(subPath, flags, mode)); + }); + } + openSync(p, flags, mode) { + return this.makeCallSync(p, () => { + return this.baseFs.openSync(p, flags, mode); + }, (zipFs, { subPath }) => { + return this.remapFd(zipFs, zipFs.openSync(subPath, flags, mode)); + }); + } + async opendirPromise(p, opts) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.opendirPromise(p, opts); + }, async (zipFs, { subPath }) => { + return await zipFs.opendirPromise(subPath, opts); + }, { + requireSubpath: false + }); + } + opendirSync(p, opts) { + return this.makeCallSync(p, () => { + return this.baseFs.opendirSync(p, opts); + }, (zipFs, { subPath }) => { + return zipFs.opendirSync(subPath, opts); + }, { + requireSubpath: false + }); + } + async readPromise(fd, buffer, offset, length, position) { + if ((fd & ZIP_FD) === 0) + return await this.baseFs.readPromise(fd, buffer, offset, length, position); + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`read`); + const [zipFs, realFd] = entry; + return await zipFs.readPromise(realFd, buffer, offset, length, position); + } + readSync(fd, buffer, offset, length, position) { + if ((fd & ZIP_FD) === 0) + return this.baseFs.readSync(fd, buffer, offset, length, position); + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`readSync`); + const [zipFs, realFd] = entry; + return zipFs.readSync(realFd, buffer, offset, length, position); + } + async writePromise(fd, buffer, offset, length, position) { + if ((fd & ZIP_FD) === 0) { + if (typeof buffer === `string`) { + return await this.baseFs.writePromise(fd, buffer, offset); + } else { + return await this.baseFs.writePromise(fd, buffer, offset, length, position); + } + } + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`write`); + const [zipFs, realFd] = entry; + if (typeof buffer === `string`) { + return await zipFs.writePromise(realFd, buffer, offset); + } else { + return await zipFs.writePromise(realFd, buffer, offset, length, position); + } + } + writeSync(fd, buffer, offset, length, position) { + if ((fd & ZIP_FD) === 0) { + if (typeof buffer === `string`) { + return this.baseFs.writeSync(fd, buffer, offset); + } else { + return this.baseFs.writeSync(fd, buffer, offset, length, position); + } + } + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`writeSync`); + const [zipFs, realFd] = entry; + if (typeof buffer === `string`) { + return zipFs.writeSync(realFd, buffer, offset); + } else { + return zipFs.writeSync(realFd, buffer, offset, length, position); + } + } + async closePromise(fd) { + if ((fd & ZIP_FD) === 0) + return await this.baseFs.closePromise(fd); + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`close`); + this.fdMap.delete(fd); + const [zipFs, realFd] = entry; + return await zipFs.closePromise(realFd); + } + closeSync(fd) { + if ((fd & ZIP_FD) === 0) + return this.baseFs.closeSync(fd); + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`closeSync`); + this.fdMap.delete(fd); + const [zipFs, realFd] = entry; + return zipFs.closeSync(realFd); + } + createReadStream(p, opts) { + if (p === null) + return this.baseFs.createReadStream(p, opts); + return this.makeCallSync(p, () => { + return this.baseFs.createReadStream(p, opts); + }, (zipFs, { subPath }) => { + return zipFs.createReadStream(subPath, opts); + }); + } + createWriteStream(p, opts) { + if (p === null) + return this.baseFs.createWriteStream(p, opts); + return this.makeCallSync(p, () => { + return this.baseFs.createWriteStream(p, opts); + }, (zipFs, { subPath }) => { + return zipFs.createWriteStream(subPath, opts); + }); + } + async realpathPromise(p) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.realpathPromise(p); + }, async (zipFs, { archivePath, subPath }) => { + let realArchivePath = this.realPaths.get(archivePath); + if (typeof realArchivePath === `undefined`) { + realArchivePath = await this.baseFs.realpathPromise(archivePath); + this.realPaths.set(archivePath, realArchivePath); + } + return this.pathUtils.join(realArchivePath, this.pathUtils.relative(path_1.PortablePath.root, await zipFs.realpathPromise(subPath))); + }); + } + realpathSync(p) { + return this.makeCallSync(p, () => { + return this.baseFs.realpathSync(p); + }, (zipFs, { archivePath, subPath }) => { + let realArchivePath = this.realPaths.get(archivePath); + if (typeof realArchivePath === `undefined`) { + realArchivePath = this.baseFs.realpathSync(archivePath); + this.realPaths.set(archivePath, realArchivePath); + } + return this.pathUtils.join(realArchivePath, this.pathUtils.relative(path_1.PortablePath.root, zipFs.realpathSync(subPath))); + }); + } + async existsPromise(p) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.existsPromise(p); + }, async (zipFs, { subPath }) => { + return await zipFs.existsPromise(subPath); + }); + } + existsSync(p) { + return this.makeCallSync(p, () => { + return this.baseFs.existsSync(p); + }, (zipFs, { subPath }) => { + return zipFs.existsSync(subPath); + }); + } + async accessPromise(p, mode) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.accessPromise(p, mode); + }, async (zipFs, { subPath }) => { + return await zipFs.accessPromise(subPath, mode); + }); + } + accessSync(p, mode) { + return this.makeCallSync(p, () => { + return this.baseFs.accessSync(p, mode); + }, (zipFs, { subPath }) => { + return zipFs.accessSync(subPath, mode); + }); + } + async statPromise(p, opts) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.statPromise(p, opts); + }, async (zipFs, { subPath }) => { + return await zipFs.statPromise(subPath, opts); + }); + } + statSync(p, opts) { + return this.makeCallSync(p, () => { + return this.baseFs.statSync(p, opts); + }, (zipFs, { subPath }) => { + return zipFs.statSync(subPath, opts); + }); + } + async fstatPromise(fd, opts) { + if ((fd & ZIP_FD) === 0) + return this.baseFs.fstatPromise(fd, opts); + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`fstat`); + const [zipFs, realFd] = entry; + return zipFs.fstatPromise(realFd, opts); + } + fstatSync(fd, opts) { + if ((fd & ZIP_FD) === 0) + return this.baseFs.fstatSync(fd, opts); + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`fstatSync`); + const [zipFs, realFd] = entry; + return zipFs.fstatSync(realFd, opts); + } + async lstatPromise(p, opts) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.lstatPromise(p, opts); + }, async (zipFs, { subPath }) => { + return await zipFs.lstatPromise(subPath, opts); + }); + } + lstatSync(p, opts) { + return this.makeCallSync(p, () => { + return this.baseFs.lstatSync(p, opts); + }, (zipFs, { subPath }) => { + return zipFs.lstatSync(subPath, opts); + }); + } + async chmodPromise(p, mask) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.chmodPromise(p, mask); + }, async (zipFs, { subPath }) => { + return await zipFs.chmodPromise(subPath, mask); + }); + } + chmodSync(p, mask) { + return this.makeCallSync(p, () => { + return this.baseFs.chmodSync(p, mask); + }, (zipFs, { subPath }) => { + return zipFs.chmodSync(subPath, mask); + }); + } + async chownPromise(p, uid, gid) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.chownPromise(p, uid, gid); + }, async (zipFs, { subPath }) => { + return await zipFs.chownPromise(subPath, uid, gid); + }); + } + chownSync(p, uid, gid) { + return this.makeCallSync(p, () => { + return this.baseFs.chownSync(p, uid, gid); + }, (zipFs, { subPath }) => { + return zipFs.chownSync(subPath, uid, gid); + }); + } + async renamePromise(oldP, newP) { + return await this.makeCallPromise(oldP, async () => { + return await this.makeCallPromise(newP, async () => { + return await this.baseFs.renamePromise(oldP, newP); + }, async () => { + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); + }); + }, async (zipFsO, { subPath: subPathO }) => { + return await this.makeCallPromise(newP, async () => { + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); + }, async (zipFsN, { subPath: subPathN }) => { + if (zipFsO !== zipFsN) { + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); + } else { + return await zipFsO.renamePromise(subPathO, subPathN); + } + }); + }); + } + renameSync(oldP, newP) { + return this.makeCallSync(oldP, () => { + return this.makeCallSync(newP, () => { + return this.baseFs.renameSync(oldP, newP); + }, async () => { + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); + }); + }, (zipFsO, { subPath: subPathO }) => { + return this.makeCallSync(newP, () => { + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); + }, (zipFsN, { subPath: subPathN }) => { + if (zipFsO !== zipFsN) { + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); + } else { + return zipFsO.renameSync(subPathO, subPathN); + } + }); + }); + } + async copyFilePromise(sourceP, destP, flags = 0) { + const fallback = async (sourceFs, sourceP2, destFs, destP2) => { + if ((flags & fs_1.constants.COPYFILE_FICLONE_FORCE) !== 0) + throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${sourceP2}' -> ${destP2}'`), { code: `EXDEV` }); + if (flags & fs_1.constants.COPYFILE_EXCL && await this.existsPromise(sourceP2)) + throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${sourceP2}' -> '${destP2}'`), { code: `EEXIST` }); + let content; + try { + content = await sourceFs.readFilePromise(sourceP2); + } catch (error) { + throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${sourceP2}' -> '${destP2}'`), { code: `EINVAL` }); + } + await destFs.writeFilePromise(destP2, content); + }; + return await this.makeCallPromise(sourceP, async () => { + return await this.makeCallPromise(destP, async () => { + return await this.baseFs.copyFilePromise(sourceP, destP, flags); + }, async (zipFsD, { subPath: subPathD }) => { + return await fallback(this.baseFs, sourceP, zipFsD, subPathD); + }); + }, async (zipFsS, { subPath: subPathS }) => { + return await this.makeCallPromise(destP, async () => { + return await fallback(zipFsS, subPathS, this.baseFs, destP); + }, async (zipFsD, { subPath: subPathD }) => { + if (zipFsS !== zipFsD) { + return await fallback(zipFsS, subPathS, zipFsD, subPathD); + } else { + return await zipFsS.copyFilePromise(subPathS, subPathD, flags); + } + }); + }); + } + copyFileSync(sourceP, destP, flags = 0) { + const fallback = (sourceFs, sourceP2, destFs, destP2) => { + if ((flags & fs_1.constants.COPYFILE_FICLONE_FORCE) !== 0) + throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${sourceP2}' -> ${destP2}'`), { code: `EXDEV` }); + if (flags & fs_1.constants.COPYFILE_EXCL && this.existsSync(sourceP2)) + throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${sourceP2}' -> '${destP2}'`), { code: `EEXIST` }); + let content; + try { + content = sourceFs.readFileSync(sourceP2); + } catch (error) { + throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${sourceP2}' -> '${destP2}'`), { code: `EINVAL` }); + } + destFs.writeFileSync(destP2, content); + }; + return this.makeCallSync(sourceP, () => { + return this.makeCallSync(destP, () => { + return this.baseFs.copyFileSync(sourceP, destP, flags); + }, (zipFsD, { subPath: subPathD }) => { + return fallback(this.baseFs, sourceP, zipFsD, subPathD); + }); + }, (zipFsS, { subPath: subPathS }) => { + return this.makeCallSync(destP, () => { + return fallback(zipFsS, subPathS, this.baseFs, destP); + }, (zipFsD, { subPath: subPathD }) => { + if (zipFsS !== zipFsD) { + return fallback(zipFsS, subPathS, zipFsD, subPathD); + } else { + return zipFsS.copyFileSync(subPathS, subPathD, flags); + } + }); + }); + } + async appendFilePromise(p, content, opts) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.appendFilePromise(p, content, opts); + }, async (zipFs, { subPath }) => { + return await zipFs.appendFilePromise(subPath, content, opts); + }); + } + appendFileSync(p, content, opts) { + return this.makeCallSync(p, () => { + return this.baseFs.appendFileSync(p, content, opts); + }, (zipFs, { subPath }) => { + return zipFs.appendFileSync(subPath, content, opts); + }); + } + async writeFilePromise(p, content, opts) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.writeFilePromise(p, content, opts); + }, async (zipFs, { subPath }) => { + return await zipFs.writeFilePromise(subPath, content, opts); + }); + } + writeFileSync(p, content, opts) { + return this.makeCallSync(p, () => { + return this.baseFs.writeFileSync(p, content, opts); + }, (zipFs, { subPath }) => { + return zipFs.writeFileSync(subPath, content, opts); + }); + } + async unlinkPromise(p) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.unlinkPromise(p); + }, async (zipFs, { subPath }) => { + return await zipFs.unlinkPromise(subPath); + }); + } + unlinkSync(p) { + return this.makeCallSync(p, () => { + return this.baseFs.unlinkSync(p); + }, (zipFs, { subPath }) => { + return zipFs.unlinkSync(subPath); + }); + } + async utimesPromise(p, atime, mtime) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.utimesPromise(p, atime, mtime); + }, async (zipFs, { subPath }) => { + return await zipFs.utimesPromise(subPath, atime, mtime); + }); + } + utimesSync(p, atime, mtime) { + return this.makeCallSync(p, () => { + return this.baseFs.utimesSync(p, atime, mtime); + }, (zipFs, { subPath }) => { + return zipFs.utimesSync(subPath, atime, mtime); + }); + } + async mkdirPromise(p, opts) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.mkdirPromise(p, opts); + }, async (zipFs, { subPath }) => { + return await zipFs.mkdirPromise(subPath, opts); + }); + } + mkdirSync(p, opts) { + return this.makeCallSync(p, () => { + return this.baseFs.mkdirSync(p, opts); + }, (zipFs, { subPath }) => { + return zipFs.mkdirSync(subPath, opts); + }); + } + async rmdirPromise(p, opts) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.rmdirPromise(p, opts); + }, async (zipFs, { subPath }) => { + return await zipFs.rmdirPromise(subPath, opts); + }); + } + rmdirSync(p, opts) { + return this.makeCallSync(p, () => { + return this.baseFs.rmdirSync(p, opts); + }, (zipFs, { subPath }) => { + return zipFs.rmdirSync(subPath, opts); + }); + } + async linkPromise(existingP, newP) { + return await this.makeCallPromise(newP, async () => { + return await this.baseFs.linkPromise(existingP, newP); + }, async (zipFs, { subPath }) => { + return await zipFs.linkPromise(existingP, subPath); + }); + } + linkSync(existingP, newP) { + return this.makeCallSync(newP, () => { + return this.baseFs.linkSync(existingP, newP); + }, (zipFs, { subPath }) => { + return zipFs.linkSync(existingP, subPath); + }); + } + async symlinkPromise(target, p, type) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.symlinkPromise(target, p, type); + }, async (zipFs, { subPath }) => { + return await zipFs.symlinkPromise(target, subPath); + }); + } + symlinkSync(target, p, type) { + return this.makeCallSync(p, () => { + return this.baseFs.symlinkSync(target, p, type); + }, (zipFs, { subPath }) => { + return zipFs.symlinkSync(target, subPath); + }); + } + async readFilePromise(p, encoding) { + return this.makeCallPromise(p, async () => { + switch (encoding) { + case `utf8`: + return await this.baseFs.readFilePromise(p, encoding); + default: + return await this.baseFs.readFilePromise(p, encoding); + } + }, async (zipFs, { subPath }) => { + return await zipFs.readFilePromise(subPath, encoding); + }); + } + readFileSync(p, encoding) { + return this.makeCallSync(p, () => { + switch (encoding) { + case `utf8`: + return this.baseFs.readFileSync(p, encoding); + default: + return this.baseFs.readFileSync(p, encoding); + } + }, (zipFs, { subPath }) => { + return zipFs.readFileSync(subPath, encoding); + }); + } + async readdirPromise(p, opts) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.readdirPromise(p, opts); + }, async (zipFs, { subPath }) => { + return await zipFs.readdirPromise(subPath, opts); + }, { + requireSubpath: false + }); + } + readdirSync(p, opts) { + return this.makeCallSync(p, () => { + return this.baseFs.readdirSync(p, opts); + }, (zipFs, { subPath }) => { + return zipFs.readdirSync(subPath, opts); + }, { + requireSubpath: false + }); + } + async readlinkPromise(p) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.readlinkPromise(p); + }, async (zipFs, { subPath }) => { + return await zipFs.readlinkPromise(subPath); + }); + } + readlinkSync(p) { + return this.makeCallSync(p, () => { + return this.baseFs.readlinkSync(p); + }, (zipFs, { subPath }) => { + return zipFs.readlinkSync(subPath); + }); + } + async truncatePromise(p, len) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.truncatePromise(p, len); + }, async (zipFs, { subPath }) => { + return await zipFs.truncatePromise(subPath, len); + }); + } + truncateSync(p, len) { + return this.makeCallSync(p, () => { + return this.baseFs.truncateSync(p, len); + }, (zipFs, { subPath }) => { + return zipFs.truncateSync(subPath, len); + }); + } + watch(p, a, b) { + return this.makeCallSync(p, () => { + return this.baseFs.watch(p, a, b); + }, (zipFs, { subPath }) => { + return zipFs.watch(subPath, a, b); + }); + } + watchFile(p, a, b) { + return this.makeCallSync(p, () => { + return this.baseFs.watchFile(p, a, b); + }, () => { + return (0, watchFile_1.watchFile)(this, p, a, b); + }); + } + unwatchFile(p, cb) { + return this.makeCallSync(p, () => { + return this.baseFs.unwatchFile(p, cb); + }, () => { + return (0, watchFile_1.unwatchFile)(this, p, cb); + }); + } + async makeCallPromise(p, discard, accept, { requireSubpath = true } = {}) { + if (typeof p !== `string`) + return await discard(); + const normalizedP = this.resolve(p); + const zipInfo = this.findZip(normalizedP); + if (!zipInfo) + return await discard(); + if (requireSubpath && zipInfo.subPath === `/`) + return await discard(); + return await this.getZipPromise(zipInfo.archivePath, async (zipFs) => await accept(zipFs, zipInfo)); + } + makeCallSync(p, discard, accept, { requireSubpath = true } = {}) { + if (typeof p !== `string`) + return discard(); + const normalizedP = this.resolve(p); + const zipInfo = this.findZip(normalizedP); + if (!zipInfo) + return discard(); + if (requireSubpath && zipInfo.subPath === `/`) + return discard(); + return this.getZipSync(zipInfo.archivePath, (zipFs) => accept(zipFs, zipInfo)); + } + findZip(p) { + if (this.filter && !this.filter.test(p)) + return null; + let filePath = ``; + while (true) { + const archivePart = (0, exports2.getArchivePart)(p.substr(filePath.length)); + if (!archivePart) + return null; + filePath = this.pathUtils.join(filePath, archivePart); + if (this.isZip.has(filePath) === false) { + if (this.notZip.has(filePath)) + continue; + try { + if (!this.baseFs.lstatSync(filePath).isFile()) { + this.notZip.add(filePath); + continue; + } + } catch (_a) { + return null; + } + this.isZip.add(filePath); + } + return { + archivePath: filePath, + subPath: this.pathUtils.join(path_1.PortablePath.root, p.substr(filePath.length)) + }; + } + } + limitOpenFiles(max) { + if (this.zipInstances === null) + return; + const now = Date.now(); + let nextExpiresAt = now + this.maxAge; + let closeCount = max === null ? 0 : this.zipInstances.size - max; + for (const [path, { zipFs, expiresAt, refCount }] of this.zipInstances.entries()) { + if (refCount !== 0 || zipFs.hasOpenFileHandles()) { + continue; + } else if (now >= expiresAt) { + zipFs.saveAndClose(); + this.zipInstances.delete(path); + closeCount -= 1; + continue; + } else if (max === null || closeCount <= 0) { + nextExpiresAt = expiresAt; + break; + } + zipFs.saveAndClose(); + this.zipInstances.delete(path); + closeCount -= 1; + } + if (this.limitOpenFilesTimeout === null && (max === null && this.zipInstances.size > 0 || max !== null)) { + this.limitOpenFilesTimeout = setTimeout(() => { + this.limitOpenFilesTimeout = null; + this.limitOpenFiles(null); + }, nextExpiresAt - now).unref(); + } + } + async getZipPromise(p, accept) { + const getZipOptions = async () => ({ + baseFs: this.baseFs, + libzip: this.libzip, + readOnly: this.readOnlyArchives, + stats: await this.baseFs.statPromise(p) + }); + if (this.zipInstances) { + let cachedZipFs = this.zipInstances.get(p); + if (!cachedZipFs) { + const zipOptions = await getZipOptions(); + cachedZipFs = this.zipInstances.get(p); + if (!cachedZipFs) { + cachedZipFs = { + zipFs: new ZipFS_1.ZipFS(p, zipOptions), + expiresAt: 0, + refCount: 0 + }; + } + } + this.zipInstances.delete(p); + this.limitOpenFiles(this.maxOpenFiles - 1); + this.zipInstances.set(p, cachedZipFs); + cachedZipFs.expiresAt = Date.now() + this.maxAge; + cachedZipFs.refCount += 1; + try { + return await accept(cachedZipFs.zipFs); + } finally { + cachedZipFs.refCount -= 1; + } + } else { + const zipFs = new ZipFS_1.ZipFS(p, await getZipOptions()); + try { + return await accept(zipFs); + } finally { + zipFs.saveAndClose(); + } + } + } + getZipSync(p, accept) { + const getZipOptions = () => ({ + baseFs: this.baseFs, + libzip: this.libzip, + readOnly: this.readOnlyArchives, + stats: this.baseFs.statSync(p) + }); + if (this.zipInstances) { + let cachedZipFs = this.zipInstances.get(p); + if (!cachedZipFs) { + cachedZipFs = { + zipFs: new ZipFS_1.ZipFS(p, getZipOptions()), + expiresAt: 0, + refCount: 0 + }; + } + this.zipInstances.delete(p); + this.limitOpenFiles(this.maxOpenFiles - 1); + this.zipInstances.set(p, cachedZipFs); + cachedZipFs.expiresAt = Date.now() + this.maxAge; + return accept(cachedZipFs.zipFs); + } else { + const zipFs = new ZipFS_1.ZipFS(p, getZipOptions()); + try { + return accept(zipFs); + } finally { + zipFs.saveAndClose(); + } + } + } + }; + exports2.ZipOpenFS = ZipOpenFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/URLFS.js +var require_URLFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/URLFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.URLFS = void 0; + var url_1 = require("url"); + var ProxiedFS_1 = require_ProxiedFS(); + var path_1 = require_path4(); + var URLFS = class extends ProxiedFS_1.ProxiedFS { + constructor(baseFs) { + super(path_1.npath); + this.baseFs = baseFs; + } + mapFromBase(path) { + return path; + } + mapToBase(path) { + if (path instanceof url_1.URL) + return (0, url_1.fileURLToPath)(path); + return path; + } + }; + exports2.URLFS = URLFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/patchFs.js +var require_patchFs = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/patchFs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.extendFs = exports2.patchFs = void 0; + var util_1 = require("util"); + var URLFS_1 = require_URLFS(); + var SYNC_IMPLEMENTATIONS = new Set([ + `accessSync`, + `appendFileSync`, + `createReadStream`, + `chmodSync`, + `chownSync`, + `closeSync`, + `copyFileSync`, + `linkSync`, + `lstatSync`, + `fstatSync`, + `lutimesSync`, + `mkdirSync`, + `openSync`, + `opendirSync`, + `readSync`, + `readlinkSync`, + `readFileSync`, + `readdirSync`, + `readlinkSync`, + `realpathSync`, + `renameSync`, + `rmdirSync`, + `statSync`, + `symlinkSync`, + `truncateSync`, + `unlinkSync`, + `unwatchFile`, + `utimesSync`, + `watch`, + `watchFile`, + `writeFileSync`, + `writeSync` + ]); + var ASYNC_IMPLEMENTATIONS = new Set([ + `accessPromise`, + `appendFilePromise`, + `chmodPromise`, + `chownPromise`, + `closePromise`, + `copyFilePromise`, + `linkPromise`, + `fstatPromise`, + `lstatPromise`, + `lutimesPromise`, + `mkdirPromise`, + `openPromise`, + `opendirPromise`, + `readdirPromise`, + `realpathPromise`, + `readFilePromise`, + `readdirPromise`, + `readlinkPromise`, + `renamePromise`, + `rmdirPromise`, + `statPromise`, + `symlinkPromise`, + `truncatePromise`, + `unlinkPromise`, + `utimesPromise`, + `writeFilePromise`, + `writeSync` + ]); + var FILEHANDLE_IMPLEMENTATIONS = new Set([ + `appendFilePromise`, + `chmodPromise`, + `chownPromise`, + `closePromise`, + `readPromise`, + `readFilePromise`, + `statPromise`, + `truncatePromise`, + `utimesPromise`, + `writePromise`, + `writeFilePromise` + ]); + function patchFs(patchedFs, fakeFs) { + fakeFs = new URLFS_1.URLFS(fakeFs); + const setupFn = (target, name, replacement) => { + const orig = target[name]; + target[name] = replacement; + if (typeof (orig === null || orig === void 0 ? void 0 : orig[util_1.promisify.custom]) !== `undefined`) { + replacement[util_1.promisify.custom] = orig[util_1.promisify.custom]; + } + }; + { + setupFn(patchedFs, `exists`, (p, ...args2) => { + const hasCallback = typeof args2[args2.length - 1] === `function`; + const callback = hasCallback ? args2.pop() : () => { + }; + process.nextTick(() => { + fakeFs.existsPromise(p).then((exists) => { + callback(exists); + }, () => { + callback(false); + }); + }); + }); + setupFn(patchedFs, `read`, (p, buffer, ...args2) => { + const hasCallback = typeof args2[args2.length - 1] === `function`; + const callback = hasCallback ? args2.pop() : () => { + }; + process.nextTick(() => { + fakeFs.readPromise(p, buffer, ...args2).then((bytesRead) => { + callback(null, bytesRead, buffer); + }, (error) => { + callback(error, 0, buffer); + }); + }); + }); + for (const fnName of ASYNC_IMPLEMENTATIONS) { + const origName = fnName.replace(/Promise$/, ``); + if (typeof patchedFs[origName] === `undefined`) + continue; + const fakeImpl = fakeFs[fnName]; + if (typeof fakeImpl === `undefined`) + continue; + const wrapper = (...args2) => { + const hasCallback = typeof args2[args2.length - 1] === `function`; + const callback = hasCallback ? args2.pop() : () => { + }; + process.nextTick(() => { + fakeImpl.apply(fakeFs, args2).then((result) => { + callback(null, result); + }, (error) => { + callback(error); + }); + }); + }; + setupFn(patchedFs, origName, wrapper); + } + patchedFs.realpath.native = patchedFs.realpath; + } + { + setupFn(patchedFs, `existsSync`, (p) => { + try { + return fakeFs.existsSync(p); + } catch (error) { + return false; + } + }); + for (const fnName of SYNC_IMPLEMENTATIONS) { + const origName = fnName; + if (typeof patchedFs[origName] === `undefined`) + continue; + const fakeImpl = fakeFs[fnName]; + if (typeof fakeImpl === `undefined`) + continue; + setupFn(patchedFs, origName, fakeImpl.bind(fakeFs)); + } + patchedFs.realpathSync.native = patchedFs.realpathSync; + } + { + const origEmitWarning = process.emitWarning; + process.emitWarning = () => { + }; + let patchedFsPromises; + try { + patchedFsPromises = patchedFs.promises; + } finally { + process.emitWarning = origEmitWarning; + } + if (typeof patchedFsPromises !== `undefined`) { + for (const fnName of ASYNC_IMPLEMENTATIONS) { + const origName = fnName.replace(/Promise$/, ``); + if (typeof patchedFsPromises[origName] === `undefined`) + continue; + const fakeImpl = fakeFs[fnName]; + if (typeof fakeImpl === `undefined`) + continue; + if (fnName === `open`) + continue; + setupFn(patchedFsPromises, origName, fakeImpl.bind(fakeFs)); + } + class FileHandle { + constructor(fd) { + this.fd = fd; + } + } + for (const fnName of FILEHANDLE_IMPLEMENTATIONS) { + const origName = fnName.replace(/Promise$/, ``); + const fakeImpl = fakeFs[fnName]; + if (typeof fakeImpl === `undefined`) + continue; + setupFn(FileHandle.prototype, origName, function(...args2) { + return fakeImpl.call(fakeFs, this.fd, ...args2); + }); + } + setupFn(patchedFsPromises, `open`, async (...args2) => { + const fd = await fakeFs.openPromise(...args2); + return new FileHandle(fd); + }); + } + } + { + patchedFs.read[util_1.promisify.custom] = async (p, buffer, ...args2) => { + const res = fakeFs.readPromise(p, buffer, ...args2); + return { bytesRead: await res, buffer }; + }; + } + } + exports2.patchFs = patchFs; + function extendFs(realFs, fakeFs) { + const patchedFs = Object.create(realFs); + patchFs(patchedFs, fakeFs); + return patchedFs; + } + exports2.extendFs = extendFs; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/xfs.js +var require_xfs = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/xfs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.xfs = void 0; + var tslib_1 = require_tslib(); + var os_1 = (0, tslib_1.__importDefault)(require("os")); + var NodeFS_1 = require_NodeFS(); + var path_1 = require_path4(); + function getTempName(prefix) { + const tmpdir = path_1.npath.toPortablePath(os_1.default.tmpdir()); + const hash = Math.ceil(Math.random() * 4294967296).toString(16).padStart(8, `0`); + return path_1.ppath.join(tmpdir, `${prefix}${hash}`); + } + var tmpdirs = new Set(); + var cleanExitRegistered = false; + function registerCleanExit() { + if (cleanExitRegistered) + return; + cleanExitRegistered = true; + process.once(`exit`, () => { + exports2.xfs.rmtempSync(); + }); + } + exports2.xfs = Object.assign(new NodeFS_1.NodeFS(), { + detachTemp(p) { + tmpdirs.delete(p); + }, + mktempSync(cb) { + registerCleanExit(); + while (true) { + const p = getTempName(`xfs-`); + try { + this.mkdirSync(p); + } catch (error) { + if (error.code === `EEXIST`) { + continue; + } else { + throw error; + } + } + const realP = this.realpathSync(p); + tmpdirs.add(realP); + if (typeof cb !== `undefined`) { + try { + return cb(realP); + } finally { + if (tmpdirs.has(realP)) { + tmpdirs.delete(realP); + try { + this.removeSync(realP); + } catch (_a) { + } + } + } + } else { + return realP; + } + } + }, + async mktempPromise(cb) { + registerCleanExit(); + while (true) { + const p = getTempName(`xfs-`); + try { + await this.mkdirPromise(p); + } catch (error) { + if (error.code === `EEXIST`) { + continue; + } else { + throw error; + } + } + const realP = await this.realpathPromise(p); + tmpdirs.add(realP); + if (typeof cb !== `undefined`) { + try { + return await cb(realP); + } finally { + if (tmpdirs.has(realP)) { + tmpdirs.delete(realP); + try { + await this.removePromise(realP); + } catch (_a) { + } + } + } + } else { + return realP; + } + } + }, + async rmtempPromise() { + await Promise.all(Array.from(tmpdirs.values()).map(async (p) => { + try { + await exports2.xfs.removePromise(p, { maxRetries: 0 }); + tmpdirs.delete(p); + } catch (_a) { + } + })); + }, + rmtempSync() { + for (const p of tmpdirs) { + try { + exports2.xfs.removeSync(p); + tmpdirs.delete(p); + } catch (_a) { + } + } + } + }); + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/index.js +var require_lib76 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.xfs = exports2.extendFs = exports2.patchFs = exports2.ZipOpenFS = exports2.ZipFS = exports2.VirtualFS = exports2.ProxiedFS = exports2.PosixFS = exports2.NodeFS = exports2.NoFS = exports2.LazyFS = exports2.JailFS = exports2.CwdFS = exports2.FakeFS = exports2.AliasFS = exports2.toFilename = exports2.ppath = exports2.npath = exports2.Filename = exports2.PortablePath = exports2.DEFAULT_COMPRESSION_LEVEL = exports2.normalizeLineEndings = exports2.statUtils = exports2.opendir = exports2.LinkStrategy = void 0; + var tslib_1 = require_tslib(); + var statUtils = (0, tslib_1.__importStar)(require_statUtils()); + exports2.statUtils = statUtils; + var copyPromise_1 = require_copyPromise(); + Object.defineProperty(exports2, "LinkStrategy", { enumerable: true, get: function() { + return copyPromise_1.LinkStrategy; + } }); + var opendir_1 = require_opendir(); + Object.defineProperty(exports2, "opendir", { enumerable: true, get: function() { + return opendir_1.opendir; + } }); + var FakeFS_1 = require_FakeFS(); + Object.defineProperty(exports2, "normalizeLineEndings", { enumerable: true, get: function() { + return FakeFS_1.normalizeLineEndings; + } }); + var ZipFS_1 = require_ZipFS(); + Object.defineProperty(exports2, "DEFAULT_COMPRESSION_LEVEL", { enumerable: true, get: function() { + return ZipFS_1.DEFAULT_COMPRESSION_LEVEL; + } }); + var path_1 = require_path4(); + Object.defineProperty(exports2, "PortablePath", { enumerable: true, get: function() { + return path_1.PortablePath; + } }); + Object.defineProperty(exports2, "Filename", { enumerable: true, get: function() { + return path_1.Filename; + } }); + var path_2 = require_path4(); + Object.defineProperty(exports2, "npath", { enumerable: true, get: function() { + return path_2.npath; + } }); + Object.defineProperty(exports2, "ppath", { enumerable: true, get: function() { + return path_2.ppath; + } }); + Object.defineProperty(exports2, "toFilename", { enumerable: true, get: function() { + return path_2.toFilename; + } }); + var AliasFS_1 = require_AliasFS(); + Object.defineProperty(exports2, "AliasFS", { enumerable: true, get: function() { + return AliasFS_1.AliasFS; + } }); + var FakeFS_2 = require_FakeFS(); + Object.defineProperty(exports2, "FakeFS", { enumerable: true, get: function() { + return FakeFS_2.FakeFS; + } }); + var CwdFS_1 = require_CwdFS(); + Object.defineProperty(exports2, "CwdFS", { enumerable: true, get: function() { + return CwdFS_1.CwdFS; + } }); + var JailFS_1 = require_JailFS(); + Object.defineProperty(exports2, "JailFS", { enumerable: true, get: function() { + return JailFS_1.JailFS; + } }); + var LazyFS_1 = require_LazyFS(); + Object.defineProperty(exports2, "LazyFS", { enumerable: true, get: function() { + return LazyFS_1.LazyFS; + } }); + var NoFS_1 = require_NoFS(); + Object.defineProperty(exports2, "NoFS", { enumerable: true, get: function() { + return NoFS_1.NoFS; + } }); + var NodeFS_1 = require_NodeFS(); + Object.defineProperty(exports2, "NodeFS", { enumerable: true, get: function() { + return NodeFS_1.NodeFS; + } }); + var PosixFS_1 = require_PosixFS(); + Object.defineProperty(exports2, "PosixFS", { enumerable: true, get: function() { + return PosixFS_1.PosixFS; + } }); + var ProxiedFS_1 = require_ProxiedFS(); + Object.defineProperty(exports2, "ProxiedFS", { enumerable: true, get: function() { + return ProxiedFS_1.ProxiedFS; + } }); + var VirtualFS_1 = require_VirtualFS(); + Object.defineProperty(exports2, "VirtualFS", { enumerable: true, get: function() { + return VirtualFS_1.VirtualFS; + } }); + var ZipFS_2 = require_ZipFS(); + Object.defineProperty(exports2, "ZipFS", { enumerable: true, get: function() { + return ZipFS_2.ZipFS; + } }); + var ZipOpenFS_1 = require_ZipOpenFS(); + Object.defineProperty(exports2, "ZipOpenFS", { enumerable: true, get: function() { + return ZipOpenFS_1.ZipOpenFS; + } }); + var patchFs_1 = require_patchFs(); + Object.defineProperty(exports2, "patchFs", { enumerable: true, get: function() { + return patchFs_1.patchFs; + } }); + Object.defineProperty(exports2, "extendFs", { enumerable: true, get: function() { + return patchFs_1.extendFs; + } }); + var xfs_1 = require_xfs(); + Object.defineProperty(exports2, "xfs", { enumerable: true, get: function() { + return xfs_1.xfs; + } }); + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/grammars/shell.js +var require_shell = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/grammars/shell.js"(exports2, module2) { + "use strict"; + function peg$subclass(child, parent) { + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + } + function peg$SyntaxError(message2, expected, found, location) { + this.message = message2; + this.expected = expected; + this.found = found; + this.location = location; + this.name = "SyntaxError"; + if (typeof Error.captureStackTrace === "function") { + Error.captureStackTrace(this, peg$SyntaxError); + } + } + peg$subclass(peg$SyntaxError, Error); + peg$SyntaxError.buildMessage = function(expected, found) { + var DESCRIBE_EXPECTATION_FNS = { + literal: function(expectation) { + return '"' + literalEscape(expectation.text) + '"'; + }, + "class": function(expectation) { + var escapedParts = "", i; + for (i = 0; i < expectation.parts.length; i++) { + escapedParts += expectation.parts[i] instanceof Array ? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1]) : classEscape(expectation.parts[i]); + } + return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]"; + }, + any: function(expectation) { + return "any character"; + }, + end: function(expectation) { + return "end of input"; + }, + other: function(expectation) { + return expectation.description; + } + }; + function hex(ch) { + return ch.charCodeAt(0).toString(16).toUpperCase(); + } + function literalEscape(s) { + return s.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) { + return "\\x0" + hex(ch); + }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { + return "\\x" + hex(ch); + }); + } + function classEscape(s) { + return s.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) { + return "\\x0" + hex(ch); + }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { + return "\\x" + hex(ch); + }); + } + function describeExpectation(expectation) { + return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); + } + function describeExpected(expected2) { + var descriptions = new Array(expected2.length), i, j; + for (i = 0; i < expected2.length; i++) { + descriptions[i] = describeExpectation(expected2[i]); + } + descriptions.sort(); + if (descriptions.length > 0) { + for (i = 1, j = 1; i < descriptions.length; i++) { + if (descriptions[i - 1] !== descriptions[i]) { + descriptions[j] = descriptions[i]; + j++; + } + } + descriptions.length = j; + } + switch (descriptions.length) { + case 1: + return descriptions[0]; + case 2: + return descriptions[0] + " or " + descriptions[1]; + default: + return descriptions.slice(0, -1).join(", ") + ", or " + descriptions[descriptions.length - 1]; + } + } + function describeFound(found2) { + return found2 ? '"' + literalEscape(found2) + '"' : "end of input"; + } + return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; + }; + function peg$parse(input, options) { + options = options !== void 0 ? options : {}; + var peg$FAILED = {}, peg$startRuleFunctions = { Start: peg$parseStart }, peg$startRuleFunction = peg$parseStart, peg$c0 = function(line) { + return line ? line : []; + }, peg$c1 = function(command, type, then) { + return [command].concat(then || []); + }, peg$c2 = function(command, type) { + return [command]; + }, peg$c3 = function(then) { + return then; + }, peg$c4 = ";", peg$c5 = peg$literalExpectation(";", false), peg$c6 = function(chain, then) { + return then ? { chain, then } : { chain }; + }, peg$c7 = function(type, then) { + return { type, line: then }; + }, peg$c8 = "&&", peg$c9 = peg$literalExpectation("&&", false), peg$c10 = "||", peg$c11 = peg$literalExpectation("||", false), peg$c12 = function(main, then) { + return then ? { ...main, then } : main; + }, peg$c13 = function(type, then) { + return { type, chain: then }; + }, peg$c14 = "|&", peg$c15 = peg$literalExpectation("|&", false), peg$c16 = "|", peg$c17 = peg$literalExpectation("|", false), peg$c18 = "=", peg$c19 = peg$literalExpectation("=", false), peg$c20 = function(name, arg) { + return { name, args: [arg] }; + }, peg$c21 = function(name) { + return { name, args: [] }; + }, peg$c22 = "(", peg$c23 = peg$literalExpectation("(", false), peg$c24 = ")", peg$c25 = peg$literalExpectation(")", false), peg$c26 = function(subshell, args2) { + return { type: `subshell`, subshell, args: args2 }; + }, peg$c27 = "{", peg$c28 = peg$literalExpectation("{", false), peg$c29 = "}", peg$c30 = peg$literalExpectation("}", false), peg$c31 = function(group, args2) { + return { type: `group`, group, args: args2 }; + }, peg$c32 = function(envs, args2) { + return { type: `command`, args: args2, envs }; + }, peg$c33 = function(envs) { + return { type: `envs`, envs }; + }, peg$c34 = function(args2) { + return args2; + }, peg$c35 = function(arg) { + return arg; + }, peg$c36 = function(redirect, arg) { + return { type: `redirection`, subtype: redirect, args: [arg] }; + }, peg$c37 = ">>", peg$c38 = peg$literalExpectation(">>", false), peg$c39 = ">&", peg$c40 = peg$literalExpectation(">&", false), peg$c41 = ">", peg$c42 = peg$literalExpectation(">", false), peg$c43 = "<<<", peg$c44 = peg$literalExpectation("<<<", false), peg$c45 = "<&", peg$c46 = peg$literalExpectation("<&", false), peg$c47 = "<", peg$c48 = peg$literalExpectation("<", false), peg$c49 = function(segments) { + return { type: `argument`, segments: [].concat(...segments) }; + }, peg$c50 = function(string) { + return string; + }, peg$c51 = "'", peg$c52 = peg$literalExpectation("'", false), peg$c53 = function(text2) { + return [{ type: `text`, text: text2 }]; + }, peg$c54 = '"', peg$c55 = peg$literalExpectation('"', false), peg$c56 = function(segments) { + return segments; + }, peg$c57 = function(arithmetic) { + return { type: `arithmetic`, arithmetic, quoted: true }; + }, peg$c58 = function(shell) { + return { type: `shell`, shell, quoted: true }; + }, peg$c59 = function(variable) { + return { type: `variable`, ...variable, quoted: true }; + }, peg$c60 = function(text2) { + return { type: `text`, text: text2 }; + }, peg$c61 = function(arithmetic) { + return { type: `arithmetic`, arithmetic, quoted: false }; + }, peg$c62 = function(shell) { + return { type: `shell`, shell, quoted: false }; + }, peg$c63 = function(variable) { + return { type: `variable`, ...variable, quoted: false }; + }, peg$c64 = function(pattern) { + return { type: `glob`, pattern }; + }, peg$c65 = "\\", peg$c66 = peg$literalExpectation("\\", false), peg$c67 = peg$anyExpectation(), peg$c68 = function(c) { + return c; + }, peg$c69 = /^[^']/, peg$c70 = peg$classExpectation(["'"], true, false), peg$c71 = function(chars) { + return chars.join(``); + }, peg$c72 = /^[^$"]/, peg$c73 = peg$classExpectation(["$", '"'], true, false), peg$c74 = "-", peg$c75 = peg$literalExpectation("-", false), peg$c76 = "+", peg$c77 = peg$literalExpectation("+", false), peg$c78 = /^[0-9]/, peg$c79 = peg$classExpectation([["0", "9"]], false, false), peg$c80 = ".", peg$c81 = peg$literalExpectation(".", false), peg$c82 = function(sign, left, right) { + return { type: `number`, value: (sign === "-" ? -1 : 1) * parseFloat(left.join(``) + `.` + right.join(``)) }; + }, peg$c83 = function(sign, value) { + return { type: `number`, value: (sign === "-" ? -1 : 1) * parseInt(value.join(``)) }; + }, peg$c84 = function(variable) { + return { type: `variable`, ...variable }; + }, peg$c85 = function(name) { + return { type: `variable`, name }; + }, peg$c86 = function(value) { + return value; + }, peg$c87 = "*", peg$c88 = peg$literalExpectation("*", false), peg$c89 = function(left, right) { + return { type: `multiplication`, left, right }; + }, peg$c90 = "/", peg$c91 = peg$literalExpectation("/", false), peg$c92 = function(left, right) { + return { type: `division`, left, right }; + }, peg$c93 = function(left, right) { + return { type: `addition`, left, right }; + }, peg$c94 = function(left, right) { + return { type: `subtraction`, left, right }; + }, peg$c95 = "$((", peg$c96 = peg$literalExpectation("$((", false), peg$c97 = "))", peg$c98 = peg$literalExpectation("))", false), peg$c99 = function(arithmetic) { + return arithmetic; + }, peg$c100 = "$(", peg$c101 = peg$literalExpectation("$(", false), peg$c102 = function(command) { + return command; + }, peg$c103 = "${", peg$c104 = peg$literalExpectation("${", false), peg$c105 = ":-", peg$c106 = peg$literalExpectation(":-", false), peg$c107 = function(name, arg) { + return { name, defaultValue: arg }; + }, peg$c108 = ":-}", peg$c109 = peg$literalExpectation(":-}", false), peg$c110 = function(name) { + return { name, defaultValue: [] }; + }, peg$c111 = function(name) { + return { name }; + }, peg$c112 = "$", peg$c113 = peg$literalExpectation("$", false), peg$c114 = function(pattern) { + return options.isGlobPattern(pattern); + }, peg$c115 = function(pattern) { + return pattern; + }, peg$c116 = /^[a-zA-Z0-9_]/, peg$c117 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_"], false, false), peg$c118 = function() { + return text(); + }, peg$c119 = /^[$@*?#a-zA-Z0-9_\-]/, peg$c120 = peg$classExpectation(["$", "@", "*", "?", "#", ["a", "z"], ["A", "Z"], ["0", "9"], "_", "-"], false, false), peg$c121 = /^[(){}<>$|&; \t"']/, peg$c122 = peg$classExpectation(["(", ")", "{", "}", "<", ">", "$", "|", "&", ";", " ", " ", '"', "'"], false, false), peg$c123 = /^[<>&; \t"']/, peg$c124 = peg$classExpectation(["<", ">", "&", ";", " ", " ", '"', "'"], false, false), peg$c125 = /^[ \t]/, peg$c126 = peg$classExpectation([" ", " "], false, false), peg$currPos = 0, peg$savedPos = 0, peg$posDetailsCache = [{ line: 1, column: 1 }], peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, peg$result; + if ("startRule" in options) { + if (!(options.startRule in peg$startRuleFunctions)) { + throw new Error(`Can't start parsing from rule "` + options.startRule + '".'); + } + peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; + } + function text() { + return input.substring(peg$savedPos, peg$currPos); + } + function location() { + return peg$computeLocation(peg$savedPos, peg$currPos); + } + function expected(description, location2) { + location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos); + throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location2); + } + function error(message2, location2) { + location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos); + throw peg$buildSimpleError(message2, location2); + } + function peg$literalExpectation(text2, ignoreCase) { + return { type: "literal", text: text2, ignoreCase }; + } + function peg$classExpectation(parts, inverted, ignoreCase) { + return { type: "class", parts, inverted, ignoreCase }; + } + function peg$anyExpectation() { + return { type: "any" }; + } + function peg$endExpectation() { + return { type: "end" }; + } + function peg$otherExpectation(description) { + return { type: "other", description }; + } + function peg$computePosDetails(pos) { + var details = peg$posDetailsCache[pos], p; + if (details) { + return details; + } else { + p = pos - 1; + while (!peg$posDetailsCache[p]) { + p--; + } + details = peg$posDetailsCache[p]; + details = { + line: details.line, + column: details.column + }; + while (p < pos) { + if (input.charCodeAt(p) === 10) { + details.line++; + details.column = 1; + } else { + details.column++; + } + p++; + } + peg$posDetailsCache[pos] = details; + return details; + } + } + function peg$computeLocation(startPos, endPos) { + var startPosDetails = peg$computePosDetails(startPos), endPosDetails = peg$computePosDetails(endPos); + return { + start: { + offset: startPos, + line: startPosDetails.line, + column: startPosDetails.column + }, + end: { + offset: endPos, + line: endPosDetails.line, + column: endPosDetails.column + } + }; + } + function peg$fail(expected2) { + if (peg$currPos < peg$maxFailPos) { + return; + } + if (peg$currPos > peg$maxFailPos) { + peg$maxFailPos = peg$currPos; + peg$maxFailExpected = []; + } + peg$maxFailExpected.push(expected2); + } + function peg$buildSimpleError(message2, location2) { + return new peg$SyntaxError(message2, null, null, location2); + } + function peg$buildStructuredError(expected2, found, location2) { + return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected2, found), expected2, found, location2); + } + function peg$parseStart() { + var s0, s1; + s0 = peg$currPos; + s1 = peg$parseShellLine(); + if (s1 === peg$FAILED) { + s1 = null; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c0(s1); + } + s0 = s1; + return s0; + } + function peg$parseShellLine() { + var s0, s1, s2, s3, s4; + s0 = peg$currPos; + s1 = peg$parseCommandLine(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseS(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseS(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseShellLineType(); + if (s3 !== peg$FAILED) { + s4 = peg$parseShellLineThen(); + if (s4 === peg$FAILED) { + s4 = null; + } + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c1(s1, s3, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseCommandLine(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseS(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseS(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseShellLineType(); + if (s3 === peg$FAILED) { + s3 = null; + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c2(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + return s0; + } + function peg$parseShellLineThen() { + var s0, s1, s2, s3, s4; + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + s2 = peg$parseShellLine(); + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseS(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseS(); + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c3(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseShellLineType() { + var s0; + if (input.charCodeAt(peg$currPos) === 59) { + s0 = peg$c4; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c5); + } + } + return s0; + } + function peg$parseCommandLine() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = peg$parseCommandChain(); + if (s1 !== peg$FAILED) { + s2 = peg$parseCommandLineThen(); + if (s2 === peg$FAILED) { + s2 = null; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c6(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseCommandLineThen() { + var s0, s1, s2, s3, s4, s5, s6; + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + s2 = peg$parseCommandLineType(); + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseS(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseS(); + } + if (s3 !== peg$FAILED) { + s4 = peg$parseCommandLine(); + if (s4 !== peg$FAILED) { + s5 = []; + s6 = peg$parseS(); + while (s6 !== peg$FAILED) { + s5.push(s6); + s6 = peg$parseS(); + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c7(s2, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseCommandLineType() { + var s0; + if (input.substr(peg$currPos, 2) === peg$c8) { + s0 = peg$c8; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c9); + } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c10) { + s0 = peg$c10; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c11); + } + } + } + return s0; + } + function peg$parseCommandChain() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = peg$parseCommand(); + if (s1 !== peg$FAILED) { + s2 = peg$parseCommandChainThen(); + if (s2 === peg$FAILED) { + s2 = null; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c12(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseCommandChainThen() { + var s0, s1, s2, s3, s4, s5, s6; + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + s2 = peg$parseCommandChainType(); + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseS(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseS(); + } + if (s3 !== peg$FAILED) { + s4 = peg$parseCommandChain(); + if (s4 !== peg$FAILED) { + s5 = []; + s6 = peg$parseS(); + while (s6 !== peg$FAILED) { + s5.push(s6); + s6 = peg$parseS(); + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c13(s2, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseCommandChainType() { + var s0; + if (input.substr(peg$currPos, 2) === peg$c14) { + s0 = peg$c14; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c15); + } + } + if (s0 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 124) { + s0 = peg$c16; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c17); + } + } + } + return s0; + } + function peg$parseVariableAssignment() { + var s0, s1, s2, s3, s4, s5; + s0 = peg$currPos; + s1 = peg$parseEnvVariable(); + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 61) { + s2 = peg$c18; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c19); + } + } + if (s2 !== peg$FAILED) { + s3 = peg$parseStrictValueArgument(); + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parseS(); + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parseS(); + } + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c20(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseEnvVariable(); + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 61) { + s2 = peg$c18; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c19); + } + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseS(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseS(); + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c21(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + return s0; + } + function peg$parseCommand() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10; + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 40) { + s2 = peg$c22; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c23); + } + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseS(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseS(); + } + if (s3 !== peg$FAILED) { + s4 = peg$parseShellLine(); + if (s4 !== peg$FAILED) { + s5 = []; + s6 = peg$parseS(); + while (s6 !== peg$FAILED) { + s5.push(s6); + s6 = peg$parseS(); + } + if (s5 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 41) { + s6 = peg$c24; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c25); + } + } + if (s6 !== peg$FAILED) { + s7 = []; + s8 = peg$parseS(); + while (s8 !== peg$FAILED) { + s7.push(s8); + s8 = peg$parseS(); + } + if (s7 !== peg$FAILED) { + s8 = []; + s9 = peg$parseRedirectArgument(); + while (s9 !== peg$FAILED) { + s8.push(s9); + s9 = peg$parseRedirectArgument(); + } + if (s8 !== peg$FAILED) { + s9 = []; + s10 = peg$parseS(); + while (s10 !== peg$FAILED) { + s9.push(s10); + s10 = peg$parseS(); + } + if (s9 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c26(s4, s8); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 123) { + s2 = peg$c27; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c28); + } + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseS(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseS(); + } + if (s3 !== peg$FAILED) { + s4 = peg$parseShellLine(); + if (s4 !== peg$FAILED) { + s5 = []; + s6 = peg$parseS(); + while (s6 !== peg$FAILED) { + s5.push(s6); + s6 = peg$parseS(); + } + if (s5 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s6 = peg$c29; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c30); + } + } + if (s6 !== peg$FAILED) { + s7 = []; + s8 = peg$parseS(); + while (s8 !== peg$FAILED) { + s7.push(s8); + s8 = peg$parseS(); + } + if (s7 !== peg$FAILED) { + s8 = []; + s9 = peg$parseRedirectArgument(); + while (s9 !== peg$FAILED) { + s8.push(s9); + s9 = peg$parseRedirectArgument(); + } + if (s8 !== peg$FAILED) { + s9 = []; + s10 = peg$parseS(); + while (s10 !== peg$FAILED) { + s9.push(s10); + s10 = peg$parseS(); + } + if (s9 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c31(s4, s8); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseVariableAssignment(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseVariableAssignment(); + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseS(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseS(); + } + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parseArgument(); + if (s5 !== peg$FAILED) { + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parseArgument(); + } + } else { + s4 = peg$FAILED; + } + if (s4 !== peg$FAILED) { + s5 = []; + s6 = peg$parseS(); + while (s6 !== peg$FAILED) { + s5.push(s6); + s6 = peg$parseS(); + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c32(s2, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseVariableAssignment(); + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseVariableAssignment(); + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseS(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseS(); + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c33(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + } + return s0; + } + function peg$parseCommandString() { + var s0, s1, s2, s3, s4; + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseValueArgument(); + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseValueArgument(); + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseS(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseS(); + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c34(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseArgument() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + s2 = peg$parseRedirectArgument(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c35(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + s2 = peg$parseValueArgument(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c35(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + return s0; + } + function peg$parseRedirectArgument() { + var s0, s1, s2, s3; + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + s2 = peg$parseRedirectType(); + if (s2 !== peg$FAILED) { + s3 = peg$parseValueArgument(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c36(s2, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseRedirectType() { + var s0; + if (input.substr(peg$currPos, 2) === peg$c37) { + s0 = peg$c37; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c38); + } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c39) { + s0 = peg$c39; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c40); + } + } + if (s0 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 62) { + s0 = peg$c41; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c42); + } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 3) === peg$c43) { + s0 = peg$c43; + peg$currPos += 3; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c44); + } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c45) { + s0 = peg$c45; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c46); + } + } + if (s0 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 60) { + s0 = peg$c47; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c48); + } + } + } + } + } + } + } + return s0; + } + function peg$parseValueArgument() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + s2 = peg$parseStrictValueArgument(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c35(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseStrictValueArgument() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + s2 = peg$parseArgumentSegment(); + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseArgumentSegment(); + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c49(s1); + } + s0 = s1; + return s0; + } + function peg$parseArgumentSegment() { + var s0, s1; + s0 = peg$currPos; + s1 = peg$parseSglQuoteString(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c50(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseDblQuoteString(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c50(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsePlainString(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c50(s1); + } + s0 = s1; + } + } + return s0; + } + function peg$parseSglQuoteString() { + var s0, s1, s2, s3; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 39) { + s1 = peg$c51; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c52); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseSglQuoteStringText(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 39) { + s3 = peg$c51; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c52); + } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c53(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseDblQuoteString() { + var s0, s1, s2, s3; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 34) { + s1 = peg$c54; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c55); + } + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseDblQuoteStringSegment(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseDblQuoteStringSegment(); + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 34) { + s3 = peg$c54; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c55); + } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c56(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parsePlainString() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + s2 = peg$parsePlainStringSegment(); + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parsePlainStringSegment(); + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c56(s1); + } + s0 = s1; + return s0; + } + function peg$parseDblQuoteStringSegment() { + var s0, s1; + s0 = peg$currPos; + s1 = peg$parseArithmetic(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c57(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseSubshell(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c58(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseVariable(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c59(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseDblQuoteStringText(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c60(s1); + } + s0 = s1; + } + } + } + return s0; + } + function peg$parsePlainStringSegment() { + var s0, s1; + s0 = peg$currPos; + s1 = peg$parseArithmetic(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c61(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseSubshell(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c62(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseVariable(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c63(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseGlob(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c64(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsePlainStringText(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c60(s1); + } + s0 = s1; + } + } + } + } + return s0; + } + function peg$parseSglQuoteStringText() { + var s0, s1, s2, s3, s4; + s0 = peg$currPos; + s1 = []; + s2 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s3 = peg$c65; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c66); + } + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c67); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c68(s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 === peg$FAILED) { + if (peg$c69.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c70); + } + } + } + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s3 = peg$c65; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c66); + } + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c67); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c68(s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 === peg$FAILED) { + if (peg$c69.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c70); + } + } + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c71(s1); + } + s0 = s1; + return s0; + } + function peg$parseDblQuoteStringText() { + var s0, s1, s2, s3, s4; + s0 = peg$currPos; + s1 = []; + s2 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s3 = peg$c65; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c66); + } + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c67); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c68(s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 === peg$FAILED) { + if (peg$c72.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c73); + } + } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s3 = peg$c65; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c66); + } + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c67); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c68(s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 === peg$FAILED) { + if (peg$c72.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c73); + } + } + } + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c71(s1); + } + s0 = s1; + return s0; + } + function peg$parsePlainStringText() { + var s0, s1, s2, s3, s4; + s0 = peg$currPos; + s1 = []; + s2 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s3 = peg$c65; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c66); + } + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c67); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c68(s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 === peg$FAILED) { + s2 = peg$currPos; + s3 = peg$currPos; + peg$silentFails++; + s4 = peg$parseSpecialShellChars(); + peg$silentFails--; + if (s4 === peg$FAILED) { + s3 = void 0; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c67); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c68(s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s3 = peg$c65; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c66); + } + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c67); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c68(s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 === peg$FAILED) { + s2 = peg$currPos; + s3 = peg$currPos; + peg$silentFails++; + s4 = peg$parseSpecialShellChars(); + peg$silentFails--; + if (s4 === peg$FAILED) { + s3 = void 0; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c67); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c68(s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c71(s1); + } + s0 = s1; + return s0; + } + function peg$parseArithmeticPrimary() { + var s0, s1, s2, s3, s4, s5; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 45) { + s1 = peg$c74; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c75); + } + } + if (s1 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 43) { + s1 = peg$c76; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c77); + } + } + } + if (s1 === peg$FAILED) { + s1 = null; + } + if (s1 !== peg$FAILED) { + s2 = []; + if (peg$c78.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c79); + } + } + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + if (peg$c78.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c79); + } + } + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 46) { + s3 = peg$c80; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c81); + } + } + if (s3 !== peg$FAILED) { + s4 = []; + if (peg$c78.test(input.charAt(peg$currPos))) { + s5 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c79); + } + } + if (s5 !== peg$FAILED) { + while (s5 !== peg$FAILED) { + s4.push(s5); + if (peg$c78.test(input.charAt(peg$currPos))) { + s5 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c79); + } + } + } + } else { + s4 = peg$FAILED; + } + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c82(s1, s2, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 45) { + s1 = peg$c74; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c75); + } + } + if (s1 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 43) { + s1 = peg$c76; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c77); + } + } + } + if (s1 === peg$FAILED) { + s1 = null; + } + if (s1 !== peg$FAILED) { + s2 = []; + if (peg$c78.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c79); + } + } + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + if (peg$c78.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c79); + } + } + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c83(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseVariable(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c84(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseIdentifier(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c85(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 40) { + s1 = peg$c22; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c23); + } + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseS(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseS(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseArithmeticExpression(); + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parseS(); + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parseS(); + } + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 41) { + s5 = peg$c24; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c25); + } + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c86(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + } + } + return s0; + } + function peg$parseArithmeticTimesExpression() { + var s0, s1, s2, s3, s4, s5; + s0 = peg$currPos; + s1 = peg$parseArithmeticPrimary(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseS(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseS(); + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 42) { + s3 = peg$c87; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c88); + } + } + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parseS(); + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parseS(); + } + if (s4 !== peg$FAILED) { + s5 = peg$parseArithmeticTimesExpression(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c89(s1, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseArithmeticPrimary(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseS(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseS(); + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 47) { + s3 = peg$c90; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c91); + } + } + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parseS(); + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parseS(); + } + if (s4 !== peg$FAILED) { + s5 = peg$parseArithmeticTimesExpression(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c92(s1, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$parseArithmeticPrimary(); + } + } + return s0; + } + function peg$parseArithmeticExpression() { + var s0, s1, s2, s3, s4, s5; + s0 = peg$currPos; + s1 = peg$parseArithmeticTimesExpression(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseS(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseS(); + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 43) { + s3 = peg$c76; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c77); + } + } + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parseS(); + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parseS(); + } + if (s4 !== peg$FAILED) { + s5 = peg$parseArithmeticExpression(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c93(s1, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseArithmeticTimesExpression(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseS(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseS(); + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 45) { + s3 = peg$c74; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c75); + } + } + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parseS(); + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parseS(); + } + if (s4 !== peg$FAILED) { + s5 = peg$parseArithmeticExpression(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c94(s1, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$parseArithmeticTimesExpression(); + } + } + return s0; + } + function peg$parseArithmetic() { + var s0, s1, s2, s3, s4, s5; + s0 = peg$currPos; + if (input.substr(peg$currPos, 3) === peg$c95) { + s1 = peg$c95; + peg$currPos += 3; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c96); + } + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseS(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseS(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseArithmeticExpression(); + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parseS(); + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parseS(); + } + if (s4 !== peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c97) { + s5 = peg$c97; + peg$currPos += 2; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c98); + } + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c99(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseSubshell() { + var s0, s1, s2, s3; + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c100) { + s1 = peg$c100; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c101); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseShellLine(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 41) { + s3 = peg$c24; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c25); + } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c102(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseVariable() { + var s0, s1, s2, s3, s4, s5; + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c103) { + s1 = peg$c103; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c104); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseIdentifier(); + if (s2 !== peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c105) { + s3 = peg$c105; + peg$currPos += 2; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c106); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseCommandString(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s5 = peg$c29; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c30); + } + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c107(s2, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c103) { + s1 = peg$c103; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c104); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseIdentifier(); + if (s2 !== peg$FAILED) { + if (input.substr(peg$currPos, 3) === peg$c108) { + s3 = peg$c108; + peg$currPos += 3; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c109); + } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c110(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c103) { + s1 = peg$c103; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c104); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseIdentifier(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s3 = peg$c29; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c30); + } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c111(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 36) { + s1 = peg$c112; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c113); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseIdentifier(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c111(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + } + return s0; + } + function peg$parseGlob() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = peg$parseGlobText(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c114(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c115(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseGlobText() { + var s0, s1, s2, s3, s4; + s0 = peg$currPos; + s1 = []; + s2 = peg$currPos; + s3 = peg$currPos; + peg$silentFails++; + s4 = peg$parseGlobSpecialShellChars(); + peg$silentFails--; + if (s4 === peg$FAILED) { + s3 = void 0; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c67); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c68(s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$currPos; + s3 = peg$currPos; + peg$silentFails++; + s4 = peg$parseGlobSpecialShellChars(); + peg$silentFails--; + if (s4 === peg$FAILED) { + s3 = void 0; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c67); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c68(s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c71(s1); + } + s0 = s1; + return s0; + } + function peg$parseEnvVariable() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + if (peg$c116.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c117); + } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + if (peg$c116.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c117); + } + } + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c118(); + } + s0 = s1; + return s0; + } + function peg$parseIdentifier() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + if (peg$c119.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c120); + } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + if (peg$c119.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c120); + } + } + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c118(); + } + s0 = s1; + return s0; + } + function peg$parseSpecialShellChars() { + var s0; + if (peg$c121.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c122); + } + } + return s0; + } + function peg$parseGlobSpecialShellChars() { + var s0; + if (peg$c123.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c124); + } + } + return s0; + } + function peg$parseS() { + var s0, s1; + s0 = []; + if (peg$c125.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c126); + } + } + if (s1 !== peg$FAILED) { + while (s1 !== peg$FAILED) { + s0.push(s1); + if (peg$c125.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c126); + } + } + } + } else { + s0 = peg$FAILED; + } + return s0; + } + peg$result = peg$startRuleFunction(); + if (peg$result !== peg$FAILED && peg$currPos === input.length) { + return peg$result; + } else { + if (peg$result !== peg$FAILED && peg$currPos < input.length) { + peg$fail(peg$endExpectation()); + } + throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)); + } + } + module2.exports = { + SyntaxError: peg$SyntaxError, + parse: peg$parse + }; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/shell.js +var require_shell2 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/shell.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.parseShell = void 0; + var shell_1 = require_shell(); + function parseShell(source, options = { isGlobPattern: () => false }) { + try { + return shell_1.parse(source, options); + } catch (error) { + if (error.location) + error.message = error.message.replace(/(\.)?$/, ` (line ${error.location.start.line}, column ${error.location.start.column})$1`); + throw error; + } + } + exports2.parseShell = parseShell; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/grammars/resolution.js +var require_resolution = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/grammars/resolution.js"(exports2, module2) { + "use strict"; + function peg$subclass(child, parent) { + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + } + function peg$SyntaxError(message2, expected, found, location) { + this.message = message2; + this.expected = expected; + this.found = found; + this.location = location; + this.name = "SyntaxError"; + if (typeof Error.captureStackTrace === "function") { + Error.captureStackTrace(this, peg$SyntaxError); + } + } + peg$subclass(peg$SyntaxError, Error); + peg$SyntaxError.buildMessage = function(expected, found) { + var DESCRIBE_EXPECTATION_FNS = { + literal: function(expectation) { + return `"${literalEscape(expectation.text)}"`; + }, + "class": function(expectation) { + var escapedParts = "", i; + for (i = 0; i < expectation.parts.length; i++) + escapedParts += expectation.parts[i] instanceof Array ? `${classEscape(expectation.parts[i][0])}-${classEscape(expectation.parts[i][1])}` : classEscape(expectation.parts[i]); + return `[${expectation.inverted ? "^" : ""}${escapedParts}]`; + }, + any: function(expectation) { + return "any character"; + }, + end: function(expectation) { + return "end of input"; + }, + other: function(expectation) { + return expectation.description; + } + }; + function hex(ch) { + return ch.charCodeAt(0).toString(16).toUpperCase(); + } + function literalEscape(s) { + return s.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) { + return `\\x0${hex(ch)}`; + }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { + return `\\x${hex(ch)}`; + }); + } + function classEscape(s) { + return s.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) { + return `\\x0${hex(ch)}`; + }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { + return `\\x${hex(ch)}`; + }); + } + function describeExpectation(expectation) { + return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); + } + function describeExpected(expected2) { + var descriptions = new Array(expected2.length), i, j; + for (i = 0; i < expected2.length; i++) + descriptions[i] = describeExpectation(expected2[i]); + descriptions.sort(); + if (descriptions.length > 0) { + for (i = 1, j = 1; i < descriptions.length; i++) { + if (descriptions[i - 1] !== descriptions[i]) { + descriptions[j] = descriptions[i]; + j++; + } + } + descriptions.length = j; + } + switch (descriptions.length) { + case 1: + return descriptions[0]; + case 2: + return `${descriptions[0]} or ${descriptions[1]}`; + default: + return `${descriptions.slice(0, -1).join(", ")}, or ${descriptions[descriptions.length - 1]}`; + } + } + function describeFound(found2) { + return found2 ? `"${literalEscape(found2)}"` : "end of input"; + } + return `Expected ${describeExpected(expected)} but ${describeFound(found)} found.`; + }; + function peg$parse(input, options) { + options = options !== void 0 ? options : {}; + var peg$FAILED = {}, peg$startRuleFunctions = { resolution: peg$parseresolution }, peg$startRuleFunction = peg$parseresolution, peg$c0 = "/", peg$c1 = peg$literalExpectation("/", false), peg$c2 = function(from, descriptor) { + return { from, descriptor }; + }, peg$c3 = function(descriptor) { + return { descriptor }; + }, peg$c4 = "@", peg$c5 = peg$literalExpectation("@", false), peg$c6 = function(fullName, description) { + return { fullName, description }; + }, peg$c7 = function(fullName) { + return { fullName }; + }, peg$c8 = function() { + return text(); + }, peg$c9 = /^[^\/@]/, peg$c10 = peg$classExpectation(["/", "@"], true, false), peg$c11 = /^[^\/]/, peg$c12 = peg$classExpectation(["/"], true, false), peg$currPos = 0, peg$savedPos = 0, peg$posDetailsCache = [{ line: 1, column: 1 }], peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, peg$result; + if ("startRule" in options) { + if (!(options.startRule in peg$startRuleFunctions)) + throw new Error(`Can't start parsing from rule "${options.startRule}".`); + peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; + } + function text() { + return input.substring(peg$savedPos, peg$currPos); + } + function location() { + return peg$computeLocation(peg$savedPos, peg$currPos); + } + function expected(description, location2) { + location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos); + throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location2); + } + function error(message2, location2) { + location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos); + throw peg$buildSimpleError(message2, location2); + } + function peg$literalExpectation(text2, ignoreCase) { + return { type: "literal", text: text2, ignoreCase }; + } + function peg$classExpectation(parts, inverted, ignoreCase) { + return { type: "class", parts, inverted, ignoreCase }; + } + function peg$anyExpectation() { + return { type: "any" }; + } + function peg$endExpectation() { + return { type: "end" }; + } + function peg$otherExpectation(description) { + return { type: "other", description }; + } + function peg$computePosDetails(pos) { + var details = peg$posDetailsCache[pos], p; + if (details) { + return details; + } else { + p = pos - 1; + while (!peg$posDetailsCache[p]) + p--; + details = peg$posDetailsCache[p]; + details = { + line: details.line, + column: details.column + }; + while (p < pos) { + if (input.charCodeAt(p) === 10) { + details.line++; + details.column = 1; + } else { + details.column++; + } + p++; + } + peg$posDetailsCache[pos] = details; + return details; + } + } + function peg$computeLocation(startPos, endPos) { + var startPosDetails = peg$computePosDetails(startPos), endPosDetails = peg$computePosDetails(endPos); + return { + start: { + offset: startPos, + line: startPosDetails.line, + column: startPosDetails.column + }, + end: { + offset: endPos, + line: endPosDetails.line, + column: endPosDetails.column + } + }; + } + function peg$fail(expected2) { + if (peg$currPos < peg$maxFailPos) + return; + if (peg$currPos > peg$maxFailPos) { + peg$maxFailPos = peg$currPos; + peg$maxFailExpected = []; + } + peg$maxFailExpected.push(expected2); + } + function peg$buildSimpleError(message2, location2) { + return new peg$SyntaxError(message2, null, null, location2); + } + function peg$buildStructuredError(expected2, found, location2) { + return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected2, found), expected2, found, location2); + } + function peg$parseresolution() { + var s0, s1, s2, s3; + s0 = peg$currPos; + s1 = peg$parsespecifier(); + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 47) { + s2 = peg$c0; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c1); + } + } + if (s2 !== peg$FAILED) { + s3 = peg$parsespecifier(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c2(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsespecifier(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c3(s1); + } + s0 = s1; + } + return s0; + } + function peg$parsespecifier() { + var s0, s1, s2, s3; + s0 = peg$currPos; + s1 = peg$parsefullName(); + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 64) { + s2 = peg$c4; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c5); + } + } + if (s2 !== peg$FAILED) { + s3 = peg$parsedescription(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c6(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsefullName(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c7(s1); + } + s0 = s1; + } + return s0; + } + function peg$parsefullName() { + var s0, s1, s2, s3, s4; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 64) { + s1 = peg$c4; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c5); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseident(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 47) { + s3 = peg$c0; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c1); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseident(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c8(); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseident(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c8(); + } + s0 = s1; + } + return s0; + } + function peg$parseident() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + if (peg$c9.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c10); + } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + if (peg$c9.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c10); + } + } + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c8(); + } + s0 = s1; + return s0; + } + function peg$parsedescription() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + if (peg$c11.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c12); + } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + if (peg$c11.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c12); + } + } + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c8(); + } + s0 = s1; + return s0; + } + peg$result = peg$startRuleFunction(); + if (peg$result !== peg$FAILED && peg$currPos === input.length) { + return peg$result; + } else { + if (peg$result !== peg$FAILED && peg$currPos < input.length) + peg$fail(peg$endExpectation()); + throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)); + } + } + module2.exports = { + SyntaxError: peg$SyntaxError, + parse: peg$parse + }; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/resolution.js +var require_resolution2 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/resolution.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.stringifyResolution = exports2.parseResolution = void 0; + var resolution_1 = require_resolution(); + function parseResolution(source) { + const legacyResolution = source.match(/^\*{1,2}\/(.*)/); + if (legacyResolution) + throw new Error(`The override for '${source}' includes a glob pattern. Glob patterns have been removed since their behaviours don't match what you'd expect. Set the override to '${legacyResolution[1]}' instead.`); + try { + return resolution_1.parse(source); + } catch (error) { + if (error.location) + error.message = error.message.replace(/(\.)?$/, ` (line ${error.location.start.line}, column ${error.location.start.column})$1`); + throw error; + } + } + exports2.parseResolution = parseResolution; + function stringifyResolution(resolution) { + let str = ``; + if (resolution.from) { + str += resolution.from.fullName; + if (resolution.from.description) + str += `@${resolution.from.description}`; + str += `/`; + } + str += resolution.descriptor.fullName; + if (resolution.descriptor.description) + str += `@${resolution.descriptor.description}`; + return str; + } + exports2.stringifyResolution = stringifyResolution; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/grammars/syml.js +var require_syml = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/grammars/syml.js"(exports2, module2) { + "use strict"; + function peg$subclass(child, parent) { + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + } + function peg$SyntaxError(message2, expected, found, location) { + this.message = message2; + this.expected = expected; + this.found = found; + this.location = location; + this.name = "SyntaxError"; + if (typeof Error.captureStackTrace === "function") { + Error.captureStackTrace(this, peg$SyntaxError); + } + } + peg$subclass(peg$SyntaxError, Error); + peg$SyntaxError.buildMessage = function(expected, found) { + var DESCRIBE_EXPECTATION_FNS = { + literal: function(expectation) { + return `"${literalEscape(expectation.text)}"`; + }, + "class": function(expectation) { + var escapedParts = "", i; + for (i = 0; i < expectation.parts.length; i++) + escapedParts += expectation.parts[i] instanceof Array ? `${classEscape(expectation.parts[i][0])}-${classEscape(expectation.parts[i][1])}` : classEscape(expectation.parts[i]); + return `[${expectation.inverted ? "^" : ""}${escapedParts}]`; + }, + any: function(expectation) { + return "any character"; + }, + end: function(expectation) { + return "end of input"; + }, + other: function(expectation) { + return expectation.description; + } + }; + function hex(ch) { + return ch.charCodeAt(0).toString(16).toUpperCase(); + } + function literalEscape(s) { + return s.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) { + return `\\x0${hex(ch)}`; + }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { + return `\\x${hex(ch)}`; + }); + } + function classEscape(s) { + return s.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) { + return `\\x0${hex(ch)}`; + }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { + return `\\x${hex(ch)}`; + }); + } + function describeExpectation(expectation) { + return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); + } + function describeExpected(expected2) { + var descriptions = new Array(expected2.length), i, j; + for (i = 0; i < expected2.length; i++) + descriptions[i] = describeExpectation(expected2[i]); + descriptions.sort(); + if (descriptions.length > 0) { + for (i = 1, j = 1; i < descriptions.length; i++) { + if (descriptions[i - 1] !== descriptions[i]) { + descriptions[j] = descriptions[i]; + j++; + } + } + descriptions.length = j; + } + switch (descriptions.length) { + case 1: + return descriptions[0]; + case 2: + return `${descriptions[0]} or ${descriptions[1]}`; + default: + return `${descriptions.slice(0, -1).join(", ")}, or ${descriptions[descriptions.length - 1]}`; + } + } + function describeFound(found2) { + return found2 ? `"${literalEscape(found2)}"` : "end of input"; + } + return `Expected ${describeExpected(expected)} but ${describeFound(found)} found.`; + }; + function peg$parse(input, options) { + options = options !== void 0 ? options : {}; + var peg$FAILED = {}, peg$startRuleFunctions = { Start: peg$parseStart }, peg$startRuleFunction = peg$parseStart, peg$c0 = function(statements) { + return [].concat(...statements); + }, peg$c1 = "-", peg$c2 = peg$literalExpectation("-", false), peg$c3 = function(value) { + return value; + }, peg$c4 = function(statements) { + return Object.assign({}, ...statements); + }, peg$c5 = "#", peg$c6 = peg$literalExpectation("#", false), peg$c7 = peg$anyExpectation(), peg$c8 = function() { + return {}; + }, peg$c9 = ":", peg$c10 = peg$literalExpectation(":", false), peg$c11 = function(property, value) { + return { [property]: value }; + }, peg$c12 = ",", peg$c13 = peg$literalExpectation(",", false), peg$c14 = function(property, other) { + return other; + }, peg$c15 = function(property, others, value) { + return Object.assign({}, ...[property].concat(others).map((property2) => ({ [property2]: value }))); + }, peg$c16 = function(statements) { + return statements; + }, peg$c17 = function(expression) { + return expression; + }, peg$c18 = peg$otherExpectation("correct indentation"), peg$c19 = " ", peg$c20 = peg$literalExpectation(" ", false), peg$c21 = function(spaces) { + return spaces.length === indentLevel * INDENT_STEP; + }, peg$c22 = function(spaces) { + return spaces.length === (indentLevel + 1) * INDENT_STEP; + }, peg$c23 = function() { + indentLevel++; + return true; + }, peg$c24 = function() { + indentLevel--; + return true; + }, peg$c25 = function() { + return text(); + }, peg$c26 = peg$otherExpectation("pseudostring"), peg$c27 = /^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/, peg$c28 = peg$classExpectation(["\r", "\n", " ", " ", "?", ":", ",", "]", "[", "{", "}", "#", "&", "*", "!", "|", ">", "'", '"', "%", "@", "`", "-"], true, false), peg$c29 = /^[^\r\n\t ,\][{}:#"']/, peg$c30 = peg$classExpectation(["\r", "\n", " ", " ", ",", "]", "[", "{", "}", ":", "#", '"', "'"], true, false), peg$c31 = function() { + return text().replace(/^ *| *$/g, ""); + }, peg$c32 = "--", peg$c33 = peg$literalExpectation("--", false), peg$c34 = /^[a-zA-Z\/0-9]/, peg$c35 = peg$classExpectation([["a", "z"], ["A", "Z"], "/", ["0", "9"]], false, false), peg$c36 = /^[^\r\n\t :,]/, peg$c37 = peg$classExpectation(["\r", "\n", " ", " ", ":", ","], true, false), peg$c38 = "null", peg$c39 = peg$literalExpectation("null", false), peg$c40 = function() { + return null; + }, peg$c41 = "true", peg$c42 = peg$literalExpectation("true", false), peg$c43 = function() { + return true; + }, peg$c44 = "false", peg$c45 = peg$literalExpectation("false", false), peg$c46 = function() { + return false; + }, peg$c47 = peg$otherExpectation("string"), peg$c48 = '"', peg$c49 = peg$literalExpectation('"', false), peg$c50 = function() { + return ""; + }, peg$c51 = function(chars) { + return chars; + }, peg$c52 = function(chars) { + return chars.join(``); + }, peg$c53 = /^[^"\\\0-\x1F\x7F]/, peg$c54 = peg$classExpectation(['"', "\\", ["\0", ""], "\x7F"], true, false), peg$c55 = '\\"', peg$c56 = peg$literalExpectation('\\"', false), peg$c57 = function() { + return `"`; + }, peg$c58 = "\\\\", peg$c59 = peg$literalExpectation("\\\\", false), peg$c60 = function() { + return `\\`; + }, peg$c61 = "\\/", peg$c62 = peg$literalExpectation("\\/", false), peg$c63 = function() { + return `/`; + }, peg$c64 = "\\b", peg$c65 = peg$literalExpectation("\\b", false), peg$c66 = function() { + return `\b`; + }, peg$c67 = "\\f", peg$c68 = peg$literalExpectation("\\f", false), peg$c69 = function() { + return `\f`; + }, peg$c70 = "\\n", peg$c71 = peg$literalExpectation("\\n", false), peg$c72 = function() { + return ` +`; + }, peg$c73 = "\\r", peg$c74 = peg$literalExpectation("\\r", false), peg$c75 = function() { + return `\r`; + }, peg$c76 = "\\t", peg$c77 = peg$literalExpectation("\\t", false), peg$c78 = function() { + return ` `; + }, peg$c79 = "\\u", peg$c80 = peg$literalExpectation("\\u", false), peg$c81 = function(h1, h2, h3, h4) { + return String.fromCharCode(parseInt(`0x${h1}${h2}${h3}${h4}`)); + }, peg$c82 = /^[0-9a-fA-F]/, peg$c83 = peg$classExpectation([["0", "9"], ["a", "f"], ["A", "F"]], false, false), peg$c84 = peg$otherExpectation("blank space"), peg$c85 = /^[ \t]/, peg$c86 = peg$classExpectation([" ", " "], false, false), peg$c87 = peg$otherExpectation("white space"), peg$c88 = /^[ \t\n\r]/, peg$c89 = peg$classExpectation([" ", " ", "\n", "\r"], false, false), peg$c90 = "\r\n", peg$c91 = peg$literalExpectation("\r\n", false), peg$c92 = "\n", peg$c93 = peg$literalExpectation("\n", false), peg$c94 = "\r", peg$c95 = peg$literalExpectation("\r", false), peg$currPos = 0, peg$savedPos = 0, peg$posDetailsCache = [{ line: 1, column: 1 }], peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, peg$result; + if ("startRule" in options) { + if (!(options.startRule in peg$startRuleFunctions)) + throw new Error(`Can't start parsing from rule "${options.startRule}".`); + peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; + } + function text() { + return input.substring(peg$savedPos, peg$currPos); + } + function location() { + return peg$computeLocation(peg$savedPos, peg$currPos); + } + function expected(description, location2) { + location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos); + throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location2); + } + function error(message2, location2) { + location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos); + throw peg$buildSimpleError(message2, location2); + } + function peg$literalExpectation(text2, ignoreCase) { + return { type: "literal", text: text2, ignoreCase }; + } + function peg$classExpectation(parts, inverted, ignoreCase) { + return { type: "class", parts, inverted, ignoreCase }; + } + function peg$anyExpectation() { + return { type: "any" }; + } + function peg$endExpectation() { + return { type: "end" }; + } + function peg$otherExpectation(description) { + return { type: "other", description }; + } + function peg$computePosDetails(pos) { + var details = peg$posDetailsCache[pos], p; + if (details) { + return details; + } else { + p = pos - 1; + while (!peg$posDetailsCache[p]) + p--; + details = peg$posDetailsCache[p]; + details = { + line: details.line, + column: details.column + }; + while (p < pos) { + if (input.charCodeAt(p) === 10) { + details.line++; + details.column = 1; + } else { + details.column++; + } + p++; + } + peg$posDetailsCache[pos] = details; + return details; + } + } + function peg$computeLocation(startPos, endPos) { + var startPosDetails = peg$computePosDetails(startPos), endPosDetails = peg$computePosDetails(endPos); + return { + start: { + offset: startPos, + line: startPosDetails.line, + column: startPosDetails.column + }, + end: { + offset: endPos, + line: endPosDetails.line, + column: endPosDetails.column + } + }; + } + function peg$fail(expected2) { + if (peg$currPos < peg$maxFailPos) + return; + if (peg$currPos > peg$maxFailPos) { + peg$maxFailPos = peg$currPos; + peg$maxFailExpected = []; + } + peg$maxFailExpected.push(expected2); + } + function peg$buildSimpleError(message2, location2) { + return new peg$SyntaxError(message2, null, null, location2); + } + function peg$buildStructuredError(expected2, found, location2) { + return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected2, found), expected2, found, location2); + } + function peg$parseStart() { + var s0; + s0 = peg$parsePropertyStatements(); + return s0; + } + function peg$parseItemStatements() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + s2 = peg$parseItemStatement(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseItemStatement(); + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c0(s1); + } + s0 = s1; + return s0; + } + function peg$parseItemStatement() { + var s0, s1, s2, s3, s4; + s0 = peg$currPos; + s1 = peg$parseSamedent(); + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 45) { + s2 = peg$c1; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c2); + } + } + if (s2 !== peg$FAILED) { + s3 = peg$parseB(); + if (s3 !== peg$FAILED) { + s4 = peg$parseExpression(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c3(s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parsePropertyStatements() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + s2 = peg$parsePropertyStatement(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parsePropertyStatement(); + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c4(s1); + } + s0 = s1; + return s0; + } + function peg$parsePropertyStatement() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8; + s0 = peg$currPos; + s1 = peg$parseB(); + if (s1 === peg$FAILED) + s1 = null; + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 35) { + s3 = peg$c5; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c6); + } + } + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$currPos; + s6 = peg$currPos; + peg$silentFails++; + s7 = peg$parseEOL(); + peg$silentFails--; + if (s7 === peg$FAILED) { + s6 = void 0; + } else { + peg$currPos = s6; + s6 = peg$FAILED; + } + if (s6 !== peg$FAILED) { + if (input.length > peg$currPos) { + s7 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c7); + } + } + if (s7 !== peg$FAILED) { + s6 = [s6, s7]; + s5 = s6; + } else { + peg$currPos = s5; + s5 = peg$FAILED; + } + } else { + peg$currPos = s5; + s5 = peg$FAILED; + } + if (s5 !== peg$FAILED) { + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$currPos; + s6 = peg$currPos; + peg$silentFails++; + s7 = peg$parseEOL(); + peg$silentFails--; + if (s7 === peg$FAILED) { + s6 = void 0; + } else { + peg$currPos = s6; + s6 = peg$FAILED; + } + if (s6 !== peg$FAILED) { + if (input.length > peg$currPos) { + s7 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c7); + } + } + if (s7 !== peg$FAILED) { + s6 = [s6, s7]; + s5 = s6; + } else { + peg$currPos = s5; + s5 = peg$FAILED; + } + } else { + peg$currPos = s5; + s5 = peg$FAILED; + } + } + } else { + s4 = peg$FAILED; + } + if (s4 !== peg$FAILED) { + s3 = [s3, s4]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 === peg$FAILED) + s2 = null; + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseEOL_ANY(); + if (s4 !== peg$FAILED) { + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseEOL_ANY(); + } + } else { + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c8(); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseSamedent(); + if (s1 !== peg$FAILED) { + s2 = peg$parseName(); + if (s2 !== peg$FAILED) { + s3 = peg$parseB(); + if (s3 === peg$FAILED) + s3 = null; + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 58) { + s4 = peg$c9; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c10); + } + } + if (s4 !== peg$FAILED) { + s5 = peg$parseB(); + if (s5 === peg$FAILED) + s5 = null; + if (s5 !== peg$FAILED) { + s6 = peg$parseExpression(); + if (s6 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c11(s2, s6); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseSamedent(); + if (s1 !== peg$FAILED) { + s2 = peg$parseLegacyName(); + if (s2 !== peg$FAILED) { + s3 = peg$parseB(); + if (s3 === peg$FAILED) + s3 = null; + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 58) { + s4 = peg$c9; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c10); + } + } + if (s4 !== peg$FAILED) { + s5 = peg$parseB(); + if (s5 === peg$FAILED) + s5 = null; + if (s5 !== peg$FAILED) { + s6 = peg$parseExpression(); + if (s6 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c11(s2, s6); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseSamedent(); + if (s1 !== peg$FAILED) { + s2 = peg$parseLegacyName(); + if (s2 !== peg$FAILED) { + s3 = peg$parseB(); + if (s3 !== peg$FAILED) { + s4 = peg$parseLegacyLiteral(); + if (s4 !== peg$FAILED) { + s5 = []; + s6 = peg$parseEOL_ANY(); + if (s6 !== peg$FAILED) { + while (s6 !== peg$FAILED) { + s5.push(s6); + s6 = peg$parseEOL_ANY(); + } + } else { + s5 = peg$FAILED; + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c11(s2, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseSamedent(); + if (s1 !== peg$FAILED) { + s2 = peg$parseLegacyName(); + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$currPos; + s5 = peg$parseB(); + if (s5 === peg$FAILED) + s5 = null; + if (s5 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s6 = peg$c12; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c13); + } + } + if (s6 !== peg$FAILED) { + s7 = peg$parseB(); + if (s7 === peg$FAILED) + s7 = null; + if (s7 !== peg$FAILED) { + s8 = peg$parseLegacyName(); + if (s8 !== peg$FAILED) { + peg$savedPos = s4; + s5 = peg$c14(s2, s8); + s4 = s5; + } else { + peg$currPos = s4; + s4 = peg$FAILED; + } + } else { + peg$currPos = s4; + s4 = peg$FAILED; + } + } else { + peg$currPos = s4; + s4 = peg$FAILED; + } + } else { + peg$currPos = s4; + s4 = peg$FAILED; + } + if (s4 !== peg$FAILED) { + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$currPos; + s5 = peg$parseB(); + if (s5 === peg$FAILED) + s5 = null; + if (s5 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s6 = peg$c12; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c13); + } + } + if (s6 !== peg$FAILED) { + s7 = peg$parseB(); + if (s7 === peg$FAILED) + s7 = null; + if (s7 !== peg$FAILED) { + s8 = peg$parseLegacyName(); + if (s8 !== peg$FAILED) { + peg$savedPos = s4; + s5 = peg$c14(s2, s8); + s4 = s5; + } else { + peg$currPos = s4; + s4 = peg$FAILED; + } + } else { + peg$currPos = s4; + s4 = peg$FAILED; + } + } else { + peg$currPos = s4; + s4 = peg$FAILED; + } + } else { + peg$currPos = s4; + s4 = peg$FAILED; + } + } + } else { + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + s4 = peg$parseB(); + if (s4 === peg$FAILED) + s4 = null; + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 58) { + s5 = peg$c9; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c10); + } + } + if (s5 !== peg$FAILED) { + s6 = peg$parseB(); + if (s6 === peg$FAILED) + s6 = null; + if (s6 !== peg$FAILED) { + s7 = peg$parseExpression(); + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c15(s2, s3, s7); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + } + } + return s0; + } + function peg$parseExpression() { + var s0, s1, s2, s3, s4, s5, s6; + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$currPos; + s3 = peg$parseEOL(); + if (s3 !== peg$FAILED) { + s4 = peg$parseExtradent(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 45) { + s5 = peg$c1; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c2); + } + } + if (s5 !== peg$FAILED) { + s6 = peg$parseB(); + if (s6 !== peg$FAILED) { + s3 = [s3, s4, s5, s6]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + peg$silentFails--; + if (s2 !== peg$FAILED) { + peg$currPos = s1; + s1 = void 0; + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s2 = peg$parseEOL_ANY(); + if (s2 !== peg$FAILED) { + s3 = peg$parseIndent(); + if (s3 !== peg$FAILED) { + s4 = peg$parseItemStatements(); + if (s4 !== peg$FAILED) { + s5 = peg$parseDedent(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c16(s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseEOL(); + if (s1 !== peg$FAILED) { + s2 = peg$parseIndent(); + if (s2 !== peg$FAILED) { + s3 = peg$parsePropertyStatements(); + if (s3 !== peg$FAILED) { + s4 = peg$parseDedent(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c16(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseLiteral(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseEOL_ANY(); + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseEOL_ANY(); + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c17(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + return s0; + } + function peg$parseSamedent() { + var s0, s1, s2; + peg$silentFails++; + s0 = peg$currPos; + s1 = []; + if (input.charCodeAt(peg$currPos) === 32) { + s2 = peg$c19; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c20); + } + } + while (s2 !== peg$FAILED) { + s1.push(s2); + if (input.charCodeAt(peg$currPos) === 32) { + s2 = peg$c19; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c20); + } + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c21(s1); + if (s2) + s2 = void 0; + else + s2 = peg$FAILED; + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c18); + } + } + return s0; + } + function peg$parseExtradent() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + if (input.charCodeAt(peg$currPos) === 32) { + s2 = peg$c19; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c20); + } + } + while (s2 !== peg$FAILED) { + s1.push(s2); + if (input.charCodeAt(peg$currPos) === 32) { + s2 = peg$c19; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c20); + } + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c22(s1); + if (s2) + s2 = void 0; + else + s2 = peg$FAILED; + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseIndent() { + var s0; + peg$savedPos = peg$currPos; + s0 = peg$c23(); + if (s0) + s0 = void 0; + else + s0 = peg$FAILED; + return s0; + } + function peg$parseDedent() { + var s0; + peg$savedPos = peg$currPos; + s0 = peg$c24(); + if (s0) + s0 = void 0; + else + s0 = peg$FAILED; + return s0; + } + function peg$parseName() { + var s0; + s0 = peg$parsestring(); + if (s0 === peg$FAILED) + s0 = peg$parsepseudostring(); + return s0; + } + function peg$parseLegacyName() { + var s0, s1, s2; + s0 = peg$parsestring(); + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = []; + s2 = peg$parsepseudostringLegacy(); + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parsepseudostringLegacy(); + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c25(); + } + s0 = s1; + } + return s0; + } + function peg$parseLiteral() { + var s0; + s0 = peg$parsenull(); + if (s0 === peg$FAILED) { + s0 = peg$parseboolean(); + if (s0 === peg$FAILED) { + s0 = peg$parsestring(); + if (s0 === peg$FAILED) { + s0 = peg$parsepseudostring(); + } + } + } + return s0; + } + function peg$parseLegacyLiteral() { + var s0; + s0 = peg$parsenull(); + if (s0 === peg$FAILED) { + s0 = peg$parsestring(); + if (s0 === peg$FAILED) { + s0 = peg$parsepseudostringLegacy(); + } + } + return s0; + } + function peg$parsepseudostring() { + var s0, s1, s2, s3, s4, s5; + peg$silentFails++; + s0 = peg$currPos; + if (peg$c27.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c28); + } + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parseB(); + if (s4 === peg$FAILED) + s4 = null; + if (s4 !== peg$FAILED) { + if (peg$c29.test(input.charAt(peg$currPos))) { + s5 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c30); + } + } + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parseB(); + if (s4 === peg$FAILED) + s4 = null; + if (s4 !== peg$FAILED) { + if (peg$c29.test(input.charAt(peg$currPos))) { + s5 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c30); + } + } + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c31(); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c26); + } + } + return s0; + } + function peg$parsepseudostringLegacy() { + var s0, s1, s2, s3, s4; + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c32) { + s1 = peg$c32; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c33); + } + } + if (s1 === peg$FAILED) + s1 = null; + if (s1 !== peg$FAILED) { + if (peg$c34.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c35); + } + } + if (s2 !== peg$FAILED) { + s3 = []; + if (peg$c36.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c37); + } + } + while (s4 !== peg$FAILED) { + s3.push(s4); + if (peg$c36.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c37); + } + } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c31(); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parsenull() { + var s0, s1; + s0 = peg$currPos; + if (input.substr(peg$currPos, 4) === peg$c38) { + s1 = peg$c38; + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c39); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c40(); + } + s0 = s1; + return s0; + } + function peg$parseboolean() { + var s0, s1; + s0 = peg$currPos; + if (input.substr(peg$currPos, 4) === peg$c41) { + s1 = peg$c41; + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c42); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c43(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 5) === peg$c44) { + s1 = peg$c44; + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c45); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c46(); + } + s0 = s1; + } + return s0; + } + function peg$parsestring() { + var s0, s1, s2, s3; + peg$silentFails++; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 34) { + s1 = peg$c48; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c49); + } + } + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 34) { + s2 = peg$c48; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c49); + } + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c50(); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 34) { + s1 = peg$c48; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c49); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parsechars(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 34) { + s3 = peg$c48; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c49); + } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c51(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c47); + } + } + return s0; + } + function peg$parsechars() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + s2 = peg$parsechar(); + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parsechar(); + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c52(s1); + } + s0 = s1; + return s0; + } + function peg$parsechar() { + var s0, s1, s2, s3, s4, s5; + if (peg$c53.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c54); + } + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c55) { + s1 = peg$c55; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c56); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c57(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c58) { + s1 = peg$c58; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c59); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c60(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c61) { + s1 = peg$c61; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c62); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c63(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c64) { + s1 = peg$c64; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c65); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c66(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c67) { + s1 = peg$c67; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c68); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c69(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c70) { + s1 = peg$c70; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c71); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c72(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c73) { + s1 = peg$c73; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c74); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c75(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c76) { + s1 = peg$c76; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c77); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c78(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c79) { + s1 = peg$c79; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c80); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parsehexDigit(); + if (s2 !== peg$FAILED) { + s3 = peg$parsehexDigit(); + if (s3 !== peg$FAILED) { + s4 = peg$parsehexDigit(); + if (s4 !== peg$FAILED) { + s5 = peg$parsehexDigit(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c81(s2, s3, s4, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + } + } + } + } + } + } + } + return s0; + } + function peg$parsehexDigit() { + var s0; + if (peg$c82.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c83); + } + } + return s0; + } + function peg$parseB() { + var s0, s1; + peg$silentFails++; + s0 = []; + if (peg$c85.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c86); + } + } + if (s1 !== peg$FAILED) { + while (s1 !== peg$FAILED) { + s0.push(s1); + if (peg$c85.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c86); + } + } + } + } else { + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c84); + } + } + return s0; + } + function peg$parseS() { + var s0, s1; + peg$silentFails++; + s0 = []; + if (peg$c88.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c89); + } + } + if (s1 !== peg$FAILED) { + while (s1 !== peg$FAILED) { + s0.push(s1); + if (peg$c88.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c89); + } + } + } + } else { + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c87); + } + } + return s0; + } + function peg$parseEOL_ANY() { + var s0, s1, s2, s3, s4, s5; + s0 = peg$currPos; + s1 = peg$parseEOL(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parseB(); + if (s4 === peg$FAILED) + s4 = null; + if (s4 !== peg$FAILED) { + s5 = peg$parseEOL(); + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parseB(); + if (s4 === peg$FAILED) + s4 = null; + if (s4 !== peg$FAILED) { + s5 = peg$parseEOL(); + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseEOL() { + var s0; + if (input.substr(peg$currPos, 2) === peg$c90) { + s0 = peg$c90; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c91); + } + } + if (s0 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 10) { + s0 = peg$c92; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c93); + } + } + if (s0 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 13) { + s0 = peg$c94; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c95); + } + } + } + } + return s0; + } + const INDENT_STEP = 2; + let indentLevel = 0; + peg$result = peg$startRuleFunction(); + if (peg$result !== peg$FAILED && peg$currPos === input.length) { + return peg$result; + } else { + if (peg$result !== peg$FAILED && peg$currPos < input.length) + peg$fail(peg$endExpectation()); + throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)); + } + } + module2.exports = { + SyntaxError: peg$SyntaxError, + parse: peg$parse + }; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/syml.js +var require_syml2 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/syml.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.parseSyml = exports2.stringifySyml = exports2.PreserveOrdering = void 0; + var js_yaml_1 = require_js_yaml3(); + var syml_1 = require_syml(); + var simpleStringPattern = /^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/; + var specialObjectKeys = [`__metadata`, `version`, `resolution`, `dependencies`, `peerDependencies`, `dependenciesMeta`, `peerDependenciesMeta`, `binaries`]; + var PreserveOrdering = class { + constructor(data) { + this.data = data; + } + }; + exports2.PreserveOrdering = PreserveOrdering; + function stringifyString(value) { + if (value.match(simpleStringPattern)) { + return value; + } else { + return JSON.stringify(value); + } + } + function isRemovableField(value) { + if (typeof value === `undefined`) + return true; + if (typeof value === `object` && value !== null) + return Object.keys(value).every((key) => isRemovableField(value[key])); + return false; + } + function stringifyValue(value, indentLevel, newLineIfObject) { + if (value === null) + return `null +`; + if (typeof value === `number` || typeof value === `boolean`) + return `${value.toString()} +`; + if (typeof value === `string`) + return `${stringifyString(value)} +`; + if (Array.isArray(value)) { + if (value.length === 0) + return `[] +`; + const indent = ` `.repeat(indentLevel); + const serialized = value.map((sub) => { + return `${indent}- ${stringifyValue(sub, indentLevel + 1, false)}`; + }).join(``); + return ` +${serialized}`; + } + if (typeof value === `object` && value) { + let data; + let sort; + if (value instanceof PreserveOrdering) { + data = value.data; + sort = false; + } else { + data = value; + sort = true; + } + const indent = ` `.repeat(indentLevel); + const keys = Object.keys(data); + if (sort) { + keys.sort((a, b) => { + const aIndex = specialObjectKeys.indexOf(a); + const bIndex = specialObjectKeys.indexOf(b); + if (aIndex === -1 && bIndex === -1) + return a < b ? -1 : a > b ? 1 : 0; + if (aIndex !== -1 && bIndex === -1) + return -1; + if (aIndex === -1 && bIndex !== -1) + return 1; + return aIndex - bIndex; + }); + } + const fields = keys.filter((key) => { + return !isRemovableField(data[key]); + }).map((key, index) => { + const value2 = data[key]; + const stringifiedKey = stringifyString(key); + const stringifiedValue = stringifyValue(value2, indentLevel + 1, true); + const recordIndentation = index > 0 || newLineIfObject ? indent : ``; + if (stringifiedValue.startsWith(` +`)) { + return `${recordIndentation}${stringifiedKey}:${stringifiedValue}`; + } else { + return `${recordIndentation}${stringifiedKey}: ${stringifiedValue}`; + } + }).join(indentLevel === 0 ? ` +` : ``) || ` +`; + if (!newLineIfObject) { + return `${fields}`; + } else { + return ` +${fields}`; + } + } + throw new Error(`Unsupported value type (${value})`); + } + function stringifySyml(value) { + try { + const stringified = stringifyValue(value, 0, false); + return stringified !== ` +` ? stringified : ``; + } catch (error) { + if (error.location) + error.message = error.message.replace(/(\.)?$/, ` (line ${error.location.start.line}, column ${error.location.start.column})$1`); + throw error; + } + } + exports2.stringifySyml = stringifySyml; + stringifySyml.PreserveOrdering = PreserveOrdering; + function parseViaPeg(source) { + if (!source.endsWith(` +`)) + source += ` +`; + return syml_1.parse(source); + } + var LEGACY_REGEXP = /^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i; + function parseViaJsYaml(source) { + if (LEGACY_REGEXP.test(source)) + return parseViaPeg(source); + const value = js_yaml_1.safeLoad(source, { + schema: js_yaml_1.FAILSAFE_SCHEMA + }); + if (value === void 0 || value === null) + return {}; + if (typeof value !== `object`) + throw new Error(`Expected an indexed object, got a ${typeof value} instead. Does your file follow Yaml's rules?`); + if (Array.isArray(value)) + throw new Error(`Expected an indexed object, got an array instead. Does your file follow Yaml's rules?`); + return value; + } + function parseSyml(source) { + return parseViaJsYaml(source); + } + exports2.parseSyml = parseSyml; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/index.js +var require_lib77 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.stringifySyml = exports2.parseSyml = exports2.stringifyResolution = exports2.parseResolution = exports2.parseShell = void 0; + var shell_1 = require_shell2(); + Object.defineProperty(exports2, "parseShell", { enumerable: true, get: function() { + return shell_1.parseShell; + } }); + var resolution_1 = require_resolution2(); + Object.defineProperty(exports2, "parseResolution", { enumerable: true, get: function() { + return resolution_1.parseResolution; + } }); + Object.defineProperty(exports2, "stringifyResolution", { enumerable: true, get: function() { + return resolution_1.stringifyResolution; + } }); + var syml_1 = require_syml2(); + Object.defineProperty(exports2, "parseSyml", { enumerable: true, get: function() { + return syml_1.parseSyml; + } }); + Object.defineProperty(exports2, "stringifySyml", { enumerable: true, get: function() { + return syml_1.stringifySyml; + } }); + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+shell@2.4.1/node_modules/@yarnpkg/shell/lib/errors.js +var require_errors5 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+shell@2.4.1/node_modules/@yarnpkg/shell/lib/errors.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ShellError = void 0; + var ShellError = class extends Error { + constructor(message2) { + super(message2); + this.name = `ShellError`; + } + }; + exports2.ShellError = ShellError; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+shell@2.4.1/node_modules/@yarnpkg/shell/lib/globUtils.js +var require_globUtils = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+shell@2.4.1/node_modules/@yarnpkg/shell/lib/globUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isBraceExpansion = exports2.match = exports2.isGlobPattern = exports2.fastGlobOptions = exports2.micromatchOptions = void 0; + var tslib_1 = require_tslib(); + var fslib_1 = require_lib76(); + var fast_glob_1 = tslib_1.__importDefault(require_out4()); + var fs_1 = tslib_1.__importDefault(require("fs")); + var micromatch_1 = tslib_1.__importDefault(require_micromatch()); + exports2.micromatchOptions = { + strictBrackets: true + }; + exports2.fastGlobOptions = { + onlyDirectories: false, + onlyFiles: false + }; + function isGlobPattern(pattern) { + if (!micromatch_1.default.scan(pattern, exports2.micromatchOptions).isGlob) + return false; + try { + micromatch_1.default.parse(pattern, exports2.micromatchOptions); + } catch (_a) { + return false; + } + return true; + } + exports2.isGlobPattern = isGlobPattern; + function match(pattern, { cwd, baseFs }) { + return fast_glob_1.default(pattern, { + ...exports2.fastGlobOptions, + cwd: fslib_1.npath.fromPortablePath(cwd), + fs: fslib_1.extendFs(fs_1.default, new fslib_1.PosixFS(baseFs)) + }); + } + exports2.match = match; + function isBraceExpansion(pattern) { + return micromatch_1.default.scan(pattern, exports2.micromatchOptions).isBrace; + } + exports2.isBraceExpansion = isBraceExpansion; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+shell@2.4.1/node_modules/@yarnpkg/shell/lib/pipe.js +var require_pipe4 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+shell@2.4.1/node_modules/@yarnpkg/shell/lib/pipe.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.start = exports2.Handle = exports2.ProtectedStream = exports2.makeBuiltin = exports2.makeProcess = exports2.Pipe = void 0; + var tslib_1 = require_tslib(); + var cross_spawn_1 = tslib_1.__importDefault(require_cross_spawn()); + var stream_1 = require("stream"); + var Pipe; + (function(Pipe2) { + Pipe2[Pipe2["STDIN"] = 0] = "STDIN"; + Pipe2[Pipe2["STDOUT"] = 1] = "STDOUT"; + Pipe2[Pipe2["STDERR"] = 2] = "STDERR"; + })(Pipe = exports2.Pipe || (exports2.Pipe = {})); + function sigintHandler() { + } + var sigintRefCount = 0; + function makeProcess(name, args2, opts, spawnOpts) { + return (stdio) => { + const stdin = stdio[0] instanceof stream_1.Transform ? `pipe` : stdio[0]; + const stdout = stdio[1] instanceof stream_1.Transform ? `pipe` : stdio[1]; + const stderr = stdio[2] instanceof stream_1.Transform ? `pipe` : stdio[2]; + const child = cross_spawn_1.default(name, args2, { ...spawnOpts, stdio: [ + stdin, + stdout, + stderr + ] }); + if (sigintRefCount++ === 0) + process.on(`SIGINT`, sigintHandler); + if (stdio[0] instanceof stream_1.Transform) + stdio[0].pipe(child.stdin); + if (stdio[1] instanceof stream_1.Transform) + child.stdout.pipe(stdio[1], { end: false }); + if (stdio[2] instanceof stream_1.Transform) + child.stderr.pipe(stdio[2], { end: false }); + return { + stdin: child.stdin, + promise: new Promise((resolve) => { + child.on(`error`, (error) => { + if (--sigintRefCount === 0) + process.off(`SIGINT`, sigintHandler); + switch (error.code) { + case `ENOENT`: + { + stdio[2].write(`command not found: ${name} +`); + resolve(127); + } + break; + case `EACCES`: + { + stdio[2].write(`permission denied: ${name} +`); + resolve(128); + } + break; + default: + { + stdio[2].write(`uncaught error: ${error.message} +`); + resolve(1); + } + break; + } + }); + child.on(`exit`, (code) => { + if (--sigintRefCount === 0) + process.off(`SIGINT`, sigintHandler); + if (code !== null) { + resolve(code); + } else { + resolve(129); + } + }); + }) + }; + }; + } + exports2.makeProcess = makeProcess; + function makeBuiltin(builtin) { + return (stdio) => { + const stdin = stdio[0] === `pipe` ? new stream_1.PassThrough() : stdio[0]; + return { + stdin, + promise: Promise.resolve().then(() => builtin({ + stdin, + stdout: stdio[1], + stderr: stdio[2] + })) + }; + }; + } + exports2.makeBuiltin = makeBuiltin; + var ProtectedStream = class { + constructor(stream) { + this.stream = stream; + } + close() { + } + get() { + return this.stream; + } + }; + exports2.ProtectedStream = ProtectedStream; + var PipeStream = class { + constructor() { + this.stream = null; + } + close() { + if (this.stream === null) { + throw new Error(`Assertion failed: No stream attached`); + } else { + this.stream.end(); + } + } + attach(stream) { + this.stream = stream; + } + get() { + if (this.stream === null) { + throw new Error(`Assertion failed: No stream attached`); + } else { + return this.stream; + } + } + }; + var Handle = class { + constructor(ancestor, implementation) { + this.stdin = null; + this.stdout = null; + this.stderr = null; + this.pipe = null; + this.ancestor = ancestor; + this.implementation = implementation; + } + static start(implementation, { stdin, stdout, stderr }) { + const chain = new Handle(null, implementation); + chain.stdin = stdin; + chain.stdout = stdout; + chain.stderr = stderr; + return chain; + } + pipeTo(implementation, source = Pipe.STDOUT) { + const next = new Handle(this, implementation); + const pipe = new PipeStream(); + next.pipe = pipe; + next.stdout = this.stdout; + next.stderr = this.stderr; + if ((source & Pipe.STDOUT) === Pipe.STDOUT) + this.stdout = pipe; + else if (this.ancestor !== null) + this.stderr = this.ancestor.stdout; + if ((source & Pipe.STDERR) === Pipe.STDERR) + this.stderr = pipe; + else if (this.ancestor !== null) + this.stderr = this.ancestor.stderr; + return next; + } + async exec() { + const stdio = [ + `ignore`, + `ignore`, + `ignore` + ]; + if (this.pipe) { + stdio[0] = `pipe`; + } else { + if (this.stdin === null) { + throw new Error(`Assertion failed: No input stream registered`); + } else { + stdio[0] = this.stdin.get(); + } + } + let stdoutLock; + if (this.stdout === null) { + throw new Error(`Assertion failed: No output stream registered`); + } else { + stdoutLock = this.stdout; + stdio[1] = stdoutLock.get(); + } + let stderrLock; + if (this.stderr === null) { + throw new Error(`Assertion failed: No error stream registered`); + } else { + stderrLock = this.stderr; + stdio[2] = stderrLock.get(); + } + const child = this.implementation(stdio); + if (this.pipe) + this.pipe.attach(child.stdin); + return await child.promise.then((code) => { + stdoutLock.close(); + stderrLock.close(); + return code; + }); + } + async run() { + const promises = []; + for (let handle = this; handle; handle = handle.ancestor) + promises.push(handle.exec()); + const exitCodes = await Promise.all(promises); + return exitCodes[0]; + } + }; + exports2.Handle = Handle; + function start(p, opts) { + return Handle.start(p, opts); + } + exports2.start = start; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+shell@2.4.1/node_modules/@yarnpkg/shell/lib/index.js +var require_lib78 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+shell@2.4.1/node_modules/@yarnpkg/shell/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.execute = exports2.ShellError = exports2.globUtils = void 0; + var tslib_1 = require_tslib(); + var fslib_1 = require_lib76(); + var parsers_1 = require_lib77(); + var os_1 = require("os"); + var stream_1 = require("stream"); + var errors_1 = require_errors5(); + Object.defineProperty(exports2, "ShellError", { enumerable: true, get: function() { + return errors_1.ShellError; + } }); + var globUtils = tslib_1.__importStar(require_globUtils()); + exports2.globUtils = globUtils; + var pipe_1 = require_pipe4(); + var pipe_2 = require_pipe4(); + var StreamType; + (function(StreamType2) { + StreamType2[StreamType2["Readable"] = 1] = "Readable"; + StreamType2[StreamType2["Writable"] = 2] = "Writable"; + })(StreamType || (StreamType = {})); + function getFileDescriptorStream(fd, type, state) { + const stream = new stream_1.PassThrough({ autoDestroy: true }); + switch (fd) { + case pipe_2.Pipe.STDIN: + { + if ((type & StreamType.Readable) === StreamType.Readable) + state.stdin.pipe(stream, { end: false }); + if ((type & StreamType.Writable) === StreamType.Writable && state.stdin instanceof stream_1.Writable) { + stream.pipe(state.stdin, { end: false }); + } + } + break; + case pipe_2.Pipe.STDOUT: + { + if ((type & StreamType.Readable) === StreamType.Readable) + state.stdout.pipe(stream, { end: false }); + if ((type & StreamType.Writable) === StreamType.Writable) { + stream.pipe(state.stdout, { end: false }); + } + } + break; + case pipe_2.Pipe.STDERR: + { + if ((type & StreamType.Readable) === StreamType.Readable) + state.stderr.pipe(stream, { end: false }); + if ((type & StreamType.Writable) === StreamType.Writable) { + stream.pipe(state.stderr, { end: false }); + } + } + break; + default: { + throw new errors_1.ShellError(`Bad file descriptor: "${fd}"`); + } + } + return stream; + } + function cloneState(state, mergeWith = {}) { + const newState = { ...state, ...mergeWith }; + newState.environment = { ...state.environment, ...mergeWith.environment }; + newState.variables = { ...state.variables, ...mergeWith.variables }; + return newState; + } + var BUILTINS = new Map([ + [`cd`, async ([target = os_1.homedir(), ...rest], opts, state) => { + const resolvedTarget = fslib_1.ppath.resolve(state.cwd, fslib_1.npath.toPortablePath(target)); + const stat = await opts.baseFs.statPromise(resolvedTarget); + if (!stat.isDirectory()) { + state.stderr.write(`cd: not a directory +`); + return 1; + } else { + state.cwd = resolvedTarget; + return 0; + } + }], + [`pwd`, async (args2, opts, state) => { + state.stdout.write(`${fslib_1.npath.fromPortablePath(state.cwd)} +`); + return 0; + }], + [`:`, async (args2, opts, state) => { + return 0; + }], + [`true`, async (args2, opts, state) => { + return 0; + }], + [`false`, async (args2, opts, state) => { + return 1; + }], + [`exit`, async ([code, ...rest], opts, state) => { + return state.exitCode = parseInt(code !== null && code !== void 0 ? code : state.variables[`?`], 10); + }], + [`echo`, async (args2, opts, state) => { + state.stdout.write(`${args2.join(` `)} +`); + return 0; + }], + [`__ysh_run_procedure`, async (args2, opts, state) => { + const procedure = state.procedures[args2[0]]; + const exitCode = await pipe_2.start(procedure, { + stdin: new pipe_2.ProtectedStream(state.stdin), + stdout: new pipe_2.ProtectedStream(state.stdout), + stderr: new pipe_2.ProtectedStream(state.stderr) + }).run(); + return exitCode; + }], + [`__ysh_set_redirects`, async (args2, opts, state) => { + let stdin = state.stdin; + let stdout = state.stdout; + const stderr = state.stderr; + const inputs = []; + const outputs = []; + let t = 0; + while (args2[t] !== `--`) { + const type = args2[t++]; + const count = Number(args2[t++]); + const last = t + count; + for (let u = t; u < last; ++t, ++u) { + switch (type) { + case `<`: + { + inputs.push(() => { + return opts.baseFs.createReadStream(fslib_1.ppath.resolve(state.cwd, fslib_1.npath.toPortablePath(args2[u]))); + }); + } + break; + case `<<<`: + { + inputs.push(() => { + const input = new stream_1.PassThrough(); + process.nextTick(() => { + input.write(`${args2[u]} +`); + input.end(); + }); + return input; + }); + } + break; + case `<&`: + { + inputs.push(() => getFileDescriptorStream(Number(args2[u]), StreamType.Readable, state)); + } + break; + case `>`: + case `>>`: + { + const outputPath = fslib_1.ppath.resolve(state.cwd, fslib_1.npath.toPortablePath(args2[u])); + if (outputPath === `/dev/null`) { + outputs.push(new stream_1.Writable({ + autoDestroy: true, + emitClose: true, + write(chunk, encoding, callback) { + setImmediate(callback); + } + })); + } else { + outputs.push(opts.baseFs.createWriteStream(outputPath, type === `>>` ? { flags: `a` } : void 0)); + } + } + break; + case `>&`: + { + outputs.push(getFileDescriptorStream(Number(args2[u]), StreamType.Writable, state)); + } + break; + default: { + throw new Error(`Assertion failed: Unsupported redirection type: "${type}"`); + } + } + } + } + if (inputs.length > 0) { + const pipe = new stream_1.PassThrough(); + stdin = pipe; + const bindInput = (n) => { + if (n === inputs.length) { + pipe.end(); + } else { + const input = inputs[n](); + input.pipe(pipe, { end: false }); + input.on(`end`, () => { + bindInput(n + 1); + }); + } + }; + bindInput(0); + } + if (outputs.length > 0) { + const pipe = new stream_1.PassThrough(); + stdout = pipe; + for (const output of outputs) { + pipe.pipe(output); + } + } + const exitCode = await pipe_2.start(makeCommandAction(args2.slice(t + 1), opts, state), { + stdin: new pipe_2.ProtectedStream(stdin), + stdout: new pipe_2.ProtectedStream(stdout), + stderr: new pipe_2.ProtectedStream(stderr) + }).run(); + await Promise.all(outputs.map((output) => { + return new Promise((resolve) => { + output.on(`close`, () => { + resolve(); + }); + output.end(); + }); + })); + return exitCode; + }] + ]); + async function executeBufferedSubshell(ast, opts, state) { + const chunks = []; + const stdout = new stream_1.PassThrough(); + stdout.on(`data`, (chunk) => chunks.push(chunk)); + await executeShellLine(ast, opts, cloneState(state, { stdout })); + return Buffer.concat(chunks).toString().replace(/[\r\n]+$/, ``); + } + async function applyEnvVariables(environmentSegments, opts, state) { + const envPromises = environmentSegments.map(async (envSegment) => { + const interpolatedArgs = await interpolateArguments(envSegment.args, opts, state); + return { + name: envSegment.name, + value: interpolatedArgs.join(` `) + }; + }); + const interpolatedEnvs = await Promise.all(envPromises); + return interpolatedEnvs.reduce((envs, env) => { + envs[env.name] = env.value; + return envs; + }, {}); + } + function split(raw) { + return raw.match(/[^ \r\n\t]+/g) || []; + } + async function evaluateVariable(segment, opts, state, push, pushAndClose = push) { + switch (segment.name) { + case `$`: + { + push(String(process.pid)); + } + break; + case `#`: + { + push(String(opts.args.length)); + } + break; + case `@`: + { + if (segment.quoted) { + for (const raw of opts.args) { + pushAndClose(raw); + } + } else { + for (const raw of opts.args) { + const parts = split(raw); + for (let t = 0; t < parts.length - 1; ++t) + pushAndClose(parts[t]); + push(parts[parts.length - 1]); + } + } + } + break; + case `*`: + { + const raw = opts.args.join(` `); + if (segment.quoted) { + push(raw); + } else { + for (const part of split(raw)) { + pushAndClose(part); + } + } + } + break; + case `PPID`: + { + push(String(process.ppid)); + } + break; + case `RANDOM`: + { + push(String(Math.floor(Math.random() * 32768))); + } + break; + default: + { + const argIndex = parseInt(segment.name, 10); + if (Number.isFinite(argIndex)) { + if (argIndex >= 0 && argIndex < opts.args.length) { + push(opts.args[argIndex]); + } else if (segment.defaultValue) { + push((await interpolateArguments(segment.defaultValue, opts, state)).join(` `)); + } else { + throw new errors_1.ShellError(`Unbound argument #${argIndex}`); + } + } else { + if (Object.prototype.hasOwnProperty.call(state.variables, segment.name)) { + push(state.variables[segment.name]); + } else if (Object.prototype.hasOwnProperty.call(state.environment, segment.name)) { + push(state.environment[segment.name]); + } else if (segment.defaultValue) { + push((await interpolateArguments(segment.defaultValue, opts, state)).join(` `)); + } else { + throw new errors_1.ShellError(`Unbound variable "${segment.name}"`); + } + } + } + break; + } + } + var operators = { + addition: (left, right) => left + right, + subtraction: (left, right) => left - right, + multiplication: (left, right) => left * right, + division: (left, right) => Math.trunc(left / right) + }; + async function evaluateArithmetic(arithmetic, opts, state) { + if (arithmetic.type === `number`) { + if (!Number.isInteger(arithmetic.value)) { + throw new Error(`Invalid number: "${arithmetic.value}", only integers are allowed`); + } else { + return arithmetic.value; + } + } else if (arithmetic.type === `variable`) { + const parts = []; + await evaluateVariable({ ...arithmetic, quoted: true }, opts, state, (result) => parts.push(result)); + const number = Number(parts.join(` `)); + if (Number.isNaN(number)) { + return evaluateArithmetic({ type: `variable`, name: parts.join(` `) }, opts, state); + } else { + return evaluateArithmetic({ type: `number`, value: number }, opts, state); + } + } else { + return operators[arithmetic.type](await evaluateArithmetic(arithmetic.left, opts, state), await evaluateArithmetic(arithmetic.right, opts, state)); + } + } + async function interpolateArguments(commandArgs, opts, state) { + const redirections = new Map(); + const interpolated = []; + let interpolatedSegments = []; + const push = (segment) => { + interpolatedSegments.push(segment); + }; + const close = () => { + if (interpolatedSegments.length > 0) + interpolated.push(interpolatedSegments.join(``)); + interpolatedSegments = []; + }; + const pushAndClose = (segment) => { + push(segment); + close(); + }; + const redirect = (type, target) => { + let targets = redirections.get(type); + if (typeof targets === `undefined`) + redirections.set(type, targets = []); + targets.push(target); + }; + for (const commandArg of commandArgs) { + let isGlob = false; + switch (commandArg.type) { + case `redirection`: + { + const interpolatedArgs = await interpolateArguments(commandArg.args, opts, state); + for (const interpolatedArg of interpolatedArgs) { + redirect(commandArg.subtype, interpolatedArg); + } + } + break; + case `argument`: + { + for (const segment of commandArg.segments) { + switch (segment.type) { + case `text`: + { + push(segment.text); + } + break; + case `glob`: + { + push(segment.pattern); + isGlob = true; + } + break; + case `shell`: + { + const raw = await executeBufferedSubshell(segment.shell, opts, state); + if (segment.quoted) { + push(raw); + } else { + const parts = split(raw); + for (let t = 0; t < parts.length - 1; ++t) + pushAndClose(parts[t]); + push(parts[parts.length - 1]); + } + } + break; + case `variable`: + { + await evaluateVariable(segment, opts, state, push, pushAndClose); + } + break; + case `arithmetic`: + { + push(String(await evaluateArithmetic(segment.arithmetic, opts, state))); + } + break; + } + } + } + break; + } + close(); + if (isGlob) { + const pattern = interpolated.pop(); + if (typeof pattern === `undefined`) + throw new Error(`Assertion failed: Expected a glob pattern to have been set`); + const matches = await opts.glob.match(pattern, { cwd: state.cwd, baseFs: opts.baseFs }); + if (matches.length === 0) { + const braceExpansionNotice = globUtils.isBraceExpansion(pattern) ? `. Note: Brace expansion of arbitrary strings isn't currently supported. For more details, please read this issue: https://github.com/yarnpkg/berry/issues/22` : ``; + throw new errors_1.ShellError(`No matches found: "${pattern}"${braceExpansionNotice}`); + } + for (const match of matches.sort()) { + pushAndClose(match); + } + } + } + if (redirections.size > 0) { + const redirectionArgs = []; + for (const [subtype, targets] of redirections.entries()) + redirectionArgs.splice(redirectionArgs.length, 0, subtype, String(targets.length), ...targets); + interpolated.splice(0, 0, `__ysh_set_redirects`, ...redirectionArgs, `--`); + } + return interpolated; + } + function makeCommandAction(args2, opts, state) { + if (!opts.builtins.has(args2[0])) + args2 = [`command`, ...args2]; + const nativeCwd = fslib_1.npath.fromPortablePath(state.cwd); + let env = state.environment; + if (typeof env.PWD !== `undefined`) + env = { ...env, PWD: nativeCwd }; + const [name, ...rest] = args2; + if (name === `command`) { + return pipe_1.makeProcess(rest[0], rest.slice(1), opts, { + cwd: nativeCwd, + env + }); + } + const builtin = opts.builtins.get(name); + if (typeof builtin === `undefined`) + throw new Error(`Assertion failed: A builtin should exist for "${name}"`); + return pipe_1.makeBuiltin(async ({ stdin, stdout, stderr }) => { + state.stdin = stdin; + state.stdout = stdout; + state.stderr = stderr; + return await builtin(rest, opts, state); + }); + } + function makeSubshellAction(ast, opts, state) { + return (stdio) => { + const stdin = new stream_1.PassThrough(); + const promise = executeShellLine(ast, opts, cloneState(state, { stdin })); + return { stdin, promise }; + }; + } + function makeGroupAction(ast, opts, state) { + return (stdio) => { + const stdin = new stream_1.PassThrough(); + const promise = executeShellLine(ast, opts, state); + return { stdin, promise }; + }; + } + function makeActionFromProcedure(procedure, args2, opts, activeState) { + if (args2.length === 0) { + return procedure; + } else { + let key; + do { + key = String(Math.random()); + } while (Object.prototype.hasOwnProperty.call(activeState.procedures, key)); + activeState.procedures = { ...activeState.procedures }; + activeState.procedures[key] = procedure; + return makeCommandAction([...args2, `__ysh_run_procedure`, key], opts, activeState); + } + } + async function executeCommandChain(node, opts, state) { + let current = node; + let pipeType = null; + let execution = null; + while (current) { + const activeState = current.then ? { ...state } : state; + let action; + switch (current.type) { + case `command`: + { + const args2 = await interpolateArguments(current.args, opts, state); + const environment = await applyEnvVariables(current.envs, opts, state); + action = current.envs.length ? makeCommandAction(args2, opts, cloneState(activeState, { environment })) : makeCommandAction(args2, opts, activeState); + } + break; + case `subshell`: + { + const args2 = await interpolateArguments(current.args, opts, state); + const procedure = makeSubshellAction(current.subshell, opts, activeState); + action = makeActionFromProcedure(procedure, args2, opts, activeState); + } + break; + case `group`: + { + const args2 = await interpolateArguments(current.args, opts, state); + const procedure = makeGroupAction(current.group, opts, activeState); + action = makeActionFromProcedure(procedure, args2, opts, activeState); + } + break; + case `envs`: + { + const environment = await applyEnvVariables(current.envs, opts, state); + activeState.environment = { ...activeState.environment, ...environment }; + action = makeCommandAction([`true`], opts, activeState); + } + break; + } + if (typeof action === `undefined`) + throw new Error(`Assertion failed: An action should have been generated`); + if (pipeType === null) { + execution = pipe_2.start(action, { + stdin: new pipe_2.ProtectedStream(activeState.stdin), + stdout: new pipe_2.ProtectedStream(activeState.stdout), + stderr: new pipe_2.ProtectedStream(activeState.stderr) + }); + } else { + if (execution === null) + throw new Error(`Assertion failed: The execution pipeline should have been setup`); + switch (pipeType) { + case `|`: + { + execution = execution.pipeTo(action, pipe_2.Pipe.STDOUT); + } + break; + case `|&`: + { + execution = execution.pipeTo(action, pipe_2.Pipe.STDOUT | pipe_2.Pipe.STDERR); + } + break; + } + } + if (current.then) { + pipeType = current.then.type; + current = current.then.chain; + } else { + current = null; + } + } + if (execution === null) + throw new Error(`Assertion failed: The execution pipeline should have been setup`); + return await execution.run(); + } + async function executeCommandLine(node, opts, state) { + let code; + const setCode = (newCode) => { + code = newCode; + state.variables[`?`] = String(newCode); + }; + const executeChain = async (chain) => { + try { + return await executeCommandChain(chain, opts, state); + } catch (error) { + if (!(error instanceof errors_1.ShellError)) + throw error; + state.stderr.write(`${error.message} +`); + return 1; + } + }; + setCode(await executeChain(node.chain)); + while (node.then) { + if (state.exitCode !== null) + return state.exitCode; + switch (node.then.type) { + case `&&`: + { + if (code === 0) { + setCode(await executeChain(node.then.line.chain)); + } + } + break; + case `||`: + { + if (code !== 0) { + setCode(await executeChain(node.then.line.chain)); + } + } + break; + default: + { + throw new Error(`Assertion failed: Unsupported command type: "${node.then.type}"`); + } + break; + } + node = node.then.line; + } + return code; + } + async function executeShellLine(node, opts, state) { + let rightMostExitCode = 0; + for (const command of node) { + rightMostExitCode = await executeCommandLine(command, opts, state); + if (state.exitCode !== null) + return state.exitCode; + state.variables[`?`] = String(rightMostExitCode); + } + return rightMostExitCode; + } + function locateArgsVariableInSegment(segment) { + switch (segment.type) { + case `variable`: + { + return segment.name === `@` || segment.name === `#` || segment.name === `*` || Number.isFinite(parseInt(segment.name, 10)) || `defaultValue` in segment && !!segment.defaultValue && segment.defaultValue.some((arg) => locateArgsVariableInArgument(arg)); + } + break; + case `arithmetic`: + { + return locateArgsVariableInArithmetic(segment.arithmetic); + } + break; + case `shell`: + { + return locateArgsVariable(segment.shell); + } + break; + default: + { + return false; + } + break; + } + } + function locateArgsVariableInArgument(arg) { + switch (arg.type) { + case `redirection`: + { + return arg.args.some((arg2) => locateArgsVariableInArgument(arg2)); + } + break; + case `argument`: + { + return arg.segments.some((segment) => locateArgsVariableInSegment(segment)); + } + break; + default: + throw new Error(`Assertion failed: Unsupported argument type: "${arg.type}"`); + } + } + function locateArgsVariableInArithmetic(arg) { + switch (arg.type) { + case `variable`: + { + return locateArgsVariableInSegment(arg); + } + break; + case `number`: + { + return false; + } + break; + default: + return locateArgsVariableInArithmetic(arg.left) || locateArgsVariableInArithmetic(arg.right); + } + } + function locateArgsVariable(node) { + return node.some((command) => { + while (command) { + let chain = command.chain; + while (chain) { + let hasArgs; + switch (chain.type) { + case `subshell`: + { + hasArgs = locateArgsVariable(chain.subshell); + } + break; + case `command`: + { + hasArgs = chain.envs.some((env) => env.args.some((arg) => { + return locateArgsVariableInArgument(arg); + })) || chain.args.some((arg) => { + return locateArgsVariableInArgument(arg); + }); + } + break; + } + if (hasArgs) + return true; + if (!chain.then) + break; + chain = chain.then.chain; + } + if (!command.then) + break; + command = command.then.line; + } + return false; + }); + } + async function execute(command, args2 = [], { baseFs = new fslib_1.NodeFS(), builtins = {}, cwd = fslib_1.npath.toPortablePath(process.cwd()), env = process.env, stdin = process.stdin, stdout = process.stdout, stderr = process.stderr, variables = {}, glob = globUtils } = {}) { + const normalizedEnv = {}; + for (const [key, value] of Object.entries(env)) + if (typeof value !== `undefined`) + normalizedEnv[key] = value; + const normalizedBuiltins = new Map(BUILTINS); + for (const [key, builtin] of Object.entries(builtins)) + normalizedBuiltins.set(key, builtin); + if (stdin === null) { + stdin = new stream_1.PassThrough(); + stdin.end(); + } + const ast = parsers_1.parseShell(command, glob); + if (!locateArgsVariable(ast) && ast.length > 0 && args2.length > 0) { + let command2 = ast[ast.length - 1]; + while (command2.then) + command2 = command2.then.line; + let chain = command2.chain; + while (chain.then) + chain = chain.then.chain; + if (chain.type === `command`) { + chain.args = chain.args.concat(args2.map((arg) => { + return { + type: `argument`, + segments: [{ + type: `text`, + text: arg + }] + }; + })); + } + } + return await executeShellLine(ast, { + args: args2, + baseFs, + builtins: normalizedBuiltins, + initialStdin: stdin, + initialStdout: stdout, + initialStderr: stderr, + glob + }, { + cwd, + environment: normalizedEnv, + exitCode: null, + procedures: {}, + stdin, + stdout, + stderr, + variables: Object.assign({}, variables, { + [`?`]: 0 + }) + }); + } + exports2.execute = execute; + } +}); + +// ../../node_modules/.pnpm/slide@1.1.6/node_modules/slide/lib/async-map.js +var require_async_map = __commonJS({ + "../../node_modules/.pnpm/slide@1.1.6/node_modules/slide/lib/async-map.js"(exports2, module2) { + module2.exports = asyncMap; + function asyncMap() { + var steps = Array.prototype.slice.call(arguments), list = steps.shift() || [], cb_ = steps.pop(); + if (typeof cb_ !== "function") + throw new Error("No callback provided to asyncMap"); + if (!list) + return cb_(null, []); + if (!Array.isArray(list)) + list = [list]; + var n = steps.length, data = [], errState = null, l = list.length, a = l * n; + if (!a) + return cb_(null, []); + function cb(er) { + if (er && !errState) + errState = er; + var argLen = arguments.length; + for (var i = 1; i < argLen; i++) + if (arguments[i] !== void 0) { + data[i - 1] = (data[i - 1] || []).concat(arguments[i]); + } + if (list.length > l) { + var newList = list.slice(l); + a += (list.length - l) * n; + l = list.length; + process.nextTick(function() { + newList.forEach(function(ar) { + steps.forEach(function(fn2) { + fn2(ar, cb); + }); + }); + }); + } + if (--a === 0) + cb_.apply(null, [errState].concat(data)); + } + list.forEach(function(ar) { + steps.forEach(function(fn2) { + fn2(ar, cb); + }); + }); + } + } +}); + +// ../../node_modules/.pnpm/slide@1.1.6/node_modules/slide/lib/bind-actor.js +var require_bind_actor = __commonJS({ + "../../node_modules/.pnpm/slide@1.1.6/node_modules/slide/lib/bind-actor.js"(exports2, module2) { + module2.exports = bindActor; + function bindActor() { + var args2 = Array.prototype.slice.call(arguments), obj = null, fn2; + if (typeof args2[0] === "object") { + obj = args2.shift(); + fn2 = args2.shift(); + if (typeof fn2 === "string") + fn2 = obj[fn2]; + } else + fn2 = args2.shift(); + return function(cb) { + fn2.apply(obj, args2.concat(cb)); + }; + } + } +}); + +// ../../node_modules/.pnpm/slide@1.1.6/node_modules/slide/lib/chain.js +var require_chain2 = __commonJS({ + "../../node_modules/.pnpm/slide@1.1.6/node_modules/slide/lib/chain.js"(exports2, module2) { + module2.exports = chain; + var bindActor = require_bind_actor(); + chain.first = {}; + chain.last = {}; + function chain(things, cb) { + var res = []; + (function LOOP(i, len) { + if (i >= len) + return cb(null, res); + if (Array.isArray(things[i])) + things[i] = bindActor.apply(null, things[i].map(function(i2) { + return i2 === chain.first ? res[0] : i2 === chain.last ? res[res.length - 1] : i2; + })); + if (!things[i]) + return LOOP(i + 1, len); + things[i](function(er, data) { + if (er) + return cb(er, res); + if (data !== void 0) + res = res.concat(data); + LOOP(i + 1, len); + }); + })(0, things.length); + } + } +}); + +// ../../node_modules/.pnpm/slide@1.1.6/node_modules/slide/lib/slide.js +var require_slide = __commonJS({ + "../../node_modules/.pnpm/slide@1.1.6/node_modules/slide/lib/slide.js"(exports2) { + exports2.asyncMap = require_async_map(); + exports2.bindActor = require_bind_actor(); + exports2.chain = require_chain2(); + } +}); + +// ../../node_modules/.pnpm/uid-number@0.0.6/node_modules/uid-number/uid-number.js +var require_uid_number = __commonJS({ + "../../node_modules/.pnpm/uid-number@0.0.6/node_modules/uid-number/uid-number.js"(exports2, module2) { + module2.exports = uidNumber; + var child_process = require("child_process"); + var path = require("path"); + var uidSupport = process.getuid && process.setuid; + var uidCache = {}; + var gidCache = {}; + function uidNumber(uid, gid, cb) { + if (!uidSupport) + return cb(); + if (typeof cb !== "function") + cb = gid, gid = null; + if (typeof cb !== "function") + cb = uid, uid = null; + if (gid == null) + gid = process.getgid(); + if (uid == null) + uid = process.getuid(); + if (!isNaN(gid)) + gid = gidCache[gid] = +gid; + if (!isNaN(uid)) + uid = uidCache[uid] = +uid; + if (uidCache.hasOwnProperty(uid)) + uid = uidCache[uid]; + if (gidCache.hasOwnProperty(gid)) + gid = gidCache[gid]; + if (typeof gid === "number" && typeof uid === "number") { + return process.nextTick(cb.bind(null, null, uid, gid)); + } + var getter = require.resolve("./get-uid-gid.js"); + child_process.execFile(process.execPath, [getter, uid, gid], function(code, out, stderr) { + if (code) { + var er = new Error("could not get uid/gid\n" + stderr); + er.code = code; + return cb(er); + } + try { + out = JSON.parse(out + ""); + } catch (ex) { + return cb(ex); + } + if (out.error) { + var er = new Error(out.error); + er.errno = out.errno; + return cb(er); + } + if (isNaN(out.uid) || isNaN(out.gid)) + return cb(new Error("Could not get uid/gid: " + JSON.stringify(out))); + cb(null, uidCache[uid] = +out.uid, gidCache[gid] = +out.gid); + }); + } + } +}); + +// ../../node_modules/.pnpm/umask@1.1.0/node_modules/umask/index.js +var require_umask = __commonJS({ + "../../node_modules/.pnpm/umask@1.1.0/node_modules/umask/index.js"(exports2) { + "use strict"; + var util = require("util"); + function toString(val) { + val = val.toString(8); + while (val.length < 4) { + val = "0" + val; + } + return val; + } + var defaultUmask = 18; + var defaultUmaskString = toString(defaultUmask); + function validate(data, k, val) { + if (typeof val === "number" && !isNaN(val)) { + data[k] = val; + return true; + } + if (typeof val === "string") { + if (val.charAt(0) !== "0") { + return false; + } + data[k] = parseInt(val, 8); + return true; + } + return false; + } + function convert_fromString(val, cb) { + if (typeof val === "string") { + if (val.charAt(0) === "0" && /^[0-7]+$/.test(val)) { + val = parseInt(val, 8); + } else if (val.charAt(0) !== "0" && /^[0-9]+$/.test(val)) { + val = parseInt(val, 10); + } else { + return cb(new Error(util.format("Expected octal string, got %j, defaulting to %j", val, defaultUmaskString)), defaultUmask); + } + } else if (typeof val !== "number") { + return cb(new Error(util.format("Expected number or octal string, got %j, defaulting to %j", val, defaultUmaskString)), defaultUmask); + } + val = Math.floor(val); + if (val < 0 || val > 511) { + return cb(new Error(util.format("Must be in range 0..511 (0000..0777), got %j", val)), defaultUmask); + } + cb(null, val); + } + function fromString(val, cb) { + convert_fromString(val, cb || function(err, result) { + val = result; + }); + return val; + } + exports2.toString = toString; + exports2.fromString = fromString; + exports2.validate = validate; + } +}); + +// ../../node_modules/.pnpm/byline@5.0.0/node_modules/byline/lib/byline.js +var require_byline = __commonJS({ + "../../node_modules/.pnpm/byline@5.0.0/node_modules/byline/lib/byline.js"(exports2, module2) { + var stream = require("stream"); + var util = require("util"); + var timers = require("timers"); + module2.exports = function(readStream, options) { + return module2.exports.createStream(readStream, options); + }; + module2.exports.createStream = function(readStream, options) { + if (readStream) { + return createLineStream(readStream, options); + } else { + return new LineStream(options); + } + }; + module2.exports.createLineStream = function(readStream) { + console.log("WARNING: byline#createLineStream is deprecated and will be removed soon"); + return createLineStream(readStream); + }; + function createLineStream(readStream, options) { + if (!readStream) { + throw new Error("expected readStream"); + } + if (!readStream.readable) { + throw new Error("readStream must be readable"); + } + var ls = new LineStream(options); + readStream.pipe(ls); + return ls; + } + module2.exports.LineStream = LineStream; + function LineStream(options) { + stream.Transform.call(this, options); + options = options || {}; + this._readableState.objectMode = true; + this._lineBuffer = []; + this._keepEmptyLines = options.keepEmptyLines || false; + this._lastChunkEndedWithCR = false; + var self2 = this; + this.on("pipe", function(src) { + if (!self2.encoding) { + if (src instanceof stream.Readable) { + self2.encoding = src._readableState.encoding; + } + } + }); + } + util.inherits(LineStream, stream.Transform); + LineStream.prototype._transform = function(chunk, encoding, done) { + encoding = encoding || "utf8"; + if (Buffer.isBuffer(chunk)) { + if (encoding == "buffer") { + chunk = chunk.toString(); + encoding = "utf8"; + } else { + chunk = chunk.toString(encoding); + } + } + this._chunkEncoding = encoding; + var lines = chunk.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/g); + if (this._lastChunkEndedWithCR && chunk[0] == "\n") { + lines.shift(); + } + if (this._lineBuffer.length > 0) { + this._lineBuffer[this._lineBuffer.length - 1] += lines[0]; + lines.shift(); + } + this._lastChunkEndedWithCR = chunk[chunk.length - 1] == "\r"; + this._lineBuffer = this._lineBuffer.concat(lines); + this._pushBuffer(encoding, 1, done); + }; + LineStream.prototype._pushBuffer = function(encoding, keep, done) { + while (this._lineBuffer.length > keep) { + var line = this._lineBuffer.shift(); + if (this._keepEmptyLines || line.length > 0) { + if (!this.push(this._reencode(line, encoding))) { + var self2 = this; + timers.setImmediate(function() { + self2._pushBuffer(encoding, keep, done); + }); + return; + } + } + } + done(); + }; + LineStream.prototype._flush = function(done) { + this._pushBuffer(this._chunkEncoding, 0, done); + }; + LineStream.prototype._reencode = function(line, chunkEncoding) { + if (this.encoding && this.encoding != chunkEncoding) { + return new Buffer(line, chunkEncoding).toString(this.encoding); + } else if (this.encoding) { + return line; + } else { + return new Buffer(line, chunkEncoding); + } + }; + } +}); + +// ../../node_modules/.pnpm/resolve-from@5.0.0/node_modules/resolve-from/index.js +var require_resolve_from = __commonJS({ + "../../node_modules/.pnpm/resolve-from@5.0.0/node_modules/resolve-from/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var Module = require("module"); + var fs = require("fs"); + var resolveFrom = (fromDirectory, moduleId, silent) => { + if (typeof fromDirectory !== "string") { + throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof fromDirectory}\``); + } + if (typeof moduleId !== "string") { + throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof moduleId}\``); + } + try { + fromDirectory = fs.realpathSync(fromDirectory); + } catch (error) { + if (error.code === "ENOENT") { + fromDirectory = path.resolve(fromDirectory); + } else if (silent) { + return; + } else { + throw error; + } + } + const fromFile = path.join(fromDirectory, "noop.js"); + const resolveFileName = () => Module._resolveFilename(moduleId, { + id: fromFile, + filename: fromFile, + paths: Module._nodeModulePaths(fromDirectory) + }); + if (silent) { + try { + return resolveFileName(); + } catch (error) { + return; + } + } + return resolveFileName(); + }; + module2.exports = (fromDirectory, moduleId) => resolveFrom(fromDirectory, moduleId); + module2.exports.silent = (fromDirectory, moduleId) => resolveFrom(fromDirectory, moduleId, true); + } +}); + +// ../../node_modules/.pnpm/@zkochan+npm-lifecycle@5.1.2/node_modules/@zkochan/npm-lifecycle/index.js +var require_npm_lifecycle = __commonJS({ + "../../node_modules/.pnpm/@zkochan+npm-lifecycle@5.1.2/node_modules/@zkochan/npm-lifecycle/index.js"(exports2, module2) { + "use strict"; + exports2 = module2.exports = lifecycle; + exports2.makeEnv = makeEnv; + exports2._incorrectWorkingDirectory = _incorrectWorkingDirectory; + var spawn = require_spawn(); + var { execute } = require_lib78(); + var path = require("path"); + var Stream = require("stream").Stream; + var fs = require("fs"); + var chain = require_slide().chain; + var uidNumber = require_uid_number(); + var umask = require_umask(); + var which = require_which(); + var byline = require_byline(); + var resolveFrom = require_resolve_from(); + var { PassThrough } = require("stream"); + var DEFAULT_NODE_GYP_PATH; + try { + DEFAULT_NODE_GYP_PATH = resolveFrom(__dirname, "node-gyp/bin/node-gyp"); + } catch (err) { + } + var hookStatCache = new Map(); + var PATH = "PATH"; + if (process.platform === "win32") { + PATH = "Path"; + Object.keys(process.env).forEach((e) => { + if (e.match(/^PATH$/i)) { + PATH = e; + } + }); + } + function logid(pkg, stage) { + return `${pkg._id}~${stage}:`; + } + function hookStat(dir, stage, cb) { + const hook = path.join(dir, ".hooks", stage); + const cachedStatError = hookStatCache.get(hook); + if (cachedStatError === void 0) { + return fs.stat(hook, (statError) => { + hookStatCache.set(hook, statError); + cb(statError); + }); + } + return setImmediate(() => cb(cachedStatError)); + } + function lifecycle(pkg, stage, wd, opts) { + return new Promise((resolve, reject) => { + while (pkg && pkg._data) + pkg = pkg._data; + if (!pkg) + return reject(new Error("Invalid package data")); + opts.log.info("lifecycle", logid(pkg, stage), pkg._id); + if (!pkg.scripts) + pkg.scripts = {}; + if (stage === "prepublish" && opts.ignorePrepublish) { + opts.log.info("lifecycle", logid(pkg, stage), "ignored because ignore-prepublish is set to true", pkg._id); + delete pkg.scripts.prepublish; + } + hookStat(opts.dir, stage, (statError) => { + if (!pkg.scripts[stage] && statError) + return resolve(); + validWd(wd || path.resolve(opts.dir, pkg.name), (er, wd2) => { + if (er) + return reject(er); + if ((wd2.indexOf(opts.dir) !== 0 || _incorrectWorkingDirectory(wd2, pkg)) && !opts.unsafePerm && pkg.scripts[stage]) { + opts.log.warn(`"${stage}" script of "${pkg._id}" inside "${wd2}" is skipped as the working directory seems suspicious. To run this lifecycle script anyway, use "--unsafe-perm".`); + return resolve(); + } + const env = makeEnv(pkg, opts); + env.npm_lifecycle_event = stage; + env.npm_node_execpath = env.NODE = env.NODE || process.execPath; + if (process.pkg != null) { + env.npm_execpath = process.execPath; + } else { + env.npm_execpath = require.main ? require.main.filename : process.cwd(); + } + env.INIT_CWD = process.cwd(); + env.npm_config_node_gyp = env.npm_config_node_gyp || DEFAULT_NODE_GYP_PATH; + if (opts.extraEnv) { + for (const [key, value] of Object.entries(opts.extraEnv)) { + env[key] = value; + } + } + if (!opts.unsafePerm) + env.TMPDIR = wd2; + lifecycle_(pkg, stage, wd2, opts, env, (er2) => { + if (er2) + return reject(er2); + return resolve(); + }); + }); + }); + }); + } + function _incorrectWorkingDirectory(wd, pkg) { + return wd.lastIndexOf(pkg.name) !== wd.length - pkg.name.length; + } + function lifecycle_(pkg, stage, wd, opts, env, cb) { + const pathArr = [...opts.extraBinPaths || []]; + const p = wd.split(/[\\/]node_modules[\\/]/); + let acc = path.resolve(p.shift()); + p.forEach((pp) => { + pathArr.unshift(path.join(acc, "node_modules", ".bin")); + acc = path.join(acc, "node_modules", pp); + }); + pathArr.unshift(path.join(acc, "node_modules", ".bin")); + pathArr.unshift(path.join(__dirname, "node-gyp-bin")); + if (shouldPrependCurrentNodeDirToPATH(opts)) { + pathArr.push(path.dirname(process.execPath)); + } + if (env[PATH]) + pathArr.push(env[PATH]); + env[PATH] = pathArr.join(process.platform === "win32" ? ";" : ":"); + let packageLifecycle = pkg.scripts && pkg.scripts.hasOwnProperty(stage); + if (opts.ignoreScripts) { + opts.log.info("lifecycle", logid(pkg, stage), "ignored because ignore-scripts is set to true", pkg._id); + packageLifecycle = false; + } else if (packageLifecycle) { + env.npm_lifecycle_script = pkg.scripts[stage]; + } else { + opts.log.silly("lifecycle", logid(pkg, stage), `no script for ${stage}, continuing`); + } + function done(er) { + if (er) { + if (opts.force) { + opts.log.info("lifecycle", logid(pkg, stage), "forced, continuing", er); + er = null; + } else if (opts.failOk) { + opts.log.warn("lifecycle", logid(pkg, stage), "continuing anyway", er.message); + er = null; + } + } + cb(er); + } + chain([ + packageLifecycle && [runPackageLifecycle, pkg, stage, env, wd, opts], + [runHookLifecycle, pkg, stage, env, wd, opts] + ], done); + } + function shouldPrependCurrentNodeDirToPATH(opts) { + const cfgsetting = opts.scriptsPrependNodePath; + if (cfgsetting === false) + return false; + if (cfgsetting === true) + return true; + let isDifferentNodeInPath; + const isWindows = process.platform === "win32"; + let foundExecPath; + try { + foundExecPath = which.sync(path.basename(process.execPath), { pathExt: isWindows ? ";" : ":" }); + isDifferentNodeInPath = fs.realpathSync(process.execPath).toUpperCase() !== fs.realpathSync(foundExecPath).toUpperCase(); + } catch (e) { + isDifferentNodeInPath = true; + } + if (cfgsetting === "warn-only") { + if (isDifferentNodeInPath && !shouldPrependCurrentNodeDirToPATH.hasWarned) { + if (foundExecPath) { + opts.log.warn("lifecycle", "The node binary used for scripts is", foundExecPath, "but npm is using", process.execPath, "itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with."); + } else { + opts.log.warn("lifecycle", "npm is using", process.execPath, "but there is no node binary in the current PATH. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with."); + } + shouldPrependCurrentNodeDirToPATH.hasWarned = true; + } + return false; + } + return isDifferentNodeInPath; + } + function validWd(d, cb) { + fs.stat(d, (er, st) => { + if (er || !st.isDirectory()) { + const p = path.dirname(d); + if (p === d) { + return cb(new Error("Could not find suitable wd")); + } + return validWd(p, cb); + } + return cb(null, d); + }); + } + function runPackageLifecycle(pkg, stage, env, wd, opts, cb) { + const cmd = env.npm_lifecycle_script; + const note = ` +> ${pkg._id} ${stage} ${wd} +> ${cmd} +`; + runCmd(note, cmd, pkg, env, stage, wd, opts, cb); + } + var running = false; + var queue = []; + function dequeue() { + running = false; + if (queue.length) { + const r = queue.shift(); + runCmd.apply(null, r); + } + } + function runCmd(note, cmd, pkg, env, stage, wd, opts, cb) { + if (opts.runConcurrently !== true) { + if (running) { + queue.push([note, cmd, pkg, env, stage, wd, opts, cb]); + return; + } + running = true; + } + opts.log.pause(); + let unsafe = opts.unsafePerm; + const user = unsafe ? null : opts.user; + const group = unsafe ? null : opts.group; + if (opts.log.level !== "silent") { + opts.log.clearProgress(); + console.log(note); + opts.log.showProgress(); + } + opts.log.verbose("lifecycle", logid(pkg, stage), "unsafe-perm in lifecycle", unsafe); + if (process.platform === "win32") { + unsafe = true; + } + if (unsafe) { + runCmd_(cmd, pkg, env, wd, opts, stage, unsafe, 0, 0, cb); + } else { + uidNumber(user, group, (er, uid, gid) => { + runCmd_(cmd, pkg, env, wd, opts, stage, unsafe, uid, gid, cb); + }); + } + } + function runCmd_(cmd, pkg, env, wd, opts, stage, unsafe, uid, gid, cb_) { + function cb(er) { + cb_.apply(null, arguments); + opts.log.resume(); + process.nextTick(dequeue); + } + const conf = { + cwd: wd, + env, + stdio: opts.stdio || [0, 1, 2] + }; + if (!unsafe) { + conf.uid = uid ^ 0; + conf.gid = gid ^ 0; + } + let sh = "sh"; + let shFlag = "-c"; + const customShell = opts.scriptShell; + if (customShell) { + sh = customShell; + } else if (process.platform === "win32") { + sh = process.env.comspec || "cmd"; + shFlag = "/d /s /c"; + conf.windowsVerbatimArguments = true; + } + opts.log.verbose("lifecycle", logid(pkg, stage), "PATH:", env[PATH]); + opts.log.verbose("lifecycle", logid(pkg, stage), "CWD:", wd); + opts.log.silly("lifecycle", logid(pkg, stage), "Args:", [shFlag, cmd]); + if (opts.shellEmulator) { + const execOpts = { cwd: wd, env }; + if (opts.stdio === "pipe") { + const stdout = new PassThrough(); + const stderr = new PassThrough(); + byline(stdout).on("data", (data) => { + opts.log.verbose("lifecycle", logid(pkg, stage), "stdout", data.toString()); + }); + byline(stderr).on("data", (data) => { + opts.log.verbose("lifecycle", logid(pkg, stage), "stderr", data.toString()); + }); + execOpts.stdout = stdout; + execOpts.stderr = stderr; + } + execute(cmd, [], execOpts).then((code) => { + opts.log.silly("lifecycle", logid(pkg, stage), "Returned: code:", code); + if (code) { + var er = new Error(`Exit status ${code}`); + er.errno = code; + } + procError(er); + }).catch((err) => procError(err)); + return; + } + const proc = spawn(sh, [shFlag, cmd], conf, opts.log); + proc.on("error", procError); + proc.on("close", (code, signal) => { + opts.log.silly("lifecycle", logid(pkg, stage), "Returned: code:", code, " signal:", signal); + if (signal) { + process.kill(process.pid, signal); + } else if (code) { + var er = new Error(`Exit status ${code}`); + er.errno = code; + } + procError(er); + }); + byline(proc.stdout).on("data", (data) => { + opts.log.verbose("lifecycle", logid(pkg, stage), "stdout", data.toString()); + }); + byline(proc.stderr).on("data", (data) => { + opts.log.verbose("lifecycle", logid(pkg, stage), "stderr", data.toString()); + }); + process.once("SIGTERM", procKill); + process.once("SIGINT", procInterupt); + process.on("exit", procKill); + function procError(er) { + if (er) { + opts.log.info("lifecycle", logid(pkg, stage), `Failed to exec ${stage} script`); + er.message = `${pkg._id} ${stage}: \`${cmd}\` +${er.message}`; + if (er.code !== "EPERM") { + er.code = "ELIFECYCLE"; + } + fs.stat(opts.dir, (statError, d) => { + if (statError && statError.code === "ENOENT" && opts.dir.split(path.sep).slice(-1)[0] === "node_modules") { + opts.log.warn("", "Local package.json exists, but node_modules missing, did you mean to install?"); + } + }); + er.pkgid = pkg._id; + er.stage = stage; + er.script = cmd; + er.pkgname = pkg.name; + } + process.removeListener("SIGTERM", procKill); + process.removeListener("SIGTERM", procInterupt); + process.removeListener("SIGINT", procKill); + return cb(er); + } + let called = false; + function procKill() { + if (called) + return; + called = true; + proc.kill(); + } + function procInterupt() { + proc.kill("SIGINT"); + proc.on("exit", () => { + process.exit(); + }); + process.once("SIGINT", procKill); + } + } + function runHookLifecycle(pkg, stage, env, wd, opts, cb) { + hookStat(opts.dir, stage, (er) => { + if (er) + return cb(); + const cmd = path.join(opts.dir, ".hooks", stage); + const note = ` +> ${pkg._id} ${stage} ${wd} +> ${cmd}`; + runCmd(note, cmd, pkg, env, stage, wd, opts, cb); + }); + } + function makeEnv(data, opts, prefix, env) { + prefix = prefix || "npm_package_"; + if (!env) { + env = {}; + for (var i in process.env) { + if (!i.match(/^npm_/) && (!i.match(/^PATH$/i) || i === PATH)) { + env[i] = process.env[i]; + } + } + if (opts.production) + env.NODE_ENV = "production"; + } else if (!data.hasOwnProperty("_lifecycleEnv")) { + Object.defineProperty(data, "_lifecycleEnv", { + value: env, + enumerable: false + }); + } + if (opts.nodeOptions) + env.NODE_OPTIONS = opts.nodeOptions; + for (i in data) { + if (i.charAt(0) !== "_") { + const envKey = (prefix + i).replace(/[^a-zA-Z0-9_]/g, "_"); + if (i === "readme") { + continue; + } + if (data[i] && typeof data[i] === "object") { + try { + JSON.stringify(data[i]); + makeEnv(data[i], opts, `${envKey}_`, env); + } catch (ex) { + const d = data[i]; + makeEnv({ name: d.name, version: d.version, path: d.path }, opts, `${envKey}_`, env); + } + } else { + env[envKey] = String(data[i]); + env[envKey] = env[envKey].includes("\n") ? JSON.stringify(env[envKey]) : env[envKey]; + } + } + } + if (prefix !== "npm_package_") + return env; + prefix = "npm_config_"; + const pkgConfig = {}; + const pkgVerConfig = {}; + const namePref = `${data.name}:`; + const verPref = `${data.name}@${data.version}:`; + Object.keys(opts.config).forEach((i2) => { + if (i2.charAt(0) === "_" && i2.indexOf(`_${namePref}`) !== 0 || i2.match(/:_/)) { + return; + } + let value = opts.config[i2]; + if (value instanceof Stream || Array.isArray(value)) + return; + if (i2.match(/umask/)) + value = umask.toString(value); + if (!value) + value = ""; + else if (typeof value === "number") + value = `${value}`; + else if (typeof value !== "string") + value = JSON.stringify(value); + value = value.includes("\n") ? JSON.stringify(value) : value; + i2 = i2.replace(/^_+/, ""); + let k; + if (i2.indexOf(namePref) === 0) { + k = i2.substr(namePref.length).replace(/[^a-zA-Z0-9_]/g, "_"); + pkgConfig[k] = value; + } else if (i2.indexOf(verPref) === 0) { + k = i2.substr(verPref.length).replace(/[^a-zA-Z0-9_]/g, "_"); + pkgVerConfig[k] = value; + } + const envKey = (prefix + i2).replace(/[^a-zA-Z0-9_]/g, "_"); + env[envKey] = value; + }); + prefix = "npm_package_config_"; + [pkgConfig, pkgVerConfig].forEach((conf) => { + for (const i2 in conf) { + const envKey = prefix + i2; + env[envKey] = conf[i2]; + } + }); + return env; + } + } +}); + +// ../lifecycle/lib/runLifecycleHook.js +var require_runLifecycleHook = __commonJS({ + "../lifecycle/lib/runLifecycleHook.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var core_loggers_1 = require_lib12(); + var logger_1 = require_lib6(); + var npm_lifecycle_1 = __importDefault(require_npm_lifecycle()); + function noop() { + } + async function runLifecycleHook(stage, manifest, opts) { + var _a, _b, _c, _d, _e; + const optional = opts.optional === true; + const m = { _id: getId(manifest), ...manifest }; + m.scripts = { ...m.scripts }; + if (stage === "start" && !m.scripts.start) { + m.scripts.start = "node server.js"; + } + if (((_a = opts.args) === null || _a === void 0 ? void 0 : _a.length) && ((_b = m.scripts) === null || _b === void 0 ? void 0 : _b[stage])) { + m.scripts[stage] = `${m.scripts[stage]} ${opts.args.map((arg) => `"${arg}"`).join(" ")}`; + } + if (m.scripts[stage] === "npx only-allow pnpm") + return; + if (opts.stdio !== "inherit") { + core_loggers_1.lifecycleLogger.debug({ + depPath: opts.depPath, + optional, + script: m.scripts[stage], + stage, + wd: opts.pkgRoot + }); + } + const logLevel = opts.stdio !== "inherit" || opts.silent ? "silent" : void 0; + await npm_lifecycle_1.default(m, stage, opts.pkgRoot, { + config: opts.rawConfig, + dir: opts.rootModulesDir, + extraBinPaths: (_c = opts.extraBinPaths) !== null && _c !== void 0 ? _c : [], + extraEnv: { + ...opts.extraEnv, + INIT_CWD: (_d = opts.initCwd) !== null && _d !== void 0 ? _d : process.cwd(), + PNPM_SCRIPT_SRC_DIR: opts.pkgRoot + }, + log: { + clearProgress: noop, + info: noop, + level: logLevel, + pause: noop, + resume: noop, + showProgress: noop, + silly: npmLog, + verbose: npmLog, + warn: (...msg) => logger_1.globalWarn(msg.join(" ")) + }, + runConcurrently: true, + scriptShell: opts.scriptShell, + shellEmulator: opts.shellEmulator, + stdio: (_e = opts.stdio) !== null && _e !== void 0 ? _e : "pipe", + unsafePerm: opts.unsafePerm + }); + function npmLog(prefix, logid, stdtype, line) { + switch (stdtype) { + case "stdout": + case "stderr": + core_loggers_1.lifecycleLogger.debug({ + depPath: opts.depPath, + line: line.toString(), + stage, + stdio: stdtype, + wd: opts.pkgRoot + }); + return; + case "Returned: code:": { + if (opts.stdio === "inherit") { + return; + } + const code = arguments[3]; + core_loggers_1.lifecycleLogger.debug({ + depPath: opts.depPath, + exitCode: code, + optional, + stage, + wd: opts.pkgRoot + }); + } + } + } + } + exports2.default = runLifecycleHook; + function getId(manifest) { + var _a, _b; + return `${(_a = manifest.name) !== null && _a !== void 0 ? _a : ""}@${(_b = manifest.version) !== null && _b !== void 0 ? _b : ""}`; + } + } +}); + +// ../../node_modules/.pnpm/run-groups@3.0.1/node_modules/run-groups/lib/index.js +var require_lib79 = __commonJS({ + "../../node_modules/.pnpm/run-groups@3.0.1/node_modules/run-groups/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var pLimit = require_p_limit(); + exports2.default = async (concurrency, groups) => { + const limitRun = pLimit(concurrency); + for (const tasks of groups) { + await Promise.all(tasks.map((task) => limitRun(task))); + } + }; + } +}); + +// ../lifecycle/lib/runLifecycleHooksConcurrently.js +var require_runLifecycleHooksConcurrently = __commonJS({ + "../lifecycle/lib/runLifecycleHooksConcurrently.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var run_groups_1 = __importDefault(require_lib79()); + var runLifecycleHook_1 = __importDefault(require_runLifecycleHook()); + async function runLifecycleHooksConcurrently(stages, importers, childConcurrency, opts) { + const importersByBuildIndex = new Map(); + for (const importer of importers) { + if (!importersByBuildIndex.has(importer.buildIndex)) { + importersByBuildIndex.set(importer.buildIndex, [importer]); + } else { + importersByBuildIndex.get(importer.buildIndex).push(importer); + } + } + const sortedBuildIndexes = Array.from(importersByBuildIndex.keys()).sort(); + const groups = sortedBuildIndexes.map((buildIndex) => { + const importers2 = importersByBuildIndex.get(buildIndex); + return importers2.map(({ manifest, modulesDir, rootDir }) => async () => { + const runLifecycleHookOpts = { + ...opts, + depPath: rootDir, + pkgRoot: rootDir, + rootModulesDir: modulesDir + }; + for (const stage of stages) { + if (manifest.scripts == null || !manifest.scripts[stage]) + continue; + await runLifecycleHook_1.default(stage, manifest, runLifecycleHookOpts); + } + }); + }); + await run_groups_1.default(childConcurrency, groups); + } + exports2.default = runLifecycleHooksConcurrently; + } +}); + +// ../lifecycle/lib/index.js +var require_lib80 = __commonJS({ + "../lifecycle/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runPostinstallHooks = exports2.runLifecycleHooksConcurrently = exports2.makeNodeRequireOption = void 0; + var path_1 = __importDefault(require("path")); + var read_package_json_1 = require_lib32(); + var path_exists_1 = __importDefault(require_path_exists()); + var runLifecycleHook_1 = __importDefault(require_runLifecycleHook()); + var runLifecycleHooksConcurrently_1 = __importDefault(require_runLifecycleHooksConcurrently()); + exports2.runLifecycleHooksConcurrently = runLifecycleHooksConcurrently_1.default; + function makeNodeRequireOption(modulePath) { + let { NODE_OPTIONS } = process.env; + NODE_OPTIONS = `${NODE_OPTIONS !== null && NODE_OPTIONS !== void 0 ? NODE_OPTIONS : ""} --require=${modulePath}`.trim(); + return { NODE_OPTIONS }; + } + exports2.makeNodeRequireOption = makeNodeRequireOption; + exports2.default = runLifecycleHook_1.default; + async function runPostinstallHooks(opts) { + const pkg = await read_package_json_1.fromDir(opts.pkgRoot); + if (pkg.scripts == null) { + pkg.scripts = {}; + } + if (!pkg.scripts.install) { + await checkBindingGyp(opts.pkgRoot, pkg.scripts); + } + if (pkg.scripts.preinstall) { + await runLifecycleHook_1.default("preinstall", pkg, opts); + } + if (pkg.scripts.install) { + await runLifecycleHook_1.default("install", pkg, opts); + } + if (pkg.scripts.postinstall) { + await runLifecycleHook_1.default("postinstall", pkg, opts); + } + return pkg.scripts.preinstall != null || pkg.scripts.install != null || pkg.scripts.postinstall != null; + } + exports2.runPostinstallHooks = runPostinstallHooks; + async function checkBindingGyp(root, scripts) { + if (await path_exists_1.default(path_1.default.join(root, "binding.gyp"))) { + scripts["install"] = "node-gyp rebuild"; + } + } + } +}); + +// ../../node_modules/.pnpm/array-flatten@2.1.2/node_modules/array-flatten/array-flatten.js +var require_array_flatten = __commonJS({ + "../../node_modules/.pnpm/array-flatten@2.1.2/node_modules/array-flatten/array-flatten.js"(exports2, module2) { + "use strict"; + module2.exports = flatten; + module2.exports.from = flattenFrom; + module2.exports.depth = flattenDepth; + module2.exports.fromDepth = flattenFromDepth; + function flatten(array) { + if (!Array.isArray(array)) { + throw new TypeError("Expected value to be an array"); + } + return flattenFrom(array); + } + function flattenFrom(array) { + return flattenDown(array, []); + } + function flattenDepth(array, depth) { + if (!Array.isArray(array)) { + throw new TypeError("Expected value to be an array"); + } + return flattenFromDepth(array, depth); + } + function flattenFromDepth(array, depth) { + if (typeof depth !== "number") { + throw new TypeError("Expected the depth to be a number"); + } + return flattenDownDepth(array, [], depth); + } + function flattenDown(array, result) { + for (var i = 0; i < array.length; i++) { + var value = array[i]; + if (Array.isArray(value)) { + flattenDown(value, result); + } else { + result.push(value); + } + } + return result; + } + function flattenDownDepth(array, result, depth) { + depth--; + for (var i = 0; i < array.length; i++) { + var value = array[i]; + if (depth > -1 && Array.isArray(value)) { + flattenDownDepth(value, result, depth); + } else { + result.push(value); + } + } + return result; + } + } +}); + +// ../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js +var require_isArguments3 = __commonJS({ + "../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js"(exports2, module2) { + "use strict"; + var toStr = Object.prototype.toString; + module2.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === "[object Arguments]"; + if (!isArgs) { + isArgs = str !== "[object Array]" && value !== null && typeof value === "object" && typeof value.length === "number" && value.length >= 0 && toStr.call(value.callee) === "[object Function]"; + } + return isArgs; + }; + } +}); + +// ../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js +var require_implementation2 = __commonJS({ + "../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js"(exports2, module2) { + "use strict"; + var keysShim; + if (!Object.keys) { + has = Object.prototype.hasOwnProperty; + toStr = Object.prototype.toString; + isArgs = require_isArguments3(); + isEnumerable = Object.prototype.propertyIsEnumerable; + hasDontEnumBug = !isEnumerable.call({ toString: null }, "toString"); + hasProtoEnumBug = isEnumerable.call(function() { + }, "prototype"); + dontEnums = [ + "toString", + "toLocaleString", + "valueOf", + "hasOwnProperty", + "isPrototypeOf", + "propertyIsEnumerable", + "constructor" + ]; + equalsConstructorPrototype = function(o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $onmozfullscreenchange: true, + $onmozfullscreenerror: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true + }; + hasAutomationEqualityBug = function() { + if (typeof window === "undefined") { + return false; + } + for (var k in window) { + try { + if (!excludedKeys["$" + k] && has.call(window, k) && window[k] !== null && typeof window[k] === "object") { + try { + equalsConstructorPrototype(window[k]); + } catch (e) { + return true; + } + } + } catch (e) { + return true; + } + } + return false; + }(); + equalsConstructorPrototypeIfNotBuggy = function(o) { + if (typeof window === "undefined" || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o); + } + try { + return equalsConstructorPrototype(o); + } catch (e) { + return false; + } + }; + keysShim = function keys(object) { + var isObject = object !== null && typeof object === "object"; + var isFunction = toStr.call(object) === "[object Function]"; + var isArguments = isArgs(object); + var isString = isObject && toStr.call(object) === "[object String]"; + var theKeys = []; + if (!isObject && !isFunction && !isArguments) { + throw new TypeError("Object.keys called on a non-object"); + } + var skipProto = hasProtoEnumBug && isFunction; + if (isString && object.length > 0 && !has.call(object, 0)) { + for (var i = 0; i < object.length; ++i) { + theKeys.push(String(i)); + } + } + if (isArguments && object.length > 0) { + for (var j = 0; j < object.length; ++j) { + theKeys.push(String(j)); + } + } else { + for (var name in object) { + if (!(skipProto && name === "prototype") && has.call(object, name)) { + theKeys.push(String(name)); + } + } + } + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + for (var k = 0; k < dontEnums.length; ++k) { + if (!(skipConstructor && dontEnums[k] === "constructor") && has.call(object, dontEnums[k])) { + theKeys.push(dontEnums[k]); + } + } + } + return theKeys; + }; + } + var has; + var toStr; + var isArgs; + var isEnumerable; + var hasDontEnumBug; + var hasProtoEnumBug; + var dontEnums; + var equalsConstructorPrototype; + var excludedKeys; + var hasAutomationEqualityBug; + var equalsConstructorPrototypeIfNotBuggy; + module2.exports = keysShim; + } +}); + +// ../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js +var require_object_keys = __commonJS({ + "../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js"(exports2, module2) { + "use strict"; + var slice = Array.prototype.slice; + var isArgs = require_isArguments3(); + var origKeys = Object.keys; + var keysShim = origKeys ? function keys(o) { + return origKeys(o); + } : require_implementation2(); + var originalKeys = Object.keys; + keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = function() { + var args2 = Object.keys(arguments); + return args2 && args2.length === arguments.length; + }(1, 2); + if (!keysWorksWithArguments) { + Object.keys = function keys(object) { + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } + return originalKeys(object); + }; + } + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; + }; + module2.exports = keysShim; + } +}); + +// ../../node_modules/.pnpm/define-properties@1.1.3/node_modules/define-properties/index.js +var require_define_properties = __commonJS({ + "../../node_modules/.pnpm/define-properties@1.1.3/node_modules/define-properties/index.js"(exports2, module2) { + "use strict"; + var keys = require_object_keys(); + var hasSymbols = typeof Symbol === "function" && typeof Symbol("foo") === "symbol"; + var toStr = Object.prototype.toString; + var concat = Array.prototype.concat; + var origDefineProperty = Object.defineProperty; + var isFunction = function(fn2) { + return typeof fn2 === "function" && toStr.call(fn2) === "[object Function]"; + }; + var arePropertyDescriptorsSupported = function() { + var obj = {}; + try { + origDefineProperty(obj, "x", { enumerable: false, value: obj }); + for (var _ in obj) { + return false; + } + return obj.x === obj; + } catch (e) { + return false; + } + }; + var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported(); + var defineProperty = function(object, name, value, predicate) { + if (name in object && (!isFunction(predicate) || !predicate())) { + return; + } + if (supportsDescriptors) { + origDefineProperty(object, name, { + configurable: true, + enumerable: false, + value, + writable: true + }); + } else { + object[name] = value; + } + }; + var defineProperties = function(object, map) { + var predicates = arguments.length > 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = concat.call(props, Object.getOwnPropertySymbols(map)); + } + for (var i = 0; i < props.length; i += 1) { + defineProperty(object, props[i], map[props[i]], predicates[props[i]]); + } + }; + defineProperties.supportsDescriptors = !!supportsDescriptors; + module2.exports = defineProperties; + } +}); + +// ../../node_modules/.pnpm/has-symbols@1.0.2/node_modules/has-symbols/shams.js +var require_shams = __commonJS({ + "../../node_modules/.pnpm/has-symbols@1.0.2/node_modules/has-symbols/shams.js"(exports2, module2) { + "use strict"; + module2.exports = function hasSymbols() { + if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") { + return false; + } + if (typeof Symbol.iterator === "symbol") { + return true; + } + var obj = {}; + var sym = Symbol("test"); + var symObj = Object(sym); + if (typeof sym === "string") { + return false; + } + if (Object.prototype.toString.call(sym) !== "[object Symbol]") { + return false; + } + if (Object.prototype.toString.call(symObj) !== "[object Symbol]") { + return false; + } + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { + return false; + } + if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) { + return false; + } + if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) { + return false; + } + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { + return false; + } + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { + return false; + } + if (typeof Object.getOwnPropertyDescriptor === "function") { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { + return false; + } + } + return true; + }; + } +}); + +// ../../node_modules/.pnpm/has-symbols@1.0.2/node_modules/has-symbols/index.js +var require_has_symbols = __commonJS({ + "../../node_modules/.pnpm/has-symbols@1.0.2/node_modules/has-symbols/index.js"(exports2, module2) { + "use strict"; + var origSymbol = typeof Symbol !== "undefined" && Symbol; + var hasSymbolSham = require_shams(); + module2.exports = function hasNativeSymbols() { + if (typeof origSymbol !== "function") { + return false; + } + if (typeof Symbol !== "function") { + return false; + } + if (typeof origSymbol("foo") !== "symbol") { + return false; + } + if (typeof Symbol("bar") !== "symbol") { + return false; + } + return hasSymbolSham(); + }; + } +}); + +// ../../node_modules/.pnpm/get-intrinsic@1.1.1/node_modules/get-intrinsic/index.js +var require_get_intrinsic = __commonJS({ + "../../node_modules/.pnpm/get-intrinsic@1.1.1/node_modules/get-intrinsic/index.js"(exports2, module2) { + "use strict"; + var undefined2; + var $SyntaxError = SyntaxError; + var $Function = Function; + var $TypeError = TypeError; + var getEvalledConstructor = function(expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")(); + } catch (e) { + } + }; + var $gOPD = Object.getOwnPropertyDescriptor; + if ($gOPD) { + try { + $gOPD({}, ""); + } catch (e) { + $gOPD = null; + } + } + var throwTypeError = function() { + throw new $TypeError(); + }; + var ThrowTypeError = $gOPD ? function() { + try { + arguments.callee; + return throwTypeError; + } catch (calleeThrows) { + try { + return $gOPD(arguments, "callee").get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }() : throwTypeError; + var hasSymbols = require_has_symbols()(); + var getProto = Object.getPrototypeOf || function(x) { + return x.__proto__; + }; + var needsEval = {}; + var TypedArray = typeof Uint8Array === "undefined" ? undefined2 : getProto(Uint8Array); + var INTRINSICS = { + "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError, + "%Array%": Array, + "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer, + "%ArrayIteratorPrototype%": hasSymbols ? getProto([][Symbol.iterator]()) : undefined2, + "%AsyncFromSyncIteratorPrototype%": undefined2, + "%AsyncFunction%": needsEval, + "%AsyncGenerator%": needsEval, + "%AsyncGeneratorFunction%": needsEval, + "%AsyncIteratorPrototype%": needsEval, + "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics, + "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt, + "%Boolean%": Boolean, + "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView, + "%Date%": Date, + "%decodeURI%": decodeURI, + "%decodeURIComponent%": decodeURIComponent, + "%encodeURI%": encodeURI, + "%encodeURIComponent%": encodeURIComponent, + "%Error%": Error, + "%eval%": eval, + "%EvalError%": EvalError, + "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array, + "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array, + "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry, + "%Function%": $Function, + "%GeneratorFunction%": needsEval, + "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array, + "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array, + "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array, + "%isFinite%": isFinite, + "%isNaN%": isNaN, + "%IteratorPrototype%": hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined2, + "%JSON%": typeof JSON === "object" ? JSON : undefined2, + "%Map%": typeof Map === "undefined" ? undefined2 : Map, + "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols ? undefined2 : getProto(new Map()[Symbol.iterator]()), + "%Math%": Math, + "%Number%": Number, + "%Object%": Object, + "%parseFloat%": parseFloat, + "%parseInt%": parseInt, + "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise, + "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy, + "%RangeError%": RangeError, + "%ReferenceError%": ReferenceError, + "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect, + "%RegExp%": RegExp, + "%Set%": typeof Set === "undefined" ? undefined2 : Set, + "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols ? undefined2 : getProto(new Set()[Symbol.iterator]()), + "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer, + "%String%": String, + "%StringIteratorPrototype%": hasSymbols ? getProto(""[Symbol.iterator]()) : undefined2, + "%Symbol%": hasSymbols ? Symbol : undefined2, + "%SyntaxError%": $SyntaxError, + "%ThrowTypeError%": ThrowTypeError, + "%TypedArray%": TypedArray, + "%TypeError%": $TypeError, + "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array, + "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray, + "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array, + "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array, + "%URIError%": URIError, + "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap, + "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef, + "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet + }; + var doEval = function doEval2(name) { + var value; + if (name === "%AsyncFunction%") { + value = getEvalledConstructor("async function () {}"); + } else if (name === "%GeneratorFunction%") { + value = getEvalledConstructor("function* () {}"); + } else if (name === "%AsyncGeneratorFunction%") { + value = getEvalledConstructor("async function* () {}"); + } else if (name === "%AsyncGenerator%") { + var fn2 = doEval2("%AsyncGeneratorFunction%"); + if (fn2) { + value = fn2.prototype; + } + } else if (name === "%AsyncIteratorPrototype%") { + var gen = doEval2("%AsyncGenerator%"); + if (gen) { + value = getProto(gen.prototype); + } + } + INTRINSICS[name] = value; + return value; + }; + var LEGACY_ALIASES = { + "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], + "%ArrayPrototype%": ["Array", "prototype"], + "%ArrayProto_entries%": ["Array", "prototype", "entries"], + "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], + "%ArrayProto_keys%": ["Array", "prototype", "keys"], + "%ArrayProto_values%": ["Array", "prototype", "values"], + "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], + "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], + "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], + "%BooleanPrototype%": ["Boolean", "prototype"], + "%DataViewPrototype%": ["DataView", "prototype"], + "%DatePrototype%": ["Date", "prototype"], + "%ErrorPrototype%": ["Error", "prototype"], + "%EvalErrorPrototype%": ["EvalError", "prototype"], + "%Float32ArrayPrototype%": ["Float32Array", "prototype"], + "%Float64ArrayPrototype%": ["Float64Array", "prototype"], + "%FunctionPrototype%": ["Function", "prototype"], + "%Generator%": ["GeneratorFunction", "prototype"], + "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], + "%Int8ArrayPrototype%": ["Int8Array", "prototype"], + "%Int16ArrayPrototype%": ["Int16Array", "prototype"], + "%Int32ArrayPrototype%": ["Int32Array", "prototype"], + "%JSONParse%": ["JSON", "parse"], + "%JSONStringify%": ["JSON", "stringify"], + "%MapPrototype%": ["Map", "prototype"], + "%NumberPrototype%": ["Number", "prototype"], + "%ObjectPrototype%": ["Object", "prototype"], + "%ObjProto_toString%": ["Object", "prototype", "toString"], + "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], + "%PromisePrototype%": ["Promise", "prototype"], + "%PromiseProto_then%": ["Promise", "prototype", "then"], + "%Promise_all%": ["Promise", "all"], + "%Promise_reject%": ["Promise", "reject"], + "%Promise_resolve%": ["Promise", "resolve"], + "%RangeErrorPrototype%": ["RangeError", "prototype"], + "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], + "%RegExpPrototype%": ["RegExp", "prototype"], + "%SetPrototype%": ["Set", "prototype"], + "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], + "%StringPrototype%": ["String", "prototype"], + "%SymbolPrototype%": ["Symbol", "prototype"], + "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], + "%TypedArrayPrototype%": ["TypedArray", "prototype"], + "%TypeErrorPrototype%": ["TypeError", "prototype"], + "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], + "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], + "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], + "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], + "%URIErrorPrototype%": ["URIError", "prototype"], + "%WeakMapPrototype%": ["WeakMap", "prototype"], + "%WeakSetPrototype%": ["WeakSet", "prototype"] + }; + var bind = require_function_bind(); + var hasOwn = require_src5(); + var $concat = bind.call(Function.call, Array.prototype.concat); + var $spliceApply = bind.call(Function.apply, Array.prototype.splice); + var $replace = bind.call(Function.call, String.prototype.replace); + var $strSlice = bind.call(Function.call, String.prototype.slice); + var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; + var reEscapeChar = /\\(\\)?/g; + var stringToPath = function stringToPath2(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === "%" && last !== "%") { + throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`"); + } else if (last === "%" && first !== "%") { + throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`"); + } + var result = []; + $replace(string, rePropName, function(match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match; + }); + return result; + }; + var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = "%" + alias[0] + "%"; + } + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === "undefined" && !allowMissing) { + throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!"); + } + return { + alias, + name: intrinsicName, + value + }; + } + throw new $SyntaxError("intrinsic " + name + " does not exist!"); + }; + module2.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== "string" || name.length === 0) { + throw new $TypeError("intrinsic name must be a non-empty string"); + } + if (arguments.length > 1 && typeof allowMissing !== "boolean") { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ""; + var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) { + throw new $SyntaxError("property names with quotes must have matching quotes"); + } + if (part === "constructor" || !isOwn) { + skipFurtherCaching = true; + } + intrinsicBaseName += "." + part; + intrinsicRealName = "%" + intrinsicBaseName + "%"; + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available."); + } + return void 0; + } + if ($gOPD && i + 1 >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + if (isOwn && "get" in desc && !("originalValue" in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/CheckObjectCoercible.js +var require_CheckObjectCoercible = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/CheckObjectCoercible.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $TypeError = GetIntrinsic("%TypeError%"); + module2.exports = function CheckObjectCoercible(value, optMessage) { + if (value == null) { + throw new $TypeError(optMessage || "Cannot call method on " + value); + } + return value; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/RequireObjectCoercible.js +var require_RequireObjectCoercible = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/RequireObjectCoercible.js"(exports2, module2) { + "use strict"; + module2.exports = require_CheckObjectCoercible(); + } +}); + +// ../../node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js +var require_call_bind = __commonJS({ + "../../node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js"(exports2, module2) { + "use strict"; + var bind = require_function_bind(); + var GetIntrinsic = require_get_intrinsic(); + var $apply = GetIntrinsic("%Function.prototype.apply%"); + var $call = GetIntrinsic("%Function.prototype.call%"); + var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind.call($call, $apply); + var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true); + var $defineProperty = GetIntrinsic("%Object.defineProperty%", true); + var $max = GetIntrinsic("%Math.max%"); + if ($defineProperty) { + try { + $defineProperty({}, "a", { value: 1 }); + } catch (e) { + $defineProperty = null; + } + } + module2.exports = function callBind(originalFunction) { + var func = $reflectApply(bind, $call, arguments); + if ($gOPD && $defineProperty) { + var desc = $gOPD(func, "length"); + if (desc.configurable) { + $defineProperty(func, "length", { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }); + } + } + return func; + }; + var applyBind = function applyBind2() { + return $reflectApply(bind, $apply, arguments); + }; + if ($defineProperty) { + $defineProperty(module2.exports, "apply", { value: applyBind }); + } else { + module2.exports.apply = applyBind; + } + } +}); + +// ../../node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js +var require_callBound = __commonJS({ + "../../node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var callBind = require_call_bind(); + var $indexOf = callBind(GetIntrinsic("String.prototype.indexOf")); + module2.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) { + return callBind(intrinsic); + } + return intrinsic; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/abs.js +var require_abs = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/abs.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $abs = GetIntrinsic("%Math.abs%"); + module2.exports = function abs(x) { + return $abs(x); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/floor.js +var require_floor = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/floor.js"(exports2, module2) { + "use strict"; + var $floor = Math.floor; + module2.exports = function floor(x) { + return $floor(x); + }; + } +}); + +// ../../node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js +var require_isPrimitive = __commonJS({ + "../../node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js"(exports2, module2) { + "use strict"; + module2.exports = function isPrimitive(value) { + return value === null || typeof value !== "function" && typeof value !== "object"; + }; + } +}); + +// ../../node_modules/.pnpm/is-callable@1.2.4/node_modules/is-callable/index.js +var require_is_callable = __commonJS({ + "../../node_modules/.pnpm/is-callable@1.2.4/node_modules/is-callable/index.js"(exports2, module2) { + "use strict"; + var fnToStr = Function.prototype.toString; + var reflectApply = typeof Reflect === "object" && Reflect !== null && Reflect.apply; + var badArrayLike; + var isCallableMarker; + if (typeof reflectApply === "function" && typeof Object.defineProperty === "function") { + try { + badArrayLike = Object.defineProperty({}, "length", { + get: function() { + throw isCallableMarker; + } + }); + isCallableMarker = {}; + reflectApply(function() { + throw 42; + }, null, badArrayLike); + } catch (_) { + if (_ !== isCallableMarker) { + reflectApply = null; + } + } + } else { + reflectApply = null; + } + var constructorRegex = /^\s*class\b/; + var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e) { + return false; + } + }; + var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { + return false; + } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } + }; + var toStr = Object.prototype.toString; + var fnClass = "[object Function]"; + var genClass = "[object GeneratorFunction]"; + var hasToStringTag = typeof Symbol === "function" && !!Symbol.toStringTag; + var documentDotAll = typeof document === "object" && typeof document.all === "undefined" && document.all !== void 0 ? document.all : {}; + module2.exports = reflectApply ? function isCallable(value) { + if (value === documentDotAll) { + return true; + } + if (!value) { + return false; + } + if (typeof value !== "function" && typeof value !== "object") { + return false; + } + if (typeof value === "function" && !value.prototype) { + return true; + } + try { + reflectApply(value, null, badArrayLike); + } catch (e) { + if (e !== isCallableMarker) { + return false; + } + } + return !isES6ClassFn(value); + } : function isCallable(value) { + if (value === documentDotAll) { + return true; + } + if (!value) { + return false; + } + if (typeof value !== "function" && typeof value !== "object") { + return false; + } + if (typeof value === "function" && !value.prototype) { + return true; + } + if (hasToStringTag) { + return tryFunctionObject(value); + } + if (isES6ClassFn(value)) { + return false; + } + var strClass = toStr.call(value); + return strClass === fnClass || strClass === genClass; + }; + } +}); + +// ../../node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es5.js +var require_es5 = __commonJS({ + "../../node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es5.js"(exports2, module2) { + "use strict"; + var toStr = Object.prototype.toString; + var isPrimitive = require_isPrimitive(); + var isCallable = require_is_callable(); + var ES5internalSlots = { + "[[DefaultValue]]": function(O) { + var actualHint; + if (arguments.length > 1) { + actualHint = arguments[1]; + } else { + actualHint = toStr.call(O) === "[object Date]" ? String : Number; + } + if (actualHint === String || actualHint === Number) { + var methods = actualHint === String ? ["toString", "valueOf"] : ["valueOf", "toString"]; + var value, i; + for (i = 0; i < methods.length; ++i) { + if (isCallable(O[methods[i]])) { + value = O[methods[i]](); + if (isPrimitive(value)) { + return value; + } + } + } + throw new TypeError("No default value"); + } + throw new TypeError("invalid [[DefaultValue]] hint supplied"); + } + }; + module2.exports = function ToPrimitive(input) { + if (isPrimitive(input)) { + return input; + } + if (arguments.length > 1) { + return ES5internalSlots["[[DefaultValue]]"](input, arguments[1]); + } + return ES5internalSlots["[[DefaultValue]]"](input); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/ToPrimitive.js +var require_ToPrimitive = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/ToPrimitive.js"(exports2, module2) { + "use strict"; + module2.exports = require_es5(); + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/ToNumber.js +var require_ToNumber = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/ToNumber.js"(exports2, module2) { + "use strict"; + var ToPrimitive = require_ToPrimitive(); + module2.exports = function ToNumber(value) { + var prim = ToPrimitive(value, Number); + if (typeof prim !== "string") { + return +prim; + } + var trimmed = prim.replace(/^[ \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u0085]+|[ \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u0085]+$/g, ""); + if (/^0[ob]|^[+-]0x/.test(trimmed)) { + return NaN; + } + return +trimmed; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/isNaN.js +var require_isNaN = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/isNaN.js"(exports2, module2) { + "use strict"; + module2.exports = Number.isNaN || function isNaN2(a) { + return a !== a; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/isFinite.js +var require_isFinite = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/isFinite.js"(exports2, module2) { + "use strict"; + var $isNaN = Number.isNaN || function(a) { + return a !== a; + }; + module2.exports = Number.isFinite || function(x) { + return typeof x === "number" && !$isNaN(x) && x !== Infinity && x !== -Infinity; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/sign.js +var require_sign = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/sign.js"(exports2, module2) { + "use strict"; + module2.exports = function sign(number) { + return number >= 0 ? 1 : -1; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/ToInteger.js +var require_ToInteger = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/ToInteger.js"(exports2, module2) { + "use strict"; + var abs = require_abs(); + var floor = require_floor(); + var ToNumber = require_ToNumber(); + var $isNaN = require_isNaN(); + var $isFinite = require_isFinite(); + var $sign = require_sign(); + module2.exports = function ToInteger(value) { + var number = ToNumber(value); + if ($isNaN(number)) { + return 0; + } + if (number === 0 || !$isFinite(number)) { + return number; + } + return $sign(number) * floor(abs(number)); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/regexTester.js +var require_regexTester = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/regexTester.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $test = GetIntrinsic("RegExp.prototype.test"); + var callBind = require_call_bind(); + module2.exports = function regexTester(regex) { + return callBind($test, regex); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/isPrimitive.js +var require_isPrimitive2 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/isPrimitive.js"(exports2, module2) { + "use strict"; + module2.exports = function isPrimitive(value) { + return value === null || typeof value !== "function" && typeof value !== "object"; + }; + } +}); + +// ../../node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js +var require_shams2 = __commonJS({ + "../../node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js"(exports2, module2) { + "use strict"; + var hasSymbols = require_shams(); + module2.exports = function hasToStringTagShams() { + return hasSymbols() && !!Symbol.toStringTag; + }; + } +}); + +// ../../node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js +var require_is_date_object = __commonJS({ + "../../node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js"(exports2, module2) { + "use strict"; + var getDay = Date.prototype.getDay; + var tryDateObject = function tryDateGetDayCall(value) { + try { + getDay.call(value); + return true; + } catch (e) { + return false; + } + }; + var toStr = Object.prototype.toString; + var dateClass = "[object Date]"; + var hasToStringTag = require_shams2()(); + module2.exports = function isDateObject(value) { + if (typeof value !== "object" || value === null) { + return false; + } + return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass; + }; + } +}); + +// ../../node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js +var require_is_symbol = __commonJS({ + "../../node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js"(exports2, module2) { + "use strict"; + var toStr = Object.prototype.toString; + var hasSymbols = require_has_symbols()(); + if (hasSymbols) { + symToStr = Symbol.prototype.toString; + symStringRegex = /^Symbol\(.*\)$/; + isSymbolObject = function isRealSymbolObject(value) { + if (typeof value.valueOf() !== "symbol") { + return false; + } + return symStringRegex.test(symToStr.call(value)); + }; + module2.exports = function isSymbol(value) { + if (typeof value === "symbol") { + return true; + } + if (toStr.call(value) !== "[object Symbol]") { + return false; + } + try { + return isSymbolObject(value); + } catch (e) { + return false; + } + }; + } else { + module2.exports = function isSymbol(value) { + return false; + }; + } + var symToStr; + var symStringRegex; + var isSymbolObject; + } +}); + +// ../../node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js +var require_es2015 = __commonJS({ + "../../node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js"(exports2, module2) { + "use strict"; + var hasSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "symbol"; + var isPrimitive = require_isPrimitive(); + var isCallable = require_is_callable(); + var isDate = require_is_date_object(); + var isSymbol = require_is_symbol(); + var ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) { + if (typeof O === "undefined" || O === null) { + throw new TypeError("Cannot call method on " + O); + } + if (typeof hint !== "string" || hint !== "number" && hint !== "string") { + throw new TypeError('hint must be "string" or "number"'); + } + var methodNames = hint === "string" ? ["toString", "valueOf"] : ["valueOf", "toString"]; + var method, result, i; + for (i = 0; i < methodNames.length; ++i) { + method = O[methodNames[i]]; + if (isCallable(method)) { + result = method.call(O); + if (isPrimitive(result)) { + return result; + } + } + } + throw new TypeError("No default value"); + }; + var GetMethod = function GetMethod2(O, P) { + var func = O[P]; + if (func !== null && typeof func !== "undefined") { + if (!isCallable(func)) { + throw new TypeError(func + " returned for property " + P + " of object " + O + " is not a function"); + } + return func; + } + return void 0; + }; + module2.exports = function ToPrimitive(input) { + if (isPrimitive(input)) { + return input; + } + var hint = "default"; + if (arguments.length > 1) { + if (arguments[1] === String) { + hint = "string"; + } else if (arguments[1] === Number) { + hint = "number"; + } + } + var exoticToPrim; + if (hasSymbols) { + if (Symbol.toPrimitive) { + exoticToPrim = GetMethod(input, Symbol.toPrimitive); + } else if (isSymbol(input)) { + exoticToPrim = Symbol.prototype.valueOf; + } + } + if (typeof exoticToPrim !== "undefined") { + var result = exoticToPrim.call(input, hint); + if (isPrimitive(result)) { + return result; + } + throw new TypeError("unable to convert exotic object to primitive"); + } + if (hint === "default" && (isDate(input) || isSymbol(input))) { + hint = "string"; + } + return ordinaryToPrimitive(input, hint === "default" ? "number" : hint); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/ToPrimitive.js +var require_ToPrimitive2 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/ToPrimitive.js"(exports2, module2) { + "use strict"; + var toPrimitive = require_es2015(); + module2.exports = function ToPrimitive(input) { + if (arguments.length > 1) { + return toPrimitive(input, arguments[1]); + } + return toPrimitive(input); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/ToNumber.js +var require_ToNumber2 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/ToNumber.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $TypeError = GetIntrinsic("%TypeError%"); + var $Number = GetIntrinsic("%Number%"); + var $RegExp = GetIntrinsic("%RegExp%"); + var $parseInteger = GetIntrinsic("%parseInt%"); + var callBound = require_callBound(); + var regexTester = require_regexTester(); + var isPrimitive = require_isPrimitive2(); + var $strSlice = callBound("String.prototype.slice"); + var isBinary = regexTester(/^0b[01]+$/i); + var isOctal = regexTester(/^0o[0-7]+$/i); + var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i); + var nonWS = ["\x85", "\u200B", "\uFFFE"].join(""); + var nonWSregex = new $RegExp("[" + nonWS + "]", "g"); + var hasNonWS = regexTester(nonWSregex); + var ws = [ + " \n\v\f\r \xA0\u1680\u180E\u2000\u2001\u2002\u2003", + "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028", + "\u2029\uFEFF" + ].join(""); + var trimRegex = new RegExp("(^[" + ws + "]+)|([" + ws + "]+$)", "g"); + var $replace = callBound("String.prototype.replace"); + var $trim = function(value) { + return $replace(value, trimRegex, ""); + }; + var ToPrimitive = require_ToPrimitive2(); + module2.exports = function ToNumber(argument) { + var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (typeof value === "symbol") { + throw new $TypeError("Cannot convert a Symbol value to a number"); + } + if (typeof value === "bigint") { + throw new $TypeError("Conversion from 'BigInt' to 'number' is not allowed."); + } + if (typeof value === "string") { + if (isBinary(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 2)); + } else if (isOctal(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 8)); + } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { + return NaN; + } + var trimmed = $trim(value); + if (trimmed !== value) { + return ToNumber(trimmed); + } + } + return $Number(value); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/ToInteger.js +var require_ToInteger2 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/ToInteger.js"(exports2, module2) { + "use strict"; + var ES5ToInteger = require_ToInteger(); + var ToNumber = require_ToNumber2(); + module2.exports = function ToInteger(value) { + var number = ToNumber(value); + if (number !== 0) { + number = ES5ToInteger(number); + } + return number === 0 ? 0 : number; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/maxSafeInteger.js +var require_maxSafeInteger = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/maxSafeInteger.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $Math = GetIntrinsic("%Math%"); + var $Number = GetIntrinsic("%Number%"); + module2.exports = $Number.MAX_SAFE_INTEGER || $Math.pow(2, 53) - 1; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/ToLength.js +var require_ToLength = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/ToLength.js"(exports2, module2) { + "use strict"; + var MAX_SAFE_INTEGER = require_maxSafeInteger(); + var ToInteger = require_ToInteger2(); + module2.exports = function ToLength(argument) { + var len = ToInteger(argument); + if (len <= 0) { + return 0; + } + if (len > MAX_SAFE_INTEGER) { + return MAX_SAFE_INTEGER; + } + return len; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/ToObject.js +var require_ToObject = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/ToObject.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $Object = GetIntrinsic("%Object%"); + var RequireObjectCoercible = require_RequireObjectCoercible(); + module2.exports = function ToObject(value) { + RequireObjectCoercible(value); + return $Object(value); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/SameValueZero.js +var require_SameValueZero = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/SameValueZero.js"(exports2, module2) { + "use strict"; + var $isNaN = require_isNaN(); + module2.exports = function SameValueZero(x, y) { + return x === y || $isNaN(x) && $isNaN(y); + }; + } +}); + +// ../../node_modules/.pnpm/is-string@1.0.7/node_modules/is-string/index.js +var require_is_string = __commonJS({ + "../../node_modules/.pnpm/is-string@1.0.7/node_modules/is-string/index.js"(exports2, module2) { + "use strict"; + var strValue = String.prototype.valueOf; + var tryStringObject = function tryStringObject2(value) { + try { + strValue.call(value); + return true; + } catch (e) { + return false; + } + }; + var toStr = Object.prototype.toString; + var strClass = "[object String]"; + var hasToStringTag = require_shams2()(); + module2.exports = function isString(value) { + if (typeof value === "string") { + return true; + } + if (typeof value !== "object") { + return false; + } + return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass; + }; + } +}); + +// ../../node_modules/.pnpm/array-includes@3.1.3/node_modules/array-includes/implementation.js +var require_implementation3 = __commonJS({ + "../../node_modules/.pnpm/array-includes@3.1.3/node_modules/array-includes/implementation.js"(exports2, module2) { + "use strict"; + var ToInteger = require_ToInteger2(); + var ToLength = require_ToLength(); + var ToObject = require_ToObject(); + var SameValueZero = require_SameValueZero(); + var $isNaN = require_isNaN(); + var $isFinite = require_isFinite(); + var GetIntrinsic = require_get_intrinsic(); + var callBound = require_callBound(); + var isString = require_is_string(); + var $charAt = callBound("String.prototype.charAt"); + var $indexOf = GetIntrinsic("%Array.prototype.indexOf%"); + module2.exports = function includes(searchElement) { + var fromIndex = arguments.length > 1 ? ToInteger(arguments[1]) : 0; + if ($indexOf && !$isNaN(searchElement) && $isFinite(fromIndex) && typeof searchElement !== "undefined") { + return $indexOf.apply(this, arguments) > -1; + } + var O = ToObject(this); + var length = ToLength(O.length); + if (length === 0) { + return false; + } + var k = fromIndex >= 0 ? fromIndex : Math.max(0, length + fromIndex); + while (k < length) { + if (SameValueZero(searchElement, isString(O) ? $charAt(O, k) : O[k])) { + return true; + } + k += 1; + } + return false; + }; + } +}); + +// ../../node_modules/.pnpm/array-includes@3.1.3/node_modules/array-includes/polyfill.js +var require_polyfill = __commonJS({ + "../../node_modules/.pnpm/array-includes@3.1.3/node_modules/array-includes/polyfill.js"(exports2, module2) { + "use strict"; + var implementation = require_implementation3(); + module2.exports = function getPolyfill() { + return Array.prototype.includes || implementation; + }; + } +}); + +// ../../node_modules/.pnpm/array-includes@3.1.3/node_modules/array-includes/shim.js +var require_shim = __commonJS({ + "../../node_modules/.pnpm/array-includes@3.1.3/node_modules/array-includes/shim.js"(exports2, module2) { + "use strict"; + var define2 = require_define_properties(); + var getPolyfill = require_polyfill(); + module2.exports = function shimArrayPrototypeIncludes() { + var polyfill = getPolyfill(); + define2(Array.prototype, { includes: polyfill }, { includes: function() { + return Array.prototype.includes !== polyfill; + } }); + return polyfill; + }; + } +}); + +// ../../node_modules/.pnpm/array-includes@3.1.3/node_modules/array-includes/index.js +var require_array_includes = __commonJS({ + "../../node_modules/.pnpm/array-includes@3.1.3/node_modules/array-includes/index.js"(exports2, module2) { + "use strict"; + var define2 = require_define_properties(); + var RequireObjectCoercible = require_RequireObjectCoercible(); + var callBind = require_call_bind(); + var callBound = require_callBound(); + var implementation = require_implementation3(); + var getPolyfill = require_polyfill(); + var polyfill = callBind.apply(getPolyfill()); + var shim = require_shim(); + var $slice = callBound("Array.prototype.slice"); + var boundShim = function includes(array, searchElement) { + RequireObjectCoercible(array); + return polyfill(array, $slice(arguments, 1)); + }; + define2(boundShim, { + getPolyfill, + implementation, + shim + }); + module2.exports = boundShim; + } +}); + +// ../../node_modules/.pnpm/graph-sequencer@2.0.0/node_modules/graph-sequencer/index.js +var require_graph_sequencer = __commonJS({ + "../../node_modules/.pnpm/graph-sequencer@2.0.0/node_modules/graph-sequencer/index.js"(exports2, module2) { + "use strict"; + var assert = require("assert"); + var arrayFlatten = require_array_flatten(); + var arrayIncludes = require_array_includes(); + function getCycles(currDepsMap, visited) { + let items = Array.from(currDepsMap.keys()); + let cycles = []; + function visit(item, cycle) { + let visitedDeps = visited.get(item); + if (!visitedDeps) { + visitedDeps = []; + visited.set(item, visitedDeps); + } + let deps = currDepsMap.get(item); + if (typeof deps === "undefined") + return; + for (let dep of deps) { + if (cycle[0] === dep) { + cycles.push(cycle); + } + if (!arrayIncludes(visitedDeps, dep)) { + visitedDeps.push(dep); + visit(dep, cycle.concat(dep)); + } + } + } + for (let item of items) { + visit(item, [item]); + } + return cycles; + } + function graphSequencer(opts) { + let graph = opts.graph; + let groups = opts.groups; + let graphItems = Array.from(graph.keys()); + assert.deepStrictEqual(graphItems.sort(), arrayFlatten(groups).sort(), "items in graph must be the same as items in groups"); + let chunks = []; + let cycles = []; + let safe = true; + let queue = graphItems; + let chunked = new Set(); + let visited = new Map(); + while (queue.length) { + let nextQueue = []; + let chunk = []; + let currDepsMap = new Map(); + for (let i = 0; i < queue.length; i++) { + let item = queue[i]; + let deps = graph.get(item); + if (typeof deps === "undefined") + continue; + let itemGroup = groups.findIndex((group) => arrayIncludes(group, item)); + let currDeps = deps.filter((dep) => { + let depGroup = groups.findIndex((group) => arrayIncludes(group, dep)); + if (depGroup > itemGroup) { + return false; + } else { + return !chunked.has(dep); + } + }); + currDepsMap.set(item, currDeps); + if (currDeps.length) { + nextQueue.push(item); + } else { + chunk.push(item); + } + } + if (!chunk.length) { + cycles = cycles.concat(getCycles(currDepsMap, visited)); + let sorted = queue.sort((a, b) => { + let aDeps = currDepsMap.get(a) || []; + let bDeps = currDepsMap.get(b) || []; + return aDeps.length - bDeps.length; + }); + chunk.push(sorted[0]); + nextQueue = sorted.slice(1); + safe = false; + } + for (let item of chunk) { + chunked.add(item); + } + chunks.push(chunk.sort()); + queue = nextQueue; + } + return { safe, chunks, cycles }; + } + module2.exports = graphSequencer; + } +}); + +// ../build-modules/lib/index.js +var require_lib81 = __commonJS({ + "../build-modules/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.linkBinsOfDependencies = void 0; + var path_1 = __importDefault(require("path")); + var constants_1 = require_lib7(); + var core_loggers_1 = require_lib12(); + var lifecycle_1 = require_lib80(); + var link_bins_1 = __importStar2(require_lib70()); + var logger_1 = __importDefault(require_lib6()); + var read_package_json_1 = require_lib32(); + var run_groups_1 = __importDefault(require_lib79()); + var graph_sequencer_1 = __importDefault(require_graph_sequencer()); + var filter_1 = __importDefault(require_filter3()); + exports2.default = async (depGraph, rootDepPaths, opts) => { + var _a; + const warn = (message2) => logger_1.default.warn({ message: message2, prefix: opts.lockfileDir }); + const nodesToBuild = new Set(); + getSubgraphToBuild(depGraph, rootDepPaths, nodesToBuild, new Set()); + const onlyFromBuildGraph = filter_1.default((depPath) => nodesToBuild.has(depPath)); + const nodesToBuildArray = Array.from(nodesToBuild); + const graph = new Map(nodesToBuildArray.map((depPath) => [depPath, onlyFromBuildGraph(Object.values(depGraph[depPath].children))])); + const graphSequencerResult = graph_sequencer_1.default({ + graph, + groups: [nodesToBuildArray] + }); + const chunks = graphSequencerResult.chunks; + const buildDepOpts = { ...opts, warn }; + const groups = chunks.map((chunk) => { + chunk = chunk.filter((depPath) => depGraph[depPath].requiresBuild && !depGraph[depPath].isBuilt); + if (opts.depsToBuild != null) { + chunk = chunk.filter((depPath) => opts.depsToBuild.has(depPath)); + } + return chunk.map((depPath) => async () => buildDependency(depPath, depGraph, buildDepOpts)); + }); + await run_groups_1.default((_a = opts.childConcurrency) !== null && _a !== void 0 ? _a : 4, groups); + }; + async function buildDependency(depPath, depGraph, opts) { + const depNode = depGraph[depPath]; + try { + await linkBinsOfDependencies(depNode, depGraph, opts); + const hasSideEffects = await lifecycle_1.runPostinstallHooks({ + depPath, + extraBinPaths: opts.extraBinPaths, + extraEnv: opts.extraEnv, + initCwd: opts.lockfileDir, + optional: depNode.optional, + pkgRoot: depNode.dir, + rawConfig: opts.rawConfig, + rootModulesDir: opts.rootModulesDir, + scriptShell: opts.scriptShell, + shellEmulator: opts.shellEmulator, + unsafePerm: opts.unsafePerm || false + }); + if (hasSideEffects && opts.sideEffectsCacheWrite) { + try { + await opts.storeController.upload(depNode.dir, { + engine: constants_1.ENGINE_NAME, + filesIndexFile: depNode.filesIndexFile + }); + } catch (err) { + if (err.statusCode === 403) { + logger_1.default.warn({ + message: `The store server disabled upload requests, could not upload ${depNode.dir}`, + prefix: opts.lockfileDir + }); + } else { + logger_1.default.warn({ + error: err, + message: `An error occurred while uploading ${depNode.dir}`, + prefix: opts.lockfileDir + }); + } + } + } + } catch (err) { + if (depNode.optional) { + const pkg = await read_package_json_1.fromDir(path_1.default.join(depNode.dir)); + core_loggers_1.skippedOptionalDependencyLogger.debug({ + details: err.toString(), + package: { + id: depNode.dir, + name: pkg.name, + version: pkg.version + }, + prefix: opts.lockfileDir, + reason: "build_failure" + }); + return; + } + throw err; + } + } + function getSubgraphToBuild(graph, entryNodes, nodesToBuild, walked) { + let currentShouldBeBuilt = false; + for (const depPath of entryNodes) { + if (!graph[depPath]) + continue; + if (nodesToBuild.has(depPath)) { + currentShouldBeBuilt = true; + } + if (walked.has(depPath)) + continue; + walked.add(depPath); + const childShouldBeBuilt = getSubgraphToBuild(graph, Object.values(graph[depPath].children), nodesToBuild, walked) || graph[depPath].requiresBuild; + if (childShouldBeBuilt) { + nodesToBuild.add(depPath); + currentShouldBeBuilt = true; + } + } + return currentShouldBeBuilt; + } + async function linkBinsOfDependencies(depNode, depGraph, opts) { + const childrenToLink = opts.optional ? depNode.children : Object.keys(depNode.children).reduce((nonOptionalChildren, childAlias) => { + if (!depNode.optionalDependencies.has(childAlias)) { + nonOptionalChildren[childAlias] = depNode.children[childAlias]; + } + return nonOptionalChildren; + }, {}); + const binPath = path_1.default.join(depNode.dir, "node_modules/.bin"); + const pkgNodes = [ + ...Object.entries(childrenToLink).map(([alias, childDepPath]) => ({ alias, dep: depGraph[childDepPath] })).filter(({ alias, dep }) => { + if (!dep) { + logger_1.default.debug({ message: `Failed to link bins of "${alias}" to "${binPath}". This is probably not an issue.` }); + return false; + } + return dep.hasBin && dep.installable !== false; + }).map(({ dep }) => dep), + depNode + ]; + const pkgs = await Promise.all(pkgNodes.map(async (dep) => { + var _a, _b; + return { + location: dep.dir, + manifest: (_b = await ((_a = dep.fetchingBundledManifest) === null || _a === void 0 ? void 0 : _a.call(dep))) !== null && _b !== void 0 ? _b : await read_package_json_1.fromDir(dep.dir) + }; + })); + await link_bins_1.linkBinsOfPackages(pkgs, binPath, { extendNodePath: opts.extendNodePath, warn: opts.warn }); + if (depNode.hasBundledDependencies) { + const bundledModules = path_1.default.join(depNode.dir, "node_modules"); + await link_bins_1.default(bundledModules, binPath, { extendNodePath: opts.extendNodePath, warn: opts.warn }); + } + } + exports2.linkBinsOfDependencies = linkBinsOfDependencies; + } +}); + +// ../hoist/lib/index.js +var require_lib82 = __commonJS({ + "../hoist/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var constants_1 = require_lib7(); + var link_bins_1 = __importDefault(require_lib70()); + var lockfile_utils_1 = require_lib53(); + var lockfile_walker_1 = __importDefault(require_lib54()); + var logger_1 = __importDefault(require_lib6()); + var matcher_1 = __importDefault(require_lib23()); + var symlink_dependency_1 = __importDefault(require_lib75()); + var dp = __importStar2(require_lib33()); + var hoistLogger = logger_1.default("hoist"); + async function hoistByLockfile(opts) { + var _a, _b; + if (opts.lockfile.packages == null) + return {}; + const { directDeps, step } = lockfile_walker_1.default(opts.lockfile, Object.keys(opts.lockfile.importers)); + const deps = [ + { + children: directDeps.reduce((acc, { alias, depPath }) => { + if (!acc[alias]) { + acc[alias] = depPath; + } + return acc; + }, {}), + depPath: "", + depth: -1 + }, + ...await getDependencies(step, 0) + ]; + const getAliasHoistType = createGetAliasHoistType(opts.publicHoistPattern, opts.privateHoistPattern); + const hoistedDependencies = await hoistGraph(deps, (_b = (_a = opts.lockfile.importers["."]) === null || _a === void 0 ? void 0 : _a.specifiers) !== null && _b !== void 0 ? _b : {}, { + getAliasHoistType + }); + await symlinkHoistedDependencies(hoistedDependencies, { + lockfile: opts.lockfile, + lockfileDir: opts.lockfileDir, + privateHoistedModulesDir: opts.privateHoistedModulesDir, + publicHoistedModulesDir: opts.publicHoistedModulesDir, + virtualStoreDir: opts.virtualStoreDir + }); + await linkAllBins(opts.privateHoistedModulesDir, { extendNodePath: opts.extendNodePath }); + return hoistedDependencies; + } + exports2.default = hoistByLockfile; + function createGetAliasHoistType(publicHoistPattern, privateHoistPattern) { + const publicMatcher = matcher_1.default(publicHoistPattern); + const privateMatcher = matcher_1.default(privateHoistPattern); + return (alias) => { + if (publicMatcher(alias)) + return "public"; + if (privateMatcher(alias)) + return "private"; + return false; + }; + } + async function linkAllBins(modulesDir, opts) { + const bin = path_1.default.join(modulesDir, ".bin"); + const warn = (message2, code) => { + if (code === "BINARIES_CONFLICT") + return; + logger_1.default.info({ message: message2, prefix: path_1.default.join(modulesDir, "../..") }); + }; + try { + await link_bins_1.default(modulesDir, bin, { allowExoticManifests: true, extendNodePath: opts.extendNodePath, warn }); + } catch (err) { + } + } + async function getDependencies(step, depth) { + const deps = []; + const nextSteps = []; + for (const { pkgSnapshot, depPath, next } of step.dependencies) { + const allDeps = { + ...pkgSnapshot.dependencies, + ...pkgSnapshot.optionalDependencies + }; + deps.push({ + children: Object.entries(allDeps).reduce((children, [alias, ref]) => { + children[alias] = dp.refToRelative(ref, alias); + return children; + }, {}), + depPath, + depth + }); + nextSteps.push(next()); + } + for (const depPath of step.missing) { + logger_1.default.debug({ message: `No entry for "${depPath}" in ${constants_1.WANTED_LOCKFILE}` }); + } + return (await Promise.all(nextSteps.map(async (nextStep) => getDependencies(nextStep, depth + 1)))).reduce((acc, deps2) => [...acc, ...deps2], deps); + } + async function hoistGraph(depNodes, currentSpecifiers, opts) { + const hoistedAliases = new Set(Object.keys(currentSpecifiers)); + const hoistedDependencies = {}; + depNodes.sort((a, b) => { + const depthDiff = a.depth - b.depth; + return depthDiff === 0 ? a.depPath.localeCompare(b.depPath) : depthDiff; + }).forEach((depNode) => { + for (const [childAlias, childPath] of Object.entries(depNode.children)) { + const hoist = opts.getAliasHoistType(childAlias); + if (!hoist) + continue; + const childAliasNormalized = childAlias.toLowerCase(); + if (hoistedAliases.has(childAliasNormalized)) { + continue; + } + hoistedAliases.add(childAliasNormalized); + if (!hoistedDependencies[childPath]) { + hoistedDependencies[childPath] = {}; + } + hoistedDependencies[childPath][childAlias] = hoist; + } + }); + return hoistedDependencies; + } + async function symlinkHoistedDependencies(hoistedDependencies, opts) { + await Promise.all(Object.entries(hoistedDependencies).map(async ([depPath, pkgAliases]) => { + const pkgSnapshot = opts.lockfile.packages[depPath]; + if (!pkgSnapshot) { + hoistLogger.debug({ hoistFailedFor: depPath }); + return; + } + const pkgName = lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot).name; + const modules = path_1.default.join(opts.virtualStoreDir, dp.depPathToFilename(depPath, opts.lockfileDir), "node_modules"); + const depLocation = path_1.default.join(modules, pkgName); + await Promise.all(Object.entries(pkgAliases).map(async ([pkgAlias, hoistType]) => { + const targetDir = hoistType === "public" ? opts.publicHoistedModulesDir : opts.privateHoistedModulesDir; + await symlink_dependency_1.default(depLocation, targetDir, pkgAlias); + })); + })); + } + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+pnp@2.3.2/node_modules/@yarnpkg/pnp/lib/index.js +var require_lib83 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+pnp@2.3.2/node_modules/@yarnpkg/pnp/lib/index.js"(exports2, module2) { + module2.exports = (() => { + var __webpack_modules__ = { + 862: (__unused_webpack_module, __webpack_exports__, __webpack_require__2) => { + "use strict"; + __webpack_require__2.r(__webpack_exports__); + __webpack_require__2.d(__webpack_exports__, { + "LinkType": () => LinkType, + "generateInlinedScript": () => generateInlinedScript, + "generateSplitScript": () => generateSplitScript, + "hydratePnpFile": () => hydratePnpFile, + "hydratePnpSource": () => hydratePnpSource, + "makeRuntimeApi": () => makeRuntimeApi + }); + var LinkType; + (function(LinkType2) { + LinkType2["HARD"] = "HARD"; + LinkType2["SOFT"] = "SOFT"; + })(LinkType || (LinkType = {})); + var PrettyJsonState; + (function(PrettyJsonState2) { + PrettyJsonState2["DEFAULT"] = "DEFAULT"; + PrettyJsonState2["TOP_LEVEL"] = "TOP_LEVEL"; + PrettyJsonState2["FALLBACK_EXCLUSION_LIST"] = "FALLBACK_EXCLUSION_LIST"; + PrettyJsonState2["FALLBACK_EXCLUSION_ENTRIES"] = "FALLBACK_EXCLUSION_ENTRIES"; + PrettyJsonState2["FALLBACK_EXCLUSION_DATA"] = "FALLBACK_EXCLUSION_DATA"; + PrettyJsonState2["PACKAGE_REGISTRY_DATA"] = "PACKAGE_REGISTRY_DATA"; + PrettyJsonState2["PACKAGE_REGISTRY_ENTRIES"] = "PACKAGE_REGISTRY_ENTRIES"; + PrettyJsonState2["PACKAGE_STORE_DATA"] = "PACKAGE_STORE_DATA"; + PrettyJsonState2["PACKAGE_STORE_ENTRIES"] = "PACKAGE_STORE_ENTRIES"; + PrettyJsonState2["PACKAGE_INFORMATION_DATA"] = "PACKAGE_INFORMATION_DATA"; + PrettyJsonState2["PACKAGE_DEPENDENCIES"] = "PACKAGE_DEPENDENCIES"; + PrettyJsonState2["PACKAGE_DEPENDENCY"] = "PACKAGE_DEPENDENCY"; + })(PrettyJsonState || (PrettyJsonState = {})); + const prettyJsonMachine = { + [PrettyJsonState.DEFAULT]: { + collapsed: false, + next: { + [`*`]: PrettyJsonState.DEFAULT + } + }, + [PrettyJsonState.TOP_LEVEL]: { + collapsed: false, + next: { + [`fallbackExclusionList`]: PrettyJsonState.FALLBACK_EXCLUSION_LIST, + [`packageRegistryData`]: PrettyJsonState.PACKAGE_REGISTRY_DATA, + [`*`]: PrettyJsonState.DEFAULT + } + }, + [PrettyJsonState.FALLBACK_EXCLUSION_LIST]: { + collapsed: false, + next: { + [`*`]: PrettyJsonState.FALLBACK_EXCLUSION_ENTRIES + } + }, + [PrettyJsonState.FALLBACK_EXCLUSION_ENTRIES]: { + collapsed: true, + next: { + [`*`]: PrettyJsonState.FALLBACK_EXCLUSION_DATA + } + }, + [PrettyJsonState.FALLBACK_EXCLUSION_DATA]: { + collapsed: true, + next: { + [`*`]: PrettyJsonState.DEFAULT + } + }, + [PrettyJsonState.PACKAGE_REGISTRY_DATA]: { + collapsed: false, + next: { + [`*`]: PrettyJsonState.PACKAGE_REGISTRY_ENTRIES + } + }, + [PrettyJsonState.PACKAGE_REGISTRY_ENTRIES]: { + collapsed: true, + next: { + [`*`]: PrettyJsonState.PACKAGE_STORE_DATA + } + }, + [PrettyJsonState.PACKAGE_STORE_DATA]: { + collapsed: false, + next: { + [`*`]: PrettyJsonState.PACKAGE_STORE_ENTRIES + } + }, + [PrettyJsonState.PACKAGE_STORE_ENTRIES]: { + collapsed: true, + next: { + [`*`]: PrettyJsonState.PACKAGE_INFORMATION_DATA + } + }, + [PrettyJsonState.PACKAGE_INFORMATION_DATA]: { + collapsed: false, + next: { + [`packageDependencies`]: PrettyJsonState.PACKAGE_DEPENDENCIES, + [`*`]: PrettyJsonState.DEFAULT + } + }, + [PrettyJsonState.PACKAGE_DEPENDENCIES]: { + collapsed: false, + next: { + [`*`]: PrettyJsonState.PACKAGE_DEPENDENCY + } + }, + [PrettyJsonState.PACKAGE_DEPENDENCY]: { + collapsed: true, + next: { + [`*`]: PrettyJsonState.DEFAULT + } + } + }; + function generateCollapsedArray(data, state, indent) { + let result = ``; + result += `[`; + for (let t = 0, T = data.length; t < T; ++t) { + result += generateNext(String(t), data[t], state, indent).replace(/^ +/g, ``); + if (t + 1 < T) { + result += `, `; + } + } + result += `]`; + return result; + } + function generateExpandedArray(data, state, indent) { + const nextIndent = `${indent} `; + let result = ``; + result += indent; + result += `[ +`; + for (let t = 0, T = data.length; t < T; ++t) { + result += nextIndent + generateNext(String(t), data[t], state, nextIndent).replace(/^ +/, ``); + if (t + 1 < T) + result += `,`; + result += ` +`; + } + result += indent; + result += `]`; + return result; + } + function generateCollapsedObject(data, state, indent) { + const keys = Object.keys(data); + let result = ``; + result += `{`; + for (let t = 0, T = keys.length; t < T; ++t) { + const key = keys[t]; + const value = data[key]; + if (typeof value === `undefined`) + continue; + result += JSON.stringify(key); + result += `: `; + result += generateNext(key, value, state, indent).replace(/^ +/g, ``); + if (t + 1 < T) { + result += `, `; + } + } + result += `}`; + return result; + } + function generateExpandedObject(data, state, indent) { + const keys = Object.keys(data); + const nextIndent = `${indent} `; + let result = ``; + result += indent; + result += `{ +`; + for (let t = 0, T = keys.length; t < T; ++t) { + const key = keys[t]; + const value = data[key]; + if (typeof value === `undefined`) + continue; + result += nextIndent; + result += JSON.stringify(key); + result += `: `; + result += generateNext(key, value, state, nextIndent).replace(/^ +/g, ``); + if (t + 1 < T) + result += `,`; + result += ` +`; + } + result += indent; + result += `}`; + return result; + } + function generateNext(key, data, state, indent) { + const { + next + } = prettyJsonMachine[state]; + const nextState = next[key] || next[`*`]; + return generate(data, nextState, indent); + } + function generate(data, state, indent) { + const { + collapsed + } = prettyJsonMachine[state]; + if (Array.isArray(data)) { + if (collapsed) { + return generateCollapsedArray(data, state, indent); + } else { + return generateExpandedArray(data, state, indent); + } + } + if (typeof data === `object` && data !== null) { + if (collapsed) { + return generateCollapsedObject(data, state, indent); + } else { + return generateExpandedObject(data, state, indent); + } + } + return JSON.stringify(data); + } + function generatePrettyJson(data) { + return generate(data, PrettyJsonState.TOP_LEVEL, ``); + } + function sortMap(values, mappers) { + const asArray = Array.from(values); + if (!Array.isArray(mappers)) + mappers = [mappers]; + const stringified = []; + for (const mapper of mappers) + stringified.push(asArray.map((value) => mapper(value))); + const indices = asArray.map((_, index) => index); + indices.sort((a, b) => { + for (const layer of stringified) { + const comparison = layer[a] < layer[b] ? -1 : layer[a] > layer[b] ? 1 : 0; + if (comparison !== 0) { + return comparison; + } + } + return 0; + }); + return indices.map((index) => { + return asArray[index]; + }); + } + function generateFallbackExclusionList(settings) { + const fallbackExclusionList = new Map(); + const sortedData = sortMap(settings.fallbackExclusionList || [], [({ + name, + reference + }) => name, ({ + name, + reference + }) => reference]); + for (const { + name, + reference + } of sortedData) { + let references = fallbackExclusionList.get(name); + if (typeof references === `undefined`) + fallbackExclusionList.set(name, references = new Set()); + references.add(reference); + } + return Array.from(fallbackExclusionList).map(([name, references]) => { + return [name, Array.from(references)]; + }); + } + function generateFallbackPoolData(settings) { + return sortMap(settings.fallbackPool || [], ([name]) => name); + } + function generatePackageRegistryData(settings) { + const packageRegistryData = []; + for (const [packageName, packageStore] of sortMap(settings.packageRegistry, ([packageName2]) => packageName2 === null ? `0` : `1${packageName2}`)) { + const packageStoreData = []; + packageRegistryData.push([packageName, packageStoreData]); + for (const [packageReference, { + packageLocation, + packageDependencies, + packagePeers, + linkType, + discardFromLookup + }] of sortMap(packageStore, ([packageReference2]) => packageReference2 === null ? `0` : `1${packageReference2}`)) { + const normalizedDependencies = []; + if (packageName !== null && packageReference !== null && !packageDependencies.has(packageName)) + normalizedDependencies.push([packageName, packageReference]); + for (const [dependencyName, dependencyReference] of sortMap(packageDependencies.entries(), ([dependencyName2]) => dependencyName2)) + normalizedDependencies.push([dependencyName, dependencyReference]); + const normalizedPeers = packagePeers && packagePeers.size > 0 ? Array.from(packagePeers) : void 0; + const normalizedDiscardFromLookup = discardFromLookup ? discardFromLookup : void 0; + packageStoreData.push([packageReference, { + packageLocation, + packageDependencies: normalizedDependencies, + packagePeers: normalizedPeers, + linkType, + discardFromLookup: normalizedDiscardFromLookup + }]); + } + } + return packageRegistryData; + } + function generateLocationBlacklistData(settings) { + return sortMap(settings.blacklistedLocations || [], (location) => location); + } + function generateSerializedState(settings) { + return { + __info: [`This file is automatically generated. Do not touch it, or risk`, `your modifications being lost. We also recommend you not to read`, `it either without using the @yarnpkg/pnp package, as the data layout`, `is entirely unspecified and WILL change from a version to another.`], + dependencyTreeRoots: settings.dependencyTreeRoots, + enableTopLevelFallback: settings.enableTopLevelFallback || false, + ignorePatternData: settings.ignorePattern || null, + fallbackExclusionList: generateFallbackExclusionList(settings), + fallbackPool: generateFallbackPoolData(settings), + locationBlacklistData: generateLocationBlacklistData(settings), + packageRegistryData: generatePackageRegistryData(settings) + }; + } + var hook = __webpack_require__2(650); + var hook_default = /* @__PURE__ */ __webpack_require__2.n(hook); + function generateLoader(shebang, loader) { + return [shebang ? `${shebang} +` : ``, `/* eslint-disable */ + +`, `try { +`, ` Object.freeze({}).detectStrictMode = true; +`, `} catch (error) { +`, ` throw new Error(\`The whole PnP file got strict-mode-ified, which is known to break (Emscripten libraries aren't strict mode). This usually happens when the file goes through Babel.\`); +`, `} +`, ` +`, `var __non_webpack_module__ = module; +`, ` +`, `function $$SETUP_STATE(hydrateRuntimeState, basePath) { +`, loader.replace(/^/gm, ` `), `} +`, ` +`, hook_default()()].join(``); + } + function generateJsonString(data) { + return JSON.stringify(data, null, 2); + } + function generateInlinedSetup(data) { + return [`return hydrateRuntimeState(${generatePrettyJson(data)}, {basePath: basePath || __dirname}); +`].join(``); + } + function generateSplitSetup(dataLocation) { + return [`var path = require('path'); +`, `var dataLocation = path.resolve(__dirname, ${JSON.stringify(dataLocation)}); +`, `return hydrateRuntimeState(require(dataLocation), {basePath: basePath || path.dirname(dataLocation)}); +`].join(``); + } + function generateInlinedScript(settings) { + const data = generateSerializedState(settings); + const setup = generateInlinedSetup(data); + const loaderFile = generateLoader(settings.shebang, setup); + return loaderFile; + } + function generateSplitScript(settings) { + const data = generateSerializedState(settings); + const setup = generateSplitSetup(settings.dataLocation); + const loaderFile = generateLoader(settings.shebang, setup); + return { + dataFile: generateJsonString(data), + loaderFile + }; + } + const external_fs_namespaceObject = require("fs"); + ; + var external_fs_default = /* @__PURE__ */ __webpack_require__2.n(external_fs_namespaceObject); + const external_path_namespaceObject = require("path"); + ; + var external_path_default = /* @__PURE__ */ __webpack_require__2.n(external_path_namespaceObject); + const external_util_namespaceObject = require("util"); + ; + var PathType; + (function(PathType2) { + PathType2[PathType2["File"] = 0] = "File"; + PathType2[PathType2["Portable"] = 1] = "Portable"; + PathType2[PathType2["Native"] = 2] = "Native"; + })(PathType || (PathType = {})); + const PortablePath = { + root: `/`, + dot: `.` + }; + const Filename = { + nodeModules: `node_modules`, + manifest: `package.json`, + lockfile: `yarn.lock`, + pnpJs: `.pnp.js`, + rc: `.yarnrc.yml` + }; + const npath = Object.create(external_path_default()); + const ppath = Object.create(external_path_default().posix); + npath.cwd = () => process.cwd(); + ppath.cwd = () => toPortablePath(process.cwd()); + ppath.resolve = (...segments) => { + if (segments.length > 0 && ppath.isAbsolute(segments[0])) { + return external_path_default().posix.resolve(...segments); + } else { + return external_path_default().posix.resolve(ppath.cwd(), ...segments); + } + }; + const contains = function(pathUtils, from, to) { + from = pathUtils.normalize(from); + to = pathUtils.normalize(to); + if (from === to) + return `.`; + if (!from.endsWith(pathUtils.sep)) + from = from + pathUtils.sep; + if (to.startsWith(from)) { + return to.slice(from.length); + } else { + return null; + } + }; + npath.fromPortablePath = fromPortablePath; + npath.toPortablePath = toPortablePath; + npath.contains = (from, to) => contains(npath, from, to); + ppath.contains = (from, to) => contains(ppath, from, to); + const WINDOWS_PATH_REGEXP = /^([a-zA-Z]:.*)$/; + const UNC_WINDOWS_PATH_REGEXP = /^\\\\(\.\\)?(.*)$/; + const PORTABLE_PATH_REGEXP = /^\/([a-zA-Z]:.*)$/; + const UNC_PORTABLE_PATH_REGEXP = /^\/unc\/(\.dot\/)?(.*)$/; + function fromPortablePath(p) { + if (process.platform !== `win32`) + return p; + if (p.match(PORTABLE_PATH_REGEXP)) + p = p.replace(PORTABLE_PATH_REGEXP, `$1`); + else if (p.match(UNC_PORTABLE_PATH_REGEXP)) + p = p.replace(UNC_PORTABLE_PATH_REGEXP, (match, p1, p2) => `\\\\${p1 ? `.\\` : ``}${p2}`); + else + return p; + return p.replace(/\//g, `\\`); + } + function toPortablePath(p) { + if (process.platform !== `win32`) + return p; + if (p.match(WINDOWS_PATH_REGEXP)) + p = p.replace(WINDOWS_PATH_REGEXP, `/$1`); + else if (p.match(UNC_WINDOWS_PATH_REGEXP)) + p = p.replace(UNC_WINDOWS_PATH_REGEXP, (match, p1, p2) => `/unc/${p1 ? `.dot/` : ``}${p2}`); + return p.replace(/\\/g, `/`); + } + function convertPath(targetPathUtils, sourcePath) { + return targetPathUtils === npath ? fromPortablePath(sourcePath) : toPortablePath(sourcePath); + } + function toFilename(filename) { + if (npath.parse(filename).dir !== `` || ppath.parse(filename).dir !== ``) + throw new Error(`Invalid filename: "${filename}"`); + return filename; + } + function hydrateRuntimeState(data, { + basePath: basePath2 + }) { + const portablePath = npath.toPortablePath(basePath2); + const absolutePortablePath = ppath.resolve(portablePath); + const ignorePattern = data.ignorePatternData !== null ? new RegExp(data.ignorePatternData) : null; + const packageRegistry = new Map(data.packageRegistryData.map(([packageName, packageStoreData]) => { + return [packageName, new Map(packageStoreData.map(([packageReference, packageInformationData]) => { + return [packageReference, { + packageLocation: ppath.join(absolutePortablePath, packageInformationData.packageLocation), + packageDependencies: new Map(packageInformationData.packageDependencies), + packagePeers: new Set(packageInformationData.packagePeers), + linkType: packageInformationData.linkType, + discardFromLookup: packageInformationData.discardFromLookup || false + }]; + }))]; + })); + const packageLocatorsByLocations = new Map(); + const packageLocationLengths = new Set(); + for (const [packageName, storeData] of data.packageRegistryData) { + for (const [packageReference, packageInformationData] of storeData) { + if (packageName === null !== (packageReference === null)) + throw new Error(`Assertion failed: The name and reference should be null, or neither should`); + if (packageInformationData.discardFromLookup) + continue; + const packageLocator = { + name: packageName, + reference: packageReference + }; + packageLocatorsByLocations.set(packageInformationData.packageLocation, packageLocator); + packageLocationLengths.add(packageInformationData.packageLocation.length); + } + } + for (const location of data.locationBlacklistData) + packageLocatorsByLocations.set(location, null); + const fallbackExclusionList = new Map(data.fallbackExclusionList.map(([packageName, packageReferences]) => { + return [packageName, new Set(packageReferences)]; + })); + const fallbackPool = new Map(data.fallbackPool); + const dependencyTreeRoots = data.dependencyTreeRoots; + const enableTopLevelFallback = data.enableTopLevelFallback; + return { + basePath: portablePath, + dependencyTreeRoots, + enableTopLevelFallback, + fallbackExclusionList, + fallbackPool, + ignorePattern, + packageLocationLengths: [...packageLocationLengths].sort((a, b) => b - a), + packageLocatorsByLocations, + packageRegistry + }; + } + const external_os_namespaceObject = require("os"); + ; + const defaultTime = new Date(315532800 * 1e3); + async function copyPromise(destinationFs, destination, sourceFs, source, opts) { + const normalizedDestination = destinationFs.pathUtils.normalize(destination); + const normalizedSource = sourceFs.pathUtils.normalize(source); + const prelayout = []; + const postlayout = []; + await destinationFs.mkdirPromise(destinationFs.pathUtils.dirname(destination), { + recursive: true + }); + const updateTime = typeof destinationFs.lutimesPromise === `function` ? destinationFs.lutimesPromise.bind(destinationFs) : destinationFs.utimesPromise.bind(destinationFs); + await copyImpl(prelayout, postlayout, updateTime, destinationFs, normalizedDestination, sourceFs, normalizedSource, opts); + for (const operation of prelayout) + await operation(); + await Promise.all(postlayout.map((operation) => { + return operation(); + })); + } + async function copyImpl(prelayout, postlayout, updateTime, destinationFs, destination, sourceFs, source, opts) { + var _a, _b; + const destinationStat = await maybeLStat(destinationFs, destination); + const sourceStat = await sourceFs.lstatPromise(source); + const referenceTime = opts.stableTime ? { + mtime: defaultTime, + atime: defaultTime + } : sourceStat; + let updated; + switch (true) { + case sourceStat.isDirectory(): + { + updated = await copyFolder(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts); + } + break; + case sourceStat.isFile(): + { + updated = await copyFile(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts); + } + break; + case sourceStat.isSymbolicLink(): + { + updated = await copySymlink(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts); + } + break; + default: + { + throw new Error(`Unsupported file type (${sourceStat.mode})`); + } + break; + } + if (updated || ((_a = destinationStat === null || destinationStat === void 0 ? void 0 : destinationStat.mtime) === null || _a === void 0 ? void 0 : _a.getTime()) !== referenceTime.mtime.getTime() || ((_b = destinationStat === null || destinationStat === void 0 ? void 0 : destinationStat.atime) === null || _b === void 0 ? void 0 : _b.getTime()) !== referenceTime.atime.getTime()) { + postlayout.push(() => updateTime(destination, referenceTime.atime, referenceTime.mtime)); + updated = true; + } + if (destinationStat === null || (destinationStat.mode & 511) !== (sourceStat.mode & 511)) { + postlayout.push(() => destinationFs.chmodPromise(destination, sourceStat.mode & 511)); + updated = true; + } + return updated; + } + async function maybeLStat(baseFs, p) { + try { + return await baseFs.lstatPromise(p); + } catch (e) { + return null; + } + } + async function copyFolder(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts) { + if (destinationStat !== null && !destinationStat.isDirectory()) { + if (opts.overwrite) { + prelayout.push(async () => destinationFs.removePromise(destination)); + destinationStat = null; + } else { + return false; + } + } + let updated = false; + if (destinationStat === null) { + prelayout.push(async () => destinationFs.mkdirPromise(destination, { + mode: sourceStat.mode + })); + updated = true; + } + const entries = await sourceFs.readdirPromise(source); + if (opts.stableSort) { + for (const entry of entries.sort()) { + if (await copyImpl(prelayout, postlayout, updateTime, destinationFs, destinationFs.pathUtils.join(destination, entry), sourceFs, sourceFs.pathUtils.join(source, entry), opts)) { + updated = true; + } + } + } else { + const entriesUpdateStatus = await Promise.all(entries.map(async (entry) => { + await copyImpl(prelayout, postlayout, updateTime, destinationFs, destinationFs.pathUtils.join(destination, entry), sourceFs, sourceFs.pathUtils.join(source, entry), opts); + })); + if (entriesUpdateStatus.some((status) => status)) { + updated = true; + } + } + return updated; + } + async function copyFile(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts) { + if (destinationStat !== null) { + if (opts.overwrite) { + prelayout.push(async () => destinationFs.removePromise(destination)); + destinationStat = null; + } else { + return false; + } + } + const op = destinationFs === sourceFs ? async () => destinationFs.copyFilePromise(source, destination, external_fs_default().constants.COPYFILE_FICLONE) : async () => destinationFs.writeFilePromise(destination, await sourceFs.readFilePromise(source)); + prelayout.push(async () => op()); + return true; + } + async function copySymlink(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts) { + if (destinationStat !== null) { + if (opts.overwrite) { + prelayout.push(async () => destinationFs.removePromise(destination)); + destinationStat = null; + } else { + return false; + } + } + prelayout.push(async () => { + await destinationFs.symlinkPromise(convertPath(destinationFs.pathUtils, await sourceFs.readlinkPromise(source)), destination); + }); + return true; + } + class FakeFS { + constructor(pathUtils) { + this.pathUtils = pathUtils; + } + async *genTraversePromise(init, { + stableSort = false + } = {}) { + const stack2 = [init]; + while (stack2.length > 0) { + const p = stack2.shift(); + const entry = await this.lstatPromise(p); + if (entry.isDirectory()) { + const entries = await this.readdirPromise(p); + if (stableSort) { + for (const entry2 of entries.sort()) { + stack2.push(this.pathUtils.join(p, entry2)); + } + } else { + throw new Error(`Not supported`); + } + } else { + yield p; + } + } + } + async removePromise(p, { + recursive = true, + maxRetries = 5 + } = {}) { + let stat; + try { + stat = await this.lstatPromise(p); + } catch (error) { + if (error.code === `ENOENT`) { + return; + } else { + throw error; + } + } + if (stat.isDirectory()) { + if (recursive) + for (const entry of await this.readdirPromise(p)) + await this.removePromise(this.pathUtils.resolve(p, entry)); + let t = 0; + do { + try { + await this.rmdirPromise(p); + break; + } catch (error) { + if (error.code === `EBUSY` || error.code === `ENOTEMPTY`) { + if (maxRetries === 0) { + break; + } else { + await new Promise((resolve) => setTimeout(resolve, t * 100)); + continue; + } + } else { + throw error; + } + } + } while (t++ < maxRetries); + } else { + await this.unlinkPromise(p); + } + } + removeSync(p, { + recursive = true + } = {}) { + let stat; + try { + stat = this.lstatSync(p); + } catch (error) { + if (error.code === `ENOENT`) { + return; + } else { + throw error; + } + } + if (stat.isDirectory()) { + if (recursive) + for (const entry of this.readdirSync(p)) + this.removeSync(this.pathUtils.resolve(p, entry)); + this.rmdirSync(p); + } else { + this.unlinkSync(p); + } + } + async mkdirpPromise(p, { + chmod, + utimes + } = {}) { + p = this.resolve(p); + if (p === this.pathUtils.dirname(p)) + return; + const parts = p.split(this.pathUtils.sep); + for (let u = 2; u <= parts.length; ++u) { + const subPath = parts.slice(0, u).join(this.pathUtils.sep); + if (!this.existsSync(subPath)) { + try { + await this.mkdirPromise(subPath); + } catch (error) { + if (error.code === `EEXIST`) { + continue; + } else { + throw error; + } + } + if (chmod != null) + await this.chmodPromise(subPath, chmod); + if (utimes != null) { + await this.utimesPromise(subPath, utimes[0], utimes[1]); + } else { + const parentStat = await this.statPromise(this.pathUtils.dirname(subPath)); + await this.utimesPromise(subPath, parentStat.atime, parentStat.mtime); + } + } + } + } + mkdirpSync(p, { + chmod, + utimes + } = {}) { + p = this.resolve(p); + if (p === this.pathUtils.dirname(p)) + return; + const parts = p.split(this.pathUtils.sep); + for (let u = 2; u <= parts.length; ++u) { + const subPath = parts.slice(0, u).join(this.pathUtils.sep); + if (!this.existsSync(subPath)) { + try { + this.mkdirSync(subPath); + } catch (error) { + if (error.code === `EEXIST`) { + continue; + } else { + throw error; + } + } + if (chmod != null) + this.chmodSync(subPath, chmod); + if (utimes != null) { + this.utimesSync(subPath, utimes[0], utimes[1]); + } else { + const parentStat = this.statSync(this.pathUtils.dirname(subPath)); + this.utimesSync(subPath, parentStat.atime, parentStat.mtime); + } + } + } + } + async copyPromise(destination, source, { + baseFs = this, + overwrite = true, + stableSort = false, + stableTime = false + } = {}) { + return await copyPromise(this, destination, baseFs, source, { + overwrite, + stableSort, + stableTime + }); + } + copySync(destination, source, { + baseFs = this, + overwrite = true + } = {}) { + const stat = baseFs.lstatSync(source); + const exists = this.existsSync(destination); + if (stat.isDirectory()) { + this.mkdirpSync(destination); + const directoryListing = baseFs.readdirSync(source); + for (const entry of directoryListing) { + this.copySync(this.pathUtils.join(destination, entry), baseFs.pathUtils.join(source, entry), { + baseFs, + overwrite + }); + } + } else if (stat.isFile()) { + if (!exists || overwrite) { + if (exists) + this.removeSync(destination); + const content = baseFs.readFileSync(source); + this.writeFileSync(destination, content); + } + } else if (stat.isSymbolicLink()) { + if (!exists || overwrite) { + if (exists) + this.removeSync(destination); + const target = baseFs.readlinkSync(source); + this.symlinkSync(convertPath(this.pathUtils, target), destination); + } + } else { + throw new Error(`Unsupported file type (file: ${source}, mode: 0o${stat.mode.toString(8).padStart(6, `0`)})`); + } + const mode = stat.mode & 511; + this.chmodSync(destination, mode); + } + async changeFilePromise(p, content, opts = {}) { + if (Buffer.isBuffer(content)) { + return this.changeFileBufferPromise(p, content); + } else { + return this.changeFileTextPromise(p, content, opts); + } + } + async changeFileBufferPromise(p, content) { + let current = Buffer.alloc(0); + try { + current = await this.readFilePromise(p); + } catch (error) { + } + if (Buffer.compare(current, content) === 0) + return; + await this.writeFilePromise(p, content); + } + async changeFileTextPromise(p, content, { + automaticNewlines + } = {}) { + let current = ``; + try { + current = await this.readFilePromise(p, `utf8`); + } catch (error) { + } + const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; + if (current === normalizedContent) + return; + await this.writeFilePromise(p, normalizedContent); + } + changeFileSync(p, content, opts = {}) { + if (Buffer.isBuffer(content)) { + return this.changeFileBufferSync(p, content); + } else { + return this.changeFileTextSync(p, content, opts); + } + } + changeFileBufferSync(p, content) { + let current = Buffer.alloc(0); + try { + current = this.readFileSync(p); + } catch (error) { + } + if (Buffer.compare(current, content) === 0) + return; + this.writeFileSync(p, content); + } + changeFileTextSync(p, content, { + automaticNewlines = false + } = {}) { + let current = ``; + try { + current = this.readFileSync(p, `utf8`); + } catch (error) { + } + const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; + if (current === normalizedContent) + return; + this.writeFileSync(p, normalizedContent); + } + async movePromise(fromP, toP) { + try { + await this.renamePromise(fromP, toP); + } catch (error) { + if (error.code === `EXDEV`) { + await this.copyPromise(toP, fromP); + await this.removePromise(fromP); + } else { + throw error; + } + } + } + moveSync(fromP, toP) { + try { + this.renameSync(fromP, toP); + } catch (error) { + if (error.code === `EXDEV`) { + this.copySync(toP, fromP); + this.removeSync(fromP); + } else { + throw error; + } + } + } + async lockPromise(affectedPath, callback) { + const lockPath = `${affectedPath}.flock`; + const interval = 1e3 / 60; + const startTime = Date.now(); + let fd = null; + const isAlive = async () => { + let pid; + try { + [pid] = await this.readJsonPromise(lockPath); + } catch (error) { + return Date.now() - startTime < 500; + } + try { + process.kill(pid, 0); + return true; + } catch (error) { + return false; + } + }; + while (fd === null) { + try { + fd = await this.openPromise(lockPath, `wx`); + } catch (error) { + if (error.code === `EEXIST`) { + if (!await isAlive()) { + try { + await this.unlinkPromise(lockPath); + continue; + } catch (error2) { + } + } + if (Date.now() - startTime < 60 * 1e3) { + await new Promise((resolve) => setTimeout(resolve, interval)); + } else { + throw new Error(`Couldn't acquire a lock in a reasonable time (via ${lockPath})`); + } + } else { + throw error; + } + } + } + await this.writePromise(fd, JSON.stringify([process.pid])); + try { + return await callback(); + } finally { + try { + await this.closePromise(fd); + await this.unlinkPromise(lockPath); + } catch (error) { + } + } + } + async readJsonPromise(p) { + const content = await this.readFilePromise(p, `utf8`); + try { + return JSON.parse(content); + } catch (error) { + error.message += ` (in ${p})`; + throw error; + } + } + readJsonSync(p) { + const content = this.readFileSync(p, `utf8`); + try { + return JSON.parse(content); + } catch (error) { + error.message += ` (in ${p})`; + throw error; + } + } + async writeJsonPromise(p, data) { + return await this.writeFilePromise(p, `${JSON.stringify(data, null, 2)} +`); + } + writeJsonSync(p, data) { + return this.writeFileSync(p, `${JSON.stringify(data, null, 2)} +`); + } + async preserveTimePromise(p, cb) { + const stat = await this.lstatPromise(p); + const result = await cb(); + if (typeof result !== `undefined`) + p = result; + if (this.lutimesPromise) { + await this.lutimesPromise(p, stat.atime, stat.mtime); + } else if (!stat.isSymbolicLink()) { + await this.utimesPromise(p, stat.atime, stat.mtime); + } + } + async preserveTimeSync(p, cb) { + const stat = this.lstatSync(p); + const result = cb(); + if (typeof result !== `undefined`) + p = result; + if (this.lutimesSync) { + this.lutimesSync(p, stat.atime, stat.mtime); + } else if (!stat.isSymbolicLink()) { + this.utimesSync(p, stat.atime, stat.mtime); + } + } + } + FakeFS.DEFAULT_TIME = 315532800; + class BasePortableFakeFS extends FakeFS { + constructor() { + super(ppath); + } + } + function getEndOfLine(content) { + const matches = content.match(/\r?\n/g); + if (matches === null) + return external_os_namespaceObject.EOL; + const crlf = matches.filter((nl) => nl === `\r +`).length; + const lf = matches.length - crlf; + return crlf > lf ? `\r +` : ` +`; + } + function normalizeLineEndings(originalContent, newContent) { + return newContent.replace(/\r?\n/g, getEndOfLine(originalContent)); + } + function makeError(code, message2) { + return Object.assign(new Error(`${code}: ${message2}`), { + code + }); + } + function EBUSY(message2) { + return makeError(`EBUSY`, message2); + } + function ENOSYS(message2, reason) { + return makeError(`ENOSYS`, `${message2}, ${reason}`); + } + function EINVAL(reason) { + return makeError(`EINVAL`, `invalid argument, ${reason}`); + } + function EBADF(reason) { + return makeError(`EBADF`, `bad file descriptor, ${reason}`); + } + function ENOENT(reason) { + return makeError(`ENOENT`, `no such file or directory, ${reason}`); + } + function ENOTDIR(reason) { + return makeError(`ENOTDIR`, `not a directory, ${reason}`); + } + function EISDIR(reason) { + return makeError(`EISDIR`, `illegal operation on a directory, ${reason}`); + } + function EEXIST(reason) { + return makeError(`EEXIST`, `file already exists, ${reason}`); + } + function EROFS(reason) { + return makeError(`EROFS`, `read-only filesystem, ${reason}`); + } + function ENOTEMPTY(reason) { + return makeError(`ENOTEMPTY`, `directory not empty, ${reason}`); + } + function EOPNOTSUPP(reason) { + return makeError(`EOPNOTSUPP`, `operation not supported, ${reason}`); + } + function ERR_DIR_CLOSED() { + return makeError(`ERR_DIR_CLOSED`, `Directory handle was closed`); + } + class LibzipError extends Error { + constructor(message2, code) { + super(message2); + this.name = `Libzip Error`; + this.code = code; + } + } + class NodeFS extends BasePortableFakeFS { + constructor(realFs = external_fs_default()) { + super(); + this.realFs = realFs; + if (typeof this.realFs.lutimes !== `undefined`) { + this.lutimesPromise = this.lutimesPromiseImpl; + this.lutimesSync = this.lutimesSyncImpl; + } + } + getExtractHint() { + return false; + } + getRealPath() { + return PortablePath.root; + } + resolve(p) { + return ppath.resolve(p); + } + async openPromise(p, flags, mode) { + return await new Promise((resolve, reject) => { + this.realFs.open(npath.fromPortablePath(p), flags, mode, this.makeCallback(resolve, reject)); + }); + } + openSync(p, flags, mode) { + return this.realFs.openSync(npath.fromPortablePath(p), flags, mode); + } + async opendirPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (typeof opts !== `undefined`) { + this.realFs.opendir(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.opendir(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + } + }).then((dir) => { + return Object.defineProperty(dir, `path`, { + value: p, + configurable: true, + writable: true + }); + }); + } + opendirSync(p, opts) { + const dir = typeof opts !== `undefined` ? this.realFs.opendirSync(npath.fromPortablePath(p), opts) : this.realFs.opendirSync(npath.fromPortablePath(p)); + return Object.defineProperty(dir, `path`, { + value: p, + configurable: true, + writable: true + }); + } + async readPromise(fd, buffer, offset = 0, length = 0, position = -1) { + return await new Promise((resolve, reject) => { + this.realFs.read(fd, buffer, offset, length, position, (error, bytesRead) => { + if (error) { + reject(error); + } else { + resolve(bytesRead); + } + }); + }); + } + readSync(fd, buffer, offset, length, position) { + return this.realFs.readSync(fd, buffer, offset, length, position); + } + async writePromise(fd, buffer, offset, length, position) { + return await new Promise((resolve, reject) => { + if (typeof buffer === `string`) { + return this.realFs.write(fd, buffer, offset, this.makeCallback(resolve, reject)); + } else { + return this.realFs.write(fd, buffer, offset, length, position, this.makeCallback(resolve, reject)); + } + }); + } + writeSync(fd, buffer, offset, length, position) { + if (typeof buffer === `string`) { + return this.realFs.writeSync(fd, buffer, offset); + } else { + return this.realFs.writeSync(fd, buffer, offset, length, position); + } + } + async closePromise(fd) { + await new Promise((resolve, reject) => { + this.realFs.close(fd, this.makeCallback(resolve, reject)); + }); + } + closeSync(fd) { + this.realFs.closeSync(fd); + } + createReadStream(p, opts) { + const realPath = p !== null ? npath.fromPortablePath(p) : p; + return this.realFs.createReadStream(realPath, opts); + } + createWriteStream(p, opts) { + const realPath = p !== null ? npath.fromPortablePath(p) : p; + return this.realFs.createWriteStream(realPath, opts); + } + async realpathPromise(p) { + return await new Promise((resolve, reject) => { + this.realFs.realpath(npath.fromPortablePath(p), {}, this.makeCallback(resolve, reject)); + }).then((path) => { + return npath.toPortablePath(path); + }); + } + realpathSync(p) { + return npath.toPortablePath(this.realFs.realpathSync(npath.fromPortablePath(p), {})); + } + async existsPromise(p) { + return await new Promise((resolve) => { + this.realFs.exists(npath.fromPortablePath(p), resolve); + }); + } + accessSync(p, mode) { + return this.realFs.accessSync(npath.fromPortablePath(p), mode); + } + async accessPromise(p, mode) { + return await new Promise((resolve, reject) => { + this.realFs.access(npath.fromPortablePath(p), mode, this.makeCallback(resolve, reject)); + }); + } + existsSync(p) { + return this.realFs.existsSync(npath.fromPortablePath(p)); + } + async statPromise(p) { + return await new Promise((resolve, reject) => { + this.realFs.stat(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + }); + } + statSync(p) { + return this.realFs.statSync(npath.fromPortablePath(p)); + } + async lstatPromise(p) { + return await new Promise((resolve, reject) => { + this.realFs.lstat(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + }); + } + lstatSync(p) { + return this.realFs.lstatSync(npath.fromPortablePath(p)); + } + async chmodPromise(p, mask) { + return await new Promise((resolve, reject) => { + this.realFs.chmod(npath.fromPortablePath(p), mask, this.makeCallback(resolve, reject)); + }); + } + chmodSync(p, mask) { + return this.realFs.chmodSync(npath.fromPortablePath(p), mask); + } + async chownPromise(p, uid, gid) { + return await new Promise((resolve, reject) => { + this.realFs.chown(npath.fromPortablePath(p), uid, gid, this.makeCallback(resolve, reject)); + }); + } + chownSync(p, uid, gid) { + return this.realFs.chownSync(npath.fromPortablePath(p), uid, gid); + } + async renamePromise(oldP, newP) { + return await new Promise((resolve, reject) => { + this.realFs.rename(npath.fromPortablePath(oldP), npath.fromPortablePath(newP), this.makeCallback(resolve, reject)); + }); + } + renameSync(oldP, newP) { + return this.realFs.renameSync(npath.fromPortablePath(oldP), npath.fromPortablePath(newP)); + } + async copyFilePromise(sourceP, destP, flags = 0) { + return await new Promise((resolve, reject) => { + this.realFs.copyFile(npath.fromPortablePath(sourceP), npath.fromPortablePath(destP), flags, this.makeCallback(resolve, reject)); + }); + } + copyFileSync(sourceP, destP, flags = 0) { + return this.realFs.copyFileSync(npath.fromPortablePath(sourceP), npath.fromPortablePath(destP), flags); + } + async appendFilePromise(p, content, opts) { + return await new Promise((resolve, reject) => { + const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p; + if (opts) { + this.realFs.appendFile(fsNativePath, content, opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.appendFile(fsNativePath, content, this.makeCallback(resolve, reject)); + } + }); + } + appendFileSync(p, content, opts) { + const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p; + if (opts) { + this.realFs.appendFileSync(fsNativePath, content, opts); + } else { + this.realFs.appendFileSync(fsNativePath, content); + } + } + async writeFilePromise(p, content, opts) { + return await new Promise((resolve, reject) => { + const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p; + if (opts) { + this.realFs.writeFile(fsNativePath, content, opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.writeFile(fsNativePath, content, this.makeCallback(resolve, reject)); + } + }); + } + writeFileSync(p, content, opts) { + const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p; + if (opts) { + this.realFs.writeFileSync(fsNativePath, content, opts); + } else { + this.realFs.writeFileSync(fsNativePath, content); + } + } + async unlinkPromise(p) { + return await new Promise((resolve, reject) => { + this.realFs.unlink(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + }); + } + unlinkSync(p) { + return this.realFs.unlinkSync(npath.fromPortablePath(p)); + } + async utimesPromise(p, atime, mtime) { + return await new Promise((resolve, reject) => { + this.realFs.utimes(npath.fromPortablePath(p), atime, mtime, this.makeCallback(resolve, reject)); + }); + } + utimesSync(p, atime, mtime) { + this.realFs.utimesSync(npath.fromPortablePath(p), atime, mtime); + } + async lutimesPromiseImpl(p, atime, mtime) { + const lutimes = this.realFs.lutimes; + if (typeof lutimes === `undefined`) + throw ENOSYS(`unavailable Node binding`, `lutimes '${p}'`); + return await new Promise((resolve, reject) => { + lutimes.call(this.realFs, npath.fromPortablePath(p), atime, mtime, this.makeCallback(resolve, reject)); + }); + } + lutimesSyncImpl(p, atime, mtime) { + const lutimesSync = this.realFs.lutimesSync; + if (typeof lutimesSync === `undefined`) + throw ENOSYS(`unavailable Node binding`, `lutimes '${p}'`); + lutimesSync.call(this.realFs, npath.fromPortablePath(p), atime, mtime); + } + async mkdirPromise(p, opts) { + return await new Promise((resolve, reject) => { + this.realFs.mkdir(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + }); + } + mkdirSync(p, opts) { + return this.realFs.mkdirSync(npath.fromPortablePath(p), opts); + } + async rmdirPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (opts) { + this.realFs.rmdir(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.rmdir(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + } + }); + } + rmdirSync(p, opts) { + return this.realFs.rmdirSync(npath.fromPortablePath(p), opts); + } + async linkPromise(existingP, newP) { + return await new Promise((resolve, reject) => { + this.realFs.link(npath.fromPortablePath(existingP), npath.fromPortablePath(newP), this.makeCallback(resolve, reject)); + }); + } + linkSync(existingP, newP) { + return this.realFs.linkSync(npath.fromPortablePath(existingP), npath.fromPortablePath(newP)); + } + async symlinkPromise(target, p, type) { + const symlinkType = type || (target.endsWith(`/`) ? `dir` : `file`); + return await new Promise((resolve, reject) => { + this.realFs.symlink(npath.fromPortablePath(target.replace(/\/+$/, ``)), npath.fromPortablePath(p), symlinkType, this.makeCallback(resolve, reject)); + }); + } + symlinkSync(target, p, type) { + const symlinkType = type || (target.endsWith(`/`) ? `dir` : `file`); + return this.realFs.symlinkSync(npath.fromPortablePath(target.replace(/\/+$/, ``)), npath.fromPortablePath(p), symlinkType); + } + async readFilePromise(p, encoding) { + return await new Promise((resolve, reject) => { + const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p; + this.realFs.readFile(fsNativePath, encoding, this.makeCallback(resolve, reject)); + }); + } + readFileSync(p, encoding) { + const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p; + return this.realFs.readFileSync(fsNativePath, encoding); + } + async readdirPromise(p, { + withFileTypes + } = {}) { + return await new Promise((resolve, reject) => { + if (withFileTypes) { + this.realFs.readdir(npath.fromPortablePath(p), { + withFileTypes: true + }, this.makeCallback(resolve, reject)); + } else { + this.realFs.readdir(npath.fromPortablePath(p), this.makeCallback((value) => resolve(value), reject)); + } + }); + } + readdirSync(p, { + withFileTypes + } = {}) { + if (withFileTypes) { + return this.realFs.readdirSync(npath.fromPortablePath(p), { + withFileTypes: true + }); + } else { + return this.realFs.readdirSync(npath.fromPortablePath(p)); + } + } + async readlinkPromise(p) { + return await new Promise((resolve, reject) => { + this.realFs.readlink(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + }).then((path) => { + return npath.toPortablePath(path); + }); + } + readlinkSync(p) { + return npath.toPortablePath(this.realFs.readlinkSync(npath.fromPortablePath(p))); + } + async truncatePromise(p, len) { + return await new Promise((resolve, reject) => { + this.realFs.truncate(npath.fromPortablePath(p), len, this.makeCallback(resolve, reject)); + }); + } + truncateSync(p, len) { + return this.realFs.truncateSync(npath.fromPortablePath(p), len); + } + watch(p, a, b) { + return this.realFs.watch(npath.fromPortablePath(p), a, b); + } + watchFile(p, a, b) { + return this.realFs.watchFile(npath.fromPortablePath(p), a, b); + } + unwatchFile(p, cb) { + return this.realFs.unwatchFile(npath.fromPortablePath(p), cb); + } + makeCallback(resolve, reject) { + return (err, result) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }; + } + } + class ProxiedFS extends FakeFS { + getExtractHint(hints) { + return this.baseFs.getExtractHint(hints); + } + resolve(path) { + return this.mapFromBase(this.baseFs.resolve(this.mapToBase(path))); + } + getRealPath() { + return this.mapFromBase(this.baseFs.getRealPath()); + } + async openPromise(p, flags, mode) { + return this.baseFs.openPromise(this.mapToBase(p), flags, mode); + } + openSync(p, flags, mode) { + return this.baseFs.openSync(this.mapToBase(p), flags, mode); + } + async opendirPromise(p, opts) { + return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(p), opts), { + path: p + }); + } + opendirSync(p, opts) { + return Object.assign(this.baseFs.opendirSync(this.mapToBase(p), opts), { + path: p + }); + } + async readPromise(fd, buffer, offset, length, position) { + return await this.baseFs.readPromise(fd, buffer, offset, length, position); + } + readSync(fd, buffer, offset, length, position) { + return this.baseFs.readSync(fd, buffer, offset, length, position); + } + async writePromise(fd, buffer, offset, length, position) { + if (typeof buffer === `string`) { + return await this.baseFs.writePromise(fd, buffer, offset); + } else { + return await this.baseFs.writePromise(fd, buffer, offset, length, position); + } + } + writeSync(fd, buffer, offset, length, position) { + if (typeof buffer === `string`) { + return this.baseFs.writeSync(fd, buffer, offset); + } else { + return this.baseFs.writeSync(fd, buffer, offset, length, position); + } + } + async closePromise(fd) { + return this.baseFs.closePromise(fd); + } + closeSync(fd) { + this.baseFs.closeSync(fd); + } + createReadStream(p, opts) { + return this.baseFs.createReadStream(p !== null ? this.mapToBase(p) : p, opts); + } + createWriteStream(p, opts) { + return this.baseFs.createWriteStream(p !== null ? this.mapToBase(p) : p, opts); + } + async realpathPromise(p) { + return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(p))); + } + realpathSync(p) { + return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(p))); + } + async existsPromise(p) { + return this.baseFs.existsPromise(this.mapToBase(p)); + } + existsSync(p) { + return this.baseFs.existsSync(this.mapToBase(p)); + } + accessSync(p, mode) { + return this.baseFs.accessSync(this.mapToBase(p), mode); + } + async accessPromise(p, mode) { + return this.baseFs.accessPromise(this.mapToBase(p), mode); + } + async statPromise(p) { + return this.baseFs.statPromise(this.mapToBase(p)); + } + statSync(p) { + return this.baseFs.statSync(this.mapToBase(p)); + } + async lstatPromise(p) { + return this.baseFs.lstatPromise(this.mapToBase(p)); + } + lstatSync(p) { + return this.baseFs.lstatSync(this.mapToBase(p)); + } + async chmodPromise(p, mask) { + return this.baseFs.chmodPromise(this.mapToBase(p), mask); + } + chmodSync(p, mask) { + return this.baseFs.chmodSync(this.mapToBase(p), mask); + } + async chownPromise(p, uid, gid) { + return this.baseFs.chownPromise(this.mapToBase(p), uid, gid); + } + chownSync(p, uid, gid) { + return this.baseFs.chownSync(this.mapToBase(p), uid, gid); + } + async renamePromise(oldP, newP) { + return this.baseFs.renamePromise(this.mapToBase(oldP), this.mapToBase(newP)); + } + renameSync(oldP, newP) { + return this.baseFs.renameSync(this.mapToBase(oldP), this.mapToBase(newP)); + } + async copyFilePromise(sourceP, destP, flags = 0) { + return this.baseFs.copyFilePromise(this.mapToBase(sourceP), this.mapToBase(destP), flags); + } + copyFileSync(sourceP, destP, flags = 0) { + return this.baseFs.copyFileSync(this.mapToBase(sourceP), this.mapToBase(destP), flags); + } + async appendFilePromise(p, content, opts) { + return this.baseFs.appendFilePromise(this.fsMapToBase(p), content, opts); + } + appendFileSync(p, content, opts) { + return this.baseFs.appendFileSync(this.fsMapToBase(p), content, opts); + } + async writeFilePromise(p, content, opts) { + return this.baseFs.writeFilePromise(this.fsMapToBase(p), content, opts); + } + writeFileSync(p, content, opts) { + return this.baseFs.writeFileSync(this.fsMapToBase(p), content, opts); + } + async unlinkPromise(p) { + return this.baseFs.unlinkPromise(this.mapToBase(p)); + } + unlinkSync(p) { + return this.baseFs.unlinkSync(this.mapToBase(p)); + } + async utimesPromise(p, atime, mtime) { + return this.baseFs.utimesPromise(this.mapToBase(p), atime, mtime); + } + utimesSync(p, atime, mtime) { + return this.baseFs.utimesSync(this.mapToBase(p), atime, mtime); + } + async mkdirPromise(p, opts) { + return this.baseFs.mkdirPromise(this.mapToBase(p), opts); + } + mkdirSync(p, opts) { + return this.baseFs.mkdirSync(this.mapToBase(p), opts); + } + async rmdirPromise(p, opts) { + return this.baseFs.rmdirPromise(this.mapToBase(p), opts); + } + rmdirSync(p, opts) { + return this.baseFs.rmdirSync(this.mapToBase(p), opts); + } + async linkPromise(existingP, newP) { + return this.baseFs.linkPromise(this.mapToBase(existingP), this.mapToBase(newP)); + } + linkSync(existingP, newP) { + return this.baseFs.linkSync(this.mapToBase(existingP), this.mapToBase(newP)); + } + async symlinkPromise(target, p, type) { + return this.baseFs.symlinkPromise(this.mapToBase(target), this.mapToBase(p), type); + } + symlinkSync(target, p, type) { + return this.baseFs.symlinkSync(this.mapToBase(target), this.mapToBase(p), type); + } + async readFilePromise(p, encoding) { + if (encoding === `utf8`) { + return this.baseFs.readFilePromise(this.fsMapToBase(p), encoding); + } else { + return this.baseFs.readFilePromise(this.fsMapToBase(p), encoding); + } + } + readFileSync(p, encoding) { + if (encoding === `utf8`) { + return this.baseFs.readFileSync(this.fsMapToBase(p), encoding); + } else { + return this.baseFs.readFileSync(this.fsMapToBase(p), encoding); + } + } + async readdirPromise(p, { + withFileTypes + } = {}) { + return this.baseFs.readdirPromise(this.mapToBase(p), { + withFileTypes + }); + } + readdirSync(p, { + withFileTypes + } = {}) { + return this.baseFs.readdirSync(this.mapToBase(p), { + withFileTypes + }); + } + async readlinkPromise(p) { + return this.mapFromBase(await this.baseFs.readlinkPromise(this.mapToBase(p))); + } + readlinkSync(p) { + return this.mapFromBase(this.baseFs.readlinkSync(this.mapToBase(p))); + } + async truncatePromise(p, len) { + return this.baseFs.truncatePromise(this.mapToBase(p), len); + } + truncateSync(p, len) { + return this.baseFs.truncateSync(this.mapToBase(p), len); + } + watch(p, a, b) { + return this.baseFs.watch(this.mapToBase(p), a, b); + } + watchFile(p, a, b) { + return this.baseFs.watchFile(this.mapToBase(p), a, b); + } + unwatchFile(p, cb) { + return this.baseFs.unwatchFile(this.mapToBase(p), cb); + } + fsMapToBase(p) { + if (typeof p === `number`) { + return p; + } else { + return this.mapToBase(p); + } + } + } + const NUMBER_REGEXP = /^[0-9]+$/; + const VIRTUAL_REGEXP = /^(\/(?:[^/]+\/)*?\$\$virtual)((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/; + const VALID_COMPONENT = /^([^/]+-)?[a-f0-9]+$/; + class VirtualFS extends ProxiedFS { + constructor({ + baseFs = new NodeFS() + } = {}) { + super(ppath); + this.baseFs = baseFs; + } + static makeVirtualPath(base, component, to) { + if (ppath.basename(base) !== `$$virtual`) + throw new Error(`Assertion failed: Virtual folders must be named "$$virtual"`); + if (!ppath.basename(component).match(VALID_COMPONENT)) + throw new Error(`Assertion failed: Virtual components must be ended by an hexadecimal hash`); + const target = ppath.relative(ppath.dirname(base), to); + const segments = target.split(`/`); + let depth = 0; + while (depth < segments.length && segments[depth] === `..`) + depth += 1; + const finalSegments = segments.slice(depth); + const fullVirtualPath = ppath.join(base, component, String(depth), ...finalSegments); + return fullVirtualPath; + } + static resolveVirtual(p) { + const match = p.match(VIRTUAL_REGEXP); + if (!match || !match[3] && match[5]) + return p; + const target = ppath.dirname(match[1]); + if (!match[3] || !match[4]) + return target; + const isnum = NUMBER_REGEXP.test(match[4]); + if (!isnum) + return p; + const depth = Number(match[4]); + const backstep = `../`.repeat(depth); + const subpath = match[5] || `.`; + return VirtualFS.resolveVirtual(ppath.join(target, backstep, subpath)); + } + getExtractHint(hints) { + return this.baseFs.getExtractHint(hints); + } + getRealPath() { + return this.baseFs.getRealPath(); + } + realpathSync(p) { + const match = p.match(VIRTUAL_REGEXP); + if (!match) + return this.baseFs.realpathSync(p); + if (!match[5]) + return p; + const realpath = this.baseFs.realpathSync(this.mapToBase(p)); + return VirtualFS.makeVirtualPath(match[1], match[3], realpath); + } + async realpathPromise(p) { + const match = p.match(VIRTUAL_REGEXP); + if (!match) + return await this.baseFs.realpathPromise(p); + if (!match[5]) + return p; + const realpath = await this.baseFs.realpathPromise(this.mapToBase(p)); + return VirtualFS.makeVirtualPath(match[1], match[3], realpath); + } + mapToBase(p) { + return VirtualFS.resolveVirtual(p); + } + mapFromBase(p) { + return p; + } + } + const external_module_namespaceObject = require("module"); + ; + var ErrorCode; + (function(ErrorCode2) { + ErrorCode2["API_ERROR"] = "API_ERROR"; + ErrorCode2["BLACKLISTED"] = "BLACKLISTED"; + ErrorCode2["BUILTIN_NODE_RESOLUTION_FAILED"] = "BUILTIN_NODE_RESOLUTION_FAILED"; + ErrorCode2["MISSING_DEPENDENCY"] = "MISSING_DEPENDENCY"; + ErrorCode2["MISSING_PEER_DEPENDENCY"] = "MISSING_PEER_DEPENDENCY"; + ErrorCode2["QUALIFIED_PATH_RESOLUTION_FAILED"] = "QUALIFIED_PATH_RESOLUTION_FAILED"; + ErrorCode2["INTERNAL"] = "INTERNAL"; + ErrorCode2["UNDECLARED_DEPENDENCY"] = "UNDECLARED_DEPENDENCY"; + ErrorCode2["UNSUPPORTED"] = "UNSUPPORTED"; + })(ErrorCode || (ErrorCode = {})); + const MODULE_NOT_FOUND_ERRORS = new Set([ErrorCode.BLACKLISTED, ErrorCode.BUILTIN_NODE_RESOLUTION_FAILED, ErrorCode.MISSING_DEPENDENCY, ErrorCode.MISSING_PEER_DEPENDENCY, ErrorCode.QUALIFIED_PATH_RESOLUTION_FAILED, ErrorCode.UNDECLARED_DEPENDENCY]); + function internalTools_makeError(pnpCode, message2, data = {}) { + const code = MODULE_NOT_FOUND_ERRORS.has(pnpCode) ? `MODULE_NOT_FOUND` : pnpCode; + const propertySpec = { + configurable: true, + writable: true, + enumerable: false + }; + return Object.defineProperties(new Error(message2), { + code: { + ...propertySpec, + value: code + }, + pnpCode: { + ...propertySpec, + value: pnpCode + }, + data: { + ...propertySpec, + value: data + } + }); + } + function getIssuerModule(parent) { + let issuer = parent; + while (issuer && (issuer.id === `[eval]` || issuer.id === `` || !issuer.filename)) + issuer = issuer.parent; + return issuer || null; + } + function getPathForDisplay(p) { + return npath.normalize(npath.fromPortablePath(p)); + } + function makeApi(runtimeState, opts) { + const alwaysWarnOnFallback = Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK) > 0; + const debugLevel = Number(process.env.PNP_DEBUG_LEVEL); + const builtinModules = new Set(external_module_namespaceObject.Module.builtinModules || Object.keys(process.binding(`natives`))); + const pathRegExp = /^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:@[^/]+\/)?[^/]+)\/*(.*|)$/; + const isStrictRegExp = /^(\/|\.{1,2}(\/|$))/; + const isDirRegExp = /\/$/; + const topLevelLocator = { + name: null, + reference: null + }; + const fallbackLocators = []; + const emittedWarnings = new Set(); + if (runtimeState.enableTopLevelFallback === true) + fallbackLocators.push(topLevelLocator); + if (opts.compatibilityMode !== false) { + for (const name of [`react-scripts`, `gatsby`]) { + const packageStore = runtimeState.packageRegistry.get(name); + if (packageStore) { + for (const reference of packageStore.keys()) { + if (reference === null) { + throw new Error(`Assertion failed: This reference shouldn't be null`); + } else { + fallbackLocators.push({ + name, + reference + }); + } + } + } + } + } + const { + ignorePattern, + packageRegistry, + packageLocatorsByLocations, + packageLocationLengths + } = runtimeState; + function makeLogEntry(name, args2) { + return { + fn: name, + args: args2, + error: null, + result: null + }; + } + function maybeLog(name, fn2) { + if (opts.allowDebug === false) + return fn2; + if (Number.isFinite(debugLevel)) { + if (debugLevel >= 2) { + return (...args2) => { + const logEntry = makeLogEntry(name, args2); + try { + return logEntry.result = fn2(...args2); + } catch (error) { + throw logEntry.error = error; + } finally { + console.trace(logEntry); + } + }; + } else if (debugLevel >= 1) { + return (...args2) => { + try { + return fn2(...args2); + } catch (error) { + const logEntry = makeLogEntry(name, args2); + logEntry.error = error; + console.trace(logEntry); + throw error; + } + }; + } + } + return fn2; + } + function getPackageInformationSafe(packageLocator) { + const packageInformation = getPackageInformation(packageLocator); + if (!packageInformation) { + throw internalTools_makeError(ErrorCode.INTERNAL, `Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)`); + } + return packageInformation; + } + function isDependencyTreeRoot(packageLocator) { + if (packageLocator.name === null) + return true; + for (const dependencyTreeRoot of runtimeState.dependencyTreeRoots) + if (dependencyTreeRoot.name === packageLocator.name && dependencyTreeRoot.reference === packageLocator.reference) + return true; + return false; + } + function applyNodeExtensionResolution(unqualifiedPath, candidates, { + extensions + }) { + let stat; + try { + candidates.push(unqualifiedPath); + stat = opts.fakeFs.statSync(unqualifiedPath); + } catch (error) { + } + if (stat && !stat.isDirectory()) + return opts.fakeFs.realpathSync(unqualifiedPath); + if (stat && stat.isDirectory()) { + let pkgJson; + try { + pkgJson = JSON.parse(opts.fakeFs.readFileSync(ppath.join(unqualifiedPath, `package.json`), `utf8`)); + } catch (error) { + } + let nextUnqualifiedPath; + if (pkgJson && pkgJson.main) + nextUnqualifiedPath = ppath.resolve(unqualifiedPath, pkgJson.main); + if (nextUnqualifiedPath && nextUnqualifiedPath !== unqualifiedPath) { + const resolution = applyNodeExtensionResolution(nextUnqualifiedPath, candidates, { + extensions + }); + if (resolution !== null) { + return resolution; + } + } + } + for (let i = 0, length = extensions.length; i < length; i++) { + const candidateFile = `${unqualifiedPath}${extensions[i]}`; + candidates.push(candidateFile); + if (opts.fakeFs.existsSync(candidateFile)) { + return candidateFile; + } + } + if (stat && stat.isDirectory()) { + for (let i = 0, length = extensions.length; i < length; i++) { + const candidateFile = ppath.format({ + dir: unqualifiedPath, + name: `index`, + ext: extensions[i] + }); + candidates.push(candidateFile); + if (opts.fakeFs.existsSync(candidateFile)) { + return candidateFile; + } + } + } + return null; + } + function makeFakeModule(path) { + const fakeModule = new external_module_namespaceObject.Module(path, null); + fakeModule.filename = path; + fakeModule.paths = external_module_namespaceObject.Module._nodeModulePaths(path); + return fakeModule; + } + function normalizePath(p) { + return npath.toPortablePath(p); + } + function callNativeResolution(request, issuer) { + if (issuer.endsWith(`/`)) + issuer = ppath.join(issuer, `internal.js`); + return external_module_namespaceObject.Module._resolveFilename(npath.fromPortablePath(request), makeFakeModule(npath.fromPortablePath(issuer)), false, { + plugnplay: false + }); + } + function isPathIgnored(path) { + if (ignorePattern === null) + return false; + const subPath = ppath.contains(runtimeState.basePath, path); + if (subPath === null) + return false; + if (ignorePattern.test(subPath.replace(/\/$/, ``))) { + return true; + } else { + return false; + } + } + const VERSIONS = { + std: 3, + resolveVirtual: 1, + getAllLocators: 1 + }; + const topLevel = topLevelLocator; + function getPackageInformation({ + name, + reference + }) { + const packageInformationStore = packageRegistry.get(name); + if (!packageInformationStore) + return null; + const packageInformation = packageInformationStore.get(reference); + if (!packageInformation) + return null; + return packageInformation; + } + function findPackageDependents({ + name, + reference + }) { + const dependents = []; + for (const [dependentName, packageInformationStore] of packageRegistry) { + if (dependentName === null) + continue; + for (const [dependentReference, packageInformation] of packageInformationStore) { + if (dependentReference === null) + continue; + const dependencyReference = packageInformation.packageDependencies.get(name); + if (dependencyReference !== reference) + continue; + if (dependentName === name && dependentReference === reference) + continue; + dependents.push({ + name: dependentName, + reference: dependentReference + }); + } + } + return dependents; + } + function findBrokenPeerDependencies(dependency, initialPackage) { + const brokenPackages = new Map(); + const alreadyVisited = new Set(); + const traversal = (currentPackage) => { + const identifier = JSON.stringify(currentPackage.name); + if (alreadyVisited.has(identifier)) + return; + alreadyVisited.add(identifier); + const dependents = findPackageDependents(currentPackage); + for (const dependent of dependents) { + const dependentInformation = getPackageInformationSafe(dependent); + if (dependentInformation.packagePeers.has(dependency)) { + traversal(dependent); + } else { + let brokenSet = brokenPackages.get(dependent.name); + if (typeof brokenSet === `undefined`) + brokenPackages.set(dependent.name, brokenSet = new Set()); + brokenSet.add(dependent.reference); + } + } + }; + traversal(initialPackage); + const brokenList = []; + for (const name of [...brokenPackages.keys()].sort()) + for (const reference of [...brokenPackages.get(name)].sort()) + brokenList.push({ + name, + reference + }); + return brokenList; + } + function findPackageLocator(location) { + if (isPathIgnored(location)) + return null; + let relativeLocation = normalizePath(ppath.relative(runtimeState.basePath, location)); + if (!relativeLocation.match(isStrictRegExp)) + relativeLocation = `./${relativeLocation}`; + if (location.match(isDirRegExp) && !relativeLocation.endsWith(`/`)) + relativeLocation = `${relativeLocation}/`; + let from = 0; + while (from < packageLocationLengths.length && packageLocationLengths[from] > relativeLocation.length) + from += 1; + for (let t = from; t < packageLocationLengths.length; ++t) { + const locator = packageLocatorsByLocations.get(relativeLocation.substr(0, packageLocationLengths[t])); + if (typeof locator === `undefined`) + continue; + if (locator === null) { + const locationForDisplay = getPathForDisplay(location); + throw internalTools_makeError(ErrorCode.BLACKLISTED, `A forbidden path has been used in the package resolution process - this is usually caused by one of your tools calling 'fs.realpath' on the return value of 'require.resolve'. Since we need to use symlinks to simultaneously provide valid filesystem paths and disambiguate peer dependencies, they must be passed untransformed to 'require'. + +Forbidden path: ${locationForDisplay}`, { + location: locationForDisplay + }); + } + return locator; + } + return null; + } + function resolveToUnqualified(request, issuer, { + considerBuiltins = true + } = {}) { + if (request === `pnpapi`) + return npath.toPortablePath(opts.pnpapiResolution); + if (considerBuiltins && builtinModules.has(request)) + return null; + const requestForDisplay = getPathForDisplay(request); + const issuerForDisplay = issuer && getPathForDisplay(issuer); + if (issuer && isPathIgnored(issuer)) { + if (!ppath.isAbsolute(request) || findPackageLocator(request) === null) { + const result = callNativeResolution(request, issuer); + if (result === false) { + throw internalTools_makeError(ErrorCode.BUILTIN_NODE_RESOLUTION_FAILED, `The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer was explicitely ignored by the regexp) + +Require request: "${requestForDisplay}" +Required by: ${issuerForDisplay} +`, { + request: requestForDisplay, + issuer: issuerForDisplay + }); + } + return npath.toPortablePath(result); + } + } + let unqualifiedPath; + const dependencyNameMatch = request.match(pathRegExp); + if (!dependencyNameMatch) { + if (ppath.isAbsolute(request)) { + unqualifiedPath = ppath.normalize(request); + } else { + if (!issuer) { + throw internalTools_makeError(ErrorCode.API_ERROR, `The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute`, { + request: requestForDisplay, + issuer: issuerForDisplay + }); + } + const absoluteIssuer = ppath.resolve(issuer); + if (issuer.match(isDirRegExp)) { + unqualifiedPath = ppath.normalize(ppath.join(absoluteIssuer, request)); + } else { + unqualifiedPath = ppath.normalize(ppath.join(ppath.dirname(absoluteIssuer), request)); + } + } + findPackageLocator(unqualifiedPath); + } else { + if (!issuer) { + throw internalTools_makeError(ErrorCode.API_ERROR, `The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute`, { + request: requestForDisplay, + issuer: issuerForDisplay + }); + } + const [, dependencyName, subPath] = dependencyNameMatch; + const issuerLocator = findPackageLocator(issuer); + if (!issuerLocator) { + const result = callNativeResolution(request, issuer); + if (result === false) { + throw internalTools_makeError(ErrorCode.BUILTIN_NODE_RESOLUTION_FAILED, `The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree). + +Require path: "${requestForDisplay}" +Required by: ${issuerForDisplay} +`, { + request: requestForDisplay, + issuer: issuerForDisplay + }); + } + return npath.toPortablePath(result); + } + const issuerInformation = getPackageInformationSafe(issuerLocator); + let dependencyReference = issuerInformation.packageDependencies.get(dependencyName); + let fallbackReference = null; + if (dependencyReference == null) { + if (issuerLocator.name !== null) { + const exclusionEntry = runtimeState.fallbackExclusionList.get(issuerLocator.name); + const canUseFallbacks = !exclusionEntry || !exclusionEntry.has(issuerLocator.reference); + if (canUseFallbacks) { + for (let t = 0, T = fallbackLocators.length; t < T; ++t) { + const fallbackInformation = getPackageInformationSafe(fallbackLocators[t]); + const reference = fallbackInformation.packageDependencies.get(dependencyName); + if (reference == null) + continue; + if (alwaysWarnOnFallback) + fallbackReference = reference; + else + dependencyReference = reference; + break; + } + if (runtimeState.enableTopLevelFallback) { + if (dependencyReference == null && fallbackReference === null) { + const reference = runtimeState.fallbackPool.get(dependencyName); + if (reference != null) { + fallbackReference = reference; + } + } + } + } + } + } + let error = null; + if (dependencyReference === null) { + if (isDependencyTreeRoot(issuerLocator)) { + error = internalTools_makeError(ErrorCode.MISSING_PEER_DEPENDENCY, `Your application tried to access ${dependencyName} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed. + +Required package: ${dependencyName} (via "${requestForDisplay}") +Required by: ${issuerForDisplay} +`, { + request: requestForDisplay, + issuer: issuerForDisplay, + dependencyName + }); + } else { + const brokenAncestors = findBrokenPeerDependencies(dependencyName, issuerLocator); + if (brokenAncestors.every((ancestor) => isDependencyTreeRoot(ancestor))) { + error = internalTools_makeError(ErrorCode.MISSING_PEER_DEPENDENCY, `${issuerLocator.name} tried to access ${dependencyName} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound. + +Required package: ${dependencyName} (via "${requestForDisplay}") +Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDisplay}) +${brokenAncestors.map((ancestorLocator) => `Ancestor breaking the chain: ${ancestorLocator.name}@${ancestorLocator.reference} +`).join(``)} +`, { + request: requestForDisplay, + issuer: issuerForDisplay, + issuerLocator: Object.assign({}, issuerLocator), + dependencyName, + brokenAncestors + }); + } else { + error = internalTools_makeError(ErrorCode.MISSING_PEER_DEPENDENCY, `${issuerLocator.name} tried to access ${dependencyName} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound. + +Required package: ${dependencyName} (via "${requestForDisplay}") +Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDisplay}) +${brokenAncestors.map((ancestorLocator) => `Ancestor breaking the chain: ${ancestorLocator.name}@${ancestorLocator.reference} +`).join(``)} +`, { + request: requestForDisplay, + issuer: issuerForDisplay, + issuerLocator: Object.assign({}, issuerLocator), + dependencyName, + brokenAncestors + }); + } + } + } else if (dependencyReference === void 0) { + if (!considerBuiltins && builtinModules.has(request)) { + if (isDependencyTreeRoot(issuerLocator)) { + error = internalTools_makeError(ErrorCode.UNDECLARED_DEPENDENCY, `Your application tried to access ${dependencyName}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${dependencyName} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound. + +Required package: ${dependencyName} (via "${requestForDisplay}") +Required by: ${issuerForDisplay} +`, { + request: requestForDisplay, + issuer: issuerForDisplay, + dependencyName + }); + } else { + error = internalTools_makeError(ErrorCode.UNDECLARED_DEPENDENCY, `${issuerLocator.name} tried to access ${dependencyName}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${dependencyName} isn't otherwise declared in ${issuerLocator.name}'s dependencies, this makes the require call ambiguous and unsound. + +Required package: ${dependencyName} (via "${requestForDisplay}") +Required by: ${issuerForDisplay} +`, { + request: requestForDisplay, + issuer: issuerForDisplay, + issuerLocator: Object.assign({}, issuerLocator), + dependencyName + }); + } + } else { + if (isDependencyTreeRoot(issuerLocator)) { + error = internalTools_makeError(ErrorCode.UNDECLARED_DEPENDENCY, `Your application tried to access ${dependencyName}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound. + +Required package: ${dependencyName} (via "${requestForDisplay}") +Required by: ${issuerForDisplay} +`, { + request: requestForDisplay, + issuer: issuerForDisplay, + dependencyName + }); + } else { + error = internalTools_makeError(ErrorCode.UNDECLARED_DEPENDENCY, `${issuerLocator.name} tried to access ${dependencyName}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound. + +Required package: ${dependencyName} (via "${requestForDisplay}") +Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDisplay}) +`, { + request: requestForDisplay, + issuer: issuerForDisplay, + issuerLocator: Object.assign({}, issuerLocator), + dependencyName + }); + } + } + } + if (dependencyReference == null) { + if (fallbackReference === null || error === null) + throw error || new Error(`Assertion failed: Expected an error to have been set`); + dependencyReference = fallbackReference; + const message2 = error.message.replace(/\n.*/g, ``); + error.message = message2; + if (!emittedWarnings.has(message2)) { + emittedWarnings.add(message2); + process.emitWarning(error); + } + } + const dependencyLocator = Array.isArray(dependencyReference) ? { + name: dependencyReference[0], + reference: dependencyReference[1] + } : { + name: dependencyName, + reference: dependencyReference + }; + const dependencyInformation = getPackageInformationSafe(dependencyLocator); + if (!dependencyInformation.packageLocation) { + throw internalTools_makeError(ErrorCode.MISSING_DEPENDENCY, `A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod. + +Required package: ${dependencyLocator.name}@${dependencyLocator.reference} (via "${requestForDisplay}") +Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDisplay}) +`, { + request: requestForDisplay, + issuer: issuerForDisplay, + dependencyLocator: Object.assign({}, dependencyLocator) + }); + } + const dependencyLocation = dependencyInformation.packageLocation; + if (subPath) { + unqualifiedPath = ppath.join(dependencyLocation, subPath); + } else { + unqualifiedPath = dependencyLocation; + } + } + return ppath.normalize(unqualifiedPath); + } + function resolveUnqualified(unqualifiedPath, { + extensions = Object.keys(external_module_namespaceObject.Module._extensions) + } = {}) { + const candidates = []; + const qualifiedPath = applyNodeExtensionResolution(unqualifiedPath, candidates, { + extensions + }); + if (qualifiedPath) { + return ppath.normalize(qualifiedPath); + } else { + const unqualifiedPathForDisplay = getPathForDisplay(unqualifiedPath); + throw internalTools_makeError(ErrorCode.QUALIFIED_PATH_RESOLUTION_FAILED, `Qualified path resolution failed - none of the candidates can be found on the disk. + +Source path: ${unqualifiedPathForDisplay} +${candidates.map((candidate) => `Rejected candidate: ${getPathForDisplay(candidate)} +`).join(``)}`, { + unqualifiedPath: unqualifiedPathForDisplay + }); + } + } + function resolveRequest(request, issuer, { + considerBuiltins, + extensions + } = {}) { + const unqualifiedPath = resolveToUnqualified(request, issuer, { + considerBuiltins + }); + if (unqualifiedPath === null) + return null; + try { + return resolveUnqualified(unqualifiedPath, { + extensions + }); + } catch (resolutionError) { + if (resolutionError.pnpCode === `QUALIFIED_PATH_RESOLUTION_FAILED`) + Object.assign(resolutionError.data, { + request: getPathForDisplay(request), + issuer: issuer && getPathForDisplay(issuer) + }); + throw resolutionError; + } + } + function resolveVirtual(request) { + const normalized = ppath.normalize(request); + const resolved = VirtualFS.resolveVirtual(normalized); + return resolved !== normalized ? resolved : null; + } + return { + VERSIONS, + topLevel, + getLocator: (name, referencish) => { + if (Array.isArray(referencish)) { + return { + name: referencish[0], + reference: referencish[1] + }; + } else { + return { + name, + reference: referencish + }; + } + }, + getDependencyTreeRoots: () => { + return [...runtimeState.dependencyTreeRoots]; + }, + getAllLocators() { + const locators = []; + for (const [name, entry] of packageRegistry) + for (const reference of entry.keys()) + if (name !== null && reference !== null) + locators.push({ + name, + reference + }); + return locators; + }, + getPackageInformation: (locator) => { + const info = getPackageInformation(locator); + if (info === null) + return null; + const packageLocation = npath.fromPortablePath(info.packageLocation); + const nativeInfo = { + ...info, + packageLocation + }; + return nativeInfo; + }, + findPackageLocator: (path) => { + return findPackageLocator(npath.toPortablePath(path)); + }, + resolveToUnqualified: maybeLog(`resolveToUnqualified`, (request, issuer, opts2) => { + const portableIssuer = issuer !== null ? npath.toPortablePath(issuer) : null; + const resolution = resolveToUnqualified(npath.toPortablePath(request), portableIssuer, opts2); + if (resolution === null) + return null; + return npath.fromPortablePath(resolution); + }), + resolveUnqualified: maybeLog(`resolveUnqualified`, (unqualifiedPath, opts2) => { + return npath.fromPortablePath(resolveUnqualified(npath.toPortablePath(unqualifiedPath), opts2)); + }), + resolveRequest: maybeLog(`resolveRequest`, (request, issuer, opts2) => { + const portableIssuer = issuer !== null ? npath.toPortablePath(issuer) : null; + const resolution = resolveRequest(npath.toPortablePath(request), portableIssuer, opts2); + if (resolution === null) + return null; + return npath.fromPortablePath(resolution); + }), + resolveVirtual: maybeLog(`resolveVirtual`, (path) => { + const result = resolveVirtual(npath.toPortablePath(path)); + if (result !== null) { + return npath.fromPortablePath(result); + } else { + return null; + } + }) + }; + } + const readFileP = (0, external_util_namespaceObject.promisify)(external_fs_namespaceObject.readFile); + async function hydratePnpFile(location, { + fakeFs, + pnpapiResolution + }) { + const source = await readFileP(location, `utf8`); + return hydratePnpSource(source, { + basePath: (0, external_path_namespaceObject.dirname)(location), + fakeFs, + pnpapiResolution + }); + } + function hydratePnpSource(source, { + basePath: basePath2, + fakeFs, + pnpapiResolution + }) { + const data = JSON.parse(source); + const runtimeState = hydrateRuntimeState(data, { + basePath: basePath2 + }); + return makeApi(runtimeState, { + compatibilityMode: true, + fakeFs, + pnpapiResolution + }); + } + const makeRuntimeApi = (settings, basePath2, fakeFs) => { + const data = generateSerializedState(settings); + const state = hydrateRuntimeState(data, { + basePath: basePath2 + }); + const pnpapiResolution = npath.join(basePath2, `.pnp.js`); + return makeApi(state, { + fakeFs, + pnpapiResolution + }); + }; + }, + 650: (module3, __unused_webpack_exports, __webpack_require__2) => { + let hook; + module3.exports = () => { + if (typeof hook === `undefined`) + hook = __webpack_require__2(761).brotliDecompressSync(Buffer.from("W4VmWMM2BubfuhOQtPrf2v23OidkIrLQsV6vuo6ON5J6yagfMdrY7lWBqNRd9a47LpsBgqCqmpd0iExCZ1KAzk71/+8domYYLado6QgLVcDZGShUGZeMQlqNVNopK7ifA0nn9MKZyFF65wTuzVq9y8KLJIXtKHLGSuK1rAktpPEa3o/D+bTWy0Lum8P5dbi+afFDC2tbv6C+vb8PfoBYODmqfft9Hf5Pe0ggAgnkcyCScddvJcAQUaLFtBxiDzlFX6Xu3f20V3zi9/KX9v3n56uXPdxdESLXXGIvbEJOH2X8Th4liNWx9UwsCsmzw1aZ510Tdb5Rj+J7MJ8y4+/0oG7C5N5U/e6+nCb6u2syhiiXVOk32T1VbmmOnkICBEwLGCIzQ4HSPv1vU+s8vpwklpeRcMyX3CZhQ0hpXNKalPCFW0gBPcDD7EDWf21mpzNkxFiDnHpaxMPpp+2Fb0z5U8DCOE7xbpaa//u8NH5Zl8StbCqWBFeISIAGQJVrsNMLfOS+6WPU487yt6HHvVyqxkCGr9rxWKj5mb72aqpVcNinJQUMBonXOVfO3ff9fGydsqWp75+uSrpgOe34S2n6rY3EkbmxyDG4JPxoICAtZfP8L7kEnGpRcJiK7IrwPCabx4MHO4eKx/eTtA0Q4INF6w2rfFzV6uoWdLNp/e/zQ9s80fgiyQayGUyu1EbdOJV0LmX3p9qP6wXd/TIC/1lwJelIZmsp/rZYUk38z63G5Xvw7dummA0Go0VwYLs5GsIE/AD7Yf7W8eCBquyuHN9MJmn6ZRoK1BsfCbWLiKgVF1+m/efnuW234z4lWU4CSaniecD+KO8qKwbSjr1LjR81tj8eOkhlfTy+WQYYFGxASroh5mLUXxVrJYvaq/HHw/sYfzZRjlU9DQwC5EbGiXyTlXVDtDGWUDwofvwP59Pnx+7u49XU5n2emTsXhgA64E3EvxTrkKDBFhUtPGU2++PxO8t2fC0LEHuTzHaEZNJqi+WnICMb389Zli3hnEpdFg6ZtdTpSzwwO+DAMYS/NbQ/XoGUnXoEW12ZkX5IfFBvSTJfos/EWRVFnv9PNS1bh9RePIHCn43YkDqJK81QPoSd4ffvm5aSJ3dWxvlQSWJ9lrGrbr27/Kb7TDca2AFA8IzhOnJn1pqqeq+xvxuYOQCG2kNyJlhjZZyJdJREihIXKk1WSmX2e/s37pQhjCgxbs/Vfe0coZkJeFKrT/8UkL0B4CVkAeWaGWe0ZYbWf97303pT0HRTxpkkkiISZPMbY5Owa5uzhvVMiSgUMQOAgNQku3+bcc2W8Wftvc+97716hSkUQIoEexzlnMukVEmi/OtnMpHC6KEoQ1mXTaj/m1rSaZq5d76a+NIaQAEsmpEs36Z1QkOlP/4vUXvvdvc2vaLKEo1kZ8c6p5UKaACrhAaQYFi6Yf7eVP+t/sy9uyQFkQ4gFYZy/DH2DnRIsShdi+ecu1e8YWFhF+TX7hK0FwDlB4DSNwA+jgnwPazoAPIl6YeQKjomgZBm4ot0iKlMqQu5+607u/O4c/mLzqWr3lXtonbfurf/fW9p1fb97x7uAYAZRGZSpVDdI/Xa3QGCKrNka71YFd679x2j///+tw5XlQh3DzPAI8KKEQjYkEDArKje++4BvO8IMN2DAMsjCGYGQGYNwGLWgKxqM2YLmcgcxapRcjnTy1lss0Zq23evdkIxc6RYSf1vOpbqyDmE8+0FwlRLnUTiEIb/GtyUgCqbJaZMnSoZTEvmDL9CSqjDUeUqnCzPf9yn+v+5k1ltE9tA3wQoxssOHKGghXxpC0LBAltBtPBSe5swB1i7DYxBub83F2EoxiF03obaFB5bsh0Kc1bzrIwh3LQFCHQJIft/5CJOSAK0iCZowEvBt1E6se+QClLxyQDb/P6zGf+p4F3PzaDCAkTKwIoZSUwHunbpXlxNMWf/zySGe2fKzMwV7SAKgg0s2GpiS2JLsSU2hF26mHr3yxBu1v/vXtvs726Ps7eLFkKQEPAgwYpoQimiQYN4BXwmQ8sJtGRi4JvqJhOIEwjkbtY/rpP199/CClNIYbApTjXqCNN2WnKIGmUPa42wSoQ9jPAOe3hI+9ecvrylsbdHMMEED79ocIIGDTco4QgabtDgnVaQN7MkVf57pnDAhQoXIpigwoUh5hDBEBFUqBBBHCpcDGT9/93z0K/7HuDMzIMgOBAEQRAEQRAEF4IgOLBnrQMbmvl/3eIffPefkNv2BIIlFYgKllQgEAgEAoFAnEBcMsRlQVRUVNRvLp4Hn71PVT+xIiLQiIiIiBERESlERISylBVLiUjpFIYyYiiHNu3/0+fVV+2Rf8gGmIx5Oqweg87ORHPWoCK7ErY0QUikWCgWsCCIpSbaKRaQpO/ufT7JheKaKwOv5/+/KO15Qt3RkRCyzMSKsEuNtuxSK6gaK0YX5977m8Tq6Vkg8WFgFXHmNHyNkNthOPkkpeW3tyfaXr3W/Nhgzz10+7keQmIsRg6Nou1V9G2ouQrSXvz7RuQRM+xkIu5hKxFQDMCnijKYAOB5O1MvmlNyXfsYOqP676qcmPtHtcuoDuGsJDHT4rILl0OMh4Zj3fay5erEe+MJIAy9Y/jQEoCMkOML38mHoY0XTN2PnLn+l9AMOgbfm/WChFjb43o/INsWlyw5TyXJGo0jkzBVQhHpGQWQZe3PQzCf6OWq/mVwdbA6RGmy4IFePesVn5f250+VPdv2wODMfQYJsAZvRPbpDZCkhOhUNSmnVXaZszIeZNX51IJ9Ol16VNEUgkNtPXZqIfxDs1/MGXprB/9PAnj/JMnlUIzwIJyX8qe8LKT/bYffcwJHBscc2utF+e5/57jWSqHVooqW/YjHiFl4XEUJ9s98myoPWIzhQzVTOQ4kLey5KUDYV2MQ1cY4+7d9Cf+Bjv1hF1vvbJWYwy5BvlGKS9DkREkpgx8xST5PU4ikNC5wLB7cOmcGp+bpTrwJ73OkrOWEWGV/hSRJkwh87Z7aHxsaQMuNwvYREDvirh/o6xQ/MKgiU6hXgP2Sc1p6PQTcPPbG9kYfexMBckCiE8YsNTtM+02OimepUlRaPoVsFrSaU5Yd8oVSc0oD9/mSJJ30VeAbYu6fPRizwyyv9iWtAOH6fYetXKdOw73xEh4YJx5Xj7NZdnoNcknKz6B9i2bFto9LVeHtpL4aQBlkNaFQdMjwE/8v1Yr7beThYGvLiZC1769LxOjL0M4UhQIqHajDClFvQdp+wycLk0s6nzBWe3esZZ9hKyGKe5Ib2RI4XcGMnY+N3AKRpDW4dMcuQIm7bt/iJ7Hei2XIrGpFTj1nSVJjTSKeshvOEJV3PyKGVS2rxDCkrrr9QlilCBTyjsKyOhLZJEHH/43MSNIK/76cE+J1GpGrWksmgU1Y0zQShuPd6n2xtG5LBWlRW1xSP0VKlr9TkjFlvUpkTwAMwKfOnKWEGmYB9sjl06lKyNWDom5mkSN8ba+PY37qy1izbKkD/j1fmTLDzYfDN++/b4/PIV//LfryKYWIt/Tin5RpX2t+YFhbfnyyty8EWhXyY2vcfvoD2p9L9pAvbTGNcxsOlKNz/WLlfxU4n1ZKGsakG7dMjpCOY7N55I+jxutb+2jg6/h+JH3z0vnKHzf9o+t9hPrwAO1YpcActX78v14SNmwMb3FfJNbWvrLdzjQxjujYFjj0h1K6v9bH0JX36+g2yUAsD8kBbSxrwb4R5UP25WJf5bhjzAU/xW3ty6FuN/yfjiQAxG9w9up/rSjCsHZdqO9ogNUk9Rg739V0ncE2mB167H9FiyzIP1UEHIzsCZZRf4hrME2lgK0TVIrZjgSrZOJLegE2O/oEtdEO3UPPdbKqZXD4JwDEtQWScWmNgbbHGaqkBYljkIY1sAQzpHTpWK2zpZtLbg1Y11SHxM+0uVGqd9jOez6W45/k1HFwCUYm2LjHI4z/GJEs7M+OOW7rfmk7jWpaJRyn25rmgMfSJyMd9gXOengtpUtG3p44XehGvj3kHe5pHLW1grUtJHk+vznHp13/p0bqbiiRsZmTOprJNCxF7ClPs1mKjyxc+GNRgsW5NnTKNhdBsMS+w9TYO1wGImfKvoZPoMJNsWP5aAQrLUhxtod5bAsvxXSwMeZFjxIHf1fORSeMPxvOxpKgmtI1y4gKxCwt3B25pu94u+I7k8oXzyzmgKwAOcMSiK58m0YylrR6zVGOL7+BKLEcc1BMICUvQbGZj4JSrXnuKfQd5vNUiHUqMrdDhbaFntQVLBY8NU26PPoJ5pGHYZWGbI1EM2PL6ILZKDl9vPQz2X9OBkSEUcYOrNQBtRYijGVSkk6TRx+CkqYzT3eNkqQ5hFg8Mnu5nzUg5zo53n04Jy/Z9eqGUETJk8e9W8jPWknj/CrUWdOwlNyYI8aoxNuF5xsMDVWvLvqJSx3ETwMWBf++Z7npjTCwjtqJ0mWXB7Li6tDclg2/rfqKfycZIKl8KeiRB6blfTGj/KEs1lRKNTl7tqnyYHLc/lonojXr1bRKR3gqOdSU/7dF4J5/afUU+qlkdPZD5vb/T4mabuc5qnQxDu7+WLjQLoRYPTwo3FZQsqjxsrYaGZAzrBdkAtMZrN+UJQaQUW1HZDwsSaoXyrLuyelQv4nNBpgTcDuHLYTrmO4mpnCs4EcZVy8rGg9gdklu0ebi35f+L6qMlY6QGkpbH/Xe9ZpoC1k2k9Up5VamhCmJ8CwTvStCK2xfpadQlX98NrTrp0BGxI+vF5Zeb+CT2PW0Rv2Jt3X8ZKEo7RVi9VyiPfbYWQdMbd69FFx+fbSnK53UrFsNYomC9m1hmXIrqh9KLPK5o5ib57j9MK5TZfhq8jvNNgjlFtIwWlAoyGHkdDm1xVxBXwuqYAJJ9cHWMDN/k/s5UJIh7GjiLnAktTimKNw1aFdnDZUMz914oN7/PxEMy6umhrpujJcj6Ee5WWLc+5LVZNADEFnu+1uyZ4hllPvKek27k5QnC4T0PThr1742tJO1ceahcXcOKXmCxi4CAlN85CLncdMUCbJaRWJf/ITIttifhyGCpxLI9MSYkmjj5poU4UYUE2U+yxs5+ixzOpC02+8ggSRggUlqbHRHr5/G8hquDdvlcDizInUfhPRDgiKst0IKDE4kAVpop0W9ZjVzy8sXcPovaqGKUShVYVwT0KFipjART2vEhGHjbVVC94uIKciKJ1dTDCX+q4JotaAMWTrNtuRiaSBNPFcazlx5HCMDycTHrq2yzDBV+6HzlyWfz1Ozp4n5qJ2j2YZD4CVHK5/euOjmf8SipVYMFEyI379ZETelNf1CqZBI6410/YHWIxJsZq5AzaHEvaUP85zyxB7WPNjfKrxe2K+KOyIEpc6xFPoOL2DYqNfhLatlNe5q94MPTV7oj8YdNxHB4CgEEezyh3BM1kNyyDJv2qyMRC3v2ja7zhvqjmRVJx//f+v8T4EgRvgIZnD/oa6t9gbswIf1J2iNdtsZaO/MX1I/EdCvKfbdE0U69QwshO80slrAeSSr/ISCIgLuh9o58qSjNqX9D3bMguzPknHn5Fw8ELBiDUWE9n2/auRjQeTVubna1JVxS7FZDqEOwZ4DUV3iXky26Nw7+xU8Y61m+ZySuCOxjJlsRAIrERYTI4QhK/yEGN2VKtBXYRbJTkvSK0rwvXnYcT0tk+3C39ANXwhrp4UKoP7Jaa1WMKRdK1nLMiyBNp89NvzR7pb1EtiNGSFuzsMRG/sXlnKltEBSub32/TvWhz2yUxWdMRCLJXrWYSuHMBsC08S/hbf9uK3+E1f1vpwbqS8CEJduz+hKZyFvR0u00YAKB8xp4VKxIllmzHXmYXcP6Pya1eC2VBdLdxXlB9ot4s4LUjh2Gq9Xan6QjLwLsITV98peRxPBe4fZFhvPdV5GbCl/YLOGMkSHqyme2e+vuxj3XassqCypW3B9TyzrvMkt0uC2ZRrHzPmVx04AmjFgJHmSB5jmqhn1zQCh+HEdM7dR4a6Pqojf/YE7JY0ZpXUpVCrsPZluAWlJcJYsJqHniYMk/nBH7jzNsw1N+3zGUA4myFfQXcgN/nHGGwNYCuAYLwbKRd7d8rIqqvdfMUBdCQWKaxvqqyVyNz1ESg7EB1IVUQ6F0jBU53L+soeWsWSNhEk/S6+v6nj6rMXETB4uffJRMy6CuUI8ms7WkZhL5YDnzpy7gGmm0yJ0ihhgzCdwMTEgHKjY58ub2jyBqgcWyBDtzT1a0Kq54eVyz7Mto103NgLn9ShJiXEFonvmBf3o1hG4X2YAYsQNBHfgvf5+dJLeGBubmAdZSK6pAYe6ikIL/ijhEDEcQIJB8JJKSMZn4Xw2UpgvGvzmxYFg21zOchCaOBzwFpO+iSI7+mqWU7OQw8+6e2xhH7rxKYB5TI0QFGjUSpAK5iZzkSBbk1iM2Eag5jRytvX65NviR6NF2hFCfmhrNgvzCX5+cLqguF9bmFigr/yCxSYCg+V7C3Crx3w2mnblE5t2fSvN7a+tbvi6DYxVk6g/C/r3mGTDv1lhYugGGmrjDDgteUKWx2ojGGU3/hLtheHcIDc0Fm+bqs8g03oXtL8ZjWIO0ZGSBs8olWMzcO8CkAPl2Wdi/L5coM3t/go14CLwv/0qZ6TLkE3g8AgSdFI9kBcGC29Q8BbBtvR7C6brqalTy4T7Nw0iT/95OsG1vH+9523stLye1ahJ5i6BSiX3grDHyjjPS2Id/AGX+i2eFlJM/EitK7QaGYovCg4N++hyDIoGCOjaUJsDf6XN2hbEjrC88vaZl1IiVLlqohvtq6K18M6YiskllOFwA5rWG7ZtNIfNf+/PCiDzOjd4h1EdQbN8cveHQ8adr6aax0mfabY9MYgyDuus3fJxgnjnF7p6/XxKwkFiN8THE1wgZdfUyAvoydjWq8ELUHaJwei87FMSh4BIjcnYh9BtwaNzW24kD2PA4gWqx95VH3VCpnKxbs7FeFq+4cRjVFovhlFYd8GsQJfAZB/UZYg/fU+CobAOcDhrYQS9XDyhdd88YI1uG8Rz26wcL50Eu/f+dGzNYLZ9VLxru45es+CfjmXih1ECnVq/900JLJj3GdRwxVP8dn7rgvWoBOXGb/KSWXOP/Nj4jjN7c45br/q9O0zrY2kFg/UMc+aXb3LrCYQkuwjlU2o3H8wz6r7O9z+7w6IDCDUqPzLzVGwh0P0UTsLg0VqLyj0RwNC8wph3F/dQAKPeM9XoBd52ZBd82+sW3o/kdxYDsJdYP3BXtoTkle0iAzV8riQTkUymeUbowNm/cYvckH/PwEOP7Dr18CYHkn1oiRwILsf4RFrC4ZEgHAyo6GnH+gddJFxDIR8l9Z2sGUEUU3RQ2UR2dYccNhiJycflZXCGreabJAka9eg2sjb9iQrY3DXg5tO0HN7DItWqhMxyOH+V8Q3WSxnddMG3qa8xOR9YXAAuHdib+ZBFPqrF2BlcUaBvCWiIj6Cw3UnX/L5P5a0Rj1j8e3dufotL0buKCGvlYz3d4AmRzrFwjpaAwlm7lU9d6B0HhYd+NFjycC8b5MVU3Nz9AfHbShibHDE9MZGVjRZlcao5HxJhMHIriHcabV7IfsLaEVWFFUN7rvr+PEfcjgMMXQv3BLrXS/2kO3w5Qwt4zCFxX+g1J+s49ht1l2VofLebe2D3OAX5w55iyG0v9s6zmlHTts4YMA6X8COkPsaI/a98PENtk68rAw+ZIbVHOvBTPAitwv+nq855mf1bnKuN3aSoSbSr/7MZzvH5gaJKmCrZdeROYaR3qX/0f/Hat/LhX4WwDGHV2jfqiiVqjswil3YZkUP5EOt6yRkkp6WTw8fTDXDC1Zj6fIb0bKNSLRj1KSj+SsN5P+f/D7GMAwg1h7LLtimpIsP0QTJ1raePPj5binPYxg7xrdJ24FmzGKPOO7GlMI8GcJ24bNxL2IX92o3RwEvq5+ZDTCRBrjar1b/NauEvnOXfn/oZ75S+mvBRjBmU2jzlAj+k/BbCHRTGPJA8jldtJxHr2RQnZ/8Byo7jQxTfgR0kVpvjs9zhtu3WYSj8NjcVu2jnVG/AZa6MvPSw25E/mJ5yj2ZpXw3rpg6+32BmjTrQ91P5G4Eu3/+ZP3f7UyEuBsJW2sv7//2kPJP6Kem/QlO6dwAD9je6divfu1Hyc9GGW7o0As3+Cag4YGefgsTROaIbteMq5VLBVnctR9tgF5Z8nqq5R/XXkPhWzjTjHyj257X9XsC77Un0IYGPn2Qnb1N0AnTXax6R9RXlYDPegTDbXhzt7Rg2sXt5y23hHG9XvDx6Zzsussq5ZuLPeai2queckiXW3JkVUUXZ+f6wT7I2YKV6sSXUlvio30C6/xK7GZKrziOlfxSueAf1lITFE2CV7TzTdpyt4vpbcwy5+DSFhM5SrCr2D6T8lI6iZts5ErZ4Er6V62Z6Ru3SRCvxdfBvlWdSvyWy8M9egAh91CvznZH5/I4I+DAX47htxDsCWDwBNL/c+zCmwWrg35obKXaiKSQiJI5jT+JC0VwKF0nBenuEHFIJSfwoNOqSuep7+3Nv/lbZ6P0EceUkGH1gMTykKkOWL8PgJ9Sg/OCNRiaN/yDxWpCTSTZgAtNGYfcD+DFUDo17a54/9Nqq/9vIIlpl+30UQg2ndWnQQneGEYMJd1m6RGpGYrO52OZ7FDNa9mlbkAef/jRXVsFvFyBnSfcjTqvsLK4OUZUNjEHOKd1AZL/Rmetv7tUeP4PIIj6oc9Qj7E/Ro4v7h/mgD/s4pbFke/E+aXeREdg5gNArlhbeH0Tzg0fDoMXx3CFSygMZyOg7gnh/W3k1O8CBw3kEmVs1xA5HRTTBeMtOd2FdedsRxppNXXWTVP7aCzRZznIRiu4CLvPiyHQsFSwp2e0wBzHZ1lVG1jRdIoc6xCwCwQRspnyk63lsiXsuHrJSK/ySGsf5baxVo4p+orzG6GYWGiYk7bKVT4X9qbmRgIIBqfGmPbqDpLwrIF1bjWOffrCrX47lt7YTlm2vN1yocxDdRY3Dgsq5mWMofThHimEoyvOJEPF1SCcN9yMOUFmWpuVpHMgDeQCBcAqQ5ngXqeOEvYzJfRCvXqJ/avdX+SUCA1kjCVsZN42TjouVmF07Sv6NemBeszR4UGlTC3ijyaJ1M3AYbuCk5EWVlCwpdFA5W92acB3WMpLm7HWYM+rIwB0j/Zj1SzUkTfvGOYM8NWMft86f5TVlNV+6UCN0kfYCbRryRJgBLs8En0ws1y+Cus1AxKMS0PDkgw9FpmHQFxPDxUBiFhFSA9jT6xaaFkHZNuV1O0c9nSI1/xnB1eipNGIOGjljJaRXH9XlOfKDjnoYrcuxx41B2MG0GEaq3Dx/TO239qCPI+izcLpzvaaM1Q984OWmOtYwrUBWT+9OCd8mQyaKuK8kcENfjjjMRCB2NygLjA30Eb8M5v18Q4TQQY2LjFwRnG1EZPmda0wskxFRhXzi9a8D4Y+QKUZm4ItQGIsg3jSRL+Pe/6Xzpxf3/kfs/e2qZpSW/5eAD/9TYsWQkZ8BwPUxyERRTEg5xFrCr1/fpePx2qHs/yUrMzxTglUALMzANyXnAFBXeYfUwyyG/Assot8rvFktnH1JVidGsBJWBo7mSmxlbAa+do7NcSbzky71XKzHupl7lFvO/KvVVJcMwQ9E+M5CDTSWqlFldTX6Z5CFc2TgFCKI0wWY86ctlBQdT2n5+ru5igi99tPOb5ym3HXTVNv2UnCwG98Py4nWUBW6LG5lXCCbRDzzkQ7qxmF3EINSUGkNE3sd4AEw2T7N43QP5hskM7HzQZeRweEhkB8ZAr6TEQKdxhBQLw/BtHVUfz5wjQoHpIWRbFW4tujbzdDC+WyGmIJsF8hcOPiGxVeaq5pBJF7CZClIsj7c4YIuW/935VwCTxRghFtEJ4a77McbmG6acuoUnwhY1o4dH5E4DJujr1tOHUHcuFqX89uthMVGoqE8XpsLr1Ym/3MohGOW79yhz83/egW92PD+gywk4IwLCjGzwgJ4WAVG+GYSfnxl65fpvMDNolNi869ZxyqBPasqmYjZGqoX8qnoL0/il6movMux5fQkPXLjeyVjGzPvHgwPFOLfTfs/Js5wVnnb19EMHLyVwDj5GU8V31iRg7YZAOo2tAdAOKxpimoXAnQc4EQFeg/1nDL9QDFnGkLeR27G7XmLT+3UNeWea0vp9/pe1ff/dgzdbYzlHplivn1vbuQTk0urP2eXotFVixp9dLfVH+u7ID80ctXPlNMZZExej54DvoZCAjsHKqhQnZIrxNqT110T49F8wTGbxEBWZlCIcHMZ5c2BZTFXCmKpktNUoty+GvPykHaCWtSAXAzNalNCVGqdp9FZBgEr5pysySQ4fzsLJqcF1aZL8sU5sDMumje9dgpwsJjqeZ6rD3AO8b4eQDYgzlnpaMgTzT3E6QQjVQafR+sDY3MGAMjqQNhDkGL+BbhtpYFXS6EDEX2jVgSUhhmMsuMDEGckZA2JR9gDST20olD6W2qU1G+pqkRSm/obDGTyWg5HWUDKmdl4vMPg3jMApwMnmzNy9WJmwmrxuRIbSKP2RS+05KElaK2Oh2E2AmFjPNOWjR+c/eN6W5svDuCC5DrQeFvCD/FmOLxyz5t58ngLghRHCvc/UUAsigtTMGdEGpYW79ZGAUP71NK2iHFyjGWe6x+IAMEJ07E9wp34GgUQBRBBM1+bEG/rtJqVOWG4CUOGp2+ppfD85J9VrNO8zljBETA5oNyOe+2WE6drcfiduMHQaMBvTczzUmEkD+iMyHXn4vkO1ciADQDcsQAnXibs20EDlgPgDNUosuNx1VDEeHWtczNnAxgMYd10mXdmRPNLlDUzNyOLYb3jTIjaJHUL4YQrJ2Rh3ZS1xt5ge53TMEgAqAGTszAneHGqR7n9LceHVDQi2sjWmPui1m1jM3grPLc37/034v0Gu9VEKCevozs63baUE2I5cNqUZooJBYsC5WK7z0yQZcpt75mpZhQl5d0hsoq1EVhsiwkGAOiQ3/aS01ZiTFyABKMxWx567SIzdwAMkNUOMoME3hb7p9bnupnRyyZ+OhdApENG57m6D2gRAeAtDSVYy0Pc9ooTRkKps4iQFkakDDvtojLFjKWOFlip7dJayix3btOOjBvJ2/MA3PxCJ8Qy5DK7yNRSciWaHQp0QjwjZkeCTLZZJgBXbJdQCRZxARQWSF/X79IEWFwUuEdPXRiBS18P7zMDJCZIXZuGJVr6BhCm7bVsyBwy1T9LqDwcqATxXVr4b45ocIdW7Hnfc/l+sidiL1qMI4/x4DHwUJB2SNrDCRm/PY7jgiY4Cu2Y28CupBFtR5DzdhN1gSfPdMwK09Xws0YWSLsBcpOwLup3aesb9kBF1obzH91L25xTIPVD9Tqza8IIKHUgUq4GgKgGPAu7iVoJo44GzObiq06MZWbhoivwAGDI/YutmTQATt6/yAoAAAXrxdVsPOp5c1gbxdOTEmN3U7beyqzs8T2rptsnAlJG2kd5oMzoj52QAb63TonT4z5A3YtccZEIGcxIAHaYFLCvdSdlDjo6NBRqtqGVjZI3MCo2Xp4zYmWTuGpVICJk4g/ckLEeiGlgUbBf4WXQwNeRdrUb7GmqcN72rO0DflBmaGNiuFP8xvjJhnye9r3bePTw/9Rst4sw4y0oyNGLbzxiZnLSwvvO+fZ/yU6o0jW1VQQvnfIauL4GcXy8QPGPcWRzZfVTfVCIJ77iaaEOJOxirSwKYkICC4TFMuSrdc3dBK5Ci7u7/69n6jzgyysCW1gQTCNJlV54kWI32HGgZhe1ku6RNkvOMuaFW9NG7O5S91Px7QlhYN/KhKzZc2ggL0AL7bk352gVLC6iiDJhqj58DWkckO5ZEduJJCiELE0eMEYnJiMjcZWyJLkA/prI+zVCJA4P1Tk/HJTkvwb47TEYrW+/l8YaKopDdch4pMWdzMMojibSB2WVoB64WwucXVkSgJoH2YaTvvIx1HXfHd9Hjvsz85DcWAVBFIsyxkQJgfsgHBJHqyJf4JnEyts2LwLgKwp/IZFmDEGc0psSSkubTdawSzb0YdVvoa7k5liXhUqgrmXaMX46rEY7K3F+cbLLc1jPUjEHAc01GYkhEH+5GNsMdSD0eubjKXBsBgDc2LBFYuq9HmrmH8g0HLDRhxZKkapaC8ke4F8UOU95XBsUvyWURtGk9WQGuiYt5RZzSbkhZljmglTF0G6bfzbQ+Hyd2uyc/BHmnNnuXKIiIMc46nmy4Tkap3pqWkm96MqFrP2O5ecTh2DwkfL8STZ273kG5g2SOWg24hysGyxOhA13Q/H52s7XGwUzbMCkY0DD5qwMatg8KLDhwWDbPvzGp2KvemZoJjj7nf/dbSXHVYsdA5gx2SY+h1/Z+XyyWxqwOWd+9iSAf790biQtUCeUxJnhhp12KVzcZAfy7VqH5yIArfcA7BoIHdmkGgIpo03biXtP9n/NSejteizFmXnPt06vD+zsbdR/uxf9dfkkq71/TEd1Fd7J7hPipUL43oE7iyHWnbMbRruLJWd/n1FDLTTxtD8h7dtaA8MovkToU5PtjnnkAXKPYcFM2oTPV77rVcwEDTjaicZI4Rwz7xKeM1c3yzbN4CNye0HxQ4Y+qO28WsRMWPgIpw1yTguyAQcRZrtdOGsLMaZ8Nk8k65ELaaF4sYyUIxE1oIEmJSGKzHvUCvQ2DVRAe0H62YnJixnL/Ua8EdoG1/eWWAKHsJrAZVNKJCmlsk4iQtH+B6Ro9xOAnaK06L1mmQFp94qzaS0CmM1jv8dAGDR2IL2ZD2SaxKztG41cavp1gmtQb5bqyaM3w62lydD+F2/OyhbzAMt0rUEnI9mZOCVw8n36Nqi0EZHviB8PUgy4knq5l0mtv5r7vK+44H2Dcr/y1vIipo6cZLxldNei3bs10pMwF/QU85Eg3hEvhxNRok8blnPf9lehIrQAXqEc4bB3lkCD3XqL5vAWLIWs/Hta9Dj/VhVfFiGr45nTELSU7C3/qJTSBxaExX1NFLjlCNRIxk0BZjJqu2+44hzOPtGgc4AwRDadKHHUv1qeQ7hVFv6V93UdFAyuSGArOZqnsMxHx+wFaNYQcaFiAV+uWIN+4PoR/l7Iiyd4lfhw1xhFrIsT95uqsYZZEP5UtR9e2xSVOx8dulm4idZLOwMFrzoWiyO+I6bknOrmmhXFFswTMqvEX4gPX5E/YcZRrJe1OWaP0wK4FkhglveA+zJBEk3uEbFUvS73mDiy+UKuiiTQltw69dxBWRH0iCHwAEGVj6W5W92zRG/hNMTdS8i2Vm1/rZZUgUYrHiW6P8mZEagE/UkNOoFKUGQCjUdIVOQXV4ngCcIhvmwqIQ4URV5WEUKCedfZ/xTzDKgEweQBA6CIceUHXkxWE2em0USIV42N9euNB2sYDTOfErZBuXBfgvvSUt476XLrTbuZ50DIox14N5fPYdR5lzKl+4Vi4BEQHavRMwNJLvtASdQF4r3K2flfPQ+DYeYzSS1yhq+wd5WHXp6BkqoLVnMhBFjeZoKCAih8bvR6SbCw9KXXNAXbZnyYA+4Rs50aMU1hAQ4GRc2LKFW03cQCOZebUc53kOVxIVVngp8T5ijuU2aAxwiM/OTbvorPW55XykpCYqqSLduALba9xzyj+Zh2kxssNQllfy8sPB3/Sm+H7anuJ2LOIqjFOh+3ObPbAI1qCnvXKFg4sJJ9pgfGj3yDiHVOovAp/SQda8jFL/zwvNKROUYKR97hsQc33wGKFSgLT8iwUCwyrLrO5tSlEeKZp10VJ8Ln0SExkvGf4Jr0mi8LVSzMPnW2xUl76qGCyVif3seHYm/ZXjIwFQGkwKnrQ7M/XXExTHxpis3YlDy/2/0YkirXhdSMamfvjVs083w6cHcwdMontKjdySoBMkEYl2nNVULhcHmKGP959/PKSHsVmBKigNxHEkI3IceJIXW6Xs1JIKt+OmhEa7r7FXOoL5dMnMkpJgyVaWPCcHziFKKl5YXaYH0EK8ggmboPo2IVpfr+wrvo9J6aA8dO1CguwfI5XOymrXDer4OV+nspjb0XVJLw93Ajg0/ZqPR8LC7mTmS/8rk37v3as3EmJwPIpH1ngsLID1U9FsGYbUphUF+k4+Y8ZhuO2YE7hyLJYdxvmQfQyjGFa+Ro9dzAmncIYUioAqSQtcEPIqBXBVaNq0vqV6nS5fTKvYTQZd/VM2eM2iS6ccCVMqNvsaf+kdah3d+ZwEwo0yscC/qh0FGvxddfx+PANq5NcO9Ab7WQ9tdKiOt6BGENENyyzc49UfLrDPlCMsHGRW8zzRXBrSGR2yGwMozEvNkjdGIr1wzlgD0vL82dxi6+gsVpt6HYelL8spCpY0lFubGpk3rUYJXUGFUmG33/Ig8sqtrLFk3V9mzgsUak3JYbPx6WxiTjfAEre9KA5hdIpuAzKNGuJMMP73AIorNw0Iza2h9LfJ5zEWYdtFzzoXcGo3lJyEXxahevdwBZst7ER+HYUpX5bs8ThS8D4mVDg7CdmQB7eP8zMt99eYLHx7sGWYnmaZFXuYofCWFQjgwd60bl9KH65fTYiPWzKkR1W1r+4C26soBW1FgASFkD1AWdgtBhL/dhGlKp1hmF1A4FNPg18CCG6Toij0cO9/20u2zyMYS8kruPjzBSBcpoPIFpQlmqx2jHfo+aGDFa7j0CVebXN/CyvEWvcNA/20T0BP3xiHE9uajnJno88C0wMt+aiOSZYPCIHr05zL/ZI+eMvqzyIM7OQPiOt0yen9P/RlI8InugAk8GKIQaVytwiVAgQBYa1xz+K79uiTg8Ald/xGzkUzq9/1oLxT4roohMMkeVDrUNFYqzX6TeAbR+hTm73F0H1ZGG1zggLVH9gGpEB5UmUjyD/1QeS+5qFkBtcIi6gS4hKI9LetgXU2OLkrqS7i87WHsDmzh1LsFLs0UrtyiCtL10PxOyMWusXuhvdGaGWUHfzXz3ZcX+56qI+ZlLzEGfMcUDj1w/kebJ27mHP36Om2rwE0vBXQkGoCr+1XP08fG0jwB1x7vcTPQAkoENfnYXXB4fkknsxa23ZE65TX+f9PWHwE9WXNUVsw2mbcvTDhX3AKKwGgLITqNwUZd0qwdZnppfYEIY2IaTsRw7gOi3PIOd6fFnaOEhw5Uwv3wm1rTOQ9lw6MY8MgxD1HmCoW4clFYbZMKwoWXl7qnBe8iVYKkPCh/5W+mrMpJrevw1jQNj/lTumN1FQVb7cKgAxbx6S+bpvH2/JARQR8zc/wUDtUV+S92hrihFBBT3v8Y26DWYh9YpJSr3JzC0idU2CoqL0BulZjBNsX0xGxxyYt9VRZihoQ9E2NZKXL3kErt/Bw8QA9NM7Wc4d9WIafmaz0TVF2y4YnjwCacVCQdqPs5ZVA1+XA8cq0lDBruEeihvZntLz6vEX59kWU/efTR15W68E8g/hb1/1hxGfV5EIV4jEOmAn0vL5NDbpOQ18sUX5ML7IBauvNqCNxTRmFA2GMrqTUQ8v8yFYOncxLRMxTgeT82CzVcvswBmkVAYo6vSzFBKeCcV/mXhy+bdzC7PcI5tnBKcM+RGCf7vtKoDoLq4LQN8yhfG+YRvbBh14S1Da+w0f3fEsLz/g3r8lyvYHe3ecx09k1iYH2pAyqAauVua39aKRSZuQGNVNaYrtPDfql2ipAx6xILApr7OpcqYPVITV1U/Vy7+XbXC93jYLea6qxRxxRqNg7wE43hbCErhzlp7XIwXSw6NRUPM64wLEB6DFccpidjGQOZRLna6E+viLKTTzbI8szurQqQjKeJS5AsAsXt/7Omeo3y0TUs+AS8kGqs1EogZhop7KXGcbSMvORBxYyE4ZVjiDpfdLcfSwyxEU/TWJ9PoZeURVCXdnYjr+4sW7ntpYPyzBSF5+gvLDXGj7rHLxU3rz5qRgv0kApNb1v92GR4rhPh3XSKRpAmEpgwBEJqUNYKSrowYNrAJkhIqexF5ET9HrLGQ4xsQAFFqeD4BLI9yA5P8mVRG/hK5arZ8151tF7bP1hK/YGceJGIYXv/PsHW+vRYwIOKUw/fqPpjteln6AJfpWcAM7bJlNKkW7IjDsGeBnaeuLuthE/qPKiUq2VIpC6Ubzj/1w2JJw037aqgbslLf7Gd4Nvah9K4c0d1QnSMCueMrCh/Ole2J1F67X6k60RrswKt81D+579/YXVDXUUNQmlYJLdoyvosaf5mm8W0GOn31DfdLIKC/+iTZkADA+B5g72XwGWQextd4ywF20K1hfD8FC0l2A5j+I00tDTfLqm+UtMPm7j6NlbuP4CWIHUlEMNdppy7FEQaMAosayNn6Nll06y9Y28gXYp5x1W7qv2OEk6Du9tnMDRxctKD9iS9WtJl4xEmQozO7I7uXoVmQFSxOcAWGzSE9Q8yzYouhpr2fibm1HhHSr15TWxUV7OpyT2/EgV4iscC3fXxgb/baaX/IdcbnIFsx1UipwKO4rw8QGRNJ1tB01dzMptJCJNsM0IVLi4ufq3BJM2O0jijv55RqQrCZREZdW9+QP7/LeUzCiPN3wqyX9xTxL6KX22v0SyuQcyR83a91YpRdqFyM0tBIiXxTXIBwK0WdhxrzdszcwWH/LzL0VxzFVuXk/VBNQI7WJWXem+Yw6j0h2ywEu5RoVBuBA4ede6wZLCUsgLqfWGB1zSFiDyXRtOfnSpal8iQquvVlEO13NGLeUCW7FePcUcJYFEaJ8w94idDHw01U02s469Hirschh9F08FCdKQFHdCSTOyzQyXpAiGGUxVw86z3NnLk43orZF0Fzxw0zRDnqyxxcYT1i17Zf/+tpE7+lJC50AmTnO9Ds5qh9s04/KlZqaHEx/bpJQe3Lou4a41tuOdZSyOt9wDzGEg0Vur+InPmB3IQebDIz7llzmbG/fFbrk4jGB5mBF0p/NoqRzryiyBt444Q5mL+x7zkefBGmvKtmMYqFAMNngNLIkcGYC5et9XlMa5vqqdZakXnWnJ4PksNSHL8uzKBR9wIIlNEKzmq5ExsNjP0nUso0A7FU5s4+gJJmG+RTXGH8T+6HxrR4w70XdF5P0XNWJvtTpeT5+WiPcSkJI+JEq/KZ5HXmLRRN2QFPB8q8FewBezdIqqmPGpMDMHX6Jss+F5209AFmfdzoNoFKx3CnmvOpo8P5IPFhqfDy4ZGfQbtzGgk/m1w8mt8VojGwe2RXXO49TLNJLhthzkh0GHdYXLkBPMK433Y5pLPqpNct1bKZQjE+upPQ4KU1nHz3NUWZCUari03L1MJw7l1lVorlQM/aFeJtgAEaV9GcoO9p/V4EsBiVEaQBxNBNa/zsiUkctH0rKocREPr1HIUoDjE5FZBCs27rHh5/rvJ93+8n18lqKJQIn0C1lID6Y9+ChDf7wFEs9KptngHEI+G6ifQBexRQmNvR4e1qx1vbzLGL3Uwg7lgpMRTpP1K6ZOqwu40u0Ob64yAX6uqeeYIT87B0AYA6a8WlFwUnaG0MF5wZPUtZu9iVJXKzZcmyhq451GPD34qnHcsfoiHKECYb/HwGOdu5GECKPD9ktL9cQI9i/QatRyDrbBSgB/EolXzMMNnuEnRx1QtHz6E4QkuZfPc8BDW4YjrwHfqOg4dfenIlRnpjnJmn6UQHlkT/saPDjykC8Al9Q4IILZTY6j4Xbr5hK8EoK+vNzto2Nzgx06Wch/U5RrYPfFvOiv6nk245WRbyaItCYB1NSQg3zWdgd23s+YNNLO7ips+fq8NX6LPOfrK4Va6OcIlgCk87N9WhQyfZj51h/v8KpMO19vAP6h20BTPxsEgBxMQXc7VfM40I84EllUt7DKQ4757AEaMaXPz2ujr29Y0aDbquQ7vPEyxPcu4SO4ZcWOZ4WcnHAezSQPFa142+zVm6vtvEEx7aexd9KXZf3uaf/IhL4wxHyH11sJlx+RqdfJTLTQ7VRYRPwhIZHvD+yMOgGcnf88kfOA2jgNN43G+4Zjl/W5egXnDDjib/fsxTapzNUpbg7RstIlbS279UAQVHg7xrzI6mMqpD9x8IxUN6Vr1/UUNhHDMVGHtPHkBe5ifemTZbPTlftXnSvqqK8Dz0MyYbJBDQTCzW1ryELCJHMwwTdxj7GNRnYWCGU54akwz1xPHNj+R2oPod7V/0yeA0eYQ7mmfyk7wVTB/CGzJ7POfh/ZvwIC7zJ34cYFiLXnnXv03PQ7aVzcgdti0MuPZYQMhotN9Q9uqv29CeiEkat6fcKRmDvdGWDTM0Zs/DSXSCbtSlv2yffiVFTnwsgMQwpBbZ8iRUKFVR/BHExDtCn+szBfZmblqWU51wmK3LQafRo/m0XuzTCp/2YQ32s/1wMMwWAtpDKvkA958oCA7T/wRMi53fqZfklKaFcYVFJXM9iQnL29LSnCbSv9klmIcaLc22QeIA7oGs2DGT93xj/FhxOlKCBDftX3AjZiacN0d4kWXtXXb31+sDk+62adFPTxTn+m6SbTLwu5qNx6TrEzhR1prLPFsXS1k7nieg8Go+v0oA+xVyEnw+vHBWk1ygOXmB+HgUmpfLDHeYFGfFyXc2J+fPkt308Ppf/pFlksp/bJepkx2kl0XSyA2i6jdg8F7RmbtSZqhthV/O+xfGXbpH7lH3g+LH1+6j2Ok0yn6PznpKUkpkg6bgMpq3BOUd+VvHTbjDrO8yeyJ++4pzsIURRtRLAEKmNQi5dvA5O/TJTYKrWYwQZwHkM24erpZ5MiG1Hj8nGFb4U0VCjXpgxmjqeqZSCzD5AYMwnvjRNAlf/3DtGhSUxLTyvhy/uFa2vcrihn6iHBkF9xFq3PxofP6ie7fOQeJQrv0GH9p070Ww76cYkczi8h9O12C4qu/O+n/XLb5zNKJV7PvRjyUnu1opp/mbmL2575GAS0Mrg75wq933SbejxbZ2bErvRUw92yGOIB7bPOV03ZFRnPHVL/Rcc/vunQ5o6OZngn7/s8WhlzGNTBlievj+dJAC2MImK/cxHvE2Ft2WEiij3LzI64mKJclywnlmxqFpp/FtvvROnyOMNW4w6KPb0ubyjXmCXTkuNMqMlWA8R3RDmTBmfm8ZTgFG83xBullGHEkFcvFcumVCB3OTLKjCHDPbvQDIFVU835N3Zy2r+fazq+LhdI4RS/QWyJK8rJtvGnaEO+VLa1qwPWeNi8yFsxUYimO8LkfRiE9kZle9zTB5TC9YAmM46WQwuACsNpOxP3/NDLq/kV6ip8oKClQcqVhk1gSItbmBupqoijPiLyaCLdVOUICGZvcX1ZMt5wqkx9K9lKmLLmzVairAhcF1Ui+m7rlTTTGGXjUAiLKNaLinGmlYUGuKmgxmIuca7IKC3bglHwI78Sj1e0Y1f5A11p0kiqphBGVODZiiCTpLS4YkmmiL4larjdNmooFxp3BAPNVvLDFkyzfYDY54a2WKDZvQsSg2ulDtBqb8dsE7JHMO2+o78pJXbcAfdVZi9s5KC3g9ZamolQcIkCtAfW0Pm4SCVxzlmrf4GqT+u3D9Fg8WPH51U0utK7zrD+Z7817phDtg34njpmB8KMGTO9P8vyMMLKMTq/7Ze6dvfSkvvv5thmXXAGHrj4dKuVICMsAjXkFGKE5H66Eucp7CZUVNhZp7uaDindSzA5LXuQVnDXtFv3Ib0Hz70SUXMuVwkffg4J4gjurXzTvyXZKeWkx3EIZlIncTcfkywjEUy+K5zV9D1deU1ZOJ+Yrr0mbtMg6Lm92QxS85G9c8pXrsDpH/ayvyu/PXe411VzSxsiQWALhf5ioNHuM5Fh1XdgXc7mGOKzPjKYi7pca3sKvfIS+3i8A784xK3J5i9zN4MozezPO9O2b4Hkos8cbpPwuLzI/ID2Hywdn5vI3G+vJ2HF2WrYwGV2FLdB54Ujpt8fX3msV6OdlfOWOp4Ei4Pu91g/u/FzQUFwpWy519lz4d98jL2mXY/CUt3gUoHdFqh9Vxz1UdpbRdXLc7GXdbNPJchXl/zHx1u5/E5gUz3f+fC4OfszRarvNozmPwD4xNPHnJN3TsCEwbfhIYiGObmJy4Nca7OXXZ3VB3aIqeQVL7Ix18zy6XnhvOKMazSTG60p2i47iGeCqzgOkCziMGDiswvpKvDSdW8wlLf+Sa9u5R63AtBYPj3hSKLbHIPKw1xG66xN+088U+no9jDhslq7fmEfqUHhyO7aSZMhLs2AB3YXNFhQgYVorXuLcGvnYh37OB8zDTXRo8V1tdVybeutA1inpR/ExU8OwY1WogTwjHn/gWPwkPnoD39oXvXeUDvkF6PVBr+rNDvtZN8sfe+Cqf4BgWKRgjsP4AsWH/iNZLw9/ndEJrIJH7bHINGhSqWvNBC0ZzG5PN9YdTsC5N4mXELP6Fo/GTvBvnttB8zyBZIsFEHAWQOP58jaJym48P/cQDwWgYaTMZUtE/c3IfgNX9K13HOptZQyDheQhZOPVgmjmZoC+2jD/QArEpHl6Nb113/zYyNl9ZrzOuardToezdEahpOg2jV3rHmzVI0vlQFbHRZqgrvvs1fx3//Yz8vw3JIqYALNX+WN6jz2dDVnu+648p+/91uUNkPB6bSZLJBJLkOGDJ4YWts8klmUsTOQI3cg46x0FE5oNx1pHzwRNyIs+r+RlK93GOHcN0vAKJhahCSTpoh5ch83sHoBHhjlr9SGe84tjRNhPiqK2msFFOh39y2wLGeELm27yGJBpGFPLpYFVeJ6k2wq1rMC1GEwOX49dW4ewL73Lp37/xhsHur0ogmPW/ZOTSRS35Ifss4r2SL9cPrRNlL6Avqdzn30Sxsp/dKJQer6xkyVptS7Xa1TsnE5zgkNCIHGXlcqtuHrKrO+PLW/imdm0xIfb9aUVuKp0Ns9izFgeGLJ0mAlOS5pwLMesfhoePcxVzmFt7syCCanWYMdvUmp3IgmtiuS7jxIgbNzuaQf7TeRaZs+KcNwWPohnvgO8paH7Rjpv3CC02GaleNHa0z31CPVbJHEu/hilmcgLpqw+oqBA32D25NKxYheq/AsgYJPf8EsKijcGFjy/CylroVKy/UkCrkmFmSTw3C7UPVRIz+aM++4Zszj+2P2PVZ6D5NdkCGxBcQLUrJ+hOnu8HoSTNWUs88AsnCv0nTHSB56k7Syer9DzOhAu9m9TtIuVsd1YVoFbuObuyRivFOCTHq5IWjq+pZLkmL9ussPFNXkAbymBnrGleLFI7CbLqt/LJj4PjdA1X8vMFphonHNbdy/7QGO+MgVR5UXTDIo8slsQ4SVbcA1ysHwcOwznQGc/bodIzg/dllNsYHoYIFpPec9GOYLyAlLNEyQapk9V0DowWC9BlS4rPvmx9xywr3qUz66a99TZ76x/m04oh9bWJRt2lqMklS1tFYV8X+T89djO0wtLowIPpXsDuPi8IEJf4iSPq8VI7G0avBc9G0r1pjh4zNwC1JjJXc2msd0yxwDQe8Vxr7TsUl+KlPpwnvh88mSTM33Qt9ZImX+ldL14bUcMZcLHWxLUhUDWmwinWi0n5hBDOsWLQehjcmy+eT8JPWMRsoafZK5RJy0lpD6w6eWUZ1xEiWOZvQF0zAiclKsjaAIxQ4T+fz++qgIb+d/asZjN3B7fby1l+xhhN8FVnHl8iVt5kzpjUxZ97RTiou2Y3Dnk6nBjlQO/Jbq7DO59mm4s8eeZZNfL8AHviIGYz1q/exDxzhwY1pVnZT1z+jfX+8eRNeYfGuxfioZ+PxfPYGLbD0LC6bx+Xw43FmBb3GDSYlWCOnWXGhqPQEi18D6jLlE4Tk0t/rsBDX1L77egO5/EdEVnbZLXQW2+BJDLqdbG+7q1jxM3zuEhgXVXqvBMmAq9suQ5bgef9KAYE0yimTTOtZ38HZGCPbPFppT8hyCl7IE5shOTLn2cY61GrAvw84rFfDix7E1B0v7yiTqSLjaJnj/Str6Tsy1wuboeAuVGmkAm5bDTvlMChtV212U5/InMGu5Mu418zKd0wJGkYXZwu+CRPxYsvdSpg3+MA8wHJud4h+JPMfm0Gh72x/sEJhCmy32XfPwbudntINuNSb++oO5qA/18rwvF/7ZrKhoQ5xobmCSl6PKMCyOvsiVIQQF9pEnz9DDB/vIz6Czsg//trKxYIQR+RBXQYLCCamY9nW3Z8Ob+l/Wc8JHiaPM636qJreb7f3CDBXH1JHlcgaXxlofIAdTnEA733b/wom4ikVwAtTvr1Oa0SwDUOcFHco5WHosa9tBJdROM41psFBbTJWXHydw7iqoJhjDpxjq6JAcf52kd6FJCfw6YryYApjaY20fyBphyK5TOF104SBgOvafb86rtPonQmjNcW0ITLFSbLSViYxhHnRcb10m1YivSnTcF9Xx8LAm0rf1F7Fdm1cgTOcGMSnCFpcbkG7HWptvi5LF6Xh+FqAcmQnBhOAECrSN5sXbXWoUdPp+M9uFY7Hz32bV4pnTPMMhiCwQe83zPk2Bg7CXueZOGfmB7EtQ4VDgu9itp1zF5pER8EF4t2nELrjvnpwnF+vp4dzQHwScSjEsgni4IuDj7OVeEv/uurCMRpnbusf9sQkz7/KPYfGnwvYtEO1cDP/l+LGIUHOpdrlAGyk8FPMpbacNueQs8Mc2qGmrfJQdhbSef/quenMSp9vRztt4HhVTa2znKjyZ28vr+WcK8m72eO5UR7Qapykf69smGOCP7o1aNbDQ/0B2uLAsVTSuw3E1rs44NXI5wjUXKQpQwlyX4oa+dBEGPah4UR10jCDRWyKwkCRqbZD/1RxD36tfeUZWLghD2Dg/ZDBPU0E3z8xGW2rZ7zc2M68rc+5zxmnKiHXUaMtUt42JbC4Zvv60Wnh3gX+zLvezRbcVZqqFg+kI1fksGBWe8Ufk34/E5hcyTaVpAeBKgKLE7zdSgXGrdAkYDv6zAhQP3Ml/Udx1OVT1m0mOjccBowlFcJ4kLN+ef3bIodwc9I1zJFta1tUtfheSgoUtv19bS3zbgfNqwubo+HeEuO6bRZDYOXfARg8cO57/GhucsCN6IR4y1E+iPT4uj52D3zmdoGjNq98+QpWcNJ4cLPkM0G0koy6Lu/Ty0onLy3kKBAEIK4zAED5S6P/3u3qqXg8Y+qBKy/sNRkXAVl851IuJLCv3M7nis8bCAQdR4ODm+KYrJNvsz//jki0jQS1Pak7/6TA22Kp0eXeQFvQNjDj+s8Dwqhdt8UQN5M64axNprVM6sCh4sHvp+bXJ/bcy8dNy+XGBRej0jJXc7FdYeQ49eDNyPjkNymOwUFLFLSbzPpLLwFUSRxBNdX2teA2wsnYH4Wt2k0nBEROdvz8wF3StiFubjvp1/RZFNXp0J9GlrEiLJuS+GFfAq+Tg6YBFtH+oblPRTgO9sSPzH+UvmQFZrmEkTw456ftzm3TTUp/50TveD9J66BtYtxwDnOhsDG2XDRt/X59Q8daqgJS4MM+7z/LVIScwDP5YoMzb0Ajyu2GuVyMPtQaa5dCNqmUbRqryIbKnoeUob7RfiaAosIX+6qFFKgnyu1wnQtEa+/dQadAssYjgRW/XxI5rJUkIAmnXol6mX7lOoO1AZpYhB/LIbpxqjCPWZ+E5RySPhcSv4KknAYO5MMv8yQ/qgKQyXJyY+RJwhmAFS1zwLlly0hY5RwJqHlEAddmF42QXZUBIT6kUO8KRGgd0aAWoz8GfYF9wf1/pv3/j+S9/9RvP9mvL/v0nuoDCnxKZIEzgwUZLuuyP1SrYl4ZQsCvTTqrqeHSrnFwCRJAy8AQlpxm+2XOCfklTqI9NOr7+WtSx4YWFTHdCBMgb7m9LKAy4IOCW32bDvq1nen7/Xsvfi7r9mu/M8fgDMt3KWJtEB23ed3W9xQ6msv/R+o37y3TO3i7/ELohbAIwsafGCRgxiT7nm4bXwN2A+OUzPLg/rdQHhDdK2lFl8U/IeKH/S+bK4PoYU6CklZlIMHAgWgHfXBCS2Xnuqoi++oS+AZVvFyqUObuAgyfoAGLI3gI7ni/dYWn+wfKD8vHHWWiN9Tfl9ezBc76JcfOVUEIdMkT/jAZ6RV9mFX9zuzjU219XxUcPevjpJ2Pkfm/Pgp1f3ceY4DDwl/6fluUps3ZNuvStI//f9Nzh5aTsqT2ML2BpHPqrkWQjAo8NoohJA+en/rWxDIe/vuVx/JPVDklyEKZpaGdQPRGgS97PyRvMsaDA2eurWoY3aiICENRF9m+VA5M5+RsZ02cHHVJP5dzHPyGK3d88qH8pWM1+Jf2j+8dqlfoAQK0LF2K+a5sU5uvs71dqs+1Byaq9Psq1sp5PJUQ7l5QjplKDd+STD6JRaI6mGxUqca0tvcuNuZNU2MW3CejmR+KzKr8wi0WUd87YZ+I6HRV+OInAyZAebkd3QdOtbc48c/K6xQNK+XZmqqIOqNAEeoNGBleAjEV4cAa2gIJAeGQE4P9e+NMVQ9KtxDdAGUtHXbSDYlDBzeMOC3w/o9MoZKtM/GGPmCcAYa1OWbfPhl3yRnVgWQ0nPev23CUG2gxMeoQcYpmQlvKWdtqs1E/BEQWGH1/KdJEgbxiQBwysCWchaQiLgBEFABfRd84xpxV9ZdLoYUeZPqjtH4qeXqBTtVAVrUrHoAXHKm9fdAM7SaC1zM0QZOGsC6Y5nzV/8uNaNKcEo14Hknc+sUIX+6md3j39FCad/BMrsA4yhn3p8CXX2WniAcfuwl6CWRpmDs1YRQ3+ElJha+s7p+NTlL9KX/YW4ULbEghnoYa4+Ms6kNRnfsU/uKnCt9X3cE55Qu1rX0sNj3YuPyTO9v0TJ1Q459agxmZotd3899sMaPnKECMRGMuHNAkPCDQM9BfT/voYXaoD5HsiBZABl330O2X8aUirOgMwUlm9kFtT+NINC7F1BQ9qUbVPf4S4h3jyTInx8gsi5PAHS9MAfTQNI98aetJMLZ73trBhJav7D6IufxPTuX4l932ggGHU7+DaLUb8HENUHDay5Bkx9kYq/Vt5cDj7jyvX/i8cLeRjNvIDa+v4snrjGEhEGWxYrFUa0KdcfBRYuo84b1luMeyk3kDQ9du23FY2VMpGzwTCKtmrZcdTIl9Trwonx+C3H+4ssLjopM8zaFIKkxGXku4/vZw/00bnVif7bPwPMkOx67yQ2vdlDCkL0/keFDmOot08Jd0v+Bz46eNdp/Urs1EvE7sURPHKpwM+42IZC6EQCZY8GVfT+OwZ4JcDcut2ZBct0lyLqxyB0heCZK/PzylfVX2tiDXgkK2PF35wL4PSu/XmnMRfID4uRvqPF4YnxRfgML/BAc6Knv6dBT6rX4jiKh2MQnLdDUvUNRhxpjkWeuYM93+W6XGi/yfajjPXkCY7NP+hYxxEOz/21lvJcJIOFWvus6qmSzLZ2aMppHOig4BSVpcUyj8Vc+lj4tu1U2yMYpJHPxEPZAixY2JI/sYvts1HdbVgLds9j1vlI1ssyaZlGGwSZMu1Tt6D6orcq3IOlXUsjoGJXEIYl1j3NHCQsuzgWI2rmpcBIg9eiOn+anzAOlLO6ge+1uiD7sVHLjssoD4vkrSZ/uWeCDhokY58tQ9hoo43LV1tw5lsVyTQrt59v1BW2jtW278ARsdwdVobn/umZWq+K9OPMb1HE+Eu7UfnQL+DWcr4Q5AKP+IUfHNrCwkynW2X/HUzrG5e9diyQnAHI1Nc8dDqDnHhaSzelndq4RvBsMFfXnzdR7brqeCl4/aAVOLf1UPz55wFr2UJNyzd957MKKaIq01vSeynH4m3v4J4oInFOypIzE/rNDrwPMDCvi5njOf13yrSnjo5q81+WG63SxS1f8bF6pMOz4Wg4B5937PYSZw9cajEO2aGbN+J5nWPSmp/FlxoD1C/Mxgf8gXv80Vj3orXV/epD2lcNcLNUavqUlPBZ9IrvylWpKQCynTID73sWJTFy+mkdNdobHmA8R1dmUfLSB+JaJcGohqKsFmVPwgiy/fh+UQCt4nM/ykvioFJ9qHOrX65xPRndnM0WN+9w1tOlGOs9xHRtXL/XTOP2f0rnMT3H6hb0xQeWq1gwTFu8Jy/WhFelxXmpWFjEzozIwhPtQABtNZI+Lw9ufWa3Vdqi9o3gs5tslZZ8/irbH5eOFFITos6/+vXfO7fjLsrK98bL3FM+FR37cH0smkwINpLa4G0WGhnsJovJc3H0oIjCRuUgxRM1BEdlqHyDb4bKYzn55yYQQIrMjedBkb1Ig19ltczwwxKhI6orLPyKcRaFF5orhrymIekDjiUBXUP+oQ9Iuq8hMIT/e+usGkdCOsVJptsBEZrr4PAnRkSjgMBYvj5po45HQRs/SVr5BaVUMEdsZdZSy16SIXFf+TCFRlKh8Y+oOlIKW1YWWd+kkq4KgUyL1hV2SsNmTCug6+SsbmiUIciG+aES7DDcWCe0U+uOkqTwHRfwQtDgLfYpLLqCfYf0jT7nfH0gTkdRG88NcGXhWOUTsVwExNlCR0s/8MgxtaFHZZuSIVedgIjOF3C9X+BoZHHg2OnidARvCo0IBwSu9ccDxGJk7Z8Vktn0FILoiEWVGuqdAzON7qFNh/UEwLrst8xfibYGnhm6AG9n5cOpFvwDg/mGS46LDfu4BTweMFw7QElFaxeXCn9FBhvejeDQNLetR5BxCxqZ6iC5lvv2xQIHYvQElgQDy8+aw8DYOKIZSUT44+cEE7KzqXNJ2tMW5C1DWwcAqTs5ksekHqDPI1qHRAo5qVTVXc9cklIEloSikhq3sWiRbljrPAwelMKcc534vWVzt1YhTDdI9l9mwDVYjm2/iJUJS1hrVTJ2sunGDabvsJcQ1HpptZ6nx+PGdYY2nPwUkUQ4lS8Tjnvk0C0S8xoG7MBPya1ybM6ZbLR04cN7/3VXjc+lGhLA2lLWotLp13mGI/uQkFfNjP1nM2PNqzuQ5hSdTATKxqOq2TuKn0CjjKQxlPkWwUOUhcw8R2ZOHyRZ28RRnW4E4CBtgxYLqdHsA/nR9HdqIeDnWSN/TeKCot5MJhK6IqhpsAEJJztvaZk41w4FMeFUgG8PP/VJgJhyC/K3jFHPSVXODb0JBbS42KXoUvKVruBwU342CkjT5Ki9BEN+jicJraVDz6/0WdM1ST3TIsQGDVLwRDgu18aHUKVQl52BOwzLOSwHd0g1xxU9ZdWXrSxcV7mXzhwKHIpILzw8AAUyLQpEMzqWBKHCiQhYrqeW5i1r4HVJzu9nH5L23SZtDUXt7rlaIHa8wokBYgE6va8UCD2XjxV4dycKSBvxx9ju6hCfX6Xw/Hx1r9+XmV7aiurpK+lneOYIAv/nyE7LARbYFYUNzzYLBcB/UfbDxdjikKv1hda90Z5rhNDgsz4zVMNpAihRR+mPN9LZO8rbWEtZ2WUxiTRuKCpyBSlkefGngGmLne5EqEKblgny0MMf+apsCWHq5JKkaJuR0UdEs9amW5qg+EYop5A8FWq8DuLWXKhTyONXB73d3yTqKpQihkSxAYi2XlflhHAssNzUo5k9bLy1CPnWzuoCPeVWViHVAVaqbM2iq5hkulP4SOlw7cRmcCx3B8nxoi6kwqHboZ3RZC9BCalIuUMJ7ljC3rlO83MEGb3Quy2i9nQnUz8FxxCrYGKJN2SB/RYZl8NlBDGOLwDiIcU7L/cih8awPsSnCgi5SwhW9oo3dGBGo9elbC63cYOu1cp940k9mRelCSfR8Xk50E9X4JjktXiV02yBox9zx9gaYKB5xPDe7VeyfGkXdMFeRIghsHAJMJTLcJMQairSB29luj7tk4DBQCfsjh5XwmB4DvxyLQ28VyF1tmBXOofV3ZPKBdXhk3ljPxgI6w4FGfOdf40Y1gWqkhTdYX+WhG9H1NrFrt0/rGHR/Sf1tzMl3+ZyvrjwuDsIk6Hv2Lla3GpTPUJSvlv/CGyj0N/plXV2WcRUMX9rqiwItpMtCoDf1ycL1I+dJ1HBnBy/s53JOHf/7Y2yKOdm6ob+LT39wike6atNW2nJJ4U95iYmhr64zgvCHUgXDaW3M/U9x6Ygfmm1zgCfR0tNoPpg6318LguZt38DjTmnfEdKTSseGLKQMH+bufSEqYcdPCwISQwaymURRWLz/1CB8Os/xx9ZI3H+UShFOAHU2N3Dw98QBoO6b8xz6KK5S3U1qgDsImQxfxx0CDgg4cMfh7ThQ4MAch9XwCAlogs+WU3JGdNC0KIU/8otcwEJ2JDtHDlkCEHBIBN6jIYAdBb4OPKkEyxOyz1qs7PvzejfoVacxnCenRdXm1TuV4EbhSfATRQYQ4KKg2+lhKxDvUOS3JrJuq1WPK/W2TDqW8RghQds6N0fEwr8M4QherJfRjM+wdoTFw24/uf1CkEHdDiAlfvdGlXuBalOUYBIX2+T99G7CZK9J9fn4Ccnr2+Ivs7tdDZB8odP5jnY5+e67lIEtceTt7zYKs0/Lv9DQzvtwnxTDSGzjkag9rn6brPgNq+SKXnkVBFmPU0XuF3Gd37rlXDkhHKCedFAQcVUJO0JYShyPB+trl2+yAg1OwGQmH839qC9u/jAWcJfPtIM/585v4dq/W7nQ9e4DfbyVWtO8BLsUUJNY8RPUNY3ZmyzvVpOo7LGreHto1vk2z9T5i8d2qsEKuLo9SHBn8X1IyDa4CIyxrvCaW3I8k286jzq+LP4QG9O3rExzztxQqC0bRTcOfxyJ91PmnB+bFRvHToAWCupEbExWHzDtrYfwawHL354oZsg6BixnUJPk0QYC3Eq5VfSafVCJKbntH4bOeVDYr4PaMeFusiRj+NpZ4pWlRbEJNcfM3g1gvlMtrD/C019fX2F1NJBAW9urec+HDjGN+AwxTqqYmMdjt7JE2Lh3celZlvvMzXwijYfNBjsztw4QudHKSY7evZK8k1uXs0pHcChoKDHyI70JYc7vSvai+OFQ7w0Y4YP7YAUILieIUjZqWebfWCbU93ESuh/DIZ1e5/HqzGI15AawU7pSsxploeUqG4aVUZLnYjP39Ed41YhTiP5saqfNPOfD6hacLsyOY1Nj2FEfCwG/QJsAwjl7p/6kkoUMOp5D6ovZoBMUiFMNQSAiWs2IdwgJuleaVc0u8jyfuhLim9C5p4l3gC0AMRld/3UwRLQFkOeG9z87Dr9uhe6XMKwaEONC+fzB8bD9UewdnSMCJJIscZYKubRc6AR8TbgScEBOb7DmhVwJrosMYv4KQ4PlLGN1RCY4L46b0q/4nsiOX9gNroYVuLi1wgQNyVt3L6AcXNYp4foXGFfCXUlMSiDq6eDqYpNt9Lrh+aStDThaxKRa+HsAtWwHNDk/sCTi6ebWfFeGn/wf/2MwqnZXJWZtwi99Pboe5VNpP18P/fHNYbl+EbDHWt/qcfh0KNeX7e9+syrZXL72v35z632qtyHGSjo6GQX/USx4VSzxx1dP+4dh8yWOl0/max/1vhjqQX95cLctrpq4VSwSlxXT/C2+anvhX5gtedSmNMWD6Hj+erHMlCfIx+6VwVjwxGrDCag+6BHq2kaCVMINn/NFSt4ufDE4eSMCHCpE2IMRMJJrNRJU1wHpUptBdTM7/IofbWCVvyKXeN83skaKfMjysA92z6493NdNZlqSIJhUTyx9FKyQAG9fnkSukKZs5rgPY99MgUPjI7Y21WwqSvK1+cByLlXjW4bthKT6CsM6uSNRL1n0fbgTzibAIHCpo4wO5/T44OrN/h79+7P5eKuR4ld2OJhj+EQGNddJa7JNJZhiwLB8RS+guQ6ApOrhFPUtA65v5RrWExh6FLcDBDq7uf7kCCY9E/8Rkp+bLH9ZBTZjPoKU9P259We7WCWhVJGs+v51yNAbAo2m29o1RAlZt+QTD+FizI6rw5eMHM71Ncj4ZJ2oRuzww4CZ53mPBPX9nn3uQ4RSNBAqfoVlstsUOAq0017udNjyx27/+GulZjDiTrvRLRMYzqe0ziNLwGHzzGsW50bJW58BUqpr33l3COWrm2gPsnpvZ6QKB2kXjLQgDjbxXpe8/yfb/hY3Jmd0S9JtyJNgpbYXn607OgveGOz8SpdUNnwu3ZnsusCnq7JfeLsh2OeR7QJkuwDZ5pYv7iYH7icR9iT03ijincMxPp6ql6EkA0rvt3qAMdIpHqtodXloR7j0HovG8yIIRwBkmN7Z0X8OcbBkjPs2+tkoQFVcO0cuw16ewX8uMnbkjJyOQitUTYI+bkdUcQS3Snx/HVCpEOZ7iaK+j1Wmdix+rJ+eqXXd8C/GcHfenzppRRof7OkihAB8Epv0wOlpuG4o1XGkkgL7vhCnYMIO+2QqEVzvBosHqKc1AYygVCto8NtbUO6NvK6G//cFH94G9l1rJGG/4yC/zPcMnfvlMOemQBCOPCa02LTwu5OPv56/uI4qK/6uKptMVXlgo4AS1NY9WVqc6LorDs/Fp1POQVsBUSae55j4dwCKtCLF0P9IgEceH0TIun1cs7nTuX1AyVZnDDdQMN4iE8PguN+p5KE5Yrw00Ud++VE297NjDMUr6oLJfD4enGmT7yoXZrj1KIxSdXIqRqaYPEisvDIoe3MYq+reKfI2UzCvUToIjK9UIca1nd6iupSfudwcIRzAqHS8keKTYNptcciLqgoZNaTCqhtqBKVRos6/2S+qCr+ynMAC3eqaoOzBB/fAHXzlIQDbSNeWttmwiThGYg9gGcyZ33bFACIDucd2d3HFDHZ8xUtCkY9xEMHLmPCopyCGaaD/BEwwwm29aM/ScXDyGMueBTKTu59t/HAsG1Mw6hQZfX1U+5nMH7VTMnb/HumN275tp7t9oRkYfHAl2oFffXswYTluFSLYq5TylsidcIDw9j0TeoEmO6F1/wreJ/01NlN2CuVRfKiNdqbEejklX5T6XuODRR8KFWdpu/KheGBHoYHQC2ENa3FXyrrsctNb5fSamyW0cYdS5c1zFcyeqO1EcDXQ/KB16YoZFUPSWOiAzHnrfV6Jnxa3NTXb4pN+pqckZpGc8S5c2Kabp+nYBwxqlx7EMpUbgzjvhr0RDhtzG7Q7kqQxoMfBS2GCtQFgESsg8jz6nT0sihZkOXtHOzFz/4mu/aVJrWSx7su+vLHAne+JmPseLcYtsMyLTyH4oV+raRkJzzeo1DV2XYAWQTmGxn+vVe6zaAFH27x3iiMkpLyUUCgRIlPK6sL7b22OXJDx+ttWhImlSiP/LLn0Pw2+RPVamuKEn+Nbra+jNas8UnaxWdS2M28xwQQt5Uf2p1aZcHD9a2Yktqs7+3bHUTK5RfO4rhC4p3Zz6YBuzclDrDWupxr46NrqQ+LLYh+vBNvElG1Iom1WFqNpk7JIpdrVXOpHPShmBlDC6FhiEJMzNn6RtgyaqRUlwBuioASg+mvNCzx74OMgapEn6WdBGDR1zYaMIGsd8toJOYcYbAATjOiGqFNH4QbL4wHVh2f6QnJfkDA+/C/HjnirE5F1n0JqbEZqqLHVBp5gi9ZgvNWGP/cDdATxBltux8+jKQKRR11CmpuoBoLUOW9bQBbaDjlaRHTO0w0mUBFC/itMHcGUjoKgilkOESFW9nIZWgXEN5Y1eJjqgsYSR3bVOFgjQWkJjgOayFegG3qxExMVCCQhpek+2Pe+IFXqFqQrM7WriDBBMVEELezNH5jxHA2ud0Qe/TJMV6hFo3SL5L4UwzURHw5SVeTV7CM4Wy8RtsFSvWNu5NrDxPQYZZ6m87moxCq3Y77WtJ9Tdm4eULQtc2tdqS70s+i4HocinhaWSx8s0d+Z0fQKgA5hj3raomfDEeNoxsZlgf46FC5cyCbBFDzrSRj3kh4urMxXzm1pAwj4PJgYrWoZJKygDtZXNACYZA+dzL2v8/NcEO9FEEco5qbZ0RgnDmYO3Xzm7zovX6IDB3pCFzC9A5uDtoaec+PjoezhsGZVxl0IKhWE4MEYOuastAAo0h14dkijuYkmOak3kpBfgNFuih3aLfjoPtQJS/amEXIczHfqAlCePXzQ5GOoXuHZG8ZucHl7MhOvAKkhG2bMXgt9dbI2cOJdDwe2HQqIPcfuDJxpJmQZlFkpPlnS/91jkRC/Qo20RhGxVLODhPCI/TkZmXBjux8CqHDUadTP3XTWZ725nk1oQXpRsEPmpTWOp30tO0TqEKEpDSwqUuPuw7U89dPlJ0RgLBLH3IsYB1XIobH2wPkL9nErX9ePQFZ9xcBQfGrxVcQh2V1LfMliI8baEkKrt8f5JsTCGpT6w6+X2Aah9QD4wMkLwsPNkQgp0riV8b0PQmdjfWFby0k5F/Evl+RUM6Q6OQWhN6DYBzZcgdEQ4AxWZaphG79O7geQJ24JlcEj94UMp1EnqJbCmHlU6tNwiRY6UTnjTBG3HoZqx4ZBnOIKUCTpwpZA5Hy4ojXs6AzFA/a/WrTCQ5QAZ26IOkROlEEF63aBBjGDZxO9wt7Wy8qG2d54NWCDyNbpyA5UWhvXXTmaWMwVIpZZKBjFkF7LnsDBqNxJyghxjXFz7nPNm26SiJhOLe/GkjIp/hs8W3Mke1+jlS53QRTItz7KjrMfWOGxPWpCLVnY5rFtQWPEG7HRdBPKY0hJ8pssdiOeRPnuXDP6lS8hKkwS07Ry7yoC8aoJTnj+X/Sqc5OmY6TbXFGc09Amyao4nhS1y1u5mC6CN1uhFaVvEg+BjzcSWZzPaAfHCqdUsESFjXNNvKG9DEzN2Q4H1hsEyWBwpLPXh8/uKtZiJx4o12CFBYudRa4Dit2lgkpLSuZDLdimXOzgCo36I2CJiH032cpSRNE48zxba3i5LXNad/utWJ//axS8RA0e+In/3Q8UffjLKS4Nj/led6gn3b6QL91xw4FNxa6hoDqsfPi5dSXE6c0C1Gj+0B3bpVw4feqtO8cMBUPYgyZHcTlSwu8/iEgMHx+L1+NJFbMd4IVyC5v+juEiCpl476Oml3HH90WHixXyrm5ODKJ8DR+pfbMUwm3cuQed9QsVGG5ZLGIl9A+aHJZktaxyRMTdYTN1DVegiy22CKk5txSRE7y54Bx5/YN169ies5cDcEHGnql9d9fde+GROLV8bA/A7ZR4zGP3YJULETQtCbINI5DKCZFvVKFj//GWR2okCiFxwA2DpskTfkCqRum9GRrBmTot0EJogYnz/s0DCPo7mmZ2UNvPvBfP1axW90sN2bhE8AvkIzCDDAl8fce2FS/hIPRv6e3dJ8pGQXQtyYhkBz/FfdwEyoRqxc8Gcxv2PYw6LE3bT7FRrE44hVoOpmXp4woD3xOSLuXpDs6isGFA3d5Yn4Eh2VYp1XdIqWdv9qFcUKzUy6GIxAb+Li+mALdA235rcqW63n+AqWCxODuGUu9IKRILUEdMG9ylWw0f18LEJnsB7DChPvoKeXN4Q/+0JvQhaaOF/NhkcAxuHMpdYRMCvoyZbnucQYrBwSLVA3sa+x4eSLP3eaft+JHE1M23yQ8UnHRRjjjrYqHCdPkUhbU0T4HW16AyQ7sGVmn7qEyZyP6mojZJUeFuIKFwT3W9GzDtjqI4kLg4toAMuCVy3j1vkLLi8uBQ0koNisMbudEAJIyTufE15r/vKLFvbrn52QSTKo9fWvjhOgLHhvjg+wB5GfBXAPKjOjsvRUed3VOPRm4ZqtJUKq86LTW0moaFg6KGrUQIG2mPvaOutX/KsRyLeIfIULNjNgt9LCIlMHlwBPoza61zF1iCu/mD1cmP4LZ4kezPVLmfjrsm6Y1gZUj2BCZAgduoRHxcqlHtNruv57NQpBIaAjduLIBzu30dqMIcTattKY7ZB4Qpszv6n0OCmim75jGVr6gSBoWo47EqU06JEyKvcbezaC+EmQngo/cbEia/yqUJaxb93aGEB9RVroxsAZ6XoXYdEXRghDXYhfF54BBWguz1KF1SeSToPY9sQF50uWhtXvDAYsWONCphCCamU6LrMyxAsDj0oAU9786zrCQQsIxkC2xb43zgtmHgG4/14kAUp5SqGD67BLDDltK/+u7NUMXxWNFeyH1As5IEnFe5HQrwxhlrLWm5iMkc9dXRLUJlGWFuxDwed6xuHlmdCU2aukybrHCsgigRHV0rx7puaw3tfTZs62esH+yU7Qj97cS9Kks/w8bL4s0JMyW23TNqb+ncoXMq4TbBm5a3sTT4acOlPhLkV0hdsgFWkM6EDBURjmQ5XwtMlvZW7okTE3raE90eqBwFGOjqzXccip0n4wsBOs5Ivtxr8fwZUzJNwIH/VcXqTtRcPRfiflgD6MoaxboB8Y0uoxf7qdBYYBk+FnCweGiF2QuLpaE6yKOQOWyNtXsKOcmD47WPFmKDDstJdLLUiGBE9f4nkl1VhwZL0vmFIcwMOAwsGB5vuiHUf6W95T0zgcg8W2o03JQxH4Ww2JVkA9enNeratQ3uW8bPBBI9PpixJq1/Mz9RoJwItlMf3WtswaakaYGJo6S0ZPHK61gjFKtEQo8X7INo1sj/yG0U2VA//8BPuyPTuzem6k2VbVkVlcGFsBmKQtpJ9UiKnytF6Kwv4HgEhE4wNJgPRU8ZCne2prqhft3z3yQbd6OoADyZNUXTf9Va61wcFWEmNxi9bxIP778XjgEXcwbz9iGKgjDfkC9G5pium+CarOmpbu5neEpzm3CFfBtyQRMohksHo1bsCwHSZvkeTxB2CW1B55yBrav0BHp5wSxYiAQH1NVeJfx4k6KQ6nu/sxzuRyze8KxFKcXOrBz57L6/0BRirWcah7QxV1a9h+9cmL8hFmRcSRQDswvYADOKodBbymnh2z/d3PCzN2rFcxc1uSRidRpHd4oI9hsL3YpWDbJFEgZbIXe1rTgqMHbNNJDaYBQkdV/hHekBGZElwrcGBu7Vi2A3KBxqZNFgT2XEa++lgyQmM2plQioOsbF47+mxt1LsdDKNtkcMr03Rhaxka2siu4SD4hVhcwdLdFPuRRaHqHtb/C5n3ONC9r5V7EE5+gG+Za0zpO260iQErqPq5NyqEbeekwds4X1LE6L/fV10Poer8T+Hr9UyhsBAmAs5THx8dz2J0x2kGlqDO7tsvTf4sMn/7ScFvDiFJ4CZq4tFKdflT7b4w/kJtlxqsNMrJG7byMZ2QisURpNX017WgKz1Syecggdyo683nDmKlfGEBY7sBAjerR0DSN6ETzpQdS3jmkYOuHfewuMS+8Skmcky+QuZErP+AXyF6HSVdzQu0EN7RpLZNjrb1kyJgpOwkjaZqbCesWocS8VEoGQXvhLSYkO4LohI04o76gIcx2x+eShjLy3/H/LPTUnB2GvTl5saXWEyJ83QLRRdaZwf1U1oCiHB9LvI8W11zZ8zAXAHOKYrBvBKwDUOxcvSorsQJsp9FyPU9wwYlfVuo2sxq855eziSovCeNKY5uvCFMzWk02zrhyIlFaXm14nUX3278hWWnoJKwMuMTY5XLGlvr2Ju0CC+ZEz7dBZ12mfNAtFRg+2L5uYMo7x1Irb2DqcQ/zbCh0/h8+dFVmyo4Sk2NmsNj6wXjQoqTRSmxcbFi+7YwkNgNVq5fzkgA6v0NPzsZDM1hcItKa7cyC9LdfuJYx3VyvdIvhEvdsAnQ2Tk7FJzcwQqy8w+A4giu3CREou4SmqojNRmT00qmoT7vxAYwUM8gKeO9divnP+qZl6FHstKZlOMdFlOQRdBIgYmkoCTV4k5iX7CoD5dD3fqQhxpzT9/s3k+7WrL+TPxKyZ5fs2m47bELFGNJci7lAKao3lts5pBCpP11kVCrT3j+OWY8c96R7nsEZoQAZKeigoz5dNxyF4dNKrveZI1VpcyiITr9XrlfibGz0Gtx/jMLp6LJBnrW9jzlzfP44XVZeDaKLfazB0LvTL/G7sYA62vgql4nAFUd0/v5XwUJw5i5/ZIReA06xYMm+ZtSo8/yJXUY5wSCkytCHJ8yGYVVPTB8hOe3WOvAAiDD22AeZtBkGktR87Vy4woo66khcLA0bfkYxm41X/UD5LCsdLJPLK8VJn71VnDIvj6aK2hx/HouiE0OWkc/iu9pbHUeJC0U2G76aCu1VqGenRCzW20/VC7Xeel4xc7uwqdnOGmQrQpoqeL1cqd+KcnN6XVqTnN6fvWj7GhS27uaJufIEN7jc7OfNgqFMKRIxvPoL9+j8DBZtt6Eb+CNEP8Hbcc3YAS9JErNhTzxZEo8nIl+bxIk6guW8fMXIv7AGidajtNdWzlDvqeGv9h+U/FwA08NGCJajM8iTIVoKy1zmqS6vOyRhhvFJZc5IFpd0BIIhiAvIjRnSvO1eju7F4XTTTsHQ/Pw8kvAvbabQFqN4hPidWDhNxlTyW4LyrxC49mzsuLKkxAz0tk4uDC8n6b7IpDdqpeWaZUR9at8sDKExUVqY6SGoVSjV/TgjmbKhFKr9kqrXmNnkrooHf+fFFMAKDSxlYDLL/sC0uUHKbexQFZpM3E/Ez9Yn11gmusiACEVZw40gOjoZrz2BTOQtQSOcbUSMaDoh3q//O9FKoRqEfpWJdXf5wGABcwy4DmqrzhjqsubqSDIhY5AU6OLiQxh1AO7yLpFLhbJz8zZb6FHF0jUrloXo5+aQW+4QFuaqX0qEshzYsYqWKL2nVs8/Hbs+fds3812ZcAgBSh9fOVB7PhMvdPGVDWFrkIjMA365hRyHkI7vjJiFhLBHOLA9gP2n1wJxGpNuTnZo9aRi+Ey2N5WB4xfejTNG827l8/KwON8W+PTDUi4TmxZlqxUVUett4p/po3UY7NU9rDO03SHuYFyyJ9KLDxZpOmjO0Ysdi/giB+PQgMHfKTJcUCGnRNk11Fou9rEeyRjRizi7cznSodVIpem0FJfrpyb6+CgLST8ADxfcm861Vn4Aw5rrI5v2E1XoyE8y4Utf19ynDUWOWo5LwTem+pGwZtJFKW1HQylyPoK+cwL7FZ3Og3qOkU46MPvefUMT7yYJdCxQQWw5HGAUUxK45HnF4+CReXFQ+uDQa8uXt/CLBmbPNHi6P2GtjukPeyFPGeERToplEgVF7qEtqRGvwaxUbGZ21leP6cE0hASzsVZiUmSxJ/9mxebPcE1r2j/rgYCm/pyrKYse6xwAJVSOg9VzT3UfDgjZKsAPMwtgS2BXxQbEvRsFopRDCV+qSjqUKSUt9iIRxR1FudiMIJ9xkKM71YqRpqPADqGbAApVpUyIPnCMQhFZx90MRVmkO3/U9lweehXKnegRfmjlf1zumxg+7z/jiaADI61y3A42I/Hx6+V6L4lPvynmn78JqKPGjOz4cvZG8ChWjcALFA3fXGUQsb3nBzIc07R1IMMvI5/7OcJ48yeOVtAjFSZTLIV820Wt6IpsMu7SafKmo64hMUZKSnBwJZcf8wTeWJgPlNgSCdVa9qmFoHPoLp4Cghotu6kjwNopbZGcIXHwaa09jAAqPp0fUucOA5udEKSIHubxpHLPIcuv3r/HMNEoq3f7kZzhBiRBdMnzCUjwtOIstu1hfWJYRfzKiazbdkDHkqnaWbhtNkS+8dfozb1JsfmBF6TiAghM7F+QLEI+M2FNDFIIOyMRMP+rFQRp0+jbPAWgePUxSRuaR6sjQpuSYSYYTUrkXnBnNiLr9GKBwyfblmChry36cGnaw8BTzZcQ3jS4Wgpu+PHT7pHX/BLSSZYAyBBol7dVVNY4iGFRgtH1nq8vhE7ERJHKkHxSNQCTxIxMMnT0cuRfSrKjIQxJo4wsL4j6wF0/RZmRk8+rhVpC812TAx/Qvp4Tq2I9wk9EntRloVsTzVmliaOiLSUUXI8ISMMT9heStlkmyINfgZSg2vmoVISv0I3UJfo0xzY8q+SnVNGXWUrQlezdXwOPoa9xPTlkdWDoGk1NjMrBknAl3XDwTQn0c+Ds46kgA1MEKm8HhRXGdSK74j5Xn7hysBLSEiJetTlia5il6iodzAekhjWZEoEbS58veVcsPrCTbNyFpkiMNtVBJcamIbq19DCXAdXz7MaXulc4umSgKtsoEpki+nWZErHUok7M5BvPEJnkwW70ruIoTR/nwYUgoRNbTL0su6NM0Fl1iAu6n+kPHYMbBo7RGq2D3Ac3mPxXTCGrjuVyEWVEuilS20laS7CzzzmWQIrYKQDRmZn6DAJBETA9RzdX7YNEIs9QXzTLcweDKhsmxeTRVsIVoNINqyOgumSVVhJMqUrzYBeJ2c9rbdvKqRmk7RVNGjbjZcV1qhejw1E1Q7DGThlaRVjYhIXstacj9zJJzwgYzMiCGkhAjCoAsnbnQTluvXaVQ3GfUggbTdAysSEkai/NAKrWaSvHihXrvnqTmNaATD2CI9eJA1ebHQ8OT75CPb+P/Wj6gFwIWWLiohOHvGHQXCcC0OynbvFtpBbt5HpGA2MKEBDTW254s7cDO0QEJ0x/ZmelWm0cxhjapPf5ko5CSE5kWk5G1CnQ7L5LSnpODIVP+60hioqse09UQ7I7cOFCmiZtUZwO8Vw2OK3loNTQ3S4rkq7th7SZ3N+ZOsqI4eGfVs5aXa9wxKn11SAMHK4lPiDm6aj1tHTfMxj1MjfmKeKHwhiEaDqUIZwRFziWZbkSRc3NMqC1k7c41+HEyjqy35tNV/ZlG0mZt3CJFVm9rVtQrpFiXeZDHBJ6uRYoLF6l2Psx5vR+68cOGIHj/2lI6ef2Al+5Fs5fNNUrEm3i7ZdnSI3Ih9ssICu9aE4oBYVkAVLavlZzdJ9p3cidK2uCloTSUENDRw16lRNthR0qRdSc3N9JuiD24ruXAeddv5aQR51rGtS+mXrLytboba7cEGXa7AqXAuGhYNqu+YsqO0udXx6+9hSyN8oBZ7vbR66l2Wjz9373iG/ikYR0sJhw5APw9TgerD5yq7ePEkg1uUdJV2j6zZtTM7fIE6Lhk7OQUmlQ5Ju3mqh8PECHFu9Ai77nJKbd789yWWJV+q/kdLAKEJ2saJr+4AVwFxthEDuyKeWbq2+Sc0npYLsOnBA0Y+imoiC8cnb9SnhAEudjTNnb3KpaHAuME0gdeckaPCzr1qyRZSUxsvwYvgZoIsSkGLbNCmAh5omJUmMPEUrtHEo1zznzAsw5t1p1IAob3B/USMRZHAMVSaoSvfWgHb5YRMYcsTsrKXK/QeIJZj6SEa5x/8vfnRKo5ms8uimML534e9qPEtStDkR0cG/Qj+lgTB5kbhPS/hoB96o9VxTRv0cKMHgO3bjV1qOUsven1NM4BE9CCLIgkqDly5DqJUTBMigNp/xJ65HeS+5r0JQj41plMEbfoz+kh8mieAsxlILhlMxSMtXA1VSbzA7xr+XLQy25CUJGhSfInlot+y3QBR6ZqOKXb7oMlTxUO73xmp4XH8ZgOsYGwxmJ381AbgfENeKlqA2mXhozgcz7t8bSzRZVndwEGDZBB2nBcYQXC59YxvIMRt9aHrmOq6McFeDDBOGJNnXG/MN1mfDHGJ+2GvfwPrJXwnipetyxKFBjUiKWmUeUPO9Eb4vUpsy74fCHoGa88L62WTrPkkeBg7oyCu3bUeF+dgVzaIsTZs6kOs/JzA/tIeI3Td86jugZ9Rpk9AQrybo2GrzOYB/dgglhc9Aoq7UP4H70qd/42fubAez1TuzTe6pC1PUXGWChDNi5Bg23KWL1N6e2uBYp/bHqjHZScu2gkRPov/2ANFVLd9aGVO9isJnWiSbTjIIrv6GrZhsc/KxqudRFCV1UyygMM1pAOgiArogCVYyeejDDL8+XSw03Gy3goAuhRT6yJ24PiHBhIBqbnIumiVpjZeohQgZiOwoy8V9JBD7rLYcxTnMKQLhtt6OqMGa2rnb2JMtZreuxw9odQW8TjrBBLd2nJhR+w22uMWjTIXPOtkl2DGyrIHrRDGwSt7NjwSev1/mUpU7h0oNHlRG7R/GapM+4Yq3yV1TqP+YrSVwusE1XKv7UtAgv2dLCAPlE6d8h91oE59YtWOBgAQpaJuYMyQ/iW26rxArRkOOWvob6Kbug7qc2XtT6Ym852Luq5pv+3vJCp2AUXTgRCcYPqz8wKhaXzxTgyQtjV4pSjiTcspoBpeZCefFse0DxJySZZNsdgkCIHklDlooSv5CrS80XHKNhd+V+flAL8VVLJ9RRnf6hokZa52DrdmGzZIKM2TOpI8V20q3DyvgjIlm6TMpqo2BkHUiNOO1rSEQs60o1XBNpskAV51Ve75y8HS2Qlis48qK4QtYYWqArdqBV0nPuFSaxbAvs2mKao382w+wt+BAbhccrZWocrCKMGBFZRyoryQ1tjjA1EAVfHtlOkW7bMIKAStUbw0tXI7SEzRQ7UyUD+wH2mftakwusfl/GztC1ZEhmHgpo3wmMcYoeiBQbjfk6BdpGlhfawyBSMUxhgO2Wk6DnGGvGTx57vedijQZnSsoS6FH2ppLoY5zr2hgap7Zw/T63k0TC11z+RFPYmFnJIieHQSMvz1osyRnDsYkNWsbYNCv1jXVXBRfmuumD3kNm55lRYZF82yPvCbZ51PaXbwDuNYi2rS/h8EWOpBgCj0Wmwford9Ni2bevHqVNrScL/XMyUTA/Ku0f+Q0URXHhGHZsh4BPw0gDPcUU51x08DcygEI/OYb32eKgVBYWmhs/9+I5H9MgEj8q/bQh0IX6n80ja8NH9oTlW4/LAGYdRp22JU+NXSGSbpBxONMMiOBOCmjKotftcr6JzWz0pd4/hxP8CxcmlAeO4Yl2kV1FvXQh8DfbDSswLUA0++QUAwnXnYDJEJS0mwRyfP6oALQp7L8go84AqY/lLk3AnK9xAme+97PvzqAYx4uN9tgDSr29StBkHr6YcxNIZLBva38Qzirjd5POuykvJ58ovjWDhyIkjrxgCIa+hmMpDXvT8iYZtu8vfXeexcxQ9x0cXJJJrwWb0x20hfYmUnygtvyTLIWu85y+Hdxl3xn1VkvY+Gxj5om5POZ0i/MW44LGJgepWstbEIXamWXQJYG+/YWbF+ZV56YZrQRI9n6aPn8bSbrerxhTuhCSPwVb82Mxl7E1ib3i9Ng0CYn1MwAlPmL/nZZCvmZJUN9IoQYpkx+SeCJWYgblkayc5043raGZ7RvACa5lM8l+eqvGxSxWncix+rLLQKoEn9IHdwnpcNHcS+uGBpAPHO6GgQWsUMEsYUl/KWRbWQOPevU2PjGDDGJsbwJQ6pk7STYX+NUgQDq3Xv6gBru+2YJpWmogEE7MiGmPVpPNsZwvyDd0Es5TRx3dDrqv9uxTKEpjMIdXicpUekywYCjDEBsNXrk50Dce0NANkNYqAOBV2rF7UM91RbAL9HMPQTs8HIHBng5/GcV/AZUmlC9W6rHaJ6T866l2EiZ4I6mfepi8Ap9s7OZodQUcZ2UNDaEHy2f8UWgb/VU7zQ3NulTRr9rgEhGQ6mTfT7S64wxhvKefmEbWTBDHnHY6+8Wqnyq4kAvVkSIokM23KzSPfxWw+vaOqXfxOlS6iKR3PU1NOpLE0vEZKdQUjNzXWojBXqvRzfG2AcSLMNvLKO2vOmM0+szghHs/oy9CAMk6d1K4S1DW7DTXXyoVo1AoZugkgYd8z95k/M565zNO6iJrgydnKsNSIbhxiH00fHIiOju/h4Iv+ul9sBw5Y5f4o1Ydm+baYSWxOaTRK9RrpLsxRch0bB5j3Zc0WLNaFxcfPvXIN0+NnzKYGFQbamyh11uTLoXwYWIpI1XE0y0GXgleMJjpTsZvbkaGbQA8msPJhzwcfoJsVS+AGmwvcGaQ4HTmXw7fDCvtKMFE86nu/bssmlD/IYVop5R6eXYvT99A5nn2OaqSXF43yRlXDpnrmPpi61m3SooogjirwEZilmvceWbrRA9Jz3CPJVsdz3kvErVm0A+twtzDTlf4fSXALbgm/ZkB5OvPoaaMtQa+wgI+8/BJrFXTvETxiuHEecywryxFUjjT93bOIf5reVLPd/J/ObWF1gieARGBvxknmWV5lTS0Y32JsAT9nMbGkqF+mnH0Bx81XpDZAyMZRsEwMfCOZeyKzAz8A2GHtu17714iS86ymSmJ+vNONaQlOb+23HS4paIER0DzbwMi12HmUhMTajUqY/mr6OQjd/EBBvjbB5+hpVNMQKo8RCKIQWfJ8owr08cm162yOHEDgDNhm2A8LBLrUayCvb78ck0TDwzERx5Mi4yh51YNd0pNFh8Jvd/+sJoaYK+bkq55Wf7A2KTadsTQOcM+bgxrF4gWyzfmkiI++Pq1qXeFsDwOZruY47zlJkjKgoXTH88NFO5nNHYVxO7cvMsoUd2fBdrofV+Xhdvrd9Texg0U/P3xGLqPcTGIdZ/+8RERd1ap6j1C6wyeFmRMywo9+/aPnbnC7/h2/FjHzIKdBwEsPh4tqO7bfNrQ0kmv+jXvp/dd9X7rx+d61LvvhEU8z2zlVnVSxexrIAwiUTmCyRP75yAiy4Uq7QCJksoSC3RVKRvHPCu4AubDsAKL5e6Np382fPYYURPqj2K/+fuGXDDjqrlRUAXHl8Fd79KaUxTE4+V/v0BRC62+BdrWklJ1SmbUO0epMkEt856mOk//EMOjfCp1ayXwbYwdOtnxLvacN/zgKgrlAzHXUmVipiiJkLoMmVX5a7A+0V6InINZFe3deigKFJh++AA8bvrJ0bEc4KOX37sHyBppdx31p+sKrWBuySbvwvlyhM0fWzsH99k8ZIJ/qzwlgRSMddsw710N81XMHDxBHDaUiQEqQy4aHPeUozPw9crCp0gTyFSfxbuYXu/XOlaMMhxs18kH0bDDSTuiM1VFE3YuEC51iIBAa8j9ROIx2b3DpUtYuSqI3/7Wyp1SLVUNRkj+X4o4XIyCN6coibsz0zMDcKzhE3awaO6doxD7YAttLzhGZoKzlp0+JE69ryts13w5bIMW9vtS9u2nvW+9XuAlmXdW9Cud/bNoBL4fdZrKjNFPaCRfc8pP1OF/Dndx1GI16Dwq67JFZMaiZEp9VyP0a+D50mnJ4kXrxSbRjfDkcIU5R4mPnkSDIjD593chXG4pczzyaCqAYdvi2/l3dkzoFOilmAHE5fJ1ut8ON4FVjBnMgZvwuSfLACcFUCpnzfg1tTT1tCKfrR11zh+FwnAV2szg4/anXd2fX3swtCnuiQ0A7yd+X1cXxLpKlZa7fh+/OMd8W3BMC6cd8E/iuTTtjeM36S3te7RPxWSajiZGeqPt8pFi+/JtQxXzJsaR2UJ4rJ8+jQMB4rqEsYdt4jZiGWLr3AT2bL0R9KhK54XnOKMX4sNSRiXasduV8wc6/DfbfhEkFMG91RjBD7P4xU3a6Iiaij4VBnPt7Ban24JlInnS6Fvfg03t3OJBtK5mYxqki0CgEI5laXxYDXEMANLt+mZEQB9dmW95uDFjxzk8psPJ34yZgMKj1zszJ+1s56RtYNHzSsNhYkaJWUrT/Zq20s0QESh2bNe6eOYZnw831waDcStBxham2bwCwdTbk2nKNpgTGSxa25abhENOKtbDc7Pycqzp0ft324ZNqBaOA6eQFsrZRnw7gepWozWzoeFmBnGuTRcb4sDRTuKqvWVx3iIhMm7J2hFlcmseV+iyZwvNDoaA4bMDPwwgWjfosI1TmCrfKhLItL6d+SvnnquKHGCz4XFT+7UZJQX6ADzBquLmdx9VC+IsiccvuSL42tj/lL6XtuAJIhJhN2OT9J50AAq7/6QI+3+cC2bgZu+TbOdfDVOHnQp+5sobErukmthBxcbB3IvGYCDii9/pgG3ETs4pB5RBRPZB0sA/UDcQXZ14ilHYrqNjSNioMdZDTDG11Mv4wQ/zfleoU4BplYSXv4iwtexkKtcoZzfOcXMU8TuuTjgelNaFSDGEU+dWtugsCcpM/3U7QfKW3OuxeqfkkpHChAYHW4I6tftcDXzTHXHW8j22MR2s0UfsiDw5riba6fwmy3MxLqq6v+bo7wIPHCD7Jor/Tu56gVceMkkmGFIEeEfuazINyODPPaoiG8alkQwVVxsbB8vZydMl+s18pIC1xJ2NHdnzagpYXfJvtE4tsp3cyQB8rD2FeVr0ECT21VDdi9jaiYrj+UzktQGd/LM1vTxO8y9493EVWt5cOa2xVdNhiO3mLjuTRuj8GOAyOmfTBR8mOGeHg1oyAvc5wcC2Z8BVu4g5jDxLKh495g/tKzamn+Zh5wdkFX98c8Vx9PMYXc5Z6DUZ5BJH+Rm6bcSaGUYDwQl9cuhM19g3OcmGSqi9awOfYcfZVd3R9GrDbGxNCgHtfFFY7pnO4jwDT3K37zNxlAXB4lmN8lYzZS894UzVqXBZ6zkQcLNEfIQQLqTUafbttduWzCNd0O9FV5PWtEO6VCTUvIDVa1jtoa9/XYturLog7m9/tmEA8To19MBRAHrArUjlcucHH5ZkASw0Zzq7MoOUltOvS4P9W0T3O0bRjU8+Tkl4sDtccJw8jitZkDc23DaYroEcKp2mPlD4y5VcpVcewklv93PPVlZbrZWDMfOX93sqXW+UNuDTc5qXDk7+enBYZBNWwZLy23goVL29Yjdi58ND87Y4CPvg+62DRDlPL3jOXP/OcRlVEN6KuytrjpHogFhYsLBRoCbDmPOuLb1sfmWKiak97ien/b5klB5ZenJiRtsq+oKrmlcywTfVqLuOHQUnlOk4LiYcQIfLp6TwBEEV9x/ETlD/OeKSGwVKNGi2kMH66iusmgwdpwAFbqbKqn+LNNM61jX4h0pB34Tps0NAn10CyU/Cxf+9n/X0TfAG8ogezZJERsrrg93s4hRPXj5vJcepIUFF8dgJNOu9sFz+5RgTDmnLKlxO6LHFQ4v9vq83SqV5SshfirBezccqVoPTEJqK6RS/mdYuNE7j72PbCpKeg54GnLArCdB3d8eOFva2WDBUPwmDAHv+3p48UrbRXZaULMcSDPUz7z9OjsXeyYglAwXXz9H7myN9fTsmnxFWnDdNhG0unaMHkrvuOlE++0DRvjZ2nGINgeYfz6ro0QwgIRWShntGkSduTEF14s3bIKSS8271fLHBWCEZyTGiMS5hN5F8B1P/jTPv7uc9XmHJkS27UaaFrfRKUE7jKaEqfVJoKYyFfq3ypmZQRtf/yTOzIPPDG+q3vEpXih0PIcgEplCURc+/7K5ZCJYp1kxBQK9+ahUedLvXr1hIPHoZ5uqGLRSx/Y2U3jJwZdHx3geCYATFdqzNVZ34JF4GP5TThu+MLpV4Uvucs8mQUBqdnhFuqE0zmATGLGJHhMbVd10velrxwdwyegbMmJMXhRMV+XeWFDW6RoFmBmXf4ShGURcDV/iYouPNftUo4hlKUjm59LBczxYs+82VokOycXbsYcNwWPVirIZWowvXRwoTB+AacKOD4gTrGghwiSwuofkdg3AzPouyxo8isQdeSs72eB0VUTkd9iDVzz4piPW5LDTAzeSMDAVBy2gvGh/BvUc+XmcY3GWJSZJSyW2dKsuQhlbBj7LBQ+qQ+oMU9MxgqTZZSxDYN94WKYq3aOmGD2DnJxUmuJxFhiVTJunTITX2nBX5SZ/ktM+/fjuHKet7mfz0bMxGMTwyJYk0I0v3NQu8zHQzqpB4Nli7lgop9rsvgMvSu8cZIouhi7SBpdqh75INtCenAhjQZM0WVA6XxiXJNRomHzgu4k8X1jO0INtRnislcBrr6dFQiT+0q4BRtgTs9JPAhAorCokmX6zZIkF4q5/g1nr8cjue12JXx5Kb5h6BCLJy3n6IzvCw+yYqFWUiJM3NmSGEtLr76rg59NzJZ+YrIXfPaPHr75hrqrApIxg8HfpVMKSCns5ehieL6n8OjWfjbv7sFxEHAmHC3Iclk32VzuhGoddtP+obywTxkXfWGTYXHVCf6dHnaJK5/1Ke/1sAltx3mwhR+ovFCFemkDwdCgBCD9l0VOvwibvXiZTxiLvm/H1bhO0LFZQegr33VB8dtPMIIS9/ZgeFIa6jaVcVXOpNY+yo8pakhP2ZT2ptnE2UKBaR8zkVygK00T+eSi6RlJ2xYlTPybHY85fQxyBykJXbT4o3qhEW+xKlfkLmobrGYlixnpO+pFA3mDzwBXTL+elqWPMWb4VInuL9izxUPE+IiSdmXx9yVlc/lm9QcsSZ/b++jPvp1pWN/92y8n4PyYFe13Odd5TJzk+N8kN/N/B7/Ywe1ab6/Ntx9R+j83WpPHHMNgwYwweYqu0z+a56NlNykXze54kfC+58F0EkRG4TApF4ZNb9r6hhCd9R9lDvk1avwibe/f4rHLm7n2cUeJuYUq3UlgzK4ewy5wuks/s/jnBe2nrJtprik27ygu1YqL+Gn6TCmMewDhb9mj2OEXymbZk71iV+RK7EMW0HYWdvWAiTrXAuXlV/LzLWB1ue1nWeBwBUo9x83ph+R9qdoujoDdIOVh9th+1u9fAdcjkyr1YsD12LS817GQU2TeHXOdpnYDc/QwQu6ld/GzbtzZQcK5rd8ec32X6XazCkpMBo30f82xlQR+DAaDblwRadrn2z5yiHsOFN01XoOMIVKjF+NmW38oHgUFOau13uUF16ghMDnrNNb2H5rtU0EW5892H7XOtP6AcB42bhcUY5GL7gUF9OKFFfKs/mF9bsu9Sel54QGUXDXo86ap3mPeOKkpLNASVybfgOU/pC6v+e6Vnv7YT8dGhtX6WYWO+wmVd2L2Gk2cxeo0tW8paa0f7ABLg1ObvjMIjJxJ/Nmql2npcdhOGYbg8s6wiuw7ffClNlO7OkyxBZxNMmph+SXVfWLKp3L7/oYIxMXT75aOQ9BhBQOiXf/XbI+FBGNXW/jEuPaRgxUSh+2JGsu3lv9pdV0QcYsIIoH9ClqLi/+KlqNdYKobybACMS9ZKMuWV2bqYMlh81c5uqmAFtzCyeJV7gbwPm+wxc50FnFYJPrRCyqHMjzrIt2xwOQJEkt56kexTcypLCu4uRB1lubLOYmuMvWPOvGOKn4Jooy0IfZLtbLMbC2TsvjawWNIIOxzJXUxrBnUlDgWDan7d9a9FZNNr2Q0tGywBGKWCFpnUdZFeDgpY2hkHzL0ONWBERhxkW7KG43UjwVLILnFZjzHu9ybt5s5ANbgPaqiQYp0WInz5J8EjXVa2jw5k5YBm5u4xz5aw5bKiJYM51frhqaAeiFINJAaQyLKZ0fBkpxZo0ulid4Ir6I/CRWS4a0+OqRtPFW/uhNXrpHTJ+0EfzC/Mr2gPM8MLppHCjDgJXDi3VyY85ssT95jx8PqMT0rxqfXlKvT/QuBrgud4SHb6v/5gWpeghKxJXBnB/5oCmM8OSqJLufJGEtYSu15ctY3Q4iJ9EgqeAQQz2kh1Dp3J1+/r57GGbTy8PyeaoRxtyHfQUDNgNT9KAM4nPq2I7r7mXgVdp9q6iCeLcpnZ7qFjcrkXmY8guZNHi9qyl2fc0yZ+LgdcHhs3oHnTs5z9mh1BDjcUKL44ON8NjQHr74bUuzg1BtubB3givRqASP9z9ibFz0I+AYq6I9lBL0Gff01fgL5FXtF/Lrkqo5zFRgvTEQd/vo7Xje5lDUMJZOUtXaWi2NXgsGPjAFgyknaC44y3CDUu3B0skHVKjYwai8Vac2B1ScfKWYJR3buJcqP9s+h6g2gxDF43orKRPu/2X0j6uz4MZP/G8hBPECGttSdZ0lJBr/z8RFlQgFdKB0CCE6jmuEqCTePzz47YkkmDoT+osRH5G6BUx9Q9zFK5VdViYq31eBkbAstibePXYR6E6fkZDGPLfn4VzhTM+beJ6Wq7kXnQSxG8q4wDNSPQpku7V5SG/mLbQtFCqv/22ud8E/iv5BVyE1YPB+zblF8XURN7CtWfubzKKVFvi8gsB+4BlDK16xytdiWMo/maYMWuNiQeXarnMrRPA/iLTa6vysPgjU+wtpkQu8rbUB+rElvAq9PhF8ko6iRMFgYqFDHTbqp4L2NipI4VT1y5KEpHbH0iTPAbBaU3TuWUzhdRqMKRnwsomMxJF7m3/c/qE5d1O9XqfVcIjw8AFBM3mGOxSItNGNsd4oPyX1UEQSISegSNBPDjIvtF9Q9CRtCfZacnyDEW7ThWg7f0slfBi+rB4y7UEGu9BhJCx101NzxX/l9PHHZTSMmSmYzhe9hRpHPrqkKMc7q+siFnCYxbJu4gVFzFakyQdOQVRRy+/hjA3tawUAoUMjYYEqw8zvtEKsQUsx6el083tJeL0VmtAZBDvvifRa46gbe0kjxLMBihfeZkn4dPT5rT4MSUSyOU8qjoKHMR6WyWcB51o41ZctR0eYVMNv14eqpWa2rBXf+yYDvfgzqyR2JbWSVoT2pjwPDiEfk8SLBmNEaoFVRZiLec8gyCt78aHrep592Yd7ofrwtTcR7VGieTA+O6SpAeJLav3VVaZFeorEGNlSUfR37Y6Vdpzsl90jgALLMKyy9VkFu/rMIEsG8RceC+vhLkiYQDnIUezsT1uPBQ+5uejoizGSNw4CeW/iLiJl1hkaT1G2ONDTis8Lly4MZepwy/PtmMGpiKnOOl9+rs3f99t4slt/hclTed17KEAXjJgd/Jy6JLCRmuytgC/1vC7ihkfM6NXq99v6xEk2ObA7UfBMO/wiKqQvIYtZZTtmDc4sB/4iSLmQ7DyveXNoytn2lSPIrhztV0Lnd4BEQ21H5b2N3iwzlEKMJ0+Np7u8PKefCm/3r0bvoOIDTWTyK+evKtDAMQiEx+GyB3XeWbM5EGVX+3Fmwo8KkWgC/G82TYGBWbI3cnrxIW/RLVRcEtNkg1Q7brGL6nHknT69Pvj7c5F66AlK7wDV0YDap1XGbQllmCvqKi8isgmM/lvrwM2ubSET6Ffa8mCEvnIIjX62Z94umkvlvepEqUNJUKje7U+B/IkyjiUQRj3FR6hmsroUyoFsjz/WeDQw7kwk7UTzarFo8YKTdrJ4oqKCDSTkr2cKhuBgxf90VlHy2CGFpz0/in5ZbGiHR+aeMJtsfiUIRTlRU1z6OvimiJgvQR2PA7UCg6bRhysPwZplfjvK1FfYV6OFFFhUTW8S+Se1Tj/yJLs65KUFfT7g/c1Wp8oCCUvVj5VhRJCNWBSh1U8cUdr3Y/65QFTKVecjKF1QWWVnxPRw+icC0uC8n91KG1chp6QPLq42T7LBtayHjaMcNqo9d9rm1NFVssICPpnb9vQNi8E5dWTdWD+MG4FPoLVX6+b+wXQuTUyZDZudF4Nbx/+5XsBYvrfX3jN7gKiHjcfaf+Clm7TTrrW8QH/4ZLoj4CGd42PXRTuC2ps3H+8Z2D0FlrLCYYMjUfIvb+hpogb6iXLzjwWA3YvAZN97fNvqsKMltwAYejt8IE1AaKnWqh404zp+/v6c8AzdUVxReDr3RN6Jfcw1YHfRLvMXXjAdAlYnHusU0NR/y2SCk44DNSiEbBHdaoK8on8ST39oS/po7mk+AvuEzacj2+z80xn9tFxj9sGgCxDt1r+bIxUtAY9IFJarMgHAE9CNh48RiypyPSwOoqHM07c+ukwKKgUEOYf8XizJZFixGbraAhNWpmBm8A9p70CKgLWbB4m/k//2myWOsaPAMnrz/vndFHRwn05BMAs2dL9GAGOXXt5IKtC9QcC+8k98cE9qWTZlifwZOdwGwpHr8iFzK0jHmUWSMUd2XM4mmKcV2776nxGXA1n2TwF1jljizVOjtToJLWjI6hm/v1M1PTo28hWkQWxGqh8aOBKrFKk8osu6Oe19weT6zDdE4yuGPnQnXN03QmgBhwJKFh3d+9KxoDr2AE+n47kc0sMixnwjqntuntc/4WkDIWSH0w4iDgRhhHQVHHQUOFKAcBXkZNYjZp9cVlCxGKTti10koa7ULvxRwyAvaAoXfEYpyXCbbH2pUDzPG0WUjBcrb8LSrYD2pPkMzDqt7jz5IhtajC6oN+olW6ySHwM3x/h07a175ZinmftH8uYHku4BmvyS7rRs/rkA/dHGlN7GYs4fBt8dghozWX/yXHWuuTo+HoF1VZjzZ6JdIPR7c/y3Ex1fmb5yx0a3gTtOYP7GcXWnAnA96ldVsE45t5MbDgyu01U45s2tR10XnSB5yck/Xvi6xz1DZ86686ifUxtT68lWBGkZh71LrKs6SqvNuixlxB8VA5YXkNFnc9wEHtG/XNJCX99pZC0XXNTZ+M4aKMkEtVkFWeduiAFuFyXvp63B/Z6gfv3nJz3W8DEoHxf3Rt1pHzUwnPm7AoNrpemJePh6Cn3w9dN36xicWfBs65RYC+WckReOu/+eI24FGlKjg62NOVy8uvDVYKtKhnP0JrSSRBLA1fkFl3k46sMT3BYp8ovChV1wzgXf7GaQxTDxgP/0xqgGzHqcvYQn2H47Q7t9DGQHLn0cNAFJozC3lOXxjPN6cH5byvDW7KXPF/hXEHX5TtGzOD0907Cvl3hZGeDMxqW/OfFcOFwzYq97S8MUZec2XpOv4Ky+PtTxLAoK4wPXlEoDC6KVwIAomorKaON0HwaLLKC1id3ifD3rCzNnhypaqBbazVwFAPdRqFzrfABVlGsWJzUhehUkWF2afFJYpH8ogBkxQEUEyLSM5GIdd8otUCktyEGVn89Xd2eEKp2aa1nKanx7yo/mIVD7NkVUCpg6scew9WkSPdMAabnuwQ8yOMJ7HiyMTxEzj9TWIwpEALDpm09Iq2GaybbBd+v/oFBwtziIcd0FaKzM09abrc86dJyto8GRyQdeSk+c01UsGwHD0lhN03kt4YowGS6CpdkzuBYMUPATMImkDyi0n/YMGR04i1m7JqawIkRwM4Cq6ik0j0AW8EByR8qVTLDC0DosQU/guRAiCKi6PDssJYqxO462zjiJHguEODV4sEhYhuauF5MlpDHGMzChz68SdujnEmbc0cwZDAxoEUgVNKdZWaCxFm6rcNCUaIPeQmnPSbrFBsAAM+O8WNChE55QZOQBTkGLlcoADkESFJWFwGIx2IZXuQ3KA0362OPYPHEPjLDCA347BaFNCEE4BgEcRSEAE1GGRsTQjAyymIgokTw6CRue1XXsb1zD0jMnPXbwlJ4TksGIM6AMsslNW0D+L9XLIpRTzWrCxHjVecm8MOcmzui25vGJZOJrAa46k5u/R0rNMQqP85EAb9Uu0rEiD0HTcENniNuRyRpx6moEvi7TN/hMtE6teaArWuVyxmDqaKW8apcG1WLlhnhy7yFuO1GQ/oGXDqhN2DZcWaGf+FS3vmaljZ/whyJ36P2i5p47CbspEg8zwhs6OrfpLdPbSqtuisz+t+gM661v1z+jstVX/hM7eWuWb09ORcup4Ox6h7PZ3gQuC278FbHX2t1XfobOxVf+Izr5alS9Oly3VILzdtNRT4V2OVL3wXh6pJ8L77IjvPe/LIwWO982RfOp43x3JJ473hyN1Ibw/Hamz8H48Uo/C++sR6t3zW0Bpr4KKoOPz0da/+A9PdfHFV3aj1i1fnfuhWDAO7lsXkbFzJ1uUjOoy+Q2f5j7y/JVL5LtJcmZzYYDPjfPicpid5zVoeR6fIqEaX7iBpcUykoxF65zDR+IFpsbNnGdDJA3EbNzMOd86HH5OTJE0EPUC04W7Gpbo07mRiDRLHPjBWABs25+iNhEcw72bgIV02y9ReYlSsxqQanwLCkeS0PWpQYcgqB0K4zKPuFIu4BmFiUwtOkBRnqPA4cr8P3hGmRLDUcoJUqZmEJZQVbeIon4/JlItAvsIO+xOpTvCitqhaST1bJzP3xHoZzoyh8K2c8f159LGCAH1SmAWPxoTGZDAHuDewGdHdXGGc0xQVEHdnqfEcHJgOllVv1+YiSE391DymEY2SoZZLcuzidn3RQZFQ5w7R+QvogQlAjNFkAoZHBZbgR1Jko6eaAmFulVgkJZ0jiKOaEVIv81QCR6J0BhgcQ79CyyDoraoLqkRVs0C+/C/7JwLW4H0bAaikG9wKCSg7q4HpDzU0E6HEdrf49GANWWTipZq2XNsQCj7y4kGukFie0Re2HhQksu4nnZQiGPaMTM4noxe48yA3XbyWkeLMJAGUpREgL+hRK3HNJRD6TOskx0icgYsdaV41y06Q9BrRLjH3iSE1mcqbNk7IGw0wAc0AVXw1hYJl9yGTtpC73J0P3yioPL0qB/gpFs1UrvtDtEKGDh6smL141mo+3WyjF33kaFFVuKCEGpFivyyBdtasKc/pNXWdlgpInwAdy+nArk0FI3z+6/I3fcCKc4PW+DoETBBkTLiUdWIODmjh+Bq5/uye23tO8I56s/y1k6WKg8cG2xb3I1Y5s4PIc2m29KzDn1gIszcqcC5MftIDO/DgJgxoXDMddnjsLAzyBwh22Swkn0FvzvjxCDupWI5tYhAjY2KQX/2tbHOyUK5OpFlhZm2JUgtSNT9N8kTmlID7GHDLSrCpaPnas7WE0f2yOGoRxrTLyp/B6Y13gmUj4dxhFU+0qUlUWyQW2zAPkkeprWWUgOaKR/eJ+4kIWVipMjZF5bCBN4XLIO5529nnGUWMjBVOUdA4hmSYQf3Ylh/NROCs+TwriifsgJM46mFFXBsEDwtgUG2wrR4iI7w6h3NK8+NR8DlG9fotKUD7cXnKjjXvBWMOYgKjsBrFjUlpDsP+g6PBQasHDrSXSq/81xE46MIanPIAhREJm2OpNSATkwngB1uZuCzr43imEAcKcc/n7NPa+jBtF+i5kn0qCgFNhzxklezFinv5uBZW5eYLu6W269RmWYXH8m9Wtp/tl/PP4+K3Y+M0sTNvcdHjMlRlPbauqPnlyjMihKYSL/enI7zeOGE701GIRiDmmWI/SkngsiDoCTcv18ilJQGu91PERbIjCJDCijkJGyFmJdKazM3jbZNb5GqxkEIRkU+0r2ntlJkajSd5AaP871qS2MwcIYS7iknE7iuPmIa2cJ8xiloMRM69Vr3PL170RTuyMwj6HPaNUgsj5QsI5JJXNWxxVoQZ3m/rL+IpMKo+ZCBIooouQWbQYCaJNbAYW+aUNPYzuMm4WCman+vK6BSr3i4NrCSLlFjAYGxLhsIGVYHZEbKMGzj4C9N9XaSH4qiJM5dAXwc6qjDQpyOQPNKgfSlMuCrRhvlncq2r+RawsFStSV+j+m1clMM+VomHKnY3bNvF39N41sEvBtxZUdpC3dEwKBz71RaI6QnFUFsK85Faa/LzoHDi8hC1EcA7oJFt048RIGuCH6YNC6TE6P5wlIckBV33D8i9aE1yg4pgYmEE7D6NHBcLlfVph2Qah/elcCQsdvd7rSkm5uHRdt3MimfMGAYQUH5sJJeXohGwV5yX78fE5jGNAT5jcr2fXOEhRgYufXUjYAiPuxl24je0vMdKVum4rtiT7aO/5Q9HtT2Ck/y6nQniKRbikVk1PaEK1nkIyL4pcA9GKEdor+V3nGdoV2J4SIinxNWXUaqSAsytJoYw4deZy8+Es84no/RuLD6aAQPJk34kpATDNcqdEqLQbEpOGGtp9oEFsSpdtGZtC+2Xpyi4n90vT+qbPV4HBOqvpLfiIpWjCgmzz7Eci4RBnb/kXF/8e8PIci4WtopD/sLROhgRgYWD/7L+rYzatYIBLATVrRSDD9uZOLxbRXjwoVzkdkxyWHE/hx1dqSs1U3aiw17DSnsg2vHxOVDGCTKXc+brKRiOJHh7VKRJYqsHsn49vmbGXkDqLdycxDCzWRLwO/UNqFVhTgPYPyFh6sGAdHv/U0dKWGxJ/B0sbzWMhzyxgLQJWUSUR6Ud9jf2f4k4ahN6GyL2Qyk6spn5EdAQWQfpzftqLI/ageGCaRUsxt4GnHmxJiVxyLccmrjvfLtfhkQVcppP9CgA+B1ln17hHMSH23N7SSDbbORW15QrxyNK8EsXqr5+OPEY4FAZdGwXUW2LeTL8kLfnkrC/KAAa+AJoNCZbL30NAJ1JHncC2ZO7t5tI8B5nBnBXTnjpmawh2I6+7diwWNGahCdTTgR+BcEfKduklSMDDMjoI8YM9rRx0Scq3HE4K5iEmgnSSYVrq4X7slRXspZKPF6HSvE8QIstUcTt8iA9FyFq+sj3umKsNAWKhOdDn7Z7szspKaSx8MYJ2guXChOdsCdB5IVVsfE6glRztAe+uQaiw+ZMYwNtw+Yau1EE0COeiFl4k8bTEMg8xXxohrZeuLbzTX5Kfiu3lHahEdHcebVH5jDdj6WBPJSUpxPmcVAVWkl4g9ho+wjevQIAUvd+HKXs+K3kgcO/cOeaTlQsBcDB863wS9dgtjo0rykEGgPrDUHCm1U/qGYpnhYYx0M7PcF9+bfJ58tZ4U/KV7ts8OcCB5BBswEEUK8vK3pZvvx63Z/Gu1q+FqSD9MBcSx4T3nJcf1l5DK5DAqK8hL1Z3r7sc1aM5Tje1IQAPLoh38GoifdT5oeXSRrzYS1oFlFOtZ62B4QA0BEBktyTCB117/qHKoMZJhpXTe4jdRmqxwdX/nMV8/XtFpVYS+VCLRYRHBji40fsjRghTXVPYtF0Re1lB4/OIKeajQrQb8ZuCvr4Sv982HlnoIcea5C+ICiN307kVh5vcHBS0t+dh7xTzzA2NBpPtKExgLcrr7Q7LcpbT216kFsH152FRmQGCpMONga0pxVVyI6ZG0ByRvntCtCFA+XfcBivPDXtwmapITRqhc53POQdZqienBh7Mmo3O31nKfZ5qVbkI4O8szLZk5YgLUjz8lfuKCSHGG9t4VfOKtCxp+0Amk5+OJS3s0+12WDuUUH5hCMJMHLIm8HIibjnwWOs9JmIoBjN47SE7TqT08a0ASlO6Y8CO6xekw8jovxPWGu5X9VeOv3pV+yPU9KJs5dYghuDNwaC5Kqt5fGpZFxeby0TyLpqsHShOd4+9op0dhvwl1MNLPivfh4ALk87UPlqduQP1K+JStZFjjXAA0A1LcpTZVEKI8SwSRc3X8ONAeKIhY/SGsclNxWppPRPtaxu5Iecyr3vv3JdL8Ut0jt8AFyF4IyF+S+rOEPnRO7E/OUuKgptI4rqsENtBLgDfBJTrmRaLUtIv0jQVWioMWmJZiIUH4upBHtxQ5xAstXKNp23XWkcfQ67NwkinNR0Yy9v5MO0ac0+Fh0fjTbfrsr5TYlOiq5DabIDXdU4as82WKxvDX/SHiaMko5fU+a29o0/wV4pvOhn67EvKioLUBg0aN5ya4gxVSDXlK2gKg7zhqUpcXa1a2wYQQA7FF9BoO5MmPyoJLb60PFHUj5J90eq5gzEHVRnD/0DqHRV5TtIM2ZYb+brFzmbdymER9lCA0gmB5a8VT/rbrJXy9o+gZo9X20ipK2AZZ8eUXotZp6qqACqy489h1WpsOxEAUZDe/ZQK6Wg2kAs/NUhE23FlIoqNCcWiyrVoUVHzBDV4wyTKUIz26bLRpTz+NAmEUBwUEvGyJEhkFyYUz5w1Fk5LzfiSI7gigK+SNry9dR86ATyiLC7EUa7mHsxX4bX3WEe9ZnC6YCLpG9ZgWQP3RFpkIWaenKmbeiDWZDx+dCObNmh7Eq33+vR/ZxbGTA9AJTYSYU7lCeFCedzmfdYFHXJKenFQNMvadVVZWvBBM0RVTS1osyCcYmCARpyRqBBOaUbuC3nyI8CkInwiB1TYnt0gryKkMg/Pfo2nJ9udEO0WKngygjEV1XYsTLVsixamGFX4HQdOuKoIQ6uUflo0y0U/y9N2VbP7Tth0dLvmgPp5cIDduPu/w9sWWszhFBDHPXthlHir41wQQA7Kvr0OUGiWfUWSMhxH9Enz5c30z+cEaXXqqprFLFJSUKQ6ICpAzNFNxEj4NFjh71LUwL7cTggV5XHbZELeuGLbe2dqpXs6vwnOf/lbkixkIq8QmVXEeSQfeBrQTt1EtZpQgh/mecMYqsC7h84vYTRPRErKLQ8gvBaLitIAdNQJIEum8aSJAkoCHcpMwXvMcs0snATaw2fCxJtLKlgg3OB0ekWA2m2CtMt3h+Pqw5UBphUqQF4tgBikOKSCVOchL2FcGV54pgrV/u8UhVbrWNOTSsYZYI7n51zZd7jDJD4ZpTMDsdrEW5SOOZ+TRADSCgMEBV4D4AaO5dIrcblQmwPhVQycDWtbQ4HCplLbJ2y3eiFRSs2v8ofwizXyzzf0Z+iLQ+uHSkjwkMx2QkCSiIXv10Wu77/JtgvJIXIi/8bdOUKFn/TR/2A8DKRZE8Wg+CDTxch9eK4mpa89IXUC3e3/2KQJtrRbmBgJi6ERFW1QUIht2yjwwQfBgvSPcocPEx2glEFH4XSemkPiiDwuDIfH1aoVaTxYuK+D0U5CtqxJq0AdVAgiBRU0dtWLEWwoDU3BMEtRDKjyD5Pbo+RgikFGdbioLMBsXGqLFsRwUqiQZ23aAaHDJzMqXQjzcesNrXYLW+4GlPRXOp5/D9DnJ9V9YlVPn75ZdQm1iUOHLbbwYf/0/DAe+BIOFwBWkDuTNoSiK+DVPeJsCtmULEbm6U2uk/02IZNI+zRbGCeYuVG1x2C101sewvgLwBcA25Vrstl02z2sBvfPZsXKn1VI1/drg8PGy9WAfoNIBCnRJx9BQqn4EMDpNICgJbFAkW6adciK59EXUDiZftRtN3kJbOuBOmivwv1aq1RVWxye/stm/F2kYkTcbIpF/TxU6TW4nVZ3Ws6B8gRoRCchqWKLlRyREtN2eIJx120WTtijb57nOUEcOZ0pi6bT7AsgMGDSQS/JetFLx2UC34e+UvrLD4hJlAsnn7ExElubW9sNyEKWEt1XHgWuKGIs9BL/mji0SahsSxStg/J1SPxoT78BdYrB0iZtj6ZGBgZFhDU5KjHjClVQQTi5GKpvDm5LXQGxBV2ANZQNX+ZRay0foBK/vpbtnG7NC1xrmb4x00VgrE1ZVijoxR1pC2qjH6zrUqGYhEZjm2HlCw4a5CyCNRyBMncjfOcw2DAF/MiZ20yE2KTrBiYIEV3GOE2Oy9kS600BWDRTCVobHwo1QLicufEXLb1kiBeLq4nEalYg07nFmUWinsKlMArk4MZ0hidynRhf56MCMFYlNjhFOgeOma3pxy2cwPsoj3metJGAoMLlTFD9h8/6l5pVKg/Z/aJyCSScvzZtEtT8CV1+0iKlLrzYZZtaq5secbVdpdgUzsWWquXM9JmqufzJ4Zgq2WEoSBWvsh7IJgAcXGsFYzgcbXAT+sluiSa6YT+spIOrImQ8QFZmMw7BhMukhOennltVk7AAT1fZ6FBu0en86YANxTW/cZ2Mdkb9T7GhaqTbjPdFqYVYRwZHRgsIdRSQdBI6nAEjXX7C/Qh+ooy6+1ciA6SslXZ/tfE3AC3bGjJG2egdpgskEY1fIRCu3KV4+U+erwFNkvES4T6JRe4dOLPKj0yZEPmJkhOFYSmCNvP4dpqcTX946lboueTGFxBbH/q9/4CvyV7GMfEWtwXD+XpkewE8JLWbH1XhEL0fjGb1EfZAAVrXipocSlkkkFWNkQayLFFVavG/dbBkHM2VCiV9CReAvIRtOnIlJ0APMxa1jEZLcooVte35QEwh4VWf1WUeKMuHURqqvdUnx2ay6Nb87h9tDOTsMwuL6GVrGHI2HgHpwl9ZekDqRbEee6xRxDLdLeFDTCBFNpQbhFYvHpMzW1us5HdnKizGs7WDPxWcneedEgdMGErcorlt15nyFwfMqJdyjEP5bmeM2CPBZn7Y4g4Hlk3Pt7Vs3wavQA6PXmc6QmHr3OF4s9tAFEhl2lHWPFBhYzCRkWXRU0ebjSlmPFeHt0B5AeVtJtyxhzhBYB9FBMx5FxtHICirLJQg1oiZnzSvXp9+T5jl2EDhqwjHFmbLFGfJl7yJIdP4XKZl4f7gIPwGsrUa8/CwEOo13Mq27De/akJzdWvAi2F8KyxSUPbyopC/loKqXEtFMygtD6x6MO7HVPlARFmtsVy8wG5ZoQQT4jk5z+lQ3kv8sAZWOIm/+ZjpoarlDSxX4cbygv//O4nTyfFHbNX2U8+sS3ArNv7B6YaqK3/v2XNXaMJOhsh4XjjOIZo+FLrUO3g3hjoS3iBSAdyq1MoN6eJz6ftW1q4rqDbXTVZj7wrVZQ9O1uCoLQ+ukX09PJ+pKhKFjziA+5p/n+IK4yB8aCgxcPT7xVTlVCLEmJ5BjEjgYQ6qBOaiyZj/aawKBVhAex4A50MnOJWmueaDuxDFUuR6X11A63HiYVUWRruMie/NswbIO1zRCFTiwEr2tSlUS78YE3v5TvrAsnM8p3W5QRYb0tp81STOuCqh+Q+8Ts2p5H1DZV1aQhCjvSNuQawbmQgouUhRyD7yL6uBWazLwPPIVI8630mCPNH1xhDDhCGSGIQqkbC3bnU/1YQ+abnH8+XfkVEgKfnvmd6lkSX3Y9tXH9VGsmUFg6FELO8yLcljZGUMC1n6X/QTMysS0KNcooYfVXknrW9x7bK6QLA9Dco71hGp07E5gP69gGag3nRWmsphwty3Ds6yNGVuMTey/jCABfpP1tNB5glQ0zHTK4KedroqVLWhClve466pLGSO+eYzL9t+vtJEFADU1XnWVXqmL3T7oIBYaZQAWpu0JTW07n8iNmh19KK7jR3E/FjGVgnuryQa/xrHT1tIK+bhMVAm3hvMbBPV4q8m3ST5Nqgj3th3E8eNns7WR23dCejXPBDw7qEkLX1jzkteNV7kNHxRe/4kveFIfRWkKwI7CPI5N+0UOlbF6qb4D/iHtWlJOaaFYgyPmamrKYG66y6BNtqTVnQxfY1H8Liyd8nl4pbjeYRZ5KxGZSp0z9uaZHNw9xp8OOXiR2xXJ9LhKCh7rHejhrAuhgBRcaaN20z/Y6VCrOGuQImup+Q3hEYRZyKxFloYcXAksxdi34OeTNtXPUvMKYRRGRiag4lJMR8qPuKJOVg3Y3eD3cLM4en06HvoHvcv41scZbNU5DWEUMntQjmIbukBEVhNGiGYYHEKHXpYs82J2wR4bGbfgGmHTVYGAp7it720E5Da1XtmIuMQtnnKkEEJKpll+9+l9axJIwaW5pqDIVozEq/iL9XYn9m9AprtfzAWQjo0y8My8AfWjS/wGI2jH2MxzyEFDwcj8meI2vCqklFXONdP+nPAkeK9ZJsU4sZ5HcumM1TwtzGJebv1J234m+bzrh3ZKZADtO0i5szOHvIeRRESosxRSZ3r0+4WuQyV80mKCMUnI3G7XshLnh4QY9r4iFzG3l8oFa8a+Yi+rjvjmnl5mSkDdNdSamnO5ww/FVmBsWmk3X2x+Di1GilHO9UWSoGOlhXt0J9VeIsXcfyNveK/T8FpyZsskpkdBD2Ln3Bl8j1E2Mo/W/Q9CBWPs26lXD2WUwYvK0oA3HCqEYO3ix8Fw9PcDnFdMn+upJwEb1lfPG3OHQ+c6YwdZOXB5SxGpRzXTL9r9D0MCuAvybeHUl3Ic8jGqZmlFbN+uWuj7O93RG0ElqLTTDFSc7u+BxN3q+lbX2T3Ee5PIQfgJceLha7+ODJ/xOlUL+9J0P7wkwj+vqROyecJSAhC4uK7wGTxqupNcyfW9NqzNsd6lLeCGg+QEDTXKiTApCteeh/pCnaQta9/DcMtoDnzBqtG3fUmCWhBE27o0ERf4WxstA+DIlKZB+FlJTR3NxrYoNe9bHAo10bkSOio45KEJaa+lwJ/gGcqfSSXJLJ7nmbyEzLl9IZYzrWSdIde9W5FU7DL8KXxRMX0gX0+IWw9YIirIY0+4tc+JPDCgKWr/yUEqS0CA1IUBaNvXkOdl3FOGiSB/js3kgsaWK6hv8AkOTBLYwWiLFKAJVUD/FEUc2VrVzb4ikn1/erOmvUXM70hBBvzf+bH3UY3CCA2eMUQh0omyK9chw5dJpFwXVk8XTRYUhhFxY/JbXLqXBfP008SIxUd5jJbdEA8uEr4N9Ir5yfRnlHU8qviZ89DKSpbwKqp2q6PtB0Ah00j14NWMo3bwM+00uLTGePwTs9qS0zIbJXBHklNl86QYGj3Cogr7yv0PD/c01P4B7EE3ifjtOCY4h+xMR/8Xq+Ab2SkHD9jUQxXBrpXfoH4N4hrAphsRz/Dg5biXccbBRkVNSmkb79myReqT3ZrJ1q2q52BzhIt24LrQnlVgbFpx4o2gv+xzL1sV9wHjmnZLbpguCKkSeP2IkPHU9FLRqv53nGAotJzptadw5ke5512nDoOjQ+gP21ixHAyeRlMtCAjYXQtqSMX1lwWpavU8vH4peQJXgRPP9FgXL5zowobK2WJqTmM9fdes/HsAECNdw52FE4IdsSlUJ9KjpS543Ys6odA+R8EWIq9SkhBFITWZCEmlXYsFF9in/pujGNFeZIqQV3dqYklawWC4Jc16fqFvj/ouVzgY68LdoTIwSPPxyUZwwC/sZZ6wgoCopEB08yS/SWgmYiGi/B4MGmHT34pVXvvNZqWiW9OhC9bGnbQyVIP9hJu4CILIIEpSr4mpU94Wa8BT+zT7VCpieCqOth8pSdlfoKm66cokh5t2b7WIjVdUHCTvw9TCsfHkU5/Cu8hD8xWQiJb1KWGqDQMAWL2Oc/YSUL2MGLEQoY/cIDULBOCUP2Z1uIznRk72lGi8hDTXgtG3PEiP2ss6tHIZQk6atUopkqc+pktcl4+dq0aXGoFY2b1bQo5gOXHmOapFG2jckusRArdqBxqmUcvxYHIMiPEkbg5MaijndNw/yMAmr63kilm/e0HiZOS9SbdXUJzhnbjW1/GR5HbLIObwiPjiyVG79xXdS7ZLiIZmQ5rcPUdtIQpshxD56XgNpcUTPb6V7OSbz3+A8IKT4ykpv/7XgrE58hkL+AYvt9aZiQExlHClX2rpF6CrEcqPYm+PM/Lnz0G/v2I6zaT6xG+hzittm2Z/X6gueLTscyYeoZE1SLJISpCgK62RHyMykJDNbWjLA1z1ZQrl6QCZLlogd9N+HHsmUfvJby5tpGewz+wQCOCVKIQKxwMJM1Am+qoWwvd1E2X42VuQik8v7RshE+PKcjy9pS1nLrQsTvIgTpzX7WicMKX2OEwtSSkjo54iEiEaftUtnlcq1MjgzKaTzMiTpp4MhWmjoO0UvQHsrZ3Yr5AVyyQLRSUEYtCOIjSPvKvMxUUQjkjYeIac3cUFbge74L/UjCgkYcJSob5MA1W82TaI1vuyYWmpiV7IKGVlYS3YMYaFmWT1odujNT9hBJJg8rTbBckwuGdGrDEtUmWVX8hW0K5KmskLCzac9mfsqVfN/2rYERZb/pBd6JEjUEDCsTTgxIl79aSbA7AmdP7P5/8/NRxbWw68JYMB+b2YgCNT42fQwghgOL5a4eT83bCBTSTGLkxk/U3SzC2OXT/MerJT5VO2NtHIy7Mb3kerlHEr1ts5uAic2uZvOsjQGG2sddi7/S7KuLH9cTNSe8FUaOFzxNWgh7cAG0rzZf97+gTs30z5GRwDanFa/tJDMxSVu8UQJY5Gu0coGMHlDtjnliE6SwO5VOKBznKFS5WXcx95XZbodS+BPYYNfIYHNntD1Uue457SwuS8pPGqlsqI9SUU7P7dRg7j3rnsH08ASSrVIMWC2sF+xPV/ORQPCcRxT1RWRGHCb+KGDPfJDadJejq1CzAzo3sg9lJEPNSZeGJEOQxGrlZvTUxJWZ6l3sO3Cgm1KzJY6QDwE6pgsCdoXCD8K68H73ySSY/zIfUjUMLmmDgI4ZWNlIK3PUKi5UAOg4e2QM5CSQbO6MFnimlGCXBABrKRHWGafGhm+mbl5TNEzLpDoJcDzDE2fv1rE9M6FLEf9LEU8v1ZhVj7KkDJNc3l2/xf+I8cxR1VUqvFNJkKztk7gVi+g3lfmyTsFkUKNfUJpzexT2AALsEMf1zlQu3WpyO8PogK0UePbnjStJ+uV/XVEsKCpqHoFVUmZgpWb1b/THYWmD29j0ZwMN2ClrwXHC0YdzsIlQB09R4GSBeiEQAGR7voQw31EYzhYSG7Mh0Dwu1d/MG5uqBUlYfA8aY5g+pJpPcM3FWKRDXKMqYpOSorCPToEruRbsXnKOAsP0CGdJwVAmBVH5jxKNG2TpBLcuUiJh982uNwFlCDmLvnIuryH6+MUnRbmgxtxp9qWVXkhzHxw+W5mDoIVHRNToqLCHG30d9FYIigAEUGo0AXhWlZq2AEjKgq4WJu8oSN81bLiIxCSmxMwZrHhDbFEQ7paj6Cy6SMdFzOGzA0qsXn4SMZGI0lVlaP982hYi9Qkbk0Id7JQHD2hNbY3voQfiyPK/VvClf6M0NDHxPoJdHS9MUtuOI57DPOq/tmRj/mazmUbkISGZ09ly74Zc1F3ZeoAb7gUAsKDOB5xWkJyxgRoc72XXYsmFWv+9SiN9Nx0ka2KTpulqdFaDS41ixxfc0y6715Vc+Ll5CfdqcREBttY/bBBjvVE/jYKwfbJNLJVX3HSCpCpzUdXbt0gkFmca2O/B7Pq08IJ1tZiG8V5Az47yQhPLVJYuavxEmaaNgiEqUssZ8rHYrcbk4vkMV3ZNAE/G66US0CG2KlSvCnMjZDySwVYKoEHxeVJOSgQVUvwKN2pb539snqQqLJHWVEzoSEelP3Ip/MYJNk2Uh/XfzqdXYLiWJOtyvnY4Tmi+efxck9cdedPtHggLqJPOqppYHPnuenBmi5Vf90llseiuufAEB+ty1Dw30eoiiRb9MsS0ErJApnTyp2mx1MQuWz5H122dvJgEj59s+rxoZFuYTQh/ZaYL0/uqZRi110KkS0c3S4ImXzOHP2fey2wX4z2K+aCGkjl9aBKSynnwirXA7lRNFVDwQBv38AeUQ1P1dF16HpS0NbP/kDbFIU8AXUb/z7y/pigBb065az2LJElHZE9L4dKX8DPBmjsebdg7YuweZb4KrF0RoCwZAx0npWqSeW4XHqjWZ9GyFDRy5wuchUEnNnM0qI1hcBRv3EoMrHoLI4GYBp8ZbdedTbKFcME8JhUJcqx1KAuRp8bus40yntgb8UtO9KCyhBs5BXlCzuSqRTpoMMy83LClIiV6JGRxn5HxJCRvQRYMQslDqH5zwVvAJyEQSsF1J8dcY4ZknJkZIvSeOwV80hWTuf53jztCPY6E+2gXCAbNZYTsXXMKA9IKV1Tn5UsuuYvCTJYUz8mR44cThVYpjrjJ31D8dFxLYGq+G8dpBwpfCz3gmMc4W9Y6YzMqNfgkISr5zyQ01gKD+n44ED/6Y3Yj9vw+L6TPmSjltLO6EkR84rjMFypb3Bl9iQSo+IFC+OVP6te6bUcovoNoa67stITS36EHEg4UQCWsy1iBJr05xzRy0LGYDDNLh2JR04sWmLh9oYtmU7+eDlmCbDb6DtTC/O0RZzq4cSdkOwLJ660NFfXOoSsKoQ8YMS2Z9t3ovzUXCMrK7ZjnNDp6A7TcNFCd2tuOAra/OSvi2aBYpzo/SdSA5Jgyr5vGuG10JrSecI5K/vi+hBbNSye+iQa4Jf2PHr1sS8rPYwGkUJLwbuSux9TpZGOUk91HaObXVO/ve4eKFZua+0q13Pbd9cXLx6CoDTKQ1d5x2TjrAI6PbEMQKf5fiqdNu3+7h8+siKfdYBk8xX34D+Y3/a5L+o3HqO8Xd8F9dvIdipmEW7o4mJXGlv5BgDHLau0AnK3wPFKt9OrtPw7e7qpQgPc/ShA2bWsyXwnw8LtYboAAPdC/fZmX1Y3ZG9Kw3G9LDv0TPviDKtopBd+/2Dvz4IwcqAy14uhMqXROZC+Yrkhq64ZqmRNJOVTdZyNNHOVZPruCC8/EdmqhY2nv6i9XJsE01Hfr30MQqN7plQLOFDqLHF5BPDH1pvnPOn6qi7JOV/hpm6Fqts+2ulsivO6Tr9IG2KNcDa3Gcl6NEbueH1OTlRvEgn52JxlyqS8VSPhycaSjZNt6XSxDoxeXVr33PAHcShnBqPcn7HdfmimFWR2Aah9MnOzTPg7NNpjIImu6yUJCZIUa1/TLpbXYkoKQ1cptZnTolK6qGEIL/YUwNZasyKNo3JU1nMyQ0TW0oSySE0aNRiHSGPOc5YURaUqjU53pmTmAP8LEs2iy/gwrdvEz9rhPhfZ1GEQ3HmW46xLZvXnwNCpna/ay9Q1XXZV3t0d40i2nk2c7PHafthsoMNYSQNe/o7P8wExBMEvpnzAOozQP/ii4C+aNIR28TkinAkMd/pW+8Q2LH4t8qHhoG+0/MPgAS1a1AsGu4lOZlDt3+KfwOfZ67E5J1Ca4rwmx8lL58WpHQK3pr4y8zXmR4tDR56N6kMAIu3VxSVrkrKkTA2NG4tz+6RVolaus0Ka0qEUx6NGc5iq49F6suJU8Bg4/s2d4sbxTnU+IRANwoFl08NhDQ5qKPSbKvDeKQAUjYQ8CFCSEJeFdSrIkU6W44/e0AIfxdsU8uZP9JQ9u4jLWS1lIcULzAK0uEeJ0iC0ja1yl4G4dBeUyPWMn12Nj3ViGTXLKMdjwtFYaqzcEv45our13377tbmLn4dwd+yTvgEjqFS/v9EABFrqNI2aN4zjiWd2PgZa85p9HyPhGB08PvvO0fqkRe5BxourOgtEQCfqqoiUSbyyCosUEli6AtPDrGC48/EWWY3bRCYLJyuW/o6FVNM0j8drStksuMmhG0GONKP6cYKJ9xaety1BAIQa5DBNRfpG2f1MgoYyMMx/cEr6MYNiZvvXS8iCbZoSPXhGHi8BU42y6ZtUo+CIhkiXFl6nPe+6iB0BOJ9AjNMaTQd5QczpOIm/aJ6LZlU90XgGBcmgP9GlJdJMon78UxmVjI7bnhGcF2TEZZU8yn+0mRLJHkvg14rDHYxLIH8jGWGAIGkfrsyXPKHkpFF4UV7b9OiVy5FIC7BHoCf1nk4sUdi7KoXgb2iREVizF1mVPkpXsxy3wXp0z90GdCBvxXy5ZZz4uXNHeN+yFvZW+ioFibAMwSti7dedMSZmTl03kUUEDcmbNNT+2jsHHrfuVtV61a5YZwPNF502GQ9Uzj0nzeVYTn14uKocUS6vTZ8xkAPPr+9y+uzNmuO7jdE3nz/iHZO1T7U+lK1qJ/dybalaXkxvRPcZEbjX/+3c2t4JHDA+vT7OLZqvKB+uTsdpXyb8KKLl1S9+GkqweZmt/+74G/yGgHb6ZO0l4XP2v5Pjw6kaN7l6Fkzzcu8J4egk+n+LQ9SBw4YCGHX3BsQzinvIjZE0bRbNGQhVK4o8eQj+ybKFUczu6sr7B0hvQhMXFYUu/YDJEITOZHSesnQBhxR6t88/E8hiffqGfiQAW/Tww6HrId2ZekTuCPJ0DgJLoQrNUhqpvces+czp9RXiBKiiy46krIeoMcNGtisQWVn5PMAzCR25m41EcFFIUVRoAfrqxwOL0byWjJ7+Q6bL6g3pIv8n8oWPktKwnt0bQZWrLH9R0lud0ILMRsh6KmawK51KRU7cWPf6wM+MbKqcCXCEqdZ2ynlVD58XSH6SlPB7k+lcZ4p46OTkklVhcwBbFua+59+JBjpyizJz7s4vRRh/fQheqmT5CH+PUjkXzm+7c2l5mfC+s9T77q+okJVNpYEV57mh1iB/9nlmd6XjGMpOtNYM5CkWRaV9av22Xhcv8CvOGCq0zOwY+Ilwe6aBSDIJvDegPFOI8FzsnNei1MAXnyqGiLskG2tCnhpXLTek2A1Msjlh2c4wGvLlmlQAq5aQ1vtR5001u2/JiIPWoTGf4A5LhPuurztXrta8MkbSWlmpid+0Uvk7ON23JbbMTor2FUn9K7bvulO0mBiVuiD3mRn44uIlSCSMHDqHhSl9v5V2sxRPKqYp2L+D5/JPzAixb5+q1T3OshFSw1gXyk/SJplQtO3Xid9I60De2ND8bO70GBwqB8oSJn/T+17W3+vymKCxlSu+ZEygtUiX9v4/PxtYd34CD57BRd/sL9xCmjeev0A50yrgVcEz2NYTW09L2CuxACoc7YeXs3+gAzOz3Jlxp41pgohCuhBJ2cXCFORYzxQf7NyPg26gY1Js2fi0x+4Ib5PsOL2S/wAqhlGn0HaNY1adtbFboo+KD69smL2e2Z27xBWfd5Jy8UdviEVjjXvTYUF+sKMfHZ5b8G5613XY0G1oEpUP24GesXV3+Gv+x3CwSG+d5nexUhJVE7BpxdnjAiCrUoWnHYUlda3na5b2rjcbh1MV0WPpGir1ngKp7GHWNhqzOqCQqB0txVt/IGG6J0P9unLoHX94ykKGbsiJW1DraBdESTgzZh9cH7h4uKR95DAiqIsjXzJ93z6C/WzVoNChBd2I2YnrRTMLhvIo3so0V2Ij4QcFwCPtRFKzOBOI+VylXS7PgZMabUd6g4oFUhBRGAbPniKkWdVpDHeafe0pN3JlmUyDI4hqVBYTMZJB6I8IydEPC/CwL8ZPuTOIFKTnzJQTQb0WWxSDEA4R3Yi6OMANmjgZyzbKx6lPSEM3JGuCiVYtkvK6Lot1J/RUpFL3A2Nv/sIBklN8P4Ji/UJE62n3hF36uX4iZK5xgfaTov8LnW1+y3IAJFZuTnoLxIcHQVhR06+IZm4v6zqiqtyXNczDUEhiGUQKOR4I4KeT/kYT7YSgLpBsGIRWV4qnY+2YIbK5UVFIvq88u2v3Z8XBTKliZKWKenL4iU7RylLp5shq/KCWxi44n4kZpoJOoooglRqV4UDDnsDTSDHAyF/UZaZBdSt9O8LJ6Ya0UPizEQIUwea7wHZ+Os0ysaSPasOYVTVVIwsdiL2s1grXAEgbY/TKERPgg9AFhor9r1AYqbws6oO+6TjHv6KdQSFN6VlZDvqZlg5/EXbmLLzZaJjDMRnEWYVzeFyfTyqOUIq3wDjWnYxzhGPHigPmFJLOWbo5L3hUdw9wntMBT+76ywYT69NB7jWe0zm+BdjrKkcT1d62fG4iYEx0KkC3BSSPuc/2qazqSMjwixWZ0FzC+rVEghOcmw2eP2S3O7/El3SNdMmFjhLVYvzELqSE7zhLjbsg9BHN4YvYi8AtcsUhB457oxagALurrZfk+OJeMkVkH1Uh0UwrQB3Cs9j4/zrS76M4WID3wQec3/PtZIxqUWMgOxsKGyMKfAbbLnybOtQLgXY6WvOeckDpgOIAiV3VQaKzlnQXrQO9ew43gN38oH2OK9eFkklRitvedEZre2gkBCEM+tmJo5T1q3i6HYl+VnF90+6X94pXYDpb6z7yTYqoIAlzvxNoFXqJR+8RuSzQzKxXxCcPAusT+gO7uLeNU46280RgypANGoPkDjcVtW7P4LobZxYxMq2LEPiWCamvvJfjvRx932unqqMUQQUcVGRi2Rodg8z4yBU6qUvYi7UKgxhXFMoJJtrxcGNQm8M4Io08GL7p736Q0s1R7xi6yS9+mpz79d/rUvAAKuGWRBvedDhQFZ7+tPPzjs4A7iYUPaOTFyb6BODJFew63S8PBTYg2iMKUlWdeEwHIY1L/GSU5obEvRyi9wXUiuarv+gpz0bUPj+EDMK9ve92fQvZRsKPlp9u+7z1fGYR2wQROo4RpOZx1s0RSN8YjsrVm6u/1YLjbIPzIiBlo2/2s2UCBeGgvE6JFzEusx37MVIAvpR5dH6Sy4tM4UBEGsL5P7vjPMI8l/STH/OHSgKWfbh/QELWUTvBwqxW80WQa9iyd0RQWC0qQD2P/lk7RaiVO4E1sX0aO9huu0MSKOjSxgi2DQfAYtPZ4atNgKe2a7dxJkB92pnEkXWMPowHzhnsWZMnBTMOL3/VLvsCRC6eU2PN2YCQjArh83NqeFtTushP5auOcf8YpEPqFTLWGxUGX1KccropZ6ynnhIdzMV0HiM/AocQSTOro3tkGyITmMKMsnhOeTkrk+d8s06AoyWL7SoPsCIiE91NxIIeGMfnn6KhF5AeX/XSYcgW1NoSa3wr3b3LiSqzjCrwSADMoneAnFSlF1jsiD9hUzczhldqsyWrKJ8s8KBxeTo5tJ3liV+ljgpwbJrA4/bWGuqRqM0bJpajKcqdODY6spxggvXVaVGKHiMu7wE2CHrPcdn9IeypeJiyVgTd9Kc4xgRmwgRf88Z3QrzegR66aaGGlfM2tsj/r0GLIWq0ze+nKPMXulHSGHr5GJlZ0SBYQzjMw+nNqO5TReQ8/+YDZfVAhqpaE6nW0UVavaaRcqKiqg8Tdr1xciLgYWwOCrfSUQJUjV1aee5Qj2rPprU9BmIZsjkacc4RR9q8YmzByKQWUaIbzIBIdX4iD6slYjG25ax/iB6QorYeRZVHNVC1OAeQZBWTJrMyrrbBGIL+GsgCwCkkud176qxc1HkUZcw4VDBm0f9j/6H8XtBCIg4XYWpKffLJw2Mcw41xBZD4hV3iPIi4fe719T2SWFtGBxU1qLQ6FcRwajZDgbJPGBXdeNW8YvEgsjxpUZ8xp+8BLhbpThzLPydTd4tntJ+EvSC0pcATc2RzDiIkrThq2vp0x0jfCcxdTisMAIGCl8NIvkhVMNfv/yVlnnGP4JOHbFj2+g0/z1G8h6TACpyinIUOxLbIkTs9V7VWBB0yTRkPEG6KakVg4mMi786bWl6c4aPAwbIaFK0oHms2lPFQFw6lY/6W9mw73kmlUSJZjCtjSySxvFeZS9bVm5dcSZ29qmpWCiBPVxAybpKJQAyOxqm8PGm7KnQsWLj1nKhWVB0gsM2wqF3CMcsrokDmoXCiFc/iPq7brUOqFLb7doHpW3/b+izW0OlFpRsje/q5cYOetW5O876U3+65UnA//kKHuw8yTy2wdECTs4OKJb66FiLNKjKQBR3xcv0DrYXoYFekztiWpPA9ozhS62wjjgMagZozbbSuPAFRTQynNSS4dVd7/MfZjL4+bL0qttVp3IqbNrVsafOtTVrk1VYsPGdgR/TxYqQrc95Q1WFZXANVVtu9ApbcuVhMiySx7qpXdOS5nJ1CHzmS1n8Yuo7YFpF9WEX0jlvCex+TZjEkRRjoAKd/76fT8dCKSx8nG+aQYgPpC6P+qTFDtIC2JX09JN4F5LwUEl8Uo5/7+GYhOsAkELkR9VOfJ9AADeqXAPTrjfHUI2c11eDmjy4++MOT/wr7SLGFofPLDVSHzOlvu57bsTHPhz2SDQrVvnZVhxOMriIjh3IKZkpbJA69fuj4DIsbH+zNRuSWYQgao7E21h/s/aMdpuWVJbDgRURPq0HLu0EeTCUOnIfoRJtUkdM81h+WEeKSjaq4T3qFw2kk5WyqX2ZvwEhPW59sLZtypaiL1g0FpGCNsOOe33Eg+knyHeALlUSkn74m8fOghKTEppNuzIRGDzezCoKzp9XtYp1M2kQy4+KHPVROSdgIj7RzjbyLsNYeg+cWrhG7lgDRn8xfyqkbKe+5boZxHMOgoBjs3dWPOlPrzyihC7OAKDL1kpTPUG4qNgnQ+l0/AlbBgwgUvWZ+ry4EDdWEUu0t/yhki1GlynGWCX/X2TxIK+YG3piJesTFGAWN0W8nEzJfiLJTJVH3FoydYHDsrrVRuLQiR49rweCI2LWesPKZRNDKBPlMJHBBVpspwREGCfsVpsP3F9i8mq/nEhlc6CwwDLxQvJoq3khGbL64Q/w6zhGeF7C6wCaARtMLxDnAA9kGGBZcI6yOiLpIhtZtWwieEW0AF89K3aaIrkrxojaNLcKeA9BDeS89nVJQxAjx2HEaQ9UpV07cDMACmrCVxbBJlbI40oxsSNlcAp25hUUcG0jYgYGeVnm82giiATWfZAcqeD+pBAjb7B4CXh4ySpqwT1ogtfp6YPEImYcbNu0QC/9F4w3risYxOOfhhkGwuiT+GlVVbmiYOwfBBJnJF8A2cERUBRyNIE9GlBsobjfsshUuPWvmPAKJW7WJgCK3PSSTWnRT+2QPeClns/qaXprSkP6kmpYf4akC8y6QCHUpCxYO1O1iOwArW4gl+8V60waGW/j17AJ+m+yxmIIa8pSbEILq7HdwLS9tJZ8b0pMw/PGW0IvJ4UlziTHhUITHoGfHNwGFAIu+QakCihG0EqzaKj628kq374DtEJt3JN8DuHnq/A0s/zYiXwSO3lvwPLZjNvXqOS6cr+lBwagpuNI7PgbX1Gjjl3oeSHJn7P0s5H8UqSKGbj5Cjszgi3ECBiES0ISKylEonMBwHBBC3cOWB8QKpYmVfxBq9SJADt5WwMhxD88VaM0P2jyQh+Y3b46N7clfHYkxoZNzpLN8lYf4BOcq0keD73KIKr7rhTK5R2y0wGe8sqggGrXuFF+Ispu6tAPcODtKIZPz7xy7CnkoS5RX3sAnOedv00BQ1RjRwzdP3k9nBN9gAJSsljpVCkApUFIYdlAQPZSWjrCuUq+2sR+pizWHuf63qEeFUJK5I8FaIJwXaHrgIn8rSrLqwKlxse0eNsd+S9y4WAZjrba2SqC5/ZiP+8BiPjZQRWkKTdoKZXfQz7jls87p9iblnVWc4MnA6hSP+thxBi1gZSROPZuv4DuvqBkFK8CqZPa6eK9LR4Gecg3uWnxdiXzRC7IEjVwzz5XGFjOjyEWqH6+eCRlO9x1ctMfVl/i/34i40uVOmPYpERridOvJQ5wXeYRqKONTNUGLUEl+RlkyZJqJv9whcwGEAdFHEKz2ldi3WCl9aaST6uuHp3bhgwPn1YxcD49w8+WGuSd+sOVxs8Di8BOWdYDxTavJ6so0zF4uxxueScee9JUJAe3qCdT6CJNpvGDyuvL0HpMOsHQlWcfl5ySLjD8DdT3Qc3fa1jTMpprmiSBdTvdCb3vwnU70fuVJZMym6kvn++vETjNQtgfC2HG7QMqgVbePOnajAVbCyFUkPFol5oaJO8+GeDH+Feo9IArLIbnOlXhKkBPW9td8M4Vnz4FrRDuMKskdwUjig8ZZHM5jBW1TdTVbD6U+4MXY9Pcd2rj2sALxc9e6S7H5Ua/BBJAnAzQEf6csuTB+cY3ptRSq/QrAA+MIrcVLJUqf5mbCJyrIJH/QPODltErvXnsDdeDUHXz+8JTuQLGXpSEyL/6B1zB8vVfsGLyYkLqSJGXz1GkThZecX5NU2MRbs76Szfd8utJ/TlmTU0tEXzNURUwKbsdd72hs/Oh5WQwDM4tpz+WqP/7BDcM1ZxPmtFu3OxGsnFZVD0cK9hrPHAZnhgte3rZYvDG+E4gbdnTaMP9OSMwhdkkP4Hq3G7Kuxte1YEflaOkUd4y1+EH+g69Pmas88ZeTFs2nKPiGAWRB7ahH9ED7U22sYvzxlROaGNknAg/SF4BEvotHo2SPxqR3SiNX1Djgr1z6+Zf+b5hUG0iIJJitEuzKHvMTG+UzXc4MXv2yLJRJmS7vAWZxl9w+09MsYy6QWCdXdtc/9lWQknf2YV+t0XxqjMwy6c+GHS87K7JkxHQmln3s/kRF6oKZ2GpyjvzwbVbLrVJTJoKW6sOPea+Q2prSDWvA8vwYs1G55CQPvl3g8WdP6qbOUufB8D8B1DcNdgDFcLj6zj1//7k7QpX2XHkcfXDftc3XKRtD3hNxEUMq3e4I5lrQfR8SP7X/P/lBj377c3bP7JdrN9WJ28zJ3ZXH0iGI9RvxwSPfz49cl/giWliyLPJkIvYiUKDzkoEuef6KLhZCBwsXJNJvvE5tWEq8Yi/sIg/DIuFWv2z7xDQrmBR8/u9Ja+Im5eeol11ZL2XMTx6IiitcNMuXMNlkF3TBPXiQ/vRWZ3JeZuI47dFLpToxvVOPa9QIB7v8NGXXEs+qLnfIBiu6yLqQDKJtJHRUrYOC8dZnZKIoNn06SWrRMhzI7lO0o/bMIfc39RsyqmCiUoBHbqJzmpcAH+8CCam/+z5r4VQ/NSdQk78sCDIyTMYufCnFUHZvFDU5efkGczFaltp9wwz7iZ7fphmYX2b9Ra1bn7XvOfFZSDwVk2FoxyuKPtKdkpC4oCAyYXwyqp2VEU3k7L5X6/L7PHyeTKStN0PxMiAHw8SbbCyyUEbeGWXn/K2gYOLEOeEK7QsrI08NCiV29nQjiG2/Xlg6hjxHFTQHHE3TUUNiE1t854mp+4bC2MylnnQdUMBxVsmFZ2H7erSVpbEO8IIL5fHqpCa9iyTCpCrBzMIgMTPINXdPEwH9KAk00XE/F7jtt+Aa2bJ4VBEmTbkkgRn2jJUpm1oG7VIsNGwWlFrQzeUGkCdvYbfS7ju7T6GKTP7/wJyOTZvvDs33Wo1HXrRzuz3d42oH1jDdzDM++RaFkJNLnV+bpDFWO3Mv1jlPX40OcchM4nMnRgcT3QHSbpXXcuwmtceqybrzxV4EOt5Kb+nOdgDIGY0EWeRgha86gazP08mMDVn0kQjum8MjOFArDdKK+bDU+YINoaX7CfAy69neJ1VBTeTyj4753zHHrZnxwNpnb9P3TQ6vnXSy0mi/68aaaRTq4J6yBiuvmxkNvolllKNxSeQBbF8uBbqhMBOdpbwqWbEoJJyfrkWas0IfUHAajdB8gogzx4q83g30Hm/QV6ClmFqD9fg3WtkjByuvUReSZzI3ipGtQg6lijRp8igwbPFHmZKrdRfqreelVyzjce8azdli7QBNpb4IkWcUqx1Q7mNlFbyQrjzcpx7Rw1wpVkEgSS1BQ5fN/jvsS2GPswLIoVKZCf6GluQWv00uU/M2QokMFB/KkXHxxCtLujZXtcO7H7AxPXwI/KCxDsWtLbtJMiDl7IgGPGL+O41qt/o/yhELKN5nASZeDTllPMZB7PycsREs8QnxhnGVjiOOjWhkO9L1aOvWCLOpz46cH+nYxQAJYDkhQX4OO8fArZjHwGXUcVgLDF5lRzpAbJUjR9b9QLULu8/vC9TWqy5/j5D1eWZ5PGsVEfz/rCpFrhrfiqTssF9e27EBfM1lwX6gK8P2NVhNyCZ8aMOo3GgqSvP++PWcBiwVfHB+BP5sQZcf05HvhxFu2XOtMyCezsl0xvqAxoiejsU4j2T8op8xi18dyEzQf+jovJ5xl5tNZZgFUvj7pl28/DwEvO3Z9qe5bMUEAECL3/YuMAKujG/vi3bdvIuyYR/Pz6KBgTl/ax55TQ65bihtoUdNF35skF2ETs4aJmN3V0o6Wtu2NHhPzGJ+xL1ITDoUendFO7ASuCxvg4XCkniu153OiEKp0PBYKE00g3bKvQ7FMM+vVceMRkkriOFY6uROrkNLSeGW866QOLbIKLJ9YBoxMX6WD7cxE9V8hdclgd540FRPqqV0eLWSwm+UAkgdrawcW1VK8GZXHLqKcvSoXUbtpJ//L7Aotq+sRU42el6d0QuLxc+oH4loSlohgZlL2b7NMhmLkBEB2B2XkT2siB9Xso5MQcb1G79xUpBdmyhXJI7+iiuWcRoG22Ot31GiVjMskLUInOmZ3JHZL5AJm899z43qUw7BRV0QAdkBuvIGQvNoTOmZyVjlIdvpFoVxZu2mSaZc0SBj5GGOed04hglVqcIBHpcXvok4PHKbZGrLUUn9Ay4xHUJdEGAYxxQ9DV2CsiP2EZVUUp99reRKh1RAt0gOtHiQCoh2ch0YdGB3dDZ6+to+EppDuDDH1BRRg/swPWKFD9qGPHE6N5JnvMDnz8hFAtiCyW88CZpkvDkrvK/NxQBD1vYIe9aSNeggAfcLW8UaM6suOpXT0K52ipFJyRSGkbckMUMldI6D9oipXleucJVI9xrWDa8AzyLSpND+TfzrLGfkT1XmrTso/UqyARcgaZOpsYKVqbLMoIDSXDQwjnaReT0XmzotTiuttUz2eOm//8trrcXycBdcYiu7mNSimWHL4TXf0YxZtwQlg0FINXnmUcc7PbLTeE9RZfaucJ8Jh9nf3SWhZejIMI+u6bE2/WgBCJ0IVB+Ui/fkQsv7lQoXrng5Oy1WNqUZEsFokg3dfr4FgP8IqqBSM44mwhArPdb8QHOOsYi9Np87cFY4xYx8tyAXPJiC0i4EqGq8Ymwi6rAOtu/bJ24cr6C//LTJ7CjKHgNMQV3gtnttUoXfMJOTtiAUK3OQIyLkAHznhToICG9FL2bJe/2GWPPsEG48gKpQewJgjAEtx7HhQo0foKUCI76nq/M9GoqSkxDhW51G9sfplZ6g5QqP5F6d4I7zRf17zQ+qUEc9IH6XQYBGSullc/xQ8Er+cXDX02KhVWcD0gGyjLSwvL8vpzFZ/LqtrPU6808S6AfknS57l0RplSVKsBLEte+tN6sQKn7LMR2E4f0mZzwwR797wSek5+yws346jif/l19nfI1ErOuxIzmsCBqr9HvMnumhwzBNDYmOI1Or8qQI5Kk/pVVyQ2GZGXKsTM7Onithswv7chThkfWqj4Uk8mIUtRsgKz5N5KB+elVvOnf4bbjDfHxSy+IvIQxqJAK3HB09uE0M4jGms1xRGs71i7Ba7DZWBIqgnW/3a7Xo7recKIVJZnAjU7dniechtGyK1VPscJA2pgkYvPK0PvOBscFl4vhD8jsmSM0YMYIe9Q1QlDArb+y/SdJcTAT0cgqxxGmERF+ymQTL3L/NVCt+g7TjXB7NJfrl+c3wim/eEmGM6F3YiUOe5XzKsucA0ab8fnrW5pWD49i11jNrRWiSIB8955Mlw2ZhBKAAU06nLcNCDEnSzqwU/9yNaAk0H+qzG/2XIj1oOD0CJ+VsfgQTIjK1Uv7lNhZc92PR0g9vXwFzX9GX0voDzX9PXSpJ4sshjXgoeEM32k2xC5IRAo7Qt21i2YNWjERtUUPbowwJQP60vJEMLLNamVNhOCME5bAXpmZtRpo2YYmfNc24UezQ9Bc9bRD0tJCJQ5AbDVeZKsors2V7gIsYsM1aQkw+B7D3D68JScvAik+l97rnK2XZmWoqjmU3N/ohR9QGW9mtVF45pjyxYi71QXXO5oJYzx9e/4So1llP/Pii356VAq6mT2e8Gzt3ZcIo2qO5pJr0ilk8WbbgqWfgB+6aVEqK46fXq8bPTHDX8YRmWcBSNyQv6/W2Hqi/usm6rvQ7DKIqsjTVdZ9BpgbHEqn7OoSR2TEhXFd1z3j8NR04naiWN4NsxZy4UAW57ntjdR0n/bod3sstIK4113HbmfFaLQ9wuGRwcST+UIyfGe+f0MnyqSv8hdzC9FPMPvuITw9Slw/X3WdNe7agl14tJmoZlr5p0RP3M0RxdVr86+AqkFjT/obqG1gjhLlaeZJy1etqDsMDZoP0+WK9i2FnJcOtFwS8qWBZghmv0IZTik3mgvmDqqBwmR1CvpSWrZsMG46kx5LZ2PmAps8kqG1vOQ/vmB9Izo2adUtT6fH4aCY8jJIpF+k03xT0iuku/UGa40xLUtwLDO3gydzGd64Bc/yo1YICpUEOVrbCrP9whvR31L3pdT9OwD+w4r+6bNgG+Ui+CMkx4Bsa1yvqEA0U2aCGT9NQdtZrsLqROz9fx5A95HUFQahrKNR4zjw7gx5+43iA36nN8Vf/A2FfD+Vx1LPqhVO4aeIZj8/OQbF1KruTHtbmOFQXR2+RTrtK89AQrkGMD8LIXWQi/JwlwGdi2xZueVyfl5CZi4FM9q+53nuqSKjrHsfY7c59YvBFTpjdcbJ4Qqte5fi0B0U/d5GvJNAM2lw2iy4Lhtrxlhy4iub8mhqZXufzT1Hyr9x5vZUdMMean+zw2Zg1i0DeGSLZCy80RWW9H9j9CouVq/RWep6oFFCeLWs7VKYrNttEqTbcQpPbrp5Hz/aQpsWZHPz0K6CSSiHvfoTtvrdczuoFjZrzgGrecsqY/0RD9KmcPPMLjqSLSZK3aPF3CEB5o7MnuK0vtPloU1gJf/hkwa5e0MC8WKRwh5STacBL1Hf3rOhjq9x9TdHRpgbtViitfOwOn8+78m81siRRdxx/m35bsgaKu1LIgs3fDZfGlKwyXMDxfsUe6RRF8+rJv5g1FnU7kBuEGOGkB1kqIDVvRSROaWBtwK3v4U6fLHMrbHn9DHn/FFdwMrtldIxdPEr3EGULY9yGrDVMNoYDbZvFvjhyrCutMzKLPE/xbWeOeW6nt0lf93ON3Qg6MKpzo/hmfUrvzLFQveEV2PWppBzBgGV+uylC5zQ0rHOGnX17T5rIsOtUBJRZvBha4fTblEVUMmb3Ao93pz8nwDhZugKqVLV3q3+ivPeWigHHrxZ+u2RqA4ia6qG4y3wcg5giFnT5/+Hb9ZTS5b6EmYSTaz8knhgfZSYaGq5QNftmB7qDuNhcKeBpQel9GSNww5J35LDNbzD4bAZ0jK5ybHycy2RQlZWrkJp5ydswJqeIB+tMIPdTt6Fho5tXPGM4i1QK1eyZOY7AGtCLFHDZfGSSb4HE38MTXeKXeOEhfY6oUsY9KGf3ZwbBf0nxo4vINEiJPyFSvmi1VDRmT43iTRCLYfULEw1gyyegVqOdEMhcK52pokT3KCZwv2tjBHyW+Fh9o3Ql0lcC/84CImQKIcsKy2XaoIEOk38AU4Xuehl8USMlK9XSmDA4nu51LK2djbnIQu84v8OF1VIpukNa61QvIBb7rRVey/50ueLFwxejR60Rm2rDfE5E5mZ8XKYHJSV/R/JHtPR3KpP6/8r2rrq/OuJrzSMRldZ07ovbnm0nx2s3CWjpS04C03riVP/dzKTTLN0mavDS0cQ4JTA1nzGL98f7w66ETnB+M8sg3xdKJ8b/K0fTIleHVhPs5w6ykhsmVR5hgFm54sq8kOUpC6zK1aWanxm2P7Pp508hkJaBE+5FFHc24LeU/Jx7WRBu9PwpH0/fDkiOZa73s9QgCwd43ALbYVX/sau7bW7LaPFTpzZvMWXHt5BWWyATv0BwZ7uJKgnm1ZJjO5eQRqL+hLD13gBxfCDjSBuFAWE81uSPlVyAyix2xBviV3PIcQ/0h5Y5gaKVUCnq62OcAR1H/lmBkPVcA4aT49u5/Td/xKHd+kppsM2NSBNbYuRT27U/79Y35FUKpcRPldEp8nhDVZukBTSIsf5G2NYu5LS+BuAp2Zz0Z8oAbwe//xV87oXTlr+S01NuhDknXVMX0CnZpyvfWmbH77ayRDH6MDlze7A8DQJedIw/M9AuxQvW3xZqSyiMHCM3DIs+gkLPBPM3QZ/BZeVJcNpKkKGa0Wy0U4uX6hrafrpvQMx+hYMdxzDpFCYvGy9Q8gR8mzSLEHevtBq+KuUx/o7XI9mUZfOPnesBW5kpwJJHVhM5Yqbop6/k9KzhSe08gPD9MqZekgQOWccDCjdyzsLUj+zuc5SYeSj4Mgyv3GBhCIPcFsm9DZmi1TItqqg3TifsQd0P2YPc3cOuoM/gtNJpJvc5VP9MnyEcmdSoB5rbVMrKp9Iprrqqwx2NJeoKG+PYCFXT9coMoZxIxPh+RN++bRJ4U8926DZACEtACif3CoheiZ4hQ0q+F2RazkW8P/3JB6m3MiJEPT6wwntjBd4MWE9x5Xa5zoOUzJ7DSaEnz3goeSYQ52RUZJG9yY+j8fJf9PGobiT/OEq068hvu7FXlBBpIeIPc3M3jhLkuzmANtgRfdfOSfoOQZRILKfdqA4e97mOehWrE+/IFZ3Jjuvl3G1zkXa0xFQu45dfCl7xe/5y12+7+8DAiXln1J8RWPc+lE84vEJov8N/J/kATHhUp/k8DpQNPS9FyoAhAYVPigR2nS5sxuVhaHB6piTiOaTh1e9jAZ73SsZCO8SzqGIVGpXNvT5EdwzKcf/J5cT884UkqfPZtcj/yiDd7k8hToBJidUs2WPJWCBXn+5k7dB7wuJL8M2j1F/J3Oqj9V8iUKmCvomWTUlAJThtuj9dXUqSKg3vRy8AB5PgatWgDfYAgXj3VFpeaTtLKwDXORg8wZW6Cza74p3tjbtvtwJIX+lsegIGV8g8rkboHx342Pqgn1v/mtWz6FEJ7y+NgoO+C7ikRPhs1I/yV+Y2UAVY8e9NkXOQd0pieNs2Io42p23B9sJlv+CPDGxzwMXtVGY2mcP2z2zDHf/nMRdwUBxKcj7kOJ8rNeautlBKq8/JMGCpJ92GcljPzCX3SIPBLRXSZKlpdMWyQWnOdB9SoF3czNV0HTCphBzSihM+ZIO7GFGcPS+yLjE98nxFtIB1NH9RtSy6CPOL1p/3+2NONjamL49LuFlEzRSHyCm3fBGDh4+Z9uDGrqBSXLZS61B2QpXmZwwUfM+Q9P1Ux2f5adlQxU5by3Yed8t31r4FH91mWdphO0jOVtTC+642VClHd3uxo1Sx0Ms11Jl66CnrXjODmk3nMxlEVFoaqxbKKpmrkncf1OVu3knaCwX79P/sujHsAxzel94PDK8vrROcH7boFa6dL1rvBFYdFzcH/KhaHPmOmLAXT9uZ3RzqizyVIqTevz/+CR4sdT0rhjL93BDKWLflPV+EEeTZenD9BDN4tT5t1UEI3p7lC5pJEPM04dCOlSjx8durFau6qhKlIXvg3KubSkURv+X2Rnkh2j2vEfY0Ac/ank6zrvyYCTJT0XMoo+6AdGXPP23yW08IBtHmedaQFHsPBKx5OTGOGbcfEGnx5Grfe3+/FRFF/MczA0KYz+Yjm0gzazqnST6zsJlf6yFLUs1gSQsrfME35+FpF4asyMeh79bF+gwZMqv7WXgt1aNkfa/BDCbqNu2R5qJ3BKJ0JF4aVz6fmlJqmO6M5tWFd96YAjZsi9YpNIv8WJU6LHYOWPMlY5I3QWdCJ8p0/caZ1yXVqf0xnBDKbO9mBDmv7zdBiqFYVfOVlVJabR9R2ap3PzEXzFcW4lgCnV6otP7IOkJ8tdyfYVt15DNEi2w26QK1UNJkxhQNRPOtii5l3u3p7dkaoRvNbTZcjM+53em0qYSK5uY3ZorZNYs8FSovvOeEt1mWv37fosOajRovaTtfm8gWlB2uG5hIp6mVFiYakd7TbBTyAlVKGCs5VVP87cL2czyE7Loci72pIjqc6osiCvmzoBBrKEaiC2liEESKR7tNDZx8hjFTboJpaz9SjHVrl6S4q5OHnMRxtPIYehWe1qLpdjhb80gxlnqqNWfGtHcM2FITfcgApVozcVTVoyGhVrOxmCKACYfWYByGJXfr/w8k6xCy1slUCq6ZCCMWed5iWojb5zwT55ee6c5SnTEOWZCZ545DSfSKQ0PBA50ji1gKMwy2R5zynghUkAuvkbc6hJU0KPscmgy+Q4InnJF2HA2oXiy9YaJBQzms/nLZcWj3u5VdTIi3r9lbxeX2P37ERfFa2lipy0+Nzdfy6SAWVr0MJsNs8zO1ecioZy7OHqbSfsc/JjRXTaAqzkkh5k/H2MA150QJEneQ7dbMimfB3JhfrD4ZS9aSu/Pukr6bqFXyDiyZERF3bGvpuL+rDWgmcXnEPlZTD33pAikvKWTaPMeVqj3fbnVYvmLz0/VZwQTv3zDdS/fGdiZ1/LjeZhJbc0DRnmPPEg0799pKcW+oGm9+aRnMwCO4C/4w1p7f+lSsfJmLzY3g48i5fZNr0NhZ6pa8RUutjJg30CXd3Z6jwkc63AUoY2Wl+HkLYixb9jyD2xGlppM2py02H6eNRV5oizfn8ly1mKZ134m8HIJzub4Cz0jiQi5HNXEFS58Zblr/CKb5a0rP5dY3Mzijy9Wm5PY+btRs5UWDgoyZCtGppslVuFCOTB8j0hRC0iS/Z8F5gpfLOUAqe116CP8EW9GquD4ZN2J8RbDCnTILoAp82kI5qGu8eCJBkw7cODY5pR7p4CvCSwPE+vuzB6eL0gFBsyt8yCUOLrqE7bAEakfz5hVAuSPHNah96U6b2c0slSSsNXCgz9TnTJzBxRcApZFGSGbESUnpVkbAwaJuGDs6xlLBkml5lWTRRNCcFexDPubQvKpxOF+Q/zvjDSCONCTuW7GYGnOCCdlrCfoinY8KoovLi3mXMlY/E+5FRFHJMbSiMLfY/RExrGz/M3bJqdCuni4V9YyONXsaYeLxWpFcz/fahMmzUuLD14HWUmerH5k8rlB2DX6Jhxz+c8NTzFw2LJRObdWuRnDR3I5I8n7ozHPnkWymGkevg8ujU5eCkUsDvFr5bhJhpeQ4AwtftkQgggxf2QbgqneMrjmwV6cNYzaosKxOMavuuX0rT24zDcoWPyVWd9QBU55bSG/j0hgVIDGASj4GuF5Zy1gq84xcBmAzvBpB4j3wIFAg3wGKljeHgj41VweMtJl0/W64Mz4ega0YnUvyra2T8Q7F5CmUEbfVXcaHJpGVnI5Efjc3ONzxx3ZoQfHiwZifR3CAxD+wDdEtIqomYUCQcGykXaLkBPUCtKTELFWnhtFF0IeX+58x3T0wbHFrkNcpfao5nZ87ouR68ij0G0Ee53V+Mi0ue4/EF8Y8yBrxFKA6397SQv2HIc663wngGAs4RAvzbK9JmzgrIDymx7RlvzOu0XD9MD8Vm9ahk5PXhWI2HPEJ4fcUNA2gVRHXbVcy7AWPJAvTXJzhPFx2wZbzp0fVuJVqh9PIMagz+d80JfpLcwLS4xqqUm5FLEdSS5HNbFB6DU5rhNYpo2X9ZBKmiKFr67EOwjGbtB66yU96yi7PCkmq+QC+dB61V457DTjdtFOTjyfL8RufjSFDqpPWYqGeh9D9PPZf/Bt/TLMsLR1w2NWIz8kpy+ywvdvi3GiDHHUKCuUHGceY4mR5yMgnuLSfUyyia2WUh9SK0fiWmlHFmdQNnXA04h0uuttJx2DeIHJKt7nbiePACQTkm+B2gUOkSPXowiBsLDiFOzKYtm6ZjfPysMpdvg2th3SfggLhBrHmncsCy91HrY9u2ZQ7aosS4K51wa9bM38T6J1KVWg//N/sKvfEdFTpF+1SBRVgiSmYmXmAYN3x4NHPysXxD+2k4XX2bDeh+4o2HDs7tFWaYcmwNGRVetySbv13uli4TBbcR+m9VIy/tBQnZiooV1z930Ugqc6nM9ay+Oq3y/DqRse2quyJ+VLayPMjL0P1UZPMvThF9vP5Mp2Qqv5juKAEW67xepI1CPPNcukAPx1h0vr13iULc+RWdCI6XOeFMepyvyKOyBWtiKG1LZwhuZUQbTurMBTO/q5uTUmBpRVShciM2lyixI0KfqvvA1RD0VcgW4Wyyq843+TNgO/5bHHg0y4842anxTJfIxao/kzs9EEY38XMaQXIJyL3gKdY+fIGz3RunHZApIcZN+JOp/i1p+GBWWHkgRpyLtKhZx335zU0SpI/tbV/N67JUxMhdM/SrvSSVtSbZKu0feHin5D2s6lVdY0EFGwUntyY/JMsDShfbpy0sAzQr7CIksjSizuda2nYDgIoh6R7KWfs4sS0tzG0ftIwA6QtKg/dUVOXYKMorC4o69ZnbKOOptaSThfgCM8d7ZD6o/9YOPjqecflSiguqu/iRvoHpEmua2KZCLGGO3fb1G0JqQKSAIy4QADghMTg+ARkgOIxW2AY9fRyBKYoFh9BhJqlCFUlCcwCnhwYUayT+iNty4nSugbgokTrkNB6ujUK9RQqQzorBLXsr3l49s2qel00PyFy+0M+23EF87bsfEGwlm1nuSgs8ExjTTekMTXnJKh17HriD6zUNzFdBN9l0noEXcvlZ937vVynigyQDGX/NLwmnLOsn3l/1+BrBRICwbRJLPMePpj6W87Aqcl2FwpDIaydqw+rBd4/XFNjKfbt9Vjcxb3RNFWgKvSzp0Xy4i/v8nO66zpqhSQfZlX0qOpqVXnka8AmOazssCw2yFpo2WO6E1vi+SfxOYHiEu2XZqyoCTtb+3FZy9kxAT/BqSnS1pIXyYpnzraWiCNL3H8S92Sy01wiOiN5nDFGjpMscfdJvP/XpZ/o7BSHuUXiokVYJnF4icsncUvIjizRlnRx3KysimOWOH8S12RMQlezwq6xHca4Y2L5I1FjtkXwwm7TFUvcjeYwdxrRNN6i20XzAd1ZmZHFKeGBzHj2h2rnurlmeTDdQ8dLyPKpNHsZcxJO5PKwSdKipsWMUnJsVLlRS1Hb/dCtQg2zuLxik1vB6npVChoIGnjnMK8LH+xhYbUX5sx8gkHovrUkqRgqgn7CIMA+9caeEl6xPLSsYewqwOMNa3uAzqmuXCrbOeTuCfZ68mW+p+x3Y9eJyGWYypXoZAFYegPZJPrl8hXz4nmzIucUf5NkhoROf2e4QFx7KSrnnhjwswhFu4t1tmwdYfaHbabLMXBhOnrqzlXUqlyOVabk1XHOz8nR9yWGl+VCIYOpXJWqYPLdmL6wpIlP/OFW94KjbZ/jlN9cS3oK9/yHp5LF3ib6m//FsyNdUByBcUb/pPKExVNYOn8p6tTuMImdl2GgOrORWBpzLY8qUUUvyeQRRVskVBZYjJSofPTcXApJmyziMiUxnAWMi7MXde+5CeD5sN5zAt/fkbWslnC8xC3tMEz/1BhZ4v6TuCeXtZHF0PYOJvOobAI+ES4d+U3CY01WnP7aUnNb73DcaLpfqs+tWq4bB0i0OQ/qw8aUhDX0LuauMk9pC24juhzN6GvMdwkt6vxvk3Nl2w//LJp7WYdz0dq4dJdEzWcrvHHA9MsiAiDVdvVSTRw3W6yzZs+1Eup2kvyOylLsjwXwMl3Q0av523Fh4Pb8nNMIp2K0lbkTjZbF4SUun8QtASs4se6AaRrGVO+jLb47X6QXS5iPHuDDe1Tjv2i6oTUKP4dxFzvf0GjYmfPf8RwkrgmYOYy6qEXsBVS42yeL7bEwbPErKl9sNC5Cra8I/QyLINkljk/iGJWQ5KytbqQHjH++AiQ/8DyuS70RYE/gZQ+ENKlLDmq7S1EEP5wNek07ROjhDv+FDogvAzpziPTCkSJwmVpi8Ul5su5FHtBQEcAaAg4BEQHueOgEf8GL04DKhbPwgUkpAzKX4HAjynNbQYxHgYCYLVwxWDYHCJcguChTqegagHgYGp7Uk4sTDQXpOXzvBvhXRuRKLW6mnSWBcjFZVbIaNp4WHJA6YaGU0WN1l6pUzZrEn4/bCzQN0yeFh8ShsVb2SuPnEcTY83zmQYkcaKK14BXiHCAy/sfBvRRKAt18WSrM6AVNWUfFrIFmtYHW8LRD2FQNzTJO0Mgn5hPh5BKBNSTypHgkU3PM+zOY7ewgY5t/dV+tlyJe3Rde9orCInV14BfJYQmVZyUQ3QU/VBKkVQZkLeUwZ1mnwLtiuQCpmd8B3AJC+EkOIKIqBiRqLLQijdGN0hKVT6I6hwgWjeaYOOg1XOiT9khMPdbQDfVknFEipEkQlB9WEBPCygZIynNHgrKbJFHTMStYOcAfQEkC81EWxWP8EWOMqPQCkiUIuMBWmpeU22E5Jg+9J4bR7iP+fAPN83jsvvCiEwbjjzCRQIvqnvaigRNqg7yGZzAzUfFYczA/Ix29M1ekuUgoc46F36OVUB1gD0xPnnCCispEeyYZ51s0G9jvSinbSaQxJnm5c2byZSXnXJeHhGwCtzI/AmS+XKkdNWKHblcVRK9l4u0okmiWDNPGi9+8qlstazP4j3D+A9UP2CRlGwmDn7XiQY17unwK/9XZS1Vd/CqbUMmU7sI/8KBZM36ExlzGnIlO4Y9XuOuqxbR3lnCwsi5/eBsxaTH72BU+pyLAfMSZ4YniGd2VUQIZ6xGKxnl1sJn/+sxs4W15sY0INDLvMnZ7xUjyt4fv2yu2FA9moc/CFQgnkYZESO4hMcRz4sQsRg5UkKfmX/HnyhIumOOH+pbq96T4HaX5GBkY00/nMrW2NTNUZRYXneO0aEYBmvHZYea42kxkCoQZYOuvxyHqJXOtRnoT1xkufBuYQHm7xBXtdd2NmsBSGF88PIwDwMzPWKsBE5oCYV/O/j8oURlPB1uY3D0OFaYxJcLXcqwa7YTEdobPM7tpTgsrzkbZg+DVjI2gQVqVxQYY5BgABKSajw1eyoWjILwArpWXluWv0qmYUGktZOzXTTKi5e2O6W3vhuqCrwzB88U89N0WR3ZJTpTTV1tKSC5fskDKPetWwCTSO/HTi9arrd8opRI6p7BznUs8nDBTumSi+Hlnnk1c5XeaalQSSqgMHUzm3VfjY45JCAelzBVyrWdrO9sol3x5TA9laqpbNbcWuUo61pn7Jicry5sFZu2tNnuu5iwNPeKyehOw+CPhxuweNWzkzDsr2UvF9KBvFApNwyQj9YFlP+WtXOS63pd2Qp9br3p5gBFaNomS6r8GDf8+Vl4v1iFXhW3/GFCGNg7vspJ00KCSdFY4AOxznQ9pQzg8+Ve2jPqn6IK7JdGF7mjVlC6XgOepa+d0TQ3F8uNiCfgPNr8/oqh/158vimHabxMNBUQEEqVk2iA4qa21WXYmfPlEn6xDXZamD7IoXerj4CZ/NqLB2QakGRxAJFEaJ9FFsb7Biwira+cH6zJ5f0H8M78shAxfoMDZyi8Nc2cIcGwMAf2Tzn5y4dmvlKN6JlJneS+KFM/5O3licDW5ziyiRulDe+YX3XoKWSKisu57Sb4J6/lcp5YXwc8/RVhtMBMwvAyKm+ONdxZofZc+6dTHie1EjDRkIvrRnkleeFGu1UBjwCIsXnR4P1nK7D90tdmRHEIT8Nps7U2OKQbzARRwOIIYcytb4tenwHGzdgyCbvUV3fweeYFruHqh15t2WRArKN53WpIS3p9PPPR8/Tj9XH4UG1aewLX5nA3s0/22+kd8eQ2Zbuc0NTdvcLOqJjncUfACis2EizQbYvmRsaoJxEF57XOmL9Q8faGdnIgaQn4hwf9DDAmG55/OHFmCfaNYpKAZpXTLleKxVj3rZ0FpqeVkbLGjvY2rmQItjUCqREztVAf/sJdhIYrP0HrNA9kiPjOydfOH0CqjXEBk34yrwuKPgp8JmX5/bDEHCgoaZedieevqdH7WliWDwBxNg8UoWpjVD9/466cpuoGTotGUL0LygUyKKW9letRGJWfap6KUKdny/KpSvXX3cOrLLeyvW8duKYlidc42sB9ZKYnx1qavSdz261Ovh3FUlmc5k52tEN78wPjEnMva4H1q3G+bkYlK4ylWgcTsLUAdzHXqb8pzCf0egaVP8SR/vvkNeO8S2733Zio6w3+ouS6zWGWX+BriE7oQ6hB4XKT9uomd6D2XYYZUl7XUx3zgtpLREyp7K4oIHVfM48DKiS5lFbJ7zdlpa0oex5KoX1sQ4djCdDZRmG20AmUaREfZ1+GdfX8QqR5rg4ZQr+kVNPWjgMgU7u1mXAHoGzwt26/ZKFQgqNmUvOKceoev6iTIqaP6QpEaQjZNy7MrPkcVwUwDYV+qG+ZbjzKi7VzouJ1UaD/msffSJAfawzKScqvKVkKXohHw/7k9iqMWzIXuWogwEdFQRbHrYKxt6ImJNSRypyAqv69q3a7EVdXk43dq/5WlkZp048nnQ1sbhcefzX71ZwJr0IA39L54MzhG7IRp+ar5slWs4h+wRbiaWPoBYtWoAx0FEJuqhbIJ3B0ozxPLyAnomq36ldXvdydxX7zzvKDF/jDFW0Hn1PSahQlt09beTxvatl7PWq/Qo391m4wJ2do4+8KzxeA7f2Q5AglEqbR6Q01fz80J5zDgtZLl95TuSmy/MvOmJ0RO5VU1RJdylVjIQgqalFvJCFqMDlfSubvA/ue4CFkKJYwIx06p1OObO7aVvZfI8qf5/HNaX7td00orX8RBAeqp7zkk5N8wCSneBsfd8FuiGLH0/2tOqNSmkkaTEOwvgJTiWytEwKBs+OiiuLWazREO/N7IehUWerwr8Mr82/JyT0q1imumFVzMS0IOMtU+IGjwcgF8EXnoCkJJl17BxTtG2raejJkpmBFPgR2H5AokyeBrER9WZL4advQHbfOAb1T9TrNucB3nkNSPxiTPr9fhODafwTc4WytA6SETxSb/5ZvreIOA8E9fg71EEr3Wkv3YNCX3voTnhEJsPYGiPhzBX6/83IpURX8sij4/C7CObdlcqVB7mtviJSP4fw5mRyHtBSDjGWjgIQKGm2pyvK77v9joeMyfXi0p7kVbuMD2GRbu2KBQHhJ2IuDGhGzuFYgKfJwVtE8mvaiHyWS60PRuGCf3BMwoI0PPGVRHITc61b10aNSxp9sseEdgDJHrZ/p9K2gJ7FOU+c6ICiVVxhcAqWJxgIIfkUaouqAolOrKSU0OxqK5XiQ92/2I2o89pALWiKUbRLc+majhtjFvkjUqPj7VcNLkDA0OftSc6o4R09JN+wS0Eg947JpprQDU3ZBNCxMdlenUWsr13lsDz5PhajGhuoFNzjXi+mFc3Ssd1BM9w93aqXVevuZqMWOQ6Wb0TiW9AJYdJHdHFKmnJQKvosj1jrg6wlq4pVRk0jrDKz0xUxKMYtak9joT1VwHbOLiU0C5lS5jMDeb5BtM40HZ5E+aSAke0qobU32sFbFuUh2EWMycadgDqtCCwN2OumBIevtyH9JcBFOo/PWFSwilvt+PF+SRJYK8TNXbS/3z61NeUZUTyPiYu4nHhyrOH1H+hJunv+OW8YecBbb8RmaJT9m4rkPQTnyKbZ/ulCipgi58SG88wBTl66q/1Ktv8eCu5UBi5xWkrZ4uwHDQgzwRyaNLaZi/m/cHKxeL7YCd/mUiAfecP+ZkEaaNAhFNXF0bVgDcTSXkJ0z6TtFUnLv4Jf9FYJZ8f9S/urYB7uUakIRnN4vFunTiRPvQMGX4lsrsAQTQHLzDErl5Rr+OU8OvvMIOXcXayl0yEPlcKqUs7KzNqxGk05PJ/dXyrdYdTmC/RpfiOh/LiQQy2fuIex6tIxUw38zPdBt3Bs8h5oKpg/NzLA12sv5hnQ5a5v+mLfWoII0BMgOccUCW/Rc+w1rWkIsFrZ28CGKyU4vwWBvnuy2bvJ9AblCmdLR7aeo7iBUR+cbcHVnU6V4XAfkrWMWO05e4Sf4xPOfwcZXuBoNvwaTF0VHdFemiPo5G+7b62cituvT9fOvGx6mhM1R6CawnSQTeHBoJ0/llO2Y0MIUMWU2Uhvt0OV2M1j8T8CpOgoanvY8u9+HINvo90J84sfCfDlrSPkuBrb7plGWLht05X+xZFnnmAWTj2xQqe3fhb+6B9PvjHuvwkuDrEhdmNpy66i/SI6CQifpB8ziSMhRh2nw2wj5i73C/TLFqjMDWSDk8igINTiUSCt7b7JBoT0kPv+pH+5qWWc4apvC0tyj+UkQqIxACQFkrql3k7yGUT8E3hxQ5GUoGc1Nhoq5KuDl5ez1/D/ccf6UrPK3KjXzs08cg0zgsupfR72L735NMy4v+H+bATXxpuazY848d41KxEmE0PVi757cCDFmn95VJNraLBROqXcB1saGtCJYEo+tt6a3v/XZnE93hCevOpfTNbfpsb3/exr8nGo7iQLD0eLYTStWMEZCyOFKSBpLszOSaRfejmm5LSsvGRPW1PRXeHyo5Zn/KeB3IeHnsvf7+twhpZxvu38lcYWoKC1GgCswtSDbz4+gk7w3DPZb3TxB974oGYPN0fr2vUuXH5D0ZAe24tkEMvfC9sT4SOCszPXyJNe7kjvhefMKM/REKYLsV5H6OWHpgQJFfI+yu1gfXC4LA9MPmJ1h8JwCrjgn1GPzrAlDk/+UnggKOY2P4vHWix9ih1iWWtwALShn5ymWLABy216S6miIH8u5D7B9tSWbmpVwQnOex7/h7pfT6nKEeQqp4fbJjUDPzK6mmtNLk898PtbXuv5k2mD9Roo6znYHBpzQ/RcVc401HSkO3gQS7G7t5u+QKp6wfYtOlQ4p9rAisXbZgUmDAtwFL2RhzOxB6LiOGPw4h+XxwSvy1UMeXbJLucM9G+4/uhCPCwwff7UPuIaOBc+Cww2uyqKKzq0+ARfGLOET9+eByvhRmhx720kqHCWPJbUpm0C1yq6fnP8nXQD3D0v60n1vWN2+bsKunfbsfv2zLgVQRqop7QopZoO5Lm8iiP15uwLYWGGqzpuSonQx62Kb56iedkBZejRZYihWxM4/qd5cUC8h5W1JvFGxlN6aAGecoxAjKVi5yoECgZ36tL51G0dd2EYOlJcX7PUyIenv3uc6sLDPl4DClhDtT4ebJ8uB8lShnf0zVt9WJrJLtYRXNdzsGb+0crvhMWokcdynXGCA2TuM5Ijt8iSTbCRnNwkl2/lyY/muaNqxLuHYnHZSIV9NQLtfvqM+MJ+ga0Kq9nVznCAuwxeec5H4L/pV93o/hXq6u10+ff8KlUAvFR+xCE9IcIcWCA5sKmbZqnD30bocA16jsiTK2cvcjUY5XKoWur9oN/LjChhLK8vBXuOW+9Eke+kD9LYbgozyoufv8O+rQaY0GZGIYJhEgceJhers2EyKNM7miNi8SwmGbsGG7fXxR7g65zKLpblo4p089Y8LdAmG14wtAjrVc9UWPO2NfeKT4rYjyTnt3Wczo/pG9xbJFr1vUKMO2iFq4WYrw2LSnN3b3l1WbleKWYhg2zk9oBsNdwivSjQgl+duMx7rrOzlV++dik8yE6n/oRSlo92tY/e2RHFawmTHJENRoDn83Clxnl2G1s30opilbf8AOV6UuqTVnHY+hiVoOUDpv/dYZLbHlJEQJBm4/rvJfLkAfWka89HLUlNJGmd+boHUCzw7WVUtMvbtKHrw3t2vu1VEqzuWh4nv85Q5EKJaSWvGCanliNO2USX4P1jS9Tem4CaMBH+p6gvvTn0qmKiRja5PZ0MbJxgmrr7U9Idiac0hPN2+WD1AYSfLV+dpOkUouRP+3tgeFlOatJTT0xb1dF8olb858GClilfoSxttqZzNIUaDxsC1hoRzslY9F0JoRwlEayRsvjc5AgII3nUJW3aJ8ZWdbP60mOXvcLtMoEY+cG8Qa8vPUOaXKg8S/sRT69XFMSGQrHdN0pJpwmbR0dwhbyicvZss3XShRBgsjAAmmzRU4UNzEUFd/J66hIswMCI1fDQGi/jNn4fW/UxFOk4TeTIO3wWOBdh3jP3MgTegCablR4rGPEc6MSN9ZoTNre3he2YSsF2vtH8hlFtugS08b2ztPNBx8VacJNKHq2woKKGhP7Od6hASttw98ha+2elFnVg06p7jc0U/2F7tsAAqBnTv6sTZHqhOZRvJpPZ19gNRNRw5YecUzmt7m033qzZaBcXNLHB7U+uZ3Hrjsirg1N5Jf1DxynJw7penf7nP9H5D5Wy4NOtEp+hssWd+tR6GFk+S+C9soQSewKOOBHNJQ8UqgHBSS5DkwMP25khrXkENglF8RKvef+RjDOP4w6bAKSt6ZJ6V/RWVVz5Nd5StgGwSo/9d3zDZeTHPWw6Pnn/fccqo4V/LqrquuuAZge1l9PVE6j3Zdzi735SJRsKevEcexFoDkmfss4Zie/C5v+5JfZdezBz9LH0dyBeL01GnTG3aVfSKCZlih+U1lS5cU/ckt1PMnLIf4OmRVOtF5F8BB5HtWNjwOgl9TxrFGg3I6qfxdBPJPpz5GragbaXOlLVNkstTpaJog61o4dxSyl/CcwHg4pMPpOzIkNCknbSRUz9f/+Gng6bf6TFiX9YYJX1j5vP7zfI6Stu408WBE/NVrdD3k5nz7DG03dVd4itGJk+fYXoenPG2CehIZJ0dKNScjB3ZMMFeV952JOPEQLD8M++ghv/w3InYpS0zhZC6n28saBtYsRtEtR7vK+06V/+BSf2YhWXuY44BVnFNzVMiyREAEfPQbRmxKK89EdaTj97X7ojgDGBKoyXVY41atKhrUqVGLBhS35IyjmWrOkcqAo98R5+sFqLTwqAUvGKT4sgpd7Ka6AKpIv65pd+CQPCnauiO7MMkS3F3kZ3v1plrArCo7S5OS+pBT9qzgkbMU99A0wFIJ0z3zEwadsGKFl2wPLRQbK6XQ3Mro8PH1Fr6fHVqn/jNppnJJnj/2voqUkRlb7QxPYDBXjDCtRyirg7xWvdS/SZ39b2aWXbuRYniFd7GxgwgjhgJswqbYjaxsFK/jgpAVEC1xsIgV9lrFvOphjVcpWk/J1RMdNSqyknstQAh2uC51xhi4AbNTm2RA9ThWolwWrz2XC49X7Ctx2EksFdn3DfCA6fBewtvL0i4wZsk+bEdhesDJpNOzx5arcXDXXyMcAKZ35s5C+a0muZ500+hw6zM0gA9IXsNwXv0e6LmIFEYShYZD4tG2GP0P0pdrnw9APz2tcD2TVvNv84Em/hLZm1JXsFQ4isRnCJeHndi3amV3dow1Me5qDkmkLv1ANKbsnn36F+IN8DTt98x9m6ngm6wU8oGbbhactGx93pAz2/6WiPuVDjCUfnssB5NR5GZfzxpDOH1GUqSU3KglcWXVGXwVKK/aL9m+XdHTs6gQtT0lS9C+qpXioaNOHJX77sQnbU4pkIoIWq7OoqYGVjWZLKnIRN0RNN/NZKTDLtPsHb8VBzJ8uXvX17qu90+GPdBUsU0txWRepx7+nLlA0gqLXq97FJU2hwSdvFU9gBqSYMvwSzdeZ6XS2M1hTf5nEoC0ihZBkbiLNvUVvraIKkm/Dk/kVheE57RxMCaN2fO0Lyl2FXcNhGcZC10sriORxugZt63UutRDCLaekah0CENSTFWi+HKFpgE16jNWtI+TWNtxkIJUOhEFgXi1bSRaHTYqw6sbFT0KCjfnnvE+XpCd36TAXdOX2vKLiV/4VQch8pIxH2iRIkhQ0vu2OXvH0otc086p+C1e2QO+69FU4urSu+LcXDmrsGmWQ9wS5H0bf3+189xTBqOYTkxQImsb4frwDwjzx6QELZScuZ7b7C1ceqMUJDanvaQnJasgz11AVDbrmtAs8XttPmWncApjHIxWBa9ymtU+u1matPQzri461sPEfF/UgZs9BshW5og9H7hnumuY4YRHVwuC7dXQBwgN4EL38cqiBaN+oCNKTS8nl7zbmSguFxP6MA6c9K6EfwSaOZeVq6WJ4dkUTU7IiMmBH5KCKH1l00EZ3BugdlBfhKXNsHGFRtfYp4Sz6sMq+gZ8Cp4rt9wq2KxtusYktSSPuXAKvENzH/ImoTqzqVSFk6yLtQQS+u5vIArY2pnZARcl1lJYD38cDbshbSx3rOWZREN87ph0rNIUgZkQDxH5+0T8fUw3GtTaTqikVfwr9OwazrwNKwangr2GDCr/pdLfT4OM88Ix+odOwNh0WK6pR/3S0GzQARKsw+213BWUmfwtHbqmKv1pyW5pDIem9eoMCvZ6l1wR3vJHBLcYUGCEYx+wpcGXxmPugNySc4uoBLGL7IYdCwL5OB8WYqQMjuYLdWXPpdSdcywJggSxTxgtd/JVZfef+MyNYxb8YBdqgrxzckxVCK+qpib7U1UGr3TfseHkChlRcRZ8bJ6aw61Eipm1fL0H0E7YSIyy8QW/Qv2owW81muGHMuzPOcwIy/DIgoQ4ynGH7+AJr9553QPg62OaTc6G2jdKoWvOMAgG1t/tDFB6DCpNaxtcEHzi/Lha5EK+u0yyH05t2j/o0r1t8SNrsKHTRA4pA55LC6kfCaW+/NjHIjRRXCh/s5xb1NAgxW5ie0n3kMdppazR4AB4kMWrqydlvV6WHQOF82Ly0DadnvMAw8BJRETly5gQdm3bEYuv1d7YkhPMMDOe1GCn7d34KQ95RKh2YbkPkB7hVEBPyo6xGProwSs7kkv2VrTtpzi6uhEyO1qzxsfuZ7tyKrVVPf3OhNFQ0zYOJS7AdpvDmOMjz3ZfpQ8dQpifDG8sr3qd+cE+4BL9zcuSf/lWy7pL4UlR3QoszxjLo1HbiaE1E3pq5V9v5O0UqOfeq5+GlTfWXBarsKO4D4DMNBnbse0iQuWQdiFMIQB1g7ZOj2unJVGE3I+tVLCHY/mKHcAUxXDYJA1oGDpDm0WjkhNM7HB7nvaMYYShK1r6hAV6Hhg4XsFA16gCcDI4thLA2xb/ThhP7V0i2OJj6kUQjiBUbqhYeoEORESDS8rMSFARdKhxfi5Fiy052ZIcQcmDQh9v4AasuU3wASjgCWNahem1RVB5prLqGRDZvhaOC46knnHqhOmXaZpNsaVjhoi0Jl5CDvo2IDT1kbaDo85+4Gn4BmtIywHBcfhU8tu27q2rl3/klhsRw8WlJReSAjRL0cUHbE7JO7Hscg/IrMBUm7vN8OFa+emoevcSsXHit6BXfX0YLq6wF5k7bts6DVeOrfYaT34/XSzvV47BXoRdcUAzZ2t1F7qYksR+MXLIrfugkh8+gpUS59u0VOfHdnbM5A5QuOA+hUP7f6gFh04kl7UQKxvBtVXY4TPyB0wWVDV1/kI+7UQb8PJ52ARACYSxvI3xpmnXK++7qxnCLkePAa3z6UWc93Ul31d90hnS1fWAcLvyBQXeJPpsJ9wz9roM1S88jo+K+GiGzs0mOfWvEoSKjMkLATbREV5Qd33NTK1Y8LmsSxaRIT6mPQlSwxW/zUX+ZHKSmc1kvMUjA2OndIdGi+HkKK69rL+MgpDgCh47Q+YVtgcZReWMzys+1LGYanX5YcjIM7B3LL/Q7tDUKE8pg554qvvUUX15yzLk5HcWDXL36l4GFnIOQ5GrqEy/s3BNX4Het4sVA5H0pFIbmJe6foBwBWhpz5M2sexc/lkNiFGHjQEU8grGFdh3CJvSIRhKPE92ES6suMmnqscyukVFTRRBtB+dtmje9x8x1y2WVylqcOVfnel8A80S82v5LNrtBJYmR2jNQ3DA6v8WUzFYYRReUiSNtQLT43ESdXdeHmweO16Wd/88C/Pb9l6SEeI3Fnf6ld+H3+kSQ0NjN7jWQPWNH2DirHfxplaOslAt2JALFn7TfBMtbyb6G+c8TqO7XT3tJ8ofypaeP7obuwYW/MZecU/b6x3INy24LHX8BkJkUpHerydwBQOrQnqKLqx9772m7b3RE6xaY8nmKe054HgMGPZsHrF5AovlvqA1ilMMxN5khBjDjw4PSPIf9oiDmKhcB8nL2WVR4k1Fg4CXV+12LKF9QHRiHSBC0QRL4SsOC65Gq9cj9RjyIyGIOqhp5hPNQjMNpFTOL9788qQAykSKCF+OxvfXCTdt/45bHBjmJD47j5dodE64LFTNZD+5nlPJJDaoWauCn8XA9g4DJg7Bg5CarGCfHty/r+hVJtSMs/illuiZubfcKEyLIP7Ts0QzNG0bZSQeNPsujYz7F8DzBHefE2FaVxTu7dVBfd+49B3BvWonV+zGU8rHNOzkKi4rV4I9lwmZggXA/TmWRA9WmPgxcFIxTTVSe0xfuwx9Fe/ny01mbymfTImuMBVfZCDVb9gNhA53ZiYhzvlRq2JT0Rn7Wvg9wsTetrJKnCfPvwqd3uU10aCubaoJOAJOmoTjp43ox62szBBN31tq9472Ze0218FqFdQVtdx7RH51R/oiq1qoxm1lddYo8a6TVAKJ0qpDtoTe5RaP/2ZMyUh/7zEWuVMgIWLyvggmImgfgBhJBCficm3J/ggTkE36hyzEkrlMtyjZWA6cmor1GecvgLYTEjj1Bk1qO2kxyqOUptHZlZU+EYpZSt9FSXkaExfFNAc0MkBLcox46/CFBqCL0paFvFea1EAubW+5f5E01LXZW2OTeHalLfnEFroIFzb3bQWrtmRVfDEHTLJUWHgmp+9IIUntsIxWbA4KuVheCafYHsFD2C9qrdFVRctZs7lrKkafgwwv9rvxcXa1ILYuSY2A32ZgkK13LlLpvUc2yEJHHPbwPB9q7y+IoH9nPToZavptj5dzVHcJVmAJ8Kwktaqi4lQ8Nhh4iQLfJAraS5S6Jnz+g8wd9cAfAeXLNKJr88XgqxH0OLuoTtcgHmNjTcF2YU4wacHpCsRStswgRq7IMAAdmFAUvC5T55Ega7HR2vdYZzuisY59sw8uDwTWj++OtG1uODhEdVYYqOirWAUebtXHzFd9xNv/1aQxes/XL5VTVG9Azg79HGWewZBjCO9c2vjB703eJp1dMGJKb4H1h6LSEsL91RXQ2O5ikibAEqFxoj9iOjrKMkYgOXX/C2R4QEeX4ISbNCDa6E4RLq968JQoAvdyBdlJ/U+RgGW97rtrJENwpRL7ZwZ6/fPuY7HOkJ0204MlFGBG7QgDTMtzFMQ1nKBMXHY+t2jLCWuAoJyAdAQA6lvVfmAmkM3Qc7BEoPPtG4CPHCt3nMhnKNJCi3OJsJjujzXm9bukoBV7Nj9SGn6avpkHSNFAel5Ttio17A2YuVRMAWvSKRWnJxwyedswR/AO6fqsg9QeZgh7YzQm8saxYbW5/j+tLMU1sMjhCloBleoppj+vggJdgXPYub4/4GiNNxxheswP7mtJRvYv1FqVP/nBhr8h0KSUezCtPtk+ZL1yziTDIh9/xro1Sc44f2wC4aeXvNInILxToMi++a04yX6nF1SiYnMIWIZlTzQxmaT1jl60shE6qArgL+JcUcr33B/4zuBTCiKIHZc7lyrsIeDUg0Xtrq0E9nFTTPp5Tzta7AWwo/pPaxEPR+CNyM/e7O9bys2qjSDS0z8HW8q/EdEpKjgtuoyseS3ere7HP5KgldeGCV+MePKqUiiwLe0HtYNtz0X4iPUiYbn7EcRx29+hZ91SzrS77nFOtmIiTdVZ7p+3b49f6OO2+72b6k9tnh5AZ+Chm7qtx0kzJgjjk3BwqhJpMsG8CmAvOCxtUwrMep6MiUNOI5S9XRTTVu2p+UTMMC273e47meC+AS4ow3sHvbyq3biNx9bL7N4RavYSM1sQMpC1SsFudy6NOI1p4jiF6aVxh2BxDkfmXhXwFdcFgmmoDIHWXN6+7p7a6p9MjwjFk+DejyLqYzsVMAIF02hGS8jsjBlN6b3H0/XpNQVF7IG9ErDs/c2G7pggXzqhmTbKHOgwazrq90fLLFY4HIVwn6n/32Z6jdqAvTBxml0Z/CWQ23h4y9OqfWJdI4wgHdUOT0xgRLOqabyaT0xKj/OhImK0NlTwcYh4+al5TMxCCtcVWoqDtWjjVj8fmc24xEDThPIBFXN3jrNL4gjRthRLFhMsiLMWUYxdlmjisBvmZQJjs3/zyWNH6WNf7Y3PJiKZqKzHNOLyuX1J0z5TfJlWF27/3OCHdSoGBB4H9VVkaG/QVBxjiWi7Fg6phZoQnR20x378jYM7GuQZi27bSZlnyxisTTGWG4k/zRIxFbDqDVMvA6s8e/qTpEpkKNgvuc9xUHMnNczgMq0L0D9CWzLfy9kWxEovxPBEjIMDv5rfJsc1s+i/PgxYt8ICjqgyjsQLAw5EhbTmULi4JUwCW+mOJvHDAIEZsOZ17Z89d78YawZWmXmFE7uLZ0quny0m7SHPemQk7BiAWbaerp4JlK6p+weD7qwphFWPgzMQU1Di2LtuEhYhhHRjZiZS9XHxsy7T6MdCCobw4khyAT/Vb6hA6DCaMbfFxHEjwBdbqxT2QmJgfb3enFWLROS3+GIsLVoifHzxKlew2VKX5ddpCT3F7xTQ2Nd0KYleKRXTQy8Qcno45OyW9mby+L3yN9ac2Ry1TfpJagb1iXxNYBfhLhWpQCbKDrarGpnFdh3PE2J1q7TLpieJPKVqljB0LWhBPo8DdLMq9JK9Xp2FX1FYEr/9Rd5PxcczMMITRV3ztCFsp3y+AqnuXfbViOjYb5TRwiH8yifbvppWH+zhUbaNmidcpRaYL+XXjj0z2UjN+SUgkciPQ3Dx3b3cTDUGvrKYTr/9dMdoR6RQfQN3Dqk61k/o+PVTeEl5VsCNG806FhKht6p8cyj2n2eRo807U9+fZ07cPCb725KNUGldVDl7NdY3WYPVkKvqcOC6TMYkn5c9xiHkluQ6H44gc0/IFqS0VvewXOPkNJJQLOWN28uzequmMdyw/Jl71ojbx/bPWXjYxpPLdxP1E2zjHqVAbkvgJ7LxOpqFL93p6SDnXyYskKBHjNiZMYjzGtEq0PClzolfFqcUmJ2g9jbvmGq/les6lBe75MTibwLGDrHtw2kyYniS7CCDWaKnPaVKyzjsLiWE9FDOEsBrUYTRLI0W182TCBhtOoa3B5gwBCa6L/n3BdOCbPThr2T6P+VG9maSI94uTuV4hMM+wv4cBp5FB10SFRr+Nbb6tkiH7jicxOLzQ10oF04V/RuXl7cR+gmrMR2hhCtyZw/NMTfhC1ZEONwmkLNLDQClwj1dY1rpoJB4jqd9ZLGdU6R01ltxjrSsYyOH74yzkxch6xFnYRwGgKeLP17YsR1M/7US6zfee5psMJmmF0d3lRpOGLUgv2EE+mfEdK7RnkjBMev7XhP3keyLlj+zF8ubinuayYmsAbTv3ZmJ1HfwZFIkQfunCGJYRYRpaqxAPwmfsgqlelWk7+9TEVREUAvMMicbiHR8Xl1pBEJ9tTKzBbPhj41gvoHy3sy09U4RqEdZvGx8rbtM1BDPV+VJqsxOdRJeqYJVyTf14rOp7FUe7HyG0MlmUSwPZiqdBy9w3gqjGdipjUbDAUfOCFd2hd33xGYaWkibkByTxGl+OnEfuf5jM05n4cc48ttEEjVlDLh6QjiCEhw/RB9rJkrvcDcOEMtO6TOEF59rD1jgDDxttsQAg/Mj5mVu/oAm4/xixU8Wd7EzMxL30Yorhs5ZOgjIKDGe924q7ri2hjbE6h0I+kbIx6JAvUxcRVIT4pL3PLJF/u5s7CDcBWMXokHRIA6gDvF5AYeEir/B6Bsen/UwLnuytNFiKj8zYTuU4prqZrOLMtMv2whxAamlVSi4wDoJpSdjQ/Ys9shVL1T1mNcxa6Gs66rBhBNLMu/EwnF0sNl4ER8Wx99IqwlMPFs34NgXZyqR4lb/RnlXxfLRY5lep9RPnpdf1HEeRAXx+X7quJFjkIyljdYVEIknTQzuogj6JYAw9TabuF9++JL+A20gGmkJ28DviSPNUhS/s7sDrGykgV8PPx3UhmTmCl/HK1wWSfDHMWEihbECgm3zx+to1W3jzca4houHgTLAwRTaFdH76HaN4hYaRUEIHdA0vdpB8mKadYsokqaDJex9Uj3to+TPdUA0Z8qS6+bmw+hKhYW72A45s4EcHuzNXmZIJ0I6Uw3baSi1dDVKsH4IFaOTPybccV3mjUhwBZr3twwiiXKnikUnf45H/BAuTruSLwc14Gb8WXBj6IxH/MCT0DD56Eazmqp5PhJ+WyLlOryIrGnyrIm1EUsSEwsyQaQXu51U09TkaYo764bja488uqgexlhQgru1WXOqXBDSg0oBtbxQ2VAfGLqyvfIkQ+tWB5ojGMwhT/pAr4kVB6HL/b6Pr831LHfWwAqAWkfnkBHGqA2PvLhT88QHmEV70cOLHM/zgv/gSKdQnRiRxPelePov6dZwkd9Ptz756fVea+M6LmJlImmEeLzlZZcTaC0n4/TrhNzCOSkqX1uBA88klb424ly/Pe3vW07ovuE3MIIuP/u9ErpALD7j5Mo1YrlVpGNOostTJoFP68ZC/E4Q3Ep78QtHw2LE8tEi5qSVjGrAVk2zs8mT32KP7/QN1zdDuvc2h7IsLdqTLfPhGuwNdPxpFH6Q/XYNGweUcvmVcrqvOrrFMYlW8lh+h5YQjCC84boirLu7RwfiPKyAPP1q0OxIBadxDs6NpbelfYukw1grpR6Vf/HAxA37AzrLv7yw9Edot5tNIPGmguR+VBkNqenm6/kx74OR7ICz8a+sabrBs6NE07BFZ2CGwprZ9F9QpgIZmd5qW8RR5teocGmfDAHfhFZHU8RlDT9JJf2HK36lE/UdxOS2ryG3EGVXXH4nO9Kwo4+I3f+d7pzCMWiKxH4LbiHf/hSLn7Vvgnk3iochzxZU0bnWl98XdCKoGbHOPAvLB17dnaTo4YO7QycKhmwmT0166ENgMjdMxwC8z6xvwiFVd9h7CXlPNxmCfe5v6GWulC/iOMjhtlNB/Psp+eWct+xYSK590gF2JTru9H1doINYA+sWeNOrPiUidK8raJtF2R1Lfh82DrlmUOpxG78Gj6836Jof8dkSWPXfx7BTtThHzaw6l9GvBfTtvfZC0t5+T5Dy3yS/Iq34YetDEhSfQ8rp9NDRo95FEMdOfprmKmsiT1hrSec4gvUD/FcTUWp1O+lGSVwVR4xkR9orYgalYFqHmmGlVFkZxLGp5heaIznBZknJGmPa6QdclHUha4MkmkOKJOjoAW2RgFzfcpuZnyhTfLPsbZMyUsBs7c3RqYj/qGvdg1qnVyXJp/gqZoMaKC6rUBZeziq3+QTyR3g8F1zGMh6/SWs06pvqz8yy/5vbFn99c0yag0yXju3JiYuSHCjGFl3/Q9uBDWh4XG63HXhDf9ZopGWQjT+agUmiRyPSqvS0tkwjvi5x/BIw91hk/mEXel17RVOoQOm7OIjv63XHanG55wY63irN3WGx1DiR6/b22F1ksurwIu9GYJ5N4bSHUzn1QpG8K7NKkPZPAC3qZB0SD44eW1VzMVuUnAWemXf3K93bifx2/5z8ptGIg378QXuML8hIphYomkuEhvaZvcaxEzUoBA8vxHDe0KqW5wjDhOItStfArsx8PWqbP+76XOJMcJ8tDX8a5IlgDoJhEDRQuKOi20Ghnjx/fLGJ7V49vKnmzheHkW3qzuFIbLsU1gmClQKUCx+jHQ2h4/nDtP+tYPDQjGNgtAsiICW9FSivHtU076I0FBkEqF2smCiYBrAj3Tof4gd8JvPmBxHZieWWNxew1OazQdAKu7EJC4fmHLWdr1PEMaCWi4Bh8vca3+kp0QleCXlc9kP0gt6G6NqN+7vV3y+dK/AFPEf9R8xbMLYivBeUuqGzaTlFeOY9ynOEN0L8dV8K9InLoU1+09AzqH7N+yFuTffNE0uJAccxBTToy/QzvkKFPS+F/Czk3AmyCYW1PVtF85M0OR6Xc8y2DUrtXNmExW3utvk/Uej5aok9nL0ULuiJg84fJzRCcZJMSIq3yk163OAftUEoKoE/Wg6XKPFPlVF8o5p8taff3rzfYzrv0+gMv1yGjB4CbpTKS7TF7Yo4ngKoafwemaOiP8Gx1FCT7Qsxv9n1BKE99oy9uI8Bk7tt3aonmzA9d1D4zOxpbVe12PwqeDybZvd6tkTpycfoKx9ZSK7i6wZaQpPYqZ3Lut1OfNhMEx2AAak+vezx1W0eeLbm1lx8dibZqPBgqj6Z2GHRooo2VaZ7vA5budOjNZY+1JexPp4n2d11RzrbXtcjd40JTetxo9sFDyNLFujjdjCT8ikuGbbtBsYKirVFIuqDhUWKBGzammJkT5l4Ell021mAXU3wneY7je0bTywKD/cofCC1u20C73sud92zfk/bx5xu+qyzYL4z8zGQUckfxSWqaL3qV6/D2JyTfNKNHZhWx2+q2opzxtMH93eD4xSKhiDzLmoTpcdXNA4SZ5eeH92YkimlYnMHi0dQPlzRmcJFon9FnG08HLa+1m6H1mbkR0TgLiJPP7c+tI7vvhSuSJH4y4dp3FaTy/bsy5oJKICHmVQLgD09JqtyIfwNC/dcJqqR5H8hKcUXyauoMpLvp3379cs/U42aAEq1a8aEEMjYZoqj58c/pW4/Xw1SJHImmjJoTduQ3Eq7nQnWXX31tsuvK/ivTqYYxLqgBsV4noebTofsmmKdavswmx3wph9m+N4y6LJRuNnsfW1KPagl+pkUa0w4YFPDCdLalHLLpDXApttKhaQzr3O3aZGEzuJaG1yS1XmreMrLhdIXY5P6xkh+qkuSbrqEURGiQddVn3Ltr2xacvkIYiN4JCXO5YZ+4zPvwQOyzUbM2fjw5gT/VbigrSA5E92W/+6FRAb6Jr7p4mJqBqNiqY8yJFnf4BrU0qE2oXsNLjKoRGPtPePo3hNzwIFsnxjNmIq4EN+iQbGisUUCIjWn/0eMuovSsxE8LJMbpgiz8TQP0ncE26ZV3i7WxGdsAxvv2iLXjDsJbdtjmpb1XB8pWFbLiuZNfFMg3EVR1LoVZ3no0723qPNrFBeasvNaGyWKBh6ewJWtdDUmaOtaNTg6WDg7ezzmWccZSW9eAsxU98XIoge/R46nbdgoAvba6c7H06uQmSBd/69zT6Pl4jb6yyXCw995C0u0iK0F9rYTqfj4RnGO9EZPKxr7jY9HiS5O5SJJlu1FLX8ijP0BXVTnpVGK7pU4Fu+ng4HvXs8tMMV09oFNMoy2chtlKDAmGZcJ3q4hXyNxfvybqVnUEsqolNqMQRXalP0OKk/220sV/Z/1JIbGrCZsFnkG3oVtRgJUnCt2y/Mp1Km23rBum/KnjgWLQsNq42zWCV6mpKySebL9gKEdRrY2jzxO3gbIIHytnWArdTFvvMxtDUq65ER+qai9v6MiCKHXq0cZBZK/eCIwghdHVvTMClzn0uaeajKoixTBW9ofRqFwBIqJkWw5JAW61rXHnPJUDfYEazieNcuwoP6W/vWgIC31gBSY4LSPkklXwCuOa+gHL+VwlreiG7DGWxjqZftBK8iRLdgWBausldJ5wHX17xGgSRogWoYqastWxG/kkG+eOZqSBMVDCHBmhM4Owvj4lljAr4SsKqb2y9tHFettSMEjF72skE4VHsCVAum8WSpy9w7p6Q57vNYemnkJPPTihDKIgYYxL8Pbos7wNnLOZoRdZPZCnR2syDaAwh53ZhGyExvOdn5cs5tu8W9AaQaxU00WUIkEvq+CpxWK3cDMdtFgrC6pdW9FSGH7P3LTXz4jt2bCrxLcxgp/FSy0bOZ1tZl2hCpQrXIn3Fb1TdU3GCBRgDhRX/uQP5NZBOx3sPb1CBkLSG4nlYos6XstZBbHAK8muD7oPtHLOGNZfI6N+PNr6Nusj7NwEER1/0O1L2R8lLPV84lv/75IegvW7ZikJwPBDX7+XyMroavlEGM4ji0N8CRyCIQNLiuwvjXZpz9LoON/mZ4444m9qM8tUz+wnvmUOjKItlOKbNJjcUv+2WmWidHQ6NQ+8Gj04RkWNRgE911GLUv3If9q3JMZj9gUEIWaWra6jrPdiCvKRWIWKbBh6rDgN2PP27TPAbG6fTNecHSzk/a5ebP+IhBr0jkYoe3ltlrv2q1bqndghTicyT/YrzGKZbhsS2ps5D8Z1ttRbh0sB8S7pwsq6p/G3b2BjPK7F7OFEbRhNF3xKuuS0wWzff7DSj7SxWCn0ciwCRQsO59vp8n5MgYhtdh9s771Ukl+N/PJP5dhfNHNW9StH+Us3Kb3vqOlsECApw/P8OgSfWoYI1XJc9TxPRursZQKEF98vAiCAxH9MaX9Pt+tdSkNN59LnLUd3no32yYLlHhJG1LG2fqRWhdpfpaqmZ3IKJCPyjm8sVnJ98dSM2dABD965KytETZa1/eyijfrIiA71FyFuHo69I1fu93ph+6OCtpL/18SnFLNq+g81MbgyYrl1c83EcV6vsyO/2AoKF8r88hYH9v6kKD7ko1cjWi/wgdYXSRC5t8D7/MWvgHW+/311Nai/T8dTtXxLujluwWGPXL2KyKZzcLmp4IlpjGtP8smD1gfYHgz+5oD2Lr5kbLGumSrSb5S7ERHKVpz2yDw5gGA1tjCN5F46nWmyjXCSNoI7GzovnEMF8UYceJg5/AuOyA2V6saQtbpaerJLuoZP0fb243G72EPSrdcd3JUfzATyQ6+dFkbmoixsxXadmHCNzzpE3SOr3IBBH8rJNQnJjbLqfFj7+BP69JNEzcKUUIQm1Gdy3PztMPwvIYfms0ldvUsUMGCLuC1K3ynKvPnB6XnTQob5nldA06/q3yoFnufi8Y2wP5twlcfy/+ID+on9YkOC/2iy1axu2t0xSCOEySLjeX1zo7+pLR0qk2g6RVECsuJ+mspJuo4i6y/zZ6iNMi4MfMxQJBzTv9gQeb6xNX3DWroGDYP/itUQc0FG/u1IiZsQmbeVRbhYx38fMVrxdemwjLgyEtlYq3B1oA3j8o/9GEEvhQLEQY2Avg43Lj1+yAjIGPiaT2Ojtz0RRHfAuoeJGXPmIF73Doc7Vw/XVfSmgBs+fKw8vl5GaOIVOHcYkWQIckZkkbng07bsmOyqG5A3PLdAiK9NwNJS6bt/y5r2QF9ocTBAwf2/O0oqLg2Dq4BfYsOJIoT7Nma+vSzdc7BqYfX5IfbUdNRqaIHjWqObhXKyeJkDVXiWUze1+SQCJurfq1D0LwpDD5v2sIbg/WvgE4boM75AvPVFMMqr4QB6kN0r3Vkv/pZ9HcIAhFjs06NdoIwEieqcUvo9fXV0rlCQSXwj6I3upa6i+bFnOthZze7tYU3q7qg4ADi12cibnu60phYpKLObOqWzRrMuvXFAChyqi5/Y90SeOcA+ksS7zDze4FqEEpsmQDzcv53ogFZv4IygjiJr01wj7h4+qkVusEvdtbzZcXIZRrLoU4yVw9KDriVKYtRXPuOTt9wEGJ4FXIlx+AzIetT2v6lGy8xp3TRr2VwMw2JjS0JxgY+oslA8Y4KzWCjOJFnztwuZxN4fCmTOTq2aZ1uWoqFtVuvGWt6jUgx5dMqzKli6rG5HlHpm8JlHWdQp0cAbJOxcRlUhGHigKkHF8XR0nypwJKprMOTDM5xM/LL82cpxE2Zkm+HELgcs52mk3JCRw8q+FXynzWFnUUR5Xw0WnDRTXLm7KSFSbEmst9ulI96/IMN8x5TlG+8GndHxYHQDof22ZblTsFuDrYdjnlE7Jb0J8W6PfbGjXIVOr/i/EPxH2wFhH+j2yM2IEE7E8nNPCvHm+8jhWXWiMCvu7CrPRXyyadyGbImN45C7Jkd3jS5xZ9qxr8PR/cFsLLPtOxvn5aHTwh+lXZiBRpsbDVaz6P88xVSVCLs4EtNBqE07Ft72M4IKS7VTwnrv9mArjFPoCq7C4M2fASZ88UiIp5BDq4RZtcnlihtLg2WvPbGVgU5hnFuCnUqvQ6doGC48mHmIETxo+PAQH06wDL4bzXWh+4O0bafgrOyvsmb6IZOWDh/5HpGe5McX6N+vDeYre1T8FAS4CayAzA/qO5fAS85ccxWIt16wwbfa1FDn3hJ7hmgRL9dEhuCjvTC9TZDrZhVL70EU6nssJNeizPAfuIp8IiHRE/hgHzLlrmkaYldwbAz9tIrJ4dXuXqT4E24gCg32qBz06soK8dI/uWGAFGWZTIgVv24GT4orMTC2g4ErYMJm4DzfIv3haA+Om9i76GWwlgUvXg2Z13NMOUrWcu9VgakNV20H1AZL5BXOKq5dUpCQByVZcRWWAVqAeRAeqyrmMHp9snjaubrlf1Yw/tWIkt/lmiKWBUd0RZEXZmyraRIC5FlVfxUpMNf2aI6l7yIroBzz4BIICpKbCYSiCpyBlHymDJtvK7GKOKxCGeZcLsImMrlZYaXMbNYk6bd+vM9S23uIY1QVCD1bZPXNsVgX0IBdAl6XKHL3qIGpowcI9W+ZkuuQHZMN6dSeZdwefjtpE4AoHWtkpko0szwOODoRbz12tGSG8d3NYnD4uDu42Arr2SBIxcbKrR0EndUEsXSFUsUNz0NKjn3FWpaJVzlMNLEoFZ/DuSEQ6UxuG6rd8OkKOw2x4KTOqsugI++4kox5gwRZpQavW1LO4/hc9RK/7YKLYL7eeRqvSGwlcwFcwkjB7MEJXWikvsajSesKHT/f9smplS8y6NYgpg/6/EV/fsop0UM6w01Y2YRm5xFPXt3m6VO1AQX/3qfS3WfjghYldvGTEgk8939qmRTBQJiW5YUPeGkUjRXTStydit2oG0VIdrZ9c139z9LeY6+fY3QGNxPXyK6T321Uk6c+2WjBkExgaiHRimaADDQO4F4wHQNLEXSw/eB+tfIS4ADIua14YpkKed1d0llMIHZY7j52mkYyMN9oAAKvTnNWpmITQCGzgX+OZYIqXH+NJJQWHsYGtmPSqDKrnHdsQYI8XWc9TMUN2K92L2eiHMITdwA45rmGp6QGXCbFBPA61JNDXkjuM3UoyetnuyilQ3i07yCau+QF2Nu7maOTf0s3PYXzZC2Ftk95OwP1S3F0hAWl20/M/SFZud6mS6M6Gz7sUGOJBSD7BxCwCIiZPStK9U/t+mthRrFo7fXrYVOgdMQ34zMIxJzz2SMhn1SnV/MER4p5X0TJfMQLsnOkLV0qTBm295fdJPFcXpJcUlNhBQmkvHA4IxOm8rdMA2dVewgjpQjW772MTGUYW9jWZKr75u8GXBiWQhYgSVXO54JSIuaMw+HNU9g537hVQ81K3G3mAEdK1Sqw4/16h/uX3t90qH1OQmi5pAKP25ikM6HaZtnoLH+bzq0Lev8MUFDOdJh7BwmWfjf2IoF7Z6DhvZ5Za0c8Hf3tMmOKbHftYufhyEJLbUvIaOe5nZjD37U/Kk4zUX1CNP1Qw5hEKVWbTHAPBldJKg1S/6Rb4IHwhsh7SLpUM1WyR5rbBNW29bwNHfMiK+0XkhhxUsYJzF3zHIE9zj9+GMAjRtjVeo5ouMr3ZaJGgGkDYXbHttLuAV11+/hv9k8JfE7TzJWizERo6WX8a3byEfvK6jBJInJw3nXToOMR0J9tel+S6Oxj6R/O+jaxYwPAHfNIjYv4DrSeulqIR8r1uMRj8jzt/gaOqPQr6ZC7RAUbTrblVvZH7AKQmaH4G9Ledw4RyLdfHtS0lDpYpd/JSLU2O/J3ddJ/+0qzgwcF8/TxVaUWS/wZNf5irRsNmHe1H/O6HJ/CuvdxyMsCqfnpR6nbXpPd7pmIIcCk6Rs0C5qaKpx0aphkMsJ/JM2jYF2u6Kk8zBdZS7QU4sKpIPaUPz2/XCIHxHztA7QfSom5KeZKpd+VYxxifjFP/iBO3hIk9/UUAuudPBTeXyFOM0MC6eC2e1sieYTCSgwuSZQ6CiKULmAzmYaIKtkeMcGsShQ+sn11e8RFm2cNgcYK9UyU3LmHmjl9lN7ijafjKpeosEu5MAU8AHW2eDK/v9PLLgJeZIAY8WgObcwHDXtuCJ/Y2It/kMGBVCFleUmrLN0iAxk6ZQkFIGW5etVR4GpUR2fqiBqnZHt9k1aF0XEszs4FKe57BJ0cxdOaRWlEXnEPM1BoecdLZ+B7LFtRXtSGyVnprJFIDXWefR5gFJBPOhFHmK9PCukUBO1vij8WujVZsO4mhqDForiYHeQUGCloPRZtRgGQuRupcEJaZRcHq53jM/qZYxZzQ/bwMznIHtMZKFrDI/IO0SVlsCP93PJLkpZqK2CSspPmuizL5hoJAz/QUkdvQcO8JIeUJ2lcFXJv1orbjRZOI9FQfU/+RiOjVNY0daJa0mNX5637m40pxO1QErzfKIG9pzy1d/WQXbTi4kLQXoZpSvOfOukZXJaDen5cLMwAgX271WysUQS56vaWYsrA87wja7D2ckB+WWxa0/UtwDfzS6l8vk23Di2DD1ORUHZSUB1P821ZkeTtM3cxmfKH8eU2gRraHXMrd9xHTORZgswiA/HrtJzkq5BnqZC7YVrQLWx3mIR4yZtt+17k+cEb/U41K8by58EPDeKAsf2xf7u6YmMUMYOC36OYyCAtM5a8+mXK/6/8pBhTxD2YWS8mzLJi0UAkVgEAGEZKWt0ibdI85qOGuhgY8n+q+RnvCsNqWOTMJeOOnw5tpD5SDjBF6ml8EX9h5twah1hSTL0MJkvWXDSQpd6DiTLYTyGang3hMwdDFREOWL08cgTyJf7NLVBjdM5hAtIJp69MNcof0yCKqIiK7YYNHK7EGIXafdCdS1WbBF3qYVMbU3roNvld2aJkwZQQfOVhMVz9I8jPEALSdaec53Lm9iwAIrAFMwKnvPIo4czscuYi6Zl6MDHU8/+rIwh2nW2qn97B/WN4xlMBQW6E6W7w2PhIXfxfi62bIbnFuOxNUXrUwpbZefpsUdfDSQOzzsZYXYFSYBIbhTG3YhHa1w+PXn9GoRtHR752WtQV5Ig+qPMdgEgPKA2Cr6UMsmG6pTNsepcalg9n3m/gtNiacaw/E0OWKBNfwwFy3rP7wE4joErxoGydpyUEABdIgbPOueHVJB46wOIUAtZeEFx3DLkcBrGeXS7yGMQ/h4AMcbBdZ31lTqDBM/Vry/UHEyyY1arnAyyl5vL1y0ODzXGLLhlnL4HPmjE9/NA5ooYW+Jru59fe1rOszt6vF+fJEGWIKihQIT6unUzJ+LfR15QXRJkUCac0R4WsJEFxb/ZKpqv/vNKTvekJoShj8s/tkD8t3lSqX6/ISBqAXL394jlf2AAPYKbbYw9CF+wF1Y2G556wvBMd7WHpNYVQqiT31f0hZn3HfjU+pEzLBUqL5E8xtu2renZQ73aZQRMKO6Ww+SY+Ni2KKOtuVOLJonFlFQwr2F93FydZR+NDrGB4IB+dgbzdGSpP8w3PiUSy8fAagXgXvNhzjFBquNYr6FHgMFNwSvRXOJAHPuZjqY05n0NGT5l0hDDNpE7MSUCEXYftKAWdbq0hWseJ96qyhwaAgAK4ptrfd46gcvEs+A8Z1UZzBO4v444YqcQjDmnhOdZSuGqq1ShSq8ypaD+BHQbU9QDy84l9bHEI7h3faCN0RUOKIQrOhtdQjb84PThJHQKQz3AMzIbSZOHLA3fIBhaoDyhu+7XNhLZAsgbwjJ/KYa3zbXUvIZldcL8r2ekOe5jygfMP/kuPM7vUjdgolXO++MdBoUntVXjcRtoE7iykU2GQ564iCd60KiCKGk0ZZmv1geBZuWc3juZk923UMaHhPucZaJz/hbzhzK9HSMMUFWp93S5PgZPWW956ZFrMWe7TgefqbpIAR3iSYajy9OIQE7kW/fEfrgxPzA7zkpUr6l66BBixU10H7BXO3FE+dSzO4T2VIlLaiyl0YROzmk92i5OgQtzpUPNfPybzGIywKAWzoZcsoN0ZMxcZqAagMlzWcp2Z8E9WzG+ZfbhK02w3S5wS1cN7KusDw/ehmAlMNc4h3r2aX2PpmWpXtbh7mv+9+NcravmbFHirnlV/ry8WPTuNseQBM9xglvBu4G/0pPBr9b26JIvYg4AGZ1BR13pHWAy2c3NjJ+DgnadOJ/N2E3sOCcF/rHngSLSGAUiK1QgnCZBelu5MiCgcikwP6WFcxIalAvx+emml4qjBY9Yg/QF2az7c+pvh8y/PkVuf8xO4bgCJoGQcvJesZ0bo/NHJu7405Zxf9i50u1KCv6djHOYZ9YOZ1W7cPe2MsNZ3EoY0BeZPHJomA4kWHILel6BcUo2DjPhNFH91jY/izNdLTqQANVBKoHB1dO8QhfMOT/85ydQcZaqvKEhCKkLBcZO6n8kiLfPp5GYi0Uff034sglgRg4UzmHEW4xPgTPD1oyGbBC5kh/J73ulGG2aTWnK2DFNr9bsnXXY4yjHOc66NS1K7+0+u7+A0/ezNYu05uRVSXf3+mdmM5mJfVlqfCNAx460+rJB87I6XPxLxjxPUpQ6ZLF8uBRC0xO1AiYS64QStswjFt+rj0atJwWbBzoni26seQnkdCB0UJuRj9OBeEzAeteW6SEPTxrmFECpxktC9yT9vj1gu5s7huI/q4EM3TXoUierDLzVNVYvyYfSP5y6UYhL3dhD+LTHxfn4orp74chjlLYQJq4U8iUf/s5MlPwmGcWG9odA3DETn5npmhZHdZ2iH6H08hcU3Mntc0oweU57/vopV2EnxRr+w/r2GZ0gYf65QQ7ljETaU7rxs2x17zVUSlOrpStxbe60rry5x9UCGeqhbVWpN0tnoxKjWfKxyXYl6OlCSpZXxeHNek6qm+07DJ1cxLRZgv0otepUJ/VR+GxiaoD5AkmTgGrLkdSnioFLNxCQLnCaJRukajG2RcWSSS+jh6SGVIou2n27X0MQlTDVEWl/qMMPQbgXbSfP3/Op+CKMlhX1R2o0OYXSu12pvRy8fwNop9iC1hTV8bnOd3AO50+j7WjTGWfsr5/WUNMeyYErKht2XAzgljOXauINfu4XM9afCKgpXC8SEVZwa5qOdaZYXGTH/orFUqBCOHMEHVojIMUemRHVagwm7YunH9M+btMxORbzNDtZkcieKvHdql1JzYc/Q+u0T7pRuajh1CTTWt8EAhO5ZHNtiVpJFNN214ha9bjtJFwcgO4mEXu555TetIkzSVnUj5xRq6lR8tq7Z/KUKFeDn6m5vHQNjCpjOpzW0DpD9XAGc+f6MQWM2pKiN0O5JEf8GbTILY7oc+IRf9OyIo/rU7hTiYmrguRWmwcWhoHZEZZrxgfsSCyZliQDPJfO+Cz16ZIL17f86L+FNczOvh7R2+bdxhUG+FqT8jK3lVM5qV7/F9AApf36LLJ95T7+pMf+G9LO0Ke/J/Yj8/GUWrHMID+in0Q6mH4D8td/6dUS2/Q7Qgmc/j6Qct8/w+RXRAVPnzFmtz9m4pta3BPIdrQa/j1gO4TDOEZ/fAmpnthvXa8SNfKovbR0xziQ6s2whA5lOk8hsT6v47GDVL65gIDHci+ae4EdEu0JE1h9p+FSDlAkyOU5vzZ9TaIyM++7ZMlLmzVDIlB0KZ3IPvSYj/SES9DYL2MdE0/pa9XzE5F9DzwPWbXWww2GJQdnzg0Fcucv5E36i16mgDBWa5SWfysEnoDU/+NKF7iYOrQnO/RRwRl5/zhe5qb1a0KGzrEsga6L4zldfRH2GmNJeWcYtR/a/gOm3vQpZtP2LA8zv934pNf93qxeBnFSpWCBlGG00KBqGqn09xXGLUq6bZ3Hd49Wg1MPwPOU06HSoljsy0vHytFdhUGnQecZ5237WrltuyLI7le1EIqpvvrlqPudwEqkvbspe1X3RDN8T3SfZ6ePOVnL2qU87MsSC3GE3rgl6VJMjNRMr+wZFGpYVsbaUkjsnvW+5WDPc9loe995GZgOs+SO3nvBNNtYKV0Xbm9+G5Kmv3pX5J2hnj/c22Kf0/0SpTJvESB3ffaJl6SiEKPhmv5zKoTh0eIIXBDbsUXFFwJ0ciCJpdEa+zAysEpWah5lSEqRDG5P4f7wSCDfk7n8Wjgbvo2VeskiEvEmyMH79InyRQd4+edxe18/mG3zJjUPeB8T6xdz/79kfL5YI/jJ5JZjclauyrZlM35/NLq7asTllMRyNFap4DuznKGRFXyIRKzMmMuZ1uiQnueOa5SFyiRWZ5ZejGBCo6VQZnuruijPmXhYj10op1Ze/xYgs+/s9wZqREZWmWLIpc+yHmMnhdexxMO+LKWd4BAuLwnI6NUfTv0AwChOjVH17Q2gNXibla2m3P2KvO9SqCgHQCxLMNrLrEEaLMIEQ3pbnWYKlux8nOCR2GyuOwjfPqqJ5kMa5+zS5Wo/VZA45r52KH/Ljl6Tvh+Zz4WHFUPP1TtAzN370eOuSQ7vzxTOWdLdJPWqqhhmh9O2H/4K/P/EHdAK2Sz3GdLhLoU74cQRlbsPjj6j1dqKXWZD8XOmpocber0cEzwQ6fxuHHKBNr6V/gbkfkUaQfl7amc5i+l+QWXmisc2akp5jv5gJHTxsmkqgW/J+afy4eIF9mdtZZE3ISD+Rd2/jdm2Ih+nS19v6KJpPKdhi1BC4GRv7wj35S/orHo07qeyWwx44cVJF3hCjfCXVtww3Nz+X7HMvqFssul71mAX3Kf8EoKSozv4qWuJQgh3umgBUJu3vmmLhmQvrk/Tz5kg9x6XJrTWfCmXu9H1uCldVKTQls7VS4nFyaK+jBGE9EPcvfaNnxvTVckx2WINk9Meb/8tNvtyRXeccVrbT6yVo2tpJmvRXT+07YxHGIbmu/MCqBR+T47hP+eIb2htH5LXPHfinlkpHr5d7E+RoxBwy3z7fu5I8L4uxeeu9D+G6FjzT4lfxQcMRoqlHqhPVdLwnVv83k0JEMkx91XPcVXd65pN6YeLmIkydKewo8ytT5mllOwunxblFkrJJTLjk5w5/y9Y5TjTjzcU1HF+RZrDgopgrAFFj0qf0IqZc1tK0/hyyjRmMal8iNuPO+6z+/rcQmMgEO6sNBF13JIoij0uTzW7HYIm/Uto12I5RBCYnm/rtqOxZOqbTK/bIxDTlZaRZ5406NP/A9Xxw7lohdi+JOB7pw8NJajBoL7pA6OLOHgDDqVqJqeYXCH77n9/VCO8r6sHV5EfzuaTVfBj5k+JX7UeLvUA6QhaQdCZW9ifWoaehW5z2wHK/04Gnv/jnjK38BjD/DVauR+L1fdE/Xk04cNbfW4m/T3eGDbRalCSiEuYOm52YIUSocY3rwpLtmsiGRcRQJrQte9Ltkl77NG/Ik8rS3FkwAHPZdkuhW4jOoknxRhR40HVAYruUm1NFiu6ihDF9MvurHkYU3JOdBR4BSMKdPLm3/6kDLCP1cOOsYhITTqODFKce0BYImsGyS2nmRsHXUtyqLjdhgZYWgBTgtuzWw177qKcGjrGviQIRkuXHURP27hjO7PBXqtoQH/IzcesyXkfd7qBj5DTsU6Frho4bDJOV7y41at9JqHLuKzc+1u0N/ti6K774R+NvtbPWmsUpDvx4+/rgLzYW/G03Nbpr0K6HhiOymeBLu9t1059behi1g7Hd39FXyBaVVe8ybrrO0sOEio/4q3sQ11+gDllsrje0ViPr05+TaB9cwo1VIILYX4btEac+2jGcAvQqx8psCX35/5dfJp0XZPWMlgPGFBj5Uwx4+YOEF2TrMIMQCWQugHbUe+Vm4gPtrYPNbxDxsRnRkcL2dfLwOnhUvbbEbBx3V2lUCJVDaMf2pyiZEnEJmWOBK5RsEqJyjxPlLPKcBc34wcizWT8x72En0sdVMO+Vkzd7Ovn9bqSINDAxSC0wF1hHcBK9xym68m6wmZPEi9PHj4YsSbA5lXOvP0PeFvAdgR12qsijosZ0MpWPE1zoDRhY05K/hm1SFEI8W8yyg7s6DuYDz1Da7ns67BTe0bfTVRCuYg2k5K7TPBlX/cXWgGwJvqBPEAG11qtm17v1vxHN5dq3UQy1Dr4Wh+x0+BlCxxIay6MwNkdJ9+fJVrLA4mdFO73mVVjCkIXNE2s9wGINQJO6XHW2D+21wRRWvd3T3chys3xzlqKNiiTszXquydR9rtiNOccEoeEiKK4Bxuv6/0i3hxLT2GJe2wVZahIgnxqfMWnO4LgObpV1AkGboap5Vcg9VgFWpbsTbYhOeQo99iSYp+EFSkNwj9qeANv2rBx4lwstoiUrBPL8AphNbxgmXJq7mLt9Y+2gSZLM7EPhlDkhh0kYVUYh7xVu4dyQ13v23WLtW/BF2Q0xWMjKKUIgvO0np7vHu9Ypal5E/X/MN8pPj+77CYxYxdTOKAITukF2WZP2I6YV4NU06p2RTAWVKq6Eh9tDLLYU6pPVas51Y7uFR8LvfyFp4WjHbaY1kGC+4s9gjD7bWePdnoYNEew/OKFald6mz+nIH/k2Q6VnYzicG+nZde6mL5e+p0DC3Rh8pwwPq2vjRUR3btQiRfgF5g2zK1QOIaZ+nk4WfnNck8tXSP4JmoCgGBTtQTzqtV8weNPdqjUqhIsA+mqsgO3/mQ0s8sgHJOdbLsOssNO0e2dGyQxxYFuWlxCiwZsY5d1pTrS0ueqS5dLWDFPbmEmv/YssbznzE3Sf6fT9CaRYTjTz2ANcicPuW46luDkyKmNdF5JZ0gxWBY9nNMPjHKA+GGKV1TWKao1Futodp+FGy7lFyuHHzXzQBX9OkeNO2cMkbSOhSvgcHbi8eXPQj60COSYfnmilWrud2dn/i4RJtJqr6n8BSwrVX4MZzzl/hswjUtBApAQoyV+HATwnwsU/5wL8Or8HK+dIENxCL/bJGNndmVQQAqw4xh77hZxPUdy/S1X3HCwrS+8blxXp1+/mxC8OeLUBONzwkxHKCLZokhZWXZ8+BVypS53yFwpMt1ylDXlQBO4/HH/PeAdkB1ISZ2L3MZhYb98VASRGOSgFhBPBE3FBxebqTMPMoB5Tv1+EMXulFECx8py2bltnzO3bNCgCBTRilAl26lvhKU1d/p9nsZMWS4QOAM4XgzqGs/cErKIGy3qn+8xoOjtnJpmRRkuPc5lz4bVcjlM2A8YVJEXI6jycrRgVEHcDsczzv/5ABn2Zad8p5oWF8NM6KhMWqvauVy4CPipSwtUJYH+0ysATRtOO3OPGqVd3BuqB2fRLyg72339uvMHXK7pwJ4QKgMMy3DesDdN25lbS3fixNzevHKbxjKY62rZF9w69oo+Fcwv6uWNdYrmMDxkU+dm5dxHeZJI7U2tPIurXT+7r9T54fy4SpEXP2hcelvKYo95xQIB18GaBwNdR84pCCYaNPviuopRRCH9Im1+Jb25BexKqnDVXbK1r9sYMnlXlPE1XYY3hvNwopMveSpxsxB8ZMTq0oAHFcUoWJD/EVV8UCA86fieLUzxXJhe/y5PPenb7APLDdSTbshTQQWiCAOU94lwIB+6Es4FpsVLmOUyNQhCjkNnWYQAhxcA+APocQXwwSQEOEuNc51lwc1ag3i0mYgSVLZdAsNb2yCqMyPihm1jNYXxxWtC8+5RYmYPvyDlh3cQtQDvOSK8RBp12doh8j0W6xrTNmOLi6B3gYzg0ZEgHMg3mb6ugno94Z2P45kv0isx6fNLv28q6AYNuSN+8oviPOdmTT1sTLYIsZ2MxNjGHz8EyfMT08MwA+j95ra9P20U7fRoRIS0DMqqAvm0EBkOrI/kpXdJAnrncL/SfK5+QPQfUN6lgSZFvzi1B/Bg9D/xpzXVj2NGRpfBYHV/XXvCNBtqH3bQRO8wNEVV/MCebSVO1IOYUJ0ImapD7AH38srWgCu0QFdyJWUz6PAmPdoW9NxaDfZ6DRuipxSzo4qFn1Mf6dI8UfeOFElQCp6QlxFZr+P21+mXyIytffACiiLG2yNdmCw7O2nZ/xrTVkFDiJ6tHJMqYQ0NUJYAubN5KuMayul2nU2tDoLLKGeI5myohBXd3zhxVJEdkPxccO/xShBeqyrYFrf8Ii4NnJJznMjL6ZB9aQTfLTaMKOh9ullcTpKYi2THvqTLpvg+NkAt3vwGaErS/UIo4PKDErrCseLX39he73AtrFA60OOyIou3MkMy3V8n7mTf0CoV3dsGCA/lSEfR0OUMukwWTzquy1zXH+KynRT9pr49yqcllJsHwLirywQrRJMMDTtv6OFIztRgYmIhMelu5fc/7TNVVcx20VIqtccC8JKIVJGrgNWdrcOYkIss2z1QxaRnGNXb+6UkjvWr1KKrSHo2Szy6rGokp2V5I23qvj02fyZB8F2LHqizYaJ7Aq1zdV6Mbcfb4Xbh3+1syras2j9DmvcYJ5ycz5qDZ1ZQEEPdjaCWQxH/0GmExwxjgLX3ePn/X3n/abQTD+22aKK25LUGGfpWF2XIbVyBxBGjW9q98tCFZlU9+MqV8c0fwdIp774rrl8x21Aru6EOtYK+cOpZTCaqkZsqMfaL5iwHAVorSeYBudA7NQFi/o7Mamp2JreSnM7EdkA1svTaH+WEMwNWtLFP+hxJbdp5WAsxwiwBp/QrobKvB5M5S+T0VYPs9tvPbQCbuvlgmXQHBdx3zGDlB02uGwDoO6ZblH09DRq0EHCvsOw91IrmRSUkMlt2GGxhoV8R/ahfpfE4GJ57SLHnvGiVtDLJdiFWjPZZYLDtN9gZTVbE6Vrfpm6dGGL7Y154mn0TE+qs7GJs5galRl33m3+SUAZoODy5rhiybnmeezecqgvaHphIO34a62N3F5oqw/9ncuvvAhbb7bVkO+RK7Re67KrPktzBBeLuf229eHTyqujQOA0rcupUgpWfM4Jj2r+6CGNCu/lJC6Mqtat/amLq6VsVlYkZTsg3lbTlc36f2wjLor/Jlrb6gaq+xnrVxtdkyDCL1QM8QmE7GX6hG7eFXqlFBrUi3NFIo36VBI/jwGVIOsEvACCLrAW5wm6GmEC6um0dL90RQpkmoI6A0fQh9pB36UvEBVgO/CXv8tL4NQkZPEwyTOwyc9QVIHo4Bg7e/DiaCqYPgzc67UoK/EGjwVG9eEvGPxRotdMqgLt/dgVxY25w+rNzy/C8v9os+rYMDUHyzWzbKXOuPjC+1rGRH5hv6DRkceUEjxIUA7Zo3jdDLO/GkQcshM+nGxb6vHIkEyfJ4dyQczVZyNDdTNERxQ9/sA4smwGLAGeGsBPEwE8jznKb+Czy0W7DZjAh9TzL2u7s713uZPhEuClYxeFunEN51KxmzaaV8u9c0UZule1JAAAYG69J6koifp3gTvqT2dQcZSGTedAKM+TabM4rOcye5hL+cVIl+euLMDaSQGODpjvj/jWFiLBM0kC2HGy5B9apV70ox8bVl/oOyW3ncYfK9IMhkdfxh7H9l6iAy+Pl+xL66RideWXl/qWdWXP+e5qG1+/OVT4HrkwXTG57uJ+1jqjWRlnP2sF5iAhfsApMnD3dAevHQai8mCW0zoC6KpOqZRj347R6TFM4L93YR9uCrVSPUh1QOHMYKo79ta6lEctL5uQ3CxIUapx0CsxOtoDXVQqC4+XEYWJpiZVX37tAApRlPfGZb6b+y3ne7QexviQOTL8I/v1m5TJ5uKyNghKD7jLwX6uwxqNb0gfDSyxPLoi9LvbuRkMIaXhdUhdJMd4CbaMDlPxfrIy0zFJzChwfNJEoLek4mZ1M+4xRBhh8WIDu0gRgNeFT2Xr1kcuea+BpvUsBAswVukFx9yMC0bBrYaFlu2WRcWZ+ENPme3D4tftNFs3OWHw/HGji7pikY7bXLNITfIZS2w6viN42NnLwB12y2H5g6eLZfB/lddeYs0elhZJgc3vycnMZFKlFgO1H1PCFs5vmoXXqseC8bvtnzIPeTYbXeL8d3TKuX05t0fdLC2kWRbsir4mOnNHN9PrC7kSO3LLyG7/UrOb6jSGBmsgk9BczEBLpO4ZL9oFfhVEcVXkEi5gG6UVPNJ0c1GUucndPGNC3+Ck3Tb9Ui3Y0QipiFAdpCJc6bxX+XM8nw0LuYE14rOxRq7lgljdKTXRTWQuTiFLpGvPX02RJOVVPSVGip39aAPx9zel1X1SCDNl2jOs5MQbwGDKvp2oRRUm+CLIbiw1LgwDp4YmOdpWDSzXtRJL9uUGAJIVdHlw1qeVPee6VpT3YeM6IiC+tyPtmoTRsmRlM/jDNrH0jphFyBRWltv/w1ElgGCDsQ5Q+X+OOTNJOCXknHIpnnPax2m1YSxmJRMMVDVmIx6Dxmjfb6HMyFktjWoH81JcVnxmmQLjh+6WD31Bi+YOdxIHzRiFHUL0UqjWsgCSC9klHrxzAUrMqqm+uD4U3rR+qEReMVggi8JRUXdwr3XM69hJzi89Hc1NPxVaBzr910K5OUeOSuWTV3E6xA+5A1J9obfGXg2Axufi5ZJdLjgvEe/PZaauV6qi59X0eYvv3xnzf5zjpW614c69jTcdKx8b5RC7ZQAO3fBhjDvpsutNRsNsE8i71JD3c76s4dlXTA2csrfz0pU0k1rfn2BTEN8bdrGjWjH7wBINzZ0ujx5zyFUVTfuMWKapyfQm5e/LcHbfl1+7ITGs/74ohpC4I1mBIOK/1A+swHHzk7BtfCmIU4NGYY5jjqC/hYBlPSqCBPW4aCLU8UesB9EqhaL6i2k0iZszYfrEeTV27fmpdkIuneHl/qo/3sCJIOtTtHAT1pe3NE2bKw+XtFiD0lWavoLH8uqYo1+UdzDRhgEROUrfnsUkbxbmYOG+l7dWkcDQoqHInph6Zm0axcZMuajUAz24r2rhgSVnGSOtkuyQJr2v6IMrbhTlYSi3TL9+GCxrTPTBC3zUNhMksveKw+0OhskPCHhg9NOcEgjmvM/lk6TQBXaDuKsLWFWyqX47Rtb+IyM6HYunTPhPt12mizBcNahparGkyd7nb4ftmpSP4ZjTkGXCmvo5iMVUskh0eT95ScGYzms1kPmIOxZpyLFf1amGFApvhEL8kFTlvUx+0w6OpLvOIRC04A/KyV8Njy05sDMfLiPk/DB0QU5adePnT+M2uVhJif41c2mB2sFZFRsK3bnRjXDSuXrejvCPkncTQtC+o1go0nWC276Z2w3W3AKsoc/PzNzhqkDsZ4eMVJy/4TKtJu0CZFgDRIpNPBWj3iun26XVeAFoyYHNoOuNlLAT0RLE3hNRq6w197W8msNLhkb+YuJJD8gk+wWO3Ms0ybSgiP4beJaJnMUt4SSJ7d/zbMLyKdvChl4qq00gwdk3nDi+qGyVy09EcrlnS90/lUHmstA/fZWOt8I3xs5s2SvhxytDEvVo9o9qAPCNcQsoKn3uJqEN5Slqsd09DP70/MmQdiIOV2bqUQm+udAM1Or5alp6NwczRDa16QwMYQTRT1ZNQ79xOsezjn9N9VYKW0s6Ay1NxzjXAJ7y4bUTZT9H7Tj3O9je5tC/gHd52vpBrOCTRtg+QGzNwANivZ4aW117Zj/vfITBi5rZ8KH8Q1uqT3sQl96R17W7KBef7Sv9/zJQ77qruJljRviGKzrAzJdf7lh9VOWiPKZ7BcS0g2Rz0ZS4nFTP3wB6Yw0deiar+YaxuzXb+o+R+3myCpK8KIUcPq03hs7rSu3M5wx49viNuAKLzZqbHQlPlNa1PEu+S/13TQDzrmDsXZQ0Ko2CaEjnnaTMnnApDUhMBymsjkX8mFrndt16Y4sJjyZhlm/DxbuESnrT3QRNMRdHqoBoNXfbzM+VzPjmeydKvO7DwqVITucPsE0N5IbIH0WHeNgv1LNICibB7pLNwMRQ6IVNxcvsvrHRw0lMK1v5pUUfJ/Bap4Kp6MxWGPNjiUyKXZY2dyyvom4jbWNjEHWPMdA5QMXHyMiW+cVIdpZ0Mud+//lzmVgyndjl0GGMDIhGz34HKhB4uteZmrpSf4Zcb+8C0+HlRRARBgvhVQdY+NhNwqM7KOM1D5nVJxdX3xIzZqCV7ZZafsfOn1LC7YVg2NQiQviadSkLZPU3fH9lJ1VJ/djxeP+1OJhs5SDRA3hDVK8eJLJD7hOhmUykcaZk2ikCb5h68xDPIkXon78sobJYLt34gh3zA7z66rAIbIY1dt9Q1x17W+22fPmCNYe9i2IUnvnqcyaNwMhOlQ5+5rgxrfAdXyDue4xasmvBqdxqvP93YyO5WmLICkssGWVFm/9hKnqDLaaV5upsk3DDTWjpVyh0P8tSzZjXnmFTp5b6z77XRcW20lWXGF8LHdbGGLFIcXmdpU5YhDfWjKobKhoUHApD5yep1Krz4eByW1yhGVIeMb7RlhAplQTE49oINo8ie6n/lXibBlgOeJxn03mTuMYMCoZnfYig2NEoT2tuPHQ/p6/Lc1baVVlXrQ4oqM1Kh1rjlRZW/gsAusqmTgYz2tLEFFsg4aU8aWzBZYPm2GiaYaKujn0LG2aRDfiZRYJ6ONKi8j7cGA7hWF/AqVIjjYfhyiqYde9/WLNyzQ3KDjUZpQik1LNd6gGTSl2Gyoc4EMhSeUePzBg7Kd/jgckVY7OIR0DISoNB3Jj6UTc0NzTctnvLvBb4py2cD99imXkg5j2T9LLmabYD5fhhq4x+IG4dlZGUrvA/64UpkLldL/d76PJ8oEAeQ6jS2oJ0/QaeutbUDSNmVwSAExkRCgZqTz8ac6SF7FHGSYkrG5HH58iQXb8lR+SnT2G7hvZfhSdW4K2RE2VIzJw80fug3nxfiDPnxXjakfKpnbhaeENDNA44aX8ZLnvYpaRMFcM/lPULxI0odcTSboNjgNkbQO9ZtzCRDZauLng61oB8Y9lwkKVo5cbQR4I3s0sKF367bLdN4FwJmDglz3JD0CqIBHCC+oXe78lsXVw81Zr1wtq1LhJZoszYV5k3aM+bJxRzc0E1rdnPi7LqW/nZS8TQDkAGMuEAA4IRL8T/n5E+BoWp+giYzv74xAufNAuYFkLAsAAvAFnl1jazmyDR+JmG0hXByxyM1vN5+3skJLzfYCHWsuT/XDnV5aTsXU+WL3ZfG/kOzPcWKL6O5FzucK5Bazih8AaL2BMEPjlz8CNty4hSG6GZZY1M1UAswjT4mm3kYluJajGtuv4/bgp3wdALc06uu8pJrvo6VUzmS4vCj99enQbNukO8EqVZStdJKmCcOenOAqdCHtZMh0vfvupQnXk+AaUUMsekRnFmT61zbLOmxhMC8TVE46awREkxL5DMa/V5+qZGPNTigNpZGu3LD8vB54+GO7geunod66htu8V0qnexpT8/SAHkrdnqd63u6g8mOcdyix7tLfVDwSpluhzFO1vNzQrT9gg1eDrb6M6b0Ld8WyuHUm4dPvDdiU7TI4FnFzM7vDvtoQQUyvu/PbLgH0yCpwRXQdEnIlNg0otETInZMNEjrO5a9f+sR3DRnPrC8CKiuJW3DCF7kn3hLxPi5m5ATQmxpRVjhrV2C7UOmh+QdkydwDpHwa8fqgeaKMG3w516/eo+UvjIKT1qVAt/uuDfw/Y4vlt8cpz+3pgIqJtwvnYsdzhXL5ei1ePQZYHzZli9HtcYJSuMBxe++QmpmIdU5oJo9X7huwFTowHdlaZ0tSIWZp5so8ucN7VIpm5H8Zrjv7mRI6/t3/fkB1+XR2dIuvA5T0HbawjEYbOhF7oPad5SdfVW/6p38uFn+Cv2CjUlV3nhX+v1vdvX/h4ZvCY/4jV0rnCRhukka7fWwbDPvv07ln6TSeFrb7pX9xn+k08wBdoRJFVMCn3Boty36Qg5FHAEMnttiSw8HJfXaCmK8YRyG6fdPWLuWKKfdShDD4Olt5ZcZrpRZGOXJP8o3tfGnXS8obje++piMGJ76odfZfellzzrnWVN2cZTUFOfizCvGuVAnpi+lEPWw2C7WZOIsCkB8N1aFCw/OFXcZHTkqZN7erDv8lpV7QSaN8mnQZ6uhI7NecG/YJwBIavlxZU/DTfjquugaeDZVCiYgqa6+UWgzdNFOXP0DR+YExhPYn7jpBOqJm37g+HgCqxO3/sCF6gTenKCtXF8d9VieLqTKxi1nOGZVTzjakukTY2fmVstlt6S6MIjrf2uLy4eDQBragzFOb2IGdHJMqk9aSX2DtR1ykBxt942pJ/yltWNfTzVwSUt63Id0lBvC8iHLthzlXS49H/d9Rb8Yk4rT1L/OxJs7+i8rxRdrMBpIokGdjGLNfuH8sPV565El68yNUW8IsNaZjgckWFwci3S4X3g6tuiQCyJRcnokZtw/11vsrhYIyz3SC580EBMowp1LEpS/wV63R50qkJQc0cnsRyLEKZcp4DnoRJiyvMcszW9ljtjm1TnuCWtvS4GV0rB9N8j/CARBLCIVhEUjxqY7N+TbAyfU9WijeG35JmNEsVDem98r+m+RphZeQZH4/LtFpdNJPfNK7xnUHZWsH3ZtIo73YJoxRCykhw7vakes3gtm28V8xhTjQsyYjcQPR9BsBIuEUpkSxCz1KG5siH3eafIQQJWjPuVsDBLZa6yWVUNzXvKoMXW6Ui7ofiZjL1yl4QPF6EdrUOVYvW8KzrusCiNfRvCsOzMIBNatGCPhXD0j2duRLU0iiPK1YdFgg8iJgcbtXWUtLuyaFlGRXF4SjVD+kQLyY+ZHJM6FlV4wGnkB2aBSGLT9EMIknZqhAOLCcuvZQL9WYC9wHeiLRopIUlhvsSb9bg8zzXzVq60cj6cBsxzZxhzC04M090Wv2G2R3UJ5hLVlOO+KfNcoi8/jo7WxAsTjy+/Zsc8IF+NsWazQ2itx5QhKe77DcnGw4aoBk7LJtapHJ5FlRBGZ6viOJXPyeaX0yE9ihNwEjQSwQOBNEZTmP1TyiRaiM2NieSkFO6AKZWFLTokQg/0ZKHiAt+wjiBoC/J1YQ1iww7rp0vdk7OsH5GBgGRT6hpDfw+XT497cVfuMgthuiGWTvlrfKJb5n4qhC88QgcnovN9q1jVlxN7alqnl8RMFYFOQ044K8kX9lTeqMZZoX8N6iEeGd2mTlod/KI3zoCrtzli3f7xXyHVAsh2MLa1XQ9EElVv5t8+T1cRKUucaebPva4tpErCFfBalAYTbQRlEnu4vrNkGhcWgfbVXcBLk9rhtnsBzKWvLXjltc3jMfXK12ZG5CEBNwWB7ojTAcKZZ2sC5IuMOimQuWYEDYtU1TVO+qp/BRIDia2PvBKlp4cN8xkoQhCDIWT8AMaG8on9MvOJ658w59riUkyAdgzBswwgWxeOTUvHPshUQMLewP+R6bkfogOfokMnjCF2uGVzrFzJ0cLySKuhM1eyFxfzcuhL8MvT2+zn/H/+/nEMGuD+cPzym786afFA9u5J4X8aE5dwz5RpGMww6wldIR3JTHibQckDcUn9MKaqA0VXJfy3urJNX+BFWiFH9QDes1AVQehPcB05WOfaNZ/l4jige7yzT2V/aAqjF7bGHGH8EizDhNE4zFffcIhlyCvmnMXw79Bs4xtBsPrNevDwT5Ss3+S8RgV6t0Ec5C9oQdew1vhUGY5z2CsuuwMOFs+T3ixL+/a005gs+rmQQi8MgA14swF9o6JGJbAQRGga4l6GIBu7ChExfs5ivXmSdlUesnkq2VR86amRTJwF97J20QlDzsVFixJ9xY0JVZKHqCdlO4VCBYERG0voLqbnMmbdUAqo4dXYcWhMwoKeFyNjtmsP421RkxMoi+U3JzgfqvTp8Aw1OcB5gips5Uwixr+betsHlPA1kPQ8PfAAK4s6BHLz4/iuZiLuGfraNfqQxcjNDWb/EkqKmkFvJpjX5KLcyQKULIGqIk4uXQPnEGrIEJ5gPde7hZk3ysZFUzL/R8mNW4xEGGNyhn+9YWITCphQWUINacT9FgZlQVLmAynm1zJYsOklRw7AOFvdi+Vfnb3aVhxqEhvsB8BsuQHINFdXEAnrmpgiLtWq8gGbcCd1HXsOQp4TSJorQ82gixIhKlepGV/xSzHQK7k3HGEPybOrhWTkmBbQ4QyfBL4EWKrKljSftyt8B2oWuoLpYOgqCrfmjdTeoBlnpzPU/V23QC0JumGgoA4DgtrK4tnGvIU4q8ixHQO7ZSbFPTghsVbDrFOuHDf+O9M+3IJtQPFIaS6vSneUFUWKzi/I2aVrzGGxSbzVWYKXJefo3tQZmW5fhdHOvAWXuhb0UOEPmnwWzaS3z1KszWcuaLgmHtdlYiVRPRwSsDFQgkhvVQ4nI6vY+1TtlEnnylIeHKF1OsUZcK4jW77kdA3QqzsaAmGWrLmsBoyIrCbsTzH5r6QMLz6Twh3PPTqIuKxe8I+YBe78huGCYvxVN7Dg2JjOPLtpVKMNgYI03B9PRObPMkoWbOrurZ0i5CbZM9ChfqhXNQ6FXY8NOWH4pxeKK+iJkKb/2lR7o5/b40xV6c+TjQEi7yMObkivGJoprjEqpVMlARFRwZ3P8yasCCe4YYmOeOhidNYZJjfqgkBqpyn8EoXKbM2HJ32BLUYDwqi3DMhA845aGZOFYcjaDb0UkrRYoRgGYhZPjsCasJ2y1Z8Ga5CWPsXhqOIpNbhN9hoOGWMEzEh/xHm+UOxf7zsxkRppU49eNP0zkNkHylAFFMQorQrOiLD2lGHSIvZG6ZSLqakwJ1F9wkukI/0hk4wVVxDjMNpNMi5QByxeqm5+B4wICGnFQeX4kHUaLHkU2naBm/m7IL5qRihgUAUsMZIYlEshgWDIKpAeuBMJW6DiipcbAF1ECKwYzpfmEsJs53+IINIP5n+Tki/w7FHHVtQ1DRezTKeXIZnLoPQX1597JcSKh+dfcPUi8V0vm76hpcFyktoY9TbAlAMpLp+T4zhVmJ8fEC+eQo0835rUDLs6Qw1/XMJl04+QAZDwqocsUE1baL2/GWZoYavxTNsCIighuPVxp3jcJ0hP5Zc0DMl5ABozCU81Sli6XkXN11ZLXbugRRVdDpiDIuW9zjxWH6/zQ3Qg2LLWUlHkEfkfwOJZpmIGtrYHbBdviU7m61u7Th30DRy//9i0+/dhA1DVtR2zbKT+tC54+6QYeDttUlOt48yq0Ftb24DGwawjdl32jxbPiyT4/B44G9jpmA65JtLXQsa8OvO3UqU+w/adR6EgF2gNFGCfk7qPcQcRHTNS7rsBlb7m2nTn61n3j+jmK5eDJKtHrWs4xHYMDZzhY1NZTksaU+kWwEOq9JCdpVX+K/ddc6NZ/myesRTjlG//p+28eZzMQoOWdP1MQswEHq7uMgY0w0rsQNROIqnkwziA9bwvhoCeOCK15xLm1h+uR4GWNugxE/PSGQ4jW9spE/HALnpT5/FCT9/ckACHh7AbS9wl8XH2FASMDzxEp+4bw/mZQq6sFDGKCXR0/Fe8XHINQFJ6jCoOlAO3VWAGwktJjItO0QHgzVZx1bhPbUp//NeKhtmskcbbCMUiZohaBibWugrNh1j3mJ2Y8LZ3KtOLLsu0hnuKoJiXNetuU2gN0GgnMZiuUOYR5uti2Qb+7ITM3Fs+GvCsSLOxmGwdjBcBBc5YoqNG0pHjNOjxBdsCQx2U/15Qer1+jGu54bcGuivZFBgtKEO81MMYu4vmvdKmqLmdsuxrHY/cUOntiw+yaV+OCHeVzxGOchhKoWHY1bEaxA0Yz1v3a95Al+BXuzQcBE6R1Xf8IG0XH/Kc+ol0arpGsvCWGgx20E0bupKPIft7CYUC8+IulKBkgbI/lDw/0DKW7pHPOc3eqdgDIDNw35C99i5FhNmMtHzWYwbNZExlCPB10d3MSn5/ba4Irm1aMx/bdK+Sst9uDMpCNFsbF1Jg/h+RjpfyonmFiQ21TUkom+0VxCoHI/KICCHr/sOCepOROJWYOwYDrbYnZvt43rNTcMzt89CidXb7eHhnGl2kqx/8dqtczbwCFauW6NRWOS29cBwR/6n58KPwjmC39WdhFzySKvKeDbF6WfpS/F/hePQE5TKJRN2M7zdj6mvx0F08eFCM7d4ZNI4jNsBsVTniNIfwvB+bTq21DiOIkUQi9/wZwKNZnXl2JCKBW4h/VO53ghh4WB/3NQRmX+SaeFQ6DTlZPimEwFPHx7/vKh+JY9CdjKeOWp17ngC6Dw/STBKGaRfbjvZpQUo7QEpzo43h7AvziZpy36F8PYLOdvSjE8chpe9C1ACFGODhrei/mYphb3bE6G1X6GP2hJy1U4eLMC47OZlnsAGkL0hPoDLH4flceO4XWrafVN1mIJSY3qUJy/S2q+GxP/U3MpQQprn9ReAuABPQ/4oZs53GePOfOTZ4vdSdh8fajuVWBEkD5NtxrFejjy/RmrAFNoI61gv+RMZXMu1a1Efq8ejDSZ597RYm2+9XLKASAjpvNwop7i5saMuP7nzfMsSbaiBTMcJ1OaEcIuQEUQSJiUfSatyUbu6xIs5elEj5bGR20tEiMPU6GiIJTP2HS9MGYnBA6sZ26tbNnMLuKAtTNZg4kznoclt4naiePyRNWUZHNPAjxN6STzJOlzFkePChGo+77LcBHeU33vaWrpVMxefAKnzD9Iuey4xJ5XQY1fIbNUsiy+O2rdsVgDY9EbbF2zM+2hWgmqutBZoa+RLbwgDPPullGUgi6q5BMFsfqHTm9anEzUWhbZu8giODqVlnwseqRY+4dWMfDvmxL6XzrmRWyBvII1dED/behiyK8EIrFeJ7QtRz+2+6B9LdZsRyitHLtsdYNZkInXzYL8w8BKTH/Zk2UwITWBSTpitKrIZVMYmiOXqvxjcxC6V3+9akMUyuQsvr7Bss/60UiEvr67ZkUMUPsRdX8K8ztrcuDLAhdgByzWQPwDHNQ6U1PioER8pC2Pk6yNabSAPETIq7vVBJV4vgbZvfitCk88Fi6rqLudI+WYOZF9PNsNJIteQ4PdyeVUPe/UY9uG/alJVl0P9A1gyrRt+LNbDCEkNT8fXp0lHlYMXf0cJ03a3NiSjj8uX/xd9GVZbx3NDVbsoyT2gQufp2ZTbRl9VY8EYlVwxqX3/JjG2pWNYfnPjfgPFW3p37lS5Z/P6dJ9yBjH9/y3b4cBUidYZXd03ZC1M8r6f2G2cgy1N7oLPSS7H0+DrFh+rFAJnOl9kaPXgcLU3KOThc0uv6LfhGIDqcsA0tw3PBcRhQ85FlY3Zt91uEImgS4c3lVcvI/9B9Y5HNlUiuU0+i3hFdqpicZaBMRDjtcPIScNe2X3ZIyOTe4xV4D810wl+a7F4x4r0eAdUV+aCpNi1SIeHdjuwNKe7p9zbGJuT0qChVY01TsydZSMM4zz5Cd0ia/JkPImlIx4aHYwn1UJElr23P7khipbC92I3vuQ5KyeZTj2JTZ15GreJA9fDl4mD1zphyyonz435Fudj81sjiu/EDn5YWncZmfLMVatE84g4MwD3Yi2Da16yla8f5ouUPCIqMmbo3Xe2YR3vyz/RNPh1OTz/tAfKJ57KuEQYX/i83JpczSNfpjDv8nQIsxD5Q3oqnIQnpzogfoSMtjGhN0PhPtI+BH82sGRHbC6bnAkPKYPR/4se+9awFj/iquxZFY0SEKxxLvkbImtFwRcPM4I9+kr4jqIb95xgKrfw3S1OYFUZtaKHzQ1E88VGAbifcL+ldwr8NimFY9zsNkYxcQB2NrztgkqVhwvhS9NhCJ83cJBg3kRBJBwZwbgtnHzDandSSSltgbRrakdFQGwjxwCF9YZRGlCBo7z5zADDyqa7e4XNlRmLtP1V10gygEkr2+al8JKri4cpPFYjcbDXzCWG/VPx/ey6q6VDvbVyuOP7+9EJjwvOIYnc5CV3i+8tLxuiPew6P67Z7AgQBU4Fmc/8sSPwPkm0AYYeLM0IkQQrYIMXMFmB7bmC42ce22KY8vd/k95mHi2VWmXLSq09ZgVwlhMdj5p5mamNi0cYRCX12vg+OvyyErZ27xDWZI0pQjqS/pcXyvhTlwZabbMHIS2Hvtv3XQKc2x+risMuuYdotssqE/+H2Zx3LHqxEmOVs1siFhdeWV34ZwYww16uh4F2TS1YV3xKoa2Ed/OIWw1/njK0MBwTQWbSMt1Ncvl0K5yi7mZutRoXBLApemwl6u2q7L/1rQPzd9QCphPYjJb/wTn76qIlqQymRarPY64MoC2rsSrwHN4OGN/W9hDoBUZrYs0HWQBspyhn8tLuPbTr1KgEpcPMyBw0ss8Uyz+WMsOvGqN8Sq9XUH+Uv4r6b+LKO3LaqQ59bxAYRrTLdEHd0AKngbz3FM13iWozhcojPCsD0XBdVYNiUTuUbDWrTZoLfP6Oek70UxsJBc/iaax5HY4vK10GcT/Yn9ulW8EIdrIj5z099iZXBZvhO3yD2GMpsemJ3qjBDwkB2gNytHoz1p2gnYdOL2g+FH0e0kdohndbUw7HH9PH3tABIxxBfC7zXK+3S4Aj97OTUorKOzCJbRpUvdLpqfaRmohN/ZFTMwG1lifVnHC4EPJWFxsArVffTChiFLDX9jv24V3VzC4QpzHsyi3r6zMnoWTEsX8TYld2n7lc0mNu8QcXa8Erf/jaK+u7q4XWCtev/c9PzkrOnqRqrbvEWXjwArfberyvudIMuItpwcLKJt5AFXDdAiy/aZn1pLmNXbh17cpmXqWBKjbPXSFBhyzOXK+o/gAJtjdgTCQKNQnFmg+NLtlD98gmdOBgd9Qq0GTiZAOynh9OPod2/Gu8k29SoEyt6e4QfnKit9WiKnidG+eHH1waFGNu1SWropgmVSr81r6bQsiEj7iWkxAPEU7pHq6PUfUAX6APgvwK0pVNNbTIo75ItjbufrkuZbaHAFjZe/extRiLkBfihBHkWh0wZiLME1ojDkBixyCX4lCpfaAE0F3IuBBS0ErUA6MdBZC3VRAYZUE2/jBgUIAAIAe+tTXnHuERbzra1Z+F+8KlSDz6OgIl88Lfr+7i6x70CVqC4JFrmvLpcO6StBcg+6W8FHYwJM/Rh5lbH0Ob95GCoPFVHGTWfO3vidxtlMdK2LAPshGI4L5Y2zg6AXJdVxTza071XblZMTQl36mXTdAxrB7ln60IvFfgNnSc7azCadQ3WPHVj9apqsdswIARI9UoIYNA/uMO905sexlwVjThb8gxPxYTGL83LKA/O/Msy4OpgEJjRdMLfFxKYHcK52n3Pm6kWfDJB/B4b8iTGHBQrFNl/mReSj7kY8D+IlBGPibiPK8cemLaQDMK07rUJ5f7hO4XVQ9poj2Lw3nMZ0ChsCH+L8kmoN+pGUVP5Rri+1yfbC7eNDZ7pnjlO+CDvLOZM/DbQ2m2DGd5dEb+EC8NlkI64DtUF7GKHpKos2EOAwdr816th2CX9JJB+toO7DJ6eWR6oKbCzZEy2Ke4aobc7+iSFFot+wHXUhITu95OoI+VM7SjPWAg/GEpKzY2BNqHBt2L2cVKfPFPqiZTIMJ9LGf21aRhr8AQC37TGgVpAHRMlw1AIoz0W77FrSGozHiR2hApT5JG3mfnaNqwP+ad67UidVJ6S3DTIbJyv4o+wYfww92naMFF9CVOGEzjYInPoyDkcSksL8qpqHS0haYv4xKixl+Ay47d+QODoSyVcOq7L2zqF7C0wVsZ2baeMgkN6fxZ1XZ67vjKJYGJln/40vBrYn/HRqb8mPMlxtd0lrpejlOasYESobHofYfcufw8jjW+4gSzStBEdRFq6iIJca894w2pFich14Pg/y3vJ0cmYrrHyTHDuNZYjo6IeUYyMLSM7OMzudV9neAXgxO4SNWXUuzi/sZYqA9VXPOEkSlkMSqEhH1iHxy0LnUb3a7lL4HMK3HnXSNhVVJBSV8a3lJbsHoPdnn2cuO1+2hvRsNz0svDmxBCvIPInwdVjS82YBVt6L+D2NUq+b7fdufLp/DTRRo3mpS7CGKG88vPtc5OUmnNJRExtGgEXuosZc9LGq2ckdQrabxQqC/ullG9IjfT6HQ87IKiJ5LlWPiZrsY9bMrXQ2P3e0lW2mwv4Ti8DCmUUVP3wYsRk2cHRd4rK0SyNF0mIvhFcvC1oV8z7j8QTAe83JNfLcAXRaknPpAVV3Pxq1V0Mv9e9mQBMe01XnbUmydwlVqGSlGae0T9aAYOoPKR0fnXFlcJ4iO8vwDjBtMENE8UeeqLIUbbFIjy/LoHlc69kN3oqEKSVqVJx4xw/K1StPNO9xLTulCxX3CIkSHYX4x6IbNCAIaiui6qJx8CdVmagB2GD/784R7dl3zVCtPyCy/uQc0Tw5Ynjy+PfGGB09MKWHXp/X6SBbLSkcTkLacuTOW+srgCO9tm9+XqIpMVrQm+kghmEYxvGFXErUzux1PvignTXCIxViqEQRaYXX6MVT1n86DSla9aJ0t7v6GzjulLYMwyejw4+J60yws8FJW1Y7OXB1zmuZHgltv7BdbBjkOwnjeO+wAN8DFCajRFYzoXnCdGIvTtIGZqJvQs+57PuzNQ5hFG/fI7fB2obkYG7w7M+UoVXjXkwBQxGyb0VEdMuJCav6F6f5n+A8Hj3M8TjibNvwMq6u2h2c5ZfOO6vhp9zw3fDnO+qWRmcGmUMgTGb13xzy+mjK8p3FoLCgJ41uiAaN7SJzzshUeHA/1dQYebAvan4rok8cqyqJVfX7++h/sKrN/x76JZuh/A0ESjvxhA1onBJcILkmWQ9A7m3fAHkkTUxd5noIswGafj301NIp880YzLc9UkmAeWx2a1wgn3N4IxaaF4YiPbnX6xvttoTd8iKXMNe4Hu4Bs1MLa1xFZzLrSshm46V1Aqs+/wN3ODbLrmjRqYru6gxdZsZcOwobj2+TVHkDG5kZTFVPVvmROQPhER/3qeYC9YPLwTJZayEIl6m0umub9teKP7ERStvAVtXQC+IBSE8Mb0a+j0uyXRV6lWhDH+JGqb7PpUTijp4HUCdLReVTSHqG0vQWj7U1KoCuvw9arzDxsfLlu554gALy+aZ0Gpw/FzIDejFuA+gzrSEPeUhXLNS/14qieROupPkPbUub7qs3mEt6fW9ZO67omp9+yD0gEIkQgz9UyHnVjHqU3ql2tpB+thFEFBHq2FwLCe8Q680DZk08QSKfrBvENyLPLFP7pYTsFIneTB6oUwxpwGy+QnePGXUfxm4VZtJH30isZpC0q6NF/0yV6K39MgT9+1W9+bnAcDxnhMgfed86U9bLHe2lQruora1gPKO2w5N5P3/PEuCwzb3k1jzxaWFqsUbMgBCdLq1NE6+tj9l8bnPPeUicR924Wsu76618fKZJ2jr+H55vmjAAKiMmBgy3b/IxdSZV0FK8/eCcQreFkP2Dz+2WqkCLlyX9thB6GJJO11xMqZqrL45MCwZ3nQfyFjo++LcnszXrxmu1aH+Ovs9zpdC4sgskshXSUnkMOeeb7OWp0EgCi+9abhLomSHGoD54ogoj9kNUQ6YCrAlJSMG7cn2IH1WTcGsPJrTCzAhAaorUDqZbvyqw2AdENZxJIlCDE0bvQDbeTsA2Uw81cuw9l9CPGjKnhr3+vx6J85lCOV9FJeeAJkDjxWwVYnMKVUHWQGWaPfUpF5enedxC5VboScKlQf027a446gO1ti/5PTlJ+uHsGz8nGsufADS5mfcBvutS4FgF8PJ8p7Cb8EMG0r1SrpprOiLDPS1/KJpJ0XxGn5wTzLOrd28mjFIpb/Ftw8bWD/Q8n2EYhuHL7WnEC1YcPspxiTm/hXPq/TkO6Zg/k1WCyH8iLHANq/9vl6czcXzQloQDI7WHjAstH2EaTU8xzQ7KgkO5Xm1f+aucUp6rTv6GMmGJg/uofELkUzr0ent7+IyG9LMVWLiBhH6tSd0FdwjeX2DdzGaD3rCxoFoITBzQoWrrxh0gDP4+20oI7/MvHGAOwrZwwX4uoe1xzzoYKg0Zzg6bOO7Tu04f1DzszHSkVeI94YaL96Cj0LDWHfr1knGFf7DCXdUqe/NiwKio+QuPUx1eM+lMUiWYTlnnSWHjX+WE5ZSbTaYJQoPSBuTGl+uxhWbfVy9M5Pi+7LODa88UVKc4c5p5FIfbdx+HqsCHH5WVQk1NVINot5z1V0RdcaJDuDI/tR4AxEOpiGNgWol0u9ZcqJEnXx5U7NsYobpR7Z2vR9/fo4VcIC9JwpLAdbDXK1cyOIPvo0QWLujFxfT7P3NacEcUUIzgPt2OPQllloj4ACbSESPhIdUXXpkyM6vYWTHu2GOrVgxGS4ZNvYoj17vfHh1AnXNfa9jLzNfichKQZDpcaQcZyQVTyxFiVlVUweV104nNhIeYDR9GTk4+3YHZhQrdmenN0N5fOHzm6IQz47Fb/yIWIriUoBb5sN5xl+DnLjppXxEviYzS9EiqIeI9l4AhHvjGIhrCO56gew8BRvrj9kRlFLNI+6j0dI3tPtYNCp/uFLyKLyX7kXVgAudbTb0oW7H8K1yJjpRkKLHQAevABcL6k0gWZAMuOpbmjdIbHyxqD6q/KldrYHPSEPweR7qXvDp70jm8CoijK7ZbhXD4v8ZsjuoSurUZN4TydxQEldaM/QNjYkxQ9K9pm57YsjLH2CT3hF9mCunn3j4vio7lqsOBH6WVli7R0fvrAmHeHQboaSszBLHAoMmVE3a8ITmZ/994N5v5CYKhTDUVBxxJUcW94pWxDTlS1WF7+RfT+LkPaiysrjltdqwa99G62y+u+k1A7Z1v9bMFl6NGiIV8w0EQ6Xd3/zGo83J0y1Gze4hrKk+Zy+kuT/L6dcAfYF2zPZS8mLqWbiwiBlN97CW/+idgYF4T31K/tqq3UpUAeGINscRH7fqlvC7lf+oZuEsgOYYuI74Es58m/cfAY044DQFLrsNUlVUmWKEypZO8rCEpK1L06WAJBir3ogl9Y8Dcfh0l0WqbuH3gD06yBrK0dSSXZjMwId12PN+8vZb7fR8OT8sob5eAUy2yc2c7lsqKm/itqRxDeBUE8CRiQau7hoIMYsl2utasciSJDpJt4ayKlN09YIU4pCsQ7nz+/M8V8nCAP2lo9QjDsSPZRTkrMoaa8GpyJCCbd1Yl/FT26lbsRtbRLB43kPS95G4YhmHYMSU/rKMadbuI+3TVeEQ027j5yqTfOvsi3DKrkvw66E1Wm5PhAdPhm0kKFiY7EB72EpH2z0DrGhMTJ4G7OnxHB+i5kWC9WrDXF9Be7jNYEiWQ+UVKnpNVWJ1A649ZcE+DUGKFEyCrwcZJR1KKmTCozFnof9me5t151UUXxd6obxFvpW87OP0PDWI4+ZgGLOAoIwa+GLvZtE2qGPdRt8XS8bQYAg1Xu6coUONNtG35gbhMNBIVE7FgJtNpF9BkTAN5YcZLReuZLhroeL50JIdGcHh6+EWR2TGD5LHf0z+52vQuVMFQUVKzepGpTX1HGcxXShEEblhASLDrxdMaOmK9POKBRSEzR/ZlnyYkNTtoRGSA5dv+lkUBIEg8z57qs4gEKr7/FOXdSvN/LQafiFO6iykskDnY/aHn7sk1vzSU+VHlcsTG+j5u62schtRRkkOeA9I2VY/sRLYHioypqZKDpQmMeB75fWhe3zFPIe183sRgnP6TW5nKTrP0NTw2qvbnNKgb3/HUPVRwMnxjkAgeZDg1xpvA4rsE8YPSRJqABy4Tpg/pLOJnwMzMTOqnQslypUO/aig8jsDx7EZWsfD0DhQVD73lYh7ix2Mr/v1liWu4g4UvA8Kupab9Qs+W0hFYRP5FBAgcx6rQbO/PIAND68RtOGVgjCm3dojPb5FpSoaki4fRU4+sDLvzASJPayGK6i51hgPD9yma1c98MF/QctSjO4h0hCsKYYQN0TyTvQLpZbyU8iSJmWcJcWZ+6+go296PqH+jKkKrRWfgX3bKN7ZS1c0doOFNiaRF41EzVHHE5Rk8w9Sot0Ypm7VvNd4lbnmrPeJZHdf6qwCBKEWnmchkTCekm1z1fp54HSyY+vT1esZ76jbscnMSBVnLi2KdHU7Gk9RzpDRela0bve6QjBgCe//pdWqwzzlNOA34J9fU+m+B284XWlqyzFNoKqjacm/P5rZCanEmsiYsnB55IjAikdjE9aNa/sW2ptzSEEJVJFnAamUo/YuY6zr55cdp39Wy1XupgFotC0iuW3kgbrKE75Tbq44WCK/7ThQ5fmBf6zpnx99MyiKjseS4O/1/bnaVYKaTN448oHdEeoXOBJrkMrfqGycvKl4C9HcYsmWn2rWiiPcUrygSf6GZi1mGT49vDobz6qUNENZCyy7q4UoCAGu71VG5vfklYAkiCI/Q9CDE38UpBV+k9kpgJIeDdmRyi7NYQGEivgl3nBWHfzQ4usFf++wD/s4Y29jEOltRKnqObm4Mko9C0W9FlC45V5QLoJv4rQsTDuH+0ziOOlYZdsSnymdGpe9C7vGk53xwmt83T5/3uq7iHLjAehgv8TcvNEoSnt6CxJYYwzAMUz7FM16YlXhfyoUSwSKoIMXsRivgmhABPE9euDxk3vEqjurdgJnxKq+1hySNeg7PXu8idVcVpjuVc7+IK+eFk0rbo9j6f8Wi0uo4i7Z7BsvwiVb+TpseHCS23xaFn6ttlErX8thwB8SblhbzITJi4SOGlJszwf9w3zuNSfvnpRitkblsBUcsi2vqXMQKxQC+6z1+4NKK2dbIyO3hbubRAgzaN0l/flFztOs/7vB6klumiMIvjJqJ+RO3a4fDhPjcEZQYYx19HCQcCElCpOQ+dIbZ/3K2fa1ReunIyH8Nd6l4zSaN8jZ/euyCTnjOnaOfHEmtIRRiK2cXknYQXZ4vOzByXjhZAnUcRdKBo83S2yaDdO5BPZPgsFYdBvMmxlJTxz88bqqJuilky69NUiOLeT3taXuIm0pfjE9mwUTnHtROkUti10bBg9hqxwj4wa7xKT3SWGGKQhsyzFNunOZ8+rYaSoScfu/9BuqTUkt6KZdUiHSw2psmRYF34EuheUxiYu2h+28Wxch+cP18553A6PhoMpbVABXuCdE5BEDmSkQLlJ8ztUeV4p5rc5mswHLwbzxGiWeL5otgyce/GjDha3MF52QbwL2M8zlP047lcnpBk2PRf0V5wBV4i6t0hd6DpZWzOum8M3G6DBMdFOUGLX4ExCcSeocP+ejrsVcI1nxcdpMWwpB5x8veC637BgcFPpcquj9+rrbhj7IZjyGGLqzuYGGOmUcLUE1rtlmO9T+Xz9VAyTXcpaKQPO/yw+Om0D5dD7UYS03tyh46QCNqHCfsmFJHmvPpm0+HhINkIKGZCn13I5grEU116R0/fpX03e/kDbgVeg9mcyhkCJ9ZT2iyO6AYhhi64NPgF5wSmYLSdIvlbJOBhAbdZw53wnt3tj9L7vMJ790py8prgyL8/RDtjMLBmy/k7U4TUBVne2AflS5Gpkagt4jqgvW5wctVeD2nzHwKJ+5jyHrJ/eYLee8azX3NfoqbF+vmxhp6DBIVDBnUq5tT1cF3tbdInhraQ0r2p87htuAPl6eGNjODtFWHZfb0xyKVyDpsLOAR6C16d8lLUJHCvjcfIv2dBy1EjpcRwMd/QZKFjtBU2562B9tygA3qguY2JtMbny8SIB4ocnlpnpMsirkd6qKVwon7BD70VkiJZFGLyzhn0SNRBYKh26exzUDwIk6/7WaMhs19zJf65TceH/IDf1DanH5pC0lMREPj6kIQkM91vp/i5p1zFJ0vgz7nZNINSWkTtY92deGk6JK6Xf8cDAIjfddK8e07143WP/zMcGrWdJ0MwhZozK5mgI7FqtDjfJPmVHWkkAQbFkdNznTrreEexJEY+jyftYSLiL7HyVyAyTAMw7BDbgTCZ04ap32w/yDu8TouXYKuGI7b3A40Ox61giSLAhUa6dX7TSh7T5uzvuuhzevRVQ9I1XyI1eJN8UM7J4yij3iGU9nuAyHy7aTKtZ9laJLxJLJfcpaF2GBe1LRXEqUHs7ndo9d7vvm5Pl0pGocomEtPAQsCiFJwxq9E2HJe16tUiBHV53YcsMVlS1V9u179D1k1jy7GgBzRl4ZwuW+r4K7gniO3ocnpA0YDbkTXpXBrRj6HzHmPJ/PtiUIJQlFpyZL6WYjuS0vnaOjHRoFVZxQa0rmfW6aMvPBOPJM/yS+eeXXRis4DdVwUVoAmDiL74uk4+7onHZnYZtss7j/xmsy48AzU2dJnIBtZICYL2zsE6WhJTygWaJkzZ2m8yHsSSQuPNm6VLWBI9I+/wTCjCP+ikt9r16F1G1AbccFwsBDsISadadOZOzZEjJ5VEhi1sbnygdW7R9e7PqBqB8PvXlVJ6YgejI6j3apUxLdqwr9BL3kOVpgLrUBSntbwvqL/FF1p/D3D6J8MljKSu29G0q1gZxC1oXgbBUbcqVrSffKgQ66U13yIxOXq8QXNsNGsL1Y7WQ/Jik0hmnEUWNUJogodKjtDXjKOp/WhHpD/FwydeaDjiM5sU1/UiwP5D94k/exgCKki9RtXYyeWZt5bNjgVeeRvUGndnPoD2eCtrqzdyjUTDByDsx+XEgN06UM5lDP4ifigWRqK1dtmJgz25ngG90Tv85Qt6iRcbJ6l3HfoxG4BcxYRJWGeUASSJk1tdsEnXwJdEk1/irjB6b+YYc54rb7HOfMYI5sIPjGMtyjGG2DXlaycd4a2i9a+KB7+TYv1/WxVQJ9TBGeYfFsTKivIMvNylWHBRn67lqHzCaGsstttKSFg63bLlZ4YgsWgyBJsQIhu79fmqDTaRwFBvhXaYCiem35TvXD58GYEBpZEDZT5//O7Tdgw2WjjfqvTF93INz8DsGEOVn9PoeoMzL7xK3erZDTFW6KmUlgSFES3Q8er1PxpH+cq+oF77J96izcg/uuxgZmV0GdAJAwb0nuGPmfs8yke6SQDr8CwJPXtwf5CaFPOwjeEmEJA4sx4sDlmWNU740u63iQC9rpAooBudTzEPGdLOJ7/GDJMDgrUG51ll6yzVYV24lWiLcI8UY8pCX9ImBxPAXOI2bUGNO6nJ5P3MjhZg5RsVd/24SIxt0evMkQ4HBDMbbUKQnCGyhKDooruJvj0qOHZXFWefQvduKpCnu6IpnX195F/Q9CcuRQ8jU56il9UL+p/ezvIDNnP1C0GaOPSV8+8o+rj+r0x5lypZME3XaJ7kUYX/MZ4Rlu4z/k16vEtcjHTdWSCN4OcZlPPP3w+XTQMwzAM+0wLymB+kDeqdI+DzGV9wR43RzyeWeuK6L+ZyLemezGga2GUOWJxxIvxjTlDBkSOgqimz63YyTVn4f5QoW7mI1e+6r5AV75YlbDQKn2UvrP7maRHstEgJ0UTTLsKTB2NT+M9KOTCtLbs76tCaItLINrYo7wZ1s9LXF2uaQmwhPGTrZsF+aWaZTU3dvm0QPYP0C6ObhsMEfQQF0gBErdlYuIvnf9x9vwJJGkDa4QV2PJcCOfGByH3ZrwCi3rujqfMuCXArALUC3bJGVFDnwywoWzMXH38NHlKq9pGqM0dpHEXgbbUCkqspPGYVnjwK9vOcaA5r9+xMnUUumzwMy0oU4T9TKNGFWX4h/JWWuLGKMup638nJILiV5ZR7saEisot6JGpXTuQIs6/nXQi3sjeUAlKNaCLsBgr+R47nevPdUgw4Crlbdl7ld+bQ0QX3E7vVgJvnvGix0zzb/Fht6OUkiBQaCPCviFpQxSim2Z5DEvucFfmpDQWkQLs2gd9/H2sKmZC7MFG7Q+bW8ajjU425beP+kFvduKqOZnI6B5eNgmFRGm06Agk4irK8ASyaQwuw8Pt7wzzpA2W3rNwQEWtE/oGl8IlfPN4dNKJGoA904sKse2nU7N+F+Q4AId7Z1Vtroh2HUX52Y7d0JJiSeACFHMzycD47YZrvXv0iflB3lg8WuR1dxTghaHWiFQJdcD/DJ7jjuftbFwuwTvxrQ4LRl5OwwNfN4/5mdhuS3Bgh1vz2Zn2vv2ZRkxjcdeQf9k8BZW6DK7lMd90yG4zIbXMAdAtIYFT9Qo6Fms4TD386tk616Dg0/LQRAVpLNSO6qQ+/H1XT2NICNypDVJoWolwg+gLGtI71Tlkbl8Gjs4yfJvAP2N3SXuyh/Kljpflzpt9tEX5DVtgcp7BeSyyk2yOAGW8ZdD2VEi7p7Jr+YYkIBheMXK1hHQr8L4t4xVqHB4/P/o/+ZQWtxyMS6ix7mfA8i2gOFO9WlG5yr3y+wuOXBqIlAe2/ZhG9jcarqfSPQ6ck9cvOnQnp6/2qrFTtPZEMSJusOFBR9xagCm8OJO/DKg4sBdAYbFWNNcrvqQdnH9eWj6BP/0S6a37D8WI2fnB0wtnzWKYiYWE/WPn2i1cSSonR9OXygoT1xlJfyZWliodFzEE2LDEgy9ygZySMFBv0IbSlGBFLPGbBMeKuVW6s2hNc63Vlja+tRHuBWTkXsnfrbmqvkfAIWzf+XbRTCVCsvb2rhMuHMbZeP40u9jN+moC4YBWX9vItuxEPOexUNAcxLbzfA7cfO8V9yfT95eHcTzAa5GiyiPa0yFheNFFl+lL6IkAFoCJdKVSYeR/1e0eLVscf8NrhexEYloQwzAMc+nvnGaL+imHd2bg1SNaHP51RfHKmMFgMZcFdhURpFk0zQmAlpNok5oF2z6iBu8ARk17glZ8Xf5mkrxsFLBjPAPdaNg7IahU4Gw/VpQ0+Rjt/BLVWcaK4lColX9ZuMf0o7tCIvrAcIKXLJlcJR3gohLq30Pa83bcwcmr/GXMt/9Y0h9tzvXnfOaazJjMHfDtOgJvzSthSlkKjaeVnCaZDJUQgem+3UN0Vv7GYgP7ICipF8l171howteteyP9o4Fd66lV/YpLZ3B7N4+lXUPjTR81zKl26Gglndc/I/FRDQmEqZDFPuNJ8nrFVhMcAQZFygxCU7M81OPa4lk9Or1uYnvWYsPNK6cc0mUyCr0u8iPb8W2Nfc+UjDk5nyhutci8h7dPfILeeomjIZYUBRX63EYj0Fgs+X2U9aClklGHyRPqf0S9nDi+rJUTtgivkOM9DJo2OFj4FMh4hPRFzu/D7OeJ6HDdcFigJDOfsmByfrALntIlqNEqNqTmJYMOqd4F3+Cbk67CbWPNOsD9eQpuEzI/xv5C5Wd9vd6yfd2EhwKvpO+dGqpHnALPXDDqSwkd+QXPjZ433vBs71ZlmP1AM5sW/4Iza05NXCWLXVxuaVJngYXc5Y8+6Nj5MnHR1WHtL/b1LTYe59gdZXdVqVRDrapjWAmSjpnVbcDf811wevZniJdi5cIscNjgIZVhZ33igSylxBXNR1Tl0y8Ep1lIBausC+QSh4tpbY3Na22VzSVGbSDkxCc5y+kBsU4I7VjSwNaf9LilqnnATQe4ZnQqQmFbJaRZopE4pqh1Ksc99AU342nYBd0Q+0grm24xOo5Y4X8LXoVIPa71qIDy50dHytZxXE/8nJySFdMEQlCK2o8qcVYDmjGshJQcpeSfgv7yZkhm1H96BERSlq2YwJLIdOcU+5TdeUoYIjqNGrzw56/b+HczeKKXJDigjMWeJ5izqW0fsPFNKgQZs8ZJjxjpVEYswbjs9xMk8M22OsHVQHn6LampDGYQvgWBGx8v4leY9N+SmtCvoC7wAAjyAng0HgSSL/eur+5yRuB7dJM2/l6D7maSIdWMlWyikTkFNcES0HIFguCZN/nBpd+4o44ePqXkgt6fEceCZ1pCVBIDoh+Y2w3Tzvzg5OYX33h8j6kiEsE/IkDzGtXoG/pEkiuKpJQOkAS+1FHEVvfV+tMp6Pjt9XxpWcuZelC+Rp5pKpfpjWXSy91GIF+uvskTK1DnChMnyu8a/mxiwcSkZKXfCi7MIKbzaG4MwmFYEUSElLbZbJ/r+3TvjXZfAJGjyjkeS+kShq9RzwcjKZHCJQ+2Zw89mY/DSZQ38sDiPGS5cWhDXTK/VU0ZnqR+xTr5yzAMofbHlHrppE7GlHBJp5jN+H1xqgbK5HDppk7HZHMZoRbOOHoCpegJsz7coWZNO3iSr6RKO3BCraxOe3QRpXo0BKLyAidm8Aq3zDJnuCc3PuBMofyDpyQ4YSIpk+AblsYj3qiVK/zIHG7wE9ZZIATUxBOUjUpF6AjIjDAQsiRCwa3JmhIalS1lYofsKFt2WVrKnpXJIzazVnnGTmmRIy7SZulxDQ8m7zhjo/KJG9lCX7gJj1kyaaAz+SFVnlQuqDteoEvqgZcsU+qCg8Fx2jHh3wd15BJv1A2X2X9Sj/zF/6eecI0PpIZv9W+ULTf4C9aRs+wvWU/5Zb4jjwzZvZJ31lt9pC6YZn/FOlCo+6QY+M5ovMp8q5syD3xmd80sPDi8DnRRpsImh9C4CttnAOVq/HmCV0DSrxxujRX4mDekOW/J5Y1Qly3xM/zfwHsKOUyN+0XJwSi3pZja96czqGdoFXTp8AkX5eaUhsNbmS0N1n2r3y2N1gl1AzGY39ndMsUPee25bjhRv/HH/KeuCk6T7mSre777l3Y7P+GalwcXLd7C680jMf4F1Xb+GxleDt/um5zXAQAAotvcVpSyEOtow1iKiW5zCpSyQCPaNBBwmwJqLgcjTYyytfeK019NfAoBO4mQjRBlOwGbA4boXtsjicIyeN+gDYHf+Hd5JX4GtaORnlqOF7M0gdJuI5/Yy6ivomo8bvg3VrydZNwnX4velhMUUxFDn3wD41vR9WAVP4D/mitcv/Rg3X8AqrmBsB2Aaz4B33MD19sebesd/LsQCI6sQbSpxNpKcldL/s+9Lms/m30Oc2fDp5DHxedHTp5PDy2W/8VW3iY3/pPlqX0jAE9TTXJMt/9TqlubXblp7spjG96ruy9P9GMoFsLvvH+oNr839tVx+L0wPlYn/Iuqw4FfWsVTvblBTwfOMtp5Oi6MeolO74+f0CCz9eYd0bOK4c9Mt+HkugigjwA6Q3CtETgMw7kb9ar/MWz46emyKyDxDRAUaguAKSAkA+oTnzn8zDGfKXvSQktkqSZcI8O4BMYC4i0Zs3G48QEiVYbxyzd8qVnSeeRzUwfrcBftQpznzZMXU5Lbai3j21U9jy8OydyNy33aWMXeSTmvtkiu3B1trtJI8eZdNc+aJXfu+dyFvXWsvF6YzCvMk3/+kdyztWWc+VbPf6EyBNKogmOdCjYNKthUquDUk+rNCqr30UX1b+DMkgcPfO7Si3WUjheaeZl58uoPye0sLeOXT/X8x4DCcr8KX9sqPO1N8QZzi+TG5Cnpf8ot2jNkMmZJnMot9LQ5ZCzxeSWf+3FVJz+erGOBL465hXBhnHfj4q+LefLXxmqeI7lHJ2Xy6MEyrtUWuWsv6nl3Rxe148UuqTXSvIzLvXtXJe/+WMU9a5a7t1TOu+fjt0+L5Le99TxzTHNrrxemydqvFP8V5rn/tqp5/0gcvJklB2vLeXM+d+5bnZybWH9B8il/HUgWC0QZo91hSZSrorPikwm6oDF4JkmjUv9i6liW5mVpfx7557ft19eueZa8JkEZWXdYEs1V0brjkwm5oNF7IEljqY70ueWRjVeE1zQfFmq7fMHFrR5qZoE7ZqHIMkvKd//DZzoxGKuQvksvTT1gWje9jZZXwIx1ffXd5jOmbGDzrS73jfeCFb9kSai4gkXMPFwYP03DJuLoZmJD6bImcsF5C3NCVVCes9fw6VyW4HLzWNut+lb3tq+9d95w96k9kfA9YZmZN/8Gf+kEka/VAP8eJHvpjqN8X9iXiW/zBRvZ770qHMSHf+ll8iYV+bc6wxdFfd9wwjgxUSUMuKWpbpZgw+3Y2R1bxfsmFueYY0cg6Hh316KAwgkcmhP+fRiqfPVQ/LJoQBGlgg6GGQxwpoIpQblFOlzmACfmmV/MiGa5pUp02XnmiZz9HxAFACCAInMWjiibvBGcyBYsObmslI/6vLJTDWxVQsG3gR+mx49tow39HaDHKyck0KoTUgCtBA0OTSKE6ndCkUn86qzF++iFeQWn5BNckbGSwuxPU4cYTnlABpyxhUZS6KCCWgUCcOKrWwC7BcZ/W4njo54lQfXZ6/iYWBWELTHW/9JaJHGt0s1GpgNi0XoVYLNFHZ8Du75n765qxP6h5+/P5VuY9mvVKx76T7nIEJRW2x3d61Lz8EXduvpFkQjx2UO8Y4BK6jThMqTeWfTB9IbQ29NQTLd7hsfqPebPugkGxEH/vyq+x98s2xizOYynpIM1KZ5DffSGELSExLazuMfp0xh6v6MrBvVVJ6emZ+lfV3QI1G8hfwEZ90fPlr463KJJr2uCWvU46umSWLbZCPsnDafORsxmEcdfcbmnLPXtamX0Qf43fXREf2e1n+kku3AmC/Z+jg2qKazU860oEjZ1BSG2i+XDWS4mMMfnR8Macxo+F/w7ngls34SQxG05x/4YnL69y2wO9cacLwi+7lwByaQq66ioB8gSFb96tGwMzpojuq+f8cfChoQe5R+teiKHL5XIuX/7bRBNIz+s+FKX8SNxqTNSg57RMlbJA4ahCtn/hG37IOGP7c2ERQwpDXqL1uNBfkaMCeoGecK8dhvUJ4gzOGdUILHDiGhTVsmK0aAOeHKrK+a9e1HvEK+wRVNYvCKVQu/RPiGscAqoO8izKceIeoFIhnNr0rrZkTpDn6JdcC+nDmNEXUIeDT2hvkHCDtvExMKOlBF9a2rqj2zJd8L4Rl0Z0ql57RaoV0NcxLlH6UgsDId2ySq5w9ijPhryoBx496gvRvwAW2OKS9iRaoD+ifYF4Q84zVH3hhzU7FiingyRlpWOKdUpI3UL/QLtB3eSpxhvqGbIPqNXqGEkvMI2CotTpJygP6O943G6uIJxBnVryFNWvbtQn424Cc5T1AdD4k8YK7RzxOQDY4OaV55cvGLu3Y06KvEBmzOxOEOqgH5EG4ww4ySoVZHnaHasUM+KSA/nrSnVqx2pe+iXaEVnyClgfKAuFHmM6DPUSUn4HbZvYRFI2aDvTJQelnyPGL9Q14p0g1q7JepNEdfg/ImaFImPGCXaVadLNown1KLIw8DG+y3qqxJfYNtLXMqMVAX6F9o/I3yH0xL1oMhhUI4e9bgjkjjoH29KddyROkH/QTuZIXnE+IOqHdm36B7VMwlXsL0Ji2SkHKE/or2afSquYFyjbnbkqTX3bqE+ZeJGOF+gkpH4D4wF2k2nS24w7lGHLALz3v2o90x8B9vKFBafkaqD/o721whHONWou4w8T8yOM9RLRmSK87No3WaknqKfQ/vdmXIaMf6jLjPyOEFfo75lEn7DdqZiASlBV5PGYzblNMXIqCtIF8yOc9QrxIHzEQWJMECbrKySW4wW9RHyEMx711BfIN5g25jCElakMugD2qiEDqeIuoccgtkxoJ4gohz0zx9J9TwjtUIv0L7VneQCo0c1yL5HD6gBCStsH8LiIGWG3qG9qcfp1xWMKeoW8tSr3p2ozxCX4XyJ+gCJO4yEdqZWyQlji5o7h5sn5r17UEcjPmIrTWFxGaki+gvahxIKJ4daDXluzI416tkQGeC8M2mtGakH6Fdov1bu5ZQwPlEXhjw26HPUyUj4A7ZfJhZRpGyh35kVHuQnYVygrg3pCvParVFvhrgWzl+oyZD4CqNCu15ZJfcYz6jFkIfCgfc/qK9G/ATbk8Slykg1Qf+H9l8JP+G0Qj0Ycul9yFgHWMNremxxlm7KwCxCRsovQ166Kf+w0lBD/lJTqm7K87LCDJSYutTq/CdJGdFypoLyKsi3bsqFmtMyWfkq91TW/OXLgZfn3apO6Ka88qVTjeWHMWfJkjlfDvyqTpf7bso77zmlZCifwrx1U274spKEueFt87iR8U9WRvQ9os1jNvyksrHVETTkMH2lWlBoTUqIWHEgZY6RRqDP0aEjHdDYHg01sTUCKSBIDOryaHJH5YDG95gQR/L4Rcp5rK89MMhxgJEqciTCp9lcMVB5Ve1fQG4E89+pUzCkHuKD8La+QaOnJk8tNsnT7WsxfoBz70l7LRlsMXLL+GNNi+EEHn4NxHBreh3Z8iV5IDDV7AGszQpABfQlAEjLLSSnHlyJjbd5oeRMPbYzcKyNH5D/gfRzr2S8DpAi/WAcqxduQDmHuwCixS5+3aZfDARTCdqxrW3s6PLQtOLfKLUrgR5F8D5n92bMLwOSjp0UTqRRD1sAkDFGfPKXxkrk7lsyXntI/ju49rE6OjEv9yEcf9w16hR/oSsPv62BOuKv5tfu28/DwypFo0EXl8cmf+cxfWes3zlI/4Zr+jdg/Rc8vf7eoau/F8ifhldnbfUGlSU9xoHsdQ/JoyNc0eFigYgLXf4f+fV23DbRKPNpKW0U/G0w7zi8FOWmewz6vIm+RbG5fax/d4dt33SIeF4H1kD1QU73ug7zuoi4f0/L+5/ji5ht+I92RZQP6+x4OudkGjcds8/y9XtJt49Ylk16NqIxFvIi23TOH7cv0T2GbOXzyBY5jc6AkCUSNoKKCYMH85zXFM++x5xC8BFeDtaKxTNjIy7YtcvvLpzlVEh0WUwOgwp0LL4yayLH4dMiJBAW6E88p6mw3t0pOoRvTqGcvkVvozezvrn87TuSRWIoosK2feagcdUBci9Rn8Wrl+OzDKhciGukY4np9U2cxi26Fl9fO37GDmscWsadjPo0izrK8+jn2B64QhL2s5NXe3SOyoffPqk/W9RcHh1roo70wh5naJGVGKy2fOknrct0Pe46n2LHoNE7NStZ9i2nsOZnOs5Fh3phhO4iynLlUqHfWIO8PqqhzCN0wLMiLISdXEIfmB3dTjpwbA430MHerRklJdAxFTGM+Jrt5KYOkrKUGNGMbyAGG9IZ19L7F2ogQi5gOuO60zKr0ZvqVmvCJZ4+WIuEIGwY+nGfNMWgfxU61J3RRx+skVAJakl5MJuxRGLIe6/qzX9uhzmC9NtrMWT6b0kzaGmTDXuqGUr/w+epWFCLXpAKWsH4RrOmvfzT18jaq4SPcLRew6uo1wM9fEh9suu8WsSbUdGXx21akIvIyrnz8SwFH+hIGs1xURGIo+rN54xZdr1LhlqWbumHAGuscbttFikV61FKgrDaEMLhAw0096CqjQTKAfBsrnQylmRBtayBq/mvM+XbPKjXvcv0NAnL0qF+J9pdpUWlNUbCjE5cqTUUliSYv2yRlP0UUGYaTge08ZwR1wR1kbGLa0DdiXfPkiEZt2lR24uS3rRHrizzQ7ec2kSjifh3U57D2tihY0hIudA7O8uMsvbDxFA8Vck2NaT7zq3odlNOl4/I1JOyskYIy4DM8/RuAsHhqnhNTEEYm9rDwFnuTttHW0TbVsY0lZIs0H8CSDvtat/0ES5wJEVU07oQ0k2oVd+WPpcNCEpYuZxa4tD1BnLQR8paqrYHYVHGazvrChhXIGmPvwSVjg5dMkDmfAVGltboqqxK1Js0TBH5wEXCXnra6Lv1Az6fi5YFxcYIGKQNJ2hy0EHZzy4sUXtZokmP/7bHRmHvFs6PKwSf73R8l1KzmUhsxqYMVZiSHsGydg1xOt/u3WgKSNJ2zuLdf3y72QTV+qXtUq3ZWKbevlU6Pi5G+yumh9bJ63ouTsXAbITa6HB2UPqCfM73B4CncI9c5Fqx6U/rrTf4Lv5BXUfIR4Vh+0JKqJ5hSJZAosoOe/qpS2scXCpv3yIo4+drvh11ILVjtjLUpZyQAHxWWoGkCWVCUxZtogNEDHmgTxcjSc0ANXNA8qr/VoNAfKaMBxvWEmh+/ZK38xkDY1FyqKdqUk3fvohNvdXfvePXkunGBc3sBZqmzT4uWSGubWhf37bHwhLpFESsvCzFtBFwaiKkFOjcYAxLFUh3OZbH8IYg1hUSxU5GRh5S44xQvkafw0FL/GEhYp6iJC/4Zfbpm+nwYaNf+6sPZYdptCJ0n+tF3+D4gH8ldwX8QNP6IWL4HUe23yQNVSQHD7tqZ3Ubxw5s/yTumCOD1S5b7pQng3ew1OK9HNVoT6tNOuT1ry7w/wpllJgD1o1bZKxSD0BeFgACpBh+u/af4E170qKY/Nj3PkKOnMWxGo4ts+L5GLpbgh6L1diVIeKwBlKrdNk1h415gGRtdjwYlKSzr5n5UPk+bPbLNiCa5oCkVR11lmoiyw+kxo2J6DKPOlpwrAgdO1m3lSbQRJLDe0ct2KJ17TCVsGz0Ygi0tNthrDrNU9boNP4Yi6OCggeqWxn4rpviUXCAQvRuzhIQdkci0EhxdxfAPJrw5uDaxNZOjL9H4oZTlWJGNAMWYRANMNhT8BYqVxWformrdOTs1AnTbAYpTKyGVhQ4ztx2YwTHGYBSsUZCE9ZAZS36iMNMSwZahpg9ixkxhni9yZXlvUmPn2573UilzO8Utlt56fiulbUNUQwofFxLFMiVNQ5rFIlU67UvbD1tiIiJ1QgbTWXIAdxnJBR5BP7odbTV3OO4+YlsDFrytnpERg7ilxbX3Yg44ZIg5kiWOGx/l2ysTCxCwngOTXYTWPHFF5jrKPProH6nMSWceGCK/saNkWXZHGtORPos/nzCYuXlju+PYdosYLSHmZUEIJ0q8guV0UY9pc2p6i47AxZ61ZmmKI+BSREhlLsrMJcCb30LiARaPp5X24hXg4Bdp6iMMOwNGJB0kfEKvwoWhoDDY5EGSLcGaQt9ZFBjwiZqtWGJefIYYGAMOFu87JEEAQr+Yl10NbQoj1gSElcGX8M1CcgJVSxZC99WauP779Hna/1bE2A6hvjfg2a+UAjAOkPXrHyjiluLF7zDQ6dMYjX44aC4FBIsl0uerCJr3WUkw7GAespxQEl0+pFps/HMyRXA/OfHTv914to2Z0Fl+rdpUlxJ71SlSgHGaYobRjcHMIzuKrIORIGIfOWK+FcMappvpPaMfKVQDSYd57GA8VHEhr7F5M/uCWKMDsGGBi1qW5LOUKjMvJHpkinY6fSeXnFT7cBkW6QboFs4L05BuWHHkGx5dDDK8SZIybYAxM/diGxD9hD5bRSZwoi9y3hlIBq9I538M3XChBysNmkfYlT28kA7dNET/qEA4rBY2E1hT75dPNrdAN/JIt9aTAc91dSC5aPnRpxSPNp17BZ2W/ATSsnXTL1HQIlqq4OCE5RaVf7j6X9/vtXN3+G/fwZYDXCRJ+ZTdWsiButW24fE09HJLOi19m3FBVurN1vf/cff4BJ+jsGuPWO4Sk1uPlcjp1ia5aY4wgoQxe1EwTE6T6+ELQCTi5ZsWarj57jxAkmzoa+27bDSdyGbCTiXsK4Go7tZvERz9e2Vh3NxaJYzV/lutKqGOmOac7WG8l4nIOnVyFFUuPyZt0WbXFjd4kC6YuSuHv79S6vOrUV5Gnk7FglJnIY0wkhlzoYiU5HFtgT60dVxlDVeVWnbvduSaXfrp7v0W6MUhM01LPcGETs1iKj89374kHsY1e+3z79gRg7L+uVIf8iBaw3+9umPWaSr/O+731hSPLh5w9wiuu4Oi3s31tm55q5J4IODBKHmfOU8mvd3fVpsDJ6tmg+PkT8Vxv9DGyx0hCJJOu1GWwL6aX9dJY8jOigNhNCv/HI0w6FCW3JukEO1+uzz5tPsBRFM83+yKK1ccODdOOl3fZ21reL+KYQqLjB2Bi6FL8z26dLsYPm+MLN3EwGxplxDEtcxA0EMdcLK9nCDlXKLa4bnlqFRx+vPX9Xf8/t1FF5cRLhuOXUbFrQA90lw8rbgy6k1LSgiS93esgDhQ7e9KQQkOxaHBKNseP+dQOr3rin4THVdrsel8jKr7ugeUiu1WW9iH0yxU6qqPChXjzb+7mC2vzw8PtiA9lJNBeFJir4inLiCmBaXDyOYkyrLTfCjFL4iSJVtnEPh43Xx8qD7w7SO298QHzPvVG1VNuTNfz/1qbbcMkH1qBXLzbEfQLzSzbGDL8m+TUkADSWkhxRQte7RbMnjkaM2CKv1rsyaeKFjiwMtt18xMRxn6xTZcTbc7E4Q2nTQ3sQ38zyZ09B1dkCkafCFbYy5Sjl5ViNlAcKcxUiA7KxRF14Qh0G6r4MuvZkoWmJ9ZLtTbIXYPVPV2N1ARtEIOuZAuGWvGWBsG3eIf220Lqe6yrFVDkmtBGSJWnG15rgu8t5CokJTs0x6uVStH0rRihx2lHwhpwMQXytNBKc7FGRzGBEzN22zU2y0jbnmTUYedEaBs5rgETJCv+HCFAa7T9Sh2eiiJLHDCzfZ0WyAMG2cmgGbiyHqrKlOqLc+FG6fzL4n48DvheFUgvKIzkYHVkd4BpAWjgcH6jbdG1SbeeIn3LZKM73JCbqCLdOieZggJHe25ktOf6/cr8gf7cJCUJql318mSQggOzm6xbou7by/irvzPf4MPvtWFNs0IAa31CNDLaqtFGVVJKObS/kUIvWLbOTUN8oQ0omYKq9cLG0w28V0fygj6j0/i74nRilD4RYcqgIoVZmOd1s3P6Vxx7UPU1vyNCsAcJrk12BxBrbqg6d0GMelBVkWdkJ9ix72j8BrafJs5L3iEkbFm12YKPq5cYEqJtp9FS8aFK/7j6Rsq+NtqbZpSHTM+/0konixYOOhdLBKzWmhKvP3i4lEr1wrT+MSDeASkMLyXoTXirzmAZ9i6rV4DuMpqHrliBYbfZWAJWVLG6ZGF8+E1alOvuCPEldEQseUnuKUi+ZnauMORVGlLtVKL2BQkWdKiobF1kNeu9xH8UIQH6kBYtLyCBZNLAx+aHq/dXktwftYK8/gisIQMU6bti8jJvzpM0+vELgwf1ULidqKdw6iaxS2Ht1YVb6xdQtnQ7tUXDifDzR6sSkRUfiswK4JJU6NoQKxefKaBCv69JeX48xHR6K8kZivVdwGRubUNq0IURsXDfpJKdutT370ZIdSR/qz0Ss+ifPK0afpMvFX4HgS49KRk+HkyqcOS65AAWuPoIHmTjF6s1K72glNiHCaNdftj8Po1UGDgrp4J7NmCU8AlkS/ES+4mOV85nhG5cpDbeQaQCCuNNIYs4FFhoSsvaW6bgck+HedVXUvKK53ZzcU8IRnWOi1mh01LyXYTvmUdtcNhLjhA0QIq2q1auW2DqUiMf7KaHNM26Rc2Utih5DS9+jxVp0ERs0w6hiGjNgZImckdLbJBXq4B36FSNDdCOtaOJ9MtQDxw9N+KXFf4eGqUp2kOdNH0UNlfkxaWR5YLCJw4qI+OCwrj9XtqFUEpYDUlRj4yChW93hkBSNmUWXFq93x8/vM9KIJnVQuGr8IiPcJCsyhOQ8x5hjctnOo27/OLg3DcLIR7YXcMe6r54k24r6R9+PxfNyzVuz59zb9q5YNA0j6F+lax4tCm5h9e2Npp/leo/Wp+/R8WUgIt68OJmTS9+6DUSCy+ra4Y2bpjChMxj4Og7Mr1KZobj9j4gUb9FdXwXw+2wJJh8lxF1ZRSTCGW/PmRhHbGOchx879vFcg4tJ6Zg5UsTYK0R30JUv3PckPnkk5EcHLlUrrANWt9IUEz4BsSaIP5+EFQZqkg3Vzt4jBZUU17luxjNFGQzz66rSa0PPbw7uveW87ApzlPtXlUlSJ2OuKPrzWhzDqgPOBpvsIV5d6qOwgZt5Zv7+yHCu/18KpJm0HV6HgOoS/fFlJA1IZMA3j1CHY0liMjKQM9BHDB0VpwyAyE0COcj4/QiM+3SB/17xAvy/78owrmBuPFL7gt60VjwPc4pyD8LmVIllCFuVYTNUx4i4rHQtwaBHcvHRq7DYqJHHZ/Co3X+yhWp5Zkx18D3Nwla15q9V17oA6Cl8zfEFJobLzp+gW+eFrbC9232+j18HHCMEDRxM/W18r/TN4Qm0aHcri8vtGoMr0Ldh3cFiB7/ZuqFpk3MZ24r2xRjxL8lK/xXSbT5VcvdY4PbGEovDW0jpGgeO8jyjT+8WXRfIuX77ufMn4hxerFJqkUxoxesvhY04UAgy0gh2LX5f9aCuBXbVIyKxYSb7gGmEfnmD613P/a7OKESMLkLfD2Y4RJWLEf488Y6uRMeq/oZMxZFaC/O8cMkaUiBFtvlLMqaLoe3L/0MgtgFBMqRMuf8BZPznZPdfSjEoxQ9HwME+ZFvAc6cFY2Ij/UDiTxA9YgRAteo0xqlSMYrZJhjfSKLt+VmojvZBFtPJZhAxVqh7KP1XSiNZ0nhsgqfiw+QIZh/NS3tLRgHeNKOjRB+NzQ9dasswOrfnL2XO7zaNLbZTYkZi8XSN0YY1LQicZlOZKcP27vKrWmnprkh6FqCBOQEg7eWARhLQwuYDAevvR5LD0QRPBoJHC32nMZrpewxIxKxCm7zHye//V8CDaPhEAGgBS9hazJjc54uo6HQIyQKDMAwYdfs7aO54tGXKAJ3mDgGwH4qm8+7kf0pVrx86mfORThm5oQoJmUlzrMgllFLxax8G+wZGBKWXFGhdpmb0gv0LKZsx9trZ/lWz7VYoPKoVK0NNmZuhsm4L70O16myS3ipSCQhSIxBISiMfzKXAR8IpC23EaJ+/9zV0ZlfZYMW2n9SA7rDwovMJzreoaf8cg1t6q2BQUspnk4+kuXy9Tt93Zjgzlf4vIMuZKvESDw2qZJoFNV7804p4qed54/cjYPrJEQu3qJO+TcPLXUMgo8DmABbnHyzb3gUJ5fYFXYZe4FCtmv837rbk3s74z1Nq8d2U1oJx6XqOh+kb6etO8UQs4GmiKoV0SFM6OzdGvhT9d2qZlhaPJSRMhN1xoqHjebItXnLGxivPaZ9vOZUU4MrSN1+U4tLMMwfl9Nsg9l2M/ayrVKZwOPOO4gffU9W5xlTrDySS7g+IYC9K+ElYLaEWKT0LBCO3XZ+Xp90mY2+jiKl4rvGu8EUD/RJPhZOyAtghBP51bAIq/OSoK84/Wz94yMxAxnT/O0DVsxvSgowyqjI4Tp4KxHrTGwDh7vdOysI9dfcQGps1g5s9p8QMrvXWTz2kHaUY1BvKF6eU4IKJypQnoV8ic0HkksdjToQczuR1Ud5MRv2nrs5f9UPVIGfup9a6U21160cxKYdaHn8/tYKEIA/MkVDUPL+TocZoy42KIPWQMUQxkwNPogFSaEyRTy8Yn8fEVzyUBkrkZFzq23EQZWhnPntgReu9hdvCh5S4PWOAmsXZWdaw1Upz9LrIJl7HqRF/d5YUqt29QsnigAAXqnBgujRw0INtmxTnWg5p4tUAxSyUHkWCLqTEHHK5J7ngUAGMHiEd27T966CGTCC8YPMQVLuSAKgX96pyx7oCTRIt5BXV0BcXXhCAXk2/PLX+jB5Ug62xdnVG+fD0K5tDjlhNoKrkS4GI0flyblZocr8VHty0dTM31OQF5xOL3nALUbVDJYviHH3NdnHiqVX8RydObxFlFnUubEymtys6op4MUyGKeyfWUqYcRdYMdeiTj2tAEarLTczriVQ13QaK/9+mNZ+gpaVEd1xgED2FUcz6VGD6ks1dVInh3JHe0nMMR8NgSBpLuZ9sezdcm7GPyd6RpMdXil6YaWfpcA6uLnNYd0MK2IvBCx70N1nHPdFRcasHFTdc8cToUqRNPC7/eQ54QN9c/KS07+IV4xckOfQNYEdRCk7Bc5nOSQ7n/IRTAZUIl9gqDn8L1F+PZUUi8Ro1sZBWiFmE8pKqAdtwrgGOPWSyZc3pNt6dafYdDYlQx+Yo7YmGNokbtRk01Xw3SOoEaGaiZc01I1n1GNurWMIYL445Qz8eHXsHbMjpcglVLoS13knroh7Rhgan5Ym4OHWcExKVixeQysHZGZUHJDyeOOpjeHhVIPiRBkagPS6WaahCbLRmzKuG4BtHzYfs4hl1y+hS2HdtZU99l/CKqSyMReyWDnlv0WC1FIIOQ6mskMEw4Ek4NqjwEVVisB255P48JoRlHo0yywL55FYGLbr2NcbUUeyQQlbQrJ0iYo1DYy48L5CeBZTpiyp20ka/2xt9autPxoZhvSqkqwdQ3q0C1zYTiP0JGMOFNOYE7oYFG9TGZEymaCSSTAHCRvQkm1EIJunLQ9uRzG8z7LVZk98yU2RjS5RFpHMjWJoH+nqppHM7HSHzIs6rffQ0aAWRamvQKJTwIyfgj+gKuRXVXDROnT8ymBS+4OovCb/2FWW5ImV8uhug51UZVCDulXun4gH6sPt0QxdlUBTs5tXXY30w1I5bir4p2fpgtGbkge+t6YIpZctr+OXzs7+Psm17JXALR0gfJ5PTvYkHExQWAfGcVygfeEzfNjaoxfUSVJSA2CWdN78TSKoZFKSQyVybk919kmjY8lTpL7PouyAVxbhf5AEyFzF59RIuvjM8cMInjwsP06orgH0z2fEkj+iWwADHpiOGxnI1vfWzCAKZnGjY2RTybEpoDLwQx+mBh1ue6LamA0bDj9xgTPpRVIyJCRmspnQlGFmlU85nUeJUEZBHf4DM7qLVbt3Ghio9cNS1aMLqn/Vi7nfrBZ/amkrpUWgkAz1hPSVdvs04d2ZVZlWJhdIYnKvHWJSWmgs/N0nhKK1XgBVMIfEKaLW4XKdd+CayXaeXFSLV/6Xr1pR05KeOeXn9RHd/m2dS3NlaWqbmdDgZXn2VVESJKRlGrmRFj0QQqGSHLzpP5dE1bP1RH4YW+fe+oy/qhjFpBT5YRsLBVYNriU0qWjLTxMVcukgRV5iKM76lUZK4xr0xpBgfQjdipseonMQJetQeMBbYdme7bRWgf/Y+YAclextSwU8wI8g7Xoh3qJuAULE3S2vdCDSIV73yuo9eYXL+RPrHQitizkJOtEJuDx2bdB9MTJCWvS7f0k+uZtFmEzOs0Q0rJEz09Q343kxlLPKEzDQ4ToAGhoK1k2o7mQPpn63llzDdBQxepomjW1FBLaV1I7wcJObhV64UlAIUBmu0qrDMrWg1JxSnOo2NNETuAyoBLOvBjK3MT8kbl8T0Z0xSlMyCJtNpmeJY9tEThRfwLtQFoQt4tWYmH9ReS6HEwi7qoqjPo45WCVmUZs5jZkpU2nlRyw6fSVjZi/BQAS7pCpRaJ/0S35w03WqAqQu6hRDcpmrNdVFQWwmlpthi9KUF/dfVL0QRlkNhOl0khq+BKLA47oDph+UQ9iUYrkkHzV19qgOBJN9CMTQ34qFisyK6mw1B/9NpA8DRilEFqDrU/dUHKI2JibEkzjUberUdTNXwS7Uf+12RgIu+2BJyw1pq85Ij/cTeKMGcs+s75uoja28y/smDNaI890idqPhrLVYc3SayVSQ0fb4XF+3oxBCrveHqMgE1KjNr8jIkG85WdkxO5r5zwWjdf50ly2AirJOFkSWoWJu6nYMt0jeEM9sEK7GuivQBaHt1NNMinRg8LkX5fPe0ymckxyF7iH/w5oHfkfPJIrOkrdPi2SCZkWPLRj8BDqpHpftwCuiQjP/7wYK8R3V/wH+Xq54BLL5XUQ64DmB7E9/aaPyqFziKY18ldZ16euorZnq7V4qmtsKpg4nwh6res9iLKwzCYCd+0ypgQxF/7eZHHjpPbYfg+h+595WTZGQSHe5oqHr9Fx8Osxq/fcbXI4Yb+DUeZYyozDeDhFpwZ5r+hZ023n+1M7+mEJQPhYNcHS4dRfcz0NubOJHIhdukAA0TkNAzEcYDkh3hd1MX71rkXeKr8gcFt1/Fd0KGGg5DnApLNlQNJ+iqwA5FV1aofiEoLsOy2ZMjW1PUkv614pM6c46hNfGZW5fe9A6tItNABnO0WwrgT3NOGHc9MC+zuV9DB4yJ7+2Xev/Ym1VOE4BmtsA1t5Dz/j0IpeVCcPrmGnhd8o9B1PQzhAcImNbdC/aHecfssnerYUl3Jwvn8F2SA330DUSDcQDaLo62CN8YlXhhpuOnASLY1VlNk9DTHHdmzalyzHcc3/sQPNYKCkoRQ5ciXbiqYcHCZ3sUQT6FDcZtKG6EXi4cBgkahvL3WodkgQJU+CAEfCjZrUbkqbnDjebitXJyA+5wPbZrfNuZuHi1gu4uDpy2nVjNkKddaGR15JBNS/ckNuqOTAziSUNCTdajmpmNwdL3ku11jokEY4keq15w2iMWNAuKESYFIIq/C75ia1MGvDjdJr9Y3Wb06Hal4RX6H7dsm9qkPKo53KO5A4zaO6GPIi/oumndggrwGXCEBTQzlj5CPqDlX4H/RMDtY6dnnscF43I4SeVH4NwUCWpR4Toeh8UObuTrhsnvVzYeK5YxWBFIv7QoQTZPRG0fT7PFp5/SuomDxNbNxm9H5ulX9EDkUCV79Dx9w4YDHF9mygWoW1OS+sV/P+dDadcP/PjipJE/0x9xx14vYKo9tLmK4SeX8VV0ZM3zE3OxiKxW3/E8IrMh72/r7XhfKPj7n8w0TB5xpvWjZ4dfD7RdiEZoAz/+kjJ12nyOpKA/Pd2Lc1Xe2HhF/aQiPo3j+q2Dc0feri5dXUw4pTnsYcL6uEbjuZDy/pjgFBwr9xBbks/z6eEPsvDtSd2kkfNxDOtcxvGDKK7k7kJ+g//zKY7571uY1hEe0Zo00vbtYS317M7IVVruZSaanQBZmeHjOJynjD9CdUnTQy6KysnUUvD5zR3Q9SGdu132+j2fkCZwvTOOHvsubHnVpL2O3QREcHEf3Tw+YwA4ls4HEx3qfPH/Vw3l+FrhesZrVFxv4C5GNLssdxektni9t+SCTFgM6sIGHqM5cZxp//lyHr/9Dt6MHJL1BoieSoeAW2gKEaepfo4fdHtVu8wvVgUdU8nUDq6AfKOzLWe8x/tItU25sTdMZn07GBqRUf3fKqRnQPnY7gU79WN7NnDogRvEMruRz5OnklNjC76GdXQpnHX8FyTpnj3+V1FMxov1GAnupq+zXOZZ8O8q2uRGFi/GKB/SyB/SSz6EcAvQgzIRiKId4SwCy2bpO2IJaj3z9HWhsxWU/EJyv+L6zagFgrg/ZCaCbGWO1vWOVGFlCcQLA5CZQ0Mr2G8eNnqzz3NgKnJecuRlLQG+QM3X0YQTWzjxhuFMk9kvl/LVSEnRAOeDowwDMijlguBNxmFKOlwrT5KCznTp9IZiA9sU8+Ih2UDfRMgD7a+NU97Wg4U7C3W+GS0dNTAFU6T6qDWzbagWkYU8h4AD5R7iBupeYUcYu4/AH6HN4IOWjSM2P3dgnFZ94hgG3W8z/up7jvudLsbnU6tbbG+icyJ1fwgNfU5lynGLrvQFrBGXog7IdcOwXAz+M7MO7wSUKyNn4G80XHqsDKJ8OIQoHiMHxPEEUDoloBnCrDqB9XzriKCRa1h3xX3jp55GOPWYMWm3Z9DSauiEW2+VG00SlXlizJIerNSSZUSXisHa9IJ2fjp4OnjLOYgkYhdyU/AvBS1QHe87R5VnvGDAjKcTObASYkx78Gnlp10/nKLubOKSI0dOYF4YcP+xoIZwxoDdU9+MFOwnRRFOgbeTEskiVzm7D1Yx5tdh4lVhWkkNBL6sGOyd33G7y+fF9bcM0qDg8bFBNnhxkYxsn4y2cHhHE3UmS8LxNK/W/E4evghIqBVAouaaCE2wfagAJTfYSffOn8YQMPZVwd0Jl29TE7TlFEMYTpkrGe4MQzxraYgj8+6NpdeiotZcdg3ExUQZzg6jskpk/OEOmfXfU3CBfq0d4yRsNTxUxcxaKpNt3U4lQFGehSqEfKbzwQ/Dda3JhhcCnC2WnUb2b07OLAEoddc3umkHVHKNcfOoDQqZxtF2qHsv4766OXY7iOJyfmeWFzcjE6xVv3i9moU9o2TmIdJH1+WxK9mwHBwiI2x1i9LkF1YcpvyDGZ07G8waDCMf3PqwKEmQEbCxLi5JTWM9rExWX8bCjqAHzB+wQDspb50A1xPI5VhqZCtnpxSllsjGBMFA+jobbXkc883cTufPHvFihRsKWjr5GzEl5rFBsUhyjqb2jN2BY7bpgS5zlVgNPVMrAWINZpscN7gd4QeHg53XAZbJ9kcVvS3saLwlArHWtF3Lw8ijv+2bPZtJf1bviBUksvL/EC5novdAMYnvIxyj55YmLkbzEgw66Lu9BQX3Ow7Ex9wvBZphQFXg8Dwlv9R++GnZTo7Y5Tm6Z0K4U9kEmtJ9f8q+ECHhZVvMU24DMDfvvtGCMLhx4PoYG4gUtrAFB78/PM9Jymd0SnhewPk9yNCB8wQ4B1oXNjcd2NC+H93tiF3kl1/aFiUoSo3MxlcO+41TQKGrwByX4D3h5ICm25DScPIxLZbe4toOc7gktrL516mI29IIU2gXloo4SEV/m12HYwrD1lWnPoXSSbhQzK39QGCYgMNyyItvFGT6O/OWRw77lP6jgcyASXjknY+1wMdyXly/Rhu2W0AjsCvmq/uAzYO4HfxeP4P2iYtzQLlnDhemnioxomaayiiNXNlK3FLsgAiHiOJxHjF5cIhEWOhHo4hLy1AFqTwHx4ajCOL4Ivy0rB2uRq08z0yq3FN5gZ8Hc2ETd7xaSRdFzdri+WmwZKmSr4weink4nutyrmGbbU44P6v+IKrGNuDdh8YTtHdcVpXfr3F1wG+OexHJo6yyObWzqGC23dv5AxhmfxUZU2gN2aXedaxlzXzqZPcf7XsD6FZsre69ytMEsmoOQ4ofuM+Wgggji1Aa3sscZaeCpVvtz7N7Jsx1iMRkK+0OMhIcJLrepfFg0h8G89JmFPN3BnZYDZure3ptLRc8u95tb50awiAlRv09+LDqXXqrGERFSSQJAHkkFNMBpD78cG1Pgtxa8Bxgpr1ghioy7qFt+Dxit/UhP6HWmK9VL+4NIyfl6+DO8wPpzmhvJbYZOAJY3nBS00Z8BtJkyJlWrNJPtlb/Vp/vyJ4WeIbOZQad3IORtlx6aAPgLbavDrvCz3NIppetTGjVBCwTko2FVEQnlugEd7o9dHEwdLorpbtAp47Kp/ioIsASIfl1Vd4pjscRH7a+6HCHK9kXd93skLLykx+XioCSzytKiBqMAwS/QBwROaE6Pa/AK204HRjyxJBVuJguS8HtgVn/IT03Tu4AvxGV9L447/NgJWiCVEf9+nCqameyFn/AbVU2ZE6Pn8Dm/fZS10eNfpOP0x+/RNeqnQzvgMsaRruVSqPVDRu5oEkIJtaadprmharOwO63pj9q0hJVt0B131AIeJdpNMb+gUyy+Ri2mESRiI7Yk/5OCbzT91mbGG+2fMjZZparWsyKkAS9HWdYlCiQ7HvCExiwL48b79UCU14cz+m4Q9TWrL2Z37gBARgtDiwxN3gA8OAcl58kC4oiNRTdZJgUol0rdDHBJzxS4OXIA7JpRlzDlcSTwqlRHm8x3z02K2DLXFUax3rEI/PqLtjDisZCZurwEj0mxvXLAdGgy6lW9qVG/Aku+dWVMYOM/1ujILba9bEuipjgQz+AYu/VlSxYPTikF63JCMuhIR6ikC96mxKoubtF9f1AYxPOTsSoLe+5BY1bqotm9j3AQ3bY/GiWL5mkEsLYrdB87C5qvnqPT0dwob7ougbuyPlYrOKrotAsW6oiC6FHpch0wH6dX1wk2UaKyAzGCO7Jk7PyV1qFe/faioaLMuFGYKVGGLqAnehQCsbDpOnVfcuLtcyPUnfdQLIRL0MzCBjD4MY8/79txSaB5kiOXXy7olpG85rM4M1HMyQDqjqDNFwuy0szbi6YVwNS0L5Si3WQ2tNHSb8CLsi1U8GscEPi10iIT6EJTgyTDDKowc3QK7TtM4QxFcOfCCssyjpsmtbCHIDCeVU1HMrtGRqPDG5AjbjpwyyWpjulFZzCVzdiJrRbNYzOMsw8yTFA+9cupLq2yV+6+68s0ChdRFA28z6PGOcEIKLVxsc6NFIxyPbD+BF3LBp+eXR1Lu/TfAE8OlT/wtiMgg8ht9O79H9GQgMS6S+7gs7DkJwF/11CmdnaMivEbvbeOOraNLZCfKQfphBxjmdJL6dQSGFI5gQjSvhy5kARhW81nWOQbNOJ+C2iwIexQSewiV8fqTYKR7VQnj+APwkcvDP5TF0W+e0+62VQRdAxRobwFsB76yrenz9DTkrPBGugdJLbe7dsEySXv1YxhCb8hmaa2iFZhB1DdHrgeLR8KKQFzbVy6PGTfY2iI/5Rkab2rgVT500oEwGVGMvx6cHbVu9+uxexX9pPuX0nYtvJMVHGZEDPT3TpW9shqtwCBEQYdsRQhbYUN/OaNHRcAjhBa3NG6ubKe6cTDg2JNbu/GmyOCxa6CFKweWXglsml5QQr5KMFhYl8vHKqKYKOZF0Bn7si4OQP60xLWpX7fHc/SHfuT8TLIaHnY5AuLdGx3N9H3kEmaHMAtrG5UootHpjhX7J4bmw6TCZ9ZeEe4OQUbfG0/9R8rBNvBFofGXkq6fKmMPTSWjwcD39c4d8b1gcx1xlzEb27ReGn0MD2YVr3I9GjHi3E0SqAptyroaN0pWihZKtN3FgBqr6TGZ3FhxkmQtyrh5vZxl+vZSBXC+DSar2Wcymi6KCHi0lik2KVCh3gWeWTXebDlU0F+uQ47Gk4VwpRuLRhQnYhgPbiSEQ96g3BEqVduMB77rcNB9TONSNwQx7ct8Jia0ldDK5b4yZZ4+SyMinH0mz8iI/JwkESknXGIZY78cdjiGrCBOxoxlLafJK6LPyePW61TwyHUrePRau++mds92JyFsmjuzNWeSDeTEGH7OkzYZqC+PathdxzEbJR40C7vSeZHyx1Qz54f68P8XM/MjzMLw+PDL/I2oRNWazOOoZdyMZzhaOxwzjCnovX47zJGDlkJwUpdayvYFlSqFtAt5dKs05Cdt9ro+tdl+puLK6HxZJ/db64OEMmSh0Lv0sCYcvFE8Pkce3VgSq5qq/fE9lE4k8Fcb8MASqYE8j6rrcFH63M3Hebk2HDOBbdmbVCAIe7RBXtWm/6GoarNlixPi4la1MtPCvxwm1K7JyKZb4eqUSfjvoW2cP8W5UouEXgkVHOlnWfjGayPTbOmtbdzlHzgJHP4UeI2luejw8Z5M45017wj0o4+vheDcR+FV6kMF1MFrtbobNBKzCxHpECo3Nz6NbgcciVbrfzSvs2gbUPrvdhTuXPY2daRRx/wf4zlUFLrdEyv4dRncmsKUhpfmy2hGYxXHfMBa9w3Z1Yz8eLY7QhH+RIQAOglSiUE3lplw639qmNyGfwk1e8aAL1FoQ9WVSlqrnL+tppLtsVcCCoRGTTUQMefnVdjx4AZTmft5nAKdMGMjro/RREQcrll2zQdMnIOM1rJ+4qT/+VN643t8OIuYLBsWmrx71rgB/CyKBo2xH7xuS8GE+ekylTB38w1ByT7Y0LnkB1yLky9NIq8swWCg5P1SJDWl4dU3vYcMgtzvSjFp2ixEQYLqA4iUQUVcKD/2P6Hrph1ANzw5jgNCIHDUrs7hUtkm1SWlxWJRWjZgWVw+NMy1osw8chUgQaruIfpTeB2BNmBVjGIIGeQNPnZOKvzWn7cTPCwsDvorQd4VZTbcwnYo+2Ig2DUcHa/LE98lNcWpOa+5urGZMdVTUKzRdB8IPsqL6OBxgjQu8YNvpPh/nscNlWs661cJ65POFM4dzRCH0nGOsE+8Zcip2Y5qHLB7Fm2A89ULg0nd7Z4ilPNIFfZgsbfUounfCiug7nHXe6i85QipmFZP+aQOfQRYGOtPy2IxF2XL08+w7OIWsfwh6nxJszi6nFJIffGMpKxKtscX+qpERwqqzPD7YnQEbEZg/iYEhc0ZSRAaXBAR9F6npBqTv66LIhz7AgOabjA8ycejRqluWAw9xc1MHzxFwLQlMDkWH0UF6y1ZFOgp62GBa5koZpTVtkgwQ3Lrg0r9VxQy9vkM669QJMatLS2NmSqj5P3njAUD5up06eNAN+ED6lp2Q9cMX+es1Qsp9jDO9x53gOTFo6CpFqRs45Ggs2bWvJAgMfFb9lwczd3wO0Hp+jywobEghFf+mXhMV74T7Tb0qJrqTRqSkdX7s12fAuHmwUzRbIYcvJTeHvJ37jHtCL1WsOA32kVj9eBJA+I6je5c6NjdNB+cNFBdiJFYRtTp2unp9Yf8HYjIu+/SIfRQkTjSDbAfpZd6ZL2JLIBPwCoDj/CweYMgKZ8mGf2CIj0cIwhRP2rjqefhx5KNRCum/BZ751XJ/vHGk0m5SD1rJ108hf2UC4+e8GpHkNtomc/YAPr0TUePRwxTPAddvQCoZdZ8nzVi27SwBHo5ki6ZU1ZG+l8dyM22Q+xomLCeBZzb2KbuoXjg60PdEfs4o9HOsieYpCGWt/tXltX6at9RR/mXasnkPbLseTbuWet+vWiRLCForOIdgL2MM8Eji+kYiGGR0hxLoQxUJoaxpaOrqKIniZOnK+Ax/wV2FQSoWYgTs8bleEmzo2HRUfV/SHrSM2owgfIFO90cVOJPRZOrLWKwwlclG4rqDMW0UYXmsy8M1ypwObQJg5usKyNae93v4qQzgZgS+5d3uWeetkfVs2tE866wXPS7TRRAwYx8kZdFpfk0doj+/lJr+jFbK9MoAiEScOjcYziwRGgO55sIT0bmCWJuhCGPIJ0SN/ocOdGsW5DKPer7oumSXJ4JPR+3VN7lIEMvjg6forTSHgdnbn1FmG0YpFV093458yX+NeE/BhxGcupBeqabZt4jIUiJEGaWBcFT7SoE0lrQnwFgy6NjHyR7m2ox5naHLzTojR7ggqxr4HR8jiQEyr0YudEEySxEI7eVup3Cvl3kj8h5ER00NI3n3TU7BQccy9PsNnSA2g47FTjjVue8s1bfzj9+Cm4h4ihtYGfOiPtcknGXGofRhB4/iMN20kioK6gMFIxkL1QPn3rjvoMMAABF3bXbwzNGc++BYyrPptyiplD88tddNwGei+amCf/Kbvlb8NUMM63ZHf1JvwIpcCVT+MS22V0hh2QbQ9BvOAe+qR542aDAZ97af57y8tm9FDiLxrfcjYBmUvIjBUoxOcP3rOKhf5JT9hUSf2ZlngMXBrN6tl2GqzZH1yYNjWdnuLxdcC36kmPUX9B9L/Nl9a7Y3lfwWRAecggZUaiv3yJqfWERh1PHxFb9+v7beIZz6ifV9vfirKV0T4Q/J7vVBDBqawfJnrblmWjCAhLR7Ux0yeA0nknHZUghZEXqSSWX6srp6du/ZnIUSZliQNft7Xdv1TNPdgUTdItL0cEsY6RHwqArL2GgmgXH+p2j5gGC+8zfyOtBf81ggtBGg03h5WRvLD4orjplCEC0baAP4+f4UPDqbEFGJW9cvufecfwZ/epFNrUzPKIydBRITWVNYvjw5lmkiniQMG9IplxfB1TKSIosUHw1zBsEE9ogu3b077iZGX5BGTQ5jfGpruob3T5AgGltL+4qF57tfg+w8MGNPaa4EWSJDTWCXLFocjXV3uFGcjoaJ6fB7uA5H8UuUJh7kdYnZeJW3muMw/MMGK0lApqw5WuaJLnToHVuCVvPMHzdMhmUNUcpyHhaX/mxq+4cGuHSl5rykzhkZ5yE+AvoVroTMcjdlckom+JH6eyoGrSm2fe8HojTeTHds3u1GGTpVKXcYUM+SxLWiIhqSDxGOUHEuCDRQv8IccilkgxISLI30NRyRSNvwrUyLgNMXyG29+y30lIUDqwlwO9/7PVyTFgQkKBWXtJF3rBKzRujfIYA5CMnWqSRvOnHyj0DS92QfF0Y2Z2qi9P7GGBSNXXHKMadfr6UuQuYcb0jZzjbW9gprXA+VL0/4u8I+zrjfuu8R3DbCPfKhizAMboJirc2Jxqgvtb8qbAiu8fXVnpxq92n1PiA5KOUHHUAYjfJlTQbLjVW8iHjhy4UcMnscUlh7hV531/yHxu4miCYIbd5pUrj5OI+8zIHOXID+/86Hpy+I3wBqn26G0ZRzC9fnRyrYjpPcJQdpTUUHdcK16OcIOY8Nde6gFmd06KLW0tAv7OZeyDa8WCQkqA8qEHcJS1BfY7Hm5XH4iVii1Mk8XJyZ0Gd5SA9qNoGrRctqugagstTPiZIvheHIzxSqsG30ky5sZx67ng1qoI3ao/yWqOu5hdAcu8nt2ddauL8mHl6TSc5W14OJ3ixJhtBxsNWxtSM4pR+zdSjuJMT5FUn8c5Z4bt6MR4XV7Dc4FOwcnajyYeozVYpLYUd/ohuD1Nii38owAMtP09Tpz+Xecnki1o95Eu43Yqqi1PZctzVSVzhYlX2rCivnVcOM9XvcXGDg3ix8jcv/sx6iZzR9uRMipzlI5VbLGFnr+PaEUXNczODRmzf/swdOk/DbBY8oCTYfD2mRldW9ZJjIZ4gCpJ5xAngiDSGYU3P0FJMbYKYFOjYEw+QyDrh4ed/P9SEAU8zZh0ST3McaSrKUULm2riYXqPhhAXpQU9XgyfRfdnu2a4mjyl8GfvOlG4wSZGxgOc09PqhMrgbznT4AYBMM7JgJNrhZOKc+/K4L5Y27NdSBkORzUHx6BpE/A1yWwQA3ZiAIKkb/WUXeJSiYicAAUr12Kt/T10C0oScmVbzazKE6NQ7MLB/qLkeiMMb3J84Lkh/TvS5By742SdEBt50qxjnHFtMrnMtTTGDG0MRN0gfvM/qJuxPsMkKyBKhurdKjwvXjWRLWDZqWILDNP+kds6QggTVn/CN+HJ3D5KxPrfnoLgU+Tf2i3l4MVswqjCjY2WIZZJl8I8gS4s33a6VRt50+FLxcre2Kz4x9rzPA8b6BewoAN7q/X8XQ7bwmjaQqkw3UX8Ftx6ZO+3FYayNPlKxJcSOLJHPDVM1o9mNVoqzCKtQOeUFm8JDhyABsgJoALYIvZCnaA/v6v1C496/HdjVpkxaF+PjJW+DyoJliuD2YzGhzRgRah407F0dFbMclPlyQDZNSBjNNa4h09dCkwVK1T33C5r+n4B3Oa6jw7Yvp+iZbWeECua4RMaQnUhQiPqcmwGgBkD6D7OOGV+of/cJzXIH+JBhVFi23HnocSCEwfm5AzqGG/bud10rmD+gQ1oswzw3vdMP1c2QTDdsgswXKGJMjK3feX5et/PFBuBLiTTDq4/xl9Z7XkWXxrHbTSDtOc97jfW+7vT5mu/AcjYi6p9QSCY1aq4eEu7clGWFjfJiVar/EizOFguhxGEKOPLX0sYYbundhIno6Jh+ueFYzP6Xj7nx8rJuMwgLzxhhmsWEb3G2AhKWYVnHCJJLwurBTAWCFD3hbTd92ZCqzE5IbC5xI5MDJ3MNdQOClOgFHeuUHteHgwUojx+8Qr6hkbt+TJAWEEsyZ1Xt9uF5SSGVy1kwCIam4mNhahPwYpt3DWchZWjeVTQtL3HujYNfT3tifn/iCpSjXDYy9Hh+CWiYIQSpQWl4uBO1y8/L6E16Rv81zeWwmK20JJ5hGEoAXDmPM6Gyu6FyWDyvJx1zKwhxJJJk0AWH7UDE5Sx1O6nAeXjiT3YV8EWJTIwyDxPuJEnp8xA15+EVMCSl6H5OI+o3SEYf61HWrN/FbxxunfLGm+gjU0GN3LMHCWDvoFDj5rfs+BhuIqhhR3f5EzkCt6ckS0WkLCAG67z51dzdXVXTx/VzMfFibYHw/SoeI0pG+uhY5IYqUtINP280BBY5lRjFa846/tvsfpby8SLHPjSdhE8uMJ4Qz86oiBS7Z9CTG7TC+UrrqWyt1qQ5wL0dXGznwXUpl8/uDqYIIrsq98cFE8mtEGEmmFcVP2BpsxcCJqzy8P0npppG5x1dV6sY4fGAGQU8aTo9C+3n1zOrdhOqiKTe8C6rPrJgLp1rxj4ngas10Ss3s+FjBAksvaNoykCFu7dAhAfoiNA3AhHdARID1mMAOGIf5rG+sKGnFUXF8K2eQWsTvigfMrFtfxEFdqpf5JXXb5XN/hBWnUAYwefOgXZRjgUtUQTYaE3lhGhfO3qD2rf++C8+rMmRq5KqzF9AMjNiOt4zCuAmGrX8hU7W5GX2QhKqzXqCnmpZJ99fwGCxYOEnjF3PrxsxqNtPt0Vm3hkvvO9u6T8SaTsp/m8kBMGUWKx2fcRTTAJW9qgfg8X3Nqx+prv+srP1/fTD4vwxibeZYBnd3xQK1OvPH4wq0OY4+9vD/yWIuQkwnlnGdF+Ht1CJvpF/YMcgJj670ONup0uixjDq8VFI7i8pNb4gD6d3uk35ta0bVhMmV0OSXzsh5DCzCSU+HUIYc7IrLOgikSmPiVcmh7GhsT32271l7mh7gexaETxnaxik2PxzKtesoB7pu64z6PRoZkxvnGvP1UetljnpsYyC2TyqALp/QXbce5WcgsLZOwqSgbyNqwuVVidgLeZM3EENr1wGV8bOejvFkdPJWy2q4tKHqhq+6OBdPAr5C7SiY7CuucRxTWXx93+AnerJwY0xjGgJ+lkZzY18mZgY9oghqytdXOrzbw+hCyydd3GomQWQ3hPFD3WBH/vEiGfBGmEwYjykU4001JzyJdOQUP6oKkgz+1lxAIHJbwLr0RmunEyLG9oLVzldD3K29aBC7WO9LLa0CewGYud7hB9wDhjQuFTHx8hp8j+FZuLr5RvGgDsw+5itMZjQyy/HIlsP0SKMEtwEmi7x//COajPUIX9LUa/bvqt5shf+dPLVzGL24GEdXnQjoPB4r9VG2Z+uDXRVDpv/LQ7BYwmuWCFj3Y3G+W83SqrO2cISNixRSS8L8SAea2+faHhufLBZeLat0g8NCqc1M9iZpJbo5keVvEq8KwErwC9iizLta6Z2MVFptptu5lbf1mAWiq2z48FqR2ZHJ4SlXL/V2ocRqHK6OG6SS2eHT789umn6jbc/OZOz17yAl0eKqe8sHajr9LFTAVGMbcEOY3Mwmy139a//GAYyhu2P3QXh2WfbKOX0WOJ1PYNzteVelHM2BGRF/1FCsMefbSAIykQVPUsM1jrqz45IuLH9JdiweG/2mNn/EVMWR8qcUEhTw4P6OzAzuB28OT6imDyd9ZnfC7tkkf3OY00a8n+fY996DK1Mchi5nMfwQYTnW5G8i6SyZtO6ArSb3RMQo4ATo/WWgc5jis75Ej4M+kAs/amIv3E7+IKALyH79F1p0hO8lgCu3k2b11Zvkc9Sa0DdTKWBPcbqUNMn9Fa9SCsVOjGk0lKG7f1r5qLHCTnNpAeysu7nfuS2xQeRjyoHOviXOMJHXTIRfLQjacfvBFrrYCgUo9R7rD22Nx+HwGczu3XnIjNV+sP30W34h3PQs60uJ5pZo/VfwRiqwKB7MPBPC9q8OEnPn1RG4liLj3ewsxeK8SdllpOyFHgm+g6/mxw3/y20X8F57Y8Lrscuwm+Hyjz0xWhz49SFn+oBrlqADVBAg5ytFyHkTQeT3IYHPAwlE4QD/Ljvn5uAs5ljhVn7GF2oDHXSGbA5sgD8nDXHcuxZhfZpqSaowpeGHVTqcXuk2PROHK77D9WPx08nde2QhKK6aqOu5DZqUNRS3GHDTLlZN1IBy3jmWa3DkR1MxDawSGKISia/gKlRwh8+W3uT9Kypnx1nfHIsq3DjHucrzA2/I+3GA3t6nhFbsL3fISCfPdxnbBGOHnFsZE8erZHKWtLWkATqsfjilhMIjjPjvpgyVXUFJIXgA7OjJ05EphG9urkfrn0SGqw+RB9xm9xO+trmkcBdIL3M480GXk1czxs78L7SPJXJofSqe9z4d2HRopuMR2R85p86M3NS29oOPhuhvhlZuurJtS9oupdJeIJeCAga+UeYBc8GfeLnpQbuGizgU3V7XGR2sZ0PUsjDNnbNRhwPxb+anLYuIgCy+McELYGMSRA7zbfdeTTv+4ecAxnnalcMI4nrV8W5ZH7Wdmawe6CvhQ7QUHwQauwegcpkWkz6Pb07ZH7uE9dGhtAyIdnbBBjdmLxO2BpvPQSaq0UP4RhkyqnUu2xyXx5Rb4NOitrdfiZJWPc4/OIjt/8OZIyYP71Epg9c7NotIYe6eag2xNBO4Hvq0ADH9FkBDkEbMDQZnD9iNZ7YCOwUl57AZFl9KiwphgBBo4yMZ+7L1iJYkyeO0TIAYviSEgZmc8ujaGJS0aa8cvaayG22vHc9c6rHoKUdPBNUYgO+8At1bsYhBt701pAmEHEJeMXdYJXHmH+FrLJPxqyxF3VPn4QcLRPmQjYv2VJmyfofySvrA5WnrCduDzqdnp6On+VpRSt/CE4a1Fsy4aLDhR95ViWkEvYXTIytjdNvn0674MFbuz34Jwq7nsHK+/RP7bnQGyLZS68Wz3Obz7jVnVtZ+AuyBOMjP87x6KG7FIMIpmGL9jjBa76rRW3oZdq4G470oNhrR6WzlvuzjL/b7vsTBqbSyNuauamI8u/K4WnuKft21b42WcVydDNtPkyqlnWsAP5P6NcosadTy/gLOfOOEe2Pwgsh68CHdcZ0AV6c8l5UaBpuuAMIMAOQ1TCAP3aTrgFzuo9xJX4k+bb732AX2obn8BDlvWMC2TER5JyPsKKimw4enubxxsPY/vgn7cFR6GrkqaH6ZHhP5IsvbSECveFdOHOVOLKnl/CI/qdJqHdmHMsOZGyXkcrcitk6dG2xYnjRyU4QHeu9CC8sWw3hvvg8TLjZMwxBiM9osQ9p8s9rKJyeKg6f533BHdSDmtx3FWNTrFe8JPkU31I08AX9aTVSTwfcRk8Z9ZkTb74Iwbm/BO5UT53ty+MieKv/IZ/2IlRavdr4Pire0M4MU9p4y6bKI5h6vDwrf/rhTbCy3PPwef6Y93oeZeDsCvCOGvXksQwDNfKH9Rd4FfXEfDXMoDX/uqTf6wQF2tvoAeJpVT56xo1RlIozwZCol5ql+sgGdx6fPyMmio/BQnR3YsWPNuIjDt7hw1/JNEYx6umuPfxaL/3WKzLrX9FM7TXhsBB/SjfvSzvN7DtatXtoCBUvrBeWN13HMMVU+GDV8bpTDdr8E5Fy6KPUu7LRkVdI+ifUZAPxm1BPIFF4KZrG8EW5EM8qWnQEB9YwydMF7DsJRdsz62dxSaca9tv25v+GUa305qLxkgpF3z+7DaGz1UiOK++8XSXklNnKhuEi2DSbvXqsxFk30LbsIIbJOtY+bPTb1zTUmzu4IO02c0cxCsMb6UIx0zBnxLzXFK90sMrD6eGrmIopLk2B28WesdIwV+ZyGe3xpzejG/kdLPap3jQ1QaKVbZ5pR8M+OkXGFDZFtOPzxe0wda+lEZdRhq13pPcaz3iIhfPzfhx+R9I+ocMgta1EtVrlxAF+hpZ49+ni0WzI9ExfdHGTVUWb+3TOjbvJ8du//sShI1d9pdqsOqAcE94fMrysmnr8UcNujOX+0URsw8B7gVPeSP0vw5vyDzYIyxgmecxyh8bgl5fOTf4qlgoxTk4QChPjyP2p+T+2EgqCDtp5JuYvpb6lcZ489aPGkeMQRxSVgLpC6/yzeu9oV4+pcCzjD6OryATN6xF/a0oMRG11eZRds7q+bCVxllDpeOUP9tHtsBLofWJEsjiLaK3vjy/8TGZkdGSPwZHOkC1L59n0YIeDRCajlecM3yc50VI1D7mU5/3Zicb/3rrAiPzziOlzYufTjQppBObr/7Oy8pb8p2yBKeP62e+9+pL28vd5ZybPjaRa9M/7vIbz+RabNIdoioZbGhFFmWzIFANvJuwW20/dL+wpBCRv0KFZhbLcP72w01vQfulGv3lN1KBi7r+9mNi7+AsIk8TVa+236oDsWxn9p6Ca7NMjNUHHHtfPg76bH3KTzUXEpzQ/M1p2fxYhiLb7bKdi+I/jxBeI6+XXsOv7g3uKS+XcztQPecRY0mehfMf5rTFsft5RXRwE4cKC18damcPV57QEAeAodCEERWYlk36P9nsWa0Ot+h5318evufb1R8/a3sM9wGxSv31VpwQtQqh4jwyGX+8b1cPPXRKH6bEzRyjLpRCH2dcEQ4hY25dXkUoHEglayW0lcQ9qyften6KO+MSHGIEepPX+zlaGml098XD87XJ6tDAugertf5OLe28kl6MlXaFKNtZnWHBNnbXsxzMiJE/qbGa3Hp2a1PKcHUdfDWW0nr7E3l1Y6lD+eWLTx5tzSfJ6BOc6lTYv7+jfOY/xYmSMDQ3ouBRKNmI0n+ofy9J1b1ecgx9WOk+RwevMIcphi4TFmMNz5MKHebmuPKJvdCg3Qvqb+rlo+dHFq9132bm+lj+r7Ktx9B95ofLMDaWBy2zZhze1k73dupO7N/AEgUV+D3yk8+aJZOLvJouwwrt2pkRdrYSPdTTN8ttkCqemzwQoIVG/+mfDp4JF3EvwyRibA0QtQcaaIG9d3Cu2C5zZCHdNzVMFRt8dJaZTPYuHHf6z0lpyx30SGAyZP2RwghdTSgOaoCuUI8mZ1IA+liI7bbNjT8KU3EFR0ElL1GQ8uRaT/8i/svFZHY+FVaeyuEMZ/99sY0f/kwPraCKep5oD2sA0Z6Ir3AiOESvTnZdJJM6YaCq/jc0j/Kriij/hyjq0heYpYe1/DNndjmXp3/rGMVmPFPlAnNzvSl+5RI3zy9ZWf9RtgyJ1p69omWzVB8qEyey5q9dCMcTuTG/nOm4vVD44mkvNWgrof3IOW++1Rn0paAZSGDD6YLeq2DA7hBcv98BQOaq6ySxTR6F50llWvvRasaUB9/Lg08+2mEzKTmmpZI5TlwXqTcd+t5Lsbq8+e9nhRI7m3t9MEX8Mps3aMiapidRAZudA2em17RSKahGzzX1OPROSU/Lpy/4gdh15WTL5CnI6nG7j2ftrp8cHVp6zeHXIHcNgd0uXfkfWCeGbT/qxRyW5CCsylaYDSthdWB6gO/Yl3Ip9OkfTwFR94p5P3ii6MjygLPgHaiimWX1Foyxl58WtonynRfDOlmxF9G26ie/ZZkU6QmgtyW/24BCH7Ady3nGvLL4/+vMyoVv42723pqn24bNqcec4OA8J6XjWMtV4H5gT9Mz/qYbUpXtDfkvm6J/RIahFwx/7cNqR5YSem2Xmm1m/XKGvcT868tz3y+a5KMw3OHt4i9IQqziRmdb5vH97RXTQ4GdRWDAv2YHJUcOnQ/HCWBelBNBDVkMvUux+w8FwiIRhg5evkPcJ3cOeAKApoQIDAQfZE81NfPPUbY/yy2tC8PRj/tvioU93W3CH2/QTntcZXFX7V7M3s4R+sFv0Ptg+HyZpHwI6+cwlczkcPnpFnY8jNVpB7n8mWsqNmBYnMQfkxd9wW8Jv9e8kAnNSwPtVQavhpWDr8Rbtr52ZdvQvUBK3fXjG8iac9PR395NPgVveXzWUL2ZMG2sCtpdCTWtiC9Yrx9G/unOetnqpRa6PsOvSa1GW86Q5rJtsMiZPVh+BYEt4ytpchOcQdCDslyi7XHoYPpEjrKHpX2dmfbFVbuI34RP/2WGa5HUbjiT0o1tKSOfCtEkxP1d642U5Em9+GPvqhh72/K8rVg276SRFmOM+sWVcwxheVzZ6X86DC7hHssXp6UdKlpI3u55Sdn10uK1rp+kwhqxn4tE1joDXP9gL6gjzz503xMj0KFRJ8g/SctT1JJ3p7Tvz3N7VLOnYWDPulMHeSfAHLlBnan41M3zbt5gELqWaMGoCQSJkQbo04nfXVHs9XfkjUM+T3/JRxiC3XC6f2voK3PSDEfy+ehjTN260jf99hVOwog9Odt4eqD+7roWPl6ahva7Z7B+TSkAGC1X2W/05Pa8TUMb5PBHz/hfzNB2V77j39koRcz+BMcwsOi6W4hIt89bjOMP/j89Y2r/kzcvw83wZ+BnPodw6wTfUeSYA75HAJ+33kIKsdZWz8r0GSSzNUczmQFM/pmzOmysfQedWJKidzJsbH+R2U/LjlcZo8MI/Ituxzacsn2CTt8RDk4v2EUsbRvrFIDU1ABsDiBOYj7hPnA9/lvsRyCIHtrEfbJJthn9i/6m87+wqpvcX9H+xrH/lvx1xyonXav9qJZ/QiJx+CPNP5n/dbnZ/Yj9bCanIW2j2u31cz8GwCvs8pLFk4n1sI/Fet+GgMVQSqb6ZFAn16sETSs3wsmqeYs+vFf9nb09nf0IT9DRrUQHAM8F4eRbnfSBxztXr/wVW2flUfLUzE3CmLwGqfklA20a3lJ/f+YFdNhP2JM8vAtihUsv3715QZ/yvoTL9AlHyq+ueHR8DJQRl2Oo2ApgZUmaAN0y5hNnascYJoC4OhcIrDkInSHYJl6ZQINKF5iXGIGhMMcBmlNprMF/c+IohdhrF1RHN3n70yPfsjR9ZIAtl7CZBkXrqzMgWDNVb2yNC87Zd/41pY0uCJcT0P+jInAGnUPrH4MtY1I9kUZmPLgPu0MflsywnT8/Ks6cyfKRFfItjZPgwyfz+on3+O/t/bneJ9Kpfe9t0g9mxsgFIgFhW9JhsT7a/mJAIHwVR+jw+/xtzKNJ1aUnF62hOnFOKK3URy7vq78O44TQ8roaOlCmG4U6dKIOAt2/XNxZ9DopJsStrvFB/+ZhVGLycRRE5OTWlC+62lKNaPOC/bYgrlmjErOa3n67COVKgOnuIVwMljT3mwx1f7wtGQYpN/lxSVy10Jj+H1jVpPwHMEK7EVo/q6wDYKRtEQFbO/zPfe2CKMmKqumGadmO6/lBGMVJmuVFWdVN2/XDOM3Luu3Hed3P+/31vFIYPbL67Xk4nVgo10l6N4CsF3G4Xn92b3a5hc9XuAXAvXFvd7lD2c3PEVWj0fT3vv+gQKj+lHCGvDg9/vCRBh12ibJJ8u3EsacGWkoDzJJvdobmeG+1A88ESIyCxIf3zYf37YfnHTJ+nrRyJW0Pl/p4Wd1kBXe1qM4NaZcSZdK3BJzbD1YmbvmtNnIeVSsKwBMIHu3C+Si1JYX+aD29jRZVYQHFE5vy2ptztib+Mr17I7eQkJ/arYTWAz1uSWZm9v0D5wmppQ5Xf1jtRLPZQ5WF1aXOwSxDip4/jYdsEqjosDY8Xs1OonTtfDXMwyuJkaF1m8uU1c84fPTtrIIpSu5lH7Vd7T7TI2uxBnfjyUQt6JzTxa3vGsAleGi0rhfJnIwcF/th3lsIiNm7nZlxOgUw0BJNNl9D0ZW4dTKWiX5eHx3Yz5i9HL+DZ5SszxjxkuTH/epW7dk/xp2TQQcZMS4zTMMvMPnLzCy0Exuz8a/K4J+F5hHVw8Tk3vrHZ0j1RPXWT2girwtyusZITeDc7iNSXeFl9pSAwm9wVEtVIFZnSKkss/6M1/4ToPsyTjs1PsN2WistG5Qba123r2X1VnsZCV2VXC4PCYpHNJ7L68HSbWCWUIUIx8R4VW9cdmwBbDr2ZDlu7yIhhHaqqaU6MHod00x7reE+SsHktdOAnwGHdP1jCv99lk8AHm3W8HNhVRv2m8rp79ckF4cECs5XWu18aP3aUvGoVAxtDqsuiySl28iOTWc6DzAjGDh2vIUWnETdphw7mVEQJxHBwe7pYTgrYKVOIzd29upS4b5Wn+dDGOXWuIW0mXARZ/VFPkJTApCQAIxe6iSosyGo66t9EkGigjMWlu+0V78Qi7Q5WL3X3uwCELoMbH44h7ct7QEH6o/5gGpZYs1IYF7j0y8cQ69goSo+h33eBSdJu6mLGXfJloiXJwQa16+w4eA5q3jhxkHBTwUJsL69/W704vj/1wMD9OvowtTe3Vny6XjgPqeE1E5V8UVHMwyxCc5I9L7muwJ1GrnWt+1BT1yCMxLPf48C+WEmSMPV/MHDQQYYo24jWy14gLusSFKnkWv8J7v9Qv6pLIF4gMyAWEYwwo0q7wQwS+IZCYnSc9oYHvguwB/gzaYNk/eplwAkJAADdU5uCG109m1KNCmj6mVHcAvpyVrS6cr2ow6sl6TUiSn7TYyIlJls4ClFYcpM1l/O3HwCdGJA39824SMC1c8HwtrpXhJe6TSMDcx5+lV2/qWWQE45pZXKJ5FYPj5jFkSzASNe/F7/w0+AeQ1tBAtCnT3wQZdharHanVBNWFO3RBw4BHhiwEknsf9JMoIyAicrStdPaKDLNK00R72lSnCmKvo//33hx9SC82Id4pdFgrLbNOwGr8L/UwG91EG27WJUNe2imWmcUH/364ZpBOkki37Tuw1nhi8TVswA4zHp/izkgSyZBCO0npos7YVKqPXmtL9eil0z2Qs6F3SUi0qeVA1BwF3WMYEArXBcifRceOQOQL8DoOJxa5qvAF5BVcMI3XTSADtvP5d2DklvCUy9kKHcvRZPl8JT3oDuhhuC3jL9F0idMXck445HvUzrWXW+82jxbx/Jf2dbGMER+Jqx/eDy9F/kcT8zELB94yIbIMlPuaLAOS5jRCD2MJV1DeRT1pODmQYngLITOmXo7L+DEKPYfIs6Z7IIMkW486iabX+rv9GxZuGXmEUgxHTpgOywZXCqJrHs1+0vPo11i36bDgsGW5H9up1CukAGKpPryZ/5Y5T5/7AJRrmgCTc6TRDAjnzdWywWSLcXC06iHjkxJZQ4472sack7YZjRi6teVB2BrdqPJsyAbT+wsTN+t+q1uFbG7aoVq6oRGMSEf84YEduai5VdaeJYKD7DNjndyvF1P6XYRwVQdxWh3XQbBu/3bgmbLKRowGY6TA2Z3XV4e9YQI4JT/8a0gaDFzcPDznLmFjsQ/60xt3JdqLZWaTOpSeq/7FTNKDKci2BesogYcoi35plHnHs7oWR6OfqHjUnWLJRKsowLuwILs0OILHP54l4On6kc8R4qWJ6bFJT1QCIz8r1Y5hkDJIEdBgvbWNyG6ZO6XWf6+4tkwenW46CILMt1q6//DJt7xNG0Z2CIAq5A+e35U8oW4t+31uhEUsvJgsPvl8aCT48qpoFAtTaS2Nk83LSLe181Uo16fC/HNO+zYDIGvDhH9Op+j2NkPvmsn+gzKwGVf1D8yxZfKjISx4Ko8Z6fGwSNeh6beH7towyMRQKY9kAGHb/F2iR2VNkUy2EQoKiOyzOHgWBjz/VXz8ffyn2LBsw97BTAQ4/NEK4kzJ36BaEENtCuKz2Bqt0OMqfREgD3Ovyji9oXuo+74bvgJOz57Xf33jvM34kfbIlxkV9xilAyyabhpF3gwizObhiDzPMjn9q2YJd43ros+vk4bacK", "base64")).toString(); + return hook; + }; + }, + 761: (module3) => { + "use strict"; + module3.exports = require("zlib"); + ; + } + }; + var __webpack_module_cache__ = {}; + function __webpack_require__(moduleId) { + if (__webpack_module_cache__[moduleId]) { + return __webpack_module_cache__[moduleId].exports; + } + var module3 = __webpack_module_cache__[moduleId] = { + exports: {} + }; + __webpack_modules__[moduleId](module3, module3.exports, __webpack_require__); + return module3.exports; + } + (() => { + __webpack_require__.n = (module3) => { + var getter = module3 && module3.__esModule ? () => module3["default"] : () => module3; + __webpack_require__.d(getter, { a: getter }); + return getter; + }; + })(); + (() => { + __webpack_require__.d = (exports3, definition) => { + for (var key in definition) { + if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports3, key)) { + Object.defineProperty(exports3, key, { enumerable: true, get: definition[key] }); + } + } + }; + })(); + (() => { + __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop); + })(); + (() => { + __webpack_require__.r = (exports3) => { + if (typeof Symbol !== "undefined" && Symbol.toStringTag) { + Object.defineProperty(exports3, Symbol.toStringTag, { value: "Module" }); + } + Object.defineProperty(exports3, "__esModule", { value: true }); + }; + })(); + return __webpack_require__(862); + })(); + } +}); + +// ../lockfile-to-pnp/lib/index.js +var require_lib84 = __commonJS({ + "../lockfile-to-pnp/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.lockfileToPackageRegistry = exports2.writePnpFile = exports2.lockfileToPnp = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var config_1 = __importDefault(require_lib10()); + var lockfile_file_1 = require_lib57(); + var lockfile_utils_1 = require_lib53(); + var read_project_manifest_1 = __importDefault(require_lib19()); + var dependency_path_1 = require_lib33(); + var pnp_1 = require_lib83(); + var normalize_path_1 = __importDefault(require_normalize_path()); + async function lockfileToPnp(lockfileDir) { + const lockfile = await lockfile_file_1.readWantedLockfile(lockfileDir, { ignoreIncompatible: true }); + if (lockfile == null) + throw new Error("Cannot generate a .pnp.cjs without a lockfile"); + const importerNames = {}; + await Promise.all(Object.keys(lockfile.importers).map(async (importerId) => { + const importerDirectory = path_1.default.join(lockfileDir, importerId); + const { manifest } = await read_project_manifest_1.default(importerDirectory); + importerNames[importerId] = manifest.name; + })); + const { config: { registries, virtualStoreDir } } = await config_1.default({ + cliOptions: {}, + packageManager: { name: "pnpm", version: "*" } + }); + await writePnpFile(lockfile, { + importerNames, + lockfileDir, + registries, + virtualStoreDir: virtualStoreDir !== null && virtualStoreDir !== void 0 ? virtualStoreDir : path_1.default.join(lockfileDir, "node_modules/.pnpm") + }); + } + exports2.lockfileToPnp = lockfileToPnp; + async function writePnpFile(lockfile, opts) { + const packageRegistry = lockfileToPackageRegistry(lockfile, opts); + const loaderFile = pnp_1.generateInlinedScript({ + blacklistedLocations: void 0, + dependencyTreeRoots: [], + ignorePattern: void 0, + packageRegistry, + shebang: void 0 + }); + await fs_1.promises.writeFile(path_1.default.join(opts.lockfileDir, ".pnp.cjs"), loaderFile, "utf8"); + } + exports2.writePnpFile = writePnpFile; + function lockfileToPackageRegistry(lockfile, opts) { + var _a; + const packageRegistry = new Map(); + for (const importerId of Object.keys(lockfile.importers)) { + const importer = lockfile.importers[importerId]; + if (importerId === ".") { + const packageStore = new Map([ + [ + null, + { + packageDependencies: new Map([ + ...importer.dependencies != null ? toPackageDependenciesMap(lockfile, importer.dependencies) : [], + ...importer.optionalDependencies != null ? toPackageDependenciesMap(lockfile, importer.optionalDependencies) : [], + ...importer.devDependencies != null ? toPackageDependenciesMap(lockfile, importer.devDependencies) : [] + ]), + packageLocation: "./" + } + ] + ]); + packageRegistry.set(null, packageStore); + } else { + const name = opts.importerNames[importerId]; + const packageStore = new Map([ + [ + importerId, + { + packageDependencies: new Map([ + [name, importerId], + ...importer.dependencies != null ? toPackageDependenciesMap(lockfile, importer.dependencies, importerId) : [], + ...importer.optionalDependencies != null ? toPackageDependenciesMap(lockfile, importer.optionalDependencies, importerId) : [], + ...importer.devDependencies != null ? toPackageDependenciesMap(lockfile, importer.devDependencies, importerId) : [] + ]), + packageLocation: `./${importerId}` + } + ] + ]); + packageRegistry.set(name, packageStore); + } + } + for (const [relDepPath, pkgSnapshot] of Object.entries((_a = lockfile.packages) !== null && _a !== void 0 ? _a : {})) { + const { name, version, peersSuffix } = lockfile_utils_1.nameVerFromPkgSnapshot(relDepPath, pkgSnapshot); + const pnpVersion = toPnPVersion(version, peersSuffix); + let packageStore = packageRegistry.get(name); + if (!packageStore) { + packageStore = new Map(); + packageRegistry.set(name, packageStore); + } + let packageLocation = normalize_path_1.default(path_1.default.relative(opts.lockfileDir, path_1.default.join(opts.virtualStoreDir, dependency_path_1.depPathToFilename(relDepPath, opts.lockfileDir), "node_modules", name))); + if (!packageLocation.startsWith("../")) { + packageLocation = `./${packageLocation}`; + } + packageStore.set(pnpVersion, { + packageDependencies: new Map([ + [name, pnpVersion], + ...pkgSnapshot.dependencies != null ? toPackageDependenciesMap(lockfile, pkgSnapshot.dependencies) : [], + ...pkgSnapshot.optionalDependencies != null ? toPackageDependenciesMap(lockfile, pkgSnapshot.optionalDependencies) : [] + ]), + packageLocation + }); + } + return packageRegistry; + } + exports2.lockfileToPackageRegistry = lockfileToPackageRegistry; + function toPackageDependenciesMap(lockfile, deps, importerId) { + return Object.entries(deps).map(([depAlias, ref]) => { + if (importerId && ref.startsWith("link:")) { + return [depAlias, path_1.default.join(importerId, ref.substr(5))]; + } + const relDepPath = dependency_path_1.refToRelative(ref, depAlias); + if (!relDepPath) + return [depAlias, ref]; + const { name, version, peersSuffix } = lockfile_utils_1.nameVerFromPkgSnapshot(relDepPath, lockfile.packages[relDepPath]); + const pnpVersion = toPnPVersion(version, peersSuffix); + if (depAlias === name) { + return [depAlias, pnpVersion]; + } + return [depAlias, [name, pnpVersion]]; + }); + } + function toPnPVersion(version, peersSuffix) { + return peersSuffix ? `virtual:${version}_${peersSuffix}#${version}` : version; + } + } +}); + +// ../headless/lib/index.js +var require_lib85 = __commonJS({ + "../headless/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var build_modules_1 = __importDefault(require_lib81()); + var constants_1 = require_lib7(); + var core_loggers_1 = require_lib12(); + var error_1 = __importDefault(require_lib8()); + var filter_lockfile_1 = require_lib71(); + var hoist_1 = __importDefault(require_lib82()); + var lifecycle_1 = require_lib80(); + var link_bins_1 = __importStar2(require_lib70()); + var lockfile_file_1 = require_lib57(); + var lockfile_to_pnp_1 = require_lib84(); + var lockfile_utils_1 = require_lib53(); + var logger_1 = __importStar2(require_lib6()); + var modules_cleaner_1 = require_lib73(); + var modules_yaml_1 = require_lib64(); + var package_is_installable_1 = __importDefault(require_lib13()); + var read_package_json_1 = require_lib32(); + var read_project_manifest_1 = require_lib19(); + var symlink_dependency_1 = __importStar2(require_lib75()); + var dp = __importStar2(require_lib33()); + var p_limit_1 = __importDefault(require_p_limit()); + var path_absolute_1 = __importDefault(require_path_absolute()); + var path_exists_1 = __importDefault(require_path_exists()); + var equals_1 = __importDefault(require_equals2()); + var fromPairs_1 = __importDefault(require_fromPairs()); + var omit_1 = __importDefault(require_omit()); + var props_1 = __importDefault(require_props()); + var realpath_missing_1 = __importDefault(require_realpath_missing()); + var brokenModulesLogger = logger_1.default("_broken_node_modules"); + exports2.default = async (opts) => { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; + const reporter = opts.reporter; + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.on("data", reporter); + } + const lockfileDir = opts.lockfileDir; + const wantedLockfile = (_a = opts.wantedLockfile) !== null && _a !== void 0 ? _a : await lockfile_file_1.readWantedLockfile(lockfileDir, { ignoreIncompatible: false }); + if (wantedLockfile == null) { + throw new Error(`Headless installation requires a ${constants_1.WANTED_LOCKFILE} file`); + } + const relativeModulesDir = (_b = opts.modulesDir) !== null && _b !== void 0 ? _b : "node_modules"; + const rootModulesDir = await realpath_missing_1.default(path_1.default.join(lockfileDir, relativeModulesDir)); + const virtualStoreDir = path_absolute_1.default((_c = opts.virtualStoreDir) !== null && _c !== void 0 ? _c : path_1.default.join(relativeModulesDir, ".pnpm"), lockfileDir); + const currentLockfile = (_d = opts.currentLockfile) !== null && _d !== void 0 ? _d : await lockfile_file_1.readCurrentLockfile(virtualStoreDir, { ignoreIncompatible: false }); + const hoistedModulesDir = path_1.default.join(virtualStoreDir, "node_modules"); + const publicHoistedModulesDir = rootModulesDir; + if (!opts.ignorePackageManifest) { + for (const { id, manifest, rootDir } of opts.projects) { + if (!lockfile_utils_1.satisfiesPackageManifest(wantedLockfile, manifest, id)) { + throw new error_1.default("OUTDATED_LOCKFILE", `Cannot install with "frozen-lockfile" because ${constants_1.WANTED_LOCKFILE} is not up-to-date with ` + path_1.default.relative(lockfileDir, path_1.default.join(rootDir, "package.json"))); + } + } + } + const scriptsOpts = { + optional: false, + extraBinPaths: opts.extraBinPaths, + rawConfig: opts.rawConfig, + scriptShell: opts.scriptShell, + shellEmulator: opts.shellEmulator, + stdio: (_e = opts.ownLifecycleHooksStdio) !== null && _e !== void 0 ? _e : "inherit", + unsafePerm: opts.unsafePerm || false + }; + const skipped = opts.skipped || new Set(); + if (currentLockfile != null && !opts.ignorePackageManifest) { + await modules_cleaner_1.prune(opts.projects, { + currentLockfile, + dryRun: false, + hoistedDependencies: opts.hoistedDependencies, + hoistedModulesDir: opts.hoistPattern == null ? void 0 : hoistedModulesDir, + include: opts.include, + lockfileDir, + pruneStore: opts.pruneStore, + pruneVirtualStore: opts.pruneVirtualStore, + publicHoistedModulesDir: opts.publicHoistPattern == null ? void 0 : publicHoistedModulesDir, + registries: opts.registries, + skipped, + storeController: opts.storeController, + virtualStoreDir, + wantedLockfile + }); + } else { + core_loggers_1.statsLogger.debug({ + prefix: lockfileDir, + removed: 0 + }); + } + core_loggers_1.stageLogger.debug({ + prefix: lockfileDir, + stage: "importing_started" + }); + const filterOpts = { + include: opts.include, + registries: opts.registries, + skipped + }; + const importerIds = opts.ignorePackageManifest ? Object.keys(wantedLockfile.importers) : opts.projects.map(({ id }) => id); + const filteredLockfile = filter_lockfile_1.filterLockfileByImportersAndEngine(wantedLockfile, importerIds, { + ...filterOpts, + currentEngine: opts.currentEngine, + engineStrict: opts.engineStrict, + failOnMissingDependencies: true, + includeIncompatiblePackages: opts.force, + lockfileDir + }); + const { directDependenciesByImporterId, graph } = await lockfileToDepGraph(filteredLockfile, opts.force ? null : currentLockfile, { + ...opts, + importerIds, + lockfileDir, + skipped, + virtualStoreDir, + nodeVersion: opts.currentEngine.nodeVersion, + pnpmVersion: opts.currentEngine.pnpmVersion + }); + if (opts.enablePnp) { + const importerNames = fromPairs_1.default(opts.projects.map(({ manifest, id }) => { + var _a2; + return [id, (_a2 = manifest.name) !== null && _a2 !== void 0 ? _a2 : id]; + })); + await lockfile_to_pnp_1.writePnpFile(filteredLockfile, { + importerNames, + lockfileDir, + virtualStoreDir, + registries: opts.registries + }); + } + const depNodes = Object.values(graph); + core_loggers_1.statsLogger.debug({ + added: depNodes.length, + prefix: lockfileDir + }); + function warn(message2) { + logger_1.default.info({ + message: message2, + prefix: lockfileDir + }); + } + if (opts.enableModulesDir !== false) { + await Promise.all(depNodes.map(async (depNode) => fs_1.promises.mkdir(depNode.modules, { recursive: true }))); + await Promise.all([ + opts.symlink === false ? Promise.resolve() : linkAllModules(depNodes, { + lockfileDir, + optional: opts.include.optionalDependencies + }), + linkAllPkgs(opts.storeController, depNodes, { + force: opts.force, + lockfileDir: opts.lockfileDir, + targetEngine: opts.sideEffectsCacheRead && constants_1.ENGINE_NAME || void 0 + }) + ]); + core_loggers_1.stageLogger.debug({ + prefix: lockfileDir, + stage: "importing_done" + }); + let newHoistedDependencies; + if (opts.ignorePackageManifest !== true && (opts.hoistPattern != null || opts.publicHoistPattern != null)) { + const hoistLockfile = { + ...filteredLockfile, + packages: omit_1.default(Array.from(skipped), filteredLockfile.packages) + }; + newHoistedDependencies = await hoist_1.default({ + extendNodePath: opts.extendNodePath, + lockfile: hoistLockfile, + lockfileDir, + privateHoistedModulesDir: hoistedModulesDir, + privateHoistPattern: (_f = opts.hoistPattern) !== null && _f !== void 0 ? _f : [], + publicHoistedModulesDir, + publicHoistPattern: (_g = opts.publicHoistPattern) !== null && _g !== void 0 ? _g : [], + virtualStoreDir + }); + } else { + newHoistedDependencies = {}; + } + if (opts.ignoreScripts) { + for (const { id, manifest } of opts.projects) { + if (opts.ignoreScripts && (manifest === null || manifest === void 0 ? void 0 : manifest.scripts) != null && ((_l = (_k = (_j = (_h = manifest.scripts.preinstall) !== null && _h !== void 0 ? _h : manifest.scripts.prepublish) !== null && _j !== void 0 ? _j : manifest.scripts.install) !== null && _k !== void 0 ? _k : manifest.scripts.postinstall) !== null && _l !== void 0 ? _l : manifest.scripts.prepare)) { + opts.pendingBuilds.push(id); + } + } + opts.pendingBuilds = opts.pendingBuilds.concat(depNodes.filter(({ requiresBuild }) => requiresBuild).map(({ depPath }) => depPath)); + } else { + const directNodes = new Set(); + for (const id of importerIds) { + Object.values(directDependenciesByImporterId[id]).filter((loc) => graph[loc]).forEach((loc) => { + directNodes.add(loc); + }); + } + const extraBinPaths = [...(_m = opts.extraBinPaths) !== null && _m !== void 0 ? _m : []]; + if (opts.hoistPattern != null) { + extraBinPaths.unshift(path_1.default.join(virtualStoreDir, "node_modules/.bin")); + } + let extraEnv; + if (opts.enablePnp) { + extraEnv = lifecycle_1.makeNodeRequireOption(path_1.default.join(opts.lockfileDir, ".pnp.cjs")); + } + await build_modules_1.default(graph, Array.from(directNodes), { + childConcurrency: opts.childConcurrency, + extraBinPaths, + extendNodePath: opts.extendNodePath, + extraEnv, + lockfileDir, + optional: opts.include.optionalDependencies, + rawConfig: opts.rawConfig, + rootModulesDir: virtualStoreDir, + scriptShell: opts.scriptShell, + shellEmulator: opts.shellEmulator, + sideEffectsCacheWrite: opts.sideEffectsCacheWrite, + storeController: opts.storeController, + unsafePerm: opts.unsafePerm, + userAgent: opts.userAgent + }); + } + await modules_yaml_1.write(rootModulesDir, { + hoistedDependencies: newHoistedDependencies, + hoistPattern: opts.hoistPattern, + included: opts.include, + layoutVersion: constants_1.LAYOUT_VERSION, + packageManager: `${opts.packageManager.name}@${opts.packageManager.version}`, + pendingBuilds: opts.pendingBuilds, + publicHoistPattern: opts.publicHoistPattern, + prunedAt: opts.pruneVirtualStore === true || opts.prunedAt == null ? new Date().toUTCString() : opts.prunedAt, + registries: opts.registries, + skipped: Array.from(skipped), + storeDir: opts.storeDir, + virtualStoreDir + }); + await linkAllBins(graph, { extendNodePath: opts.extendNodePath, optional: opts.include.optionalDependencies, warn }); + if (currentLockfile != null && !equals_1.default(importerIds.sort(), Object.keys(filteredLockfile.importers).sort())) { + Object.assign(filteredLockfile.packages, currentLockfile.packages); + } + await lockfile_file_1.writeCurrentLockfile(virtualStoreDir, filteredLockfile); + if (!opts.ignorePackageManifest) { + await Promise.all(opts.projects.map(async ({ rootDir, id, manifest, modulesDir }) => { + if (opts.symlink !== false) { + await linkRootPackages(filteredLockfile, { + importerId: id, + importerModulesDir: modulesDir, + lockfileDir, + projectDir: rootDir, + projects: opts.projects, + registries: opts.registries, + rootDependencies: directDependenciesByImporterId[id] + }); + } + core_loggers_1.packageManifestLogger.debug({ + prefix: rootDir, + updated: manifest + }); + })); + await Promise.all(opts.projects.map(async (project) => { + var _a2; + if (((_a2 = opts.publicHoistPattern) === null || _a2 === void 0 ? void 0 : _a2.length) && path_1.default.relative(opts.lockfileDir, project.rootDir) === "") { + await linkBinsOfImporter(project, { extendNodePath: opts.extendNodePath }); + } else { + const directPkgDirs = Object.values(directDependenciesByImporterId[project.id]); + await link_bins_1.linkBinsOfPackages((await Promise.all(directPkgDirs.map(async (dir) => ({ + location: dir, + manifest: await read_project_manifest_1.safeReadProjectManifestOnly(dir) + })))).filter(({ manifest }) => manifest != null), project.binsDir, { warn: (message2) => logger_1.default.info({ message: message2, prefix: project.rootDir }) }); + } + })); + } + } + await Promise.all(depNodes.map(({ finishing }) => finishing)); + core_loggers_1.summaryLogger.debug({ prefix: lockfileDir }); + await opts.storeController.close(); + if (!opts.ignoreScripts && !opts.ignorePackageManifest) { + await lifecycle_1.runLifecycleHooksConcurrently(["preinstall", "install", "postinstall", "prepublish", "prepare"], opts.projects, (_o = opts.childConcurrency) !== null && _o !== void 0 ? _o : 5, scriptsOpts); + } + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.removeListener("data", reporter); + } + }; + async function linkBinsOfImporter({ manifest, modulesDir, binsDir, rootDir }, opts) { + const warn = (message2) => logger_1.default.info({ message: message2, prefix: rootDir }); + return link_bins_1.default(modulesDir, binsDir, { + allowExoticManifests: true, + extendNodePath: opts.extendNodePath, + projectManifest: manifest, + warn + }); + } + async function linkRootPackages(lockfile, opts) { + const importerManifestsByImporterId = {}; + for (const { id, manifest } of opts.projects) { + importerManifestsByImporterId[id] = manifest; + } + const projectSnapshot = lockfile.importers[opts.importerId]; + const allDeps = { + ...projectSnapshot.devDependencies, + ...projectSnapshot.dependencies, + ...projectSnapshot.optionalDependencies + }; + return Promise.all(Object.keys(allDeps).map(async (alias) => { + var _a, _b, _c, _d, _e, _f, _g; + if (allDeps[alias].startsWith("link:")) { + const isDev2 = Boolean((_a = projectSnapshot.devDependencies) === null || _a === void 0 ? void 0 : _a[alias]); + const isOptional2 = Boolean((_b = projectSnapshot.optionalDependencies) === null || _b === void 0 ? void 0 : _b[alias]); + const packageDir = path_1.default.join(opts.projectDir, allDeps[alias].substr(5)); + const linkedPackage = await (async () => { + const importerId = lockfile_file_1.getLockfileImporterId(opts.lockfileDir, packageDir); + if (importerManifestsByImporterId[importerId]) { + return importerManifestsByImporterId[importerId]; + } + try { + return await read_project_manifest_1.readProjectManifestOnly(packageDir); + } catch (err) { + if (err["code"] !== "ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND") + throw err; + return { name: alias, version: "0.0.0" }; + } + })(); + await symlink_dependency_1.symlinkDirectRootDependency(packageDir, opts.importerModulesDir, alias, { + fromDependenciesField: isDev2 && "devDependencies" || isOptional2 && "optionalDependencies" || "dependencies", + linkedPackage, + prefix: opts.projectDir + }); + return; + } + const dir = opts.rootDependencies[alias]; + if (!dir) { + return; + } + if ((await symlink_dependency_1.default(dir, opts.importerModulesDir, alias)).reused) { + return; + } + const isDev = Boolean((_c = projectSnapshot.devDependencies) === null || _c === void 0 ? void 0 : _c[alias]); + const isOptional = Boolean((_d = projectSnapshot.optionalDependencies) === null || _d === void 0 ? void 0 : _d[alias]); + const depPath = dp.refToRelative(allDeps[alias], alias); + if (depPath === null) + return; + const pkgSnapshot = (_e = lockfile.packages) === null || _e === void 0 ? void 0 : _e[depPath]; + if (pkgSnapshot == null) + return; + const pkgId = (_g = (_f = pkgSnapshot.id) !== null && _f !== void 0 ? _f : dp.refToAbsolute(allDeps[alias], alias, opts.registries)) !== null && _g !== void 0 ? _g : void 0; + const pkgInfo = lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot); + core_loggers_1.rootLogger.debug({ + added: { + dependencyType: isDev && "dev" || isOptional && "optional" || "prod", + id: pkgId, + name: alias, + realName: pkgInfo.name, + version: pkgInfo.version + }, + prefix: opts.projectDir + }); + })); + } + async function lockfileToDepGraph(lockfile, currentLockfile, opts) { + var _a; + const currentPackages = (_a = currentLockfile === null || currentLockfile === void 0 ? void 0 : currentLockfile.packages) !== null && _a !== void 0 ? _a : {}; + const graph = {}; + const directDependenciesByImporterId = {}; + if (lockfile.packages != null) { + const pkgSnapshotByLocation = {}; + await Promise.all(Object.keys(lockfile.packages).map(async (depPath) => { + var _a2; + if (opts.skipped.has(depPath)) + return; + const pkgSnapshot = lockfile.packages[depPath]; + const { name: pkgName, version: pkgVersion } = lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot); + const modules = path_1.default.join(opts.virtualStoreDir, dp.depPathToFilename(depPath, opts.lockfileDir), "node_modules"); + const packageId = lockfile_utils_1.packageIdFromSnapshot(depPath, pkgSnapshot, opts.registries); + const pkg = { + name: pkgName, + version: pkgVersion, + engines: pkgSnapshot.engines, + cpu: pkgSnapshot.cpu, + os: pkgSnapshot.os + }; + if (!opts.force && package_is_installable_1.default(packageId, pkg, { + engineStrict: opts.engineStrict, + lockfileDir: opts.lockfileDir, + nodeVersion: opts.nodeVersion, + optional: pkgSnapshot.optional === true, + pnpmVersion: opts.pnpmVersion + }) === false) { + opts.skipped.add(depPath); + return; + } + const dir = path_1.default.join(modules, pkgName); + if (currentPackages[depPath] && equals_1.default(currentPackages[depPath].dependencies, lockfile.packages[depPath].dependencies) && equals_1.default(currentPackages[depPath].optionalDependencies, lockfile.packages[depPath].optionalDependencies)) { + if (await path_exists_1.default(dir)) { + return; + } + brokenModulesLogger.debug({ + missing: dir + }); + } + const resolution = lockfile_utils_1.pkgSnapshotToResolution(depPath, pkgSnapshot, opts.registries); + core_loggers_1.progressLogger.debug({ + packageId, + requester: opts.lockfileDir, + status: "resolved" + }); + let fetchResponse; + try { + fetchResponse = opts.storeController.fetchPackage({ + force: false, + lockfileDir: opts.lockfileDir, + pkg: { + name: pkgName, + version: pkgVersion, + id: packageId, + resolution + } + }); + if (fetchResponse instanceof Promise) + fetchResponse = await fetchResponse; + } catch (err) { + if (pkgSnapshot.optional) + return; + throw err; + } + fetchResponse.files().then(({ fromStore }) => { + core_loggers_1.progressLogger.debug({ + packageId, + requester: opts.lockfileDir, + status: fromStore ? "found_in_store" : "fetched" + }); + }).catch(() => { + }); + graph[dir] = { + children: {}, + depPath, + dir, + fetchingFiles: fetchResponse.files, + filesIndexFile: fetchResponse.filesIndexFile, + finishing: fetchResponse.finishing, + hasBin: pkgSnapshot.hasBin === true, + hasBundledDependencies: pkgSnapshot.bundledDependencies != null, + modules, + name: pkgName, + optional: !!pkgSnapshot.optional, + optionalDependencies: new Set(Object.keys((_a2 = pkgSnapshot.optionalDependencies) !== null && _a2 !== void 0 ? _a2 : {})), + prepare: pkgSnapshot.prepare === true, + requiresBuild: pkgSnapshot.requiresBuild === true + }; + pkgSnapshotByLocation[dir] = pkgSnapshot; + })); + const ctx = { + force: opts.force, + graph, + lockfileDir: opts.lockfileDir, + pkgSnapshotsByDepPaths: lockfile.packages, + registries: opts.registries, + sideEffectsCacheRead: opts.sideEffectsCacheRead, + skipped: opts.skipped, + storeController: opts.storeController, + storeDir: opts.storeDir, + virtualStoreDir: opts.virtualStoreDir + }; + for (const dir of Object.keys(graph)) { + const pkgSnapshot = pkgSnapshotByLocation[dir]; + const allDeps = { + ...pkgSnapshot.dependencies, + ...opts.include.optionalDependencies ? pkgSnapshot.optionalDependencies : {} + }; + const peerDeps = pkgSnapshot.peerDependencies ? new Set(Object.keys(pkgSnapshot.peerDependencies)) : null; + graph[dir].children = await getChildrenPaths(ctx, allDeps, peerDeps, "."); + } + for (const importerId of opts.importerIds) { + const projectSnapshot = lockfile.importers[importerId]; + const rootDeps = { + ...opts.include.devDependencies ? projectSnapshot.devDependencies : {}, + ...opts.include.dependencies ? projectSnapshot.dependencies : {}, + ...opts.include.optionalDependencies ? projectSnapshot.optionalDependencies : {} + }; + directDependenciesByImporterId[importerId] = await getChildrenPaths(ctx, rootDeps, null, importerId); + } + } + return { graph, directDependenciesByImporterId }; + } + async function getChildrenPaths(ctx, allDeps, peerDeps, importerId) { + const children = {}; + for (const alias of Object.keys(allDeps)) { + const childDepPath = dp.refToAbsolute(allDeps[alias], alias, ctx.registries); + if (childDepPath === null) { + children[alias] = path_1.default.resolve(ctx.lockfileDir, importerId, allDeps[alias].substr(5)); + continue; + } + const childRelDepPath = dp.refToRelative(allDeps[alias], alias); + const childPkgSnapshot = ctx.pkgSnapshotsByDepPaths[childRelDepPath]; + if (ctx.graph[childRelDepPath]) { + children[alias] = ctx.graph[childRelDepPath].dir; + } else if (childPkgSnapshot) { + if (ctx.skipped.has(childRelDepPath)) + continue; + const pkgName = lockfile_utils_1.nameVerFromPkgSnapshot(childRelDepPath, childPkgSnapshot).name; + children[alias] = path_1.default.join(ctx.virtualStoreDir, dp.depPathToFilename(childRelDepPath, ctx.lockfileDir), "node_modules", pkgName); + } else if (allDeps[alias].indexOf("file:") === 0) { + children[alias] = path_1.default.resolve(ctx.lockfileDir, allDeps[alias].substr(5)); + } else if (!ctx.skipped.has(childRelDepPath) && (peerDeps == null || !peerDeps.has(alias))) { + throw new Error(`${childRelDepPath} not found in ${constants_1.WANTED_LOCKFILE}`); + } + } + return children; + } + var limitLinking = p_limit_1.default(16); + async function linkAllPkgs(storeController, depNodes, opts) { + return Promise.all(depNodes.map(async (depNode) => { + let filesResponse; + try { + filesResponse = await depNode.fetchingFiles(); + } catch (err) { + if (depNode.optional) + return; + throw err; + } + const { importMethod, isBuilt } = await storeController.importPackage(depNode.dir, { + filesResponse, + force: opts.force, + targetEngine: opts.targetEngine + }); + if (importMethod) { + core_loggers_1.progressLogger.debug({ + method: importMethod, + requester: opts.lockfileDir, + status: "imported", + to: depNode.dir + }); + } + depNode.isBuilt = isBuilt; + })); + } + async function linkAllBins(depGraph, opts) { + return Promise.all(Object.values(depGraph).map(async (depNode) => limitLinking(async () => { + const childrenToLink = opts.optional ? depNode.children : Object.keys(depNode.children).reduce((nonOptionalChildren, childAlias) => { + if (!depNode.optionalDependencies.has(childAlias)) { + nonOptionalChildren[childAlias] = depNode.children[childAlias]; + } + return nonOptionalChildren; + }, {}); + const binPath = path_1.default.join(depNode.dir, "node_modules/.bin"); + const pkgSnapshots = props_1.default(Object.values(childrenToLink), depGraph); + if (pkgSnapshots.includes(void 0)) { + await link_bins_1.default(depNode.modules, binPath, { extendNodePath: opts.extendNodePath, warn: opts.warn }); + } else { + const pkgs = await Promise.all(pkgSnapshots.filter(({ hasBin }) => hasBin).map(async ({ dir }) => ({ + location: dir, + manifest: await read_package_json_1.fromDir(dir) + }))); + await link_bins_1.linkBinsOfPackages(pkgs, binPath, { extendNodePath: opts.extendNodePath, warn: opts.warn }); + } + if (depNode.hasBundledDependencies) { + const bundledModules = path_1.default.join(depNode.dir, "node_modules"); + await link_bins_1.default(bundledModules, binPath, { extendNodePath: opts.extendNodePath, warn: opts.warn }); + } + }))); + } + async function linkAllModules(depNodes, opts) { + await Promise.all(depNodes.map(async (depNode) => { + const childrenToLink = opts.optional ? depNode.children : Object.keys(depNode.children).reduce((nonOptionalChildren, childAlias) => { + if (!depNode.optionalDependencies.has(childAlias)) { + nonOptionalChildren[childAlias] = depNode.children[childAlias]; + } + return nonOptionalChildren; + }, {}); + await Promise.all(Object.keys(childrenToLink).map(async (alias) => { + if (alias === depNode.name) { + logger_1.default.warn({ + message: `Cannot link dependency with name ${alias} to ${depNode.modules}. Dependency's name should differ from the parent's name.`, + prefix: opts.lockfileDir + }); + return; + } + await limitLinking(async () => symlink_dependency_1.default(childrenToLink[alias], depNode.modules, alias)); + })); + })); + } + } +}); + +// ../resolve-dependencies/lib/depPathToRef.js +var require_depPathToRef = __commonJS({ + "../resolve-dependencies/lib/depPathToRef.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var dependency_path_1 = require_lib33(); + var encode_registry_1 = __importDefault(require_encode_registry()); + function depPathToRef(depPath, opts) { + if (opts.resolution.type) + return depPath; + const registryName = encode_registry_1.default(dependency_path_1.getRegistryByPackageName(opts.registries, opts.realName)); + if (depPath.startsWith(`${registryName}/`)) { + depPath = depPath.replace(`${registryName}/`, "/"); + } + if (depPath[0] === "/" && opts.alias === opts.realName) { + const ref = depPath.replace(`/${opts.realName}/`, ""); + if (!ref.includes("/")) + return ref; + } + return depPath; + } + exports2.default = depPathToRef; + } +}); + +// ../resolve-dependencies/lib/nodeIdUtils.js +var require_nodeIdUtils = __commonJS({ + "../resolve-dependencies/lib/nodeIdUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.splitNodeId = exports2.createNodeId = exports2.nodeIdContainsSequence = void 0; + function nodeIdContainsSequence(nodeId, pkgId1, pkgId2) { + const pkgIds = splitNodeId(nodeId); + pkgIds.pop(); + const pkg1Index = pkgIds.indexOf(pkgId1); + if (pkg1Index === -1) + return false; + const pkg2Index = pkgIds.indexOf(pkgId2); + return pkg2Index > -1 && pkg1Index < pkg2Index; + } + exports2.nodeIdContainsSequence = nodeIdContainsSequence; + function createNodeId(parentNodeId, pkgId) { + return `${parentNodeId}${pkgId}>`; + } + exports2.createNodeId = createNodeId; + function splitNodeId(nodeId) { + return nodeId.substr(1, nodeId.length - 2).split(">"); + } + exports2.splitNodeId = splitNodeId; + } +}); + +// ../../node_modules/.pnpm/replace-string@3.1.0/node_modules/replace-string/index.js +var require_replace_string = __commonJS({ + "../../node_modules/.pnpm/replace-string@3.1.0/node_modules/replace-string/index.js"(exports2, module2) { + "use strict"; + module2.exports = (string, needle, replacement, options = {}) => { + if (typeof string !== "string") { + throw new TypeError(`Expected input to be a string, got ${typeof string}`); + } + if (!(typeof needle === "string" && needle.length > 0) || !(typeof replacement === "string" || typeof replacement === "function")) { + return string; + } + let result = ""; + let matchCount = 0; + let prevIndex = options.fromIndex > 0 ? options.fromIndex : 0; + if (prevIndex > string.length) { + return string; + } + while (true) { + const index = options.caseInsensitive ? string.toLowerCase().indexOf(needle.toLowerCase(), prevIndex) : string.indexOf(needle, prevIndex); + if (index === -1) { + break; + } + matchCount++; + const replaceStr = typeof replacement === "string" ? replacement : replacement(string.slice(index, index + needle.length), matchCount, string, index); + const beginSlice = matchCount === 1 ? 0 : prevIndex; + result += string.slice(beginSlice, index) + replaceStr; + prevIndex = index + needle.length; + } + if (matchCount === 0) { + return string; + } + return result + string.slice(prevIndex); + }; + } +}); + +// ../resolve-dependencies/lib/encodePkgId.js +var require_encodePkgId = __commonJS({ + "../resolve-dependencies/lib/encodePkgId.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var replace_string_1 = __importDefault(require_replace_string()); + function encodePkgId(pkgId) { + return replace_string_1.default(replace_string_1.default(pkgId, "%", "%25"), ">", "%3E"); + } + exports2.default = encodePkgId; + } +}); + +// ../resolve-dependencies/lib/getNonDevWantedDependencies.js +var require_getNonDevWantedDependencies = __commonJS({ + "../resolve-dependencies/lib/getNonDevWantedDependencies.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function getNonDevWantedDependencies(pkg) { + var _a, _b; + const bd = (_a = pkg.bundleDependencies) !== null && _a !== void 0 ? _a : pkg.bundleDependencies; + const bundledDeps = new Set(Array.isArray(bd) ? bd : []); + bundledDeps.add(pkg.name); + const filterDeps = getNotBundledDeps.bind(null, bundledDeps); + return getWantedDependenciesFromGivenSet(filterDeps({ ...pkg.optionalDependencies, ...pkg.dependencies }), { + devDependencies: {}, + optionalDependencies: (_b = pkg.optionalDependencies) !== null && _b !== void 0 ? _b : {} + }); + } + exports2.default = getNonDevWantedDependencies; + function getWantedDependenciesFromGivenSet(deps, opts) { + if (!deps) + return []; + return Object.keys(deps).map((alias) => ({ + alias, + dev: !!opts.devDependencies[alias], + optional: !!opts.optionalDependencies[alias], + pref: deps[alias] + })); + } + function getNotBundledDeps(bundledDeps, deps) { + return Object.keys(deps).filter((depName) => !bundledDeps.has(depName)).reduce((notBundledDeps, depName) => { + notBundledDeps[depName] = deps[depName]; + return notBundledDeps; + }, {}); + } + } +}); + +// ../resolve-dependencies/lib/wantedDepIsLocallyAvailable.js +var require_wantedDepIsLocallyAvailable = __commonJS({ + "../resolve-dependencies/lib/wantedDepIsLocallyAvailable.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var parsePref_1 = __importDefault(require_parsePref3()); + var semver_1 = __importDefault(require_semver2()); + function wantedDepIsLocallyAvailable(workspacePackages, wantedDependency, opts) { + const spec = parsePref_1.default(wantedDependency.pref, wantedDependency.alias, opts.defaultTag || "latest", opts.registry); + if (spec == null || !workspacePackages[spec.name]) + return false; + return pickMatchingLocalVersionOrNull(workspacePackages[spec.name], spec) !== null; + } + exports2.default = wantedDepIsLocallyAvailable; + function pickMatchingLocalVersionOrNull(versions, spec) { + const localVersions = Object.keys(versions); + switch (spec.type) { + case "tag": + return semver_1.default.maxSatisfying(localVersions, "*"); + case "version": + return versions[spec.fetchSpec] ? spec.fetchSpec : null; + case "range": + return semver_1.default.maxSatisfying(localVersions, spec.fetchSpec, true); + default: + return null; + } + } + } +}); + +// ../resolve-dependencies/lib/resolveDependencies.js +var require_resolveDependencies = __commonJS({ + "../resolve-dependencies/lib/resolveDependencies.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.nodeIdToParents = void 0; + var path_1 = __importDefault(require("path")); + var core_loggers_1 = require_lib12(); + var error_1 = __importDefault(require_lib8()); + var lockfile_utils_1 = require_lib53(); + var logger_1 = __importDefault(require_lib6()); + var pick_registry_for_package_1 = __importDefault(require_lib50()); + var dp = __importStar2(require_lib33()); + var path_exists_1 = __importDefault(require_path_exists()); + var isEmpty_1 = __importDefault(require_isEmpty2()); + var semver_1 = __importDefault(require_semver2()); + var encodePkgId_1 = __importDefault(require_encodePkgId()); + var getNonDevWantedDependencies_1 = __importDefault(require_getNonDevWantedDependencies()); + var nodeIdUtils_1 = require_nodeIdUtils(); + var wantedDepIsLocallyAvailable_1 = __importDefault(require_wantedDepIsLocallyAvailable()); + var dependencyResolvedLogger = logger_1.default("_dependency_resolved"); + function nodeIdToParents(nodeId, resolvedPackagesByDepPath) { + return nodeIdUtils_1.splitNodeId(nodeId).slice(1).map((depPath) => { + const { id, name, version } = resolvedPackagesByDepPath[depPath]; + return { id, name, version }; + }); + } + exports2.nodeIdToParents = nodeIdToParents; + async function resolveDependencies(ctx, preferredVersions, wantedDependencies, options) { + const extendedWantedDeps = getDepsToResolve(wantedDependencies, ctx.wantedLockfile, { + preferredDependencies: options.preferredDependencies, + prefix: ctx.prefix, + proceed: options.proceed || ctx.forceFullResolution, + registries: ctx.registries, + resolvedDependencies: options.resolvedDependencies + }); + const postponedResolutionsQueue = []; + const pkgAddresses = (await Promise.all(extendedWantedDeps.map(async (extendedWantedDep) => resolveDependenciesOfDependency(postponedResolutionsQueue, ctx, preferredVersions, options, extendedWantedDep)))).filter(Boolean); + const newPreferredVersions = { ...preferredVersions }; + for (const { depPath } of pkgAddresses) { + const resolvedPackage = ctx.resolvedPackagesByDepPath[depPath]; + if (!resolvedPackage) + continue; + if (!newPreferredVersions[resolvedPackage.name]) { + newPreferredVersions[resolvedPackage.name] = {}; + } + newPreferredVersions[resolvedPackage.name][resolvedPackage.version] = "version"; + } + await Promise.all(postponedResolutionsQueue.map(async (postponedResolution) => postponedResolution(newPreferredVersions))); + return pkgAddresses; + } + exports2.default = resolveDependencies; + async function resolveDependenciesOfDependency(postponedResolutionsQueue, ctx, preferredVersions, options, extendedWantedDep) { + var _a, _b, _c; + const updateDepth = typeof extendedWantedDep.wantedDependency.updateDepth === "number" ? extendedWantedDep.wantedDependency.updateDepth : options.updateDepth; + const updateShouldContinue = options.currentDepth <= updateDepth; + const update = updateShouldContinue && (ctx.updateMatching == null || ((_a = extendedWantedDep.infoFromLockfile) === null || _a === void 0 ? void 0 : _a.dependencyLockfile) == null || ctx.updateMatching((_b = extendedWantedDep.infoFromLockfile.dependencyLockfile.name) !== null && _b !== void 0 ? _b : extendedWantedDep.wantedDependency.alias)) || Boolean(options.workspacePackages != null && wantedDepIsLocallyAvailable_1.default(options.workspacePackages, extendedWantedDep.wantedDependency, { defaultTag: ctx.defaultTag, registry: ctx.registries.default })); + const resolveDependencyOpts = { + currentDepth: options.currentDepth, + parentPkg: options.parentPkg, + preferredVersions, + workspacePackages: options.workspacePackages, + currentPkg: (_c = extendedWantedDep.infoFromLockfile) !== null && _c !== void 0 ? _c : void 0, + proceed: extendedWantedDep.proceed || updateShouldContinue, + update, + updateDepth + }; + const resolveDependencyResult = await resolveDependency(extendedWantedDep.wantedDependency, ctx, resolveDependencyOpts); + if (resolveDependencyResult == null) + return null; + if (resolveDependencyResult.isLinkedDependency) { + ctx.dependenciesTree[resolveDependencyResult.pkgId] = { + children: {}, + depth: -1, + installable: true, + resolvedPackage: { + name: resolveDependencyResult.name, + version: resolveDependencyResult.version + } + }; + return resolveDependencyResult; + } + if (!resolveDependencyResult.isNew) + return resolveDependencyResult; + postponedResolutionsQueue.push(async (preferredVersions2) => { + var _a2; + return resolveChildren(ctx, resolveDependencyResult, (_a2 = extendedWantedDep.infoFromLockfile) === null || _a2 === void 0 ? void 0 : _a2.dependencyLockfile, options.workspacePackages, options.currentDepth, updateDepth, preferredVersions2); + }); + return resolveDependencyResult; + } + async function resolveChildren(ctx, parentPkg, dependencyLockfile, workspacePackages, parentDepth, updateDepth, preferredVersions) { + var _a, _b; + const currentResolvedDependencies = dependencyLockfile != null ? { + ...dependencyLockfile.dependencies, + ...dependencyLockfile.optionalDependencies + } : void 0; + const resolvedDependencies = parentPkg.updated ? void 0 : currentResolvedDependencies; + const parentDependsOnPeer = Boolean(Object.keys((_b = (_a = dependencyLockfile === null || dependencyLockfile === void 0 ? void 0 : dependencyLockfile.peerDependencies) !== null && _a !== void 0 ? _a : parentPkg.pkg.peerDependencies) !== null && _b !== void 0 ? _b : {}).length); + const wantedDependencies = getNonDevWantedDependencies_1.default(parentPkg.pkg); + const children = await resolveDependencies(ctx, preferredVersions, wantedDependencies, { + currentDepth: parentDepth + 1, + parentPkg, + preferredDependencies: currentResolvedDependencies, + proceed: !parentPkg.depIsLinked || parentDependsOnPeer, + resolvedDependencies, + updateDepth, + workspacePackages + }); + ctx.childrenByParentDepPath[parentPkg.depPath] = children.map((child) => ({ + alias: child.alias, + depPath: child.depPath + })); + ctx.dependenciesTree[parentPkg.nodeId] = { + children: children.reduce((chn, child) => { + var _a2; + chn[child.alias] = (_a2 = child["nodeId"]) !== null && _a2 !== void 0 ? _a2 : child.pkgId; + return chn; + }, {}), + depth: parentDepth, + installable: parentPkg.installable, + resolvedPackage: ctx.resolvedPackagesByDepPath[parentPkg.depPath] + }; + } + function getDepsToResolve(wantedDependencies, wantedLockfile, options) { + var _a, _b, _c; + const resolvedDependencies = (_a = options.resolvedDependencies) !== null && _a !== void 0 ? _a : {}; + const preferredDependencies = (_b = options.preferredDependencies) !== null && _b !== void 0 ? _b : {}; + const extendedWantedDeps = []; + let proceedAll = options.proceed; + const satisfiesWanted2Args = referenceSatisfiesWantedSpec.bind(null, { + lockfile: wantedLockfile, + prefix: options.prefix + }); + for (const wantedDependency of wantedDependencies) { + let reference = void 0; + let proceed = proceedAll; + if (wantedDependency.alias) { + const satisfiesWanted = satisfiesWanted2Args.bind(null, wantedDependency); + if (resolvedDependencies[wantedDependency.alias] && satisfiesWanted(resolvedDependencies[wantedDependency.alias])) { + reference = resolvedDependencies[wantedDependency.alias]; + } else if (semver_1.default.validRange(wantedDependency.pref) !== null && preferredDependencies[wantedDependency.alias] && satisfiesWanted(preferredDependencies[wantedDependency.alias])) { + proceed = true; + reference = preferredDependencies[wantedDependency.alias]; + } + } + const infoFromLockfile = getInfoFromLockfile(wantedLockfile, options.registries, reference, wantedDependency.alias); + if (!proceedAll && (infoFromLockfile == null || infoFromLockfile.dependencyLockfile != null && (infoFromLockfile.dependencyLockfile.peerDependencies != null || ((_c = infoFromLockfile.dependencyLockfile.transitivePeerDependencies) === null || _c === void 0 ? void 0 : _c.length)))) { + proceed = true; + proceedAll = true; + for (const extendedWantedDep of extendedWantedDeps) { + if (!extendedWantedDep.proceed) { + extendedWantedDep.proceed = true; + } + } + } + extendedWantedDeps.push({ + infoFromLockfile, + proceed, + wantedDependency + }); + } + return extendedWantedDeps; + } + function referenceSatisfiesWantedSpec(opts, wantedDep, preferredRef) { + var _a; + const depPath = dp.refToRelative(preferredRef, wantedDep.alias); + if (depPath === null) + return false; + const pkgSnapshot = (_a = opts.lockfile.packages) === null || _a === void 0 ? void 0 : _a[depPath]; + if (pkgSnapshot == null) { + logger_1.default.warn({ + message: `Could not find preferred package ${depPath} in lockfile`, + prefix: opts.prefix + }); + return false; + } + const { version } = lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot); + return semver_1.default.satisfies(version, wantedDep.pref, true); + } + function getInfoFromLockfile(lockfile, registries, reference, alias) { + var _a, _b, _c; + if (!reference || !alias) { + return void 0; + } + const depPath = dp.refToRelative(reference, alias); + if (!depPath) { + return void 0; + } + let dependencyLockfile = (_a = lockfile.packages) === null || _a === void 0 ? void 0 : _a[depPath]; + if (dependencyLockfile != null) { + if (dependencyLockfile.peerDependencies != null && dependencyLockfile.dependencies != null) { + const dependencies = {}; + for (const [depName, ref] of Object.entries((_b = dependencyLockfile.dependencies) !== null && _b !== void 0 ? _b : {})) { + if (dependencyLockfile.peerDependencies[depName]) + continue; + dependencies[depName] = ref; + } + dependencyLockfile = { + ...dependencyLockfile, + dependencies + }; + } + return { + ...lockfile_utils_1.nameVerFromPkgSnapshot(depPath, dependencyLockfile), + dependencyLockfile, + depPath, + pkgId: lockfile_utils_1.packageIdFromSnapshot(depPath, dependencyLockfile, registries), + resolution: dependencyLockfile.resolution && lockfile_utils_1.pkgSnapshotToResolution(depPath, dependencyLockfile, registries) + }; + } else { + return { + depPath, + pkgId: (_c = dp.tryGetPackageId(registries, depPath)) !== null && _c !== void 0 ? _c : depPath + }; + } + } + async function resolveDependency(wantedDependency, ctx, options) { + var _a, _b, _c, _d, _e, _f, _g, _h, _j; + const currentPkg = (_a = options.currentPkg) !== null && _a !== void 0 ? _a : {}; + const currentLockfileContainsTheDep = currentPkg.depPath ? Boolean((_b = ctx.currentLockfile.packages) === null || _b === void 0 ? void 0 : _b[currentPkg.depPath]) : void 0; + const depIsLinked = Boolean(currentLockfileContainsTheDep && currentPkg.depPath && currentPkg.dependencyLockfile && await path_exists_1.default(path_1.default.join(ctx.virtualStoreDir, dp.depPathToFilename(currentPkg.depPath, ctx.prefix), "node_modules", currentPkg.name, "package.json"))); + if (!options.update && !options.proceed && currentPkg.resolution != null && depIsLinked) { + return null; + } + let pkgResponse; + if (!options.parentPkg.installable) { + wantedDependency = { + ...wantedDependency, + optional: true + }; + } + try { + pkgResponse = await ctx.storeController.requestPackage(wantedDependency, { + alwaysTryWorkspacePackages: ctx.linkWorkspacePackagesDepth >= options.currentDepth, + currentPkg: currentPkg ? { + name: currentPkg.name, + version: currentPkg.version, + id: currentPkg.pkgId, + resolution: currentPkg.resolution + } : void 0, + defaultTag: ctx.defaultTag, + downloadPriority: -options.currentDepth, + lockfileDir: ctx.lockfileDir, + preferredVersions: options.preferredVersions, + preferWorkspacePackages: ctx.preferWorkspacePackages, + projectDir: options.currentDepth > 0 ? ctx.lockfileDir : ctx.prefix, + registry: wantedDependency.alias && pick_registry_for_package_1.default(ctx.registries, wantedDependency.alias, wantedDependency.pref) || ctx.registries.default, + skipFetch: false, + update: options.update, + workspacePackages: options.workspacePackages + }); + } catch (err) { + if (wantedDependency.optional) { + core_loggers_1.skippedOptionalDependencyLogger.debug({ + details: err.toString(), + package: { + name: wantedDependency.alias, + pref: wantedDependency.pref, + version: wantedDependency.alias ? wantedDependency.pref : void 0 + }, + parents: nodeIdToParents(options.parentPkg.nodeId, ctx.resolvedPackagesByDepPath), + prefix: ctx.prefix, + reason: "resolution_failure" + }); + return null; + } + err.pkgsStack = nodeIdToParents(options.parentPkg.nodeId, ctx.resolvedPackagesByDepPath); + throw err; + } + dependencyResolvedLogger.debug({ + resolution: pkgResponse.body.id, + wanted: { + dependentId: options.parentPkg.depPath, + name: wantedDependency.alias, + rawSpec: wantedDependency.pref + } + }); + pkgResponse.body.id = encodePkgId_1.default(pkgResponse.body.id); + if (!pkgResponse.body.updated && options.currentDepth === Math.max(0, options.updateDepth) && depIsLinked && !ctx.force && !options.proceed) { + return null; + } + if (pkgResponse.body.isLocal) { + const manifest = (_c = pkgResponse.body.manifest) !== null && _c !== void 0 ? _c : await pkgResponse.bundledManifest(); + return { + alias: wantedDependency.alias || manifest.name, + depPath: pkgResponse.body.id, + dev: wantedDependency.dev, + isLinkedDependency: true, + name: manifest.name, + normalizedPref: pkgResponse.body.normalizedPref, + optional: wantedDependency.optional, + pkgId: pkgResponse.body.id, + resolution: pkgResponse.body.resolution, + version: manifest.version + }; + } + let pkg; + let prepare; + let hasBin; + pkg = ctx.readPackageHook != null ? ctx.readPackageHook((_d = pkgResponse.body.manifest) !== null && _d !== void 0 ? _d : await pkgResponse.bundledManifest()) : (_e = pkgResponse.body.manifest) !== null && _e !== void 0 ? _e : await pkgResponse.bundledManifest(); + if (!pkg.name) { + throw new error_1.default("MISSING_PACKAGE_NAME", `Can't install ${wantedDependency.pref}: Missing package name`); + } + const depPath = dp.relative(ctx.registries, pkg.name, pkgResponse.body.id); + if (nodeIdUtils_1.nodeIdContainsSequence(options.parentPkg.nodeId, options.parentPkg.depPath, depPath)) { + return null; + } + if (!options.update && currentPkg.dependencyLockfile != null && currentPkg.depPath && !pkgResponse.body.updated && currentPkg.dependencyLockfile.peerDependencies == null) { + prepare = currentPkg.dependencyLockfile.prepare === true; + hasBin = currentPkg.dependencyLockfile.hasBin === true; + pkg = { + ...lockfile_utils_1.nameVerFromPkgSnapshot(currentPkg.depPath, currentPkg.dependencyLockfile), + ...currentPkg.dependencyLockfile, + ...pkg + }; + } else { + prepare = Boolean(pkgResponse.body.resolvedVia === "git-repository" && typeof ((_f = pkg.scripts) === null || _f === void 0 ? void 0 : _f.prepare) === "string"); + if (((_g = currentPkg.dependencyLockfile) === null || _g === void 0 ? void 0 : _g.deprecated) && !pkgResponse.body.updated && !pkg.deprecated) { + pkg.deprecated = currentPkg.dependencyLockfile.deprecated; + } + hasBin = Boolean((_h = pkg.bin && !isEmpty_1.default(pkg.bin)) !== null && _h !== void 0 ? _h : (_j = pkg.directories) === null || _j === void 0 ? void 0 : _j.bin); + } + if (options.currentDepth === 0 && pkgResponse.body.latest && pkgResponse.body.latest !== pkg.version) { + ctx.outdatedDependencies[pkgResponse.body.id] = pkgResponse.body.latest; + } + if (pkg.deprecated) { + core_loggers_1.deprecationLogger.debug({ + deprecated: pkg.deprecated, + depth: options.currentDepth, + pkgId: pkgResponse.body.id, + pkgName: pkg.name, + pkgVersion: pkg.version, + prefix: ctx.prefix + }); + } + const nodeId = pkgIsLeaf(pkg) ? pkgResponse.body.id : nodeIdUtils_1.createNodeId(options.parentPkg.nodeId, depPath); + const parentIsInstallable = options.parentPkg.installable === void 0 || options.parentPkg.installable; + const installable = parentIsInstallable && pkgResponse.body.isInstallable !== false; + const isNew = !ctx.resolvedPackagesByDepPath[depPath]; + if (isNew) { + if (pkgResponse.body.isInstallable === false || !parentIsInstallable) { + ctx.skipped.add(pkgResponse.body.id); + } + core_loggers_1.progressLogger.debug({ + packageId: pkgResponse.body.id, + requester: ctx.lockfileDir, + status: "resolved" + }); + logFetchResult(pkgResponse, ctx.lockfileDir); + ctx.resolvedPackagesByDepPath[depPath] = getResolvedPackage({ + dependencyLockfile: currentPkg.dependencyLockfile, + depPath, + force: ctx.force, + hasBin, + neverBuiltDependencies: ctx.neverBuiltDependencies, + pkg, + pkgResponse, + prepare, + wantedDependency + }); + } else { + ctx.resolvedPackagesByDepPath[depPath].prod = ctx.resolvedPackagesByDepPath[depPath].prod || !wantedDependency.dev && !wantedDependency.optional; + ctx.resolvedPackagesByDepPath[depPath].dev = ctx.resolvedPackagesByDepPath[depPath].dev || wantedDependency.dev; + ctx.resolvedPackagesByDepPath[depPath].optional = ctx.resolvedPackagesByDepPath[depPath].optional && wantedDependency.optional; + if (ctx.resolvedPackagesByDepPath[depPath].fetchingFiles == null && pkgResponse.files != null) { + logFetchResult(pkgResponse, ctx.lockfileDir); + ctx.resolvedPackagesByDepPath[depPath].fetchingFiles = pkgResponse.files; + ctx.resolvedPackagesByDepPath[depPath].filesIndexFile = pkgResponse.filesIndexFile; + ctx.resolvedPackagesByDepPath[depPath].finishing = pkgResponse.finishing; + ctx.resolvedPackagesByDepPath[depPath].fetchingBundledManifest = pkgResponse.bundledManifest; + } + if (ctx.dependenciesTree[nodeId]) { + ctx.dependenciesTree[nodeId].depth = Math.min(ctx.dependenciesTree[nodeId].depth, options.currentDepth); + } else { + ctx.pendingNodes.push({ + alias: wantedDependency.alias || pkg.name, + depth: options.currentDepth, + installable, + nodeId, + resolvedPackage: ctx.resolvedPackagesByDepPath[depPath] + }); + } + } + return { + alias: wantedDependency.alias || pkg.name, + depIsLinked, + depPath, + isNew, + nodeId, + normalizedPref: options.currentDepth === 0 ? pkgResponse.body.normalizedPref : void 0, + pkgId: pkgResponse.body.id, + installable, + isLinkedDependency: void 0, + pkg, + updated: pkgResponse.body.updated + }; + } + function logFetchResult(pkgResponse, lockfileDir) { + if (pkgResponse.files == null) + return; + pkgResponse.files().then((fetchResult) => { + core_loggers_1.progressLogger.debug({ + packageId: pkgResponse.body.id, + requester: lockfileDir, + status: fetchResult.fromStore ? "found_in_store" : "fetched" + }); + }).catch(() => { + }); + } + function pkgIsLeaf(pkg) { + var _a, _b, _c; + return isEmpty_1.default((_a = pkg.dependencies) !== null && _a !== void 0 ? _a : {}) && isEmpty_1.default((_b = pkg.optionalDependencies) !== null && _b !== void 0 ? _b : {}) && isEmpty_1.default((_c = pkg.peerDependencies) !== null && _c !== void 0 ? _c : {}); + } + function getResolvedPackage(options) { + var _a, _b; + const peerDependencies = peerDependenciesWithoutOwn(options.pkg); + return { + additionalInfo: { + bundledDependencies: options.pkg.bundledDependencies, + bundleDependencies: options.pkg.bundleDependencies, + cpu: options.pkg.cpu, + deprecated: options.pkg.deprecated, + engines: options.pkg.engines, + os: options.pkg.os + }, + depPath: options.depPath, + dev: options.wantedDependency.dev, + fetchingBundledManifest: options.pkgResponse.bundledManifest, + fetchingFiles: options.pkgResponse.files, + filesIndexFile: options.pkgResponse.filesIndexFile, + finishing: options.pkgResponse.finishing, + hasBin: options.hasBin, + hasBundledDependencies: !(((_a = options.pkg.bundledDependencies) !== null && _a !== void 0 ? _a : options.pkg.bundleDependencies) == null), + id: options.pkgResponse.body.id, + name: options.pkg.name, + optional: options.wantedDependency.optional, + optionalDependencies: new Set(Object.keys((_b = options.pkg.optionalDependencies) !== null && _b !== void 0 ? _b : {})), + peerDependencies: peerDependencies !== null && peerDependencies !== void 0 ? peerDependencies : {}, + peerDependenciesMeta: options.pkg.peerDependenciesMeta, + prepare: options.prepare, + prod: !options.wantedDependency.dev && !options.wantedDependency.optional, + requiresBuild: options.neverBuiltDependencies.has(options.pkg.name) ? false : options.dependencyLockfile != null ? Boolean(options.dependencyLockfile.requiresBuild) : void 0, + resolution: options.pkgResponse.body.resolution, + version: options.pkg.version + }; + } + function peerDependenciesWithoutOwn(pkg) { + var _a, _b; + if (pkg.peerDependencies == null && pkg.peerDependenciesMeta == null) + return pkg.peerDependencies; + const ownDeps = new Set([ + ...Object.keys((_a = pkg.dependencies) !== null && _a !== void 0 ? _a : {}), + ...Object.keys((_b = pkg.optionalDependencies) !== null && _b !== void 0 ? _b : {}) + ]); + const result = {}; + if (pkg.peerDependencies != null) { + for (const [peerName, peerRange] of Object.entries(pkg.peerDependencies)) { + if (ownDeps.has(peerName)) + continue; + result[peerName] = peerRange; + } + } + if (pkg.peerDependenciesMeta != null) { + for (const [peerName, peerMeta] of Object.entries(pkg.peerDependenciesMeta)) { + if (ownDeps.has(peerName) || result[peerName] || peerMeta.optional !== true) + continue; + result[peerName] = "*"; + } + } + if (isEmpty_1.default(result)) + return void 0; + return result; + } + } +}); + +// ../resolve-dependencies/lib/resolveDependencyTree.js +var require_resolveDependencyTree = __commonJS({ + "../resolve-dependencies/lib/resolveDependencyTree.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var partition_1 = __importDefault(require_partition4()); + var nodeIdUtils_1 = require_nodeIdUtils(); + var resolveDependencies_1 = __importDefault(require_resolveDependencies()); + __exportStar(require_nodeIdUtils(), exports2); + async function default_1(importers, opts) { + var _a, _b; + const directDepsByImporterId = {}; + const wantedToBeSkippedPackageIds = new Set(); + const ctx = { + childrenByParentDepPath: {}, + currentLockfile: opts.currentLockfile, + defaultTag: opts.tag, + dependenciesTree: {}, + dryRun: opts.dryRun, + engineStrict: opts.engineStrict, + force: opts.force, + forceFullResolution: opts.forceFullResolution, + linkWorkspacePackagesDepth: (_a = opts.linkWorkspacePackagesDepth) !== null && _a !== void 0 ? _a : -1, + lockfileDir: opts.lockfileDir, + neverBuiltDependencies: (_b = opts.neverBuiltDependencies) !== null && _b !== void 0 ? _b : new Set(), + nodeVersion: opts.nodeVersion, + outdatedDependencies: {}, + pendingNodes: [], + pnpmVersion: opts.pnpmVersion, + preferWorkspacePackages: opts.preferWorkspacePackages, + readPackageHook: opts.hooks.readPackage, + registries: opts.registries, + resolvedPackagesByDepPath: {}, + skipped: wantedToBeSkippedPackageIds, + storeController: opts.storeController, + updateMatching: opts.updateMatching, + virtualStoreDir: opts.virtualStoreDir, + wantedLockfile: opts.wantedLockfile + }; + await Promise.all(importers.map(async (importer) => { + var _a2; + const projectSnapshot = opts.wantedLockfile.importers[importer.id]; + const linkedDependencies = []; + const resolveCtx = { + ...ctx, + linkedDependencies, + modulesDir: importer.modulesDir, + prefix: importer.rootDir + }; + const proceed = importer.id === "." || importer.hasRemovedDependencies === true || importer.wantedDependencies.some((wantedDep) => wantedDep["isNew"]); + const resolveOpts = { + currentDepth: 0, + parentPkg: { + installable: true, + nodeId: `>${importer.id}>`, + optional: false, + depPath: importer.id + }, + proceed, + resolvedDependencies: { + ...projectSnapshot.dependencies, + ...projectSnapshot.devDependencies, + ...projectSnapshot.optionalDependencies + }, + updateDepth: -1, + workspacePackages: opts.workspacePackages + }; + directDepsByImporterId[importer.id] = await resolveDependencies_1.default(resolveCtx, (_a2 = importer.preferredVersions) !== null && _a2 !== void 0 ? _a2 : {}, importer.wantedDependencies, resolveOpts); + })); + ctx.pendingNodes.forEach((pendingNode) => { + ctx.dependenciesTree[pendingNode.nodeId] = { + children: () => buildTree(ctx, pendingNode.nodeId, pendingNode.resolvedPackage.id, ctx.childrenByParentDepPath[pendingNode.resolvedPackage.depPath], pendingNode.depth + 1, pendingNode.installable), + depth: pendingNode.depth, + installable: pendingNode.installable, + resolvedPackage: pendingNode.resolvedPackage + }; + }); + const resolvedImporters = {}; + for (const { id } of importers) { + const directDeps = directDepsByImporterId[id]; + const [linkedDependencies, directNonLinkedDeps] = partition_1.default((dep) => dep.isLinkedDependency === true, directDeps); + resolvedImporters[id] = { + directDependencies: directDeps.map((dep) => { + if (dep.isLinkedDependency === true) { + return dep; + } + const resolvedPackage = ctx.dependenciesTree[dep.nodeId].resolvedPackage; + return { + alias: dep.alias, + dev: resolvedPackage.dev, + name: resolvedPackage.name, + normalizedPref: dep.normalizedPref, + optional: resolvedPackage.optional, + pkgId: resolvedPackage.id, + resolution: resolvedPackage.resolution, + version: resolvedPackage.version + }; + }), + directNodeIdsByAlias: directNonLinkedDeps.reduce((acc, dependency) => { + acc[dependency.alias] = dependency.nodeId; + return acc; + }, {}), + linkedDependencies + }; + } + return { + dependenciesTree: ctx.dependenciesTree, + outdatedDependencies: ctx.outdatedDependencies, + resolvedImporters, + resolvedPackagesByDepPath: ctx.resolvedPackagesByDepPath, + wantedToBeSkippedPackageIds + }; + } + exports2.default = default_1; + function buildTree(ctx, parentNodeId, parentId, children, depth, installable) { + const childrenNodeIds = {}; + for (const child of children) { + if (child.depPath.startsWith("link:")) { + childrenNodeIds[child.alias] = child.depPath; + continue; + } + if (nodeIdUtils_1.nodeIdContainsSequence(parentNodeId, parentId, child.depPath)) { + continue; + } + const childNodeId = nodeIdUtils_1.createNodeId(parentNodeId, child.depPath); + childrenNodeIds[child.alias] = childNodeId; + installable = installable && !ctx.skipped.has(child.depPath); + ctx.dependenciesTree[childNodeId] = { + children: () => buildTree(ctx, childNodeId, child.depPath, ctx.childrenByParentDepPath[child.depPath], depth + 1, installable), + depth, + installable, + resolvedPackage: ctx.resolvedPackagesByDepPath[child.depPath] + }; + } + return childrenNodeIds; + } + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/scan.js +var require_scan4 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/scan.js"(exports2, module2) { + var _curry3 = require_curry3(); + var scan = /* @__PURE__ */ _curry3(function scan2(fn2, acc, list) { + var idx = 0; + var len = list.length; + var result = [acc]; + while (idx < len) { + acc = fn2(acc, list[idx]); + result[idx + 1] = acc; + idx += 1; + } + return result; + }); + module2.exports = scan; + } +}); + +// ../resolve-dependencies/lib/resolvePeers.js +var require_resolvePeers = __commonJS({ + "../resolve-dependencies/lib/resolvePeers.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var crypto_1 = __importDefault(require("crypto")); + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var logger_1 = __importDefault(require_lib6()); + var dependency_path_1 = require_lib33(); + var fromPairs_1 = __importDefault(require_fromPairs()); + var isEmpty_1 = __importDefault(require_isEmpty2()); + var scan_1 = __importDefault(require_scan4()); + var semver_1 = __importDefault(require_semver2()); + var nodeIdUtils_1 = require_nodeIdUtils(); + function default_1(opts) { + const depGraph = {}; + const pathsByNodeId = {}; + const _createPkgsByName = createPkgsByName.bind(null, opts.dependenciesTree); + const rootProject = opts.projects.length > 1 ? opts.projects.find(({ id }) => id === ".") : null; + const rootPkgsByName = rootProject == null ? {} : _createPkgsByName(rootProject); + for (const { directNodeIdsByAlias, topParents, rootDir } of opts.projects) { + const pkgsByName = { + ...rootPkgsByName, + ..._createPkgsByName({ directNodeIdsByAlias, topParents }) + }; + resolvePeersOfChildren(directNodeIdsByAlias, pkgsByName, { + dependenciesTree: opts.dependenciesTree, + depGraph, + lockfileDir: opts.lockfileDir, + pathsByNodeId, + peersCache: new Map(), + purePkgs: new Set(), + rootDir, + strictPeerDependencies: opts.strictPeerDependencies, + virtualStoreDir: opts.virtualStoreDir + }); + } + Object.values(depGraph).forEach((node) => { + node.children = Object.keys(node.children).reduce((acc, alias) => { + var _a; + acc[alias] = (_a = pathsByNodeId[node.children[alias]]) !== null && _a !== void 0 ? _a : node.children[alias]; + return acc; + }, {}); + }); + const dependenciesByProjectId = {}; + for (const { directNodeIdsByAlias, id } of opts.projects) { + dependenciesByProjectId[id] = Object.keys(directNodeIdsByAlias).reduce((rootPathsByAlias, alias) => { + rootPathsByAlias[alias] = pathsByNodeId[directNodeIdsByAlias[alias]]; + return rootPathsByAlias; + }, {}); + } + return { + dependenciesGraph: depGraph, + dependenciesByProjectId + }; + } + exports2.default = default_1; + function createPkgsByName(dependenciesTree, { directNodeIdsByAlias, topParents }) { + return Object.assign(fromPairs_1.default(topParents.map(({ name, version }) => [ + name, + { + depth: 0, + version + } + ])), toPkgByName(Object.keys(directNodeIdsByAlias).map((alias) => ({ + alias, + node: dependenciesTree[directNodeIdsByAlias[alias]], + nodeId: directNodeIdsByAlias[alias] + })))); + } + function resolvePeersOfNode(nodeId, parentParentPkgs, ctx) { + var _a; + const node = ctx.dependenciesTree[nodeId]; + if (node.depth === -1) + return { resolvedPeers: {}, missingPeers: [] }; + const resolvedPackage = node.resolvedPackage; + if (ctx.purePkgs.has(resolvedPackage.depPath) && ctx.depGraph[resolvedPackage.depPath].depth <= node.depth && isEmpty_1.default(resolvedPackage.peerDependencies)) { + ctx.pathsByNodeId[nodeId] = resolvedPackage.depPath; + return { resolvedPeers: {}, missingPeers: [] }; + } + if (typeof node.children === "function") { + node.children = node.children(); + } + const children = node.children; + const parentPkgs = isEmpty_1.default(children) ? parentParentPkgs : { + ...parentParentPkgs, + ...toPkgByName(Object.keys(children).map((alias) => ({ + alias, + node: ctx.dependenciesTree[children[alias]], + nodeId: children[alias] + }))) + }; + const hit = (_a = ctx.peersCache.get(resolvedPackage.depPath)) === null || _a === void 0 ? void 0 : _a.find((cache) => cache.resolvedPeers.every(([name, cachedNodeId]) => { + var _a2; + const parentPkgNodeId = (_a2 = parentPkgs[name]) === null || _a2 === void 0 ? void 0 : _a2.nodeId; + if (!parentPkgNodeId || !cachedNodeId) + return false; + if (parentPkgs[name].nodeId === cachedNodeId) + return true; + if (ctx.pathsByNodeId[cachedNodeId] && ctx.pathsByNodeId[cachedNodeId] === ctx.pathsByNodeId[parentPkgs[name].nodeId]) + return true; + const parentDepPath = ctx.dependenciesTree[parentPkgNodeId].resolvedPackage.depPath; + if (!ctx.purePkgs.has(parentDepPath)) + return false; + const cachedDepPath = ctx.dependenciesTree[cachedNodeId].resolvedPackage.depPath; + return parentDepPath === cachedDepPath; + }) && cache.missingPeers.every((missingPeer) => !parentPkgs[missingPeer])); + if (hit != null) { + ctx.pathsByNodeId[nodeId] = hit.depPath; + ctx.depGraph[hit.depPath].depth = Math.min(ctx.depGraph[hit.depPath].depth, node.depth); + return { + missingPeers: hit.missingPeers, + resolvedPeers: fromPairs_1.default(hit.resolvedPeers) + }; + } + const { resolvedPeers: unknownResolvedPeersOfChildren, missingPeers: missingPeersOfChildren } = resolvePeersOfChildren(children, parentPkgs, ctx); + const { resolvedPeers, missingPeers } = isEmpty_1.default(resolvedPackage.peerDependencies) ? { resolvedPeers: {}, missingPeers: [] } : resolvePeers({ + currentDepth: node.depth, + dependenciesTree: ctx.dependenciesTree, + lockfileDir: ctx.lockfileDir, + nodeId, + parentPkgs, + resolvedPackage, + rootDir: ctx.rootDir, + strictPeerDependencies: ctx.strictPeerDependencies + }); + const allResolvedPeers = Object.assign(unknownResolvedPeersOfChildren, resolvedPeers); + delete allResolvedPeers[node.resolvedPackage.name]; + const allMissingPeers = Array.from(new Set([...missingPeersOfChildren, ...missingPeers])); + let depPath; + if (isEmpty_1.default(allResolvedPeers)) { + depPath = resolvedPackage.depPath; + } else { + const peersFolderSuffix = createPeersFolderSuffix(Object.keys(allResolvedPeers).map((alias) => ctx.dependenciesTree[allResolvedPeers[alias]].resolvedPackage).map(({ name, version }) => ({ name, version }))); + depPath = `${resolvedPackage.depPath}${peersFolderSuffix}`; + } + const localLocation = path_1.default.join(ctx.virtualStoreDir, dependency_path_1.depPathToFilename(depPath, ctx.lockfileDir)); + const modules = path_1.default.join(localLocation, "node_modules"); + const isPure = isEmpty_1.default(allResolvedPeers) && allMissingPeers.length === 0; + if (isPure) { + ctx.purePkgs.add(resolvedPackage.depPath); + } else { + const cache = { + missingPeers: allMissingPeers, + depPath, + resolvedPeers: Object.entries(allResolvedPeers) + }; + if (ctx.peersCache.has(resolvedPackage.depPath)) { + ctx.peersCache.get(resolvedPackage.depPath).push(cache); + } else { + ctx.peersCache.set(resolvedPackage.depPath, [cache]); + } + } + ctx.pathsByNodeId[nodeId] = depPath; + const peerDependencies = { ...resolvedPackage.peerDependencies }; + if (!ctx.depGraph[depPath] || ctx.depGraph[depPath].depth > node.depth) { + const dir = path_1.default.join(modules, resolvedPackage.name); + const transitivePeerDependencies = new Set(); + const unknownPeers = [ + ...Object.keys(unknownResolvedPeersOfChildren), + ...missingPeersOfChildren + ]; + if (unknownPeers.length > 0) { + for (const unknownPeer of unknownPeers) { + if (!peerDependencies[unknownPeer]) { + transitivePeerDependencies.add(unknownPeer); + } + } + } + ctx.depGraph[depPath] = { + ...node.resolvedPackage, + children: Object.assign(getPreviouslyResolvedChildren(nodeId, ctx.dependenciesTree), children, resolvedPeers), + depPath, + depth: node.depth, + dir, + installable: node.installable, + isPure, + modules, + peerDependencies, + transitivePeerDependencies + }; + } + return { resolvedPeers: allResolvedPeers, missingPeers: allMissingPeers }; + } + function getPreviouslyResolvedChildren(nodeId, dependenciesTree) { + const parentIds = nodeIdUtils_1.splitNodeId(nodeId); + const ownId = parentIds.pop(); + const allChildren = {}; + if (!ownId || !parentIds.includes(ownId)) + return allChildren; + const nodeIdChunks = parentIds.join(">").split(ownId); + nodeIdChunks.pop(); + nodeIdChunks.reduce((accNodeId, part) => { + accNodeId += `${part}${ownId}`; + const parentNode = dependenciesTree[`${accNodeId}>`]; + Object.assign(allChildren, typeof parentNode.children === "function" ? parentNode.children() : parentNode.children); + return accNodeId; + }, ">"); + return allChildren; + } + function resolvePeersOfChildren(children, parentPkgs, ctx) { + const allResolvedPeers = {}; + const allMissingPeers = new Set(); + for (const childNodeId of Object.values(children)) { + const { resolvedPeers, missingPeers } = resolvePeersOfNode(childNodeId, parentPkgs, ctx); + Object.assign(allResolvedPeers, resolvedPeers); + missingPeers.forEach((missingPeer) => allMissingPeers.add(missingPeer)); + } + const unknownResolvedPeersOfChildren = Object.keys(allResolvedPeers).filter((alias) => !children[alias]).reduce((acc, peer) => { + acc[peer] = allResolvedPeers[peer]; + return acc; + }, {}); + return { resolvedPeers: unknownResolvedPeersOfChildren, missingPeers: Array.from(allMissingPeers) }; + } + function resolvePeers(ctx) { + var _a, _b; + const resolvedPeers = {}; + const missingPeers = []; + for (const peerName in ctx.resolvedPackage.peerDependencies) { + const peerVersionRange = ctx.resolvedPackage.peerDependencies[peerName]; + const resolved = ctx.parentPkgs[peerName]; + if (!resolved) { + missingPeers.push(peerName); + if (((_b = (_a = ctx.resolvedPackage.peerDependenciesMeta) === null || _a === void 0 ? void 0 : _a[peerName]) === null || _b === void 0 ? void 0 : _b.optional) === true) { + continue; + } + const friendlyPath = nodeIdToFriendlyPath(ctx); + const message2 = `${friendlyPath ? `${friendlyPath}: ` : ""}${packageFriendlyId(ctx.resolvedPackage)} requires a peer of ${peerName}@${peerVersionRange} but none was installed.`; + if (ctx.strictPeerDependencies) { + throw new error_1.default("MISSING_PEER_DEPENDENCY", message2); + } + logger_1.default.warn({ + message: message2, + prefix: ctx.rootDir + }); + continue; + } + if (!semver_1.default.satisfies(resolved.version, peerVersionRange)) { + const friendlyPath = nodeIdToFriendlyPath(ctx); + const message2 = `${friendlyPath ? `${friendlyPath}: ` : ""}${packageFriendlyId(ctx.resolvedPackage)} requires a peer of ${peerName}@${peerVersionRange} but version ${resolved.version} was installed.`; + if (ctx.strictPeerDependencies) { + throw new error_1.default("INVALID_PEER_DEPENDENCY", message2); + } + logger_1.default.warn({ + message: message2, + prefix: ctx.rootDir + }); + } + if (resolved === null || resolved === void 0 ? void 0 : resolved.nodeId) + resolvedPeers[peerName] = resolved.nodeId; + } + return { resolvedPeers, missingPeers }; + } + function packageFriendlyId(manifest) { + return `${manifest.name}@${manifest.version}`; + } + function nodeIdToFriendlyPath({ dependenciesTree, lockfileDir, nodeId, rootDir }) { + const parts = nodeIdUtils_1.splitNodeId(nodeId).slice(0, -1); + const result = scan_1.default((prevNodeId, pkgId) => nodeIdUtils_1.createNodeId(prevNodeId, pkgId), ">", parts).slice(2).map((nid) => dependenciesTree[nid].resolvedPackage.name); + const projectPath = path_1.default.relative(lockfileDir, rootDir); + if (projectPath) { + result.unshift(projectPath); + } + return result.join(" > "); + } + function toPkgByName(nodes) { + const pkgsByName = {}; + for (const { alias, node, nodeId } of nodes) { + pkgsByName[alias] = { + depth: node.depth, + nodeId, + version: node.resolvedPackage.version + }; + } + return pkgsByName; + } + function createPeersFolderSuffix(peers) { + const folderName = peers.map(({ name, version }) => `${name.replace("/", "+")}@${version}`).sort().join("+"); + if (folderName.length > 32) { + return `_${crypto_1.default.createHash("md5").update(folderName).digest("hex")}`; + } + return `_${folderName}`; + } + } +}); + +// ../resolve-dependencies/lib/updateLockfile.js +var require_updateLockfile = __commonJS({ + "../resolve-dependencies/lib/updateLockfile.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var logger_1 = __importDefault(require_lib6()); + var prune_lockfile_1 = require_lib74(); + var dp = __importStar2(require_lib33()); + var get_npm_tarball_url_1 = __importDefault(require_lib51()); + var isEmpty_1 = __importDefault(require_isEmpty2()); + var fromPairs_1 = __importDefault(require_fromPairs()); + var merge_1 = __importDefault(require_merge3()); + var partition_1 = __importDefault(require_partition4()); + var depPathToRef_1 = __importDefault(require_depPathToRef()); + function default_1(depGraph, lockfile, prefix, registries) { + var _a; + lockfile.packages = (_a = lockfile.packages) !== null && _a !== void 0 ? _a : {}; + const pendingRequiresBuilds = []; + for (const depPath of Object.keys(depGraph)) { + const depNode = depGraph[depPath]; + const [updatedOptionalDeps, updatedDeps] = partition_1.default((child) => depNode.optionalDependencies.has(child.alias), Object.keys(depNode.children).map((alias) => ({ alias, depPath: depNode.children[alias] }))); + lockfile.packages[depPath] = toLockfileDependency(pendingRequiresBuilds, depNode, { + depGraph, + depPath, + prevSnapshot: lockfile.packages[depPath], + registries, + registry: dp.getRegistryByPackageName(registries, depNode.name), + updatedDeps, + updatedOptionalDeps + }); + } + const warn = (message2) => logger_1.default.warn({ message: message2, prefix }); + return { + newLockfile: prune_lockfile_1.pruneSharedLockfile(lockfile, { warn }), + pendingRequiresBuilds + }; + } + exports2.default = default_1; + function toLockfileDependency(pendingRequiresBuilds, pkg, opts) { + var _a, _b, _c, _d, _e, _f; + const lockfileResolution = toLockfileResolution({ name: pkg.name, version: pkg.version }, opts.depPath, pkg.resolution, opts.registry); + const newResolvedDeps = updateResolvedDeps((_b = (_a = opts.prevSnapshot) === null || _a === void 0 ? void 0 : _a.dependencies) !== null && _b !== void 0 ? _b : {}, opts.updatedDeps, opts.registries, opts.depGraph); + const newResolvedOptionalDeps = updateResolvedDeps((_d = (_c = opts.prevSnapshot) === null || _c === void 0 ? void 0 : _c.optionalDependencies) !== null && _d !== void 0 ? _d : {}, opts.updatedOptionalDeps, opts.registries, opts.depGraph); + const result = { + resolution: lockfileResolution + }; + if (dp.isAbsolute(opts.depPath)) { + result["name"] = pkg.name; + if (pkg.version) { + result["version"] = pkg.version; + } + } + if (!isEmpty_1.default(newResolvedDeps)) { + result["dependencies"] = newResolvedDeps; + } + if (!isEmpty_1.default(newResolvedOptionalDeps)) { + result["optionalDependencies"] = newResolvedOptionalDeps; + } + if (pkg.dev && !pkg.prod) { + result["dev"] = true; + } else if (pkg.prod && !pkg.dev) { + result["dev"] = false; + } + if (pkg.optional) { + result["optional"] = true; + } + if (opts.depPath[0] !== "/" && !pkg.id.endsWith(opts.depPath)) { + result["id"] = pkg.id; + } + if (!isEmpty_1.default((_e = pkg.peerDependencies) !== null && _e !== void 0 ? _e : {})) { + result["peerDependencies"] = pkg.peerDependencies; + } + if (pkg.transitivePeerDependencies.size) { + result["transitivePeerDependencies"] = Array.from(pkg.transitivePeerDependencies).sort(); + } + if (pkg.peerDependenciesMeta != null) { + const normalizedPeerDependenciesMeta = {}; + for (const peer of Object.keys(pkg.peerDependenciesMeta)) { + if (pkg.peerDependenciesMeta[peer].optional) { + normalizedPeerDependenciesMeta[peer] = { optional: true }; + } + } + if (Object.keys(normalizedPeerDependenciesMeta).length > 0) { + result["peerDependenciesMeta"] = normalizedPeerDependenciesMeta; + } + } + if (pkg.additionalInfo.engines != null) { + for (const engine of Object.keys(pkg.additionalInfo.engines)) { + if (pkg.additionalInfo.engines[engine] === "*") + continue; + result["engines"] = result["engines"] || {}; + result["engines"][engine] = pkg.additionalInfo.engines[engine]; + } + } + if (pkg.additionalInfo.cpu != null) { + result["cpu"] = pkg.additionalInfo.cpu; + } + if (pkg.additionalInfo.os != null) { + result["os"] = pkg.additionalInfo.os; + } + if (Array.isArray(pkg.additionalInfo.bundledDependencies) || Array.isArray(pkg.additionalInfo.bundleDependencies)) { + result["bundledDependencies"] = (_f = pkg.additionalInfo.bundledDependencies) !== null && _f !== void 0 ? _f : pkg.additionalInfo.bundleDependencies; + } + if (pkg.additionalInfo.deprecated) { + result["deprecated"] = pkg.additionalInfo.deprecated; + } + if (pkg.hasBin) { + result["hasBin"] = true; + } + if (pkg.requiresBuild !== void 0) { + if (pkg.requiresBuild) { + result["requiresBuild"] = true; + } + } else if (opts.prevSnapshot != null) { + if (opts.prevSnapshot.requiresBuild) { + result["requiresBuild"] = opts.prevSnapshot.requiresBuild; + } + if (opts.prevSnapshot.prepare) { + result["prepare"] = opts.prevSnapshot.prepare; + } + } else if (pkg.prepare) { + result["prepare"] = true; + result["requiresBuild"] = true; + } else { + pendingRequiresBuilds.push(opts.depPath); + } + pkg.requiresBuild = result["requiresBuild"]; + return result; + } + function updateResolvedDeps(prevResolvedDeps, updatedDeps, registries, depGraph) { + const newResolvedDeps = fromPairs_1.default(updatedDeps.map(({ alias, depPath }) => { + if (depPath.startsWith("link:")) { + return [alias, depPath]; + } + const depNode = depGraph[depPath]; + return [ + alias, + depPathToRef_1.default(depNode.depPath, { + alias, + realName: depNode.name, + registries, + resolution: depNode.resolution + }) + ]; + })); + return merge_1.default(prevResolvedDeps, newResolvedDeps); + } + function toLockfileResolution(pkg, depPath, resolution, registry) { + if (dp.isAbsolute(depPath) || resolution.type !== void 0 || !resolution["integrity"]) { + return resolution; + } + const base = registry !== resolution["registry"] ? { registry: resolution["registry"] } : {}; + const expectedTarball = get_npm_tarball_url_1.default(pkg.name, pkg.version, { registry }); + const actualTarball = resolution["tarball"].replace("%2f", "/"); + if (removeProtocol(expectedTarball) !== removeProtocol(actualTarball)) { + return { + ...base, + integrity: resolution["integrity"], + tarball: relativeTarball(resolution["tarball"], registry) + }; + } + return { + ...base, + integrity: resolution["integrity"] + }; + } + function removeProtocol(url) { + return url.split("://")[1]; + } + function relativeTarball(tarball, registry) { + if (tarball.substr(0, registry.length) === registry) { + return tarball.substr(registry.length); + } + return tarball; + } + } +}); + +// ../resolve-dependencies/lib/updateProjectManifest.js +var require_updateProjectManifest = __commonJS({ + "../resolve-dependencies/lib/updateProjectManifest.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var manifest_utils_1 = require_lib15(); + var version_selector_type_1 = __importDefault(require_version_selector_type()); + async function updateProjectManifest(importer, opts) { + if (!importer.manifest) { + throw new Error("Cannot save because no package.json found"); + } + const specsToUpsert = opts.directDependencies.filter((rdd, index) => importer.wantedDependencies[index].updateSpec).map((rdd, index) => { + var _a, _b; + const wantedDep = importer.wantedDependencies[index]; + return resolvedDirectDepToSpecObject({ ...rdd, isNew: wantedDep.isNew, specRaw: wantedDep.raw }, importer, { + nodeExecPath: wantedDep.nodeExecPath, + pinnedVersion: (_b = (_a = wantedDep.pinnedVersion) !== null && _a !== void 0 ? _a : importer["pinnedVersion"]) !== null && _b !== void 0 ? _b : "major", + preserveWorkspaceProtocol: opts.preserveWorkspaceProtocol, + saveWorkspaceProtocol: opts.saveWorkspaceProtocol + }); + }); + for (const pkgToInstall of importer.wantedDependencies) { + if (pkgToInstall.updateSpec && pkgToInstall.alias && !specsToUpsert.some(({ alias }) => alias === pkgToInstall.alias)) { + specsToUpsert.push({ + alias: pkgToInstall.alias, + nodeExecPath: pkgToInstall.nodeExecPath, + peer: importer["peer"], + saveType: importer["targetDependenciesField"] + }); + } + } + const hookedManifest = await manifest_utils_1.updateProjectManifestObject(importer.rootDir, importer.manifest, specsToUpsert); + const originalManifest = importer.originalManifest != null ? await manifest_utils_1.updateProjectManifestObject(importer.rootDir, importer.originalManifest, specsToUpsert) : void 0; + return [hookedManifest, originalManifest]; + } + exports2.default = updateProjectManifest; + function resolvedDirectDepToSpecObject({ alias, isNew, name, normalizedPref, resolution, specRaw, version }, importer, opts) { + let pref; + if (normalizedPref) { + pref = normalizedPref; + } else { + if (isNew === true) { + pref = getPrefPreferSpecifiedSpec({ + alias, + name, + pinnedVersion: opts.pinnedVersion, + specRaw, + version + }); + } else { + pref = getPrefPreferSpecifiedExoticSpec({ + alias, + name, + pinnedVersion: opts.pinnedVersion, + specRaw, + version + }); + } + if (resolution.type === "directory" && (opts.saveWorkspaceProtocol || opts.preserveWorkspaceProtocol && specRaw.includes("@workspace:")) && !pref.startsWith("workspace:")) { + pref = `workspace:${pref}`; + } + } + return { + alias, + nodeExecPath: opts.nodeExecPath, + peer: importer["peer"], + pref, + saveType: isNew === true ? importer["targetDependenciesField"] : void 0 + }; + } + function getPrefPreferSpecifiedSpec(opts) { + var _a; + const prefix = manifest_utils_1.getPrefix(opts.alias, opts.name); + if ((_a = opts.specRaw) === null || _a === void 0 ? void 0 : _a.startsWith(`${opts.alias}@${prefix}`)) { + const range = opts.specRaw.substr(`${opts.alias}@${prefix}`.length); + if (range) { + const selector = version_selector_type_1.default(range); + if (selector != null && (selector.type === "version" || selector.type === "range")) { + return opts.specRaw.substr(opts.alias.length + 1); + } + } + } + return `${prefix}${manifest_utils_1.createVersionSpec(opts.version, opts.pinnedVersion)}`; + } + function getPrefPreferSpecifiedExoticSpec(opts) { + var _a; + const prefix = manifest_utils_1.getPrefix(opts.alias, opts.name); + if (((_a = opts.specRaw) === null || _a === void 0 ? void 0 : _a.startsWith(`${opts.alias}@${prefix}`)) && opts.specRaw !== `${opts.alias}@workspace:*`) { + const specWithoutName = opts.specRaw.substr(`${opts.alias}@${prefix}`.length); + const selector = version_selector_type_1.default(specWithoutName); + if (!(selector != null && (selector.type === "version" || selector.type === "range"))) { + return opts.specRaw.substr(opts.alias.length + 1); + } + } + return `${prefix}${manifest_utils_1.createVersionSpec(opts.version, opts.pinnedVersion)}`; + } + } +}); + +// ../resolve-dependencies/lib/index.js +var require_lib86 = __commonJS({ + "../resolve-dependencies/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var constants_1 = require_lib7(); + var core_loggers_1 = require_lib12(); + var manifest_utils_1 = require_lib15(); + var read_package_json_1 = require_lib32(); + var types_1 = require_lib14(); + var difference_1 = __importDefault(require_difference()); + var depPathToRef_1 = __importDefault(require_depPathToRef()); + var resolveDependencyTree_1 = __importDefault(require_resolveDependencyTree()); + var resolvePeers_1 = __importDefault(require_resolvePeers()); + var updateLockfile_1 = __importDefault(require_updateLockfile()); + var updateProjectManifest_1 = __importDefault(require_updateProjectManifest()); + async function default_1(importers, opts) { + var _a, _b, _c, _d, _e; + const { dependenciesTree, outdatedDependencies, resolvedImporters, resolvedPackagesByDepPath, wantedToBeSkippedPackageIds } = await resolveDependencyTree_1.default(importers, opts); + const linkedDependenciesByProjectId = {}; + const projectsToLink = await Promise.all(importers.map(async (project, index) => { + var _a2; + const resolvedImporter = resolvedImporters[project.id]; + linkedDependenciesByProjectId[project.id] = resolvedImporter.linkedDependencies; + let updatedManifest = project.manifest; + let updatedOriginalManifest = project.originalManifest; + if (project.updatePackageManifest) { + const manifests = await updateProjectManifest_1.default(importers[index], { + directDependencies: resolvedImporter.directDependencies, + preserveWorkspaceProtocol: opts.preserveWorkspaceProtocol, + saveWorkspaceProtocol: opts.saveWorkspaceProtocol + }); + updatedManifest = manifests[0]; + updatedOriginalManifest = manifests[1]; + } else { + core_loggers_1.packageManifestLogger.debug({ + prefix: project.rootDir, + updated: project.manifest + }); + } + if (updatedManifest != null) { + const projectSnapshot = opts.wantedLockfile.importers[project.id]; + opts.wantedLockfile.importers[project.id] = addDirectDependenciesToLockfile(updatedManifest, projectSnapshot, resolvedImporter.linkedDependencies, resolvedImporter.directDependencies, opts.registries); + } + const topParents = project.manifest ? await getTopParents(difference_1.default(Object.keys(manifest_utils_1.getAllDependenciesFromManifest(project.manifest)), resolvedImporter.directDependencies.filter((dep, index2) => project.wantedDependencies[index2].isNew === true).map(({ alias }) => alias) || []), project.modulesDir) : []; + project.manifest = (_a2 = updatedOriginalManifest !== null && updatedOriginalManifest !== void 0 ? updatedOriginalManifest : project.originalManifest) !== null && _a2 !== void 0 ? _a2 : project.manifest; + return { + binsDir: project.binsDir, + directNodeIdsByAlias: resolvedImporter.directNodeIdsByAlias, + id: project.id, + linkedDependencies: resolvedImporter.linkedDependencies, + manifest: project.manifest, + modulesDir: project.modulesDir, + rootDir: project.rootDir, + topParents + }; + })); + const { dependenciesGraph, dependenciesByProjectId } = resolvePeers_1.default({ + dependenciesTree, + lockfileDir: opts.lockfileDir, + projects: projectsToLink, + strictPeerDependencies: opts.strictPeerDependencies, + virtualStoreDir: opts.virtualStoreDir + }); + for (const { id } of projectsToLink) { + for (const [alias, depPath] of Object.entries(dependenciesByProjectId[id])) { + const depNode = dependenciesGraph[depPath]; + if (depNode.isPure) + continue; + const projectSnapshot = opts.wantedLockfile.importers[id]; + const ref = depPathToRef_1.default(depPath, { + alias, + realName: depNode.name, + registries: opts.registries, + resolution: depNode.resolution + }); + if ((_a = projectSnapshot.dependencies) === null || _a === void 0 ? void 0 : _a[alias]) { + projectSnapshot.dependencies[alias] = ref; + } else if ((_b = projectSnapshot.devDependencies) === null || _b === void 0 ? void 0 : _b[alias]) { + projectSnapshot.devDependencies[alias] = ref; + } else if ((_c = projectSnapshot.optionalDependencies) === null || _c === void 0 ? void 0 : _c[alias]) { + projectSnapshot.optionalDependencies[alias] = ref; + } + } + } + const { newLockfile, pendingRequiresBuilds } = updateLockfile_1.default(dependenciesGraph, opts.wantedLockfile, opts.virtualStoreDir, opts.registries); + if (opts.forceFullResolution && opts.wantedLockfile != null) { + for (const [depPath, pkg] of Object.entries(dependenciesGraph)) { + if (((_d = opts.neverBuiltDependencies) === null || _d === void 0 ? void 0 : _d.has(pkg.name)) || ((_e = opts.wantedLockfile.packages) === null || _e === void 0 ? void 0 : _e[depPath]) == null || pkg.requiresBuild) + continue; + pendingRequiresBuilds.push(depPath); + } + } + const waitTillAllFetchingsFinish = async () => Promise.all(Object.values(resolvedPackagesByDepPath).map(async ({ finishing }) => finishing === null || finishing === void 0 ? void 0 : finishing())); + return { + dependenciesByProjectId, + dependenciesGraph, + finishLockfileUpdates: finishLockfileUpdates.bind(null, dependenciesGraph, pendingRequiresBuilds, newLockfile), + outdatedDependencies, + linkedDependenciesByProjectId, + newLockfile, + waitTillAllFetchingsFinish, + wantedToBeSkippedPackageIds + }; + } + exports2.default = default_1; + async function finishLockfileUpdates(dependenciesGraph, pendingRequiresBuilds, newLockfile) { + return Promise.all(pendingRequiresBuilds.map(async (depPath) => { + const depNode = dependenciesGraph[depPath]; + if (depNode.optional) { + depNode.requiresBuild = true; + } else if (depNode.fetchingBundledManifest != null) { + const filesResponse = await depNode.fetchingFiles(); + const pkgJson = await depNode.fetchingBundledManifest(); + depNode.requiresBuild = Boolean(pkgJson.scripts != null && (Boolean(pkgJson.scripts.preinstall) || Boolean(pkgJson.scripts.install) || Boolean(pkgJson.scripts.postinstall)) || filesResponse.filesIndex["binding.gyp"] || Object.keys(filesResponse.filesIndex).some((filename) => !(filename.match(/^[.]hooks[\\/]/) == null))); + } else { + throw new Error(`Cannot create ${constants_1.WANTED_LOCKFILE} because raw manifest (aka package.json) wasn't fetched for "${depPath}"`); + } + if (depNode.requiresBuild && newLockfile.packages[depPath]) { + newLockfile.packages[depPath].requiresBuild = true; + } + })); + } + function addDirectDependenciesToLockfile(newManifest, projectSnapshot, linkedPackages, directDependencies, registries) { + var _a, _b, _c; + const newProjectSnapshot = { + dependencies: {}, + devDependencies: {}, + optionalDependencies: {}, + specifiers: {} + }; + linkedPackages.forEach((linkedPkg) => { + newProjectSnapshot.specifiers[linkedPkg.alias] = manifest_utils_1.getSpecFromPackageManifest(newManifest, linkedPkg.alias); + }); + const directDependenciesByAlias = directDependencies.reduce((acc, directDependency) => { + acc[directDependency.alias] = directDependency; + return acc; + }, {}); + const allDeps = Array.from(new Set(Object.keys(manifest_utils_1.getAllDependenciesFromManifest(newManifest)))); + for (const alias of allDeps) { + if (directDependenciesByAlias[alias]) { + const dep = directDependenciesByAlias[alias]; + const ref = depPathToRef_1.default(dep.pkgId, { + alias: dep.alias, + realName: dep.name, + registries, + resolution: dep.resolution + }); + if (dep.dev) { + newProjectSnapshot.devDependencies[dep.alias] = ref; + } else if (dep.optional) { + newProjectSnapshot.optionalDependencies[dep.alias] = ref; + } else { + newProjectSnapshot.dependencies[dep.alias] = ref; + } + newProjectSnapshot.specifiers[dep.alias] = manifest_utils_1.getSpecFromPackageManifest(newManifest, dep.alias); + } else if (projectSnapshot.specifiers[alias]) { + newProjectSnapshot.specifiers[alias] = projectSnapshot.specifiers[alias]; + if ((_a = projectSnapshot.dependencies) === null || _a === void 0 ? void 0 : _a[alias]) { + newProjectSnapshot.dependencies[alias] = projectSnapshot.dependencies[alias]; + } else if ((_b = projectSnapshot.optionalDependencies) === null || _b === void 0 ? void 0 : _b[alias]) { + newProjectSnapshot.optionalDependencies[alias] = projectSnapshot.optionalDependencies[alias]; + } else if ((_c = projectSnapshot.devDependencies) === null || _c === void 0 ? void 0 : _c[alias]) { + newProjectSnapshot.devDependencies[alias] = projectSnapshot.devDependencies[alias]; + } + } + } + alignDependencyTypes(newManifest, newProjectSnapshot); + return newProjectSnapshot; + } + function alignDependencyTypes(manifest, projectSnapshot) { + var _a; + const depTypesOfAliases = getAliasToDependencyTypeMap(manifest); + for (const depType of types_1.DEPENDENCIES_FIELDS) { + if (projectSnapshot[depType] == null) + continue; + for (const alias of Object.keys((_a = projectSnapshot[depType]) !== null && _a !== void 0 ? _a : {})) { + if (depType === depTypesOfAliases[alias] || !depTypesOfAliases[alias]) + continue; + projectSnapshot[depTypesOfAliases[alias]][alias] = projectSnapshot[depType][alias]; + delete projectSnapshot[depType][alias]; + } + } + } + function getAliasToDependencyTypeMap(manifest) { + var _a; + const depTypesOfAliases = {}; + for (const depType of types_1.DEPENDENCIES_FIELDS) { + if (manifest[depType] == null) + continue; + for (const alias of Object.keys((_a = manifest[depType]) !== null && _a !== void 0 ? _a : {})) { + if (!depTypesOfAliases[alias]) { + depTypesOfAliases[alias] = depType; + } + } + } + return depTypesOfAliases; + } + async function getTopParents(pkgNames, modules) { + const pkgs = await Promise.all(pkgNames.map((pkgName) => path_1.default.join(modules, pkgName)).map(read_package_json_1.safeReadPackageFromDir)); + return pkgs.filter(Boolean).map(({ name, version }) => ({ name, version })); + } + } +}); + +// ../../node_modules/.pnpm/resolve-link-target@2.0.0/node_modules/resolve-link-target/index.js +var require_resolve_link_target = __commonJS({ + "../../node_modules/.pnpm/resolve-link-target@2.0.0/node_modules/resolve-link-target/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var path = require("path"); + module2.exports = getLinkTarget; + module2.exports.sync = getLinkTargetSync; + async function getLinkTarget(linkPath) { + linkPath = path.resolve(linkPath); + const target = await fs.promises.readlink(linkPath); + return _resolveLink(linkPath, target); + } + function getLinkTargetSync(linkPath) { + linkPath = path.resolve(linkPath); + const target = fs.readlinkSync(linkPath); + return _resolveLink(linkPath, target); + } + function _resolveLink(dest, target) { + if (path.isAbsolute(target)) { + return path.resolve(target); + } + return path.join(path.dirname(dest), target); + } + } +}); + +// ../../node_modules/.pnpm/is-inner-link@4.0.0/node_modules/is-inner-link/index.js +var require_is_inner_link = __commonJS({ + "../../node_modules/.pnpm/is-inner-link@4.0.0/node_modules/is-inner-link/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var isSubdir = require_is_subdir(); + var resolveLinkTarget = require_resolve_link_target(); + module2.exports = async function(parent, relativePathToLink) { + const linkPath = path.resolve(parent, relativePathToLink); + const target = await resolveLinkTarget(linkPath); + return { + isInner: isSubdir(parent, target), + target + }; + }; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/flatten.js +var require_flatten2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/flatten.js"(exports2, module2) { + var _curry1 = require_curry1(); + var _makeFlat = require_makeFlat(); + var flatten = /* @__PURE__ */ _curry1(/* @__PURE__ */ _makeFlat(true)); + module2.exports = flatten; + } +}); + +// ../parse-wanted-dependency/lib/index.js +var require_lib87 = __commonJS({ + "../parse-wanted-dependency/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var validate_npm_package_name_1 = __importDefault(require_validate_npm_package_name()); + function parseWantedDependency(rawWantedDependency) { + const versionDelimiter = rawWantedDependency.indexOf("@", 1); + if (versionDelimiter !== -1) { + const alias = rawWantedDependency.substr(0, versionDelimiter); + if (validate_npm_package_name_1.default(alias).validForOldPackages) { + return { + alias, + pref: rawWantedDependency.substr(versionDelimiter + 1) + }; + } + return { + pref: rawWantedDependency + }; + } + if (validate_npm_package_name_1.default(rawWantedDependency).validForOldPackages) { + return { + alias: rawWantedDependency + }; + } + return { + pref: rawWantedDependency + }; + } + exports2.default = parseWantedDependency; + } +}); + +// ../../node_modules/.pnpm/semver-utils@1.1.4/node_modules/semver-utils/semver-utils.js +var require_semver_utils = __commonJS({ + "../../node_modules/.pnpm/semver-utils@1.1.4/node_modules/semver-utils/semver-utils.js"(exports2, module2) { + (function() { + "use strict"; + var reSemver = /^v?((\d+)\.(\d+)\.(\d+))(?:-([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?(?:\+([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?$/, reSemverRange = /\s*((\|\||\-)|(((?:(?:~?[<>]?)|\^?)=?)\s*(v)?([0-9]+)(\.(x|\*|[0-9]+))?(\.(x|\*|[0-9]+))?(([\-+])([a-zA-Z0-9\.-]+))?))\s*/g; + function pruned(obj) { + var o = {}; + for (var key in obj) { + if (typeof obj[key] !== "undefined") { + o[key] = obj[key]; + } + } + return o; + } + function stringifySemver(obj) { + var str = ""; + str += obj.major || "0"; + str += "."; + str += obj.minor || "0"; + str += "."; + str += obj.patch || "0"; + if (obj.release) { + str += "-" + obj.release; + } + if (obj.build) { + str += "+" + obj.build; + } + return str; + } + function stringifySemverRange(arr) { + var str = ""; + function stringify(ver) { + if (ver.operator) { + str += ver.operator + " "; + } + if (ver.major) { + str += ver.toString() + " "; + } + } + arr.forEach(stringify); + return str.trim(); + } + function SemVer(obj) { + if (!obj) { + return; + } + var me = this; + Object.keys(obj).forEach(function(key) { + me[key] = obj[key]; + }); + } + SemVer.prototype.toString = function() { + return stringifySemver(this); + }; + function parseSemver(version) { + var m = reSemver.exec(version) || [], ver = new SemVer(pruned({ + semver: m[0], + version: m[1], + major: m[2], + minor: m[3], + patch: m[4], + release: m[5], + build: m[6] + })); + if (m.length === 0) { + ver = null; + } + return ver; + } + function parseSemverRange(str) { + var m, arr = [], obj; + while (m = reSemverRange.exec(str)) { + obj = { + semver: m[3], + operator: m[4] || m[2], + major: m[6], + minor: m[8], + patch: m[10] + }; + if (m[12] === "+") { + obj.build = m[13]; + } + if (m[12] === "-") { + obj.release = m[13]; + } + arr.push(new SemVer(pruned(obj))); + } + return arr; + } + module2.exports.parse = parseSemver; + module2.exports.stringify = stringifySemver; + module2.exports.parseRange = parseSemverRange; + module2.exports.stringifyRange = stringifySemverRange; + })(); + } +}); + +// ../supi/lib/guessPinnedVersionFromExistingSpec.js +var require_guessPinnedVersionFromExistingSpec = __commonJS({ + "../supi/lib/guessPinnedVersionFromExistingSpec.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var semver_utils_1 = require_semver_utils(); + function guessPinnedVersionFromExistingSpec(spec) { + if (spec.startsWith("workspace:")) + spec = spec.substr("workspace:".length); + if (spec === "*") + return "none"; + const parsedRange = semver_utils_1.parseRange(spec); + if (parsedRange.length !== 1) + return void 0; + const versionObject = parsedRange[0]; + switch (versionObject.operator) { + case "~": + return "minor"; + case "^": + return "major"; + case void 0: + if (versionObject.patch) + return "patch"; + if (versionObject.minor) + return "minor"; + } + return void 0; + } + exports2.default = guessPinnedVersionFromExistingSpec; + } +}); + +// ../supi/lib/parseWantedDependencies.js +var require_parseWantedDependencies = __commonJS({ + "../supi/lib/parseWantedDependencies.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var parse_wanted_dependency_1 = __importDefault(require_lib87()); + var guessPinnedVersionFromExistingSpec_1 = __importDefault(require_guessPinnedVersionFromExistingSpec()); + function parseWantedDependencies(rawWantedDependencies, opts) { + return rawWantedDependencies.map((rawWantedDependency) => { + var _a; + const parsed = parse_wanted_dependency_1.default(rawWantedDependency); + const alias = parsed["alias"]; + let pref = parsed["pref"]; + let pinnedVersion; + if (!opts.allowNew && (!alias || !opts.currentPrefs[alias])) { + return null; + } + if (alias && opts.currentPrefs[alias]) { + if (!pref) { + pref = opts.currentPrefs[alias].startsWith("workspace:") && opts.updateWorkspaceDependencies === true ? "workspace:*" : opts.currentPrefs[alias]; + } + pinnedVersion = guessPinnedVersionFromExistingSpec_1.default(opts.currentPrefs[alias]); + } + const result = { + alias, + dev: Boolean(opts.dev || alias && !!opts.devDependencies[alias]), + optional: Boolean(opts.optional || alias && !!opts.optionalDependencies[alias]), + pinnedVersion, + raw: rawWantedDependency + }; + if (pref) { + return { + ...result, + pref + }; + } + if (alias && ((_a = opts.preferredSpecs) === null || _a === void 0 ? void 0 : _a[alias])) { + return { + ...result, + pref: opts.preferredSpecs[alias], + raw: `${rawWantedDependency}@${opts.preferredSpecs[alias]}` + }; + } + return { + ...result, + pref: opts.defaultTag + }; + }).filter((wd) => wd !== null); + } + exports2.default = parseWantedDependencies; + } +}); + +// ../supi/lib/safeIsInnerLink.js +var require_safeIsInnerLink = __commonJS({ + "../supi/lib/safeIsInnerLink.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var logger_1 = __importDefault(require_lib6()); + var is_inner_link_1 = __importDefault(require_is_inner_link()); + var is_subdir_1 = __importDefault(require_is_subdir()); + async function safeIsInnerLink(projectModulesDir, depName, opts) { + try { + const link = await is_inner_link_1.default(projectModulesDir, depName); + if (link.isInner) + return true; + if (is_subdir_1.default(opts.virtualStoreDir, link.target) || is_subdir_1.default(opts.storeDir, link.target)) + return true; + return link.target; + } catch (err) { + if (err.code === "ENOENT") + return true; + if (opts.hideAlienModules) { + logger_1.default.warn({ + message: `Moving ${depName} that was installed by a different package manager to "node_modules/.ignored`, + prefix: opts.projectDir + }); + const ignoredDir = path_1.default.join(projectModulesDir, ".ignored", depName); + await fs_1.promises.mkdir(path_1.default.dirname(ignoredDir), { recursive: true }); + await fs_1.promises.rename(path_1.default.join(projectModulesDir, depName), ignoredDir); + } + return true; + } + } + exports2.default = safeIsInnerLink; + } +}); + +// ../supi/lib/uninstall/removeDeps.js +var require_removeDeps = __commonJS({ + "../supi/lib/uninstall/removeDeps.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var core_loggers_1 = require_lib12(); + var types_1 = require_lib14(); + async function default_1(packageManifest, removedPackages, opts) { + if (opts.saveType) { + if (packageManifest[opts.saveType] == null) + return packageManifest; + removedPackages.forEach((dependency) => { + delete packageManifest[opts.saveType][dependency]; + }); + } else { + types_1.DEPENDENCIES_FIELDS.filter((depField) => packageManifest[depField]).forEach((depField) => { + removedPackages.forEach((dependency) => { + delete packageManifest[depField][dependency]; + }); + }); + } + if (packageManifest.peerDependencies != null) { + for (const removedDependency of removedPackages) { + delete packageManifest.peerDependencies[removedDependency]; + } + } + if (packageManifest.dependenciesMeta != null) { + for (const removedDependency of removedPackages) { + delete packageManifest.dependenciesMeta[removedDependency]; + } + } + core_loggers_1.packageManifestLogger.debug({ + prefix: opts.prefix, + updated: packageManifest + }); + return packageManifest; + } + exports2.default = default_1; + } +}); + +// ../../node_modules/.pnpm/p-every@2.0.0/node_modules/p-every/index.js +var require_p_every = __commonJS({ + "../../node_modules/.pnpm/p-every@2.0.0/node_modules/p-every/index.js"(exports2, module2) { + "use strict"; + var pMap = require_p_map(); + var EndError = class extends Error { + }; + var test = (testFunction) => async (element, index) => { + const result = await testFunction(element, index); + if (!result) { + throw new EndError(); + } + return result; + }; + var pEvery = async (iterable, testFunction, opts) => { + try { + await pMap(iterable, test(testFunction), opts); + return true; + } catch (error) { + if (error instanceof EndError) { + return false; + } + throw error; + } + }; + module2.exports = pEvery; + module2.exports.default = pEvery; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_reduced.js +var require_reduced = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_reduced.js"(exports2, module2) { + function _reduced(x) { + return x && x["@@transducer/reduced"] ? x : { + "@@transducer/value": x, + "@@transducer/reduced": true + }; + } + module2.exports = _reduced; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xany.js +var require_xany = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xany.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _reduced = require_reduced(); + var _xfBase = require_xfBase(); + var XAny = /* @__PURE__ */ function() { + function XAny2(f, xf) { + this.xf = xf; + this.f = f; + this.any = false; + } + XAny2.prototype["@@transducer/init"] = _xfBase.init; + XAny2.prototype["@@transducer/result"] = function(result) { + if (!this.any) { + result = this.xf["@@transducer/step"](result, false); + } + return this.xf["@@transducer/result"](result); + }; + XAny2.prototype["@@transducer/step"] = function(result, input) { + if (this.f(input)) { + this.any = true; + result = _reduced(this.xf["@@transducer/step"](result, true)); + } + return result; + }; + return XAny2; + }(); + var _xany = /* @__PURE__ */ _curry2(function _xany2(f, xf) { + return new XAny(f, xf); + }); + module2.exports = _xany; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/any.js +var require_any = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/any.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _dispatchable = require_dispatchable(); + var _xany = require_xany(); + var any = /* @__PURE__ */ _curry2(/* @__PURE__ */ _dispatchable(["any"], _xany, function any2(fn2, list) { + var idx = 0; + while (idx < list.length) { + if (fn2(list[idx])) { + return true; + } + idx += 1; + } + return false; + })); + module2.exports = any; + } +}); + +// ../supi/lib/install/allProjectsAreUpToDate.js +var require_allProjectsAreUpToDate = __commonJS({ + "../supi/lib/install/allProjectsAreUpToDate.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var lockfile_utils_1 = require_lib53(); + var read_package_json_1 = require_lib32(); + var types_1 = require_lib14(); + var p_every_1 = __importDefault(require_p_every()); + var any_1 = __importDefault(require_any()); + var semver_1 = __importDefault(require_semver2()); + async function allProjectsAreUpToDate(projects, opts) { + const manifestsByDir = opts.workspacePackages ? getWorkspacePackagesByDirectory(opts.workspacePackages) : {}; + const _satisfiesPackageManifest = lockfile_utils_1.satisfiesPackageManifest.bind(null, opts.wantedLockfile); + const _linkedPackagesAreUpToDate = linkedPackagesAreUpToDate.bind(null, { + linkWorkspacePackages: opts.linkWorkspacePackages, + manifestsByDir, + workspacePackages: opts.workspacePackages + }); + return p_every_1.default(projects, (project) => { + const importer = opts.wantedLockfile.importers[project.id]; + return !hasLocalTarballDepsInRoot(importer) && _satisfiesPackageManifest(project.manifest, project.id) && _linkedPackagesAreUpToDate({ + dir: project.rootDir, + manifest: project.manifest, + snapshot: importer + }); + }); + } + exports2.default = allProjectsAreUpToDate; + function getWorkspacePackagesByDirectory(workspacePackages) { + const workspacePackagesByDirectory = {}; + Object.keys(workspacePackages || {}).forEach((pkgName) => { + Object.keys(workspacePackages[pkgName] || {}).forEach((pkgVersion) => { + workspacePackagesByDirectory[workspacePackages[pkgName][pkgVersion].dir] = workspacePackages[pkgName][pkgVersion].manifest; + }); + }); + return workspacePackagesByDirectory; + } + async function linkedPackagesAreUpToDate({ linkWorkspacePackages, manifestsByDir, workspacePackages }, project) { + var _a, _b, _c; + for (const depField of types_1.DEPENDENCIES_FIELDS) { + const lockfileDeps = project.snapshot[depField]; + const manifestDeps = project.manifest[depField]; + if (lockfileDeps == null || manifestDeps == null) + continue; + const depNames = Object.keys(lockfileDeps); + for (const depName of depNames) { + const currentSpec = manifestDeps[depName]; + if (!currentSpec) + continue; + const lockfileRef = lockfileDeps[depName]; + const isLinked = lockfileRef.startsWith("link:"); + if (isLinked && (currentSpec.startsWith("link:") || currentSpec.startsWith("file:") || currentSpec.startsWith("workspace:."))) { + continue; + } + const linkedDir = isLinked ? path_1.default.join(project.dir, lockfileRef.substr(5)) : (_b = (_a = workspacePackages === null || workspacePackages === void 0 ? void 0 : workspacePackages[depName]) === null || _a === void 0 ? void 0 : _a[lockfileRef]) === null || _b === void 0 ? void 0 : _b.dir; + if (!linkedDir) + continue; + if (!linkWorkspacePackages && !currentSpec.startsWith("workspace:")) { + continue; + } + const linkedPkg = (_c = manifestsByDir[linkedDir]) !== null && _c !== void 0 ? _c : await read_package_json_1.safeReadPackageFromDir(linkedDir); + const availableRange = getVersionRange(currentSpec); + const localPackageSatisfiesRange = availableRange === "*" || linkedPkg && semver_1.default.satisfies(linkedPkg.version, availableRange, { loose: true }); + if (isLinked !== localPackageSatisfiesRange) + return false; + } + } + return true; + } + function getVersionRange(spec) { + if (spec.startsWith("workspace:")) + return spec.substr(10); + if (spec.startsWith("npm:")) { + spec = spec.substr(4); + const index = spec.indexOf("@", 1); + if (index === -1) + return "*"; + return spec.substr(index + 1) || "*"; + } + return spec; + } + function hasLocalTarballDepsInRoot(importer) { + var _a, _b, _c; + return any_1.default(refIsLocalTarball, Object.values((_a = importer.dependencies) !== null && _a !== void 0 ? _a : {})) || any_1.default(refIsLocalTarball, Object.values((_b = importer.devDependencies) !== null && _b !== void 0 ? _b : {})) || any_1.default(refIsLocalTarball, Object.values((_c = importer.optionalDependencies) !== null && _c !== void 0 ? _c : {})); + } + function refIsLocalTarball(ref) { + return ref.startsWith("file:") && (ref.endsWith(".tgz") || ref.endsWith(".tar.gz") || ref.endsWith(".tar")); + } + } +}); + +// ../supi/lib/install/createPackageExtender.js +var require_createPackageExtender = __commonJS({ + "../supi/lib/install/createPackageExtender.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var parse_wanted_dependency_1 = __importDefault(require_lib87()); + var semver_1 = __importDefault(require_semver2()); + function default_1(packageExtensions) { + const extensionsByPkgName = {}; + Object.entries(packageExtensions).forEach(([selector, packageExtension]) => { + const { alias, pref } = parse_wanted_dependency_1.default(selector); + if (!extensionsByPkgName[alias]) { + extensionsByPkgName[alias] = []; + } + extensionsByPkgName[alias].push({ packageExtension, range: pref }); + }); + return extendPkgHook.bind(null, extensionsByPkgName); + } + exports2.default = default_1; + function extendPkgHook(extensionsByPkgName, manifest) { + const extensions = extensionsByPkgName[manifest.name]; + if (extensions == null) + return manifest; + extendPkg(manifest, extensions); + return manifest; + } + function extendPkg(manifest, extensions) { + for (const { range, packageExtension } of extensions) { + if (range != null && !semver_1.default.satisfies(manifest.version, range)) + continue; + for (const field of ["dependencies", "optionalDependencies", "peerDependencies", "peerDependenciesMeta"]) { + if (!packageExtension[field]) + continue; + manifest[field] = { + ...packageExtension[field], + ...manifest[field] + }; + } + } + } + } +}); + +// ../supi/lib/install/createVersionsOverrider.js +var require_createVersionsOverrider = __commonJS({ + "../supi/lib/install/createVersionsOverrider.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var parse_wanted_dependency_1 = __importDefault(require_lib87()); + var normalize_path_1 = __importDefault(require_normalize_path()); + var semver_1 = __importDefault(require_semver2()); + var DELIMITER_REGEX = /[^ |@]>/; + function default_1(overrides, rootDir) { + const genericVersionOverrides = []; + const versionOverrides = []; + Object.entries(overrides).forEach(([selector, newPref]) => { + let linkTarget; + if (newPref.startsWith("link:")) { + linkTarget = path_1.default.join(rootDir, newPref.substring(5)); + } + let delimiterIndex = selector.search(DELIMITER_REGEX); + if (delimiterIndex !== -1) { + delimiterIndex++; + const parentSelector = selector.substring(0, delimiterIndex); + const childSelector = selector.substring(delimiterIndex + 1); + versionOverrides.push({ + linkTarget, + newPref, + parentWantedDependency: parse_wanted_dependency_1.default(parentSelector), + wantedDependency: parse_wanted_dependency_1.default(childSelector) + }); + return; + } + genericVersionOverrides.push({ + linkTarget, + newPref, + wantedDependency: parse_wanted_dependency_1.default(selector) + }); + }); + return (manifest, dir) => { + overrideDepsOfPkg({ manifest, dir }, versionOverrides.filter(({ parentWantedDependency }) => { + return parentWantedDependency.alias === manifest.name && (!parentWantedDependency.pref || semver_1.default.satisfies(manifest.version, parentWantedDependency.pref)); + })); + overrideDepsOfPkg({ manifest, dir }, genericVersionOverrides); + return manifest; + }; + } + exports2.default = default_1; + function overrideDepsOfPkg({ manifest, dir }, versionOverrides) { + if (manifest.dependencies != null) + overrideDeps(versionOverrides, manifest.dependencies, dir); + if (manifest.optionalDependencies != null) + overrideDeps(versionOverrides, manifest.optionalDependencies, dir); + if (manifest.devDependencies != null) + overrideDeps(versionOverrides, manifest.devDependencies, dir); + return manifest; + } + function overrideDeps(versionOverrides, deps, dir) { + for (const versionOverride of versionOverrides) { + const actual = deps[versionOverride.wantedDependency.alias]; + if (actual == null) + continue; + if (!isSubRange(versionOverride.wantedDependency.pref, actual)) + continue; + if (versionOverride.linkTarget && dir) { + deps[versionOverride.wantedDependency.alias] = `link:${normalize_path_1.default(path_1.default.relative(dir, versionOverride.linkTarget))}`; + continue; + } + deps[versionOverride.wantedDependency.alias] = versionOverride.newPref; + } + } + function isSubRange(superRange, subRange) { + return !superRange || subRange === superRange || semver_1.default.validRange(subRange) != null && semver_1.default.validRange(superRange) != null && semver_1.default.subset(subRange, superRange); + } + } +}); + +// ../supi/lib/pnpmPkgJson.js +var require_pnpmPkgJson = __commonJS({ + "../supi/lib/pnpmPkgJson.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var load_json_file_1 = require_load_json_file(); + var pkgJson; + try { + pkgJson = load_json_file_1.sync(path_1.default.resolve(__dirname, "../package.json")); + } catch (err) { + pkgJson = { + name: "pnpm", + version: "0.0.0" + }; + } + exports2.default = pkgJson; + } +}); + +// ../supi/lib/install/extendInstallOptions.js +var require_extendInstallOptions = __commonJS({ + "../supi/lib/install/extendInstallOptions.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var constants_1 = require_lib7(); + var error_1 = __importDefault(require_lib8()); + var normalize_registries_1 = __importStar2(require_lib65()); + var pnpmPkgJson_1 = __importDefault(require_pnpmPkgJson()); + var defaults = async (opts) => { + var _a, _b, _c; + const packageManager = (_a = opts.packageManager) !== null && _a !== void 0 ? _a : { + name: pnpmPkgJson_1.default.name, + version: pnpmPkgJson_1.default.version + }; + return { + childConcurrency: 5, + depth: 0, + enablePnp: false, + engineStrict: false, + extendNodePath: true, + force: false, + forceSharedLockfile: false, + frozenLockfile: false, + hoistPattern: void 0, + hooks: {}, + ignoreCurrentPrefs: false, + ignoreScripts: false, + include: { + dependencies: true, + devDependencies: true, + optionalDependencies: true + }, + includeDirect: { + dependencies: true, + devDependencies: true, + optionalDependencies: true + }, + lockfileDir: (_c = (_b = opts.lockfileDir) !== null && _b !== void 0 ? _b : opts.dir) !== null && _c !== void 0 ? _c : process.cwd(), + lockfileOnly: false, + nodeVersion: process.version, + ownLifecycleHooksStdio: "inherit", + ignorePackageManifest: false, + packageManager, + preferFrozenLockfile: true, + preferWorkspacePackages: false, + preserveWorkspaceProtocol: true, + pruneLockfileImporters: false, + pruneStore: false, + rawConfig: {}, + registries: normalize_registries_1.DEFAULT_REGISTRIES, + saveWorkspaceProtocol: true, + shamefullyHoist: false, + shellEmulator: false, + sideEffectsCacheRead: false, + sideEffectsCacheWrite: false, + symlink: true, + storeController: opts.storeController, + storeDir: opts.storeDir, + strictPeerDependencies: false, + tag: "latest", + unsafePerm: process.platform === "win32" || process.platform === "cygwin" || !process.setgid || process.getuid() !== 0, + update: false, + useLockfile: true, + userAgent: `${packageManager.name}/${packageManager.version} npm/? node/${process.version} ${process.platform} ${process.arch}`, + verifyStoreIntegrity: true, + workspacePackages: {}, + enableModulesDir: true, + modulesCacheMaxAge: 7 * 24 * 60 + }; + }; + exports2.default = async (opts) => { + if (opts) { + for (const key in opts) { + if (opts[key] === void 0) { + delete opts[key]; + } + } + } + const defaultOpts = await defaults(opts); + const extendedOpts = { + ...defaultOpts, + ...opts, + storeDir: defaultOpts.storeDir + }; + if (extendedOpts.lockfileOnly) { + extendedOpts.ignoreScripts = true; + if (!extendedOpts.useLockfile) { + throw new error_1.default("CONFIG_CONFLICT_LOCKFILE_ONLY_WITH_NO_LOCKFILE", `Cannot generate a ${constants_1.WANTED_LOCKFILE} because lockfile is set to false`); + } + } + if (extendedOpts.userAgent.startsWith("npm/")) { + extendedOpts.userAgent = `${extendedOpts.packageManager.name}/${extendedOpts.packageManager.version} ${extendedOpts.userAgent}`; + } + extendedOpts.registries = normalize_registries_1.default(extendedOpts.registries); + extendedOpts.rawConfig["registry"] = extendedOpts.registries.default; + return extendedOpts; + }; + } +}); + +// ../supi/lib/install/getPreferredVersions.js +var require_getPreferredVersions = __commonJS({ + "../supi/lib/install/getPreferredVersions.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getPreferredVersionsFromLockfile = exports2.getAllUniqueSpecs = void 0; + var lockfile_utils_1 = require_lib53(); + var manifest_utils_1 = require_lib15(); + var version_selector_type_1 = __importDefault(require_version_selector_type()); + function getAllUniqueSpecs(manifests) { + const allSpecs = {}; + const ignored = new Set(); + for (const manifest of manifests) { + const specs = manifest_utils_1.getAllDependenciesFromManifest(manifest); + for (const [name, spec] of Object.entries(specs)) { + if (ignored.has(name)) + continue; + if (allSpecs[name] != null && allSpecs[name] !== spec || spec.includes(":")) { + ignored.add(name); + delete allSpecs[name]; + continue; + } + allSpecs[name] = spec; + } + } + return allSpecs; + } + exports2.getAllUniqueSpecs = getAllUniqueSpecs; + function getPreferredVersionsFromPackage(pkg) { + return getVersionSpecsByRealNames(manifest_utils_1.getAllDependenciesFromManifest(pkg)); + } + exports2.default = getPreferredVersionsFromPackage; + function getVersionSpecsByRealNames(deps) { + return Object.keys(deps).reduce((acc, depName) => { + if (deps[depName].startsWith("npm:")) { + const pref = deps[depName].substr(4); + const index = pref.lastIndexOf("@"); + const spec = pref.substr(index + 1); + const selector = version_selector_type_1.default(spec); + if (selector != null) { + const pkgName = pref.substr(0, index); + acc[pkgName] = acc[pkgName] || {}; + acc[pkgName][selector.normalized] = selector.type; + } + } else if (!deps[depName].includes(":")) { + const selector = version_selector_type_1.default(deps[depName]); + if (selector != null) { + acc[depName] = acc[depName] || {}; + acc[depName][selector.normalized] = selector.type; + } + } + return acc; + }, {}); + } + function getPreferredVersionsFromLockfile(snapshots) { + const preferredVersions = {}; + for (const [depPath, snapshot] of Object.entries(snapshots)) { + const { name, version } = lockfile_utils_1.nameVerFromPkgSnapshot(depPath, snapshot); + if (!preferredVersions[name]) { + preferredVersions[name] = { [version]: "version" }; + } else { + preferredVersions[name][version] = "version"; + } + } + return preferredVersions; + } + exports2.getPreferredVersionsFromLockfile = getPreferredVersionsFromLockfile; + } +}); + +// ../supi/lib/install/getWantedDependencies.js +var require_getWantedDependencies = __commonJS({ + "../supi/lib/install/getWantedDependencies.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var manifest_utils_1 = require_lib15(); + var guessPinnedVersionFromExistingSpec_1 = __importDefault(require_guessPinnedVersionFromExistingSpec()); + function getWantedDependencies(pkg, opts) { + var _a, _b, _c, _d, _e; + const depsToInstall = manifest_utils_1.filterDependenciesByType(pkg, (_a = opts === null || opts === void 0 ? void 0 : opts.includeDirect) !== null && _a !== void 0 ? _a : { + dependencies: true, + devDependencies: true, + optionalDependencies: true + }); + return getWantedDependenciesFromGivenSet(depsToInstall, { + dependencies: (_b = pkg.dependencies) !== null && _b !== void 0 ? _b : {}, + devDependencies: (_c = pkg.devDependencies) !== null && _c !== void 0 ? _c : {}, + optionalDependencies: (_d = pkg.optionalDependencies) !== null && _d !== void 0 ? _d : {}, + dependenciesMeta: (_e = pkg.dependenciesMeta) !== null && _e !== void 0 ? _e : {}, + updatePref: (opts === null || opts === void 0 ? void 0 : opts.updateWorkspaceDependencies) === true ? updateWorkspacePref : (pref) => pref + }); + } + exports2.default = getWantedDependencies; + function updateWorkspacePref(pref) { + return pref.startsWith("workspace:") ? "workspace:*" : pref; + } + function getWantedDependenciesFromGivenSet(deps, opts) { + if (!deps) + return []; + return Object.keys(deps).map((alias) => { + var _a, _b; + const pref = opts.updatePref(deps[alias]); + let depType; + if (opts.optionalDependencies[alias] != null) + depType = "optional"; + else if (opts.dependencies[alias] != null) + depType = "prod"; + else if (opts.devDependencies[alias] != null) + depType = "dev"; + return { + alias, + dev: depType === "dev", + optional: depType === "optional", + nodeExecPath: (_a = opts.nodeExecPath) !== null && _a !== void 0 ? _a : (_b = opts.dependenciesMeta[alias]) === null || _b === void 0 ? void 0 : _b.node, + pinnedVersion: guessPinnedVersionFromExistingSpec_1.default(deps[alias]), + pref, + raw: `${alias}@${pref}` + }; + }); + } + } +}); + +// ../supi/lib/install/link.js +var require_link2 = __commonJS({ + "../supi/lib/install/link.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var constants_1 = require_lib7(); + var core_loggers_1 = require_lib12(); + var filter_lockfile_1 = require_lib71(); + var hoist_1 = __importDefault(require_lib82()); + var logger_1 = __importDefault(require_lib6()); + var modules_cleaner_1 = require_lib73(); + var symlink_dependency_1 = __importStar2(require_lib75()); + var p_limit_1 = __importDefault(require_p_limit()); + var path_exists_1 = __importDefault(require_path_exists()); + var fromPairs_1 = __importDefault(require_fromPairs()); + var equals_1 = __importDefault(require_equals2()); + var difference_1 = __importDefault(require_difference()); + var omit_1 = __importDefault(require_omit()); + var props_1 = __importDefault(require_props()); + var brokenModulesLogger = logger_1.default("_broken_node_modules"); + async function linkPackages(projects, depGraph, opts) { + var _a, _b, _c; + let depNodes = Object.values(depGraph).filter(({ depPath, id }) => { + var _a2; + if (((_a2 = opts.wantedLockfile.packages) === null || _a2 === void 0 ? void 0 : _a2[depPath]) != null && !opts.wantedLockfile.packages[depPath].optional) { + opts.skipped.delete(depPath); + return true; + } + if (opts.wantedToBeSkippedPackageIds.has(id)) { + opts.skipped.add(depPath); + return false; + } + opts.skipped.delete(depPath); + return true; + }); + if (!opts.include.dependencies) { + depNodes = depNodes.filter(({ dev, optional }) => dev || optional); + } + if (!opts.include.devDependencies) { + depNodes = depNodes.filter(({ optional, prod }) => prod || optional); + } + if (!opts.include.optionalDependencies) { + depNodes = depNodes.filter(({ optional }) => !optional); + } + depGraph = fromPairs_1.default(depNodes.map((depNode) => [depNode.depPath, depNode])); + const removedDepPaths = await modules_cleaner_1.prune(projects, { + currentLockfile: opts.currentLockfile, + hoistedDependencies: opts.hoistedDependencies, + hoistedModulesDir: opts.hoistPattern != null ? opts.hoistedModulesDir : void 0, + include: opts.include, + lockfileDir: opts.lockfileDir, + pruneStore: opts.pruneStore, + pruneVirtualStore: opts.pruneVirtualStore, + publicHoistedModulesDir: opts.publicHoistPattern != null ? opts.rootModulesDir : void 0, + registries: opts.registries, + skipped: opts.skipped, + storeController: opts.storeController, + virtualStoreDir: opts.virtualStoreDir, + wantedLockfile: opts.wantedLockfile + }); + core_loggers_1.stageLogger.debug({ + prefix: opts.lockfileDir, + stage: "importing_started" + }); + const projectIds = projects.map(({ id }) => id); + const filterOpts = { + include: opts.include, + registries: opts.registries, + skipped: opts.skipped + }; + const newCurrentLockfile = filter_lockfile_1.filterLockfileByImporters(opts.wantedLockfile, projectIds, { + ...filterOpts, + failOnMissingDependencies: true, + skipped: new Set() + }); + const newDepPaths = await linkNewPackages(filter_lockfile_1.filterLockfileByImporters(opts.currentLockfile, projectIds, { + ...filterOpts, + failOnMissingDependencies: false + }), newCurrentLockfile, depGraph, { + force: opts.force, + lockfileDir: opts.lockfileDir, + optional: opts.include.optionalDependencies, + sideEffectsCacheRead: opts.sideEffectsCacheRead, + symlink: opts.symlink, + skipped: opts.skipped, + storeController: opts.storeController, + virtualStoreDir: opts.virtualStoreDir + }); + core_loggers_1.stageLogger.debug({ + prefix: opts.lockfileDir, + stage: "importing_done" + }); + if (opts.symlink) { + await Promise.all(projects.map(async ({ id, manifest, modulesDir, rootDir }) => { + const deps = opts.dependenciesByProjectId[id]; + await Promise.all([ + ...Object.entries(deps).map(([rootAlias, depPath]) => ({ rootAlias, depGraphNode: depGraph[depPath] })).filter(({ depGraphNode }) => depGraphNode).map(async ({ rootAlias, depGraphNode }) => { + var _a2, _b2; + const isDev = Boolean((_a2 = manifest.devDependencies) === null || _a2 === void 0 ? void 0 : _a2[depGraphNode.name]); + const isOptional = Boolean((_b2 = manifest.optionalDependencies) === null || _b2 === void 0 ? void 0 : _b2[depGraphNode.name]); + if (isDev && !opts.include.devDependencies || isOptional && !opts.include.optionalDependencies || !isDev && !isOptional && !opts.include.dependencies) + return; + if ((await symlink_dependency_1.default(depGraphNode.dir, modulesDir, rootAlias)).reused) + return; + core_loggers_1.rootLogger.debug({ + added: { + dependencyType: isDev && "dev" || isOptional && "optional" || "prod", + id: depGraphNode.id, + latest: opts.outdatedDependencies[depGraphNode.id], + name: rootAlias, + realName: depGraphNode.name, + version: depGraphNode.version + }, + prefix: rootDir + }); + }), + ...opts.linkedDependenciesByProjectId[id].map(async (linkedDependency) => { + const depLocation = resolvePath(rootDir, linkedDependency.resolution.directory); + return symlink_dependency_1.symlinkDirectRootDependency(depLocation, modulesDir, linkedDependency.alias, { + fromDependenciesField: linkedDependency.dev && "devDependencies" || linkedDependency.optional && "optionalDependencies" || "dependencies", + linkedPackage: linkedDependency, + prefix: rootDir + }); + }) + ]); + })); + } + let currentLockfile; + const allImportersIncluded = equals_1.default(projectIds.sort(), Object.keys(opts.wantedLockfile.importers).sort()); + if (opts.makePartialCurrentLockfile || !allImportersIncluded) { + const packages = (_a = opts.currentLockfile.packages) !== null && _a !== void 0 ? _a : {}; + if (opts.wantedLockfile.packages != null) { + for (const depPath in opts.wantedLockfile.packages) { + if (depGraph[depPath]) { + packages[depPath] = opts.wantedLockfile.packages[depPath]; + } + } + } + const projects2 = projectIds.reduce((acc, projectId) => { + acc[projectId] = opts.wantedLockfile.importers[projectId]; + return acc; + }, opts.currentLockfile.importers); + currentLockfile = filter_lockfile_1.filterLockfileByImporters({ + ...opts.wantedLockfile, + importers: projects2, + packages + }, Object.keys(projects2), { + ...filterOpts, + failOnMissingDependencies: false, + skipped: new Set() + }); + } else if (opts.include.dependencies && opts.include.devDependencies && opts.include.optionalDependencies && opts.skipped.size === 0) { + currentLockfile = opts.wantedLockfile; + } else { + currentLockfile = newCurrentLockfile; + } + let newHoistedDependencies; + if ((opts.hoistPattern != null || opts.publicHoistPattern != null) && (newDepPaths.length > 0 || removedDepPaths.size > 0)) { + const hoistLockfile = { + ...currentLockfile, + packages: omit_1.default(Array.from(opts.skipped), currentLockfile.packages) + }; + newHoistedDependencies = await hoist_1.default({ + extendNodePath: opts.extendNodePath, + lockfile: hoistLockfile, + lockfileDir: opts.lockfileDir, + privateHoistedModulesDir: opts.hoistedModulesDir, + privateHoistPattern: (_b = opts.hoistPattern) !== null && _b !== void 0 ? _b : [], + publicHoistedModulesDir: opts.rootModulesDir, + publicHoistPattern: (_c = opts.publicHoistPattern) !== null && _c !== void 0 ? _c : [], + virtualStoreDir: opts.virtualStoreDir + }); + } else { + newHoistedDependencies = {}; + } + return { + currentLockfile, + newDepPaths, + newHoistedDependencies, + removedDepPaths + }; + } + exports2.default = linkPackages; + var isAbsolutePath = /^[/]|^[A-Za-z]:/; + function resolvePath(where, spec) { + if (isAbsolutePath.test(spec)) + return spec; + return path_1.default.resolve(where, spec); + } + async function linkNewPackages(currentLockfile, wantedLockfile, depGraph, opts) { + var _a; + const wantedRelDepPaths = difference_1.default(Object.keys((_a = wantedLockfile.packages) !== null && _a !== void 0 ? _a : {}), Array.from(opts.skipped)); + let newDepPathsSet; + if (opts.force) { + newDepPathsSet = new Set(wantedRelDepPaths.filter((depPath) => depGraph[depPath])); + } else { + newDepPathsSet = await selectNewFromWantedDeps(wantedRelDepPaths, currentLockfile, depGraph); + } + core_loggers_1.statsLogger.debug({ + added: newDepPathsSet.size, + prefix: opts.lockfileDir + }); + const existingWithUpdatedDeps = []; + if (!opts.force && currentLockfile.packages != null && wantedLockfile.packages != null) { + for (const depPath of wantedRelDepPaths) { + if (currentLockfile.packages[depPath] && (!equals_1.default(currentLockfile.packages[depPath].dependencies, wantedLockfile.packages[depPath].dependencies) || !equals_1.default(currentLockfile.packages[depPath].optionalDependencies, wantedLockfile.packages[depPath].optionalDependencies))) { + if (depGraph[depPath] && !newDepPathsSet.has(depPath)) { + existingWithUpdatedDeps.push(depGraph[depPath]); + } + } + } + } + if (!newDepPathsSet.size && existingWithUpdatedDeps.length === 0) + return []; + const newDepPaths = Array.from(newDepPathsSet); + const newPkgs = props_1.default(newDepPaths, depGraph); + await Promise.all(newPkgs.map(async (depNode) => fs_1.promises.mkdir(depNode.modules, { recursive: true }))); + await Promise.all([ + !opts.symlink ? Promise.resolve() : linkAllModules([...newPkgs, ...existingWithUpdatedDeps], depGraph, { + lockfileDir: opts.lockfileDir, + optional: opts.optional + }), + linkAllPkgs(opts.storeController, newPkgs, { + force: opts.force, + lockfileDir: opts.lockfileDir, + targetEngine: opts.sideEffectsCacheRead && constants_1.ENGINE_NAME || void 0 + }) + ]); + return newDepPaths; + } + async function selectNewFromWantedDeps(wantedRelDepPaths, currentLockfile, depGraph) { + var _a; + const newDeps = new Set(); + const prevDeps = (_a = currentLockfile.packages) !== null && _a !== void 0 ? _a : {}; + await Promise.all(wantedRelDepPaths.map(async (depPath) => { + const depNode = depGraph[depPath]; + if (!depNode) + return; + const prevDep = prevDeps[depPath]; + if (prevDep && depNode.resolution["integrity"] === prevDep.resolution["integrity"]) { + if (await path_exists_1.default(depNode.dir)) { + return; + } + brokenModulesLogger.debug({ + missing: depNode.dir + }); + } + newDeps.add(depPath); + })); + return newDeps; + } + var limitLinking = p_limit_1.default(16); + async function linkAllPkgs(storeController, depNodes, opts) { + return Promise.all(depNodes.map(async (depNode) => { + const filesResponse = await depNode.fetchingFiles(); + const { importMethod, isBuilt } = await storeController.importPackage(depNode.dir, { + filesResponse, + force: opts.force, + targetEngine: opts.targetEngine + }); + if (importMethod) { + core_loggers_1.progressLogger.debug({ + method: importMethod, + requester: opts.lockfileDir, + status: "imported", + to: depNode.dir + }); + } + depNode.isBuilt = isBuilt; + })); + } + async function linkAllModules(depNodes, depGraph, opts) { + await Promise.all(depNodes.map(async ({ children, optionalDependencies, name, modules }) => { + const childrenToLink = opts.optional ? children : Object.keys(children).reduce((nonOptionalChildren, childAlias) => { + if (!optionalDependencies.has(childAlias)) { + nonOptionalChildren[childAlias] = children[childAlias]; + } + return nonOptionalChildren; + }, {}); + await Promise.all(Object.keys(childrenToLink).map(async (childAlias) => { + if (childrenToLink[childAlias].startsWith("link:")) { + await limitLinking(async () => symlink_dependency_1.default(path_1.default.resolve(opts.lockfileDir, childrenToLink[childAlias].substr(5)), modules, childAlias)); + return; + } + const pkg = depGraph[childrenToLink[childAlias]]; + if (!pkg || !pkg.installable && pkg.optional) + return; + if (childAlias === name) { + logger_1.default.warn({ + message: `Cannot link dependency with name ${childAlias} to ${modules}. Dependency's name should differ from the parent's name.`, + prefix: opts.lockfileDir + }); + return; + } + await limitLinking(async () => symlink_dependency_1.default(pkg.dir, modules, childAlias)); + })); + })); + } + } +}); + +// ../supi/lib/install/index.js +var require_install = __commonJS({ + "../supi/lib/install/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.addDependenciesToPackage = exports2.createObjectChecksum = exports2.mutateModules = exports2.install = void 0; + var crypto_1 = __importDefault(require("crypto")); + var path_1 = __importDefault(require("path")); + var build_modules_1 = __importStar2(require_lib81()); + var constants_1 = require_lib7(); + var core_loggers_1 = require_lib12(); + var error_1 = __importDefault(require_lib8()); + var get_context_1 = __importDefault(require_lib67()); + var headless_1 = __importDefault(require_lib85()); + var lifecycle_1 = require_lib80(); + var link_bins_1 = __importStar2(require_lib70()); + var lockfile_file_1 = require_lib57(); + var lockfile_to_pnp_1 = require_lib84(); + var logger_1 = __importStar2(require_lib6()); + var manifest_utils_1 = require_lib15(); + var modules_yaml_1 = require_lib64(); + var read_modules_dir_1 = __importDefault(require_lib69()); + var read_project_manifest_1 = require_lib19(); + var remove_bins_1 = require_lib72(); + var resolve_dependencies_1 = __importDefault(require_lib86()); + var rimraf_1 = __importDefault(require_rimraf()); + var is_inner_link_1 = __importDefault(require_is_inner_link()); + var p_filter_1 = __importDefault(require_p_filter()); + var p_limit_1 = __importDefault(require_p_limit()); + var flatten_1 = __importDefault(require_flatten2()); + var fromPairs_1 = __importDefault(require_fromPairs()); + var equals_1 = __importDefault(require_equals2()); + var isEmpty_1 = __importDefault(require_isEmpty2()); + var pipe_1 = __importDefault(require_pipe3()); + var props_1 = __importDefault(require_props()); + var unnest_1 = __importDefault(require_unnest()); + var parseWantedDependencies_1 = __importDefault(require_parseWantedDependencies()); + var safeIsInnerLink_1 = __importDefault(require_safeIsInnerLink()); + var removeDeps_1 = __importDefault(require_removeDeps()); + var allProjectsAreUpToDate_1 = __importDefault(require_allProjectsAreUpToDate()); + var createPackageExtender_1 = __importDefault(require_createPackageExtender()); + var createVersionsOverrider_1 = __importDefault(require_createVersionsOverrider()); + var extendInstallOptions_1 = __importDefault(require_extendInstallOptions()); + var getPreferredVersions_1 = __importStar2(require_getPreferredVersions()); + var getWantedDependencies_1 = __importDefault(require_getWantedDependencies()); + var link_1 = __importDefault(require_link2()); + var BROKEN_LOCKFILE_INTEGRITY_ERRORS = new Set([ + "ERR_PNPM_UNEXPECTED_PKG_CONTENT_IN_STORE", + "ERR_PNPM_TARBALL_INTEGRITY" + ]); + async function install(manifest, opts) { + var _a; + const projects = await mutateModules([ + { + buildIndex: 0, + manifest, + mutation: "install", + rootDir: (_a = opts.dir) !== null && _a !== void 0 ? _a : process.cwd() + } + ], opts); + return projects[0].manifest; + } + exports2.install = install; + async function mutateModules(projects, maybeOpts) { + var _a, _b, _c, _d, _e, _f, _g, _h; + const reporter = maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.reporter; + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.on("data", reporter); + } + const opts = await extendInstallOptions_1.default(maybeOpts); + if (!opts.include.dependencies && opts.include.optionalDependencies) { + throw new error_1.default("OPTIONAL_DEPS_REQUIRE_PROD_DEPS", "Optional dependencies cannot be installed without production dependencies"); + } + const installsOnly = projects.every((project) => project.mutation === "install"); + opts["forceNewModules"] = installsOnly; + const rootProjectManifest = (_b = (_a = projects.find(({ rootDir }) => rootDir === opts.lockfileDir)) === null || _a === void 0 ? void 0 : _a.manifest) !== null && _b !== void 0 ? _b : await read_project_manifest_1.safeReadProjectManifestOnly(opts.lockfileDir); + const overrides = rootProjectManifest != null ? (_d = (_c = rootProjectManifest.pnpm) === null || _c === void 0 ? void 0 : _c.overrides) !== null && _d !== void 0 ? _d : rootProjectManifest.resolutions : void 0; + const neverBuiltDependencies = (_f = (_e = rootProjectManifest === null || rootProjectManifest === void 0 ? void 0 : rootProjectManifest.pnpm) === null || _e === void 0 ? void 0 : _e.neverBuiltDependencies) !== null && _f !== void 0 ? _f : []; + const packageExtensions = (_g = rootProjectManifest === null || rootProjectManifest === void 0 ? void 0 : rootProjectManifest.pnpm) === null || _g === void 0 ? void 0 : _g.packageExtensions; + opts.hooks.readPackage = createReadPackageHook({ + readPackageHook: opts.hooks.readPackage, + overrides, + lockfileDir: opts.lockfileDir, + packageExtensions + }); + const ctx = await get_context_1.default(projects, opts); + const pruneVirtualStore = ((_h = ctx.modulesFile) === null || _h === void 0 ? void 0 : _h.prunedAt) && opts.modulesCacheMaxAge > 0 ? cacheExpired(ctx.modulesFile.prunedAt, opts.modulesCacheMaxAge) : true; + if (!maybeOpts.ignorePackageManifest) { + for (const { manifest, rootDir } of ctx.projects) { + if (!manifest) { + throw new Error(`No package.json found in "${rootDir}"`); + } + } + } + const result = await _install(); + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.removeListener("data", reporter); + } + return result; + async function _install() { + var _a2, _b2, _c2, _d2, _e2, _f2; + const packageExtensionsChecksum = isEmpty_1.default(packageExtensions !== null && packageExtensions !== void 0 ? packageExtensions : {}) ? void 0 : createObjectChecksum(packageExtensions); + let needsFullResolution = !maybeOpts.ignorePackageManifest && (!equals_1.default((_a2 = ctx.wantedLockfile.overrides) !== null && _a2 !== void 0 ? _a2 : {}, overrides !== null && overrides !== void 0 ? overrides : {}) || !equals_1.default(((_b2 = ctx.wantedLockfile.neverBuiltDependencies) !== null && _b2 !== void 0 ? _b2 : []).sort(), (neverBuiltDependencies !== null && neverBuiltDependencies !== void 0 ? neverBuiltDependencies : []).sort()) || ctx.wantedLockfile.packageExtensionsChecksum !== packageExtensionsChecksum) || opts.fixLockfile; + if (needsFullResolution) { + ctx.wantedLockfile.overrides = overrides; + ctx.wantedLockfile.neverBuiltDependencies = neverBuiltDependencies; + ctx.wantedLockfile.packageExtensionsChecksum = packageExtensionsChecksum; + } + const frozenLockfile = opts.frozenLockfile || opts.frozenLockfileIfExists && ctx.existsWantedLockfile; + if (!ctx.lockfileHadConflicts && !opts.lockfileOnly && !opts.update && !opts.fixLockfile && installsOnly && (frozenLockfile || opts.ignorePackageManifest || !needsFullResolution && opts.preferFrozenLockfile && (!opts.pruneLockfileImporters || Object.keys(ctx.wantedLockfile.importers).length === ctx.projects.length) && ctx.existsWantedLockfile && ctx.wantedLockfile.lockfileVersion === constants_1.LOCKFILE_VERSION && await allProjectsAreUpToDate_1.default(ctx.projects, { + linkWorkspacePackages: opts.linkWorkspacePackagesDepth >= 0, + wantedLockfile: ctx.wantedLockfile, + workspacePackages: opts.workspacePackages + }))) { + if (needsFullResolution) { + throw new error_1.default("FROZEN_LOCKFILE_WITH_OUTDATED_LOCKFILE", "Cannot perform a frozen installation because the lockfile needs updates"); + } + if (!ctx.existsWantedLockfile) { + if (ctx.projects.some((project) => pkgHasDependencies(project.manifest))) { + throw new Error(`Headless installation requires a ${constants_1.WANTED_LOCKFILE} file`); + } + } else { + if (maybeOpts.ignorePackageManifest) { + logger_1.default.info({ message: "Importing packages to virtual store", prefix: opts.lockfileDir }); + } else { + logger_1.default.info({ message: "Lockfile is up-to-date, resolution step is skipped", prefix: opts.lockfileDir }); + } + try { + await headless_1.default({ + childConcurrency: opts.childConcurrency, + currentEngine: { + nodeVersion: opts.nodeVersion, + pnpmVersion: opts.packageManager.name === "pnpm" ? opts.packageManager.version : "" + }, + currentLockfile: ctx.currentLockfile, + enablePnp: opts.enablePnp, + engineStrict: opts.engineStrict, + extendNodePath: opts.extendNodePath, + extraBinPaths: opts.extraBinPaths, + force: opts.force, + hoistedDependencies: ctx.hoistedDependencies, + hoistPattern: ctx.hoistPattern, + ignoreScripts: opts.ignoreScripts, + ignorePackageManifest: opts.ignorePackageManifest, + include: opts.include, + lockfileDir: ctx.lockfileDir, + modulesDir: opts.modulesDir, + ownLifecycleHooksStdio: opts.ownLifecycleHooksStdio, + packageManager: opts.packageManager, + pendingBuilds: ctx.pendingBuilds, + projects: ctx.projects, + pruneStore: opts.pruneStore, + prunedAt: (_c2 = ctx.modulesFile) === null || _c2 === void 0 ? void 0 : _c2.prunedAt, + pruneVirtualStore, + publicHoistPattern: ctx.publicHoistPattern, + rawConfig: opts.rawConfig, + registries: opts.registries, + sideEffectsCacheRead: opts.sideEffectsCacheRead, + sideEffectsCacheWrite: opts.sideEffectsCacheWrite, + symlink: opts.symlink, + skipped: ctx.skipped, + storeController: opts.storeController, + storeDir: opts.storeDir, + unsafePerm: opts.unsafePerm, + userAgent: opts.userAgent, + virtualStoreDir: ctx.virtualStoreDir, + wantedLockfile: maybeOpts.ignorePackageManifest ? void 0 : ctx.wantedLockfile + }); + return projects; + } catch (error) { + if (frozenLockfile || error.code !== "ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY" && !BROKEN_LOCKFILE_INTEGRITY_ERRORS.has(error.code)) + throw error; + if (BROKEN_LOCKFILE_INTEGRITY_ERRORS.has(error.code)) { + needsFullResolution = true; + opts.update = true; + } + logger_1.default.warn({ + error, + message: error.message, + prefix: ctx.lockfileDir + }); + logger_1.default.error(new error_1.default(error.code, "The lockfile is broken! Resolution step will be performed to fix it.")); + } + } + } + const projectsToInstall = []; + const projectsToBeInstalled = ctx.projects.filter(({ mutation }) => mutation === "install"); + const scriptsOpts = { + extraBinPaths: opts.extraBinPaths, + rawConfig: opts.rawConfig, + scriptShell: opts.scriptShell, + shellEmulator: opts.shellEmulator, + stdio: opts.ownLifecycleHooksStdio, + unsafePerm: opts.unsafePerm || false + }; + let preferredSpecs = null; + for (const project of ctx.projects) { + switch (project.mutation) { + case "uninstallSome": + projectsToInstall.push({ + pruneDirectDependencies: false, + ...project, + removePackages: project.dependencyNames, + updatePackageManifest: true, + wantedDependencies: [] + }); + break; + case "install": { + await installCase({ + ...project, + updatePackageManifest: (_d2 = opts.updatePackageManifest) !== null && _d2 !== void 0 ? _d2 : opts.update + }); + break; + } + case "installSome": { + await installSome({ + ...project, + updatePackageManifest: opts.updatePackageManifest !== false + }); + break; + } + case "unlink": { + const packageDirs = await read_modules_dir_1.default(project.modulesDir); + const externalPackages = await p_filter_1.default(packageDirs, async (packageDir) => isExternalLink(ctx.storeDir, project.modulesDir, packageDir)); + const allDeps = manifest_utils_1.getAllDependenciesFromManifest(project.manifest); + const packagesToInstall = []; + for (const pkgName of externalPackages) { + await rimraf_1.default(path_1.default.join(project.modulesDir, pkgName)); + if (allDeps[pkgName]) { + packagesToInstall.push(pkgName); + } + } + if (packagesToInstall.length === 0) + return projects; + await installCase({ ...project, mutation: "install" }); + break; + } + case "unlinkSome": { + if (((_e2 = project.manifest) === null || _e2 === void 0 ? void 0 : _e2.name) && opts.globalBin) { + await remove_bins_1.removeBin(path_1.default.join(opts.globalBin, (_f2 = project.manifest) === null || _f2 === void 0 ? void 0 : _f2.name)); + } + const packagesToInstall = []; + const allDeps = manifest_utils_1.getAllDependenciesFromManifest(project.manifest); + for (const depName of project.dependencyNames) { + try { + if (!await isExternalLink(ctx.storeDir, project.modulesDir, depName)) { + logger_1.default.warn({ + message: `${depName} is not an external link`, + prefix: project.rootDir + }); + continue; + } + } catch (err) { + if (err["code"] !== "ENOENT") + throw err; + } + await rimraf_1.default(path_1.default.join(project.modulesDir, depName)); + if (allDeps[depName]) { + packagesToInstall.push(depName); + } + } + if (packagesToInstall.length === 0) + return projects; + await installSome({ + ...project, + dependencySelectors: packagesToInstall, + mutation: "installSome", + updatePackageManifest: false + }); + break; + } + } + } + async function installCase(project) { + var _a3, _b3; + const wantedDependencies = getWantedDependencies_1.default(project.manifest, { + includeDirect: opts.includeDirect, + updateWorkspaceDependencies: opts.update, + nodeExecPath: opts.nodeExecPath + }).map((wantedDependency) => ({ ...wantedDependency, updateSpec: true })); + if ((_a3 = ctx.wantedLockfile) === null || _a3 === void 0 ? void 0 : _a3.importers) { + forgetResolutionsOfPrevWantedDeps(ctx.wantedLockfile.importers[project.id], wantedDependencies); + } + if (opts.ignoreScripts && ((_b3 = project.manifest) === null || _b3 === void 0 ? void 0 : _b3.scripts) && (project.manifest.scripts.preinstall || project.manifest.scripts.install || project.manifest.scripts.postinstall || project.manifest.scripts.prepare)) { + ctx.pendingBuilds.push(project.id); + } + projectsToInstall.push({ + pruneDirectDependencies: false, + ...project, + wantedDependencies + }); + } + async function installSome(project) { + const currentPrefs = opts.ignoreCurrentPrefs ? {} : manifest_utils_1.getAllDependenciesFromManifest(project.manifest); + const optionalDependencies = project.targetDependenciesField ? {} : project.manifest.optionalDependencies || {}; + const devDependencies = project.targetDependenciesField ? {} : project.manifest.devDependencies || {}; + if (preferredSpecs == null) { + preferredSpecs = getPreferredVersions_1.getAllUniqueSpecs(flatten_1.default(Object.values(opts.workspacePackages).map((obj) => Object.values(obj))).map(({ manifest }) => manifest)); + } + const wantedDeps = parseWantedDependencies_1.default(project.dependencySelectors, { + allowNew: project.allowNew !== false, + currentPrefs, + defaultTag: opts.tag, + dev: project.targetDependenciesField === "devDependencies", + devDependencies, + optional: project.targetDependenciesField === "optionalDependencies", + optionalDependencies, + updateWorkspaceDependencies: opts.update, + preferredSpecs + }); + projectsToInstall.push({ + pruneDirectDependencies: false, + ...project, + wantedDependencies: wantedDeps.map((wantedDep) => ({ ...wantedDep, isNew: true, updateSpec: true, nodeExecPath: opts.nodeExecPath })) + }); + } + const makePartialCurrentLockfile = !installsOnly && (ctx.existsWantedLockfile && !ctx.existsCurrentLockfile || !ctx.currentLockfileIsUpToDate); + const result2 = await installInContext(projectsToInstall, ctx, { + ...opts, + currentLockfileIsUpToDate: !ctx.existsWantedLockfile || ctx.currentLockfileIsUpToDate, + makePartialCurrentLockfile, + needsFullResolution, + neverBuiltDependencies, + overrides, + pruneVirtualStore, + updateLockfileMinorVersion: true + }); + if (!opts.ignoreScripts) { + if (opts.enablePnp) { + scriptsOpts.extraEnv = lifecycle_1.makeNodeRequireOption(path_1.default.join(opts.lockfileDir, ".pnp.cjs")); + } + await lifecycle_1.runLifecycleHooksConcurrently(["preinstall", "install", "postinstall", "prepare"], projectsToBeInstalled, opts.childConcurrency, scriptsOpts); + } + return result2; + } + } + exports2.mutateModules = mutateModules; + function createObjectChecksum(obj) { + const s = JSON.stringify(obj); + return crypto_1.default.createHash("md5").update(s).digest("hex"); + } + exports2.createObjectChecksum = createObjectChecksum; + function createReadPackageHook({ lockfileDir, overrides, packageExtensions, readPackageHook }) { + const hooks = []; + if (!isEmpty_1.default(overrides !== null && overrides !== void 0 ? overrides : {})) { + hooks.push(createVersionsOverrider_1.default(overrides, lockfileDir)); + } + if (!isEmpty_1.default(packageExtensions !== null && packageExtensions !== void 0 ? packageExtensions : {})) { + hooks.push(createPackageExtender_1.default(packageExtensions)); + } + if (hooks.length === 0) { + return readPackageHook; + } + const readPackageAndExtend = hooks.length === 1 ? hooks[0] : pipe_1.default(hooks[0], hooks[1]); + if (readPackageHook != null) { + return (manifest, dir) => readPackageAndExtend(readPackageHook(manifest, dir), dir); + } + return readPackageAndExtend; + } + function cacheExpired(prunedAt, maxAgeInMinutes) { + return (Date.now() - new Date(prunedAt).valueOf()) / (1e3 * 60) > maxAgeInMinutes; + } + async function isExternalLink(storeDir, modules, pkgName) { + const link = await is_inner_link_1.default(modules, pkgName); + return !link.isInner; + } + function pkgHasDependencies(manifest) { + var _a, _b, _c; + return Boolean(Object.keys((_a = manifest.dependencies) !== null && _a !== void 0 ? _a : {}).length > 0 || Object.keys((_b = manifest.devDependencies) !== null && _b !== void 0 ? _b : {}).length || Object.keys((_c = manifest.optionalDependencies) !== null && _c !== void 0 ? _c : {}).length); + } + async function partitionLinkedPackages(dependencies, opts) { + var _a; + const nonLinkedDependencies = []; + const linkedAliases = new Set(); + for (const dependency of dependencies) { + if (!dependency.alias || ((_a = opts.workspacePackages) === null || _a === void 0 ? void 0 : _a[dependency.alias]) != null || dependency.pref.startsWith("workspace:")) { + nonLinkedDependencies.push(dependency); + continue; + } + const isInnerLink = await safeIsInnerLink_1.default(opts.modulesDir, dependency.alias, { + hideAlienModules: !opts.lockfileOnly, + projectDir: opts.projectDir, + storeDir: opts.storeDir, + virtualStoreDir: opts.virtualStoreDir + }); + if (isInnerLink === true) { + nonLinkedDependencies.push(dependency); + continue; + } + logger_1.default.info({ + message: `${dependency.alias} is linked to ${opts.modulesDir} from ${isInnerLink}`, + prefix: opts.projectDir + }); + linkedAliases.add(dependency.alias); + } + return { + linkedAliases, + nonLinkedDependencies + }; + } + function forgetResolutionsOfPrevWantedDeps(importer, wantedDeps) { + var _a, _b, _c, _d; + if (!importer.specifiers) + return; + importer.dependencies = (_a = importer.dependencies) !== null && _a !== void 0 ? _a : {}; + importer.devDependencies = (_b = importer.devDependencies) !== null && _b !== void 0 ? _b : {}; + importer.optionalDependencies = (_c = importer.optionalDependencies) !== null && _c !== void 0 ? _c : {}; + for (const { alias, pref } of wantedDeps) { + if (alias && importer.specifiers[alias] !== pref) { + if (!((_d = importer.dependencies[alias]) === null || _d === void 0 ? void 0 : _d.startsWith("link:"))) { + delete importer.dependencies[alias]; + } + delete importer.devDependencies[alias]; + delete importer.optionalDependencies[alias]; + } + } + } + async function addDependenciesToPackage(manifest, dependencySelectors, opts) { + var _a, _b; + const projects = await mutateModules([ + { + allowNew: opts.allowNew, + dependencySelectors, + manifest, + mutation: "installSome", + peer: opts.peer, + pinnedVersion: opts.pinnedVersion, + rootDir: (_a = opts.dir) !== null && _a !== void 0 ? _a : process.cwd(), + targetDependenciesField: opts.targetDependenciesField + } + ], { + ...opts, + lockfileDir: (_b = opts.lockfileDir) !== null && _b !== void 0 ? _b : opts.dir + }); + return projects[0].manifest; + } + exports2.addDependenciesToPackage = addDependenciesToPackage; + var _installInContext = async (projects, ctx, opts) => { + var _a, _b, _c, _d, _e, _f; + if (opts.lockfileOnly && ctx.existsCurrentLockfile) { + logger_1.default.warn({ + message: "`node_modules` is present. Lockfile only installation will make it out-of-date", + prefix: ctx.lockfileDir + }); + } + ctx.wantedLockfile.importers = ctx.wantedLockfile.importers || {}; + for (const { id } of projects) { + if (!ctx.wantedLockfile.importers[id]) { + ctx.wantedLockfile.importers[id] = { specifiers: {} }; + } + } + if (opts.pruneLockfileImporters) { + const projectIds = new Set(projects.map(({ id }) => id)); + for (const wantedImporter of Object.keys(ctx.wantedLockfile.importers)) { + if (!projectIds.has(wantedImporter)) { + delete ctx.wantedLockfile.importers[wantedImporter]; + } + } + } + await Promise.all(projects.map(async (project) => { + if (project.mutation !== "uninstallSome") + return; + const _removeDeps = async (manifest) => removeDeps_1.default(manifest, project.dependencyNames, { prefix: project.rootDir, saveType: project.targetDependenciesField }); + project.manifest = await _removeDeps(project.manifest); + if (project.originalManifest != null) { + project.originalManifest = await _removeDeps(project.originalManifest); + } + })); + core_loggers_1.stageLogger.debug({ + prefix: ctx.lockfileDir, + stage: "resolution_started" + }); + const preferredVersions = (_a = opts.preferredVersions) !== null && _a !== void 0 ? _a : !opts.update && ctx.wantedLockfile.packages != null && !isEmpty_1.default(ctx.wantedLockfile.packages) ? getPreferredVersions_1.getPreferredVersionsFromLockfile(ctx.wantedLockfile.packages) : void 0; + const forceFullResolution = ctx.wantedLockfile.lockfileVersion !== constants_1.LOCKFILE_VERSION || !opts.currentLockfileIsUpToDate || opts.force || opts.needsFullResolution || ctx.lockfileHadConflicts; + const _toResolveImporter = toResolveImporter.bind(null, { + defaultUpdateDepth: opts.update || opts.updateMatching != null ? opts.depth : -1, + lockfileOnly: opts.lockfileOnly, + preferredVersions, + storeDir: ctx.storeDir, + updateAll: Boolean(opts.updateMatching), + virtualStoreDir: ctx.virtualStoreDir, + workspacePackages: opts.workspacePackages + }); + const projectsToResolve = await Promise.all(projects.map(async (project) => _toResolveImporter(project))); + if (opts.fixLockfile && ctx.wantedLockfile.packages != null && !isEmpty_1.default(ctx.wantedLockfile.packages)) { + ctx.wantedLockfile.packages = Object.entries(ctx.wantedLockfile.packages).reduce((pre, [depPath, snapshot]) => ({ + ...pre, + [depPath]: { + dependencies: snapshot.dependencies, + optionalDependencies: snapshot.optionalDependencies, + resolution: snapshot.resolution + } + }), {}); + } + let { dependenciesGraph, dependenciesByProjectId, finishLockfileUpdates, linkedDependenciesByProjectId, newLockfile, outdatedDependencies, wantedToBeSkippedPackageIds, waitTillAllFetchingsFinish } = await resolve_dependencies_1.default(projectsToResolve, { + currentLockfile: ctx.currentLockfile, + dryRun: opts.lockfileOnly, + engineStrict: opts.engineStrict, + force: opts.force, + forceFullResolution, + hooks: opts.hooks, + linkWorkspacePackagesDepth: (_b = opts.linkWorkspacePackagesDepth) !== null && _b !== void 0 ? _b : opts.saveWorkspaceProtocol ? 0 : -1, + lockfileDir: opts.lockfileDir, + neverBuiltDependencies: new Set(opts.neverBuiltDependencies), + nodeVersion: opts.nodeVersion, + pnpmVersion: opts.packageManager.name === "pnpm" ? opts.packageManager.version : "", + preferWorkspacePackages: opts.preferWorkspacePackages, + preserveWorkspaceProtocol: opts.preserveWorkspaceProtocol, + registries: opts.registries, + saveWorkspaceProtocol: opts.saveWorkspaceProtocol, + storeController: opts.storeController, + strictPeerDependencies: opts.strictPeerDependencies, + tag: opts.tag, + updateMatching: opts.updateMatching, + virtualStoreDir: ctx.virtualStoreDir, + wantedLockfile: ctx.wantedLockfile, + workspacePackages: opts.workspacePackages + }); + core_loggers_1.stageLogger.debug({ + prefix: ctx.lockfileDir, + stage: "resolution_done" + }); + newLockfile = ((_c = opts.hooks) === null || _c === void 0 ? void 0 : _c.afterAllResolved) != null ? (_d = opts.hooks) === null || _d === void 0 ? void 0 : _d.afterAllResolved(newLockfile) : newLockfile; + if (opts.updateLockfileMinorVersion) { + newLockfile.lockfileVersion = constants_1.LOCKFILE_VERSION; + } + const lockfileOpts = { forceSharedFormat: opts.forceSharedLockfile }; + if (!opts.lockfileOnly && opts.enableModulesDir) { + const result = await link_1.default(projectsToResolve, dependenciesGraph, { + currentLockfile: ctx.currentLockfile, + dependenciesByProjectId, + force: opts.force, + extendNodePath: opts.extendNodePath, + hoistedDependencies: ctx.hoistedDependencies, + hoistedModulesDir: ctx.hoistedModulesDir, + hoistPattern: ctx.hoistPattern, + include: opts.include, + linkedDependenciesByProjectId, + lockfileDir: opts.lockfileDir, + makePartialCurrentLockfile: opts.makePartialCurrentLockfile, + outdatedDependencies, + pruneStore: opts.pruneStore, + pruneVirtualStore: opts.pruneVirtualStore, + publicHoistPattern: ctx.publicHoistPattern, + registries: ctx.registries, + rootModulesDir: ctx.rootModulesDir, + sideEffectsCacheRead: opts.sideEffectsCacheRead, + symlink: opts.symlink, + skipped: ctx.skipped, + storeController: opts.storeController, + strictPeerDependencies: opts.strictPeerDependencies, + virtualStoreDir: ctx.virtualStoreDir, + wantedLockfile: newLockfile, + wantedToBeSkippedPackageIds + }); + await finishLockfileUpdates(); + if (opts.enablePnp) { + const importerNames = fromPairs_1.default(projects.map(({ manifest, id }) => { + var _a2; + return [id, (_a2 = manifest.name) !== null && _a2 !== void 0 ? _a2 : id]; + })); + await lockfile_to_pnp_1.writePnpFile(result.currentLockfile, { + importerNames, + lockfileDir: ctx.lockfileDir, + virtualStoreDir: ctx.virtualStoreDir, + registries: opts.registries + }); + } + ctx.pendingBuilds = ctx.pendingBuilds.filter((relDepPath) => !result.removedDepPaths.has(relDepPath)); + if (opts.ignoreScripts) { + ctx.pendingBuilds = ctx.pendingBuilds.concat(result.newDepPaths.filter((depPath) => dependenciesGraph[depPath].requiresBuild)); + } else if ((_e = result.newDepPaths) === null || _e === void 0 ? void 0 : _e.length) { + const depPaths = Object.keys(dependenciesGraph); + const rootNodes = depPaths.filter((depPath) => dependenciesGraph[depPath].depth === 0); + let extraEnv; + if (opts.enablePnp) { + extraEnv = lifecycle_1.makeNodeRequireOption(path_1.default.join(opts.lockfileDir, ".pnp.cjs")); + } + await build_modules_1.default(dependenciesGraph, rootNodes, { + childConcurrency: opts.childConcurrency, + depsToBuild: new Set(result.newDepPaths), + extendNodePath: opts.extendNodePath, + extraBinPaths: ctx.extraBinPaths, + extraEnv, + lockfileDir: ctx.lockfileDir, + optional: opts.include.optionalDependencies, + rawConfig: opts.rawConfig, + rootModulesDir: ctx.virtualStoreDir, + scriptShell: opts.scriptShell, + shellEmulator: opts.shellEmulator, + sideEffectsCacheWrite: opts.sideEffectsCacheWrite, + storeController: opts.storeController, + unsafePerm: opts.unsafePerm, + userAgent: opts.userAgent + }); + } + const binWarn = (prefix, message2) => logger_1.default.info({ message: message2, prefix }); + if ((_f = result.newDepPaths) === null || _f === void 0 ? void 0 : _f.length) { + const newPkgs = props_1.default(result.newDepPaths, dependenciesGraph); + await linkAllBins(newPkgs, dependenciesGraph, { + optional: opts.include.optionalDependencies, + warn: binWarn.bind(null, opts.lockfileDir) + }); + } + await Promise.all(projectsToResolve.map(async (project, index) => { + var _a2, _b2; + let linkedPackages; + if (((_a2 = ctx.publicHoistPattern) === null || _a2 === void 0 ? void 0 : _a2.length) && path_1.default.relative(project.rootDir, opts.lockfileDir) === "") { + const nodeExecPathByAlias = Object.entries((_b2 = project.manifest.dependenciesMeta) !== null && _b2 !== void 0 ? _b2 : {}).reduce((prev, [alias, { node }]) => { + if (node) { + prev[alias] = node; + } + return prev; + }, {}); + linkedPackages = await link_bins_1.default(project.modulesDir, project.binsDir, { + allowExoticManifests: true, + extendNodePath: opts.extendNodePath, + projectManifest: project.manifest, + nodeExecPathByAlias, + warn: binWarn.bind(null, project.rootDir) + }); + } else { + const directPkgs = [ + ...props_1.default(Object.values(dependenciesByProjectId[project.id]).filter((depPath) => !ctx.skipped.has(depPath)), dependenciesGraph), + ...linkedDependenciesByProjectId[project.id].map(({ pkgId }) => ({ + dir: path_1.default.join(project.rootDir, pkgId.substring(5)), + fetchingBundledManifest: void 0 + })) + ]; + linkedPackages = await link_bins_1.linkBinsOfPackages((await Promise.all(directPkgs.map(async (dep) => { + var _a3, _b3, _c2, _d2; + const manifest = (_b3 = await ((_a3 = dep.fetchingBundledManifest) === null || _a3 === void 0 ? void 0 : _a3.call(dep))) !== null && _b3 !== void 0 ? _b3 : await read_project_manifest_1.safeReadProjectManifestOnly(dep.dir); + return { + location: dep.dir, + manifest, + nodeExecPath: (_d2 = (_c2 = project.manifest.dependenciesMeta) === null || _c2 === void 0 ? void 0 : _c2[manifest.name]) === null || _d2 === void 0 ? void 0 : _d2.node + }; + }))).filter(({ manifest }) => manifest != null), project.binsDir, { extendNodePath: opts.extendNodePath, warn: binWarn.bind(null, project.rootDir) }); + } + const projectToInstall = projects[index]; + if (opts.global && projectToInstall.mutation.includes("install")) { + projectToInstall.wantedDependencies.forEach((pkg) => { + if (!(linkedPackages === null || linkedPackages === void 0 ? void 0 : linkedPackages.includes(pkg.alias))) { + logger_1.default.warn({ message: `${pkg.alias} has no binaries`, prefix: opts.lockfileDir }); + } + }); + } + })); + await Promise.all([ + opts.useLockfile ? lockfile_file_1.writeLockfiles({ + currentLockfile: result.currentLockfile, + currentLockfileDir: ctx.virtualStoreDir, + wantedLockfile: newLockfile, + wantedLockfileDir: ctx.lockfileDir, + ...lockfileOpts + }) : lockfile_file_1.writeCurrentLockfile(ctx.virtualStoreDir, result.currentLockfile, lockfileOpts), + (async () => { + if (result.currentLockfile.packages === void 0 && result.removedDepPaths.size === 0) { + return Promise.resolve(); + } + return modules_yaml_1.write(ctx.rootModulesDir, { + ...ctx.modulesFile, + hoistedDependencies: result.newHoistedDependencies, + hoistPattern: ctx.hoistPattern, + included: ctx.include, + layoutVersion: constants_1.LAYOUT_VERSION, + packageManager: `${opts.packageManager.name}@${opts.packageManager.version}`, + pendingBuilds: ctx.pendingBuilds, + publicHoistPattern: ctx.publicHoistPattern, + prunedAt: opts.pruneVirtualStore || ctx.modulesFile == null ? new Date().toUTCString() : ctx.modulesFile.prunedAt, + registries: ctx.registries, + skipped: Array.from(ctx.skipped), + storeDir: ctx.storeDir, + virtualStoreDir: ctx.virtualStoreDir + }); + })() + ]); + } else { + await finishLockfileUpdates(); + await lockfile_file_1.writeWantedLockfile(ctx.lockfileDir, newLockfile, lockfileOpts); + core_loggers_1.stageLogger.debug({ + prefix: opts.lockfileDir, + stage: "importing_done" + }); + } + await waitTillAllFetchingsFinish(); + core_loggers_1.summaryLogger.debug({ prefix: opts.lockfileDir }); + await opts.storeController.close(); + return projectsToResolve.map(({ manifest, rootDir }) => ({ rootDir, manifest })); + }; + var installInContext = async (projects, ctx, opts) => { + try { + return await _installInContext(projects, ctx, opts); + } catch (error) { + if (!BROKEN_LOCKFILE_INTEGRITY_ERRORS.has(error.code)) + throw error; + opts.needsFullResolution = true; + opts.update = true; + logger_1.default.warn({ + error, + message: error.message, + prefix: ctx.lockfileDir + }); + logger_1.default.error(new error_1.default(error.code, "The lockfile is broken! A full installation will be performed in an attempt to fix it.")); + return _installInContext(projects, ctx, opts); + } + }; + async function toResolveImporter(opts, project) { + var _a, _b, _c; + const allDeps = getWantedDependencies_1.default(project.manifest); + const { nonLinkedDependencies } = await partitionLinkedPackages(allDeps, { + lockfileOnly: opts.lockfileOnly, + modulesDir: project.modulesDir, + projectDir: project.rootDir, + storeDir: opts.storeDir, + virtualStoreDir: opts.virtualStoreDir, + workspacePackages: opts.workspacePackages + }); + const existingDeps = nonLinkedDependencies.filter(({ alias }) => !project.wantedDependencies.some((wantedDep) => wantedDep.alias === alias)); + let wantedDependencies; + if (!project.manifest) { + wantedDependencies = [ + ...project.wantedDependencies, + ...existingDeps + ].map((dep) => ({ + ...dep, + updateDepth: opts.defaultUpdateDepth + })); + } else { + const updateLocalTarballs = (dep) => ({ + ...dep, + updateDepth: opts.updateAll ? opts.defaultUpdateDepth : prefIsLocalTarball(dep.pref) ? 0 : -1 + }); + wantedDependencies = [ + ...project.wantedDependencies.map(opts.defaultUpdateDepth < 0 ? updateLocalTarballs : (dep) => ({ ...dep, updateDepth: opts.defaultUpdateDepth })), + ...existingDeps.map(updateLocalTarballs) + ]; + } + return { + ...project, + hasRemovedDependencies: Boolean((_a = project.removePackages) === null || _a === void 0 ? void 0 : _a.length), + preferredVersions: (_c = (_b = opts.preferredVersions) !== null && _b !== void 0 ? _b : project.manifest && getPreferredVersions_1.default(project.manifest)) !== null && _c !== void 0 ? _c : {}, + wantedDependencies + }; + } + function prefIsLocalTarball(pref) { + return pref.startsWith("file:") && pref.endsWith(".tgz"); + } + var limitLinking = p_limit_1.default(16); + async function linkAllBins(depNodes, depGraph, opts) { + return unnest_1.default(await Promise.all(depNodes.map(async (depNode) => limitLinking(async () => build_modules_1.linkBinsOfDependencies(depNode, depGraph, opts))))); + } + } +}); + +// ../supi/lib/api.js +var require_api = __commonJS({ + "../supi/lib/api.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.link = void 0; + var link_1 = __importDefault(require_link()); + exports2.link = link_1.default; + __exportStar(require_install(), exports2); + __exportStar(require_link(), exports2); + } +}); + +// ../supi/lib/index.js +var require_lib88 = __commonJS({ + "../supi/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UnexpectedVirtualStoreDirError = exports2.UnexpectedStoreError = void 0; + __exportStar(require_api(), exports2); + var get_context_1 = require_lib67(); + Object.defineProperty(exports2, "UnexpectedStoreError", { enumerable: true, get: function() { + return get_context_1.UnexpectedStoreError; + } }); + Object.defineProperty(exports2, "UnexpectedVirtualStoreDirError", { enumerable: true, get: function() { + return get_context_1.UnexpectedVirtualStoreDirError; + } }); + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+lockfile@1.1.0/node_modules/@yarnpkg/lockfile/index.js +var require_lockfile = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+lockfile@1.1.0/node_modules/@yarnpkg/lockfile/index.js"(exports2, module2) { + module2.exports = function(modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) { + return installedModules[moduleId].exports; + } + var module3 = installedModules[moduleId] = { + i: moduleId, + l: false, + exports: {} + }; + modules[moduleId].call(module3.exports, module3, module3.exports, __webpack_require__); + module3.l = true; + return module3.exports; + } + __webpack_require__.m = modules; + __webpack_require__.c = installedModules; + __webpack_require__.i = function(value) { + return value; + }; + __webpack_require__.d = function(exports3, name, getter) { + if (!__webpack_require__.o(exports3, name)) { + Object.defineProperty(exports3, name, { + configurable: false, + enumerable: true, + get: getter + }); + } + }; + __webpack_require__.n = function(module3) { + var getter = module3 && module3.__esModule ? function getDefault() { + return module3["default"]; + } : function getModuleExports() { + return module3; + }; + __webpack_require__.d(getter, "a", getter); + return getter; + }; + __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }; + __webpack_require__.p = ""; + return __webpack_require__(__webpack_require__.s = 14); + }([ + function(module3, exports3) { + module3.exports = require("path"); + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + exports3.__esModule = true; + var _promise = __webpack_require__(173); + var _promise2 = _interopRequireDefault(_promise); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + exports3.default = function(fn2) { + return function() { + var gen = fn2.apply(this, arguments); + return new _promise2.default(function(resolve, reject) { + function step(key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) { + resolve(value); + } else { + return _promise2.default.resolve(value).then(function(value2) { + step("next", value2); + }, function(err) { + step("throw", err); + }); + } + } + return step("next"); + }); + }; + }; + }, + function(module3, exports3) { + module3.exports = require("util"); + }, + function(module3, exports3) { + module3.exports = require("fs"); + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + class MessageError extends Error { + constructor(msg, code) { + super(msg); + this.code = code; + } + } + exports3.MessageError = MessageError; + class ProcessSpawnError extends MessageError { + constructor(msg, code, process2) { + super(msg, code); + this.process = process2; + } + } + exports3.ProcessSpawnError = ProcessSpawnError; + class SecurityError extends MessageError { + } + exports3.SecurityError = SecurityError; + class ProcessTermError extends MessageError { + } + exports3.ProcessTermError = ProcessTermError; + class ResponseError extends Error { + constructor(msg, responseCode) { + super(msg); + this.responseCode = responseCode; + } + } + exports3.ResponseError = ResponseError; + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.getFirstSuitableFolder = exports3.readFirstAvailableStream = exports3.makeTempDir = exports3.hardlinksWork = exports3.writeFilePreservingEol = exports3.getFileSizeOnDisk = exports3.walk = exports3.symlink = exports3.find = exports3.readJsonAndFile = exports3.readJson = exports3.readFileAny = exports3.hardlinkBulk = exports3.copyBulk = exports3.unlink = exports3.glob = exports3.link = exports3.chmod = exports3.lstat = exports3.exists = exports3.mkdirp = exports3.stat = exports3.access = exports3.rename = exports3.readdir = exports3.realpath = exports3.readlink = exports3.writeFile = exports3.open = exports3.readFileBuffer = exports3.lockQueue = exports3.constants = void 0; + var _asyncToGenerator2; + function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); + } + let buildActionsForCopy = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, events, possibleExtraneous, reporter) { + let build = (() => { + var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { + const src = data.src, dest = data.dest, type = data.type; + const onFresh = data.onFresh || noop; + const onDone = data.onDone || noop; + if (files.has(dest.toLowerCase())) { + reporter.verbose(`The case-insensitive file ${dest} shouldn't be copied twice in one bulk copy`); + } else { + files.add(dest.toLowerCase()); + } + if (type === "symlink") { + yield mkdirp((_path || _load_path()).default.dirname(dest)); + onFresh(); + actions.symlink.push({ + dest, + linkname: src + }); + onDone(); + return; + } + if (events.ignoreBasenames.indexOf((_path || _load_path()).default.basename(src)) >= 0) { + return; + } + const srcStat = yield lstat(src); + let srcFiles; + if (srcStat.isDirectory()) { + srcFiles = yield readdir(src); + } + let destStat; + try { + destStat = yield lstat(dest); + } catch (e) { + if (e.code !== "ENOENT") { + throw e; + } + } + if (destStat) { + const bothSymlinks = srcStat.isSymbolicLink() && destStat.isSymbolicLink(); + const bothFolders = srcStat.isDirectory() && destStat.isDirectory(); + const bothFiles = srcStat.isFile() && destStat.isFile(); + if (bothFiles && artifactFiles.has(dest)) { + onDone(); + reporter.verbose(reporter.lang("verboseFileSkipArtifact", src)); + return; + } + if (bothFiles && srcStat.size === destStat.size && (0, (_fsNormalized || _load_fsNormalized()).fileDatesEqual)(srcStat.mtime, destStat.mtime)) { + onDone(); + reporter.verbose(reporter.lang("verboseFileSkip", src, dest, srcStat.size, +srcStat.mtime)); + return; + } + if (bothSymlinks) { + const srcReallink = yield readlink(src); + if (srcReallink === (yield readlink(dest))) { + onDone(); + reporter.verbose(reporter.lang("verboseFileSkipSymlink", src, dest, srcReallink)); + return; + } + } + if (bothFolders) { + const destFiles = yield readdir(dest); + invariant(srcFiles, "src files not initialised"); + for (var _iterator4 = destFiles, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator](); ; ) { + var _ref6; + if (_isArray4) { + if (_i4 >= _iterator4.length) + break; + _ref6 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) + break; + _ref6 = _i4.value; + } + const file = _ref6; + if (srcFiles.indexOf(file) < 0) { + const loc = (_path || _load_path()).default.join(dest, file); + possibleExtraneous.add(loc); + if ((yield lstat(loc)).isDirectory()) { + for (var _iterator5 = yield readdir(loc), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator](); ; ) { + var _ref7; + if (_isArray5) { + if (_i5 >= _iterator5.length) + break; + _ref7 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) + break; + _ref7 = _i5.value; + } + const file2 = _ref7; + possibleExtraneous.add((_path || _load_path()).default.join(loc, file2)); + } + } + } + } + } + } + if (destStat && destStat.isSymbolicLink()) { + yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dest); + destStat = null; + } + if (srcStat.isSymbolicLink()) { + onFresh(); + const linkname = yield readlink(src); + actions.symlink.push({ + dest, + linkname + }); + onDone(); + } else if (srcStat.isDirectory()) { + if (!destStat) { + reporter.verbose(reporter.lang("verboseFileFolder", dest)); + yield mkdirp(dest); + } + const destParts = dest.split((_path || _load_path()).default.sep); + while (destParts.length) { + files.add(destParts.join((_path || _load_path()).default.sep).toLowerCase()); + destParts.pop(); + } + invariant(srcFiles, "src files not initialised"); + let remaining = srcFiles.length; + if (!remaining) { + onDone(); + } + for (var _iterator6 = srcFiles, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator](); ; ) { + var _ref8; + if (_isArray6) { + if (_i6 >= _iterator6.length) + break; + _ref8 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) + break; + _ref8 = _i6.value; + } + const file = _ref8; + queue.push({ + dest: (_path || _load_path()).default.join(dest, file), + onFresh, + onDone: function(_onDone) { + function onDone2() { + return _onDone.apply(this, arguments); + } + onDone2.toString = function() { + return _onDone.toString(); + }; + return onDone2; + }(function() { + if (--remaining === 0) { + onDone(); + } + }), + src: (_path || _load_path()).default.join(src, file) + }); + } + } else if (srcStat.isFile()) { + onFresh(); + actions.file.push({ + src, + dest, + atime: srcStat.atime, + mtime: srcStat.mtime, + mode: srcStat.mode + }); + onDone(); + } else { + throw new Error(`unsure how to copy this: ${src}`); + } + }); + return function build2(_x5) { + return _ref5.apply(this, arguments); + }; + })(); + const artifactFiles = new Set(events.artifactFiles || []); + const files = new Set(); + for (var _iterator = queue, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator](); ; ) { + var _ref2; + if (_isArray) { + if (_i >= _iterator.length) + break; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) + break; + _ref2 = _i.value; + } + const item = _ref2; + const onDone = item.onDone; + item.onDone = function() { + events.onProgress(item.dest); + if (onDone) { + onDone(); + } + }; + } + events.onStart(queue.length); + const actions = { + file: [], + symlink: [], + link: [] + }; + while (queue.length) { + const items = queue.splice(0, CONCURRENT_QUEUE_ITEMS); + yield Promise.all(items.map(build)); + } + for (var _iterator2 = artifactFiles, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator](); ; ) { + var _ref3; + if (_isArray2) { + if (_i2 >= _iterator2.length) + break; + _ref3 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) + break; + _ref3 = _i2.value; + } + const file = _ref3; + if (possibleExtraneous.has(file)) { + reporter.verbose(reporter.lang("verboseFilePhantomExtraneous", file)); + possibleExtraneous.delete(file); + } + } + for (var _iterator3 = possibleExtraneous, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator](); ; ) { + var _ref4; + if (_isArray3) { + if (_i3 >= _iterator3.length) + break; + _ref4 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) + break; + _ref4 = _i3.value; + } + const loc = _ref4; + if (files.has(loc.toLowerCase())) { + possibleExtraneous.delete(loc); + } + } + return actions; + }); + return function buildActionsForCopy2(_x, _x2, _x3, _x4) { + return _ref.apply(this, arguments); + }; + })(); + let buildActionsForHardlink = (() => { + var _ref9 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, events, possibleExtraneous, reporter) { + let build = (() => { + var _ref13 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { + const src = data.src, dest = data.dest; + const onFresh = data.onFresh || noop; + const onDone = data.onDone || noop; + if (files.has(dest.toLowerCase())) { + onDone(); + return; + } + files.add(dest.toLowerCase()); + if (events.ignoreBasenames.indexOf((_path || _load_path()).default.basename(src)) >= 0) { + return; + } + const srcStat = yield lstat(src); + let srcFiles; + if (srcStat.isDirectory()) { + srcFiles = yield readdir(src); + } + const destExists = yield exists(dest); + if (destExists) { + const destStat = yield lstat(dest); + const bothSymlinks = srcStat.isSymbolicLink() && destStat.isSymbolicLink(); + const bothFolders = srcStat.isDirectory() && destStat.isDirectory(); + const bothFiles = srcStat.isFile() && destStat.isFile(); + if (srcStat.mode !== destStat.mode) { + try { + yield access(dest, srcStat.mode); + } catch (err) { + reporter.verbose(err); + } + } + if (bothFiles && artifactFiles.has(dest)) { + onDone(); + reporter.verbose(reporter.lang("verboseFileSkipArtifact", src)); + return; + } + if (bothFiles && srcStat.ino !== null && srcStat.ino === destStat.ino) { + onDone(); + reporter.verbose(reporter.lang("verboseFileSkip", src, dest, srcStat.ino)); + return; + } + if (bothSymlinks) { + const srcReallink = yield readlink(src); + if (srcReallink === (yield readlink(dest))) { + onDone(); + reporter.verbose(reporter.lang("verboseFileSkipSymlink", src, dest, srcReallink)); + return; + } + } + if (bothFolders) { + const destFiles = yield readdir(dest); + invariant(srcFiles, "src files not initialised"); + for (var _iterator10 = destFiles, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator](); ; ) { + var _ref14; + if (_isArray10) { + if (_i10 >= _iterator10.length) + break; + _ref14 = _iterator10[_i10++]; + } else { + _i10 = _iterator10.next(); + if (_i10.done) + break; + _ref14 = _i10.value; + } + const file = _ref14; + if (srcFiles.indexOf(file) < 0) { + const loc = (_path || _load_path()).default.join(dest, file); + possibleExtraneous.add(loc); + if ((yield lstat(loc)).isDirectory()) { + for (var _iterator11 = yield readdir(loc), _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : _iterator11[Symbol.iterator](); ; ) { + var _ref15; + if (_isArray11) { + if (_i11 >= _iterator11.length) + break; + _ref15 = _iterator11[_i11++]; + } else { + _i11 = _iterator11.next(); + if (_i11.done) + break; + _ref15 = _i11.value; + } + const file2 = _ref15; + possibleExtraneous.add((_path || _load_path()).default.join(loc, file2)); + } + } + } + } + } + } + if (srcStat.isSymbolicLink()) { + onFresh(); + const linkname = yield readlink(src); + actions.symlink.push({ + dest, + linkname + }); + onDone(); + } else if (srcStat.isDirectory()) { + reporter.verbose(reporter.lang("verboseFileFolder", dest)); + yield mkdirp(dest); + const destParts = dest.split((_path || _load_path()).default.sep); + while (destParts.length) { + files.add(destParts.join((_path || _load_path()).default.sep).toLowerCase()); + destParts.pop(); + } + invariant(srcFiles, "src files not initialised"); + let remaining = srcFiles.length; + if (!remaining) { + onDone(); + } + for (var _iterator12 = srcFiles, _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : _iterator12[Symbol.iterator](); ; ) { + var _ref16; + if (_isArray12) { + if (_i12 >= _iterator12.length) + break; + _ref16 = _iterator12[_i12++]; + } else { + _i12 = _iterator12.next(); + if (_i12.done) + break; + _ref16 = _i12.value; + } + const file = _ref16; + queue.push({ + onFresh, + src: (_path || _load_path()).default.join(src, file), + dest: (_path || _load_path()).default.join(dest, file), + onDone: function(_onDone2) { + function onDone2() { + return _onDone2.apply(this, arguments); + } + onDone2.toString = function() { + return _onDone2.toString(); + }; + return onDone2; + }(function() { + if (--remaining === 0) { + onDone(); + } + }) + }); + } + } else if (srcStat.isFile()) { + onFresh(); + actions.link.push({ + src, + dest, + removeDest: destExists + }); + onDone(); + } else { + throw new Error(`unsure how to copy this: ${src}`); + } + }); + return function build2(_x10) { + return _ref13.apply(this, arguments); + }; + })(); + const artifactFiles = new Set(events.artifactFiles || []); + const files = new Set(); + for (var _iterator7 = queue, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator](); ; ) { + var _ref10; + if (_isArray7) { + if (_i7 >= _iterator7.length) + break; + _ref10 = _iterator7[_i7++]; + } else { + _i7 = _iterator7.next(); + if (_i7.done) + break; + _ref10 = _i7.value; + } + const item = _ref10; + const onDone = item.onDone || noop; + item.onDone = function() { + events.onProgress(item.dest); + onDone(); + }; + } + events.onStart(queue.length); + const actions = { + file: [], + symlink: [], + link: [] + }; + while (queue.length) { + const items = queue.splice(0, CONCURRENT_QUEUE_ITEMS); + yield Promise.all(items.map(build)); + } + for (var _iterator8 = artifactFiles, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator](); ; ) { + var _ref11; + if (_isArray8) { + if (_i8 >= _iterator8.length) + break; + _ref11 = _iterator8[_i8++]; + } else { + _i8 = _iterator8.next(); + if (_i8.done) + break; + _ref11 = _i8.value; + } + const file = _ref11; + if (possibleExtraneous.has(file)) { + reporter.verbose(reporter.lang("verboseFilePhantomExtraneous", file)); + possibleExtraneous.delete(file); + } + } + for (var _iterator9 = possibleExtraneous, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator](); ; ) { + var _ref12; + if (_isArray9) { + if (_i9 >= _iterator9.length) + break; + _ref12 = _iterator9[_i9++]; + } else { + _i9 = _iterator9.next(); + if (_i9.done) + break; + _ref12 = _i9.value; + } + const loc = _ref12; + if (files.has(loc.toLowerCase())) { + possibleExtraneous.delete(loc); + } + } + return actions; + }); + return function buildActionsForHardlink2(_x6, _x7, _x8, _x9) { + return _ref9.apply(this, arguments); + }; + })(); + let copyBulk = exports3.copyBulk = (() => { + var _ref17 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, reporter, _events) { + const events = { + onStart: _events && _events.onStart || noop, + onProgress: _events && _events.onProgress || noop, + possibleExtraneous: _events ? _events.possibleExtraneous : new Set(), + ignoreBasenames: _events && _events.ignoreBasenames || [], + artifactFiles: _events && _events.artifactFiles || [] + }; + const actions = yield buildActionsForCopy(queue, events, events.possibleExtraneous, reporter); + events.onStart(actions.file.length + actions.symlink.length + actions.link.length); + const fileActions = actions.file; + const currentlyWriting = new Map(); + yield (_promise || _load_promise()).queue(fileActions, (() => { + var _ref18 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { + let writePromise; + while (writePromise = currentlyWriting.get(data.dest)) { + yield writePromise; + } + reporter.verbose(reporter.lang("verboseFileCopy", data.src, data.dest)); + const copier = (0, (_fsNormalized || _load_fsNormalized()).copyFile)(data, function() { + return currentlyWriting.delete(data.dest); + }); + currentlyWriting.set(data.dest, copier); + events.onProgress(data.dest); + return copier; + }); + return function(_x14) { + return _ref18.apply(this, arguments); + }; + })(), CONCURRENT_QUEUE_ITEMS); + const symlinkActions = actions.symlink; + yield (_promise || _load_promise()).queue(symlinkActions, function(data) { + const linkname = (_path || _load_path()).default.resolve((_path || _load_path()).default.dirname(data.dest), data.linkname); + reporter.verbose(reporter.lang("verboseFileSymlink", data.dest, linkname)); + return symlink(linkname, data.dest); + }); + }); + return function copyBulk2(_x11, _x12, _x13) { + return _ref17.apply(this, arguments); + }; + })(); + let hardlinkBulk = exports3.hardlinkBulk = (() => { + var _ref19 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, reporter, _events) { + const events = { + onStart: _events && _events.onStart || noop, + onProgress: _events && _events.onProgress || noop, + possibleExtraneous: _events ? _events.possibleExtraneous : new Set(), + artifactFiles: _events && _events.artifactFiles || [], + ignoreBasenames: [] + }; + const actions = yield buildActionsForHardlink(queue, events, events.possibleExtraneous, reporter); + events.onStart(actions.file.length + actions.symlink.length + actions.link.length); + const fileActions = actions.link; + yield (_promise || _load_promise()).queue(fileActions, (() => { + var _ref20 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { + reporter.verbose(reporter.lang("verboseFileLink", data.src, data.dest)); + if (data.removeDest) { + yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(data.dest); + } + yield link(data.src, data.dest); + }); + return function(_x18) { + return _ref20.apply(this, arguments); + }; + })(), CONCURRENT_QUEUE_ITEMS); + const symlinkActions = actions.symlink; + yield (_promise || _load_promise()).queue(symlinkActions, function(data) { + const linkname = (_path || _load_path()).default.resolve((_path || _load_path()).default.dirname(data.dest), data.linkname); + reporter.verbose(reporter.lang("verboseFileSymlink", data.dest, linkname)); + return symlink(linkname, data.dest); + }); + }); + return function hardlinkBulk2(_x15, _x16, _x17) { + return _ref19.apply(this, arguments); + }; + })(); + let readFileAny = exports3.readFileAny = (() => { + var _ref21 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (files) { + for (var _iterator13 = files, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : _iterator13[Symbol.iterator](); ; ) { + var _ref22; + if (_isArray13) { + if (_i13 >= _iterator13.length) + break; + _ref22 = _iterator13[_i13++]; + } else { + _i13 = _iterator13.next(); + if (_i13.done) + break; + _ref22 = _i13.value; + } + const file = _ref22; + if (yield exists(file)) { + return readFile(file); + } + } + return null; + }); + return function readFileAny2(_x19) { + return _ref21.apply(this, arguments); + }; + })(); + let readJson = exports3.readJson = (() => { + var _ref23 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) { + return (yield readJsonAndFile(loc)).object; + }); + return function readJson2(_x20) { + return _ref23.apply(this, arguments); + }; + })(); + let readJsonAndFile = exports3.readJsonAndFile = (() => { + var _ref24 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) { + const file = yield readFile(loc); + try { + return { + object: (0, (_map || _load_map()).default)(JSON.parse(stripBOM(file))), + content: file + }; + } catch (err) { + err.message = `${loc}: ${err.message}`; + throw err; + } + }); + return function readJsonAndFile2(_x21) { + return _ref24.apply(this, arguments); + }; + })(); + let find = exports3.find = (() => { + var _ref25 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (filename, dir) { + const parts = dir.split((_path || _load_path()).default.sep); + while (parts.length) { + const loc = parts.concat(filename).join((_path || _load_path()).default.sep); + if (yield exists(loc)) { + return loc; + } else { + parts.pop(); + } + } + return false; + }); + return function find2(_x22, _x23) { + return _ref25.apply(this, arguments); + }; + })(); + let symlink = exports3.symlink = (() => { + var _ref26 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (src, dest) { + try { + const stats = yield lstat(dest); + if (stats.isSymbolicLink()) { + const resolved = yield realpath(dest); + if (resolved === src) { + return; + } + } + } catch (err) { + if (err.code !== "ENOENT") { + throw err; + } + } + yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dest); + if (process.platform === "win32") { + yield fsSymlink(src, dest, "junction"); + } else { + let relative2; + try { + relative2 = (_path || _load_path()).default.relative((_fs || _load_fs()).default.realpathSync((_path || _load_path()).default.dirname(dest)), (_fs || _load_fs()).default.realpathSync(src)); + } catch (err) { + if (err.code !== "ENOENT") { + throw err; + } + relative2 = (_path || _load_path()).default.relative((_path || _load_path()).default.dirname(dest), src); + } + yield fsSymlink(relative2 || ".", dest); + } + }); + return function symlink2(_x24, _x25) { + return _ref26.apply(this, arguments); + }; + })(); + let walk = exports3.walk = (() => { + var _ref27 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, relativeDir, ignoreBasenames = new Set()) { + let files = []; + let filenames = yield readdir(dir); + if (ignoreBasenames.size) { + filenames = filenames.filter(function(name) { + return !ignoreBasenames.has(name); + }); + } + for (var _iterator14 = filenames, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : _iterator14[Symbol.iterator](); ; ) { + var _ref28; + if (_isArray14) { + if (_i14 >= _iterator14.length) + break; + _ref28 = _iterator14[_i14++]; + } else { + _i14 = _iterator14.next(); + if (_i14.done) + break; + _ref28 = _i14.value; + } + const name = _ref28; + const relative2 = relativeDir ? (_path || _load_path()).default.join(relativeDir, name) : name; + const loc = (_path || _load_path()).default.join(dir, name); + const stat2 = yield lstat(loc); + files.push({ + relative: relative2, + basename: name, + absolute: loc, + mtime: +stat2.mtime + }); + if (stat2.isDirectory()) { + files = files.concat(yield walk(loc, relative2, ignoreBasenames)); + } + } + return files; + }); + return function walk2(_x26, _x27) { + return _ref27.apply(this, arguments); + }; + })(); + let getFileSizeOnDisk = exports3.getFileSizeOnDisk = (() => { + var _ref29 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) { + const stat2 = yield lstat(loc); + const size = stat2.size, blockSize = stat2.blksize; + return Math.ceil(size / blockSize) * blockSize; + }); + return function getFileSizeOnDisk2(_x28) { + return _ref29.apply(this, arguments); + }; + })(); + let getEolFromFile = (() => { + var _ref30 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (path) { + if (!(yield exists(path))) { + return void 0; + } + const buffer = yield readFileBuffer(path); + for (let i = 0; i < buffer.length; ++i) { + if (buffer[i] === cr) { + return "\r\n"; + } + if (buffer[i] === lf) { + return "\n"; + } + } + return void 0; + }); + return function getEolFromFile2(_x29) { + return _ref30.apply(this, arguments); + }; + })(); + let writeFilePreservingEol = exports3.writeFilePreservingEol = (() => { + var _ref31 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (path, data) { + const eol = (yield getEolFromFile(path)) || (_os || _load_os()).default.EOL; + if (eol !== "\n") { + data = data.replace(/\n/g, eol); + } + yield writeFile(path, data); + }); + return function writeFilePreservingEol2(_x30, _x31) { + return _ref31.apply(this, arguments); + }; + })(); + let hardlinksWork = exports3.hardlinksWork = (() => { + var _ref32 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir) { + const filename = "test-file" + Math.random(); + const file = (_path || _load_path()).default.join(dir, filename); + const fileLink = (_path || _load_path()).default.join(dir, filename + "-link"); + try { + yield writeFile(file, "test"); + yield link(file, fileLink); + } catch (err) { + return false; + } finally { + yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(file); + yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(fileLink); + } + return true; + }); + return function hardlinksWork2(_x32) { + return _ref32.apply(this, arguments); + }; + })(); + let makeTempDir = exports3.makeTempDir = (() => { + var _ref33 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (prefix) { + const dir = (_path || _load_path()).default.join((_os || _load_os()).default.tmpdir(), `yarn-${prefix || ""}-${Date.now()}-${Math.random()}`); + yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dir); + yield mkdirp(dir); + return dir; + }); + return function makeTempDir2(_x33) { + return _ref33.apply(this, arguments); + }; + })(); + let readFirstAvailableStream = exports3.readFirstAvailableStream = (() => { + var _ref34 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (paths) { + for (var _iterator15 = paths, _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : _iterator15[Symbol.iterator](); ; ) { + var _ref35; + if (_isArray15) { + if (_i15 >= _iterator15.length) + break; + _ref35 = _iterator15[_i15++]; + } else { + _i15 = _iterator15.next(); + if (_i15.done) + break; + _ref35 = _i15.value; + } + const path = _ref35; + try { + const fd = yield open(path, "r"); + return (_fs || _load_fs()).default.createReadStream(path, { fd }); + } catch (err) { + } + } + return null; + }); + return function readFirstAvailableStream2(_x34) { + return _ref34.apply(this, arguments); + }; + })(); + let getFirstSuitableFolder = exports3.getFirstSuitableFolder = (() => { + var _ref36 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (paths, mode = constants.W_OK | constants.X_OK) { + const result = { + skipped: [], + folder: null + }; + for (var _iterator16 = paths, _isArray16 = Array.isArray(_iterator16), _i16 = 0, _iterator16 = _isArray16 ? _iterator16 : _iterator16[Symbol.iterator](); ; ) { + var _ref37; + if (_isArray16) { + if (_i16 >= _iterator16.length) + break; + _ref37 = _iterator16[_i16++]; + } else { + _i16 = _iterator16.next(); + if (_i16.done) + break; + _ref37 = _i16.value; + } + const folder = _ref37; + try { + yield mkdirp(folder); + yield access(folder, mode); + result.folder = folder; + return result; + } catch (error) { + result.skipped.push({ + error, + folder + }); + } + } + return result; + }); + return function getFirstSuitableFolder2(_x35) { + return _ref36.apply(this, arguments); + }; + })(); + exports3.copy = copy; + exports3.readFile = readFile; + exports3.readFileRaw = readFileRaw; + exports3.normalizeOS = normalizeOS; + var _fs; + function _load_fs() { + return _fs = _interopRequireDefault(__webpack_require__(3)); + } + var _glob; + function _load_glob() { + return _glob = _interopRequireDefault(__webpack_require__(75)); + } + var _os; + function _load_os() { + return _os = _interopRequireDefault(__webpack_require__(36)); + } + var _path; + function _load_path() { + return _path = _interopRequireDefault(__webpack_require__(0)); + } + var _blockingQueue; + function _load_blockingQueue() { + return _blockingQueue = _interopRequireDefault(__webpack_require__(84)); + } + var _promise; + function _load_promise() { + return _promise = _interopRequireWildcard(__webpack_require__(40)); + } + var _promise2; + function _load_promise2() { + return _promise2 = __webpack_require__(40); + } + var _map; + function _load_map() { + return _map = _interopRequireDefault(__webpack_require__(20)); + } + var _fsNormalized; + function _load_fsNormalized() { + return _fsNormalized = __webpack_require__(164); + } + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) + newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + const constants = exports3.constants = typeof (_fs || _load_fs()).default.constants !== "undefined" ? (_fs || _load_fs()).default.constants : { + R_OK: (_fs || _load_fs()).default.R_OK, + W_OK: (_fs || _load_fs()).default.W_OK, + X_OK: (_fs || _load_fs()).default.X_OK + }; + const lockQueue = exports3.lockQueue = new (_blockingQueue || _load_blockingQueue()).default("fs lock"); + const readFileBuffer = exports3.readFileBuffer = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readFile); + const open = exports3.open = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.open); + const writeFile = exports3.writeFile = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.writeFile); + const readlink = exports3.readlink = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readlink); + const realpath = exports3.realpath = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.realpath); + const readdir = exports3.readdir = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readdir); + const rename = exports3.rename = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.rename); + const access = exports3.access = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.access); + const stat = exports3.stat = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.stat); + const mkdirp = exports3.mkdirp = (0, (_promise2 || _load_promise2()).promisify)(__webpack_require__(116)); + const exists = exports3.exists = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.exists, true); + const lstat = exports3.lstat = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.lstat); + const chmod = exports3.chmod = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.chmod); + const link = exports3.link = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.link); + const glob = exports3.glob = (0, (_promise2 || _load_promise2()).promisify)((_glob || _load_glob()).default); + exports3.unlink = (_fsNormalized || _load_fsNormalized()).unlink; + const CONCURRENT_QUEUE_ITEMS = (_fs || _load_fs()).default.copyFile ? 128 : 4; + const fsSymlink = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.symlink); + const invariant = __webpack_require__(7); + const stripBOM = __webpack_require__(122); + const noop = () => { + }; + function copy(src, dest, reporter) { + return copyBulk([{ src, dest }], reporter); + } + function _readFile(loc, encoding) { + return new Promise((resolve, reject) => { + (_fs || _load_fs()).default.readFile(loc, encoding, function(err, content) { + if (err) { + reject(err); + } else { + resolve(content); + } + }); + }); + } + function readFile(loc) { + return _readFile(loc, "utf8").then(normalizeOS); + } + function readFileRaw(loc) { + return _readFile(loc, "binary"); + } + function normalizeOS(body) { + return body.replace(/\r\n/g, "\n"); + } + const cr = "\r".charCodeAt(0); + const lf = "\n".charCodeAt(0); + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.getPathKey = getPathKey; + const os = __webpack_require__(36); + const path = __webpack_require__(0); + const userHome = __webpack_require__(45).default; + var _require = __webpack_require__(171); + const getCacheDir = _require.getCacheDir, getConfigDir = _require.getConfigDir, getDataDir = _require.getDataDir; + const isWebpackBundle = __webpack_require__(227); + const DEPENDENCY_TYPES = exports3.DEPENDENCY_TYPES = ["devDependencies", "dependencies", "optionalDependencies", "peerDependencies"]; + const RESOLUTIONS = exports3.RESOLUTIONS = "resolutions"; + const MANIFEST_FIELDS = exports3.MANIFEST_FIELDS = [RESOLUTIONS, ...DEPENDENCY_TYPES]; + const SUPPORTED_NODE_VERSIONS = exports3.SUPPORTED_NODE_VERSIONS = "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0"; + const YARN_REGISTRY = exports3.YARN_REGISTRY = "https://registry.yarnpkg.com"; + const YARN_DOCS = exports3.YARN_DOCS = "https://yarnpkg.com/en/docs/cli/"; + const YARN_INSTALLER_SH = exports3.YARN_INSTALLER_SH = "https://yarnpkg.com/install.sh"; + const YARN_INSTALLER_MSI = exports3.YARN_INSTALLER_MSI = "https://yarnpkg.com/latest.msi"; + const SELF_UPDATE_VERSION_URL = exports3.SELF_UPDATE_VERSION_URL = "https://yarnpkg.com/latest-version"; + const CACHE_VERSION = exports3.CACHE_VERSION = 2; + const LOCKFILE_VERSION = exports3.LOCKFILE_VERSION = 1; + const NETWORK_CONCURRENCY = exports3.NETWORK_CONCURRENCY = 8; + const NETWORK_TIMEOUT = exports3.NETWORK_TIMEOUT = 30 * 1e3; + const CHILD_CONCURRENCY = exports3.CHILD_CONCURRENCY = 5; + const REQUIRED_PACKAGE_KEYS = exports3.REQUIRED_PACKAGE_KEYS = ["name", "version", "_uid"]; + function getPreferredCacheDirectories() { + const preferredCacheDirectories = [getCacheDir()]; + if (process.getuid) { + preferredCacheDirectories.push(path.join(os.tmpdir(), `.yarn-cache-${process.getuid()}`)); + } + preferredCacheDirectories.push(path.join(os.tmpdir(), `.yarn-cache`)); + return preferredCacheDirectories; + } + const PREFERRED_MODULE_CACHE_DIRECTORIES = exports3.PREFERRED_MODULE_CACHE_DIRECTORIES = getPreferredCacheDirectories(); + const CONFIG_DIRECTORY = exports3.CONFIG_DIRECTORY = getConfigDir(); + const DATA_DIRECTORY = exports3.DATA_DIRECTORY = getDataDir(); + const LINK_REGISTRY_DIRECTORY = exports3.LINK_REGISTRY_DIRECTORY = path.join(DATA_DIRECTORY, "link"); + const GLOBAL_MODULE_DIRECTORY = exports3.GLOBAL_MODULE_DIRECTORY = path.join(DATA_DIRECTORY, "global"); + const NODE_BIN_PATH = exports3.NODE_BIN_PATH = process.execPath; + const YARN_BIN_PATH = exports3.YARN_BIN_PATH = getYarnBinPath(); + function getYarnBinPath() { + if (isWebpackBundle) { + return __filename; + } else { + return path.join(__dirname, "..", "bin", "yarn.js"); + } + } + const NODE_MODULES_FOLDER = exports3.NODE_MODULES_FOLDER = "node_modules"; + const NODE_PACKAGE_JSON = exports3.NODE_PACKAGE_JSON = "package.json"; + const POSIX_GLOBAL_PREFIX = exports3.POSIX_GLOBAL_PREFIX = `${process.env.DESTDIR || ""}/usr/local`; + const FALLBACK_GLOBAL_PREFIX = exports3.FALLBACK_GLOBAL_PREFIX = path.join(userHome, ".yarn"); + const META_FOLDER = exports3.META_FOLDER = ".yarn-meta"; + const INTEGRITY_FILENAME = exports3.INTEGRITY_FILENAME = ".yarn-integrity"; + const LOCKFILE_FILENAME = exports3.LOCKFILE_FILENAME = "yarn.lock"; + const METADATA_FILENAME = exports3.METADATA_FILENAME = ".yarn-metadata.json"; + const TARBALL_FILENAME = exports3.TARBALL_FILENAME = ".yarn-tarball.tgz"; + const CLEAN_FILENAME = exports3.CLEAN_FILENAME = ".yarnclean"; + const NPM_LOCK_FILENAME = exports3.NPM_LOCK_FILENAME = "package-lock.json"; + const NPM_SHRINKWRAP_FILENAME = exports3.NPM_SHRINKWRAP_FILENAME = "npm-shrinkwrap.json"; + const DEFAULT_INDENT = exports3.DEFAULT_INDENT = " "; + const SINGLE_INSTANCE_PORT = exports3.SINGLE_INSTANCE_PORT = 31997; + const SINGLE_INSTANCE_FILENAME = exports3.SINGLE_INSTANCE_FILENAME = ".yarn-single-instance"; + const ENV_PATH_KEY = exports3.ENV_PATH_KEY = getPathKey(process.platform, process.env); + function getPathKey(platform, env) { + let pathKey = "PATH"; + if (platform === "win32") { + pathKey = "Path"; + for (const key in env) { + if (key.toLowerCase() === "path") { + pathKey = key; + } + } + } + return pathKey; + } + const VERSION_COLOR_SCHEME = exports3.VERSION_COLOR_SCHEME = { + major: "red", + premajor: "red", + minor: "yellow", + preminor: "yellow", + patch: "green", + prepatch: "green", + prerelease: "red", + unchanged: "white", + unknown: "red" + }; + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + var NODE_ENV = process.env.NODE_ENV; + var invariant = function(condition, format, a, b, c, d, e, f) { + if (NODE_ENV !== "production") { + if (format === void 0) { + throw new Error("invariant requires an error message argument"); + } + } + if (!condition) { + var error; + if (format === void 0) { + error = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."); + } else { + var args2 = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error(format.replace(/%s/g, function() { + return args2[argIndex++]; + })); + error.name = "Invariant Violation"; + } + error.framesToPop = 1; + throw error; + } + }; + module3.exports = invariant; + }, + , + function(module3, exports3) { + module3.exports = require("crypto"); + }, + , + function(module3, exports3) { + var global2 = module3.exports = typeof window != "undefined" && window.Math == Math ? window : typeof self != "undefined" && self.Math == Math ? self : Function("return this")(); + if (typeof __g == "number") + __g = global2; + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.sortAlpha = sortAlpha; + exports3.entries = entries; + exports3.removePrefix = removePrefix; + exports3.removeSuffix = removeSuffix; + exports3.addSuffix = addSuffix; + exports3.hyphenate = hyphenate; + exports3.camelCase = camelCase; + exports3.compareSortedArrays = compareSortedArrays; + exports3.sleep = sleep; + const _camelCase = __webpack_require__(176); + function sortAlpha(a, b) { + const shortLen = Math.min(a.length, b.length); + for (let i = 0; i < shortLen; i++) { + const aChar = a.charCodeAt(i); + const bChar = b.charCodeAt(i); + if (aChar !== bChar) { + return aChar - bChar; + } + } + return a.length - b.length; + } + function entries(obj) { + const entries2 = []; + if (obj) { + for (const key in obj) { + entries2.push([key, obj[key]]); + } + } + return entries2; + } + function removePrefix(pattern, prefix) { + if (pattern.startsWith(prefix)) { + pattern = pattern.slice(prefix.length); + } + return pattern; + } + function removeSuffix(pattern, suffix) { + if (pattern.endsWith(suffix)) { + return pattern.slice(0, -suffix.length); + } + return pattern; + } + function addSuffix(pattern, suffix) { + if (!pattern.endsWith(suffix)) { + return pattern + suffix; + } + return pattern; + } + function hyphenate(str) { + return str.replace(/[A-Z]/g, (match) => { + return "-" + match.charAt(0).toLowerCase(); + }); + } + function camelCase(str) { + if (/[A-Z]/.test(str)) { + return null; + } else { + return _camelCase(str); + } + } + function compareSortedArrays(array1, array2) { + if (array1.length !== array2.length) { + return false; + } + for (let i = 0, len = array1.length; i < len; i++) { + if (array1[i] !== array2[i]) { + return false; + } + } + return true; + } + function sleep(ms) { + return new Promise((resolve) => { + setTimeout(resolve, ms); + }); + } + }, + function(module3, exports3, __webpack_require__) { + var store = __webpack_require__(107)("wks"); + var uid = __webpack_require__(111); + var Symbol2 = __webpack_require__(11).Symbol; + var USE_SYMBOL = typeof Symbol2 == "function"; + var $exports = module3.exports = function(name) { + return store[name] || (store[name] = USE_SYMBOL && Symbol2[name] || (USE_SYMBOL ? Symbol2 : uid)("Symbol." + name)); + }; + $exports.store = store; + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.stringify = exports3.parse = void 0; + var _asyncToGenerator2; + function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); + } + var _parse; + function _load_parse() { + return _parse = __webpack_require__(81); + } + Object.defineProperty(exports3, "parse", { + enumerable: true, + get: function get() { + return _interopRequireDefault(_parse || _load_parse()).default; + } + }); + var _stringify; + function _load_stringify() { + return _stringify = __webpack_require__(150); + } + Object.defineProperty(exports3, "stringify", { + enumerable: true, + get: function get() { + return _interopRequireDefault(_stringify || _load_stringify()).default; + } + }); + exports3.implodeEntry = implodeEntry; + exports3.explodeEntry = explodeEntry; + var _misc; + function _load_misc() { + return _misc = __webpack_require__(12); + } + var _normalizePattern; + function _load_normalizePattern() { + return _normalizePattern = __webpack_require__(29); + } + var _parse2; + function _load_parse2() { + return _parse2 = _interopRequireDefault(__webpack_require__(81)); + } + var _constants; + function _load_constants() { + return _constants = __webpack_require__(6); + } + var _fs; + function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(5)); + } + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) + newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + const invariant = __webpack_require__(7); + const path = __webpack_require__(0); + const ssri = __webpack_require__(55); + function getName(pattern) { + return (0, (_normalizePattern || _load_normalizePattern()).normalizePattern)(pattern).name; + } + function blankObjectUndefined(obj) { + return obj && Object.keys(obj).length ? obj : void 0; + } + function keyForRemote(remote) { + return remote.resolved || (remote.reference && remote.hash ? `${remote.reference}#${remote.hash}` : null); + } + function serializeIntegrity(integrity) { + return integrity.toString().split(" ").sort().join(" "); + } + function implodeEntry(pattern, obj) { + const inferredName = getName(pattern); + const integrity = obj.integrity ? serializeIntegrity(obj.integrity) : ""; + const imploded = { + name: inferredName === obj.name ? void 0 : obj.name, + version: obj.version, + uid: obj.uid === obj.version ? void 0 : obj.uid, + resolved: obj.resolved, + registry: obj.registry === "npm" ? void 0 : obj.registry, + dependencies: blankObjectUndefined(obj.dependencies), + optionalDependencies: blankObjectUndefined(obj.optionalDependencies), + permissions: blankObjectUndefined(obj.permissions), + prebuiltVariants: blankObjectUndefined(obj.prebuiltVariants) + }; + if (integrity) { + imploded.integrity = integrity; + } + return imploded; + } + function explodeEntry(pattern, obj) { + obj.optionalDependencies = obj.optionalDependencies || {}; + obj.dependencies = obj.dependencies || {}; + obj.uid = obj.uid || obj.version; + obj.permissions = obj.permissions || {}; + obj.registry = obj.registry || "npm"; + obj.name = obj.name || getName(pattern); + const integrity = obj.integrity; + if (integrity && integrity.isIntegrity) { + obj.integrity = ssri.parse(integrity); + } + return obj; + } + class Lockfile { + constructor({ cache, source, parseResultType } = {}) { + this.source = source || ""; + this.cache = cache; + this.parseResultType = parseResultType; + } + hasEntriesExistWithoutIntegrity() { + if (!this.cache) { + return false; + } + for (const key in this.cache) { + if (!/^.*@(file:|http)/.test(key) && this.cache[key] && !this.cache[key].integrity) { + return true; + } + } + return false; + } + static fromDirectory(dir, reporter) { + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const lockfileLoc = path.join(dir, (_constants || _load_constants()).LOCKFILE_FILENAME); + let lockfile; + let rawLockfile = ""; + let parseResult; + if (yield (_fs || _load_fs()).exists(lockfileLoc)) { + rawLockfile = yield (_fs || _load_fs()).readFile(lockfileLoc); + parseResult = (0, (_parse2 || _load_parse2()).default)(rawLockfile, lockfileLoc); + if (reporter) { + if (parseResult.type === "merge") { + reporter.info(reporter.lang("lockfileMerged")); + } else if (parseResult.type === "conflict") { + reporter.warn(reporter.lang("lockfileConflict")); + } + } + lockfile = parseResult.object; + } else if (reporter) { + reporter.info(reporter.lang("noLockfileFound")); + } + return new Lockfile({ cache: lockfile, source: rawLockfile, parseResultType: parseResult && parseResult.type }); + })(); + } + getLocked(pattern) { + const cache = this.cache; + if (!cache) { + return void 0; + } + const shrunk = pattern in cache && cache[pattern]; + if (typeof shrunk === "string") { + return this.getLocked(shrunk); + } else if (shrunk) { + explodeEntry(pattern, shrunk); + return shrunk; + } + return void 0; + } + removePattern(pattern) { + const cache = this.cache; + if (!cache) { + return; + } + delete cache[pattern]; + } + getLockfile(patterns) { + const lockfile = {}; + const seen = new Map(); + const sortedPatternsKeys = Object.keys(patterns).sort((_misc || _load_misc()).sortAlpha); + for (var _iterator = sortedPatternsKeys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator](); ; ) { + var _ref; + if (_isArray) { + if (_i >= _iterator.length) + break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) + break; + _ref = _i.value; + } + const pattern = _ref; + const pkg = patterns[pattern]; + const remote = pkg._remote, ref = pkg._reference; + invariant(ref, "Package is missing a reference"); + invariant(remote, "Package is missing a remote"); + const remoteKey = keyForRemote(remote); + const seenPattern = remoteKey && seen.get(remoteKey); + if (seenPattern) { + lockfile[pattern] = seenPattern; + if (!seenPattern.name && getName(pattern) !== pkg.name) { + seenPattern.name = pkg.name; + } + continue; + } + const obj = implodeEntry(pattern, { + name: pkg.name, + version: pkg.version, + uid: pkg._uid, + resolved: remote.resolved, + integrity: remote.integrity, + registry: remote.registry, + dependencies: pkg.dependencies, + peerDependencies: pkg.peerDependencies, + optionalDependencies: pkg.optionalDependencies, + permissions: ref.permissions, + prebuiltVariants: pkg.prebuiltVariants + }); + lockfile[pattern] = obj; + if (remoteKey) { + seen.set(remoteKey, obj); + } + } + return lockfile; + } + } + exports3.default = Lockfile; + }, + , + , + function(module3, exports3) { + module3.exports = require("stream"); + }, + , + , + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.default = nullify; + function nullify(obj = {}) { + if (Array.isArray(obj)) { + for (var _iterator = obj, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator](); ; ) { + var _ref; + if (_isArray) { + if (_i >= _iterator.length) + break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) + break; + _ref = _i.value; + } + const item = _ref; + nullify(item); + } + } else if (obj !== null && typeof obj === "object" || typeof obj === "function") { + Object.setPrototypeOf(obj, null); + if (typeof obj === "object") { + for (const key in obj) { + nullify(obj[key]); + } + } + } + return obj; + } + }, + , + function(module3, exports3) { + module3.exports = require("assert"); + }, + function(module3, exports3) { + var core = module3.exports = { version: "2.5.7" }; + if (typeof __e == "number") + __e = core; + }, + , + , + , + function(module3, exports3, __webpack_require__) { + var isObject = __webpack_require__(34); + module3.exports = function(it) { + if (!isObject(it)) + throw TypeError(it + " is not an object!"); + return it; + }; + }, + , + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.normalizePattern = normalizePattern; + function normalizePattern(pattern) { + let hasVersion = false; + let range = "latest"; + let name = pattern; + let isScoped = false; + if (name[0] === "@") { + isScoped = true; + name = name.slice(1); + } + const parts = name.split("@"); + if (parts.length > 1) { + name = parts.shift(); + range = parts.join("@"); + if (range) { + hasVersion = true; + } else { + range = "*"; + } + } + if (isScoped) { + name = `@${name}`; + } + return { name, range, hasVersion }; + } + }, + , + function(module3, exports3, __webpack_require__) { + var dP = __webpack_require__(50); + var createDesc = __webpack_require__(106); + module3.exports = __webpack_require__(33) ? function(object, key, value) { + return dP.f(object, key, createDesc(1, value)); + } : function(object, key, value) { + object[key] = value; + return object; + }; + }, + function(module3, exports3, __webpack_require__) { + var buffer = __webpack_require__(63); + var Buffer2 = buffer.Buffer; + function copyProps(src, dst) { + for (var key in src) { + dst[key] = src[key]; + } + } + if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) { + module3.exports = buffer; + } else { + copyProps(buffer, exports3); + exports3.Buffer = SafeBuffer; + } + function SafeBuffer(arg, encodingOrOffset, length) { + return Buffer2(arg, encodingOrOffset, length); + } + copyProps(Buffer2, SafeBuffer); + SafeBuffer.from = function(arg, encodingOrOffset, length) { + if (typeof arg === "number") { + throw new TypeError("Argument must not be a number"); + } + return Buffer2(arg, encodingOrOffset, length); + }; + SafeBuffer.alloc = function(size, fill, encoding) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + var buf = Buffer2(size); + if (fill !== void 0) { + if (typeof encoding === "string") { + buf.fill(fill, encoding); + } else { + buf.fill(fill); + } + } else { + buf.fill(0); + } + return buf; + }; + SafeBuffer.allocUnsafe = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return Buffer2(size); + }; + SafeBuffer.allocUnsafeSlow = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return buffer.SlowBuffer(size); + }; + }, + function(module3, exports3, __webpack_require__) { + module3.exports = !__webpack_require__(85)(function() { + return Object.defineProperty({}, "a", { get: function() { + return 7; + } }).a != 7; + }); + }, + function(module3, exports3) { + module3.exports = function(it) { + return typeof it === "object" ? it !== null : typeof it === "function"; + }; + }, + function(module3, exports3) { + module3.exports = {}; + }, + function(module3, exports3) { + module3.exports = require("os"); + }, + , + , + , + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.wait = wait; + exports3.promisify = promisify; + exports3.queue = queue; + function wait(delay) { + return new Promise((resolve) => { + setTimeout(resolve, delay); + }); + } + function promisify(fn2, firstData) { + return function(...args2) { + return new Promise(function(resolve, reject) { + args2.push(function(err, ...result) { + let res = result; + if (result.length <= 1) { + res = result[0]; + } + if (firstData) { + res = err; + err = null; + } + if (err) { + reject(err); + } else { + resolve(res); + } + }); + fn2.apply(null, args2); + }); + }; + } + function queue(arr, promiseProducer, concurrency = Infinity) { + concurrency = Math.min(concurrency, arr.length); + arr = arr.slice(); + const results = []; + let total = arr.length; + if (!total) { + return Promise.resolve(results); + } + return new Promise((resolve, reject) => { + for (let i = 0; i < concurrency; i++) { + next(); + } + function next() { + const item = arr.shift(); + const promise = promiseProducer(item); + promise.then(function(result) { + results.push(result); + total--; + if (total === 0) { + resolve(results); + } else { + if (arr.length) { + next(); + } + } + }, reject); + } + }); + } + }, + function(module3, exports3, __webpack_require__) { + var global2 = __webpack_require__(11); + var core = __webpack_require__(23); + var ctx = __webpack_require__(48); + var hide = __webpack_require__(31); + var has = __webpack_require__(49); + var PROTOTYPE = "prototype"; + var $export = function(type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports4 = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports4[PROTOTYPE]; + var target = IS_GLOBAL ? global2 : IS_STATIC ? global2[name] : (global2[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) + source = name; + for (key in source) { + own = !IS_FORCED && target && target[key] !== void 0; + if (own && has(exports4, key)) + continue; + out = own ? target[key] : source[key]; + exports4[key] = IS_GLOBAL && typeof target[key] != "function" ? source[key] : IS_BIND && own ? ctx(out, global2) : IS_WRAP && target[key] == out ? function(C) { + var F = function(a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: + return new C(); + case 1: + return new C(a); + case 2: + return new C(a, b); + } + return new C(a, b, c); + } + return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + }(out) : IS_PROTO && typeof out == "function" ? ctx(Function.call, out) : out; + if (IS_PROTO) { + (exports4.virtual || (exports4.virtual = {}))[key] = out; + if (type & $export.R && expProto && !expProto[key]) + hide(expProto, key, out); + } + } + }; + $export.F = 1; + $export.G = 2; + $export.S = 4; + $export.P = 8; + $export.B = 16; + $export.W = 32; + $export.U = 64; + $export.R = 128; + module3.exports = $export; + }, + function(module3, exports3, __webpack_require__) { + try { + var util = __webpack_require__(2); + if (typeof util.inherits !== "function") + throw ""; + module3.exports = util.inherits; + } catch (e) { + module3.exports = __webpack_require__(224); + } + }, + , + , + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.home = void 0; + var _rootUser; + function _load_rootUser() { + return _rootUser = _interopRequireDefault(__webpack_require__(169)); + } + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + const path = __webpack_require__(0); + const home = exports3.home = __webpack_require__(36).homedir(); + const userHomeDir = (_rootUser || _load_rootUser()).default ? path.resolve("/usr/local/share") : home; + exports3.default = userHomeDir; + }, + function(module3, exports3) { + module3.exports = function(it) { + if (typeof it != "function") + throw TypeError(it + " is not a function!"); + return it; + }; + }, + function(module3, exports3) { + var toString = {}.toString; + module3.exports = function(it) { + return toString.call(it).slice(8, -1); + }; + }, + function(module3, exports3, __webpack_require__) { + var aFunction = __webpack_require__(46); + module3.exports = function(fn2, that, length) { + aFunction(fn2); + if (that === void 0) + return fn2; + switch (length) { + case 1: + return function(a) { + return fn2.call(that, a); + }; + case 2: + return function(a, b) { + return fn2.call(that, a, b); + }; + case 3: + return function(a, b, c) { + return fn2.call(that, a, b, c); + }; + } + return function() { + return fn2.apply(that, arguments); + }; + }; + }, + function(module3, exports3) { + var hasOwnProperty = {}.hasOwnProperty; + module3.exports = function(it, key) { + return hasOwnProperty.call(it, key); + }; + }, + function(module3, exports3, __webpack_require__) { + var anObject = __webpack_require__(27); + var IE8_DOM_DEFINE = __webpack_require__(184); + var toPrimitive = __webpack_require__(201); + var dP = Object.defineProperty; + exports3.f = __webpack_require__(33) ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) + try { + return dP(O, P, Attributes); + } catch (e) { + } + if ("get" in Attributes || "set" in Attributes) + throw TypeError("Accessors not supported!"); + if ("value" in Attributes) + O[P] = Attributes.value; + return O; + }; + }, + , + , + , + function(module3, exports3) { + module3.exports = require("events"); + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + const Buffer2 = __webpack_require__(32).Buffer; + const crypto = __webpack_require__(9); + const Transform = __webpack_require__(17).Transform; + const SPEC_ALGORITHMS = ["sha256", "sha384", "sha512"]; + const BASE64_REGEX = /^[a-z0-9+/]+(?:=?=?)$/i; + const SRI_REGEX = /^([^-]+)-([^?]+)([?\S*]*)$/; + const STRICT_SRI_REGEX = /^([^-]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)*$/; + const VCHAR_REGEX = /^[\x21-\x7E]+$/; + class Hash { + get isHash() { + return true; + } + constructor(hash, opts) { + const strict = !!(opts && opts.strict); + this.source = hash.trim(); + const match = this.source.match(strict ? STRICT_SRI_REGEX : SRI_REGEX); + if (!match) { + return; + } + if (strict && !SPEC_ALGORITHMS.some((a) => a === match[1])) { + return; + } + this.algorithm = match[1]; + this.digest = match[2]; + const rawOpts = match[3]; + this.options = rawOpts ? rawOpts.slice(1).split("?") : []; + } + hexDigest() { + return this.digest && Buffer2.from(this.digest, "base64").toString("hex"); + } + toJSON() { + return this.toString(); + } + toString(opts) { + if (opts && opts.strict) { + if (!(SPEC_ALGORITHMS.some((x) => x === this.algorithm) && this.digest.match(BASE64_REGEX) && (this.options || []).every((opt) => opt.match(VCHAR_REGEX)))) { + return ""; + } + } + const options = this.options && this.options.length ? `?${this.options.join("?")}` : ""; + return `${this.algorithm}-${this.digest}${options}`; + } + } + class Integrity { + get isIntegrity() { + return true; + } + toJSON() { + return this.toString(); + } + toString(opts) { + opts = opts || {}; + let sep = opts.sep || " "; + if (opts.strict) { + sep = sep.replace(/\S+/g, " "); + } + return Object.keys(this).map((k) => { + return this[k].map((hash) => { + return Hash.prototype.toString.call(hash, opts); + }).filter((x) => x.length).join(sep); + }).filter((x) => x.length).join(sep); + } + concat(integrity, opts) { + const other = typeof integrity === "string" ? integrity : stringify(integrity, opts); + return parse(`${this.toString(opts)} ${other}`, opts); + } + hexDigest() { + return parse(this, { single: true }).hexDigest(); + } + match(integrity, opts) { + const other = parse(integrity, opts); + const algo = other.pickAlgorithm(opts); + return this[algo] && other[algo] && this[algo].find((hash) => other[algo].find((otherhash) => hash.digest === otherhash.digest)) || false; + } + pickAlgorithm(opts) { + const pickAlgorithm = opts && opts.pickAlgorithm || getPrioritizedHash; + const keys = Object.keys(this); + if (!keys.length) { + throw new Error(`No algorithms available for ${JSON.stringify(this.toString())}`); + } + return keys.reduce((acc, algo) => { + return pickAlgorithm(acc, algo) || acc; + }); + } + } + module3.exports.parse = parse; + function parse(sri, opts) { + opts = opts || {}; + if (typeof sri === "string") { + return _parse(sri, opts); + } else if (sri.algorithm && sri.digest) { + const fullSri = new Integrity(); + fullSri[sri.algorithm] = [sri]; + return _parse(stringify(fullSri, opts), opts); + } else { + return _parse(stringify(sri, opts), opts); + } + } + function _parse(integrity, opts) { + if (opts.single) { + return new Hash(integrity, opts); + } + return integrity.trim().split(/\s+/).reduce((acc, string) => { + const hash = new Hash(string, opts); + if (hash.algorithm && hash.digest) { + const algo = hash.algorithm; + if (!acc[algo]) { + acc[algo] = []; + } + acc[algo].push(hash); + } + return acc; + }, new Integrity()); + } + module3.exports.stringify = stringify; + function stringify(obj, opts) { + if (obj.algorithm && obj.digest) { + return Hash.prototype.toString.call(obj, opts); + } else if (typeof obj === "string") { + return stringify(parse(obj, opts), opts); + } else { + return Integrity.prototype.toString.call(obj, opts); + } + } + module3.exports.fromHex = fromHex; + function fromHex(hexDigest, algorithm, opts) { + const optString = opts && opts.options && opts.options.length ? `?${opts.options.join("?")}` : ""; + return parse(`${algorithm}-${Buffer2.from(hexDigest, "hex").toString("base64")}${optString}`, opts); + } + module3.exports.fromData = fromData; + function fromData(data, opts) { + opts = opts || {}; + const algorithms = opts.algorithms || ["sha512"]; + const optString = opts.options && opts.options.length ? `?${opts.options.join("?")}` : ""; + return algorithms.reduce((acc, algo) => { + const digest = crypto.createHash(algo).update(data).digest("base64"); + const hash = new Hash(`${algo}-${digest}${optString}`, opts); + if (hash.algorithm && hash.digest) { + const algo2 = hash.algorithm; + if (!acc[algo2]) { + acc[algo2] = []; + } + acc[algo2].push(hash); + } + return acc; + }, new Integrity()); + } + module3.exports.fromStream = fromStream; + function fromStream(stream, opts) { + opts = opts || {}; + const P = opts.Promise || Promise; + const istream = integrityStream(opts); + return new P((resolve, reject) => { + stream.pipe(istream); + stream.on("error", reject); + istream.on("error", reject); + let sri; + istream.on("integrity", (s) => { + sri = s; + }); + istream.on("end", () => resolve(sri)); + istream.on("data", () => { + }); + }); + } + module3.exports.checkData = checkData; + function checkData(data, sri, opts) { + opts = opts || {}; + sri = parse(sri, opts); + if (!Object.keys(sri).length) { + if (opts.error) { + throw Object.assign(new Error("No valid integrity hashes to check against"), { + code: "EINTEGRITY" + }); + } else { + return false; + } + } + const algorithm = sri.pickAlgorithm(opts); + const digest = crypto.createHash(algorithm).update(data).digest("base64"); + const newSri = parse({ algorithm, digest }); + const match = newSri.match(sri, opts); + if (match || !opts.error) { + return match; + } else if (typeof opts.size === "number" && data.length !== opts.size) { + const err = new Error(`data size mismatch when checking ${sri}. + Wanted: ${opts.size} + Found: ${data.length}`); + err.code = "EBADSIZE"; + err.found = data.length; + err.expected = opts.size; + err.sri = sri; + throw err; + } else { + const err = new Error(`Integrity checksum failed when using ${algorithm}: Wanted ${sri}, but got ${newSri}. (${data.length} bytes)`); + err.code = "EINTEGRITY"; + err.found = newSri; + err.expected = sri; + err.algorithm = algorithm; + err.sri = sri; + throw err; + } + } + module3.exports.checkStream = checkStream; + function checkStream(stream, sri, opts) { + opts = opts || {}; + const P = opts.Promise || Promise; + const checker = integrityStream(Object.assign({}, opts, { + integrity: sri + })); + return new P((resolve, reject) => { + stream.pipe(checker); + stream.on("error", reject); + checker.on("error", reject); + let sri2; + checker.on("verified", (s) => { + sri2 = s; + }); + checker.on("end", () => resolve(sri2)); + checker.on("data", () => { + }); + }); + } + module3.exports.integrityStream = integrityStream; + function integrityStream(opts) { + opts = opts || {}; + const sri = opts.integrity && parse(opts.integrity, opts); + const goodSri = sri && Object.keys(sri).length; + const algorithm = goodSri && sri.pickAlgorithm(opts); + const digests = goodSri && sri[algorithm]; + const algorithms = Array.from(new Set((opts.algorithms || ["sha512"]).concat(algorithm ? [algorithm] : []))); + const hashes = algorithms.map(crypto.createHash); + let streamSize = 0; + const stream = new Transform({ + transform(chunk, enc, cb) { + streamSize += chunk.length; + hashes.forEach((h) => h.update(chunk, enc)); + cb(null, chunk, enc); + } + }).on("end", () => { + const optString = opts.options && opts.options.length ? `?${opts.options.join("?")}` : ""; + const newSri = parse(hashes.map((h, i) => { + return `${algorithms[i]}-${h.digest("base64")}${optString}`; + }).join(" "), opts); + const match = goodSri && newSri.match(sri, opts); + if (typeof opts.size === "number" && streamSize !== opts.size) { + const err = new Error(`stream size mismatch when checking ${sri}. + Wanted: ${opts.size} + Found: ${streamSize}`); + err.code = "EBADSIZE"; + err.found = streamSize; + err.expected = opts.size; + err.sri = sri; + stream.emit("error", err); + } else if (opts.integrity && !match) { + const err = new Error(`${sri} integrity checksum failed when using ${algorithm}: wanted ${digests} but got ${newSri}. (${streamSize} bytes)`); + err.code = "EINTEGRITY"; + err.found = newSri; + err.expected = digests; + err.algorithm = algorithm; + err.sri = sri; + stream.emit("error", err); + } else { + stream.emit("size", streamSize); + stream.emit("integrity", newSri); + match && stream.emit("verified", match); + } + }); + return stream; + } + module3.exports.create = createIntegrity; + function createIntegrity(opts) { + opts = opts || {}; + const algorithms = opts.algorithms || ["sha512"]; + const optString = opts.options && opts.options.length ? `?${opts.options.join("?")}` : ""; + const hashes = algorithms.map(crypto.createHash); + return { + update: function(chunk, enc) { + hashes.forEach((h) => h.update(chunk, enc)); + return this; + }, + digest: function(enc) { + const integrity = algorithms.reduce((acc, algo) => { + const digest = hashes.shift().digest("base64"); + const hash = new Hash(`${algo}-${digest}${optString}`, opts); + if (hash.algorithm && hash.digest) { + const algo2 = hash.algorithm; + if (!acc[algo2]) { + acc[algo2] = []; + } + acc[algo2].push(hash); + } + return acc; + }, new Integrity()); + return integrity; + } + }; + } + const NODE_HASHES = new Set(crypto.getHashes()); + const DEFAULT_PRIORITY = [ + "md5", + "whirlpool", + "sha1", + "sha224", + "sha256", + "sha384", + "sha512", + "sha3", + "sha3-256", + "sha3-384", + "sha3-512", + "sha3_256", + "sha3_384", + "sha3_512" + ].filter((algo) => NODE_HASHES.has(algo)); + function getPrioritizedHash(algo1, algo2) { + return DEFAULT_PRIORITY.indexOf(algo1.toLowerCase()) >= DEFAULT_PRIORITY.indexOf(algo2.toLowerCase()) ? algo1 : algo2; + } + }, + , + , + , + , + function(module3, exports3, __webpack_require__) { + module3.exports = minimatch; + minimatch.Minimatch = Minimatch; + var path = { sep: "/" }; + try { + path = __webpack_require__(0); + } catch (er) { + } + var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var expand = __webpack_require__(175); + var plTypes = { + "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, + "?": { open: "(?:", close: ")?" }, + "+": { open: "(?:", close: ")+" }, + "*": { open: "(?:", close: ")*" }, + "@": { open: "(?:", close: ")" } + }; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials = charSet("().*{}+?[]^$\\!"); + function charSet(s) { + return s.split("").reduce(function(set, c) { + set[c] = true; + return set; + }, {}); + } + var slashSplit = /\/+/; + minimatch.filter = filter; + function filter(pattern, options) { + options = options || {}; + return function(p, i, list) { + return minimatch(p, pattern, options); + }; + } + function ext(a, b) { + a = a || {}; + b = b || {}; + var t = {}; + Object.keys(b).forEach(function(k) { + t[k] = b[k]; + }); + Object.keys(a).forEach(function(k) { + t[k] = a[k]; + }); + return t; + } + minimatch.defaults = function(def) { + if (!def || !Object.keys(def).length) + return minimatch; + var orig = minimatch; + var m = function minimatch2(p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)); + }; + m.Minimatch = function Minimatch2(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + return m; + }; + Minimatch.defaults = function(def) { + if (!def || !Object.keys(def).length) + return Minimatch; + return minimatch.defaults(def).Minimatch; + }; + function minimatch(p, pattern, options) { + if (typeof pattern !== "string") { + throw new TypeError("glob pattern string required"); + } + if (!options) + options = {}; + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } + if (pattern.trim() === "") + return p === ""; + return new Minimatch(pattern, options).match(p); + } + function Minimatch(pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options); + } + if (typeof pattern !== "string") { + throw new TypeError("glob pattern string required"); + } + if (!options) + options = {}; + pattern = pattern.trim(); + if (path.sep !== "/") { + pattern = pattern.split(path.sep).join("/"); + } + this.options = options; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.make(); + } + Minimatch.prototype.debug = function() { + }; + Minimatch.prototype.make = make; + function make() { + if (this._made) + return; + var pattern = this.pattern; + var options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + var set = this.globSet = this.braceExpand(); + if (options.debug) + this.debug = console.error; + this.debug(this.pattern, set); + set = this.globParts = set.map(function(s) { + return s.split(slashSplit); + }); + this.debug(this.pattern, set); + set = set.map(function(s, si, set2) { + return s.map(this.parse, this); + }, this); + this.debug(this.pattern, set); + set = set.filter(function(s) { + return s.indexOf(false) === -1; + }); + this.debug(this.pattern, set); + this.set = set; + } + Minimatch.prototype.parseNegate = parseNegate; + function parseNegate() { + var pattern = this.pattern; + var negate = false; + var options = this.options; + var negateOffset = 0; + if (options.nonegate) + return; + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { + negate = !negate; + negateOffset++; + } + if (negateOffset) + this.pattern = pattern.substr(negateOffset); + this.negate = negate; + } + minimatch.braceExpand = function(pattern, options) { + return braceExpand(pattern, options); + }; + Minimatch.prototype.braceExpand = braceExpand; + function braceExpand(pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options; + } else { + options = {}; + } + } + pattern = typeof pattern === "undefined" ? this.pattern : pattern; + if (typeof pattern === "undefined") { + throw new TypeError("undefined pattern"); + } + if (options.nobrace || !pattern.match(/\{.*\}/)) { + return [pattern]; + } + return expand(pattern); + } + Minimatch.prototype.parse = parse; + var SUBPARSE = {}; + function parse(pattern, isSub) { + if (pattern.length > 1024 * 64) { + throw new TypeError("pattern is too long"); + } + var options = this.options; + if (!options.noglobstar && pattern === "**") + return GLOBSTAR; + if (pattern === "") + return ""; + var re = ""; + var hasMagic = !!options.nocase; + var escaping = false; + var patternListStack = []; + var negativeLists = []; + var stateChar; + var inClass = false; + var reClassStart = -1; + var classStart = -1; + var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + var self2 = this; + function clearStateChar() { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; + } + self2.debug("clearStateChar %j %j", stateChar, re); + stateChar = false; + } + } + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + this.debug("%s %s %s %j", pattern, i, re, c); + if (escaping && reSpecials[c]) { + re += "\\" + c; + escaping = false; + continue; + } + switch (c) { + case "/": + return false; + case "\\": + clearStateChar(); + escaping = true; + continue; + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); + if (inClass) { + this.debug(" in class"); + if (c === "!" && i === classStart + 1) + c = "^"; + re += c; + continue; + } + self2.debug("call clearStateChar %j", stateChar); + clearStateChar(); + stateChar = c; + if (options.noext) + clearStateChar(); + continue; + case "(": + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }); + re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; + this.debug("plType %j %j", stateChar, re); + stateChar = false; + continue; + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + clearStateChar(); + hasMagic = true; + var pl = patternListStack.pop(); + re += pl.close; + if (pl.type === "!") { + negativeLists.push(pl); + } + pl.reEnd = re.length; + continue; + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + clearStateChar(); + re += "|"; + continue; + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + escaping = false; + continue; + } + if (inClass) { + var cs = pattern.substring(classStart + 1, i); + try { + RegExp("[" + cs + "]"); + } catch (er) { + var sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; + hasMagic = hasMagic || sp[1]; + inClass = false; + continue; + } + } + hasMagic = true; + inClass = false; + re += c; + continue; + default: + clearStateChar(); + if (escaping) { + escaping = false; + } else if (reSpecials[c] && !(c === "^" && inClass)) { + re += "\\"; + } + re += c; + } + } + if (inClass) { + cs = pattern.substr(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length); + this.debug("setting tail", re, pl); + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { + if (!$2) { + $2 = "\\"; + } + return $1 + $1 + $2 + "|"; + }); + this.debug("tail=%j\n %s", tail, tail, pl, re); + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) { + re += "\\\\"; + } + var addPatternStart = false; + switch (re.charAt(0)) { + case ".": + case "[": + case "(": + addPatternStart = true; + } + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n]; + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); + nlLast += nlAfter; + var openParensBefore = nlBefore.split("(").length - 1; + var cleanAfter = nlAfter; + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); + } + nlAfter = cleanAfter; + var dollar = ""; + if (nlAfter === "" && isSub !== SUBPARSE) { + dollar = "$"; + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; + re = newRe; + } + if (re !== "" && hasMagic) { + re = "(?=.)" + re; + } + if (addPatternStart) { + re = patternStart + re; + } + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + if (!hasMagic) { + return globUnescape(pattern); + } + var flags = options.nocase ? "i" : ""; + try { + var regExp = new RegExp("^" + re + "$", flags); + } catch (er) { + return new RegExp("$."); + } + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + minimatch.makeRe = function(pattern, options) { + return new Minimatch(pattern, options || {}).makeRe(); + }; + Minimatch.prototype.makeRe = makeRe; + function makeRe() { + if (this.regexp || this.regexp === false) + return this.regexp; + var set = this.set; + if (!set.length) { + this.regexp = false; + return this.regexp; + } + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + var flags = options.nocase ? "i" : ""; + var re = set.map(function(pattern) { + return pattern.map(function(p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) + re = "^(?!" + re + ").*$"; + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + return this.regexp; + } + minimatch.match = function(list, pattern, options) { + options = options || {}; + var mm = new Minimatch(pattern, options); + list = list.filter(function(f) { + return mm.match(f); + }); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; + }; + Minimatch.prototype.match = match; + function match(f, partial) { + this.debug("match", f, this.pattern); + if (this.comment) + return false; + if (this.empty) + return f === ""; + if (f === "/" && partial) + return true; + var options = this.options; + if (path.sep !== "/") { + f = f.split(path.sep).join("/"); + } + f = f.split(slashSplit); + this.debug(this.pattern, "split", f); + var set = this.set; + this.debug(this.pattern, "set", set); + var filename; + var i; + for (i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) + break; + } + for (i = 0; i < set.length; i++) { + var pattern = set[i]; + var file = f; + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + var hit = this.matchOne(file, pattern, partial); + if (hit) { + if (options.flipNegate) + return true; + return !this.negate; + } + } + if (options.flipNegate) + return false; + return this.negate; + } + Minimatch.prototype.matchOne = function(file, pattern, partial) { + var options = this.options; + this.debug("matchOne", { "this": this, file, pattern }); + this.debug("matchOne", file.length, pattern.length); + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug("matchOne loop"); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); + if (p === false) + return false; + if (p === GLOBSTAR) { + this.debug("GLOBSTAR", [pattern, p, f]); + var fr = fi; + var pr = pi + 1; + if (pr === pl) { + this.debug("** at the end"); + for (; fi < fl; fi++) { + if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") + return false; + } + return true; + } + while (fr < fl) { + var swallowee = file[fr]; + this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug("globstar found match!", fr, fl, swallowee); + return true; + } else { + if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { + this.debug("dot detected!", file, fr, pattern, pr); + break; + } + this.debug("globstar swallow a segment, and continue"); + fr++; + } + } + if (partial) { + this.debug("\n>>> no match, partial?", file, fr, pattern, pr); + if (fr === fl) + return true; + } + return false; + } + var hit; + if (typeof p === "string") { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase(); + } else { + hit = f === p; + } + this.debug("string match", p, f, hit); + } else { + hit = f.match(p); + this.debug("pattern match", p, f, hit); + } + if (!hit) + return false; + } + if (fi === fl && pi === pl) { + return true; + } else if (fi === fl) { + return partial; + } else if (pi === pl) { + var emptyFileEnd = fi === fl - 1 && file[fi] === ""; + return emptyFileEnd; + } + throw new Error("wtf?"); + }; + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); + } + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } + }, + function(module3, exports3, __webpack_require__) { + var wrappy = __webpack_require__(123); + module3.exports = wrappy(once); + module3.exports.strict = wrappy(onceStrict); + once.proto = once(function() { + Object.defineProperty(Function.prototype, "once", { + value: function() { + return once(this); + }, + configurable: true + }); + Object.defineProperty(Function.prototype, "onceStrict", { + value: function() { + return onceStrict(this); + }, + configurable: true + }); + }); + function once(fn2) { + var f = function() { + if (f.called) + return f.value; + f.called = true; + return f.value = fn2.apply(this, arguments); + }; + f.called = false; + return f; + } + function onceStrict(fn2) { + var f = function() { + if (f.called) + throw new Error(f.onceError); + f.called = true; + return f.value = fn2.apply(this, arguments); + }; + var name = fn2.name || "Function wrapped with `once`"; + f.onceError = name + " shouldn't be called more than once"; + f.called = false; + return f; + } + }, + , + function(module3, exports3) { + module3.exports = require("buffer"); + }, + , + , + , + function(module3, exports3) { + module3.exports = function(it) { + if (it == void 0) + throw TypeError("Can't call method on " + it); + return it; + }; + }, + function(module3, exports3, __webpack_require__) { + var isObject = __webpack_require__(34); + var document2 = __webpack_require__(11).document; + var is = isObject(document2) && isObject(document2.createElement); + module3.exports = function(it) { + return is ? document2.createElement(it) : {}; + }; + }, + function(module3, exports3) { + module3.exports = true; + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + var aFunction = __webpack_require__(46); + function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function($$resolve, $$reject) { + if (resolve !== void 0 || reject !== void 0) + throw TypeError("Bad Promise constructor"); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); + } + module3.exports.f = function(C) { + return new PromiseCapability(C); + }; + }, + function(module3, exports3, __webpack_require__) { + var def = __webpack_require__(50).f; + var has = __webpack_require__(49); + var TAG = __webpack_require__(13)("toStringTag"); + module3.exports = function(it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) + def(it, TAG, { configurable: true, value: tag }); + }; + }, + function(module3, exports3, __webpack_require__) { + var shared = __webpack_require__(107)("keys"); + var uid = __webpack_require__(111); + module3.exports = function(key) { + return shared[key] || (shared[key] = uid(key)); + }; + }, + function(module3, exports3) { + var ceil = Math.ceil; + var floor = Math.floor; + module3.exports = function(it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); + }; + }, + function(module3, exports3, __webpack_require__) { + var IObject = __webpack_require__(131); + var defined = __webpack_require__(67); + module3.exports = function(it) { + return IObject(defined(it)); + }; + }, + function(module3, exports3, __webpack_require__) { + module3.exports = glob; + var fs = __webpack_require__(3); + var rp = __webpack_require__(114); + var minimatch = __webpack_require__(60); + var Minimatch = minimatch.Minimatch; + var inherits = __webpack_require__(42); + var EE = __webpack_require__(54).EventEmitter; + var path = __webpack_require__(0); + var assert = __webpack_require__(22); + var isAbsolute = __webpack_require__(76); + var globSync = __webpack_require__(218); + var common = __webpack_require__(115); + var alphasort = common.alphasort; + var alphasorti = common.alphasorti; + var setopts = common.setopts; + var ownProp = common.ownProp; + var inflight = __webpack_require__(223); + var util = __webpack_require__(2); + var childrenIgnored = common.childrenIgnored; + var isIgnored = common.isIgnored; + var once = __webpack_require__(61); + function glob(pattern, options, cb) { + if (typeof options === "function") + cb = options, options = {}; + if (!options) + options = {}; + if (options.sync) { + if (cb) + throw new TypeError("callback provided to sync glob"); + return globSync(pattern, options); + } + return new Glob(pattern, options, cb); + } + glob.sync = globSync; + var GlobSync = glob.GlobSync = globSync.GlobSync; + glob.glob = glob; + function extend(origin, add) { + if (add === null || typeof add !== "object") { + return origin; + } + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; + } + glob.hasMagic = function(pattern, options_) { + var options = extend({}, options_); + options.noprocess = true; + var g = new Glob(pattern, options); + var set = g.minimatch.set; + if (!pattern) + return false; + if (set.length > 1) + return true; + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== "string") + return true; + } + return false; + }; + glob.Glob = Glob; + inherits(Glob, EE); + function Glob(pattern, options, cb) { + if (typeof options === "function") { + cb = options; + options = null; + } + if (options && options.sync) { + if (cb) + throw new TypeError("callback provided to sync glob"); + return new GlobSync(pattern, options); + } + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb); + setopts(this, pattern, options); + this._didRealPath = false; + var n = this.minimatch.set.length; + this.matches = new Array(n); + if (typeof cb === "function") { + cb = once(cb); + this.on("error", cb); + this.on("end", function(matches) { + cb(null, matches); + }); + } + var self2 = this; + this._processing = 0; + this._emitQueue = []; + this._processQueue = []; + this.paused = false; + if (this.noprocess) + return this; + if (n === 0) + return done(); + var sync = true; + for (var i = 0; i < n; i++) { + this._process(this.minimatch.set[i], i, false, done); + } + sync = false; + function done() { + --self2._processing; + if (self2._processing <= 0) { + if (sync) { + process.nextTick(function() { + self2._finish(); + }); + } else { + self2._finish(); + } + } + } + } + Glob.prototype._finish = function() { + assert(this instanceof Glob); + if (this.aborted) + return; + if (this.realpath && !this._didRealpath) + return this._realpath(); + common.finish(this); + this.emit("end", this.found); + }; + Glob.prototype._realpath = function() { + if (this._didRealpath) + return; + this._didRealpath = true; + var n = this.matches.length; + if (n === 0) + return this._finish(); + var self2 = this; + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next); + function next() { + if (--n === 0) + self2._finish(); + } + }; + Glob.prototype._realpathSet = function(index, cb) { + var matchset = this.matches[index]; + if (!matchset) + return cb(); + var found = Object.keys(matchset); + var self2 = this; + var n = found.length; + if (n === 0) + return cb(); + var set = this.matches[index] = Object.create(null); + found.forEach(function(p, i) { + p = self2._makeAbs(p); + rp.realpath(p, self2.realpathCache, function(er, real) { + if (!er) + set[real] = true; + else if (er.syscall === "stat") + set[p] = true; + else + self2.emit("error", er); + if (--n === 0) { + self2.matches[index] = set; + cb(); + } + }); + }); + }; + Glob.prototype._mark = function(p) { + return common.mark(this, p); + }; + Glob.prototype._makeAbs = function(f) { + return common.makeAbs(this, f); + }; + Glob.prototype.abort = function() { + this.aborted = true; + this.emit("abort"); + }; + Glob.prototype.pause = function() { + if (!this.paused) { + this.paused = true; + this.emit("pause"); + } + }; + Glob.prototype.resume = function() { + if (this.paused) { + this.emit("resume"); + this.paused = false; + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0); + this._emitQueue.length = 0; + for (var i = 0; i < eq.length; i++) { + var e = eq[i]; + this._emitMatch(e[0], e[1]); + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0); + this._processQueue.length = 0; + for (var i = 0; i < pq.length; i++) { + var p = pq[i]; + this._processing--; + this._process(p[0], p[1], p[2], p[3]); + } + } + } + }; + Glob.prototype._process = function(pattern, index, inGlobStar, cb) { + assert(this instanceof Glob); + assert(typeof cb === "function"); + if (this.aborted) + return; + this._processing++; + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]); + return; + } + var n = 0; + while (typeof pattern[n] === "string") { + n++; + } + var prefix; + switch (n) { + case pattern.length: + this._processSimple(pattern.join("/"), index, cb); + return; + case 0: + prefix = null; + break; + default: + prefix = pattern.slice(0, n).join("/"); + break; + } + var remain = pattern.slice(n); + var read; + if (prefix === null) + read = "."; + else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { + if (!prefix || !isAbsolute(prefix)) + prefix = "/" + prefix; + read = prefix; + } else + read = prefix; + var abs = this._makeAbs(read); + if (childrenIgnored(this, read)) + return cb(); + var isGlobStar = remain[0] === minimatch.GLOBSTAR; + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb); + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); + }; + Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) { + var self2 = this; + this._readdir(abs, inGlobStar, function(er, entries) { + return self2._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb); + }); + }; + Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { + if (!entries) + return cb(); + var pn = remain[0]; + var negate = !!this.minimatch.negate; + var rawGlob = pn._glob; + var dotOk = this.dot || rawGlob.charAt(0) === "."; + var matchedEntries = []; + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (e.charAt(0) !== "." || dotOk) { + var m; + if (negate && !prefix) { + m = !e.match(pn); + } else { + m = e.match(pn); + } + if (m) + matchedEntries.push(e); + } + } + var len = matchedEntries.length; + if (len === 0) + return cb(); + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + if (prefix) { + if (prefix !== "/") + e = prefix + "/" + e; + else + e = prefix + e; + } + if (e.charAt(0) === "/" && !this.nomount) { + e = path.join(this.root, e); + } + this._emitMatch(index, e); + } + return cb(); + } + remain.shift(); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + var newPattern; + if (prefix) { + if (prefix !== "/") + e = prefix + "/" + e; + else + e = prefix + e; + } + this._process([e].concat(remain), index, inGlobStar, cb); + } + cb(); + }; + Glob.prototype._emitMatch = function(index, e) { + if (this.aborted) + return; + if (isIgnored(this, e)) + return; + if (this.paused) { + this._emitQueue.push([index, e]); + return; + } + var abs = isAbsolute(e) ? e : this._makeAbs(e); + if (this.mark) + e = this._mark(e); + if (this.absolute) + e = abs; + if (this.matches[index][e]) + return; + if (this.nodir) { + var c = this.cache[abs]; + if (c === "DIR" || Array.isArray(c)) + return; + } + this.matches[index][e] = true; + var st = this.statCache[abs]; + if (st) + this.emit("stat", e, st); + this.emit("match", e); + }; + Glob.prototype._readdirInGlobStar = function(abs, cb) { + if (this.aborted) + return; + if (this.follow) + return this._readdir(abs, false, cb); + var lstatkey = "lstat\0" + abs; + var self2 = this; + var lstatcb = inflight(lstatkey, lstatcb_); + if (lstatcb) + fs.lstat(abs, lstatcb); + function lstatcb_(er, lstat) { + if (er && er.code === "ENOENT") + return cb(); + var isSym = lstat && lstat.isSymbolicLink(); + self2.symlinks[abs] = isSym; + if (!isSym && lstat && !lstat.isDirectory()) { + self2.cache[abs] = "FILE"; + cb(); + } else + self2._readdir(abs, false, cb); + } + }; + Glob.prototype._readdir = function(abs, inGlobStar, cb) { + if (this.aborted) + return; + cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb); + if (!cb) + return; + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb); + if (ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (!c || c === "FILE") + return cb(); + if (Array.isArray(c)) + return cb(null, c); + } + var self2 = this; + fs.readdir(abs, readdirCb(this, abs, cb)); + }; + function readdirCb(self2, abs, cb) { + return function(er, entries) { + if (er) + self2._readdirError(abs, er, cb); + else + self2._readdirEntries(abs, entries, cb); + }; + } + Glob.prototype._readdirEntries = function(abs, entries, cb) { + if (this.aborted) + return; + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (abs === "/") + e = abs + e; + else + e = abs + "/" + e; + this.cache[e] = true; + } + } + this.cache[abs] = entries; + return cb(null, entries); + }; + Glob.prototype._readdirError = function(f, er, cb) { + if (this.aborted) + return; + switch (er.code) { + case "ENOTSUP": + case "ENOTDIR": + var abs = this._makeAbs(f); + this.cache[abs] = "FILE"; + if (abs === this.cwdAbs) { + var error = new Error(er.code + " invalid cwd " + this.cwd); + error.path = this.cwd; + error.code = er.code; + this.emit("error", error); + this.abort(); + } + break; + case "ENOENT": + case "ELOOP": + case "ENAMETOOLONG": + case "UNKNOWN": + this.cache[this._makeAbs(f)] = false; + break; + default: + this.cache[this._makeAbs(f)] = false; + if (this.strict) { + this.emit("error", er); + this.abort(); + } + if (!this.silent) + console.error("glob error", er); + break; + } + return cb(); + }; + Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) { + var self2 = this; + this._readdir(abs, inGlobStar, function(er, entries) { + self2._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); + }); + }; + Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { + if (!entries) + return cb(); + var remainWithoutGlobStar = remain.slice(1); + var gspref = prefix ? [prefix] : []; + var noGlobStar = gspref.concat(remainWithoutGlobStar); + this._process(noGlobStar, index, false, cb); + var isSym = this.symlinks[abs]; + var len = entries.length; + if (isSym && inGlobStar) + return cb(); + for (var i = 0; i < len; i++) { + var e = entries[i]; + if (e.charAt(0) === "." && !this.dot) + continue; + var instead = gspref.concat(entries[i], remainWithoutGlobStar); + this._process(instead, index, true, cb); + var below = gspref.concat(entries[i], remain); + this._process(below, index, true, cb); + } + cb(); + }; + Glob.prototype._processSimple = function(prefix, index, cb) { + var self2 = this; + this._stat(prefix, function(er, exists) { + self2._processSimple2(prefix, index, er, exists, cb); + }); + }; + Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) { + if (!this.matches[index]) + this.matches[index] = Object.create(null); + if (!exists) + return cb(); + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix); + if (prefix.charAt(0) === "/") { + prefix = path.join(this.root, prefix); + } else { + prefix = path.resolve(this.root, prefix); + if (trail) + prefix += "/"; + } + } + if (process.platform === "win32") + prefix = prefix.replace(/\\/g, "/"); + this._emitMatch(index, prefix); + cb(); + }; + Glob.prototype._stat = function(f, cb) { + var abs = this._makeAbs(f); + var needDir = f.slice(-1) === "/"; + if (f.length > this.maxLength) + return cb(); + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (Array.isArray(c)) + c = "DIR"; + if (!needDir || c === "DIR") + return cb(null, c); + if (needDir && c === "FILE") + return cb(); + } + var exists; + var stat = this.statCache[abs]; + if (stat !== void 0) { + if (stat === false) + return cb(null, stat); + else { + var type = stat.isDirectory() ? "DIR" : "FILE"; + if (needDir && type === "FILE") + return cb(); + else + return cb(null, type, stat); + } + } + var self2 = this; + var statcb = inflight("stat\0" + abs, lstatcb_); + if (statcb) + fs.lstat(abs, statcb); + function lstatcb_(er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + return fs.stat(abs, function(er2, stat2) { + if (er2) + self2._stat2(f, abs, null, lstat, cb); + else + self2._stat2(f, abs, er2, stat2, cb); + }); + } else { + self2._stat2(f, abs, er, lstat, cb); + } + } + }; + Glob.prototype._stat2 = function(f, abs, er, stat, cb) { + if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { + this.statCache[abs] = false; + return cb(); + } + var needDir = f.slice(-1) === "/"; + this.statCache[abs] = stat; + if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) + return cb(null, false, stat); + var c = true; + if (stat) + c = stat.isDirectory() ? "DIR" : "FILE"; + this.cache[abs] = this.cache[abs] || c; + if (needDir && c === "FILE") + return cb(); + return cb(null, c, stat); + }; + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + function posix(path) { + return path.charAt(0) === "/"; + } + function win32(path) { + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ""; + var isUnc = Boolean(device && device.charAt(1) !== ":"); + return Boolean(result[2] || isUnc); + } + module3.exports = process.platform === "win32" ? win32 : posix; + module3.exports.posix = posix; + module3.exports.win32 = win32; + }, + , + , + function(module3, exports3) { + module3.exports = require("tty"); + }, + , + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.default = function(str, fileLoc = "lockfile") { + str = (0, (_stripBom || _load_stripBom()).default)(str); + return hasMergeConflicts(str) ? parseWithConflict(str, fileLoc) : { type: "success", object: parse(str, fileLoc) }; + }; + var _util; + function _load_util() { + return _util = _interopRequireDefault(__webpack_require__(2)); + } + var _invariant; + function _load_invariant() { + return _invariant = _interopRequireDefault(__webpack_require__(7)); + } + var _stripBom; + function _load_stripBom() { + return _stripBom = _interopRequireDefault(__webpack_require__(122)); + } + var _constants; + function _load_constants() { + return _constants = __webpack_require__(6); + } + var _errors; + function _load_errors() { + return _errors = __webpack_require__(4); + } + var _map; + function _load_map() { + return _map = _interopRequireDefault(__webpack_require__(20)); + } + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + const VERSION_REGEX = /^yarn lockfile v(\d+)$/; + const TOKEN_TYPES = { + boolean: "BOOLEAN", + string: "STRING", + identifier: "IDENTIFIER", + eof: "EOF", + colon: "COLON", + newline: "NEWLINE", + comment: "COMMENT", + indent: "INDENT", + invalid: "INVALID", + number: "NUMBER", + comma: "COMMA" + }; + const VALID_PROP_VALUE_TOKENS = [TOKEN_TYPES.boolean, TOKEN_TYPES.string, TOKEN_TYPES.number]; + function isValidPropValueToken(token) { + return VALID_PROP_VALUE_TOKENS.indexOf(token.type) >= 0; + } + function* tokenise(input) { + let lastNewline = false; + let line = 1; + let col = 0; + function buildToken(type, value) { + return { line, col, type, value }; + } + while (input.length) { + let chop = 0; + if (input[0] === "\n" || input[0] === "\r") { + chop++; + if (input[1] === "\n") { + chop++; + } + line++; + col = 0; + yield buildToken(TOKEN_TYPES.newline); + } else if (input[0] === "#") { + chop++; + let val = ""; + while (input[chop] !== "\n") { + val += input[chop]; + chop++; + } + yield buildToken(TOKEN_TYPES.comment, val); + } else if (input[0] === " ") { + if (lastNewline) { + let indent = ""; + for (let i = 0; input[i] === " "; i++) { + indent += input[i]; + } + if (indent.length % 2) { + throw new TypeError("Invalid number of spaces"); + } else { + chop = indent.length; + yield buildToken(TOKEN_TYPES.indent, indent.length / 2); + } + } else { + chop++; + } + } else if (input[0] === '"') { + let val = ""; + for (let i = 0; ; i++) { + const currentChar = input[i]; + val += currentChar; + if (i > 0 && currentChar === '"') { + const isEscaped = input[i - 1] === "\\" && input[i - 2] !== "\\"; + if (!isEscaped) { + break; + } + } + } + chop = val.length; + try { + yield buildToken(TOKEN_TYPES.string, JSON.parse(val)); + } catch (err) { + if (err instanceof SyntaxError) { + yield buildToken(TOKEN_TYPES.invalid); + } else { + throw err; + } + } + } else if (/^[0-9]/.test(input)) { + let val = ""; + for (let i = 0; /^[0-9]$/.test(input[i]); i++) { + val += input[i]; + } + chop = val.length; + yield buildToken(TOKEN_TYPES.number, +val); + } else if (/^true/.test(input)) { + yield buildToken(TOKEN_TYPES.boolean, true); + chop = 4; + } else if (/^false/.test(input)) { + yield buildToken(TOKEN_TYPES.boolean, false); + chop = 5; + } else if (input[0] === ":") { + yield buildToken(TOKEN_TYPES.colon); + chop++; + } else if (input[0] === ",") { + yield buildToken(TOKEN_TYPES.comma); + chop++; + } else if (/^[a-zA-Z\/-]/g.test(input)) { + let name = ""; + for (let i = 0; i < input.length; i++) { + const char = input[i]; + if (char === ":" || char === " " || char === "\n" || char === "\r" || char === ",") { + break; + } else { + name += char; + } + } + chop = name.length; + yield buildToken(TOKEN_TYPES.string, name); + } else { + yield buildToken(TOKEN_TYPES.invalid); + } + if (!chop) { + yield buildToken(TOKEN_TYPES.invalid); + } + col += chop; + lastNewline = input[0] === "\n" || input[0] === "\r" && input[1] === "\n"; + input = input.slice(chop); + } + yield buildToken(TOKEN_TYPES.eof); + } + class Parser { + constructor(input, fileLoc = "lockfile") { + this.comments = []; + this.tokens = tokenise(input); + this.fileLoc = fileLoc; + } + onComment(token) { + const value = token.value; + (0, (_invariant || _load_invariant()).default)(typeof value === "string", "expected token value to be a string"); + const comment = value.trim(); + const versionMatch = comment.match(VERSION_REGEX); + if (versionMatch) { + const version = +versionMatch[1]; + if (version > (_constants || _load_constants()).LOCKFILE_VERSION) { + throw new (_errors || _load_errors()).MessageError(`Can't install from a lockfile of version ${version} as you're on an old yarn version that only supports versions up to ${(_constants || _load_constants()).LOCKFILE_VERSION}. Run \`$ yarn self-update\` to upgrade to the latest version.`); + } + } + this.comments.push(comment); + } + next() { + const item = this.tokens.next(); + (0, (_invariant || _load_invariant()).default)(item, "expected a token"); + const done = item.done, value = item.value; + if (done || !value) { + throw new Error("No more tokens"); + } else if (value.type === TOKEN_TYPES.comment) { + this.onComment(value); + return this.next(); + } else { + return this.token = value; + } + } + unexpected(msg = "Unexpected token") { + throw new SyntaxError(`${msg} ${this.token.line}:${this.token.col} in ${this.fileLoc}`); + } + expect(tokType) { + if (this.token.type === tokType) { + this.next(); + } else { + this.unexpected(); + } + } + eat(tokType) { + if (this.token.type === tokType) { + this.next(); + return true; + } else { + return false; + } + } + parse(indent = 0) { + const obj = (0, (_map || _load_map()).default)(); + while (true) { + const propToken = this.token; + if (propToken.type === TOKEN_TYPES.newline) { + const nextToken = this.next(); + if (!indent) { + continue; + } + if (nextToken.type !== TOKEN_TYPES.indent) { + break; + } + if (nextToken.value === indent) { + this.next(); + } else { + break; + } + } else if (propToken.type === TOKEN_TYPES.indent) { + if (propToken.value === indent) { + this.next(); + } else { + break; + } + } else if (propToken.type === TOKEN_TYPES.eof) { + break; + } else if (propToken.type === TOKEN_TYPES.string) { + const key = propToken.value; + (0, (_invariant || _load_invariant()).default)(key, "Expected a key"); + const keys = [key]; + this.next(); + while (this.token.type === TOKEN_TYPES.comma) { + this.next(); + const keyToken = this.token; + if (keyToken.type !== TOKEN_TYPES.string) { + this.unexpected("Expected string"); + } + const key2 = keyToken.value; + (0, (_invariant || _load_invariant()).default)(key2, "Expected a key"); + keys.push(key2); + this.next(); + } + const valToken = this.token; + if (valToken.type === TOKEN_TYPES.colon) { + this.next(); + const val = this.parse(indent + 1); + for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator](); ; ) { + var _ref; + if (_isArray) { + if (_i >= _iterator.length) + break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) + break; + _ref = _i.value; + } + const key2 = _ref; + obj[key2] = val; + } + if (indent && this.token.type !== TOKEN_TYPES.indent) { + break; + } + } else if (isValidPropValueToken(valToken)) { + for (var _iterator2 = keys, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator](); ; ) { + var _ref2; + if (_isArray2) { + if (_i2 >= _iterator2.length) + break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) + break; + _ref2 = _i2.value; + } + const key2 = _ref2; + obj[key2] = valToken.value; + } + this.next(); + } else { + this.unexpected("Invalid value type"); + } + } else { + this.unexpected(`Unknown token: ${(_util || _load_util()).default.inspect(propToken)}`); + } + } + return obj; + } + } + const MERGE_CONFLICT_ANCESTOR = "|||||||"; + const MERGE_CONFLICT_END = ">>>>>>>"; + const MERGE_CONFLICT_SEP = "======="; + const MERGE_CONFLICT_START = "<<<<<<<"; + function extractConflictVariants(str) { + const variants = [[], []]; + const lines = str.split(/\r?\n/g); + let skip = false; + while (lines.length) { + const line = lines.shift(); + if (line.startsWith(MERGE_CONFLICT_START)) { + while (lines.length) { + const conflictLine = lines.shift(); + if (conflictLine === MERGE_CONFLICT_SEP) { + skip = false; + break; + } else if (skip || conflictLine.startsWith(MERGE_CONFLICT_ANCESTOR)) { + skip = true; + continue; + } else { + variants[0].push(conflictLine); + } + } + while (lines.length) { + const conflictLine = lines.shift(); + if (conflictLine.startsWith(MERGE_CONFLICT_END)) { + break; + } else { + variants[1].push(conflictLine); + } + } + } else { + variants[0].push(line); + variants[1].push(line); + } + } + return [variants[0].join("\n"), variants[1].join("\n")]; + } + function hasMergeConflicts(str) { + return str.includes(MERGE_CONFLICT_START) && str.includes(MERGE_CONFLICT_SEP) && str.includes(MERGE_CONFLICT_END); + } + function parse(str, fileLoc) { + const parser = new Parser(str, fileLoc); + parser.next(); + return parser.parse(); + } + function parseWithConflict(str, fileLoc) { + const variants = extractConflictVariants(str); + try { + return { type: "merge", object: Object.assign({}, parse(variants[0], fileLoc), parse(variants[1], fileLoc)) }; + } catch (err) { + if (err instanceof SyntaxError) { + return { type: "conflict", object: {} }; + } else { + throw err; + } + } + } + }, + , + , + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + var _map; + function _load_map() { + return _map = _interopRequireDefault(__webpack_require__(20)); + } + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + const debug = __webpack_require__(212)("yarn"); + class BlockingQueue { + constructor(alias, maxConcurrency = Infinity) { + this.concurrencyQueue = []; + this.maxConcurrency = maxConcurrency; + this.runningCount = 0; + this.warnedStuck = false; + this.alias = alias; + this.first = true; + this.running = (0, (_map || _load_map()).default)(); + this.queue = (0, (_map || _load_map()).default)(); + this.stuckTick = this.stuckTick.bind(this); + } + stillActive() { + if (this.stuckTimer) { + clearTimeout(this.stuckTimer); + } + this.stuckTimer = setTimeout(this.stuckTick, 5e3); + this.stuckTimer.unref && this.stuckTimer.unref(); + } + stuckTick() { + if (this.runningCount === 1) { + this.warnedStuck = true; + debug(`The ${JSON.stringify(this.alias)} blocking queue may be stuck. 5 seconds without any activity with 1 worker: ${Object.keys(this.running)[0]}`); + } + } + push(key, factory) { + if (this.first) { + this.first = false; + } else { + this.stillActive(); + } + return new Promise((resolve, reject) => { + const queue = this.queue[key] = this.queue[key] || []; + queue.push({ factory, resolve, reject }); + if (!this.running[key]) { + this.shift(key); + } + }); + } + shift(key) { + if (this.running[key]) { + delete this.running[key]; + this.runningCount--; + if (this.stuckTimer) { + clearTimeout(this.stuckTimer); + this.stuckTimer = null; + } + if (this.warnedStuck) { + this.warnedStuck = false; + debug(`${JSON.stringify(this.alias)} blocking queue finally resolved. Nothing to worry about.`); + } + } + const queue = this.queue[key]; + if (!queue) { + return; + } + var _queue$shift = queue.shift(); + const resolve = _queue$shift.resolve, reject = _queue$shift.reject, factory = _queue$shift.factory; + if (!queue.length) { + delete this.queue[key]; + } + const next = () => { + this.shift(key); + this.shiftConcurrencyQueue(); + }; + const run = () => { + this.running[key] = true; + this.runningCount++; + factory().then(function(val) { + resolve(val); + next(); + return null; + }).catch(function(err) { + reject(err); + next(); + }); + }; + this.maybePushConcurrencyQueue(run); + } + maybePushConcurrencyQueue(run) { + if (this.runningCount < this.maxConcurrency) { + run(); + } else { + this.concurrencyQueue.push(run); + } + } + shiftConcurrencyQueue() { + if (this.runningCount < this.maxConcurrency) { + const fn2 = this.concurrencyQueue.shift(); + if (fn2) { + fn2(); + } + } + } + } + exports3.default = BlockingQueue; + }, + function(module3, exports3) { + module3.exports = function(exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + }, + , + , + , + , + , + , + , + , + , + , + , + , + , + , + function(module3, exports3, __webpack_require__) { + var cof = __webpack_require__(47); + var TAG = __webpack_require__(13)("toStringTag"); + var ARG = cof(function() { + return arguments; + }()) == "Arguments"; + var tryGet = function(it, key) { + try { + return it[key]; + } catch (e) { + } + }; + module3.exports = function(it) { + var O, T, B; + return it === void 0 ? "Undefined" : it === null ? "Null" : typeof (T = tryGet(O = Object(it), TAG)) == "string" ? T : ARG ? cof(O) : (B = cof(O)) == "Object" && typeof O.callee == "function" ? "Arguments" : B; + }; + }, + function(module3, exports3) { + module3.exports = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","); + }, + function(module3, exports3, __webpack_require__) { + var document2 = __webpack_require__(11).document; + module3.exports = document2 && document2.documentElement; + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + var LIBRARY = __webpack_require__(69); + var $export = __webpack_require__(41); + var redefine = __webpack_require__(197); + var hide = __webpack_require__(31); + var Iterators = __webpack_require__(35); + var $iterCreate = __webpack_require__(188); + var setToStringTag = __webpack_require__(71); + var getPrototypeOf = __webpack_require__(194); + var ITERATOR = __webpack_require__(13)("iterator"); + var BUGGY = !([].keys && "next" in [].keys()); + var FF_ITERATOR = "@@iterator"; + var KEYS = "keys"; + var VALUES = "values"; + var returnThis = function() { + return this; + }; + module3.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function(kind) { + if (!BUGGY && kind in proto) + return proto[kind]; + switch (kind) { + case KEYS: + return function keys() { + return new Constructor(this, kind); + }; + case VALUES: + return function values() { + return new Constructor(this, kind); + }; + } + return function entries() { + return new Constructor(this, kind); + }; + }; + var TAG = NAME + " Iterator"; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod("entries") : void 0; + var $anyNative = NAME == "Array" ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + setToStringTag(IteratorPrototype, TAG, true); + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != "function") + hide(IteratorPrototype, ITERATOR, returnThis); + } + } + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { + return $native.call(this); + }; + } + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) + for (key in methods) { + if (!(key in proto)) + redefine(proto, key, methods[key]); + } + else + $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + }, + function(module3, exports3) { + module3.exports = function(exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } + }; + }, + function(module3, exports3, __webpack_require__) { + var anObject = __webpack_require__(27); + var isObject = __webpack_require__(34); + var newPromiseCapability = __webpack_require__(70); + module3.exports = function(C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) + return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; + }; + }, + function(module3, exports3) { + module3.exports = function(bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value + }; + }; + }, + function(module3, exports3, __webpack_require__) { + var core = __webpack_require__(23); + var global2 = __webpack_require__(11); + var SHARED = "__core-js_shared__"; + var store = global2[SHARED] || (global2[SHARED] = {}); + (module3.exports = function(key, value) { + return store[key] || (store[key] = value !== void 0 ? value : {}); + })("versions", []).push({ + version: core.version, + mode: __webpack_require__(69) ? "pure" : "global", + copyright: "\xA9 2018 Denis Pushkarev (zloirock.ru)" + }); + }, + function(module3, exports3, __webpack_require__) { + var anObject = __webpack_require__(27); + var aFunction = __webpack_require__(46); + var SPECIES = __webpack_require__(13)("species"); + module3.exports = function(O, D) { + var C = anObject(O).constructor; + var S; + return C === void 0 || (S = anObject(C)[SPECIES]) == void 0 ? D : aFunction(S); + }; + }, + function(module3, exports3, __webpack_require__) { + var ctx = __webpack_require__(48); + var invoke = __webpack_require__(185); + var html = __webpack_require__(102); + var cel = __webpack_require__(68); + var global2 = __webpack_require__(11); + var process2 = global2.process; + var setTask = global2.setImmediate; + var clearTask = global2.clearImmediate; + var MessageChannel2 = global2.MessageChannel; + var Dispatch = global2.Dispatch; + var counter = 0; + var queue = {}; + var ONREADYSTATECHANGE = "onreadystatechange"; + var defer, channel, port; + var run = function() { + var id = +this; + if (queue.hasOwnProperty(id)) { + var fn2 = queue[id]; + delete queue[id]; + fn2(); + } + }; + var listener = function(event) { + run.call(event.data); + }; + if (!setTask || !clearTask) { + setTask = function setImmediate2(fn2) { + var args2 = []; + var i = 1; + while (arguments.length > i) + args2.push(arguments[i++]); + queue[++counter] = function() { + invoke(typeof fn2 == "function" ? fn2 : Function(fn2), args2); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate2(id) { + delete queue[id]; + }; + if (__webpack_require__(47)(process2) == "process") { + defer = function(id) { + process2.nextTick(ctx(run, id, 1)); + }; + } else if (Dispatch && Dispatch.now) { + defer = function(id) { + Dispatch.now(ctx(run, id, 1)); + }; + } else if (MessageChannel2) { + channel = new MessageChannel2(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + } else if (global2.addEventListener && typeof postMessage == "function" && !global2.importScripts) { + defer = function(id) { + global2.postMessage(id + "", "*"); + }; + global2.addEventListener("message", listener, false); + } else if (ONREADYSTATECHANGE in cel("script")) { + defer = function(id) { + html.appendChild(cel("script"))[ONREADYSTATECHANGE] = function() { + html.removeChild(this); + run.call(id); + }; + }; + } else { + defer = function(id) { + setTimeout(ctx(run, id, 1), 0); + }; + } + } + module3.exports = { + set: setTask, + clear: clearTask + }; + }, + function(module3, exports3, __webpack_require__) { + var toInteger = __webpack_require__(73); + var min = Math.min; + module3.exports = function(it) { + return it > 0 ? min(toInteger(it), 9007199254740991) : 0; + }; + }, + function(module3, exports3) { + var id = 0; + var px = Math.random(); + module3.exports = function(key) { + return "Symbol(".concat(key === void 0 ? "" : key, ")_", (++id + px).toString(36)); + }; + }, + function(module3, exports3, __webpack_require__) { + exports3 = module3.exports = createDebug.debug = createDebug["default"] = createDebug; + exports3.coerce = coerce; + exports3.disable = disable; + exports3.enable = enable; + exports3.enabled = enabled; + exports3.humanize = __webpack_require__(229); + exports3.instances = []; + exports3.names = []; + exports3.skips = []; + exports3.formatters = {}; + function selectColor(namespace) { + var hash = 0, i; + for (i in namespace) { + hash = (hash << 5) - hash + namespace.charCodeAt(i); + hash |= 0; + } + return exports3.colors[Math.abs(hash) % exports3.colors.length]; + } + function createDebug(namespace) { + var prevTime; + function debug() { + if (!debug.enabled) + return; + var self2 = debug; + var curr = +new Date(); + var ms = curr - (prevTime || curr); + self2.diff = ms; + self2.prev = prevTime; + self2.curr = curr; + prevTime = curr; + var args2 = new Array(arguments.length); + for (var i = 0; i < args2.length; i++) { + args2[i] = arguments[i]; + } + args2[0] = exports3.coerce(args2[0]); + if (typeof args2[0] !== "string") { + args2.unshift("%O"); + } + var index = 0; + args2[0] = args2[0].replace(/%([a-zA-Z%])/g, function(match, format) { + if (match === "%%") + return match; + index++; + var formatter = exports3.formatters[format]; + if (typeof formatter === "function") { + var val = args2[index]; + match = formatter.call(self2, val); + args2.splice(index, 1); + index--; + } + return match; + }); + exports3.formatArgs.call(self2, args2); + var logFn = debug.log || exports3.log || console.log.bind(console); + logFn.apply(self2, args2); + } + debug.namespace = namespace; + debug.enabled = exports3.enabled(namespace); + debug.useColors = exports3.useColors(); + debug.color = selectColor(namespace); + debug.destroy = destroy; + if (typeof exports3.init === "function") { + exports3.init(debug); + } + exports3.instances.push(debug); + return debug; + } + function destroy() { + var index = exports3.instances.indexOf(this); + if (index !== -1) { + exports3.instances.splice(index, 1); + return true; + } else { + return false; + } + } + function enable(namespaces) { + exports3.save(namespaces); + exports3.names = []; + exports3.skips = []; + var i; + var split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); + var len = split.length; + for (i = 0; i < len; i++) { + if (!split[i]) + continue; + namespaces = split[i].replace(/\*/g, ".*?"); + if (namespaces[0] === "-") { + exports3.skips.push(new RegExp("^" + namespaces.substr(1) + "$")); + } else { + exports3.names.push(new RegExp("^" + namespaces + "$")); + } + } + for (i = 0; i < exports3.instances.length; i++) { + var instance = exports3.instances[i]; + instance.enabled = exports3.enabled(instance.namespace); + } + } + function disable() { + exports3.enable(""); + } + function enabled(name) { + if (name[name.length - 1] === "*") { + return true; + } + var i, len; + for (i = 0, len = exports3.skips.length; i < len; i++) { + if (exports3.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports3.names.length; i < len; i++) { + if (exports3.names[i].test(name)) { + return true; + } + } + return false; + } + function coerce(val) { + if (val instanceof Error) + return val.stack || val.message; + return val; + } + }, + , + function(module3, exports3, __webpack_require__) { + module3.exports = realpath; + realpath.realpath = realpath; + realpath.sync = realpathSync; + realpath.realpathSync = realpathSync; + realpath.monkeypatch = monkeypatch; + realpath.unmonkeypatch = unmonkeypatch; + var fs = __webpack_require__(3); + var origRealpath = fs.realpath; + var origRealpathSync = fs.realpathSync; + var version = process.version; + var ok = /^v[0-5]\./.test(version); + var old = __webpack_require__(217); + function newError(er) { + return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG"); + } + function realpath(p, cache, cb) { + if (ok) { + return origRealpath(p, cache, cb); + } + if (typeof cache === "function") { + cb = cache; + cache = null; + } + origRealpath(p, cache, function(er, result) { + if (newError(er)) { + old.realpath(p, cache, cb); + } else { + cb(er, result); + } + }); + } + function realpathSync(p, cache) { + if (ok) { + return origRealpathSync(p, cache); + } + try { + return origRealpathSync(p, cache); + } catch (er) { + if (newError(er)) { + return old.realpathSync(p, cache); + } else { + throw er; + } + } + } + function monkeypatch() { + fs.realpath = realpath; + fs.realpathSync = realpathSync; + } + function unmonkeypatch() { + fs.realpath = origRealpath; + fs.realpathSync = origRealpathSync; + } + }, + function(module3, exports3, __webpack_require__) { + exports3.alphasort = alphasort; + exports3.alphasorti = alphasorti; + exports3.setopts = setopts; + exports3.ownProp = ownProp; + exports3.makeAbs = makeAbs; + exports3.finish = finish; + exports3.mark = mark; + exports3.isIgnored = isIgnored; + exports3.childrenIgnored = childrenIgnored; + function ownProp(obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field); + } + var path = __webpack_require__(0); + var minimatch = __webpack_require__(60); + var isAbsolute = __webpack_require__(76); + var Minimatch = minimatch.Minimatch; + function alphasorti(a, b) { + return a.toLowerCase().localeCompare(b.toLowerCase()); + } + function alphasort(a, b) { + return a.localeCompare(b); + } + function setupIgnores(self2, options) { + self2.ignore = options.ignore || []; + if (!Array.isArray(self2.ignore)) + self2.ignore = [self2.ignore]; + if (self2.ignore.length) { + self2.ignore = self2.ignore.map(ignoreMap); + } + } + function ignoreMap(pattern) { + var gmatcher = null; + if (pattern.slice(-3) === "/**") { + var gpattern = pattern.replace(/(\/\*\*)+$/, ""); + gmatcher = new Minimatch(gpattern, { dot: true }); + } + return { + matcher: new Minimatch(pattern, { dot: true }), + gmatcher + }; + } + function setopts(self2, pattern, options) { + if (!options) + options = {}; + if (options.matchBase && pattern.indexOf("/") === -1) { + if (options.noglobstar) { + throw new Error("base matching requires globstar"); + } + pattern = "**/" + pattern; + } + self2.silent = !!options.silent; + self2.pattern = pattern; + self2.strict = options.strict !== false; + self2.realpath = !!options.realpath; + self2.realpathCache = options.realpathCache || Object.create(null); + self2.follow = !!options.follow; + self2.dot = !!options.dot; + self2.mark = !!options.mark; + self2.nodir = !!options.nodir; + if (self2.nodir) + self2.mark = true; + self2.sync = !!options.sync; + self2.nounique = !!options.nounique; + self2.nonull = !!options.nonull; + self2.nosort = !!options.nosort; + self2.nocase = !!options.nocase; + self2.stat = !!options.stat; + self2.noprocess = !!options.noprocess; + self2.absolute = !!options.absolute; + self2.maxLength = options.maxLength || Infinity; + self2.cache = options.cache || Object.create(null); + self2.statCache = options.statCache || Object.create(null); + self2.symlinks = options.symlinks || Object.create(null); + setupIgnores(self2, options); + self2.changedCwd = false; + var cwd = process.cwd(); + if (!ownProp(options, "cwd")) + self2.cwd = cwd; + else { + self2.cwd = path.resolve(options.cwd); + self2.changedCwd = self2.cwd !== cwd; + } + self2.root = options.root || path.resolve(self2.cwd, "/"); + self2.root = path.resolve(self2.root); + if (process.platform === "win32") + self2.root = self2.root.replace(/\\/g, "/"); + self2.cwdAbs = isAbsolute(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd); + if (process.platform === "win32") + self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/"); + self2.nomount = !!options.nomount; + options.nonegate = true; + options.nocomment = true; + self2.minimatch = new Minimatch(pattern, options); + self2.options = self2.minimatch.options; + } + function finish(self2) { + var nou = self2.nounique; + var all = nou ? [] : Object.create(null); + for (var i = 0, l = self2.matches.length; i < l; i++) { + var matches = self2.matches[i]; + if (!matches || Object.keys(matches).length === 0) { + if (self2.nonull) { + var literal = self2.minimatch.globSet[i]; + if (nou) + all.push(literal); + else + all[literal] = true; + } + } else { + var m = Object.keys(matches); + if (nou) + all.push.apply(all, m); + else + m.forEach(function(m2) { + all[m2] = true; + }); + } + } + if (!nou) + all = Object.keys(all); + if (!self2.nosort) + all = all.sort(self2.nocase ? alphasorti : alphasort); + if (self2.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self2._mark(all[i]); + } + if (self2.nodir) { + all = all.filter(function(e) { + var notDir = !/\/$/.test(e); + var c = self2.cache[e] || self2.cache[makeAbs(self2, e)]; + if (notDir && c) + notDir = c !== "DIR" && !Array.isArray(c); + return notDir; + }); + } + } + if (self2.ignore.length) + all = all.filter(function(m2) { + return !isIgnored(self2, m2); + }); + self2.found = all; + } + function mark(self2, p) { + var abs = makeAbs(self2, p); + var c = self2.cache[abs]; + var m = p; + if (c) { + var isDir = c === "DIR" || Array.isArray(c); + var slash = p.slice(-1) === "/"; + if (isDir && !slash) + m += "/"; + else if (!isDir && slash) + m = m.slice(0, -1); + if (m !== p) { + var mabs = makeAbs(self2, m); + self2.statCache[mabs] = self2.statCache[abs]; + self2.cache[mabs] = self2.cache[abs]; + } + } + return m; + } + function makeAbs(self2, f) { + var abs = f; + if (f.charAt(0) === "/") { + abs = path.join(self2.root, f); + } else if (isAbsolute(f) || f === "") { + abs = f; + } else if (self2.changedCwd) { + abs = path.resolve(self2.cwd, f); + } else { + abs = path.resolve(f); + } + if (process.platform === "win32") + abs = abs.replace(/\\/g, "/"); + return abs; + } + function isIgnored(self2, path2) { + if (!self2.ignore.length) + return false; + return self2.ignore.some(function(item) { + return item.matcher.match(path2) || !!(item.gmatcher && item.gmatcher.match(path2)); + }); + } + function childrenIgnored(self2, path2) { + if (!self2.ignore.length) + return false; + return self2.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path2)); + }); + } + }, + function(module3, exports3, __webpack_require__) { + var path = __webpack_require__(0); + var fs = __webpack_require__(3); + var _0777 = parseInt("0777", 8); + module3.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; + function mkdirP(p, opts, f, made) { + if (typeof opts === "function") { + f = opts; + opts = {}; + } else if (!opts || typeof opts !== "object") { + opts = { mode: opts }; + } + var mode = opts.mode; + var xfs = opts.fs || fs; + if (mode === void 0) { + mode = _0777 & ~process.umask(); + } + if (!made) + made = null; + var cb = f || function() { + }; + p = path.resolve(p); + xfs.mkdir(p, mode, function(er) { + if (!er) { + made = made || p; + return cb(null, made); + } + switch (er.code) { + case "ENOENT": + mkdirP(path.dirname(p), opts, function(er2, made2) { + if (er2) + cb(er2, made2); + else + mkdirP(p, opts, cb, made2); + }); + break; + default: + xfs.stat(p, function(er2, stat) { + if (er2 || !stat.isDirectory()) + cb(er, made); + else + cb(null, made); + }); + break; + } + }); + } + mkdirP.sync = function sync(p, opts, made) { + if (!opts || typeof opts !== "object") { + opts = { mode: opts }; + } + var mode = opts.mode; + var xfs = opts.fs || fs; + if (mode === void 0) { + mode = _0777 & ~process.umask(); + } + if (!made) + made = null; + p = path.resolve(p); + try { + xfs.mkdirSync(p, mode); + made = made || p; + } catch (err0) { + switch (err0.code) { + case "ENOENT": + made = sync(path.dirname(p), opts, made); + sync(p, opts, made); + break; + default: + var stat; + try { + stat = xfs.statSync(p); + } catch (err1) { + throw err0; + } + if (!stat.isDirectory()) + throw err0; + break; + } + } + return made; + }; + }, + , + , + , + , + , + function(module3, exports3, __webpack_require__) { + "use strict"; + module3.exports = (x) => { + if (typeof x !== "string") { + throw new TypeError("Expected a string, got " + typeof x); + } + if (x.charCodeAt(0) === 65279) { + return x.slice(1); + } + return x; + }; + }, + function(module3, exports3) { + module3.exports = wrappy; + function wrappy(fn2, cb) { + if (fn2 && cb) + return wrappy(fn2)(cb); + if (typeof fn2 !== "function") + throw new TypeError("need wrapper function"); + Object.keys(fn2).forEach(function(k) { + wrapper[k] = fn2[k]; + }); + return wrapper; + function wrapper() { + var args2 = new Array(arguments.length); + for (var i = 0; i < args2.length; i++) { + args2[i] = arguments[i]; + } + var ret = fn2.apply(this, args2); + var cb2 = args2[args2.length - 1]; + if (typeof ret === "function" && ret !== cb2) { + Object.keys(cb2).forEach(function(k) { + ret[k] = cb2[k]; + }); + } + return ret; + } + } + }, + , + , + , + , + , + , + , + function(module3, exports3, __webpack_require__) { + var cof = __webpack_require__(47); + module3.exports = Object("z").propertyIsEnumerable(0) ? Object : function(it) { + return cof(it) == "String" ? it.split("") : Object(it); + }; + }, + function(module3, exports3, __webpack_require__) { + var $keys = __webpack_require__(195); + var enumBugKeys = __webpack_require__(101); + module3.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); + }; + }, + function(module3, exports3, __webpack_require__) { + var defined = __webpack_require__(67); + module3.exports = function(it) { + return Object(defined(it)); + }; + }, + , + , + , + , + , + , + , + , + , + , + , + function(module3, exports3) { + module3.exports = { "name": "yarn", "installationMethod": "unknown", "version": "1.10.0-0", "license": "BSD-2-Clause", "preferGlobal": true, "description": "\u{1F4E6}\u{1F408} Fast, reliable, and secure dependency management.", "dependencies": { "@zkochan/cmd-shim": "^2.2.4", "babel-runtime": "^6.26.0", "bytes": "^3.0.0", "camelcase": "^4.0.0", "chalk": "^2.1.0", "commander": "^2.9.0", "death": "^1.0.0", "debug": "^3.0.0", "deep-equal": "^1.0.1", "detect-indent": "^5.0.0", "dnscache": "^1.0.1", "glob": "^7.1.1", "gunzip-maybe": "^1.4.0", "hash-for-dep": "^1.2.3", "imports-loader": "^0.8.0", "ini": "^1.3.4", "inquirer": "^3.0.1", "invariant": "^2.2.0", "is-builtin-module": "^2.0.0", "is-ci": "^1.0.10", "is-webpack-bundle": "^1.0.0", "leven": "^2.0.0", "loud-rejection": "^1.2.0", "micromatch": "^2.3.11", "mkdirp": "^0.5.1", "node-emoji": "^1.6.1", "normalize-url": "^2.0.0", "npm-logical-tree": "^1.2.1", "object-path": "^0.11.2", "proper-lockfile": "^2.0.0", "puka": "^1.0.0", "read": "^1.0.7", "request": "^2.87.0", "request-capture-har": "^1.2.2", "rimraf": "^2.5.0", "semver": "^5.1.0", "ssri": "^5.3.0", "strip-ansi": "^4.0.0", "strip-bom": "^3.0.0", "tar-fs": "^1.16.0", "tar-stream": "^1.6.1", "uuid": "^3.0.1", "v8-compile-cache": "^2.0.0", "validate-npm-package-license": "^3.0.3", "yn": "^2.0.0" }, "devDependencies": { "babel-core": "^6.26.0", "babel-eslint": "^7.2.3", "babel-loader": "^6.2.5", "babel-plugin-array-includes": "^2.0.3", "babel-plugin-transform-builtin-extend": "^1.1.2", "babel-plugin-transform-inline-imports-commonjs": "^1.0.0", "babel-plugin-transform-runtime": "^6.4.3", "babel-preset-env": "^1.6.0", "babel-preset-flow": "^6.23.0", "babel-preset-stage-0": "^6.0.0", "babylon": "^6.5.0", "commitizen": "^2.9.6", "cz-conventional-changelog": "^2.0.0", "eslint": "^4.3.0", "eslint-config-fb-strict": "^22.0.0", "eslint-plugin-babel": "^5.0.0", "eslint-plugin-flowtype": "^2.35.0", "eslint-plugin-jasmine": "^2.6.2", "eslint-plugin-jest": "^21.0.0", "eslint-plugin-jsx-a11y": "^6.0.2", "eslint-plugin-prefer-object-spread": "^1.2.1", "eslint-plugin-prettier": "^2.1.2", "eslint-plugin-react": "^7.1.0", "eslint-plugin-relay": "^0.0.24", "eslint-plugin-yarn-internal": "file:scripts/eslint-rules", "execa": "^0.10.0", "flow-bin": "^0.66.0", "git-release-notes": "^3.0.0", "gulp": "^3.9.0", "gulp-babel": "^7.0.0", "gulp-if": "^2.0.1", "gulp-newer": "^1.0.0", "gulp-plumber": "^1.0.1", "gulp-sourcemaps": "^2.2.0", "gulp-util": "^3.0.7", "gulp-watch": "^5.0.0", "jest": "^22.4.4", "jsinspect": "^0.12.6", "minimatch": "^3.0.4", "mock-stdin": "^0.3.0", "prettier": "^1.5.2", "temp": "^0.8.3", "webpack": "^2.1.0-beta.25", "yargs": "^6.3.0" }, "resolutions": { "sshpk": "^1.14.2" }, "engines": { "node": ">=4.0.0" }, "repository": "yarnpkg/yarn", "bin": { "yarn": "./bin/yarn.js", "yarnpkg": "./bin/yarn.js" }, "scripts": { "build": "gulp build", "build-bundle": "node ./scripts/build-webpack.js", "build-chocolatey": "powershell ./scripts/build-chocolatey.ps1", "build-deb": "./scripts/build-deb.sh", "build-dist": "bash ./scripts/build-dist.sh", "build-win-installer": "scripts\\build-windows-installer.bat", "changelog": "git-release-notes $(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^)..$(git describe --tags --abbrev=0) scripts/changelog.md", "dupe-check": "yarn jsinspect ./src", "lint": "eslint . && flow check", "pkg-tests": "yarn --cwd packages/pkg-tests jest yarn.test.js", "prettier": "eslint src __tests__ --fix", "release-branch": "./scripts/release-branch.sh", "test": "yarn lint && yarn test-only", "test-only": "node --max_old_space_size=4096 node_modules/jest/bin/jest.js --verbose", "test-only-debug": "node --inspect-brk --max_old_space_size=4096 node_modules/jest/bin/jest.js --runInBand --verbose", "test-coverage": "node --max_old_space_size=4096 node_modules/jest/bin/jest.js --coverage --verbose", "watch": "gulp watch", "commit": "git-cz" }, "jest": { "collectCoverageFrom": ["src/**/*.js"], "testEnvironment": "node", "modulePathIgnorePatterns": ["__tests__/fixtures/", "packages/pkg-tests/pkg-tests-fixtures", "dist/"], "testPathIgnorePatterns": ["__tests__/(fixtures|__mocks__)/", "updates/", "_(temp|mock|install|init|helpers).js$", "packages/pkg-tests"] }, "config": { "commitizen": { "path": "./node_modules/cz-conventional-changelog" } } }; + }, + , + , + , + , + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.default = stringify; + var _misc; + function _load_misc() { + return _misc = __webpack_require__(12); + } + var _constants; + function _load_constants() { + return _constants = __webpack_require__(6); + } + var _package; + function _load_package() { + return _package = __webpack_require__(145); + } + const NODE_VERSION = process.version; + function shouldWrapKey(str) { + return str.indexOf("true") === 0 || str.indexOf("false") === 0 || /[:\s\n\\",\[\]]/g.test(str) || /^[0-9]/g.test(str) || !/^[a-zA-Z]/g.test(str); + } + function maybeWrap(str) { + if (typeof str === "boolean" || typeof str === "number" || shouldWrapKey(str)) { + return JSON.stringify(str); + } else { + return str; + } + } + const priorities = { + name: 1, + version: 2, + uid: 3, + resolved: 4, + integrity: 5, + registry: 6, + dependencies: 7 + }; + function priorityThenAlphaSort(a, b) { + if (priorities[a] || priorities[b]) { + return (priorities[a] || 100) > (priorities[b] || 100) ? 1 : -1; + } else { + return (0, (_misc || _load_misc()).sortAlpha)(a, b); + } + } + function _stringify(obj, options) { + if (typeof obj !== "object") { + throw new TypeError(); + } + const indent = options.indent; + const lines = []; + const keys = Object.keys(obj).sort(priorityThenAlphaSort); + let addedKeys = []; + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + const val = obj[key]; + if (val == null || addedKeys.indexOf(key) >= 0) { + continue; + } + const valKeys = [key]; + if (typeof val === "object") { + for (let j = i + 1; j < keys.length; j++) { + const key2 = keys[j]; + if (val === obj[key2]) { + valKeys.push(key2); + } + } + } + const keyLine = valKeys.sort((_misc || _load_misc()).sortAlpha).map(maybeWrap).join(", "); + if (typeof val === "string" || typeof val === "boolean" || typeof val === "number") { + lines.push(`${keyLine} ${maybeWrap(val)}`); + } else if (typeof val === "object") { + lines.push(`${keyLine}: +${_stringify(val, { indent: indent + " " })}` + (options.topLevel ? "\n" : "")); + } else { + throw new TypeError(); + } + addedKeys = addedKeys.concat(valKeys); + } + return indent + lines.join(` +${indent}`); + } + function stringify(obj, noHeader, enableVersions) { + const val = _stringify(obj, { + indent: "", + topLevel: true + }); + if (noHeader) { + return val; + } + const lines = []; + lines.push("# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY."); + lines.push(`# yarn lockfile v${(_constants || _load_constants()).LOCKFILE_VERSION}`); + if (enableVersions) { + lines.push(`# yarn v${(_package || _load_package()).version}`); + lines.push(`# node ${NODE_VERSION}`); + } + lines.push("\n"); + lines.push(val); + return lines.join("\n"); + } + }, + , + , + , + , + , + , + , + , + , + , + , + , + , + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.fileDatesEqual = exports3.copyFile = exports3.unlink = void 0; + var _asyncToGenerator2; + function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); + } + let fixTimes = (() => { + var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (fd, dest, data) { + const doOpen = fd === void 0; + let openfd = fd ? fd : -1; + if (disableTimestampCorrection === void 0) { + const destStat = yield lstat(dest); + disableTimestampCorrection = fileDatesEqual(destStat.mtime, data.mtime); + } + if (disableTimestampCorrection) { + return; + } + if (doOpen) { + try { + openfd = yield open(dest, "a", data.mode); + } catch (er) { + try { + openfd = yield open(dest, "r", data.mode); + } catch (err) { + return; + } + } + } + try { + if (openfd) { + yield futimes(openfd, data.atime, data.mtime); + } + } catch (er) { + } finally { + if (doOpen && openfd) { + yield close(openfd); + } + } + }); + return function fixTimes2(_x7, _x8, _x9) { + return _ref3.apply(this, arguments); + }; + })(); + var _fs; + function _load_fs() { + return _fs = _interopRequireDefault(__webpack_require__(3)); + } + var _promise; + function _load_promise() { + return _promise = __webpack_require__(40); + } + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + let disableTimestampCorrection = void 0; + const readFileBuffer = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.readFile); + const close = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.close); + const lstat = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.lstat); + const open = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.open); + const futimes = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.futimes); + const write = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.write); + const unlink = exports3.unlink = (0, (_promise || _load_promise()).promisify)(__webpack_require__(233)); + const copyFile = exports3.copyFile = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data, cleanup) { + try { + yield unlink(data.dest); + yield copyFilePoly(data.src, data.dest, 0, data); + } finally { + if (cleanup) { + cleanup(); + } + } + }); + return function copyFile2(_x, _x2) { + return _ref.apply(this, arguments); + }; + })(); + const copyFilePoly = (src, dest, flags, data) => { + if ((_fs || _load_fs()).default.copyFile) { + return new Promise((resolve, reject) => (_fs || _load_fs()).default.copyFile(src, dest, flags, (err) => { + if (err) { + reject(err); + } else { + fixTimes(void 0, dest, data).then(() => resolve()).catch((ex) => reject(ex)); + } + })); + } else { + return copyWithBuffer(src, dest, flags, data); + } + }; + const copyWithBuffer = (() => { + var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (src, dest, flags, data) { + const fd = yield open(dest, "w", data.mode); + try { + const buffer = yield readFileBuffer(src); + yield write(fd, buffer, 0, buffer.length); + yield fixTimes(fd, dest, data); + } finally { + yield close(fd); + } + }); + return function copyWithBuffer2(_x3, _x4, _x5, _x6) { + return _ref2.apply(this, arguments); + }; + })(); + const fileDatesEqual = exports3.fileDatesEqual = (a, b) => { + const aTime = a.getTime(); + const bTime = b.getTime(); + if (process.platform !== "win32") { + return aTime === bTime; + } + if (Math.abs(aTime - bTime) <= 1) { + return true; + } + const aTimeSec = Math.floor(aTime / 1e3); + const bTimeSec = Math.floor(bTime / 1e3); + if (aTime - aTimeSec * 1e3 === 0 || bTime - bTimeSec * 1e3 === 0) { + return aTimeSec === bTimeSec; + } + return aTime === bTime; + }; + }, + , + , + , + , + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.isFakeRoot = isFakeRoot; + exports3.isRootUser = isRootUser; + function getUid() { + if (process.platform !== "win32" && process.getuid) { + return process.getuid(); + } + return null; + } + exports3.default = isRootUser(getUid()) && !isFakeRoot(); + function isFakeRoot() { + return Boolean(process.env.FAKEROOTKEY); + } + function isRootUser(uid) { + return uid === 0; + } + }, + , + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.getDataDir = getDataDir; + exports3.getCacheDir = getCacheDir; + exports3.getConfigDir = getConfigDir; + const path = __webpack_require__(0); + const userHome = __webpack_require__(45).default; + const FALLBACK_CONFIG_DIR = path.join(userHome, ".config", "yarn"); + const FALLBACK_CACHE_DIR = path.join(userHome, ".cache", "yarn"); + function getDataDir() { + if (process.platform === "win32") { + const WIN32_APPDATA_DIR = getLocalAppDataDir(); + return WIN32_APPDATA_DIR == null ? FALLBACK_CONFIG_DIR : path.join(WIN32_APPDATA_DIR, "Data"); + } else if (process.env.XDG_DATA_HOME) { + return path.join(process.env.XDG_DATA_HOME, "yarn"); + } else { + return FALLBACK_CONFIG_DIR; + } + } + function getCacheDir() { + if (process.platform === "win32") { + return path.join(getLocalAppDataDir() || path.join(userHome, "AppData", "Local", "Yarn"), "Cache"); + } else if (process.env.XDG_CACHE_HOME) { + return path.join(process.env.XDG_CACHE_HOME, "yarn"); + } else if (process.platform === "darwin") { + return path.join(userHome, "Library", "Caches", "Yarn"); + } else { + return FALLBACK_CACHE_DIR; + } + } + function getConfigDir() { + if (process.platform === "win32") { + const WIN32_APPDATA_DIR = getLocalAppDataDir(); + return WIN32_APPDATA_DIR == null ? FALLBACK_CONFIG_DIR : path.join(WIN32_APPDATA_DIR, "Config"); + } else if (process.env.XDG_CONFIG_HOME) { + return path.join(process.env.XDG_CONFIG_HOME, "yarn"); + } else { + return FALLBACK_CONFIG_DIR; + } + } + function getLocalAppDataDir() { + return process.env.LOCALAPPDATA ? path.join(process.env.LOCALAPPDATA, "Yarn") : null; + } + }, + , + function(module3, exports3, __webpack_require__) { + module3.exports = { "default": __webpack_require__(179), __esModule: true }; + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + module3.exports = balanced; + function balanced(a, b, str) { + if (a instanceof RegExp) + a = maybeMatch(a, str); + if (b instanceof RegExp) + b = maybeMatch(b, str); + var r = range(a, b, str); + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; + } + function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; + } + balanced.range = range; + function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + if (ai >= 0 && bi > 0) { + begs = []; + left = str.length; + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [begs.pop(), bi]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + bi = str.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length) { + result = [left, right]; + } + } + return result; + } + }, + function(module3, exports3, __webpack_require__) { + var concatMap = __webpack_require__(178); + var balanced = __webpack_require__(174); + module3.exports = expandTop; + var escSlash = "\0SLASH" + Math.random() + "\0"; + var escOpen = "\0OPEN" + Math.random() + "\0"; + var escClose = "\0CLOSE" + Math.random() + "\0"; + var escComma = "\0COMMA" + Math.random() + "\0"; + var escPeriod = "\0PERIOD" + Math.random() + "\0"; + function numeric(str) { + return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); + } + function escapeBraces(str) { + return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); + } + function unescapeBraces(str) { + return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); + } + function parseCommaParts(str) { + if (!str) + return [""]; + var parts = []; + var m = balanced("{", "}", str); + if (!m) + return str.split(","); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(","); + p[p.length - 1] += "{" + body + "}"; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; + } + function expandTop(str) { + if (!str) + return []; + if (str.substr(0, 2) === "{}") { + str = "\\{\\}" + str.substr(2); + } + return expand(escapeBraces(str), true).map(unescapeBraces); + } + function identity(e) { + return e; + } + function embrace(str) { + return "{" + str + "}"; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + function lte(i, y) { + return i <= y; + } + function gte(i, y) { + return i >= y; + } + function expand(str, isTop) { + var expansions = []; + var m = balanced("{", "}", str); + if (!m || /\$$/.test(m.pre)) + return [str]; + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,.*\}/)) { + str = m.pre + "{" + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length ? expand(m.post, false) : [""]; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + var pre = m.pre; + var post = m.post.length ? expand(m.post, false) : [""]; + var N; + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + N = []; + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") + c = ""; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) + c = "-" + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { + return expand(el, false); + }); + } + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + return expansions; + } + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + function preserveCamelCase(str) { + let isLastCharLower = false; + let isLastCharUpper = false; + let isLastLastCharUpper = false; + for (let i = 0; i < str.length; i++) { + const c = str[i]; + if (isLastCharLower && /[a-zA-Z]/.test(c) && c.toUpperCase() === c) { + str = str.substr(0, i) + "-" + str.substr(i); + isLastCharLower = false; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = true; + i++; + } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(c) && c.toLowerCase() === c) { + str = str.substr(0, i - 1) + "-" + str.substr(i - 1); + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = false; + isLastCharLower = true; + } else { + isLastCharLower = c.toLowerCase() === c; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = c.toUpperCase() === c; + } + } + return str; + } + module3.exports = function(str) { + if (arguments.length > 1) { + str = Array.from(arguments).map((x) => x.trim()).filter((x) => x.length).join("-"); + } else { + str = str.trim(); + } + if (str.length === 0) { + return ""; + } + if (str.length === 1) { + return str.toLowerCase(); + } + if (/^[a-z0-9]+$/.test(str)) { + return str; + } + const hasUpperCase = str !== str.toLowerCase(); + if (hasUpperCase) { + str = preserveCamelCase(str); + } + return str.replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+(\w|$)/g, (m, p1) => p1.toUpperCase()); + }; + }, + , + function(module3, exports3) { + module3.exports = function(xs, fn2) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn2(xs[i], i); + if (isArray(x)) + res.push.apply(res, x); + else + res.push(x); + } + return res; + }; + var isArray = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + }, + function(module3, exports3, __webpack_require__) { + __webpack_require__(205); + __webpack_require__(207); + __webpack_require__(210); + __webpack_require__(206); + __webpack_require__(208); + __webpack_require__(209); + module3.exports = __webpack_require__(23).Promise; + }, + function(module3, exports3) { + module3.exports = function() { + }; + }, + function(module3, exports3) { + module3.exports = function(it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || forbiddenField !== void 0 && forbiddenField in it) { + throw TypeError(name + ": incorrect invocation!"); + } + return it; + }; + }, + function(module3, exports3, __webpack_require__) { + var toIObject = __webpack_require__(74); + var toLength = __webpack_require__(110); + var toAbsoluteIndex = __webpack_require__(200); + module3.exports = function(IS_INCLUDES) { + return function($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + if (IS_INCLUDES && el != el) + while (length > index) { + value = O[index++]; + if (value != value) + return true; + } + else + for (; length > index; index++) + if (IS_INCLUDES || index in O) { + if (O[index] === el) + return IS_INCLUDES || index || 0; + } + return !IS_INCLUDES && -1; + }; + }; + }, + function(module3, exports3, __webpack_require__) { + var ctx = __webpack_require__(48); + var call = __webpack_require__(187); + var isArrayIter = __webpack_require__(186); + var anObject = __webpack_require__(27); + var toLength = __webpack_require__(110); + var getIterFn = __webpack_require__(203); + var BREAK = {}; + var RETURN = {}; + var exports3 = module3.exports = function(iterable, entries, fn2, that, ITERATOR) { + var iterFn = ITERATOR ? function() { + return iterable; + } : getIterFn(iterable); + var f = ctx(fn2, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != "function") + throw TypeError(iterable + " is not iterable!"); + if (isArrayIter(iterFn)) + for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) + return result; + } + else + for (iterator = iterFn.call(iterable); !(step = iterator.next()).done; ) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) + return result; + } + }; + exports3.BREAK = BREAK; + exports3.RETURN = RETURN; + }, + function(module3, exports3, __webpack_require__) { + module3.exports = !__webpack_require__(33) && !__webpack_require__(85)(function() { + return Object.defineProperty(__webpack_require__(68)("div"), "a", { get: function() { + return 7; + } }).a != 7; + }); + }, + function(module3, exports3) { + module3.exports = function(fn2, args2, that) { + var un = that === void 0; + switch (args2.length) { + case 0: + return un ? fn2() : fn2.call(that); + case 1: + return un ? fn2(args2[0]) : fn2.call(that, args2[0]); + case 2: + return un ? fn2(args2[0], args2[1]) : fn2.call(that, args2[0], args2[1]); + case 3: + return un ? fn2(args2[0], args2[1], args2[2]) : fn2.call(that, args2[0], args2[1], args2[2]); + case 4: + return un ? fn2(args2[0], args2[1], args2[2], args2[3]) : fn2.call(that, args2[0], args2[1], args2[2], args2[3]); + } + return fn2.apply(that, args2); + }; + }, + function(module3, exports3, __webpack_require__) { + var Iterators = __webpack_require__(35); + var ITERATOR = __webpack_require__(13)("iterator"); + var ArrayProto = Array.prototype; + module3.exports = function(it) { + return it !== void 0 && (Iterators.Array === it || ArrayProto[ITERATOR] === it); + }; + }, + function(module3, exports3, __webpack_require__) { + var anObject = __webpack_require__(27); + module3.exports = function(iterator, fn2, value, entries) { + try { + return entries ? fn2(anObject(value)[0], value[1]) : fn2(value); + } catch (e) { + var ret = iterator["return"]; + if (ret !== void 0) + anObject(ret.call(iterator)); + throw e; + } + }; + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + var create = __webpack_require__(192); + var descriptor = __webpack_require__(106); + var setToStringTag = __webpack_require__(71); + var IteratorPrototype = {}; + __webpack_require__(31)(IteratorPrototype, __webpack_require__(13)("iterator"), function() { + return this; + }); + module3.exports = function(Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + " Iterator"); + }; + }, + function(module3, exports3, __webpack_require__) { + var ITERATOR = __webpack_require__(13)("iterator"); + var SAFE_CLOSING = false; + try { + var riter = [7][ITERATOR](); + riter["return"] = function() { + SAFE_CLOSING = true; + }; + Array.from(riter, function() { + throw 2; + }); + } catch (e) { + } + module3.exports = function(exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) + return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function() { + return { done: safe = true }; + }; + arr[ITERATOR] = function() { + return iter; + }; + exec(arr); + } catch (e) { + } + return safe; + }; + }, + function(module3, exports3) { + module3.exports = function(done, value) { + return { value, done: !!done }; + }; + }, + function(module3, exports3, __webpack_require__) { + var global2 = __webpack_require__(11); + var macrotask = __webpack_require__(109).set; + var Observer = global2.MutationObserver || global2.WebKitMutationObserver; + var process2 = global2.process; + var Promise2 = global2.Promise; + var isNode = __webpack_require__(47)(process2) == "process"; + module3.exports = function() { + var head, last, notify; + var flush = function() { + var parent, fn2; + if (isNode && (parent = process2.domain)) + parent.exit(); + while (head) { + fn2 = head.fn; + head = head.next; + try { + fn2(); + } catch (e) { + if (head) + notify(); + else + last = void 0; + throw e; + } + } + last = void 0; + if (parent) + parent.enter(); + }; + if (isNode) { + notify = function() { + process2.nextTick(flush); + }; + } else if (Observer && !(global2.navigator && global2.navigator.standalone)) { + var toggle = true; + var node = document.createTextNode(""); + new Observer(flush).observe(node, { characterData: true }); + notify = function() { + node.data = toggle = !toggle; + }; + } else if (Promise2 && Promise2.resolve) { + var promise = Promise2.resolve(void 0); + notify = function() { + promise.then(flush); + }; + } else { + notify = function() { + macrotask.call(global2, flush); + }; + } + return function(fn2) { + var task = { fn: fn2, next: void 0 }; + if (last) + last.next = task; + if (!head) { + head = task; + notify(); + } + last = task; + }; + }; + }, + function(module3, exports3, __webpack_require__) { + var anObject = __webpack_require__(27); + var dPs = __webpack_require__(193); + var enumBugKeys = __webpack_require__(101); + var IE_PROTO = __webpack_require__(72)("IE_PROTO"); + var Empty = function() { + }; + var PROTOTYPE = "prototype"; + var createDict = function() { + var iframe = __webpack_require__(68)("iframe"); + var i = enumBugKeys.length; + var lt = "<"; + var gt = ">"; + var iframeDocument; + iframe.style.display = "none"; + __webpack_require__(102).appendChild(iframe); + iframe.src = "javascript:"; + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + "script" + gt + "document.F=Object" + lt + "/script" + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) + delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); + }; + module3.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + result[IE_PROTO] = O; + } else + result = createDict(); + return Properties === void 0 ? result : dPs(result, Properties); + }; + }, + function(module3, exports3, __webpack_require__) { + var dP = __webpack_require__(50); + var anObject = __webpack_require__(27); + var getKeys = __webpack_require__(132); + module3.exports = __webpack_require__(33) ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) + dP.f(O, P = keys[i++], Properties[P]); + return O; + }; + }, + function(module3, exports3, __webpack_require__) { + var has = __webpack_require__(49); + var toObject = __webpack_require__(133); + var IE_PROTO = __webpack_require__(72)("IE_PROTO"); + var ObjectProto = Object.prototype; + module3.exports = Object.getPrototypeOf || function(O) { + O = toObject(O); + if (has(O, IE_PROTO)) + return O[IE_PROTO]; + if (typeof O.constructor == "function" && O instanceof O.constructor) { + return O.constructor.prototype; + } + return O instanceof Object ? ObjectProto : null; + }; + }, + function(module3, exports3, __webpack_require__) { + var has = __webpack_require__(49); + var toIObject = __webpack_require__(74); + var arrayIndexOf = __webpack_require__(182)(false); + var IE_PROTO = __webpack_require__(72)("IE_PROTO"); + module3.exports = function(object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) + if (key != IE_PROTO) + has(O, key) && result.push(key); + while (names.length > i) + if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; + }, + function(module3, exports3, __webpack_require__) { + var hide = __webpack_require__(31); + module3.exports = function(target, src, safe) { + for (var key in src) { + if (safe && target[key]) + target[key] = src[key]; + else + hide(target, key, src[key]); + } + return target; + }; + }, + function(module3, exports3, __webpack_require__) { + module3.exports = __webpack_require__(31); + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + var global2 = __webpack_require__(11); + var core = __webpack_require__(23); + var dP = __webpack_require__(50); + var DESCRIPTORS = __webpack_require__(33); + var SPECIES = __webpack_require__(13)("species"); + module3.exports = function(KEY) { + var C = typeof core[KEY] == "function" ? core[KEY] : global2[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) + dP.f(C, SPECIES, { + configurable: true, + get: function() { + return this; + } + }); + }; + }, + function(module3, exports3, __webpack_require__) { + var toInteger = __webpack_require__(73); + var defined = __webpack_require__(67); + module3.exports = function(TO_STRING) { + return function(that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) + return TO_STRING ? "" : void 0; + a = s.charCodeAt(i); + return a < 55296 || a > 56319 || i + 1 === l || (b = s.charCodeAt(i + 1)) < 56320 || b > 57343 ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 55296 << 10) + (b - 56320) + 65536; + }; + }; + }, + function(module3, exports3, __webpack_require__) { + var toInteger = __webpack_require__(73); + var max = Math.max; + var min = Math.min; + module3.exports = function(index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }; + }, + function(module3, exports3, __webpack_require__) { + var isObject = __webpack_require__(34); + module3.exports = function(it, S) { + if (!isObject(it)) + return it; + var fn2, val; + if (S && typeof (fn2 = it.toString) == "function" && !isObject(val = fn2.call(it))) + return val; + if (typeof (fn2 = it.valueOf) == "function" && !isObject(val = fn2.call(it))) + return val; + if (!S && typeof (fn2 = it.toString) == "function" && !isObject(val = fn2.call(it))) + return val; + throw TypeError("Can't convert object to primitive value"); + }; + }, + function(module3, exports3, __webpack_require__) { + var global2 = __webpack_require__(11); + var navigator2 = global2.navigator; + module3.exports = navigator2 && navigator2.userAgent || ""; + }, + function(module3, exports3, __webpack_require__) { + var classof = __webpack_require__(100); + var ITERATOR = __webpack_require__(13)("iterator"); + var Iterators = __webpack_require__(35); + module3.exports = __webpack_require__(23).getIteratorMethod = function(it) { + if (it != void 0) + return it[ITERATOR] || it["@@iterator"] || Iterators[classof(it)]; + }; + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + var addToUnscopables = __webpack_require__(180); + var step = __webpack_require__(190); + var Iterators = __webpack_require__(35); + var toIObject = __webpack_require__(74); + module3.exports = __webpack_require__(103)(Array, "Array", function(iterated, kind) { + this._t = toIObject(iterated); + this._i = 0; + this._k = kind; + }, function() { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = void 0; + return step(1); + } + if (kind == "keys") + return step(0, index); + if (kind == "values") + return step(0, O[index]); + return step(0, [index, O[index]]); + }, "values"); + Iterators.Arguments = Iterators.Array; + addToUnscopables("keys"); + addToUnscopables("values"); + addToUnscopables("entries"); + }, + function(module3, exports3) { + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + var LIBRARY = __webpack_require__(69); + var global2 = __webpack_require__(11); + var ctx = __webpack_require__(48); + var classof = __webpack_require__(100); + var $export = __webpack_require__(41); + var isObject = __webpack_require__(34); + var aFunction = __webpack_require__(46); + var anInstance = __webpack_require__(181); + var forOf = __webpack_require__(183); + var speciesConstructor = __webpack_require__(108); + var task = __webpack_require__(109).set; + var microtask = __webpack_require__(191)(); + var newPromiseCapabilityModule = __webpack_require__(70); + var perform = __webpack_require__(104); + var userAgent = __webpack_require__(202); + var promiseResolve = __webpack_require__(105); + var PROMISE = "Promise"; + var TypeError2 = global2.TypeError; + var process2 = global2.process; + var versions = process2 && process2.versions; + var v8 = versions && versions.v8 || ""; + var $Promise = global2[PROMISE]; + var isNode = classof(process2) == "process"; + var empty = function() { + }; + var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; + var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; + var USE_NATIVE = !!function() { + try { + var promise = $Promise.resolve(1); + var FakePromise = (promise.constructor = {})[__webpack_require__(13)("species")] = function(exec) { + exec(empty, empty); + }; + return (isNode || typeof PromiseRejectionEvent == "function") && promise.then(empty) instanceof FakePromise && v8.indexOf("6.6") !== 0 && userAgent.indexOf("Chrome/66") === -1; + } catch (e) { + } + }(); + var isThenable = function(it) { + var then; + return isObject(it) && typeof (then = it.then) == "function" ? then : false; + }; + var notify = function(promise, isReject) { + if (promise._n) + return; + promise._n = true; + var chain = promise._c; + microtask(function() { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function(reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) + onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) + result = value; + else { + if (domain) + domain.enter(); + result = handler(value); + if (domain) { + domain.exit(); + exited = true; + } + } + if (result === reaction.promise) { + reject(TypeError2("Promise-chain cycle")); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else + resolve(result); + } else + reject(value); + } catch (e) { + if (domain && !exited) + domain.exit(); + reject(e); + } + }; + while (chain.length > i) + run(chain[i++]); + promise._c = []; + promise._n = false; + if (isReject && !promise._h) + onUnhandled(promise); + }); + }; + var onUnhandled = function(promise) { + task.call(global2, function() { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console2; + if (unhandled) { + result = perform(function() { + if (isNode) { + process2.emit("unhandledRejection", value, promise); + } else if (handler = global2.onunhandledrejection) { + handler({ promise, reason: value }); + } else if ((console2 = global2.console) && console2.error) { + console2.error("Unhandled promise rejection", value); + } + }); + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } + promise._a = void 0; + if (unhandled && result.e) + throw result.v; + }); + }; + var isUnhandled = function(promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; + }; + var onHandleUnhandled = function(promise) { + task.call(global2, function() { + var handler; + if (isNode) { + process2.emit("rejectionHandled", promise); + } else if (handler = global2.onrejectionhandled) { + handler({ promise, reason: promise._v }); + } + }); + }; + var $reject = function(value) { + var promise = this; + if (promise._d) + return; + promise._d = true; + promise = promise._w || promise; + promise._v = value; + promise._s = 2; + if (!promise._a) + promise._a = promise._c.slice(); + notify(promise, true); + }; + var $resolve = function(value) { + var promise = this; + var then; + if (promise._d) + return; + promise._d = true; + promise = promise._w || promise; + try { + if (promise === value) + throw TypeError2("Promise can't be resolved itself"); + if (then = isThenable(value)) { + microtask(function() { + var wrapper = { _w: promise, _d: false }; + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); + } + }; + if (!USE_NATIVE) { + $Promise = function Promise2(executor) { + anInstance(this, $Promise, PROMISE, "_h"); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + Internal = function Promise2(executor) { + this._c = []; + this._a = void 0; + this._s = 0; + this._d = false; + this._v = void 0; + this._h = 0; + this._n = false; + }; + Internal.prototype = __webpack_require__(196)($Promise.prototype, { + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == "function" ? onFulfilled : true; + reaction.fail = typeof onRejected == "function" && onRejected; + reaction.domain = isNode ? process2.domain : void 0; + this._c.push(reaction); + if (this._a) + this._a.push(reaction); + if (this._s) + notify(this, false); + return reaction.promise; + }, + "catch": function(onRejected) { + return this.then(void 0, onRejected); + } + }); + OwnPromiseCapability = function() { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function(C) { + return C === $Promise || C === Wrapper ? new OwnPromiseCapability(C) : newGenericPromiseCapability(C); + }; + } + $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); + __webpack_require__(71)($Promise, PROMISE); + __webpack_require__(198)(PROMISE); + Wrapper = __webpack_require__(23)[PROMISE]; + $export($export.S + $export.F * !USE_NATIVE, PROMISE, { + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + } + }); + $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + resolve: function resolve(x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + } + }); + $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(189)(function(iter) { + $Promise.all(iter)["catch"](empty); + })), PROMISE, { + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function() { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function(promise) { + var $index = index++; + var alreadyCalled = false; + values.push(void 0); + remaining++; + C.resolve(promise).then(function(value) { + if (alreadyCalled) + return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) + reject(result.v); + return capability.promise; + }, + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function() { + forOf(iterable, false, function(promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) + reject(result.v); + return capability.promise; + } + }); + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + var $at = __webpack_require__(199)(true); + __webpack_require__(103)(String, "String", function(iterated) { + this._t = String(iterated); + this._i = 0; + }, function() { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) + return { value: void 0, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; + }); + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + var $export = __webpack_require__(41); + var core = __webpack_require__(23); + var global2 = __webpack_require__(11); + var speciesConstructor = __webpack_require__(108); + var promiseResolve = __webpack_require__(105); + $export($export.P + $export.R, "Promise", { "finally": function(onFinally) { + var C = speciesConstructor(this, core.Promise || global2.Promise); + var isFunction = typeof onFinally == "function"; + return this.then(isFunction ? function(x) { + return promiseResolve(C, onFinally()).then(function() { + return x; + }); + } : onFinally, isFunction ? function(e) { + return promiseResolve(C, onFinally()).then(function() { + throw e; + }); + } : onFinally); + } }); + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + var $export = __webpack_require__(41); + var newPromiseCapability = __webpack_require__(70); + var perform = __webpack_require__(104); + $export($export.S, "Promise", { "try": function(callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; + } }); + }, + function(module3, exports3, __webpack_require__) { + __webpack_require__(204); + var global2 = __webpack_require__(11); + var hide = __webpack_require__(31); + var Iterators = __webpack_require__(35); + var TO_STRING_TAG = __webpack_require__(13)("toStringTag"); + var DOMIterables = "CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","); + for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global2[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) + hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; + } + }, + function(module3, exports3, __webpack_require__) { + exports3 = module3.exports = __webpack_require__(112); + exports3.log = log2; + exports3.formatArgs = formatArgs; + exports3.save = save; + exports3.load = load; + exports3.useColors = useColors; + exports3.storage = typeof chrome != "undefined" && typeof chrome.storage != "undefined" ? chrome.storage.local : localstorage(); + exports3.colors = [ + "#0000CC", + "#0000FF", + "#0033CC", + "#0033FF", + "#0066CC", + "#0066FF", + "#0099CC", + "#0099FF", + "#00CC00", + "#00CC33", + "#00CC66", + "#00CC99", + "#00CCCC", + "#00CCFF", + "#3300CC", + "#3300FF", + "#3333CC", + "#3333FF", + "#3366CC", + "#3366FF", + "#3399CC", + "#3399FF", + "#33CC00", + "#33CC33", + "#33CC66", + "#33CC99", + "#33CCCC", + "#33CCFF", + "#6600CC", + "#6600FF", + "#6633CC", + "#6633FF", + "#66CC00", + "#66CC33", + "#9900CC", + "#9900FF", + "#9933CC", + "#9933FF", + "#99CC00", + "#99CC33", + "#CC0000", + "#CC0033", + "#CC0066", + "#CC0099", + "#CC00CC", + "#CC00FF", + "#CC3300", + "#CC3333", + "#CC3366", + "#CC3399", + "#CC33CC", + "#CC33FF", + "#CC6600", + "#CC6633", + "#CC9900", + "#CC9933", + "#CCCC00", + "#CCCC33", + "#FF0000", + "#FF0033", + "#FF0066", + "#FF0099", + "#FF00CC", + "#FF00FF", + "#FF3300", + "#FF3333", + "#FF3366", + "#FF3399", + "#FF33CC", + "#FF33FF", + "#FF6600", + "#FF6633", + "#FF9900", + "#FF9933", + "#FFCC00", + "#FFCC33" + ]; + function useColors() { + if (typeof window !== "undefined" && window.process && window.process.type === "renderer") { + return true; + } + if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); + } + exports3.formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (err) { + return "[UnexpectedJSONParseError]: " + err.message; + } + }; + function formatArgs(args2) { + var useColors2 = this.useColors; + args2[0] = (useColors2 ? "%c" : "") + this.namespace + (useColors2 ? " %c" : " ") + args2[0] + (useColors2 ? "%c " : " ") + "+" + exports3.humanize(this.diff); + if (!useColors2) + return; + var c = "color: " + this.color; + args2.splice(1, 0, c, "color: inherit"); + var index = 0; + var lastC = 0; + args2[0].replace(/%[a-zA-Z%]/g, function(match) { + if (match === "%%") + return; + index++; + if (match === "%c") { + lastC = index; + } + }); + args2.splice(lastC, 0, c); + } + function log2() { + return typeof console === "object" && console.log && Function.prototype.apply.call(console.log, console, arguments); + } + function save(namespaces) { + try { + if (namespaces == null) { + exports3.storage.removeItem("debug"); + } else { + exports3.storage.debug = namespaces; + } + } catch (e) { + } + } + function load() { + var r; + try { + r = exports3.storage.debug; + } catch (e) { + } + if (!r && typeof process !== "undefined" && "env" in process) { + r = process.env.DEBUG; + } + return r; + } + exports3.enable(load()); + function localstorage() { + try { + return window.localStorage; + } catch (e) { + } + } + }, + function(module3, exports3, __webpack_require__) { + if (typeof process === "undefined" || process.type === "renderer") { + module3.exports = __webpack_require__(211); + } else { + module3.exports = __webpack_require__(213); + } + }, + function(module3, exports3, __webpack_require__) { + var tty = __webpack_require__(79); + var util = __webpack_require__(2); + exports3 = module3.exports = __webpack_require__(112); + exports3.init = init; + exports3.log = log2; + exports3.formatArgs = formatArgs; + exports3.save = save; + exports3.load = load; + exports3.useColors = useColors; + exports3.colors = [6, 2, 3, 4, 5, 1]; + try { + var supportsColor = __webpack_require__(239); + if (supportsColor && supportsColor.level >= 2) { + exports3.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } + } catch (err) { + } + exports3.inspectOpts = Object.keys(process.env).filter(function(key) { + return /^debug_/i.test(key); + }).reduce(function(obj, key) { + var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_, k) { + return k.toUpperCase(); + }); + var val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) + val = true; + else if (/^(no|off|false|disabled)$/i.test(val)) + val = false; + else if (val === "null") + val = null; + else + val = Number(val); + obj[prop] = val; + return obj; + }, {}); + function useColors() { + return "colors" in exports3.inspectOpts ? Boolean(exports3.inspectOpts.colors) : tty.isatty(process.stderr.fd); + } + exports3.formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts).split("\n").map(function(str) { + return str.trim(); + }).join(" "); + }; + exports3.formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); + }; + function formatArgs(args2) { + var name = this.namespace; + var useColors2 = this.useColors; + if (useColors2) { + var c = this.color; + var colorCode = "[3" + (c < 8 ? c : "8;5;" + c); + var prefix = " " + colorCode + ";1m" + name + " "; + args2[0] = prefix + args2[0].split("\n").join("\n" + prefix); + args2.push(colorCode + "m+" + exports3.humanize(this.diff) + ""); + } else { + args2[0] = getDate() + name + " " + args2[0]; + } + } + function getDate() { + if (exports3.inspectOpts.hideDate) { + return ""; + } else { + return new Date().toISOString() + " "; + } + } + function log2() { + return process.stderr.write(util.format.apply(util, arguments) + "\n"); + } + function save(namespaces) { + if (namespaces == null) { + delete process.env.DEBUG; + } else { + process.env.DEBUG = namespaces; + } + } + function load() { + return process.env.DEBUG; + } + function init(debug) { + debug.inspectOpts = {}; + var keys = Object.keys(exports3.inspectOpts); + for (var i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports3.inspectOpts[keys[i]]; + } + } + exports3.enable(load()); + }, + , + , + , + function(module3, exports3, __webpack_require__) { + var pathModule = __webpack_require__(0); + var isWindows = process.platform === "win32"; + var fs = __webpack_require__(3); + var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); + function rethrow() { + var callback; + if (DEBUG) { + var backtrace = new Error(); + callback = debugCallback; + } else + callback = missingCallback; + return callback; + function debugCallback(err) { + if (err) { + backtrace.message = err.message; + err = backtrace; + missingCallback(err); + } + } + function missingCallback(err) { + if (err) { + if (process.throwDeprecation) + throw err; + else if (!process.noDeprecation) { + var msg = "fs: missing callback " + (err.stack || err.message); + if (process.traceDeprecation) + console.trace(msg); + else + console.error(msg); + } + } + } + } + function maybeCallback(cb) { + return typeof cb === "function" ? cb : rethrow(); + } + var normalize = pathModule.normalize; + if (isWindows) { + var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; + } else { + var nextPartRe = /(.*?)(?:[\/]+|$)/g; + } + if (isWindows) { + var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; + } else { + var splitRootRe = /^[\/]*/; + } + exports3.realpathSync = function realpathSync(p, cache) { + p = pathModule.resolve(p); + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return cache[p]; + } + var original = p, seenLinks = {}, knownHard = {}; + var pos; + var current; + var base; + var previous; + start(); + function start() { + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ""; + if (isWindows && !knownHard[base]) { + fs.lstatSync(base); + knownHard[base] = true; + } + } + while (pos < p.length) { + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + if (knownHard[base] || cache && cache[base] === base) { + continue; + } + var resolvedLink; + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + resolvedLink = cache[base]; + } else { + var stat = fs.lstatSync(base); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) + cache[base] = base; + continue; + } + var linkTarget = null; + if (!isWindows) { + var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + linkTarget = seenLinks[id]; + } + } + if (linkTarget === null) { + fs.statSync(base); + linkTarget = fs.readlinkSync(base); + } + resolvedLink = pathModule.resolve(previous, linkTarget); + if (cache) + cache[base] = resolvedLink; + if (!isWindows) + seenLinks[id] = linkTarget; + } + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + if (cache) + cache[original] = p; + return p; + }; + exports3.realpath = function realpath(p, cache, cb) { + if (typeof cb !== "function") { + cb = maybeCallback(cache); + cache = null; + } + p = pathModule.resolve(p); + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return process.nextTick(cb.bind(null, null, cache[p])); + } + var original = p, seenLinks = {}, knownHard = {}; + var pos; + var current; + var base; + var previous; + start(); + function start() { + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ""; + if (isWindows && !knownHard[base]) { + fs.lstat(base, function(err) { + if (err) + return cb(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); + } + } + function LOOP() { + if (pos >= p.length) { + if (cache) + cache[original] = p; + return cb(null, p); + } + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + if (knownHard[base] || cache && cache[base] === base) { + return process.nextTick(LOOP); + } + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + return gotResolvedLink(cache[base]); + } + return fs.lstat(base, gotStat); + } + function gotStat(err, stat) { + if (err) + return cb(err); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) + cache[base] = base; + return process.nextTick(LOOP); + } + if (!isWindows) { + var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + return gotTarget(null, seenLinks[id], base); + } + } + fs.stat(base, function(err2) { + if (err2) + return cb(err2); + fs.readlink(base, function(err3, target) { + if (!isWindows) + seenLinks[id] = target; + gotTarget(err3, target); + }); + }); + } + function gotTarget(err, target, base2) { + if (err) + return cb(err); + var resolvedLink = pathModule.resolve(previous, target); + if (cache) + cache[base2] = resolvedLink; + gotResolvedLink(resolvedLink); + } + function gotResolvedLink(resolvedLink) { + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + }; + }, + function(module3, exports3, __webpack_require__) { + module3.exports = globSync; + globSync.GlobSync = GlobSync; + var fs = __webpack_require__(3); + var rp = __webpack_require__(114); + var minimatch = __webpack_require__(60); + var Minimatch = minimatch.Minimatch; + var Glob = __webpack_require__(75).Glob; + var util = __webpack_require__(2); + var path = __webpack_require__(0); + var assert = __webpack_require__(22); + var isAbsolute = __webpack_require__(76); + var common = __webpack_require__(115); + var alphasort = common.alphasort; + var alphasorti = common.alphasorti; + var setopts = common.setopts; + var ownProp = common.ownProp; + var childrenIgnored = common.childrenIgnored; + var isIgnored = common.isIgnored; + function globSync(pattern, options) { + if (typeof options === "function" || arguments.length === 3) + throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); + return new GlobSync(pattern, options).found; + } + function GlobSync(pattern, options) { + if (!pattern) + throw new Error("must provide pattern"); + if (typeof options === "function" || arguments.length === 3) + throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options); + setopts(this, pattern, options); + if (this.noprocess) + return this; + var n = this.minimatch.set.length; + this.matches = new Array(n); + for (var i = 0; i < n; i++) { + this._process(this.minimatch.set[i], i, false); + } + this._finish(); + } + GlobSync.prototype._finish = function() { + assert(this instanceof GlobSync); + if (this.realpath) { + var self2 = this; + this.matches.forEach(function(matchset, index) { + var set = self2.matches[index] = Object.create(null); + for (var p in matchset) { + try { + p = self2._makeAbs(p); + var real = rp.realpathSync(p, self2.realpathCache); + set[real] = true; + } catch (er) { + if (er.syscall === "stat") + set[self2._makeAbs(p)] = true; + else + throw er; + } + } + }); + } + common.finish(this); + }; + GlobSync.prototype._process = function(pattern, index, inGlobStar) { + assert(this instanceof GlobSync); + var n = 0; + while (typeof pattern[n] === "string") { + n++; + } + var prefix; + switch (n) { + case pattern.length: + this._processSimple(pattern.join("/"), index); + return; + case 0: + prefix = null; + break; + default: + prefix = pattern.slice(0, n).join("/"); + break; + } + var remain = pattern.slice(n); + var read; + if (prefix === null) + read = "."; + else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { + if (!prefix || !isAbsolute(prefix)) + prefix = "/" + prefix; + read = prefix; + } else + read = prefix; + var abs = this._makeAbs(read); + if (childrenIgnored(this, read)) + return; + var isGlobStar = remain[0] === minimatch.GLOBSTAR; + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar); + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar); + }; + GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar); + if (!entries) + return; + var pn = remain[0]; + var negate = !!this.minimatch.negate; + var rawGlob = pn._glob; + var dotOk = this.dot || rawGlob.charAt(0) === "."; + var matchedEntries = []; + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (e.charAt(0) !== "." || dotOk) { + var m; + if (negate && !prefix) { + m = !e.match(pn); + } else { + m = e.match(pn); + } + if (m) + matchedEntries.push(e); + } + } + var len = matchedEntries.length; + if (len === 0) + return; + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + if (prefix) { + if (prefix.slice(-1) !== "/") + e = prefix + "/" + e; + else + e = prefix + e; + } + if (e.charAt(0) === "/" && !this.nomount) { + e = path.join(this.root, e); + } + this._emitMatch(index, e); + } + return; + } + remain.shift(); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + var newPattern; + if (prefix) + newPattern = [prefix, e]; + else + newPattern = [e]; + this._process(newPattern.concat(remain), index, inGlobStar); + } + }; + GlobSync.prototype._emitMatch = function(index, e) { + if (isIgnored(this, e)) + return; + var abs = this._makeAbs(e); + if (this.mark) + e = this._mark(e); + if (this.absolute) { + e = abs; + } + if (this.matches[index][e]) + return; + if (this.nodir) { + var c = this.cache[abs]; + if (c === "DIR" || Array.isArray(c)) + return; + } + this.matches[index][e] = true; + if (this.stat) + this._stat(e); + }; + GlobSync.prototype._readdirInGlobStar = function(abs) { + if (this.follow) + return this._readdir(abs, false); + var entries; + var lstat; + var stat; + try { + lstat = fs.lstatSync(abs); + } catch (er) { + if (er.code === "ENOENT") { + return null; + } + } + var isSym = lstat && lstat.isSymbolicLink(); + this.symlinks[abs] = isSym; + if (!isSym && lstat && !lstat.isDirectory()) + this.cache[abs] = "FILE"; + else + entries = this._readdir(abs, false); + return entries; + }; + GlobSync.prototype._readdir = function(abs, inGlobStar) { + var entries; + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs); + if (ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (!c || c === "FILE") + return null; + if (Array.isArray(c)) + return c; + } + try { + return this._readdirEntries(abs, fs.readdirSync(abs)); + } catch (er) { + this._readdirError(abs, er); + return null; + } + }; + GlobSync.prototype._readdirEntries = function(abs, entries) { + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (abs === "/") + e = abs + e; + else + e = abs + "/" + e; + this.cache[e] = true; + } + } + this.cache[abs] = entries; + return entries; + }; + GlobSync.prototype._readdirError = function(f, er) { + switch (er.code) { + case "ENOTSUP": + case "ENOTDIR": + var abs = this._makeAbs(f); + this.cache[abs] = "FILE"; + if (abs === this.cwdAbs) { + var error = new Error(er.code + " invalid cwd " + this.cwd); + error.path = this.cwd; + error.code = er.code; + throw error; + } + break; + case "ENOENT": + case "ELOOP": + case "ENAMETOOLONG": + case "UNKNOWN": + this.cache[this._makeAbs(f)] = false; + break; + default: + this.cache[this._makeAbs(f)] = false; + if (this.strict) + throw er; + if (!this.silent) + console.error("glob error", er); + break; + } + }; + GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar); + if (!entries) + return; + var remainWithoutGlobStar = remain.slice(1); + var gspref = prefix ? [prefix] : []; + var noGlobStar = gspref.concat(remainWithoutGlobStar); + this._process(noGlobStar, index, false); + var len = entries.length; + var isSym = this.symlinks[abs]; + if (isSym && inGlobStar) + return; + for (var i = 0; i < len; i++) { + var e = entries[i]; + if (e.charAt(0) === "." && !this.dot) + continue; + var instead = gspref.concat(entries[i], remainWithoutGlobStar); + this._process(instead, index, true); + var below = gspref.concat(entries[i], remain); + this._process(below, index, true); + } + }; + GlobSync.prototype._processSimple = function(prefix, index) { + var exists = this._stat(prefix); + if (!this.matches[index]) + this.matches[index] = Object.create(null); + if (!exists) + return; + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix); + if (prefix.charAt(0) === "/") { + prefix = path.join(this.root, prefix); + } else { + prefix = path.resolve(this.root, prefix); + if (trail) + prefix += "/"; + } + } + if (process.platform === "win32") + prefix = prefix.replace(/\\/g, "/"); + this._emitMatch(index, prefix); + }; + GlobSync.prototype._stat = function(f) { + var abs = this._makeAbs(f); + var needDir = f.slice(-1) === "/"; + if (f.length > this.maxLength) + return false; + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (Array.isArray(c)) + c = "DIR"; + if (!needDir || c === "DIR") + return c; + if (needDir && c === "FILE") + return false; + } + var exists; + var stat = this.statCache[abs]; + if (!stat) { + var lstat; + try { + lstat = fs.lstatSync(abs); + } catch (er) { + if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { + this.statCache[abs] = false; + return false; + } + } + if (lstat && lstat.isSymbolicLink()) { + try { + stat = fs.statSync(abs); + } catch (er) { + stat = lstat; + } + } else { + stat = lstat; + } + } + this.statCache[abs] = stat; + var c = true; + if (stat) + c = stat.isDirectory() ? "DIR" : "FILE"; + this.cache[abs] = this.cache[abs] || c; + if (needDir && c === "FILE") + return false; + return c; + }; + GlobSync.prototype._mark = function(p) { + return common.mark(this, p); + }; + GlobSync.prototype._makeAbs = function(f) { + return common.makeAbs(this, f); + }; + }, + , + , + function(module3, exports3, __webpack_require__) { + "use strict"; + module3.exports = function(flag, argv2) { + argv2 = argv2 || process.argv; + var terminatorPos = argv2.indexOf("--"); + var prefix = /^--/.test(flag) ? "" : "--"; + var pos = argv2.indexOf(prefix + flag); + return pos !== -1 && (terminatorPos !== -1 ? pos < terminatorPos : true); + }; + }, + , + function(module3, exports3, __webpack_require__) { + var wrappy = __webpack_require__(123); + var reqs = Object.create(null); + var once = __webpack_require__(61); + module3.exports = wrappy(inflight); + function inflight(key, cb) { + if (reqs[key]) { + reqs[key].push(cb); + return null; + } else { + reqs[key] = [cb]; + return makeres(key); + } + } + function makeres(key) { + return once(function RES() { + var cbs = reqs[key]; + var len = cbs.length; + var args2 = slice(arguments); + try { + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args2); + } + } finally { + if (cbs.length > len) { + cbs.splice(0, len); + process.nextTick(function() { + RES.apply(null, args2); + }); + } else { + delete reqs[key]; + } + } + }); + } + function slice(args2) { + var length = args2.length; + var array = []; + for (var i = 0; i < length; i++) + array[i] = args2[i]; + return array; + } + }, + function(module3, exports3) { + if (typeof Object.create === "function") { + module3.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; + } else { + module3.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + var TempCtor = function() { + }; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + }; + } + }, + , + , + function(module3, exports3, __webpack_require__) { + module3.exports = typeof __webpack_require__ !== "undefined"; + }, + , + function(module3, exports3) { + var s = 1e3; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var y = d * 365.25; + module3.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === "string" && val.length > 0) { + return parse(val); + } else if (type === "number" && isNaN(val) === false) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val)); + }; + function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || "ms").toLowerCase(); + switch (type) { + case "years": + case "year": + case "yrs": + case "yr": + case "y": + return n * y; + case "days": + case "day": + case "d": + return n * d; + case "hours": + case "hour": + case "hrs": + case "hr": + case "h": + return n * h; + case "minutes": + case "minute": + case "mins": + case "min": + case "m": + return n * m; + case "seconds": + case "second": + case "secs": + case "sec": + case "s": + return n * s; + case "milliseconds": + case "millisecond": + case "msecs": + case "msec": + case "ms": + return n; + default: + return void 0; + } + } + function fmtShort(ms) { + if (ms >= d) { + return Math.round(ms / d) + "d"; + } + if (ms >= h) { + return Math.round(ms / h) + "h"; + } + if (ms >= m) { + return Math.round(ms / m) + "m"; + } + if (ms >= s) { + return Math.round(ms / s) + "s"; + } + return ms + "ms"; + } + function fmtLong(ms) { + return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms, m, "minute") || plural(ms, s, "second") || ms + " ms"; + } + function plural(ms, n, name) { + if (ms < n) { + return; + } + if (ms < n * 1.5) { + return Math.floor(ms / n) + " " + name; + } + return Math.ceil(ms / n) + " " + name + "s"; + } + }, + , + , + , + function(module3, exports3, __webpack_require__) { + module3.exports = rimraf; + rimraf.sync = rimrafSync; + var assert = __webpack_require__(22); + var path = __webpack_require__(0); + var fs = __webpack_require__(3); + var glob = __webpack_require__(75); + var _0666 = parseInt("666", 8); + var defaultGlobOpts = { + nosort: true, + silent: true + }; + var timeout = 0; + var isWindows = process.platform === "win32"; + function defaults(options) { + var methods = [ + "unlink", + "chmod", + "stat", + "lstat", + "rmdir", + "readdir" + ]; + methods.forEach(function(m) { + options[m] = options[m] || fs[m]; + m = m + "Sync"; + options[m] = options[m] || fs[m]; + }); + options.maxBusyTries = options.maxBusyTries || 3; + options.emfileWait = options.emfileWait || 1e3; + if (options.glob === false) { + options.disableGlob = true; + } + options.disableGlob = options.disableGlob || false; + options.glob = options.glob || defaultGlobOpts; + } + function rimraf(p, options, cb) { + if (typeof options === "function") { + cb = options; + options = {}; + } + assert(p, "rimraf: missing path"); + assert.equal(typeof p, "string", "rimraf: path should be a string"); + assert.equal(typeof cb, "function", "rimraf: callback function required"); + assert(options, "rimraf: invalid options argument provided"); + assert.equal(typeof options, "object", "rimraf: options should be object"); + defaults(options); + var busyTries = 0; + var errState = null; + var n = 0; + if (options.disableGlob || !glob.hasMagic(p)) + return afterGlob(null, [p]); + options.lstat(p, function(er, stat) { + if (!er) + return afterGlob(null, [p]); + glob(p, options.glob, afterGlob); + }); + function next(er) { + errState = errState || er; + if (--n === 0) + cb(errState); + } + function afterGlob(er, results) { + if (er) + return cb(er); + n = results.length; + if (n === 0) + return cb(); + results.forEach(function(p2) { + rimraf_(p2, options, function CB(er2) { + if (er2) { + if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) { + busyTries++; + var time = busyTries * 100; + return setTimeout(function() { + rimraf_(p2, options, CB); + }, time); + } + if (er2.code === "EMFILE" && timeout < options.emfileWait) { + return setTimeout(function() { + rimraf_(p2, options, CB); + }, timeout++); + } + if (er2.code === "ENOENT") + er2 = null; + } + timeout = 0; + next(er2); + }); + }); + } + } + function rimraf_(p, options, cb) { + assert(p); + assert(options); + assert(typeof cb === "function"); + options.lstat(p, function(er, st) { + if (er && er.code === "ENOENT") + return cb(null); + if (er && er.code === "EPERM" && isWindows) + fixWinEPERM(p, options, er, cb); + if (st && st.isDirectory()) + return rmdir(p, options, er, cb); + options.unlink(p, function(er2) { + if (er2) { + if (er2.code === "ENOENT") + return cb(null); + if (er2.code === "EPERM") + return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb); + if (er2.code === "EISDIR") + return rmdir(p, options, er2, cb); + } + return cb(er2); + }); + }); + } + function fixWinEPERM(p, options, er, cb) { + assert(p); + assert(options); + assert(typeof cb === "function"); + if (er) + assert(er instanceof Error); + options.chmod(p, _0666, function(er2) { + if (er2) + cb(er2.code === "ENOENT" ? null : er); + else + options.stat(p, function(er3, stats) { + if (er3) + cb(er3.code === "ENOENT" ? null : er); + else if (stats.isDirectory()) + rmdir(p, options, er, cb); + else + options.unlink(p, cb); + }); + }); + } + function fixWinEPERMSync(p, options, er) { + assert(p); + assert(options); + if (er) + assert(er instanceof Error); + try { + options.chmodSync(p, _0666); + } catch (er2) { + if (er2.code === "ENOENT") + return; + else + throw er; + } + try { + var stats = options.statSync(p); + } catch (er3) { + if (er3.code === "ENOENT") + return; + else + throw er; + } + if (stats.isDirectory()) + rmdirSync(p, options, er); + else + options.unlinkSync(p); + } + function rmdir(p, options, originalEr, cb) { + assert(p); + assert(options); + if (originalEr) + assert(originalEr instanceof Error); + assert(typeof cb === "function"); + options.rmdir(p, function(er) { + if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) + rmkids(p, options, cb); + else if (er && er.code === "ENOTDIR") + cb(originalEr); + else + cb(er); + }); + } + function rmkids(p, options, cb) { + assert(p); + assert(options); + assert(typeof cb === "function"); + options.readdir(p, function(er, files) { + if (er) + return cb(er); + var n = files.length; + if (n === 0) + return options.rmdir(p, cb); + var errState; + files.forEach(function(f) { + rimraf(path.join(p, f), options, function(er2) { + if (errState) + return; + if (er2) + return cb(errState = er2); + if (--n === 0) + options.rmdir(p, cb); + }); + }); + }); + } + function rimrafSync(p, options) { + options = options || {}; + defaults(options); + assert(p, "rimraf: missing path"); + assert.equal(typeof p, "string", "rimraf: path should be a string"); + assert(options, "rimraf: missing options"); + assert.equal(typeof options, "object", "rimraf: options should be object"); + var results; + if (options.disableGlob || !glob.hasMagic(p)) { + results = [p]; + } else { + try { + options.lstatSync(p); + results = [p]; + } catch (er) { + results = glob.sync(p, options.glob); + } + } + if (!results.length) + return; + for (var i = 0; i < results.length; i++) { + var p = results[i]; + try { + var st = options.lstatSync(p); + } catch (er) { + if (er.code === "ENOENT") + return; + if (er.code === "EPERM" && isWindows) + fixWinEPERMSync(p, options, er); + } + try { + if (st && st.isDirectory()) + rmdirSync(p, options, null); + else + options.unlinkSync(p); + } catch (er) { + if (er.code === "ENOENT") + return; + if (er.code === "EPERM") + return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er); + if (er.code !== "EISDIR") + throw er; + rmdirSync(p, options, er); + } + } + } + function rmdirSync(p, options, originalEr) { + assert(p); + assert(options); + if (originalEr) + assert(originalEr instanceof Error); + try { + options.rmdirSync(p); + } catch (er) { + if (er.code === "ENOENT") + return; + if (er.code === "ENOTDIR") + throw originalEr; + if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") + rmkidsSync(p, options); + } + } + function rmkidsSync(p, options) { + assert(p); + assert(options); + options.readdirSync(p).forEach(function(f) { + rimrafSync(path.join(p, f), options); + }); + var retries = isWindows ? 100 : 1; + var i = 0; + do { + var threw = true; + try { + var ret = options.rmdirSync(p, options); + threw = false; + return ret; + } finally { + if (++i < retries && threw) + continue; + } + } while (true); + } + }, + , + , + , + , + , + function(module3, exports3, __webpack_require__) { + "use strict"; + var hasFlag = __webpack_require__(221); + var support = function(level) { + if (level === 0) { + return false; + } + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; + }; + var supportLevel = function() { + if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) { + return 0; + } + if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { + return 3; + } + if (hasFlag("color=256")) { + return 2; + } + if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { + return 1; + } + if (process.stdout && !process.stdout.isTTY) { + return 0; + } + if (process.platform === "win32") { + return 1; + } + if ("CI" in process.env) { + if ("TRAVIS" in process.env || process.env.CI === "Travis") { + return 1; + } + return 0; + } + if ("TEAMCITY_VERSION" in process.env) { + return process.env.TEAMCITY_VERSION.match(/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/) === null ? 0 : 1; + } + if (/^(screen|xterm)-256(?:color)?/.test(process.env.TERM)) { + return 2; + } + if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { + return 1; + } + if ("COLORTERM" in process.env) { + return 1; + } + if (process.env.TERM === "dumb") { + return 0; + } + return 0; + }(); + if (supportLevel === 0 && "FORCE_COLOR" in process.env) { + supportLevel = 1; + } + module3.exports = process && support(supportLevel); + } + ]); + } +}); + +// ../plugin-commands-import/lib/import.js +var require_import = __commonJS({ + "../plugin-commands-import/lib/import.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.commandNames = exports2.help = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var constants_1 = require_lib7(); + var error_1 = __importDefault(require_lib8()); + var read_project_manifest_1 = require_lib19(); + var store_connection_manager_1 = require_lib63(); + var graceful_fs_1 = __importDefault(require_lib18()); + var supi_1 = require_lib88(); + var rimraf_1 = __importDefault(require_rimraf()); + var load_json_file_1 = __importDefault(require_load_json_file()); + var render_help_1 = __importDefault(require_lib30()); + var lockfile_1 = require_lockfile(); + var path_exists_1 = __importDefault(require_path_exists()); + exports2.rcOptionsTypes = cliOptionsTypes; + function cliOptionsTypes() { + return {}; + } + exports2.cliOptionsTypes = cliOptionsTypes; + function help() { + return render_help_1.default({ + description: `Generates ${constants_1.WANTED_LOCKFILE} from an npm package-lock.json (or npm-shrinkwrap.json, yarn.lock) file.`, + url: cli_utils_1.docsUrl("import"), + usages: [ + "pnpm import" + ] + }); + } + exports2.help = help; + exports2.commandNames = ["import"]; + async function handler(opts) { + await rimraf_1.default(path_1.default.join(opts.dir, constants_1.WANTED_LOCKFILE)); + const versionsByPackageNames = {}; + let preferredVersions = {}; + if (await path_exists_1.default(path_1.default.join(opts.dir, "yarn.lock"))) { + const yarnPackgeLockFile = await readYarnLockFile(opts.dir); + getAllVersionsFromYarnLockFile(yarnPackgeLockFile, versionsByPackageNames); + } else if (await path_exists_1.default(path_1.default.join(opts.dir, "package-lock.json")) || await path_exists_1.default(path_1.default.join(opts.dir, "npm-shrinkwrap.json"))) { + const npmPackageLock = await readNpmLockfile(opts.dir); + getAllVersionsByPackageNames(npmPackageLock, versionsByPackageNames); + } else { + throw new error_1.default("LOCKFILE_NOT_FOUND", "No lockfile found"); + } + preferredVersions = getPreferredVersions(versionsByPackageNames); + const store = await store_connection_manager_1.createOrConnectStoreController(opts); + const installOpts = { + ...opts, + lockfileOnly: true, + preferredVersions, + storeController: store.ctrl, + storeDir: store.dir + }; + await supi_1.install(await read_project_manifest_1.readProjectManifestOnly(opts.dir), installOpts); + } + exports2.handler = handler; + async function readYarnLockFile(dir) { + try { + const yarnLockFile = await graceful_fs_1.default.readFile(path_1.default.join(dir, "yarn.lock"), "utf8"); + const lockJsonFile = await lockfile_1.parse(yarnLockFile); + if (lockJsonFile.type === "success") { + return lockJsonFile.object; + } else { + throw new error_1.default("GET_YARN_LOCKFILE_ERR", `Failed With ${lockJsonFile.type}`); + } + } catch (err) { + if (err["code"] !== "ENOENT") + throw err; + } + throw new error_1.default("YARN_LOCKFILE_NOT_FOUND", "No yarn.lock found"); + } + async function readNpmLockfile(dir) { + try { + return await load_json_file_1.default(path_1.default.join(dir, "package-lock.json")); + } catch (err) { + if (err["code"] !== "ENOENT") + throw err; + } + try { + return await load_json_file_1.default(path_1.default.join(dir, "npm-shrinkwrap.json")); + } catch (err) { + if (err["code"] !== "ENOENT") + throw err; + } + throw new error_1.default("NPM_LOCKFILE_NOT_FOUND", "No package-lock.json or npm-shrinkwrap.json found"); + } + function getPreferredVersions(versionsByPackageNames) { + const preferredVersions = {}; + for (const packageName of Object.keys(versionsByPackageNames)) { + preferredVersions[packageName] = Array.from(versionsByPackageNames[packageName]).reduce((acc, version) => { + acc[version] = "version"; + return acc; + }, {}); + } + return preferredVersions; + } + function getAllVersionsByPackageNames(npmPackageLock, versionsByPackageNames) { + if (npmPackageLock.dependencies == null) + return; + for (const packageName of Object.keys(npmPackageLock.dependencies)) { + if (!versionsByPackageNames[packageName]) { + versionsByPackageNames[packageName] = new Set(); + } + versionsByPackageNames[packageName].add(npmPackageLock.dependencies[packageName].version); + } + for (const packageName of Object.keys(npmPackageLock.dependencies)) { + getAllVersionsByPackageNames(npmPackageLock.dependencies[packageName], versionsByPackageNames); + } + } + function getAllVersionsFromYarnLockFile(yarnPackageLock, versionsByPackageNames) { + for (const packageName of Object.keys(yarnPackageLock)) { + const pkgName = packageName.substring(0, packageName.lastIndexOf("@")); + if (!versionsByPackageNames[pkgName]) { + versionsByPackageNames[pkgName] = new Set(); + } + versionsByPackageNames[pkgName].add(yarnPackageLock[packageName].version); + } + } + } +}); + +// ../plugin-commands-import/lib/index.js +var require_lib89 = __commonJS({ + "../plugin-commands-import/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.importCommand = void 0; + var importCommand = __importStar2(require_import()); + exports2.importCommand = importCommand; + } +}); + +// ../common-cli-options-help/lib/index.js +var require_lib90 = __commonJS({ + "../common-cli-options-help/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.FILTERING = exports2.UNIVERSAL_OPTIONS = exports2.OPTIONS = void 0; + exports2.OPTIONS = { + globalDir: { + description: "Specify a custom directory to store global packages", + name: "--global-dir" + }, + ignoreScripts: { + description: "Don't run lifecycle scripts", + name: "--ignore-scripts" + }, + offline: { + description: "Trigger an error if any required dependencies are not available in local store", + name: "--offline" + }, + preferOffline: { + description: "Skip staleness checks for cached data, but request missing data from the server", + name: "--prefer-offline" + }, + storeDir: { + description: "The directory in which all the packages are saved on the disk", + name: "--store-dir " + }, + virtualStoreDir: { + description: "The directory with links to the store (default is node_modules/.pnpm). All direct and indirect dependencies of the project are linked into this directory", + name: "--virtual-store-dir " + } + }; + exports2.UNIVERSAL_OPTIONS = [ + { + description: "Controls colors in the output. By default, output is always colored when it goes directly to a terminal", + name: "--[no-]color" + }, + { + description: "Output usage information", + name: "--help", + shortAlias: "-h" + }, + { + description: `Change to directory (default: ${process.cwd()})`, + name: "--dir ", + shortAlias: "-C" + }, + { + description: "Run the command on the root workspace project", + name: "--workspace-root", + shortAlias: "-w" + }, + { + description: 'What level of logs to report. Any logs at or higher than the given level will be shown. Levels (lowest to highest): debug, info, warn, error. Or use "--silent" to turn off all logging.', + name: "--loglevel " + }, + { + description: "Stream output from child processes immediately, prefixed with the originating package directory. This allows output from different packages to be interleaved.", + name: "--stream" + }, + { + description: "Divert all output to stderr", + name: "--use-stderr" + } + ]; + exports2.FILTERING = { + list: [ + { + description: 'Restricts the scope to package names matching the given pattern. E.g.: foo, "@bar/*"', + name: "--filter " + }, + { + description: "Includes all direct and indirect dependencies of the matched packages. E.g.: foo...", + name: "--filter ..." + }, + { + description: "Includes only the direct and indirect dependencies of the matched packages without including the matched packages themselves. ^ must be doubled at the Windows Command Prompt. E.g.: foo^... (foo^^... in Command Prompt)", + name: "--filter ^..." + }, + { + description: 'Includes all direct and indirect dependents of the matched packages. E.g.: ...foo, "...@bar/*"', + name: "--filter ..." + }, + { + description: "Includes only the direct and indirect dependents of the matched packages without including the matched packages themselves. ^ must be doubled at the Windows Command Prompt. E.g.: ...^foo (...^^foo in Command Prompt)", + name: "--filter ...^" + }, + { + description: "Includes all packages that are inside a given subdirectory. E.g.: ./components", + name: "--filter ./" + }, + { + description: "Includes all packages that are under the current working directory", + name: "--filter ." + }, + { + description: 'Includes all projects that are under the specified directory. It may be used with "..." to select dependents/dependencies as well. It also may be combined with "[]". For instance, all changed projects inside a directory: "{packages}[origin/master]"', + name: "--filter {}" + }, + { + description: 'Includes all packages changed since the specified commit/branch. E.g.: "[master]", "[HEAD~2]". It may be used together with "...". So, for instance, "...[HEAD~1]" selects all packages changed in the last commit and their dependents', + name: '--filter "[]"' + }, + { + description: 'If a selector starts with ! (or \\! in zsh), it means the packages matching the selector must be excluded. E.g., "pnpm --filter !foo" selects all packages except "foo"', + name: "--filter !" + }, + { + description: 'Defines files related to tests. Useful with the changed since filter. When selecting only changed packages and their dependent packages, the dependent packages will be ignored in case a package has changes only in tests. Usage example: pnpm --filter="...[origin/master]" --test-pattern="test/*" test', + name: "--test-pattern " + }, + { + description: 'Defines files to ignore when filtering for changed projects since the specified commit/branch. Usage example: pnpm --filter="...[origin/master]" --changed-files-ignore-pattern="**/README.md" build', + name: "--changed-files-ignore-pattern " + }, + { + description: "Restricts the scope to package names matching the given pattern similar to --filter, but it ignores devDependencies when searching for dependencies and dependents.", + name: "--filter-prod " + } + ], + title: "Filtering options (run the command only on packages that satisfy at least one of the selectors)" + }; + } +}); + +// ../plugin-commands-rebuild/lib/implementation/extendRebuildOptions.js +var require_extendRebuildOptions = __commonJS({ + "../plugin-commands-rebuild/lib/implementation/extendRebuildOptions.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var normalize_registries_1 = __importStar2(require_lib65()); + var load_json_file_1 = __importDefault(require_load_json_file()); + var defaults = async (opts) => { + var _a, _b, _c; + const packageManager = (_a = opts.packageManager) !== null && _a !== void 0 ? _a : await load_json_file_1.default(path_1.default.join(__dirname, "../../package.json")); + const dir = (_b = opts.dir) !== null && _b !== void 0 ? _b : process.cwd(); + const lockfileDir = (_c = opts.lockfileDir) !== null && _c !== void 0 ? _c : dir; + return { + childConcurrency: 5, + development: true, + dir, + force: false, + forceSharedLockfile: false, + lockfileDir, + optional: true, + packageManager, + pending: false, + production: true, + rawConfig: {}, + registries: normalize_registries_1.DEFAULT_REGISTRIES, + shamefullyHoist: false, + shellEmulator: false, + sideEffectsCacheRead: false, + storeDir: opts.storeDir, + unsafePerm: process.platform === "win32" || process.platform === "cygwin" || !process.setgid || process.getuid() !== 0, + useLockfile: true, + userAgent: `${packageManager.name}/${packageManager.version} npm/? node/${process.version} ${process.platform} ${process.arch}` + }; + }; + exports2.default = async (opts) => { + if (opts) { + for (const key in opts) { + if (opts[key] === void 0) { + delete opts[key]; + } + } + } + const defaultOpts = await defaults(opts); + const extendedOpts = { ...defaultOpts, ...opts, storeDir: defaultOpts.storeDir }; + extendedOpts.registries = normalize_registries_1.default(extendedOpts.registries); + return extendedOpts; + }; + } +}); + +// ../plugin-commands-rebuild/lib/implementation/index.js +var require_implementation4 = __commonJS({ + "../plugin-commands-rebuild/lib/implementation/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rebuild = exports2.rebuildPkgs = void 0; + var path_1 = __importDefault(require("path")); + var constants_1 = require_lib7(); + var core_loggers_1 = require_lib12(); + var get_context_1 = __importDefault(require_lib67()); + var lifecycle_1 = require_lib80(); + var link_bins_1 = __importDefault(require_lib70()); + var lockfile_utils_1 = require_lib53(); + var lockfile_walker_1 = __importDefault(require_lib54()); + var logger_1 = __importStar2(require_lib6()); + var modules_yaml_1 = require_lib64(); + var dp = __importStar2(require_lib33()); + var run_groups_1 = __importDefault(require_lib79()); + var npm_package_arg_1 = __importDefault(require_npa()); + var graph_sequencer_1 = __importDefault(require_graph_sequencer()); + var p_limit_1 = __importDefault(require_p_limit()); + var semver_1 = __importDefault(require_semver2()); + var extendRebuildOptions_1 = __importDefault(require_extendRebuildOptions()); + function findPackages(packages, searched, opts) { + return Object.keys(packages).filter((relativeDepPath) => { + const pkgLockfile = packages[relativeDepPath]; + const pkgInfo = lockfile_utils_1.nameVerFromPkgSnapshot(relativeDepPath, pkgLockfile); + if (!pkgInfo.name) { + logger_1.default.warn({ + message: `Skipping ${relativeDepPath} because cannot get the package name from ${constants_1.WANTED_LOCKFILE}. + Try to run run \`pnpm update --depth 100\` to create a new ${constants_1.WANTED_LOCKFILE} with all the necessary info.`, + prefix: opts.prefix + }); + return false; + } + return matches(searched, pkgInfo); + }); + } + function matches(searched, manifest) { + return searched.some((searchedPkg) => { + if (typeof searchedPkg === "string") { + return manifest.name === searchedPkg; + } + return searchedPkg.name === manifest.name && !!manifest.version && semver_1.default.satisfies(manifest.version, searchedPkg.range); + }); + } + async function rebuildPkgs(projects, pkgSpecs, maybeOpts) { + const reporter = maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.reporter; + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.on("data", reporter); + } + const opts = await extendRebuildOptions_1.default(maybeOpts); + const ctx = await get_context_1.default(projects, opts); + if (!ctx.currentLockfile || ctx.currentLockfile.packages == null) + return; + const packages = ctx.currentLockfile.packages; + const searched = pkgSpecs.map((arg) => { + const { fetchSpec, name, raw, type } = npm_package_arg_1.default(arg); + if (raw === name) { + return name; + } + if (type !== "version" && type !== "range") { + throw new Error(`Invalid argument - ${arg}. Rebuild can only select by version or range`); + } + return { + name, + range: fetchSpec + }; + }); + let pkgs = []; + for (const { rootDir } of projects) { + pkgs = [ + ...pkgs, + ...findPackages(packages, searched, { prefix: rootDir }) + ]; + } + await _rebuild({ + pkgsToRebuild: new Set(pkgs), + ...ctx + }, opts); + } + exports2.rebuildPkgs = rebuildPkgs; + async function rebuild(projects, maybeOpts) { + var _a; + const reporter = maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.reporter; + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.on("data", reporter); + } + const opts = await extendRebuildOptions_1.default(maybeOpts); + const ctx = await get_context_1.default(projects, opts); + let idsToRebuild = []; + if (opts.pending) { + idsToRebuild = ctx.pendingBuilds; + } else if (((_a = ctx.currentLockfile) === null || _a === void 0 ? void 0 : _a.packages) != null) { + idsToRebuild = Object.keys(ctx.currentLockfile.packages); + } + const pkgsThatWereRebuilt = await _rebuild({ + pkgsToRebuild: new Set(idsToRebuild), + ...ctx + }, opts); + ctx.pendingBuilds = ctx.pendingBuilds.filter((depPath) => !pkgsThatWereRebuilt.has(depPath)); + const scriptsOpts = { + extraBinPaths: ctx.extraBinPaths, + rawConfig: opts.rawConfig, + scriptShell: opts.scriptShell, + shellEmulator: opts.shellEmulator, + unsafePerm: opts.unsafePerm || false + }; + await lifecycle_1.runLifecycleHooksConcurrently(["preinstall", "install", "postinstall", "prepublish", "prepare"], ctx.projects, opts.childConcurrency || 5, scriptsOpts); + for (const { id, manifest } of ctx.projects) { + if ((manifest === null || manifest === void 0 ? void 0 : manifest.scripts) != null && (!opts.pending || ctx.pendingBuilds.includes(id))) { + ctx.pendingBuilds.splice(ctx.pendingBuilds.indexOf(id), 1); + } + } + await modules_yaml_1.write(ctx.rootModulesDir, { + prunedAt: new Date().toUTCString(), + ...ctx.modulesFile, + hoistedDependencies: ctx.hoistedDependencies, + hoistPattern: ctx.hoistPattern, + included: ctx.include, + layoutVersion: constants_1.LAYOUT_VERSION, + packageManager: `${opts.packageManager.name}@${opts.packageManager.version}`, + pendingBuilds: ctx.pendingBuilds, + publicHoistPattern: ctx.publicHoistPattern, + registries: ctx.registries, + skipped: Array.from(ctx.skipped), + storeDir: ctx.storeDir, + virtualStoreDir: ctx.virtualStoreDir + }); + } + exports2.rebuild = rebuild; + function getSubgraphToBuild(step, nodesToBuildAndTransitive, opts) { + let currentShouldBeBuilt = false; + for (const { depPath, next } of step.dependencies) { + if (nodesToBuildAndTransitive.has(depPath)) { + currentShouldBeBuilt = true; + } + const childShouldBeBuilt = getSubgraphToBuild(next(), nodesToBuildAndTransitive, opts) || opts.pkgsToRebuild.has(depPath); + if (childShouldBeBuilt) { + nodesToBuildAndTransitive.add(depPath); + currentShouldBeBuilt = true; + } + } + for (const depPath of step.missing) { + logger_1.default.debug({ message: `No entry for "${depPath}" in ${constants_1.WANTED_LOCKFILE}` }); + } + return currentShouldBeBuilt; + } + var limitLinking = p_limit_1.default(16); + async function _rebuild(ctx, opts) { + var _a; + const pkgsThatWereRebuilt = new Set(); + const graph = new Map(); + const pkgSnapshots = (_a = ctx.currentLockfile.packages) !== null && _a !== void 0 ? _a : {}; + const nodesToBuildAndTransitive = new Set(); + getSubgraphToBuild(lockfile_walker_1.default(ctx.currentLockfile, ctx.projects.map(({ id }) => id), { + include: { + dependencies: opts.production, + devDependencies: opts.development, + optionalDependencies: opts.optional + } + }).step, nodesToBuildAndTransitive, { pkgsToRebuild: ctx.pkgsToRebuild }); + const nodesToBuildAndTransitiveArray = Array.from(nodesToBuildAndTransitive); + for (const depPath of nodesToBuildAndTransitiveArray) { + const pkgSnapshot = pkgSnapshots[depPath]; + graph.set(depPath, Object.entries({ ...pkgSnapshot.dependencies, ...pkgSnapshot.optionalDependencies }).map(([pkgName, reference]) => dp.refToRelative(reference, pkgName)).filter((childRelDepPath) => childRelDepPath && nodesToBuildAndTransitive.has(childRelDepPath))); + } + const graphSequencerResult = graph_sequencer_1.default({ + graph, + groups: [nodesToBuildAndTransitiveArray] + }); + const chunks = graphSequencerResult.chunks; + const warn = (message2) => logger_1.default.info({ message: message2, prefix: opts.dir }); + const groups = chunks.map((chunk) => chunk.filter((depPath) => ctx.pkgsToRebuild.has(depPath)).map((depPath) => async () => { + var _a2; + const pkgSnapshot = pkgSnapshots[depPath]; + const pkgInfo = lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot); + const pkgRoot = path_1.default.join(ctx.virtualStoreDir, dp.depPathToFilename(depPath, opts.lockfileDir), "node_modules", pkgInfo.name); + try { + const modules = path_1.default.join(ctx.virtualStoreDir, dp.depPathToFilename(depPath, opts.lockfileDir), "node_modules"); + const binPath = path_1.default.join(pkgRoot, "node_modules", ".bin"); + await link_bins_1.default(modules, binPath, { warn }); + await lifecycle_1.runPostinstallHooks({ + depPath, + extraBinPaths: ctx.extraBinPaths, + optional: pkgSnapshot.optional === true, + pkgRoot, + rawConfig: opts.rawConfig, + rootModulesDir: ctx.rootModulesDir, + shellEmulator: opts.shellEmulator, + unsafePerm: opts.unsafePerm || false + }); + pkgsThatWereRebuilt.add(depPath); + } catch (err) { + if (pkgSnapshot.optional) { + core_loggers_1.skippedOptionalDependencyLogger.debug({ + details: err.toString(), + package: { + id: (_a2 = pkgSnapshot.id) !== null && _a2 !== void 0 ? _a2 : depPath, + name: pkgInfo.name, + version: pkgInfo.version + }, + prefix: opts.dir, + reason: "build_failure" + }); + return; + } + throw err; + } + })); + await run_groups_1.default(opts.childConcurrency || 5, groups); + await Promise.all(Object.keys(pkgSnapshots).filter((depPath) => !lockfile_utils_1.packageIsIndependent(pkgSnapshots[depPath])).map(async (depPath) => limitLinking(async () => { + const pkgSnapshot = pkgSnapshots[depPath]; + const pkgInfo = lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot); + const modules = path_1.default.join(ctx.virtualStoreDir, dp.depPathToFilename(depPath, opts.lockfileDir), "node_modules"); + const binPath = path_1.default.join(modules, pkgInfo.name, "node_modules", ".bin"); + return link_bins_1.default(modules, binPath, { warn }); + }))); + await Promise.all(ctx.projects.map(async ({ rootDir }) => limitLinking(async () => { + const modules = path_1.default.join(rootDir, "node_modules"); + const binPath = path_1.default.join(modules, ".bin"); + return link_bins_1.default(modules, binPath, { + allowExoticManifests: true, + warn + }); + }))); + return pkgsThatWereRebuilt; + } + } +}); + +// ../pnpmfile/lib/requirePnpmfile.js +var require_requirePnpmfile = __commonJS({ + "../pnpmfile/lib/requirePnpmfile.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BadReadPackageHookError = void 0; + var fs_1 = __importDefault(require("fs")); + var error_1 = __importDefault(require_lib8()); + var logger_1 = __importDefault(require_lib6()); + var chalk_1 = __importDefault(require_source()); + var BadReadPackageHookError = class extends error_1.default { + constructor(pnpmfile, message2) { + super("BAD_READ_PACKAGE_HOOK_RESULT", `${message2} Hook imported via ${pnpmfile}`); + this.pnpmfile = pnpmfile; + } + }; + exports2.BadReadPackageHookError = BadReadPackageHookError; + var PnpmFileFailError = class extends error_1.default { + constructor(pnpmfile, originalError) { + super("PNPMFILE_FAIL", `Error during pnpmfile execution. pnpmfile: "${pnpmfile}". Error: "${originalError.message}".`); + this.pnpmfile = pnpmfile; + this.originalError = originalError; + } + }; + exports2.default = (pnpmFilePath, prefix) => { + var _a, _b; + try { + const pnpmfile = require(pnpmFilePath); + logger_1.default.info({ + message: `Using hooks from: ${pnpmFilePath}`, + prefix + }); + if (typeof pnpmfile === "undefined") { + logger_1.default.warn({ + message: `Ignoring the pnpmfile at "${pnpmFilePath}". It exports "undefined".`, + prefix + }); + return void 0; + } + if (((_a = pnpmfile === null || pnpmfile === void 0 ? void 0 : pnpmfile.hooks) === null || _a === void 0 ? void 0 : _a.readPackage) && typeof pnpmfile.hooks.readPackage !== "function") { + throw new TypeError("hooks.readPackage should be a function"); + } + if ((_b = pnpmfile === null || pnpmfile === void 0 ? void 0 : pnpmfile.hooks) === null || _b === void 0 ? void 0 : _b.readPackage) { + const readPackage = pnpmfile.hooks.readPackage; + pnpmfile.hooks.readPackage = function(pkg, ...args2) { + var _a2, _b2, _c, _d; + pkg.dependencies = (_a2 = pkg.dependencies) !== null && _a2 !== void 0 ? _a2 : {}; + pkg.devDependencies = (_b2 = pkg.devDependencies) !== null && _b2 !== void 0 ? _b2 : {}; + pkg.optionalDependencies = (_c = pkg.optionalDependencies) !== null && _c !== void 0 ? _c : {}; + pkg.peerDependencies = (_d = pkg.peerDependencies) !== null && _d !== void 0 ? _d : {}; + const newPkg = readPackage(pkg, ...args2); + if (!newPkg) { + throw new BadReadPackageHookError(pnpmFilePath, "readPackage hook did not return a package manifest object."); + } + const dependencies = ["dependencies", "optionalDependencies", "peerDependencies"]; + for (const dep of dependencies) { + if (newPkg[dep] && typeof newPkg[dep] !== "object") { + throw new BadReadPackageHookError(pnpmFilePath, `readPackage hook returned package manifest object's property '${dep}' must be an object.`); + } + } + return newPkg; + }; + } + pnpmfile.filename = pnpmFilePath; + return pnpmfile; + } catch (err) { + if (err instanceof SyntaxError) { + console.error(chalk_1.default.red("A syntax error in the .pnpmfile.cjs\n")); + console.error(err); + process.exit(1); + } + if (err.code !== "MODULE_NOT_FOUND" || pnpmFileExistsSync(pnpmFilePath)) { + throw new PnpmFileFailError(pnpmFilePath, err); + } + return void 0; + } + }; + function pnpmFileExistsSync(pnpmFilePath) { + const pnpmFileRealName = pnpmFilePath.endsWith(".cjs") ? pnpmFilePath : `${pnpmFilePath}.cjs`; + return fs_1.default.existsSync(pnpmFileRealName); + } + } +}); + +// ../pnpmfile/lib/requireHooks.js +var require_requireHooks = __commonJS({ + "../pnpmfile/lib/requireHooks.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var core_loggers_1 = require_lib12(); + var logger_1 = __importDefault(require_lib6()); + var path_absolute_1 = __importDefault(require_path_absolute()); + var requirePnpmfile_1 = __importDefault(require_requirePnpmfile()); + function requireHooks(prefix, opts) { + const globalPnpmfile = opts.globalPnpmfile && requirePnpmfile_1.default(path_absolute_1.default(opts.globalPnpmfile, prefix), prefix); + let globalHooks = globalPnpmfile === null || globalPnpmfile === void 0 ? void 0 : globalPnpmfile.hooks; + const pnpmFile = opts.pnpmfile && requirePnpmfile_1.default(path_absolute_1.default(opts.pnpmfile, prefix), prefix) || requirePnpmfile_1.default(path_1.default.join(prefix, ".pnpmfile.cjs"), prefix); + let hooks = pnpmFile === null || pnpmFile === void 0 ? void 0 : pnpmFile.hooks; + if (!globalHooks && !hooks) + return {}; + globalHooks = globalHooks || {}; + hooks = hooks || {}; + const cookedHooks = {}; + if (globalHooks.readPackage || hooks.readPackage) { + logger_1.default.info({ + message: "readPackage hook is declared. Manifests of dependencies might get overridden", + prefix + }); + } + for (const hookName of ["readPackage", "afterAllResolved"]) { + if (globalHooks[hookName] && hooks[hookName]) { + const globalHookContext = createReadPackageHookContext(globalPnpmfile.filename, prefix, hookName); + const localHookContext = createReadPackageHookContext(pnpmFile.filename, prefix, hookName); + cookedHooks[hookName] = (arg) => { + return hooks[hookName](globalHooks[hookName](arg, globalHookContext), localHookContext); + }; + } else if (globalHooks[hookName]) { + const globalHook = globalHooks[hookName]; + const context = createReadPackageHookContext(globalPnpmfile.filename, prefix, hookName); + cookedHooks[hookName] = (pkg) => globalHook(pkg, context); + } else if (hooks[hookName]) { + const hook = hooks[hookName]; + const context = createReadPackageHookContext(pnpmFile.filename, prefix, hookName); + cookedHooks[hookName] = (pkg) => hook(pkg, context); + } + } + return cookedHooks; + } + exports2.default = requireHooks; + function createReadPackageHookContext(calledFrom, prefix, hook) { + return { + log: (message2) => core_loggers_1.hookLogger.debug({ + from: calledFrom, + hook, + message: message2, + prefix + }) + }; + } + } +}); + +// ../pnpmfile/lib/index.js +var require_lib91 = __commonJS({ + "../pnpmfile/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BadReadPackageHookError = exports2.requirePnpmfile = exports2.requireHooks = void 0; + var requireHooks_1 = __importDefault(require_requireHooks()); + exports2.requireHooks = requireHooks_1.default; + var requirePnpmfile_1 = __importStar2(require_requirePnpmfile()); + exports2.requirePnpmfile = requirePnpmfile_1.default; + Object.defineProperty(exports2, "BadReadPackageHookError", { enumerable: true, get: function() { + return requirePnpmfile_1.BadReadPackageHookError; + } }); + } +}); + +// ../sort-packages/lib/index.js +var require_lib92 = __commonJS({ + "../sort-packages/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sequenceGraph = void 0; + var graph_sequencer_1 = __importDefault(require_graph_sequencer()); + function sequenceGraph(pkgGraph) { + const keys = Object.keys(pkgGraph); + const setOfKeys = new Set(keys); + const graph = new Map(keys.map((pkgPath) => [ + pkgPath, + pkgGraph[pkgPath].dependencies.filter((d) => d !== pkgPath && setOfKeys.has(d)) + ])); + return graph_sequencer_1.default({ + graph, + groups: [keys] + }); + } + exports2.sequenceGraph = sequenceGraph; + function sortPackages(pkgGraph) { + const graphSequencerResult = sequenceGraph(pkgGraph); + return graphSequencerResult.chunks; + } + exports2.default = sortPackages; + } +}); + +// ../plugin-commands-installation/lib/getPinnedVersion.js +var require_getPinnedVersion = __commonJS({ + "../plugin-commands-installation/lib/getPinnedVersion.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function getPinnedVersion(opts) { + if (opts.saveExact === true || opts.savePrefix === "") + return "patch"; + return opts.savePrefix === "~" ? "minor" : "major"; + } + exports2.default = getPinnedVersion; + } +}); + +// ../plugin-commands-installation/lib/getSaveType.js +var require_getSaveType = __commonJS({ + "../plugin-commands-installation/lib/getSaveType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function getSaveType(opts) { + if (opts.saveDev === true || opts.savePeer) + return "devDependencies"; + if (opts.saveOptional) + return "optionalDependencies"; + if (opts.saveProd) + return "dependencies"; + return void 0; + } + exports2.default = getSaveType; + } +}); + +// ../../node_modules/.pnpm/map-obj@4.3.0/node_modules/map-obj/index.js +var require_map_obj = __commonJS({ + "../../node_modules/.pnpm/map-obj@4.3.0/node_modules/map-obj/index.js"(exports2, module2) { + "use strict"; + var isObject = (value) => typeof value === "object" && value !== null; + var mapObjectSkip = Symbol("skip"); + var isObjectCustom = (value) => isObject(value) && !(value instanceof RegExp) && !(value instanceof Error) && !(value instanceof Date); + var mapObject = (object, mapper, options, isSeen = new WeakMap()) => { + options = { + deep: false, + target: {}, + ...options + }; + if (isSeen.has(object)) { + return isSeen.get(object); + } + isSeen.set(object, options.target); + const { target } = options; + delete options.target; + const mapArray = (array) => array.map((element) => isObjectCustom(element) ? mapObject(element, mapper, options, isSeen) : element); + if (Array.isArray(object)) { + return mapArray(object); + } + for (const [key, value] of Object.entries(object)) { + const mapResult = mapper(key, value, object); + if (mapResult === mapObjectSkip) { + continue; + } + let [newKey, newValue, { shouldRecurse = true } = {}] = mapResult; + if (newKey === "__proto__") { + continue; + } + if (options.deep && shouldRecurse && isObjectCustom(newValue)) { + newValue = Array.isArray(newValue) ? mapArray(newValue) : mapObject(newValue, mapper, options, isSeen); + } + target[newKey] = newValue; + } + return target; + }; + module2.exports = (object, mapper, options) => { + if (!isObject(object)) { + throw new TypeError(`Expected an object, got \`${object}\` (${typeof object})`); + } + return mapObject(object, mapper, options); + }; + module2.exports.mapObjectSkip = mapObjectSkip; + } +}); + +// ../../node_modules/.pnpm/camelcase@5.3.1/node_modules/camelcase/index.js +var require_camelcase2 = __commonJS({ + "../../node_modules/.pnpm/camelcase@5.3.1/node_modules/camelcase/index.js"(exports2, module2) { + "use strict"; + var preserveCamelCase = (string) => { + let isLastCharLower = false; + let isLastCharUpper = false; + let isLastLastCharUpper = false; + for (let i = 0; i < string.length; i++) { + const character = string[i]; + if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) { + string = string.slice(0, i) + "-" + string.slice(i); + isLastCharLower = false; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = true; + i++; + } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) { + string = string.slice(0, i - 1) + "-" + string.slice(i - 1); + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = false; + isLastCharLower = true; + } else { + isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character; + } + } + return string; + }; + var camelCase = (input, options) => { + if (!(typeof input === "string" || Array.isArray(input))) { + throw new TypeError("Expected the input to be `string | string[]`"); + } + options = Object.assign({ + pascalCase: false + }, options); + const postProcess = (x) => options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x; + if (Array.isArray(input)) { + input = input.map((x) => x.trim()).filter((x) => x.length).join("-"); + } else { + input = input.trim(); + } + if (input.length === 0) { + return ""; + } + if (input.length === 1) { + return options.pascalCase ? input.toUpperCase() : input.toLowerCase(); + } + const hasUpperCase = input !== input.toLowerCase(); + if (hasUpperCase) { + input = preserveCamelCase(input); + } + input = input.replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+(\w|$)/g, (_, p1) => p1.toUpperCase()).replace(/\d+(\w|$)/g, (m) => m.toUpperCase()); + return postProcess(input); + }; + module2.exports = camelCase; + module2.exports.default = camelCase; + } +}); + +// ../../node_modules/.pnpm/quick-lru@4.0.1/node_modules/quick-lru/index.js +var require_quick_lru = __commonJS({ + "../../node_modules/.pnpm/quick-lru@4.0.1/node_modules/quick-lru/index.js"(exports2, module2) { + "use strict"; + var QuickLRU = class { + constructor(options = {}) { + if (!(options.maxSize && options.maxSize > 0)) { + throw new TypeError("`maxSize` must be a number greater than 0"); + } + this.maxSize = options.maxSize; + this.cache = new Map(); + this.oldCache = new Map(); + this._size = 0; + } + _set(key, value) { + this.cache.set(key, value); + this._size++; + if (this._size >= this.maxSize) { + this._size = 0; + this.oldCache = this.cache; + this.cache = new Map(); + } + } + get(key) { + if (this.cache.has(key)) { + return this.cache.get(key); + } + if (this.oldCache.has(key)) { + const value = this.oldCache.get(key); + this.oldCache.delete(key); + this._set(key, value); + return value; + } + } + set(key, value) { + if (this.cache.has(key)) { + this.cache.set(key, value); + } else { + this._set(key, value); + } + return this; + } + has(key) { + return this.cache.has(key) || this.oldCache.has(key); + } + peek(key) { + if (this.cache.has(key)) { + return this.cache.get(key); + } + if (this.oldCache.has(key)) { + return this.oldCache.get(key); + } + } + delete(key) { + const deleted = this.cache.delete(key); + if (deleted) { + this._size--; + } + return this.oldCache.delete(key) || deleted; + } + clear() { + this.cache.clear(); + this.oldCache.clear(); + this._size = 0; + } + *keys() { + for (const [key] of this) { + yield key; + } + } + *values() { + for (const [, value] of this) { + yield value; + } + } + *[Symbol.iterator]() { + for (const item of this.cache) { + yield item; + } + for (const item of this.oldCache) { + const [key] = item; + if (!this.cache.has(key)) { + yield item; + } + } + } + get size() { + let oldCacheSize = 0; + for (const key of this.oldCache.keys()) { + if (!this.cache.has(key)) { + oldCacheSize++; + } + } + return this._size + oldCacheSize; + } + }; + module2.exports = QuickLRU; + } +}); + +// ../../node_modules/.pnpm/camelcase-keys@6.2.2/node_modules/camelcase-keys/index.js +var require_camelcase_keys = __commonJS({ + "../../node_modules/.pnpm/camelcase-keys@6.2.2/node_modules/camelcase-keys/index.js"(exports2, module2) { + "use strict"; + var mapObj = require_map_obj(); + var camelCase = require_camelcase2(); + var QuickLru = require_quick_lru(); + var has = (array, key) => array.some((x) => { + if (typeof x === "string") { + return x === key; + } + x.lastIndex = 0; + return x.test(key); + }); + var cache = new QuickLru({ maxSize: 1e5 }); + var isObject = (value) => typeof value === "object" && value !== null && !(value instanceof RegExp) && !(value instanceof Error) && !(value instanceof Date); + var camelCaseConvert = (input, options) => { + if (!isObject(input)) { + return input; + } + options = { + deep: false, + pascalCase: false, + ...options + }; + const { exclude, pascalCase, stopPaths, deep } = options; + const stopPathsSet = new Set(stopPaths); + const makeMapper = (parentPath) => (key, value) => { + if (deep && isObject(value)) { + const path = parentPath === void 0 ? key : `${parentPath}.${key}`; + if (!stopPathsSet.has(path)) { + value = mapObj(value, makeMapper(path)); + } + } + if (!(exclude && has(exclude, key))) { + const cacheKey = pascalCase ? `${key}_` : key; + if (cache.has(cacheKey)) { + key = cache.get(cacheKey); + } else { + const ret = camelCase(key, { pascalCase }); + if (key.length < 100) { + cache.set(cacheKey, ret); + } + key = ret; + } + } + return [key, value]; + }; + return mapObj(input, makeMapper(void 0)); + }; + module2.exports = (input, options) => { + if (Array.isArray(input)) { + return Object.keys(input).map((key) => camelCaseConvert(input[key], options)); + } + return camelCaseConvert(input, options); + }; + } +}); + +// ../../node_modules/.pnpm/ini@2.0.0/node_modules/ini/ini.js +var require_ini2 = __commonJS({ + "../../node_modules/.pnpm/ini@2.0.0/node_modules/ini/ini.js"(exports2, module2) { + var { hasOwnProperty } = Object.prototype; + var eol = typeof process !== "undefined" && process.platform === "win32" ? "\r\n" : "\n"; + var encode = (obj, opt) => { + const children = []; + let out = ""; + if (typeof opt === "string") { + opt = { + section: opt, + whitespace: false + }; + } else { + opt = opt || Object.create(null); + opt.whitespace = opt.whitespace === true; + } + const separator = opt.whitespace ? " = " : "="; + for (const k of Object.keys(obj)) { + const val = obj[k]; + if (val && Array.isArray(val)) { + for (const item of val) + out += safe(k + "[]") + separator + safe(item) + "\n"; + } else if (val && typeof val === "object") + children.push(k); + else + out += safe(k) + separator + safe(val) + eol; + } + if (opt.section && out.length) + out = "[" + safe(opt.section) + "]" + eol + out; + for (const k of children) { + const nk = dotSplit(k).join("\\."); + const section = (opt.section ? opt.section + "." : "") + nk; + const { whitespace } = opt; + const child = encode(obj[k], { + section, + whitespace + }); + if (out.length && child.length) + out += eol; + out += child; + } + return out; + }; + var dotSplit = (str) => str.replace(/\1/g, "LITERAL\\1LITERAL").replace(/\\\./g, "").split(/\./).map((part) => part.replace(/\1/g, "\\.").replace(/\2LITERAL\\1LITERAL\2/g, "")); + var decode = (str) => { + const out = Object.create(null); + let p = out; + let section = null; + const re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i; + const lines = str.split(/[\r\n]+/g); + for (const line of lines) { + if (!line || line.match(/^\s*[;#]/)) + continue; + const match = line.match(re); + if (!match) + continue; + if (match[1] !== void 0) { + section = unsafe(match[1]); + if (section === "__proto__") { + p = Object.create(null); + continue; + } + p = out[section] = out[section] || Object.create(null); + continue; + } + const keyRaw = unsafe(match[2]); + const isArray = keyRaw.length > 2 && keyRaw.slice(-2) === "[]"; + const key = isArray ? keyRaw.slice(0, -2) : keyRaw; + if (key === "__proto__") + continue; + const valueRaw = match[3] ? unsafe(match[4]) : true; + const value = valueRaw === "true" || valueRaw === "false" || valueRaw === "null" ? JSON.parse(valueRaw) : valueRaw; + if (isArray) { + if (!hasOwnProperty.call(p, key)) + p[key] = []; + else if (!Array.isArray(p[key])) + p[key] = [p[key]]; + } + if (Array.isArray(p[key])) + p[key].push(value); + else + p[key] = value; + } + const remove = []; + for (const k of Object.keys(out)) { + if (!hasOwnProperty.call(out, k) || typeof out[k] !== "object" || Array.isArray(out[k])) + continue; + const parts = dotSplit(k); + let p2 = out; + const l = parts.pop(); + const nl = l.replace(/\\\./g, "."); + for (const part of parts) { + if (part === "__proto__") + continue; + if (!hasOwnProperty.call(p2, part) || typeof p2[part] !== "object") + p2[part] = Object.create(null); + p2 = p2[part]; + } + if (p2 === out && nl === l) + continue; + p2[nl] = out[k]; + remove.push(k); + } + for (const del of remove) + delete out[del]; + return out; + }; + var isQuoted = (val) => val.charAt(0) === '"' && val.slice(-1) === '"' || val.charAt(0) === "'" && val.slice(-1) === "'"; + var safe = (val) => typeof val !== "string" || val.match(/[=\r\n]/) || val.match(/^\[/) || val.length > 1 && isQuoted(val) || val !== val.trim() ? JSON.stringify(val) : val.replace(/;/g, "\\;").replace(/#/g, "\\#"); + var unsafe = (val, doUnesc) => { + val = (val || "").trim(); + if (isQuoted(val)) { + if (val.charAt(0) === "'") + val = val.substr(1, val.length - 2); + try { + val = JSON.parse(val); + } catch (_) { + } + } else { + let esc = false; + let unesc = ""; + for (let i = 0, l = val.length; i < l; i++) { + const c = val.charAt(i); + if (esc) { + if ("\\;#".indexOf(c) !== -1) + unesc += c; + else + unesc += "\\" + c; + esc = false; + } else if (";#".indexOf(c) !== -1) + break; + else if (c === "\\") + esc = true; + else + unesc += c; + } + if (esc) + unesc += "\\"; + return unesc.trim(); + } + return val; + }; + module2.exports = { + parse: decode, + decode, + stringify: encode, + encode, + safe, + unsafe + }; + } +}); + +// ../../node_modules/.pnpm/read-ini-file@3.1.0/node_modules/read-ini-file/index.js +var require_read_ini_file = __commonJS({ + "../../node_modules/.pnpm/read-ini-file@3.1.0/node_modules/read-ini-file/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var stripBom = require_strip_bom(); + var ini = require_ini2(); + var parse = (data) => ini.parse(stripBom(data)); + module2.exports = (fp) => fs.promises.readFile(fp, "utf8").then(parse); + module2.exports.sync = (fp) => parse(fs.readFileSync(fp, "utf8")); + } +}); + +// ../plugin-commands-rebuild/lib/recursive.js +var require_recursive = __commonJS({ + "../plugin-commands-rebuild/lib/recursive.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var find_workspace_packages_1 = require_lib22(); + var logger_1 = __importDefault(require_lib6()); + var sort_packages_1 = __importDefault(require_lib92()); + var store_connection_manager_1 = require_lib63(); + var camelcase_keys_1 = __importDefault(require_camelcase_keys()); + var mem_1 = __importDefault(require_dist8()); + var p_limit_1 = __importDefault(require_p_limit()); + var read_ini_file_1 = __importDefault(require_read_ini_file()); + var implementation_1 = require_implementation4(); + async function recursive(allProjects, params, opts) { + var _a; + if (allProjects.length === 0) { + return; + } + const pkgs = Object.values(opts.selectedProjectsGraph).map((wsPkg) => wsPkg.package); + if (pkgs.length === 0) { + return; + } + const manifestsByPath = {}; + for (const { dir, manifest, writeProjectManifest } of pkgs) { + manifestsByPath[dir] = { manifest, writeProjectManifest }; + } + const throwOnFail = cli_utils_1.throwOnCommandFail.bind(null, "pnpm recursive rebuild"); + const chunks = opts.sort !== false ? sort_packages_1.default(opts.selectedProjectsGraph) : [Object.keys(opts.selectedProjectsGraph).sort()]; + const store = await store_connection_manager_1.createOrConnectStoreController(opts); + const workspacePackages = find_workspace_packages_1.arrayOfWorkspacePackagesToMap(allProjects); + const rebuildOpts = Object.assign(opts, { + ownLifecycleHooksStdio: "pipe", + pruneLockfileImporters: (opts.ignoredPackages == null || opts.ignoredPackages.size === 0) && pkgs.length === allProjects.length, + storeController: store.ctrl, + storeDir: store.dir, + workspacePackages + }); + const result = { + fails: [], + passes: 0 + }; + const memReadLocalConfig = mem_1.default(readLocalConfig); + async function getImporters() { + const importers = []; + await Promise.all(chunks.map(async (prefixes, buildIndex) => { + if (opts.ignoredPackages != null) { + prefixes = prefixes.filter((prefix) => !opts.ignoredPackages.has(prefix)); + } + return Promise.all(prefixes.map(async (prefix) => { + importers.push({ + buildIndex, + manifest: manifestsByPath[prefix].manifest, + rootDir: prefix + }); + })); + })); + return importers; + } + const rebuild = params.length === 0 ? implementation_1.rebuild : (importers, opts2) => implementation_1.rebuildPkgs(importers, params, opts2); + if (opts.lockfileDir) { + const importers = await getImporters(); + await rebuild(importers, { + ...rebuildOpts, + pending: opts.pending === true + }); + return; + } + const limitRebuild = p_limit_1.default((_a = opts.workspaceConcurrency) !== null && _a !== void 0 ? _a : 4); + for (const chunk of chunks) { + await Promise.all(chunk.map(async (rootDir) => limitRebuild(async () => { + var _a2; + try { + if ((_a2 = opts.ignoredPackages) === null || _a2 === void 0 ? void 0 : _a2.has(rootDir)) { + return; + } + const localConfig = await memReadLocalConfig(rootDir); + await rebuild([ + { + buildIndex: 0, + manifest: manifestsByPath[rootDir].manifest, + rootDir + } + ], { + ...rebuildOpts, + ...localConfig, + dir: rootDir, + pending: opts.pending === true, + rawConfig: { + ...rebuildOpts.rawConfig, + ...localConfig + } + }); + result.passes++; + } catch (err) { + logger_1.default.info(err); + if (!opts.bail) { + result.fails.push({ + error: err, + message: err.message, + prefix: rootDir + }); + return; + } + err["prefix"] = rootDir; + throw err; + } + }))); + } + throwOnFail(result); + } + exports2.default = recursive; + async function readLocalConfig(prefix) { + try { + const ini = await read_ini_file_1.default(path_1.default.join(prefix, ".npmrc")); + const config = camelcase_keys_1.default(ini); + if (config.shamefullyFlatten) { + config.hoistPattern = "*"; + } + if (config.hoist === false) { + config.hoistPattern = ""; + } + return config; + } catch (err) { + if (err.code !== "ENOENT") + throw err; + return {}; + } + } + } +}); + +// ../plugin-commands-rebuild/lib/rebuild.js +var require_rebuild = __commonJS({ + "../plugin-commands-rebuild/lib/rebuild.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var store_connection_manager_1 = require_lib63(); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + var implementation_1 = require_implementation4(); + var recursive_1 = __importDefault(require_recursive()); + function rcOptionsTypes() { + return { + ...pick_1.default([ + "npm-path", + "reporter", + "unsafe-perm" + ], config_1.types) + }; + } + exports2.rcOptionsTypes = rcOptionsTypes; + function cliOptionsTypes() { + return { + ...rcOptionsTypes(), + pending: Boolean, + recursive: Boolean + }; + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["rebuild", "rb"]; + function help() { + return render_help_1.default({ + aliases: ["rb"], + description: "Rebuild a package.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: 'Rebuild every package found in subdirectories or every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + }, + { + description: "Rebuild packages that were not build during installation. Packages are not build when installing with the --ignore-scripts flag", + name: "--pending" + }, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + }, + common_cli_options_help_1.FILTERING + ], + url: cli_utils_1.docsUrl("rebuild"), + usages: ["pnpm rebuild [ ...]"] + }); + } + exports2.help = help; + async function handler(opts, params) { + var _a; + if (opts.recursive && opts.allProjects != null && opts.selectedProjectsGraph != null && opts.workspaceDir) { + await recursive_1.default(opts.allProjects, params, { ...opts, selectedProjectsGraph: opts.selectedProjectsGraph, workspaceDir: opts.workspaceDir }); + return; + } + const store = await store_connection_manager_1.createOrConnectStoreController(opts); + const rebuildOpts = Object.assign(opts, { + sideEffectsCacheRead: (_a = opts.sideEffectsCache) !== null && _a !== void 0 ? _a : opts.sideEffectsCacheReadonly, + sideEffectsCacheWrite: opts.sideEffectsCache, + storeController: store.ctrl, + storeDir: store.dir + }); + if (params.length === 0) { + await implementation_1.rebuild([ + { + buildIndex: 0, + manifest: await cli_utils_1.readProjectManifestOnly(rebuildOpts.dir, opts), + rootDir: rebuildOpts.dir + } + ], rebuildOpts); + } + await implementation_1.rebuildPkgs([ + { + manifest: await cli_utils_1.readProjectManifestOnly(rebuildOpts.dir, opts), + rootDir: rebuildOpts.dir + } + ], params, rebuildOpts); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-rebuild/lib/index.js +var require_lib93 = __commonJS({ + "../plugin-commands-rebuild/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rebuild = void 0; + var rebuild = __importStar2(require_rebuild()); + exports2.rebuild = rebuild; + } +}); + +// ../plugin-commands-installation/lib/updateWorkspaceDependencies.js +var require_updateWorkspaceDependencies = __commonJS({ + "../plugin-commands-installation/lib/updateWorkspaceDependencies.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createWorkspaceSpecs = exports2.updateToWorkspacePackagesFromManifest = void 0; + var error_1 = __importDefault(require_lib8()); + var parse_wanted_dependency_1 = __importDefault(require_lib87()); + function updateToWorkspacePackagesFromManifest(manifest, include, workspacePackages) { + const allDeps = { + ...include.devDependencies ? manifest.devDependencies : {}, + ...include.dependencies ? manifest.dependencies : {}, + ...include.optionalDependencies ? manifest.optionalDependencies : {} + }; + const updateSpecs = []; + for (const depName of Object.keys(allDeps)) { + if (workspacePackages[depName]) { + updateSpecs.push(`${depName}@workspace:*`); + } + } + return updateSpecs; + } + exports2.updateToWorkspacePackagesFromManifest = updateToWorkspacePackagesFromManifest; + function createWorkspaceSpecs(specs, workspacePackages) { + return specs.map((spec) => { + const parsed = parse_wanted_dependency_1.default(spec); + if (!parsed.alias) + throw new error_1.default("NO_PKG_NAME_IN_SPEC", `Cannot update/install from workspace through "${spec}"`); + if (!workspacePackages[parsed.alias]) + throw new error_1.default("WORKSPACE_PACKAGE_NOT_FOUND", `"${parsed.alias}" not found in the workspace`); + if (!parsed.pref) + return `${parsed.alias}@workspace:*`; + if (parsed.pref.startsWith("workspace:")) + return spec; + return `${parsed.alias}@workspace:${parsed.pref}`; + }); + } + exports2.createWorkspaceSpecs = createWorkspaceSpecs; + } +}); + +// ../plugin-commands-installation/lib/updateToLatestSpecsFromManifest.js +var require_updateToLatestSpecsFromManifest = __commonJS({ + "../plugin-commands-installation/lib/updateToLatestSpecsFromManifest.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createLatestSpecs = void 0; + var manifest_utils_1 = require_lib15(); + var version_selector_type_1 = __importDefault(require_version_selector_type()); + function updateToLatestSpecsFromManifest(manifest, include) { + const allDeps = manifest_utils_1.filterDependenciesByType(manifest, include); + const updateSpecs = []; + for (const [depName, depVersion] of Object.entries(allDeps)) { + if (depVersion.startsWith("npm:")) { + updateSpecs.push(`${depName}@${removeVersionFromSpec(depVersion)}@latest`); + } else { + const selector = version_selector_type_1.default(depVersion); + if (selector == null) + continue; + updateSpecs.push(`${depName}@latest`); + } + } + return updateSpecs; + } + exports2.default = updateToLatestSpecsFromManifest; + function createLatestSpecs(specs, manifest) { + const allDeps = manifest_utils_1.getAllDependenciesFromManifest(manifest); + return specs.filter((selector) => selector.includes("@", 1) ? allDeps[selector.substr(0, selector.indexOf("@", 1))] : allDeps[selector]).map((selector) => { + if (selector.includes("@", 1)) { + return selector; + } + if (allDeps[selector].startsWith("npm:")) { + return `${selector}@${removeVersionFromSpec(allDeps[selector])}@latest`; + } + if (version_selector_type_1.default(allDeps[selector]) == null) { + return selector; + } + return `${selector}@latest`; + }); + } + exports2.createLatestSpecs = createLatestSpecs; + function removeVersionFromSpec(spec) { + return spec.substr(0, spec.lastIndexOf("@")); + } + } +}); + +// ../plugin-commands-installation/lib/recursive.js +var require_recursive2 = __commonJS({ + "../plugin-commands-installation/lib/recursive.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createMatcher = exports2.matchDependencies = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var error_1 = __importDefault(require_lib8()); + var find_workspace_packages_1 = require_lib22(); + var logger_1 = __importDefault(require_lib6()); + var manifest_utils_1 = require_lib15(); + var matcher_1 = __importDefault(require_lib23()); + var plugin_commands_rebuild_1 = require_lib93(); + var pnpmfile_1 = require_lib91(); + var sort_packages_1 = __importDefault(require_lib92()); + var store_connection_manager_1 = require_lib63(); + var supi_1 = require_lib88(); + var camelcase_keys_1 = __importDefault(require_camelcase_keys()); + var is_subdir_1 = __importDefault(require_is_subdir()); + var mem_1 = __importDefault(require_dist8()); + var p_filter_1 = __importDefault(require_p_filter()); + var p_limit_1 = __importDefault(require_p_limit()); + var read_ini_file_1 = __importDefault(require_read_ini_file()); + var updateWorkspaceDependencies_1 = require_updateWorkspaceDependencies(); + var updateToLatestSpecsFromManifest_1 = __importStar2(require_updateToLatestSpecsFromManifest()); + var getSaveType_1 = __importDefault(require_getSaveType()); + var getPinnedVersion_1 = __importDefault(require_getPinnedVersion()); + async function recursive(allProjects, params, opts, cmdFullName) { + var _a, _b, _c; + if (allProjects.length === 0) { + return false; + } + const pkgs = Object.values(opts.selectedProjectsGraph).map((wsPkg) => wsPkg.package); + if (pkgs.length === 0) { + return false; + } + const manifestsByPath = {}; + for (const { dir, manifest, writeProjectManifest } of allProjects) { + manifestsByPath[dir] = { manifest, writeProjectManifest }; + } + const throwOnFail = cli_utils_1.throwOnCommandFail.bind(null, `pnpm recursive ${cmdFullName}`); + const chunks = opts.sort !== false ? sort_packages_1.default(opts.selectedProjectsGraph) : [Object.keys(opts.selectedProjectsGraph).sort()]; + const store = await store_connection_manager_1.createOrConnectStoreController(opts); + const workspacePackages = cmdFullName !== "unlink" ? find_workspace_packages_1.arrayOfWorkspacePackagesToMap(allProjects) : {}; + const targetDependenciesField = getSaveType_1.default(opts); + const installOpts = Object.assign(opts, { + linkWorkspacePackagesDepth: opts.linkWorkspacePackages === "deep" ? Infinity : opts.linkWorkspacePackages ? 0 : -1, + ownLifecycleHooksStdio: "pipe", + peer: opts.savePeer, + pruneLockfileImporters: (opts.ignoredPackages == null || opts.ignoredPackages.size === 0) && pkgs.length === allProjects.length, + storeController: store.ctrl, + storeDir: store.dir, + targetDependenciesField, + workspacePackages, + forceHoistPattern: typeof opts.rawLocalConfig["hoist-pattern"] !== "undefined" || typeof opts.rawLocalConfig["hoist"] !== "undefined", + forceShamefullyHoist: typeof opts.rawLocalConfig["shamefully-hoist"] !== "undefined" + }); + const result = { + fails: [], + passes: 0 + }; + const memReadLocalConfig = mem_1.default(readLocalConfig); + async function getImporters() { + const importers = []; + await Promise.all(chunks.map(async (prefixes, buildIndex) => { + if (opts.ignoredPackages != null) { + prefixes = prefixes.filter((prefix) => !opts.ignoredPackages.has(prefix)); + } + return Promise.all(prefixes.map(async (prefix) => { + importers.push({ + buildIndex, + manifest: manifestsByPath[prefix].manifest, + rootDir: prefix + }); + })); + })); + return importers; + } + const updateToLatest = opts.update && opts.latest; + const includeDirect = (_a = opts.includeDirect) !== null && _a !== void 0 ? _a : { + dependencies: true, + devDependencies: true, + optionalDependencies: true + }; + const updateMatch = cmdFullName === "update" && params.length > 0 ? createMatcher(params) : null; + if (opts.lockfileDir && ["add", "install", "remove", "update"].includes(cmdFullName)) { + let importers = await getImporters(); + const calculatedRepositoryRoot = calculateRepositoryRoot(opts.workspaceDir, importers.map((x) => x.rootDir)); + const isFromWorkspace = is_subdir_1.default.bind(null, calculatedRepositoryRoot); + importers = await p_filter_1.default(importers, async ({ rootDir }) => isFromWorkspace(await fs_1.promises.realpath(rootDir))); + if (importers.length === 0) + return true; + const hooks = opts.ignorePnpmfile ? {} : pnpmfile_1.requireHooks(opts.lockfileDir, opts); + const mutation = cmdFullName === "remove" ? "uninstallSome" : params.length === 0 && !updateToLatest ? "install" : "installSome"; + const writeProjectManifests = []; + const mutatedImporters = []; + await Promise.all(importers.map(async ({ buildIndex, rootDir }) => { + var _a2; + const localConfig = await memReadLocalConfig(rootDir); + const modulesDir = (_a2 = localConfig.modulesDir) !== null && _a2 !== void 0 ? _a2 : opts.modulesDir; + const { manifest, writeProjectManifest } = manifestsByPath[rootDir]; + let currentInput = [...params]; + if (updateMatch != null) { + currentInput = matchDependencies(updateMatch, manifest, includeDirect); + if (currentInput.length === 0 && (typeof opts.depth === "undefined" || opts.depth <= 0)) { + installOpts.pruneLockfileImporters = false; + return; + } + } + if (updateToLatest) { + if (!params || params.length === 0) { + currentInput = updateToLatestSpecsFromManifest_1.default(manifest, includeDirect); + } else { + currentInput = updateToLatestSpecsFromManifest_1.createLatestSpecs(currentInput, manifest); + if (currentInput.length === 0) { + installOpts.pruneLockfileImporters = false; + return; + } + } + } + if (opts.workspace) { + if (!currentInput || currentInput.length === 0) { + currentInput = updateWorkspaceDependencies_1.updateToWorkspacePackagesFromManifest(manifest, includeDirect, workspacePackages); + } else { + currentInput = updateWorkspaceDependencies_1.createWorkspaceSpecs(currentInput, workspacePackages); + } + } + writeProjectManifests.push(writeProjectManifest); + switch (mutation) { + case "uninstallSome": + mutatedImporters.push({ + dependencyNames: currentInput, + manifest, + modulesDir, + mutation, + rootDir, + targetDependenciesField + }); + return; + case "installSome": + mutatedImporters.push({ + allowNew: cmdFullName === "install" || cmdFullName === "add", + dependencySelectors: currentInput, + manifest, + modulesDir, + mutation, + peer: opts.savePeer, + pinnedVersion: getPinnedVersion_1.default({ + saveExact: typeof localConfig.saveExact === "boolean" ? localConfig.saveExact : opts.saveExact, + savePrefix: typeof localConfig.savePrefix === "string" ? localConfig.savePrefix : opts.savePrefix + }), + rootDir, + targetDependenciesField + }); + return; + case "install": + mutatedImporters.push({ + buildIndex, + manifest, + modulesDir, + mutation, + rootDir + }); + } + })); + if (!opts.selectedProjectsGraph[opts.workspaceDir] && manifestsByPath[opts.workspaceDir] != null) { + const localConfig = await memReadLocalConfig(opts.workspaceDir); + const modulesDir = (_b = localConfig.modulesDir) !== null && _b !== void 0 ? _b : opts.modulesDir; + const { manifest, writeProjectManifest } = manifestsByPath[opts.workspaceDir]; + writeProjectManifests.push(writeProjectManifest); + mutatedImporters.push({ + buildIndex: 0, + manifest, + modulesDir, + mutation: "install", + rootDir: opts.workspaceDir + }); + } + if (mutatedImporters.length === 0 && cmdFullName === "update") { + throw new error_1.default("NO_PACKAGE_IN_DEPENDENCIES", "None of the specified packages were found in the dependencies of any of the projects."); + } + const mutatedPkgs = await supi_1.mutateModules(mutatedImporters, { + ...installOpts, + hooks, + storeController: store.ctrl + }); + if (opts.save !== false) { + await Promise.all(mutatedPkgs.map(async ({ manifest }, index) => writeProjectManifests[index](manifest))); + } + return true; + } + const pkgPaths = chunks.length === 0 ? chunks[0] : Object.keys(opts.selectedProjectsGraph).sort(); + const limitInstallation = p_limit_1.default((_c = opts.workspaceConcurrency) !== null && _c !== void 0 ? _c : 4); + await Promise.all(pkgPaths.map(async (rootDir) => limitInstallation(async () => { + var _a2; + const hooks = opts.ignorePnpmfile ? {} : pnpmfile_1.requireHooks(rootDir, opts); + try { + if ((_a2 = opts.ignoredPackages) === null || _a2 === void 0 ? void 0 : _a2.has(rootDir)) { + return; + } + const { manifest, writeProjectManifest } = manifestsByPath[rootDir]; + let currentInput = [...params]; + if (updateMatch != null) { + currentInput = matchDependencies(updateMatch, manifest, includeDirect); + if (currentInput.length === 0) + return; + } + if (updateToLatest) { + if (!params || params.length === 0) { + currentInput = updateToLatestSpecsFromManifest_1.default(manifest, includeDirect); + } else { + currentInput = updateToLatestSpecsFromManifest_1.createLatestSpecs(currentInput, manifest); + if (currentInput.length === 0) + return; + } + } + if (opts.workspace) { + if (!currentInput || currentInput.length === 0) { + currentInput = updateWorkspaceDependencies_1.updateToWorkspacePackagesFromManifest(manifest, includeDirect, workspacePackages); + } else { + currentInput = updateWorkspaceDependencies_1.createWorkspaceSpecs(currentInput, workspacePackages); + } + } + let action; + switch (cmdFullName) { + case "unlink": + action = currentInput.length === 0 ? unlink : unlinkPkgs.bind(null, currentInput); + break; + case "remove": + action = async (manifest2, opts2) => { + const [{ manifest: newManifest2 }] = await supi_1.mutateModules([ + { + dependencyNames: currentInput, + manifest: manifest2, + mutation: "uninstallSome", + rootDir + } + ], opts2); + return newManifest2; + }; + break; + default: + action = currentInput.length === 0 ? supi_1.install : async (manifest2, opts2) => supi_1.addDependenciesToPackage(manifest2, currentInput, opts2); + break; + } + const localConfig = await memReadLocalConfig(rootDir); + const newManifest = await action(manifest, { + ...installOpts, + ...localConfig, + bin: path_1.default.join(rootDir, "node_modules", ".bin"), + dir: rootDir, + hooks, + ignoreScripts: true, + pinnedVersion: getPinnedVersion_1.default({ + saveExact: typeof localConfig.saveExact === "boolean" ? localConfig.saveExact : opts.saveExact, + savePrefix: typeof localConfig.savePrefix === "string" ? localConfig.savePrefix : opts.savePrefix + }), + rawConfig: { + ...installOpts.rawConfig, + ...localConfig + }, + storeController: store.ctrl + }); + if (opts.save !== false) { + await writeProjectManifest(newManifest); + } + result.passes++; + } catch (err) { + logger_1.default.info(err); + if (!opts.bail) { + result.fails.push({ + error: err, + message: err.message, + prefix: rootDir + }); + return; + } + err["prefix"] = rootDir; + throw err; + } + }))); + if (!opts.lockfileOnly && !opts.ignoreScripts && (cmdFullName === "add" || cmdFullName === "install" || cmdFullName === "update" || cmdFullName === "unlink")) { + await plugin_commands_rebuild_1.rebuild.handler({ + ...opts, + pending: opts.pending === true + }, []); + } + throwOnFail(result); + if (!result.passes && cmdFullName === "update") { + throw new error_1.default("NO_PACKAGE_IN_DEPENDENCIES", "None of the specified packages were found in the dependencies of any of the projects."); + } + return true; + } + exports2.default = recursive; + async function unlink(manifest, opts) { + return supi_1.mutateModules([ + { + manifest, + mutation: "unlink", + rootDir: opts.dir + } + ], opts); + } + async function unlinkPkgs(dependencyNames, manifest, opts) { + return supi_1.mutateModules([ + { + dependencyNames, + manifest, + mutation: "unlinkSome", + rootDir: opts.dir + } + ], opts); + } + async function readLocalConfig(prefix) { + try { + const ini = await read_ini_file_1.default(path_1.default.join(prefix, ".npmrc")); + const config = camelcase_keys_1.default(ini); + if (config.shamefullyFlatten) { + config.hoistPattern = "*"; + } + if (config.hoist === false) { + config.hoistPattern = ""; + } + return config; + } catch (err) { + if (err.code !== "ENOENT") + throw err; + return {}; + } + } + function calculateRepositoryRoot(workspaceDir, projectDirs) { + let relativeRepoRoot = "."; + for (const rootDir of projectDirs) { + const relativePartRegExp = new RegExp(`^(\\.\\.\\${path_1.default.sep})+`); + const relativePartMatch = relativePartRegExp.exec(path_1.default.relative(workspaceDir, rootDir)); + if (relativePartMatch != null) { + const relativePart = relativePartMatch[0]; + if (relativePart.length > relativeRepoRoot.length) { + relativeRepoRoot = relativePart; + } + } + } + return path_1.default.resolve(workspaceDir, relativeRepoRoot); + } + function matchDependencies(match, manifest, include) { + const deps = Object.keys(manifest_utils_1.filterDependenciesByType(manifest, include)); + const matchedDeps = []; + for (const dep of deps) { + const spec = match(dep); + if (spec === null) + continue; + matchedDeps.push(spec ? `${dep}@${spec}` : dep); + } + return matchedDeps; + } + exports2.matchDependencies = matchDependencies; + function createMatcher(params) { + const matchers = params.map((param) => { + const atIndex = param.indexOf("@", 1); + let pattern; + let spec; + if (atIndex === -1) { + pattern = param; + spec = ""; + } else { + pattern = param.substr(0, atIndex); + spec = param.substr(atIndex + 1); + } + return { + match: matcher_1.default(pattern), + spec + }; + }); + return (depName) => { + for (const { spec, match } of matchers) { + if (match(depName)) + return spec; + } + return null; + }; + } + exports2.createMatcher = createMatcher; + } +}); + +// ../plugin-commands-installation/lib/installDeps.js +var require_installDeps = __commonJS({ + "../plugin-commands-installation/lib/installDeps.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var error_1 = __importDefault(require_lib8()); + var filter_workspace_packages_1 = require_lib27(); + var find_workspace_packages_1 = __importStar2(require_lib22()); + var implementation_1 = require_implementation4(); + var pnpmfile_1 = require_lib91(); + var store_connection_manager_1 = require_lib63(); + var supi_1 = require_lib88(); + var logger_1 = __importDefault(require_lib6()); + var sort_packages_1 = require_lib92(); + var getPinnedVersion_1 = __importDefault(require_getPinnedVersion()); + var getSaveType_1 = __importDefault(require_getSaveType()); + var recursive_1 = __importStar2(require_recursive2()); + var updateToLatestSpecsFromManifest_1 = __importStar2(require_updateToLatestSpecsFromManifest()); + var updateWorkspaceDependencies_1 = require_updateWorkspaceDependencies(); + var OVERWRITE_UPDATE_OPTIONS = { + allowNew: true, + update: false + }; + async function handler(opts, params) { + var _a, _b, _c, _d, _e, _f; + if (opts.workspace) { + if (opts.latest) { + throw new error_1.default("BAD_OPTIONS", "Cannot use --latest with --workspace simultaneously"); + } + if (!opts.workspaceDir) { + throw new error_1.default("WORKSPACE_OPTION_OUTSIDE_WORKSPACE", "--workspace can only be used inside a workspace"); + } + if (!opts.linkWorkspacePackages && !opts.saveWorkspaceProtocol) { + if (opts.rawLocalConfig["save-workspace-protocol"] === false) { + throw new error_1.default("BAD_OPTIONS", "This workspace has link-workspace-packages turned off, so dependencies are linked from the workspace only when the workspace protocol is used. Either set link-workspace-packages to true or don't use the --no-save-workspace-protocol option when running add/update with the --workspace option"); + } else { + opts.saveWorkspaceProtocol = true; + } + } + opts["preserveWorkspaceProtocol"] = !opts.linkWorkspacePackages; + } + const includeDirect = (_a = opts.includeDirect) !== null && _a !== void 0 ? _a : { + dependencies: true, + devDependencies: true, + optionalDependencies: true + }; + const forceHoistPattern = typeof opts.rawLocalConfig["hoist-pattern"] !== "undefined" || typeof opts.rawLocalConfig["hoist"] !== "undefined"; + const forcePublicHoistPattern = typeof opts.rawLocalConfig["shamefully-hoist"] !== "undefined" || typeof opts.rawLocalConfig["public-hoist-pattern"] !== "undefined"; + const allProjects = (_b = opts.allProjects) !== null && _b !== void 0 ? _b : opts.workspaceDir ? await find_workspace_packages_1.default(opts.workspaceDir, opts) : []; + if (opts.workspaceDir) { + const selectedProjectsGraph = (_c = opts.selectedProjectsGraph) !== null && _c !== void 0 ? _c : selectProjectByDir(allProjects, opts.dir); + if (selectedProjectsGraph != null) { + const sequencedGraph = sort_packages_1.sequenceGraph(selectedProjectsGraph); + if (!sequencedGraph.safe) { + const cyclicDependenciesInfo = sequencedGraph.cycles.length > 0 ? `: ${sequencedGraph.cycles.map((deps) => deps.join(", ")).join("; ")}` : ""; + logger_1.default.warn({ + message: `There are cyclic workspace dependencies${cyclicDependenciesInfo}`, + prefix: opts.workspaceDir + }); + } + await recursive_1.default(allProjects, params, { + ...opts, + forceHoistPattern, + forcePublicHoistPattern, + selectedProjectsGraph, + workspaceDir: opts.workspaceDir + }, opts.update ? "update" : params.length === 0 ? "install" : "add"); + return; + } + } + params = params.filter(Boolean); + const dir = opts.dir || process.cwd(); + let workspacePackages; + if (opts.workspaceDir) { + workspacePackages = find_workspace_packages_1.arrayOfWorkspacePackagesToMap(allProjects); + } + const store = await store_connection_manager_1.createOrConnectStoreController(opts); + const installOpts = { + ...opts, + forceHoistPattern, + forcePublicHoistPattern, + ignoreScripts: !!workspacePackages || opts.ignoreScripts, + linkWorkspacePackagesDepth: opts.linkWorkspacePackages === "deep" ? Infinity : opts.linkWorkspacePackages ? 0 : -1, + sideEffectsCacheRead: (_d = opts.sideEffectsCache) !== null && _d !== void 0 ? _d : opts.sideEffectsCacheReadonly, + sideEffectsCacheWrite: opts.sideEffectsCache, + storeController: store.ctrl, + storeDir: store.dir, + workspacePackages + }; + if (!opts.ignorePnpmfile) { + installOpts["hooks"] = pnpmfile_1.requireHooks((_e = opts.lockfileDir) !== null && _e !== void 0 ? _e : dir, opts); + } + if (opts.global) { + installOpts["nodeExecPath"] = (_f = process.env.NODE) !== null && _f !== void 0 ? _f : process.execPath; + } + let { manifest, writeProjectManifest } = await cli_utils_1.tryReadProjectManifest(opts.dir, opts); + if (manifest === null) { + if (opts.update) { + throw new error_1.default("NO_IMPORTER_MANIFEST", "No package.json found"); + } + manifest = {}; + } + const updateMatch = opts.update && params.length > 0 ? recursive_1.createMatcher(params) : null; + if (updateMatch != null) { + params = recursive_1.matchDependencies(updateMatch, manifest, includeDirect); + if (params.length === 0) { + throw new error_1.default("NO_PACKAGE_IN_DEPENDENCIES", "None of the specified packages were found in the dependencies."); + } + } + if (opts.update && opts.latest) { + if (!params || params.length === 0) { + params = updateToLatestSpecsFromManifest_1.default(manifest, includeDirect); + } else { + params = updateToLatestSpecsFromManifest_1.createLatestSpecs(params, manifest); + } + } + if (opts.workspace) { + if (!params || params.length === 0) { + params = updateWorkspaceDependencies_1.updateToWorkspacePackagesFromManifest(manifest, includeDirect, workspacePackages); + } else { + params = updateWorkspaceDependencies_1.createWorkspaceSpecs(params, workspacePackages); + } + } + if (params === null || params === void 0 ? void 0 : params.length) { + const [updatedImporter] = await supi_1.mutateModules([ + { + allowNew: opts.allowNew, + binsDir: installOpts.bin, + dependencySelectors: params, + manifest, + mutation: "installSome", + peer: opts.savePeer, + pinnedVersion: getPinnedVersion_1.default(opts), + rootDir: installOpts.dir, + targetDependenciesField: getSaveType_1.default(installOpts) + } + ], installOpts); + if (opts.save !== false) { + await writeProjectManifest(updatedImporter.manifest); + } + return; + } + const updatedManifest = await supi_1.install(manifest, installOpts); + if (opts.update === true && opts.save !== false) { + await writeProjectManifest(updatedManifest); + } + if (opts.linkWorkspacePackages && opts.workspaceDir) { + const { selectedProjectsGraph } = await filter_workspace_packages_1.filterPkgsBySelectorObjects(allProjects, [ + { + excludeSelf: true, + includeDependencies: true, + parentDir: dir + } + ], { + workspaceDir: opts.workspaceDir + }); + await recursive_1.default(allProjects, [], { + ...opts, + ...OVERWRITE_UPDATE_OPTIONS, + selectedProjectsGraph, + workspaceDir: opts.workspaceDir + }, "install"); + if (opts.ignoreScripts) + return; + await implementation_1.rebuild([ + { + buildIndex: 0, + manifest: await cli_utils_1.readProjectManifestOnly(opts.dir, opts), + rootDir: opts.dir + } + ], { + ...opts, + pending: true, + storeController: store.ctrl, + storeDir: store.dir + }); + } + } + exports2.default = handler; + function selectProjectByDir(projects, searchedDir) { + const project = projects.find(({ dir }) => path_1.default.relative(dir, searchedDir) === ""); + if (project == null) + return void 0; + return { [searchedDir]: { dependencies: [], package: project } }; + } + } +}); + +// ../plugin-commands-installation/lib/add.js +var require_add = __commonJS({ + "../plugin-commands-installation/lib/add.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var error_1 = __importDefault(require_lib8()); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + var installDeps_1 = __importDefault(require_installDeps()); + function rcOptionsTypes() { + return pick_1.default([ + "child-concurrency", + "engine-strict", + "fetch-retries", + "fetch-retry-factor", + "fetch-retry-maxtimeout", + "fetch-retry-mintimeout", + "fetch-timeout", + "force", + "global-dir", + "global-pnpmfile", + "global", + "hoist", + "hoist-pattern", + "https-proxy", + "ignore-pnpmfile", + "ignore-scripts", + "ignore-workspace-root-check", + "link-workspace-packages", + "lockfile-dir", + "lockfile-directory", + "lockfile-only", + "lockfile", + "modules-dir", + "network-concurrency", + "noproxy", + "npmPath", + "package-import-method", + "pnpmfile", + "prefer-offline", + "production", + "proxy", + "public-hoist-pattern", + "registry", + "reporter", + "save-dev", + "save-exact", + "save-optional", + "save-peer", + "save-prod", + "save-workspace-protocol", + "shamefully-flatten", + "shamefully-hoist", + "shared-workspace-lockfile", + "side-effects-cache-readonly", + "side-effects-cache", + "store", + "store-dir", + "strict-peer-dependencies", + "unsafe-perm", + "offline", + "only", + "optional", + "use-running-store-server", + "use-store-server", + "verify-store-integrity", + "virtual-store-dir" + ], config_1.types); + } + exports2.rcOptionsTypes = rcOptionsTypes; + function cliOptionsTypes() { + return { + ...rcOptionsTypes(), + recursive: Boolean, + save: Boolean, + workspace: Boolean + }; + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["add"]; + function help() { + return render_help_1.default({ + description: "Installs a package and any packages that it depends on.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "Save package to your `dependencies`. The default behavior", + name: "--save-prod", + shortAlias: "-P" + }, + { + description: "Save package to your `devDependencies`", + name: "--save-dev", + shortAlias: "-D" + }, + { + description: "Save package to your `optionalDependencies`", + name: "--save-optional", + shortAlias: "-O" + }, + { + description: "Save package to your `peerDependencies` and `devDependencies`", + name: "--save-peer" + }, + { + description: "Install exact version", + name: "--[no-]save-exact", + shortAlias: "-E" + }, + { + description: 'Save packages from the workspace with a "workspace:" protocol. True by default', + name: "--[no-]save-workspace-protocol" + }, + { + description: "Install as a global package", + name: "--global", + shortAlias: "-g" + }, + { + description: 'Run installation recursively in every package found in subdirectories or in every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + }, + { + description: "Only adds the new dependency if it is found in the workspace", + name: "--workspace" + }, + common_cli_options_help_1.OPTIONS.ignoreScripts, + common_cli_options_help_1.OPTIONS.offline, + common_cli_options_help_1.OPTIONS.preferOffline, + common_cli_options_help_1.OPTIONS.storeDir, + common_cli_options_help_1.OPTIONS.virtualStoreDir, + common_cli_options_help_1.OPTIONS.globalDir, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + }, + common_cli_options_help_1.FILTERING + ], + url: cli_utils_1.docsUrl("add"), + usages: [ + "pnpm add ", + "pnpm add @", + "pnpm add @", + "pnpm add @", + "pnpm add :/", + "pnpm add ", + "pnpm add ", + "pnpm add ", + "pnpm add " + ] + }); + } + exports2.help = help; + async function handler(opts, params) { + if (opts.cliOptions["save"] === false) { + throw new error_1.default("OPTION_NOT_SUPPORTED", 'The "add" command currently does not support the no-save option'); + } + if (!params || params.length === 0) { + throw new error_1.default("MISSING_PACKAGE_NAME", "`pnpm add` requires the package name"); + } + if (!opts.recursive && opts.workspaceDir === opts.dir && !opts.ignoreWorkspaceRootCheck && !opts.workspaceRoot) { + throw new error_1.default("ADDING_TO_ROOT", "Running this command will add the dependency to the workspace root, which might not be what you want - if you really meant it, make it explicit by running this command again with the -w flag (or --workspace-root). If you don't want to see this warning anymore, you may set the ignore-workspace-root-check setting to true."); + } + const include = { + dependencies: opts.production !== false, + devDependencies: opts.dev !== false, + optionalDependencies: opts.optional !== false + }; + return installDeps_1.default({ + ...opts, + include, + includeDirect: include + }, params); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-installation/lib/install.js +var require_install2 = __commonJS({ + "../plugin-commands-installation/lib/install.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.shorthands = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var constants_1 = require_lib7(); + var is_ci_1 = __importDefault(require_is_ci()); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + var installDeps_1 = __importDefault(require_installDeps()); + function rcOptionsTypes() { + return pick_1.default([ + "child-concurrency", + "dev", + "engine-strict", + "fetch-retries", + "fetch-retry-factor", + "fetch-retry-maxtimeout", + "fetch-retry-mintimeout", + "fetch-timeout", + "frozen-lockfile", + "global-dir", + "global-pnpmfile", + "global", + "hoist", + "hoist-pattern", + "https-proxy", + "ignore-pnpmfile", + "ignore-scripts", + "link-workspace-packages", + "lockfile-dir", + "lockfile-directory", + "lockfile-only", + "lockfile", + "modules-dir", + "network-concurrency", + "noproxy", + "package-import-method", + "pnpmfile", + "prefer-frozen-lockfile", + "prefer-offline", + "production", + "proxy", + "public-hoist-pattern", + "registry", + "reporter", + "save-workspace-protocol", + "shamefully-flatten", + "shamefully-hoist", + "shared-workspace-lockfile", + "side-effects-cache-readonly", + "side-effects-cache", + "store", + "store-dir", + "strict-peer-dependencies", + "offline", + "only", + "optional", + "unsafe-perm", + "use-running-store-server", + "use-store-server", + "verify-store-integrity", + "virtual-store-dir" + ], config_1.types); + } + exports2.rcOptionsTypes = rcOptionsTypes; + var cliOptionsTypes = () => ({ + ...rcOptionsTypes(), + ...pick_1.default(["force"], config_1.types), + "fix-lockfile": Boolean, + recursive: Boolean + }); + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.shorthands = { + D: "--dev", + P: "--production" + }; + exports2.commandNames = ["install", "i"]; + function help() { + return render_help_1.default({ + aliases: ["i"], + description: "Installs all dependencies of the project in the current working directory. When executed inside a workspace, installs all dependencies of all projects.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: 'Run installation recursively in every package found in subdirectories. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + }, + common_cli_options_help_1.OPTIONS.ignoreScripts, + common_cli_options_help_1.OPTIONS.offline, + common_cli_options_help_1.OPTIONS.preferOffline, + common_cli_options_help_1.OPTIONS.globalDir, + { + description: "Packages in `devDependencies` won't be installed", + name: "--prod", + shortAlias: "-P" + }, + { + description: "Only `devDependencies` are installed regardless of the `NODE_ENV`", + name: "--dev", + shortAlias: "-D" + }, + { + description: "`optionalDependencies` are not installed", + name: "--no-optional" + }, + { + description: `Don't read or generate a \`${constants_1.WANTED_LOCKFILE}\` file`, + name: "--no-lockfile" + }, + { + description: `Dependencies are not downloaded. Only \`${constants_1.WANTED_LOCKFILE}\` is updated`, + name: "--lockfile-only" + }, + { + description: "Don't generate a lockfile and fail if an update is needed", + name: "--frozen-lockfile" + }, + { + description: `If the available \`${constants_1.WANTED_LOCKFILE}\` satisfies the \`package.json\` then perform a headless installation`, + name: "--prefer-frozen-lockfile" + }, + { + description: `The directory in which the ${constants_1.WANTED_LOCKFILE} of the package will be created. Several projects may share a single lockfile.`, + name: "--lockfile-dir " + }, + { + description: "Fix broken lockfile entries automatically", + name: "--fix-lockfile" + }, + { + description: "The directory in which dependencies will be installed (instead of node_modules)", + name: "--modules-dir " + }, + { + description: "Dependencies inside the modules directory will have access only to their listed dependencies", + name: "--no-hoist" + }, + { + description: "All the subdeps will be hoisted into the root node_modules. Your code will have access to them", + name: "--shamefully-hoist" + }, + { + description: "Hoist all dependencies matching the pattern to `node_modules/.pnpm/node_modules`. The default pattern is * and matches everything. Hoisted packages can be required by any dependencies, so it is an emulation of a flat node_modules", + name: "--hoist-pattern " + }, + { + description: "Hoist all dependencies matching the pattern to the root of the modules directory", + name: "--public-hoist-pattern " + }, + common_cli_options_help_1.OPTIONS.storeDir, + common_cli_options_help_1.OPTIONS.virtualStoreDir, + { + description: "Maximum number of concurrent network requests", + name: "--network-concurrency " + }, + { + description: "Controls the number of child processes run parallelly to build node modules", + name: "--child-concurrency " + }, + { + description: "Disable pnpm hooks defined in .pnpmfile.cjs", + name: "--ignore-pnpmfile" + }, + { + description: "If false, doesn't check whether packages in the store were mutated", + name: "--[no-]verify-store-integrity" + }, + { + description: "Fail on missing or invalid peer dependencies", + name: "--strict-peer-dependencies" + }, + { + description: "Starts a store server in the background. The store server will keep running after installation is done. To stop the store server, run `pnpm server stop`", + name: "--use-store-server" + }, + { + description: "Only allows installation with a store server. If no store server is running, installation will fail", + name: "--use-running-store-server" + }, + { + description: "Clones/hardlinks or copies packages. The selected method depends from the file system", + name: "--package-import-method auto" + }, + { + description: "Hardlink packages from the store", + name: "--package-import-method hardlink" + }, + { + description: "Copy packages from the store", + name: "--package-import-method copy" + }, + { + description: "Clone (aka copy-on-write) packages from the store", + name: "--package-import-method clone" + }, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + }, + { + title: "Output", + list: [ + { + description: "No output is logged to the console, except fatal errors", + name: "--silent, --reporter silent", + shortAlias: "-s" + }, + { + description: "The default reporter when the stdout is TTY", + name: "--reporter default" + }, + { + description: "The output is always appended to the end. No cursor manipulations are performed", + name: "--reporter append-only" + }, + { + description: "The most verbose reporter. Prints all logs in ndjson format", + name: "--reporter ndjson" + } + ] + }, + common_cli_options_help_1.FILTERING, + { + title: "Experimental options", + list: [ + { + description: "Use or cache the results of (pre/post)install hooks", + name: "--side-effects-cache" + }, + { + description: "Only use the side effects cache if present, do not create it for new packages", + name: "--side-effects-cache-readonly" + } + ] + } + ], + url: cli_utils_1.docsUrl("install"), + usages: ["pnpm install [options]"] + }); + } + exports2.help = help; + async function handler(opts) { + const include = { + dependencies: opts.production !== false, + devDependencies: opts.dev !== false, + optionalDependencies: opts.optional !== false + }; + return installDeps_1.default({ + ...opts, + frozenLockfileIfExists: is_ci_1.default && typeof opts.rawLocalConfig["frozen-lockfile"] === "undefined" && typeof opts.rawLocalConfig["prefer-frozen-lockfile"] === "undefined", + include, + includeDirect: include + }, []); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-installation/lib/fetch.js +var require_fetch3 = __commonJS({ + "../plugin-commands-installation/lib/fetch.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var store_connection_manager_1 = require_lib63(); + var supi_1 = require_lib88(); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + exports2.rcOptionsTypes = cliOptionsTypes; + function cliOptionsTypes() { + return pick_1.default([ + "production", + "dev" + ], config_1.types); + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["fetch"]; + function help() { + return render_help_1.default({ + description: "Fetch packages from a lockfile into virtual store, package manifest is ignored. WARNING! This is an experimental command. Breaking changes may be introduced in non-major versions of the CLI", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "Only development packages will be fetched", + name: "--dev" + }, + { + description: "Development packages will not be fetched", + name: "--prod" + }, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + } + ], + url: cli_utils_1.docsUrl("fetch"), + usages: ["pnpm fetch [--dev | --prod]"] + }); + } + exports2.help = help; + async function handler(opts) { + const store = await store_connection_manager_1.createOrConnectStoreController(opts); + const include = { + dependencies: opts.production !== false, + devDependencies: opts.dev !== false, + optionalDependencies: opts.production !== false + }; + return supi_1.mutateModules([ + { + buildIndex: 0, + manifest: {}, + mutation: "install", + pruneDirectDependencies: true, + rootDir: process.cwd() + } + ], { + ...opts, + ignorePackageManifest: true, + include, + modulesCacheMaxAge: 0, + pruneStore: true, + storeController: store.ctrl, + storeDir: store.dir + }); + } + exports2.handler = handler; + } +}); + +// ../find-workspace-dir/lib/index.js +var require_lib94 = __commonJS({ + "../find-workspace-dir/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var find_up_1 = __importDefault(require_find_up()); + var WORKSPACE_DIR_ENV_VAR = "NPM_CONFIG_WORKSPACE_DIR"; + var WORKSPACE_MANIFEST_FILENAME = "pnpm-workspace.yaml"; + async function findWorkspaceDir(cwd) { + var _a; + const workspaceManifestDirEnvVar = (_a = process.env[WORKSPACE_DIR_ENV_VAR]) !== null && _a !== void 0 ? _a : process.env[WORKSPACE_DIR_ENV_VAR.toLowerCase()]; + const workspaceManifestLocation = workspaceManifestDirEnvVar ? path_1.default.join(workspaceManifestDirEnvVar, "pnpm-workspace.yaml") : await find_up_1.default([WORKSPACE_MANIFEST_FILENAME, "pnpm-workspace.yml"], { cwd }); + if (workspaceManifestLocation === null || workspaceManifestLocation === void 0 ? void 0 : workspaceManifestLocation.endsWith(".yml")) { + throw new error_1.default("BAD_WORKSPACE_MANIFEST_NAME", `The workspace manifest file should be named "pnpm-workspace.yaml". File found: ${workspaceManifestLocation}`); + } + return workspaceManifestLocation && path_1.default.dirname(workspaceManifestLocation); + } + exports2.default = findWorkspaceDir; + } +}); + +// ../plugin-commands-installation/lib/link.js +var require_link3 = __commonJS({ + "../plugin-commands-installation/lib/link.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var error_1 = __importDefault(require_lib8()); + var find_workspace_dir_1 = __importDefault(require_lib94()); + var find_workspace_packages_1 = __importStar2(require_lib22()); + var store_connection_manager_1 = require_lib63(); + var supi_1 = require_lib88(); + var p_limit_1 = __importDefault(require_p_limit()); + var path_absolute_1 = __importDefault(require_path_absolute()); + var pick_1 = __importDefault(require_pick()); + var partition_1 = __importDefault(require_partition4()); + var render_help_1 = __importDefault(require_lib30()); + var installCommand = __importStar2(require_install2()); + var getSaveType_1 = __importDefault(require_getSaveType()); + var isWindows = process.platform === "win32" || global["FAKE_WINDOWS"]; + var isFilespec = isWindows ? /^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/ : /^(?:[.]|~[/]|[/]|[a-zA-Z]:)/; + var installLimit = p_limit_1.default(4); + exports2.rcOptionsTypes = cliOptionsTypes; + function cliOptionsTypes() { + return pick_1.default([ + "global-dir", + "global", + "only", + "package-import-method", + "production", + "registry", + "reporter", + "save-dev", + "save-exact", + "save-optional", + "unsafe-perm" + ], config_1.types); + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["link", "ln"]; + function help() { + return render_help_1.default({ + aliases: ["ln"], + descriptionLists: [ + { + title: "Options", + list: [ + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + } + ], + url: cli_utils_1.docsUrl("link"), + usages: [ + "pnpm link (in package dir)", + "pnpm link ", + "pnpm link " + ] + }); + } + exports2.help = help; + async function handler(opts, params) { + const cwd = process.cwd(); + const storeControllerCache = new Map(); + let workspacePackagesArr; + let workspacePackages; + if (opts.workspaceDir) { + workspacePackagesArr = await find_workspace_packages_1.default(opts.workspaceDir, opts); + workspacePackages = find_workspace_packages_1.arrayOfWorkspacePackagesToMap(workspacePackagesArr); + } else { + workspacePackages = {}; + } + const store = await store_connection_manager_1.createOrConnectStoreControllerCached(storeControllerCache, opts); + const linkOpts = Object.assign(opts, { + storeController: store.ctrl, + storeDir: store.dir, + targetDependenciesField: getSaveType_1.default(opts), + workspacePackages + }); + if (params == null || params.length === 0) { + if (path_1.default.relative(linkOpts.dir, cwd) === "") { + throw new error_1.default("LINK_BAD_PARAMS", "You must provide a parameter"); + } + const { manifest: manifest2, writeProjectManifest: writeProjectManifest2 } = await cli_utils_1.tryReadProjectManifest(opts.dir, opts); + const newManifest2 = await supi_1.linkToGlobal(cwd, { + ...linkOpts, + dir: cwd, + globalBin: linkOpts.bin, + globalDir: linkOpts.dir, + manifest: manifest2 !== null && manifest2 !== void 0 ? manifest2 : {} + }); + await writeProjectManifest2(newManifest2); + return; + } + const [pkgPaths, pkgNames] = partition_1.default((inp) => isFilespec.test(inp), params); + await Promise.all(pkgPaths.map(async (dir) => installLimit(async () => { + const s = await store_connection_manager_1.createOrConnectStoreControllerCached(storeControllerCache, opts); + const config = await cli_utils_1.getConfig({ ...opts.cliOptions, dir }, { + excludeReporter: true, + rcOptionsTypes: installCommand.rcOptionsTypes(), + workspaceDir: await find_workspace_dir_1.default(dir) + }); + await supi_1.install(await cli_utils_1.readProjectManifestOnly(dir, opts), { + ...config, + include: { + dependencies: config.production !== false, + devDependencies: config.dev !== false, + optionalDependencies: config.optional !== false + }, + storeController: s.ctrl, + storeDir: s.dir, + workspacePackages + }); + }))); + if (pkgNames.length > 0) { + let globalPkgNames; + if (opts.workspaceDir) { + workspacePackagesArr = await find_workspace_packages_1.default(opts.workspaceDir, opts); + const pkgsFoundInWorkspace = workspacePackagesArr.filter(({ manifest: manifest2 }) => manifest2.name && pkgNames.includes(manifest2.name)); + pkgsFoundInWorkspace.forEach((pkgFromWorkspace) => pkgPaths.push(pkgFromWorkspace.dir)); + if (pkgsFoundInWorkspace.length > 0 && !linkOpts.targetDependenciesField) { + linkOpts.targetDependenciesField = "dependencies"; + } + globalPkgNames = pkgNames.filter((pkgName) => !pkgsFoundInWorkspace.some((pkgFromWorkspace) => pkgFromWorkspace.manifest.name === pkgName)); + } else { + globalPkgNames = pkgNames; + } + const globalPkgPath = path_absolute_1.default(opts.dir); + globalPkgNames.forEach((pkgName) => pkgPaths.push(path_1.default.join(globalPkgPath, "node_modules", pkgName))); + } + const { manifest, writeProjectManifest } = await cli_utils_1.readProjectManifest(cwd, opts); + const linkConfig = await cli_utils_1.getConfig({ ...opts.cliOptions, dir: cwd }, { + excludeReporter: true, + rcOptionsTypes: installCommand.rcOptionsTypes(), + workspaceDir: await find_workspace_dir_1.default(cwd) + }); + const storeL = await store_connection_manager_1.createOrConnectStoreControllerCached(storeControllerCache, linkConfig); + const newManifest = await supi_1.link(pkgPaths, path_1.default.join(cwd, "node_modules"), { + ...linkConfig, + targetDependenciesField: linkOpts.targetDependenciesField, + storeController: storeL.ctrl, + storeDir: storeL.dir, + manifest + }); + await writeProjectManifest(newManifest); + await Promise.all(Array.from(storeControllerCache.values()).map(async (storeControllerPromise) => { + const storeControllerHolder = await storeControllerPromise; + await storeControllerHolder.ctrl.close(); + })); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-installation/lib/prune.js +var require_prune3 = __commonJS({ + "../plugin-commands-installation/lib/prune.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var store_connection_manager_1 = require_lib63(); + var supi_1 = require_lib88(); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + exports2.rcOptionsTypes = cliOptionsTypes; + function cliOptionsTypes() { + return pick_1.default([ + "dev", + "optional", + "production" + ], config_1.types); + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["prune"]; + function help() { + return render_help_1.default({ + description: "Removes extraneous packages", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "Remove the packages specified in `devDependencies`", + name: "--prod" + }, + { + description: "Remove the packages specified in `optionalDependencies`", + name: "--no-optional" + }, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + } + ], + url: cli_utils_1.docsUrl("prune"), + usages: ["pnpm prune [--prod]"] + }); + } + exports2.help = help; + async function handler(opts) { + const store = await store_connection_manager_1.createOrConnectStoreController(opts); + return supi_1.mutateModules([ + { + buildIndex: 0, + manifest: await cli_utils_1.readProjectManifestOnly(process.cwd(), opts), + mutation: "install", + pruneDirectDependencies: true, + rootDir: process.cwd() + } + ], { + ...opts, + include: { + dependencies: opts.production !== false, + devDependencies: opts.dev !== false, + optionalDependencies: opts.optional !== false + }, + modulesCacheMaxAge: 0, + pruneStore: true, + storeController: store.ctrl, + storeDir: store.dir + }); + } + exports2.handler = handler; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/flip.js +var require_flip = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/flip.js"(exports2, module2) { + var _curry1 = require_curry1(); + var curryN = require_curryN2(); + var flip = /* @__PURE__ */ _curry1(function flip2(fn2) { + return curryN(fn2.length, function(a, b) { + var args2 = Array.prototype.slice.call(arguments, 0); + args2[0] = b; + args2[1] = a; + return fn2.apply(this, args2); + }); + }); + module2.exports = flip; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/without.js +var require_without = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/without.js"(exports2, module2) { + var _includes = require_includes(); + var _curry2 = require_curry2(); + var flip = require_flip(); + var reject = require_reject(); + var without = /* @__PURE__ */ _curry2(function(xs, list) { + return reject(flip(_includes)(xs), list); + }); + module2.exports = without; + } +}); + +// ../plugin-commands-installation/lib/remove.js +var require_remove = __commonJS({ + "../plugin-commands-installation/lib/remove.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.completion = exports2.commandNames = exports2.help = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var error_1 = __importDefault(require_lib8()); + var find_workspace_packages_1 = __importStar2(require_lib22()); + var manifest_utils_1 = require_lib15(); + var pnpmfile_1 = require_lib91(); + var store_connection_manager_1 = require_lib63(); + var supi_1 = require_lib88(); + var pick_1 = __importDefault(require_pick()); + var without_1 = __importDefault(require_without()); + var render_help_1 = __importDefault(require_lib30()); + var getSaveType_1 = __importDefault(require_getSaveType()); + var recursive_1 = __importDefault(require_recursive2()); + var RemoveMissingDepsError = class extends error_1.default { + constructor(opts) { + let message2 = "Cannot remove "; + message2 += `${opts.nonMatchedDependencies.map((dep) => `'${dep}'`).join(", ")}: `; + if (opts.availableDependencies.length > 0) { + message2 += `no such ${opts.nonMatchedDependencies.length > 1 ? "dependencies" : "dependency"} `; + message2 += `found${opts.targetDependenciesField ? ` in '${opts.targetDependenciesField}'` : ""}`; + const hint = `Available dependencies: ${opts.availableDependencies.join(", ")}`; + super("CANNOT_REMOVE_MISSING_DEPS", message2, { hint }); + return; + } + message2 += opts.targetDependenciesField ? `project has no '${opts.targetDependenciesField}'` : "project has no dependencies of any kind"; + super("CANNOT_REMOVE_MISSING_DEPS", message2); + } + }; + function rcOptionsTypes() { + return pick_1.default([ + "global-dir", + "global-pnpmfile", + "global", + "lockfile-dir", + "lockfile-directory", + "lockfile-only", + "lockfile", + "package-import-method", + "pnpmfile", + "reporter", + "save-dev", + "save-optional", + "save-prod", + "shared-workspace-lockfile", + "store", + "store-dir", + "virtual-store-dir" + ], config_1.types); + } + exports2.rcOptionsTypes = rcOptionsTypes; + var cliOptionsTypes = () => ({ + ...rcOptionsTypes(), + ...pick_1.default(["force"], config_1.types), + recursive: Boolean + }); + exports2.cliOptionsTypes = cliOptionsTypes; + function help() { + return render_help_1.default({ + aliases: ["rm", "uninstall", "un"], + description: "Removes packages from `node_modules` and from the project's `package.json`.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: 'Remove from every package found in subdirectories or from every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + }, + { + description: 'Remove the dependency only from "devDependencies"', + name: "--save-dev", + shortAlias: "-D" + }, + { + description: 'Remove the dependency only from "optionalDependencies"', + name: "--save-optional", + shortAlias: "-O" + }, + { + description: 'Remove the dependency only from "dependencies"', + name: "--save-prod", + shortAlias: "-P" + }, + common_cli_options_help_1.OPTIONS.globalDir, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + }, + common_cli_options_help_1.FILTERING + ], + url: cli_utils_1.docsUrl("remove"), + usages: ["pnpm remove [@]..."] + }); + } + exports2.help = help; + exports2.commandNames = ["remove", "uninstall", "rm", "un"]; + var completion = async (cliOpts, params) => { + return cli_utils_1.readDepNameCompletions(cliOpts.dir); + }; + exports2.completion = completion; + async function handler(opts, params) { + var _a, _b; + if (params.length === 0) + throw new error_1.default("MUST_REMOVE_SOMETHING", "At least one dependency name should be specified for removal"); + const include = { + dependencies: opts.production !== false, + devDependencies: opts.dev !== false, + optionalDependencies: opts.optional !== false + }; + if (opts.recursive && opts.allProjects != null && opts.selectedProjectsGraph != null && opts.workspaceDir) { + await recursive_1.default(opts.allProjects, params, { ...opts, include, selectedProjectsGraph: opts.selectedProjectsGraph, workspaceDir: opts.workspaceDir }, "remove"); + return; + } + const store = await store_connection_manager_1.createOrConnectStoreController(opts); + const removeOpts = Object.assign(opts, { + storeController: store.ctrl, + storeDir: store.dir, + include + }); + if (!opts.ignorePnpmfile) { + removeOpts["hooks"] = pnpmfile_1.requireHooks((_a = opts.lockfileDir) !== null && _a !== void 0 ? _a : opts.dir, opts); + } + removeOpts["workspacePackages"] = opts.workspaceDir ? find_workspace_packages_1.arrayOfWorkspacePackagesToMap(await find_workspace_packages_1.default(opts.workspaceDir, opts)) : void 0; + const targetDependenciesField = getSaveType_1.default(opts); + const { manifest: currentManifest, writeProjectManifest } = await cli_utils_1.readProjectManifest(opts.dir, opts); + const availableDependencies = Object.keys(targetDependenciesField === void 0 ? manifest_utils_1.getAllDependenciesFromManifest(currentManifest) : (_b = currentManifest[targetDependenciesField]) !== null && _b !== void 0 ? _b : {}); + const nonMatchedDependencies = without_1.default(availableDependencies, params); + if (nonMatchedDependencies.length !== 0) { + throw new RemoveMissingDepsError({ + availableDependencies, + nonMatchedDependencies, + targetDependenciesField + }); + } + const [mutationResult] = await supi_1.mutateModules([ + { + binsDir: opts.bin, + dependencyNames: params, + manifest: currentManifest, + mutation: "uninstallSome", + rootDir: opts.dir, + targetDependenciesField + } + ], removeOpts); + await writeProjectManifest(mutationResult.manifest); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-installation/lib/unlink.js +var require_unlink = __commonJS({ + "../plugin-commands-installation/lib/unlink.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.rcOptionsTypes = exports2.cliOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var store_connection_manager_1 = require_lib63(); + var supi_1 = require_lib88(); + var render_help_1 = __importDefault(require_lib30()); + var install_1 = require_install2(); + Object.defineProperty(exports2, "cliOptionsTypes", { enumerable: true, get: function() { + return install_1.cliOptionsTypes; + } }); + Object.defineProperty(exports2, "rcOptionsTypes", { enumerable: true, get: function() { + return install_1.rcOptionsTypes; + } }); + var recursive_1 = __importDefault(require_recursive2()); + exports2.commandNames = ["unlink", "dislink"]; + function help() { + return render_help_1.default({ + aliases: ["dislink"], + description: "Removes the link created by `pnpm link` and reinstalls package if it is saved in `package.json`", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: 'Unlink in every package found in subdirectories or in every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + }, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + } + ], + url: cli_utils_1.docsUrl("unlink"), + usages: [ + "pnpm unlink (in package dir)", + "pnpm unlink ..." + ] + }); + } + exports2.help = help; + async function handler(opts, params) { + if (opts.recursive && opts.allProjects != null && opts.selectedProjectsGraph != null && opts.workspaceDir) { + await recursive_1.default(opts.allProjects, params, { ...opts, selectedProjectsGraph: opts.selectedProjectsGraph, workspaceDir: opts.workspaceDir }, "unlink"); + return; + } + const store = await store_connection_manager_1.createOrConnectStoreController(opts); + const unlinkOpts = Object.assign(opts, { + globalBin: opts.bin, + storeController: store.ctrl, + storeDir: store.dir + }); + if (!params || params.length === 0) { + return supi_1.mutateModules([ + { + dependencyNames: params, + manifest: await cli_utils_1.readProjectManifestOnly(opts.dir, opts), + mutation: "unlinkSome", + rootDir: opts.dir + } + ], unlinkOpts); + } + return supi_1.mutateModules([ + { + manifest: await cli_utils_1.readProjectManifestOnly(opts.dir, opts), + mutation: "unlink", + rootDir: opts.dir + } + ], unlinkOpts); + } + exports2.handler = handler; + } +}); + +// ../outdated/lib/createManifestGetter.js +var require_createManifestGetter = __commonJS({ + "../outdated/lib/createManifestGetter.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getManifest = exports2.createManifestGetter = void 0; + var client_1 = require_lib49(); + var pick_registry_for_package_1 = __importDefault(require_lib50()); + function createManifestGetter(opts) { + const resolve = client_1.createResolver({ ...opts, authConfig: opts.rawConfig }); + return getManifest.bind(null, resolve, opts); + } + exports2.createManifestGetter = createManifestGetter; + async function getManifest(resolve, opts, packageName, pref) { + var _a; + const resolution = await resolve({ alias: packageName, pref }, { + lockfileDir: opts.lockfileDir, + preferredVersions: {}, + projectDir: opts.dir, + registry: pick_registry_for_package_1.default(opts.registries, packageName, pref) + }); + return (_a = resolution === null || resolution === void 0 ? void 0 : resolution.manifest) !== null && _a !== void 0 ? _a : null; + } + exports2.getManifest = getManifest; + } +}); + +// ../outdated/lib/outdated.js +var require_outdated = __commonJS({ + "../outdated/lib/outdated.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var constants_1 = require_lib7(); + var error_1 = __importDefault(require_lib8()); + var lockfile_file_1 = require_lib57(); + var lockfile_utils_1 = require_lib53(); + var manifest_utils_1 = require_lib15(); + var types_1 = require_lib14(); + var dp = __importStar2(require_lib33()); + var semver_1 = __importDefault(require_semver2()); + __exportStar(require_createManifestGetter(), exports2); + async function outdated(opts) { + var _a; + if (packageHasNoDeps(opts.manifest)) + return []; + if (opts.wantedLockfile == null) { + throw new error_1.default("OUTDATED_NO_LOCKFILE", "No lockfile in this directory. Run `pnpm install` to generate one."); + } + const allDeps = manifest_utils_1.getAllDependenciesFromManifest(opts.manifest); + const importerId = lockfile_file_1.getLockfileImporterId(opts.lockfileDir, opts.prefix); + const currentLockfile = (_a = opts.currentLockfile) !== null && _a !== void 0 ? _a : { importers: { [importerId]: {} } }; + const outdated2 = []; + await Promise.all(types_1.DEPENDENCIES_FIELDS.map(async (depType) => { + var _a2; + if (((_a2 = opts.include) === null || _a2 === void 0 ? void 0 : _a2[depType]) === false || opts.wantedLockfile.importers[importerId][depType] == null) + return; + let pkgs = Object.keys(opts.wantedLockfile.importers[importerId][depType]); + if (opts.match != null) { + pkgs = pkgs.filter((pkgName) => opts.match(pkgName)); + } + await Promise.all(pkgs.map(async (alias) => { + var _a3, _b, _c, _d, _e, _f, _g; + const ref = opts.wantedLockfile.importers[importerId][depType][alias]; + if (ref.startsWith("file:")) { + return; + } + const relativeDepPath = dp.refToRelative(ref, alias); + if (relativeDepPath === null) + return; + const pkgSnapshot = (_a3 = opts.wantedLockfile.packages) === null || _a3 === void 0 ? void 0 : _a3[relativeDepPath]; + if (pkgSnapshot == null) { + throw new Error(`Invalid ${constants_1.WANTED_LOCKFILE} file. ${relativeDepPath} not found in packages field`); + } + const currentRef = (_c = (_b = currentLockfile.importers[importerId]) === null || _b === void 0 ? void 0 : _b[depType]) === null || _c === void 0 ? void 0 : _c[alias]; + const currentRelative = currentRef && dp.refToRelative(currentRef, alias); + const current = (_d = currentRelative && dp.parse(currentRelative).version) !== null && _d !== void 0 ? _d : currentRef; + const wanted = (_e = dp.parse(relativeDepPath).version) !== null && _e !== void 0 ? _e : ref; + const { name: packageName } = lockfile_utils_1.nameVerFromPkgSnapshot(relativeDepPath, pkgSnapshot); + if (pkgSnapshot.resolution && (pkgSnapshot.resolution["type"] || pkgSnapshot.name)) { + if (current !== wanted) { + outdated2.push({ + alias, + belongsTo: depType, + current, + latestManifest: void 0, + packageName, + wanted + }); + } + return; + } + const name = (_f = dp.parse(relativeDepPath).name) !== null && _f !== void 0 ? _f : packageName; + const latestManifest = await opts.getLatestManifest(name, opts.compatible ? (_g = allDeps[name]) !== null && _g !== void 0 ? _g : "latest" : "latest"); + if (latestManifest == null) + return; + if (!current) { + outdated2.push({ + alias, + belongsTo: depType, + latestManifest, + packageName, + wanted + }); + return; + } + if (current !== wanted || semver_1.default.lt(current, latestManifest.version) || latestManifest.deprecated) { + outdated2.push({ + alias, + belongsTo: depType, + current, + latestManifest, + packageName, + wanted + }); + } + })); + })); + return outdated2.sort((pkg1, pkg2) => pkg1.packageName.localeCompare(pkg2.packageName)); + } + exports2.default = outdated; + function packageHasNoDeps(manifest) { + return (manifest.dependencies == null || isEmpty(manifest.dependencies)) && (manifest.devDependencies == null || isEmpty(manifest.devDependencies)) && (manifest.optionalDependencies == null || isEmpty(manifest.optionalDependencies)); + } + function isEmpty(obj) { + return Object.keys(obj).length === 0; + } + } +}); + +// ../outdated/lib/outdatedDepsOfProjects.js +var require_outdatedDepsOfProjects = __commonJS({ + "../outdated/lib/outdatedDepsOfProjects.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var lockfile_file_1 = require_lib57(); + var matcher_1 = __importDefault(require_lib23()); + var modules_yaml_1 = require_lib64(); + var unnest_1 = __importDefault(require_unnest()); + var createManifestGetter_1 = require_createManifestGetter(); + var outdated_1 = __importDefault(require_outdated()); + async function outdatedDepsOfProjects(pkgs, args2, opts) { + var _a, _b, _c; + if (!opts.lockfileDir) { + return unnest_1.default(await Promise.all(pkgs.map(async (pkg) => outdatedDepsOfProjects([pkg], args2, { ...opts, lockfileDir: pkg.dir })))); + } + const lockfileDir = (_a = opts.lockfileDir) !== null && _a !== void 0 ? _a : opts.dir; + const modules = await modules_yaml_1.read(path_1.default.join(lockfileDir, "node_modules")); + const virtualStoreDir = (_b = modules === null || modules === void 0 ? void 0 : modules.virtualStoreDir) !== null && _b !== void 0 ? _b : path_1.default.join(lockfileDir, "node_modules/.pnpm"); + const currentLockfile = await lockfile_file_1.readCurrentLockfile(virtualStoreDir, { ignoreIncompatible: false }); + const wantedLockfile = (_c = await lockfile_file_1.readWantedLockfile(lockfileDir, { ignoreIncompatible: false })) !== null && _c !== void 0 ? _c : currentLockfile; + const getLatestManifest = createManifestGetter_1.createManifestGetter({ + ...opts, + fullMetadata: opts.fullMetadata === true, + lockfileDir + }); + return Promise.all(pkgs.map(async ({ dir, manifest }) => { + const match = args2.length > 0 && matcher_1.default(args2) || void 0; + return outdated_1.default({ + compatible: opts.compatible, + currentLockfile, + getLatestManifest, + include: opts.include, + lockfileDir, + manifest, + match, + prefix: dir, + wantedLockfile + }); + })); + } + exports2.default = outdatedDepsOfProjects; + } +}); + +// ../outdated/lib/index.js +var require_lib95 = __commonJS({ + "../outdated/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.outdatedDepsOfProjects = void 0; + var outdatedDepsOfProjects_1 = __importDefault(require_outdatedDepsOfProjects()); + exports2.outdatedDepsOfProjects = outdatedDepsOfProjects_1.default; + } +}); + +// ../../node_modules/.pnpm/@pnpm+colorize-semver-diff@1.0.1/node_modules/@pnpm/colorize-semver-diff/lib/index.js +var require_lib96 = __commonJS({ + "../../node_modules/.pnpm/@pnpm+colorize-semver-diff@1.0.1/node_modules/@pnpm/colorize-semver-diff/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var chalk = require_source(); + var DIFF_COLORS = { + feature: chalk.yellowBright.bold, + fix: chalk.greenBright.bold + }; + function colorizeSemverDiff(semverDiff) { + var _a; + if (!semverDiff) { + throw new TypeError("semverDiff must be defined"); + } + if (typeof semverDiff.change !== "string") { + throw new TypeError("semverDiff.change must be defined"); + } + const highlight = (_a = DIFF_COLORS[semverDiff.change]) !== null && _a !== void 0 ? _a : chalk.redBright.bold; + const same = joinVersionTuples(semverDiff.diff[0], 0); + const other = highlight(joinVersionTuples(semverDiff.diff[1], semverDiff.diff[0].length)); + if (!same) + return other; + if (!other) { + return same; + } + return semverDiff.diff[0].length === 3 ? `${same}-${other}` : `${same}.${other}`; + } + exports2.default = colorizeSemverDiff; + function joinVersionTuples(versionTuples, startIndex) { + const neededForSemver = 3 - startIndex; + if (versionTuples.length <= neededForSemver || neededForSemver <= 0) { + return versionTuples.join("."); + } + return `${versionTuples.slice(0, neededForSemver).join(".")}-${versionTuples.slice(neededForSemver).join(".")}`; + } + } +}); + +// ../../node_modules/.pnpm/@pnpm+semver-diff@1.0.2/node_modules/@pnpm/semver-diff/lib/index.js +var require_lib97 = __commonJS({ + "../../node_modules/.pnpm/@pnpm+semver-diff@1.0.2/node_modules/@pnpm/semver-diff/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var SEMVER_CHANGE_BY_TUPLE_NUMBER = ["breaking", "feature", "fix"]; + function semverDiff(version1, version2) { + if (version1 === version2) { + return { + change: null, + diff: [parseVersion(version1), []] + }; + } + const version1Tuples = parseVersion(version1); + const version2Tuples = parseVersion(version2); + const same = []; + let change = "unknown"; + const maxTuples = Math.max(version1Tuples.length, version2Tuples.length); + let unstable = version1Tuples[0] === "0" || version2Tuples[0] === "0" || maxTuples > 3; + for (let i = 0; i < maxTuples; i++) { + if (version1Tuples[i] === version2Tuples[i]) { + same.push(version1Tuples[i]); + continue; + } + if (unstable === false) { + change = SEMVER_CHANGE_BY_TUPLE_NUMBER[i] || "unknown"; + } + return { + change, + diff: [same, version2Tuples.slice(i)] + }; + } + return { + change, + diff: [same, []] + }; + } + exports2.default = semverDiff; + function parseVersion(version) { + const dashIndex = version.indexOf("-"); + let normalVersion; + let prereleaseVersion; + if (dashIndex === -1) { + normalVersion = version; + } else { + normalVersion = version.substr(0, dashIndex); + prereleaseVersion = version.substr(dashIndex + 1); + } + return [ + ...normalVersion.split("."), + ...typeof prereleaseVersion !== "undefined" ? prereleaseVersion.split(".") : [] + ]; + } + } +}); + +// ../plugin-commands-installation/lib/update/getUpdateChoices.js +var require_getUpdateChoices = __commonJS({ + "../plugin-commands-installation/lib/update/getUpdateChoices.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var colorize_semver_diff_1 = __importDefault(require_lib96()); + var semver_diff_1 = __importDefault(require_lib97()); + var table_1 = require_dist10(); + var isEmpty_1 = __importDefault(require_isEmpty2()); + var unnest_1 = __importDefault(require_unnest()); + function default_1(outdatedPkgsOfProjects) { + const allOutdatedPkgs = mergeOutdatedPkgs(outdatedPkgsOfProjects); + if (isEmpty_1.default(allOutdatedPkgs)) { + return []; + } + const rowsGroupedByPkgs = Object.entries(allOutdatedPkgs).sort(([pkgName1], [pkgName2]) => pkgName1.localeCompare(pkgName2)).map(([pkgName, outdatedPkgs]) => ({ + pkgName, + rows: outdatedPkgsRows(Object.values(outdatedPkgs)) + })); + const renderedTable = alignColumns(unnest_1.default(rowsGroupedByPkgs.map(({ rows }) => rows))); + const choices = []; + let i = 0; + for (const { pkgName, rows } of rowsGroupedByPkgs) { + choices.push({ + message: renderedTable.slice(i, i + rows.length).join("\n "), + name: pkgName + }); + i += rows.length; + } + return choices; + } + exports2.default = default_1; + function mergeOutdatedPkgs(outdatedPkgs) { + var _a; + const allOutdatedPkgs = {}; + for (const outdatedPkg of outdatedPkgs) { + if (!allOutdatedPkgs[outdatedPkg.packageName]) { + allOutdatedPkgs[outdatedPkg.packageName] = {}; + } + const key = JSON.stringify([ + (_a = outdatedPkg.latestManifest) === null || _a === void 0 ? void 0 : _a.version, + outdatedPkg.current + ]); + if (!allOutdatedPkgs[outdatedPkg.packageName][key]) { + allOutdatedPkgs[outdatedPkg.packageName][key] = outdatedPkg; + continue; + } + if (allOutdatedPkgs[outdatedPkg.packageName][key].belongsTo === "dependencies") + continue; + if (outdatedPkg.belongsTo !== "devDependencies") { + allOutdatedPkgs[outdatedPkg.packageName][key].belongsTo = outdatedPkg.belongsTo; + } + } + return allOutdatedPkgs; + } + function outdatedPkgsRows(outdatedPkgs) { + return outdatedPkgs.map((outdatedPkg) => { + const sdiff = semver_diff_1.default(outdatedPkg.wanted, outdatedPkg.latestManifest.version); + const nextVersion = sdiff.change === null ? outdatedPkg.latestManifest.version : colorize_semver_diff_1.default(sdiff); + let label = outdatedPkg.packageName; + switch (outdatedPkg.belongsTo) { + case "devDependencies": { + label += " (dev)"; + break; + } + case "optionalDependencies": { + label += " (optional)"; + break; + } + } + return [label, outdatedPkg.current, "\u276F", nextVersion]; + }); + } + function alignColumns(rows) { + return table_1.table(rows, { + border: table_1.getBorderCharacters("void"), + columnDefault: { + paddingLeft: 0, + paddingRight: 1 + }, + columns: { + 1: { alignment: "right" } + }, + drawHorizontalLine: () => false + }).split("\n"); + } + } +}); + +// ../plugin-commands-installation/lib/update/index.js +var require_update = __commonJS({ + "../plugin-commands-installation/lib/update/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.completion = exports2.commandNames = exports2.shorthands = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var matcher_1 = __importDefault(require_lib23()); + var outdated_1 = require_lib95(); + var enquirer_1 = require_enquirer(); + var chalk_1 = __importDefault(require_source()); + var pick_1 = __importDefault(require_pick()); + var unnest_1 = __importDefault(require_unnest()); + var render_help_1 = __importDefault(require_lib30()); + var installDeps_1 = __importDefault(require_installDeps()); + var getUpdateChoices_1 = __importDefault(require_getUpdateChoices()); + function rcOptionsTypes() { + return pick_1.default([ + "depth", + "dev", + "engine-strict", + "fetch-retries", + "fetch-retry-factor", + "fetch-retry-maxtimeout", + "fetch-retry-mintimeout", + "fetch-timeout", + "force", + "global-dir", + "global-pnpmfile", + "global", + "https-proxy", + "ignore-pnpmfile", + "ignore-scripts", + "lockfile-dir", + "lockfile-directory", + "lockfile-only", + "lockfile", + "network-concurrency", + "noproxy", + "npmPath", + "offline", + "only", + "optional", + "package-import-method", + "pnpmfile", + "prefer-offline", + "production", + "proxy", + "registry", + "reporter", + "save", + "save-exact", + "save-workspace-protocol", + "shamefully-flatten", + "shamefully-hoist", + "shared-workspace-lockfile", + "side-effects-cache-readonly", + "side-effects-cache", + "store", + "store-dir", + "unsafe-perm", + "use-running-store-server" + ], config_1.types); + } + exports2.rcOptionsTypes = rcOptionsTypes; + function cliOptionsTypes() { + return { + ...rcOptionsTypes(), + interactive: Boolean, + latest: Boolean, + recursive: Boolean, + workspace: Boolean + }; + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.shorthands = { + D: "--dev", + P: "--production" + }; + exports2.commandNames = ["update", "up", "upgrade"]; + var completion = async (cliOpts) => { + return cli_utils_1.readDepNameCompletions(cliOpts.dir); + }; + exports2.completion = completion; + function help() { + return render_help_1.default({ + aliases: ["up", "upgrade"], + description: 'Updates packages to their latest version based on the specified range. You can use "*" in package name to update all packages with the same pattern.', + descriptionLists: [ + { + title: "Options", + list: [ + { + description: 'Update in every package found in subdirectories or every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + }, + { + description: "Update globally installed packages", + name: "--global", + shortAlias: "-g" + }, + { + description: "How deep should levels of dependencies be inspected. Infinity is default. 0 would mean top-level dependencies only", + name: "--depth " + }, + { + description: "Ignore version ranges in package.json", + name: "--latest", + shortAlias: "-L" + }, + { + description: 'Update packages only in "dependencies" and "optionalDependencies"', + name: "--prod", + shortAlias: "-P" + }, + { + description: 'Update packages only in "devDependencies"', + name: "--dev", + shortAlias: "-D" + }, + { + description: `Don't update packages in "optionalDependencies"`, + name: "--no-optional" + }, + { + description: "Tries to link all packages from the workspace. Versions are updated to match the versions of packages inside the workspace. If specific packages are updated, the command will fail if any of the updated dependencies is not found inside the workspace", + name: "--workspace" + }, + { + description: "Show outdated dependencies and select which ones to update", + name: "--interactive", + shortAlias: "-i" + }, + common_cli_options_help_1.OPTIONS.globalDir, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + }, + common_cli_options_help_1.FILTERING + ], + url: cli_utils_1.docsUrl("update"), + usages: ["pnpm update [-g] [...]"] + }); + } + exports2.help = help; + async function handler(opts, params = []) { + if (opts.interactive) { + return interactiveUpdate(params, opts); + } + return update(params, opts); + } + exports2.handler = handler; + async function interactiveUpdate(input, opts) { + const include = makeIncludeDependenciesFromCLI(opts.cliOptions); + const projects = opts.selectedProjectsGraph != null ? Object.values(opts.selectedProjectsGraph).map((wsPkg) => wsPkg.package) : [ + { + dir: opts.dir, + manifest: await cli_utils_1.readProjectManifestOnly(opts.dir, opts) + } + ]; + const outdatedPkgsOfProjects = await outdated_1.outdatedDepsOfProjects(projects, input, { + ...opts, + compatible: opts.latest !== true, + include, + retry: { + factor: opts.fetchRetryFactor, + maxTimeout: opts.fetchRetryMaxtimeout, + minTimeout: opts.fetchRetryMintimeout, + retries: opts.fetchRetries + }, + timeout: opts.fetchTimeout + }); + const choices = getUpdateChoices_1.default(unnest_1.default(outdatedPkgsOfProjects)); + if (choices.length === 0) { + if (opts.latest) { + return "All of your dependencies are already up-to-date"; + } + return "All of your dependencies are already up-to-date inside the specified ranges. Use the --latest option to update the ranges in package.json"; + } + const { updateDependencies } = await enquirer_1.prompt({ + choices, + footer: "\nEnter to start updating. Ctrl-c to cancel.", + indicator(state, choice) { + return ` ${choice.enabled ? "\u25CF" : "\u25CB"}`; + }, + message: `Choose which packages to update (Press ${chalk_1.default.cyan("")} to select, ${chalk_1.default.cyan("")} to toggle all, ${chalk_1.default.cyan("")} to invert selection)`, + name: "updateDependencies", + pointer: "\u276F", + styles: { + dark: chalk_1.default.white, + em: chalk_1.default.bgBlack.whiteBright, + success: chalk_1.default.white + }, + type: "multiselect", + validate(value) { + if (value.length === 0) { + return "You must choose at least one package."; + } + return true; + }, + j() { + return this.down(); + }, + k() { + return this.up(); + } + }); + return update(updateDependencies, opts); + } + async function update(dependencies, opts) { + var _a; + const includeDirect = makeIncludeDependenciesFromCLI(opts.cliOptions); + const include = { + dependencies: opts.rawConfig.production !== false, + devDependencies: opts.rawConfig.dev !== false, + optionalDependencies: opts.rawConfig.optional !== false + }; + const depth = (_a = opts.depth) !== null && _a !== void 0 ? _a : Infinity; + return installDeps_1.default({ + ...opts, + allowNew: false, + depth, + includeDirect, + include, + update: true, + updateMatching: dependencies.length > 0 && dependencies.every((dep) => !dep.substring(1).includes("@")) && depth > 0 && !opts.latest ? matcher_1.default(dependencies) : void 0, + updatePackageManifest: opts.save !== false + }, dependencies); + } + function makeIncludeDependenciesFromCLI(opts) { + return { + dependencies: opts.production === true || opts.dev !== true && opts.optional !== true, + devDependencies: opts.dev === true || opts.production !== true && opts.optional !== true, + optionalDependencies: opts.optional === true || opts.production !== true && opts.dev !== true + }; + } + } +}); + +// ../plugin-commands-installation/lib/index.js +var require_lib98 = __commonJS({ + "../plugin-commands-installation/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.update = exports2.unlink = exports2.remove = exports2.prune = exports2.link = exports2.install = exports2.fetch = exports2.add = void 0; + var add = __importStar2(require_add()); + exports2.add = add; + var install = __importStar2(require_install2()); + exports2.install = install; + var fetch = __importStar2(require_fetch3()); + exports2.fetch = fetch; + var link = __importStar2(require_link3()); + exports2.link = link; + var prune = __importStar2(require_prune3()); + exports2.prune = prune; + var remove = __importStar2(require_remove()); + exports2.remove = remove; + var unlink = __importStar2(require_unlink()); + exports2.unlink = unlink; + var update = __importStar2(require_update()); + exports2.update = update; + } +}); + +// ../dependencies-hierarchy/lib/index.js +var require_lib99 = __commonJS({ + "../dependencies-hierarchy/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var lockfile_file_1 = require_lib57(); + var lockfile_utils_1 = require_lib53(); + var modules_yaml_1 = require_lib64(); + var normalize_registries_1 = __importDefault(require_lib65()); + var read_modules_dir_1 = __importDefault(require_lib69()); + var read_package_json_1 = require_lib32(); + var types_1 = require_lib14(); + var dependency_path_1 = require_lib33(); + var normalize_path_1 = __importDefault(require_normalize_path()); + var realpath_missing_1 = __importDefault(require_realpath_missing()); + var resolve_link_target_1 = __importDefault(require_resolve_link_target()); + async function dependenciesHierarchy(projectPaths, maybeOpts) { + var _a, _b, _c; + if (!maybeOpts || !maybeOpts.lockfileDir) { + throw new TypeError("opts.lockfileDir is required"); + } + const modulesDir = await realpath_missing_1.default(path_1.default.join(maybeOpts.lockfileDir, "node_modules")); + const modules = await modules_yaml_1.read(modulesDir); + const registries = normalize_registries_1.default({ + ...maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.registries, + ...modules === null || modules === void 0 ? void 0 : modules.registries + }); + const currentLockfile = (_a = (modules === null || modules === void 0 ? void 0 : modules.virtualStoreDir) && await lockfile_file_1.readCurrentLockfile(modules.virtualStoreDir, { ignoreIncompatible: false })) !== null && _a !== void 0 ? _a : null; + const result = {}; + if (!currentLockfile) { + for (const projectPath of projectPaths) { + result[projectPath] = {}; + } + return result; + } + const opts = { + depth: maybeOpts.depth || 0, + include: (_b = maybeOpts.include) !== null && _b !== void 0 ? _b : { + dependencies: true, + devDependencies: true, + optionalDependencies: true + }, + lockfileDir: maybeOpts.lockfileDir, + registries, + search: maybeOpts.search, + skipped: new Set((_c = modules === null || modules === void 0 ? void 0 : modules.skipped) !== null && _c !== void 0 ? _c : []) + }; + (await Promise.all(projectPaths.map(async (projectPath) => { + return [ + projectPath, + await dependenciesHierarchyForPackage(projectPath, currentLockfile, opts) + ]; + }))).forEach(([projectPath, dependenciesHierarchy2]) => { + result[projectPath] = dependenciesHierarchy2; + }); + return result; + } + exports2.default = dependenciesHierarchy; + async function dependenciesHierarchyForPackage(projectPath, currentLockfile, opts) { + var _a, _b, _c, _d, _e; + const importerId = lockfile_file_1.getLockfileImporterId(opts.lockfileDir, projectPath); + if (!currentLockfile.importers[importerId]) + return {}; + const modulesDir = path_1.default.join(projectPath, "node_modules"); + const savedDeps = getAllDirectDependencies(currentLockfile.importers[importerId]); + const allDirectDeps = (_a = await read_modules_dir_1.default(modulesDir)) !== null && _a !== void 0 ? _a : []; + const unsavedDeps = allDirectDeps.filter((directDep) => !savedDeps[directDep]); + const wantedLockfile = (_b = await lockfile_file_1.readWantedLockfile(opts.lockfileDir, { ignoreIncompatible: false })) !== null && _b !== void 0 ? _b : { packages: {} }; + const getChildrenTree = getTree.bind(null, { + currentDepth: 1, + currentPackages: (_c = currentLockfile.packages) !== null && _c !== void 0 ? _c : {}, + includeOptionalDependencies: opts.include.optionalDependencies, + lockfileDir: opts.lockfileDir, + maxDepth: opts.depth, + modulesDir, + registries: opts.registries, + search: opts.search, + skipped: opts.skipped, + wantedPackages: (_d = wantedLockfile.packages) !== null && _d !== void 0 ? _d : {} + }); + const result = {}; + for (const dependenciesField of types_1.DEPENDENCIES_FIELDS.sort().filter((dependenciedField) => opts.include[dependenciedField])) { + const topDeps = (_e = currentLockfile.importers[importerId][dependenciesField]) !== null && _e !== void 0 ? _e : {}; + result[dependenciesField] = []; + Object.keys(topDeps).forEach((alias) => { + var _a2, _b2, _c2; + const { packageInfo, packageAbsolutePath } = getPkgInfo({ + alias, + currentPackages: (_a2 = currentLockfile.packages) !== null && _a2 !== void 0 ? _a2 : {}, + lockfileDir: opts.lockfileDir, + modulesDir, + ref: topDeps[alias], + registries: opts.registries, + skipped: opts.skipped, + wantedPackages: (_b2 = wantedLockfile.packages) !== null && _b2 !== void 0 ? _b2 : {} + }); + let newEntry = null; + const matchedSearched = (_c2 = opts.search) === null || _c2 === void 0 ? void 0 : _c2.call(opts, packageInfo); + if (packageAbsolutePath === null) { + if (opts.search != null && !matchedSearched) + return; + newEntry = packageInfo; + } else { + const relativeId = dependency_path_1.refToRelative(topDeps[alias], alias); + if (relativeId) { + const dependencies = getChildrenTree([relativeId], relativeId); + if (dependencies.length > 0) { + newEntry = { + ...packageInfo, + dependencies + }; + } else if (opts.search == null || matchedSearched) { + newEntry = packageInfo; + } + } + } + if (newEntry != null) { + if (matchedSearched) { + newEntry.searched = true; + } + result[dependenciesField].push(newEntry); + } + }); + } + await Promise.all(unsavedDeps.map(async (unsavedDep) => { + var _a2, _b2, _c2; + let pkgPath = path_1.default.join(modulesDir, unsavedDep); + let version; + try { + pkgPath = await resolve_link_target_1.default(pkgPath); + version = `link:${normalize_path_1.default(path_1.default.relative(projectPath, pkgPath))}`; + } catch (err) { + const pkg2 = await read_package_json_1.safeReadPackageFromDir(pkgPath); + version = (_a2 = pkg2 === null || pkg2 === void 0 ? void 0 : pkg2.version) !== null && _a2 !== void 0 ? _a2 : "undefined"; + } + const pkg = { + alias: unsavedDep, + isMissing: false, + isPeer: false, + isSkipped: false, + name: unsavedDep, + path: pkgPath, + version + }; + const matchedSearched = (_b2 = opts.search) === null || _b2 === void 0 ? void 0 : _b2.call(opts, pkg); + if (opts.search != null && !matchedSearched) + return; + const newEntry = pkg; + if (matchedSearched) { + newEntry.searched = true; + } + result.unsavedDependencies = (_c2 = result.unsavedDependencies) !== null && _c2 !== void 0 ? _c2 : []; + result.unsavedDependencies.push(newEntry); + })); + return result; + } + function getAllDirectDependencies(projectSnapshot) { + return { + ...projectSnapshot.dependencies, + ...projectSnapshot.devDependencies, + ...projectSnapshot.optionalDependencies + }; + } + function getTree(opts, keypath, parentId) { + const dependenciesCache = new Map(); + return getTreeHelper(dependenciesCache, opts, keypath, parentId).dependencies; + } + function getTreeHelper(dependenciesCache, opts, keypath, parentId) { + var _a; + const result = { dependencies: [] }; + if (opts.currentDepth > opts.maxDepth || !opts.currentPackages || !opts.currentPackages[parentId]) + return result; + const deps = !opts.includeOptionalDependencies ? opts.currentPackages[parentId].dependencies : { + ...opts.currentPackages[parentId].dependencies, + ...opts.currentPackages[parentId].optionalDependencies + }; + if (deps == null) + return result; + const getChildrenTree = getTreeHelper.bind(null, dependenciesCache, { + ...opts, + currentDepth: opts.currentDepth + 1 + }); + const peers = new Set(Object.keys((_a = opts.currentPackages[parentId].peerDependencies) !== null && _a !== void 0 ? _a : {})); + Object.keys(deps).forEach((alias) => { + var _a2; + const { packageInfo, packageAbsolutePath } = getPkgInfo({ + alias, + currentPackages: opts.currentPackages, + lockfileDir: opts.lockfileDir, + modulesDir: opts.modulesDir, + peers, + ref: deps[alias], + registries: opts.registries, + skipped: opts.skipped, + wantedPackages: opts.wantedPackages + }); + let circular; + const matchedSearched = (_a2 = opts.search) === null || _a2 === void 0 ? void 0 : _a2.call(opts, packageInfo); + let newEntry = null; + if (packageAbsolutePath === null) { + circular = false; + if (opts.search == null || matchedSearched) { + newEntry = packageInfo; + } + } else { + let dependencies; + const relativeId = dependency_path_1.refToRelative(deps[alias], alias); + circular = keypath.includes(relativeId); + if (circular) { + dependencies = []; + } else { + dependencies = dependenciesCache.get(packageAbsolutePath); + if (dependencies == null) { + const children = getChildrenTree(keypath.concat([relativeId]), relativeId); + dependencies = children.dependencies; + if (children.circular) { + result.circular = true; + } else { + dependenciesCache.set(packageAbsolutePath, dependencies); + } + } + } + if (dependencies.length > 0) { + newEntry = { + ...packageInfo, + dependencies + }; + } else if (opts.search == null || matchedSearched) { + newEntry = packageInfo; + } + } + if (newEntry != null) { + if (circular) { + newEntry.circular = true; + result.circular = true; + } + if (matchedSearched) { + newEntry.searched = true; + } + result.dependencies.push(newEntry); + } + }); + return result; + } + function getPkgInfo(opts) { + var _a; + let name; + let version; + let resolved; + let dev; + let optional; + let isSkipped = false; + let isMissing = false; + const depPath = dependency_path_1.refToRelative(opts.ref, opts.alias); + if (depPath) { + let pkgSnapshot; + if (opts.currentPackages[depPath]) { + pkgSnapshot = opts.currentPackages[depPath]; + const parsed = lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot); + name = parsed.name; + version = parsed.version; + } else { + pkgSnapshot = opts.wantedPackages[depPath]; + if (pkgSnapshot) { + const parsed = lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot); + name = parsed.name; + version = parsed.version; + } else { + name = opts.alias; + version = opts.ref; + } + isMissing = true; + isSkipped = opts.skipped.has(depPath); + } + resolved = lockfile_utils_1.pkgSnapshotToResolution(depPath, pkgSnapshot, opts.registries)["tarball"]; + dev = pkgSnapshot.dev; + optional = pkgSnapshot.optional; + } else { + name = opts.alias; + version = opts.ref; + } + const packageAbsolutePath = dependency_path_1.refToRelative(opts.ref, opts.alias); + const packageInfo = { + alias: opts.alias, + isMissing, + isPeer: Boolean((_a = opts.peers) === null || _a === void 0 ? void 0 : _a.has(opts.alias)), + isSkipped, + name, + path: depPath ? path_1.default.join(opts.modulesDir, ".pnpm", dependency_path_1.depPathToFilename(depPath, opts.lockfileDir)) : path_1.default.join(opts.modulesDir, "..", opts.ref.substr(5)), + version + }; + if (resolved) { + packageInfo["resolved"] = resolved; + } + if (optional === true) { + packageInfo["optional"] = true; + } + if (typeof dev === "boolean") { + packageInfo["dev"] = dev; + } + return { + packageAbsolutePath, + packageInfo + }; + } + } +}); + +// ../list/lib/createPackagesSearcher.js +var require_createPackagesSearcher = __commonJS({ + "../list/lib/createPackagesSearcher.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var matcher_1 = __importDefault(require_lib23()); + var npm_package_arg_1 = __importDefault(require_npa()); + var semver_1 = __importDefault(require_semver2()); + function createPatternSearcher(queries) { + const searchers = queries.map(parseSearchQuery).map((packageSelector) => search.bind(null, packageSelector)); + return (pkg) => searchers.some((search2) => search2(pkg)); + } + exports2.default = createPatternSearcher; + function search(packageSelector, pkg) { + if (!packageSelector.matchName(pkg.name)) { + return false; + } + if (packageSelector.matchVersion == null) { + return true; + } + return !pkg.version.startsWith("link:") && packageSelector.matchVersion(pkg.version); + } + function parseSearchQuery(query) { + const parsed = npm_package_arg_1.default(query); + if (parsed.raw === parsed.name) { + return { matchName: matcher_1.default(parsed.name) }; + } + if (parsed.type !== "version" && parsed.type !== "range") { + throw new Error(`Invalid queryument - ${query}. List can search only by version or range`); + } + return { + matchName: matcher_1.default(parsed.name), + matchVersion: (version) => semver_1.default.satisfies(version, parsed.fetchSpec) + }; + } + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/sortBy.js +var require_sortBy = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/sortBy.js"(exports2, module2) { + var _curry2 = require_curry2(); + var sortBy = /* @__PURE__ */ _curry2(function sortBy2(fn2, list) { + return Array.prototype.slice.call(list, 0).sort(function(a, b) { + var aa = fn2(a); + var bb = fn2(b); + return aa < bb ? -1 : aa > bb ? 1 : 0; + }); + }); + module2.exports = sortBy; + } +}); + +// ../list/lib/readPkg.js +var require_readPkg = __commonJS({ + "../list/lib/readPkg.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var read_package_json_1 = __importDefault(require_lib32()); + var p_limit_1 = __importDefault(require_p_limit()); + var limitPkgReads = p_limit_1.default(4); + exports2.default = async (pkgPath) => limitPkgReads(async () => read_package_json_1.default(pkgPath)); + } +}); + +// ../list/lib/getPkgInfo.js +var require_getPkgInfo = __commonJS({ + "../list/lib/getPkgInfo.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var readPkg_1 = __importDefault(require_readPkg()); + async function getPkgInfo(pkg) { + var _a; + let manifest; + try { + manifest = await readPkg_1.default(path_1.default.join(pkg.path, "node_modules", pkg.name, "package.json")); + } catch (err) { + manifest = { + description: "[Could not find additional info about this dependency]" + }; + } + return { + alias: pkg.alias, + from: pkg.name, + version: pkg.version, + resolved: pkg.resolved, + description: manifest.description, + homepage: manifest.homepage, + repository: (_a = manifest.repository && (typeof manifest.repository === "string" ? manifest.repository : manifest.repository.url)) !== null && _a !== void 0 ? _a : void 0 + }; + } + exports2.default = getPkgInfo; + } +}); + +// ../list/lib/renderJson.js +var require_renderJson = __commonJS({ + "../list/lib/renderJson.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toJsonResult = void 0; + var types_1 = require_lib14(); + var sortBy_1 = __importDefault(require_sortBy()); + var path_1 = __importDefault(require_path3()); + var getPkgInfo_1 = __importDefault(require_getPkgInfo()); + var sortPackages = sortBy_1.default(path_1.default(["pkg", "alias"])); + async function default_1(pkgs, opts) { + const jsonArr = await Promise.all(pkgs.map(async (pkg) => { + var _a; + const jsonObj = { + name: pkg.name, + version: pkg.version, + path: pkg.path + }; + for (const dependenciesField of [...types_1.DEPENDENCIES_FIELDS.sort(), "unsavedDependencies"]) { + if ((_a = pkg[dependenciesField]) === null || _a === void 0 ? void 0 : _a.length) { + jsonObj[dependenciesField] = await toJsonResult(pkg[dependenciesField], { long: opts.long }); + } + } + return jsonObj; + })); + return JSON.stringify(jsonArr, null, 2); + } + exports2.default = default_1; + async function toJsonResult(entryNodes, opts) { + const dependencies = {}; + await Promise.all(sortPackages(entryNodes).map(async (node) => { + var _a; + const subDependencies = await toJsonResult((_a = node.dependencies) !== null && _a !== void 0 ? _a : [], opts); + const dep = opts.long ? await getPkgInfo_1.default(node) : { + alias: node.alias, + from: node.name, + version: node.version, + resolved: node.resolved + }; + if (Object.keys(subDependencies).length > 0) { + dep["dependencies"] = subDependencies; + } + if (!dep.resolved) { + delete dep.resolved; + } + delete dep.alias; + dependencies[node.alias] = dep; + })); + return dependencies; + } + exports2.toJsonResult = toJsonResult; + } +}); + +// ../list/lib/renderParseable.js +var require_renderParseable = __commonJS({ + "../list/lib/renderParseable.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var sortBy_1 = __importDefault(require_sortBy()); + var prop_1 = __importDefault(require_prop()); + var sortPackages = sortBy_1.default(prop_1.default("name")); + async function default_1(pkgs, opts) { + return pkgs.map((pkg) => renderParseableForPackage(pkg, opts)).filter((p) => p.length !== 0).join("\n"); + } + exports2.default = default_1; + function renderParseableForPackage(pkg, opts) { + var _a, _b, _c, _d; + const pkgs = sortPackages(flatten([ + ...(_a = pkg.optionalDependencies) !== null && _a !== void 0 ? _a : [], + ...(_b = pkg.dependencies) !== null && _b !== void 0 ? _b : [], + ...(_c = pkg.devDependencies) !== null && _c !== void 0 ? _c : [], + ...(_d = pkg.unsavedDependencies) !== null && _d !== void 0 ? _d : [] + ])); + if (!opts.alwaysPrintRootPackage && pkgs.length === 0) + return ""; + if (opts.long) { + let firstLine = pkg.path; + if (pkg.name) { + firstLine += `:${pkg.name}`; + if (pkg.version) { + firstLine += `@${pkg.version}`; + } + } + return [ + firstLine, + ...pkgs.map((pkg2) => `${pkg2.path}:${pkg2.name}@${pkg2.version}`) + ].join("\n"); + } + return [ + pkg.path, + ...pkgs.map((pkg2) => pkg2.path) + ].join("\n"); + } + function flatten(nodes) { + var _a; + let packages = []; + for (const node of nodes) { + packages.push(node); + if ((_a = node.dependencies) === null || _a === void 0 ? void 0 : _a.length) { + packages = packages.concat(flatten(node.dependencies)); + } + } + return packages; + } + } +}); + +// ../../node_modules/.pnpm/archy@1.0.0/node_modules/archy/index.js +var require_archy = __commonJS({ + "../../node_modules/.pnpm/archy@1.0.0/node_modules/archy/index.js"(exports2, module2) { + module2.exports = function archy(obj, prefix, opts) { + if (prefix === void 0) + prefix = ""; + if (!opts) + opts = {}; + var chr = function(s) { + var chars = { + "\u2502": "|", + "\u2514": "`", + "\u251C": "+", + "\u2500": "-", + "\u252C": "-" + }; + return opts.unicode === false ? chars[s] : s; + }; + if (typeof obj === "string") + obj = { label: obj }; + var nodes = obj.nodes || []; + var lines = (obj.label || "").split("\n"); + var splitter = "\n" + prefix + (nodes.length ? chr("\u2502") : " ") + " "; + return prefix + lines.join(splitter) + "\n" + nodes.map(function(node, ix) { + var last = ix === nodes.length - 1; + var more = node.nodes && node.nodes.length; + var prefix_ = prefix + (last ? " " : chr("\u2502")) + " "; + return prefix + (last ? chr("\u2514") : chr("\u251C")) + chr("\u2500") + (more ? chr("\u252C") : chr("\u2500")) + " " + archy(node, prefix_, opts).slice(prefix.length + 2); + }).join(""); + }; + } +}); + +// ../../node_modules/.pnpm/strip-ansi@4.0.0/node_modules/strip-ansi/index.js +var require_strip_ansi3 = __commonJS({ + "../../node_modules/.pnpm/strip-ansi@4.0.0/node_modules/strip-ansi/index.js"(exports2, module2) { + "use strict"; + var ansiRegex = require_ansi_regex(); + module2.exports = (input) => typeof input === "string" ? input.replace(ansiRegex(), "") : input; + } +}); + +// ../../node_modules/.pnpm/string-width@2.1.1/node_modules/string-width/index.js +var require_string_width3 = __commonJS({ + "../../node_modules/.pnpm/string-width@2.1.1/node_modules/string-width/index.js"(exports2, module2) { + "use strict"; + var stripAnsi = require_strip_ansi3(); + var isFullwidthCodePoint = require_is_fullwidth_code_point2(); + module2.exports = (str) => { + if (typeof str !== "string" || str.length === 0) { + return 0; + } + str = stripAnsi(str); + let width = 0; + for (let i = 0; i < str.length; i++) { + const code = str.codePointAt(i); + if (code <= 31 || code >= 127 && code <= 159) { + continue; + } + if (code >= 768 && code <= 879) { + continue; + } + if (code > 65535) { + i++; + } + width += isFullwidthCodePoint(code) ? 2 : 1; + } + return width; + }; + } +}); + +// ../../node_modules/.pnpm/ansi-regex@2.1.1/node_modules/ansi-regex/index.js +var require_ansi_regex4 = __commonJS({ + "../../node_modules/.pnpm/ansi-regex@2.1.1/node_modules/ansi-regex/index.js"(exports2, module2) { + "use strict"; + module2.exports = function() { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; + }; + } +}); + +// ../../node_modules/.pnpm/strip-ansi@3.0.1/node_modules/strip-ansi/index.js +var require_strip_ansi4 = __commonJS({ + "../../node_modules/.pnpm/strip-ansi@3.0.1/node_modules/strip-ansi/index.js"(exports2, module2) { + "use strict"; + var ansiRegex = require_ansi_regex4()(); + module2.exports = function(str) { + return typeof str === "string" ? str.replace(ansiRegex, "") : str; + }; + } +}); + +// ../../node_modules/.pnpm/cli-columns@3.1.2/node_modules/cli-columns/index.js +var require_cli_columns = __commonJS({ + "../../node_modules/.pnpm/cli-columns@3.1.2/node_modules/cli-columns/index.js"(exports2, module2) { + "use strict"; + var stringWidth = require_string_width3(); + var stripAnsi = require_strip_ansi4(); + var concat = Array.prototype.concat; + var defaults = { + character: " ", + newline: "\n", + padding: 2, + sort: true, + width: 0 + }; + function byPlainText(a, b) { + const plainA = stripAnsi(a); + const plainB = stripAnsi(b); + if (plainA === plainB) { + return 0; + } + if (plainA > plainB) { + return 1; + } + return -1; + } + function makeArray() { + return []; + } + function makeList(count) { + return Array.apply(null, Array(count)); + } + function padCell(fullWidth, character, value) { + const valueWidth = stringWidth(value); + const filler = makeList(fullWidth - valueWidth + 1); + return value + filler.join(character); + } + function toRows(rows, cell, i) { + rows[i % rows.length].push(cell); + return rows; + } + function toString(arr) { + return arr.join(""); + } + function columns(values, options) { + values = concat.apply([], values); + options = Object.assign({}, defaults, options); + let cells = values.filter(Boolean).map(String); + if (options.sort !== false) { + cells = cells.sort(byPlainText); + } + const termWidth = options.width || process.stdout.columns; + const cellWidth = Math.max.apply(null, cells.map(stringWidth)) + options.padding; + const columnCount = Math.floor(termWidth / cellWidth) || 1; + const rowCount = Math.ceil(cells.length / columnCount) || 1; + if (columnCount === 1) { + return cells.join(options.newline); + } + return cells.map(padCell.bind(null, cellWidth, options.character)).reduce(toRows, makeList(rowCount).map(makeArray)).map(toString).join(options.newline); + } + module2.exports = columns; + } +}); + +// ../list/lib/renderTree.js +var require_renderTree = __commonJS({ + "../list/lib/renderTree.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toArchyTree = void 0; + var path_1 = __importDefault(require("path")); + var types_1 = require_lib14(); + var archy_1 = __importDefault(require_archy()); + var chalk_1 = __importDefault(require_source()); + var cli_columns_1 = __importDefault(require_cli_columns()); + var sortBy_1 = __importDefault(require_sortBy()); + var path_2 = __importDefault(require_path3()); + var getPkgInfo_1 = __importDefault(require_getPkgInfo()); + var sortPackages = sortBy_1.default(path_2.default(["name"])); + var DEV_DEP_ONLY_CLR = chalk_1.default.yellow; + var PROD_DEP_CLR = (s) => s; + var OPTIONAL_DEP_CLR = chalk_1.default.blue; + var NOT_SAVED_DEP_CLR = chalk_1.default.red; + var LEGEND = `Legend: ${PROD_DEP_CLR("production dependency")}, ${OPTIONAL_DEP_CLR("optional only")}, ${DEV_DEP_ONLY_CLR("dev only")} + +`; + async function default_1(packages, opts) { + const output = (await Promise.all(packages.map(async (pkg) => renderTreeForPackage(pkg, opts)))).filter(Boolean).join("\n\n"); + return `${opts.depth > -1 && output ? LEGEND : ""}${output}`; + } + exports2.default = default_1; + async function renderTreeForPackage(pkg, opts) { + var _a, _b, _c, _d, _e; + if (!opts.alwaysPrintRootPackage && !((_a = pkg.dependencies) === null || _a === void 0 ? void 0 : _a.length) && !((_b = pkg.devDependencies) === null || _b === void 0 ? void 0 : _b.length) && !((_c = pkg.optionalDependencies) === null || _c === void 0 ? void 0 : _c.length) && (!opts.showExtraneous || !((_d = pkg.unsavedDependencies) === null || _d === void 0 ? void 0 : _d.length))) + return ""; + let label = ""; + if (pkg.name) { + label += pkg.name; + if (pkg.version) { + label += `@${pkg.version}`; + } + label += " "; + } + label += pkg.path; + let output = `${chalk_1.default.bold.underline(label)} +`; + const useColumns = opts.depth === 0 && !opts.long && !opts.search; + const dependenciesFields = [ + ...types_1.DEPENDENCIES_FIELDS.sort() + ]; + if (opts.showExtraneous) { + dependenciesFields.push("unsavedDependencies"); + } + for (const dependenciesField of dependenciesFields) { + if ((_e = pkg[dependenciesField]) === null || _e === void 0 ? void 0 : _e.length) { + const depsLabel = chalk_1.default.cyanBright(dependenciesField !== "unsavedDependencies" ? `${dependenciesField}:` : "not saved (you should add these dependencies to package.json if you need them):"); + output += ` +${depsLabel} +`; + const gPkgColor = dependenciesField === "unsavedDependencies" ? () => NOT_SAVED_DEP_CLR : getPkgColor; + if (useColumns && pkg[dependenciesField].length > 10) { + output += cli_columns_1.default(pkg[dependenciesField].map(printLabel.bind(printLabel, gPkgColor))) + "\n"; + continue; + } + const data = await toArchyTree(gPkgColor, pkg[dependenciesField], { + long: opts.long, + modules: path_1.default.join(pkg.path, "node_modules") + }); + for (const d of data) { + output += archy_1.default(d); + } + } + } + return output.replace(/\n$/, ""); + } + async function toArchyTree(getPkgColor2, entryNodes, opts) { + return Promise.all(sortPackages(entryNodes).map(async (node) => { + var _a; + const nodes = await toArchyTree(getPkgColor2, (_a = node.dependencies) !== null && _a !== void 0 ? _a : [], opts); + if (opts.long) { + const pkg = await getPkgInfo_1.default(node); + const labelLines = [ + printLabel(getPkgColor2, node), + pkg.description + ]; + if (pkg.repository) { + labelLines.push(pkg.repository); + } + if (pkg.homepage) { + labelLines.push(pkg.homepage); + } + return { + label: labelLines.join("\n"), + nodes + }; + } + return { + label: printLabel(getPkgColor2, node), + nodes + }; + })); + } + exports2.toArchyTree = toArchyTree; + function printLabel(getPkgColor2, node) { + const color = getPkgColor2(node); + let txt = `${color(node.name)} ${chalk_1.default.gray(node.version)}`; + if (node.isPeer) { + txt += " peer"; + } + if (node.isSkipped) { + txt += " skipped"; + } + return node.searched ? chalk_1.default.bold(txt) : txt; + } + function getPkgColor(node) { + if (node.dev === true) + return DEV_DEP_ONLY_CLR; + if (node.optional) + return OPTIONAL_DEP_CLR; + return PROD_DEP_CLR; + } + } +}); + +// ../list/lib/index.js +var require_lib100 = __commonJS({ + "../list/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.forPackages = void 0; + var read_project_manifest_1 = require_lib19(); + var dependencies_hierarchy_1 = __importDefault(require_lib99()); + var createPackagesSearcher_1 = __importDefault(require_createPackagesSearcher()); + var renderJson_1 = __importDefault(require_renderJson()); + var renderParseable_1 = __importDefault(require_renderParseable()); + var renderTree_1 = __importDefault(require_renderTree()); + var DEFAULTS = { + alwaysPrintRootPackage: true, + depth: 0, + long: false, + registries: void 0, + reportAs: "tree", + showExtraneous: true + }; + async function forPackages(packages, projectPaths, maybeOpts) { + const opts = { ...DEFAULTS, ...maybeOpts }; + const search = createPackagesSearcher_1.default(packages); + const pkgs = await Promise.all(Object.entries(await dependencies_hierarchy_1.default(projectPaths, { + depth: opts.depth, + include: maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.include, + lockfileDir: maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.lockfileDir, + registries: opts.registries, + search + })).map(async ([projectPath, dependenciesHierarchy]) => { + const entryPkg = await read_project_manifest_1.readProjectManifestOnly(projectPath); + return { + name: entryPkg.name, + version: entryPkg.version, + path: projectPath, + ...dependenciesHierarchy + }; + })); + const print = getPrinter(opts.reportAs); + return print(pkgs, { + alwaysPrintRootPackage: opts.alwaysPrintRootPackage, + depth: opts.depth, + long: opts.long, + search: Boolean(packages.length), + showExtraneous: opts.showExtraneous + }); + } + exports2.forPackages = forPackages; + async function default_1(projectPaths, maybeOpts) { + const opts = { ...DEFAULTS, ...maybeOpts }; + const pkgs = await Promise.all(Object.entries(opts.depth === -1 ? projectPaths.reduce((acc, projectPath) => { + acc[projectPath] = {}; + return acc; + }, {}) : await dependencies_hierarchy_1.default(projectPaths, { + depth: opts.depth, + include: maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.include, + lockfileDir: maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.lockfileDir, + registries: opts.registries + })).map(async ([projectPath, dependenciesHierarchy]) => { + const entryPkg = await read_project_manifest_1.readProjectManifestOnly(projectPath); + return { + name: entryPkg.name, + version: entryPkg.version, + path: projectPath, + ...dependenciesHierarchy + }; + })); + const print = getPrinter(opts.reportAs); + return print(pkgs, { + alwaysPrintRootPackage: opts.alwaysPrintRootPackage, + depth: opts.depth, + long: opts.long, + search: false, + showExtraneous: opts.showExtraneous + }); + } + exports2.default = default_1; + function getPrinter(reportAs) { + switch (reportAs) { + case "parseable": + return renderParseable_1.default; + case "json": + return renderJson_1.default; + case "tree": + return renderTree_1.default; + } + } + } +}); + +// ../plugin-commands-listing/lib/recursive.js +var require_recursive3 = __commonJS({ + "../plugin-commands-listing/lib/recursive.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var logger_1 = __importDefault(require_lib6()); + var list_1 = require_list2(); + exports2.default = async (pkgs, params, opts) => { + var _a, _b; + const depth = (_a = opts.depth) !== null && _a !== void 0 ? _a : 0; + if (opts.lockfileDir) { + return list_1.render(pkgs.map((pkg) => pkg.dir), params, { + ...opts, + alwaysPrintRootPackage: depth === -1, + lockfileDir: opts.lockfileDir + }); + } + const outputs = []; + for (const { dir } of pkgs) { + try { + const output = await list_1.render([dir], params, { + ...opts, + alwaysPrintRootPackage: depth === -1, + lockfileDir: (_b = opts.lockfileDir) !== null && _b !== void 0 ? _b : dir + }); + if (!output) + continue; + outputs.push(output); + } catch (err) { + logger_1.default.info(err); + err["prefix"] = dir; + throw err; + } + } + if (outputs.length === 0) + return ""; + const joiner = typeof depth === "number" && depth > -1 ? "\n\n" : "\n"; + return outputs.join(joiner); + }; + } +}); + +// ../plugin-commands-listing/lib/list.js +var require_list2 = __commonJS({ + "../plugin-commands-listing/lib/list.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.render = exports2.handler = exports2.help = exports2.commandNames = exports2.shorthands = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var list_1 = __importStar2(require_lib100()); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + var recursive_1 = __importDefault(require_recursive3()); + function rcOptionsTypes() { + return pick_1.default([ + "depth", + "dev", + "global-dir", + "global", + "json", + "long", + "only", + "optional", + "parseable", + "production" + ], config_1.types); + } + exports2.rcOptionsTypes = rcOptionsTypes; + var cliOptionsTypes = () => ({ + ...rcOptionsTypes(), + recursive: Boolean + }); + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.shorthands = { + D: "--dev", + P: "--production" + }; + exports2.commandNames = ["list", "ls"]; + function help() { + return render_help_1.default({ + aliases: ["list", "ls", "la", "ll"], + description: "When run as ll or la, it shows extended information by default. All dependencies are printed by default. Search by patterns is supported. For example: pnpm ls babel-* eslint-*", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: 'Perform command on every package in subdirectories or on every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + }, + { + description: "Show extended information", + name: "--long" + }, + { + description: "Show parseable output instead of tree view", + name: "--parseable" + }, + { + description: "Show information in JSON format", + name: "--json" + }, + { + description: "List packages in the global install prefix instead of in the current project", + name: "--global", + shortAlias: "-g" + }, + { + description: "Max display depth of the dependency tree", + name: "--depth " + }, + { + description: "Display only direct dependencies", + name: "--depth 0" + }, + { + description: "Display only projects. Useful in a monorepo. `pnpm ls -r --depth -1` lists all projects in a monorepo", + name: "--depth -1" + }, + { + description: "Display only the dependency graph for packages in `dependencies` and `optionalDependencies`", + name: "--prod", + shortAlias: "-P" + }, + { + description: "Display only the dependency graph for packages in `devDependencies`", + name: "--dev", + shortAlias: "-D" + }, + { + description: "Don't display packages from `optionalDependencies`", + name: "--no-optional" + }, + common_cli_options_help_1.OPTIONS.globalDir, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + }, + common_cli_options_help_1.FILTERING + ], + url: cli_utils_1.docsUrl("list"), + usages: [ + "pnpm ls [ ...]" + ] + }); + } + exports2.help = help; + async function handler(opts, params) { + var _a, _b, _c; + const include = { + dependencies: opts.production !== false, + devDependencies: opts.dev !== false, + optionalDependencies: opts.optional !== false + }; + const depth = (_b = (_a = opts.cliOptions) === null || _a === void 0 ? void 0 : _a["depth"]) !== null && _b !== void 0 ? _b : 0; + if (opts.recursive && opts.selectedProjectsGraph != null) { + const pkgs = Object.values(opts.selectedProjectsGraph).map((wsPkg) => wsPkg.package); + return recursive_1.default(pkgs, params, { ...opts, depth, include }); + } + return render([opts.dir], params, { + ...opts, + depth, + include, + lockfileDir: (_c = opts.lockfileDir) !== null && _c !== void 0 ? _c : opts.dir + }); + } + exports2.handler = handler; + async function render(prefixes, params, opts) { + var _a; + const listOpts = { + alwaysPrintRootPackage: opts.alwaysPrintRootPackage, + depth: (_a = opts.depth) !== null && _a !== void 0 ? _a : 0, + include: opts.include, + lockfileDir: opts.lockfileDir, + long: opts.long, + reportAs: opts.parseable ? "parseable" : opts.json ? "json" : "tree", + showExtraneous: false + }; + return params.length > 0 ? list_1.forPackages(params, prefixes, listOpts) : list_1.default(prefixes, listOpts); + } + exports2.render = render; + } +}); + +// ../plugin-commands-listing/lib/ll.js +var require_ll = __commonJS({ + "../plugin-commands-listing/lib/ll.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.cliOptionsTypes = exports2.rcOptionsTypes = exports2.commandNames = void 0; + var omit_1 = __importDefault(require_omit()); + var list = __importStar2(require_list2()); + exports2.commandNames = ["ll", "la"]; + exports2.rcOptionsTypes = list.rcOptionsTypes; + function cliOptionsTypes() { + return omit_1.default(["long"], list.cliOptionsTypes()); + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.help = list.help; + async function handler(opts, params) { + return list.handler({ ...opts, long: true }, params); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-listing/lib/why.js +var require_why = __commonJS({ + "../plugin-commands-listing/lib/why.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.shorthands = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var error_1 = __importDefault(require_lib8()); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + var list_1 = require_list2(); + function rcOptionsTypes() { + return pick_1.default([ + "dev", + "global-dir", + "global", + "json", + "long", + "only", + "optional", + "parseable", + "production" + ], config_1.types); + } + exports2.rcOptionsTypes = rcOptionsTypes; + var cliOptionsTypes = () => ({ + ...rcOptionsTypes(), + recursive: Boolean + }); + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.shorthands = { + D: "--dev", + P: "--production" + }; + exports2.commandNames = ["why"]; + function help() { + return render_help_1.default({ + description: `Shows the packages that depend on +For example: pnpm why babel-* eslint-*`, + descriptionLists: [ + { + title: "Options", + list: [ + { + description: 'Perform command on every package in subdirectories or on every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + }, + { + description: "Show extended information", + name: "--long" + }, + { + description: "Show parseable output instead of tree view", + name: "--parseable" + }, + { + description: "Show information in JSON format", + name: "--json" + }, + { + description: "List packages in the global install prefix instead of in the current project", + name: "--global", + shortAlias: "-g" + }, + { + description: "Display only the dependency graph for packages in `dependencies` and `optionalDependencies`", + name: "--prod", + shortAlias: "-P" + }, + { + description: "Display only the dependency graph for packages in `devDependencies`", + name: "--dev", + shortAlias: "-D" + }, + { + description: "Don't display packages from `optionalDependencies`", + name: "--no-optional" + }, + common_cli_options_help_1.OPTIONS.globalDir, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + }, + common_cli_options_help_1.FILTERING + ], + url: cli_utils_1.docsUrl("why"), + usages: [ + "pnpm why ..." + ] + }); + } + exports2.help = help; + async function handler(opts, params) { + var _a; + if (params.length === 0) { + throw new error_1.default("MISSING_PACKAGE_NAME", "`pnpm why` requires the package name"); + } + return list_1.handler({ + ...opts, + cliOptions: { + ...(_a = opts.cliOptions) !== null && _a !== void 0 ? _a : {}, + depth: Infinity + } + }, params); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-listing/lib/index.js +var require_lib101 = __commonJS({ + "../plugin-commands-listing/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.why = exports2.ll = exports2.list = void 0; + var list = __importStar2(require_list2()); + exports2.list = list; + var ll = __importStar2(require_ll()); + exports2.ll = ll; + var why = __importStar2(require_why()); + exports2.why = why; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/sortWith.js +var require_sortWith = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/sortWith.js"(exports2, module2) { + var _curry2 = require_curry2(); + var sortWith = /* @__PURE__ */ _curry2(function sortWith2(fns, list) { + return Array.prototype.slice.call(list, 0).sort(function(a, b) { + var result = 0; + var i = 0; + while (result === 0 && i < fns.length) { + result = fns[i](a, b); + i += 1; + } + return result; + }); + }); + module2.exports = sortWith; + } +}); + +// ../plugin-commands-outdated/lib/utils.js +var require_utils9 = __commonJS({ + "../plugin-commands-outdated/lib/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sortBySemverChange = exports2.DEFAULT_COMPARATORS = void 0; + exports2.DEFAULT_COMPARATORS = [ + sortBySemverChange, + (o1, o2) => o1.packageName.localeCompare(o2.packageName), + (o1, o2) => o1.current && o2.current ? o1.current.localeCompare(o2.current) : 0 + ]; + function sortBySemverChange(outdated1, outdated2) { + return pkgPriority(outdated1) - pkgPriority(outdated2); + } + exports2.sortBySemverChange = sortBySemverChange; + function pkgPriority(pkg) { + switch (pkg.change) { + case null: + return 0; + case "fix": + return 1; + case "feature": + return 2; + case "breaking": + return 3; + default: + return 4; + } + } + } +}); + +// ../plugin-commands-outdated/lib/recursive.js +var require_recursive4 = __commonJS({ + "../plugin-commands-outdated/lib/recursive.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var cli_utils_1 = require_lib20(); + var outdated_1 = require_lib95(); + var table_1 = require_dist10(); + var chalk_1 = __importDefault(require_source()); + var isEmpty_1 = __importDefault(require_isEmpty2()); + var sortWith_1 = __importDefault(require_sortWith()); + var outdated_2 = require_outdated2(); + var utils_1 = require_utils9(); + var DEP_PRIORITY = { + dependencies: 1, + devDependencies: 2, + optionalDependencies: 0 + }; + var COMPARATORS = [ + ...utils_1.DEFAULT_COMPARATORS, + (o1, o2) => DEP_PRIORITY[o1.belongsTo] - DEP_PRIORITY[o2.belongsTo] + ]; + exports2.default = async (pkgs, params, opts) => { + const outdatedMap = {}; + const outdatedPackagesByProject = await outdated_1.outdatedDepsOfProjects(pkgs, params, { + ...opts, + fullMetadata: opts.long, + retry: { + factor: opts.fetchRetryFactor, + maxTimeout: opts.fetchRetryMaxtimeout, + minTimeout: opts.fetchRetryMintimeout, + retries: opts.fetchRetries + }, + timeout: opts.fetchTimeout + }); + for (let i = 0; i < outdatedPackagesByProject.length; i++) { + const { dir, manifest } = pkgs[i]; + outdatedPackagesByProject[i].forEach((outdatedPkg) => { + const key = JSON.stringify([outdatedPkg.packageName, outdatedPkg.current, outdatedPkg.belongsTo]); + if (!outdatedMap[key]) { + outdatedMap[key] = { ...outdatedPkg, dependentPkgs: [] }; + } + outdatedMap[key].dependentPkgs.push({ location: dir, manifest }); + }); + } + if (isEmpty_1.default(outdatedMap)) + return { output: "", exitCode: 0 }; + if (opts.table !== false) { + return { output: renderOutdatedTable(outdatedMap, opts), exitCode: 1 }; + } + return { output: renderOutdatedList(outdatedMap, opts), exitCode: 1 }; + }; + function renderOutdatedTable(outdatedMap, opts) { + const columnNames = [ + "Package", + "Current", + "Latest", + "Dependents" + ]; + const columnFns = [ + outdated_2.renderPackageName, + outdated_2.renderCurrent, + outdated_2.renderLatest, + dependentPackages + ]; + if (opts.long) { + columnNames.push("Details"); + columnFns.push(outdated_2.renderDetails); + } + for (let i = 0; i < columnNames.length; i++) + columnNames[i] = chalk_1.default.blueBright(columnNames[i]); + const data = [ + columnNames, + ...sortOutdatedPackages(Object.values(outdatedMap)).map((outdatedPkg) => columnFns.map((fn2) => fn2(outdatedPkg))) + ]; + return table_1.table(data, { + ...cli_utils_1.TABLE_OPTIONS, + columns: { + ...cli_utils_1.TABLE_OPTIONS.columns, + 3: { + width: outdated_2.getCellWidth(data, 3, 30), + wrapWord: true + } + } + }); + } + function renderOutdatedList(outdatedMap, opts) { + return sortOutdatedPackages(Object.values(outdatedMap)).map((outdatedPkg) => { + let info = `${chalk_1.default.bold(outdated_2.renderPackageName(outdatedPkg))} +${outdated_2.renderCurrent(outdatedPkg)} ${chalk_1.default.grey("=>")} ${outdated_2.renderLatest(outdatedPkg)}`; + const dependents = dependentPackages(outdatedPkg); + if (dependents) { + info += ` +${chalk_1.default.bold(outdatedPkg.dependentPkgs.length > 1 ? "Dependents:" : "Dependent:")} ${dependents}`; + } + if (opts.long) { + const details = outdated_2.renderDetails(outdatedPkg); + if (details) { + info += ` +${details}`; + } + } + return info; + }).join("\n\n") + "\n"; + } + function dependentPackages({ dependentPkgs }) { + return dependentPkgs.map(({ manifest, location }) => { + var _a; + return (_a = manifest.name) !== null && _a !== void 0 ? _a : location; + }).sort().join(", "); + } + function sortOutdatedPackages(outdatedPackages) { + return sortWith_1.default(COMPARATORS, outdatedPackages.map(outdated_2.toOutdatedWithVersionDiff)); + } + } +}); + +// ../plugin-commands-outdated/lib/outdated.js +var require_outdated2 = __commonJS({ + "../plugin-commands-outdated/lib/outdated.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.renderDetails = exports2.renderLatest = exports2.renderCurrent = exports2.renderPackageName = exports2.toOutdatedWithVersionDiff = exports2.getCellWidth = exports2.handler = exports2.completion = exports2.help = exports2.commandNames = exports2.shorthands = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var colorize_semver_diff_1 = __importDefault(require_lib96()); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var outdated_1 = require_lib95(); + var semver_diff_1 = __importDefault(require_lib97()); + var table_1 = require_dist10(); + var chalk_1 = __importDefault(require_source()); + var pick_1 = __importDefault(require_pick()); + var sortWith_1 = __importDefault(require_sortWith()); + var render_help_1 = __importDefault(require_lib30()); + var strip_ansi_1 = __importDefault(require_strip_ansi()); + var wrap_ansi_1 = __importDefault(require_wrap_ansi()); + var utils_1 = require_utils9(); + var recursive_1 = __importDefault(require_recursive4()); + function rcOptionsTypes() { + return { + ...pick_1.default([ + "depth", + "dev", + "global-dir", + "global", + "long", + "optional", + "production" + ], config_1.types), + compatible: Boolean, + table: Boolean + }; + } + exports2.rcOptionsTypes = rcOptionsTypes; + var cliOptionsTypes = () => ({ + ...rcOptionsTypes(), + recursive: Boolean + }); + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.shorthands = { + D: "--dev", + P: "--production" + }; + exports2.commandNames = ["outdated"]; + function help() { + return render_help_1.default({ + description: `Check for outdated packages. The check can be limited to a subset of the installed packages by providing arguments (patterns are supported). + +Examples: +pnpm outdated +pnpm outdated --long +pnpm outdated gulp-* @babel/core`, + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "Print only versions that satisfy specs in package.json", + name: "--compatible" + }, + { + description: "By default, details about the outdated packages (such as a link to the repo) are not displayed. To display the details, pass this option.", + name: "--long" + }, + { + description: 'Check for outdated dependencies in every package found in subdirectories or in every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + }, + { + description: "Prints the outdated packages in a list. Good for small consoles", + name: "--no-table" + }, + { + description: 'Check only "dependencies" and "optionalDependencies"', + name: "--prod", + shortAlias: "-P" + }, + { + description: 'Check only "devDependencies"', + name: "--dev", + shortAlias: "-D" + }, + { + description: `Don't check "optionalDependencies"`, + name: "--no-optional" + }, + common_cli_options_help_1.OPTIONS.globalDir, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + }, + common_cli_options_help_1.FILTERING + ], + url: cli_utils_1.docsUrl("outdated"), + usages: ["pnpm outdated [ ...]"] + }); + } + exports2.help = help; + var completion = async (cliOpts) => { + return cli_utils_1.readDepNameCompletions(cliOpts.dir); + }; + exports2.completion = completion; + async function handler(opts, params = []) { + const include = { + dependencies: opts.production !== false, + devDependencies: opts.dev !== false, + optionalDependencies: opts.optional !== false + }; + if (opts.recursive && opts.selectedProjectsGraph != null) { + const pkgs = Object.values(opts.selectedProjectsGraph).map((wsPkg) => wsPkg.package); + return recursive_1.default(pkgs, params, { ...opts, include }); + } + const packages = [ + { + dir: opts.dir, + manifest: await cli_utils_1.readProjectManifestOnly(opts.dir, opts) + } + ]; + const [outdatedPackages] = await outdated_1.outdatedDepsOfProjects(packages, params, { + ...opts, + fullMetadata: opts.long, + include, + retry: { + factor: opts.fetchRetryFactor, + maxTimeout: opts.fetchRetryMaxtimeout, + minTimeout: opts.fetchRetryMintimeout, + retries: opts.fetchRetries + }, + timeout: opts.fetchTimeout + }); + if (outdatedPackages.length === 0) + return { output: "", exitCode: 0 }; + if (opts.table !== false) { + return { output: renderOutdatedTable(outdatedPackages, opts), exitCode: 1 }; + } else { + return { output: renderOutdatedList(outdatedPackages, opts), exitCode: 1 }; + } + } + exports2.handler = handler; + function renderOutdatedTable(outdatedPackages, opts) { + const columnNames = [ + "Package", + "Current", + "Latest" + ]; + const columnFns = [ + renderPackageName, + renderCurrent, + renderLatest + ]; + if (opts.long) { + columnNames.push("Details"); + columnFns.push(renderDetails); + } + for (let i = 0; i < columnNames.length; i++) + columnNames[i] = chalk_1.default.blueBright(columnNames[i]); + return table_1.table([ + columnNames, + ...sortOutdatedPackages(outdatedPackages).map((outdatedPkg) => columnFns.map((fn2) => fn2(outdatedPkg))) + ], cli_utils_1.TABLE_OPTIONS); + } + function renderOutdatedList(outdatedPackages, opts) { + return sortOutdatedPackages(outdatedPackages).map((outdatedPkg) => { + let info = `${chalk_1.default.bold(renderPackageName(outdatedPkg))} +${renderCurrent(outdatedPkg)} ${chalk_1.default.grey("=>")} ${renderLatest(outdatedPkg)}`; + if (opts.long) { + const details = renderDetails(outdatedPkg); + if (details) { + info += ` +${details}`; + } + } + return info; + }).join("\n\n") + "\n"; + } + function sortOutdatedPackages(outdatedPackages) { + return sortWith_1.default(utils_1.DEFAULT_COMPARATORS, outdatedPackages.map(toOutdatedWithVersionDiff)); + } + function getCellWidth(data, columnNumber, maxWidth) { + const maxCellWidth = data.reduce((cellWidth, row) => { + const cellLines = strip_ansi_1.default(row[columnNumber]).split("\n"); + const currentCellWidth = cellLines.reduce((lineWidth, line) => { + return Math.max(lineWidth, line.length); + }, 0); + return Math.max(cellWidth, currentCellWidth); + }, 0); + return Math.min(maxWidth, maxCellWidth); + } + exports2.getCellWidth = getCellWidth; + function toOutdatedWithVersionDiff(outdated) { + if (outdated.latestManifest != null) { + return { + ...outdated, + ...semver_diff_1.default(outdated.wanted, outdated.latestManifest.version) + }; + } + return { + ...outdated, + change: "unknown" + }; + } + exports2.toOutdatedWithVersionDiff = toOutdatedWithVersionDiff; + function renderPackageName({ belongsTo, packageName }) { + switch (belongsTo) { + case "devDependencies": + return `${packageName} ${chalk_1.default.dim("(dev)")}`; + case "optionalDependencies": + return `${packageName} ${chalk_1.default.dim("(optional)")}`; + default: + return packageName; + } + } + exports2.renderPackageName = renderPackageName; + function renderCurrent({ current, wanted }) { + const output = current !== null && current !== void 0 ? current : "missing"; + if (current === wanted) + return output; + return `${output} (wanted ${wanted})`; + } + exports2.renderCurrent = renderCurrent; + function renderLatest(outdatedPkg) { + const { latestManifest, change, diff } = outdatedPkg; + if (latestManifest == null) + return ""; + if (change === null || diff == null) { + return latestManifest.deprecated ? chalk_1.default.redBright.bold("Deprecated") : latestManifest.version; + } + return colorize_semver_diff_1.default({ change, diff }); + } + exports2.renderLatest = renderLatest; + function renderDetails({ latestManifest }) { + if (latestManifest == null) + return ""; + const outputs = []; + if (latestManifest.deprecated) { + outputs.push(wrap_ansi_1.default(chalk_1.default.redBright(latestManifest.deprecated), 40)); + } + if (latestManifest.homepage) { + outputs.push(chalk_1.default.underline(latestManifest.homepage)); + } + return outputs.join("\n"); + } + exports2.renderDetails = renderDetails; + } +}); + +// ../plugin-commands-outdated/lib/index.js +var require_lib102 = __commonJS({ + "../plugin-commands-outdated/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.outdated = void 0; + var outdated = __importStar2(require_outdated2()); + exports2.outdated = outdated; + } +}); + +// ../exportable-manifest/lib/index.js +var require_lib103 = __commonJS({ + "../exportable-manifest/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var read_project_manifest_1 = require_lib19(); + var fromPairs_1 = __importDefault(require_fromPairs()); + var omit_1 = __importDefault(require_omit()); + var PUBLISH_CONFIG_WHITELIST = new Set([ + "bin", + "type", + "imports", + "main", + "module", + "typings", + "types", + "exports", + "browser", + "esnext", + "es2015", + "unpkg", + "umd:main" + ]); + var PREPUBLISH_SCRIPTS = [ + "prepublishOnly", + "prepack", + "prepare", + "postpack", + "publish", + "postpublish" + ]; + async function makePublishManifest(dir, originalManifest) { + const publishManifest = omit_1.default(["pnpm", "scripts"], originalManifest); + if (originalManifest.scripts != null) { + publishManifest.scripts = omit_1.default(PREPUBLISH_SCRIPTS, originalManifest.scripts); + } + for (const depsField of ["dependencies", "devDependencies", "optionalDependencies", "peerDependencies"]) { + const deps = await makePublishDependencies(dir, originalManifest[depsField]); + if (deps != null) { + publishManifest[depsField] = deps; + } + } + const { publishConfig } = originalManifest; + if (publishConfig != null) { + Object.keys(publishConfig).filter((key) => PUBLISH_CONFIG_WHITELIST.has(key)).forEach((key) => { + publishManifest[key] = publishConfig[key]; + }); + } + return publishManifest; + } + exports2.default = makePublishManifest; + async function makePublishDependencies(dir, dependencies) { + if (dependencies == null) + return dependencies; + const publishDependencies = fromPairs_1.default(await Promise.all(Object.entries(dependencies).map(async ([depName, depSpec]) => [ + depName, + await makePublishDependency(depName, depSpec, dir) + ]))); + return publishDependencies; + } + async function makePublishDependency(depName, depSpec, dir) { + if (!depSpec.startsWith("workspace:")) { + return depSpec; + } + const versionAliasSpecParts = /^workspace:([^@]+@)?([\^~*])$/.exec(depSpec); + if (versionAliasSpecParts != null) { + const { manifest } = await read_project_manifest_1.tryReadProjectManifest(path_1.default.join(dir, "node_modules", depName)); + if (manifest == null || !manifest.version) { + throw new error_1.default("CANNOT_RESOLVE_WORKSPACE_PROTOCOL", `Cannot resolve workspace protocol of dependency "${depName}" because this dependency is not installed. Try running "pnpm install".`); + } + const semverRangeToken = versionAliasSpecParts[2] !== "*" ? versionAliasSpecParts[2] : ""; + if (depName !== manifest.name) { + return `npm:${manifest.name}@${semverRangeToken}${manifest.version}`; + } + return `${semverRangeToken}${manifest.version}`; + } + if (depSpec.startsWith("workspace:./") || depSpec.startsWith("workspace:../")) { + const { manifest } = await read_project_manifest_1.tryReadProjectManifest(path_1.default.join(dir, depSpec.substr(10))); + if (manifest == null || !manifest.name || !manifest.version) { + throw new error_1.default("CANNOT_RESOLVE_WORKSPACE_PROTOCOL", `Cannot resolve workspace protocol of dependency "${depName}" because this dependency is not installed. Try running "pnpm install".`); + } + if (manifest.name === depName) + return `${manifest.version}`; + return `npm:${manifest.name}@${manifest.version}`; + } + depSpec = depSpec.substr(10); + if (depSpec.includes("@")) { + return `npm:${depSpec}`; + } + return depSpec; + } + } +}); + +// ../../node_modules/.pnpm/npm-normalize-package-bin@1.0.1/node_modules/npm-normalize-package-bin/index.js +var require_npm_normalize_package_bin = __commonJS({ + "../../node_modules/.pnpm/npm-normalize-package-bin@1.0.1/node_modules/npm-normalize-package-bin/index.js"(exports2, module2) { + var { join, basename } = require("path"); + var normalize = (pkg) => !pkg.bin ? removeBin(pkg) : typeof pkg.bin === "string" ? normalizeString(pkg) : Array.isArray(pkg.bin) ? normalizeArray(pkg) : typeof pkg.bin === "object" ? normalizeObject(pkg) : removeBin(pkg); + var normalizeString = (pkg) => { + if (!pkg.name) + return removeBin(pkg); + pkg.bin = { [pkg.name]: pkg.bin }; + return normalizeObject(pkg); + }; + var normalizeArray = (pkg) => { + pkg.bin = pkg.bin.reduce((acc, k) => { + acc[basename(k)] = k; + return acc; + }, {}); + return normalizeObject(pkg); + }; + var removeBin = (pkg) => { + delete pkg.bin; + return pkg; + }; + var normalizeObject = (pkg) => { + const orig = pkg.bin; + const clean = {}; + let hasBins = false; + Object.keys(orig).forEach((binKey) => { + const base = join("/", basename(binKey.replace(/\\|:/g, "/"))).substr(1); + if (typeof orig[binKey] !== "string" || !base) + return; + const binTarget = join("/", orig[binKey]).replace(/\\/g, "/").substr(1); + if (!binTarget) + return; + clean[base] = binTarget; + hasBins = true; + }); + if (hasBins) + pkg.bin = clean; + else + delete pkg.bin; + return pkg; + }; + module2.exports = normalize; + } +}); + +// ../../node_modules/.pnpm/npm-bundled@1.1.2/node_modules/npm-bundled/index.js +var require_npm_bundled = __commonJS({ + "../../node_modules/.pnpm/npm-bundled@1.1.2/node_modules/npm-bundled/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var path = require("path"); + var EE = require("events").EventEmitter; + var normalizePackageBin = require_npm_normalize_package_bin(); + var BundleWalker = class extends EE { + constructor(opt) { + opt = opt || {}; + super(opt); + this.path = path.resolve(opt.path || process.cwd()); + this.parent = opt.parent || null; + if (this.parent) { + this.result = this.parent.result; + if (!this.parent.parent) { + const base = path.basename(this.path); + const scope = path.basename(path.dirname(this.path)); + this.result.add(/^@/.test(scope) ? scope + "/" + base : base); + } + this.root = this.parent.root; + this.packageJsonCache = this.parent.packageJsonCache; + } else { + this.result = new Set(); + this.root = this.path; + this.packageJsonCache = opt.packageJsonCache || new Map(); + } + this.seen = new Set(); + this.didDone = false; + this.children = 0; + this.node_modules = []; + this.package = null; + this.bundle = null; + } + addListener(ev, fn2) { + return this.on(ev, fn2); + } + on(ev, fn2) { + const ret = super.on(ev, fn2); + if (ev === "done" && this.didDone) { + this.emit("done", this.result); + } + return ret; + } + done() { + if (!this.didDone) { + this.didDone = true; + if (!this.parent) { + const res = Array.from(this.result); + this.result = res; + this.emit("done", res); + } else { + this.emit("done"); + } + } + } + start() { + const pj = path.resolve(this.path, "package.json"); + if (this.packageJsonCache.has(pj)) + this.onPackage(this.packageJsonCache.get(pj)); + else + this.readPackageJson(pj); + return this; + } + readPackageJson(pj) { + fs.readFile(pj, (er, data) => er ? this.done() : this.onPackageJson(pj, data)); + } + onPackageJson(pj, data) { + try { + this.package = normalizePackageBin(JSON.parse(data + "")); + } catch (er) { + return this.done(); + } + this.packageJsonCache.set(pj, this.package); + this.onPackage(this.package); + } + allDepsBundled(pkg) { + return Object.keys(pkg.dependencies || {}).concat(Object.keys(pkg.optionalDependencies || {})); + } + onPackage(pkg) { + const bdRaw = this.parent ? this.allDepsBundled(pkg) : pkg.bundleDependencies || pkg.bundledDependencies || []; + const bd = Array.from(new Set(Array.isArray(bdRaw) ? bdRaw : bdRaw === true ? this.allDepsBundled(pkg) : Object.keys(bdRaw))); + if (!bd.length) + return this.done(); + this.bundle = bd; + const nm = this.path + "/node_modules"; + this.readModules(); + } + readModules() { + readdirNodeModules(this.path + "/node_modules", (er, nm) => er ? this.onReaddir([]) : this.onReaddir(nm)); + } + onReaddir(nm) { + this.node_modules = nm; + this.bundle.forEach((dep) => this.childDep(dep)); + if (this.children === 0) + this.done(); + } + childDep(dep) { + if (this.node_modules.indexOf(dep) !== -1) { + if (!this.seen.has(dep)) { + this.seen.add(dep); + this.child(dep); + } + } else if (this.parent) { + this.parent.childDep(dep); + } + } + child(dep) { + const p = this.path + "/node_modules/" + dep; + this.children += 1; + const child = new BundleWalker({ + path: p, + parent: this + }); + child.on("done", (_) => { + if (--this.children === 0) + this.done(); + }); + child.start(); + } + }; + var BundleWalkerSync = class extends BundleWalker { + constructor(opt) { + super(opt); + } + start() { + super.start(); + this.done(); + return this; + } + readPackageJson(pj) { + try { + this.onPackageJson(pj, fs.readFileSync(pj)); + } catch (er) { + } + return this; + } + readModules() { + try { + this.onReaddir(readdirNodeModulesSync(this.path + "/node_modules")); + } catch (er) { + this.onReaddir([]); + } + } + child(dep) { + new BundleWalkerSync({ + path: this.path + "/node_modules/" + dep, + parent: this + }).start(); + } + }; + var readdirNodeModules = (nm, cb) => { + fs.readdir(nm, (er, set) => { + if (er) + cb(er); + else { + const scopes = set.filter((f) => /^@/.test(f)); + if (!scopes.length) + cb(null, set); + else { + const unscoped = set.filter((f) => !/^@/.test(f)); + let count = scopes.length; + scopes.forEach((scope) => { + fs.readdir(nm + "/" + scope, (er2, pkgs) => { + if (er2 || !pkgs.length) + unscoped.push(scope); + else + unscoped.push.apply(unscoped, pkgs.map((p) => scope + "/" + p)); + if (--count === 0) + cb(null, unscoped); + }); + }); + } + } + }); + }; + var readdirNodeModulesSync = (nm) => { + const set = fs.readdirSync(nm); + const unscoped = set.filter((f) => !/^@/.test(f)); + const scopes = set.filter((f) => /^@/.test(f)).map((scope) => { + try { + const pkgs = fs.readdirSync(nm + "/" + scope); + return pkgs.length ? pkgs.map((p) => scope + "/" + p) : [scope]; + } catch (er) { + return [scope]; + } + }).reduce((a, b) => a.concat(b), []); + return unscoped.concat(scopes); + }; + var walk = (options, callback) => { + const p = new Promise((resolve, reject) => { + new BundleWalker(options).on("done", resolve).on("error", reject).start(); + }); + return callback ? p.then((res) => callback(null, res), callback) : p; + }; + var walkSync = (options) => { + return new BundleWalkerSync(options).start().result; + }; + module2.exports = walk; + walk.sync = walkSync; + walk.BundleWalker = BundleWalker; + walk.BundleWalkerSync = BundleWalkerSync; + } +}); + +// ../../node_modules/.pnpm/ignore-walk@3.0.4/node_modules/ignore-walk/index.js +var require_ignore_walk = __commonJS({ + "../../node_modules/.pnpm/ignore-walk@3.0.4/node_modules/ignore-walk/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var path = require("path"); + var EE = require("events").EventEmitter; + var Minimatch = require_minimatch().Minimatch; + var Walker = class extends EE { + constructor(opts) { + opts = opts || {}; + super(opts); + this.path = opts.path || process.cwd(); + this.basename = path.basename(this.path); + this.ignoreFiles = opts.ignoreFiles || [".ignore"]; + this.ignoreRules = {}; + this.parent = opts.parent || null; + this.includeEmpty = !!opts.includeEmpty; + this.root = this.parent ? this.parent.root : this.path; + this.follow = !!opts.follow; + this.result = this.parent ? this.parent.result : new Set(); + this.entries = null; + this.sawError = false; + } + sort(a, b) { + return a.localeCompare(b, "en"); + } + emit(ev, data) { + let ret = false; + if (!(this.sawError && ev === "error")) { + if (ev === "error") + this.sawError = true; + else if (ev === "done" && !this.parent) { + data = Array.from(data).map((e) => /^@/.test(e) ? `./${e}` : e).sort(this.sort); + this.result = data; + } + if (ev === "error" && this.parent) + ret = this.parent.emit("error", data); + else + ret = super.emit(ev, data); + } + return ret; + } + start() { + fs.readdir(this.path, (er, entries) => er ? this.emit("error", er) : this.onReaddir(entries)); + return this; + } + isIgnoreFile(e) { + return e !== "." && e !== ".." && this.ignoreFiles.indexOf(e) !== -1; + } + onReaddir(entries) { + this.entries = entries; + if (entries.length === 0) { + if (this.includeEmpty) + this.result.add(this.path.substr(this.root.length + 1)); + this.emit("done", this.result); + } else { + const hasIg = this.entries.some((e) => this.isIgnoreFile(e)); + if (hasIg) + this.addIgnoreFiles(); + else + this.filterEntries(); + } + } + addIgnoreFiles() { + const newIg = this.entries.filter((e) => this.isIgnoreFile(e)); + let igCount = newIg.length; + const then = (_) => { + if (--igCount === 0) + this.filterEntries(); + }; + newIg.forEach((e) => this.addIgnoreFile(e, then)); + } + addIgnoreFile(file, then) { + const ig = path.resolve(this.path, file); + fs.readFile(ig, "utf8", (er, data) => er ? this.emit("error", er) : this.onReadIgnoreFile(file, data, then)); + } + onReadIgnoreFile(file, data, then) { + const mmopt = { + matchBase: true, + dot: true, + flipNegate: true, + nocase: true + }; + const rules = data.split(/\r?\n/).filter((line) => !/^#|^$/.test(line.trim())).map((r) => new Minimatch(r, mmopt)); + this.ignoreRules[file] = rules; + then(); + } + filterEntries() { + const filtered = this.entries.map((entry) => { + const passFile = this.filterEntry(entry); + const passDir = this.filterEntry(entry, true); + return passFile || passDir ? [entry, passFile, passDir] : false; + }).filter((e) => e); + let entryCount = filtered.length; + if (entryCount === 0) { + this.emit("done", this.result); + } else { + const then = (_) => { + if (--entryCount === 0) + this.emit("done", this.result); + }; + filtered.forEach((filt) => { + const entry = filt[0]; + const file = filt[1]; + const dir = filt[2]; + this.stat(entry, file, dir, then); + }); + } + } + onstat(st, entry, file, dir, then) { + const abs = this.path + "/" + entry; + if (!st.isDirectory()) { + if (file) + this.result.add(abs.substr(this.root.length + 1)); + then(); + } else { + if (dir) + this.walker(entry, then); + else + then(); + } + } + stat(entry, file, dir, then) { + const abs = this.path + "/" + entry; + fs[this.follow ? "stat" : "lstat"](abs, (er, st) => { + if (er) + this.emit("error", er); + else + this.onstat(st, entry, file, dir, then); + }); + } + walkerOpt(entry) { + return { + path: this.path + "/" + entry, + parent: this, + ignoreFiles: this.ignoreFiles, + follow: this.follow, + includeEmpty: this.includeEmpty + }; + } + walker(entry, then) { + new Walker(this.walkerOpt(entry)).on("done", then).start(); + } + filterEntry(entry, partial) { + let included = true; + if (this.parent && this.parent.filterEntry) { + var pt = this.basename + "/" + entry; + included = this.parent.filterEntry(pt, partial); + } + this.ignoreFiles.forEach((f) => { + if (this.ignoreRules[f]) { + this.ignoreRules[f].forEach((rule) => { + if (rule.negate !== included) { + const match = rule.match("/" + entry) || rule.match(entry) || !!partial && (rule.match("/" + entry + "/") || rule.match(entry + "/")) || !!partial && rule.negate && (rule.match("/" + entry, true) || rule.match(entry, true)); + if (match) + included = rule.negate; + } + }); + } + }); + return included; + } + }; + var WalkerSync = class extends Walker { + constructor(opt) { + super(opt); + } + start() { + this.onReaddir(fs.readdirSync(this.path)); + return this; + } + addIgnoreFile(file, then) { + const ig = path.resolve(this.path, file); + this.onReadIgnoreFile(file, fs.readFileSync(ig, "utf8"), then); + } + stat(entry, file, dir, then) { + const abs = this.path + "/" + entry; + const st = fs[this.follow ? "statSync" : "lstatSync"](abs); + this.onstat(st, entry, file, dir, then); + } + walker(entry, then) { + new WalkerSync(this.walkerOpt(entry)).start(); + then(); + } + }; + var walk = (options, callback) => { + const p = new Promise((resolve, reject) => { + new Walker(options).on("done", resolve).on("error", reject).start(); + }); + return callback ? p.then((res) => callback(null, res), callback) : p; + }; + var walkSync = (options) => { + return new WalkerSync(options).start().result; + }; + module2.exports = walk; + walk.sync = walkSync; + walk.Walker = Walker; + walk.WalkerSync = WalkerSync; + } +}); + +// ../../node_modules/.pnpm/npm-packlist@2.2.2/node_modules/npm-packlist/index.js +var require_npm_packlist = __commonJS({ + "../../node_modules/.pnpm/npm-packlist@2.2.2/node_modules/npm-packlist/index.js"(exports2, module2) { + "use strict"; + var bundleWalk = require_npm_bundled(); + var BundleWalker = bundleWalk.BundleWalker; + var BundleWalkerSync = bundleWalk.BundleWalkerSync; + var ignoreWalk = require_ignore_walk(); + var IgnoreWalker = ignoreWalk.Walker; + var IgnoreWalkerSync = ignoreWalk.WalkerSync; + var rootBuiltinRules = Symbol("root-builtin-rules"); + var packageNecessaryRules = Symbol("package-necessary-rules"); + var path = require("path"); + var normalizePackageBin = require_npm_normalize_package_bin(); + var packageMustHaveFileNames = "readme|copying|license|licence"; + var packageMustHaves = `@(${packageMustHaveFileNames}){,.*[^~$]}`; + var packageMustHavesRE = new RegExp(`^(${packageMustHaveFileNames})(\\..*[^~$])?$`, "i"); + var fs = require("fs"); + var glob = require_glob(); + var defaultRules = [ + ".npmignore", + ".gitignore", + "**/.git", + "**/.svn", + "**/.hg", + "**/CVS", + "**/.git/**", + "**/.svn/**", + "**/.hg/**", + "**/CVS/**", + "/.lock-wscript", + "/.wafpickle-*", + "/build/config.gypi", + "npm-debug.log", + "**/.npmrc", + ".*.swp", + ".DS_Store", + "**/.DS_Store/**", + "._*", + "**/._*/**", + "*.orig", + "/package-lock.json", + "/yarn.lock", + "/archived-packages/**" + ]; + var nameIsBadForWindows = (file) => /\*/.test(file); + var npmWalker = (Class) => class Walker extends Class { + constructor(opt) { + opt = opt || {}; + opt.ignoreFiles = [ + rootBuiltinRules, + "package.json", + ".npmignore", + ".gitignore", + packageNecessaryRules + ]; + opt.includeEmpty = false; + opt.path = opt.path || process.cwd(); + const followRe = /^(?:\/node_modules\/(?:@[^/]+\/[^/]+|[^/]+)\/)*\/node_modules(?:\/@[^/]+)?$/; + const rootPath = opt.parent ? opt.parent.root : opt.path; + const followTestPath = opt.path.replace(/\\/g, "/").substr(rootPath.length); + opt.follow = followRe.test(followTestPath); + super(opt); + if (!this.parent) { + this.bundled = opt.bundled || []; + this.bundledScopes = Array.from(new Set(this.bundled.filter((f) => /^@/.test(f)).map((f) => f.split("/")[0]))); + const rules = defaultRules.join("\n") + "\n"; + this.packageJsonCache = opt.packageJsonCache || new Map(); + super.onReadIgnoreFile(rootBuiltinRules, rules, (_) => _); + } else { + this.bundled = []; + this.bundledScopes = []; + this.packageJsonCache = this.parent.packageJsonCache; + } + } + onReaddir(entries) { + if (!this.parent) { + entries = entries.filter((e) => e !== ".git" && !(e === "node_modules" && this.bundled.length === 0)); + } + if (this.parent || !entries.includes("package.json")) + return super.onReaddir(entries); + const ig = path.resolve(this.path, "package.json"); + if (this.packageJsonCache.has(ig)) { + const pkg = this.packageJsonCache.get(ig); + if (!pkg || typeof pkg !== "object") + return this.readPackageJson(entries); + return this.getPackageFiles(entries, JSON.stringify(pkg)); + } + this.readPackageJson(entries); + } + onReadPackageJson(entries, er, pkg) { + if (er) + this.emit("error", er); + else + this.getPackageFiles(entries, pkg); + } + mustHaveFilesFromPackage(pkg) { + const files = []; + if (pkg.browser) + files.push("/" + pkg.browser); + if (pkg.main) + files.push("/" + pkg.main); + if (pkg.bin) { + for (const key in pkg.bin) + files.push("/" + pkg.bin[key]); + } + files.push("/package.json", "/npm-shrinkwrap.json", "!/package-lock.json", packageMustHaves); + return files; + } + getPackageFiles(entries, pkg) { + try { + pkg = normalizePackageBin(JSON.parse(pkg.toString())); + } catch (er) { + return super.onReaddir(entries); + } + const ig = path.resolve(this.path, "package.json"); + this.packageJsonCache.set(ig, pkg); + if (!Array.isArray(pkg.files)) + return super.onReaddir(entries); + pkg.files.push(...this.mustHaveFilesFromPackage(pkg)); + if ((pkg.bundleDependencies || pkg.bundledDependencies) && entries.includes("node_modules")) + pkg.files.push("node_modules"); + const patterns = Array.from(new Set(pkg.files)).reduce((set2, pattern) => { + const excl = pattern.match(/^!+/); + if (excl) + pattern = pattern.substr(excl[0].length); + pattern = pattern.replace(/^\/+/, ""); + const negate = excl && excl[0].length % 2 === 1; + set2.push({ pattern, negate }); + return set2; + }, []); + let n = patterns.length; + const set = new Set(); + const negates = new Set(); + const results = []; + const then = (pattern, negate, er, fileList, i) => { + if (er) + return this.emit("error", er); + results[i] = { negate, fileList }; + if (--n === 0) + processResults(results); + }; + const processResults = (results2) => { + for (const { negate, fileList } of results2) { + if (negate) { + fileList.forEach((f) => { + f = f.replace(/\/+$/, ""); + set.delete(f); + negates.add(f); + }); + } else { + fileList.forEach((f) => { + f = f.replace(/\/+$/, ""); + set.add(f); + negates.delete(f); + }); + } + } + const list = Array.from(set); + pkg.files = list.concat(Array.from(negates).map((f) => "!" + f)); + const rdResult = Array.from(new Set(list.map((f) => f.replace(/^\/+/, "")))); + super.onReaddir(rdResult); + }; + patterns.forEach(({ pattern, negate }, i) => this.globFiles(pattern, (er, res) => then(pattern, negate, er, res, i))); + } + filterEntry(entry, partial) { + const p = this.path.substr(this.root.length + 1); + const pkgre = /^node_modules\/(@[^/]+\/?[^/]+|[^/]+)(\/.*)?$/; + const isRoot = !this.parent; + const pkg = isRoot && pkgre.test(entry) ? entry.replace(pkgre, "$1") : null; + const rootNM = isRoot && entry === "node_modules"; + const rootPJ = isRoot && entry === "package.json"; + return /^node_modules($|\/)/i.test(p) ? this.parent.filterEntry(this.basename + "/" + entry, partial) : pkg ? this.bundled.indexOf(pkg) !== -1 || this.bundledScopes.indexOf(pkg) !== -1 : rootNM ? !!this.bundled.length : rootPJ ? true : packageMustHavesRE.test(entry) ? true : isRoot && (entry === "npm-shrinkwrap.json" || entry === "package.json") ? true : isRoot && entry === "package-lock.json" ? false : super.filterEntry(entry, partial); + } + filterEntries() { + if (this.ignoreRules[".npmignore"]) + this.ignoreRules[".gitignore"] = null; + this.filterEntries = super.filterEntries; + super.filterEntries(); + } + addIgnoreFile(file, then) { + const ig = path.resolve(this.path, file); + if (file === "package.json" && this.parent) + then(); + else if (this.packageJsonCache.has(ig)) + this.onPackageJson(ig, this.packageJsonCache.get(ig), then); + else + super.addIgnoreFile(file, then); + } + onPackageJson(ig, pkg, then) { + this.packageJsonCache.set(ig, pkg); + if (Array.isArray(pkg.files)) { + super.onReadIgnoreFile("package.json", pkg.files.map((f) => "!" + f).join("\n") + "\n", then); + } else { + const rules = this.mustHaveFilesFromPackage(pkg).map((f) => `!${f}`); + const data = rules.join("\n") + "\n"; + super.onReadIgnoreFile(packageNecessaryRules, data, then); + } + } + stat(entry, file, dir, then) { + if (nameIsBadForWindows(entry)) + then(); + else + super.stat(entry, file, dir, then); + } + onstat(st, entry, file, dir, then) { + if (st.isSymbolicLink()) + then(); + else + super.onstat(st, entry, file, dir, then); + } + onReadIgnoreFile(file, data, then) { + if (file === "package.json") { + try { + const ig = path.resolve(this.path, file); + this.onPackageJson(ig, JSON.parse(data), then); + } catch (er) { + then(); + } + } else + super.onReadIgnoreFile(file, data, then); + } + sort(a, b) { + return sort(a, b); + } + }; + var Walker = class extends npmWalker(IgnoreWalker) { + globFiles(pattern, cb) { + glob(pattern, { dot: true, cwd: this.path, nocase: true }, cb); + } + readPackageJson(entries) { + fs.readFile(this.path + "/package.json", (er, pkg) => this.onReadPackageJson(entries, er, pkg)); + } + walker(entry, then) { + new Walker(this.walkerOpt(entry)).on("done", then).start(); + } + }; + var WalkerSync = class extends npmWalker(IgnoreWalkerSync) { + globFiles(pattern, cb) { + cb(null, glob.sync(pattern, { dot: true, cwd: this.path, nocase: true })); + } + readPackageJson(entries) { + const p = this.path + "/package.json"; + try { + this.onReadPackageJson(entries, null, fs.readFileSync(p)); + } catch (er) { + this.onReadPackageJson(entries, er); + } + } + walker(entry, then) { + new WalkerSync(this.walkerOpt(entry)).start(); + then(); + } + }; + var walk = (options, callback) => { + options = options || {}; + const p = new Promise((resolve, reject) => { + const bw = new BundleWalker(options); + bw.on("done", (bundled) => { + options.bundled = bundled; + options.packageJsonCache = bw.packageJsonCache; + new Walker(options).on("done", resolve).on("error", reject).start(); + }); + bw.start(); + }); + return callback ? p.then((res) => callback(null, res), callback) : p; + }; + var walkSync = (options) => { + options = options || {}; + const bw = new BundleWalkerSync(options).start(); + options.bundled = bw.result; + options.packageJsonCache = bw.packageJsonCache; + const walker = new WalkerSync(options); + walker.start(); + return walker.result; + }; + var sort = (a, b) => { + const exta = path.extname(a).toLowerCase(); + const extb = path.extname(b).toLowerCase(); + const basea = path.basename(a).toLowerCase(); + const baseb = path.basename(b).toLowerCase(); + return exta.localeCompare(extb, "en") || basea.localeCompare(baseb, "en") || a.localeCompare(b, "en"); + }; + module2.exports = walk; + walk.sync = walkSync; + walk.Walker = Walker; + walk.WalkerSync = WalkerSync; + } +}); + +// ../run-npm/lib/index.js +var require_lib104 = __commonJS({ + "../run-npm/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runScriptSync = void 0; + var path_1 = __importDefault(require("path")); + var cross_spawn_1 = __importDefault(require_cross_spawn()); + var path_name_1 = __importDefault(require_path_name()); + function runNpm(npmPath, args2, options) { + var _a; + const npm = npmPath !== null && npmPath !== void 0 ? npmPath : "npm"; + return runScriptSync(npm, args2, { + cwd: (_a = options === null || options === void 0 ? void 0 : options.cwd) !== null && _a !== void 0 ? _a : process.cwd(), + stdio: "inherit", + userAgent: void 0 + }); + } + exports2.default = runNpm; + function runScriptSync(command, args2, opts) { + opts = Object.assign({}, opts); + return cross_spawn_1.default.sync(command, args2, Object.assign({}, opts, { + env: createEnv(opts) + })); + } + exports2.runScriptSync = runScriptSync; + function createEnv(opts) { + const env = Object.create(process.env); + env[path_name_1.default] = [ + path_1.default.join(opts.cwd, "node_modules", ".bin"), + path_1.default.dirname(process.execPath), + process.env[path_name_1.default] + ].join(path_1.default.delimiter); + if (opts.userAgent) { + env.npm_config_user_agent = opts.userAgent; + } + return env; + } + } +}); + +// ../plugin-commands-publishing/lib/recursivePublish.js +var require_recursivePublish = __commonJS({ + "../plugin-commands-publishing/lib/recursivePublish.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var client_1 = require_lib49(); + var logger_1 = __importDefault(require_lib6()); + var pick_registry_for_package_1 = __importDefault(require_lib50()); + var sort_packages_1 = __importDefault(require_lib92()); + var p_filter_1 = __importDefault(require_p_filter()); + var pick_1 = __importDefault(require_pick()); + var write_json_file_1 = __importDefault(require_write_json_file()); + var publish_1 = require_publish2(); + async function default_1(opts) { + var _a, _b; + const pkgs = Object.values(opts.selectedProjectsGraph).map((wsPkg) => wsPkg.package); + const resolve = client_1.createResolver({ + ...opts, + authConfig: opts.rawConfig, + retry: { + factor: opts.fetchRetryFactor, + maxTimeout: opts.fetchRetryMaxtimeout, + minTimeout: opts.fetchRetryMintimeout, + retries: opts.fetchRetries + }, + timeout: opts.fetchTimeout + }); + const pkgsToPublish = await p_filter_1.default(pkgs, async (pkg) => { + var _a2; + if (!pkg.manifest.name || !pkg.manifest.version || pkg.manifest.private) + return false; + if (opts.force) + return true; + return !await isAlreadyPublished({ + dir: pkg.dir, + lockfileDir: (_a2 = opts.lockfileDir) !== null && _a2 !== void 0 ? _a2 : pkg.dir, + registries: opts.registries, + resolve + }, pkg.manifest.name, pkg.manifest.version); + }); + const publishedPkgDirs = new Set(pkgsToPublish.map(({ dir }) => dir)); + const publishedPackages = []; + if (publishedPkgDirs.size === 0) { + logger_1.default.info({ + message: "There are no new packages that should be published", + prefix: opts.dir + }); + } else { + const appendedArgs = []; + if (opts.cliOptions["access"]) { + appendedArgs.push(`--access=${opts.cliOptions["access"]}`); + } + if (opts.dryRun) { + appendedArgs.push("--dry-run"); + } + const chunks = sort_packages_1.default(opts.selectedProjectsGraph); + const tag = (_a = opts.tag) !== null && _a !== void 0 ? _a : "latest"; + for (const chunk of chunks) { + for (const pkgDir of chunk) { + if (!publishedPkgDirs.has(pkgDir)) + continue; + const pkg = opts.selectedProjectsGraph[pkgDir].package; + const publishResult = await publish_1.handler({ + ...opts, + dir: pkg.dir, + argv: { + original: [ + "publish", + "--tag", + tag, + "--registry", + pick_registry_for_package_1.default(opts.registries, pkg.manifest.name), + ...appendedArgs + ] + }, + gitChecks: false, + recursive: false + }, [pkg.dir]); + if ((publishResult === null || publishResult === void 0 ? void 0 : publishResult.manifest) != null) { + publishedPackages.push(pick_1.default(["name", "version"], publishResult.manifest)); + } + } + } + } + if (opts.reportSummary) { + await write_json_file_1.default(path_1.default.join((_b = opts.lockfileDir) !== null && _b !== void 0 ? _b : opts.dir, "pnpm-publish-summary.json"), { publishedPackages }); + } + } + exports2.default = default_1; + async function isAlreadyPublished(opts, pkgName, pkgVersion) { + try { + await opts.resolve({ alias: pkgName, pref: pkgVersion }, { + lockfileDir: opts.lockfileDir, + preferredVersions: {}, + projectDir: opts.dir, + registry: pick_registry_for_package_1.default(opts.registries, pkgName, pkgVersion) + }); + return true; + } catch (err) { + return false; + } + } + } +}); + +// ../plugin-commands-publishing/lib/gitChecks.js +var require_gitChecks = __commonJS({ + "../plugin-commands-publishing/lib/gitChecks.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isRemoteHistoryClean = exports2.isWorkingTreeClean = exports2.getCurrentBranch = exports2.isGitRepo = void 0; + var execa_1 = __importDefault(require_lib26()); + async function isGitRepo() { + try { + await execa_1.default("git", ["rev-parse", "--git-dir"]); + } catch (_) { + return false; + } + return true; + } + exports2.isGitRepo = isGitRepo; + async function getCurrentBranch() { + const { stdout } = await execa_1.default("git", ["symbolic-ref", "--short", "HEAD"]); + return stdout; + } + exports2.getCurrentBranch = getCurrentBranch; + async function isWorkingTreeClean() { + try { + const { stdout: status } = await execa_1.default("git", ["status", "--porcelain"]); + if (status !== "") { + return false; + } + return true; + } catch (_) { + return false; + } + } + exports2.isWorkingTreeClean = isWorkingTreeClean; + async function isRemoteHistoryClean() { + let history; + try { + const { stdout } = await execa_1.default("git", ["rev-list", "--count", "--left-only", "@{u}...HEAD"]); + history = stdout; + } catch (_) { + history = null; + } + if (history && history !== "0") { + return false; + } + return true; + } + exports2.isRemoteHistoryClean = isRemoteHistoryClean; + } +}); + +// ../plugin-commands-publishing/lib/publish.js +var require_publish2 = __commonJS({ + "../plugin-commands-publishing/lib/publish.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runScriptsIfPresent = exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var config_1 = require_lib10(); + var error_1 = __importDefault(require_lib8()); + var lifecycle_1 = __importDefault(require_lib80()); + var run_npm_1 = __importDefault(require_lib104()); + var enquirer_1 = require_enquirer(); + var rimraf_1 = __importDefault(require_rimraf()); + var pick_1 = __importDefault(require_pick()); + var realpath_missing_1 = __importDefault(require_realpath_missing()); + var render_help_1 = __importDefault(require_lib30()); + var pack = __importStar2(require_pack2()); + var recursivePublish_1 = __importDefault(require_recursivePublish()); + var gitChecks_1 = require_gitChecks(); + function rcOptionsTypes() { + return pick_1.default([ + "access", + "git-checks", + "ignore-scripts", + "npm-path", + "otp", + "publish-branch", + "registry", + "tag", + "unsafe-perm" + ], config_1.types); + } + exports2.rcOptionsTypes = rcOptionsTypes; + function cliOptionsTypes() { + return { + ...rcOptionsTypes(), + "dry-run": Boolean, + force: Boolean, + json: Boolean, + recursive: Boolean, + "report-summary": Boolean + }; + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["publish"]; + function help() { + return render_help_1.default({ + description: "Publishes a package to the npm registry.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "Don't check if current branch is your publish branch, clean, and up-to-date", + name: "--no-git-checks" + }, + { + description: "Sets branch name to publish. Default is master", + name: "--publish-branch" + }, + { + description: "Does everything a publish would do except actually publishing to the registry", + name: "--dry-run" + }, + { + description: 'Registers the published package with the given tag. By default, the "latest" tag is used.', + name: "--tag " + }, + { + description: "Tells the registry whether this package should be published as public or restricted", + name: "--access " + }, + { + description: "Ignores any publish related lifecycle scripts (prepublishOnly, postpublish, and the like)", + name: "--ignore-scripts" + }, + { + description: 'Packages are proceeded to be published even if their current version is already in the registry. This is useful when a "prepublishOnly" script bumps the version of the package before it is published', + name: "--force" + }, + { + description: 'Save the list of the newly published packages to "pnpm-publish-summary.json". Useful when some other tooling is used to report the list of published packages.', + name: "--report-summary" + } + ] + } + ], + url: cli_utils_1.docsUrl("publish"), + usages: ["pnpm publish [|] [--tag ] [--access ] [options]"] + }); + } + exports2.help = help; + var GIT_CHECKS_HINT = 'If you want to disable Git checks on publish, set the "git-checks" setting to "false", or run again with "--no-git-checks".'; + async function handler(opts, params) { + var _a, _b; + if (opts.gitChecks !== false && await gitChecks_1.isGitRepo()) { + if (!await gitChecks_1.isWorkingTreeClean()) { + throw new error_1.default("GIT_NOT_UNCLEAN", "Unclean working tree. Commit or stash changes first.", { + hint: GIT_CHECKS_HINT + }); + } + const branches = opts.publishBranch ? [opts.publishBranch] : ["master", "main"]; + const currentBranch = await gitChecks_1.getCurrentBranch(); + if (!branches.includes(currentBranch)) { + const { confirm } = await enquirer_1.prompt({ + message: `You're on branch "${currentBranch}" but your "publish-branch" is set to "${branches.join("|")}". Do you want to continue?`, + name: "confirm", + type: "confirm" + }); + if (!confirm) { + throw new error_1.default("GIT_NOT_CORRECT_BRANCH", `Branch is not on '${branches.join("|")}'.`, { + hint: GIT_CHECKS_HINT + }); + } + } + if (!await gitChecks_1.isRemoteHistoryClean()) { + throw new error_1.default("GIT_NOT_LATEST", "Remote history differs. Please pull changes.", { + hint: GIT_CHECKS_HINT + }); + } + } + if (opts.recursive && opts.selectedProjectsGraph != null) { + await recursivePublish_1.default({ + ...opts, + selectedProjectsGraph: opts.selectedProjectsGraph, + workspaceDir: (_a = opts.workspaceDir) !== null && _a !== void 0 ? _a : process.cwd() + }); + return; + } + if (params.length > 0 && params[0].endsWith(".tgz")) { + run_npm_1.default(opts.npmPath, ["publish", ...params]); + return; + } + const dirInParams = params.length > 0 && params[0]; + const dir = dirInParams || opts.dir || process.cwd(); + const _runScriptsIfPresent = runScriptsIfPresent.bind(null, { + depPath: dir, + extraBinPaths: opts.extraBinPaths, + pkgRoot: dir, + rawConfig: opts.rawConfig, + rootModulesDir: await realpath_missing_1.default(path_1.default.join(dir, "node_modules")), + stdio: "inherit", + unsafePerm: true + }); + const { manifest } = await cli_utils_1.readProjectManifest(dir, opts); + let args2 = opts.argv.original.slice(1); + if (dirInParams) { + args2 = args2.filter((arg) => arg !== params[0]); + } + const index = args2.indexOf("--publish-branch"); + if (index !== -1) { + if ((_b = args2[index + 1]) === null || _b === void 0 ? void 0 : _b.startsWith("-")) { + args2.splice(index, 1); + } else { + args2.splice(index, 2); + } + } + const tarballName = await pack.handler({ + ...opts, + dir + }); + const tarballDir = path_1.default.dirname(path_1.default.join(dir, tarballName)); + const localNpmrc = path_1.default.join(tarballDir, ".npmrc"); + const copyNpmrc = !fs_1.existsSync(localNpmrc) && opts.workspaceDir && fs_1.existsSync(path_1.default.join(opts.workspaceDir, ".npmrc")); + if (copyNpmrc && opts.workspaceDir) { + await fs_1.promises.copyFile(path_1.default.join(opts.workspaceDir, ".npmrc"), localNpmrc); + } + const { status } = run_npm_1.default(opts.npmPath, ["publish", "--ignore-scripts", path_1.default.basename(tarballName), ...args2], { + cwd: tarballDir + }); + await rimraf_1.default(path_1.default.join(dir, tarballName)); + if (copyNpmrc) { + await rimraf_1.default(localNpmrc); + } + if (status != null && status !== 0) { + process.exit(status); + } + if (!opts.ignoreScripts) { + await _runScriptsIfPresent([ + "publish", + "postpublish" + ], manifest); + } + return { manifest }; + } + exports2.handler = handler; + async function runScriptsIfPresent(opts, scriptNames, manifest) { + var _a; + for (const scriptName of scriptNames) { + if (!((_a = manifest.scripts) === null || _a === void 0 ? void 0 : _a[scriptName])) + continue; + await lifecycle_1.default(scriptName, manifest, opts); + } + } + exports2.runScriptsIfPresent = runScriptsIfPresent; + } +}); + +// ../plugin-commands-publishing/lib/pack.js +var require_pack2 = __commonJS({ + "../plugin-commands-publishing/lib/pack.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var fs_1 = __importDefault(require("fs")); + var path_1 = __importDefault(require("path")); + var zlib_1 = require("zlib"); + var config_1 = require_lib10(); + var cli_utils_1 = require_lib20(); + var exportable_manifest_1 = __importDefault(require_lib103()); + var package_bins_1 = __importDefault(require_lib68()); + var fast_glob_1 = __importDefault(require_out4()); + var pick_1 = __importDefault(require_pick()); + var realpath_missing_1 = __importDefault(require_realpath_missing()); + var render_help_1 = __importDefault(require_lib30()); + var tar_stream_1 = __importDefault(require_tar_stream()); + var npm_packlist_1 = __importDefault(require_npm_packlist()); + var fromPairs_1 = __importDefault(require_fromPairs()); + var publish_1 = require_publish2(); + var LICENSE_GLOB = "LICEN{S,C}E{,.*}"; + var findLicenses = fast_glob_1.default.bind(fast_glob_1.default, [LICENSE_GLOB]); + function rcOptionsTypes() { + return { + ...cliOptionsTypes(), + ...pick_1.default([ + "npm-path" + ], config_1.types) + }; + } + exports2.rcOptionsTypes = rcOptionsTypes; + function cliOptionsTypes() { + return { + "pack-destination": String + }; + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["pack"]; + function help() { + return render_help_1.default({ + description: "Create a tarball from a package", + usages: ["pnpm pack"], + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "Directory in which `pnpm pack` will save tarballs. The default is the current working directory.", + name: "--pack-destination " + } + ] + } + ] + }); + } + exports2.help = help; + async function handler(opts) { + var _a, _b; + const { manifest: entryManifest } = await cli_utils_1.readProjectManifest(opts.dir, opts); + const _runScriptsIfPresent = publish_1.runScriptsIfPresent.bind(null, { + depPath: opts.dir, + extraBinPaths: opts.extraBinPaths, + pkgRoot: opts.dir, + rawConfig: opts.rawConfig, + rootModulesDir: await realpath_missing_1.default(path_1.default.join(opts.dir, "node_modules")), + stdio: "inherit", + unsafePerm: true + }); + if (!opts.ignoreScripts) { + await _runScriptsIfPresent([ + "prepublish", + "prepare", + "prepublishOnly", + "prepack" + ], entryManifest); + } + const dir = ((_a = entryManifest.publishConfig) === null || _a === void 0 ? void 0 : _a.directory) ? path_1.default.join(opts.dir, entryManifest.publishConfig.directory) : opts.dir; + const manifest = opts.dir !== dir ? (await cli_utils_1.readProjectManifest(dir, opts)).manifest : entryManifest; + const tarballName = `${manifest.name.replace("@", "").replace("/", "-")}-${manifest.version}.tgz`; + const files = await npm_packlist_1.default({ path: dir }); + const filesMap = fromPairs_1.default(files.map((file) => [`package/${file}`, path_1.default.join(dir, file)])); + if (opts.workspaceDir != null && dir !== opts.workspaceDir && !files.some((file) => /LICEN[CS]E(\..+)?/i.test(file))) { + const licenses = await findLicenses({ cwd: opts.workspaceDir }); + for (const license of licenses) { + filesMap[`package/${license}`] = path_1.default.join(opts.workspaceDir, license); + } + } + const destDir = opts.packDestination ? path_1.default.isAbsolute(opts.packDestination) ? opts.packDestination : path_1.default.join(dir, (_b = opts.packDestination) !== null && _b !== void 0 ? _b : ".") : dir; + await packPkg(path_1.default.join(destDir, tarballName), filesMap, dir); + if (!opts.ignoreScripts) { + await _runScriptsIfPresent(["postpack"], entryManifest); + } + return path_1.default.relative(opts.dir, path_1.default.join(dir, tarballName)); + } + exports2.handler = handler; + var modeIsExecutable = (mode) => (mode & 73) === 73; + async function packPkg(destFile, filesMap, projectDir) { + var _a, _b; + const { manifest } = await cli_utils_1.readProjectManifest(projectDir, {}); + const bins = [ + ...(await package_bins_1.default(manifest, projectDir)).map(({ path }) => path), + ...((_b = (_a = manifest.publishConfig) === null || _a === void 0 ? void 0 : _a.executableFiles) !== null && _b !== void 0 ? _b : []).map((executableFile) => path_1.default.join(projectDir, executableFile)) + ]; + const mtime = new Date("1985-10-26T08:15:00.000Z"); + const pack = tar_stream_1.default.pack(); + for (const [name, source] of Object.entries(filesMap)) { + let isExecutable = bins.some((bin) => path_1.default.relative(bin, source) === ""); + if (!isExecutable) { + const { mode: existingMode } = await fs_1.default.promises.stat(source); + isExecutable = modeIsExecutable(existingMode); + } + const mode = isExecutable ? 493 : 420; + if (/^package\/package\.(json|json5|yaml)/.test(name)) { + const publishManifest = await exportable_manifest_1.default(projectDir, manifest); + pack.entry({ mode, mtime, name: "package/package.json" }, JSON.stringify(publishManifest, null, 2)); + continue; + } + pack.entry({ mode, mtime, name }, fs_1.default.readFileSync(source)); + } + const tarball = fs_1.default.createWriteStream(destFile); + pack.pipe(zlib_1.createGzip()).pipe(tarball); + pack.finalize(); + return new Promise((resolve, reject) => { + tarball.on("close", () => resolve()).on("error", reject); + }); + } + } +}); + +// ../plugin-commands-publishing/lib/index.js +var require_lib105 = __commonJS({ + "../plugin-commands-publishing/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.publish = exports2.pack = void 0; + var pack = __importStar2(require_pack2()); + exports2.pack = pack; + var publish = __importStar2(require_publish2()); + exports2.publish = publish; + } +}); + +// ../plugin-commands-script-runners/lib/dlx.js +var require_dlx = __commonJS({ + "../plugin-commands-script-runners/lib/dlx.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.cliOptionsTypes = exports2.rcOptionsTypes = exports2.commandNames = void 0; + var fs_1 = __importDefault(require("fs")); + var os_1 = __importDefault(require("os")); + var path_1 = __importDefault(require("path")); + var rimraf_1 = __importDefault(require_rimraf()); + var execa_1 = __importDefault(require_lib26()); + var path_name_1 = __importDefault(require_path_name()); + var render_help_1 = __importDefault(require_lib30()); + exports2.commandNames = ["dlx"]; + function rcOptionsTypes() { + return {}; + } + exports2.rcOptionsTypes = rcOptionsTypes; + var cliOptionsTypes = () => ({ + package: [String, Array] + }); + exports2.cliOptionsTypes = cliOptionsTypes; + function help() { + return render_help_1.default({ + description: "Run a package in a temporary environment.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "The package to install before running the command", + name: "--package" + } + ] + } + ], + usages: ["pnpm dlx [args...]"] + }); + } + exports2.help = help; + async function handler(opts, params) { + var _a; + const prefix = path_1.default.join(fs_1.default.realpathSync(os_1.default.tmpdir()), `dlx-${process.pid.toString()}`); + const bins = process.platform === "win32" ? prefix : path_1.default.join(prefix, "bin"); + fs_1.default.mkdirSync(prefix, { recursive: true }); + process.on("exit", () => { + try { + fs_1.default.rmdirSync(prefix, { + recursive: true, + maxRetries: 3 + }); + } catch (err) { + } + }); + await rimraf_1.default(bins); + const pkgs = (_a = opts.package) !== null && _a !== void 0 ? _a : params.slice(0, 1); + await execa_1.default("pnpm", ["add", ...pkgs, "--global", "--global-dir", prefix, "--dir", prefix], { + stdio: "inherit" + }); + await execa_1.default(params[0], params.slice(1), { + env: { + ...process.env, + [path_name_1.default]: [ + bins, + process.env[path_name_1.default] + ].join(path_1.default.delimiter) + }, + stdio: "inherit" + }); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-script-runners/lib/existsInDir.js +var require_existsInDir = __commonJS({ + "../plugin-commands-script-runners/lib/existsInDir.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var path_exists_1 = __importDefault(require_path_exists()); + exports2.default = async (entityName, dir) => { + const entityPath = path_1.default.join(dir, entityName); + if (await path_exists_1.default(entityPath)) + return entityPath; + return void 0; + }; + } +}); + +// ../plugin-commands-script-runners/lib/runRecursive.js +var require_runRecursive = __commonJS({ + "../plugin-commands-script-runners/lib/runRecursive.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var error_1 = __importDefault(require_lib8()); + var lifecycle_1 = __importStar2(require_lib80()); + var logger_1 = __importDefault(require_lib6()); + var sort_packages_1 = __importDefault(require_lib92()); + var p_limit_1 = __importDefault(require_p_limit()); + var realpath_missing_1 = __importDefault(require_realpath_missing()); + var existsInDir_1 = __importDefault(require_existsInDir()); + exports2.default = async (params, opts) => { + var _a; + const [scriptName, ...passedThruArgs] = params; + if (!scriptName) { + throw new error_1.default("SCRIPT_NAME_IS_REQUIRED", "You must specify the script you want to run"); + } + let hasCommand = 0; + const sortedPackageChunks = opts.sort ? sort_packages_1.default(opts.selectedProjectsGraph) : [Object.keys(opts.selectedProjectsGraph).sort()]; + const packageChunks = opts.reverse ? sortedPackageChunks.reverse() : sortedPackageChunks; + const result = { + fails: [], + passes: 0 + }; + const limitRun = p_limit_1.default((_a = opts.workspaceConcurrency) !== null && _a !== void 0 ? _a : 4); + const stdio = opts.workspaceConcurrency === 1 || packageChunks.length === 1 && packageChunks[0].length === 1 ? "inherit" : "pipe"; + const existsPnp = existsInDir_1.default.bind(null, ".pnp.cjs"); + const workspacePnpPath = opts.workspaceDir && await existsPnp(opts.workspaceDir); + for (const chunk of packageChunks) { + await Promise.all(chunk.map(async (prefix) => limitRun(async () => { + var _a2; + const pkg = opts.selectedProjectsGraph[prefix]; + if (!((_a2 = pkg.package.manifest.scripts) === null || _a2 === void 0 ? void 0 : _a2[scriptName]) || process.env.npm_lifecycle_event === scriptName && process.env.PNPM_SCRIPT_SRC_DIR === prefix) { + return; + } + hasCommand++; + try { + const lifecycleOpts = { + depPath: prefix, + extraBinPaths: opts.extraBinPaths, + pkgRoot: prefix, + rawConfig: opts.rawConfig, + rootModulesDir: await realpath_missing_1.default(path_1.default.join(prefix, "node_modules")), + scriptShell: opts.scriptShell, + shellEmulator: opts.shellEmulator, + stdio, + unsafePerm: true + }; + const pnpPath = workspacePnpPath !== null && workspacePnpPath !== void 0 ? workspacePnpPath : await existsPnp(prefix); + if (pnpPath) { + lifecycleOpts.extraEnv = lifecycle_1.makeNodeRequireOption(pnpPath); + } + if (pkg.package.manifest.scripts[`pre${scriptName}`]) { + await lifecycle_1.default(`pre${scriptName}`, pkg.package.manifest, lifecycleOpts); + } + await lifecycle_1.default(scriptName, pkg.package.manifest, { ...lifecycleOpts, args: passedThruArgs }); + if (pkg.package.manifest.scripts[`post${scriptName}`]) { + await lifecycle_1.default(`post${scriptName}`, pkg.package.manifest, lifecycleOpts); + } + result.passes++; + } catch (err) { + logger_1.default.info(err); + if (!opts.bail) { + result.fails.push({ + error: err, + message: err.message, + prefix + }); + return; + } + err["code"] = "ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL"; + err["prefix"] = prefix; + throw err; + } + }))); + } + if (scriptName !== "test" && !hasCommand && !opts.ifPresent) { + const allPackagesAreSelected = Object.keys(opts.selectedProjectsGraph).length === opts.allProjects.length; + if (allPackagesAreSelected) { + throw new error_1.default("RECURSIVE_RUN_NO_SCRIPT", `None of the packages has a "${scriptName}" script`); + } else { + logger_1.default.info({ + message: `None of the selected packages has a "${scriptName}" script`, + prefix: opts.workspaceDir + }); + } + } + cli_utils_1.throwOnCommandFail("pnpm recursive run", result); + }; + } +}); + +// ../plugin-commands-script-runners/lib/run.js +var require_run = __commonJS({ + "../plugin-commands-script-runners/lib/run.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.completion = exports2.cliOptionsTypes = exports2.rcOptionsTypes = exports2.shorthands = exports2.PARALLEL_OPTION_HELP = exports2.IF_PRESENT_OPTION_HELP = exports2.IF_PRESENT_OPTION = void 0; + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var error_1 = __importDefault(require_lib8()); + var lifecycle_1 = __importStar2(require_lib80()); + var pick_1 = __importDefault(require_pick()); + var realpath_missing_1 = __importDefault(require_realpath_missing()); + var render_help_1 = __importDefault(require_lib30()); + var runRecursive_1 = __importDefault(require_runRecursive()); + var existsInDir_1 = __importDefault(require_existsInDir()); + var exec_1 = require_exec(); + exports2.IF_PRESENT_OPTION = { + "if-present": Boolean + }; + exports2.IF_PRESENT_OPTION_HELP = { + description: "Avoid exiting with a non-zero exit code when the script is undefined", + name: "--if-present" + }; + exports2.PARALLEL_OPTION_HELP = { + description: "Completely disregard concurrency and topological sorting, running a given script immediately in all matching packages with prefixed streaming output. This is the preferred flag for long-running processes such as watch run over many packages.", + name: "--parallel" + }; + exports2.shorthands = { + parallel: [ + "--workspace-concurrency=Infinity", + "--no-sort", + "--stream", + "--recursive" + ] + }; + function rcOptionsTypes() { + return { + ...pick_1.default([ + "npm-path" + ], config_1.types) + }; + } + exports2.rcOptionsTypes = rcOptionsTypes; + function cliOptionsTypes() { + return { + ...pick_1.default([ + "bail", + "sort", + "unsafe-perm", + "workspace-concurrency" + ], config_1.types), + ...exports2.IF_PRESENT_OPTION, + recursive: Boolean + }; + } + exports2.cliOptionsTypes = cliOptionsTypes; + var completion = async (cliOpts, params) => { + var _a, _b; + if (params.length > 0) { + return []; + } + const manifest = await cli_utils_1.readProjectManifestOnly((_a = cliOpts.dir) !== null && _a !== void 0 ? _a : process.cwd(), cliOpts); + return Object.keys((_b = manifest.scripts) !== null && _b !== void 0 ? _b : {}).map((name) => ({ name })); + }; + exports2.completion = completion; + exports2.commandNames = ["run", "run-script"]; + function help() { + return render_help_1.default({ + aliases: ["run-script"], + description: "Runs a defined package script.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: 'Run the defined package script in every package found in subdirectories or every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + }, + { + description: "The command will exit with a 0 exit code even if the script fails", + name: "--no-bail" + }, + exports2.IF_PRESENT_OPTION_HELP, + exports2.PARALLEL_OPTION_HELP, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + }, + common_cli_options_help_1.FILTERING + ], + url: cli_utils_1.docsUrl("run"), + usages: ["pnpm run [-- ...]"] + }); + } + exports2.help = help; + async function handler(opts, params) { + var _a, _b, _c, _d, _e; + let dir; + const [scriptName, ...passedThruArgs] = params; + if (opts.recursive) { + if (scriptName || Object.keys(opts.selectedProjectsGraph).length > 1) { + await runRecursive_1.default(params, opts); + return; + } + dir = Object.keys(opts.selectedProjectsGraph)[0]; + } else { + dir = opts.dir; + } + const manifest = await cli_utils_1.readProjectManifestOnly(dir, opts); + if (!scriptName) { + const rootManifest = opts.workspaceDir && opts.workspaceDir !== dir ? (await cli_utils_1.tryReadProjectManifest(opts.workspaceDir, opts)).manifest : void 0; + return printProjectCommands(manifest, rootManifest !== null && rootManifest !== void 0 ? rootManifest : void 0); + } + if (scriptName !== "start" && !((_a = manifest.scripts) === null || _a === void 0 ? void 0 : _a[scriptName])) { + if (opts.ifPresent) + return; + if (opts.fallbackCommandUsed) { + if (opts.argv == null) + throw new Error("Could not fallback because opts.argv.original was not passed to the script runner"); + await exec_1.handler({ + selectedProjectsGraph: {}, + ...opts + }, opts.argv.original.slice(1)); + return; + } + if (opts.workspaceDir) { + const { manifest: rootManifest } = await cli_utils_1.tryReadProjectManifest(opts.workspaceDir, opts); + if ((_b = rootManifest === null || rootManifest === void 0 ? void 0 : rootManifest.scripts) === null || _b === void 0 ? void 0 : _b[scriptName]) { + throw new error_1.default("NO_SCRIPT", `Missing script: ${scriptName}`, { + hint: `But ${scriptName} is present in the root of the workspace, +so you may run "pnpm -w run ${scriptName}"` + }); + } + } + throw new error_1.default("NO_SCRIPT", `Missing script: ${scriptName}`); + } + const lifecycleOpts = { + depPath: dir, + extraBinPaths: opts.extraBinPaths, + pkgRoot: dir, + rawConfig: opts.rawConfig, + rootModulesDir: await realpath_missing_1.default(path_1.default.join(dir, "node_modules")), + scriptShell: opts.scriptShell, + silent: opts.reporter === "silent", + shellEmulator: opts.shellEmulator, + stdio: "inherit", + unsafePerm: true + }; + const existsPnp = existsInDir_1.default.bind(null, ".pnp.cjs"); + const pnpPath = (_c = opts.workspaceDir && await existsPnp(opts.workspaceDir)) !== null && _c !== void 0 ? _c : await existsPnp(dir); + if (pnpPath) { + lifecycleOpts.extraEnv = lifecycle_1.makeNodeRequireOption(pnpPath); + } + try { + if (opts.enablePrePostScripts && ((_d = manifest.scripts) === null || _d === void 0 ? void 0 : _d[`pre${scriptName}`]) && !manifest.scripts[scriptName].includes(`pre${scriptName}`)) { + await lifecycle_1.default(`pre${scriptName}`, manifest, lifecycleOpts); + } + await lifecycle_1.default(scriptName, manifest, { ...lifecycleOpts, args: passedThruArgs }); + if (opts.enablePrePostScripts && ((_e = manifest.scripts) === null || _e === void 0 ? void 0 : _e[`post${scriptName}`]) && !manifest.scripts[scriptName].includes(`post${scriptName}`)) { + await lifecycle_1.default(`post${scriptName}`, manifest, lifecycleOpts); + } + } catch (err) { + if (opts.bail !== false) { + throw err; + } + } + return void 0; + } + exports2.handler = handler; + var ALL_LIFECYCLE_SCRIPTS = new Set([ + "prepublish", + "prepare", + "prepublishOnly", + "prepack", + "postpack", + "publish", + "postpublish", + "preinstall", + "install", + "postinstall", + "preuninstall", + "uninstall", + "postuninstall", + "preversion", + "version", + "postversion", + "pretest", + "test", + "posttest", + "prestop", + "stop", + "poststop", + "prestart", + "start", + "poststart", + "prerestart", + "restart", + "postrestart", + "preshrinkwrap", + "shrinkwrap", + "postshrinkwrap" + ]); + function printProjectCommands(manifest, rootManifest) { + var _a; + const lifecycleScripts = []; + const otherScripts = []; + for (const [scriptName, script] of Object.entries((_a = manifest.scripts) !== null && _a !== void 0 ? _a : {})) { + if (ALL_LIFECYCLE_SCRIPTS.has(scriptName)) { + lifecycleScripts.push([scriptName, script]); + } else { + otherScripts.push([scriptName, script]); + } + } + if (lifecycleScripts.length === 0 && otherScripts.length === 0) { + return "There are no scripts specified."; + } + let output = ""; + if (lifecycleScripts.length > 0) { + output += `Lifecycle scripts: +${renderCommands(lifecycleScripts)}`; + } + if (otherScripts.length > 0) { + if (output !== "") + output += "\n\n"; + output += `Commands available via "pnpm run": +${renderCommands(otherScripts)}`; + } + if ((rootManifest === null || rootManifest === void 0 ? void 0 : rootManifest.scripts) == null) { + return output; + } + const rootScripts = Object.entries(rootManifest.scripts); + if (rootScripts.length === 0) { + return output; + } + if (output !== "") + output += "\n\n"; + output += `Commands of the root workspace project (to run them, use "pnpm -w run"): +${renderCommands(rootScripts)}`; + return output; + } + function renderCommands(commands) { + return commands.map(([scriptName, script]) => ` ${scriptName} + ${script}`).join("\n"); + } + } +}); + +// ../plugin-commands-script-runners/lib/exec.js +var require_exec = __commonJS({ + "../plugin-commands-script-runners/lib/exec.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.cliOptionsTypes = exports2.rcOptionsTypes = exports2.commandNames = exports2.shorthands = void 0; + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var config_1 = require_lib10(); + var lifecycle_1 = require_lib80(); + var logger_1 = __importDefault(require_lib6()); + var read_project_manifest_1 = require_lib19(); + var sort_packages_1 = __importDefault(require_lib92()); + var execa_1 = __importDefault(require_lib26()); + var p_limit_1 = __importDefault(require_p_limit()); + var path_name_1 = __importDefault(require_path_name()); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + var existsInDir_1 = __importDefault(require_existsInDir()); + var run_1 = require_run(); + exports2.shorthands = { + parallel: run_1.shorthands.parallel + }; + exports2.commandNames = ["exec"]; + function rcOptionsTypes() { + return pick_1.default([ + "bail", + "sort", + "unsafe-perm", + "workspace-concurrency" + ], config_1.types); + } + exports2.rcOptionsTypes = rcOptionsTypes; + var cliOptionsTypes = () => ({ + ...rcOptionsTypes(), + recursive: Boolean + }); + exports2.cliOptionsTypes = cliOptionsTypes; + function help() { + return render_help_1.default({ + description: "Run a shell command in the context of a project.", + descriptionLists: [ + { + title: "Options", + list: [ + run_1.PARALLEL_OPTION_HELP, + { + description: 'Run the shell command in every package found in subdirectories or every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + } + ] + } + ], + usages: ["pnpm [-r] exec [args...]"] + }); + } + exports2.help = help; + async function handler(opts, params) { + var _a; + if (params[0] === "--") { + params.shift(); + } + const limitRun = p_limit_1.default((_a = opts.workspaceConcurrency) !== null && _a !== void 0 ? _a : 4); + const result = { + fails: [], + passes: 0 + }; + let chunks; + if (opts.recursive) { + chunks = opts.sort ? sort_packages_1.default(opts.selectedProjectsGraph) : [Object.keys(opts.selectedProjectsGraph).sort()]; + } else { + chunks = [[opts.dir]]; + const project = await read_project_manifest_1.tryReadProjectManifest(opts.dir); + if (project.manifest != null) { + opts.selectedProjectsGraph = { + [opts.dir]: { + dependencies: [], + package: { + ...project, + dir: opts.dir + } + } + }; + } + } + const existsPnp = existsInDir_1.default.bind(null, ".pnp.cjs"); + const workspacePnpPath = opts.workspaceDir && await existsPnp(opts.workspaceDir); + for (const chunk of chunks) { + await Promise.all(chunk.map(async (prefix) => limitRun(async () => { + var _a2, _b; + try { + const pnpPath = workspacePnpPath !== null && workspacePnpPath !== void 0 ? workspacePnpPath : await existsPnp(prefix); + const extraEnv = pnpPath ? lifecycle_1.makeNodeRequireOption(pnpPath) : {}; + await execa_1.default(params[0], params.slice(1), { + cwd: prefix, + env: { + ...process.env, + ...extraEnv, + [path_name_1.default]: [ + ...opts.extraBinPaths, + path_1.default.join(opts.dir, "node_modules/.bin"), + process.env[path_name_1.default] + ].join(path_1.default.delimiter), + PNPM_PACKAGE_NAME: (_b = (_a2 = opts.selectedProjectsGraph) === null || _a2 === void 0 ? void 0 : _a2[prefix]) === null || _b === void 0 ? void 0 : _b.package.manifest.name + }, + stdio: "inherit" + }); + result.passes++; + } catch (err) { + if (!opts.recursive && typeof err.exitCode === "number") { + process.exit(err.exitCode); + } + logger_1.default.info(err); + if (!opts.bail) { + result.fails.push({ + error: err, + message: err.message, + prefix + }); + return; + } + err["code"] = "ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL"; + err["prefix"] = prefix; + throw err; + } + }))); + } + cli_utils_1.throwOnCommandFail("pnpm recursive exec", result); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-script-runners/lib/restart.js +var require_restart = __commonJS({ + "../plugin-commands-script-runners/lib/restart.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var config_1 = require_lib10(); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + var run_1 = require_run(); + function rcOptionsTypes() { + return { + ...pick_1.default([ + "npm-path" + ], config_1.types) + }; + } + exports2.rcOptionsTypes = rcOptionsTypes; + function cliOptionsTypes() { + return run_1.IF_PRESENT_OPTION; + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["restart"]; + function help() { + return render_help_1.default({ + description: `Restarts a package. Runs a package's "stop", "restart", and "start" scripts, and associated pre- and post- scripts.`, + descriptionLists: [ + { + title: "Options", + list: [ + run_1.IF_PRESENT_OPTION_HELP + ] + } + ], + usages: ["pnpm restart [-- ...]"] + }); + } + exports2.help = help; + async function handler(opts, params) { + await run_1.handler(opts, ["stop", ...params]); + await run_1.handler(opts, ["restart", ...params]); + await run_1.handler(opts, ["start", ...params]); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-script-runners/lib/test.js +var require_test = __commonJS({ + "../plugin-commands-script-runners/lib/test.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var render_help_1 = __importDefault(require_lib30()); + var run = __importStar2(require_run()); + exports2.commandNames = ["test", "t", "tst"]; + function help() { + return render_help_1.default({ + aliases: ["t", "tst"], + description: `Runs a package's "test" script, if one was provided.`, + descriptionLists: [ + { + title: "Options", + list: [ + { + description: 'Run the tests in every package found in subdirectories or every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + } + ] + }, + common_cli_options_help_1.FILTERING + ], + url: cli_utils_1.docsUrl("test"), + usages: ["pnpm test [-- ...]"] + }); + } + exports2.help = help; + async function handler(opts, params = []) { + return run.handler(opts, ["test", ...params]); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-script-runners/lib/index.js +var require_lib106 = __commonJS({ + "../plugin-commands-script-runners/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.test = exports2.run = exports2.restart = exports2.exec = exports2.dlx = void 0; + var dlx = __importStar2(require_dlx()); + exports2.dlx = dlx; + var exec = __importStar2(require_exec()); + exports2.exec = exec; + var restart = __importStar2(require_restart()); + exports2.restart = restart; + var run = __importStar2(require_run()); + exports2.run = run; + var _test = __importStar2(require_test()); + var test = { + ...run, + ..._test + }; + exports2.test = test; + } +}); + +// ../../node_modules/.pnpm/get-port@5.1.1/node_modules/get-port/index.js +var require_get_port = __commonJS({ + "../../node_modules/.pnpm/get-port@5.1.1/node_modules/get-port/index.js"(exports2, module2) { + "use strict"; + var net = require("net"); + var Locked = class extends Error { + constructor(port) { + super(`${port} is locked`); + } + }; + var lockedPorts = { + old: new Set(), + young: new Set() + }; + var releaseOldLockedPortsIntervalMs = 1e3 * 15; + var interval; + var getAvailablePort = (options) => new Promise((resolve, reject) => { + const server = net.createServer(); + server.unref(); + server.on("error", reject); + server.listen(options, () => { + const { port } = server.address(); + server.close(() => { + resolve(port); + }); + }); + }); + var portCheckSequence = function* (ports) { + if (ports) { + yield* ports; + } + yield 0; + }; + module2.exports = async (options) => { + let ports; + if (options) { + ports = typeof options.port === "number" ? [options.port] : options.port; + } + if (interval === void 0) { + interval = setInterval(() => { + lockedPorts.old = lockedPorts.young; + lockedPorts.young = new Set(); + }, releaseOldLockedPortsIntervalMs); + if (interval.unref) { + interval.unref(); + } + } + for (const port of portCheckSequence(ports)) { + try { + let availablePort = await getAvailablePort({ ...options, port }); + while (lockedPorts.old.has(availablePort) || lockedPorts.young.has(availablePort)) { + if (port !== 0) { + throw new Locked(port); + } + availablePort = await getAvailablePort({ ...options, port }); + } + lockedPorts.young.add(availablePort); + return availablePort; + } catch (error) { + if (!["EADDRINUSE", "EACCES"].includes(error.code) && !(error instanceof Locked)) { + throw error; + } + } + } + throw new Error("No available ports found"); + }; + module2.exports.makeRange = (from, to) => { + if (!Number.isInteger(from) || !Number.isInteger(to)) { + throw new TypeError("`from` and `to` must be integer numbers"); + } + if (from < 1024 || from > 65535) { + throw new RangeError("`from` must be between 1024 and 65535"); + } + if (to < 1024 || to > 65536) { + throw new RangeError("`to` must be between 1024 and 65536"); + } + if (to < from) { + throw new RangeError("`to` must be greater than or equal to `from`"); + } + const generator = function* (from2, to2) { + for (let port = from2; port <= to2; port++) { + yield port; + } + }; + return generator(from, to); + }; + } +}); + +// ../plugin-commands-server/lib/start.js +var require_start = __commonJS({ + "../plugin-commands-server/lib/start.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var util_1 = require("util"); + var path_1 = __importDefault(require("path")); + var cli_meta_1 = __importDefault(require_lib4()); + var error_1 = __importDefault(require_lib8()); + var logger_1 = __importDefault(require_lib6()); + var server_1 = require_lib59(); + var store_connection_manager_1 = require_lib63(); + var store_path_1 = __importDefault(require_lib38()); + var diable_1 = __importDefault(require_lib62()); + var get_port_1 = __importDefault(require_get_port()); + var is_windows_1 = __importDefault(require_is_windows()); + var signal_exit_1 = __importDefault(require_signal_exit()); + var storeServerLogger = logger_1.default("store-server"); + var write = util_1.promisify(fs_1.write); + var close = util_1.promisify(fs_1.close); + var open = util_1.promisify(fs_1.open); + exports2.default = async (opts) => { + var _a; + if (opts.protocol === "ipc" && opts.port) { + throw new Error("Port cannot be selected when server communicates via IPC"); + } + if (opts.background && !diable_1.default.isDaemon()) { + diable_1.default(); + } + const storeDir = await store_path_1.default(opts.dir, opts.storeDir); + const connectionInfoDir = store_connection_manager_1.serverConnectionInfoDir(storeDir); + const serverJsonPath = path_1.default.join(connectionInfoDir, "server.json"); + await fs_1.promises.mkdir(connectionInfoDir, { recursive: true }); + let fd; + try { + fd = await open(serverJsonPath, "wx"); + } catch (error) { + if (error.code !== "EEXIST") { + throw error; + } + throw new error_1.default("SERVER_MANIFEST_LOCKED", `Canceling startup of server (pid ${process.pid}) because another process got exclusive access to server.json`); + } + let server = null; + signal_exit_1.default(() => { + if (server !== null) { + server.close(); + } + if (fd !== null) { + try { + fs_1.closeSync(fd); + } catch (error) { + storeServerLogger.error(error, "Got error while closing file descriptor of server.json, but the process is already exiting"); + } + } + try { + fs_1.unlinkSync(serverJsonPath); + } catch (error) { + if (error.code !== "ENOENT") { + storeServerLogger.error(error, "Got error unlinking server.json, but the process is already exiting"); + } + } + }); + const store = await store_connection_manager_1.createNewStoreController(Object.assign(opts, { + storeDir + })); + const protocol = (_a = opts.protocol) !== null && _a !== void 0 ? _a : opts.port ? "tcp" : "auto"; + const serverOptions = await getServerOptions(connectionInfoDir, { protocol, port: opts.port }); + const connectionOptions = { + remotePrefix: serverOptions.path != null ? `http://unix:${serverOptions.path}:` : `http://${serverOptions.hostname}:${serverOptions.port}` + }; + server = server_1.createServer(store.ctrl, { + ...serverOptions, + ignoreStopRequests: opts.ignoreStopRequests, + ignoreUploadRequests: opts.ignoreUploadRequests + }); + const serverJson = { + connectionOptions, + pid: process.pid, + pnpmVersion: cli_meta_1.default.version + }; + const serverJsonStr = JSON.stringify(serverJson, void 0, 2); + const serverJsonBuffer = Buffer.from(serverJsonStr, "utf8"); + await write(fd, serverJsonBuffer, 0, serverJsonBuffer.byteLength); + const fdForClose = fd; + fd = null; + await close(fdForClose); + }; + async function getServerOptions(connectionInfoDir, opts) { + switch (opts.protocol) { + case "tcp": + return getTcpOptions(); + case "ipc": + if (is_windows_1.default()) { + throw new Error("IPC protocol is not supported on Windows currently"); + } + return getIpcOptions(); + case "auto": + if (is_windows_1.default()) { + return getTcpOptions(); + } + return getIpcOptions(); + default: + throw new Error(`Protocol ${opts.protocol} is not supported`); + } + async function getTcpOptions() { + return { + hostname: "localhost", + port: opts.port || await get_port_1.default({ port: 5813 }) + }; + } + function getIpcOptions() { + return { + path: path_1.default.join(connectionInfoDir, "socket") + }; + } + } + } +}); + +// ../plugin-commands-server/lib/status.js +var require_status = __commonJS({ + "../plugin-commands-server/lib/status.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var logger_1 = require_lib6(); + var store_connection_manager_1 = require_lib63(); + var store_path_1 = __importDefault(require_lib38()); + exports2.default = async (opts) => { + const storeDir = await store_path_1.default(opts.dir, opts.storeDir); + const connectionInfoDir = store_connection_manager_1.serverConnectionInfoDir(storeDir); + const serverJson = await store_connection_manager_1.tryLoadServerJson({ + serverJsonPath: path_1.default.join(connectionInfoDir, "server.json"), + shouldRetryOnNoent: false + }); + if (serverJson === null) { + logger_1.globalInfo(`No server is running for the store at ${storeDir}`); + return; + } + console.log(`store: ${storeDir} +process id: ${serverJson.pid} +remote prefix: ${serverJson.connectionOptions.remotePrefix}`); + }; + } +}); + +// ../../node_modules/.pnpm/ps-list@6.3.0/node_modules/ps-list/index.js +var require_ps_list = __commonJS({ + "../../node_modules/.pnpm/ps-list@6.3.0/node_modules/ps-list/index.js"(exports2, module2) { + "use strict"; + var util = require("util"); + var path = require("path"); + var childProcess = require("child_process"); + var TEN_MEGABYTES = 1e3 * 1e3 * 10; + var execFile = util.promisify(childProcess.execFile); + var windows = async () => { + const bin = path.join(__dirname, "fastlist.exe"); + const { stdout } = await execFile(bin, { maxBuffer: TEN_MEGABYTES }); + return stdout.trim().split("\r\n").map((line) => line.split(" ")).map(([name, pid, ppid]) => ({ + name, + pid: Number.parseInt(pid, 10), + ppid: Number.parseInt(ppid, 10) + })); + }; + var main = async (options = {}) => { + const flags = (options.all === false ? "" : "a") + "wwxo"; + const ret = {}; + await Promise.all(["comm", "args", "ppid", "uid", "%cpu", "%mem"].map(async (cmd) => { + const { stdout } = await execFile("ps", [flags, `pid,${cmd}`], { maxBuffer: TEN_MEGABYTES }); + for (let line of stdout.trim().split("\n").slice(1)) { + line = line.trim(); + const [pid] = line.split(" ", 1); + const val = line.slice(pid.length + 1).trim(); + if (ret[pid] === void 0) { + ret[pid] = {}; + } + ret[pid][cmd] = val; + } + })); + return Object.entries(ret).filter(([, value]) => value.comm && value.args && value.ppid && value.uid && value["%cpu"] && value["%mem"]).map(([key, value]) => ({ + pid: Number.parseInt(key, 10), + name: path.basename(value.comm), + cmd: value.args, + ppid: Number.parseInt(value.ppid, 10), + uid: Number.parseInt(value.uid, 10), + cpu: Number.parseFloat(value["%cpu"]), + memory: Number.parseFloat(value["%mem"]) + })); + }; + module2.exports = process.platform === "win32" ? windows : main; + module2.exports.default = module2.exports; + } +}); + +// ../../node_modules/.pnpm/process-exists@4.1.0/node_modules/process-exists/index.js +var require_process_exists = __commonJS({ + "../../node_modules/.pnpm/process-exists@4.1.0/node_modules/process-exists/index.js"(exports2, module2) { + "use strict"; + var psList = require_ps_list(); + var linuxProcessMatchesName = (wantedProcessName, process2) => { + if (typeof wantedProcessName === "string") { + return process2.name === wantedProcessName || process2.cmd.split(" ")[0] === wantedProcessName; + } + return process2.pid === wantedProcessName; + }; + var nonLinuxProcessMatchesName = (wantedProcessName, process2) => { + if (typeof wantedProcessName === "string") { + return process2.name === wantedProcessName; + } + return process2.pid === wantedProcessName; + }; + var processMatchesName = process.platform === "linux" ? linuxProcessMatchesName : nonLinuxProcessMatchesName; + module2.exports = async (processName) => { + const processes = await psList(); + return processes.some((x) => processMatchesName(processName, x)); + }; + module2.exports.all = async (processName) => { + const processes = await psList(); + return new Map(processName.map((x) => [x, processes.some((y) => processMatchesName(x, y))])); + }; + module2.exports.filterExists = async (processNames) => { + const processes = await psList(); + return processNames.filter((x) => processes.some((y) => processMatchesName(x, y))); + }; + } +}); + +// ../../node_modules/.pnpm/tree-kill@1.2.2/node_modules/tree-kill/index.js +var require_tree_kill = __commonJS({ + "../../node_modules/.pnpm/tree-kill@1.2.2/node_modules/tree-kill/index.js"(exports2, module2) { + "use strict"; + var childProcess = require("child_process"); + var spawn = childProcess.spawn; + var exec = childProcess.exec; + module2.exports = function(pid, signal, callback) { + if (typeof signal === "function" && callback === void 0) { + callback = signal; + signal = void 0; + } + pid = parseInt(pid); + if (Number.isNaN(pid)) { + if (callback) { + return callback(new Error("pid must be a number")); + } else { + throw new Error("pid must be a number"); + } + } + var tree = {}; + var pidsToProcess = {}; + tree[pid] = []; + pidsToProcess[pid] = 1; + switch (process.platform) { + case "win32": + exec("taskkill /pid " + pid + " /T /F", callback); + break; + case "darwin": + buildProcessTree(pid, tree, pidsToProcess, function(parentPid) { + return spawn("pgrep", ["-P", parentPid]); + }, function() { + killAll(tree, signal, callback); + }); + break; + default: + buildProcessTree(pid, tree, pidsToProcess, function(parentPid) { + return spawn("ps", ["-o", "pid", "--no-headers", "--ppid", parentPid]); + }, function() { + killAll(tree, signal, callback); + }); + break; + } + }; + function killAll(tree, signal, callback) { + var killed = {}; + try { + Object.keys(tree).forEach(function(pid) { + tree[pid].forEach(function(pidpid) { + if (!killed[pidpid]) { + killPid(pidpid, signal); + killed[pidpid] = 1; + } + }); + if (!killed[pid]) { + killPid(pid, signal); + killed[pid] = 1; + } + }); + } catch (err) { + if (callback) { + return callback(err); + } else { + throw err; + } + } + if (callback) { + return callback(); + } + } + function killPid(pid, signal) { + try { + process.kill(parseInt(pid, 10), signal); + } catch (err) { + if (err.code !== "ESRCH") + throw err; + } + } + function buildProcessTree(parentPid, tree, pidsToProcess, spawnChildProcessesList, cb) { + var ps = spawnChildProcessesList(parentPid); + var allData = ""; + ps.stdout.on("data", function(data) { + var data = data.toString("ascii"); + allData += data; + }); + var onClose = function(code) { + delete pidsToProcess[parentPid]; + if (code != 0) { + if (Object.keys(pidsToProcess).length == 0) { + cb(); + } + return; + } + allData.match(/\d+/g).forEach(function(pid) { + pid = parseInt(pid, 10); + tree[parentPid].push(pid); + tree[pid] = []; + pidsToProcess[pid] = 1; + buildProcessTree(pid, tree, pidsToProcess, spawnChildProcessesList, cb); + }); + }; + ps.on("close", onClose); + } + } +}); + +// ../plugin-commands-server/lib/stop.js +var require_stop = __commonJS({ + "../plugin-commands-server/lib/stop.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var util_1 = require("util"); + var path_1 = __importDefault(require("path")); + var logger_1 = require_lib6(); + var server_1 = require_lib59(); + var store_connection_manager_1 = require_lib63(); + var store_path_1 = __importDefault(require_lib38()); + var delay_1 = __importDefault(require_delay2()); + var process_exists_1 = __importDefault(require_process_exists()); + var tree_kill_1 = __importDefault(require_tree_kill()); + var kill = util_1.promisify(tree_kill_1.default); + exports2.default = async (opts) => { + const storeDir = await store_path_1.default(opts.dir, opts.storeDir); + const connectionInfoDir = store_connection_manager_1.serverConnectionInfoDir(storeDir); + const serverJson = await store_connection_manager_1.tryLoadServerJson({ + serverJsonPath: path_1.default.join(connectionInfoDir, "server.json"), + shouldRetryOnNoent: false + }); + if (serverJson === null) { + logger_1.globalInfo(`Nothing to stop. No server is running for the store at ${storeDir}`); + return; + } + const storeController = await server_1.connectStoreController(serverJson.connectionOptions); + await storeController.stop(); + if (await serverGracefullyStops(serverJson.pid)) { + logger_1.globalInfo("Server gracefully stopped"); + return; + } + logger_1.globalWarn("Graceful shutdown failed"); + await kill(serverJson.pid, "SIGINT"); + logger_1.globalInfo("Server process terminated"); + }; + async function serverGracefullyStops(pid) { + if (!await process_exists_1.default(pid)) + return true; + await delay_1.default(5e3); + return !await process_exists_1.default(pid); + } + } +}); + +// ../plugin-commands-server/lib/server.js +var require_server = __commonJS({ + "../plugin-commands-server/lib/server.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var error_1 = __importDefault(require_lib8()); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + var start_1 = __importDefault(require_start()); + var status_1 = __importDefault(require_status()); + var stop_1 = __importDefault(require_stop()); + exports2.rcOptionsTypes = cliOptionsTypes; + function cliOptionsTypes() { + return { + ...pick_1.default([ + "store", + "store-dir" + ], config_1.types), + background: Boolean, + "ignore-stop-requests": Boolean, + "ignore-upload-requests": Boolean, + port: Number, + protocol: ["auto", "tcp", "ipc"] + }; + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["server"]; + function help() { + return render_help_1.default({ + description: "Manage a store server", + descriptionLists: [ + { + title: "Commands", + list: [ + { + description: "Starts a service that does all interactions with the store. Other commands will delegate any store-related tasks to this service", + name: "start" + }, + { + description: "Stops the store server", + name: "stop" + }, + { + description: "Prints information about the running server", + name: "status" + } + ] + }, + { + title: "Start options", + list: [ + { + description: "Runs the server in the background", + name: "--background" + }, + { + description: "The communication protocol used by the server", + name: "--protocol " + }, + { + description: "The port number to use, when TCP is used for communication", + name: "--port " + }, + common_cli_options_help_1.OPTIONS.storeDir, + { + description: "Maximum number of concurrent network requests", + name: "--network-concurrency " + }, + { + description: "If false, doesn't check whether packages in the store were mutated", + name: "--[no-]verify-store-integrity" + }, + { + name: "--[no-]lock" + }, + { + description: "Disallows stopping the server using `pnpm server stop`", + name: "--ignore-stop-requests" + }, + { + description: "Disallows creating new side effect cache during install", + name: "--ignore-upload-requests" + }, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + } + ], + url: cli_utils_1.docsUrl("server"), + usages: ["pnpm server "] + }); + } + exports2.help = help; + function handler(opts, params) { + opts.protocol = "tcp"; + switch (params[0]) { + case "start": + return start_1.default(opts); + case "status": + return status_1.default(opts); + case "stop": + return stop_1.default(opts); + default: + help(); + if (params[0]) { + throw new error_1.default("INVALID_SERVER_COMMAND", `"server ${params[0]}" is not a pnpm command. See "pnpm help server".`); + } + return void 0; + } + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-server/lib/index.js +var require_lib107 = __commonJS({ + "../plugin-commands-server/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.server = void 0; + var server = __importStar2(require_server()); + exports2.server = server; + } +}); + +// ../plugin-commands-setup/lib/setupOnWindows.js +var require_setupOnWindows = __commonJS({ + "../plugin-commands-setup/lib/setupOnWindows.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.setupWindowsEnvironmentPath = void 0; + var path_1 = require("path"); + var execa_1 = __importDefault(require_lib26()); + async function setupWindowsEnvironmentPath(pnpmHomeDir) { + const pathRegex = /^ {4}(?PATH) {4}(?\w+) {4}(?.*)$/gim; + const pnpmHomeRegex = /^ {4}(?PNPM_HOME) {4}(?\w+) {4}(?.*)$/gim; + const regKey = "HKEY_CURRENT_USER\\Environment"; + const queryResult = await execa_1.default("reg", ["query", regKey]); + if (queryResult.failed) { + return "Win32 registry environment values could not be retrieved"; + } + const queryOutput = queryResult.stdout; + const pathValueMatch = [...queryOutput.matchAll(pathRegex)]; + const homeValueMatch = [...queryOutput.matchAll(pnpmHomeRegex)]; + let commitNeeded = false; + let homeDir = pnpmHomeDir; + const logger = []; + if (homeValueMatch.length === 1) { + homeDir = homeValueMatch[0].groups.data; + logger.push(`Currently 'PNPM_HOME' is set to '${homeDir}'`); + } else { + logger.push(`Setting 'PNPM_HOME' to value '${homeDir}'`); + const addResult = await execa_1.default("reg", ["add", regKey, "/v", "PNPM_HOME", "/t", "REG_EXPAND_SZ", "/d", homeDir, "/f"]); + if (addResult.failed) { + logger.push(` ${addResult.stderr}`); + } else { + commitNeeded = true; + logger.push(` ${addResult.stdout}`); + } + } + if (pathValueMatch.length === 1) { + const pathData = pathValueMatch[0].groups.data; + if (pathData == null || pathData.trim() === "") { + logger.push("Current PATH is empty. No changes to this environment variable are applied"); + } else { + const homeDirPath = path_1.win32.parse(path_1.win32.normalize(homeDir)); + if (pathData.split(path_1.win32.delimiter).map((p) => path_1.win32.normalize(p)).map((p) => path_1.win32.parse(p)).map((p) => `${p.dir}${path_1.win32.sep}${p.base}`.toUpperCase()).filter((p) => p !== "").includes(`${homeDirPath.dir}${path_1.win32.sep}${homeDirPath.base}`.toUpperCase())) { + logger.push("PATH already contains PNPM_HOME"); + } else { + logger.push("Updating PATH"); + const addResult = await execa_1.default("reg", ["add", regKey, "/v", pathValueMatch[0].groups.name, "/t", "REG_EXPAND_SZ", "/d", `${homeDir}${path_1.win32.delimiter}${pathData}`, "/f"]); + if (addResult.failed) { + logger.push(` ${addResult.stderr}`); + } else { + commitNeeded = true; + logger.push(` ${addResult.stdout}`); + } + } + } + } else { + logger.push("Current PATH is not set. No changes to this environment variable are applied"); + } + if (commitNeeded) { + await execa_1.default("setx", ["PNPM_HOME", homeDir]); + } + return logger.join("\n"); + } + exports2.setupWindowsEnvironmentPath = setupWindowsEnvironmentPath; + } +}); + +// ../plugin-commands-setup/lib/setup.js +var require_setup = __commonJS({ + "../plugin-commands-setup/lib/setup.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.shorthands = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var fs_1 = __importDefault(require("fs")); + var os_1 = __importDefault(require("os")); + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var logger_1 = __importDefault(require_lib6()); + var render_help_1 = __importDefault(require_lib30()); + var setupOnWindows_1 = require_setupOnWindows(); + var rcOptionsTypes = () => ({}); + exports2.rcOptionsTypes = rcOptionsTypes; + var cliOptionsTypes = () => ({}); + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.shorthands = {}; + exports2.commandNames = ["setup"]; + function help() { + return render_help_1.default({ + description: "Sets up pnpm", + descriptionLists: [], + url: cli_utils_1.docsUrl("setup"), + usages: ["pnpm setup"] + }); + } + exports2.help = help; + function getExecPath() { + if (process["pkg"] != null) { + return process.execPath; + } + return require.main != null ? require.main.filename : process.cwd(); + } + function copyCli(currentLocation, targetDir) { + const newExecPath = path_1.default.join(targetDir, path_1.default.basename(currentLocation)); + if (path_1.default.relative(newExecPath, currentLocation) === "") + return; + logger_1.default.info({ + message: `Copying pnpm CLI from ${currentLocation} to ${newExecPath}`, + prefix: process.cwd() + }); + fs_1.default.mkdirSync(targetDir, { recursive: true }); + fs_1.default.copyFileSync(currentLocation, newExecPath); + } + async function handler(opts) { + const currentShell = typeof process.env.SHELL === "string" ? path_1.default.basename(process.env.SHELL) : null; + const execPath = getExecPath(); + if (execPath.match(/\.[cm]?js$/) == null) { + copyCli(execPath, opts.pnpmHomeDir); + } + const updateOutput = await updateShell(currentShell, opts.pnpmHomeDir); + return `${updateOutput} + +Setup complete. Open a new terminal to start using pnpm.`; + } + exports2.handler = handler; + async function updateShell(currentShell, pnpmHomeDir) { + switch (currentShell) { + case "bash": { + const configFile = path_1.default.join(os_1.default.homedir(), ".bashrc"); + return setupShell(configFile, pnpmHomeDir); + } + case "zsh": { + const configFile = path_1.default.join(os_1.default.homedir(), ".zshrc"); + return setupShell(configFile, pnpmHomeDir); + } + case "fish": { + return setupFishShell(pnpmHomeDir); + } + } + if (process.platform === "win32") { + return setupOnWindows_1.setupWindowsEnvironmentPath(pnpmHomeDir); + } + return "Could not infer shell type."; + } + async function setupShell(configFile, pnpmHomeDir) { + if (!fs_1.default.existsSync(configFile)) + return `Could not setup pnpm. No ${configFile} found`; + const configContent = await fs_1.default.promises.readFile(configFile, "utf8"); + if (configContent.includes("PNPM_HOME")) { + return `PNPM_HOME is already in ${configFile}`; + } + await fs_1.default.promises.writeFile(configFile, `${configContent} +export PNPM_HOME="${pnpmHomeDir}" +export PATH="$PNPM_HOME:$PATH" +`, "utf8"); + return `Updated ${configFile}`; + } + async function setupFishShell(pnpmHomeDir) { + const configFile = path_1.default.join(os_1.default.homedir(), ".config/fish/config.fish"); + if (!fs_1.default.existsSync(configFile)) + return `Could not setup pnpm. No ${configFile} found`; + const configContent = await fs_1.default.promises.readFile(configFile, "utf8"); + if (configContent.includes("PNPM_HOME")) { + return `PNPM_HOME is already in ${configFile}`; + } + await fs_1.default.promises.writeFile(configFile, `${configContent} +set -gx PNPM_HOME "${pnpmHomeDir}" +set -gx PATH "$PNPM_HOME" $PATH +`, "utf8"); + return `Updated ${configFile}`; + } + } +}); + +// ../plugin-commands-setup/lib/index.js +var require_lib108 = __commonJS({ + "../plugin-commands-setup/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.setup = void 0; + var setup = __importStar2(require_setup()); + exports2.setup = setup; + } +}); + +// ../plugin-commands-store/lib/storeAdd.js +var require_storeAdd = __commonJS({ + "../plugin-commands-store/lib/storeAdd.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var logger_1 = __importStar2(require_lib6()); + var parse_wanted_dependency_1 = __importDefault(require_lib87()); + var pick_registry_for_package_1 = __importDefault(require_lib50()); + async function default_1(fuzzyDeps, opts) { + var _a, _b; + const reporter = opts === null || opts === void 0 ? void 0 : opts.reporter; + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.on("data", reporter); + } + const deps = fuzzyDeps.map((dep) => parse_wanted_dependency_1.default(dep)); + let hasFailures = false; + const prefix = (_a = opts.prefix) !== null && _a !== void 0 ? _a : process.cwd(); + const registries = (_b = opts.registries) !== null && _b !== void 0 ? _b : { + default: "https://registry.npmjs.org/" + }; + await Promise.all(deps.map(async (dep) => { + var _a2; + try { + const pkgResponse = await opts.storeController.requestPackage(dep, { + downloadPriority: 1, + lockfileDir: prefix, + preferredVersions: {}, + projectDir: prefix, + registry: (_a2 = dep.alias && pick_registry_for_package_1.default(registries, dep.alias)) !== null && _a2 !== void 0 ? _a2 : registries.default + }); + await pkgResponse.files(); + logger_1.globalInfo(`+ ${pkgResponse.body.id}`); + } catch (e) { + hasFailures = true; + logger_1.default("store").error(e); + } + })); + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.removeListener("data", reporter); + } + if (hasFailures) { + throw new error_1.default("STORE_ADD_FAILURE", "Some packages have not been added correctly"); + } + } + exports2.default = default_1; + } +}); + +// ../plugin-commands-store/lib/storePrune.js +var require_storePrune = __commonJS({ + "../plugin-commands-store/lib/storePrune.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var logger_1 = require_lib6(); + async function default_1(opts) { + const reporter = opts === null || opts === void 0 ? void 0 : opts.reporter; + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.on("data", reporter); + } + await opts.storeController.prune(); + await opts.storeController.close(); + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.removeListener("data", reporter); + } + } + exports2.default = default_1; + } +}); + +// ../../node_modules/.pnpm/dint@5.1.0/node_modules/dint/index.js +var require_dint = __commonJS({ + "../../node_modules/.pnpm/dint@5.1.0/node_modules/dint/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var ssri = require_ssri(); + var path = require("path"); + var pEvery = require_p_every(); + var pLimit = require_p_limit(); + var limit = pLimit(20); + var MAX_BULK_SIZE = 1 * 1024 * 1024; + function generateFrom(dirname) { + return _retrieveFileIntegrities(dirname, dirname, {}); + } + async function _retrieveFileIntegrities(rootDir, currDir, index) { + try { + const files = await fs.promises.readdir(currDir); + await Promise.all(files.map(async (file) => { + const fullPath = path.join(currDir, file); + const stat = await fs.promises.stat(fullPath); + if (stat.isDirectory()) { + return _retrieveFileIntegrities(rootDir, fullPath, index); + } + if (stat.isFile()) { + const relativePath = path.relative(rootDir, fullPath); + index[relativePath] = { + size: stat.size, + generatingIntegrity: limit(() => { + return stat.size < MAX_BULK_SIZE ? fs.promises.readFile(fullPath).then(ssri.fromData) : ssri.fromStream(fs.createReadStream(fullPath)); + }) + }; + } + })); + return index; + } catch (err) { + if (err.code !== "ENOENT") { + throw err; + } + return index; + } + } + function check(dirname, dirIntegrity) { + dirname = path.resolve(dirname); + return pEvery(Object.keys(dirIntegrity), async (f) => { + const fstat = dirIntegrity[f]; + if (!fstat.integrity) + return false; + const filename = path.join(dirname, f); + if (fstat.size > MAX_BULK_SIZE) { + try { + return await ssri.checkStream(fs.createReadStream(filename), fstat.integrity); + } catch (err) { + if (err.code === "EINTEGRITY" || err.code === "ENOENT") + return false; + throw err; + } + } + try { + const data = await fs.promises.readFile(filename); + return ssri.checkData(data, fstat.integrity); + } catch (err) { + if (err.code === "EINTEGRITY" || err.code === "ENOENT") + return false; + throw err; + } + }, { concurrency: 100 }); + } + module2.exports = { + from: generateFrom, + check + }; + } +}); + +// ../plugin-commands-store/lib/storeStatus/extendStoreStatusOptions.js +var require_extendStoreStatusOptions = __commonJS({ + "../plugin-commands-store/lib/storeStatus/extendStoreStatusOptions.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var normalize_registries_1 = __importStar2(require_lib65()); + var defaults = async (opts) => { + var _a, _b; + const dir = (_a = opts.dir) !== null && _a !== void 0 ? _a : process.cwd(); + const lockfileDir = (_b = opts.lockfileDir) !== null && _b !== void 0 ? _b : dir; + return { + binsDir: path_1.default.join(dir, "node_modules", ".bin"), + dir, + force: false, + forceSharedLockfile: false, + lockfileDir, + registries: normalize_registries_1.DEFAULT_REGISTRIES, + shamefullyHoist: false, + storeDir: opts.storeDir, + useLockfile: true + }; + }; + exports2.default = async (opts) => { + if (opts) { + for (const key in opts) { + if (opts[key] === void 0) { + delete opts[key]; + } + } + } + const defaultOpts = await defaults(opts); + const extendedOpts = { ...defaultOpts, ...opts, storeDir: defaultOpts.storeDir }; + extendedOpts.registries = normalize_registries_1.default(extendedOpts.registries); + return extendedOpts; + }; + } +}); + +// ../plugin-commands-store/lib/storeStatus/index.js +var require_storeStatus = __commonJS({ + "../plugin-commands-store/lib/storeStatus/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var cafs_1 = require_lib31(); + var get_context_1 = require_lib67(); + var lockfile_utils_1 = require_lib53(); + var logger_1 = require_lib6(); + var dp = __importStar2(require_lib33()); + var dint_1 = __importDefault(require_dint()); + var load_json_file_1 = __importDefault(require_load_json_file()); + var p_filter_1 = __importDefault(require_p_filter()); + var extendStoreStatusOptions_1 = __importDefault(require_extendStoreStatusOptions()); + async function default_1(maybeOpts) { + var _a; + const reporter = maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.reporter; + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.on("data", reporter); + } + const opts = await extendStoreStatusOptions_1.default(maybeOpts); + const { registries, storeDir, skipped, virtualStoreDir, wantedLockfile } = await get_context_1.getContextForSingleImporter({}, { + ...opts, + extraBinPaths: [] + }); + if (!wantedLockfile) + return []; + const pkgs = Object.keys((_a = wantedLockfile.packages) !== null && _a !== void 0 ? _a : {}).filter((depPath) => !skipped.has(depPath)).map((depPath) => { + const pkgSnapshot = wantedLockfile.packages[depPath]; + const id = lockfile_utils_1.packageIdFromSnapshot(depPath, pkgSnapshot, registries); + return { + depPath, + id, + integrity: pkgSnapshot.resolution["integrity"], + pkgPath: dp.resolve(registries, depPath), + ...lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot) + }; + }); + const cafsDir = path_1.default.join(storeDir, "files"); + const modified = await p_filter_1.default(pkgs, async ({ id, integrity, depPath, name }) => { + const pkgIndexFilePath = integrity ? cafs_1.getFilePathInCafs(cafsDir, integrity, "index") : path_1.default.join(storeDir, dp.depPathToFilename(id, opts.dir), "integrity.json"); + const { files } = await load_json_file_1.default(pkgIndexFilePath); + return await dint_1.default.check(path_1.default.join(virtualStoreDir, dp.depPathToFilename(depPath, opts.dir), "node_modules", name), files) === false; + }, { concurrency: 8 }); + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.removeListener("data", reporter); + } + return modified.map(({ pkgPath }) => pkgPath); + } + exports2.default = default_1; + } +}); + +// ../plugin-commands-store/lib/store.js +var require_store = __commonJS({ + "../plugin-commands-store/lib/store.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var config_1 = require_lib10(); + var error_1 = __importDefault(require_lib8()); + var logger_1 = __importDefault(require_lib6()); + var store_connection_manager_1 = require_lib63(); + var store_path_1 = __importDefault(require_lib38()); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + var storeAdd_1 = __importDefault(require_storeAdd()); + var storePrune_1 = __importDefault(require_storePrune()); + var storeStatus_1 = __importDefault(require_storeStatus()); + exports2.rcOptionsTypes = cliOptionsTypes; + function cliOptionsTypes() { + return pick_1.default([ + "registry", + "store", + "store-dir" + ], config_1.types); + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["store"]; + function help() { + return render_help_1.default({ + description: "Reads and performs actions on pnpm store that is on the current filesystem.", + descriptionLists: [ + { + title: "Commands", + list: [ + { + description: "Checks for modified packages in the store. Returns exit code 0 if the content of the package is the same as it was at the time of unpacking", + name: "status" + }, + { + description: "Adds new packages to the store. Example: pnpm store add express@4 typescript@2.1.0", + name: "add ..." + }, + { + description: "Removes unreferenced (extraneous, orphan) packages from the store. Pruning the store is not harmful, but might slow down future installations. Visit the documentation for more information on unreferenced packages and why they occur", + name: "prune" + } + ] + } + ], + url: cli_utils_1.docsUrl("store"), + usages: ["pnpm store "] + }); + } + exports2.help = help; + var StoreStatusError = class extends error_1.default { + constructor(modified) { + super("MODIFIED_DEPENDENCY", ""); + this.modified = modified; + } + }; + async function handler(opts, params) { + let store; + switch (params[0]) { + case "status": + return statusCmd(opts); + case "path": + return store_path_1.default(opts.dir, opts.storeDir); + case "prune": { + store = await store_connection_manager_1.createOrConnectStoreController(opts); + const storePruneOptions = Object.assign(opts, { + storeController: store.ctrl, + storeDir: store.dir + }); + return storePrune_1.default(storePruneOptions); + } + case "add": + store = await store_connection_manager_1.createOrConnectStoreController(opts); + return storeAdd_1.default(params.slice(1), { + prefix: opts.dir, + registries: opts.registries, + reporter: opts.reporter, + storeController: store.ctrl, + tag: opts.tag + }); + default: + return help(); + } + } + exports2.handler = handler; + async function statusCmd(opts) { + const modifiedPkgs = await storeStatus_1.default(Object.assign(opts, { + storeDir: await store_path_1.default(opts.dir, opts.storeDir) + })); + if (!modifiedPkgs || modifiedPkgs.length === 0) { + logger_1.default.info({ + message: "Packages in the store are untouched", + prefix: opts.dir + }); + return; + } + throw new StoreStatusError(modifiedPkgs); + } + } +}); + +// ../plugin-commands-store/lib/index.js +var require_lib109 = __commonJS({ + "../plugin-commands-store/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.store = void 0; + var store = __importStar2(require_store()); + exports2.store = store; + } +}); + +// lib/cmd/bin.js +var require_bin = __commonJS({ + "lib/cmd/bin.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var config_1 = require_lib10(); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + exports2.rcOptionsTypes = cliOptionsTypes; + function cliOptionsTypes() { + return pick_1.default([ + "global" + ], config_1.types); + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["bin"]; + function help() { + return render_help_1.default({ + description: "Print the directory where pnpm will install executables.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "Print the global executables directory", + name: "--global", + shortAlias: "-g" + } + ] + } + ], + usages: ["pnpm bin [-g]"] + }); + } + exports2.help = help; + async function handler(opts) { + return opts.bin; + } + exports2.handler = handler; + } +}); + +// ../../node_modules/.pnpm/split-cmd@1.0.1/node_modules/split-cmd/index.js +var require_split_cmd = __commonJS({ + "../../node_modules/.pnpm/split-cmd@1.0.1/node_modules/split-cmd/index.js"(exports2, module2) { + function split(command) { + if (typeof command !== "string") { + throw new Error("Command must be a string"); + } + var r = command.match(/[^"\s]+|"(?:\\"|[^"])*"/g); + if (!r) { + return []; + } + return r.map(function(expr) { + var isQuoted = expr.charAt(0) === '"' && expr.charAt(expr.length - 1) === '"'; + return isQuoted ? expr.slice(1, -1) : expr; + }); + } + function splitToObject(command) { + var cmds = split(command); + switch (cmds.length) { + case 0: + return {}; + case 1: + return { command: cmds[0] }; + default: { + var first = cmds[0]; + cmds.shift(); + return { command: first, args: cmds }; + } + } + } + module2.exports = { split, splitToObject }; + } +}); + +// ../../node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/abbrev.js +var require_abbrev = __commonJS({ + "../../node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/abbrev.js"(exports2, module2) { + module2.exports = exports2 = abbrev.abbrev = abbrev; + abbrev.monkeyPatch = monkeyPatch; + function monkeyPatch() { + Object.defineProperty(Array.prototype, "abbrev", { + value: function() { + return abbrev(this); + }, + enumerable: false, + configurable: true, + writable: true + }); + Object.defineProperty(Object.prototype, "abbrev", { + value: function() { + return abbrev(Object.keys(this)); + }, + enumerable: false, + configurable: true, + writable: true + }); + } + function abbrev(list) { + if (arguments.length !== 1 || !Array.isArray(list)) { + list = Array.prototype.slice.call(arguments, 0); + } + for (var i = 0, l = list.length, args2 = []; i < l; i++) { + args2[i] = typeof list[i] === "string" ? list[i] : String(list[i]); + } + args2 = args2.sort(lexSort); + var abbrevs = {}, prev = ""; + for (var i = 0, l = args2.length; i < l; i++) { + var current = args2[i], next = args2[i + 1] || "", nextMatches = true, prevMatches = true; + if (current === next) + continue; + for (var j = 0, cl = current.length; j < cl; j++) { + var curChar = current.charAt(j); + nextMatches = nextMatches && curChar === next.charAt(j); + prevMatches = prevMatches && curChar === prev.charAt(j); + if (!nextMatches && !prevMatches) { + j++; + break; + } + } + prev = current; + if (j === cl) { + abbrevs[current] = current; + continue; + } + for (var a = current.substr(0, j); j <= cl; j++) { + abbrevs[a] = current; + a += current.charAt(j); + } + } + return abbrevs; + } + function lexSort(a, b) { + return a === b ? 0 : a > b ? 1 : -1; + } + } +}); + +// ../../node_modules/.pnpm/@pnpm+nopt@0.2.1/node_modules/@pnpm/nopt/lib/nopt.js +var require_nopt = __commonJS({ + "../../node_modules/.pnpm/@pnpm+nopt@0.2.1/node_modules/@pnpm/nopt/lib/nopt.js"(exports2, module2) { + var debug = process.env.DEBUG_NOPT || process.env.NOPT_DEBUG ? function() { + console.error.apply(console, arguments); + } : function() { + }; + var url = require("url"); + var path = require("path"); + var Stream = require("stream").Stream; + var abbrev = require_abbrev(); + var os = require("os"); + module2.exports = exports2 = nopt; + exports2.clean = clean; + exports2.typeDefs = { + String: { type: String, validate: validateString }, + Boolean: { type: Boolean, validate: validateBoolean }, + url: { type: url, validate: validateUrl }, + Number: { type: Number, validate: validateNumber }, + path: { type: path, validate: validatePath }, + Stream: { type: Stream, validate: validateStream }, + Date: { type: Date, validate: validateDate } + }; + function nopt(types, shorthands, args2, slice, opts) { + args2 = args2 || process.argv; + types = types || {}; + shorthands = shorthands || {}; + if (typeof slice !== "number") + slice = 2; + debug(types, shorthands, args2, slice); + args2 = args2.slice(slice); + var data = {}, key, argv2 = { + remain: [], + cooked: args2, + original: args2.slice(0) + }; + parse(args2, data, argv2.remain, types, shorthands, opts); + clean(data, types, exports2.typeDefs); + data.argv = argv2; + Object.defineProperty(data.argv, "toString", { value: function() { + return this.original.map(JSON.stringify).join(" "); + }, enumerable: false }); + return data; + } + function clean(data, types, typeDefs) { + typeDefs = typeDefs || exports2.typeDefs; + var remove = {}, typeDefault = [false, true, null, String, Array]; + Object.keys(data).forEach(function(k) { + if (k === "argv") + return; + var val = data[k], isArray = Array.isArray(val), type = types[k]; + if (!isArray) + val = [val]; + if (!type) + type = typeDefault; + if (type === Array) + type = typeDefault.concat(Array); + if (!Array.isArray(type)) + type = [type]; + debug("val=%j", val); + debug("types=", type); + val = val.map(function(val2) { + if (typeof val2 === "string") { + debug("string %j", val2); + val2 = val2.trim(); + if (val2 === "null" && ~type.indexOf(null) || val2 === "true" && (~type.indexOf(true) || ~type.indexOf(Boolean)) || val2 === "false" && (~type.indexOf(false) || ~type.indexOf(Boolean))) { + val2 = JSON.parse(val2); + debug("jsonable %j", val2); + } else if (~type.indexOf(Number) && !isNaN(val2)) { + debug("convert to number", val2); + val2 = +val2; + } else if (~type.indexOf(Date) && !isNaN(Date.parse(val2))) { + debug("convert to date", val2); + val2 = new Date(val2); + } + } + if (!types.hasOwnProperty(k)) { + return val2; + } + if (val2 === false && ~type.indexOf(null) && !(~type.indexOf(false) || ~type.indexOf(Boolean))) { + val2 = null; + } + var d = {}; + d[k] = val2; + debug("prevalidated val", d, val2, types[k]); + if (!validate(d, k, val2, types[k], typeDefs)) { + if (exports2.invalidHandler) { + exports2.invalidHandler(k, val2, types[k], data); + } else if (exports2.invalidHandler !== false) { + debug("invalid: " + k + "=" + val2, types[k]); + } + return remove; + } + debug("validated val", d, val2, types[k]); + return d[k]; + }).filter(function(val2) { + return val2 !== remove; + }); + if (!val.length && type.indexOf(Array) === -1) { + debug("VAL HAS NO LENGTH, DELETE IT", val, k, type.indexOf(Array)); + delete data[k]; + } else if (isArray) { + debug(isArray, data[k], val); + data[k] = val; + } else + data[k] = val[0]; + debug("k=%s val=%j", k, val, data[k]); + }); + } + function validateString(data, k, val) { + data[k] = String(val); + } + function validatePath(data, k, val) { + if (val === true) + return false; + if (val === null) + return true; + val = String(val); + var isWin = process.platform === "win32", homePattern = isWin ? /^~(\/|\\)/ : /^~\//, home = os.homedir(); + if (home && val.match(homePattern)) { + data[k] = path.resolve(home, val.substr(2)); + } else { + data[k] = path.resolve(val); + } + return true; + } + function validateNumber(data, k, val) { + debug("validate Number %j %j %j", k, val, isNaN(val)); + if (isNaN(val)) + return false; + data[k] = +val; + } + function validateDate(data, k, val) { + var s = Date.parse(val); + debug("validate Date %j %j %j", k, val, s); + if (isNaN(s)) + return false; + data[k] = new Date(val); + } + function validateBoolean(data, k, val) { + if (val instanceof Boolean) + val = val.valueOf(); + else if (typeof val === "string") { + if (!isNaN(val)) + val = !!+val; + else if (val === "null" || val === "false") + val = false; + else + val = true; + } else + val = !!val; + data[k] = val; + } + function validateUrl(data, k, val) { + val = url.parse(String(val)); + if (!val.host) + return false; + data[k] = val.href; + } + function validateStream(data, k, val) { + if (!(val instanceof Stream)) + return false; + data[k] = val; + } + function validate(data, k, val, type, typeDefs) { + if (Array.isArray(type)) { + for (var i = 0, l = type.length; i < l; i++) { + if (type[i] === Array) + continue; + if (validate(data, k, val, type[i], typeDefs)) + return true; + } + delete data[k]; + return false; + } + if (type === Array) + return true; + if (type !== type) { + debug("Poison NaN", k, val, type); + delete data[k]; + return false; + } + if (val === type) { + debug("Explicitly allowed %j", val); + data[k] = val; + return true; + } + var ok = false, types = Object.keys(typeDefs); + for (var i = 0, l = types.length; i < l; i++) { + debug("test type %j %j %j", k, val, types[i]); + var t = typeDefs[types[i]]; + if (t && (type && type.name && t.type && t.type.name ? type.name === t.type.name : type === t.type)) { + var d = {}; + ok = t.validate(d, k, val) !== false; + val = d[k]; + if (ok) { + data[k] = val; + break; + } + } + } + debug("OK? %j (%j %j %j)", ok, k, val, types[i]); + if (!ok) + delete data[k]; + return ok; + } + function parse(args2, data, remain, types, shorthands, opts) { + debug("parse", args2, data, remain); + var escapeArgs = new Set(opts && opts.escapeArgs ? opts.escapeArgs : []); + var key = null, abbrevs = abbrev(Object.keys(types)), shortAbbr = abbrev(Object.keys(shorthands)); + for (var i = 0; i < args2.length; i++) { + var arg = args2[i]; + debug("arg", arg); + if (arg.match(/^-{2,}$/)) { + remain.push.apply(remain, args2.slice(i + 1)); + args2[i] = "--"; + break; + } + if (escapeArgs.has(arg)) { + remain.push.apply(remain, args2.slice(i)); + break; + } + var hadEq = false; + if (arg.charAt(0) === "-" && arg.length > 1) { + var at = arg.indexOf("="); + if (at > -1) { + hadEq = true; + var v = arg.substr(at + 1); + arg = arg.substr(0, at); + args2.splice(i, 1, arg, v); + } + var shRes = resolveShort(arg, shorthands, shortAbbr, abbrevs); + debug("arg=%j shRes=%j", arg, shRes); + if (shRes) { + debug(arg, shRes); + args2.splice.apply(args2, [i, 1].concat(shRes)); + if (arg !== shRes[0]) { + i--; + continue; + } + } + arg = arg.replace(/^-+/, ""); + var no = null; + while (arg.toLowerCase().indexOf("no-") === 0) { + no = !no; + arg = arg.substr(3); + } + if (abbrevs[arg]) + arg = abbrevs[arg]; + var argType = types[arg]; + var isTypeArray = Array.isArray(argType); + if (isTypeArray && argType.length === 1) { + isTypeArray = false; + argType = argType[0]; + } + var isArray = argType === Array || isTypeArray && argType.indexOf(Array) !== -1; + if (!types.hasOwnProperty(arg) && data.hasOwnProperty(arg)) { + if (!Array.isArray(data[arg])) + data[arg] = [data[arg]]; + isArray = true; + } + var val, la = args2[i + 1]; + var isBool = typeof no === "boolean" || argType === Boolean || isTypeArray && argType.indexOf(Boolean) !== -1 || typeof argType === "undefined" && !hadEq || la === "false" && (argType === null || isTypeArray && ~argType.indexOf(null)); + if (isBool) { + val = !no; + if (la === "true" || la === "false") { + val = JSON.parse(la); + la = null; + if (no) + val = !val; + i++; + } + if (isTypeArray && la) { + if (~argType.indexOf(la)) { + val = la; + i++; + } else if (la === "null" && ~argType.indexOf(null)) { + val = null; + i++; + } else if (!la.match(/^-{2,}[^-]/) && !isNaN(la) && ~argType.indexOf(Number)) { + val = +la; + i++; + } else if (!la.match(/^-[^-]/) && ~argType.indexOf(String)) { + val = la; + i++; + } + } + if (isArray) + (data[arg] = data[arg] || []).push(val); + else + data[arg] = val; + continue; + } + if (argType === String) { + if (la === void 0) { + la = ""; + } else if (la.match(/^-{1,2}[^-]+/)) { + la = ""; + i--; + } + } + if (la && la.match(/^-{2,}$/)) { + la = void 0; + i--; + } + val = la === void 0 ? true : la; + if (isArray) + (data[arg] = data[arg] || []).push(val); + else + data[arg] = val; + i++; + continue; + } + remain.push(arg); + } + } + function resolveShort(arg, shorthands, shortAbbr, abbrevs) { + arg = arg.replace(/^-+/, ""); + if (abbrevs[arg] === arg) + return null; + if (shorthands[arg]) { + if (shorthands[arg] && !Array.isArray(shorthands[arg])) + shorthands[arg] = shorthands[arg].split(/\s+/); + return shorthands[arg]; + } + var singles = shorthands.___singles; + if (!singles) { + singles = Object.keys(shorthands).filter(function(s) { + return s.length === 1; + }).reduce(function(l, r) { + l[r] = true; + return l; + }, {}); + shorthands.___singles = singles; + debug("shorthand singles", singles); + } + var chrs = arg.split("").filter(function(c) { + return singles[c]; + }); + if (chrs.join("") === arg) + return chrs.map(function(c) { + return shorthands[c]; + }).reduce(function(l, r) { + return l.concat(r); + }, []); + if (abbrevs[arg] && !shorthands[arg]) + return null; + if (shortAbbr[arg]) + arg = shortAbbr[arg]; + if (shorthands[arg] && !Array.isArray(shorthands[arg])) + shorthands[arg] = shorthands[arg].split(/\s+/); + return shorthands[arg]; + } + } +}); + +// lib/getOptionType.js +var require_getOptionType = __commonJS({ + "lib/getOptionType.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.currentTypedWordType = exports2.getLastOption = exports2.getOptionCompletions = void 0; + var nopt_1 = __importDefault(require_nopt()); + var fromPairs_1 = __importDefault(require_fromPairs()); + var omit_1 = __importDefault(require_omit()); + function getOptionCompletions(optionTypes, shorthands, option) { + const optionType = getOptionType(optionTypes, shorthands, option); + return optionTypeToCompletion(optionType); + } + exports2.getOptionCompletions = getOptionCompletions; + function optionTypeToCompletion(optionType) { + switch (optionType) { + case void 0: + case Boolean: + return void 0; + case String: + case Number: + return []; + } + if (!Array.isArray(optionType)) + return []; + if (optionType.length === 1) { + return optionTypeToCompletion(optionType); + } + return optionType.filter((ot) => typeof ot === "string"); + } + function getOptionType(optionTypes, shorthands, option) { + var _a; + const allBools = fromPairs_1.default(Object.keys(optionTypes).map((optionName) => [optionName, Boolean])); + const result = omit_1.default(["argv"], nopt_1.default(allBools, shorthands, [option], 0)); + return optionTypes[(_a = Object.entries(result)[0]) === null || _a === void 0 ? void 0 : _a[0]]; + } + function getLastOption(completionCtx) { + if (isOption(completionCtx.prev)) + return completionCtx.prev; + if (completionCtx.lastPartial === "" || completionCtx.words <= 1) + return null; + const words = completionCtx.line.slice(0, completionCtx.point).trim().split(/\s+/); + const lastWord = words[words.length - 2]; + return isOption(lastWord) ? lastWord : null; + } + exports2.getLastOption = getLastOption; + function isOption(word) { + return word.startsWith("--") && word.length >= 3 || word.startsWith("-") && word.length >= 2; + } + function currentTypedWordType(completionCtx) { + if (completionCtx.partial.endsWith(" ")) + return null; + return completionCtx.lastPartial.startsWith("-") ? "option" : "value"; + } + exports2.currentTypedWordType = currentTypedWordType; + } +}); + +// ../../node_modules/.pnpm/fastest-levenshtein@1.0.12/node_modules/fastest-levenshtein/index.js +var require_fastest_levenshtein = __commonJS({ + "../../node_modules/.pnpm/fastest-levenshtein@1.0.12/node_modules/fastest-levenshtein/index.js"(exports2, module2) { + "use strict"; + var peq = new Uint32Array(65536); + var myers_32 = (a, b) => { + const n = a.length; + const m = b.length; + const lst = 1 << n - 1; + let pv = -1; + let mv = 0; + let sc = n; + let i = n; + while (i--) { + peq[a.charCodeAt(i)] |= 1 << i; + } + for (i = 0; i < m; i++) { + let eq = peq[b.charCodeAt(i)]; + const xv = eq | mv; + eq |= (eq & pv) + pv ^ pv; + mv |= ~(eq | pv); + pv &= eq; + if (mv & lst) { + sc++; + } + if (pv & lst) { + sc--; + } + mv = mv << 1 | 1; + pv = pv << 1 | ~(xv | mv); + mv &= xv; + } + i = n; + while (i--) { + peq[a.charCodeAt(i)] = 0; + } + return sc; + }; + var myers_x = (a, b) => { + const n = a.length; + const m = b.length; + const mhc = []; + const phc = []; + const hsize = Math.ceil(n / 32); + const vsize = Math.ceil(m / 32); + let score = m; + for (let i = 0; i < hsize; i++) { + phc[i] = -1; + mhc[i] = 0; + } + let j = 0; + for (; j < vsize - 1; j++) { + let mv2 = 0; + let pv2 = -1; + const start2 = j * 32; + const end2 = Math.min(32, m) + start2; + for (let k = start2; k < end2; k++) { + peq[b.charCodeAt(k)] |= 1 << k; + } + score = m; + for (let i = 0; i < n; i++) { + const eq = peq[a.charCodeAt(i)]; + const pb = phc[i / 32 | 0] >>> i & 1; + const mb = mhc[i / 32 | 0] >>> i & 1; + const xv = eq | mv2; + const xh = ((eq | mb) & pv2) + pv2 ^ pv2 | eq | mb; + let ph = mv2 | ~(xh | pv2); + let mh = pv2 & xh; + if (ph >>> 31 ^ pb) { + phc[i / 32 | 0] ^= 1 << i; + } + if (mh >>> 31 ^ mb) { + mhc[i / 32 | 0] ^= 1 << i; + } + ph = ph << 1 | pb; + mh = mh << 1 | mb; + pv2 = mh | ~(xv | ph); + mv2 = ph & xv; + } + for (let k = start2; k < end2; k++) { + peq[b.charCodeAt(k)] = 0; + } + } + let mv = 0; + let pv = -1; + const start = j * 32; + const end = Math.min(32, m - start) + start; + for (let k = start; k < end; k++) { + peq[b.charCodeAt(k)] |= 1 << k; + } + score = m; + for (let i = 0; i < n; i++) { + const eq = peq[a.charCodeAt(i)]; + const pb = phc[i / 32 | 0] >>> i & 1; + const mb = mhc[i / 32 | 0] >>> i & 1; + const xv = eq | mv; + const xh = ((eq | mb) & pv) + pv ^ pv | eq | mb; + let ph = mv | ~(xh | pv); + let mh = pv & xh; + score += ph >>> m - 1 & 1; + score -= mh >>> m - 1 & 1; + if (ph >>> 31 ^ pb) { + phc[i / 32 | 0] ^= 1 << i; + } + if (mh >>> 31 ^ mb) { + mhc[i / 32 | 0] ^= 1 << i; + } + ph = ph << 1 | pb; + mh = mh << 1 | mb; + pv = mh | ~(xv | ph); + mv = ph & xv; + } + for (let k = start; k < end; k++) { + peq[b.charCodeAt(k)] = 0; + } + return score; + }; + var distance = (a, b) => { + if (a.length > b.length) { + const tmp = b; + b = a; + a = tmp; + } + if (a.length === 0) { + return b.length; + } + if (a.length <= 32) { + return myers_32(a, b); + } + return myers_x(a, b); + }; + var closest = (str, arr) => { + let min_distance = Infinity; + let min_index = 0; + for (let i = 0; i < arr.length; i++) { + const dist = distance(str, arr[i]); + if (dist < min_distance) { + min_distance = dist; + min_index = i; + } + } + return arr[min_index]; + }; + module2.exports = { + closest, + distance + }; + } +}); + +// ../../node_modules/.pnpm/lodash.deburr@4.1.0/node_modules/lodash.deburr/index.js +var require_lodash = __commonJS({ + "../../node_modules/.pnpm/lodash.deburr@4.1.0/node_modules/lodash.deburr/index.js"(exports2, module2) { + var INFINITY = 1 / 0; + var symbolTag = "[object Symbol]"; + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + var rsComboMarksRange = "\\u0300-\\u036f\\ufe20-\\ufe23"; + var rsComboSymbolsRange = "\\u20d0-\\u20f0"; + var rsCombo = "[" + rsComboMarksRange + rsComboSymbolsRange + "]"; + var reComboMark = RegExp(rsCombo, "g"); + var deburredLetters = { + "\xC0": "A", + "\xC1": "A", + "\xC2": "A", + "\xC3": "A", + "\xC4": "A", + "\xC5": "A", + "\xE0": "a", + "\xE1": "a", + "\xE2": "a", + "\xE3": "a", + "\xE4": "a", + "\xE5": "a", + "\xC7": "C", + "\xE7": "c", + "\xD0": "D", + "\xF0": "d", + "\xC8": "E", + "\xC9": "E", + "\xCA": "E", + "\xCB": "E", + "\xE8": "e", + "\xE9": "e", + "\xEA": "e", + "\xEB": "e", + "\xCC": "I", + "\xCD": "I", + "\xCE": "I", + "\xCF": "I", + "\xEC": "i", + "\xED": "i", + "\xEE": "i", + "\xEF": "i", + "\xD1": "N", + "\xF1": "n", + "\xD2": "O", + "\xD3": "O", + "\xD4": "O", + "\xD5": "O", + "\xD6": "O", + "\xD8": "O", + "\xF2": "o", + "\xF3": "o", + "\xF4": "o", + "\xF5": "o", + "\xF6": "o", + "\xF8": "o", + "\xD9": "U", + "\xDA": "U", + "\xDB": "U", + "\xDC": "U", + "\xF9": "u", + "\xFA": "u", + "\xFB": "u", + "\xFC": "u", + "\xDD": "Y", + "\xFD": "y", + "\xFF": "y", + "\xC6": "Ae", + "\xE6": "ae", + "\xDE": "Th", + "\xFE": "th", + "\xDF": "ss", + "\u0100": "A", + "\u0102": "A", + "\u0104": "A", + "\u0101": "a", + "\u0103": "a", + "\u0105": "a", + "\u0106": "C", + "\u0108": "C", + "\u010A": "C", + "\u010C": "C", + "\u0107": "c", + "\u0109": "c", + "\u010B": "c", + "\u010D": "c", + "\u010E": "D", + "\u0110": "D", + "\u010F": "d", + "\u0111": "d", + "\u0112": "E", + "\u0114": "E", + "\u0116": "E", + "\u0118": "E", + "\u011A": "E", + "\u0113": "e", + "\u0115": "e", + "\u0117": "e", + "\u0119": "e", + "\u011B": "e", + "\u011C": "G", + "\u011E": "G", + "\u0120": "G", + "\u0122": "G", + "\u011D": "g", + "\u011F": "g", + "\u0121": "g", + "\u0123": "g", + "\u0124": "H", + "\u0126": "H", + "\u0125": "h", + "\u0127": "h", + "\u0128": "I", + "\u012A": "I", + "\u012C": "I", + "\u012E": "I", + "\u0130": "I", + "\u0129": "i", + "\u012B": "i", + "\u012D": "i", + "\u012F": "i", + "\u0131": "i", + "\u0134": "J", + "\u0135": "j", + "\u0136": "K", + "\u0137": "k", + "\u0138": "k", + "\u0139": "L", + "\u013B": "L", + "\u013D": "L", + "\u013F": "L", + "\u0141": "L", + "\u013A": "l", + "\u013C": "l", + "\u013E": "l", + "\u0140": "l", + "\u0142": "l", + "\u0143": "N", + "\u0145": "N", + "\u0147": "N", + "\u014A": "N", + "\u0144": "n", + "\u0146": "n", + "\u0148": "n", + "\u014B": "n", + "\u014C": "O", + "\u014E": "O", + "\u0150": "O", + "\u014D": "o", + "\u014F": "o", + "\u0151": "o", + "\u0154": "R", + "\u0156": "R", + "\u0158": "R", + "\u0155": "r", + "\u0157": "r", + "\u0159": "r", + "\u015A": "S", + "\u015C": "S", + "\u015E": "S", + "\u0160": "S", + "\u015B": "s", + "\u015D": "s", + "\u015F": "s", + "\u0161": "s", + "\u0162": "T", + "\u0164": "T", + "\u0166": "T", + "\u0163": "t", + "\u0165": "t", + "\u0167": "t", + "\u0168": "U", + "\u016A": "U", + "\u016C": "U", + "\u016E": "U", + "\u0170": "U", + "\u0172": "U", + "\u0169": "u", + "\u016B": "u", + "\u016D": "u", + "\u016F": "u", + "\u0171": "u", + "\u0173": "u", + "\u0174": "W", + "\u0175": "w", + "\u0176": "Y", + "\u0177": "y", + "\u0178": "Y", + "\u0179": "Z", + "\u017B": "Z", + "\u017D": "Z", + "\u017A": "z", + "\u017C": "z", + "\u017E": "z", + "\u0132": "IJ", + "\u0133": "ij", + "\u0152": "Oe", + "\u0153": "oe", + "\u0149": "'n", + "\u017F": "ss" + }; + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + function basePropertyOf(object) { + return function(key) { + return object == null ? void 0 : object[key]; + }; + } + var deburrLetter = basePropertyOf(deburredLetters); + var objectProto = Object.prototype; + var objectToString = objectProto.toString; + var Symbol2 = root.Symbol; + var symbolProto = Symbol2 ? Symbol2.prototype : void 0; + var symbolToString = symbolProto ? symbolProto.toString : void 0; + function baseToString(value) { + if (typeof value == "string") { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ""; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY ? "-0" : result; + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + function isSymbol(value) { + return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag; + } + function toString(value) { + return value == null ? "" : baseToString(value); + } + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ""); + } + module2.exports = deburr; + } +}); + +// ../../node_modules/.pnpm/didyoumean2@5.0.0/node_modules/didyoumean2/dist/index.cjs +var require_dist12 = __commonJS({ + "../../node_modules/.pnpm/didyoumean2@5.0.0/node_modules/didyoumean2/dist/index.cjs"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var e = require_fastest_levenshtein(); + function t(e2) { + return e2 && typeof e2 == "object" && "default" in e2 ? e2 : { default: e2 }; + } + var s = t(require_lodash()); + var r; + var o; + exports2.ReturnTypeEnums = void 0, (r = exports2.ReturnTypeEnums || (exports2.ReturnTypeEnums = {})).ALL_CLOSEST_MATCHES = "all-closest-matches", r.ALL_MATCHES = "all-matches", r.ALL_SORTED_MATCHES = "all-sorted-matches", r.FIRST_CLOSEST_MATCH = "first-closest-match", r.FIRST_MATCH = "first-match", exports2.ThresholdTypeEnums = void 0, (o = exports2.ThresholdTypeEnums || (exports2.ThresholdTypeEnums = {})).EDIT_DISTANCE = "edit-distance", o.SIMILARITY = "similarity"; + var n = new Error("unknown returnType"); + var T = new Error("unknown thresholdType"); + var u = (e2, t2) => { + let r2 = e2; + return t2.trimSpaces && (r2 = r2.trim().replace(/\s+/g, " ")), t2.deburr && (r2 = s.default(r2)), t2.caseSensitive || (r2 = r2.toLowerCase()), r2; + }; + var h = (e2, t2) => { + const { matchPath: s2 } = t2, r2 = ((e3, t3) => { + const s3 = t3.length > 0 ? t3.reduce((e4, t4) => e4 == null ? void 0 : e4[t4], e3) : e3; + return typeof s3 != "string" ? "" : s3; + })(e2, s2); + return u(r2, t2); + }; + exports2.default = function(t2, s2, r2) { + const o2 = ((e2) => { + const t3 = { caseSensitive: false, deburr: true, matchPath: [], returnType: exports2.ReturnTypeEnums.FIRST_CLOSEST_MATCH, thresholdType: exports2.ThresholdTypeEnums.SIMILARITY, trimSpaces: true, ...e2 }; + switch (t3.thresholdType) { + case exports2.ThresholdTypeEnums.EDIT_DISTANCE: + return { threshold: 20, ...t3 }; + case exports2.ThresholdTypeEnums.SIMILARITY: + return { threshold: 0.4, ...t3 }; + default: + throw T; + } + })(r2), { returnType: p, threshold: c, thresholdType: a } = o2, l = u(t2, o2); + let E, S; + switch (a) { + case exports2.ThresholdTypeEnums.EDIT_DISTANCE: + E = (e2) => e2 <= c, S = (t3) => e.distance(l, h(t3, o2)); + break; + case exports2.ThresholdTypeEnums.SIMILARITY: + E = (e2) => e2 >= c, S = (t3) => ((t4, s3) => { + if (!t4 || !s3) + return 0; + if (t4 === s3) + return 1; + const r3 = e.distance(t4, s3), o3 = Math.max(t4.length, s3.length); + return (o3 - r3) / o3; + })(l, h(t3, o2)); + break; + default: + throw T; + } + const d = [], i = s2.length; + switch (p) { + case exports2.ReturnTypeEnums.ALL_CLOSEST_MATCHES: + case exports2.ReturnTypeEnums.FIRST_CLOSEST_MATCH: { + const e2 = []; + let t3; + switch (a) { + case exports2.ThresholdTypeEnums.EDIT_DISTANCE: + t3 = 1 / 0; + for (let r4 = 0; r4 < i; r4 += 1) { + const o3 = S(s2[r4]); + t3 > o3 && (t3 = o3), e2.push(o3); + } + break; + case exports2.ThresholdTypeEnums.SIMILARITY: + t3 = 0; + for (let r4 = 0; r4 < i; r4 += 1) { + const o3 = S(s2[r4]); + t3 < o3 && (t3 = o3), e2.push(o3); + } + break; + default: + throw T; + } + const r3 = e2.length; + for (let s3 = 0; s3 < r3; s3 += 1) { + const r4 = e2[s3]; + E(r4) && r4 === t3 && d.push(s3); + } + break; + } + case exports2.ReturnTypeEnums.ALL_MATCHES: + for (let e2 = 0; e2 < i; e2 += 1) { + E(S(s2[e2])) && d.push(e2); + } + break; + case exports2.ReturnTypeEnums.ALL_SORTED_MATCHES: { + const e2 = []; + for (let t3 = 0; t3 < i; t3 += 1) { + const r3 = S(s2[t3]); + E(r3) && e2.push({ score: r3, index: t3 }); + } + switch (a) { + case exports2.ThresholdTypeEnums.EDIT_DISTANCE: + e2.sort((e3, t3) => e3.score - t3.score); + break; + case exports2.ThresholdTypeEnums.SIMILARITY: + e2.sort((e3, t3) => t3.score - e3.score); + break; + default: + throw T; + } + for (const t3 of e2) + d.push(t3.index); + break; + } + case exports2.ReturnTypeEnums.FIRST_MATCH: + for (let e2 = 0; e2 < i; e2 += 1) { + if (E(S(s2[e2]))) { + d.push(e2); + break; + } + } + break; + default: + throw n; + } + return ((e2, t3, s3) => { + switch (s3) { + case exports2.ReturnTypeEnums.ALL_CLOSEST_MATCHES: + case exports2.ReturnTypeEnums.ALL_MATCHES: + case exports2.ReturnTypeEnums.ALL_SORTED_MATCHES: + return t3.map((t4) => e2[t4]); + case exports2.ReturnTypeEnums.FIRST_CLOSEST_MATCH: + case exports2.ReturnTypeEnums.FIRST_MATCH: + return t3.length ? e2[t3[0]] : null; + default: + throw n; + } + })(s2, d, p); + }; + } +}); + +// ../parse-cli-args/lib/index.js +var require_lib110 = __commonJS({ + "../parse-cli-args/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var find_workspace_dir_1 = __importDefault(require_lib94()); + var nopt_1 = __importDefault(require_nopt()); + var didyoumean2_1 = __importStar2(require_dist12()); + var RECURSIVE_CMDS = new Set(["recursive", "multi", "m"]); + async function parseCliArgs(opts, inputArgv) { + var _a; + const noptExploratoryResults = nopt_1.default({ + filter: [String], + help: Boolean, + recursive: Boolean, + ...opts.universalOptionsTypes, + ...opts.getTypesByCommandName("add"), + ...opts.getTypesByCommandName("install") + }, { + r: "--recursive", + ...opts.universalShorthands + }, inputArgv, 0, { escapeArgs: opts.escapeArgs }); + const recursiveCommandUsed = RECURSIVE_CMDS.has(noptExploratoryResults.argv.remain[0]); + let commandName = getCommandName(noptExploratoryResults.argv.remain); + let cmd = commandName ? opts.getCommandLongName(commandName) : null; + const fallbackCommandUsed = Boolean(commandName && !cmd && opts.fallbackCommand); + if (fallbackCommandUsed) { + cmd = opts.fallbackCommand; + commandName = opts.fallbackCommand; + inputArgv.unshift(opts.fallbackCommand); + } else if (noptExploratoryResults["help"]) { + return { + argv: noptExploratoryResults.argv, + cmd: "help", + options: {}, + params: noptExploratoryResults.argv.remain, + unknownOptions: new Map(), + fallbackCommandUsed: false + }; + } + const types = { + ...opts.universalOptionsTypes, + ...opts.getTypesByCommandName(commandName) + }; + function getCommandName(args2) { + if (recursiveCommandUsed) { + args2 = args2.slice(1); + } + if (opts.getCommandLongName(args2[0]) !== "install" || args2.length === 1) { + return args2[0]; + } + return "add"; + } + const { argv: argv2, ...options } = nopt_1.default({ + recursive: Boolean, + ...types + }, { + ...opts.universalShorthands, + ...opts.shorthandsByCommandName[commandName] + }, inputArgv, 0, { escapeArgs: opts.escapeArgs }); + if (opts.renamedOptions != null) { + for (const cliOption of Object.keys(options)) { + if (opts.renamedOptions[cliOption]) { + options[opts.renamedOptions[cliOption]] = options[cliOption]; + delete options[cliOption]; + } + } + } + const params = argv2.remain.slice(1).filter(Boolean); + if (options["recursive"] !== true && (options["filter"] || options["filter-prod"] || recursiveCommandUsed)) { + options["recursive"] = true; + const subCmd = argv2.remain[1] && opts.getCommandLongName(argv2.remain[1]); + if (subCmd && recursiveCommandUsed) { + params.shift(); + argv2.remain.shift(); + cmd = subCmd; + } + } + const dir = (_a = options["dir"]) !== null && _a !== void 0 ? _a : process.cwd(); + const workspaceDir = options["global"] ? void 0 : await find_workspace_dir_1.default(dir); + if (options["workspace-root"]) { + if (options["global"]) { + throw new error_1.default("OPTIONS_CONFLICT", "--workspace-root may not be used with --global"); + } + if (!workspaceDir) { + throw new error_1.default("NOT_IN_WORKSPACE", "--workspace-root may only be used inside a workspace"); + } + options["dir"] = workspaceDir; + } + if (cmd === "install" && params.length > 0) { + cmd = "add"; + } + if (!cmd && options["recursive"]) { + cmd = "recursive"; + } + const knownOptions = new Set(Object.keys(types)); + return { + argv: argv2, + cmd, + params, + workspaceDir, + fallbackCommandUsed, + ...normalizeOptions(options, knownOptions) + }; + } + exports2.default = parseCliArgs; + var CUSTOM_OPTION_PREFIX = "config."; + function normalizeOptions(options, knownOptions) { + const standardOptionNames = []; + const normalizedOptions = {}; + for (const [optionName, optionValue] of Object.entries(options)) { + if (optionName.startsWith(CUSTOM_OPTION_PREFIX)) { + normalizedOptions[optionName.substring(CUSTOM_OPTION_PREFIX.length)] = optionValue; + continue; + } + normalizedOptions[optionName] = optionValue; + standardOptionNames.push(optionName); + } + const unknownOptions = getUnknownOptions(standardOptionNames, knownOptions); + return { options: normalizedOptions, unknownOptions }; + } + function getUnknownOptions(usedOptions, knownOptions) { + const unknownOptions = new Map(); + const closestMatches = getClosestOptionMatches.bind(null, Array.from(knownOptions)); + for (const usedOption of usedOptions) { + if (knownOptions.has(usedOption) || usedOption.startsWith("//")) + continue; + unknownOptions.set(usedOption, closestMatches(usedOption)); + } + return unknownOptions; + } + function getClosestOptionMatches(knownOptions, option) { + return didyoumean2_1.default(option, knownOptions, { + returnType: didyoumean2_1.ReturnTypeEnums.ALL_CLOSEST_MATCHES + }); + } + } +}); + +// lib/shorthands.js +var require_shorthands = __commonJS({ + "lib/shorthands.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + s: "--reporter=silent", + d: "--loglevel=info", + dd: "--loglevel=verbose", + ddd: "--loglevel=silly", + L: "--latest", + r: "--recursive", + silent: "--reporter=silent", + verbose: "--loglevel=verbose", + quiet: "--loglevel=warn", + q: "--loglevel=warn", + h: "--help", + H: "--help", + "?": "--help", + usage: "--help", + v: "--version", + f: "--force", + local: "--no-global", + l: "--long", + p: "--parseable", + porcelain: "--parseable", + prod: "--production", + development: "--dev", + g: "--global", + S: "--save", + D: "--save-dev", + P: "--save-prod", + E: "--save-exact", + O: "--save-optional", + C: "--dir", + "shrinkwrap-only": "--lockfile-only", + "shared-workspace-shrinkwrap": "--shared-workspace-lockfile", + "frozen-shrinkwrap": "--frozen-lockfile", + "prefer-frozen-shrinkwrap": "--prefer-frozen-lockfile", + W: "--ignore-workspace-root-check", + w: "--workspace-root", + i: "--interactive" + }; + } +}); + +// lib/parseCliArgs.js +var require_parseCliArgs = __commonJS({ + "lib/parseCliArgs.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var parse_cli_args_1 = __importDefault(require_lib110()); + var cmd_1 = require_cmd(); + var shorthands_1 = __importDefault(require_shorthands()); + var RENAMED_OPTIONS = { + "lockfile-directory": "lockfile-dir", + prefix: "dir", + "shrinkwrap-directory": "lockfile-dir", + store: "store-dir" + }; + async function parseCliArgs(inputArgv) { + return parse_cli_args_1.default({ + fallbackCommand: "run", + escapeArgs: ["dlx", "exec"], + getCommandLongName: cmd_1.getCommandFullName, + getTypesByCommandName: cmd_1.getCliOptionsTypes, + renamedOptions: RENAMED_OPTIONS, + shorthandsByCommandName: cmd_1.shorthandsByCommandName, + universalOptionsTypes: cmd_1.GLOBAL_OPTIONS, + universalShorthands: shorthands_1.default + }, inputArgv); + } + exports2.default = parseCliArgs; + } +}); + +// lib/optionTypesToCompletions.js +var require_optionTypesToCompletions = __commonJS({ + "lib/optionTypesToCompletions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function optionTypesToCompletions(optionTypes) { + const completions = []; + for (const [name, typeObj] of Object.entries(optionTypes)) { + if (typeObj === Boolean) { + completions.push({ name: `--${name}` }); + completions.push({ name: `--no-${name}` }); + } else { + completions.push({ name: `--${name}` }); + } + } + return completions; + } + exports2.default = optionTypesToCompletions; + } +}); + +// lib/cmd/complete.js +var require_complete = __commonJS({ + "lib/cmd/complete.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var find_workspace_dir_1 = __importDefault(require_lib94()); + var find_workspace_packages_1 = __importDefault(require_lib22()); + var getOptionType_1 = require_getOptionType(); + var optionTypesToCompletions_1 = __importDefault(require_optionTypesToCompletions()); + var shorthands_1 = __importDefault(require_shorthands()); + async function complete(ctx, input) { + var _a, _b, _c, _d; + if (input.options.version) + return []; + const optionTypes = { + ...ctx.universalOptionsTypes, + ...(_c = input.cmd && ((_b = (_a = ctx.cliOptionsTypesByCommandName)[input.cmd]) === null || _b === void 0 ? void 0 : _b.call(_a))) !== null && _c !== void 0 ? _c : {} + }; + if (input.currentTypedWordType !== "option") { + if (input.lastOption === "--filter") { + const workspaceDir = (_d = await find_workspace_dir_1.default(process.cwd())) !== null && _d !== void 0 ? _d : process.cwd(); + const allProjects = await find_workspace_packages_1.default(workspaceDir, {}); + return allProjects.filter(({ manifest }) => manifest.name).map(({ manifest }) => ({ name: manifest.name })); + } else if (input.lastOption) { + const optionCompletions = getOptionType_1.getOptionCompletions(optionTypes, { + ...shorthands_1.default, + ...input.cmd ? ctx.shorthandsByCommandName[input.cmd] : {} + }, input.lastOption); + if (optionCompletions !== void 0) { + return optionCompletions.map((name) => ({ name })); + } + } + } + let completions = []; + if (input.currentTypedWordType !== "option") { + if (!input.cmd || input.currentTypedWordType === "value" && !ctx.completionByCommandName[input.cmd]) { + completions = ctx.initialCompletion(); + } else if (ctx.completionByCommandName[input.cmd]) { + try { + completions = await ctx.completionByCommandName[input.cmd](input.options, input.params); + } catch (err) { + } + } + } + if (input.currentTypedWordType === "value") { + return completions; + } + if (!input.cmd) { + return [ + ...completions, + ...optionTypesToCompletions_1.default(optionTypes), + { name: "--version" } + ]; + } + return [ + ...completions, + ...optionTypesToCompletions_1.default(optionTypes) + ]; + } + exports2.default = complete; + } +}); + +// lib/cmd/completion.js +var require_completion = __commonJS({ + "lib/cmd/completion.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var split_cmd_1 = require_split_cmd(); + var tabtab_1 = __importDefault(require_lib5()); + var getOptionType_1 = require_getOptionType(); + var parseCliArgs_1 = __importDefault(require_parseCliArgs()); + var complete_1 = __importDefault(require_complete()); + function default_1(opts) { + return async () => { + const env = tabtab_1.default.parseEnv(process.env); + if (!env.complete) + return; + const finishedArgv = env.partial.substr(0, env.partial.length - env.lastPartial.length); + const inputArgv = split_cmd_1.split(finishedArgv).slice(1); + if (inputArgv.includes("--")) + return; + const { params, options, cmd } = await parseCliArgs_1.default(inputArgv); + return tabtab_1.default.log(await complete_1.default(opts, { + cmd, + currentTypedWordType: getOptionType_1.currentTypedWordType(env), + lastOption: getOptionType_1.getLastOption(env), + options, + params + })); + }; + } + exports2.default = default_1; + } +}); + +// lib/cmd/help.js +var require_help = __commonJS({ + "lib/cmd/help.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var cli_meta_1 = __importDefault(require_lib4()); + var render_help_1 = __importDefault(require_lib30()); + function default_1(helpByCommandName) { + return function(opts, params) { + let helpText; + if (params.length === 0) { + helpText = getHelpText(); + } else if (helpByCommandName[params[0]]) { + helpText = helpByCommandName[params[0]](); + } else { + helpText = `No results for "${params[0]}"`; + } + return `Version ${cli_meta_1.default.version}${process["pkg"] != null ? ` (compiled to binary; bundled Node.js ${process.version})` : ""} +${helpText} +`; + }; + } + exports2.default = default_1; + function getHelpText() { + return render_help_1.default({ + descriptionLists: [ + { + title: "Manage your dependencies", + list: [ + { + description: "Install all dependencies for a project", + name: "install", + shortAlias: "i" + }, + { + description: "Installs a package and any packages that it depends on. By default, any new package is installed as a prod dependency", + name: "add" + }, + { + description: "Updates packages to their latest version based on the specified range", + name: "update", + shortAlias: "up" + }, + { + description: "Removes packages from node_modules and from the project's package.json", + name: "remove", + shortAlias: "rm" + }, + { + description: "Connect the local project to another one", + name: "link", + shortAlias: "ln" + }, + { + description: "Unlinks a package. Like yarn unlink but pnpm re-installs the dependency after removing the external link", + name: "unlink" + }, + { + description: "Generates a pnpm-lock.yaml from an npm package-lock.json (or npm-shrinkwrap.json) file", + name: "import" + }, + { + description: "Runs a pnpm install followed immediately by a pnpm test", + name: "install-test", + shortAlias: "it" + }, + { + description: "Rebuild a package", + name: "rebuild", + shortAlias: "rb" + }, + { + description: "Removes extraneous packages", + name: "prune" + } + ] + }, + { + title: "Review your dependencies", + list: [ + { + description: "Checks for known security issues with the installed packages", + name: "audit" + }, + { + description: "Print all the versions of packages that are installed, as well as their dependencies, in a tree-structure", + name: "list", + shortAlias: "ls" + }, + { + description: "Check for outdated packages", + name: "outdated" + } + ] + }, + { + title: "Run your scripts", + list: [ + { + description: "Executes a shell command in scope of a project", + name: "exec" + }, + { + description: "Runs a defined package script", + name: "run" + }, + { + description: `Runs a package's "test" script, if one was provided`, + name: "test", + shortAlias: "t" + }, + { + description: `Runs an arbitrary command specified in the package's "start" property of its "scripts" object`, + name: "start" + } + ] + }, + { + title: "Other", + list: [ + { + name: "pack" + }, + { + description: "Publishes a package to the registry", + name: "publish" + }, + { + name: "root" + } + ] + }, + { + title: "Manage your store", + list: [ + { + description: "Adds new packages to the pnpm store directly. Does not modify any projects or files outside the store", + name: "store add" + }, + { + description: "Removes unreferenced (extraneous, orphan) packages from the store", + name: "store prune" + }, + { + description: "Checks for modified packages in the store", + name: "store status" + } + ] + } + ], + usages: ["pnpm [command] [flags]", "pnpm [ -h | --help | -v | --version ]"] + }); + } + } +}); + +// lib/cmd/installTest.js +var require_installTest = __commonJS({ + "lib/cmd/installTest.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.rcOptionsTypes = exports2.cliOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var plugin_commands_installation_1 = require_lib98(); + var plugin_commands_script_runners_1 = require_lib106(); + var render_help_1 = __importDefault(require_lib30()); + exports2.cliOptionsTypes = plugin_commands_installation_1.install.cliOptionsTypes; + exports2.rcOptionsTypes = plugin_commands_installation_1.install.rcOptionsTypes; + exports2.commandNames = ["install-test", "it"]; + function help() { + return render_help_1.default({ + aliases: ["it"], + description: "Runs a `pnpm install` followed immediately by a `pnpm test`. It takes exactly the same arguments as `pnpm install`.", + url: cli_utils_1.docsUrl("install-test"), + usages: ["pnpm install-test"] + }); + } + exports2.help = help; + async function handler(opts, params) { + await plugin_commands_installation_1.install.handler(opts); + await plugin_commands_script_runners_1.test.handler(opts, params); + } + exports2.handler = handler; + } +}); + +// lib/cmd/recursive.js +var require_recursive5 = __commonJS({ + "lib/cmd/recursive.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var constants_1 = require_lib7(); + var render_help_1 = __importDefault(require_lib30()); + var rcOptionsTypes = () => ({}); + exports2.rcOptionsTypes = rcOptionsTypes; + var cliOptionsTypes = () => ({}); + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["recursive", "multi", "m"]; + function help() { + return render_help_1.default({ + description: "Concurrently performs some actions in all subdirectories with a `package.json` (excluding node_modules). A `pnpm-workspace.yaml` file may be used to control what directories are searched for packages.", + descriptionLists: [ + { + title: "Commands", + list: [ + { + name: "install" + }, + { + name: "add" + }, + { + name: "update" + }, + { + description: "Uninstall a dependency from each package", + name: "remove ..." + }, + { + description: "Removes links to local packages and reinstalls them from the registry.", + name: "unlink" + }, + { + description: "List dependencies in each package.", + name: "list [...]" + }, + { + description: "List packages that depend on .", + name: "why ..." + }, + { + description: "Check for outdated dependencies in every package.", + name: "outdated [...]" + }, + { + description: `This runs an arbitrary command from each package's "scripts" object. If a package doesn't have the command, it is skipped. If none of the packages have the command, the command fails.`, + name: "run [-- ...]" + }, + { + description: `This runs each package's "test" script, if one was provided.`, + name: "test [-- ...]" + }, + { + description: 'This command runs the "npm build" command on each package. This is useful when you install a new version of node, and must recompile all your C++ addons with the new binary.', + name: "rebuild [[<@scope>/]...]" + }, + { + description: "Run a command in each package.", + name: "exec -- [args...]" + }, + { + description: "Publishes packages to the npm registry. Only publishes a package if its version is not taken in the registry.", + name: "publish [--tag ] [--access ]" + } + ] + }, + { + title: "Options", + list: [ + { + description: "Continues executing other tasks even if a task threw an error.", + name: "--no-bail" + }, + { + description: "Set the maximum number of concurrency. Default is 4. For unlimited concurrency use Infinity.", + name: "--workspace-concurrency " + }, + { + description: "Locally available packages are linked to node_modules instead of being downloaded from the registry. Convenient to use in a multi-package repository.", + name: "--link-workspace-packages" + }, + { + description: "Reverse the order that packages get ordered in. Disabled by default.", + name: "--reverse" + }, + { + description: "Sort packages topologically (dependencies before dependents). Pass --no-sort to disable.", + name: "--sort" + }, + { + description: `Creates a single ${constants_1.WANTED_LOCKFILE} file in the root of the workspace. A shared lockfile also means that all dependencies of all projects will be in a single node_modules.`, + name: "--shared-workspace-lockfile" + } + ] + }, + common_cli_options_help_1.FILTERING + ], + url: cli_utils_1.docsUrl("recursive"), + usages: [ + "pnpm recursive [command] [flags] [--filter ]", + "pnpm multi [command] [flags] [--filter ]", + "pnpm m [command] [flags] [--filter ]" + ] + }); + } + exports2.help = help; + function handler() { + console.log(help()); + process.exit(1); + } + exports2.handler = handler; + } +}); + +// lib/cmd/root.js +var require_root2 = __commonJS({ + "lib/cmd/root.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var path_1 = __importDefault(require("path")); + var config_1 = require_lib10(); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + exports2.rcOptionsTypes = cliOptionsTypes; + function cliOptionsTypes() { + return pick_1.default([ + "global" + ], config_1.types); + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["root"]; + function help() { + return render_help_1.default({ + description: "Print the effective `node_modules` directory.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "Print the global `node_modules` directory", + name: "--global", + shortAlias: "-g" + } + ] + } + ], + usages: ["pnpm root [-g]"] + }); + } + exports2.help = help; + async function handler(opts) { + return `${path_1.default.join(opts.dir, "node_modules")} +`; + } + exports2.handler = handler; + } +}); + +// lib/cmd/index.js +var require_cmd = __commonJS({ + "lib/cmd/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rcOptionsTypes = exports2.shorthandsByCommandName = exports2.getCommandFullName = exports2.getCliOptionsTypes = exports2.GLOBAL_OPTIONS = void 0; + var config_1 = require_lib10(); + var plugin_commands_audit_1 = require_lib58(); + var plugin_commands_env_1 = require_lib41(); + var plugin_commands_import_1 = require_lib89(); + var plugin_commands_installation_1 = require_lib98(); + var plugin_commands_listing_1 = require_lib101(); + var plugin_commands_outdated_1 = require_lib102(); + var plugin_commands_publishing_1 = require_lib105(); + var plugin_commands_rebuild_1 = require_lib93(); + var plugin_commands_script_runners_1 = require_lib106(); + var plugin_commands_server_1 = require_lib107(); + var plugin_commands_setup_1 = require_lib108(); + var plugin_commands_store_1 = require_lib109(); + var pick_1 = __importDefault(require_pick()); + var bin = __importStar2(require_bin()); + var completion_1 = __importDefault(require_completion()); + var help_1 = __importDefault(require_help()); + var installTest = __importStar2(require_installTest()); + var recursive = __importStar2(require_recursive5()); + var root = __importStar2(require_root2()); + exports2.GLOBAL_OPTIONS = pick_1.default([ + "color", + "dir", + "filter", + "filter-prod", + "loglevel", + "help", + "parseable", + "prefix", + "reporter", + "stream", + "test-pattern", + "changed-files-ignore-pattern", + "use-stderr", + "workspace-packages", + "workspace-root" + ], config_1.types); + var commands = [ + plugin_commands_installation_1.add, + plugin_commands_audit_1.audit, + bin, + plugin_commands_script_runners_1.dlx, + plugin_commands_env_1.env, + plugin_commands_script_runners_1.exec, + plugin_commands_installation_1.fetch, + plugin_commands_import_1.importCommand, + plugin_commands_installation_1.install, + installTest, + plugin_commands_installation_1.link, + plugin_commands_listing_1.list, + plugin_commands_listing_1.ll, + plugin_commands_outdated_1.outdated, + plugin_commands_publishing_1.pack, + plugin_commands_installation_1.prune, + plugin_commands_publishing_1.publish, + plugin_commands_rebuild_1.rebuild, + recursive, + plugin_commands_installation_1.remove, + plugin_commands_script_runners_1.restart, + root, + plugin_commands_script_runners_1.run, + plugin_commands_server_1.server, + plugin_commands_setup_1.setup, + plugin_commands_store_1.store, + plugin_commands_script_runners_1.test, + plugin_commands_installation_1.unlink, + plugin_commands_installation_1.update, + plugin_commands_listing_1.why + ]; + var handlerByCommandName = {}; + var helpByCommandName = {}; + var cliOptionsTypesByCommandName = {}; + var aliasToFullName = new Map(); + var completionByCommandName = {}; + var shorthandsByCommandName = {}; + exports2.shorthandsByCommandName = shorthandsByCommandName; + var rcOptionsTypes = {}; + exports2.rcOptionsTypes = rcOptionsTypes; + for (let i = 0; i < commands.length; i++) { + const { cliOptionsTypes, commandNames, completion, handler, help, rcOptionsTypes: rcOptionsTypes2, shorthands } = commands[i]; + if (!commandNames || commandNames.length === 0) { + throw new Error(`The command at index ${i} doesn't have command names`); + } + for (const commandName of commandNames) { + handlerByCommandName[commandName] = handler; + helpByCommandName[commandName] = help; + cliOptionsTypesByCommandName[commandName] = cliOptionsTypes; + shorthandsByCommandName[commandName] = shorthands !== null && shorthands !== void 0 ? shorthands : {}; + if (completion != null) { + completionByCommandName[commandName] = completion; + } + Object.assign(rcOptionsTypes2, rcOptionsTypes2()); + } + if (commandNames.length > 1) { + const fullName = commandNames[0]; + for (let i2 = 1; i2 < commandNames.length; i2++) { + aliasToFullName.set(commandNames[i2], fullName); + } + } + } + handlerByCommandName.help = help_1.default(helpByCommandName); + handlerByCommandName.completion = completion_1.default({ + cliOptionsTypesByCommandName, + completionByCommandName, + initialCompletion, + shorthandsByCommandName, + universalOptionsTypes: exports2.GLOBAL_OPTIONS + }); + function initialCompletion() { + return Object.keys(handlerByCommandName).map((name) => ({ name })); + } + exports2.default = handlerByCommandName; + function getCliOptionsTypes(commandName) { + var _a; + return ((_a = cliOptionsTypesByCommandName[commandName]) === null || _a === void 0 ? void 0 : _a.call(cliOptionsTypesByCommandName)) || {}; + } + exports2.getCliOptionsTypes = getCliOptionsTypes; + function getCommandFullName(commandName) { + var _a; + return (_a = aliasToFullName.get(commandName)) !== null && _a !== void 0 ? _a : handlerByCommandName[commandName] ? commandName : null; + } + exports2.getCommandFullName = getCommandFullName; + } +}); + +// lib/formatError.js +var require_formatError = __commonJS({ + "lib/formatError.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.formatUnknownOptionsError = void 0; + var chalk_1 = __importDefault(require_source()); + function formatUnknownOptionsError(unknownOptions) { + let output = chalk_1.default.bgRed.black("\u2009ERROR\u2009"); + const unknownOptionsArray = Array.from(unknownOptions.keys()); + if (unknownOptionsArray.length > 1) { + return `${output} ${chalk_1.default.red(`Unknown options: ${unknownOptionsArray.map((unknownOption2) => `'${unknownOption2}'`).join(", ")}`)}`; + } + const unknownOption = unknownOptionsArray[0]; + output += ` ${chalk_1.default.red(`Unknown option: '${unknownOption}'`)}`; + const didYouMeanOptions = unknownOptions.get(unknownOption); + if (!(didYouMeanOptions === null || didYouMeanOptions === void 0 ? void 0 : didYouMeanOptions.length)) { + return output; + } + return `${output} +Did you mean '${didYouMeanOptions.join("', or '")}'? Use "--config.unknown=value" to force an unknown option.`; + } + exports2.formatUnknownOptionsError = formatUnknownOptionsError; + } +}); + +// ../../node_modules/.pnpm/@pnpm+file-reporter@1.0.1/node_modules/@pnpm/file-reporter/lib/index.js +var require_lib111 = __commonJS({ + "../../node_modules/.pnpm/@pnpm+file-reporter@1.0.1/node_modules/@pnpm/file-reporter/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs = require_graceful_fs(); + var path = require("path"); + var LOG_FILENAME = "node_modules/.pnpm-debug.log"; + function default_1(streamParser) { + const logs = []; + streamParser["on"]("data", function(logObj) { + if (isUsefulLog(logObj)) { + logs.push(logObj); + } + }); + process.on("exit", (code) => { + if (code === 0) { + try { + fs.unlinkSync(LOG_FILENAME); + } catch (err) { + } + return; + } + const prettyLogs = getPrettyLogs(); + const jsonLogs = JSON.stringify(prettyLogs, null, 2); + const dest = fs.existsSync(path.dirname(LOG_FILENAME)) ? LOG_FILENAME : path.basename(LOG_FILENAME); + fs.writeFileSync(dest, jsonLogs, "UTF8"); + }); + function getPrettyLogs() { + const prettyLogs = {}; + logs.forEach((logObj, i) => { + const key = `${i} ${logObj["level"]} ${logObj["name"]}`; + const msgobj = getMessageObj(logObj); + prettyLogs[key] = prettify(msgobj); + }); + return prettyLogs; + } + function getMessageObj(logobj) { + const msgobj = {}; + for (let key in logobj) { + if (["time", "hostname", "pid", "level", "name"].indexOf(key) !== -1) + continue; + msgobj[key] = logobj[key]; + } + return msgobj; + } + function prettify(obj) { + if (obj instanceof Error) { + let logMsg = obj.toString(); + if (obj.stack) { + logMsg += ` +${obj.stack}`; + } + return logMsg; + } + if (Object.keys(obj).length === 1 && obj["message"]) + return obj["message"]; + return obj; + } + } + exports2.default = default_1; + function isUsefulLog(logObj) { + return logObj["name"] !== "pnpm:progress" || logObj["status"] !== "downloading"; + } + } +}); + +// lib/logging/fileLogger.js +var require_fileLogger = __commonJS({ + "lib/logging/fileLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var file_reporter_1 = __importDefault(require_lib111()); + var logger_1 = require_lib6(); + file_reporter_1.default(logger_1.streamParser); + } +}); + +// lib/reporter/silentReporter.js +var require_silentReporter = __commonJS({ + "lib/reporter/silentReporter.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = (streamParser) => { + streamParser.on("data", (obj) => { + var _a, _b, _c, _d; + if (obj.level !== "error") + return; + if ((_a = obj["err"].code) === null || _a === void 0 ? void 0 : _a.startsWith("ERR_PNPM_")) + return; + console.log((_c = (_b = obj["err"]) === null || _b === void 0 ? void 0 : _b.message) !== null && _c !== void 0 ? _c : obj["message"]); + if ((_d = obj["err"]) === null || _d === void 0 ? void 0 : _d.stack) { + console.log(` +${obj["err"].stack}`); + } + }); + }; + } +}); + +// lib/reporter/index.js +var require_reporter = __commonJS({ + "lib/reporter/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var default_reporter_1 = __importDefault(require_lib11()); + var logger_1 = require_lib6(); + var silentReporter_1 = __importDefault(require_silentReporter()); + exports2.default = (reporterType, opts) => { + switch (reporterType) { + case "default": + default_reporter_1.default({ + useStderr: opts.config.useStderr, + context: { + argv: opts.cmd ? [opts.cmd] : [], + config: opts.config + }, + reportingOptions: { + appendOnly: false, + logLevel: opts.config.loglevel, + streamLifecycleOutput: opts.config.stream, + throttleProgress: 200 + }, + streamParser: logger_1.streamParser + }); + return; + case "append-only": + default_reporter_1.default({ + useStderr: opts.config.useStderr, + context: { + argv: opts.cmd ? [opts.cmd] : [], + config: opts.config + }, + reportingOptions: { + appendOnly: true, + logLevel: opts.config.loglevel, + throttleProgress: 1e3 + }, + streamParser: logger_1.streamParser + }); + return; + case "ndjson": + logger_1.writeToConsole(); + return; + case "silent": + silentReporter_1.default(logger_1.streamParser); + } + }; + } +}); + +// lib/main.js +var require_main2 = __commonJS({ + "lib/main.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var loud_rejection_1 = __importDefault(require_loud_rejection()); + var cli_meta_1 = __importDefault(require_lib4()); + var cli_utils_1 = require_lib20(); + var core_loggers_1 = require_lib12(); + var filter_workspace_packages_1 = require_lib27(); + var find_workspace_packages_1 = __importDefault(require_lib22()); + var logger_1 = __importDefault(require_lib6()); + var plugin_commands_env_1 = require_lib41(); + var chalk_1 = __importDefault(require_source()); + var checkForUpdates_1 = __importDefault(require_checkForUpdates()); + var cmd_1 = __importStar2(require_cmd()); + var formatError_1 = require_formatError(); + require_fileLogger(); + var parseCliArgs_1 = __importDefault(require_parseCliArgs()); + var reporter_1 = __importDefault(require_reporter()); + var is_ci_1 = __importDefault(require_is_ci()); + var path_1 = __importDefault(require("path")); + var isEmpty_1 = __importDefault(require_isEmpty2()); + var strip_ansi_1 = __importDefault(require_strip_ansi()); + var which_1 = __importDefault(require_which()); + process.once("SIGINT", () => process.exit(0)).once("SIGTERM", () => process.exit(0)); + loud_rejection_1.default(); + var DEPRECATED_OPTIONS = new Set([ + "independent-leaves", + "lock", + "resolution-strategy" + ]); + delete process.env.PKG_EXECPATH; + async function run(inputArgv) { + var _a, _b; + let parsedCliArgs; + try { + parsedCliArgs = await parseCliArgs_1.default(inputArgv); + } catch (err) { + printError(err.message, err["hint"]); + process.exit(1); + } + const { argv: argv2, params: cliParams, options: cliOptions, cmd, fallbackCommandUsed, unknownOptions, workspaceDir } = parsedCliArgs; + if (cmd !== null && !cmd_1.default[cmd]) { + printError(`Unknown command '${cmd}'`, "For help, run: pnpm help"); + process.exit(1); + } + if (unknownOptions.size > 0 && !fallbackCommandUsed) { + const unknownOptionsArray = Array.from(unknownOptions.keys()); + if (unknownOptionsArray.every((option) => DEPRECATED_OPTIONS.has(option))) { + let deprecationMsg = `${chalk_1.default.bgYellow.black("\u2009WARN\u2009")}`; + if (unknownOptionsArray.length === 1) { + deprecationMsg += ` ${chalk_1.default.yellow(`Deprecated option: '${unknownOptionsArray[0]}'`)}`; + } else { + deprecationMsg += ` ${chalk_1.default.yellow(`Deprecated options: ${unknownOptionsArray.map((unknownOption) => `'${unknownOption}'`).join(", ")}`)}`; + } + console.log(deprecationMsg); + } else { + printError(formatError_1.formatUnknownOptionsError(unknownOptions), `For help, run: pnpm help${cmd ? ` ${cmd}` : ""}`); + process.exit(1); + } + } + process.env["npm_config_argv"] = JSON.stringify(argv2); + let config; + try { + const globalDirShouldAllowWrite = cmd !== "root"; + config = await cli_utils_1.getConfig(cliOptions, { + excludeReporter: false, + globalDirShouldAllowWrite, + rcOptionsTypes: cmd_1.rcOptionsTypes, + workspaceDir, + checkUnknownSetting: false + }); + config.forceSharedLockfile = typeof config.workspaceDir === "string" && config.sharedWorkspaceLockfile === true; + config.argv = argv2; + config.fallbackCommandUsed = fallbackCommandUsed; + } catch (err) { + const hint = err["hint"] ? err["hint"] : `For help, run: pnpm help${cmd ? ` ${cmd}` : ""}`; + printError(err.message, hint); + process.exit(1); + } + let write = process.stdout.write.bind(process.stdout); + if (config.color === "always") { + process.env["FORCE_COLOR"] = "1"; + } else if (config.color === "never") { + process.env["FORCE_COLOR"] = "0"; + write = (text) => process.stdout.write(strip_ansi_1.default(text)); + } + const reporterType = (() => { + if (config.loglevel === "silent") + return "silent"; + if (config.reporter) + return config.reporter; + if (is_ci_1.default || !process.stdout.isTTY) + return "append-only"; + return "default"; + })(); + reporter_1.default(reporterType, { + cmd, + config + }); + global["reporterInitialized"] = reporterType; + const selfUpdate = config.global && (cmd === "add" || cmd === "update") && cliParams.includes(cli_meta_1.default.name); + if (selfUpdate) { + await cmd_1.default.server(config, ["stop"]); + try { + config.bin = path_1.default.dirname(which_1.default.sync("pnpm")); + } catch (err) { + } + } + if (cmd === "install" && typeof workspaceDir === "string") { + cliOptions["recursive"] = true; + config.recursive = true; + if (!config.recursiveInstall && !config.filter && !config.filterProd) { + config.filter = ["{.}..."]; + } + } + if (cliOptions["recursive"]) { + const wsDir = workspaceDir !== null && workspaceDir !== void 0 ? workspaceDir : process.cwd(); + const allProjects = await find_workspace_packages_1.default(wsDir, { + engineStrict: config.engineStrict, + patterns: cliOptions["workspace-packages"] + }); + if (allProjects.length === 0) { + if (!config["parseable"]) { + console.log(`No projects found in "${wsDir}"`); + } + process.exit(0); + } + config.filter = (_a = config.filter) !== null && _a !== void 0 ? _a : []; + config.filterProd = (_b = config.filterProd) !== null && _b !== void 0 ? _b : []; + const filters = [ + ...config.filter.map((filter) => ({ filter, followProdDepsOnly: false })), + ...config.filterProd.map((filter) => ({ filter, followProdDepsOnly: true })) + ]; + const relativeWSDirPath = () => path_1.default.relative(process.cwd(), wsDir) || "."; + if (config.workspaceRoot) { + filters.push({ filter: `{${relativeWSDirPath()}}`, followProdDepsOnly: false }); + } else if (config.useBetaCli && (cmd === "run" || cmd === "exec" || cmd === "add" || cmd === "test")) { + filters.push({ filter: `!{${relativeWSDirPath()}}`, followProdDepsOnly: false }); + } + const filterResults = await filter_workspace_packages_1.filterPackages(allProjects, filters, { + linkWorkspacePackages: !!config.linkWorkspacePackages, + prefix: process.cwd(), + workspaceDir: wsDir, + testPattern: config.testPattern, + changedFilesIgnorePattern: config.changedFilesIgnorePattern, + useGlobDirFiltering: config.useBetaCli + }); + config.selectedProjectsGraph = filterResults.selectedProjectsGraph; + if (isEmpty_1.default(config.selectedProjectsGraph)) { + if (!config["parseable"]) { + console.log(`No projects matched the filters in "${wsDir}"`); + } + process.exit(0); + } + if (filterResults.unmatchedFilters.length !== 0 && !config["parseable"]) { + console.log(`No projects matched the filters "${filterResults.unmatchedFilters.join(", ")}" in "${wsDir}"`); + } + config.allProjects = allProjects; + config.workspaceDir = wsDir; + } + let { output, exitCode } = await (async () => { + await new Promise((resolve) => setTimeout(() => resolve(), 0)); + if (!is_ci_1.default && !selfUpdate && !config.offline && !config.preferOffline && !config.fallbackCommandUsed) { + checkForUpdates_1.default(config).catch(() => { + }); + } + if (config.force === true && !config.fallbackCommandUsed) { + logger_1.default.warn({ + message: "using --force I sure hope you know what you are doing", + prefix: config.dir + }); + } + core_loggers_1.scopeLogger.debug({ + ...!cliOptions["recursive"] ? { selected: 1 } : { + selected: Object.keys(config.selectedProjectsGraph).length, + total: config.allProjects.length + }, + ...workspaceDir ? { workspacePrefix: workspaceDir } : {} + }); + if (config.useNodeVersion != null) { + const nodePath = await plugin_commands_env_1.node.getNodeBinDir(config); + config.extraBinPaths.push(nodePath); + } + let result = cmd_1.default[cmd !== null && cmd !== void 0 ? cmd : "help"](config, cliParams); + if (result instanceof Promise) { + result = await result; + } + if (!result) { + return { output: null, exitCode: 0 }; + } + if (typeof result === "string") { + return { output: result, exitCode: 0 }; + } + return result; + })(); + if (output) { + if (!output.endsWith("\n")) { + output = `${output} +`; + } + write(output); + } + if (!cmd) { + process.exit(1); + } + if (exitCode) { + process.exit(exitCode); + } + } + exports2.default = run; + function printError(message2, hint) { + console.error(`${chalk_1.default.bgRed.black("\u2009ERROR\u2009")} ${chalk_1.default.red(message2)}`); + if (hint) { + console.log(hint); + } + } + } +}); + +// lib/runNpm.js +var require_runNpm = __commonJS({ + "lib/runNpm.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var cli_meta_1 = __importDefault(require_lib4()); + var config_1 = __importStar2(require_lib10()); + var run_npm_1 = __importDefault(require_lib104()); + var pick_1 = __importDefault(require_pick()); + async function run(args2) { + const { config } = await config_1.default({ + cliOptions: {}, + packageManager: cli_meta_1.default, + rcOptionsTypes: { + ...pick_1.default([ + "npm-path" + ], config_1.types) + } + }); + return run_npm_1.default(config.npmPath, args2); + } + exports2.default = run; + } +}); + +// lib/pnpm.js +"use strict"; +var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); +} : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; +}); +var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +} : function(o, v) { + o["default"] = v; +}); +var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; +}; +process.setMaxListeners(0); +var argv = process.argv.slice(2); +(async () => { + switch (argv[0]) { + case "-v": + case "--version": { + const { version } = (await Promise.resolve().then(() => __importStar(require_lib4()))).default; + console.log(version); + break; + } + case "install-completion": { + const { install: installCompletion } = await Promise.resolve().then(() => __importStar(require_lib5())); + await installCompletion({ name: "pnpm", completer: "pnpm", shell: argv[1] }); + return; + } + case "uninstall-completion": { + const { uninstall: uninstallCompletion } = await Promise.resolve().then(() => __importStar(require_lib5())); + await uninstallCompletion({ name: "pnpm" }); + return; + } + case "access": + case "adduser": + case "bugs": + case "c": + case "config": + case "deprecate": + case "dist-tag": + case "docs": + case "edit": + case "get": + case "info": + case "init": + case "login": + case "logout": + case "owner": + case "ping": + case "prefix": + case "profile": + case "repo": + case "s": + case "se": + case "search": + case "set": + case "star": + case "stars": + case "team": + case "token": + case "unpublish": + case "unstar": + case "v": + case "version": + case "view": + case "whoami": + case "xmas": + await passThruToNpm(); + break; + default: + await runPnpm(); + break; + } +})(); +async function runPnpm() { + const errorHandler = (await Promise.resolve().then(() => __importStar(require_err()))).default; + try { + const main = (await Promise.resolve().then(() => __importStar(require_main2()))).default; + await main(argv); + } catch (err) { + errorHandler(err); + } +} +async function passThruToNpm() { + const runNpm = (await Promise.resolve().then(() => __importStar(require_runNpm()))).default; + const { status } = await runNpm(argv); + process.exit(status); +} +/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version v4.2.8+1e68dce6 + */ +/*! + * depd + * Copyright(c) 2014 Douglas Christopher Wilson + * MIT Licensed + */ +/*! + * depd + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ +/*! + * depd + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + */ +/*! + * depd + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ +/*! + * fill-range + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Licensed under the MIT License. + */ +/*! + * humanize-ms - index.js + * Copyright(c) 2014 dead_horse + * MIT Licensed + */ +/*! + * is-extglob + * + * Copyright (c) 2014-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ +/*! + * is-glob + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ +/*! + * is-number + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Released under the MIT License. + */ +/*! + * is-windows + * + * Copyright © 2015-2018, Jon Schlinkert. + * Released under the MIT License. + */ +/*! + * normalize-path + * + * Copyright (c) 2014-2018, Jon Schlinkert. + * Released under the MIT License. + */ +/*! + * to-regex-range + * + * Copyright (c) 2015-present, Jon Schlinkert. + * Released under the MIT License. + */ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/*! queue-microtask. MIT License. Feross Aboukhadijeh */ +/*! run-parallel. MIT License. Feross Aboukhadijeh */ +/** + * @preserve + * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) + * + * @author Jens Taylor + * @see http://github.com/homebrewing/brauhaus-diff + * @author Gary Court + * @see http://github.com/garycourt/murmurhash-js + * @author Austin Appleby + * @see http://sites.google.com/site/murmurhash/ + */ diff --git a/package.json b/package.json index 3b688ef..d9940fe 100644 --- a/package.json +++ b/package.json @@ -3,13 +3,11 @@ "scripts": { "build:schemas": "ts-schema-autogen generate", "build:ncc": "ncc build --minify --no-source-map-register --no-cache dist/tsc/index.js --out dist/", - "build": "pnpm run build:schemas && tsc && pnpm run build:ncc", + "build": "pnpm run build:schemas && tsc && pnpm run build:ncc && cp src/install-pnpm/pnpm.js dist/pnpm.js", "start": "pnpm run build && sh ./run.sh" }, "dependencies": { "@actions/core": "^1.6.0", - "@pnpm/fetch": "^4.2.5", - "@pnpm/logger": "^4.0.0", "@types/expand-tilde": "^2.0.0", "@types/fs-extra": "^9.0.13", "@types/js-yaml": "^4.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3d2d5b1..07bf2eb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,9 +1,7 @@ -lockfileVersion: 5.3 +lockfileVersion: 5.4 specifiers: '@actions/core': ^1.6.0 - '@pnpm/fetch': ^4.2.5 - '@pnpm/logger': ^4.0.0 '@ts-schema-autogen/cli': ^0.1.2 '@types/expand-tilde': ^2.0.0 '@types/fs-extra': ^9.0.13 @@ -19,8 +17,6 @@ specifiers: dependencies: '@actions/core': 1.6.0 - '@pnpm/fetch': 4.2.5_@pnpm+logger@4.0.0 - '@pnpm/logger': 4.0.0 '@types/expand-tilde': 2.0.0 '@types/fs-extra': 9.0.13 '@types/js-yaml': 4.0.5 @@ -50,74 +46,6 @@ packages: tunnel: 0.0.6 dev: false - /@pnpm/core-loggers/6.1.4_@pnpm+logger@4.0.0: - resolution: {integrity: sha512-vF4Qc8E8e4uCGbVc7USCgqxrRe4eZsz8XEuCTUy6asZFVnNnRY/N1vJaVG3hti/UYKI/1si1dJYibppXhgTimA==} - engines: {node: '>=12.17'} - peerDependencies: - '@pnpm/logger': ^4.0.0 - dependencies: - '@pnpm/logger': 4.0.0 - '@pnpm/types': 7.10.0 - dev: false - - /@pnpm/fetch/4.2.5_@pnpm+logger@4.0.0: - resolution: {integrity: sha512-8zUWgrP+6mK/LJcLkNfjqKLSwOs4n/LR3BACZGSwcFH7yh28YJhKo142gFPOVTzS0pBUDvVVsDNQ7sxp2lOmDw==} - engines: {node: '>=12.17'} - peerDependencies: - '@pnpm/logger': ^4.0.0 - dependencies: - '@pnpm/core-loggers': 6.1.4_@pnpm+logger@4.0.0 - '@pnpm/fetching-types': 2.2.1 - '@pnpm/logger': 4.0.0 - '@pnpm/npm-registry-agent': 5.0.2 - '@zkochan/retry': 0.2.0 - node-fetch: 3.0.0-beta.9 - transitivePeerDependencies: - - domexception - - supports-color - dev: false - - /@pnpm/fetching-types/2.2.1: - resolution: {integrity: sha512-ihcncWdo40GR91hRfuNtKnXUUczIDN+eJdRSu4/dTSRnAgi4HL/RN5RQ3l2XCT4ausmZvDjaO+LJx8/q4967tw==} - engines: {node: '>=12.17'} - dependencies: - '@zkochan/retry': 0.2.0 - node-fetch: 3.0.0-beta.9 - transitivePeerDependencies: - - domexception - dev: false - - /@pnpm/logger/4.0.0: - resolution: {integrity: sha512-SIShw+k556e7S7tLZFVSIHjCdiVog1qWzcKW2RbLEHPItdisAFVNIe34kYd9fMSswTlSRLS/qRjw3ZblzWmJ9Q==} - engines: {node: '>=12.17'} - dependencies: - bole: 4.0.0 - ndjson: 2.0.0 - dev: false - - /@pnpm/npm-registry-agent/5.0.2: - resolution: {integrity: sha512-HmdLnoD3LFquTq40RnbZoF2dwMrGAa2TG2WclKxmrRKj+6dOvhC/YztysVnv+/mfwn7Nlf4gBjOi8ZQz0F3C5g==} - engines: {node: '>=12.17'} - dependencies: - agentkeepalive: 4.2.0 - http-proxy-agent: 5.0.0 - https-proxy-agent: 5.0.0 - lru-cache: 6.0.0 - socks-proxy-agent: 6.1.1 - transitivePeerDependencies: - - supports-color - dev: false - - /@pnpm/types/7.10.0: - resolution: {integrity: sha512-7NKyfwepNccR6f9htiXAw0tt6rCajvtiX5HsTOi3odSFJ04iri43yjh70Ekw25hAynQwRR0rkJ7l6BBNFrJ/2g==} - engines: {node: '>=12.17'} - dev: false - - /@tootallnate/once/2.0.0: - resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} - engines: {node: '>= 10'} - dev: false - /@ts-schema-autogen/cli/0.1.2: resolution: {integrity: sha512-61aIkJh7RDDNLCQJtp++1pL/LWlPAI9dxgWyhXycyRm4TRaTVaRBOoxTVnN0IVT+akdhWeiXkhNkCzG6Vd5zAw==} hasBin: true @@ -315,31 +243,6 @@ packages: hasBin: true dev: true - /@zkochan/retry/0.2.0: - resolution: {integrity: sha512-WhB+2B/ZPlW2Xy/kMJBrMbqecWXcbDDgn0K0wKBAgO2OlBTz1iLJrRWduo+DGGn0Akvz1Lu4Xvls7dJojximWw==} - engines: {node: '>=10'} - dev: false - - /agent-base/6.0.2: - resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} - engines: {node: '>= 6.0.0'} - dependencies: - debug: 4.3.3 - transitivePeerDependencies: - - supports-color - dev: false - - /agentkeepalive/4.2.0: - resolution: {integrity: sha512-0PhAp58jZNw13UJv7NVdTGb0ZcghHUb3DrZ046JiiJY/BOaTTpbwdHq2VObPCBV8M2GPh7sgrJ3AQ8Ey468LJw==} - engines: {node: '>= 8.0.0'} - dependencies: - debug: 4.3.3 - depd: 1.1.2 - humanize-ms: 1.2.1 - transitivePeerDependencies: - - supports-color - dev: false - /ajv/6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} dependencies: @@ -397,13 +300,6 @@ packages: tslib: 1.14.1 dev: true - /bole/4.0.0: - resolution: {integrity: sha512-Bk/2qoyOSlwU1dnDFk/oPM2FCNKAlYlBHfpAgwGX+K9HUtxSvmIAQCmMWMOvE6BlHHRCwsH1MxJe/r1ieodxqQ==} - dependencies: - fast-safe-stringify: 2.1.1 - individual: 3.0.0 - dev: false - /brace-expansion/1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -464,23 +360,6 @@ packages: resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} dev: true - /data-uri-to-buffer/3.0.1: - resolution: {integrity: sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==} - engines: {node: '>= 6'} - dev: false - - /debug/4.3.3: - resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - dev: false - /decamelize/1.2.0: resolution: {integrity: sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=} engines: {node: '>=0.10.0'} @@ -491,11 +370,6 @@ packages: engines: {node: '>=0.4.0'} dev: false - /depd/1.1.2: - resolution: {integrity: sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=} - engines: {node: '>= 0.6'} - dev: false - /emoji-regex/7.0.3: resolution: {integrity: sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==} dev: true @@ -530,10 +404,6 @@ packages: /fast-json-stable-stringify/2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - /fast-safe-stringify/2.1.1: - resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} - dev: false - /fast-traverse/0.1.7: resolution: {integrity: sha512-gZTQvJSgrGV24F8AeeTNxip8OEkjRHwDDpGw0b51TzRVGjJsKzh6CuHf9ltVjJZzni5Ead+EEQJ0IFCuoCJUtA==} dependencies: @@ -541,16 +411,6 @@ packages: tslib: 2.3.1 dev: true - /fetch-blob/2.1.2: - resolution: {integrity: sha512-YKqtUDwqLyfyMnmbw8XD6Q8j9i/HggKtPEI+pZ1+8bvheBu78biSmNaXWusx1TauGqtUUGx/cBb1mKdq2rLYow==} - engines: {node: ^10.17.0 || >=12.3.0} - peerDependencies: - domexception: '*' - peerDependenciesMeta: - domexception: - optional: true - dev: false - /find-up/3.0.0: resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==} engines: {node: '>=6'} @@ -623,37 +483,6 @@ packages: parse-passwd: 1.0.0 dev: false - /http-proxy-agent/5.0.0: - resolution: {integrity: sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==} - engines: {node: '>= 6'} - dependencies: - '@tootallnate/once': 2.0.0 - agent-base: 6.0.2 - debug: 4.3.3 - transitivePeerDependencies: - - supports-color - dev: false - - /https-proxy-agent/5.0.0: - resolution: {integrity: sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==} - engines: {node: '>= 6'} - dependencies: - agent-base: 6.0.2 - debug: 4.3.3 - transitivePeerDependencies: - - supports-color - dev: false - - /humanize-ms/1.2.1: - resolution: {integrity: sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=} - dependencies: - ms: 2.1.3 - dev: false - - /individual/3.0.0: - resolution: {integrity: sha1-58pPhfiVewGHNPKFdQ3CLsL5hi0=} - dev: false - /inflight/1.0.6: resolution: {integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=} dependencies: @@ -663,10 +492,7 @@ packages: /inherits/2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - - /ip/1.1.5: - resolution: {integrity: sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=} - dev: false + dev: true /is-fullwidth-code-point/2.0.0: resolution: {integrity: sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=} @@ -702,10 +528,6 @@ packages: jsonify: 0.0.0 dev: true - /json-stringify-safe/5.0.1: - resolution: {integrity: sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=} - dev: false - /jsonfile/4.0.0: resolution: {integrity: sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=} optionalDependencies: @@ -739,13 +561,6 @@ packages: p-locate: 4.1.0 dev: true - /lru-cache/6.0.0: - resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} - engines: {node: '>=10'} - dependencies: - yallist: 4.0.0 - dev: false - /mime-db/1.51.0: resolution: {integrity: sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==} engines: {node: '>= 0.6'} @@ -764,40 +579,6 @@ packages: brace-expansion: 1.1.11 dev: true - /minimist/1.2.5: - resolution: {integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==} - dev: false - - /ms/2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - dev: false - - /ms/2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - dev: false - - /ndjson/2.0.0: - resolution: {integrity: sha512-nGl7LRGrzugTtaFcJMhLbpzJM6XdivmbkdlaGcrk/LXg2KL/YBC6z1g70xh0/al+oFuVFP8N8kiWRucmeEH/qQ==} - engines: {node: '>=10'} - hasBin: true - dependencies: - json-stringify-safe: 5.0.1 - minimist: 1.2.5 - readable-stream: 3.6.0 - split2: 3.2.2 - through2: 4.0.2 - dev: false - - /node-fetch/3.0.0-beta.9: - resolution: {integrity: sha512-RdbZCEynH2tH46+tj0ua9caUHVWrd/RHnRfvly2EVdqGmI3ndS1Vn/xjm5KuGejDt2RNDQsVRLPNd2QPwcewVg==} - engines: {node: ^10.17 || >=12.3} - dependencies: - data-uri-to-buffer: 3.0.1 - fetch-blob: 2.1.2 - transitivePeerDependencies: - - domexception - dev: false - /once/1.4.0: resolution: {integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=} dependencies: @@ -854,15 +635,6 @@ packages: resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==} engines: {node: '>=6'} - /readable-stream/3.6.0: - resolution: {integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==} - engines: {node: '>= 6'} - dependencies: - inherits: 2.0.4 - string_decoder: 1.3.0 - util-deprecate: 1.0.2 - dev: false - /require-directory/2.1.1: resolution: {integrity: sha1-jGStX9MNqxyXbiNE/+f3kqam30I=} engines: {node: '>=0.10.0'} @@ -872,44 +644,10 @@ packages: resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} dev: true - /safe-buffer/5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - dev: false - /set-blocking/2.0.0: resolution: {integrity: sha1-BF+XgtARrppoA93TgrJDkrPYkPc=} dev: true - /smart-buffer/4.2.0: - resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} - engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} - dev: false - - /socks-proxy-agent/6.1.1: - resolution: {integrity: sha512-t8J0kG3csjA4g6FTbsMOWws+7R7vuRC8aQ/wy3/1OWmsgwA68zs/+cExQ0koSitUDXqhufF/YJr9wtNMZHw5Ew==} - engines: {node: '>= 10'} - dependencies: - agent-base: 6.0.2 - debug: 4.3.3 - socks: 2.6.2 - transitivePeerDependencies: - - supports-color - dev: false - - /socks/2.6.2: - resolution: {integrity: sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==} - engines: {node: '>= 10.13.0', npm: '>= 3.0.0'} - dependencies: - ip: 1.1.5 - smart-buffer: 4.2.0 - dev: false - - /split2/3.2.2: - resolution: {integrity: sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==} - dependencies: - readable-stream: 3.6.0 - dev: false - /sprintf-js/1.0.3: resolution: {integrity: sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=} dev: true @@ -932,12 +670,6 @@ packages: strip-ansi: 6.0.1 dev: true - /string_decoder/1.3.0: - resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} - dependencies: - safe-buffer: 5.2.1 - dev: false - /strip-ansi/5.2.0: resolution: {integrity: sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==} engines: {node: '>=6'} @@ -952,12 +684,6 @@ packages: ansi-regex: 5.0.1 dev: true - /through2/4.0.2: - resolution: {integrity: sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==} - dependencies: - readable-stream: 3.6.0 - dev: false - /tslib/1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true @@ -1009,10 +735,6 @@ packages: dependencies: punycode: 2.1.1 - /util-deprecate/1.0.2: - resolution: {integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=} - dev: false - /utility-types/3.10.0: resolution: {integrity: sha512-O11mqxmi7wMKCo6HKFt5AhO4BwY3VV68YU07tgxfz8zJTIxr4BpsezN49Ffwy9j3ZpwwJp4fkRwjRzq3uWE6Rg==} engines: {node: '>= 4'} @@ -1048,10 +770,6 @@ packages: resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} dev: true - /yallist/4.0.0: - resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - dev: false - /yargs-parser/15.0.3: resolution: {integrity: sha512-/MVEVjTXy/cGAjdtQf8dW3V9b97bPN7rNn8ETj6BmAQL7ibC7O1Q9SPJbGjgh3SlwoBNXMzj/ZGIj8mBgl12YA==} dependencies: diff --git a/src/install-pnpm/pnpm.js b/src/install-pnpm/pnpm.js new file mode 100644 index 0000000..0bceb05 --- /dev/null +++ b/src/install-pnpm/pnpm.js @@ -0,0 +1,134031 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __reExport = (target, module2, desc) => { + if (module2 && typeof module2 === "object" || typeof module2 === "function") { + for (let key of __getOwnPropNames(module2)) + if (!__hasOwnProp.call(target, key) && key !== "default") + __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); + } + return target; +}; +var __toModule = (module2) => { + return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); +}; + +// ../../node_modules/.pnpm/graceful-fs@4.2.8/node_modules/graceful-fs/polyfills.js +var require_polyfills = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.8/node_modules/graceful-fs/polyfills.js"(exports2, module2) { + var constants = require("constants"); + var origCwd = process.cwd; + var cwd = null; + var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform; + process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process); + return cwd; + }; + try { + process.cwd(); + } catch (er) { + } + if (typeof process.chdir === "function") { + chdir = process.chdir; + process.chdir = function(d) { + cwd = null; + chdir.call(process, d); + }; + if (Object.setPrototypeOf) + Object.setPrototypeOf(process.chdir, chdir); + } + var chdir; + module2.exports = patch; + function patch(fs) { + if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs); + } + if (!fs.lutimes) { + patchLutimes(fs); + } + fs.chown = chownFix(fs.chown); + fs.fchown = chownFix(fs.fchown); + fs.lchown = chownFix(fs.lchown); + fs.chmod = chmodFix(fs.chmod); + fs.fchmod = chmodFix(fs.fchmod); + fs.lchmod = chmodFix(fs.lchmod); + fs.chownSync = chownFixSync(fs.chownSync); + fs.fchownSync = chownFixSync(fs.fchownSync); + fs.lchownSync = chownFixSync(fs.lchownSync); + fs.chmodSync = chmodFixSync(fs.chmodSync); + fs.fchmodSync = chmodFixSync(fs.fchmodSync); + fs.lchmodSync = chmodFixSync(fs.lchmodSync); + fs.stat = statFix(fs.stat); + fs.fstat = statFix(fs.fstat); + fs.lstat = statFix(fs.lstat); + fs.statSync = statFixSync(fs.statSync); + fs.fstatSync = statFixSync(fs.fstatSync); + fs.lstatSync = statFixSync(fs.lstatSync); + if (!fs.lchmod) { + fs.lchmod = function(path, mode, cb) { + if (cb) + process.nextTick(cb); + }; + fs.lchmodSync = function() { + }; + } + if (!fs.lchown) { + fs.lchown = function(path, uid, gid, cb) { + if (cb) + process.nextTick(cb); + }; + fs.lchownSync = function() { + }; + } + if (platform === "win32") { + fs.rename = function(fs$rename) { + return function(from, to, cb) { + var start = Date.now(); + var backoff = 0; + fs$rename(from, to, function CB(er) { + if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { + setTimeout(function() { + fs.stat(to, function(stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er); + }); + }, backoff); + if (backoff < 100) + backoff += 10; + return; + } + if (cb) + cb(er); + }); + }; + }(fs.rename); + } + fs.read = function(fs$read) { + function read(fd, buffer, offset, length, position, callback_) { + var callback; + if (callback_ && typeof callback_ === "function") { + var eagCounter = 0; + callback = function(er, _, __) { + if (er && er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + return fs$read.call(fs, fd, buffer, offset, length, position, callback); + } + callback_.apply(this, arguments); + }; + } + return fs$read.call(fs, fd, buffer, offset, length, position, callback); + } + if (Object.setPrototypeOf) + Object.setPrototypeOf(read, fs$read); + return read; + }(fs.read); + fs.readSync = function(fs$readSync) { + return function(fd, buffer, offset, length, position) { + var eagCounter = 0; + while (true) { + try { + return fs$readSync.call(fs, fd, buffer, offset, length, position); + } catch (er) { + if (er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + continue; + } + throw er; + } + } + }; + }(fs.readSync); + function patchLchmod(fs2) { + fs2.lchmod = function(path, mode, callback) { + fs2.open(path, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) { + if (err) { + if (callback) + callback(err); + return; + } + fs2.fchmod(fd, mode, function(err2) { + fs2.close(fd, function(err22) { + if (callback) + callback(err2 || err22); + }); + }); + }); + }; + fs2.lchmodSync = function(path, mode) { + var fd = fs2.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode); + var threw = true; + var ret; + try { + ret = fs2.fchmodSync(fd, mode); + threw = false; + } finally { + if (threw) { + try { + fs2.closeSync(fd); + } catch (er) { + } + } else { + fs2.closeSync(fd); + } + } + return ret; + }; + } + function patchLutimes(fs2) { + if (constants.hasOwnProperty("O_SYMLINK")) { + fs2.lutimes = function(path, at, mt, cb) { + fs2.open(path, constants.O_SYMLINK, function(er, fd) { + if (er) { + if (cb) + cb(er); + return; + } + fs2.futimes(fd, at, mt, function(er2) { + fs2.close(fd, function(er22) { + if (cb) + cb(er2 || er22); + }); + }); + }); + }; + fs2.lutimesSync = function(path, at, mt) { + var fd = fs2.openSync(path, constants.O_SYMLINK); + var ret; + var threw = true; + try { + ret = fs2.futimesSync(fd, at, mt); + threw = false; + } finally { + if (threw) { + try { + fs2.closeSync(fd); + } catch (er) { + } + } else { + fs2.closeSync(fd); + } + } + return ret; + }; + } else { + fs2.lutimes = function(_a, _b, _c, cb) { + if (cb) + process.nextTick(cb); + }; + fs2.lutimesSync = function() { + }; + } + } + function chmodFix(orig) { + if (!orig) + return orig; + return function(target, mode, cb) { + return orig.call(fs, target, mode, function(er) { + if (chownErOk(er)) + er = null; + if (cb) + cb.apply(this, arguments); + }); + }; + } + function chmodFixSync(orig) { + if (!orig) + return orig; + return function(target, mode) { + try { + return orig.call(fs, target, mode); + } catch (er) { + if (!chownErOk(er)) + throw er; + } + }; + } + function chownFix(orig) { + if (!orig) + return orig; + return function(target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function(er) { + if (chownErOk(er)) + er = null; + if (cb) + cb.apply(this, arguments); + }); + }; + } + function chownFixSync(orig) { + if (!orig) + return orig; + return function(target, uid, gid) { + try { + return orig.call(fs, target, uid, gid); + } catch (er) { + if (!chownErOk(er)) + throw er; + } + }; + } + function statFix(orig) { + if (!orig) + return orig; + return function(target, options, cb) { + if (typeof options === "function") { + cb = options; + options = null; + } + function callback(er, stats) { + if (stats) { + if (stats.uid < 0) + stats.uid += 4294967296; + if (stats.gid < 0) + stats.gid += 4294967296; + } + if (cb) + cb.apply(this, arguments); + } + return options ? orig.call(fs, target, options, callback) : orig.call(fs, target, callback); + }; + } + function statFixSync(orig) { + if (!orig) + return orig; + return function(target, options) { + var stats = options ? orig.call(fs, target, options) : orig.call(fs, target); + if (stats.uid < 0) + stats.uid += 4294967296; + if (stats.gid < 0) + stats.gid += 4294967296; + return stats; + }; + } + function chownErOk(er) { + if (!er) + return true; + if (er.code === "ENOSYS") + return true; + var nonroot = !process.getuid || process.getuid() !== 0; + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true; + } + return false; + } + } + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.8/node_modules/graceful-fs/legacy-streams.js +var require_legacy_streams = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.8/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { + var Stream = require("stream").Stream; + module2.exports = legacy; + function legacy(fs) { + return { + ReadStream, + WriteStream + }; + function ReadStream(path, options) { + if (!(this instanceof ReadStream)) + return new ReadStream(path, options); + Stream.call(this); + var self2 = this; + this.path = path; + this.fd = null; + this.readable = true; + this.paused = false; + this.flags = "r"; + this.mode = 438; + this.bufferSize = 64 * 1024; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.encoding) + this.setEncoding(this.encoding); + if (this.start !== void 0) { + if (typeof this.start !== "number") { + throw TypeError("start must be a Number"); + } + if (this.end === void 0) { + this.end = Infinity; + } else if (typeof this.end !== "number") { + throw TypeError("end must be a Number"); + } + if (this.start > this.end) { + throw new Error("start must be <= end"); + } + this.pos = this.start; + } + if (this.fd !== null) { + process.nextTick(function() { + self2._read(); + }); + return; + } + fs.open(this.path, this.flags, this.mode, function(err, fd) { + if (err) { + self2.emit("error", err); + self2.readable = false; + return; + } + self2.fd = fd; + self2.emit("open", fd); + self2._read(); + }); + } + function WriteStream(path, options) { + if (!(this instanceof WriteStream)) + return new WriteStream(path, options); + Stream.call(this); + this.path = path; + this.fd = null; + this.writable = true; + this.flags = "w"; + this.encoding = "binary"; + this.mode = 438; + this.bytesWritten = 0; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.start !== void 0) { + if (typeof this.start !== "number") { + throw TypeError("start must be a Number"); + } + if (this.start < 0) { + throw new Error("start must be >= zero"); + } + this.pos = this.start; + } + this.busy = false; + this._queue = []; + if (this.fd === null) { + this._open = fs.open; + this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); + this.flush(); + } + } + } + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.8/node_modules/graceful-fs/clone.js +var require_clone = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.8/node_modules/graceful-fs/clone.js"(exports2, module2) { + "use strict"; + module2.exports = clone; + var getPrototypeOf = Object.getPrototypeOf || function(obj) { + return obj.__proto__; + }; + function clone(obj) { + if (obj === null || typeof obj !== "object") + return obj; + if (obj instanceof Object) + var copy = { __proto__: getPrototypeOf(obj) }; + else + var copy = Object.create(null); + Object.getOwnPropertyNames(obj).forEach(function(key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); + }); + return copy; + } + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.8/node_modules/graceful-fs/graceful-fs.js +var require_graceful_fs = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.8/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { + var fs = require("fs"); + var polyfills = require_polyfills(); + var legacy = require_legacy_streams(); + var clone = require_clone(); + var util = require("util"); + var gracefulQueue; + var previousSymbol; + if (typeof Symbol === "function" && typeof Symbol.for === "function") { + gracefulQueue = Symbol.for("graceful-fs.queue"); + previousSymbol = Symbol.for("graceful-fs.previous"); + } else { + gracefulQueue = "___graceful-fs.queue"; + previousSymbol = "___graceful-fs.previous"; + } + function noop() { + } + function publishQueue(context, queue2) { + Object.defineProperty(context, gracefulQueue, { + get: function() { + return queue2; + } + }); + } + var debug = noop; + if (util.debuglog) + debug = util.debuglog("gfs4"); + else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) + debug = function() { + var m = util.format.apply(util, arguments); + m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); + console.error(m); + }; + if (!fs[gracefulQueue]) { + queue = global[gracefulQueue] || []; + publishQueue(fs, queue); + fs.close = function(fs$close) { + function close(fd, cb) { + return fs$close.call(fs, fd, function(err) { + if (!err) { + resetQueue(); + } + if (typeof cb === "function") + cb.apply(this, arguments); + }); + } + Object.defineProperty(close, previousSymbol, { + value: fs$close + }); + return close; + }(fs.close); + fs.closeSync = function(fs$closeSync) { + function closeSync(fd) { + fs$closeSync.apply(fs, arguments); + resetQueue(); + } + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }); + return closeSync; + }(fs.closeSync); + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { + process.on("exit", function() { + debug(fs[gracefulQueue]); + require("assert").equal(fs[gracefulQueue].length, 0); + }); + } + } + var queue; + if (!global[gracefulQueue]) { + publishQueue(global, fs[gracefulQueue]); + } + module2.exports = patch(clone(fs)); + if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { + module2.exports = patch(fs); + fs.__patched = true; + } + function patch(fs2) { + polyfills(fs2); + fs2.gracefulify = patch; + fs2.createReadStream = createReadStream; + fs2.createWriteStream = createWriteStream; + var fs$readFile = fs2.readFile; + fs2.readFile = readFile; + function readFile(path, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$readFile(path, options, cb); + function go$readFile(path2, options2, cb2, startTime) { + return fs$readFile(path2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$readFile, [path2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$writeFile = fs2.writeFile; + fs2.writeFile = writeFile; + function writeFile(path, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$writeFile(path, data, options, cb); + function go$writeFile(path2, data2, options2, cb2, startTime) { + return fs$writeFile(path2, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$writeFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$appendFile = fs2.appendFile; + if (fs$appendFile) + fs2.appendFile = appendFile; + function appendFile(path, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$appendFile(path, data, options, cb); + function go$appendFile(path2, data2, options2, cb2, startTime) { + return fs$appendFile(path2, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$appendFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$copyFile = fs2.copyFile; + if (fs$copyFile) + fs2.copyFile = copyFile; + function copyFile(src, dest, flags, cb) { + if (typeof flags === "function") { + cb = flags; + flags = 0; + } + return go$copyFile(src, dest, flags, cb); + function go$copyFile(src2, dest2, flags2, cb2, startTime) { + return fs$copyFile(src2, dest2, flags2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$readdir = fs2.readdir; + fs2.readdir = readdir; + function readdir(path, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$readdir(path, options, cb); + function go$readdir(path2, options2, cb2, startTime) { + return fs$readdir(path2, options2, function(err, files) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$readdir, [path2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (files && files.sort) + files.sort(); + if (typeof cb2 === "function") + cb2.call(this, err, files); + } + }); + } + } + if (process.version.substr(0, 4) === "v0.8") { + var legStreams = legacy(fs2); + ReadStream = legStreams.ReadStream; + WriteStream = legStreams.WriteStream; + } + var fs$ReadStream = fs2.ReadStream; + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype); + ReadStream.prototype.open = ReadStream$open; + } + var fs$WriteStream = fs2.WriteStream; + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype); + WriteStream.prototype.open = WriteStream$open; + } + Object.defineProperty(fs2, "ReadStream", { + get: function() { + return ReadStream; + }, + set: function(val) { + ReadStream = val; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(fs2, "WriteStream", { + get: function() { + return WriteStream; + }, + set: function(val) { + WriteStream = val; + }, + enumerable: true, + configurable: true + }); + var FileReadStream = ReadStream; + Object.defineProperty(fs2, "FileReadStream", { + get: function() { + return FileReadStream; + }, + set: function(val) { + FileReadStream = val; + }, + enumerable: true, + configurable: true + }); + var FileWriteStream = WriteStream; + Object.defineProperty(fs2, "FileWriteStream", { + get: function() { + return FileWriteStream; + }, + set: function(val) { + FileWriteStream = val; + }, + enumerable: true, + configurable: true + }); + function ReadStream(path, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this; + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments); + } + function ReadStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + if (that.autoClose) + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + that.read(); + } + }); + } + function WriteStream(path, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this; + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments); + } + function WriteStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + } + }); + } + function createReadStream(path, options) { + return new fs2.ReadStream(path, options); + } + function createWriteStream(path, options) { + return new fs2.WriteStream(path, options); + } + var fs$open = fs2.open; + fs2.open = open; + function open(path, flags, mode, cb) { + if (typeof mode === "function") + cb = mode, mode = null; + return go$open(path, flags, mode, cb); + function go$open(path2, flags2, mode2, cb2, startTime) { + return fs$open(path2, flags2, mode2, function(err, fd) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$open, [path2, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + return fs2; + } + function enqueue(elem) { + debug("ENQUEUE", elem[0].name, elem[1]); + fs[gracefulQueue].push(elem); + retry(); + } + var retryTimer; + function resetQueue() { + var now = Date.now(); + for (var i = 0; i < fs[gracefulQueue].length; ++i) { + if (fs[gracefulQueue][i].length > 2) { + fs[gracefulQueue][i][3] = now; + fs[gracefulQueue][i][4] = now; + } + } + retry(); + } + function retry() { + clearTimeout(retryTimer); + retryTimer = void 0; + if (fs[gracefulQueue].length === 0) + return; + var elem = fs[gracefulQueue].shift(); + var fn2 = elem[0]; + var args2 = elem[1]; + var err = elem[2]; + var startTime = elem[3]; + var lastTime = elem[4]; + if (startTime === void 0) { + debug("RETRY", fn2.name, args2); + fn2.apply(null, args2); + } else if (Date.now() - startTime >= 6e4) { + debug("TIMEOUT", fn2.name, args2); + var cb = args2.pop(); + if (typeof cb === "function") + cb.call(null, err); + } else { + var sinceAttempt = Date.now() - lastTime; + var sinceStart = Math.max(lastTime - startTime, 1); + var desiredDelay = Math.min(sinceStart * 1.2, 100); + if (sinceAttempt >= desiredDelay) { + debug("RETRY", fn2.name, args2); + fn2.apply(null, args2.concat([startTime])); + } else { + fs[gracefulQueue].push(elem); + } + } + if (retryTimer === void 0) { + retryTimer = setTimeout(retry, 0); + } + } + } +}); + +// ../../node_modules/.pnpm/strip-bom@4.0.0/node_modules/strip-bom/index.js +var require_strip_bom = __commonJS({ + "../../node_modules/.pnpm/strip-bom@4.0.0/node_modules/strip-bom/index.js"(exports2, module2) { + "use strict"; + module2.exports = (string) => { + if (typeof string !== "string") { + throw new TypeError(`Expected a string, got ${typeof string}`); + } + if (string.charCodeAt(0) === 65279) { + return string.slice(1); + } + return string; + }; + } +}); + +// ../../node_modules/.pnpm/is-arrayish@0.2.1/node_modules/is-arrayish/index.js +var require_is_arrayish = __commonJS({ + "../../node_modules/.pnpm/is-arrayish@0.2.1/node_modules/is-arrayish/index.js"(exports2, module2) { + "use strict"; + module2.exports = function isArrayish(obj) { + if (!obj) { + return false; + } + return obj instanceof Array || Array.isArray(obj) || obj.length >= 0 && obj.splice instanceof Function; + }; + } +}); + +// ../../node_modules/.pnpm/error-ex@1.3.2/node_modules/error-ex/index.js +var require_error_ex = __commonJS({ + "../../node_modules/.pnpm/error-ex@1.3.2/node_modules/error-ex/index.js"(exports2, module2) { + "use strict"; + var util = require("util"); + var isArrayish = require_is_arrayish(); + var errorEx = function errorEx2(name, properties) { + if (!name || name.constructor !== String) { + properties = name || {}; + name = Error.name; + } + var errorExError = function ErrorEXError(message2) { + if (!this) { + return new ErrorEXError(message2); + } + message2 = message2 instanceof Error ? message2.message : message2 || this.message; + Error.call(this, message2); + Error.captureStackTrace(this, errorExError); + this.name = name; + Object.defineProperty(this, "message", { + configurable: true, + enumerable: false, + get: function() { + var newMessage = message2.split(/\r?\n/g); + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } + var modifier = properties[key]; + if ("message" in modifier) { + newMessage = modifier.message(this[key], newMessage) || newMessage; + if (!isArrayish(newMessage)) { + newMessage = [newMessage]; + } + } + } + return newMessage.join("\n"); + }, + set: function(v) { + message2 = v; + } + }); + var overwrittenStack = null; + var stackDescriptor = Object.getOwnPropertyDescriptor(this, "stack"); + var stackGetter = stackDescriptor.get; + var stackValue = stackDescriptor.value; + delete stackDescriptor.value; + delete stackDescriptor.writable; + stackDescriptor.set = function(newstack) { + overwrittenStack = newstack; + }; + stackDescriptor.get = function() { + var stack2 = (overwrittenStack || (stackGetter ? stackGetter.call(this) : stackValue)).split(/\r?\n+/g); + if (!overwrittenStack) { + stack2[0] = this.name + ": " + this.message; + } + var lineCount = 1; + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } + var modifier = properties[key]; + if ("line" in modifier) { + var line = modifier.line(this[key]); + if (line) { + stack2.splice(lineCount++, 0, " " + line); + } + } + if ("stack" in modifier) { + modifier.stack(this[key], stack2); + } + } + return stack2.join("\n"); + }; + Object.defineProperty(this, "stack", stackDescriptor); + }; + if (Object.setPrototypeOf) { + Object.setPrototypeOf(errorExError.prototype, Error.prototype); + Object.setPrototypeOf(errorExError, Error); + } else { + util.inherits(errorExError, Error); + } + return errorExError; + }; + errorEx.append = function(str, def) { + return { + message: function(v, message2) { + v = v || def; + if (v) { + message2[0] += " " + str.replace("%s", v.toString()); + } + return message2; + } + }; + }; + errorEx.line = function(str, def) { + return { + line: function(v) { + v = v || def; + if (v) { + return str.replace("%s", v.toString()); + } + return null; + } + }; + }; + module2.exports = errorEx; + } +}); + +// ../../node_modules/.pnpm/json-parse-even-better-errors@2.3.1/node_modules/json-parse-even-better-errors/index.js +var require_json_parse_even_better_errors = __commonJS({ + "../../node_modules/.pnpm/json-parse-even-better-errors@2.3.1/node_modules/json-parse-even-better-errors/index.js"(exports2, module2) { + "use strict"; + var hexify = (char) => { + const h = char.charCodeAt(0).toString(16).toUpperCase(); + return "0x" + (h.length % 2 ? "0" : "") + h; + }; + var parseError = (e, txt, context) => { + if (!txt) { + return { + message: e.message + " while parsing empty string", + position: 0 + }; + } + const badToken = e.message.match(/^Unexpected token (.) .*position\s+(\d+)/i); + const errIdx = badToken ? +badToken[2] : e.message.match(/^Unexpected end of JSON.*/i) ? txt.length - 1 : null; + const msg = badToken ? e.message.replace(/^Unexpected token ./, `Unexpected token ${JSON.stringify(badToken[1])} (${hexify(badToken[1])})`) : e.message; + if (errIdx !== null && errIdx !== void 0) { + const start = errIdx <= context ? 0 : errIdx - context; + const end = errIdx + context >= txt.length ? txt.length : errIdx + context; + const slice = (start === 0 ? "" : "...") + txt.slice(start, end) + (end === txt.length ? "" : "..."); + const near = txt === slice ? "" : "near "; + return { + message: msg + ` while parsing ${near}${JSON.stringify(slice)}`, + position: errIdx + }; + } else { + return { + message: msg + ` while parsing '${txt.slice(0, context * 2)}'`, + position: 0 + }; + } + }; + var JSONParseError = class extends SyntaxError { + constructor(er, txt, context, caller) { + context = context || 20; + const metadata = parseError(er, txt, context); + super(metadata.message); + Object.assign(this, metadata); + this.code = "EJSONPARSE"; + this.systemError = er; + Error.captureStackTrace(this, caller || this.constructor); + } + get name() { + return this.constructor.name; + } + set name(n) { + } + get [Symbol.toStringTag]() { + return this.constructor.name; + } + }; + var kIndent = Symbol.for("indent"); + var kNewline = Symbol.for("newline"); + var formatRE = /^\s*[{\[]((?:\r?\n)+)([\s\t]*)/; + var emptyRE = /^(?:\{\}|\[\])((?:\r?\n)+)?$/; + var parseJson = (txt, reviver, context) => { + const parseText = stripBOM(txt); + context = context || 20; + try { + const [, newline = "\n", indent = " "] = parseText.match(emptyRE) || parseText.match(formatRE) || [, "", ""]; + const result = JSON.parse(parseText, reviver); + if (result && typeof result === "object") { + result[kNewline] = newline; + result[kIndent] = indent; + } + return result; + } catch (e) { + if (typeof txt !== "string" && !Buffer.isBuffer(txt)) { + const isEmptyArray = Array.isArray(txt) && txt.length === 0; + throw Object.assign(new TypeError(`Cannot parse ${isEmptyArray ? "an empty array" : String(txt)}`), { + code: "EJSONPARSE", + systemError: e + }); + } + throw new JSONParseError(e, parseText, context, parseJson); + } + }; + var stripBOM = (txt) => String(txt).replace(/^\uFEFF/, ""); + module2.exports = parseJson; + parseJson.JSONParseError = JSONParseError; + parseJson.noExceptions = (txt, reviver) => { + try { + return JSON.parse(stripBOM(txt), reviver); + } catch (e) { + } + }; + } +}); + +// ../../node_modules/.pnpm/lines-and-columns@1.1.6/node_modules/lines-and-columns/dist/index.js +var require_dist = __commonJS({ + "../../node_modules/.pnpm/lines-and-columns@1.1.6/node_modules/lines-and-columns/dist/index.js"(exports2) { + "use strict"; + var LF = "\n"; + var CR = "\r"; + var LinesAndColumns = function() { + function LinesAndColumns2(string) { + this.string = string; + var offsets = [0]; + for (var offset = 0; offset < string.length; ) { + switch (string[offset]) { + case LF: + offset += LF.length; + offsets.push(offset); + break; + case CR: + offset += CR.length; + if (string[offset] === LF) { + offset += LF.length; + } + offsets.push(offset); + break; + default: + offset++; + break; + } + } + this.offsets = offsets; + } + LinesAndColumns2.prototype.locationForIndex = function(index) { + if (index < 0 || index > this.string.length) { + return null; + } + var line = 0; + var offsets = this.offsets; + while (offsets[line + 1] <= index) { + line++; + } + var column = index - offsets[line]; + return { line, column }; + }; + LinesAndColumns2.prototype.indexForLocation = function(location) { + var line = location.line, column = location.column; + if (line < 0 || line >= this.offsets.length) { + return null; + } + if (column < 0 || column > this.lengthOfLine(line)) { + return null; + } + return this.offsets[line] + column; + }; + LinesAndColumns2.prototype.lengthOfLine = function(line) { + var offset = this.offsets[line]; + var nextOffset = line === this.offsets.length - 1 ? this.string.length : this.offsets[line + 1]; + return nextOffset - offset; + }; + return LinesAndColumns2; + }(); + exports2.__esModule = true; + exports2["default"] = LinesAndColumns; + } +}); + +// ../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js +var require_js_tokens = __commonJS({ + "../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g; + exports2.matchToToken = function(match) { + var token = { type: "invalid", value: match[0], closed: void 0 }; + if (match[1]) + token.type = "string", token.closed = !!(match[3] || match[4]); + else if (match[5]) + token.type = "comment"; + else if (match[6]) + token.type = "comment", token.closed = !!match[7]; + else if (match[8]) + token.type = "regex"; + else if (match[9]) + token.type = "number"; + else if (match[10]) + token.type = "name"; + else if (match[11]) + token.type = "punctuator"; + else if (match[12]) + token.type = "whitespace"; + return token; + }; + } +}); + +// ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.15.7/node_modules/@babel/helper-validator-identifier/lib/identifier.js +var require_identifier = __commonJS({ + "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.15.7/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.isIdentifierStart = isIdentifierStart; + exports2.isIdentifierChar = isIdentifierChar; + exports2.isIdentifierName = isIdentifierName; + var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC"; + var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F"; + var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); + var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; + var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 46, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938]; + var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; + function isInAstralSet(code, set) { + let pos = 65536; + for (let i = 0, length = set.length; i < length; i += 2) { + pos += set[i]; + if (pos > code) + return false; + pos += set[i + 1]; + if (pos >= code) + return true; + } + return false; + } + function isIdentifierStart(code) { + if (code < 65) + return code === 36; + if (code <= 90) + return true; + if (code < 97) + return code === 95; + if (code <= 122) + return true; + if (code <= 65535) { + return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes); + } + function isIdentifierChar(code) { + if (code < 48) + return code === 36; + if (code < 58) + return true; + if (code < 65) + return false; + if (code <= 90) + return true; + if (code < 97) + return code === 95; + if (code <= 122) + return true; + if (code <= 65535) { + return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); + } + function isIdentifierName(name) { + let isFirst = true; + for (let i = 0; i < name.length; i++) { + let cp = name.charCodeAt(i); + if ((cp & 64512) === 55296 && i + 1 < name.length) { + const trail = name.charCodeAt(++i); + if ((trail & 64512) === 56320) { + cp = 65536 + ((cp & 1023) << 10) + (trail & 1023); + } + } + if (isFirst) { + isFirst = false; + if (!isIdentifierStart(cp)) { + return false; + } + } else if (!isIdentifierChar(cp)) { + return false; + } + } + return !isFirst; + } + } +}); + +// ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.15.7/node_modules/@babel/helper-validator-identifier/lib/keyword.js +var require_keyword = __commonJS({ + "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.15.7/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.isReservedWord = isReservedWord; + exports2.isStrictReservedWord = isStrictReservedWord; + exports2.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord; + exports2.isStrictBindReservedWord = isStrictBindReservedWord; + exports2.isKeyword = isKeyword; + var reservedWords = { + keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"], + strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], + strictBind: ["eval", "arguments"] + }; + var keywords = new Set(reservedWords.keyword); + var reservedWordsStrictSet = new Set(reservedWords.strict); + var reservedWordsStrictBindSet = new Set(reservedWords.strictBind); + function isReservedWord(word, inModule) { + return inModule && word === "await" || word === "enum"; + } + function isStrictReservedWord(word, inModule) { + return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); + } + function isStrictBindOnlyReservedWord(word) { + return reservedWordsStrictBindSet.has(word); + } + function isStrictBindReservedWord(word, inModule) { + return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); + } + function isKeyword(word) { + return keywords.has(word); + } + } +}); + +// ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.15.7/node_modules/@babel/helper-validator-identifier/lib/index.js +var require_lib = __commonJS({ + "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.15.7/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + Object.defineProperty(exports2, "isIdentifierName", { + enumerable: true, + get: function() { + return _identifier.isIdentifierName; + } + }); + Object.defineProperty(exports2, "isIdentifierChar", { + enumerable: true, + get: function() { + return _identifier.isIdentifierChar; + } + }); + Object.defineProperty(exports2, "isIdentifierStart", { + enumerable: true, + get: function() { + return _identifier.isIdentifierStart; + } + }); + Object.defineProperty(exports2, "isReservedWord", { + enumerable: true, + get: function() { + return _keyword.isReservedWord; + } + }); + Object.defineProperty(exports2, "isStrictBindOnlyReservedWord", { + enumerable: true, + get: function() { + return _keyword.isStrictBindOnlyReservedWord; + } + }); + Object.defineProperty(exports2, "isStrictBindReservedWord", { + enumerable: true, + get: function() { + return _keyword.isStrictBindReservedWord; + } + }); + Object.defineProperty(exports2, "isStrictReservedWord", { + enumerable: true, + get: function() { + return _keyword.isStrictReservedWord; + } + }); + Object.defineProperty(exports2, "isKeyword", { + enumerable: true, + get: function() { + return _keyword.isKeyword; + } + }); + var _identifier = require_identifier(); + var _keyword = require_keyword(); + } +}); + +// ../../node_modules/.pnpm/escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js +var require_escape_string_regexp = __commonJS({ + "../../node_modules/.pnpm/escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js"(exports2, module2) { + "use strict"; + var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; + module2.exports = function(str) { + if (typeof str !== "string") { + throw new TypeError("Expected a string"); + } + return str.replace(matchOperatorsRe, "\\$&"); + }; + } +}); + +// ../../node_modules/.pnpm/color-name@1.1.3/node_modules/color-name/index.js +var require_color_name = __commonJS({ + "../../node_modules/.pnpm/color-name@1.1.3/node_modules/color-name/index.js"(exports2, module2) { + "use strict"; + module2.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] + }; + } +}); + +// ../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/conversions.js +var require_conversions = __commonJS({ + "../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/conversions.js"(exports2, module2) { + var cssKeywords = require_color_name(); + var reverseKeywords = {}; + for (key in cssKeywords) { + if (cssKeywords.hasOwnProperty(key)) { + reverseKeywords[cssKeywords[key]] = key; + } + } + var key; + var convert = module2.exports = { + rgb: { channels: 3, labels: "rgb" }, + hsl: { channels: 3, labels: "hsl" }, + hsv: { channels: 3, labels: "hsv" }, + hwb: { channels: 3, labels: "hwb" }, + cmyk: { channels: 4, labels: "cmyk" }, + xyz: { channels: 3, labels: "xyz" }, + lab: { channels: 3, labels: "lab" }, + lch: { channels: 3, labels: "lch" }, + hex: { channels: 1, labels: ["hex"] }, + keyword: { channels: 1, labels: ["keyword"] }, + ansi16: { channels: 1, labels: ["ansi16"] }, + ansi256: { channels: 1, labels: ["ansi256"] }, + hcg: { channels: 3, labels: ["h", "c", "g"] }, + apple: { channels: 3, labels: ["r16", "g16", "b16"] }, + gray: { channels: 1, labels: ["gray"] } + }; + for (model in convert) { + if (convert.hasOwnProperty(model)) { + if (!("channels" in convert[model])) { + throw new Error("missing channels property: " + model); + } + if (!("labels" in convert[model])) { + throw new Error("missing channel labels property: " + model); + } + if (convert[model].labels.length !== convert[model].channels) { + throw new Error("channel and label counts mismatch: " + model); + } + channels = convert[model].channels; + labels = convert[model].labels; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], "channels", { value: channels }); + Object.defineProperty(convert[model], "labels", { value: labels }); + } + } + var channels; + var labels; + var model; + convert.rgb.hsl = function(rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var min = Math.min(r, g, b); + var max = Math.max(r, g, b); + var delta = max - min; + var h; + var s; + var l; + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + h = Math.min(h * 60, 360); + if (h < 0) { + h += 360; + } + l = (min + max) / 2; + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); + } + return [h, s * 100, l * 100]; + }; + convert.rgb.hsv = function(rgb) { + var rdif; + var gdif; + var bdif; + var h; + var s; + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var v = Math.max(r, g, b); + var diff = v - Math.min(r, g, b); + var diffc = function(c) { + return (v - c) / 6 / diff + 1 / 2; + }; + if (diff === 0) { + h = s = 0; + } else { + s = diff / v; + rdif = diffc(r); + gdif = diffc(g); + bdif = diffc(b); + if (r === v) { + h = bdif - gdif; + } else if (g === v) { + h = 1 / 3 + rdif - bdif; + } else if (b === v) { + h = 2 / 3 + gdif - rdif; + } + if (h < 0) { + h += 1; + } else if (h > 1) { + h -= 1; + } + } + return [ + h * 360, + s * 100, + v * 100 + ]; + }; + convert.rgb.hwb = function(rgb) { + var r = rgb[0]; + var g = rgb[1]; + var b = rgb[2]; + var h = convert.rgb.hsl(rgb)[0]; + var w = 1 / 255 * Math.min(r, Math.min(g, b)); + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + return [h, w * 100, b * 100]; + }; + convert.rgb.cmyk = function(rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var c; + var m; + var y; + var k; + k = Math.min(1 - r, 1 - g, 1 - b); + c = (1 - r - k) / (1 - k) || 0; + m = (1 - g - k) / (1 - k) || 0; + y = (1 - b - k) / (1 - k) || 0; + return [c * 100, m * 100, y * 100, k * 100]; + }; + function comparativeDistance(x, y) { + return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2); + } + convert.rgb.keyword = function(rgb) { + var reversed = reverseKeywords[rgb]; + if (reversed) { + return reversed; + } + var currentClosestDistance = Infinity; + var currentClosestKeyword; + for (var keyword in cssKeywords) { + if (cssKeywords.hasOwnProperty(keyword)) { + var value = cssKeywords[keyword]; + var distance = comparativeDistance(rgb, value); + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } + } + } + return currentClosestKeyword; + }; + convert.keyword.rgb = function(keyword) { + return cssKeywords[keyword]; + }; + convert.rgb.xyz = function(rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92; + g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92; + b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92; + var x = r * 0.4124 + g * 0.3576 + b * 0.1805; + var y = r * 0.2126 + g * 0.7152 + b * 0.0722; + var z = r * 0.0193 + g * 0.1192 + b * 0.9505; + return [x * 100, y * 100, z * 100]; + }; + convert.rgb.lab = function(rgb) { + var xyz = convert.rgb.xyz(rgb); + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + x /= 95.047; + y /= 100; + z /= 108.883; + x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; + y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; + z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; + l = 116 * y - 16; + a = 500 * (x - y); + b = 200 * (y - z); + return [l, a, b]; + }; + convert.hsl.rgb = function(hsl) { + var h = hsl[0] / 360; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var t1; + var t2; + var t3; + var rgb; + var val; + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + if (l < 0.5) { + t2 = l * (1 + s); + } else { + t2 = l + s - l * s; + } + t1 = 2 * l - t2; + rgb = [0, 0, 0]; + for (var i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + if (t3 < 0) { + t3++; + } + if (t3 > 1) { + t3--; + } + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + } else { + val = t1; + } + rgb[i] = val * 255; + } + return rgb; + }; + convert.hsl.hsv = function(hsl) { + var h = hsl[0]; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var smin = s; + var lmin = Math.max(l, 0.01); + var sv; + var v; + l *= 2; + s *= l <= 1 ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + v = (l + s) / 2; + sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s); + return [h, sv * 100, v * 100]; + }; + convert.hsv.rgb = function(hsv) { + var h = hsv[0] / 60; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var hi = Math.floor(h) % 6; + var f = h - Math.floor(h); + var p = 255 * v * (1 - s); + var q = 255 * v * (1 - s * f); + var t = 255 * v * (1 - s * (1 - f)); + v *= 255; + switch (hi) { + case 0: + return [v, t, p]; + case 1: + return [q, v, p]; + case 2: + return [p, v, t]; + case 3: + return [p, q, v]; + case 4: + return [t, p, v]; + case 5: + return [v, p, q]; + } + }; + convert.hsv.hsl = function(hsv) { + var h = hsv[0]; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var vmin = Math.max(v, 0.01); + var lmin; + var sl; + var l; + l = (2 - s) * v; + lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= lmin <= 1 ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + return [h, sl * 100, l * 100]; + }; + convert.hwb.rgb = function(hwb) { + var h = hwb[0] / 360; + var wh = hwb[1] / 100; + var bl = hwb[2] / 100; + var ratio = wh + bl; + var i; + var v; + var f; + var n; + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + i = Math.floor(6 * h); + v = 1 - bl; + f = 6 * h - i; + if ((i & 1) !== 0) { + f = 1 - f; + } + n = wh + f * (v - wh); + var r; + var g; + var b; + switch (i) { + default: + case 6: + case 0: + r = v; + g = n; + b = wh; + break; + case 1: + r = n; + g = v; + b = wh; + break; + case 2: + r = wh; + g = v; + b = n; + break; + case 3: + r = wh; + g = n; + b = v; + break; + case 4: + r = n; + g = wh; + b = v; + break; + case 5: + r = v; + g = wh; + b = n; + break; + } + return [r * 255, g * 255, b * 255]; + }; + convert.cmyk.rgb = function(cmyk) { + var c = cmyk[0] / 100; + var m = cmyk[1] / 100; + var y = cmyk[2] / 100; + var k = cmyk[3] / 100; + var r; + var g; + var b; + r = 1 - Math.min(1, c * (1 - k) + k); + g = 1 - Math.min(1, m * (1 - k) + k); + b = 1 - Math.min(1, y * (1 - k) + k); + return [r * 255, g * 255, b * 255]; + }; + convert.xyz.rgb = function(xyz) { + var x = xyz[0] / 100; + var y = xyz[1] / 100; + var z = xyz[2] / 100; + var r; + var g; + var b; + r = x * 3.2406 + y * -1.5372 + z * -0.4986; + g = x * -0.9689 + y * 1.8758 + z * 0.0415; + b = x * 0.0557 + y * -0.204 + z * 1.057; + r = r > 31308e-7 ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 : r * 12.92; + g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92; + b = b > 31308e-7 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : b * 12.92; + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + return [r * 255, g * 255, b * 255]; + }; + convert.xyz.lab = function(xyz) { + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + x /= 95.047; + y /= 100; + z /= 108.883; + x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; + y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; + z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; + l = 116 * y - 16; + a = 500 * (x - y); + b = 200 * (y - z); + return [l, a, b]; + }; + convert.lab.xyz = function(lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var x; + var y; + var z; + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + var y2 = Math.pow(y, 3); + var x2 = Math.pow(x, 3); + var z2 = Math.pow(z, 3); + y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787; + x *= 95.047; + y *= 100; + z *= 108.883; + return [x, y, z]; + }; + convert.lab.lch = function(lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var hr; + var h; + var c; + hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + if (h < 0) { + h += 360; + } + c = Math.sqrt(a * a + b * b); + return [l, c, h]; + }; + convert.lch.lab = function(lch) { + var l = lch[0]; + var c = lch[1]; + var h = lch[2]; + var a; + var b; + var hr; + hr = h / 360 * 2 * Math.PI; + a = c * Math.cos(hr); + b = c * Math.sin(hr); + return [l, a, b]; + }; + convert.rgb.ansi16 = function(args2) { + var r = args2[0]; + var g = args2[1]; + var b = args2[2]; + var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args2)[2]; + value = Math.round(value / 50); + if (value === 0) { + return 30; + } + var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255)); + if (value === 2) { + ansi += 60; + } + return ansi; + }; + convert.hsv.ansi16 = function(args2) { + return convert.rgb.ansi16(convert.hsv.rgb(args2), args2[2]); + }; + convert.rgb.ansi256 = function(args2) { + var r = args2[0]; + var g = args2[1]; + var b = args2[2]; + if (r === g && g === b) { + if (r < 8) { + return 16; + } + if (r > 248) { + return 231; + } + return Math.round((r - 8) / 247 * 24) + 232; + } + var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5); + return ansi; + }; + convert.ansi16.rgb = function(args2) { + var color = args2 % 10; + if (color === 0 || color === 7) { + if (args2 > 50) { + color += 3.5; + } + color = color / 10.5 * 255; + return [color, color, color]; + } + var mult = (~~(args2 > 50) + 1) * 0.5; + var r = (color & 1) * mult * 255; + var g = (color >> 1 & 1) * mult * 255; + var b = (color >> 2 & 1) * mult * 255; + return [r, g, b]; + }; + convert.ansi256.rgb = function(args2) { + if (args2 >= 232) { + var c = (args2 - 232) * 10 + 8; + return [c, c, c]; + } + args2 -= 16; + var rem; + var r = Math.floor(args2 / 36) / 5 * 255; + var g = Math.floor((rem = args2 % 36) / 6) / 5 * 255; + var b = rem % 6 / 5 * 255; + return [r, g, b]; + }; + convert.rgb.hex = function(args2) { + var integer = ((Math.round(args2[0]) & 255) << 16) + ((Math.round(args2[1]) & 255) << 8) + (Math.round(args2[2]) & 255); + var string = integer.toString(16).toUpperCase(); + return "000000".substring(string.length) + string; + }; + convert.hex.rgb = function(args2) { + var match = args2.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + if (!match) { + return [0, 0, 0]; + } + var colorString = match[0]; + if (match[0].length === 3) { + colorString = colorString.split("").map(function(char) { + return char + char; + }).join(""); + } + var integer = parseInt(colorString, 16); + var r = integer >> 16 & 255; + var g = integer >> 8 & 255; + var b = integer & 255; + return [r, g, b]; + }; + convert.rgb.hcg = function(rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var max = Math.max(Math.max(r, g), b); + var min = Math.min(Math.min(r, g), b); + var chroma = max - min; + var grayscale; + var hue; + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; + } + if (chroma <= 0) { + hue = 0; + } else if (max === r) { + hue = (g - b) / chroma % 6; + } else if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma + 4; + } + hue /= 6; + hue %= 1; + return [hue * 360, chroma * 100, grayscale * 100]; + }; + convert.hsl.hcg = function(hsl) { + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var c = 1; + var f = 0; + if (l < 0.5) { + c = 2 * s * l; + } else { + c = 2 * s * (1 - l); + } + if (c < 1) { + f = (l - 0.5 * c) / (1 - c); + } + return [hsl[0], c * 100, f * 100]; + }; + convert.hsv.hcg = function(hsv) { + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var c = s * v; + var f = 0; + if (c < 1) { + f = (v - c) / (1 - c); + } + return [hsv[0], c * 100, f * 100]; + }; + convert.hcg.rgb = function(hcg) { + var h = hcg[0] / 360; + var c = hcg[1] / 100; + var g = hcg[2] / 100; + if (c === 0) { + return [g * 255, g * 255, g * 255]; + } + var pure = [0, 0, 0]; + var hi = h % 1 * 6; + var v = hi % 1; + var w = 1 - v; + var mg = 0; + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; + pure[1] = v; + pure[2] = 0; + break; + case 1: + pure[0] = w; + pure[1] = 1; + pure[2] = 0; + break; + case 2: + pure[0] = 0; + pure[1] = 1; + pure[2] = v; + break; + case 3: + pure[0] = 0; + pure[1] = w; + pure[2] = 1; + break; + case 4: + pure[0] = v; + pure[1] = 0; + pure[2] = 1; + break; + default: + pure[0] = 1; + pure[1] = 0; + pure[2] = w; + } + mg = (1 - c) * g; + return [ + (c * pure[0] + mg) * 255, + (c * pure[1] + mg) * 255, + (c * pure[2] + mg) * 255 + ]; + }; + convert.hcg.hsv = function(hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var v = c + g * (1 - c); + var f = 0; + if (v > 0) { + f = c / v; + } + return [hcg[0], f * 100, v * 100]; + }; + convert.hcg.hsl = function(hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var l = g * (1 - c) + 0.5 * c; + var s = 0; + if (l > 0 && l < 0.5) { + s = c / (2 * l); + } else if (l >= 0.5 && l < 1) { + s = c / (2 * (1 - l)); + } + return [hcg[0], s * 100, l * 100]; + }; + convert.hcg.hwb = function(hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var v = c + g * (1 - c); + return [hcg[0], (v - c) * 100, (1 - v) * 100]; + }; + convert.hwb.hcg = function(hwb) { + var w = hwb[1] / 100; + var b = hwb[2] / 100; + var v = 1 - b; + var c = v - w; + var g = 0; + if (c < 1) { + g = (v - c) / (1 - c); + } + return [hwb[0], c * 100, g * 100]; + }; + convert.apple.rgb = function(apple) { + return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255]; + }; + convert.rgb.apple = function(rgb) { + return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535]; + }; + convert.gray.rgb = function(args2) { + return [args2[0] / 100 * 255, args2[0] / 100 * 255, args2[0] / 100 * 255]; + }; + convert.gray.hsl = convert.gray.hsv = function(args2) { + return [0, 0, args2[0]]; + }; + convert.gray.hwb = function(gray) { + return [0, 100, gray[0]]; + }; + convert.gray.cmyk = function(gray) { + return [0, 0, 0, gray[0]]; + }; + convert.gray.lab = function(gray) { + return [gray[0], 0, 0]; + }; + convert.gray.hex = function(gray) { + var val = Math.round(gray[0] / 100 * 255) & 255; + var integer = (val << 16) + (val << 8) + val; + var string = integer.toString(16).toUpperCase(); + return "000000".substring(string.length) + string; + }; + convert.rgb.gray = function(rgb) { + var val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; + }; + } +}); + +// ../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/route.js +var require_route = __commonJS({ + "../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/route.js"(exports2, module2) { + var conversions = require_conversions(); + function buildGraph() { + var graph = {}; + var models = Object.keys(conversions); + for (var len = models.length, i = 0; i < len; i++) { + graph[models[i]] = { + distance: -1, + parent: null + }; + } + return graph; + } + function deriveBFS(fromModel) { + var graph = buildGraph(); + var queue = [fromModel]; + graph[fromModel].distance = 0; + while (queue.length) { + var current = queue.pop(); + var adjacents = Object.keys(conversions[current]); + for (var len = adjacents.length, i = 0; i < len; i++) { + var adjacent = adjacents[i]; + var node = graph[adjacent]; + if (node.distance === -1) { + node.distance = graph[current].distance + 1; + node.parent = current; + queue.unshift(adjacent); + } + } + } + return graph; + } + function link(from, to) { + return function(args2) { + return to(from(args2)); + }; + } + function wrapConversion(toModel, graph) { + var path = [graph[toModel].parent, toModel]; + var fn2 = conversions[graph[toModel].parent][toModel]; + var cur = graph[toModel].parent; + while (graph[cur].parent) { + path.unshift(graph[cur].parent); + fn2 = link(conversions[graph[cur].parent][cur], fn2); + cur = graph[cur].parent; + } + fn2.conversion = path; + return fn2; + } + module2.exports = function(fromModel) { + var graph = deriveBFS(fromModel); + var conversion = {}; + var models = Object.keys(graph); + for (var len = models.length, i = 0; i < len; i++) { + var toModel = models[i]; + var node = graph[toModel]; + if (node.parent === null) { + continue; + } + conversion[toModel] = wrapConversion(toModel, graph); + } + return conversion; + }; + } +}); + +// ../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/index.js +var require_color_convert = __commonJS({ + "../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/index.js"(exports2, module2) { + var conversions = require_conversions(); + var route = require_route(); + var convert = {}; + var models = Object.keys(conversions); + function wrapRaw(fn2) { + var wrappedFn = function(args2) { + if (args2 === void 0 || args2 === null) { + return args2; + } + if (arguments.length > 1) { + args2 = Array.prototype.slice.call(arguments); + } + return fn2(args2); + }; + if ("conversion" in fn2) { + wrappedFn.conversion = fn2.conversion; + } + return wrappedFn; + } + function wrapRounded(fn2) { + var wrappedFn = function(args2) { + if (args2 === void 0 || args2 === null) { + return args2; + } + if (arguments.length > 1) { + args2 = Array.prototype.slice.call(arguments); + } + var result = fn2(args2); + if (typeof result === "object") { + for (var len = result.length, i = 0; i < len; i++) { + result[i] = Math.round(result[i]); + } + } + return result; + }; + if ("conversion" in fn2) { + wrappedFn.conversion = fn2.conversion; + } + return wrappedFn; + } + models.forEach(function(fromModel) { + convert[fromModel] = {}; + Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels }); + Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels }); + var routes = route(fromModel); + var routeModels = Object.keys(routes); + routeModels.forEach(function(toModel) { + var fn2 = routes[toModel]; + convert[fromModel][toModel] = wrapRounded(fn2); + convert[fromModel][toModel].raw = wrapRaw(fn2); + }); + }); + module2.exports = convert; + } +}); + +// ../../node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/index.js +var require_ansi_styles = __commonJS({ + "../../node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/index.js"(exports2, module2) { + "use strict"; + var colorConvert = require_color_convert(); + var wrapAnsi16 = (fn2, offset) => function() { + const code = fn2.apply(colorConvert, arguments); + return `[${code + offset}m`; + }; + var wrapAnsi256 = (fn2, offset) => function() { + const code = fn2.apply(colorConvert, arguments); + return `[${38 + offset};5;${code}m`; + }; + var wrapAnsi16m = (fn2, offset) => function() { + const rgb = fn2.apply(colorConvert, arguments); + return `[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; + }; + function assembleStyles() { + const codes = new Map(); + const styles = { + modifier: { + reset: [0, 0], + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39], + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; + styles.color.grey = styles.color.gray; + for (const groupName of Object.keys(styles)) { + const group = styles[groupName]; + for (const styleName of Object.keys(group)) { + const style = group[styleName]; + styles[styleName] = { + open: `[${style[0]}m`, + close: `[${style[1]}m` + }; + group[styleName] = styles[styleName]; + codes.set(style[0], style[1]); + } + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + Object.defineProperty(styles, "codes", { + value: codes, + enumerable: false + }); + } + const ansi2ansi = (n) => n; + const rgb2rgb = (r, g, b) => [r, g, b]; + styles.color.close = ""; + styles.bgColor.close = ""; + styles.color.ansi = { + ansi: wrapAnsi16(ansi2ansi, 0) + }; + styles.color.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 0) + }; + styles.color.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 0) + }; + styles.bgColor.ansi = { + ansi: wrapAnsi16(ansi2ansi, 10) + }; + styles.bgColor.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 10) + }; + styles.bgColor.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 10) + }; + for (let key of Object.keys(colorConvert)) { + if (typeof colorConvert[key] !== "object") { + continue; + } + const suite = colorConvert[key]; + if (key === "ansi16") { + key = "ansi"; + } + if ("ansi16" in suite) { + styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); + styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); + } + if ("ansi256" in suite) { + styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); + styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); + } + if ("rgb" in suite) { + styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); + styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); + } + } + return styles; + } + Object.defineProperty(module2, "exports", { + enumerable: true, + get: assembleStyles + }); + } +}); + +// ../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js +var require_has_flag = __commonJS({ + "../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports2, module2) { + "use strict"; + module2.exports = (flag, argv2) => { + argv2 = argv2 || process.argv; + const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; + const pos = argv2.indexOf(prefix + flag); + const terminatorPos = argv2.indexOf("--"); + return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); + }; + } +}); + +// ../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js +var require_supports_color = __commonJS({ + "../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports2, module2) { + "use strict"; + var os = require("os"); + var hasFlag = require_has_flag(); + var env = process.env; + var forceColor; + if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) { + forceColor = false; + } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { + forceColor = true; + } + if ("FORCE_COLOR" in env) { + forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; + } + function translateLevel(level) { + if (level === 0) { + return false; + } + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; + } + function supportsColor(stream) { + if (forceColor === false) { + return 0; + } + if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { + return 3; + } + if (hasFlag("color=256")) { + return 2; + } + if (stream && !stream.isTTY && forceColor !== true) { + return 0; + } + const min = forceColor ? 1 : 0; + if (process.platform === "win32") { + const osRelease = os.release().split("."); + if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + return 1; + } + if ("CI" in env) { + if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") { + return 1; + } + return min; + } + if ("TEAMCITY_VERSION" in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + if (env.COLORTERM === "truecolor") { + return 3; + } + if ("TERM_PROGRAM" in env) { + const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); + switch (env.TERM_PROGRAM) { + case "iTerm.app": + return version >= 3 ? 3 : 2; + case "Apple_Terminal": + return 2; + } + } + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + if ("COLORTERM" in env) { + return 1; + } + if (env.TERM === "dumb") { + return min; + } + return min; + } + function getSupportLevel(stream) { + const level = supportsColor(stream); + return translateLevel(level); + } + module2.exports = { + supportsColor: getSupportLevel, + stdout: getSupportLevel(process.stdout), + stderr: getSupportLevel(process.stderr) + }; + } +}); + +// ../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/templates.js +var require_templates = __commonJS({ + "../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/templates.js"(exports2, module2) { + "use strict"; + var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; + var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; + var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; + var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; + var ESCAPES = new Map([ + ["n", "\n"], + ["r", "\r"], + ["t", " "], + ["b", "\b"], + ["f", "\f"], + ["v", "\v"], + ["0", "\0"], + ["\\", "\\"], + ["e", ""], + ["a", "\x07"] + ]); + function unescape2(c) { + if (c[0] === "u" && c.length === 5 || c[0] === "x" && c.length === 3) { + return String.fromCharCode(parseInt(c.slice(1), 16)); + } + return ESCAPES.get(c) || c; + } + function parseArguments(name, args2) { + const results = []; + const chunks = args2.trim().split(/\s*,\s*/g); + let matches; + for (const chunk of chunks) { + if (!isNaN(chunk)) { + results.push(Number(chunk)); + } else if (matches = chunk.match(STRING_REGEX)) { + results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape2(escape) : chr)); + } else { + throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); + } + } + return results; + } + function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + const results = []; + let matches; + while ((matches = STYLE_REGEX.exec(style)) !== null) { + const name = matches[1]; + if (matches[2]) { + const args2 = parseArguments(name, matches[2]); + results.push([name].concat(args2)); + } else { + results.push([name]); + } + } + return results; + } + function buildStyle(chalk, styles) { + const enabled = {}; + for (const layer of styles) { + for (const style of layer.styles) { + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } + } + let current = chalk; + for (const styleName of Object.keys(enabled)) { + if (Array.isArray(enabled[styleName])) { + if (!(styleName in current)) { + throw new Error(`Unknown Chalk style: ${styleName}`); + } + if (enabled[styleName].length > 0) { + current = current[styleName].apply(current, enabled[styleName]); + } else { + current = current[styleName]; + } + } + } + return current; + } + module2.exports = (chalk, tmp) => { + const styles = []; + const chunks = []; + let chunk = []; + tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => { + if (escapeChar) { + chunk.push(unescape2(escapeChar)); + } else if (style) { + const str = chunk.join(""); + chunk = []; + chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str)); + styles.push({ inverse, styles: parseStyle(style) }); + } else if (close) { + if (styles.length === 0) { + throw new Error("Found extraneous } in Chalk template literal"); + } + chunks.push(buildStyle(chalk, styles)(chunk.join(""))); + chunk = []; + styles.pop(); + } else { + chunk.push(chr); + } + }); + chunks.push(chunk.join("")); + if (styles.length > 0) { + const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`; + throw new Error(errMsg); + } + return chunks.join(""); + }; + } +}); + +// ../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/index.js +var require_chalk = __commonJS({ + "../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/index.js"(exports2, module2) { + "use strict"; + var escapeStringRegexp = require_escape_string_regexp(); + var ansiStyles = require_ansi_styles(); + var stdoutColor = require_supports_color().stdout; + var template = require_templates(); + var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm"); + var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"]; + var skipModels = new Set(["gray"]); + var styles = Object.create(null); + function applyOptions(obj, options) { + options = options || {}; + const scLevel = stdoutColor ? stdoutColor.level : 0; + obj.level = options.level === void 0 ? scLevel : options.level; + obj.enabled = "enabled" in options ? options.enabled : obj.level > 0; + } + function Chalk(options) { + if (!this || !(this instanceof Chalk) || this.template) { + const chalk = {}; + applyOptions(chalk, options); + chalk.template = function() { + const args2 = [].slice.call(arguments); + return chalkTag.apply(null, [chalk.template].concat(args2)); + }; + Object.setPrototypeOf(chalk, Chalk.prototype); + Object.setPrototypeOf(chalk.template, chalk); + chalk.template.constructor = Chalk; + return chalk.template; + } + applyOptions(this, options); + } + if (isSimpleWindowsTerm) { + ansiStyles.blue.open = ""; + } + for (const key of Object.keys(ansiStyles)) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g"); + styles[key] = { + get() { + const codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + }; + } + styles.visible = { + get() { + return build.call(this, this._styles || [], true, "visible"); + } + }; + ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), "g"); + for (const model of Object.keys(ansiStyles.color.ansi)) { + if (skipModels.has(model)) { + continue; + } + styles[model] = { + get() { + const level = this.level; + return function() { + const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; + } + ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), "g"); + for (const model of Object.keys(ansiStyles.bgColor.ansi)) { + if (skipModels.has(model)) { + continue; + } + const bgModel = "bg" + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + const level = this.level; + return function() { + const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; + } + var proto = Object.defineProperties(() => { + }, styles); + function build(_styles, _empty, key) { + const builder = function() { + return applyStyle.apply(builder, arguments); + }; + builder._styles = _styles; + builder._empty = _empty; + const self2 = this; + Object.defineProperty(builder, "level", { + enumerable: true, + get() { + return self2.level; + }, + set(level) { + self2.level = level; + } + }); + Object.defineProperty(builder, "enabled", { + enumerable: true, + get() { + return self2.enabled; + }, + set(enabled) { + self2.enabled = enabled; + } + }); + builder.hasGrey = this.hasGrey || key === "gray" || key === "grey"; + builder.__proto__ = proto; + return builder; + } + function applyStyle() { + const args2 = arguments; + const argsLen = args2.length; + let str = String(arguments[0]); + if (argsLen === 0) { + return ""; + } + if (argsLen > 1) { + for (let a = 1; a < argsLen; a++) { + str += " " + args2[a]; + } + } + if (!this.enabled || this.level <= 0 || !str) { + return this._empty ? "" : str; + } + const originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ""; + } + for (const code of this._styles.slice().reverse()) { + str = code.open + str.replace(code.closeRe, code.open) + code.close; + str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); + } + ansiStyles.dim.open = originalDim; + return str; + } + function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + return [].slice.call(arguments, 1).join(" "); + } + const args2 = [].slice.call(arguments, 2); + const parts = [strings.raw[0]]; + for (let i = 1; i < strings.length; i++) { + parts.push(String(args2[i - 1]).replace(/[{}\\]/g, "\\$&")); + parts.push(String(strings.raw[i])); + } + return template(chalk, parts.join("")); + } + Object.defineProperties(Chalk.prototype, styles); + module2.exports = Chalk(); + module2.exports.supportsColor = stdoutColor; + module2.exports.default = module2.exports; + } +}); + +// ../../node_modules/.pnpm/@babel+highlight@7.14.5/node_modules/@babel/highlight/lib/index.js +var require_lib2 = __commonJS({ + "../../node_modules/.pnpm/@babel+highlight@7.14.5/node_modules/@babel/highlight/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.shouldHighlight = shouldHighlight; + exports2.getChalk = getChalk; + exports2.default = highlight; + var _jsTokens = require_js_tokens(); + var _helperValidatorIdentifier = require_lib(); + var _chalk = require_chalk(); + var sometimesKeywords = new Set(["as", "async", "from", "get", "of", "set"]); + function getDefs(chalk) { + return { + keyword: chalk.cyan, + capitalized: chalk.yellow, + jsxIdentifier: chalk.yellow, + punctuator: chalk.yellow, + number: chalk.magenta, + string: chalk.green, + regex: chalk.magenta, + comment: chalk.grey, + invalid: chalk.white.bgRed.bold + }; + } + var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; + var BRACKET = /^[()[\]{}]$/; + var tokenize; + { + const JSX_TAG = /^[a-z][\w-]*$/i; + const getTokenType = function(token, offset, text) { + if (token.type === "name") { + if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) { + return "keyword"; + } + if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == " colorize(str)).join("\n"); + } else { + highlighted += value; + } + } + return highlighted; + } + function shouldHighlight(options) { + return !!_chalk.supportsColor || options.forceColor; + } + function getChalk(options) { + return options.forceColor ? new _chalk.constructor({ + enabled: true, + level: 1 + }) : _chalk; + } + function highlight(code, options = {}) { + if (shouldHighlight(options)) { + const chalk = getChalk(options); + const defs = getDefs(chalk); + return highlightTokens(defs, code); + } else { + return code; + } + } + } +}); + +// ../../node_modules/.pnpm/@babel+code-frame@7.14.5/node_modules/@babel/code-frame/lib/index.js +var require_lib3 = __commonJS({ + "../../node_modules/.pnpm/@babel+code-frame@7.14.5/node_modules/@babel/code-frame/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.codeFrameColumns = codeFrameColumns; + exports2.default = _default; + var _highlight = require_lib2(); + var deprecationWarningShown = false; + function getDefs(chalk) { + return { + gutter: chalk.grey, + marker: chalk.red.bold, + message: chalk.red.bold + }; + } + var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; + function getMarkerLines(loc, source, opts) { + const startLoc = Object.assign({ + column: 0, + line: -1 + }, loc.start); + const endLoc = Object.assign({}, startLoc, loc.end); + const { + linesAbove = 2, + linesBelow = 3 + } = opts || {}; + const startLine = startLoc.line; + const startColumn = startLoc.column; + const endLine = endLoc.line; + const endColumn = endLoc.column; + let start = Math.max(startLine - (linesAbove + 1), 0); + let end = Math.min(source.length, endLine + linesBelow); + if (startLine === -1) { + start = 0; + } + if (endLine === -1) { + end = source.length; + } + const lineDiff = endLine - startLine; + const markerLines = {}; + if (lineDiff) { + for (let i = 0; i <= lineDiff; i++) { + const lineNumber = i + startLine; + if (!startColumn) { + markerLines[lineNumber] = true; + } else if (i === 0) { + const sourceLength = source[lineNumber - 1].length; + markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1]; + } else if (i === lineDiff) { + markerLines[lineNumber] = [0, endColumn]; + } else { + const sourceLength = source[lineNumber - i].length; + markerLines[lineNumber] = [0, sourceLength]; + } + } + } else { + if (startColumn === endColumn) { + if (startColumn) { + markerLines[startLine] = [startColumn, 0]; + } else { + markerLines[startLine] = true; + } + } else { + markerLines[startLine] = [startColumn, endColumn - startColumn]; + } + } + return { + start, + end, + markerLines + }; + } + function codeFrameColumns(rawLines, loc, opts = {}) { + const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts); + const chalk = (0, _highlight.getChalk)(opts); + const defs = getDefs(chalk); + const maybeHighlight = (chalkFn, string) => { + return highlighted ? chalkFn(string) : string; + }; + const lines = rawLines.split(NEWLINE); + const { + start, + end, + markerLines + } = getMarkerLines(loc, lines, opts); + const hasColumns = loc.start && typeof loc.start.column === "number"; + const numberMaxWidth = String(end).length; + const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines; + let frame = highlightedLines.split(NEWLINE).slice(start, end).map((line, index) => { + const number = start + 1 + index; + const paddedNumber = ` ${number}`.slice(-numberMaxWidth); + const gutter = ` ${paddedNumber} |`; + const hasMarker = markerLines[number]; + const lastMarkerLine = !markerLines[number + 1]; + if (hasMarker) { + let markerLine = ""; + if (Array.isArray(hasMarker)) { + const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); + const numberOfMarkers = hasMarker[1] || 1; + markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join(""); + if (lastMarkerLine && opts.message) { + markerLine += " " + maybeHighlight(defs.message, opts.message); + } + } + return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join(""); + } else { + return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`; + } + }).join("\n"); + if (opts.message && !hasColumns) { + frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message} +${frame}`; + } + if (highlighted) { + return chalk.reset(frame); + } else { + return frame; + } + } + function _default(rawLines, lineNumber, colNumber, opts = {}) { + if (!deprecationWarningShown) { + deprecationWarningShown = true; + const message2 = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; + if (process.emitWarning) { + process.emitWarning(message2, "DeprecationWarning"); + } else { + const deprecationError = new Error(message2); + deprecationError.name = "DeprecationWarning"; + console.warn(new Error(message2)); + } + } + colNumber = Math.max(colNumber, 0); + const location = { + start: { + column: colNumber, + line: lineNumber + } + }; + return codeFrameColumns(rawLines, location, opts); + } + } +}); + +// ../../node_modules/.pnpm/parse-json@5.2.0/node_modules/parse-json/index.js +var require_parse_json = __commonJS({ + "../../node_modules/.pnpm/parse-json@5.2.0/node_modules/parse-json/index.js"(exports2, module2) { + "use strict"; + var errorEx = require_error_ex(); + var fallback = require_json_parse_even_better_errors(); + var { default: LinesAndColumns } = require_dist(); + var { codeFrameColumns } = require_lib3(); + var JSONError = errorEx("JSONError", { + fileName: errorEx.append("in %s"), + codeFrame: errorEx.append("\n\n%s\n") + }); + var parseJson = (string, reviver, filename) => { + if (typeof reviver === "string") { + filename = reviver; + reviver = null; + } + try { + try { + return JSON.parse(string, reviver); + } catch (error) { + fallback(string, reviver); + throw error; + } + } catch (error) { + error.message = error.message.replace(/\n/g, ""); + const indexMatch = error.message.match(/in JSON at position (\d+) while parsing/); + const jsonError = new JSONError(error); + if (filename) { + jsonError.fileName = filename; + } + if (indexMatch && indexMatch.length > 0) { + const lines = new LinesAndColumns(string); + const index = Number(indexMatch[1]); + const location = lines.locationForIndex(index); + const codeFrame = codeFrameColumns(string, { start: { line: location.line + 1, column: location.column + 1 } }, { highlightCode: true }); + jsonError.codeFrame = codeFrame; + } + throw jsonError; + } + }; + parseJson.JSONError = JSONError; + module2.exports = parseJson; + } +}); + +// ../../node_modules/.pnpm/load-json-file@6.2.0/node_modules/load-json-file/index.js +var require_load_json_file = __commonJS({ + "../../node_modules/.pnpm/load-json-file@6.2.0/node_modules/load-json-file/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var { promisify } = require("util"); + var fs = require_graceful_fs(); + var stripBom = require_strip_bom(); + var parseJson = require_parse_json(); + var parse = (data, filePath, options = {}) => { + data = stripBom(data); + if (typeof options.beforeParse === "function") { + data = options.beforeParse(data); + } + return parseJson(data, options.reviver, path.relative(process.cwd(), filePath)); + }; + module2.exports = async (filePath, options) => parse(await promisify(fs.readFile)(filePath, "utf8"), filePath, options); + module2.exports.sync = (filePath, options) => parse(fs.readFileSync(filePath, "utf8"), filePath, options); + } +}); + +// ../cli-meta/lib/index.js +var require_lib4 = __commonJS({ + "../cli-meta/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var load_json_file_1 = __importDefault(require_load_json_file()); + var defaultManifest = { + name: "pnpm" != null && true ? "pnpm" : "pnpm", + version: "6.16.0" != null && true ? "6.16.0" : "0.0.0" + }; + var pkgJson; + if (require.main == null) { + pkgJson = defaultManifest; + } else { + try { + pkgJson = { + ...defaultManifest, + ...load_json_file_1.default.sync(path_1.default.join(path_1.default.dirname(require.main.filename), "../package.json")) + }; + } catch (err) { + pkgJson = defaultManifest; + } + } + var packageManager = { + name: pkgJson.name, + stableVersion: pkgJson.version.includes("-") ? pkgJson.version.substr(0, pkgJson.version.indexOf("-")) : pkgJson.version, + version: pkgJson.version + }; + exports2.default = packageManager; + } +}); + +// ../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/constants.js +var require_constants = __commonJS({ + "../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/constants.js"(exports2, module2) { + var BASH_LOCATION = "~/.bashrc"; + var FISH_LOCATION = "~/.config/fish/config.fish"; + var ZSH_LOCATION = "~/.zshrc"; + var COMPLETION_DIR = "~/.config/tabtab"; + var TABTAB_SCRIPT_NAME = "__tabtab"; + var SHELL_LOCATIONS = { + bash: "~/.bashrc", + zsh: "~/.zshrc", + fish: "~/.config/fish/config.fish" + }; + module2.exports = { + BASH_LOCATION, + ZSH_LOCATION, + FISH_LOCATION, + COMPLETION_DIR, + TABTAB_SCRIPT_NAME, + SHELL_LOCATIONS + }; + } +}); + +// ../../node_modules/.pnpm/ansi-colors@4.1.1/node_modules/ansi-colors/symbols.js +var require_symbols = __commonJS({ + "../../node_modules/.pnpm/ansi-colors@4.1.1/node_modules/ansi-colors/symbols.js"(exports2, module2) { + "use strict"; + var isHyper = process.env.TERM_PROGRAM === "Hyper"; + var isWindows = process.platform === "win32"; + var isLinux = process.platform === "linux"; + var common = { + ballotDisabled: "\u2612", + ballotOff: "\u2610", + ballotOn: "\u2611", + bullet: "\u2022", + bulletWhite: "\u25E6", + fullBlock: "\u2588", + heart: "\u2764", + identicalTo: "\u2261", + line: "\u2500", + mark: "\u203B", + middot: "\xB7", + minus: "\uFF0D", + multiplication: "\xD7", + obelus: "\xF7", + pencilDownRight: "\u270E", + pencilRight: "\u270F", + pencilUpRight: "\u2710", + percent: "%", + pilcrow2: "\u2761", + pilcrow: "\xB6", + plusMinus: "\xB1", + section: "\xA7", + starsOff: "\u2606", + starsOn: "\u2605", + upDownArrow: "\u2195" + }; + var windows = Object.assign({}, common, { + check: "\u221A", + cross: "\xD7", + ellipsisLarge: "...", + ellipsis: "...", + info: "i", + question: "?", + questionSmall: "?", + pointer: ">", + pointerSmall: "\xBB", + radioOff: "( )", + radioOn: "(*)", + warning: "\u203C" + }); + var other = Object.assign({}, common, { + ballotCross: "\u2718", + check: "\u2714", + cross: "\u2716", + ellipsisLarge: "\u22EF", + ellipsis: "\u2026", + info: "\u2139", + question: "?", + questionFull: "\uFF1F", + questionSmall: "\uFE56", + pointer: isLinux ? "\u25B8" : "\u276F", + pointerSmall: isLinux ? "\u2023" : "\u203A", + radioOff: "\u25EF", + radioOn: "\u25C9", + warning: "\u26A0" + }); + module2.exports = isWindows && !isHyper ? windows : other; + Reflect.defineProperty(module2.exports, "common", { enumerable: false, value: common }); + Reflect.defineProperty(module2.exports, "windows", { enumerable: false, value: windows }); + Reflect.defineProperty(module2.exports, "other", { enumerable: false, value: other }); + } +}); + +// ../../node_modules/.pnpm/ansi-colors@4.1.1/node_modules/ansi-colors/index.js +var require_ansi_colors = __commonJS({ + "../../node_modules/.pnpm/ansi-colors@4.1.1/node_modules/ansi-colors/index.js"(exports2, module2) { + "use strict"; + var isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val); + var ANSI_REGEX = /[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g; + var create = () => { + const colors = { enabled: true, visible: true, styles: {}, keys: {} }; + if ("FORCE_COLOR" in process.env) { + colors.enabled = process.env.FORCE_COLOR !== "0"; + } + const ansi = (style2) => { + let open = style2.open = `[${style2.codes[0]}m`; + let close = style2.close = `[${style2.codes[1]}m`; + let regex = style2.regex = new RegExp(`\\u001b\\[${style2.codes[1]}m`, "g"); + style2.wrap = (input, newline) => { + if (input.includes(close)) + input = input.replace(regex, close + open); + let output = open + input + close; + return newline ? output.replace(/\r*\n/g, `${close}$&${open}`) : output; + }; + return style2; + }; + const wrap = (style2, input, newline) => { + return typeof style2 === "function" ? style2(input) : style2.wrap(input, newline); + }; + const style = (input, stack2) => { + if (input === "" || input == null) + return ""; + if (colors.enabled === false) + return input; + if (colors.visible === false) + return ""; + let str = "" + input; + let nl = str.includes("\n"); + let n = stack2.length; + if (n > 0 && stack2.includes("unstyle")) { + stack2 = [...new Set(["unstyle", ...stack2])].reverse(); + } + while (n-- > 0) + str = wrap(colors.styles[stack2[n]], str, nl); + return str; + }; + const define2 = (name, codes, type) => { + colors.styles[name] = ansi({ name, codes }); + let keys = colors.keys[type] || (colors.keys[type] = []); + keys.push(name); + Reflect.defineProperty(colors, name, { + configurable: true, + enumerable: true, + set(value) { + colors.alias(name, value); + }, + get() { + let color = (input) => style(input, color.stack); + Reflect.setPrototypeOf(color, colors); + color.stack = this.stack ? this.stack.concat(name) : [name]; + return color; + } + }); + }; + define2("reset", [0, 0], "modifier"); + define2("bold", [1, 22], "modifier"); + define2("dim", [2, 22], "modifier"); + define2("italic", [3, 23], "modifier"); + define2("underline", [4, 24], "modifier"); + define2("inverse", [7, 27], "modifier"); + define2("hidden", [8, 28], "modifier"); + define2("strikethrough", [9, 29], "modifier"); + define2("black", [30, 39], "color"); + define2("red", [31, 39], "color"); + define2("green", [32, 39], "color"); + define2("yellow", [33, 39], "color"); + define2("blue", [34, 39], "color"); + define2("magenta", [35, 39], "color"); + define2("cyan", [36, 39], "color"); + define2("white", [37, 39], "color"); + define2("gray", [90, 39], "color"); + define2("grey", [90, 39], "color"); + define2("bgBlack", [40, 49], "bg"); + define2("bgRed", [41, 49], "bg"); + define2("bgGreen", [42, 49], "bg"); + define2("bgYellow", [43, 49], "bg"); + define2("bgBlue", [44, 49], "bg"); + define2("bgMagenta", [45, 49], "bg"); + define2("bgCyan", [46, 49], "bg"); + define2("bgWhite", [47, 49], "bg"); + define2("blackBright", [90, 39], "bright"); + define2("redBright", [91, 39], "bright"); + define2("greenBright", [92, 39], "bright"); + define2("yellowBright", [93, 39], "bright"); + define2("blueBright", [94, 39], "bright"); + define2("magentaBright", [95, 39], "bright"); + define2("cyanBright", [96, 39], "bright"); + define2("whiteBright", [97, 39], "bright"); + define2("bgBlackBright", [100, 49], "bgBright"); + define2("bgRedBright", [101, 49], "bgBright"); + define2("bgGreenBright", [102, 49], "bgBright"); + define2("bgYellowBright", [103, 49], "bgBright"); + define2("bgBlueBright", [104, 49], "bgBright"); + define2("bgMagentaBright", [105, 49], "bgBright"); + define2("bgCyanBright", [106, 49], "bgBright"); + define2("bgWhiteBright", [107, 49], "bgBright"); + colors.ansiRegex = ANSI_REGEX; + colors.hasColor = colors.hasAnsi = (str) => { + colors.ansiRegex.lastIndex = 0; + return typeof str === "string" && str !== "" && colors.ansiRegex.test(str); + }; + colors.alias = (name, color) => { + let fn2 = typeof color === "string" ? colors[color] : color; + if (typeof fn2 !== "function") { + throw new TypeError("Expected alias to be the name of an existing color (string) or a function"); + } + if (!fn2.stack) { + Reflect.defineProperty(fn2, "name", { value: name }); + colors.styles[name] = fn2; + fn2.stack = [name]; + } + Reflect.defineProperty(colors, name, { + configurable: true, + enumerable: true, + set(value) { + colors.alias(name, value); + }, + get() { + let color2 = (input) => style(input, color2.stack); + Reflect.setPrototypeOf(color2, colors); + color2.stack = this.stack ? this.stack.concat(fn2.stack) : fn2.stack; + return color2; + } + }); + }; + colors.theme = (custom) => { + if (!isObject(custom)) + throw new TypeError("Expected theme to be an object"); + for (let name of Object.keys(custom)) { + colors.alias(name, custom[name]); + } + return colors; + }; + colors.alias("unstyle", (str) => { + if (typeof str === "string" && str !== "") { + colors.ansiRegex.lastIndex = 0; + return str.replace(colors.ansiRegex, ""); + } + return ""; + }); + colors.alias("noop", (str) => str); + colors.none = colors.clear = colors.noop; + colors.stripColor = colors.unstyle; + colors.symbols = require_symbols(); + colors.define = define2; + return colors; + }; + module2.exports = create(); + module2.exports.create = create; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/utils.js +var require_utils = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/utils.js"(exports2) { + "use strict"; + var toString = Object.prototype.toString; + var colors = require_ansi_colors(); + var called = false; + var fns = []; + var complements = { + "yellow": "blue", + "cyan": "red", + "green": "magenta", + "black": "white", + "blue": "yellow", + "red": "cyan", + "magenta": "green", + "white": "black" + }; + exports2.longest = (arr, prop) => { + return arr.reduce((a, v) => Math.max(a, prop ? v[prop].length : v.length), 0); + }; + exports2.hasColor = (str) => !!str && colors.hasColor(str); + var isObject = exports2.isObject = (val) => { + return val !== null && typeof val === "object" && !Array.isArray(val); + }; + exports2.nativeType = (val) => { + return toString.call(val).slice(8, -1).toLowerCase().replace(/\s/g, ""); + }; + exports2.isAsyncFn = (val) => { + return exports2.nativeType(val) === "asyncfunction"; + }; + exports2.isPrimitive = (val) => { + return val != null && typeof val !== "object" && typeof val !== "function"; + }; + exports2.resolve = (context, value, ...rest) => { + if (typeof value === "function") { + return value.call(context, ...rest); + } + return value; + }; + exports2.scrollDown = (choices = []) => [...choices.slice(1), choices[0]]; + exports2.scrollUp = (choices = []) => [choices.pop(), ...choices]; + exports2.reorder = (arr = []) => { + let res = arr.slice(); + res.sort((a, b) => { + if (a.index > b.index) + return 1; + if (a.index < b.index) + return -1; + return 0; + }); + return res; + }; + exports2.swap = (arr, index, pos) => { + let len = arr.length; + let idx = pos === len ? 0 : pos < 0 ? len - 1 : pos; + let choice = arr[index]; + arr[index] = arr[idx]; + arr[idx] = choice; + }; + exports2.width = (stream, fallback = 80) => { + let columns = stream && stream.columns ? stream.columns : fallback; + if (stream && typeof stream.getWindowSize === "function") { + columns = stream.getWindowSize()[0]; + } + if (process.platform === "win32") { + return columns - 1; + } + return columns; + }; + exports2.height = (stream, fallback = 20) => { + let rows = stream && stream.rows ? stream.rows : fallback; + if (stream && typeof stream.getWindowSize === "function") { + rows = stream.getWindowSize()[1]; + } + return rows; + }; + exports2.wordWrap = (str, options = {}) => { + if (!str) + return str; + if (typeof options === "number") { + options = { width: options }; + } + let { indent = "", newline = "\n" + indent, width = 80 } = options; + let spaces = (newline + indent).match(/[^\S\n]/g) || []; + width -= spaces.length; + let source = `.{1,${width}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`; + let output = str.trim(); + let regex = new RegExp(source, "g"); + let lines = output.match(regex) || []; + lines = lines.map((line) => line.replace(/\n$/, "")); + if (options.padEnd) + lines = lines.map((line) => line.padEnd(width, " ")); + if (options.padStart) + lines = lines.map((line) => line.padStart(width, " ")); + return indent + lines.join(newline); + }; + exports2.unmute = (color) => { + let name = color.stack.find((n) => colors.keys.color.includes(n)); + if (name) { + return colors[name]; + } + let bg = color.stack.find((n) => n.slice(2) === "bg"); + if (bg) { + return colors[name.slice(2)]; + } + return (str) => str; + }; + exports2.pascal = (str) => str ? str[0].toUpperCase() + str.slice(1) : ""; + exports2.inverse = (color) => { + if (!color || !color.stack) + return color; + let name = color.stack.find((n) => colors.keys.color.includes(n)); + if (name) { + let col = colors["bg" + exports2.pascal(name)]; + return col ? col.black : color; + } + let bg = color.stack.find((n) => n.slice(0, 2) === "bg"); + if (bg) { + return colors[bg.slice(2).toLowerCase()] || color; + } + return colors.none; + }; + exports2.complement = (color) => { + if (!color || !color.stack) + return color; + let name = color.stack.find((n) => colors.keys.color.includes(n)); + let bg = color.stack.find((n) => n.slice(0, 2) === "bg"); + if (name && !bg) { + return colors[complements[name] || name]; + } + if (bg) { + let lower = bg.slice(2).toLowerCase(); + let comp = complements[lower]; + if (!comp) + return color; + return colors["bg" + exports2.pascal(comp)] || color; + } + return colors.none; + }; + exports2.meridiem = (date) => { + let hours = date.getHours(); + let minutes = date.getMinutes(); + let ampm = hours >= 12 ? "pm" : "am"; + hours = hours % 12; + let hrs = hours === 0 ? 12 : hours; + let min = minutes < 10 ? "0" + minutes : minutes; + return hrs + ":" + min + " " + ampm; + }; + exports2.set = (obj = {}, prop = "", val) => { + return prop.split(".").reduce((acc, k, i, arr) => { + let value = arr.length - 1 > i ? acc[k] || {} : val; + if (!exports2.isObject(value) && i < arr.length - 1) + value = {}; + return acc[k] = value; + }, obj); + }; + exports2.get = (obj = {}, prop = "", fallback) => { + let value = obj[prop] == null ? prop.split(".").reduce((acc, k) => acc && acc[k], obj) : obj[prop]; + return value == null ? fallback : value; + }; + exports2.mixin = (target, b) => { + if (!isObject(target)) + return b; + if (!isObject(b)) + return target; + for (let key of Object.keys(b)) { + let desc = Object.getOwnPropertyDescriptor(b, key); + if (desc.hasOwnProperty("value")) { + if (target.hasOwnProperty(key) && isObject(desc.value)) { + let existing = Object.getOwnPropertyDescriptor(target, key); + if (isObject(existing.value)) { + target[key] = exports2.merge({}, target[key], b[key]); + } else { + Reflect.defineProperty(target, key, desc); + } + } else { + Reflect.defineProperty(target, key, desc); + } + } else { + Reflect.defineProperty(target, key, desc); + } + } + return target; + }; + exports2.merge = (...args2) => { + let target = {}; + for (let ele of args2) + exports2.mixin(target, ele); + return target; + }; + exports2.mixinEmitter = (obj, emitter) => { + let proto = emitter.constructor.prototype; + for (let key of Object.keys(proto)) { + let val = proto[key]; + if (typeof val === "function") { + exports2.define(obj, key, val.bind(emitter)); + } else { + exports2.define(obj, key, val); + } + } + }; + exports2.onExit = (callback) => { + const onExit = (quit, code) => { + if (called) + return; + called = true; + fns.forEach((fn2) => fn2()); + if (quit === true) { + process.exit(128 + code); + } + }; + if (fns.length === 0) { + process.once("SIGTERM", onExit.bind(null, true, 15)); + process.once("SIGINT", onExit.bind(null, true, 2)); + process.once("exit", onExit); + } + fns.push(callback); + }; + exports2.define = (obj, key, value) => { + Reflect.defineProperty(obj, key, { value }); + }; + exports2.defineExport = (obj, key, fn2) => { + let custom; + Reflect.defineProperty(obj, key, { + enumerable: true, + configurable: true, + set(val) { + custom = val; + }, + get() { + return custom ? custom() : fn2(); + } + }); + }; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/combos.js +var require_combos = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/combos.js"(exports2) { + "use strict"; + exports2.ctrl = { + a: "first", + b: "backward", + c: "cancel", + d: "deleteForward", + e: "last", + f: "forward", + g: "reset", + i: "tab", + k: "cutForward", + l: "reset", + n: "newItem", + m: "cancel", + j: "submit", + p: "search", + r: "remove", + s: "save", + u: "undo", + w: "cutLeft", + x: "toggleCursor", + v: "paste" + }; + exports2.shift = { + up: "shiftUp", + down: "shiftDown", + left: "shiftLeft", + right: "shiftRight", + tab: "prev" + }; + exports2.fn = { + up: "pageUp", + down: "pageDown", + left: "pageLeft", + right: "pageRight", + delete: "deleteForward" + }; + exports2.option = { + b: "backward", + f: "forward", + d: "cutRight", + left: "cutLeft", + up: "altUp", + down: "altDown" + }; + exports2.keys = { + pageup: "pageUp", + pagedown: "pageDown", + home: "home", + end: "end", + cancel: "cancel", + delete: "deleteForward", + backspace: "delete", + down: "down", + enter: "submit", + escape: "cancel", + left: "left", + space: "space", + number: "number", + return: "submit", + right: "right", + tab: "next", + up: "up" + }; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/keypress.js +var require_keypress = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/keypress.js"(exports2, module2) { + "use strict"; + var readline = require("readline"); + var combos = require_combos(); + var metaKeyCodeRe = /^(?:\x1b)([a-zA-Z0-9])$/; + var fnKeyRe = /^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/; + var keyName = { + "OP": "f1", + "OQ": "f2", + "OR": "f3", + "OS": "f4", + "[11~": "f1", + "[12~": "f2", + "[13~": "f3", + "[14~": "f4", + "[[A": "f1", + "[[B": "f2", + "[[C": "f3", + "[[D": "f4", + "[[E": "f5", + "[15~": "f5", + "[17~": "f6", + "[18~": "f7", + "[19~": "f8", + "[20~": "f9", + "[21~": "f10", + "[23~": "f11", + "[24~": "f12", + "[A": "up", + "[B": "down", + "[C": "right", + "[D": "left", + "[E": "clear", + "[F": "end", + "[H": "home", + "OA": "up", + "OB": "down", + "OC": "right", + "OD": "left", + "OE": "clear", + "OF": "end", + "OH": "home", + "[1~": "home", + "[2~": "insert", + "[3~": "delete", + "[4~": "end", + "[5~": "pageup", + "[6~": "pagedown", + "[[5~": "pageup", + "[[6~": "pagedown", + "[7~": "home", + "[8~": "end", + "[a": "up", + "[b": "down", + "[c": "right", + "[d": "left", + "[e": "clear", + "[2$": "insert", + "[3$": "delete", + "[5$": "pageup", + "[6$": "pagedown", + "[7$": "home", + "[8$": "end", + "Oa": "up", + "Ob": "down", + "Oc": "right", + "Od": "left", + "Oe": "clear", + "[2^": "insert", + "[3^": "delete", + "[5^": "pageup", + "[6^": "pagedown", + "[7^": "home", + "[8^": "end", + "[Z": "tab" + }; + function isShiftKey(code) { + return ["[a", "[b", "[c", "[d", "[e", "[2$", "[3$", "[5$", "[6$", "[7$", "[8$", "[Z"].includes(code); + } + function isCtrlKey(code) { + return ["Oa", "Ob", "Oc", "Od", "Oe", "[2^", "[3^", "[5^", "[6^", "[7^", "[8^"].includes(code); + } + var keypress = (s = "", event = {}) => { + let parts; + let key = { + name: event.name, + ctrl: false, + meta: false, + shift: false, + option: false, + sequence: s, + raw: s, + ...event + }; + if (Buffer.isBuffer(s)) { + if (s[0] > 127 && s[1] === void 0) { + s[0] -= 128; + s = "" + String(s); + } else { + s = String(s); + } + } else if (s !== void 0 && typeof s !== "string") { + s = String(s); + } else if (!s) { + s = key.sequence || ""; + } + key.sequence = key.sequence || s || key.name; + if (s === "\r") { + key.raw = void 0; + key.name = "return"; + } else if (s === "\n") { + key.name = "enter"; + } else if (s === " ") { + key.name = "tab"; + } else if (s === "\b" || s === "\x7F" || s === "\x7F" || s === "\b") { + key.name = "backspace"; + key.meta = s.charAt(0) === ""; + } else if (s === "" || s === "") { + key.name = "escape"; + key.meta = s.length === 2; + } else if (s === " " || s === " ") { + key.name = "space"; + key.meta = s.length === 2; + } else if (s <= "") { + key.name = String.fromCharCode(s.charCodeAt(0) + "a".charCodeAt(0) - 1); + key.ctrl = true; + } else if (s.length === 1 && s >= "0" && s <= "9") { + key.name = "number"; + } else if (s.length === 1 && s >= "a" && s <= "z") { + key.name = s; + } else if (s.length === 1 && s >= "A" && s <= "Z") { + key.name = s.toLowerCase(); + key.shift = true; + } else if (parts = metaKeyCodeRe.exec(s)) { + key.meta = true; + key.shift = /^[A-Z]$/.test(parts[1]); + } else if (parts = fnKeyRe.exec(s)) { + let segs = [...s]; + if (segs[0] === "" && segs[1] === "") { + key.option = true; + } + let code = [parts[1], parts[2], parts[4], parts[6]].filter(Boolean).join(""); + let modifier = (parts[3] || parts[5] || 1) - 1; + key.ctrl = !!(modifier & 4); + key.meta = !!(modifier & 10); + key.shift = !!(modifier & 1); + key.code = code; + key.name = keyName[code]; + key.shift = isShiftKey(code) || key.shift; + key.ctrl = isCtrlKey(code) || key.ctrl; + } + return key; + }; + keypress.listen = (options = {}, onKeypress) => { + let { stdin } = options; + if (!stdin || stdin !== process.stdin && !stdin.isTTY) { + throw new Error("Invalid stream passed"); + } + let rl = readline.createInterface({ terminal: true, input: stdin }); + readline.emitKeypressEvents(stdin, rl); + let on = (buf, key) => onKeypress(buf, keypress(buf, key), rl); + let isRaw = stdin.isRaw; + if (stdin.isTTY) + stdin.setRawMode(true); + stdin.on("keypress", on); + rl.resume(); + let off = () => { + if (stdin.isTTY) + stdin.setRawMode(isRaw); + stdin.removeListener("keypress", on); + rl.pause(); + rl.close(); + }; + return off; + }; + keypress.action = (buf, key, customActions) => { + let obj = { ...combos, ...customActions }; + if (key.ctrl) { + key.action = obj.ctrl[key.name]; + return key; + } + if (key.option && obj.option) { + key.action = obj.option[key.name]; + return key; + } + if (key.shift) { + key.action = obj.shift[key.name]; + return key; + } + key.action = obj.keys[key.name]; + return key; + }; + module2.exports = keypress; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/timer.js +var require_timer = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/timer.js"(exports2, module2) { + "use strict"; + module2.exports = (prompt) => { + prompt.timers = prompt.timers || {}; + let timers = prompt.options.timers; + if (!timers) + return; + for (let key of Object.keys(timers)) { + let opts = timers[key]; + if (typeof opts === "number") { + opts = { interval: opts }; + } + create(prompt, key, opts); + } + }; + function create(prompt, name, options = {}) { + let timer = prompt.timers[name] = { name, start: Date.now(), ms: 0, tick: 0 }; + let ms = options.interval || 120; + timer.frames = options.frames || []; + timer.loading = true; + let interval = setInterval(() => { + timer.ms = Date.now() - timer.start; + timer.tick++; + prompt.render(); + }, ms); + timer.stop = () => { + timer.loading = false; + clearInterval(interval); + }; + Reflect.defineProperty(timer, "interval", { value: interval }); + prompt.once("close", () => timer.stop()); + return timer.stop; + } + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/state.js +var require_state = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/state.js"(exports2, module2) { + "use strict"; + var { define: define2, width } = require_utils(); + var State = class { + constructor(prompt) { + let options = prompt.options; + define2(this, "_prompt", prompt); + this.type = prompt.type; + this.name = prompt.name; + this.message = ""; + this.header = ""; + this.footer = ""; + this.error = ""; + this.hint = ""; + this.input = ""; + this.cursor = 0; + this.index = 0; + this.lines = 0; + this.tick = 0; + this.prompt = ""; + this.buffer = ""; + this.width = width(options.stdout || process.stdout); + Object.assign(this, options); + this.name = this.name || this.message; + this.message = this.message || this.name; + this.symbols = prompt.symbols; + this.styles = prompt.styles; + this.required = new Set(); + this.cancelled = false; + this.submitted = false; + } + clone() { + let state = { ...this }; + state.status = this.status; + state.buffer = Buffer.from(state.buffer); + delete state.clone; + return state; + } + set color(val) { + this._color = val; + } + get color() { + let styles = this.prompt.styles; + if (this.cancelled) + return styles.cancelled; + if (this.submitted) + return styles.submitted; + let color = this._color || styles[this.status]; + return typeof color === "function" ? color : styles.pending; + } + set loading(value) { + this._loading = value; + } + get loading() { + if (typeof this._loading === "boolean") + return this._loading; + if (this.loadingChoices) + return "choices"; + return false; + } + get status() { + if (this.cancelled) + return "cancelled"; + if (this.submitted) + return "submitted"; + return "pending"; + } + }; + module2.exports = State; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/styles.js +var require_styles = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/styles.js"(exports2, module2) { + "use strict"; + var utils = require_utils(); + var colors = require_ansi_colors(); + var styles = { + default: colors.noop, + noop: colors.noop, + set inverse(custom) { + this._inverse = custom; + }, + get inverse() { + return this._inverse || utils.inverse(this.primary); + }, + set complement(custom) { + this._complement = custom; + }, + get complement() { + return this._complement || utils.complement(this.primary); + }, + primary: colors.cyan, + success: colors.green, + danger: colors.magenta, + strong: colors.bold, + warning: colors.yellow, + muted: colors.dim, + disabled: colors.gray, + dark: colors.dim.gray, + underline: colors.underline, + set info(custom) { + this._info = custom; + }, + get info() { + return this._info || this.primary; + }, + set em(custom) { + this._em = custom; + }, + get em() { + return this._em || this.primary.underline; + }, + set heading(custom) { + this._heading = custom; + }, + get heading() { + return this._heading || this.muted.underline; + }, + set pending(custom) { + this._pending = custom; + }, + get pending() { + return this._pending || this.primary; + }, + set submitted(custom) { + this._submitted = custom; + }, + get submitted() { + return this._submitted || this.success; + }, + set cancelled(custom) { + this._cancelled = custom; + }, + get cancelled() { + return this._cancelled || this.danger; + }, + set typing(custom) { + this._typing = custom; + }, + get typing() { + return this._typing || this.dim; + }, + set placeholder(custom) { + this._placeholder = custom; + }, + get placeholder() { + return this._placeholder || this.primary.dim; + }, + set highlight(custom) { + this._highlight = custom; + }, + get highlight() { + return this._highlight || this.inverse; + } + }; + styles.merge = (options = {}) => { + if (options.styles && typeof options.styles.enabled === "boolean") { + colors.enabled = options.styles.enabled; + } + if (options.styles && typeof options.styles.visible === "boolean") { + colors.visible = options.styles.visible; + } + let result = utils.merge({}, styles, options.styles); + delete result.merge; + for (let key of Object.keys(colors)) { + if (!result.hasOwnProperty(key)) { + Reflect.defineProperty(result, key, { get: () => colors[key] }); + } + } + for (let key of Object.keys(colors.styles)) { + if (!result.hasOwnProperty(key)) { + Reflect.defineProperty(result, key, { get: () => colors[key] }); + } + } + return result; + }; + module2.exports = styles; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/symbols.js +var require_symbols2 = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/symbols.js"(exports2, module2) { + "use strict"; + var isWindows = process.platform === "win32"; + var colors = require_ansi_colors(); + var utils = require_utils(); + var symbols = { + ...colors.symbols, + upDownDoubleArrow: "\u21D5", + upDownDoubleArrow2: "\u2B0D", + upDownArrow: "\u2195", + asterisk: "*", + asterism: "\u2042", + bulletWhite: "\u25E6", + electricArrow: "\u2301", + ellipsisLarge: "\u22EF", + ellipsisSmall: "\u2026", + fullBlock: "\u2588", + identicalTo: "\u2261", + indicator: colors.symbols.check, + leftAngle: "\u2039", + mark: "\u203B", + minus: "\u2212", + multiplication: "\xD7", + obelus: "\xF7", + percent: "%", + pilcrow: "\xB6", + pilcrow2: "\u2761", + pencilUpRight: "\u2710", + pencilDownRight: "\u270E", + pencilRight: "\u270F", + plus: "+", + plusMinus: "\xB1", + pointRight: "\u261E", + rightAngle: "\u203A", + section: "\xA7", + hexagon: { off: "\u2B21", on: "\u2B22", disabled: "\u2B22" }, + ballot: { on: "\u2611", off: "\u2610", disabled: "\u2612" }, + stars: { on: "\u2605", off: "\u2606", disabled: "\u2606" }, + folder: { on: "\u25BC", off: "\u25B6", disabled: "\u25B6" }, + prefix: { + pending: colors.symbols.question, + submitted: colors.symbols.check, + cancelled: colors.symbols.cross + }, + separator: { + pending: colors.symbols.pointerSmall, + submitted: colors.symbols.middot, + cancelled: colors.symbols.middot + }, + radio: { + off: isWindows ? "( )" : "\u25EF", + on: isWindows ? "(*)" : "\u25C9", + disabled: isWindows ? "(|)" : "\u24BE" + }, + numbers: ["\u24EA", "\u2460", "\u2461", "\u2462", "\u2463", "\u2464", "\u2465", "\u2466", "\u2467", "\u2468", "\u2469", "\u246A", "\u246B", "\u246C", "\u246D", "\u246E", "\u246F", "\u2470", "\u2471", "\u2472", "\u2473", "\u3251", "\u3252", "\u3253", "\u3254", "\u3255", "\u3256", "\u3257", "\u3258", "\u3259", "\u325A", "\u325B", "\u325C", "\u325D", "\u325E", "\u325F", "\u32B1", "\u32B2", "\u32B3", "\u32B4", "\u32B5", "\u32B6", "\u32B7", "\u32B8", "\u32B9", "\u32BA", "\u32BB", "\u32BC", "\u32BD", "\u32BE", "\u32BF"] + }; + symbols.merge = (options) => { + let result = utils.merge({}, colors.symbols, symbols, options.symbols); + delete result.merge; + return result; + }; + module2.exports = symbols; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/theme.js +var require_theme = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/theme.js"(exports2, module2) { + "use strict"; + var styles = require_styles(); + var symbols = require_symbols2(); + var utils = require_utils(); + module2.exports = (prompt) => { + prompt.options = utils.merge({}, prompt.options.theme, prompt.options); + prompt.symbols = symbols.merge(prompt.options); + prompt.styles = styles.merge(prompt.options); + }; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/ansi.js +var require_ansi = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/ansi.js"(exports2, module2) { + "use strict"; + var isTerm = process.env.TERM_PROGRAM === "Apple_Terminal"; + var colors = require_ansi_colors(); + var utils = require_utils(); + var ansi = module2.exports = exports2; + var ESC = "["; + var BEL = "\x07"; + var hidden = false; + var code = ansi.code = { + bell: BEL, + beep: BEL, + beginning: `${ESC}G`, + down: `${ESC}J`, + esc: ESC, + getPosition: `${ESC}6n`, + hide: `${ESC}?25l`, + line: `${ESC}2K`, + lineEnd: `${ESC}K`, + lineStart: `${ESC}1K`, + restorePosition: ESC + (isTerm ? "8" : "u"), + savePosition: ESC + (isTerm ? "7" : "s"), + screen: `${ESC}2J`, + show: `${ESC}?25h`, + up: `${ESC}1J` + }; + var cursor = ansi.cursor = { + get hidden() { + return hidden; + }, + hide() { + hidden = true; + return code.hide; + }, + show() { + hidden = false; + return code.show; + }, + forward: (count = 1) => `${ESC}${count}C`, + backward: (count = 1) => `${ESC}${count}D`, + nextLine: (count = 1) => `${ESC}E`.repeat(count), + prevLine: (count = 1) => `${ESC}F`.repeat(count), + up: (count = 1) => count ? `${ESC}${count}A` : "", + down: (count = 1) => count ? `${ESC}${count}B` : "", + right: (count = 1) => count ? `${ESC}${count}C` : "", + left: (count = 1) => count ? `${ESC}${count}D` : "", + to(x, y) { + return y ? `${ESC}${y + 1};${x + 1}H` : `${ESC}${x + 1}G`; + }, + move(x = 0, y = 0) { + let res = ""; + res += x < 0 ? cursor.left(-x) : x > 0 ? cursor.right(x) : ""; + res += y < 0 ? cursor.up(-y) : y > 0 ? cursor.down(y) : ""; + return res; + }, + restore(state = {}) { + let { after, cursor: cursor2, initial, input, prompt, size, value } = state; + initial = utils.isPrimitive(initial) ? String(initial) : ""; + input = utils.isPrimitive(input) ? String(input) : ""; + value = utils.isPrimitive(value) ? String(value) : ""; + if (size) { + let codes = ansi.cursor.up(size) + ansi.cursor.to(prompt.length); + let diff = input.length - cursor2; + if (diff > 0) { + codes += ansi.cursor.left(diff); + } + return codes; + } + if (value || after) { + let pos = !input && !!initial ? -initial.length : -input.length + cursor2; + if (after) + pos -= after.length; + if (input === "" && initial && !prompt.includes(initial)) { + pos += initial.length; + } + return ansi.cursor.move(pos); + } + } + }; + var erase = ansi.erase = { + screen: code.screen, + up: code.up, + down: code.down, + line: code.line, + lineEnd: code.lineEnd, + lineStart: code.lineStart, + lines(n) { + let str = ""; + for (let i = 0; i < n; i++) { + str += ansi.erase.line + (i < n - 1 ? ansi.cursor.up(1) : ""); + } + if (n) + str += ansi.code.beginning; + return str; + } + }; + ansi.clear = (input = "", columns = process.stdout.columns) => { + if (!columns) + return erase.line + cursor.to(0); + let width = (str) => [...colors.unstyle(str)].length; + let lines = input.split(/\r?\n/); + let rows = 0; + for (let line of lines) { + rows += 1 + Math.floor(Math.max(width(line) - 1, 0) / columns); + } + return (erase.line + cursor.prevLine()).repeat(rows - 1) + erase.line + cursor.to(0); + }; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompt.js +var require_prompt = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompt.js"(exports2, module2) { + "use strict"; + var Events = require("events"); + var colors = require_ansi_colors(); + var keypress = require_keypress(); + var timer = require_timer(); + var State = require_state(); + var theme = require_theme(); + var utils = require_utils(); + var ansi = require_ansi(); + var Prompt = class extends Events { + constructor(options = {}) { + super(); + this.name = options.name; + this.type = options.type; + this.options = options; + theme(this); + timer(this); + this.state = new State(this); + this.initial = [options.initial, options.default].find((v) => v != null); + this.stdout = options.stdout || process.stdout; + this.stdin = options.stdin || process.stdin; + this.scale = options.scale || 1; + this.term = this.options.term || process.env.TERM_PROGRAM; + this.margin = margin(this.options.margin); + this.setMaxListeners(0); + setOptions(this); + } + async keypress(input, event = {}) { + this.keypressed = true; + let key = keypress.action(input, keypress(input, event), this.options.actions); + this.state.keypress = key; + this.emit("keypress", input, key); + this.emit("state", this.state.clone()); + let fn2 = this.options[key.action] || this[key.action] || this.dispatch; + if (typeof fn2 === "function") { + return await fn2.call(this, input, key); + } + this.alert(); + } + alert() { + delete this.state.alert; + if (this.options.show === false) { + this.emit("alert"); + } else { + this.stdout.write(ansi.code.beep); + } + } + cursorHide() { + this.stdout.write(ansi.cursor.hide()); + utils.onExit(() => this.cursorShow()); + } + cursorShow() { + this.stdout.write(ansi.cursor.show()); + } + write(str) { + if (!str) + return; + if (this.stdout && this.state.show !== false) { + this.stdout.write(str); + } + this.state.buffer += str; + } + clear(lines = 0) { + let buffer = this.state.buffer; + this.state.buffer = ""; + if (!buffer && !lines || this.options.show === false) + return; + this.stdout.write(ansi.cursor.down(lines) + ansi.clear(buffer, this.width)); + } + restore() { + if (this.state.closed || this.options.show === false) + return; + let { prompt, after, rest } = this.sections(); + let { cursor, initial = "", input = "", value = "" } = this; + let size = this.state.size = rest.length; + let state = { after, cursor, initial, input, prompt, size, value }; + let codes = ansi.cursor.restore(state); + if (codes) { + this.stdout.write(codes); + } + } + sections() { + let { buffer, input, prompt } = this.state; + prompt = colors.unstyle(prompt); + let buf = colors.unstyle(buffer); + let idx = buf.indexOf(prompt); + let header = buf.slice(0, idx); + let rest = buf.slice(idx); + let lines = rest.split("\n"); + let first = lines[0]; + let last = lines[lines.length - 1]; + let promptLine = prompt + (input ? " " + input : ""); + let len = promptLine.length; + let after = len < first.length ? first.slice(len + 1) : ""; + return { header, prompt: first, after, rest: lines.slice(1), last }; + } + async submit() { + this.state.submitted = true; + this.state.validating = true; + if (this.options.onSubmit) { + await this.options.onSubmit.call(this, this.name, this.value, this); + } + let result = this.state.error || await this.validate(this.value, this.state); + if (result !== true) { + let error = "\n" + this.symbols.pointer + " "; + if (typeof result === "string") { + error += result.trim(); + } else { + error += "Invalid input"; + } + this.state.error = "\n" + this.styles.danger(error); + this.state.submitted = false; + await this.render(); + await this.alert(); + this.state.validating = false; + this.state.error = void 0; + return; + } + this.state.validating = false; + await this.render(); + await this.close(); + this.value = await this.result(this.value); + this.emit("submit", this.value); + } + async cancel(err) { + this.state.cancelled = this.state.submitted = true; + await this.render(); + await this.close(); + if (typeof this.options.onCancel === "function") { + await this.options.onCancel.call(this, this.name, this.value, this); + } + this.emit("cancel", await this.error(err)); + } + async close() { + this.state.closed = true; + try { + let sections = this.sections(); + let lines = Math.ceil(sections.prompt.length / this.width); + if (sections.rest) { + this.write(ansi.cursor.down(sections.rest.length)); + } + this.write("\n".repeat(lines)); + } catch (err) { + } + this.emit("close"); + } + start() { + if (!this.stop && this.options.show !== false) { + this.stop = keypress.listen(this, this.keypress.bind(this)); + this.once("close", this.stop); + } + } + async skip() { + this.skipped = this.options.skip === true; + if (typeof this.options.skip === "function") { + this.skipped = await this.options.skip.call(this, this.name, this.value); + } + return this.skipped; + } + async initialize() { + let { format, options, result } = this; + this.format = () => format.call(this, this.value); + this.result = () => result.call(this, this.value); + if (typeof options.initial === "function") { + this.initial = await options.initial.call(this, this); + } + if (typeof options.onRun === "function") { + await options.onRun.call(this, this); + } + if (typeof options.onSubmit === "function") { + let onSubmit = options.onSubmit.bind(this); + let submit = this.submit.bind(this); + delete this.options.onSubmit; + this.submit = async () => { + await onSubmit(this.name, this.value, this); + return submit(); + }; + } + await this.start(); + await this.render(); + } + render() { + throw new Error("expected prompt to have a custom render method"); + } + run() { + return new Promise(async (resolve, reject) => { + this.once("submit", resolve); + this.once("cancel", reject); + if (await this.skip()) { + this.render = () => { + }; + return this.submit(); + } + await this.initialize(); + this.emit("run"); + }); + } + async element(name, choice, i) { + let { options, state, symbols, timers } = this; + let timer2 = timers && timers[name]; + state.timer = timer2; + let value = options[name] || state[name] || symbols[name]; + let val = choice && choice[name] != null ? choice[name] : await value; + if (val === "") + return val; + let res = await this.resolve(val, state, choice, i); + if (!res && choice && choice[name]) { + return this.resolve(value, state, choice, i); + } + return res; + } + async prefix() { + let element = await this.element("prefix") || this.symbols; + let timer2 = this.timers && this.timers.prefix; + let state = this.state; + state.timer = timer2; + if (utils.isObject(element)) + element = element[state.status] || element.pending; + if (!utils.hasColor(element)) { + let style = this.styles[state.status] || this.styles.pending; + return style(element); + } + return element; + } + async message() { + let message2 = await this.element("message"); + if (!utils.hasColor(message2)) { + return this.styles.strong(message2); + } + return message2; + } + async separator() { + let element = await this.element("separator") || this.symbols; + let timer2 = this.timers && this.timers.separator; + let state = this.state; + state.timer = timer2; + let value = element[state.status] || element.pending || state.separator; + let ele = await this.resolve(value, state); + if (utils.isObject(ele)) + ele = ele[state.status] || ele.pending; + if (!utils.hasColor(ele)) { + return this.styles.muted(ele); + } + return ele; + } + async pointer(choice, i) { + let val = await this.element("pointer", choice, i); + if (typeof val === "string" && utils.hasColor(val)) { + return val; + } + if (val) { + let styles = this.styles; + let focused = this.index === i; + let style = focused ? styles.primary : (val2) => val2; + let ele = await this.resolve(val[focused ? "on" : "off"] || val, this.state); + let styled = !utils.hasColor(ele) ? style(ele) : ele; + return focused ? styled : " ".repeat(ele.length); + } + } + async indicator(choice, i) { + let val = await this.element("indicator", choice, i); + if (typeof val === "string" && utils.hasColor(val)) { + return val; + } + if (val) { + let styles = this.styles; + let enabled = choice.enabled === true; + let style = enabled ? styles.success : styles.dark; + let ele = val[enabled ? "on" : "off"] || val; + return !utils.hasColor(ele) ? style(ele) : ele; + } + return ""; + } + body() { + return null; + } + footer() { + if (this.state.status === "pending") { + return this.element("footer"); + } + } + header() { + if (this.state.status === "pending") { + return this.element("header"); + } + } + async hint() { + if (this.state.status === "pending" && !this.isValue(this.state.input)) { + let hint = await this.element("hint"); + if (!utils.hasColor(hint)) { + return this.styles.muted(hint); + } + return hint; + } + } + error(err) { + return !this.state.submitted ? err || this.state.error : ""; + } + format(value) { + return value; + } + result(value) { + return value; + } + validate(value) { + if (this.options.required === true) { + return this.isValue(value); + } + return true; + } + isValue(value) { + return value != null && value !== ""; + } + resolve(value, ...args2) { + return utils.resolve(this, value, ...args2); + } + get base() { + return Prompt.prototype; + } + get style() { + return this.styles[this.state.status]; + } + get height() { + return this.options.rows || utils.height(this.stdout, 25); + } + get width() { + return this.options.columns || utils.width(this.stdout, 80); + } + get size() { + return { width: this.width, height: this.height }; + } + set cursor(value) { + this.state.cursor = value; + } + get cursor() { + return this.state.cursor; + } + set input(value) { + this.state.input = value; + } + get input() { + return this.state.input; + } + set value(value) { + this.state.value = value; + } + get value() { + let { input, value } = this.state; + let result = [value, input].find(this.isValue.bind(this)); + return this.isValue(result) ? result : this.initial; + } + static get prompt() { + return (options) => new this(options).run(); + } + }; + function setOptions(prompt) { + let isValidKey = (key) => { + return prompt[key] === void 0 || typeof prompt[key] === "function"; + }; + let ignore = [ + "actions", + "choices", + "initial", + "margin", + "roles", + "styles", + "symbols", + "theme", + "timers", + "value" + ]; + let ignoreFn = [ + "body", + "footer", + "error", + "header", + "hint", + "indicator", + "message", + "prefix", + "separator", + "skip" + ]; + for (let key of Object.keys(prompt.options)) { + if (ignore.includes(key)) + continue; + if (/^on[A-Z]/.test(key)) + continue; + let option = prompt.options[key]; + if (typeof option === "function" && isValidKey(key)) { + if (!ignoreFn.includes(key)) { + prompt[key] = option.bind(prompt); + } + } else if (typeof prompt[key] !== "function") { + prompt[key] = option; + } + } + } + function margin(value) { + if (typeof value === "number") { + value = [value, value, value, value]; + } + let arr = [].concat(value || []); + let pad = (i) => i % 2 === 0 ? "\n" : " "; + let res = []; + for (let i = 0; i < 4; i++) { + let char = pad(i); + if (arr[i]) { + res.push(char.repeat(arr[i])); + } else { + res.push(""); + } + } + return res; + } + module2.exports = Prompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/roles.js +var require_roles = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/roles.js"(exports2, module2) { + "use strict"; + var utils = require_utils(); + var roles = { + default(prompt, choice) { + return choice; + }, + checkbox(prompt, choice) { + throw new Error("checkbox role is not implemented yet"); + }, + editable(prompt, choice) { + throw new Error("editable role is not implemented yet"); + }, + expandable(prompt, choice) { + throw new Error("expandable role is not implemented yet"); + }, + heading(prompt, choice) { + choice.disabled = ""; + choice.indicator = [choice.indicator, " "].find((v) => v != null); + choice.message = choice.message || ""; + return choice; + }, + input(prompt, choice) { + throw new Error("input role is not implemented yet"); + }, + option(prompt, choice) { + return roles.default(prompt, choice); + }, + radio(prompt, choice) { + throw new Error("radio role is not implemented yet"); + }, + separator(prompt, choice) { + choice.disabled = ""; + choice.indicator = [choice.indicator, " "].find((v) => v != null); + choice.message = choice.message || prompt.symbols.line.repeat(5); + return choice; + }, + spacer(prompt, choice) { + return choice; + } + }; + module2.exports = (name, options = {}) => { + let role = utils.merge({}, roles, options.roles); + return role[name] || role.default; + }; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/array.js +var require_array = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/array.js"(exports2, module2) { + "use strict"; + var colors = require_ansi_colors(); + var Prompt = require_prompt(); + var roles = require_roles(); + var utils = require_utils(); + var { reorder, scrollUp, scrollDown, isObject, swap } = utils; + var ArrayPrompt = class extends Prompt { + constructor(options) { + super(options); + this.cursorHide(); + this.maxSelected = options.maxSelected || Infinity; + this.multiple = options.multiple || false; + this.initial = options.initial || 0; + this.delay = options.delay || 0; + this.longest = 0; + this.num = ""; + } + async initialize() { + if (typeof this.options.initial === "function") { + this.initial = await this.options.initial.call(this); + } + await this.reset(true); + await super.initialize(); + } + async reset() { + let { choices, initial, autofocus, suggest } = this.options; + this.state._choices = []; + this.state.choices = []; + this.choices = await Promise.all(await this.toChoices(choices)); + this.choices.forEach((ch) => ch.enabled = false); + if (typeof suggest !== "function" && this.selectable.length === 0) { + throw new Error("At least one choice must be selectable"); + } + if (isObject(initial)) + initial = Object.keys(initial); + if (Array.isArray(initial)) { + if (autofocus != null) + this.index = this.findIndex(autofocus); + initial.forEach((v) => this.enable(this.find(v))); + await this.render(); + } else { + if (autofocus != null) + initial = autofocus; + if (typeof initial === "string") + initial = this.findIndex(initial); + if (typeof initial === "number" && initial > -1) { + this.index = Math.max(0, Math.min(initial, this.choices.length)); + this.enable(this.find(this.index)); + } + } + if (this.isDisabled(this.focused)) { + await this.down(); + } + } + async toChoices(value, parent) { + this.state.loadingChoices = true; + let choices = []; + let index = 0; + let toChoices = async (items, parent2) => { + if (typeof items === "function") + items = await items.call(this); + if (items instanceof Promise) + items = await items; + for (let i = 0; i < items.length; i++) { + let choice = items[i] = await this.toChoice(items[i], index++, parent2); + choices.push(choice); + if (choice.choices) { + await toChoices(choice.choices, choice); + } + } + return choices; + }; + return toChoices(value, parent).then((choices2) => { + this.state.loadingChoices = false; + return choices2; + }); + } + async toChoice(ele, i, parent) { + if (typeof ele === "function") + ele = await ele.call(this, this); + if (ele instanceof Promise) + ele = await ele; + if (typeof ele === "string") + ele = { name: ele }; + if (ele.normalized) + return ele; + ele.normalized = true; + let origVal = ele.value; + let role = roles(ele.role, this.options); + ele = role(this, ele); + if (typeof ele.disabled === "string" && !ele.hint) { + ele.hint = ele.disabled; + ele.disabled = true; + } + if (ele.disabled === true && ele.hint == null) { + ele.hint = "(disabled)"; + } + if (ele.index != null) + return ele; + ele.name = ele.name || ele.key || ele.title || ele.value || ele.message; + ele.message = ele.message || ele.name || ""; + ele.value = [ele.value, ele.name].find(this.isValue.bind(this)); + ele.input = ""; + ele.index = i; + ele.cursor = 0; + utils.define(ele, "parent", parent); + ele.level = parent ? parent.level + 1 : 1; + if (ele.indent == null) { + ele.indent = parent ? parent.indent + " " : ele.indent || ""; + } + ele.path = parent ? parent.path + "." + ele.name : ele.name; + ele.enabled = !!(this.multiple && !this.isDisabled(ele) && (ele.enabled || this.isSelected(ele))); + if (!this.isDisabled(ele)) { + this.longest = Math.max(this.longest, colors.unstyle(ele.message).length); + } + let choice = { ...ele }; + ele.reset = (input = choice.input, value = choice.value) => { + for (let key of Object.keys(choice)) + ele[key] = choice[key]; + ele.input = input; + ele.value = value; + }; + if (origVal == null && typeof ele.initial === "function") { + ele.input = await ele.initial.call(this, this.state, ele, i); + } + return ele; + } + async onChoice(choice, i) { + this.emit("choice", choice, i, this); + if (typeof choice.onChoice === "function") { + await choice.onChoice.call(this, this.state, choice, i); + } + } + async addChoice(ele, i, parent) { + let choice = await this.toChoice(ele, i, parent); + this.choices.push(choice); + this.index = this.choices.length - 1; + this.limit = this.choices.length; + return choice; + } + async newItem(item, i, parent) { + let ele = { name: "New choice name?", editable: true, newChoice: true, ...item }; + let choice = await this.addChoice(ele, i, parent); + choice.updateChoice = () => { + delete choice.newChoice; + choice.name = choice.message = choice.input; + choice.input = ""; + choice.cursor = 0; + }; + return this.render(); + } + indent(choice) { + if (choice.indent == null) { + return choice.level > 1 ? " ".repeat(choice.level - 1) : ""; + } + return choice.indent; + } + dispatch(s, key) { + if (this.multiple && this[key.name]) + return this[key.name](); + this.alert(); + } + focus(choice, enabled) { + if (typeof enabled !== "boolean") + enabled = choice.enabled; + if (enabled && !choice.enabled && this.selected.length >= this.maxSelected) { + return this.alert(); + } + this.index = choice.index; + choice.enabled = enabled && !this.isDisabled(choice); + return choice; + } + space() { + if (!this.multiple) + return this.alert(); + this.toggle(this.focused); + return this.render(); + } + a() { + if (this.maxSelected < this.choices.length) + return this.alert(); + let enabled = this.selectable.every((ch) => ch.enabled); + this.choices.forEach((ch) => ch.enabled = !enabled); + return this.render(); + } + i() { + if (this.choices.length - this.selected.length > this.maxSelected) { + return this.alert(); + } + this.choices.forEach((ch) => ch.enabled = !ch.enabled); + return this.render(); + } + g(choice = this.focused) { + if (!this.choices.some((ch) => !!ch.parent)) + return this.a(); + this.toggle(choice.parent && !choice.choices ? choice.parent : choice); + return this.render(); + } + toggle(choice, enabled) { + if (!choice.enabled && this.selected.length >= this.maxSelected) { + return this.alert(); + } + if (typeof enabled !== "boolean") + enabled = !choice.enabled; + choice.enabled = enabled; + if (choice.choices) { + choice.choices.forEach((ch) => this.toggle(ch, enabled)); + } + let parent = choice.parent; + while (parent) { + let choices = parent.choices.filter((ch) => this.isDisabled(ch)); + parent.enabled = choices.every((ch) => ch.enabled === true); + parent = parent.parent; + } + reset(this, this.choices); + this.emit("toggle", choice, this); + return choice; + } + enable(choice) { + if (this.selected.length >= this.maxSelected) + return this.alert(); + choice.enabled = !this.isDisabled(choice); + choice.choices && choice.choices.forEach(this.enable.bind(this)); + return choice; + } + disable(choice) { + choice.enabled = false; + choice.choices && choice.choices.forEach(this.disable.bind(this)); + return choice; + } + number(n) { + this.num += n; + let number = (num) => { + let i = Number(num); + if (i > this.choices.length - 1) + return this.alert(); + let focused = this.focused; + let choice = this.choices.find((ch) => i === ch.index); + if (!choice.enabled && this.selected.length >= this.maxSelected) { + return this.alert(); + } + if (this.visible.indexOf(choice) === -1) { + let choices = reorder(this.choices); + let actualIdx = choices.indexOf(choice); + if (focused.index > actualIdx) { + let start = choices.slice(actualIdx, actualIdx + this.limit); + let end = choices.filter((ch) => !start.includes(ch)); + this.choices = start.concat(end); + } else { + let pos = actualIdx - this.limit + 1; + this.choices = choices.slice(pos).concat(choices.slice(0, pos)); + } + } + this.index = this.choices.indexOf(choice); + this.toggle(this.focused); + return this.render(); + }; + clearTimeout(this.numberTimeout); + return new Promise((resolve) => { + let len = this.choices.length; + let num = this.num; + let handle = (val = false, res) => { + clearTimeout(this.numberTimeout); + if (val) + res = number(num); + this.num = ""; + resolve(res); + }; + if (num === "0" || num.length === 1 && Number(num + "0") > len) { + return handle(true); + } + if (Number(num) > len) { + return handle(false, this.alert()); + } + this.numberTimeout = setTimeout(() => handle(true), this.delay); + }); + } + home() { + this.choices = reorder(this.choices); + this.index = 0; + return this.render(); + } + end() { + let pos = this.choices.length - this.limit; + let choices = reorder(this.choices); + this.choices = choices.slice(pos).concat(choices.slice(0, pos)); + this.index = this.limit - 1; + return this.render(); + } + first() { + this.index = 0; + return this.render(); + } + last() { + this.index = this.visible.length - 1; + return this.render(); + } + prev() { + if (this.visible.length <= 1) + return this.alert(); + return this.up(); + } + next() { + if (this.visible.length <= 1) + return this.alert(); + return this.down(); + } + right() { + if (this.cursor >= this.input.length) + return this.alert(); + this.cursor++; + return this.render(); + } + left() { + if (this.cursor <= 0) + return this.alert(); + this.cursor--; + return this.render(); + } + up() { + let len = this.choices.length; + let vis = this.visible.length; + let idx = this.index; + if (this.options.scroll === false && idx === 0) { + return this.alert(); + } + if (len > vis && idx === 0) { + return this.scrollUp(); + } + this.index = (idx - 1 % len + len) % len; + if (this.isDisabled()) { + return this.up(); + } + return this.render(); + } + down() { + let len = this.choices.length; + let vis = this.visible.length; + let idx = this.index; + if (this.options.scroll === false && idx === vis - 1) { + return this.alert(); + } + if (len > vis && idx === vis - 1) { + return this.scrollDown(); + } + this.index = (idx + 1) % len; + if (this.isDisabled()) { + return this.down(); + } + return this.render(); + } + scrollUp(i = 0) { + this.choices = scrollUp(this.choices); + this.index = i; + if (this.isDisabled()) { + return this.up(); + } + return this.render(); + } + scrollDown(i = this.visible.length - 1) { + this.choices = scrollDown(this.choices); + this.index = i; + if (this.isDisabled()) { + return this.down(); + } + return this.render(); + } + async shiftUp() { + if (this.options.sort === true) { + this.sorting = true; + this.swap(this.index - 1); + await this.up(); + this.sorting = false; + return; + } + return this.scrollUp(this.index); + } + async shiftDown() { + if (this.options.sort === true) { + this.sorting = true; + this.swap(this.index + 1); + await this.down(); + this.sorting = false; + return; + } + return this.scrollDown(this.index); + } + pageUp() { + if (this.visible.length <= 1) + return this.alert(); + this.limit = Math.max(this.limit - 1, 0); + this.index = Math.min(this.limit - 1, this.index); + this._limit = this.limit; + if (this.isDisabled()) { + return this.up(); + } + return this.render(); + } + pageDown() { + if (this.visible.length >= this.choices.length) + return this.alert(); + this.index = Math.max(0, this.index); + this.limit = Math.min(this.limit + 1, this.choices.length); + this._limit = this.limit; + if (this.isDisabled()) { + return this.down(); + } + return this.render(); + } + swap(pos) { + swap(this.choices, this.index, pos); + } + isDisabled(choice = this.focused) { + let keys = ["disabled", "collapsed", "hidden", "completing", "readonly"]; + if (choice && keys.some((key) => choice[key] === true)) { + return true; + } + return choice && choice.role === "heading"; + } + isEnabled(choice = this.focused) { + if (Array.isArray(choice)) + return choice.every((ch) => this.isEnabled(ch)); + if (choice.choices) { + let choices = choice.choices.filter((ch) => !this.isDisabled(ch)); + return choice.enabled && choices.every((ch) => this.isEnabled(ch)); + } + return choice.enabled && !this.isDisabled(choice); + } + isChoice(choice, value) { + return choice.name === value || choice.index === Number(value); + } + isSelected(choice) { + if (Array.isArray(this.initial)) { + return this.initial.some((value) => this.isChoice(choice, value)); + } + return this.isChoice(choice, this.initial); + } + map(names = [], prop = "value") { + return [].concat(names || []).reduce((acc, name) => { + acc[name] = this.find(name, prop); + return acc; + }, {}); + } + filter(value, prop) { + let isChoice = (ele, i) => [ele.name, i].includes(value); + let fn2 = typeof value === "function" ? value : isChoice; + let choices = this.options.multiple ? this.state._choices : this.choices; + let result = choices.filter(fn2); + if (prop) { + return result.map((ch) => ch[prop]); + } + return result; + } + find(value, prop) { + if (isObject(value)) + return prop ? value[prop] : value; + let isChoice = (ele, i) => [ele.name, i].includes(value); + let fn2 = typeof value === "function" ? value : isChoice; + let choice = this.choices.find(fn2); + if (choice) { + return prop ? choice[prop] : choice; + } + } + findIndex(value) { + return this.choices.indexOf(this.find(value)); + } + async submit() { + let choice = this.focused; + if (!choice) + return this.alert(); + if (choice.newChoice) { + if (!choice.input) + return this.alert(); + choice.updateChoice(); + return this.render(); + } + if (this.choices.some((ch) => ch.newChoice)) { + return this.alert(); + } + let { reorder: reorder2, sort } = this.options; + let multi = this.multiple === true; + let value = this.selected; + if (value === void 0) { + return this.alert(); + } + if (Array.isArray(value) && reorder2 !== false && sort !== true) { + value = utils.reorder(value); + } + this.value = multi ? value.map((ch) => ch.name) : value.name; + return super.submit(); + } + set choices(choices = []) { + this.state._choices = this.state._choices || []; + this.state.choices = choices; + for (let choice of choices) { + if (!this.state._choices.some((ch) => ch.name === choice.name)) { + this.state._choices.push(choice); + } + } + if (!this._initial && this.options.initial) { + this._initial = true; + let init = this.initial; + if (typeof init === "string" || typeof init === "number") { + let choice = this.find(init); + if (choice) { + this.initial = choice.index; + this.focus(choice, true); + } + } + } + } + get choices() { + return reset(this, this.state.choices || []); + } + set visible(visible) { + this.state.visible = visible; + } + get visible() { + return (this.state.visible || this.choices).slice(0, this.limit); + } + set limit(num) { + this.state.limit = num; + } + get limit() { + let { state, options, choices } = this; + let limit = state.limit || this._limit || options.limit || choices.length; + return Math.min(limit, this.height); + } + set value(value) { + super.value = value; + } + get value() { + if (typeof super.value !== "string" && super.value === this.initial) { + return this.input; + } + return super.value; + } + set index(i) { + this.state.index = i; + } + get index() { + return Math.max(0, this.state ? this.state.index : 0); + } + get enabled() { + return this.filter(this.isEnabled.bind(this)); + } + get focused() { + let choice = this.choices[this.index]; + if (choice && this.state.submitted && this.multiple !== true) { + choice.enabled = true; + } + return choice; + } + get selectable() { + return this.choices.filter((choice) => !this.isDisabled(choice)); + } + get selected() { + return this.multiple ? this.enabled : this.focused; + } + }; + function reset(prompt, choices) { + if (choices instanceof Promise) + return choices; + if (typeof choices === "function") { + if (utils.isAsyncFn(choices)) + return choices; + choices = choices.call(prompt, prompt); + } + for (let choice of choices) { + if (Array.isArray(choice.choices)) { + let items = choice.choices.filter((ch) => !prompt.isDisabled(ch)); + choice.enabled = items.every((ch) => ch.enabled === true); + } + if (prompt.isDisabled(choice) === true) { + delete choice.enabled; + } + } + return choices; + } + module2.exports = ArrayPrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/select.js +var require_select = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/select.js"(exports2, module2) { + "use strict"; + var ArrayPrompt = require_array(); + var utils = require_utils(); + var SelectPrompt = class extends ArrayPrompt { + constructor(options) { + super(options); + this.emptyError = this.options.emptyError || "No items were selected"; + } + async dispatch(s, key) { + if (this.multiple) { + return this[key.name] ? await this[key.name](s, key) : await super.dispatch(s, key); + } + this.alert(); + } + separator() { + if (this.options.separator) + return super.separator(); + let sep = this.styles.muted(this.symbols.ellipsis); + return this.state.submitted ? super.separator() : sep; + } + pointer(choice, i) { + return !this.multiple || this.options.pointer ? super.pointer(choice, i) : ""; + } + indicator(choice, i) { + return this.multiple ? super.indicator(choice, i) : ""; + } + choiceMessage(choice, i) { + let message2 = this.resolve(choice.message, this.state, choice, i); + if (choice.role === "heading" && !utils.hasColor(message2)) { + message2 = this.styles.strong(message2); + } + return this.resolve(message2, this.state, choice, i); + } + choiceSeparator() { + return ":"; + } + async renderChoice(choice, i) { + await this.onChoice(choice, i); + let focused = this.index === i; + let pointer = await this.pointer(choice, i); + let check = await this.indicator(choice, i) + (choice.pad || ""); + let hint = await this.resolve(choice.hint, this.state, choice, i); + if (hint && !utils.hasColor(hint)) { + hint = this.styles.muted(hint); + } + let ind = this.indent(choice); + let msg = await this.choiceMessage(choice, i); + let line = () => [this.margin[3], ind + pointer + check, msg, this.margin[1], hint].filter(Boolean).join(" "); + if (choice.role === "heading") { + return line(); + } + if (choice.disabled) { + if (!utils.hasColor(msg)) { + msg = this.styles.disabled(msg); + } + return line(); + } + if (focused) { + msg = this.styles.em(msg); + } + return line(); + } + async renderChoices() { + if (this.state.loading === "choices") { + return this.styles.warning("Loading choices"); + } + if (this.state.submitted) + return ""; + let choices = this.visible.map(async (ch, i) => await this.renderChoice(ch, i)); + let visible = await Promise.all(choices); + if (!visible.length) + visible.push(this.styles.danger("No matching choices")); + let result = this.margin[0] + visible.join("\n"); + let header; + if (this.options.choicesHeader) { + header = await this.resolve(this.options.choicesHeader, this.state); + } + return [header, result].filter(Boolean).join("\n"); + } + format() { + if (!this.state.submitted || this.state.cancelled) + return ""; + if (Array.isArray(this.selected)) { + return this.selected.map((choice) => this.styles.primary(choice.name)).join(", "); + } + return this.styles.primary(this.selected.name); + } + async render() { + let { submitted, size } = this.state; + let prompt = ""; + let header = await this.header(); + let prefix = await this.prefix(); + let separator = await this.separator(); + let message2 = await this.message(); + if (this.options.promptLine !== false) { + prompt = [prefix, message2, separator, ""].join(" "); + this.state.prompt = prompt; + } + let output = await this.format(); + let help = await this.error() || await this.hint(); + let body = await this.renderChoices(); + let footer = await this.footer(); + if (output) + prompt += output; + if (help && !prompt.includes(help)) + prompt += " " + help; + if (submitted && !output && !body.trim() && this.multiple && this.emptyError != null) { + prompt += this.styles.danger(this.emptyError); + } + this.clear(size); + this.write([header, prompt, body, footer].filter(Boolean).join("\n")); + this.write(this.margin[2]); + this.restore(); + } + }; + module2.exports = SelectPrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/autocomplete.js +var require_autocomplete = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/autocomplete.js"(exports2, module2) { + "use strict"; + var Select = require_select(); + var highlight = (input, color) => { + let val = input.toLowerCase(); + return (str) => { + let s = str.toLowerCase(); + let i = s.indexOf(val); + let colored = color(str.slice(i, i + val.length)); + return i >= 0 ? str.slice(0, i) + colored + str.slice(i + val.length) : str; + }; + }; + var AutoComplete = class extends Select { + constructor(options) { + super(options); + this.cursorShow(); + } + moveCursor(n) { + this.state.cursor += n; + } + dispatch(ch) { + return this.append(ch); + } + space(ch) { + return this.options.multiple ? super.space(ch) : this.append(ch); + } + append(ch) { + let { cursor, input } = this.state; + this.input = input.slice(0, cursor) + ch + input.slice(cursor); + this.moveCursor(1); + return this.complete(); + } + delete() { + let { cursor, input } = this.state; + if (!input) + return this.alert(); + this.input = input.slice(0, cursor - 1) + input.slice(cursor); + this.moveCursor(-1); + return this.complete(); + } + deleteForward() { + let { cursor, input } = this.state; + if (input[cursor] === void 0) + return this.alert(); + this.input = `${input}`.slice(0, cursor) + `${input}`.slice(cursor + 1); + return this.complete(); + } + number(ch) { + return this.append(ch); + } + async complete() { + this.completing = true; + this.choices = await this.suggest(this.input, this.state._choices); + this.state.limit = void 0; + this.index = Math.min(Math.max(this.visible.length - 1, 0), this.index); + await this.render(); + this.completing = false; + } + suggest(input = this.input, choices = this.state._choices) { + if (typeof this.options.suggest === "function") { + return this.options.suggest.call(this, input, choices); + } + let str = input.toLowerCase(); + return choices.filter((ch) => ch.message.toLowerCase().includes(str)); + } + pointer() { + return ""; + } + format() { + if (!this.focused) + return this.input; + if (this.options.multiple && this.state.submitted) { + return this.selected.map((ch) => this.styles.primary(ch.message)).join(", "); + } + if (this.state.submitted) { + let value = this.value = this.input = this.focused.value; + return this.styles.primary(value); + } + return this.input; + } + async render() { + if (this.state.status !== "pending") + return super.render(); + let style = this.options.highlight ? this.options.highlight.bind(this) : this.styles.placeholder; + let color = highlight(this.input, style); + let choices = this.choices; + this.choices = choices.map((ch) => ({ ...ch, message: color(ch.message) })); + await super.render(); + this.choices = choices; + } + submit() { + if (this.options.multiple) { + this.value = this.selected.map((ch) => ch.name); + } + return super.submit(); + } + }; + module2.exports = AutoComplete; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/placeholder.js +var require_placeholder = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/placeholder.js"(exports2, module2) { + "use strict"; + var utils = require_utils(); + module2.exports = (prompt, options = {}) => { + prompt.cursorHide(); + let { input = "", initial = "", pos, showCursor = true, color } = options; + let style = color || prompt.styles.placeholder; + let inverse = utils.inverse(prompt.styles.primary); + let blinker = (str) => inverse(prompt.styles.black(str)); + let output = input; + let char = " "; + let reverse = blinker(char); + if (prompt.blink && prompt.blink.off === true) { + blinker = (str) => str; + reverse = ""; + } + if (showCursor && pos === 0 && initial === "" && input === "") { + return blinker(char); + } + if (showCursor && pos === 0 && (input === initial || input === "")) { + return blinker(initial[0]) + style(initial.slice(1)); + } + initial = utils.isPrimitive(initial) ? `${initial}` : ""; + input = utils.isPrimitive(input) ? `${input}` : ""; + let placeholder = initial && initial.startsWith(input) && initial !== input; + let cursor = placeholder ? blinker(initial[input.length]) : reverse; + if (pos !== input.length && showCursor === true) { + output = input.slice(0, pos) + blinker(input[pos]) + input.slice(pos + 1); + cursor = ""; + } + if (showCursor === false) { + cursor = ""; + } + if (placeholder) { + let raw = prompt.styles.unstyle(output + cursor); + return output + cursor + style(initial.slice(raw.length)); + } + return output + cursor; + }; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/form.js +var require_form = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/form.js"(exports2, module2) { + "use strict"; + var colors = require_ansi_colors(); + var SelectPrompt = require_select(); + var placeholder = require_placeholder(); + var FormPrompt = class extends SelectPrompt { + constructor(options) { + super({ ...options, multiple: true }); + this.type = "form"; + this.initial = this.options.initial; + this.align = [this.options.align, "right"].find((v) => v != null); + this.emptyError = ""; + this.values = {}; + } + async reset(first) { + await super.reset(); + if (first === true) + this._index = this.index; + this.index = this._index; + this.values = {}; + this.choices.forEach((choice) => choice.reset && choice.reset()); + return this.render(); + } + dispatch(char) { + return !!char && this.append(char); + } + append(char) { + let choice = this.focused; + if (!choice) + return this.alert(); + let { cursor, input } = choice; + choice.value = choice.input = input.slice(0, cursor) + char + input.slice(cursor); + choice.cursor++; + return this.render(); + } + delete() { + let choice = this.focused; + if (!choice || choice.cursor <= 0) + return this.alert(); + let { cursor, input } = choice; + choice.value = choice.input = input.slice(0, cursor - 1) + input.slice(cursor); + choice.cursor--; + return this.render(); + } + deleteForward() { + let choice = this.focused; + if (!choice) + return this.alert(); + let { cursor, input } = choice; + if (input[cursor] === void 0) + return this.alert(); + let str = `${input}`.slice(0, cursor) + `${input}`.slice(cursor + 1); + choice.value = choice.input = str; + return this.render(); + } + right() { + let choice = this.focused; + if (!choice) + return this.alert(); + if (choice.cursor >= choice.input.length) + return this.alert(); + choice.cursor++; + return this.render(); + } + left() { + let choice = this.focused; + if (!choice) + return this.alert(); + if (choice.cursor <= 0) + return this.alert(); + choice.cursor--; + return this.render(); + } + space(ch, key) { + return this.dispatch(ch, key); + } + number(ch, key) { + return this.dispatch(ch, key); + } + next() { + let ch = this.focused; + if (!ch) + return this.alert(); + let { initial, input } = ch; + if (initial && initial.startsWith(input) && input !== initial) { + ch.value = ch.input = initial; + ch.cursor = ch.value.length; + return this.render(); + } + return super.next(); + } + prev() { + let ch = this.focused; + if (!ch) + return this.alert(); + if (ch.cursor === 0) + return super.prev(); + ch.value = ch.input = ""; + ch.cursor = 0; + return this.render(); + } + separator() { + return ""; + } + format(value) { + return !this.state.submitted ? super.format(value) : ""; + } + pointer() { + return ""; + } + indicator(choice) { + return choice.input ? "\u29BF" : "\u2299"; + } + async choiceSeparator(choice, i) { + let sep = await this.resolve(choice.separator, this.state, choice, i) || ":"; + return sep ? " " + this.styles.disabled(sep) : ""; + } + async renderChoice(choice, i) { + await this.onChoice(choice, i); + let { state, styles } = this; + let { cursor, initial = "", name, hint, input = "" } = choice; + let { muted, submitted, primary, danger } = styles; + let help = hint; + let focused = this.index === i; + let validate = choice.validate || (() => true); + let sep = await this.choiceSeparator(choice, i); + let msg = choice.message; + if (this.align === "right") + msg = msg.padStart(this.longest + 1, " "); + if (this.align === "left") + msg = msg.padEnd(this.longest + 1, " "); + let value = this.values[name] = input || initial; + let color = input ? "success" : "dark"; + if (await validate.call(choice, value, this.state) !== true) { + color = "danger"; + } + let style = styles[color]; + let indicator = style(await this.indicator(choice, i)) + (choice.pad || ""); + let indent = this.indent(choice); + let line = () => [indent, indicator, msg + sep, input, help].filter(Boolean).join(" "); + if (state.submitted) { + msg = colors.unstyle(msg); + input = submitted(input); + help = ""; + return line(); + } + if (choice.format) { + input = await choice.format.call(this, input, choice, i); + } else { + let color2 = this.styles.muted; + let options = { input, initial, pos: cursor, showCursor: focused, color: color2 }; + input = placeholder(this, options); + } + if (!this.isValue(input)) { + input = this.styles.muted(this.symbols.ellipsis); + } + if (choice.result) { + this.values[name] = await choice.result.call(this, value, choice, i); + } + if (focused) { + msg = primary(msg); + } + if (choice.error) { + input += (input ? " " : "") + danger(choice.error.trim()); + } else if (choice.hint) { + input += (input ? " " : "") + muted(choice.hint.trim()); + } + return line(); + } + async submit() { + this.value = this.values; + return super.base.submit.call(this); + } + }; + module2.exports = FormPrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/auth.js +var require_auth = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/auth.js"(exports2, module2) { + "use strict"; + var FormPrompt = require_form(); + var defaultAuthenticate = () => { + throw new Error("expected prompt to have a custom authenticate method"); + }; + var factory = (authenticate = defaultAuthenticate) => { + class AuthPrompt extends FormPrompt { + constructor(options) { + super(options); + } + async submit() { + this.value = await authenticate.call(this, this.values, this.state); + super.base.submit.call(this); + } + static create(authenticate2) { + return factory(authenticate2); + } + } + return AuthPrompt; + }; + module2.exports = factory(); + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/basicauth.js +var require_basicauth = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/basicauth.js"(exports2, module2) { + "use strict"; + var AuthPrompt = require_auth(); + function defaultAuthenticate(value, state) { + if (value.username === this.options.username && value.password === this.options.password) { + return true; + } + return false; + } + var factory = (authenticate = defaultAuthenticate) => { + const choices = [ + { name: "username", message: "username" }, + { + name: "password", + message: "password", + format(input) { + if (this.options.showPassword) { + return input; + } + let color = this.state.submitted ? this.styles.primary : this.styles.muted; + return color(this.symbols.asterisk.repeat(input.length)); + } + } + ]; + class BasicAuthPrompt extends AuthPrompt.create(authenticate) { + constructor(options) { + super({ ...options, choices }); + } + static create(authenticate2) { + return factory(authenticate2); + } + } + return BasicAuthPrompt; + }; + module2.exports = factory(); + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/boolean.js +var require_boolean = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/boolean.js"(exports2, module2) { + "use strict"; + var Prompt = require_prompt(); + var { isPrimitive, hasColor } = require_utils(); + var BooleanPrompt = class extends Prompt { + constructor(options) { + super(options); + this.cursorHide(); + } + async initialize() { + let initial = await this.resolve(this.initial, this.state); + this.input = await this.cast(initial); + await super.initialize(); + } + dispatch(ch) { + if (!this.isValue(ch)) + return this.alert(); + this.input = ch; + return this.submit(); + } + format(value) { + let { styles, state } = this; + return !state.submitted ? styles.primary(value) : styles.success(value); + } + cast(input) { + return this.isTrue(input); + } + isTrue(input) { + return /^[ty1]/i.test(input); + } + isFalse(input) { + return /^[fn0]/i.test(input); + } + isValue(value) { + return isPrimitive(value) && (this.isTrue(value) || this.isFalse(value)); + } + async hint() { + if (this.state.status === "pending") { + let hint = await this.element("hint"); + if (!hasColor(hint)) { + return this.styles.muted(hint); + } + return hint; + } + } + async render() { + let { input, size } = this.state; + let prefix = await this.prefix(); + let sep = await this.separator(); + let msg = await this.message(); + let hint = this.styles.muted(this.default); + let promptLine = [prefix, msg, hint, sep].filter(Boolean).join(" "); + this.state.prompt = promptLine; + let header = await this.header(); + let value = this.value = this.cast(input); + let output = await this.format(value); + let help = await this.error() || await this.hint(); + let footer = await this.footer(); + if (help && !promptLine.includes(help)) + output += " " + help; + promptLine += " " + output; + this.clear(size); + this.write([header, promptLine, footer].filter(Boolean).join("\n")); + this.restore(); + } + set value(value) { + super.value = value; + } + get value() { + return this.cast(super.value); + } + }; + module2.exports = BooleanPrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/confirm.js +var require_confirm = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/confirm.js"(exports2, module2) { + "use strict"; + var BooleanPrompt = require_boolean(); + var ConfirmPrompt = class extends BooleanPrompt { + constructor(options) { + super(options); + this.default = this.options.default || (this.initial ? "(Y/n)" : "(y/N)"); + } + }; + module2.exports = ConfirmPrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/editable.js +var require_editable = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/editable.js"(exports2, module2) { + "use strict"; + var Select = require_select(); + var Form = require_form(); + var form = Form.prototype; + var Editable = class extends Select { + constructor(options) { + super({ ...options, multiple: true }); + this.align = [this.options.align, "left"].find((v) => v != null); + this.emptyError = ""; + this.values = {}; + } + dispatch(char, key) { + let choice = this.focused; + let parent = choice.parent || {}; + if (!choice.editable && !parent.editable) { + if (char === "a" || char === "i") + return super[char](); + } + return form.dispatch.call(this, char, key); + } + append(char, key) { + return form.append.call(this, char, key); + } + delete(char, key) { + return form.delete.call(this, char, key); + } + space(char) { + return this.focused.editable ? this.append(char) : super.space(); + } + number(char) { + return this.focused.editable ? this.append(char) : super.number(char); + } + next() { + return this.focused.editable ? form.next.call(this) : super.next(); + } + prev() { + return this.focused.editable ? form.prev.call(this) : super.prev(); + } + async indicator(choice, i) { + let symbol = choice.indicator || ""; + let value = choice.editable ? symbol : super.indicator(choice, i); + return await this.resolve(value, this.state, choice, i) || ""; + } + indent(choice) { + return choice.role === "heading" ? "" : choice.editable ? " " : " "; + } + async renderChoice(choice, i) { + choice.indent = ""; + if (choice.editable) + return form.renderChoice.call(this, choice, i); + return super.renderChoice(choice, i); + } + error() { + return ""; + } + footer() { + return this.state.error; + } + async validate() { + let result = true; + for (let choice of this.choices) { + if (typeof choice.validate !== "function") { + continue; + } + if (choice.role === "heading") { + continue; + } + let val = choice.parent ? this.value[choice.parent.name] : this.value; + if (choice.editable) { + val = choice.value === choice.name ? choice.initial || "" : choice.value; + } else if (!this.isDisabled(choice)) { + val = choice.enabled === true; + } + result = await choice.validate(val, this.state); + if (result !== true) { + break; + } + } + if (result !== true) { + this.state.error = typeof result === "string" ? result : "Invalid Input"; + } + return result; + } + submit() { + if (this.focused.newChoice === true) + return super.submit(); + if (this.choices.some((ch) => ch.newChoice)) { + return this.alert(); + } + this.value = {}; + for (let choice of this.choices) { + let val = choice.parent ? this.value[choice.parent.name] : this.value; + if (choice.role === "heading") { + this.value[choice.name] = {}; + continue; + } + if (choice.editable) { + val[choice.name] = choice.value === choice.name ? choice.initial || "" : choice.value; + } else if (!this.isDisabled(choice)) { + val[choice.name] = choice.enabled === true; + } + } + return this.base.submit.call(this); + } + }; + module2.exports = Editable; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/string.js +var require_string = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/string.js"(exports2, module2) { + "use strict"; + var Prompt = require_prompt(); + var placeholder = require_placeholder(); + var { isPrimitive } = require_utils(); + var StringPrompt = class extends Prompt { + constructor(options) { + super(options); + this.initial = isPrimitive(this.initial) ? String(this.initial) : ""; + if (this.initial) + this.cursorHide(); + this.state.prevCursor = 0; + this.state.clipboard = []; + } + async keypress(input, key = {}) { + let prev = this.state.prevKeypress; + this.state.prevKeypress = key; + if (this.options.multiline === true && key.name === "return") { + if (!prev || prev.name !== "return") { + return this.append("\n", key); + } + } + return super.keypress(input, key); + } + moveCursor(n) { + this.cursor += n; + } + reset() { + this.input = this.value = ""; + this.cursor = 0; + return this.render(); + } + dispatch(ch, key) { + if (!ch || key.ctrl || key.code) + return this.alert(); + this.append(ch); + } + append(ch) { + let { cursor, input } = this.state; + this.input = `${input}`.slice(0, cursor) + ch + `${input}`.slice(cursor); + this.moveCursor(String(ch).length); + this.render(); + } + insert(str) { + this.append(str); + } + delete() { + let { cursor, input } = this.state; + if (cursor <= 0) + return this.alert(); + this.input = `${input}`.slice(0, cursor - 1) + `${input}`.slice(cursor); + this.moveCursor(-1); + this.render(); + } + deleteForward() { + let { cursor, input } = this.state; + if (input[cursor] === void 0) + return this.alert(); + this.input = `${input}`.slice(0, cursor) + `${input}`.slice(cursor + 1); + this.render(); + } + cutForward() { + let pos = this.cursor; + if (this.input.length <= pos) + return this.alert(); + this.state.clipboard.push(this.input.slice(pos)); + this.input = this.input.slice(0, pos); + this.render(); + } + cutLeft() { + let pos = this.cursor; + if (pos === 0) + return this.alert(); + let before = this.input.slice(0, pos); + let after = this.input.slice(pos); + let words = before.split(" "); + this.state.clipboard.push(words.pop()); + this.input = words.join(" "); + this.cursor = this.input.length; + this.input += after; + this.render(); + } + paste() { + if (!this.state.clipboard.length) + return this.alert(); + this.insert(this.state.clipboard.pop()); + this.render(); + } + toggleCursor() { + if (this.state.prevCursor) { + this.cursor = this.state.prevCursor; + this.state.prevCursor = 0; + } else { + this.state.prevCursor = this.cursor; + this.cursor = 0; + } + this.render(); + } + first() { + this.cursor = 0; + this.render(); + } + last() { + this.cursor = this.input.length - 1; + this.render(); + } + next() { + let init = this.initial != null ? String(this.initial) : ""; + if (!init || !init.startsWith(this.input)) + return this.alert(); + this.input = this.initial; + this.cursor = this.initial.length; + this.render(); + } + prev() { + if (!this.input) + return this.alert(); + this.reset(); + } + backward() { + return this.left(); + } + forward() { + return this.right(); + } + right() { + if (this.cursor >= this.input.length) + return this.alert(); + this.moveCursor(1); + return this.render(); + } + left() { + if (this.cursor <= 0) + return this.alert(); + this.moveCursor(-1); + return this.render(); + } + isValue(value) { + return !!value; + } + async format(input = this.value) { + let initial = await this.resolve(this.initial, this.state); + if (!this.state.submitted) { + return placeholder(this, { input, initial, pos: this.cursor }); + } + return this.styles.submitted(input || initial); + } + async render() { + let size = this.state.size; + let prefix = await this.prefix(); + let separator = await this.separator(); + let message2 = await this.message(); + let prompt = [prefix, message2, separator].filter(Boolean).join(" "); + this.state.prompt = prompt; + let header = await this.header(); + let output = await this.format(); + let help = await this.error() || await this.hint(); + let footer = await this.footer(); + if (help && !output.includes(help)) + output += " " + help; + prompt += " " + output; + this.clear(size); + this.write([header, prompt, footer].filter(Boolean).join("\n")); + this.restore(); + } + }; + module2.exports = StringPrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/completer.js +var require_completer = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/completer.js"(exports2, module2) { + "use strict"; + var unique = (arr) => arr.filter((v, i) => arr.lastIndexOf(v) === i); + var compact = (arr) => unique(arr).filter(Boolean); + module2.exports = (action, data = {}, value = "") => { + let { past = [], present = "" } = data; + let rest, prev; + switch (action) { + case "prev": + case "undo": + rest = past.slice(0, past.length - 1); + prev = past[past.length - 1] || ""; + return { + past: compact([value, ...rest]), + present: prev + }; + case "next": + case "redo": + rest = past.slice(1); + prev = past[0] || ""; + return { + past: compact([...rest, value]), + present: prev + }; + case "save": + return { + past: compact([...past, value]), + present: "" + }; + case "remove": + prev = compact(past.filter((v) => v !== value)); + present = ""; + if (prev.length) { + present = prev.pop(); + } + return { + past: prev, + present + }; + default: { + throw new Error(`Invalid action: "${action}"`); + } + } + }; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/input.js +var require_input = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/input.js"(exports2, module2) { + "use strict"; + var Prompt = require_string(); + var completer = require_completer(); + var Input = class extends Prompt { + constructor(options) { + super(options); + let history = this.options.history; + if (history && history.store) { + let initial = history.values || this.initial; + this.autosave = !!history.autosave; + this.store = history.store; + this.data = this.store.get("values") || { past: [], present: initial }; + this.initial = this.data.present || this.data.past[this.data.past.length - 1]; + } + } + completion(action) { + if (!this.store) + return this.alert(); + this.data = completer(action, this.data, this.input); + if (!this.data.present) + return this.alert(); + this.input = this.data.present; + this.cursor = this.input.length; + return this.render(); + } + altUp() { + return this.completion("prev"); + } + altDown() { + return this.completion("next"); + } + prev() { + this.save(); + return super.prev(); + } + save() { + if (!this.store) + return; + this.data = completer("save", this.data, this.input); + this.store.set("values", this.data); + } + submit() { + if (this.store && this.autosave === true) { + this.save(); + } + return super.submit(); + } + }; + module2.exports = Input; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/invisible.js +var require_invisible = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/invisible.js"(exports2, module2) { + "use strict"; + var StringPrompt = require_string(); + var InvisiblePrompt = class extends StringPrompt { + format() { + return ""; + } + }; + module2.exports = InvisiblePrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/list.js +var require_list = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/list.js"(exports2, module2) { + "use strict"; + var StringPrompt = require_string(); + var ListPrompt = class extends StringPrompt { + constructor(options = {}) { + super(options); + this.sep = this.options.separator || /, */; + this.initial = options.initial || ""; + } + split(input = this.value) { + return input ? String(input).split(this.sep) : []; + } + format() { + let style = this.state.submitted ? this.styles.primary : (val) => val; + return this.list.map(style).join(", "); + } + async submit(value) { + let result = this.state.error || await this.validate(this.list, this.state); + if (result !== true) { + this.state.error = result; + return super.submit(); + } + this.value = this.list; + return super.submit(); + } + get list() { + return this.split(); + } + }; + module2.exports = ListPrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/multiselect.js +var require_multiselect = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/multiselect.js"(exports2, module2) { + "use strict"; + var Select = require_select(); + var MultiSelect = class extends Select { + constructor(options) { + super({ ...options, multiple: true }); + } + }; + module2.exports = MultiSelect; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/number.js +var require_number = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/number.js"(exports2, module2) { + "use strict"; + var StringPrompt = require_string(); + var NumberPrompt = class extends StringPrompt { + constructor(options = {}) { + super({ style: "number", ...options }); + this.min = this.isValue(options.min) ? this.toNumber(options.min) : -Infinity; + this.max = this.isValue(options.max) ? this.toNumber(options.max) : Infinity; + this.delay = options.delay != null ? options.delay : 1e3; + this.float = options.float !== false; + this.round = options.round === true || options.float === false; + this.major = options.major || 10; + this.minor = options.minor || 1; + this.initial = options.initial != null ? options.initial : ""; + this.input = String(this.initial); + this.cursor = this.input.length; + this.cursorShow(); + } + append(ch) { + if (!/[-+.]/.test(ch) || ch === "." && this.input.includes(".")) { + return this.alert("invalid number"); + } + return super.append(ch); + } + number(ch) { + return super.append(ch); + } + next() { + if (this.input && this.input !== this.initial) + return this.alert(); + if (!this.isValue(this.initial)) + return this.alert(); + this.input = this.initial; + this.cursor = String(this.initial).length; + return this.render(); + } + up(number) { + let step = number || this.minor; + let num = this.toNumber(this.input); + if (num > this.max + step) + return this.alert(); + this.input = `${num + step}`; + return this.render(); + } + down(number) { + let step = number || this.minor; + let num = this.toNumber(this.input); + if (num < this.min - step) + return this.alert(); + this.input = `${num - step}`; + return this.render(); + } + shiftDown() { + return this.down(this.major); + } + shiftUp() { + return this.up(this.major); + } + format(input = this.input) { + if (typeof this.options.format === "function") { + return this.options.format.call(this, input); + } + return this.styles.info(input); + } + toNumber(value = "") { + return this.float ? +value : Math.round(+value); + } + isValue(value) { + return /^[-+]?[0-9]+((\.)|(\.[0-9]+))?$/.test(value); + } + submit() { + let value = [this.input, this.initial].find((v) => this.isValue(v)); + this.value = this.toNumber(value || 0); + return super.submit(); + } + }; + module2.exports = NumberPrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/numeral.js +var require_numeral = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/numeral.js"(exports2, module2) { + module2.exports = require_number(); + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/password.js +var require_password = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/password.js"(exports2, module2) { + "use strict"; + var StringPrompt = require_string(); + var PasswordPrompt = class extends StringPrompt { + constructor(options) { + super(options); + this.cursorShow(); + } + format(input = this.input) { + if (!this.keypressed) + return ""; + let color = this.state.submitted ? this.styles.primary : this.styles.muted; + return color(this.symbols.asterisk.repeat(input.length)); + } + }; + module2.exports = PasswordPrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/scale.js +var require_scale = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/scale.js"(exports2, module2) { + "use strict"; + var colors = require_ansi_colors(); + var ArrayPrompt = require_array(); + var utils = require_utils(); + var LikertScale = class extends ArrayPrompt { + constructor(options = {}) { + super(options); + this.widths = [].concat(options.messageWidth || 50); + this.align = [].concat(options.align || "left"); + this.linebreak = options.linebreak || false; + this.edgeLength = options.edgeLength || 3; + this.newline = options.newline || "\n "; + let start = options.startNumber || 1; + if (typeof this.scale === "number") { + this.scaleKey = false; + this.scale = Array(this.scale).fill(0).map((v, i) => ({ name: i + start })); + } + } + async reset() { + this.tableized = false; + await super.reset(); + return this.render(); + } + tableize() { + if (this.tableized === true) + return; + this.tableized = true; + let longest = 0; + for (let ch of this.choices) { + longest = Math.max(longest, ch.message.length); + ch.scaleIndex = ch.initial || 2; + ch.scale = []; + for (let i = 0; i < this.scale.length; i++) { + ch.scale.push({ index: i }); + } + } + this.widths[0] = Math.min(this.widths[0], longest + 3); + } + async dispatch(s, key) { + if (this.multiple) { + return this[key.name] ? await this[key.name](s, key) : await super.dispatch(s, key); + } + this.alert(); + } + heading(msg, item, i) { + return this.styles.strong(msg); + } + separator() { + return this.styles.muted(this.symbols.ellipsis); + } + right() { + let choice = this.focused; + if (choice.scaleIndex >= this.scale.length - 1) + return this.alert(); + choice.scaleIndex++; + return this.render(); + } + left() { + let choice = this.focused; + if (choice.scaleIndex <= 0) + return this.alert(); + choice.scaleIndex--; + return this.render(); + } + indent() { + return ""; + } + format() { + if (this.state.submitted) { + let values = this.choices.map((ch) => this.styles.info(ch.index)); + return values.join(", "); + } + return ""; + } + pointer() { + return ""; + } + renderScaleKey() { + if (this.scaleKey === false) + return ""; + if (this.state.submitted) + return ""; + let scale = this.scale.map((item) => ` ${item.name} - ${item.message}`); + let key = ["", ...scale].map((item) => this.styles.muted(item)); + return key.join("\n"); + } + renderScaleHeading(max) { + let keys = this.scale.map((ele) => ele.name); + if (typeof this.options.renderScaleHeading === "function") { + keys = this.options.renderScaleHeading.call(this, max); + } + let diff = this.scaleLength - keys.join("").length; + let spacing = Math.round(diff / (keys.length - 1)); + let names = keys.map((key) => this.styles.strong(key)); + let headings = names.join(" ".repeat(spacing)); + let padding = " ".repeat(this.widths[0]); + return this.margin[3] + padding + this.margin[1] + headings; + } + scaleIndicator(choice, item, i) { + if (typeof this.options.scaleIndicator === "function") { + return this.options.scaleIndicator.call(this, choice, item, i); + } + let enabled = choice.scaleIndex === item.index; + if (item.disabled) + return this.styles.hint(this.symbols.radio.disabled); + if (enabled) + return this.styles.success(this.symbols.radio.on); + return this.symbols.radio.off; + } + renderScale(choice, i) { + let scale = choice.scale.map((item) => this.scaleIndicator(choice, item, i)); + let padding = this.term === "Hyper" ? "" : " "; + return scale.join(padding + this.symbols.line.repeat(this.edgeLength)); + } + async renderChoice(choice, i) { + await this.onChoice(choice, i); + let focused = this.index === i; + let pointer = await this.pointer(choice, i); + let hint = await choice.hint; + if (hint && !utils.hasColor(hint)) { + hint = this.styles.muted(hint); + } + let pad = (str) => this.margin[3] + str.replace(/\s+$/, "").padEnd(this.widths[0], " "); + let newline = this.newline; + let ind = this.indent(choice); + let message2 = await this.resolve(choice.message, this.state, choice, i); + let scale = await this.renderScale(choice, i); + let margin = this.margin[1] + this.margin[3]; + this.scaleLength = colors.unstyle(scale).length; + this.widths[0] = Math.min(this.widths[0], this.width - this.scaleLength - margin.length); + let msg = utils.wordWrap(message2, { width: this.widths[0], newline }); + let lines = msg.split("\n").map((line) => pad(line) + this.margin[1]); + if (focused) { + scale = this.styles.info(scale); + lines = lines.map((line) => this.styles.info(line)); + } + lines[0] += scale; + if (this.linebreak) + lines.push(""); + return [ind + pointer, lines.join("\n")].filter(Boolean); + } + async renderChoices() { + if (this.state.submitted) + return ""; + this.tableize(); + let choices = this.visible.map(async (ch, i) => await this.renderChoice(ch, i)); + let visible = await Promise.all(choices); + let heading = await this.renderScaleHeading(); + return this.margin[0] + [heading, ...visible.map((v) => v.join(" "))].join("\n"); + } + async render() { + let { submitted, size } = this.state; + let prefix = await this.prefix(); + let separator = await this.separator(); + let message2 = await this.message(); + let prompt = ""; + if (this.options.promptLine !== false) { + prompt = [prefix, message2, separator, ""].join(" "); + this.state.prompt = prompt; + } + let header = await this.header(); + let output = await this.format(); + let key = await this.renderScaleKey(); + let help = await this.error() || await this.hint(); + let body = await this.renderChoices(); + let footer = await this.footer(); + let err = this.emptyError; + if (output) + prompt += output; + if (help && !prompt.includes(help)) + prompt += " " + help; + if (submitted && !output && !body.trim() && this.multiple && err != null) { + prompt += this.styles.danger(err); + } + this.clear(size); + this.write([header, prompt, key, body, footer].filter(Boolean).join("\n")); + if (!this.state.submitted) { + this.write(this.margin[2]); + } + this.restore(); + } + submit() { + this.value = {}; + for (let choice of this.choices) { + this.value[choice.name] = choice.scaleIndex; + } + return this.base.submit.call(this); + } + }; + module2.exports = LikertScale; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/interpolate.js +var require_interpolate = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/interpolate.js"(exports2, module2) { + "use strict"; + var colors = require_ansi_colors(); + var clean = (str = "") => { + return typeof str === "string" ? str.replace(/^['"]|['"]$/g, "") : ""; + }; + var Item = class { + constructor(token) { + this.name = token.key; + this.field = token.field || {}; + this.value = clean(token.initial || this.field.initial || ""); + this.message = token.message || this.name; + this.cursor = 0; + this.input = ""; + this.lines = []; + } + }; + var tokenize = async (options = {}, defaults = {}, fn2 = (token) => token) => { + let unique = new Set(); + let fields = options.fields || []; + let input = options.template; + let tabstops = []; + let items = []; + let keys = []; + let line = 1; + if (typeof input === "function") { + input = await input(); + } + let i = -1; + let next = () => input[++i]; + let peek = () => input[i + 1]; + let push = (token) => { + token.line = line; + tabstops.push(token); + }; + push({ type: "bos", value: "" }); + while (i < input.length - 1) { + let value = next(); + if (/^[^\S\n ]$/.test(value)) { + push({ type: "text", value }); + continue; + } + if (value === "\n") { + push({ type: "newline", value }); + line++; + continue; + } + if (value === "\\") { + value += next(); + push({ type: "text", value }); + continue; + } + if ((value === "$" || value === "#" || value === "{") && peek() === "{") { + let n = next(); + value += n; + let token = { type: "template", open: value, inner: "", close: "", value }; + let ch; + while (ch = next()) { + if (ch === "}") { + if (peek() === "}") + ch += next(); + token.value += ch; + token.close = ch; + break; + } + if (ch === ":") { + token.initial = ""; + token.key = token.inner; + } else if (token.initial !== void 0) { + token.initial += ch; + } + token.value += ch; + token.inner += ch; + } + token.template = token.open + (token.initial || token.inner) + token.close; + token.key = token.key || token.inner; + if (defaults.hasOwnProperty(token.key)) { + token.initial = defaults[token.key]; + } + token = fn2(token); + push(token); + keys.push(token.key); + unique.add(token.key); + let item = items.find((item2) => item2.name === token.key); + token.field = fields.find((ch2) => ch2.name === token.key); + if (!item) { + item = new Item(token); + items.push(item); + } + item.lines.push(token.line - 1); + continue; + } + let last = tabstops[tabstops.length - 1]; + if (last.type === "text" && last.line === line) { + last.value += value; + } else { + push({ type: "text", value }); + } + } + push({ type: "eos", value: "" }); + return { input, tabstops, unique, keys, items }; + }; + module2.exports = async (prompt) => { + let options = prompt.options; + let required = new Set(options.required === true ? [] : options.required || []); + let defaults = { ...options.values, ...options.initial }; + let { tabstops, items, keys } = await tokenize(options, defaults); + let result = createFn("result", prompt, options); + let format = createFn("format", prompt, options); + let isValid = createFn("validate", prompt, options, true); + let isVal = prompt.isValue.bind(prompt); + return async (state = {}, submitted = false) => { + let index = 0; + state.required = required; + state.items = items; + state.keys = keys; + state.output = ""; + let validate = async (value, state2, item, index2) => { + let error = await isValid(value, state2, item, index2); + if (error === false) { + return "Invalid field " + item.name; + } + return error; + }; + for (let token of tabstops) { + let value = token.value; + let key = token.key; + if (token.type !== "template") { + if (value) + state.output += value; + continue; + } + if (token.type === "template") { + let item = items.find((ch) => ch.name === key); + if (options.required === true) { + state.required.add(item.name); + } + let val = [item.input, state.values[item.value], item.value, value].find(isVal); + let field = item.field || {}; + let message2 = field.message || token.inner; + if (submitted) { + let error = await validate(state.values[key], state, item, index); + if (error && typeof error === "string" || error === false) { + state.invalid.set(key, error); + continue; + } + state.invalid.delete(key); + let res = await result(state.values[key], state, item, index); + state.output += colors.unstyle(res); + continue; + } + item.placeholder = false; + let before = value; + value = await format(value, state, item, index); + if (val !== value) { + state.values[key] = val; + value = prompt.styles.typing(val); + state.missing.delete(message2); + } else { + state.values[key] = void 0; + val = `<${message2}>`; + value = prompt.styles.primary(val); + item.placeholder = true; + if (state.required.has(key)) { + state.missing.add(message2); + } + } + if (state.missing.has(message2) && state.validating) { + value = prompt.styles.warning(val); + } + if (state.invalid.has(key) && state.validating) { + value = prompt.styles.danger(val); + } + if (index === state.index) { + if (before !== value) { + value = prompt.styles.underline(value); + } else { + value = prompt.styles.heading(colors.unstyle(value)); + } + } + index++; + } + if (value) { + state.output += value; + } + } + let lines = state.output.split("\n").map((l) => " " + l); + let len = items.length; + let done = 0; + for (let item of items) { + if (state.invalid.has(item.name)) { + item.lines.forEach((i) => { + if (lines[i][0] !== " ") + return; + lines[i] = state.styles.danger(state.symbols.bullet) + lines[i].slice(1); + }); + } + if (prompt.isValue(state.values[item.name])) { + done++; + } + } + state.completed = (done / len * 100).toFixed(0); + state.output = lines.join("\n"); + return state.output; + }; + }; + function createFn(prop, prompt, options, fallback) { + return (value, state, item, index) => { + if (typeof item.field[prop] === "function") { + return item.field[prop].call(prompt, value, state, item, index); + } + return [fallback, value].find((v) => prompt.isValue(v)); + }; + } + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/snippet.js +var require_snippet = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/snippet.js"(exports2, module2) { + "use strict"; + var colors = require_ansi_colors(); + var interpolate = require_interpolate(); + var Prompt = require_prompt(); + var SnippetPrompt = class extends Prompt { + constructor(options) { + super(options); + this.cursorHide(); + this.reset(true); + } + async initialize() { + this.interpolate = await interpolate(this); + await super.initialize(); + } + async reset(first) { + this.state.keys = []; + this.state.invalid = new Map(); + this.state.missing = new Set(); + this.state.completed = 0; + this.state.values = {}; + if (first !== true) { + await this.initialize(); + await this.render(); + } + } + moveCursor(n) { + let item = this.getItem(); + this.cursor += n; + item.cursor += n; + } + dispatch(ch, key) { + if (!key.code && !key.ctrl && ch != null && this.getItem()) { + this.append(ch, key); + return; + } + this.alert(); + } + append(ch, key) { + let item = this.getItem(); + let prefix = item.input.slice(0, this.cursor); + let suffix = item.input.slice(this.cursor); + this.input = item.input = `${prefix}${ch}${suffix}`; + this.moveCursor(1); + this.render(); + } + delete() { + let item = this.getItem(); + if (this.cursor <= 0 || !item.input) + return this.alert(); + let suffix = item.input.slice(this.cursor); + let prefix = item.input.slice(0, this.cursor - 1); + this.input = item.input = `${prefix}${suffix}`; + this.moveCursor(-1); + this.render(); + } + increment(i) { + return i >= this.state.keys.length - 1 ? 0 : i + 1; + } + decrement(i) { + return i <= 0 ? this.state.keys.length - 1 : i - 1; + } + first() { + this.state.index = 0; + this.render(); + } + last() { + this.state.index = this.state.keys.length - 1; + this.render(); + } + right() { + if (this.cursor >= this.input.length) + return this.alert(); + this.moveCursor(1); + this.render(); + } + left() { + if (this.cursor <= 0) + return this.alert(); + this.moveCursor(-1); + this.render(); + } + prev() { + this.state.index = this.decrement(this.state.index); + this.getItem(); + this.render(); + } + next() { + this.state.index = this.increment(this.state.index); + this.getItem(); + this.render(); + } + up() { + this.prev(); + } + down() { + this.next(); + } + format(value) { + let color = this.state.completed < 100 ? this.styles.warning : this.styles.success; + if (this.state.submitted === true && this.state.completed !== 100) { + color = this.styles.danger; + } + return color(`${this.state.completed}% completed`); + } + async render() { + let { index, keys = [], submitted, size } = this.state; + let newline = [this.options.newline, "\n"].find((v) => v != null); + let prefix = await this.prefix(); + let separator = await this.separator(); + let message2 = await this.message(); + let prompt = [prefix, message2, separator].filter(Boolean).join(" "); + this.state.prompt = prompt; + let header = await this.header(); + let error = await this.error() || ""; + let hint = await this.hint() || ""; + let body = submitted ? "" : await this.interpolate(this.state); + let key = this.state.key = keys[index] || ""; + let input = await this.format(key); + let footer = await this.footer(); + if (input) + prompt += " " + input; + if (hint && !input && this.state.completed === 0) + prompt += " " + hint; + this.clear(size); + let lines = [header, prompt, body, footer, error.trim()]; + this.write(lines.filter(Boolean).join(newline)); + this.restore(); + } + getItem(name) { + let { items, keys, index } = this.state; + let item = items.find((ch) => ch.name === keys[index]); + if (item && item.input != null) { + this.input = item.input; + this.cursor = item.cursor; + } + return item; + } + async submit() { + if (typeof this.interpolate !== "function") + await this.initialize(); + await this.interpolate(this.state, true); + let { invalid, missing, output, values } = this.state; + if (invalid.size) { + let err = ""; + for (let [key, value] of invalid) + err += `Invalid ${key}: ${value} +`; + this.state.error = err; + return super.submit(); + } + if (missing.size) { + this.state.error = "Required: " + [...missing.keys()].join(", "); + return super.submit(); + } + let lines = colors.unstyle(output).split("\n"); + let result = lines.map((v) => v.slice(1)).join("\n"); + this.value = { values, result }; + return super.submit(); + } + }; + module2.exports = SnippetPrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/sort.js +var require_sort = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/sort.js"(exports2, module2) { + "use strict"; + var hint = "(Use + to sort)"; + var Prompt = require_select(); + var Sort = class extends Prompt { + constructor(options) { + super({ ...options, reorder: false, sort: true, multiple: true }); + this.state.hint = [this.options.hint, hint].find(this.isValue.bind(this)); + } + indicator() { + return ""; + } + async renderChoice(choice, i) { + let str = await super.renderChoice(choice, i); + let sym = this.symbols.identicalTo + " "; + let pre = this.index === i && this.sorting ? this.styles.muted(sym) : " "; + if (this.options.drag === false) + pre = ""; + if (this.options.numbered === true) { + return pre + `${i + 1} - ` + str; + } + return pre + str; + } + get selected() { + return this.choices; + } + submit() { + this.value = this.choices.map((choice) => choice.value); + return super.submit(); + } + }; + module2.exports = Sort; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/survey.js +var require_survey = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/survey.js"(exports2, module2) { + "use strict"; + var ArrayPrompt = require_array(); + var Survey = class extends ArrayPrompt { + constructor(options = {}) { + super(options); + this.emptyError = options.emptyError || "No items were selected"; + this.term = process.env.TERM_PROGRAM; + if (!this.options.header) { + let header = ["", "4 - Strongly Agree", "3 - Agree", "2 - Neutral", "1 - Disagree", "0 - Strongly Disagree", ""]; + header = header.map((ele) => this.styles.muted(ele)); + this.state.header = header.join("\n "); + } + } + async toChoices(...args2) { + if (this.createdScales) + return false; + this.createdScales = true; + let choices = await super.toChoices(...args2); + for (let choice of choices) { + choice.scale = createScale(5, this.options); + choice.scaleIdx = 2; + } + return choices; + } + dispatch() { + this.alert(); + } + space() { + let choice = this.focused; + let ele = choice.scale[choice.scaleIdx]; + let selected = ele.selected; + choice.scale.forEach((e) => e.selected = false); + ele.selected = !selected; + return this.render(); + } + indicator() { + return ""; + } + pointer() { + return ""; + } + separator() { + return this.styles.muted(this.symbols.ellipsis); + } + right() { + let choice = this.focused; + if (choice.scaleIdx >= choice.scale.length - 1) + return this.alert(); + choice.scaleIdx++; + return this.render(); + } + left() { + let choice = this.focused; + if (choice.scaleIdx <= 0) + return this.alert(); + choice.scaleIdx--; + return this.render(); + } + indent() { + return " "; + } + async renderChoice(item, i) { + await this.onChoice(item, i); + let focused = this.index === i; + let isHyper = this.term === "Hyper"; + let n = !isHyper ? 8 : 9; + let s = !isHyper ? " " : ""; + let ln = this.symbols.line.repeat(n); + let sp = " ".repeat(n + (isHyper ? 0 : 1)); + let dot = (enabled) => (enabled ? this.styles.success("\u25C9") : "\u25EF") + s; + let num = i + 1 + "."; + let color = focused ? this.styles.heading : this.styles.noop; + let msg = await this.resolve(item.message, this.state, item, i); + let indent = this.indent(item); + let scale = indent + item.scale.map((e, i2) => dot(i2 === item.scaleIdx)).join(ln); + let val = (i2) => i2 === item.scaleIdx ? color(i2) : i2; + let next = indent + item.scale.map((e, i2) => val(i2)).join(sp); + let line = () => [num, msg].filter(Boolean).join(" "); + let lines = () => [line(), scale, next, " "].filter(Boolean).join("\n"); + if (focused) { + scale = this.styles.cyan(scale); + next = this.styles.cyan(next); + } + return lines(); + } + async renderChoices() { + if (this.state.submitted) + return ""; + let choices = this.visible.map(async (ch, i) => await this.renderChoice(ch, i)); + let visible = await Promise.all(choices); + if (!visible.length) + visible.push(this.styles.danger("No matching choices")); + return visible.join("\n"); + } + format() { + if (this.state.submitted) { + let values = this.choices.map((ch) => this.styles.info(ch.scaleIdx)); + return values.join(", "); + } + return ""; + } + async render() { + let { submitted, size } = this.state; + let prefix = await this.prefix(); + let separator = await this.separator(); + let message2 = await this.message(); + let prompt = [prefix, message2, separator].filter(Boolean).join(" "); + this.state.prompt = prompt; + let header = await this.header(); + let output = await this.format(); + let help = await this.error() || await this.hint(); + let body = await this.renderChoices(); + let footer = await this.footer(); + if (output || !help) + prompt += " " + output; + if (help && !prompt.includes(help)) + prompt += " " + help; + if (submitted && !output && !body && this.multiple && this.type !== "form") { + prompt += this.styles.danger(this.emptyError); + } + this.clear(size); + this.write([prompt, header, body, footer].filter(Boolean).join("\n")); + this.restore(); + } + submit() { + this.value = {}; + for (let choice of this.choices) { + this.value[choice.name] = choice.scaleIdx; + } + return this.base.submit.call(this); + } + }; + function createScale(n, options = {}) { + if (Array.isArray(options.scale)) { + return options.scale.map((ele) => ({ ...ele })); + } + let scale = []; + for (let i = 1; i < n + 1; i++) + scale.push({ i, selected: false }); + return scale; + } + module2.exports = Survey; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/text.js +var require_text = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/text.js"(exports2, module2) { + module2.exports = require_input(); + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/toggle.js +var require_toggle = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/toggle.js"(exports2, module2) { + "use strict"; + var BooleanPrompt = require_boolean(); + var TogglePrompt = class extends BooleanPrompt { + async initialize() { + await super.initialize(); + this.value = this.initial = !!this.options.initial; + this.disabled = this.options.disabled || "no"; + this.enabled = this.options.enabled || "yes"; + await this.render(); + } + reset() { + this.value = this.initial; + this.render(); + } + delete() { + this.alert(); + } + toggle() { + this.value = !this.value; + this.render(); + } + enable() { + if (this.value === true) + return this.alert(); + this.value = true; + this.render(); + } + disable() { + if (this.value === false) + return this.alert(); + this.value = false; + this.render(); + } + up() { + this.toggle(); + } + down() { + this.toggle(); + } + right() { + this.toggle(); + } + left() { + this.toggle(); + } + next() { + this.toggle(); + } + prev() { + this.toggle(); + } + dispatch(ch = "", key) { + switch (ch.toLowerCase()) { + case " ": + return this.toggle(); + case "1": + case "y": + case "t": + return this.enable(); + case "0": + case "n": + case "f": + return this.disable(); + default: { + return this.alert(); + } + } + } + format() { + let active = (str) => this.styles.primary.underline(str); + let value = [ + this.value ? this.disabled : active(this.disabled), + this.value ? active(this.enabled) : this.enabled + ]; + return value.join(this.styles.muted(" / ")); + } + async render() { + let { size } = this.state; + let header = await this.header(); + let prefix = await this.prefix(); + let separator = await this.separator(); + let message2 = await this.message(); + let output = await this.format(); + let help = await this.error() || await this.hint(); + let footer = await this.footer(); + let prompt = [prefix, message2, separator, output].join(" "); + this.state.prompt = prompt; + if (help && !prompt.includes(help)) + prompt += " " + help; + this.clear(size); + this.write([header, prompt, footer].filter(Boolean).join("\n")); + this.write(this.margin[2]); + this.restore(); + } + }; + module2.exports = TogglePrompt; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/quiz.js +var require_quiz = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/quiz.js"(exports2, module2) { + "use strict"; + var SelectPrompt = require_select(); + var Quiz = class extends SelectPrompt { + constructor(options) { + super(options); + if (typeof this.options.correctChoice !== "number" || this.options.correctChoice < 0) { + throw new Error("Please specify the index of the correct answer from the list of choices"); + } + } + async toChoices(value, parent) { + let choices = await super.toChoices(value, parent); + if (choices.length < 2) { + throw new Error("Please give at least two choices to the user"); + } + if (this.options.correctChoice > choices.length) { + throw new Error("Please specify the index of the correct answer from the list of choices"); + } + return choices; + } + check(state) { + return state.index === this.options.correctChoice; + } + async result(selected) { + return { + selectedAnswer: selected, + correctAnswer: this.options.choices[this.options.correctChoice].value, + correct: await this.check(this.state) + }; + } + }; + module2.exports = Quiz; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/index.js +var require_prompts = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/prompts/index.js"(exports2) { + "use strict"; + var utils = require_utils(); + var define2 = (key, fn2) => { + utils.defineExport(exports2, key, fn2); + utils.defineExport(exports2, key.toLowerCase(), fn2); + }; + define2("AutoComplete", () => require_autocomplete()); + define2("BasicAuth", () => require_basicauth()); + define2("Confirm", () => require_confirm()); + define2("Editable", () => require_editable()); + define2("Form", () => require_form()); + define2("Input", () => require_input()); + define2("Invisible", () => require_invisible()); + define2("List", () => require_list()); + define2("MultiSelect", () => require_multiselect()); + define2("Numeral", () => require_numeral()); + define2("Password", () => require_password()); + define2("Scale", () => require_scale()); + define2("Select", () => require_select()); + define2("Snippet", () => require_snippet()); + define2("Sort", () => require_sort()); + define2("Survey", () => require_survey()); + define2("Text", () => require_text()); + define2("Toggle", () => require_toggle()); + define2("Quiz", () => require_quiz()); + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/index.js +var require_types = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/lib/types/index.js"(exports2, module2) { + module2.exports = { + ArrayPrompt: require_array(), + AuthPrompt: require_auth(), + BooleanPrompt: require_boolean(), + NumberPrompt: require_number(), + StringPrompt: require_string() + }; + } +}); + +// ../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/index.js +var require_enquirer = __commonJS({ + "../../node_modules/.pnpm/enquirer@2.3.6/node_modules/enquirer/index.js"(exports2, module2) { + "use strict"; + var assert = require("assert"); + var Events = require("events"); + var utils = require_utils(); + var Enquirer = class extends Events { + constructor(options, answers) { + super(); + this.options = utils.merge({}, options); + this.answers = { ...answers }; + } + register(type, fn2) { + if (utils.isObject(type)) { + for (let key of Object.keys(type)) + this.register(key, type[key]); + return this; + } + assert.equal(typeof fn2, "function", "expected a function"); + let name = type.toLowerCase(); + if (fn2.prototype instanceof this.Prompt) { + this.prompts[name] = fn2; + } else { + this.prompts[name] = fn2(this.Prompt, this); + } + return this; + } + async prompt(questions = []) { + for (let question of [].concat(questions)) { + try { + if (typeof question === "function") + question = await question.call(this); + await this.ask(utils.merge({}, this.options, question)); + } catch (err) { + return Promise.reject(err); + } + } + return this.answers; + } + async ask(question) { + if (typeof question === "function") { + question = await question.call(this); + } + let opts = utils.merge({}, this.options, question); + let { type, name } = question; + let { set, get } = utils; + if (typeof type === "function") { + type = await type.call(this, question, this.answers); + } + if (!type) + return this.answers[name]; + assert(this.prompts[type], `Prompt "${type}" is not registered`); + let prompt = new this.prompts[type](opts); + let value = get(this.answers, name); + prompt.state.answers = this.answers; + prompt.enquirer = this; + if (name) { + prompt.on("submit", (value2) => { + this.emit("answer", name, value2, prompt); + set(this.answers, name, value2); + }); + } + let emit = prompt.emit.bind(prompt); + prompt.emit = (...args2) => { + this.emit.call(this, ...args2); + return emit(...args2); + }; + this.emit("prompt", prompt, this); + if (opts.autofill && value != null) { + prompt.value = prompt.input = value; + if (opts.autofill === "show") { + await prompt.submit(); + } + } else { + value = prompt.value = await prompt.run(); + } + return value; + } + use(plugin) { + plugin.call(this, this); + return this; + } + set Prompt(value) { + this._Prompt = value; + } + get Prompt() { + return this._Prompt || this.constructor.Prompt; + } + get prompts() { + return this.constructor.prompts; + } + static set Prompt(value) { + this._Prompt = value; + } + static get Prompt() { + return this._Prompt || require_prompt(); + } + static get prompts() { + return require_prompts(); + } + static get types() { + return require_types(); + } + static get prompt() { + const fn2 = (questions, ...rest) => { + let enquirer = new this(...rest); + let emit = enquirer.emit.bind(enquirer); + enquirer.emit = (...args2) => { + fn2.emit(...args2); + return emit(...args2); + }; + return enquirer.prompt(questions); + }; + utils.mixinEmitter(fn2, new Events()); + return fn2; + } + }; + utils.mixinEmitter(Enquirer, new Events()); + var prompts = Enquirer.prompts; + for (let name of Object.keys(prompts)) { + let key = name.toLowerCase(); + let run = (options) => new prompts[name](options).run(); + Enquirer.prompt[key] = run; + Enquirer[key] = run; + if (!Enquirer[name]) { + Reflect.defineProperty(Enquirer, name, { get: () => prompts[name] }); + } + } + var exp = (name) => { + utils.defineExport(Enquirer, name, () => Enquirer.types[name]); + }; + exp("ArrayPrompt"); + exp("AuthPrompt"); + exp("BooleanPrompt"); + exp("NumberPrompt"); + exp("StringPrompt"); + module2.exports = Enquirer; + } +}); + +// ../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js +var require_ms = __commonJS({ + "../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js"(exports2, module2) { + var s = 1e3; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var w = d * 7; + var y = d * 365.25; + module2.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === "string" && val.length > 0) { + return parse(val); + } else if (type === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val)); + }; + function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || "ms").toLowerCase(); + switch (type) { + case "years": + case "year": + case "yrs": + case "yr": + case "y": + return n * y; + case "weeks": + case "week": + case "w": + return n * w; + case "days": + case "day": + case "d": + return n * d; + case "hours": + case "hour": + case "hrs": + case "hr": + case "h": + return n * h; + case "minutes": + case "minute": + case "mins": + case "min": + case "m": + return n * m; + case "seconds": + case "second": + case "secs": + case "sec": + case "s": + return n * s; + case "milliseconds": + case "millisecond": + case "msecs": + case "msec": + case "ms": + return n; + default: + return void 0; + } + } + function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + "d"; + } + if (msAbs >= h) { + return Math.round(ms / h) + "h"; + } + if (msAbs >= m) { + return Math.round(ms / m) + "m"; + } + if (msAbs >= s) { + return Math.round(ms / s) + "s"; + } + return ms + "ms"; + } + function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, "day"); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, "hour"); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, "minute"); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, "second"); + } + return ms + " ms"; + } + function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); + } + } +}); + +// ../../node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/common.js +var require_common = __commonJS({ + "../../node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/common.js"(exports2, module2) { + function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require_ms(); + createDebug.destroy = destroy; + Object.keys(env).forEach((key) => { + createDebug[key] = env[key]; + }); + createDebug.names = []; + createDebug.skips = []; + createDebug.formatters = {}; + function selectColor(namespace) { + let hash = 0; + for (let i = 0; i < namespace.length; i++) { + hash = (hash << 5) - hash + namespace.charCodeAt(i); + hash |= 0; + } + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + function debug(...args2) { + if (!debug.enabled) { + return; + } + const self2 = debug; + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self2.diff = ms; + self2.prev = prevTime; + self2.curr = curr; + prevTime = curr; + args2[0] = createDebug.coerce(args2[0]); + if (typeof args2[0] !== "string") { + args2.unshift("%O"); + } + let index = 0; + args2[0] = args2[0].replace(/%([a-zA-Z%])/g, (match, format) => { + if (match === "%%") { + return "%"; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === "function") { + const val = args2[index]; + match = formatter.call(self2, val); + args2.splice(index, 1); + index--; + } + return match; + }); + createDebug.formatArgs.call(self2, args2); + const logFn = self2.log || createDebug.log; + logFn.apply(self2, args2); + } + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend; + debug.destroy = createDebug.destroy; + Object.defineProperty(debug, "enabled", { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + return enabledCache; + }, + set: (v) => { + enableOverride = v; + } + }); + if (typeof createDebug.init === "function") { + createDebug.init(debug); + } + return debug; + } + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; + createDebug.names = []; + createDebug.skips = []; + let i; + const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); + const len = split.length; + for (i = 0; i < len; i++) { + if (!split[i]) { + continue; + } + namespaces = split[i].replace(/\*/g, ".*?"); + if (namespaces[0] === "-") { + createDebug.skips.push(new RegExp("^" + namespaces.substr(1) + "$")); + } else { + createDebug.names.push(new RegExp("^" + namespaces + "$")); + } + } + } + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace) + ].join(","); + createDebug.enable(""); + return namespaces; + } + function enabled(name) { + if (name[name.length - 1] === "*") { + return true; + } + let i; + let len; + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + return false; + } + function toNamespace(regexp) { + return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*"); + } + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + function destroy() { + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + } + createDebug.enable(createDebug.load()); + return createDebug; + } + module2.exports = setup; + } +}); + +// ../../node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/browser.js +var require_browser = __commonJS({ + "../../node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/browser.js"(exports2, module2) { + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.storage = localstorage(); + exports2.destroy = (() => { + let warned = false; + return () => { + if (!warned) { + warned = true; + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + } + }; + })(); + exports2.colors = [ + "#0000CC", + "#0000FF", + "#0033CC", + "#0033FF", + "#0066CC", + "#0066FF", + "#0099CC", + "#0099FF", + "#00CC00", + "#00CC33", + "#00CC66", + "#00CC99", + "#00CCCC", + "#00CCFF", + "#3300CC", + "#3300FF", + "#3333CC", + "#3333FF", + "#3366CC", + "#3366FF", + "#3399CC", + "#3399FF", + "#33CC00", + "#33CC33", + "#33CC66", + "#33CC99", + "#33CCCC", + "#33CCFF", + "#6600CC", + "#6600FF", + "#6633CC", + "#6633FF", + "#66CC00", + "#66CC33", + "#9900CC", + "#9900FF", + "#9933CC", + "#9933FF", + "#99CC00", + "#99CC33", + "#CC0000", + "#CC0033", + "#CC0066", + "#CC0099", + "#CC00CC", + "#CC00FF", + "#CC3300", + "#CC3333", + "#CC3366", + "#CC3399", + "#CC33CC", + "#CC33FF", + "#CC6600", + "#CC6633", + "#CC9900", + "#CC9933", + "#CCCC00", + "#CCCC33", + "#FF0000", + "#FF0033", + "#FF0066", + "#FF0099", + "#FF00CC", + "#FF00FF", + "#FF3300", + "#FF3333", + "#FF3366", + "#FF3399", + "#FF33CC", + "#FF33FF", + "#FF6600", + "#FF6633", + "#FF9900", + "#FF9933", + "#FFCC00", + "#FFCC33" + ]; + function useColors() { + if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { + return true; + } + if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); + } + function formatArgs(args2) { + args2[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args2[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); + if (!this.useColors) { + return; + } + const c = "color: " + this.color; + args2.splice(1, 0, c, "color: inherit"); + let index = 0; + let lastC = 0; + args2[0].replace(/%[a-zA-Z%]/g, (match) => { + if (match === "%%") { + return; + } + index++; + if (match === "%c") { + lastC = index; + } + }); + args2.splice(lastC, 0, c); + } + exports2.log = console.debug || console.log || (() => { + }); + function save(namespaces) { + try { + if (namespaces) { + exports2.storage.setItem("debug", namespaces); + } else { + exports2.storage.removeItem("debug"); + } + } catch (error) { + } + } + function load() { + let r; + try { + r = exports2.storage.getItem("debug"); + } catch (error) { + } + if (!r && typeof process !== "undefined" && "env" in process) { + r = process.env.DEBUG; + } + return r; + } + function localstorage() { + try { + return localStorage; + } catch (error) { + } + } + module2.exports = require_common()(exports2); + var { formatters } = module2.exports; + formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (error) { + return "[UnexpectedJSONParseError]: " + error.message; + } + }; + } +}); + +// ../../node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/node.js +var require_node = __commonJS({ + "../../node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/node.js"(exports2, module2) { + var tty = require("tty"); + var util = require("util"); + exports2.init = init; + exports2.log = log2; + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.destroy = util.deprecate(() => { + }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + exports2.colors = [6, 2, 3, 4, 5, 1]; + try { + const supportsColor = require("supports-color"); + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports2.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } + } catch (error) { + } + exports2.inspectOpts = Object.keys(process.env).filter((key) => { + return /^debug_/i.test(key); + }).reduce((obj, key) => { + const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === "null") { + val = null; + } else { + val = Number(val); + } + obj[prop] = val; + return obj; + }, {}); + function useColors() { + return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd); + } + function formatArgs(args2) { + const { namespace: name, useColors: useColors2 } = this; + if (useColors2) { + const c = this.color; + const colorCode = "[3" + (c < 8 ? c : "8;5;" + c); + const prefix = ` ${colorCode};1m${name} `; + args2[0] = prefix + args2[0].split("\n").join("\n" + prefix); + args2.push(colorCode + "m+" + module2.exports.humanize(this.diff) + ""); + } else { + args2[0] = getDate() + name + " " + args2[0]; + } + } + function getDate() { + if (exports2.inspectOpts.hideDate) { + return ""; + } + return new Date().toISOString() + " "; + } + function log2(...args2) { + return process.stderr.write(util.format(...args2) + "\n"); + } + function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + delete process.env.DEBUG; + } + } + function load() { + return process.env.DEBUG; + } + function init(debug) { + debug.inspectOpts = {}; + const keys = Object.keys(exports2.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; + } + } + module2.exports = require_common()(exports2); + var { formatters } = module2.exports; + formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); + }; + formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); + }; + } +}); + +// ../../node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/index.js +var require_src = __commonJS({ + "../../node_modules/.pnpm/debug@4.3.2/node_modules/debug/src/index.js"(exports2, module2) { + if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { + module2.exports = require_browser(); + } else { + module2.exports = require_node(); + } + } +}); + +// ../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/utils/tabtabDebug.js +var require_tabtabDebug = __commonJS({ + "../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/utils/tabtabDebug.js"(exports2, module2) { + var fs = require("fs"); + var util = require("util"); + var tabtabDebug = (name) => { + let debug = require_src()(name); + if (process.env.TABTAB_DEBUG) { + const file = process.env.TABTAB_DEBUG; + const stream = fs.createWriteStream(file, { + flags: "a+" + }); + const log2 = (...args2) => { + args2 = args2.map((arg) => { + if (typeof arg === "string") + return arg; + return JSON.stringify(arg); + }); + const str = `${util.format(...args2)} +`; + stream.write(str); + }; + if (process.env.COMP_LINE) { + debug = log2; + } else { + debug.log = log2; + } + } + return debug; + }; + module2.exports = tabtabDebug; + } +}); + +// ../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/prompt.js +var require_prompt2 = __commonJS({ + "../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/prompt.js"(exports2, module2) { + var enquirer = require_enquirer(); + var path = require("path"); + var { SHELL_LOCATIONS } = require_constants(); + var debug = require_tabtabDebug()("tabtab:prompt"); + var prompt = async () => { + const questions = [ + { + type: "select", + name: "shell", + message: "Which Shell do you use ?", + choices: ["bash", "zsh", "fish"], + default: "bash" + } + ]; + const finalAnswers = {}; + const { shell } = await enquirer.prompt(questions); + debug("answers", shell); + const location = SHELL_LOCATIONS[shell]; + debug(`Will install completion to ${location}`); + Object.assign(finalAnswers, { location, shell }); + const { locationOK } = await enquirer.prompt({ + type: "confirm", + name: "locationOK", + message: `We will install completion to ${location}, is it ok ?` + }); + if (locationOK) { + debug("location is ok, return", finalAnswers); + return finalAnswers; + } + const { userLocation } = await enquirer.prompt({ + name: "userLocation", + message: "Which path then ? Must be absolute.", + type: "input", + validate: (input) => { + debug("Validating input", input); + return path.isAbsolute(input); + } + }); + console.log(`Very well, we will install using ${userLocation}`); + Object.assign(finalAnswers, { location: userLocation }); + return finalAnswers; + }; + module2.exports = prompt; + } +}); + +// ../../node_modules/.pnpm/untildify@4.0.0/node_modules/untildify/index.js +var require_untildify = __commonJS({ + "../../node_modules/.pnpm/untildify@4.0.0/node_modules/untildify/index.js"(exports2, module2) { + "use strict"; + var os = require("os"); + var homeDirectory = os.homedir(); + module2.exports = (pathWithTilde) => { + if (typeof pathWithTilde !== "string") { + throw new TypeError(`Expected a string, got ${typeof pathWithTilde}`); + } + return homeDirectory ? pathWithTilde.replace(/^~(?=$|\/|\\)/, homeDirectory) : pathWithTilde; + }; + } +}); + +// ../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/utils/systemShell.js +var require_systemShell = __commonJS({ + "../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/utils/systemShell.js"(exports2, module2) { + var systemShell = () => (process.env.SHELL || "").split("/").slice(-1)[0]; + module2.exports = systemShell; + } +}); + +// ../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/utils/exists.js +var require_exists = __commonJS({ + "../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/utils/exists.js"(exports2, module2) { + var fs = require("fs"); + var untildify = require_untildify(); + var { promisify } = require("util"); + var readFile = promisify(fs.readFile); + module2.exports = async (file) => { + let fileExists; + try { + await readFile(untildify(file)); + fileExists = true; + } catch (err) { + fileExists = false; + } + return fileExists; + }; + } +}); + +// ../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/utils/index.js +var require_utils2 = __commonJS({ + "../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/utils/index.js"(exports2, module2) { + var tabtabDebug = require_tabtabDebug(); + var systemShell = require_systemShell(); + var exists = require_exists(); + module2.exports = { + systemShell, + tabtabDebug, + exists + }; + } +}); + +// ../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/installer.js +var require_installer = __commonJS({ + "../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/installer.js"(exports2, module2) { + var fs = require("fs"); + var path = require("path"); + var untildify = require_untildify(); + var { promisify } = require("util"); + var { tabtabDebug, systemShell, exists } = require_utils2(); + var debug = tabtabDebug("tabtab:installer"); + var readFile = promisify(fs.readFile); + var writeFile = promisify(fs.writeFile); + var unlink = promisify(fs.unlink); + var mkdir = promisify(fs.mkdir); + var { + BASH_LOCATION, + FISH_LOCATION, + ZSH_LOCATION, + COMPLETION_DIR, + TABTAB_SCRIPT_NAME + } = require_constants(); + var scriptFromShell = (shell = systemShell()) => { + if (shell === "fish") { + return path.join(__dirname, "scripts/fish.sh"); + } + if (shell === "zsh") { + return path.join(__dirname, "scripts/zsh.sh"); + } + return path.join(__dirname, "scripts/bash.sh"); + }; + var locationFromShell = (shell = systemShell()) => { + if (shell === "bash") + return untildify(BASH_LOCATION); + if (shell === "zsh") + return untildify(ZSH_LOCATION); + if (shell === "fish") + return untildify(FISH_LOCATION); + return BASH_LOCATION; + }; + var sourceLineForShell = (scriptname, shell = systemShell()) => { + if (shell === "fish") { + return `[ -f ${scriptname} ]; and . ${scriptname}; or true`; + } + if (shell === "zsh") { + return `[[ -f ${scriptname} ]] && . ${scriptname} || true`; + } + return `[ -f ${scriptname} ] && . ${scriptname} || true`; + }; + var isInShellConfig = (filename) => [ + BASH_LOCATION, + ZSH_LOCATION, + FISH_LOCATION, + untildify(BASH_LOCATION), + untildify(ZSH_LOCATION), + untildify(FISH_LOCATION) + ].includes(filename); + var checkFilenameForLine = async (filename, line) => { + debug('Check filename (%s) for "%s"', filename, line); + let filecontent = ""; + try { + filecontent = await readFile(untildify(filename), "utf8"); + } catch (err) { + if (err.code !== "ENOENT") { + return console.error("Got an error while trying to read from %s file", filename, err); + } + } + return !!filecontent.match(`${line}`); + }; + var writeLineToFilename = ({ filename, scriptname, name, shell }) => (resolve, reject) => { + const filepath = untildify(filename); + debug("Creating directory for %s file", filepath); + mkdir(path.dirname(filepath), { recursive: true }).then(() => { + const stream = fs.createWriteStream(filepath, { flags: "a" }); + stream.on("error", reject); + stream.on("finish", () => resolve()); + debug("Writing to shell configuration file (%s)", filename); + debug("scriptname:", scriptname); + const inShellConfig = isInShellConfig(filename); + if (inShellConfig) { + stream.write(` +# tabtab source for packages`); + } else { + stream.write(` +# tabtab source for ${name} package`); + } + stream.write("\n# uninstall by removing these lines"); + stream.write(` +${sourceLineForShell(scriptname, shell)}`); + stream.end("\n"); + console.log('=> Added tabtab source line in "%s" file', filename); + }).catch((err) => { + console.error("mkdirp ERROR", err); + reject(err); + }); + }; + var writeToShellConfig = async ({ location, name, shell }) => { + const scriptname = path.join(COMPLETION_DIR, shell, `${TABTAB_SCRIPT_NAME}.${shell}`); + const filename = location; + const existing = await checkFilenameForLine(filename, scriptname); + if (existing) { + return console.log("=> Tabtab line already exists in %s file", filename); + } + return new Promise(writeLineToFilename({ + filename, + scriptname, + name, + shell + })); + }; + var writeToTabtabScript = async ({ name, shell }) => { + const filename = path.join(COMPLETION_DIR, shell, `${TABTAB_SCRIPT_NAME}.${shell}`); + const scriptname = path.join(COMPLETION_DIR, shell, `${name}.${shell}`); + const existing = await checkFilenameForLine(filename, scriptname); + if (existing) { + return console.log("=> Tabtab line already exists in %s file", filename); + } + return new Promise(writeLineToFilename({ filename, scriptname, name, shell })); + }; + var writeToCompletionScript = async ({ name, completer, shell }) => { + const filename = untildify(path.join(COMPLETION_DIR, shell, `${name}.${shell}`)); + const script = scriptFromShell(shell); + debug("Writing completion script to", filename); + debug("with", script); + try { + let filecontent = await readFile(script, "utf8"); + filecontent = filecontent.replace(/\{pkgname\}/g, name).replace(/{completer}/g, completer).replace(/\r?\n/g, "\n"); + await mkdir(path.dirname(filename), { recursive: true }); + await writeFile(filename, filecontent); + console.log("=> Wrote completion script to %s file", filename); + } catch (err) { + console.error("ERROR:", err); + } + }; + var install = async (options = { name: "", completer: "", location: "", shell: systemShell() }) => { + debug("Install with options", options); + if (!options.name) { + throw new Error("options.name is required"); + } + if (!options.completer) { + throw new Error("options.completer is required"); + } + if (!options.location) { + throw new Error("options.location is required"); + } + await Promise.all([ + writeToShellConfig(options), + writeToTabtabScript(options), + writeToCompletionScript(options) + ]); + const { location, name } = options; + console.log(` + => Tabtab source line added to ${location} for ${name} package. + + Make sure to reload your SHELL. + `); + }; + var removeLinesFromFilename = async (filename, name) => { + debug("Removing lines from %s file, looking for %s package", filename, name); + if (!await exists(filename)) { + return debug("File %s does not exist", filename); + } + const filecontent = await readFile(filename, "utf8"); + const lines = filecontent.split(/\r?\n/); + const sourceLine = isInShellConfig(filename) ? `# tabtab source for packages` : `# tabtab source for ${name} package`; + const hasLine = !!filecontent.match(`${sourceLine}`); + if (!hasLine) { + return debug("File %s does not include the line: %s", filename, sourceLine); + } + let lineIndex = -1; + const buffer = lines.map((line, index) => { + const match = line.match(sourceLine); + if (match) { + lineIndex = index; + } else if (lineIndex + 3 <= index) { + lineIndex = -1; + } + return lineIndex === -1 ? line : ""; + }).map((line, index, array) => { + const next = array[index + 1]; + if (line === "" && next === "") { + return; + } + return line; + }).filter((line) => line !== void 0).join("\n").trim(); + await writeFile(filename, buffer); + console.log("=> Removed tabtab source lines from %s file", filename); + }; + var uninstall = async (options = { name: "", shell: "" }) => { + debug("Uninstall with options", options); + const { name, shell } = options; + if (!name) { + throw new Error("Unable to uninstall if options.name is missing"); + } + if (!shell) { + throw new Error("Unable to uninstall if options.shell is missing"); + } + const completionScript = untildify(path.join(COMPLETION_DIR, shell, `${name}.${shell}`)); + if (await exists(completionScript)) { + await unlink(completionScript); + console.log("=> Removed completion script (%s)", completionScript); + } + const tabtabScript = untildify(path.join(COMPLETION_DIR, shell, `${TABTAB_SCRIPT_NAME}.${shell}`)); + await removeLinesFromFilename(tabtabScript, name); + const isEmpty = (await readFile(tabtabScript, "utf8")).trim() === ""; + if (isEmpty) { + const shellScript = locationFromShell(); + debug("File %s is empty. Removing source line from %s file", tabtabScript, shellScript); + await removeLinesFromFilename(shellScript, name); + } + console.log("=> Uninstalled completion for %s package", name); + }; + module2.exports = { + install, + uninstall, + checkFilenameForLine, + writeToShellConfig, + writeToTabtabScript, + writeToCompletionScript, + writeLineToFilename + }; + } +}); + +// ../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/index.js +var require_lib5 = __commonJS({ + "../../node_modules/.pnpm/@pnpm+tabtab@0.1.2/node_modules/@pnpm/tabtab/lib/index.js"(exports2, module2) { + var { SHELL_LOCATIONS } = require_constants(); + var prompt = require_prompt2(); + var installer = require_installer(); + var { tabtabDebug, systemShell } = require_utils2(); + var debug = tabtabDebug("tabtab"); + var install = async (options = { name: "", completer: "" }) => { + const { name, completer } = options; + if (!name) + throw new TypeError("options.name is required"); + if (!completer) + throw new TypeError("options.completer is required"); + if (options.shell) { + const location2 = SHELL_LOCATIONS[options.shell]; + if (!location2) { + throw new Error(`Couldn't find shell location for ${options.shell}`); + } + await installer.install({ + name, + completer, + location: location2, + shell: options.shell + }); + return; + } + const { location, shell } = await prompt(); + await installer.install({ + name, + completer, + location, + shell + }); + }; + var uninstall = async (options = { name: "" }) => { + const { name } = options; + if (!name) + throw new TypeError("options.name is required"); + try { + await installer.uninstall({ name }); + } catch (err) { + console.error("ERROR while uninstalling", err); + } + }; + var parseEnv = (env) => { + if (!env) { + throw new Error("parseEnv: You must pass in an environment object."); + } + debug("Parsing env. CWORD: %s, COMP_POINT: %s, COMP_LINE: %s", env.COMP_CWORD, env.COMP_POINT, env.COMP_LINE); + let cword = Number(env.COMP_CWORD); + let point = Number(env.COMP_POINT); + const line = env.COMP_LINE || ""; + if (Number.isNaN(cword)) + cword = 0; + if (Number.isNaN(point)) + point = 0; + const partial = line.slice(0, point); + const parts = line.split(" "); + const prev = parts.slice(0, -1).slice(-1)[0]; + const last = parts.slice(-1).join(""); + const lastPartial = partial.split(" ").slice(-1).join(""); + let complete = true; + if (!env.COMP_CWORD || !env.COMP_POINT || !env.COMP_LINE) { + complete = false; + } + return { + complete, + words: cword, + point, + line, + partial, + last, + lastPartial, + prev + }; + }; + var completionItem = (item) => { + debug("completion item", item); + if (item.name || item.description) { + return { + name: item.name, + description: item.description || "" + }; + } + const shell = systemShell(); + let name = item; + let description = ""; + const matching = /^(.*?)(\\)?:(.*)$/.exec(item); + if (matching) { + [, name, , description] = matching; + } + if (shell === "zsh" && /\\/.test(item)) { + name += "\\"; + } + return { + name, + description + }; + }; + var log2 = (args2) => { + const shell = systemShell(); + if (!Array.isArray(args2)) { + throw new Error("log: Invalid arguments, must be an array"); + } + args2 = args2.map(completionItem).map((item) => { + const { name: rawName, description: rawDescription } = item; + const name = shell === "zsh" ? rawName.replace(/:/g, "\\:") : rawName; + const description = shell === "zsh" ? rawDescription.replace(/:/g, "\\:") : rawDescription; + let str = name; + if (shell === "zsh" && description) { + str = `${name}:${description}`; + } else if (shell === "fish" && description) { + str = `${name} ${description}`; + } + return str; + }); + if (shell === "bash") { + const env = parseEnv(process.env); + args2 = args2.filter((arg) => arg.indexOf(env.last) === 0); + } + for (const arg of args2) { + console.log(`${arg}`); + } + }; + var logFiles = () => { + console.log("__tabtab_complete_files__"); + }; + module2.exports = { + shell: systemShell, + install, + uninstall, + parseEnv, + log: log2, + logFiles + }; + } +}); + +// ../../node_modules/.pnpm/fast-safe-stringify@2.1.1/node_modules/fast-safe-stringify/index.js +var require_fast_safe_stringify = __commonJS({ + "../../node_modules/.pnpm/fast-safe-stringify@2.1.1/node_modules/fast-safe-stringify/index.js"(exports2, module2) { + module2.exports = stringify; + stringify.default = stringify; + stringify.stable = deterministicStringify; + stringify.stableStringify = deterministicStringify; + var LIMIT_REPLACE_NODE = "[...]"; + var CIRCULAR_REPLACE_NODE = "[Circular]"; + var arr = []; + var replacerStack = []; + function defaultOptions() { + return { + depthLimit: Number.MAX_SAFE_INTEGER, + edgesLimit: Number.MAX_SAFE_INTEGER + }; + } + function stringify(obj, replacer, spacer, options) { + if (typeof options === "undefined") { + options = defaultOptions(); + } + decirc(obj, "", 0, [], void 0, 0, options); + var res; + try { + if (replacerStack.length === 0) { + res = JSON.stringify(obj, replacer, spacer); + } else { + res = JSON.stringify(obj, replaceGetterValues(replacer), spacer); + } + } catch (_) { + return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]"); + } finally { + while (arr.length !== 0) { + var part = arr.pop(); + if (part.length === 4) { + Object.defineProperty(part[0], part[1], part[3]); + } else { + part[0][part[1]] = part[2]; + } + } + } + return res; + } + function setReplace(replace, val, k, parent) { + var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k); + if (propertyDescriptor.get !== void 0) { + if (propertyDescriptor.configurable) { + Object.defineProperty(parent, k, { value: replace }); + arr.push([parent, k, val, propertyDescriptor]); + } else { + replacerStack.push([val, k, replace]); + } + } else { + parent[k] = replace; + arr.push([parent, k, val]); + } + } + function decirc(val, k, edgeIndex, stack2, parent, depth, options) { + depth += 1; + var i; + if (typeof val === "object" && val !== null) { + for (i = 0; i < stack2.length; i++) { + if (stack2[i] === val) { + setReplace(CIRCULAR_REPLACE_NODE, val, k, parent); + return; + } + } + if (typeof options.depthLimit !== "undefined" && depth > options.depthLimit) { + setReplace(LIMIT_REPLACE_NODE, val, k, parent); + return; + } + if (typeof options.edgesLimit !== "undefined" && edgeIndex + 1 > options.edgesLimit) { + setReplace(LIMIT_REPLACE_NODE, val, k, parent); + return; + } + stack2.push(val); + if (Array.isArray(val)) { + for (i = 0; i < val.length; i++) { + decirc(val[i], i, i, stack2, val, depth, options); + } + } else { + var keys = Object.keys(val); + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + decirc(val[key], key, i, stack2, val, depth, options); + } + } + stack2.pop(); + } + } + function compareFunction(a, b) { + if (a < b) { + return -1; + } + if (a > b) { + return 1; + } + return 0; + } + function deterministicStringify(obj, replacer, spacer, options) { + if (typeof options === "undefined") { + options = defaultOptions(); + } + var tmp = deterministicDecirc(obj, "", 0, [], void 0, 0, options) || obj; + var res; + try { + if (replacerStack.length === 0) { + res = JSON.stringify(tmp, replacer, spacer); + } else { + res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer); + } + } catch (_) { + return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]"); + } finally { + while (arr.length !== 0) { + var part = arr.pop(); + if (part.length === 4) { + Object.defineProperty(part[0], part[1], part[3]); + } else { + part[0][part[1]] = part[2]; + } + } + } + return res; + } + function deterministicDecirc(val, k, edgeIndex, stack2, parent, depth, options) { + depth += 1; + var i; + if (typeof val === "object" && val !== null) { + for (i = 0; i < stack2.length; i++) { + if (stack2[i] === val) { + setReplace(CIRCULAR_REPLACE_NODE, val, k, parent); + return; + } + } + try { + if (typeof val.toJSON === "function") { + return; + } + } catch (_) { + return; + } + if (typeof options.depthLimit !== "undefined" && depth > options.depthLimit) { + setReplace(LIMIT_REPLACE_NODE, val, k, parent); + return; + } + if (typeof options.edgesLimit !== "undefined" && edgeIndex + 1 > options.edgesLimit) { + setReplace(LIMIT_REPLACE_NODE, val, k, parent); + return; + } + stack2.push(val); + if (Array.isArray(val)) { + for (i = 0; i < val.length; i++) { + deterministicDecirc(val[i], i, i, stack2, val, depth, options); + } + } else { + var tmp = {}; + var keys = Object.keys(val).sort(compareFunction); + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + deterministicDecirc(val[key], key, i, stack2, val, depth, options); + tmp[key] = val[key]; + } + if (typeof parent !== "undefined") { + arr.push([parent, k, val]); + parent[k] = tmp; + } else { + return tmp; + } + } + stack2.pop(); + } + } + function replaceGetterValues(replacer) { + replacer = typeof replacer !== "undefined" ? replacer : function(k, v) { + return v; + }; + return function(key, val) { + if (replacerStack.length > 0) { + for (var i = 0; i < replacerStack.length; i++) { + var part = replacerStack[i]; + if (part[1] === key && part[0] === val) { + val = part[2]; + replacerStack.splice(i, 1); + break; + } + } + } + return replacer.call(this, key, val); + }; + } + } +}); + +// ../../node_modules/.pnpm/individual@3.0.0/node_modules/individual/index.js +var require_individual = __commonJS({ + "../../node_modules/.pnpm/individual@3.0.0/node_modules/individual/index.js"(exports2, module2) { + "use strict"; + var root = typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}; + module2.exports = Individual; + function Individual(key, value) { + if (key in root) { + return root[key]; + } + root[key] = value; + return value; + } + } +}); + +// ../../node_modules/.pnpm/bole@4.0.0/node_modules/bole/format.js +var require_format = __commonJS({ + "../../node_modules/.pnpm/bole@4.0.0/node_modules/bole/format.js"(exports2, module2) { + var utilformat = require("util").format; + function format(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) { + if (a16 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16); + } + if (a15 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); + } + if (a14 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); + } + if (a13 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); + } + if (a12 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); + } + if (a11 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); + } + if (a10 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); + } + if (a9 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6, a7, a8, a9); + } + if (a8 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6, a7, a8); + } + if (a7 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6, a7); + } + if (a6 !== void 0) { + return utilformat(a1, a2, a3, a4, a5, a6); + } + if (a5 !== void 0) { + return utilformat(a1, a2, a3, a4, a5); + } + if (a4 !== void 0) { + return utilformat(a1, a2, a3, a4); + } + if (a3 !== void 0) { + return utilformat(a1, a2, a3); + } + if (a2 !== void 0) { + return utilformat(a1, a2); + } + return a1; + } + module2.exports = format; + } +}); + +// ../../node_modules/.pnpm/bole@4.0.0/node_modules/bole/bole.js +var require_bole = __commonJS({ + "../../node_modules/.pnpm/bole@4.0.0/node_modules/bole/bole.js"(exports2, module2) { + "use strict"; + var _stringify = require_fast_safe_stringify(); + var individual = require_individual()("$$bole", { fastTime: false }); + var format = require_format(); + var levels = "debug info warn error".split(" "); + var hostname = require("os").hostname(); + var hostnameSt = _stringify(hostname); + var pid = process.pid; + var hasObjMode = false; + var scache = []; + for (const level of levels) { + scache[level] = ',"hostname":' + hostnameSt + ',"pid":' + pid + ',"level":"' + level; + Number(scache[level]); + if (!Array.isArray(individual[level])) { + individual[level] = []; + } + } + function stackToString(e) { + let s = e.stack; + let ce; + if (typeof e.cause === "function" && (ce = e.cause())) { + s += "\nCaused by: " + stackToString(ce); + } + return s; + } + function errorToOut(err, out) { + out.err = { + name: err.name, + message: err.message, + code: err.code, + stack: stackToString(err) + }; + } + function requestToOut(req, out) { + out.req = { + method: req.method, + url: req.url, + headers: req.headers, + remoteAddress: req.connection.remoteAddress, + remotePort: req.connection.remotePort + }; + } + function objectToOut(obj, out) { + for (const k in obj) { + if (Object.prototype.hasOwnProperty.call(obj, k) && obj[k] !== void 0) { + out[k] = obj[k]; + } + } + } + function objectMode(stream) { + return stream._writableState && stream._writableState.objectMode === true; + } + function stringify(level, name, message2, obj) { + let s = '{"time":' + (individual.fastTime ? Date.now() : '"' + new Date().toISOString() + '"') + scache[level] + '","name":' + name + (message2 !== void 0 ? ',"message":' + _stringify(message2) : ""); + for (const k in obj) { + s += "," + _stringify(k) + ":" + _stringify(obj[k]); + } + s += "}"; + Number(s); + return s; + } + function extend(level, name, message2, obj) { + const newObj = { + time: individual.fastTime ? Date.now() : new Date().toISOString(), + hostname, + pid, + level, + name + }; + if (message2 !== void 0) { + obj.message = message2; + } + for (const k in obj) { + newObj[k] = obj[k]; + } + return newObj; + } + function levelLogger(level, name) { + const outputs = individual[level]; + const nameSt = _stringify(name); + return function namedLevelLogger(inp, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) { + if (outputs.length === 0) { + return; + } + const out = {}; + let objectOut; + let i = 0; + const l = outputs.length; + let stringified; + let message2; + if (typeof inp === "string" || inp == null) { + if (!(message2 = format(inp, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16))) { + message2 = void 0; + } + } else { + if (inp instanceof Error) { + if (typeof a2 === "object") { + objectToOut(a2, out); + errorToOut(inp, out); + if (!(message2 = format(a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16))) { + message2 = void 0; + } + } else { + errorToOut(inp, out); + if (!(message2 = format(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16))) { + message2 = void 0; + } + } + } else { + if (!(message2 = format(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16))) { + message2 = void 0; + } + } + if (typeof inp === "boolean") { + message2 = String(inp); + } else if (typeof inp === "object" && !(inp instanceof Error)) { + if (inp.method && inp.url && inp.headers && inp.socket) { + requestToOut(inp, out); + } else { + objectToOut(inp, out); + } + } + } + if (l === 1 && !hasObjMode) { + outputs[0].write(Buffer.from(stringify(level, nameSt, message2, out) + "\n")); + return; + } + for (; i < l; i++) { + if (objectMode(outputs[i])) { + if (objectOut === void 0) { + objectOut = extend(level, name, message2, out); + } + outputs[i].write(objectOut); + } else { + if (stringified === void 0) { + stringified = Buffer.from(stringify(level, nameSt, message2, out) + "\n"); + } + outputs[i].write(stringified); + } + } + }; + } + function bole(name) { + function boleLogger(subname) { + return bole(name + ":" + subname); + } + function makeLogger(p, level) { + p[level] = levelLogger(level, name); + return p; + } + return levels.reduce(makeLogger, boleLogger); + } + bole.output = function output(opt) { + let b = false; + if (Array.isArray(opt)) { + opt.forEach(bole.output); + return bole; + } + if (typeof opt.level !== "string") { + throw new TypeError('Must provide a "level" option'); + } + for (const level of levels) { + if (!b && level === opt.level) { + b = true; + } + if (b) { + if (opt.stream && objectMode(opt.stream)) { + hasObjMode = true; + } + individual[level].push(opt.stream); + } + } + return bole; + }; + bole.reset = function reset() { + for (const level of levels) { + individual[level].splice(0, individual[level].length); + } + individual.fastTime = false; + return bole; + }; + bole.setFastTime = function setFastTime(b) { + if (!arguments.length) { + individual.fastTime = true; + } else { + individual.fastTime = b; + } + return bole; + }; + module2.exports = bole; + } +}); + +// ../../node_modules/.pnpm/@pnpm+logger@4.0.0/node_modules/@pnpm/logger/lib/logger.js +var require_logger = __commonJS({ + "../../node_modules/.pnpm/@pnpm+logger@4.0.0/node_modules/@pnpm/logger/lib/logger.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.globalInfo = exports2.globalWarn = void 0; + var bole = require_bole(); + bole.setFastTime(); + exports2.default = bole("pnpm"); + var globalLogger = bole("pnpm:global"); + function globalWarn(message2) { + globalLogger.warn(message2); + } + exports2.globalWarn = globalWarn; + function globalInfo(message2) { + globalLogger.info(message2); + } + exports2.globalInfo = globalInfo; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/stream.js +var require_stream = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/stream.js"(exports2, module2) { + module2.exports = require("stream"); + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/buffer_list.js +var require_buffer_list = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/buffer_list.js"(exports2, module2) { + "use strict"; + function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) + symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } + return keys; + } + function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + if (i % 2) { + ownKeys(Object(source), true).forEach(function(key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + return target; + } + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); + } else { + obj[key] = value; + } + return obj; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) + descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) + _defineProperties(Constructor.prototype, protoProps); + if (staticProps) + _defineProperties(Constructor, staticProps); + return Constructor; + } + var _require = require("buffer"); + var Buffer2 = _require.Buffer; + var _require2 = require("util"); + var inspect = _require2.inspect; + var custom = inspect && inspect.custom || "inspect"; + function copyBuffer(src, target, offset) { + Buffer2.prototype.copy.call(src, target, offset); + } + module2.exports = /* @__PURE__ */ function() { + function BufferList() { + _classCallCheck(this, BufferList); + this.head = null; + this.tail = null; + this.length = 0; + } + _createClass(BufferList, [{ + key: "push", + value: function push(v) { + var entry = { + data: v, + next: null + }; + if (this.length > 0) + this.tail.next = entry; + else + this.head = entry; + this.tail = entry; + ++this.length; + } + }, { + key: "unshift", + value: function unshift(v) { + var entry = { + data: v, + next: this.head + }; + if (this.length === 0) + this.tail = entry; + this.head = entry; + ++this.length; + } + }, { + key: "shift", + value: function shift() { + if (this.length === 0) + return; + var ret = this.head.data; + if (this.length === 1) + this.head = this.tail = null; + else + this.head = this.head.next; + --this.length; + return ret; + } + }, { + key: "clear", + value: function clear() { + this.head = this.tail = null; + this.length = 0; + } + }, { + key: "join", + value: function join(s) { + if (this.length === 0) + return ""; + var p = this.head; + var ret = "" + p.data; + while (p = p.next) { + ret += s + p.data; + } + return ret; + } + }, { + key: "concat", + value: function concat(n) { + if (this.length === 0) + return Buffer2.alloc(0); + var ret = Buffer2.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } + return ret; + } + }, { + key: "consume", + value: function consume(n, hasStrings) { + var ret; + if (n < this.head.data.length) { + ret = this.head.data.slice(0, n); + this.head.data = this.head.data.slice(n); + } else if (n === this.head.data.length) { + ret = this.shift(); + } else { + ret = hasStrings ? this._getString(n) : this._getBuffer(n); + } + return ret; + } + }, { + key: "first", + value: function first() { + return this.head.data; + } + }, { + key: "_getString", + value: function _getString(n) { + var p = this.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) + ret += str; + else + ret += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) + this.head = p.next; + else + this.head = this.tail = null; + } else { + this.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + this.length -= c; + return ret; + } + }, { + key: "_getBuffer", + value: function _getBuffer(n) { + var ret = Buffer2.allocUnsafe(n); + var p = this.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) + this.head = p.next; + else + this.head = this.tail = null; + } else { + this.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + this.length -= c; + return ret; + } + }, { + key: custom, + value: function value(_, options) { + return inspect(this, _objectSpread({}, options, { + depth: 0, + customInspect: false + })); + } + }]); + return BufferList; + }(); + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/destroy.js +var require_destroy = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/destroy.js"(exports2, module2) { + "use strict"; + function destroy(err, cb) { + var _this = this; + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err) { + if (!this._writableState) { + process.nextTick(emitErrorNT, this, err); + } else if (!this._writableState.errorEmitted) { + this._writableState.errorEmitted = true; + process.nextTick(emitErrorNT, this, err); + } + } + return this; + } + if (this._readableState) { + this._readableState.destroyed = true; + } + if (this._writableState) { + this._writableState.destroyed = true; + } + this._destroy(err || null, function(err2) { + if (!cb && err2) { + if (!_this._writableState) { + process.nextTick(emitErrorAndCloseNT, _this, err2); + } else if (!_this._writableState.errorEmitted) { + _this._writableState.errorEmitted = true; + process.nextTick(emitErrorAndCloseNT, _this, err2); + } else { + process.nextTick(emitCloseNT, _this); + } + } else if (cb) { + process.nextTick(emitCloseNT, _this); + cb(err2); + } else { + process.nextTick(emitCloseNT, _this); + } + }); + return this; + } + function emitErrorAndCloseNT(self2, err) { + emitErrorNT(self2, err); + emitCloseNT(self2); + } + function emitCloseNT(self2) { + if (self2._writableState && !self2._writableState.emitClose) + return; + if (self2._readableState && !self2._readableState.emitClose) + return; + self2.emit("close"); + } + function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finalCalled = false; + this._writableState.prefinished = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } + } + function emitErrorNT(self2, err) { + self2.emit("error", err); + } + function errorOrDestroy(stream, err) { + var rState = stream._readableState; + var wState = stream._writableState; + if (rState && rState.autoDestroy || wState && wState.autoDestroy) + stream.destroy(err); + else + stream.emit("error", err); + } + module2.exports = { + destroy, + undestroy, + errorOrDestroy + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/errors.js +var require_errors = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/errors.js"(exports2, module2) { + "use strict"; + var codes = {}; + function createErrorType(code, message2, Base) { + if (!Base) { + Base = Error; + } + function getMessage(arg1, arg2, arg3) { + if (typeof message2 === "string") { + return message2; + } else { + return message2(arg1, arg2, arg3); + } + } + class NodeError extends Base { + constructor(arg1, arg2, arg3) { + super(getMessage(arg1, arg2, arg3)); + } + } + NodeError.prototype.name = Base.name; + NodeError.prototype.code = code; + codes[code] = NodeError; + } + function oneOf(expected, thing) { + if (Array.isArray(expected)) { + const len = expected.length; + expected = expected.map((i) => String(i)); + if (len > 2) { + return `one of ${thing} ${expected.slice(0, len - 1).join(", ")}, or ` + expected[len - 1]; + } else if (len === 2) { + return `one of ${thing} ${expected[0]} or ${expected[1]}`; + } else { + return `of ${thing} ${expected[0]}`; + } + } else { + return `of ${thing} ${String(expected)}`; + } + } + function startsWith(str, search, pos) { + return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; + } + function endsWith(str, search, this_len) { + if (this_len === void 0 || this_len > str.length) { + this_len = str.length; + } + return str.substring(this_len - search.length, this_len) === search; + } + function includes(str, search, start) { + if (typeof start !== "number") { + start = 0; + } + if (start + search.length > str.length) { + return false; + } else { + return str.indexOf(search, start) !== -1; + } + } + createErrorType("ERR_INVALID_OPT_VALUE", function(name, value) { + return 'The value "' + value + '" is invalid for option "' + name + '"'; + }, TypeError); + createErrorType("ERR_INVALID_ARG_TYPE", function(name, expected, actual) { + let determiner; + if (typeof expected === "string" && startsWith(expected, "not ")) { + determiner = "must not be"; + expected = expected.replace(/^not /, ""); + } else { + determiner = "must be"; + } + let msg; + if (endsWith(name, " argument")) { + msg = `The ${name} ${determiner} ${oneOf(expected, "type")}`; + } else { + const type = includes(name, ".") ? "property" : "argument"; + msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, "type")}`; + } + msg += `. Received type ${typeof actual}`; + return msg; + }, TypeError); + createErrorType("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"); + createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(name) { + return "The " + name + " method is not implemented"; + }); + createErrorType("ERR_STREAM_PREMATURE_CLOSE", "Premature close"); + createErrorType("ERR_STREAM_DESTROYED", function(name) { + return "Cannot call " + name + " after a stream was destroyed"; + }); + createErrorType("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"); + createErrorType("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"); + createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end"); + createErrorType("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError); + createErrorType("ERR_UNKNOWN_ENCODING", function(arg) { + return "Unknown encoding: " + arg; + }, TypeError); + createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"); + module2.exports.codes = codes; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/state.js +var require_state2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/state.js"(exports2, module2) { + "use strict"; + var ERR_INVALID_OPT_VALUE = require_errors().codes.ERR_INVALID_OPT_VALUE; + function highWaterMarkFrom(options, isDuplex, duplexKey) { + return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; + } + function getHighWaterMark(state, options, duplexKey, isDuplex) { + var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); + if (hwm != null) { + if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { + var name = isDuplex ? duplexKey : "highWaterMark"; + throw new ERR_INVALID_OPT_VALUE(name, hwm); + } + return Math.floor(hwm); + } + return state.objectMode ? 16 : 16 * 1024; + } + module2.exports = { + getHighWaterMark + }; + } +}); + +// ../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js +var require_inherits_browser = __commonJS({ + "../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(exports2, module2) { + if (typeof Object.create === "function") { + module2.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + } + }; + } else { + module2.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + var TempCtor = function() { + }; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + } + }; + } + } +}); + +// ../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js +var require_inherits = __commonJS({ + "../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js"(exports2, module2) { + try { + util = require("util"); + if (typeof util.inherits !== "function") + throw ""; + module2.exports = util.inherits; + } catch (e) { + module2.exports = require_inherits_browser(); + } + var util; + } +}); + +// ../../node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/node.js +var require_node2 = __commonJS({ + "../../node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/node.js"(exports2, module2) { + module2.exports = require("util").deprecate; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_writable.js +var require_stream_writable = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_writable.js"(exports2, module2) { + "use strict"; + module2.exports = Writable; + function CorkedRequest(state) { + var _this = this; + this.next = null; + this.entry = null; + this.finish = function() { + onCorkedFinish(_this, state); + }; + } + var Duplex; + Writable.WritableState = WritableState; + var internalUtil = { + deprecate: require_node2() + }; + var Stream = require_stream(); + var Buffer2 = require("buffer").Buffer; + var OurUint8Array = global.Uint8Array || function() { + }; + function _uint8ArrayToBuffer(chunk) { + return Buffer2.from(chunk); + } + function _isUint8Array(obj) { + return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; + } + var destroyImpl = require_destroy(); + var _require = require_state2(); + var getHighWaterMark = _require.getHighWaterMark; + var _require$codes = require_errors().codes; + var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE; + var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED; + var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK; + var ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE; + var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; + var ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES; + var ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END; + var ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; + var errorOrDestroy = destroyImpl.errorOrDestroy; + require_inherits()(Writable, Stream); + function nop() { + } + function WritableState(options, stream, isDuplex) { + Duplex = Duplex || require_stream_duplex(); + options = options || {}; + if (typeof isDuplex !== "boolean") + isDuplex = stream instanceof Duplex; + this.objectMode = !!options.objectMode; + if (isDuplex) + this.objectMode = this.objectMode || !!options.writableObjectMode; + this.highWaterMark = getHighWaterMark(this, options, "writableHighWaterMark", isDuplex); + this.finalCalled = false; + this.needDrain = false; + this.ending = false; + this.ended = false; + this.finished = false; + this.destroyed = false; + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + this.defaultEncoding = options.defaultEncoding || "utf8"; + this.length = 0; + this.writing = false; + this.corked = 0; + this.sync = true; + this.bufferProcessing = false; + this.onwrite = function(er) { + onwrite(stream, er); + }; + this.writecb = null; + this.writelen = 0; + this.bufferedRequest = null; + this.lastBufferedRequest = null; + this.pendingcb = 0; + this.prefinished = false; + this.errorEmitted = false; + this.emitClose = options.emitClose !== false; + this.autoDestroy = !!options.autoDestroy; + this.bufferedRequestCount = 0; + this.corkedRequestsFree = new CorkedRequest(this); + } + WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; + }; + (function() { + try { + Object.defineProperty(WritableState.prototype, "buffer", { + get: internalUtil.deprecate(function writableStateBufferGetter() { + return this.getBuffer(); + }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") + }); + } catch (_) { + } + })(); + var realHasInstance; + if (typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function") { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function value(object) { + if (realHasInstance.call(this, object)) + return true; + if (this !== Writable) + return false; + return object && object._writableState instanceof WritableState; + } + }); + } else { + realHasInstance = function realHasInstance2(object) { + return object instanceof this; + }; + } + function Writable(options) { + Duplex = Duplex || require_stream_duplex(); + var isDuplex = this instanceof Duplex; + if (!isDuplex && !realHasInstance.call(Writable, this)) + return new Writable(options); + this._writableState = new WritableState(options, this, isDuplex); + this.writable = true; + if (options) { + if (typeof options.write === "function") + this._write = options.write; + if (typeof options.writev === "function") + this._writev = options.writev; + if (typeof options.destroy === "function") + this._destroy = options.destroy; + if (typeof options.final === "function") + this._final = options.final; + } + Stream.call(this); + } + Writable.prototype.pipe = function() { + errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); + }; + function writeAfterEnd(stream, cb) { + var er = new ERR_STREAM_WRITE_AFTER_END(); + errorOrDestroy(stream, er); + process.nextTick(cb, er); + } + function validChunk(stream, state, chunk, cb) { + var er; + if (chunk === null) { + er = new ERR_STREAM_NULL_VALUES(); + } else if (typeof chunk !== "string" && !state.objectMode) { + er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer"], chunk); + } + if (er) { + errorOrDestroy(stream, er); + process.nextTick(cb, er); + return false; + } + return true; + } + Writable.prototype.write = function(chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + if (isBuf && !Buffer2.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (typeof encoding === "function") { + cb = encoding; + encoding = null; + } + if (isBuf) + encoding = "buffer"; + else if (!encoding) + encoding = state.defaultEncoding; + if (typeof cb !== "function") + cb = nop; + if (state.ending) + writeAfterEnd(this, cb); + else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + return ret; + }; + Writable.prototype.cork = function() { + this._writableState.corked++; + }; + Writable.prototype.uncork = function() { + var state = this._writableState; + if (state.corked) { + state.corked--; + if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) + clearBuffer(this, state); + } + }; + Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + if (typeof encoding === "string") + encoding = encoding.toLowerCase(); + if (!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((encoding + "").toLowerCase()) > -1)) + throw new ERR_UNKNOWN_ENCODING(encoding); + this._writableState.defaultEncoding = encoding; + return this; + }; + Object.defineProperty(Writable.prototype, "writableBuffer", { + enumerable: false, + get: function get() { + return this._writableState && this._writableState.getBuffer(); + } + }); + function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === "string") { + chunk = Buffer2.from(chunk, encoding); + } + return chunk; + } + Object.defineProperty(Writable.prototype, "writableHighWaterMark", { + enumerable: false, + get: function get() { + return this._writableState.highWaterMark; + } + }); + function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = "buffer"; + chunk = newChunk; + } + } + var len = state.objectMode ? 1 : chunk.length; + state.length += len; + var ret = state.length < state.highWaterMark; + if (!ret) + state.needDrain = true; + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk, + encoding, + isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + return ret; + } + function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (state.destroyed) + state.onwrite(new ERR_STREAM_DESTROYED("write")); + else if (writev) + stream._writev(chunk, state.onwrite); + else + stream._write(chunk, encoding, state.onwrite); + state.sync = false; + } + function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + if (sync) { + process.nextTick(cb, er); + process.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + errorOrDestroy(stream, er); + } else { + cb(er); + stream._writableState.errorEmitted = true; + errorOrDestroy(stream, er); + finishMaybe(stream, state); + } + } + function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; + } + function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + if (typeof cb !== "function") + throw new ERR_MULTIPLE_CALLBACK(); + onwriteStateUpdate(state); + if (er) + onwriteError(stream, state, sync, er, cb); + else { + var finished = needFinish(state) || stream.destroyed; + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + if (sync) { + process.nextTick(afterWrite, stream, state, finished, cb); + } else { + afterWrite(stream, state, finished, cb); + } + } + } + function afterWrite(stream, state, finished, cb) { + if (!finished) + onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); + } + function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit("drain"); + } + } + function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + if (stream._writev && entry && entry.next) { + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) + allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + doWrite(stream, state, true, state.length, buffer, "", holder.finish); + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + state.bufferedRequestCount = 0; + } else { + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + if (state.writing) { + break; + } + } + if (entry === null) + state.lastBufferedRequest = null; + } + state.bufferedRequest = entry; + state.bufferProcessing = false; + } + Writable.prototype._write = function(chunk, encoding, cb) { + cb(new ERR_METHOD_NOT_IMPLEMENTED("_write()")); + }; + Writable.prototype._writev = null; + Writable.prototype.end = function(chunk, encoding, cb) { + var state = this._writableState; + if (typeof chunk === "function") { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === "function") { + cb = encoding; + encoding = null; + } + if (chunk !== null && chunk !== void 0) + this.write(chunk, encoding); + if (state.corked) { + state.corked = 1; + this.uncork(); + } + if (!state.ending) + endWritable(this, state, cb); + return this; + }; + Object.defineProperty(Writable.prototype, "writableLength", { + enumerable: false, + get: function get() { + return this._writableState.length; + } + }); + function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; + } + function callFinal(stream, state) { + stream._final(function(err) { + state.pendingcb--; + if (err) { + errorOrDestroy(stream, err); + } + state.prefinished = true; + stream.emit("prefinish"); + finishMaybe(stream, state); + }); + } + function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === "function" && !state.destroyed) { + state.pendingcb++; + state.finalCalled = true; + process.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit("prefinish"); + } + } + } + function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit("finish"); + if (state.autoDestroy) { + var rState = stream._readableState; + if (!rState || rState.autoDestroy && rState.endEmitted) { + stream.destroy(); + } + } + } + } + return need; + } + function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) + process.nextTick(cb); + else + stream.once("finish", cb); + } + state.ended = true; + stream.writable = false; + } + function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + state.corkedRequestsFree.next = corkReq; + } + Object.defineProperty(Writable.prototype, "destroyed", { + enumerable: false, + get: function get() { + if (this._writableState === void 0) { + return false; + } + return this._writableState.destroyed; + }, + set: function set(value) { + if (!this._writableState) { + return; + } + this._writableState.destroyed = value; + } + }); + Writable.prototype.destroy = destroyImpl.destroy; + Writable.prototype._undestroy = destroyImpl.undestroy; + Writable.prototype._destroy = function(err, cb) { + cb(err); + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_duplex.js +var require_stream_duplex = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_duplex.js"(exports2, module2) { + "use strict"; + var objectKeys = Object.keys || function(obj) { + var keys2 = []; + for (var key in obj) { + keys2.push(key); + } + return keys2; + }; + module2.exports = Duplex; + var Readable = require_stream_readable(); + var Writable = require_stream_writable(); + require_inherits()(Duplex, Readable); + { + keys = objectKeys(Writable.prototype); + for (v = 0; v < keys.length; v++) { + method = keys[v]; + if (!Duplex.prototype[method]) + Duplex.prototype[method] = Writable.prototype[method]; + } + } + var keys; + var method; + var v; + function Duplex(options) { + if (!(this instanceof Duplex)) + return new Duplex(options); + Readable.call(this, options); + Writable.call(this, options); + this.allowHalfOpen = true; + if (options) { + if (options.readable === false) + this.readable = false; + if (options.writable === false) + this.writable = false; + if (options.allowHalfOpen === false) { + this.allowHalfOpen = false; + this.once("end", onend); + } + } + } + Object.defineProperty(Duplex.prototype, "writableHighWaterMark", { + enumerable: false, + get: function get() { + return this._writableState.highWaterMark; + } + }); + Object.defineProperty(Duplex.prototype, "writableBuffer", { + enumerable: false, + get: function get() { + return this._writableState && this._writableState.getBuffer(); + } + }); + Object.defineProperty(Duplex.prototype, "writableLength", { + enumerable: false, + get: function get() { + return this._writableState.length; + } + }); + function onend() { + if (this._writableState.ended) + return; + process.nextTick(onEndNT, this); + } + function onEndNT(self2) { + self2.end(); + } + Object.defineProperty(Duplex.prototype, "destroyed", { + enumerable: false, + get: function get() { + if (this._readableState === void 0 || this._writableState === void 0) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function set(value) { + if (this._readableState === void 0 || this._writableState === void 0) { + return; + } + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } + }); + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +var require_end_of_stream = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports2, module2) { + "use strict"; + var ERR_STREAM_PREMATURE_CLOSE = require_errors().codes.ERR_STREAM_PREMATURE_CLOSE; + function once(callback) { + var called = false; + return function() { + if (called) + return; + called = true; + for (var _len = arguments.length, args2 = new Array(_len), _key = 0; _key < _len; _key++) { + args2[_key] = arguments[_key]; + } + callback.apply(this, args2); + }; + } + function noop() { + } + function isRequest(stream) { + return stream.setHeader && typeof stream.abort === "function"; + } + function eos(stream, opts, callback) { + if (typeof opts === "function") + return eos(stream, null, opts); + if (!opts) + opts = {}; + callback = once(callback || noop); + var readable = opts.readable || opts.readable !== false && stream.readable; + var writable = opts.writable || opts.writable !== false && stream.writable; + var onlegacyfinish = function onlegacyfinish2() { + if (!stream.writable) + onfinish(); + }; + var writableEnded = stream._writableState && stream._writableState.finished; + var onfinish = function onfinish2() { + writable = false; + writableEnded = true; + if (!readable) + callback.call(stream); + }; + var readableEnded = stream._readableState && stream._readableState.endEmitted; + var onend = function onend2() { + readable = false; + readableEnded = true; + if (!writable) + callback.call(stream); + }; + var onerror = function onerror2(err) { + callback.call(stream, err); + }; + var onclose = function onclose2() { + var err; + if (readable && !readableEnded) { + if (!stream._readableState || !stream._readableState.ended) + err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); + } + if (writable && !writableEnded) { + if (!stream._writableState || !stream._writableState.ended) + err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); + } + }; + var onrequest = function onrequest2() { + stream.req.on("finish", onfinish); + }; + if (isRequest(stream)) { + stream.on("complete", onfinish); + stream.on("abort", onclose); + if (stream.req) + onrequest(); + else + stream.on("request", onrequest); + } else if (writable && !stream._writableState) { + stream.on("end", onlegacyfinish); + stream.on("close", onlegacyfinish); + } + stream.on("end", onend); + stream.on("finish", onfinish); + if (opts.error !== false) + stream.on("error", onerror); + stream.on("close", onclose); + return function() { + stream.removeListener("complete", onfinish); + stream.removeListener("abort", onclose); + stream.removeListener("request", onrequest); + if (stream.req) + stream.req.removeListener("finish", onfinish); + stream.removeListener("end", onlegacyfinish); + stream.removeListener("close", onlegacyfinish); + stream.removeListener("finish", onfinish); + stream.removeListener("end", onend); + stream.removeListener("error", onerror); + stream.removeListener("close", onclose); + }; + } + module2.exports = eos; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/async_iterator.js +var require_async_iterator = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/async_iterator.js"(exports2, module2) { + "use strict"; + var _Object$setPrototypeO; + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); + } else { + obj[key] = value; + } + return obj; + } + var finished = require_end_of_stream(); + var kLastResolve = Symbol("lastResolve"); + var kLastReject = Symbol("lastReject"); + var kError = Symbol("error"); + var kEnded = Symbol("ended"); + var kLastPromise = Symbol("lastPromise"); + var kHandlePromise = Symbol("handlePromise"); + var kStream = Symbol("stream"); + function createIterResult(value, done) { + return { + value, + done + }; + } + function readAndResolve(iter) { + var resolve = iter[kLastResolve]; + if (resolve !== null) { + var data = iter[kStream].read(); + if (data !== null) { + iter[kLastPromise] = null; + iter[kLastResolve] = null; + iter[kLastReject] = null; + resolve(createIterResult(data, false)); + } + } + } + function onReadable(iter) { + process.nextTick(readAndResolve, iter); + } + function wrapForNext(lastPromise, iter) { + return function(resolve, reject) { + lastPromise.then(function() { + if (iter[kEnded]) { + resolve(createIterResult(void 0, true)); + return; + } + iter[kHandlePromise](resolve, reject); + }, reject); + }; + } + var AsyncIteratorPrototype = Object.getPrototypeOf(function() { + }); + var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { + get stream() { + return this[kStream]; + }, + next: function next() { + var _this = this; + var error = this[kError]; + if (error !== null) { + return Promise.reject(error); + } + if (this[kEnded]) { + return Promise.resolve(createIterResult(void 0, true)); + } + if (this[kStream].destroyed) { + return new Promise(function(resolve, reject) { + process.nextTick(function() { + if (_this[kError]) { + reject(_this[kError]); + } else { + resolve(createIterResult(void 0, true)); + } + }); + }); + } + var lastPromise = this[kLastPromise]; + var promise; + if (lastPromise) { + promise = new Promise(wrapForNext(lastPromise, this)); + } else { + var data = this[kStream].read(); + if (data !== null) { + return Promise.resolve(createIterResult(data, false)); + } + promise = new Promise(this[kHandlePromise]); + } + this[kLastPromise] = promise; + return promise; + } + }, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function() { + return this; + }), _defineProperty(_Object$setPrototypeO, "return", function _return() { + var _this2 = this; + return new Promise(function(resolve, reject) { + _this2[kStream].destroy(null, function(err) { + if (err) { + reject(err); + return; + } + resolve(createIterResult(void 0, true)); + }); + }); + }), _Object$setPrototypeO), AsyncIteratorPrototype); + var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator2(stream) { + var _Object$create; + var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { + value: stream, + writable: true + }), _defineProperty(_Object$create, kLastResolve, { + value: null, + writable: true + }), _defineProperty(_Object$create, kLastReject, { + value: null, + writable: true + }), _defineProperty(_Object$create, kError, { + value: null, + writable: true + }), _defineProperty(_Object$create, kEnded, { + value: stream._readableState.endEmitted, + writable: true + }), _defineProperty(_Object$create, kHandlePromise, { + value: function value(resolve, reject) { + var data = iterator[kStream].read(); + if (data) { + iterator[kLastPromise] = null; + iterator[kLastResolve] = null; + iterator[kLastReject] = null; + resolve(createIterResult(data, false)); + } else { + iterator[kLastResolve] = resolve; + iterator[kLastReject] = reject; + } + }, + writable: true + }), _Object$create)); + iterator[kLastPromise] = null; + finished(stream, function(err) { + if (err && err.code !== "ERR_STREAM_PREMATURE_CLOSE") { + var reject = iterator[kLastReject]; + if (reject !== null) { + iterator[kLastPromise] = null; + iterator[kLastResolve] = null; + iterator[kLastReject] = null; + reject(err); + } + iterator[kError] = err; + return; + } + var resolve = iterator[kLastResolve]; + if (resolve !== null) { + iterator[kLastPromise] = null; + iterator[kLastResolve] = null; + iterator[kLastReject] = null; + resolve(createIterResult(void 0, true)); + } + iterator[kEnded] = true; + }); + stream.on("readable", onReadable.bind(null, iterator)); + return iterator; + }; + module2.exports = createReadableStreamAsyncIterator; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/from.js +var require_from = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/from.js"(exports2, module2) { + "use strict"; + function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); + } + } + function _asyncToGenerator(fn2) { + return function() { + var self2 = this, args2 = arguments; + return new Promise(function(resolve, reject) { + var gen = fn2.apply(self2, args2); + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + } + _next(void 0); + }); + }; + } + function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) + symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } + return keys; + } + function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + if (i % 2) { + ownKeys(Object(source), true).forEach(function(key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + return target; + } + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); + } else { + obj[key] = value; + } + return obj; + } + var ERR_INVALID_ARG_TYPE = require_errors().codes.ERR_INVALID_ARG_TYPE; + function from(Readable, iterable, opts) { + var iterator; + if (iterable && typeof iterable.next === "function") { + iterator = iterable; + } else if (iterable && iterable[Symbol.asyncIterator]) + iterator = iterable[Symbol.asyncIterator](); + else if (iterable && iterable[Symbol.iterator]) + iterator = iterable[Symbol.iterator](); + else + throw new ERR_INVALID_ARG_TYPE("iterable", ["Iterable"], iterable); + var readable = new Readable(_objectSpread({ + objectMode: true + }, opts)); + var reading = false; + readable._read = function() { + if (!reading) { + reading = true; + next(); + } + }; + function next() { + return _next2.apply(this, arguments); + } + function _next2() { + _next2 = _asyncToGenerator(function* () { + try { + var _ref = yield iterator.next(), value = _ref.value, done = _ref.done; + if (done) { + readable.push(null); + } else if (readable.push(yield value)) { + next(); + } else { + reading = false; + } + } catch (err) { + readable.destroy(err); + } + }); + return _next2.apply(this, arguments); + } + return readable; + } + module2.exports = from; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_readable.js +var require_stream_readable = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_readable.js"(exports2, module2) { + "use strict"; + module2.exports = Readable; + var Duplex; + Readable.ReadableState = ReadableState; + var EE = require("events").EventEmitter; + var EElistenerCount = function EElistenerCount2(emitter, type) { + return emitter.listeners(type).length; + }; + var Stream = require_stream(); + var Buffer2 = require("buffer").Buffer; + var OurUint8Array = global.Uint8Array || function() { + }; + function _uint8ArrayToBuffer(chunk) { + return Buffer2.from(chunk); + } + function _isUint8Array(obj) { + return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; + } + var debugUtil = require("util"); + var debug; + if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog("stream"); + } else { + debug = function debug2() { + }; + } + var BufferList = require_buffer_list(); + var destroyImpl = require_destroy(); + var _require = require_state2(); + var getHighWaterMark = _require.getHighWaterMark; + var _require$codes = require_errors().codes; + var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE; + var ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF; + var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED; + var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; + var StringDecoder; + var createReadableStreamAsyncIterator; + var from; + require_inherits()(Readable, Stream); + var errorOrDestroy = destroyImpl.errorOrDestroy; + var kProxyEvents = ["error", "close", "destroy", "pause", "resume"]; + function prependListener(emitter, event, fn2) { + if (typeof emitter.prependListener === "function") + return emitter.prependListener(event, fn2); + if (!emitter._events || !emitter._events[event]) + emitter.on(event, fn2); + else if (Array.isArray(emitter._events[event])) + emitter._events[event].unshift(fn2); + else + emitter._events[event] = [fn2, emitter._events[event]]; + } + function ReadableState(options, stream, isDuplex) { + Duplex = Duplex || require_stream_duplex(); + options = options || {}; + if (typeof isDuplex !== "boolean") + isDuplex = stream instanceof Duplex; + this.objectMode = !!options.objectMode; + if (isDuplex) + this.objectMode = this.objectMode || !!options.readableObjectMode; + this.highWaterMark = getHighWaterMark(this, options, "readableHighWaterMark", isDuplex); + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + this.sync = true; + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + this.paused = true; + this.emitClose = options.emitClose !== false; + this.autoDestroy = !!options.autoDestroy; + this.destroyed = false; + this.defaultEncoding = options.defaultEncoding || "utf8"; + this.awaitDrain = 0; + this.readingMore = false; + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) + StringDecoder = require("string_decoder/").StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } + } + function Readable(options) { + Duplex = Duplex || require_stream_duplex(); + if (!(this instanceof Readable)) + return new Readable(options); + var isDuplex = this instanceof Duplex; + this._readableState = new ReadableState(options, this, isDuplex); + this.readable = true; + if (options) { + if (typeof options.read === "function") + this._read = options.read; + if (typeof options.destroy === "function") + this._destroy = options.destroy; + } + Stream.call(this); + } + Object.defineProperty(Readable.prototype, "destroyed", { + enumerable: false, + get: function get() { + if (this._readableState === void 0) { + return false; + } + return this._readableState.destroyed; + }, + set: function set(value) { + if (!this._readableState) { + return; + } + this._readableState.destroyed = value; + } + }); + Readable.prototype.destroy = destroyImpl.destroy; + Readable.prototype._undestroy = destroyImpl.undestroy; + Readable.prototype._destroy = function(err, cb) { + cb(err); + }; + Readable.prototype.push = function(chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + if (!state.objectMode) { + if (typeof chunk === "string") { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer2.from(chunk, encoding); + encoding = ""; + } + skipChunkCheck = true; + } + } else { + skipChunkCheck = true; + } + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); + }; + Readable.prototype.unshift = function(chunk) { + return readableAddChunk(this, chunk, null, true, false); + }; + function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + debug("readableAddChunk", chunk); + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) + er = chunkInvalid(state, chunk); + if (er) { + errorOrDestroy(stream, er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== "string" && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer2.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (addToFront) { + if (state.endEmitted) + errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT()); + else + addChunk(stream, state, chunk, true); + } else if (state.ended) { + errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); + } else if (state.destroyed) { + return false; + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) + addChunk(stream, state, chunk, false); + else + maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); + } + } + } else if (!addToFront) { + state.reading = false; + maybeReadMore(stream, state); + } + } + return !state.ended && (state.length < state.highWaterMark || state.length === 0); + } + function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + state.awaitDrain = 0; + stream.emit("data", chunk); + } else { + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) + state.buffer.unshift(chunk); + else + state.buffer.push(chunk); + if (state.needReadable) + emitReadable(stream); + } + maybeReadMore(stream, state); + } + function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) { + er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer", "Uint8Array"], chunk); + } + return er; + } + Readable.prototype.isPaused = function() { + return this._readableState.flowing === false; + }; + Readable.prototype.setEncoding = function(enc) { + if (!StringDecoder) + StringDecoder = require("string_decoder/").StringDecoder; + var decoder = new StringDecoder(enc); + this._readableState.decoder = decoder; + this._readableState.encoding = this._readableState.decoder.encoding; + var p = this._readableState.buffer.head; + var content = ""; + while (p !== null) { + content += decoder.write(p.data); + p = p.next; + } + this._readableState.buffer.clear(); + if (content !== "") + this._readableState.buffer.push(content); + this._readableState.length = content.length; + return this; + }; + var MAX_HWM = 1073741824; + function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; + } + function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) + return 0; + if (state.objectMode) + return 1; + if (n !== n) { + if (state.flowing && state.length) + return state.buffer.head.data.length; + else + return state.length; + } + if (n > state.highWaterMark) + state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) + return n; + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; + } + Readable.prototype.read = function(n) { + debug("read", n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + if (n !== 0) + state.emittedReadable = false; + if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { + debug("read: emitReadable", state.length, state.ended); + if (state.length === 0 && state.ended) + endReadable(this); + else + emitReadable(this); + return null; + } + n = howMuchToRead(n, state); + if (n === 0 && state.ended) { + if (state.length === 0) + endReadable(this); + return null; + } + var doRead = state.needReadable; + debug("need readable", doRead); + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug("length less than watermark", doRead); + } + if (state.ended || state.reading) { + doRead = false; + debug("reading or ended", doRead); + } else if (doRead) { + debug("do read"); + state.reading = true; + state.sync = true; + if (state.length === 0) + state.needReadable = true; + this._read(state.highWaterMark); + state.sync = false; + if (!state.reading) + n = howMuchToRead(nOrig, state); + } + var ret; + if (n > 0) + ret = fromList(n, state); + else + ret = null; + if (ret === null) { + state.needReadable = state.length <= state.highWaterMark; + n = 0; + } else { + state.length -= n; + state.awaitDrain = 0; + } + if (state.length === 0) { + if (!state.ended) + state.needReadable = true; + if (nOrig !== n && state.ended) + endReadable(this); + } + if (ret !== null) + this.emit("data", ret); + return ret; + }; + function onEofChunk(stream, state) { + debug("onEofChunk"); + if (state.ended) + return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + if (state.sync) { + emitReadable(stream); + } else { + state.needReadable = false; + if (!state.emittedReadable) { + state.emittedReadable = true; + emitReadable_(stream); + } + } + } + function emitReadable(stream) { + var state = stream._readableState; + debug("emitReadable", state.needReadable, state.emittedReadable); + state.needReadable = false; + if (!state.emittedReadable) { + debug("emitReadable", state.flowing); + state.emittedReadable = true; + process.nextTick(emitReadable_, stream); + } + } + function emitReadable_(stream) { + var state = stream._readableState; + debug("emitReadable_", state.destroyed, state.length, state.ended); + if (!state.destroyed && (state.length || state.ended)) { + stream.emit("readable"); + state.emittedReadable = false; + } + state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; + flow(stream); + } + function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + process.nextTick(maybeReadMore_, stream, state); + } + } + function maybeReadMore_(stream, state) { + while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { + var len = state.length; + debug("maybeReadMore read 0"); + stream.read(0); + if (len === state.length) + break; + } + state.readingMore = false; + } + Readable.prototype._read = function(n) { + errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED("_read()")); + }; + Readable.prototype.pipe = function(dest, pipeOpts) { + var src = this; + var state = this._readableState; + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug("pipe count=%d opts=%j", state.pipesCount, pipeOpts); + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) + process.nextTick(endFn); + else + src.once("end", endFn); + dest.on("unpipe", onunpipe); + function onunpipe(readable, unpipeInfo) { + debug("onunpipe"); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } + } + } + function onend() { + debug("onend"); + dest.end(); + } + var ondrain = pipeOnDrain(src); + dest.on("drain", ondrain); + var cleanedUp = false; + function cleanup() { + debug("cleanup"); + dest.removeListener("close", onclose); + dest.removeListener("finish", onfinish); + dest.removeListener("drain", ondrain); + dest.removeListener("error", onerror); + dest.removeListener("unpipe", onunpipe); + src.removeListener("end", onend); + src.removeListener("end", unpipe); + src.removeListener("data", ondata); + cleanedUp = true; + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) + ondrain(); + } + src.on("data", ondata); + function ondata(chunk) { + debug("ondata"); + var ret = dest.write(chunk); + debug("dest.write", ret); + if (ret === false) { + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug("false write response, pause", state.awaitDrain); + state.awaitDrain++; + } + src.pause(); + } + } + function onerror(er) { + debug("onerror", er); + unpipe(); + dest.removeListener("error", onerror); + if (EElistenerCount(dest, "error") === 0) + errorOrDestroy(dest, er); + } + prependListener(dest, "error", onerror); + function onclose() { + dest.removeListener("finish", onfinish); + unpipe(); + } + dest.once("close", onclose); + function onfinish() { + debug("onfinish"); + dest.removeListener("close", onclose); + unpipe(); + } + dest.once("finish", onfinish); + function unpipe() { + debug("unpipe"); + src.unpipe(dest); + } + dest.emit("pipe", src); + if (!state.flowing) { + debug("pipe resume"); + src.resume(); + } + return dest; + }; + function pipeOnDrain(src) { + return function pipeOnDrainFunctionResult() { + var state = src._readableState; + debug("pipeOnDrain", state.awaitDrain); + if (state.awaitDrain) + state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, "data")) { + state.flowing = true; + flow(src); + } + }; + } + Readable.prototype.unpipe = function(dest) { + var state = this._readableState; + var unpipeInfo = { + hasUnpiped: false + }; + if (state.pipesCount === 0) + return this; + if (state.pipesCount === 1) { + if (dest && dest !== state.pipes) + return this; + if (!dest) + dest = state.pipes; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) + dest.emit("unpipe", this, unpipeInfo); + return this; + } + if (!dest) { + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + for (var i = 0; i < len; i++) { + dests[i].emit("unpipe", this, { + hasUnpiped: false + }); + } + return this; + } + var index = indexOf(state.pipes, dest); + if (index === -1) + return this; + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) + state.pipes = state.pipes[0]; + dest.emit("unpipe", this, unpipeInfo); + return this; + }; + Readable.prototype.on = function(ev, fn2) { + var res = Stream.prototype.on.call(this, ev, fn2); + var state = this._readableState; + if (ev === "data") { + state.readableListening = this.listenerCount("readable") > 0; + if (state.flowing !== false) + this.resume(); + } else if (ev === "readable") { + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.flowing = false; + state.emittedReadable = false; + debug("on readable", state.length, state.reading); + if (state.length) { + emitReadable(this); + } else if (!state.reading) { + process.nextTick(nReadingNextTick, this); + } + } + } + return res; + }; + Readable.prototype.addListener = Readable.prototype.on; + Readable.prototype.removeListener = function(ev, fn2) { + var res = Stream.prototype.removeListener.call(this, ev, fn2); + if (ev === "readable") { + process.nextTick(updateReadableListening, this); + } + return res; + }; + Readable.prototype.removeAllListeners = function(ev) { + var res = Stream.prototype.removeAllListeners.apply(this, arguments); + if (ev === "readable" || ev === void 0) { + process.nextTick(updateReadableListening, this); + } + return res; + }; + function updateReadableListening(self2) { + var state = self2._readableState; + state.readableListening = self2.listenerCount("readable") > 0; + if (state.resumeScheduled && !state.paused) { + state.flowing = true; + } else if (self2.listenerCount("data") > 0) { + self2.resume(); + } + } + function nReadingNextTick(self2) { + debug("readable nexttick read 0"); + self2.read(0); + } + Readable.prototype.resume = function() { + var state = this._readableState; + if (!state.flowing) { + debug("resume"); + state.flowing = !state.readableListening; + resume(this, state); + } + state.paused = false; + return this; + }; + function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + process.nextTick(resume_, stream, state); + } + } + function resume_(stream, state) { + debug("resume", state.reading); + if (!state.reading) { + stream.read(0); + } + state.resumeScheduled = false; + stream.emit("resume"); + flow(stream); + if (state.flowing && !state.reading) + stream.read(0); + } + Readable.prototype.pause = function() { + debug("call pause flowing=%j", this._readableState.flowing); + if (this._readableState.flowing !== false) { + debug("pause"); + this._readableState.flowing = false; + this.emit("pause"); + } + this._readableState.paused = true; + return this; + }; + function flow(stream) { + var state = stream._readableState; + debug("flow", state.flowing); + while (state.flowing && stream.read() !== null) { + ; + } + } + Readable.prototype.wrap = function(stream) { + var _this = this; + var state = this._readableState; + var paused = false; + stream.on("end", function() { + debug("wrapped end"); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) + _this.push(chunk); + } + _this.push(null); + }); + stream.on("data", function(chunk) { + debug("wrapped data"); + if (state.decoder) + chunk = state.decoder.write(chunk); + if (state.objectMode && (chunk === null || chunk === void 0)) + return; + else if (!state.objectMode && (!chunk || !chunk.length)) + return; + var ret = _this.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + for (var i in stream) { + if (this[i] === void 0 && typeof stream[i] === "function") { + this[i] = function methodWrap(method) { + return function methodWrapReturnFunction() { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } + this._read = function(n2) { + debug("wrapped _read", n2); + if (paused) { + paused = false; + stream.resume(); + } + }; + return this; + }; + if (typeof Symbol === "function") { + Readable.prototype[Symbol.asyncIterator] = function() { + if (createReadableStreamAsyncIterator === void 0) { + createReadableStreamAsyncIterator = require_async_iterator(); + } + return createReadableStreamAsyncIterator(this); + }; + } + Object.defineProperty(Readable.prototype, "readableHighWaterMark", { + enumerable: false, + get: function get() { + return this._readableState.highWaterMark; + } + }); + Object.defineProperty(Readable.prototype, "readableBuffer", { + enumerable: false, + get: function get() { + return this._readableState && this._readableState.buffer; + } + }); + Object.defineProperty(Readable.prototype, "readableFlowing", { + enumerable: false, + get: function get() { + return this._readableState.flowing; + }, + set: function set(state) { + if (this._readableState) { + this._readableState.flowing = state; + } + } + }); + Readable._fromList = fromList; + Object.defineProperty(Readable.prototype, "readableLength", { + enumerable: false, + get: function get() { + return this._readableState.length; + } + }); + function fromList(n, state) { + if (state.length === 0) + return null; + var ret; + if (state.objectMode) + ret = state.buffer.shift(); + else if (!n || n >= state.length) { + if (state.decoder) + ret = state.buffer.join(""); + else if (state.buffer.length === 1) + ret = state.buffer.first(); + else + ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + ret = state.buffer.consume(n, state.decoder); + } + return ret; + } + function endReadable(stream) { + var state = stream._readableState; + debug("endReadable", state.endEmitted); + if (!state.endEmitted) { + state.ended = true; + process.nextTick(endReadableNT, state, stream); + } + } + function endReadableNT(state, stream) { + debug("endReadableNT", state.endEmitted, state.length); + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit("end"); + if (state.autoDestroy) { + var wState = stream._writableState; + if (!wState || wState.autoDestroy && wState.finished) { + stream.destroy(); + } + } + } + } + if (typeof Symbol === "function") { + Readable.from = function(iterable, opts) { + if (from === void 0) { + from = require_from(); + } + return from(Readable, iterable, opts); + }; + } + function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) + return i; + } + return -1; + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_transform.js +var require_stream_transform = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_transform.js"(exports2, module2) { + "use strict"; + module2.exports = Transform; + var _require$codes = require_errors().codes; + var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED; + var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK; + var ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING; + var ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; + var Duplex = require_stream_duplex(); + require_inherits()(Transform, Duplex); + function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + var cb = ts.writecb; + if (cb === null) { + return this.emit("error", new ERR_MULTIPLE_CALLBACK()); + } + ts.writechunk = null; + ts.writecb = null; + if (data != null) + this.push(data); + cb(er); + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } + } + function Transform(options) { + if (!(this instanceof Transform)) + return new Transform(options); + Duplex.call(this, options); + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; + this._readableState.needReadable = true; + this._readableState.sync = false; + if (options) { + if (typeof options.transform === "function") + this._transform = options.transform; + if (typeof options.flush === "function") + this._flush = options.flush; + } + this.on("prefinish", prefinish); + } + function prefinish() { + var _this = this; + if (typeof this._flush === "function" && !this._readableState.destroyed) { + this._flush(function(er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } + } + Transform.prototype.push = function(chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); + }; + Transform.prototype._transform = function(chunk, encoding, cb) { + cb(new ERR_METHOD_NOT_IMPLEMENTED("_transform()")); + }; + Transform.prototype._write = function(chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) + this._read(rs.highWaterMark); + } + }; + Transform.prototype._read = function(n) { + var ts = this._transformState; + if (ts.writechunk !== null && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + ts.needTransform = true; + } + }; + Transform.prototype._destroy = function(err, cb) { + Duplex.prototype._destroy.call(this, err, function(err2) { + cb(err2); + }); + }; + function done(stream, er, data) { + if (er) + return stream.emit("error", er); + if (data != null) + stream.push(data); + if (stream._writableState.length) + throw new ERR_TRANSFORM_WITH_LENGTH_0(); + if (stream._transformState.transforming) + throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); + return stream.push(null); + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_passthrough.js +var require_stream_passthrough = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_passthrough.js"(exports2, module2) { + "use strict"; + module2.exports = PassThrough; + var Transform = require_stream_transform(); + require_inherits()(PassThrough, Transform); + function PassThrough(options) { + if (!(this instanceof PassThrough)) + return new PassThrough(options); + Transform.call(this, options); + } + PassThrough.prototype._transform = function(chunk, encoding, cb) { + cb(null, chunk); + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/pipeline.js +var require_pipeline = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports2, module2) { + "use strict"; + var eos; + function once(callback) { + var called = false; + return function() { + if (called) + return; + called = true; + callback.apply(void 0, arguments); + }; + } + var _require$codes = require_errors().codes; + var ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS; + var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; + function noop(err) { + if (err) + throw err; + } + function isRequest(stream) { + return stream.setHeader && typeof stream.abort === "function"; + } + function destroyer(stream, reading, writing, callback) { + callback = once(callback); + var closed = false; + stream.on("close", function() { + closed = true; + }); + if (eos === void 0) + eos = require_end_of_stream(); + eos(stream, { + readable: reading, + writable: writing + }, function(err) { + if (err) + return callback(err); + closed = true; + callback(); + }); + var destroyed = false; + return function(err) { + if (closed) + return; + if (destroyed) + return; + destroyed = true; + if (isRequest(stream)) + return stream.abort(); + if (typeof stream.destroy === "function") + return stream.destroy(); + callback(err || new ERR_STREAM_DESTROYED("pipe")); + }; + } + function call(fn2) { + fn2(); + } + function pipe(from, to) { + return from.pipe(to); + } + function popCallback(streams) { + if (!streams.length) + return noop; + if (typeof streams[streams.length - 1] !== "function") + return noop; + return streams.pop(); + } + function pipeline() { + for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { + streams[_key] = arguments[_key]; + } + var callback = popCallback(streams); + if (Array.isArray(streams[0])) + streams = streams[0]; + if (streams.length < 2) { + throw new ERR_MISSING_ARGS("streams"); + } + var error; + var destroys = streams.map(function(stream, i) { + var reading = i < streams.length - 1; + var writing = i > 0; + return destroyer(stream, reading, writing, function(err) { + if (!error) + error = err; + if (err) + destroys.forEach(call); + if (reading) + return; + destroys.forEach(call); + callback(error); + }); + }); + return streams.reduce(pipe); + } + module2.exports = pipeline; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/readable.js +var require_readable = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/readable.js"(exports2, module2) { + var Stream = require("stream"); + if (process.env.READABLE_STREAM === "disable" && Stream) { + module2.exports = Stream.Readable; + Object.assign(module2.exports, Stream); + module2.exports.Stream = Stream; + } else { + exports2 = module2.exports = require_stream_readable(); + exports2.Stream = Stream || exports2; + exports2.Readable = exports2; + exports2.Writable = require_stream_writable(); + exports2.Duplex = require_stream_duplex(); + exports2.Transform = require_stream_transform(); + exports2.PassThrough = require_stream_passthrough(); + exports2.finished = require_end_of_stream(); + exports2.pipeline = require_pipeline(); + } + } +}); + +// ../../node_modules/.pnpm/through2@4.0.2/node_modules/through2/through2.js +var require_through2 = __commonJS({ + "../../node_modules/.pnpm/through2@4.0.2/node_modules/through2/through2.js"(exports2, module2) { + var { Transform } = require_readable(); + function inherits(fn2, sup) { + fn2.super_ = sup; + fn2.prototype = Object.create(sup.prototype, { + constructor: { value: fn2, enumerable: false, writable: true, configurable: true } + }); + } + function through2(construct) { + return (options, transform, flush) => { + if (typeof options === "function") { + flush = transform; + transform = options; + options = {}; + } + if (typeof transform !== "function") { + transform = (chunk, enc, cb) => cb(null, chunk); + } + if (typeof flush !== "function") { + flush = null; + } + return construct(options, transform, flush); + }; + } + var make = through2((options, transform, flush) => { + const t2 = new Transform(options); + t2._transform = transform; + if (flush) { + t2._flush = flush; + } + return t2; + }); + var ctor = through2((options, transform, flush) => { + function Through2(override) { + if (!(this instanceof Through2)) { + return new Through2(override); + } + this.options = Object.assign({}, options, override); + Transform.call(this, this.options); + this._transform = transform; + if (flush) { + this._flush = flush; + } + } + inherits(Through2, Transform); + return Through2; + }); + var obj = through2(function(options, transform, flush) { + const t2 = new Transform(Object.assign({ objectMode: true, highWaterMark: 16 }, options)); + t2._transform = transform; + if (flush) { + t2._flush = flush; + } + return t2; + }); + module2.exports = make; + module2.exports.ctor = ctor; + module2.exports.obj = obj; + } +}); + +// ../../node_modules/.pnpm/split2@3.2.2/node_modules/split2/index.js +var require_split2 = __commonJS({ + "../../node_modules/.pnpm/split2@3.2.2/node_modules/split2/index.js"(exports2, module2) { + "use strict"; + var { Transform } = require_readable(); + var { StringDecoder } = require("string_decoder"); + var kLast = Symbol("last"); + var kDecoder = Symbol("decoder"); + function transform(chunk, enc, cb) { + var list; + if (this.overflow) { + var buf = this[kDecoder].write(chunk); + list = buf.split(this.matcher); + if (list.length === 1) + return cb(); + list.shift(); + this.overflow = false; + } else { + this[kLast] += this[kDecoder].write(chunk); + list = this[kLast].split(this.matcher); + } + this[kLast] = list.pop(); + for (var i = 0; i < list.length; i++) { + try { + push(this, this.mapper(list[i])); + } catch (error) { + return cb(error); + } + } + this.overflow = this[kLast].length > this.maxLength; + if (this.overflow && !this.skipOverflow) + return cb(new Error("maximum buffer reached")); + cb(); + } + function flush(cb) { + this[kLast] += this[kDecoder].end(); + if (this[kLast]) { + try { + push(this, this.mapper(this[kLast])); + } catch (error) { + return cb(error); + } + } + cb(); + } + function push(self2, val) { + if (val !== void 0) { + self2.push(val); + } + } + function noop(incoming) { + return incoming; + } + function split(matcher, mapper, options) { + matcher = matcher || /\r?\n/; + mapper = mapper || noop; + options = options || {}; + switch (arguments.length) { + case 1: + if (typeof matcher === "function") { + mapper = matcher; + matcher = /\r?\n/; + } else if (typeof matcher === "object" && !(matcher instanceof RegExp)) { + options = matcher; + matcher = /\r?\n/; + } + break; + case 2: + if (typeof matcher === "function") { + options = mapper; + mapper = matcher; + matcher = /\r?\n/; + } else if (typeof mapper === "object") { + options = mapper; + mapper = noop; + } + } + options = Object.assign({}, options); + options.transform = transform; + options.flush = flush; + options.readableObjectMode = true; + const stream = new Transform(options); + stream[kLast] = ""; + stream[kDecoder] = new StringDecoder("utf8"); + stream.matcher = matcher; + stream.mapper = mapper; + stream.maxLength = options.maxLength; + stream.skipOverflow = options.skipOverflow; + stream.overflow = false; + return stream; + } + module2.exports = split; + } +}); + +// ../../node_modules/.pnpm/json-stringify-safe@5.0.1/node_modules/json-stringify-safe/stringify.js +var require_stringify = __commonJS({ + "../../node_modules/.pnpm/json-stringify-safe@5.0.1/node_modules/json-stringify-safe/stringify.js"(exports2, module2) { + exports2 = module2.exports = stringify; + exports2.getSerialize = serializer; + function stringify(obj, replacer, spaces, cycleReplacer) { + return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces); + } + function serializer(replacer, cycleReplacer) { + var stack2 = [], keys = []; + if (cycleReplacer == null) + cycleReplacer = function(key, value) { + if (stack2[0] === value) + return "[Circular ~]"; + return "[Circular ~." + keys.slice(0, stack2.indexOf(value)).join(".") + "]"; + }; + return function(key, value) { + if (stack2.length > 0) { + var thisPos = stack2.indexOf(this); + ~thisPos ? stack2.splice(thisPos + 1) : stack2.push(this); + ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key); + if (~stack2.indexOf(value)) + value = cycleReplacer.call(this, key, value); + } else + stack2.push(value); + return replacer == null ? value : replacer.call(this, key, value); + }; + } + } +}); + +// ../../node_modules/.pnpm/ndjson@2.0.0/node_modules/ndjson/index.js +var require_ndjson = __commonJS({ + "../../node_modules/.pnpm/ndjson@2.0.0/node_modules/ndjson/index.js"(exports2, module2) { + var through = require_through2(); + var split = require_split2(); + var { EOL } = require("os"); + var stringify = require_stringify(); + module2.exports.stringify = (opts) => through.obj(opts, (obj, _, cb) => { + cb(null, stringify(obj) + EOL); + }); + module2.exports.parse = (opts) => { + opts = opts || {}; + opts.strict = opts.strict !== false; + function parseRow(row) { + try { + if (row) + return JSON.parse(row); + } catch (e) { + if (opts.strict) { + this.emit("error", new Error("Could not parse row " + row.slice(0, 50) + "...")); + } + } + } + return split(parseRow, opts); + }; + } +}); + +// ../../node_modules/.pnpm/@pnpm+logger@4.0.0/node_modules/@pnpm/logger/lib/streamParser.js +var require_streamParser = __commonJS({ + "../../node_modules/.pnpm/@pnpm+logger@4.0.0/node_modules/@pnpm/logger/lib/streamParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createStreamParser = void 0; + var bole = require_bole(); + var ndjson = require_ndjson(); + exports2.default = createStreamParser(); + function createStreamParser() { + const sp = ndjson.parse(); + bole.output([ + { + level: "debug", + stream: sp + } + ]); + return sp; + } + exports2.createStreamParser = createStreamParser; + } +}); + +// ../../node_modules/.pnpm/@pnpm+logger@4.0.0/node_modules/@pnpm/logger/lib/writeToConsole.js +var require_writeToConsole = __commonJS({ + "../../node_modules/.pnpm/@pnpm+logger@4.0.0/node_modules/@pnpm/logger/lib/writeToConsole.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var bole = require_bole(); + function default_1() { + bole.output([ + { + level: "debug", + stream: process.stdout + } + ]); + } + exports2.default = default_1; + } +}); + +// ../../node_modules/.pnpm/@pnpm+logger@4.0.0/node_modules/@pnpm/logger/lib/index.js +var require_lib6 = __commonJS({ + "../../node_modules/.pnpm/@pnpm+logger@4.0.0/node_modules/@pnpm/logger/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.writeToConsole = exports2.createStreamParser = exports2.streamParser = exports2.globalWarn = exports2.globalInfo = void 0; + var logger_1 = require_logger(); + Object.defineProperty(exports2, "globalInfo", { enumerable: true, get: function() { + return logger_1.globalInfo; + } }); + Object.defineProperty(exports2, "globalWarn", { enumerable: true, get: function() { + return logger_1.globalWarn; + } }); + var streamParser_1 = require_streamParser(); + exports2.streamParser = streamParser_1.default; + Object.defineProperty(exports2, "createStreamParser", { enumerable: true, get: function() { + return streamParser_1.createStreamParser; + } }); + var writeToConsole_1 = require_writeToConsole(); + exports2.writeToConsole = writeToConsole_1.default; + exports2.default = logger_1.default; + } +}); + +// lib/err.js +var require_err = __commonJS({ + "lib/err.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var logger_1 = __importDefault(require_lib6()); + function err(error) { + if (!global["reporterInitialized"]) { + console.log(error); + process.exit(1); + } + if (global["reporterInitialized"] === "silent") { + process.exit(1); + } + if (error.name != null && error.name !== "pnpm" && !error.name.startsWith("pnpm:")) { + error.name = "pnpm"; + } + logger_1.default.error(error, error); + setTimeout(() => process.exit(1), 0); + } + exports2.default = err; + } +}); + +// ../../node_modules/.pnpm/signal-exit@3.0.4/node_modules/signal-exit/signals.js +var require_signals = __commonJS({ + "../../node_modules/.pnpm/signal-exit@3.0.4/node_modules/signal-exit/signals.js"(exports2, module2) { + module2.exports = [ + "SIGABRT", + "SIGALRM", + "SIGHUP", + "SIGINT", + "SIGTERM" + ]; + if (process.platform !== "win32") { + module2.exports.push("SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT"); + } + if (process.platform === "linux") { + module2.exports.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT", "SIGUNUSED"); + } + } +}); + +// ../../node_modules/.pnpm/signal-exit@3.0.4/node_modules/signal-exit/index.js +var require_signal_exit = __commonJS({ + "../../node_modules/.pnpm/signal-exit@3.0.4/node_modules/signal-exit/index.js"(exports2, module2) { + var process2 = global.process; + if (typeof process2 !== "object" || !process2) { + module2.exports = () => { + }; + } else { + assert = require("assert"); + signals = require_signals(); + isWin = /^win/i.test(process2.platform); + EE = require("events"); + if (typeof EE !== "function") { + EE = EE.EventEmitter; + } + if (process2.__signal_exit_emitter__) { + emitter = process2.__signal_exit_emitter__; + } else { + emitter = process2.__signal_exit_emitter__ = new EE(); + emitter.count = 0; + emitter.emitted = {}; + } + if (!emitter.infinite) { + emitter.setMaxListeners(Infinity); + emitter.infinite = true; + } + module2.exports = function(cb, opts) { + if (global.process !== process2) { + return; + } + assert.equal(typeof cb, "function", "a callback must be provided for exit handler"); + if (loaded === false) { + load(); + } + var ev = "exit"; + if (opts && opts.alwaysLast) { + ev = "afterexit"; + } + var remove = function() { + emitter.removeListener(ev, cb); + if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) { + unload(); + } + }; + emitter.on(ev, cb); + return remove; + }; + unload = function unload2() { + if (!loaded || global.process !== process2) { + return; + } + loaded = false; + signals.forEach(function(sig) { + try { + process2.removeListener(sig, sigListeners[sig]); + } catch (er) { + } + }); + process2.emit = originalProcessEmit; + process2.reallyExit = originalProcessReallyExit; + emitter.count -= 1; + }; + module2.exports.unload = unload; + emit = function emit2(event, code, signal) { + if (emitter.emitted[event]) { + return; + } + emitter.emitted[event] = true; + emitter.emit(event, code, signal); + }; + sigListeners = {}; + signals.forEach(function(sig) { + sigListeners[sig] = function listener() { + if (process2 !== global.process) { + return; + } + var listeners = process2.listeners(sig); + if (listeners.length === emitter.count) { + unload(); + emit("exit", null, sig); + emit("afterexit", null, sig); + if (isWin && sig === "SIGHUP") { + sig = "SIGINT"; + } + process2.kill(process2.pid, sig); + } + }; + }); + module2.exports.signals = function() { + return signals; + }; + loaded = false; + load = function load2() { + if (loaded || process2 !== global.process) { + return; + } + loaded = true; + emitter.count += 1; + signals = signals.filter(function(sig) { + try { + process2.on(sig, sigListeners[sig]); + return true; + } catch (er) { + return false; + } + }); + process2.emit = processEmit; + process2.reallyExit = processReallyExit; + }; + module2.exports.load = load; + originalProcessReallyExit = process2.reallyExit; + processReallyExit = function processReallyExit2(code) { + if (process2 !== global.process) { + return; + } + process2.exitCode = code || 0; + emit("exit", process2.exitCode, null); + emit("afterexit", process2.exitCode, null); + originalProcessReallyExit.call(process2, process2.exitCode); + }; + originalProcessEmit = process2.emit; + processEmit = function processEmit2(ev, arg) { + if (ev === "exit" && process2 === global.process) { + if (arg !== void 0) { + process2.exitCode = arg; + } + var ret = originalProcessEmit.apply(this, arguments); + emit("exit", process2.exitCode, null); + emit("afterexit", process2.exitCode, null); + return ret; + } else { + return originalProcessEmit.apply(this, arguments); + } + }; + } + var assert; + var signals; + var isWin; + var EE; + var emitter; + var unload; + var emit; + var sigListeners; + var loaded; + var load; + var originalProcessReallyExit; + var processReallyExit; + var originalProcessEmit; + var processEmit; + } +}); + +// ../../node_modules/.pnpm/array-find-index@1.0.2/node_modules/array-find-index/index.js +var require_array_find_index = __commonJS({ + "../../node_modules/.pnpm/array-find-index@1.0.2/node_modules/array-find-index/index.js"(exports2, module2) { + "use strict"; + module2.exports = function(arr, predicate, ctx) { + if (typeof Array.prototype.findIndex === "function") { + return arr.findIndex(predicate, ctx); + } + if (typeof predicate !== "function") { + throw new TypeError("predicate must be a function"); + } + var list = Object(arr); + var len = list.length; + if (len === 0) { + return -1; + } + for (var i = 0; i < len; i++) { + if (predicate.call(ctx, list[i], i, list)) { + return i; + } + } + return -1; + }; + } +}); + +// ../../node_modules/.pnpm/currently-unhandled@0.4.1/node_modules/currently-unhandled/core.js +var require_core = __commonJS({ + "../../node_modules/.pnpm/currently-unhandled@0.4.1/node_modules/currently-unhandled/core.js"(exports2, module2) { + "use strict"; + var arrayFindIndex = require_array_find_index(); + module2.exports = function() { + var unhandledRejections = []; + function onUnhandledRejection(reason, promise) { + unhandledRejections.push({ reason, promise }); + } + function onRejectionHandled(promise) { + var index = arrayFindIndex(unhandledRejections, function(x) { + return x.promise === promise; + }); + unhandledRejections.splice(index, 1); + } + function currentlyUnhandled() { + return unhandledRejections.map(function(entry) { + return { + reason: entry.reason, + promise: entry.promise + }; + }); + } + return { + onUnhandledRejection, + onRejectionHandled, + currentlyUnhandled + }; + }; + } +}); + +// ../../node_modules/.pnpm/currently-unhandled@0.4.1/node_modules/currently-unhandled/index.js +var require_currently_unhandled = __commonJS({ + "../../node_modules/.pnpm/currently-unhandled@0.4.1/node_modules/currently-unhandled/index.js"(exports2, module2) { + "use strict"; + var core = require_core(); + module2.exports = function(p) { + p = p || process; + var c = core(); + p.on("unhandledRejection", c.onUnhandledRejection); + p.on("rejectionHandled", c.onRejectionHandled); + return c.currentlyUnhandled; + }; + } +}); + +// ../../node_modules/.pnpm/loud-rejection@2.2.0/node_modules/loud-rejection/index.js +var require_loud_rejection = __commonJS({ + "../../node_modules/.pnpm/loud-rejection@2.2.0/node_modules/loud-rejection/index.js"(exports2, module2) { + "use strict"; + var util = require("util"); + var onExit = require_signal_exit(); + var currentlyUnhandled = require_currently_unhandled(); + var installed = false; + var loudRejection = (log2 = console.error) => { + if (installed) { + return; + } + installed = true; + const listUnhandled = currentlyUnhandled(); + onExit(() => { + const unhandledRejections = listUnhandled(); + if (unhandledRejections.length > 0) { + for (const unhandledRejection of unhandledRejections) { + let error = unhandledRejection.reason; + if (!(error instanceof Error)) { + error = new Error(`Promise rejected with value: ${util.inspect(error)}`); + } + log2(error.stack); + } + process.exitCode = 1; + } + }); + }; + module2.exports = loudRejection; + module2.exports.default = loudRejection; + } +}); + +// ../constants/lib/index.js +var require_lib7 = __commonJS({ + "../constants/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.WORKSPACE_MANIFEST_FILENAME = exports2.LAYOUT_VERSION = exports2.ENGINE_NAME = exports2.LOCKFILE_VERSION = exports2.WANTED_LOCKFILE = void 0; + exports2.WANTED_LOCKFILE = "pnpm-lock.yaml"; + exports2.LOCKFILE_VERSION = 5.3; + exports2.ENGINE_NAME = `${process.platform}-${process.arch}-node-${process.version.split(".")[0]}`; + exports2.LAYOUT_VERSION = 5; + exports2.WORKSPACE_MANIFEST_FILENAME = "pnpm-workspace.yaml"; + } +}); + +// ../error/lib/index.js +var require_lib8 = __commonJS({ + "../error/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.FetchError = void 0; + var PnpmError = class extends Error { + constructor(code, message2, opts) { + super(message2); + this.code = `ERR_PNPM_${code}`; + this.hint = opts === null || opts === void 0 ? void 0 : opts.hint; + this.attempts = opts === null || opts === void 0 ? void 0 : opts.attempts; + } + }; + exports2.default = PnpmError; + var FetchError = class extends PnpmError { + constructor(request, response, hint) { + const message2 = `GET ${request.url}: ${response.statusText} - ${response.status}`; + const authHeaderValue = request.authHeaderValue ? hideAuthInformation(request.authHeaderValue) : void 0; + if (response.status === 401 || response.status === 403 || response.status === 404) { + hint = hint ? `${hint} + +` : ""; + if (authHeaderValue) { + hint += `An authorization header was used: ${authHeaderValue}`; + } else { + hint += "No authorization header was set for the request."; + } + } + super(`FETCH_${response.status}`, message2, { hint }); + this.request = request; + this.response = response; + } + }; + exports2.FetchError = FetchError; + function hideAuthInformation(authHeaderValue) { + const [authType, token] = authHeaderValue.split(" "); + return `${authType} ${token.substring(0, 4)}[hidden]`; + } + } +}); + +// ../../node_modules/.pnpm/crypto-random-string@2.0.0/node_modules/crypto-random-string/index.js +var require_crypto_random_string = __commonJS({ + "../../node_modules/.pnpm/crypto-random-string@2.0.0/node_modules/crypto-random-string/index.js"(exports2, module2) { + "use strict"; + var crypto = require("crypto"); + module2.exports = (length) => { + if (!Number.isFinite(length)) { + throw new TypeError("Expected a finite number"); + } + return crypto.randomBytes(Math.ceil(length / 2)).toString("hex").slice(0, length); + }; + } +}); + +// ../../node_modules/.pnpm/unique-string@2.0.0/node_modules/unique-string/index.js +var require_unique_string = __commonJS({ + "../../node_modules/.pnpm/unique-string@2.0.0/node_modules/unique-string/index.js"(exports2, module2) { + "use strict"; + var cryptoRandomString = require_crypto_random_string(); + module2.exports = () => cryptoRandomString(32); + } +}); + +// ../../node_modules/.pnpm/path-temp@2.0.0/node_modules/path-temp/index.js +var require_path_temp = __commonJS({ + "../../node_modules/.pnpm/path-temp@2.0.0/node_modules/path-temp/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var uniqueString = require_unique_string(); + module2.exports = function pathTemp(folder) { + return path.join(folder, `_tmp_${process.pid}_${uniqueString()}`); + }; + } +}); + +// ../../node_modules/.pnpm/can-write-to-dir@1.1.1/node_modules/can-write-to-dir/index.js +var require_can_write_to_dir = __commonJS({ + "../../node_modules/.pnpm/can-write-to-dir@1.1.1/node_modules/can-write-to-dir/index.js"(exports2, module2) { + "use strict"; + var defaultFS = require("fs"); + var pathTemp = require_path_temp(); + module2.exports = async (dir, customFS) => { + const fs = customFS || defaultFS; + const tempFile = pathTemp(dir); + try { + await fs.promises.writeFile(tempFile, "", "utf8"); + fs.promises.unlink(tempFile).catch(() => { + }); + return true; + } catch (err) { + if (err.code === "EACCES" || err.code === "EPERM" || err.code === "EROFS") { + return false; + } + throw err; + } + }; + module2.exports.sync = (dir, customFS) => { + const fs = customFS || defaultFS; + const tempFile = pathTemp(dir); + try { + fs.writeFileSync(tempFile, "", "utf8"); + fs.unlinkSync(tempFile); + return true; + } catch (err) { + if (err.code === "EACCES" || err.code === "EPERM" || err.code === "EROFS") { + return false; + } + throw err; + } + }; + } +}); + +// ../../node_modules/.pnpm/path-name@1.0.0/node_modules/path-name/index.js +var require_path_name = __commonJS({ + "../../node_modules/.pnpm/path-name@1.0.0/node_modules/path-name/index.js"(exports2, module2) { + "use strict"; + var PATH; + if (process.platform === "win32") { + PATH = "Path"; + Object.keys(process.env).forEach((e) => { + if (e.match(/^PATH$/i)) { + PATH = e; + } + }); + } else { + PATH = "PATH"; + } + module2.exports = PATH; + } +}); + +// ../global-bin-dir/lib/index.js +var require_lib9 = __commonJS({ + "../global-bin-dir/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = __importDefault(require("fs")); + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var can_write_to_dir_1 = require_can_write_to_dir(); + var path_name_1 = __importDefault(require_path_name()); + function default_1(knownCandidates = [], { shouldAllowWrite = true } = {}) { + var _a, _b; + if (!process.env[path_name_1.default]) { + throw new error_1.default("NO_PATH_ENV", `Couldn't find a global directory for executables because the "${path_name_1.default}" environment variable is not set.`); + } + const dirs = (_b = (_a = process.env[path_name_1.default]) === null || _a === void 0 ? void 0 : _a.split(path_1.default.delimiter)) !== null && _b !== void 0 ? _b : []; + const nodeBinDir = path_1.default.dirname(process.execPath); + return pickBestGlobalBinDir(dirs, [ + ...knownCandidates, + nodeBinDir + ], shouldAllowWrite); + } + exports2.default = default_1; + var areDirsEqual = (dir1, dir2) => path_1.default.relative(dir1, dir2) === ""; + function pickBestGlobalBinDir(dirs, knownCandidates, shouldAllowWrite) { + const noWriteAccessDirs = []; + const pnpmDir = dirs.find((dir) => isUnderDir("pnpm", dir.toLowerCase())); + if (pnpmDir != null) { + if (canWriteToDirAndExists(pnpmDir)) + return pnpmDir; + throw new error_1.default("PNPM_DIR_NOT_WRITABLE", `The CLI has no write access to the pnpm home directory at ${pnpmDir}`); + } + for (const dir of dirs) { + const lowCaseDir = dir.toLowerCase(); + if ((isUnderDir("node", lowCaseDir) || isUnderDir("nodejs", lowCaseDir) || isUnderDir("npm", lowCaseDir) || knownCandidates.some((candidate) => areDirsEqual(candidate, dir)) || dirHasNodeRelatedCommand(dir)) && !isUnderDir("_npx", lowCaseDir)) { + if (canWriteToDirAndExists(dir)) + return dir; + noWriteAccessDirs.push(dir); + } + } + if (noWriteAccessDirs.length === 0) { + throw new error_1.default("NO_GLOBAL_BIN_DIR", "Couldn't find a suitable global executables directory.", { + hint: `There should be a node, nodejs, npm, or pnpm directory in the "${path_name_1.default}" environment variable` + }); + } + if (shouldAllowWrite) { + throw new error_1.default("GLOBAL_BIN_DIR_PERMISSION", "No write access to the found global executable directories", { + hint: `The found directories: + ${noWriteAccessDirs.join("\n")}` + }); + } + return noWriteAccessDirs[0]; + } + var NODE_RELATED_COMMANDS = new Set(["pnpm", "npm", "node"]); + function dirHasNodeRelatedCommand(dir) { + try { + return fs_1.default.readdirSync(dir, { withFileTypes: true }).filter((entry) => !entry.isDirectory()).map(({ name }) => name.toLowerCase()).some((file) => NODE_RELATED_COMMANDS.has(file.split(".")[0])); + } catch (err) { + return false; + } + } + function isUnderDir(dir, target) { + target = target.endsWith(path_1.default.sep) ? target : `${target}${path_1.default.sep}`; + return target.includes(`${path_1.default.sep}${dir}${path_1.default.sep}`) || target.includes(`${path_1.default.sep}.${dir}${path_1.default.sep}`); + } + function canWriteToDirAndExists(dir) { + try { + return can_write_to_dir_1.sync(dir); + } catch (err) { + if (err.code !== "ENOENT") + throw err; + return false; + } + } + } +}); + +// ../../node_modules/.pnpm/camelcase@6.2.0/node_modules/camelcase/index.js +var require_camelcase = __commonJS({ + "../../node_modules/.pnpm/camelcase@6.2.0/node_modules/camelcase/index.js"(exports2, module2) { + "use strict"; + var preserveCamelCase = (string, locale) => { + let isLastCharLower = false; + let isLastCharUpper = false; + let isLastLastCharUpper = false; + for (let i = 0; i < string.length; i++) { + const character = string[i]; + if (isLastCharLower && /[\p{Lu}]/u.test(character)) { + string = string.slice(0, i) + "-" + string.slice(i); + isLastCharLower = false; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = true; + i++; + } else if (isLastCharUpper && isLastLastCharUpper && /[\p{Ll}]/u.test(character)) { + string = string.slice(0, i - 1) + "-" + string.slice(i - 1); + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = false; + isLastCharLower = true; + } else { + isLastCharLower = character.toLocaleLowerCase(locale) === character && character.toLocaleUpperCase(locale) !== character; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = character.toLocaleUpperCase(locale) === character && character.toLocaleLowerCase(locale) !== character; + } + } + return string; + }; + var preserveConsecutiveUppercase = (input) => { + return input.replace(/^[\p{Lu}](?![\p{Lu}])/gu, (m1) => m1.toLowerCase()); + }; + var postProcess = (input, options) => { + return input.replace(/[_.\- ]+([\p{Alpha}\p{N}_]|$)/gu, (_, p1) => p1.toLocaleUpperCase(options.locale)).replace(/\d+([\p{Alpha}\p{N}_]|$)/gu, (m) => m.toLocaleUpperCase(options.locale)); + }; + var camelCase = (input, options) => { + if (!(typeof input === "string" || Array.isArray(input))) { + throw new TypeError("Expected the input to be `string | string[]`"); + } + options = { + pascalCase: false, + preserveConsecutiveUppercase: false, + ...options + }; + if (Array.isArray(input)) { + input = input.map((x) => x.trim()).filter((x) => x.length).join("-"); + } else { + input = input.trim(); + } + if (input.length === 0) { + return ""; + } + if (input.length === 1) { + return options.pascalCase ? input.toLocaleUpperCase(options.locale) : input.toLocaleLowerCase(options.locale); + } + const hasUpperCase = input !== input.toLocaleLowerCase(options.locale); + if (hasUpperCase) { + input = preserveCamelCase(input, options.locale); + } + input = input.replace(/^[_.\- ]+/, ""); + if (options.preserveConsecutiveUppercase) { + input = preserveConsecutiveUppercase(input); + } else { + input = input.toLocaleLowerCase(); + } + if (options.pascalCase) { + input = input.charAt(0).toLocaleUpperCase(options.locale) + input.slice(1); + } + return postProcess(input, options); + }; + module2.exports = camelCase; + module2.exports.default = camelCase; + } +}); + +// ../../node_modules/.pnpm/proto-list@1.2.4/node_modules/proto-list/proto-list.js +var require_proto_list = __commonJS({ + "../../node_modules/.pnpm/proto-list@1.2.4/node_modules/proto-list/proto-list.js"(exports2, module2) { + module2.exports = ProtoList; + function setProto(obj, proto) { + if (typeof Object.setPrototypeOf === "function") + return Object.setPrototypeOf(obj, proto); + else + obj.__proto__ = proto; + } + function ProtoList() { + this.list = []; + var root = null; + Object.defineProperty(this, "root", { + get: function() { + return root; + }, + set: function(r) { + root = r; + if (this.list.length) { + setProto(this.list[this.list.length - 1], r); + } + }, + enumerable: true, + configurable: true + }); + } + ProtoList.prototype = { + get length() { + return this.list.length; + }, + get keys() { + var k = []; + for (var i in this.list[0]) + k.push(i); + return k; + }, + get snapshot() { + var o = {}; + this.keys.forEach(function(k) { + o[k] = this.get(k); + }, this); + return o; + }, + get store() { + return this.list[0]; + }, + push: function(obj) { + if (typeof obj !== "object") + obj = { valueOf: obj }; + if (this.list.length >= 1) { + setProto(this.list[this.list.length - 1], obj); + } + setProto(obj, this.root); + return this.list.push(obj); + }, + pop: function() { + if (this.list.length >= 2) { + setProto(this.list[this.list.length - 2], this.root); + } + return this.list.pop(); + }, + unshift: function(obj) { + setProto(obj, this.list[0] || this.root); + return this.list.unshift(obj); + }, + shift: function() { + if (this.list.length === 1) { + setProto(this.list[0], this.root); + } + return this.list.shift(); + }, + get: function(key) { + return this.list[0][key]; + }, + set: function(key, val, save) { + if (!this.length) + this.push({}); + if (save && this.list[0].hasOwnProperty(key)) + this.push({}); + return this.list[0][key] = val; + }, + forEach: function(fn2, thisp) { + for (var key in this.list[0]) + fn2.call(thisp, key, this.list[0][key]); + }, + slice: function() { + return this.list.slice.apply(this.list, arguments); + }, + splice: function() { + var ret = this.list.splice.apply(this.list, arguments); + for (var i = 0, l = this.list.length; i < l; i++) { + setProto(this.list[i], this.list[i + 1] || this.root); + } + return ret; + } + }; + } +}); + +// ../../node_modules/.pnpm/ini@1.3.8/node_modules/ini/ini.js +var require_ini = __commonJS({ + "../../node_modules/.pnpm/ini@1.3.8/node_modules/ini/ini.js"(exports2) { + exports2.parse = exports2.decode = decode; + exports2.stringify = exports2.encode = encode; + exports2.safe = safe; + exports2.unsafe = unsafe; + var eol = typeof process !== "undefined" && process.platform === "win32" ? "\r\n" : "\n"; + function encode(obj, opt) { + var children = []; + var out = ""; + if (typeof opt === "string") { + opt = { + section: opt, + whitespace: false + }; + } else { + opt = opt || {}; + opt.whitespace = opt.whitespace === true; + } + var separator = opt.whitespace ? " = " : "="; + Object.keys(obj).forEach(function(k, _, __) { + var val = obj[k]; + if (val && Array.isArray(val)) { + val.forEach(function(item) { + out += safe(k + "[]") + separator + safe(item) + "\n"; + }); + } else if (val && typeof val === "object") + children.push(k); + else + out += safe(k) + separator + safe(val) + eol; + }); + if (opt.section && out.length) + out = "[" + safe(opt.section) + "]" + eol + out; + children.forEach(function(k, _, __) { + var nk = dotSplit(k).join("\\."); + var section = (opt.section ? opt.section + "." : "") + nk; + var child = encode(obj[k], { + section, + whitespace: opt.whitespace + }); + if (out.length && child.length) + out += eol; + out += child; + }); + return out; + } + function dotSplit(str) { + return str.replace(/\1/g, "LITERAL\\1LITERAL").replace(/\\\./g, "").split(/\./).map(function(part) { + return part.replace(/\1/g, "\\.").replace(/\2LITERAL\\1LITERAL\2/g, ""); + }); + } + function decode(str) { + var out = {}; + var p = out; + var section = null; + var re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i; + var lines = str.split(/[\r\n]+/g); + lines.forEach(function(line, _, __) { + if (!line || line.match(/^\s*[;#]/)) + return; + var match = line.match(re); + if (!match) + return; + if (match[1] !== void 0) { + section = unsafe(match[1]); + if (section === "__proto__") { + p = {}; + return; + } + p = out[section] = out[section] || {}; + return; + } + var key = unsafe(match[2]); + if (key === "__proto__") + return; + var value = match[3] ? unsafe(match[4]) : true; + switch (value) { + case "true": + case "false": + case "null": + value = JSON.parse(value); + } + if (key.length > 2 && key.slice(-2) === "[]") { + key = key.substring(0, key.length - 2); + if (key === "__proto__") + return; + if (!p[key]) + p[key] = []; + else if (!Array.isArray(p[key])) + p[key] = [p[key]]; + } + if (Array.isArray(p[key])) + p[key].push(value); + else + p[key] = value; + }); + Object.keys(out).filter(function(k, _, __) { + if (!out[k] || typeof out[k] !== "object" || Array.isArray(out[k])) + return false; + var parts = dotSplit(k); + var p2 = out; + var l = parts.pop(); + var nl = l.replace(/\\\./g, "."); + parts.forEach(function(part, _2, __2) { + if (part === "__proto__") + return; + if (!p2[part] || typeof p2[part] !== "object") + p2[part] = {}; + p2 = p2[part]; + }); + if (p2 === out && nl === l) + return false; + p2[nl] = out[k]; + return true; + }).forEach(function(del, _, __) { + delete out[del]; + }); + return out; + } + function isQuoted(val) { + return val.charAt(0) === '"' && val.slice(-1) === '"' || val.charAt(0) === "'" && val.slice(-1) === "'"; + } + function safe(val) { + return typeof val !== "string" || val.match(/[=\r\n]/) || val.match(/^\[/) || val.length > 1 && isQuoted(val) || val !== val.trim() ? JSON.stringify(val) : val.replace(/;/g, "\\;").replace(/#/g, "\\#"); + } + function unsafe(val, doUnesc) { + val = (val || "").trim(); + if (isQuoted(val)) { + if (val.charAt(0) === "'") + val = val.substr(1, val.length - 2); + try { + val = JSON.parse(val); + } catch (_) { + } + } else { + var esc = false; + var unesc = ""; + for (var i = 0, l = val.length; i < l; i++) { + var c = val.charAt(i); + if (esc) { + if ("\\;#".indexOf(c) !== -1) + unesc += c; + else + unesc += "\\" + c; + esc = false; + } else if (";#".indexOf(c) !== -1) + break; + else if (c === "\\") + esc = true; + else + unesc += c; + } + if (esc) + unesc += "\\"; + return unesc.trim(); + } + return val; + } + } +}); + +// ../../node_modules/.pnpm/config-chain@1.1.13/node_modules/config-chain/index.js +var require_config_chain = __commonJS({ + "../../node_modules/.pnpm/config-chain@1.1.13/node_modules/config-chain/index.js"(exports2, module2) { + var ProtoList = require_proto_list(); + var path = require("path"); + var fs = require("fs"); + var ini = require_ini(); + var EE = require("events").EventEmitter; + var url = require("url"); + var http = require("http"); + var exports2 = module2.exports = function() { + var args2 = [].slice.call(arguments), conf = new ConfigChain(); + while (args2.length) { + var a = args2.shift(); + if (a) + conf.push(typeof a === "string" ? json(a) : a); + } + return conf; + }; + var find = exports2.find = function() { + var rel = path.join.apply(null, [].slice.call(arguments)); + function find2(start, rel2) { + var file = path.join(start, rel2); + try { + fs.statSync(file); + return file; + } catch (err) { + if (path.dirname(start) !== start) + return find2(path.dirname(start), rel2); + } + } + return find2(__dirname, rel); + }; + var parse = exports2.parse = function(content, file, type) { + content = "" + content; + if (!type) { + try { + return JSON.parse(content); + } catch (er) { + return ini.parse(content); + } + } else if (type === "json") { + if (this.emit) { + try { + return JSON.parse(content); + } catch (er) { + this.emit("error", er); + } + } else { + return JSON.parse(content); + } + } else { + return ini.parse(content); + } + }; + var json = exports2.json = function() { + var args2 = [].slice.call(arguments).filter(function(arg) { + return arg != null; + }); + var file = path.join.apply(null, args2); + var content; + try { + content = fs.readFileSync(file, "utf-8"); + } catch (err) { + return; + } + return parse(content, file, "json"); + }; + var env = exports2.env = function(prefix, env2) { + env2 = env2 || process.env; + var obj = {}; + var l = prefix.length; + for (var k in env2) { + if (k.indexOf(prefix) === 0) + obj[k.substring(l)] = env2[k]; + } + return obj; + }; + exports2.ConfigChain = ConfigChain; + function ConfigChain() { + EE.apply(this); + ProtoList.apply(this, arguments); + this._awaiting = 0; + this._saving = 0; + this.sources = {}; + } + var extras = { + constructor: { value: ConfigChain } + }; + Object.keys(EE.prototype).forEach(function(k) { + extras[k] = Object.getOwnPropertyDescriptor(EE.prototype, k); + }); + ConfigChain.prototype = Object.create(ProtoList.prototype, extras); + ConfigChain.prototype.del = function(key, where) { + if (where) { + var target = this.sources[where]; + target = target && target.data; + if (!target) { + return this.emit("error", new Error("not found " + where)); + } + delete target[key]; + } else { + for (var i = 0, l = this.list.length; i < l; i++) { + delete this.list[i][key]; + } + } + return this; + }; + ConfigChain.prototype.set = function(key, value, where) { + var target; + if (where) { + target = this.sources[where]; + target = target && target.data; + if (!target) { + return this.emit("error", new Error("not found " + where)); + } + } else { + target = this.list[0]; + if (!target) { + return this.emit("error", new Error("cannot set, no confs!")); + } + } + target[key] = value; + return this; + }; + ConfigChain.prototype.get = function(key, where) { + if (where) { + where = this.sources[where]; + if (where) + where = where.data; + if (where && Object.hasOwnProperty.call(where, key)) + return where[key]; + return void 0; + } + return this.list[0][key]; + }; + ConfigChain.prototype.save = function(where, type, cb) { + if (typeof type === "function") + cb = type, type = null; + var target = this.sources[where]; + if (!target || !(target.path || target.source) || !target.data) { + return this.emit("error", new Error("bad save target: " + where)); + } + if (target.source) { + var pref = target.prefix || ""; + Object.keys(target.data).forEach(function(k) { + target.source[pref + k] = target.data[k]; + }); + return this; + } + var type = type || target.type; + var data = target.data; + if (target.type === "json") { + data = JSON.stringify(data); + } else { + data = ini.stringify(data); + } + this._saving++; + fs.writeFile(target.path, data, "utf8", function(er) { + this._saving--; + if (er) { + if (cb) + return cb(er); + else + return this.emit("error", er); + } + if (this._saving === 0) { + if (cb) + cb(); + this.emit("save"); + } + }.bind(this)); + return this; + }; + ConfigChain.prototype.addFile = function(file, type, name) { + name = name || file; + var marker = { __source__: name }; + this.sources[name] = { path: file, type }; + this.push(marker); + this._await(); + fs.readFile(file, "utf8", function(er, data) { + if (er) + this.emit("error", er); + this.addString(data, file, type, marker); + }.bind(this)); + return this; + }; + ConfigChain.prototype.addEnv = function(prefix, env2, name) { + name = name || "env"; + var data = exports2.env(prefix, env2); + this.sources[name] = { data, source: env2, prefix }; + return this.add(data, name); + }; + ConfigChain.prototype.addUrl = function(req, type, name) { + this._await(); + var href = url.format(req); + name = name || href; + var marker = { __source__: name }; + this.sources[name] = { href, type }; + this.push(marker); + http.request(req, function(res) { + var c = []; + var ct = res.headers["content-type"]; + if (!type) { + type = ct.indexOf("json") !== -1 ? "json" : ct.indexOf("ini") !== -1 ? "ini" : href.match(/\.json$/) ? "json" : href.match(/\.ini$/) ? "ini" : null; + marker.type = type; + } + res.on("data", c.push.bind(c)).on("end", function() { + this.addString(Buffer.concat(c), href, type, marker); + }.bind(this)).on("error", this.emit.bind(this, "error")); + }.bind(this)).on("error", this.emit.bind(this, "error")).end(); + return this; + }; + ConfigChain.prototype.addString = function(data, file, type, marker) { + data = this.parse(data, file, type); + this.add(data, marker); + return this; + }; + ConfigChain.prototype.add = function(data, marker) { + if (marker && typeof marker === "object") { + var i = this.list.indexOf(marker); + if (i === -1) { + return this.emit("error", new Error("bad marker")); + } + this.splice(i, 1, data); + marker = marker.__source__; + this.sources[marker] = this.sources[marker] || {}; + this.sources[marker].data = data; + this._resolve(); + } else { + if (typeof marker === "string") { + this.sources[marker] = this.sources[marker] || {}; + this.sources[marker].data = data; + } + this._await(); + this.push(data); + process.nextTick(this._resolve.bind(this)); + } + return this; + }; + ConfigChain.prototype.parse = exports2.parse; + ConfigChain.prototype._await = function() { + this._awaiting++; + }; + ConfigChain.prototype._resolve = function() { + this._awaiting--; + if (this._awaiting === 0) + this.emit("load", this); + }; + } +}); + +// ../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/lib/envKeyToSetting.js +var require_envKeyToSetting = __commonJS({ + "../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/lib/envKeyToSetting.js"(exports2, module2) { + module2.exports = function(x) { + const colonIndex = x.indexOf(":"); + if (colonIndex === -1) { + return normalize(x); + } + const firstPart = x.substr(0, colonIndex); + const secondPart = x.substr(colonIndex + 1); + return `${normalize(firstPart)}:${normalize(secondPart)}`; + }; + function normalize(s) { + s = s.toLowerCase(); + if (s === "_authtoken") + return "_authToken"; + let r = s[0]; + for (let i = 1; i < s.length; i++) { + r += s[i] === "_" ? "-" : s[i]; + } + return r; + } + } +}); + +// ../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/lib/util.js +var require_util = __commonJS({ + "../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/lib/util.js"(exports2) { + "use strict"; + var fs = require("fs"); + var path = require("path"); + var envReplace = (str) => { + if (typeof str !== "string" || !str) { + return str; + } + const regex = /(\\*)\$\{([^}]+)\}/g; + return str.replace(regex, (orig, esc, name) => { + esc = esc.length > 0 && esc.length % 2; + if (esc) { + return orig; + } + if (process.env[name] === void 0) { + throw new Error(`Failed to replace env in config: ${orig}`); + } + return process.env[name]; + }); + }; + var parseField = (types, field, key) => { + if (typeof field !== "string") { + return field; + } + const typeList = [].concat(types[key]); + const isPath = typeList.indexOf(path) !== -1; + const isBool = typeList.indexOf(Boolean) !== -1; + const isString = typeList.indexOf(String) !== -1; + const isNumber = typeList.indexOf(Number) !== -1; + field = `${field}`.trim(); + if (/^".*"$/.test(field)) { + try { + field = JSON.parse(field); + } catch (error) { + throw new Error(`Failed parsing JSON config key ${key}: ${field}`); + } + } + if (isBool && !isString && field === "") { + return true; + } + switch (field) { + case "true": { + return true; + } + case "false": { + return false; + } + case "null": { + return null; + } + case "undefined": { + return void 0; + } + } + field = envReplace(field); + if (isPath) { + const regex = process.platform === "win32" ? /^~(\/|\\)/ : /^~\//; + if (regex.test(field) && process.env.HOME) { + field = path.resolve(process.env.HOME, field.substr(2)); + } + field = path.resolve(field); + } + if (isNumber && !isNaN(field)) { + field = Number(field); + } + return field; + }; + var findPrefix = (name) => { + name = path.resolve(name); + let walkedUp = false; + while (path.basename(name) === "node_modules") { + name = path.dirname(name); + walkedUp = true; + } + if (walkedUp) { + return name; + } + const find = (name2, original) => { + const regex = /^[a-zA-Z]:(\\|\/)?$/; + if (name2 === "/" || process.platform === "win32" && regex.test(name2)) { + return original; + } + try { + const files = fs.readdirSync(name2); + if (files.includes("node_modules") || files.includes("package.json") || files.includes("package.json5") || files.includes("package.yaml") || files.includes("pnpm-workspace.yaml")) { + return name2; + } + const dirname = path.dirname(name2); + if (dirname === name2) { + return original; + } + return find(dirname, original); + } catch (error) { + if (name2 === original) { + if (error.code === "ENOENT") { + return original; + } + throw error; + } + return original; + } + }; + return find(name, name); + }; + exports2.envReplace = envReplace; + exports2.findPrefix = findPrefix; + exports2.parseField = parseField; + } +}); + +// ../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/lib/types.js +var require_types2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/lib/types.js"(exports2) { + "use strict"; + var path = require("path"); + var Stream = require("stream").Stream; + var url = require("url"); + var Umask = () => { + }; + var getLocalAddresses = () => []; + var semver = () => { + }; + exports2.types = { + access: [null, "restricted", "public"], + "allow-same-version": Boolean, + "always-auth": Boolean, + also: [null, "dev", "development"], + audit: Boolean, + "auth-type": ["legacy", "sso", "saml", "oauth"], + "bin-links": Boolean, + browser: [null, String], + ca: [null, String, Array], + cafile: path, + cache: path, + "cache-lock-stale": Number, + "cache-lock-retries": Number, + "cache-lock-wait": Number, + "cache-max": Number, + "cache-min": Number, + cert: [null, String], + cidr: [null, String, Array], + color: ["always", Boolean], + depth: Number, + description: Boolean, + dev: Boolean, + "dry-run": Boolean, + editor: String, + "engine-strict": Boolean, + force: Boolean, + "fetch-retries": Number, + "fetch-retry-factor": Number, + "fetch-retry-mintimeout": Number, + "fetch-retry-maxtimeout": Number, + git: String, + "git-tag-version": Boolean, + "commit-hooks": Boolean, + global: Boolean, + globalconfig: path, + "global-style": Boolean, + group: [Number, String], + "https-proxy": [null, url], + "user-agent": String, + "ham-it-up": Boolean, + "heading": String, + "if-present": Boolean, + "ignore-prepublish": Boolean, + "ignore-scripts": Boolean, + "init-module": path, + "init-author-name": String, + "init-author-email": String, + "init-author-url": ["", url], + "init-license": String, + "init-version": semver, + json: Boolean, + key: [null, String], + "legacy-bundling": Boolean, + link: Boolean, + "local-address": getLocalAddresses(), + loglevel: ["silent", "error", "warn", "notice", "http", "timing", "info", "verbose", "silly"], + logstream: Stream, + "logs-max": Number, + long: Boolean, + maxsockets: Number, + message: String, + "metrics-registry": [null, String], + "node-options": [null, String], + "node-version": [null, semver], + "no-proxy": [null, String, Array], + offline: Boolean, + "onload-script": [null, String], + only: [null, "dev", "development", "prod", "production"], + optional: Boolean, + "package-lock": Boolean, + otp: [null, String], + "package-lock-only": Boolean, + parseable: Boolean, + "prefer-offline": Boolean, + "prefer-online": Boolean, + prefix: path, + production: Boolean, + progress: Boolean, + proxy: [null, false, url], + "read-only": Boolean, + "rebuild-bundle": Boolean, + registry: [null, url], + rollback: Boolean, + save: Boolean, + "save-bundle": Boolean, + "save-dev": Boolean, + "save-exact": Boolean, + "save-optional": Boolean, + "save-prefix": String, + "save-prod": Boolean, + scope: String, + "script-shell": [null, String], + "scripts-prepend-node-path": [false, true, "auto", "warn-only"], + searchopts: String, + searchexclude: [null, String], + searchlimit: Number, + searchstaleness: Number, + "send-metrics": Boolean, + shell: String, + shrinkwrap: Boolean, + "sign-git-tag": Boolean, + "sso-poll-frequency": Number, + "sso-type": [null, "oauth", "saml"], + "strict-ssl": Boolean, + tag: String, + timing: Boolean, + tmp: path, + unicode: Boolean, + "unsafe-perm": Boolean, + usage: Boolean, + user: [Number, String], + userconfig: path, + umask: Umask, + version: Boolean, + "tag-version-prefix": String, + versions: Boolean, + viewer: String, + _exit: Boolean + }; + } +}); + +// ../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/lib/conf.js +var require_conf = __commonJS({ + "../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/lib/conf.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var path = require("path"); + var { ConfigChain } = require_config_chain(); + var envKeyToSetting = require_envKeyToSetting(); + var util = require_util(); + var Conf = class extends ConfigChain { + constructor(base, types) { + super(base); + this.root = base; + this._parseField = util.parseField.bind(null, types || require_types2()); + } + add(data, marker) { + try { + for (const x of Object.keys(data)) { + data[x] = this._parseField(data[x], x); + } + } catch (error) { + throw error; + } + return super.add(data, marker); + } + addFile(file, name) { + name = name || file; + const marker = { __source__: name }; + this.sources[name] = { path: file, type: "ini" }; + this.push(marker); + this._await(); + try { + const contents = fs.readFileSync(file, "utf8"); + this.addString(contents, file, "ini", marker); + } catch (error) { + this.add({}, marker); + } + return this; + } + addEnv(env) { + env = env || process.env; + const conf = {}; + Object.keys(env).filter((x) => /^npm_config_/i.test(x)).forEach((x) => { + if (!env[x]) { + return; + } + conf[envKeyToSetting(x.substr(11))] = env[x]; + }); + return super.addEnv("", conf, "env"); + } + loadPrefix() { + const cli = this.list[0]; + Object.defineProperty(this, "prefix", { + enumerable: true, + set: (prefix) => { + const g = this.get("global"); + this[g ? "globalPrefix" : "localPrefix"] = prefix; + }, + get: () => { + const g = this.get("global"); + return g ? this.globalPrefix : this.localPrefix; + } + }); + Object.defineProperty(this, "globalPrefix", { + enumerable: true, + set: (prefix) => { + this.set("prefix", prefix); + }, + get: () => { + return path.resolve(this.get("prefix")); + } + }); + let p; + Object.defineProperty(this, "localPrefix", { + enumerable: true, + set: (prefix) => { + p = prefix; + }, + get: () => { + return p; + } + }); + if (Object.prototype.hasOwnProperty.call(cli, "prefix")) { + p = path.resolve(cli.prefix); + } else { + try { + const prefix = util.findPrefix(process.cwd()); + p = prefix; + } catch (error) { + throw error; + } + } + return p; + } + loadCAFile(file) { + if (!file) { + return; + } + try { + const contents = fs.readFileSync(file, "utf8"); + const delim = "-----END CERTIFICATE-----"; + const output = contents.split(delim).filter((x) => Boolean(x.trim())).map((x) => x.trimLeft() + delim); + this.set("ca", output); + } catch (error) { + if (error.code === "ENOENT") { + return; + } + throw error; + } + } + loadUser() { + const defConf = this.root; + if (this.get("global")) { + return; + } + if (process.env.SUDO_UID) { + defConf.user = Number(process.env.SUDO_UID); + return; + } + const prefix = path.resolve(this.get("prefix")); + try { + const stats = fs.statSync(prefix); + defConf.user = stats.uid; + } catch (error) { + if (error.code === "ENOENT") { + return; + } + throw error; + } + } + }; + module2.exports = Conf; + } +}); + +// ../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/lib/defaults.js +var require_defaults = __commonJS({ + "../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/lib/defaults.js"(exports2) { + "use strict"; + var os = require("os"); + var path = require("path"); + var temp = os.tmpdir(); + var uidOrPid = process.getuid ? process.getuid() : process.pid; + var hasUnicode = () => true; + var isWindows = process.platform === "win32"; + var osenv = { + editor: () => process.env.EDITOR || process.env.VISUAL || (isWindows ? "notepad.exe" : "vi"), + shell: () => isWindows ? process.env.COMSPEC || "cmd.exe" : process.env.SHELL || "/bin/bash" + }; + var umask = { + fromString: () => process.umask() + }; + var home = os.homedir(); + if (home) { + process.env.HOME = home; + } else { + home = path.resolve(temp, "npm-" + uidOrPid); + } + var cacheExtra = process.platform === "win32" ? "npm-cache" : ".npm"; + var cacheRoot = process.platform === "win32" ? process.env.APPDATA : home; + var cache = path.resolve(cacheRoot, cacheExtra); + var defaults; + var globalPrefix; + Object.defineProperty(exports2, "defaults", { + get: function() { + if (defaults) + return defaults; + if (process.env.PREFIX) { + globalPrefix = process.env.PREFIX; + } else if (process.platform === "win32") { + globalPrefix = path.dirname(process.execPath); + } else { + globalPrefix = path.dirname(path.dirname(process.execPath)); + if (process.env.DESTDIR) { + globalPrefix = path.join(process.env.DESTDIR, globalPrefix); + } + } + defaults = { + access: null, + "allow-same-version": false, + "always-auth": false, + also: null, + audit: true, + "auth-type": "legacy", + "bin-links": true, + browser: null, + ca: null, + cafile: null, + cache, + "cache-lock-stale": 6e4, + "cache-lock-retries": 10, + "cache-lock-wait": 1e4, + "cache-max": Infinity, + "cache-min": 10, + cert: null, + cidr: null, + color: process.env.NO_COLOR == null, + depth: Infinity, + description: true, + dev: false, + "dry-run": false, + editor: osenv.editor(), + "engine-strict": false, + force: false, + "fetch-retries": 2, + "fetch-retry-factor": 10, + "fetch-retry-mintimeout": 1e4, + "fetch-retry-maxtimeout": 6e4, + git: "git", + "git-tag-version": true, + "commit-hooks": true, + global: false, + globalconfig: path.resolve(globalPrefix, "etc", "npmrc"), + "global-style": false, + group: process.platform === "win32" ? 0 : process.env.SUDO_GID || process.getgid && process.getgid(), + "ham-it-up": false, + heading: "npm", + "if-present": false, + "ignore-prepublish": false, + "ignore-scripts": false, + "init-module": path.resolve(home, ".npm-init.js"), + "init-author-name": "", + "init-author-email": "", + "init-author-url": "", + "init-version": "1.0.0", + "init-license": "ISC", + json: false, + key: null, + "legacy-bundling": false, + link: false, + "local-address": void 0, + loglevel: "notice", + logstream: process.stderr, + "logs-max": 10, + long: false, + maxsockets: 50, + message: "%s", + "metrics-registry": null, + "node-options": null, + "node-version": process.version, + "offline": false, + "onload-script": false, + only: null, + optional: true, + otp: null, + "package-lock": true, + "package-lock-only": false, + parseable: false, + "prefer-offline": false, + "prefer-online": false, + prefix: globalPrefix, + production: process.env.NODE_ENV === "production", + "progress": !process.env.TRAVIS && !process.env.CI, + proxy: null, + "https-proxy": null, + "no-proxy": null, + "user-agent": "npm/{npm-version} node/{node-version} {platform} {arch}", + "read-only": false, + "rebuild-bundle": true, + registry: "https://registry.npmjs.org/", + rollback: true, + save: true, + "save-bundle": false, + "save-dev": false, + "save-exact": false, + "save-optional": false, + "save-prefix": "^", + "save-prod": false, + scope: "", + "script-shell": null, + "scripts-prepend-node-path": "warn-only", + searchopts: "", + searchexclude: null, + searchlimit: 20, + searchstaleness: 15 * 60, + "send-metrics": false, + shell: osenv.shell(), + shrinkwrap: true, + "sign-git-tag": false, + "sso-poll-frequency": 500, + "sso-type": "oauth", + "strict-ssl": true, + tag: "latest", + "tag-version-prefix": "v", + timing: false, + tmp: temp, + unicode: hasUnicode(), + "unsafe-perm": process.platform === "win32" || process.platform === "cygwin" || !(process.getuid && process.setuid && process.getgid && process.setgid) || process.getuid() !== 0, + usage: false, + user: process.platform === "win32" ? 0 : "nobody", + userconfig: path.resolve(home, ".npmrc"), + umask: process.umask ? process.umask() : umask.fromString("022"), + version: false, + versions: false, + viewer: process.platform === "win32" ? "browser" : "man", + _exit: true + }; + return defaults; + } + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/index.js +var require_npm_conf = __commonJS({ + "../../node_modules/.pnpm/@zkochan+npm-conf@2.0.2/node_modules/@zkochan/npm-conf/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var Conf = require_conf(); + var _defaults = require_defaults(); + module2.exports = (opts, types, defaults) => { + const conf = new Conf(Object.assign({}, _defaults.defaults, defaults), types); + conf.add(Object.assign({}, opts), "cli"); + if (require.resolve.paths) { + const paths = require.resolve.paths("npm"); + let npmPath; + try { + npmPath = require.resolve("npm", { paths: paths.slice(-1) }); + } catch (error) { + } + if (npmPath) { + conf.addFile(path.resolve(path.dirname(npmPath), "..", "npmrc"), "builtin"); + } + } + conf.addEnv(); + conf.loadPrefix(); + const projectConf = path.resolve(conf.localPrefix, ".npmrc"); + const userConf = conf.get("userconfig"); + if (!conf.get("global") && projectConf !== userConf) { + conf.addFile(projectConf, "project"); + } else { + conf.add({}, "project"); + } + if (conf.get("workspace-prefix") && conf.get("workspace-prefix") !== projectConf) { + const workspaceConf = path.resolve(conf.get("workspace-prefix"), ".npmrc"); + conf.addFile(workspaceConf, "workspace"); + } + conf.addFile(conf.get("userconfig"), "user"); + if (conf.get("prefix")) { + const etc = path.resolve(conf.get("prefix"), "etc"); + conf.root.globalconfig = path.resolve(etc, "npmrc"); + conf.root.globalignorefile = path.resolve(etc, "npmignore"); + } + conf.addFile(conf.get("globalconfig"), "global"); + conf.loadUser(); + const caFile = conf.get("cafile"); + if (caFile) { + conf.loadCAFile(caFile); + } + return conf; + }; + Object.defineProperty(module2.exports, "defaults", { + get() { + return _defaults.defaults; + }, + enumerable: true + }); + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isPlaceholder.js +var require_isPlaceholder = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isPlaceholder.js"(exports2, module2) { + function _isPlaceholder(a) { + return a != null && typeof a === "object" && a["@@functional/placeholder"] === true; + } + module2.exports = _isPlaceholder; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_curry1.js +var require_curry1 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_curry1.js"(exports2, module2) { + var _isPlaceholder = require_isPlaceholder(); + function _curry1(fn2) { + return function f1(a) { + if (arguments.length === 0 || _isPlaceholder(a)) { + return f1; + } else { + return fn2.apply(this, arguments); + } + }; + } + module2.exports = _curry1; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/fromPairs.js +var require_fromPairs = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/fromPairs.js"(exports2, module2) { + var _curry1 = require_curry1(); + var fromPairs = /* @__PURE__ */ _curry1(function fromPairs2(pairs) { + var result = {}; + var idx = 0; + while (idx < pairs.length) { + result[pairs[idx][0]] = pairs[idx][1]; + idx += 1; + } + return result; + }); + module2.exports = fromPairs; + } +}); + +// ../../node_modules/.pnpm/realpath-missing@1.1.0/node_modules/realpath-missing/index.js +var require_realpath_missing = __commonJS({ + "../../node_modules/.pnpm/realpath-missing@1.1.0/node_modules/realpath-missing/index.js"(exports2, module2) { + var fs = require("fs"); + module2.exports = async function realpathMissing(path) { + try { + return await fs.promises.realpath(path); + } catch (err) { + if (err.code === "ENOENT") { + return path; + } + throw err; + } + }; + } +}); + +// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js +var require_windows = __commonJS({ + "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports2, module2) { + module2.exports = isexe; + isexe.sync = sync; + var fs = require("fs"); + function checkPathExt(path, options) { + var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT; + if (!pathext) { + return true; + } + pathext = pathext.split(";"); + if (pathext.indexOf("") !== -1) { + return true; + } + for (var i = 0; i < pathext.length; i++) { + var p = pathext[i].toLowerCase(); + if (p && path.substr(-p.length).toLowerCase() === p) { + return true; + } + } + return false; + } + function checkStat(stat, path, options) { + if (!stat.isSymbolicLink() && !stat.isFile()) { + return false; + } + return checkPathExt(path, options); + } + function isexe(path, options, cb) { + fs.stat(path, function(er, stat) { + cb(er, er ? false : checkStat(stat, path, options)); + }); + } + function sync(path, options) { + return checkStat(fs.statSync(path), path, options); + } + } +}); + +// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js +var require_mode = __commonJS({ + "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports2, module2) { + module2.exports = isexe; + isexe.sync = sync; + var fs = require("fs"); + function isexe(path, options, cb) { + fs.stat(path, function(er, stat) { + cb(er, er ? false : checkStat(stat, options)); + }); + } + function sync(path, options) { + return checkStat(fs.statSync(path), options); + } + function checkStat(stat, options) { + return stat.isFile() && checkMode(stat, options); + } + function checkMode(stat, options) { + var mod = stat.mode; + var uid = stat.uid; + var gid = stat.gid; + var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid(); + var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid(); + var u = parseInt("100", 8); + var g = parseInt("010", 8); + var o = parseInt("001", 8); + var ug = u | g; + var ret = mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0; + return ret; + } + } +}); + +// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js +var require_isexe = __commonJS({ + "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports2, module2) { + var fs = require("fs"); + var core; + if (process.platform === "win32" || global.TESTING_WINDOWS) { + core = require_windows(); + } else { + core = require_mode(); + } + module2.exports = isexe; + isexe.sync = sync; + function isexe(path, options, cb) { + if (typeof options === "function") { + cb = options; + options = {}; + } + if (!cb) { + if (typeof Promise !== "function") { + throw new TypeError("callback not provided"); + } + return new Promise(function(resolve, reject) { + isexe(path, options || {}, function(er, is) { + if (er) { + reject(er); + } else { + resolve(is); + } + }); + }); + } + core(path, options || {}, function(er, is) { + if (er) { + if (er.code === "EACCES" || options && options.ignoreErrors) { + er = null; + is = false; + } + } + cb(er, is); + }); + } + function sync(path, options) { + try { + return core.sync(path, options || {}); + } catch (er) { + if (options && options.ignoreErrors || er.code === "EACCES") { + return false; + } else { + throw er; + } + } + } + } +}); + +// ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js +var require_which = __commonJS({ + "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports2, module2) { + var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys"; + var path = require("path"); + var COLON = isWindows ? ";" : ":"; + var isexe = require_isexe(); + var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }); + var getPathInfo = (cmd, opt) => { + const colon = opt.colon || COLON; + const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [ + ...isWindows ? [process.cwd()] : [], + ...(opt.path || process.env.PATH || "").split(colon) + ]; + const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : ""; + const pathExt = isWindows ? pathExtExe.split(colon) : [""]; + if (isWindows) { + if (cmd.indexOf(".") !== -1 && pathExt[0] !== "") + pathExt.unshift(""); + } + return { + pathEnv, + pathExt, + pathExtExe + }; + }; + var which = (cmd, opt, cb) => { + if (typeof opt === "function") { + cb = opt; + opt = {}; + } + if (!opt) + opt = {}; + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); + const found = []; + const step = (i) => new Promise((resolve, reject) => { + if (i === pathEnv.length) + return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd)); + const ppRaw = pathEnv[i]; + const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; + const pCmd = path.join(pathPart, cmd); + const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; + resolve(subStep(p, i, 0)); + }); + const subStep = (p, i, ii) => new Promise((resolve, reject) => { + if (ii === pathExt.length) + return resolve(step(i + 1)); + const ext = pathExt[ii]; + isexe(p + ext, { pathExt: pathExtExe }, (er, is) => { + if (!er && is) { + if (opt.all) + found.push(p + ext); + else + return resolve(p + ext); + } + return resolve(subStep(p, i, ii + 1)); + }); + }); + return cb ? step(0).then((res) => cb(null, res), cb) : step(0); + }; + var whichSync = (cmd, opt) => { + opt = opt || {}; + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); + const found = []; + for (let i = 0; i < pathEnv.length; i++) { + const ppRaw = pathEnv[i]; + const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; + const pCmd = path.join(pathPart, cmd); + const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; + for (let j = 0; j < pathExt.length; j++) { + const cur = p + pathExt[j]; + try { + const is = isexe.sync(cur, { pathExt: pathExtExe }); + if (is) { + if (opt.all) + found.push(cur); + else + return cur; + } + } catch (ex) { + } + } + } + if (opt.all && found.length) + return found; + if (opt.nothrow) + return null; + throw getNotFoundError(cmd); + }; + module2.exports = which; + which.sync = whichSync; + } +}); + +// ../config/lib/getScopeRegistries.js +var require_getScopeRegistries = __commonJS({ + "../config/lib/getScopeRegistries.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.normalizeRegistry = void 0; + function getScopeRegistries(rawConfig) { + const registries = {}; + for (const configKey of Object.keys(rawConfig)) { + if (configKey[0] === "@" && configKey.endsWith(":registry")) { + registries[configKey.substr(0, configKey.indexOf(":"))] = normalizeRegistry(rawConfig[configKey]); + } + } + return registries; + } + exports2.default = getScopeRegistries; + function normalizeRegistry(registry) { + return registry.endsWith("/") ? registry : `${registry}/`; + } + exports2.normalizeRegistry = normalizeRegistry; + } +}); + +// ../../node_modules/.pnpm/is-windows@1.0.2/node_modules/is-windows/index.js +var require_is_windows = __commonJS({ + "../../node_modules/.pnpm/is-windows@1.0.2/node_modules/is-windows/index.js"(exports2, module2) { + (function(factory) { + if (exports2 && typeof exports2 === "object" && typeof module2 !== "undefined") { + module2.exports = factory(); + } else if (typeof define === "function" && define.amd) { + define([], factory); + } else if (typeof window !== "undefined") { + window.isWindows = factory(); + } else if (typeof global !== "undefined") { + global.isWindows = factory(); + } else if (typeof self !== "undefined") { + self.isWindows = factory(); + } else { + this.isWindows = factory(); + } + })(function() { + "use strict"; + return function isWindows() { + return process && (process.platform === "win32" || /^(msys|cygwin)$/.test(process.env.OSTYPE)); + }; + }); + } +}); + +// ../../node_modules/.pnpm/better-path-resolve@1.0.0/node_modules/better-path-resolve/index.js +var require_better_path_resolve = __commonJS({ + "../../node_modules/.pnpm/better-path-resolve@1.0.0/node_modules/better-path-resolve/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var isWindows = require_is_windows(); + module2.exports = isWindows() ? winResolve : path.resolve; + function winResolve(p) { + if (arguments.length === 0) + return path.resolve(); + if (typeof p !== "string") { + return path.resolve(p); + } + if (p[1] === ":") { + const cc = p[0].charCodeAt(); + if (cc < 65 || cc > 90) { + p = `${p[0].toUpperCase()}${p.substr(1)}`; + } + } + if (p.endsWith(":")) { + return p; + } + return path.resolve(p); + } + } +}); + +// ../../node_modules/.pnpm/is-subdir@1.2.0/node_modules/is-subdir/index.js +var require_is_subdir = __commonJS({ + "../../node_modules/.pnpm/is-subdir@1.2.0/node_modules/is-subdir/index.js"(exports2, module2) { + "use strict"; + var betterPathResolve = require_better_path_resolve(); + var path = require("path"); + function isSubdir(parentDir, subdir) { + const rParent = `${betterPathResolve(parentDir)}${path.sep}`; + const rDir = `${betterPathResolve(subdir)}${path.sep}`; + return rDir.startsWith(rParent); + } + isSubdir.strict = function isSubdirStrict(parentDir, subdir) { + const rParent = `${betterPathResolve(parentDir)}${path.sep}`; + const rDir = `${betterPathResolve(subdir)}${path.sep}`; + return rDir !== rParent && rDir.startsWith(rParent); + }; + module2.exports = isSubdir; + } +}); + +// ../config/lib/findBestGlobalPrefix.js +var require_findBestGlobalPrefix = __commonJS({ + "../config/lib/findBestGlobalPrefix.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var is_subdir_1 = __importDefault(require_is_subdir()); + function findBestGlobalPrefixOnWindows(defaultNpmGlobalPrefix, env) { + if (process.platform !== "win32") + return defaultNpmGlobalPrefix; + if (env.LOCALAPPDATA != null && is_subdir_1.default(env.LOCALAPPDATA, defaultNpmGlobalPrefix) || env.APPDATA != null && is_subdir_1.default(env.APPDATA, defaultNpmGlobalPrefix)) { + return defaultNpmGlobalPrefix; + } + if (env.APPDATA) + return path_1.default.join(env.APPDATA, "npm"); + return defaultNpmGlobalPrefix; + } + exports2.default = findBestGlobalPrefixOnWindows; + } +}); + +// ../config/lib/dirs.js +var require_dirs = __commonJS({ + "../config/lib/dirs.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDataDir = exports2.getStateDir = exports2.getCacheDir = void 0; + var os_1 = __importDefault(require("os")); + var path_1 = __importDefault(require("path")); + function getCacheDir(opts) { + if (opts.env.XDG_CACHE_HOME) { + return path_1.default.join(opts.env.XDG_CACHE_HOME, "pnpm"); + } + if (opts.platform === "darwin") { + return path_1.default.join(os_1.default.homedir(), "Library/Caches/pnpm"); + } + if (opts.platform !== "win32") { + return path_1.default.join(os_1.default.homedir(), ".cache/pnpm"); + } + if (opts.env.LOCALAPPDATA) { + return path_1.default.join(opts.env.LOCALAPPDATA, "pnpm-cache"); + } + return path_1.default.join(os_1.default.homedir(), ".pnpm-cache"); + } + exports2.getCacheDir = getCacheDir; + function getStateDir(opts) { + if (opts.env.XDG_STATE_HOME) { + return path_1.default.join(opts.env.XDG_STATE_HOME, "pnpm"); + } + if (opts.platform !== "win32" && opts.platform !== "darwin") { + return path_1.default.join(os_1.default.homedir(), ".local/state/pnpm"); + } + if (opts.env.LOCALAPPDATA) { + return path_1.default.join(opts.env.LOCALAPPDATA, "pnpm-state"); + } + return path_1.default.join(os_1.default.homedir(), ".pnpm-state"); + } + exports2.getStateDir = getStateDir; + function getDataDir(opts) { + if (opts.env.XDG_DATA_HOME) { + return path_1.default.join(opts.env.XDG_DATA_HOME, "pnpm"); + } + if (opts.platform === "darwin") { + return path_1.default.join(os_1.default.homedir(), "Library/pnpm"); + } + if (opts.platform !== "win32") { + return path_1.default.join(os_1.default.homedir(), ".local/share/pnpm"); + } + if (opts.env.LOCALAPPDATA) { + return path_1.default.join(opts.env.LOCALAPPDATA, "pnpm"); + } + return path_1.default.join(os_1.default.homedir(), ".pnpm"); + } + exports2.getDataDir = getDataDir; + } +}); + +// ../config/lib/concurrency.js +var require_concurrency = __commonJS({ + "../config/lib/concurrency.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getWorkspaceConcurrency = void 0; + var os_1 = require("os"); + function getWorkspaceConcurrency(option) { + if (typeof option !== "number") + return 4; + if (option <= 0) { + return Math.max(1, os_1.cpus().length - Math.abs(option)); + } + return option; + } + exports2.getWorkspaceConcurrency = getWorkspaceConcurrency; + } +}); + +// ../config/lib/index.js +var require_lib10 = __commonJS({ + "../config/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.types = void 0; + var path_1 = __importDefault(require("path")); + var fs_1 = __importDefault(require("fs")); + var os_1 = __importDefault(require("os")); + var constants_1 = require_lib7(); + var error_1 = __importDefault(require_lib8()); + var global_bin_dir_1 = __importDefault(require_lib9()); + var camelcase_1 = __importDefault(require_camelcase()); + var npm_conf_1 = __importDefault(require_npm_conf()); + var types_1 = __importDefault(require_types2()); + var can_write_to_dir_1 = require_can_write_to_dir(); + var fromPairs_1 = __importDefault(require_fromPairs()); + var realpath_missing_1 = __importDefault(require_realpath_missing()); + var which_1 = __importDefault(require_which()); + var getScopeRegistries_1 = __importStar2(require_getScopeRegistries()); + var findBestGlobalPrefix_1 = __importDefault(require_findBestGlobalPrefix()); + var dirs_1 = require_dirs(); + var concurrency_1 = require_concurrency(); + var npmDefaults = npm_conf_1.default.defaults; + var PNPM_GLOBAL = "pnpm-global"; + async function which(cmd) { + return new Promise((resolve, reject) => { + which_1.default(cmd, (err, resolvedPath) => err != null ? reject(err) : resolve(resolvedPath)); + }); + } + exports2.types = Object.assign({ + bail: Boolean, + "cache-dir": String, + "child-concurrency": Number, + color: ["always", "auto", "never"], + dev: [null, true], + dir: String, + "enable-modules-dir": Boolean, + "enable-pre-post-scripts": Boolean, + "extend-node-path": Boolean, + "fetch-timeout": Number, + "fetching-concurrency": Number, + filter: [String, Array], + "filter-prod": [String, Array], + "frozen-lockfile": Boolean, + "frozen-shrinkwrap": Boolean, + "git-checks": Boolean, + "global-bin-dir": String, + "global-dir": String, + "global-path": String, + "global-pnpmfile": String, + hoist: Boolean, + "hoist-pattern": Array, + "ignore-pnpmfile": Boolean, + "ignore-workspace-root-check": Boolean, + "link-workspace-packages": [Boolean, "deep"], + lockfile: Boolean, + "lockfile-dir": String, + "lockfile-directory": String, + "lockfile-only": Boolean, + loglevel: ["silent", "error", "warn", "info", "debug"], + "modules-cache-max-age": Number, + "modules-dir": String, + "network-concurrency": Number, + "node-linker": ["pnp"], + noproxy: String, + "npm-path": String, + offline: Boolean, + "package-import-method": ["auto", "hardlink", "clone", "copy"], + pnpmfile: String, + "prefer-frozen-lockfile": Boolean, + "prefer-frozen-shrinkwrap": Boolean, + "prefer-offline": Boolean, + "prefer-workspace-packages": Boolean, + production: [null, true], + "public-hoist-pattern": Array, + "publish-branch": String, + "recursive-install": Boolean, + reporter: String, + "save-peer": Boolean, + "save-workspace-protocol": Boolean, + "script-shell": String, + "shamefully-flatten": Boolean, + "shamefully-hoist": Boolean, + "shared-workspace-lockfile": Boolean, + "shared-workspace-shrinkwrap": Boolean, + "shell-emulator": Boolean, + "shrinkwrap-directory": String, + "shrinkwrap-only": Boolean, + "side-effects-cache": Boolean, + "side-effects-cache-readonly": Boolean, + symlink: Boolean, + sort: Boolean, + "state-dir": String, + store: String, + "store-dir": String, + stream: Boolean, + "strict-peer-dependencies": Boolean, + "use-beta-cli": Boolean, + "use-node-version": String, + "use-running-store-server": Boolean, + "use-store-server": Boolean, + "use-stderr": Boolean, + "verify-store-integrity": Boolean, + "virtual-store-dir": String, + "workspace-concurrency": Number, + "workspace-packages": [String, Array], + "workspace-root": Boolean, + "test-pattern": [String, Array], + "changed-files-ignore-pattern": [String, Array] + }, types_1.default.types); + exports2.default = async (opts) => { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; + const packageManager = (_a = opts.packageManager) !== null && _a !== void 0 ? _a : { name: "pnpm", version: "undefined" }; + const cliOptions = (_b = opts.cliOptions) !== null && _b !== void 0 ? _b : {}; + const warnings = new Array(); + if (cliOptions["hoist"] === false) { + if (cliOptions["shamefully-hoist"] === true) { + throw new error_1.default("CONFIG_CONFLICT_HOIST", "--shamefully-hoist cannot be used with --no-hoist"); + } + if (cliOptions["shamefully-flatten"] === true) { + throw new error_1.default("CONFIG_CONFLICT_HOIST", "--shamefully-flatten cannot be used with --no-hoist"); + } + if (cliOptions["hoist-pattern"]) { + throw new error_1.default("CONFIG_CONFLICT_HOIST", "--hoist-pattern cannot be used with --no-hoist"); + } + } + const originalExecPath = process.execPath; + try { + const node = await which(process.argv[0]); + if (node.toUpperCase() !== process.execPath.toUpperCase()) { + process.execPath = node; + } + } catch (err) { + } + if (cliOptions.dir) { + cliOptions.dir = await realpath_missing_1.default(cliOptions.dir); + cliOptions["prefix"] = cliOptions.dir; + } + const rcOptionsTypes = { ...exports2.types, ...opts.rcOptionsTypes }; + const npmConfig = npm_conf_1.default(cliOptions, rcOptionsTypes, { + bail: true, + color: "auto", + "enable-modules-dir": true, + "extend-node-path": true, + "fetch-retries": 2, + "fetch-retry-factor": 10, + "fetch-retry-maxtimeout": 6e4, + "fetch-retry-mintimeout": 1e4, + "fetch-timeout": 6e4, + globalconfig: npmDefaults.globalconfig, + hoist: true, + "hoist-pattern": ["*"], + "ignore-workspace-root-check": false, + "link-workspace-packages": true, + "modules-cache-max-age": 7 * 24 * 60, + "package-lock": npmDefaults["package-lock"], + pending: false, + "prefer-workspace-packages": false, + "public-hoist-pattern": [ + "*types*", + "*eslint*", + "@prettier/plugin-*", + "*prettier-plugin-*" + ], + "recursive-install": true, + registry: npmDefaults.registry, + "save-peer": false, + "save-workspace-protocol": true, + symlink: true, + "shared-workspace-lockfile": true, + "shared-workspace-shrinkwrap": true, + "shell-emulator": false, + shrinkwrap: npmDefaults.shrinkwrap, + reverse: false, + sort: true, + "strict-peer-dependencies": false, + "unsafe-perm": npmDefaults["unsafe-perm"], + "use-beta-cli": false, + userconfig: npmDefaults.userconfig, + "virtual-store-dir": "node_modules/.pnpm", + "workspace-concurrency": 4, + "workspace-prefix": opts.workspaceDir + }); + delete cliOptions.prefix; + process.execPath = originalExecPath; + const rcOptions = Object.keys(rcOptionsTypes); + const pnpmConfig = fromPairs_1.default([ + ...rcOptions.map((configKey) => [camelcase_1.default(configKey), npmConfig.get(configKey)]), + ...Object.entries(cliOptions).filter(([name, value]) => typeof value !== "undefined").map(([name, value]) => [camelcase_1.default(name), value]) + ]); + const cwd = (_c = cliOptions.dir && path_1.default.resolve(cliOptions.dir)) !== null && _c !== void 0 ? _c : npmConfig.localPrefix; + pnpmConfig.workspaceDir = opts.workspaceDir; + pnpmConfig.workspaceRoot = cliOptions["workspace-root"]; + pnpmConfig.rawLocalConfig = Object.assign.apply(Object, [ + {}, + ...npmConfig.list.slice(3, pnpmConfig.workspaceDir && pnpmConfig.workspaceDir !== cwd ? 5 : 4).reverse(), + cliOptions + ]); + pnpmConfig.userAgent = pnpmConfig.rawLocalConfig["user-agent"] ? pnpmConfig.rawLocalConfig["user-agent"] : `${packageManager.name}/${packageManager.version} npm/? node/${process.version} ${process.platform} ${process.arch}`; + pnpmConfig.rawConfig = Object.assign.apply(Object, [ + { registry: "https://registry.npmjs.org/" }, + ...[...npmConfig.list].reverse(), + cliOptions, + { "user-agent": pnpmConfig.userAgent } + ]); + pnpmConfig.registries = { + default: getScopeRegistries_1.normalizeRegistry(pnpmConfig.rawConfig.registry), + ...getScopeRegistries_1.default(pnpmConfig.rawConfig) + }; + pnpmConfig.lockfileDir = (_e = (_d = pnpmConfig.lockfileDir) !== null && _d !== void 0 ? _d : pnpmConfig.lockfileDirectory) !== null && _e !== void 0 ? _e : pnpmConfig.shrinkwrapDirectory; + pnpmConfig.useLockfile = (() => { + if (typeof pnpmConfig["lockfile"] === "boolean") + return pnpmConfig["lockfile"]; + if (typeof pnpmConfig["packageLock"] === "boolean") + return pnpmConfig["packageLock"]; + if (typeof pnpmConfig["shrinkwrap"] === "boolean") + return pnpmConfig["shrinkwrap"]; + return false; + })(); + pnpmConfig.lockfileOnly = typeof pnpmConfig["lockfileOnly"] === "undefined" ? pnpmConfig.shrinkwrapOnly : pnpmConfig["lockfileOnly"]; + pnpmConfig.frozenLockfile = typeof pnpmConfig["frozenLockfile"] === "undefined" ? pnpmConfig.frozenShrinkwrap : pnpmConfig["frozenLockfile"]; + pnpmConfig.preferFrozenLockfile = typeof pnpmConfig["preferFrozenLockfile"] === "undefined" ? pnpmConfig.preferFrozenShrinkwrap : pnpmConfig["preferFrozenLockfile"]; + pnpmConfig.sharedWorkspaceLockfile = typeof pnpmConfig["sharedWorkspaceLockfile"] === "undefined" ? pnpmConfig.sharedWorkspaceShrinkwrap : pnpmConfig["sharedWorkspaceLockfile"]; + pnpmConfig.pnpmHomeDir = dirs_1.getDataDir(process); + if (cliOptions["global"]) { + const knownGlobalBinDirCandidates = []; + let globalDirRoot; + if (pnpmConfig["globalDir"]) { + globalDirRoot = pnpmConfig["globalDir"]; + } else if (pnpmConfig.useBetaCli) { + globalDirRoot = path_1.default.join(pnpmConfig.pnpmHomeDir, "global-packages"); + } else { + let npmGlobalPrefix = findBestGlobalPrefix_1.default(npmConfig.globalPrefix, process.env); + const globalDirName = `${path_1.default.sep}${PNPM_GLOBAL}${path_1.default.sep}`; + if (npmGlobalPrefix.includes(globalDirName)) { + npmGlobalPrefix = npmGlobalPrefix.substring(0, npmGlobalPrefix.indexOf(globalDirName)); + } else { + const npmGlobalBinDir = process.platform === "win32" ? npmGlobalPrefix : path_1.default.resolve(npmGlobalPrefix, "bin"); + knownGlobalBinDirCandidates.push(npmGlobalBinDir); + } + globalDirRoot = path_1.default.join(firstWithWriteAccess([npmGlobalPrefix, os_1.default.homedir()]), PNPM_GLOBAL); + } + pnpmConfig.dir = path_1.default.join(globalDirRoot, constants_1.LAYOUT_VERSION.toString()); + const npmConfigGlobalBinDir = npmConfig.get("global-bin-dir"); + if (typeof npmConfigGlobalBinDir === "string") { + fs_1.default.mkdirSync(npmConfigGlobalBinDir, { recursive: true }); + pnpmConfig.bin = npmConfigGlobalBinDir; + } else { + pnpmConfig.bin = cliOptions.dir ? process.platform === "win32" ? cliOptions.dir : path_1.default.resolve(cliOptions.dir, "bin") : global_bin_dir_1.default(knownGlobalBinDirCandidates, { shouldAllowWrite: opts.globalDirShouldAllowWrite === true }); + } + pnpmConfig.save = true; + pnpmConfig.allowNew = true; + pnpmConfig.ignoreCurrentPrefs = true; + pnpmConfig.saveProd = true; + pnpmConfig.saveDev = false; + pnpmConfig.saveOptional = false; + pnpmConfig.extendNodePath = false; + if (pnpmConfig.hoistPattern != null && (pnpmConfig.hoistPattern.length > 1 || pnpmConfig.hoistPattern[0] !== "*")) { + if (opts.cliOptions["hoist-pattern"]) { + throw new error_1.default("CONFIG_CONFLICT_HOIST_PATTERN_WITH_GLOBAL", 'Configuration conflict. "hoist-pattern" may not be used with "global"'); + } + } + if (pnpmConfig.linkWorkspacePackages) { + if (opts.cliOptions["link-workspace-packages"]) { + throw new error_1.default("CONFIG_CONFLICT_LINK_WORKSPACE_PACKAGES_WITH_GLOBAL", 'Configuration conflict. "link-workspace-packages" may not be used with "global"'); + } + pnpmConfig.linkWorkspacePackages = false; + } + if (pnpmConfig.sharedWorkspaceLockfile) { + if (opts.cliOptions["shared-workspace-lockfile"]) { + throw new error_1.default("CONFIG_CONFLICT_SHARED_WORKSPACE_LOCKFILE_WITH_GLOBAL", 'Configuration conflict. "shared-workspace-lockfile" may not be used with "global"'); + } + pnpmConfig.sharedWorkspaceLockfile = false; + } + if (pnpmConfig.lockfileDir) { + if (opts.cliOptions["lockfile-dir"]) { + throw new error_1.default("CONFIG_CONFLICT_LOCKFILE_DIR_WITH_GLOBAL", 'Configuration conflict. "lockfile-dir" may not be used with "global"'); + } + delete pnpmConfig.lockfileDir; + } + if (opts.cliOptions["virtual-store-dir"]) { + throw new error_1.default("CONFIG_CONFLICT_VIRTUAL_STORE_DIR_WITH_GLOBAL", 'Configuration conflict. "virtual-store-dir" may not be used with "global"'); + } + delete pnpmConfig.virtualStoreDir; + } else { + pnpmConfig.dir = cwd; + pnpmConfig.bin = path_1.default.join(pnpmConfig.dir, "node_modules", ".bin"); + } + if (opts.cliOptions["save-peer"]) { + if (opts.cliOptions["save-prod"]) { + throw new error_1.default("CONFIG_CONFLICT_PEER_CANNOT_BE_PROD_DEP", "A package cannot be a peer dependency and a prod dependency at the same time"); + } + if (opts.cliOptions["save-optional"]) { + throw new error_1.default("CONFIG_CONFLICT_PEER_CANNOT_BE_OPTIONAL_DEP", "A package cannot be a peer dependency and an optional dependency at the same time"); + } + } + if (pnpmConfig.sharedWorkspaceLockfile && !pnpmConfig.lockfileDir && pnpmConfig.workspaceDir) { + pnpmConfig.lockfileDir = pnpmConfig.workspaceDir; + } + pnpmConfig.packageManager = packageManager; + if (pnpmConfig.only === "prod" || pnpmConfig.only === "production" || !pnpmConfig.only && pnpmConfig.production) { + pnpmConfig.production = true; + pnpmConfig.dev = false; + } else if (pnpmConfig.only === "dev" || pnpmConfig.only === "development" || pnpmConfig.dev) { + pnpmConfig.production = false; + pnpmConfig.dev = true; + pnpmConfig.optional = false; + } else { + pnpmConfig.production = true; + pnpmConfig.dev = true; + } + if (typeof pnpmConfig.filter === "string") { + pnpmConfig.filter = pnpmConfig.filter.split(" "); + } + if (typeof pnpmConfig.filterProd === "string") { + pnpmConfig.filterProd = pnpmConfig.filterProd.split(" "); + } + if (!pnpmConfig.ignoreScripts && pnpmConfig.workspaceDir) { + pnpmConfig.extraBinPaths = [path_1.default.join(pnpmConfig.workspaceDir, "node_modules", ".bin")]; + } else { + pnpmConfig.extraBinPaths = []; + } + if (pnpmConfig["shamefullyFlatten"]) { + warnings.push(`The "shamefully-flatten" setting has been renamed to "shamefully-hoist". Also, in most cases you won't need "shamefully-hoist". Since v4, a semistrict node_modules structure is on by default (via hoist-pattern=[*]).`); + pnpmConfig.shamefullyHoist = true; + } + if (!pnpmConfig.storeDir && pnpmConfig["store"]) { + warnings.push('The "store" setting has been renamed to "store-dir". Please use the new name.'); + pnpmConfig.storeDir = pnpmConfig["store"]; + } + if (!pnpmConfig.cacheDir) { + pnpmConfig.cacheDir = dirs_1.getCacheDir(process); + } + if (!pnpmConfig.stateDir) { + pnpmConfig.stateDir = dirs_1.getStateDir(process); + } + if (pnpmConfig["hoist"] === false) { + delete pnpmConfig.hoistPattern; + } + switch (pnpmConfig.shamefullyHoist) { + case false: + delete pnpmConfig.publicHoistPattern; + break; + case true: + pnpmConfig.publicHoistPattern = ["*"]; + break; + default: + if (pnpmConfig.publicHoistPattern == null || pnpmConfig.publicHoistPattern === "" || Array.isArray(pnpmConfig.publicHoistPattern) && pnpmConfig.publicHoistPattern.length === 1 && pnpmConfig.publicHoistPattern[0] === "") { + delete pnpmConfig.publicHoistPattern; + } + break; + } + if (!pnpmConfig.symlink) { + delete pnpmConfig.hoistPattern; + delete pnpmConfig.publicHoistPattern; + } + if (typeof pnpmConfig["color"] === "boolean") { + switch (pnpmConfig["color"]) { + case true: + pnpmConfig.color = "always"; + break; + case false: + pnpmConfig.color = "never"; + break; + default: + pnpmConfig.color = "auto"; + break; + } + } + if (!pnpmConfig.httpsProxy) { + pnpmConfig.httpsProxy = (_f = pnpmConfig.proxy) !== null && _f !== void 0 ? _f : getProcessEnv("https_proxy"); + } + if (!pnpmConfig.httpProxy) { + pnpmConfig.httpProxy = (_h = (_g = pnpmConfig.httpsProxy) !== null && _g !== void 0 ? _g : getProcessEnv("http_proxy")) !== null && _h !== void 0 ? _h : getProcessEnv("proxy"); + } + if (!pnpmConfig.noProxy) { + pnpmConfig.noProxy = (_j = pnpmConfig["noproxy"]) !== null && _j !== void 0 ? _j : getProcessEnv("no_proxy"); + } + pnpmConfig.enablePnp = pnpmConfig["nodeLinker"] === "pnp"; + if (opts.checkUnknownSetting) { + const settingKeys = Object.keys({ + ...(_l = (_k = npmConfig === null || npmConfig === void 0 ? void 0 : npmConfig.sources) === null || _k === void 0 ? void 0 : _k.workspace) === null || _l === void 0 ? void 0 : _l.data, + ...(_o = (_m = npmConfig === null || npmConfig === void 0 ? void 0 : npmConfig.sources) === null || _m === void 0 ? void 0 : _m.project) === null || _o === void 0 ? void 0 : _o.data + }).filter((key) => key.trim() !== ""); + const unknownKeys = []; + for (const key of settingKeys) { + if (!rcOptions.includes(key) && !key.startsWith("//") && !(key.startsWith("@") && key.endsWith(":registry"))) { + unknownKeys.push(key); + } + } + if (unknownKeys.length > 0) { + warnings.push(`Your .npmrc file contains unknown setting: ${unknownKeys.join(", ")}`); + } + } + pnpmConfig.workspaceConcurrency = concurrency_1.getWorkspaceConcurrency(pnpmConfig.workspaceConcurrency); + return { config: pnpmConfig, warnings }; + }; + function getProcessEnv(env) { + var _a, _b; + return (_b = (_a = process.env[env]) !== null && _a !== void 0 ? _a : process.env[env.toUpperCase()]) !== null && _b !== void 0 ? _b : process.env[env.toLowerCase()]; + } + function firstWithWriteAccess(dirs) { + const first = dirs.find((dir) => { + try { + return can_write_to_dir_1.sync(dir); + } catch (err) { + if (err.code !== "ENOENT") + throw err; + } + try { + fs_1.default.mkdirSync(dir, { recursive: true }); + return true; + } catch (err) { + return false; + } + }); + if (first == null) { + throw new error_1.default("NO_SUITABLE_GLOBAL_DIR", `pnpm has no write access to global direcotry. Tried locations: ${dirs.join(", ")}`); + } + return first; + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isFunction.js +var require_isFunction = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isFunction.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isFunction = void 0; + function isFunction(value) { + return typeof value === "function"; + } + exports2.isFunction = isFunction; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js +var require_createErrorClass = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createErrorClass = void 0; + function createErrorClass(createImpl) { + var _super = function(instance) { + Error.call(instance); + instance.stack = new Error().stack; + }; + var ctorFunc = createImpl(_super); + ctorFunc.prototype = Object.create(Error.prototype); + ctorFunc.prototype.constructor = ctorFunc; + return ctorFunc; + } + exports2.createErrorClass = createErrorClass; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js +var require_UnsubscriptionError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UnsubscriptionError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.UnsubscriptionError = createErrorClass_1.createErrorClass(function(_super) { + return function UnsubscriptionErrorImpl(errors) { + _super(this); + this.message = errors ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function(err, i) { + return i + 1 + ") " + err.toString(); + }).join("\n ") : ""; + this.name = "UnsubscriptionError"; + this.errors = errors; + }; + }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/arrRemove.js +var require_arrRemove = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/arrRemove.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.arrRemove = void 0; + function arrRemove(arr, item) { + if (arr) { + var index = arr.indexOf(item); + 0 <= index && arr.splice(index, 1); + } + } + exports2.arrRemove = arrRemove; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Subscription.js +var require_Subscription = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Subscription.js"(exports2) { + "use strict"; + var __values = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isSubscription = exports2.EMPTY_SUBSCRIPTION = exports2.Subscription = void 0; + var isFunction_1 = require_isFunction(); + var UnsubscriptionError_1 = require_UnsubscriptionError(); + var arrRemove_1 = require_arrRemove(); + var Subscription = function() { + function Subscription2(initialTeardown) { + this.initialTeardown = initialTeardown; + this.closed = false; + this._parentage = null; + this._teardowns = null; + } + Subscription2.prototype.unsubscribe = function() { + var e_1, _a, e_2, _b; + var errors; + if (!this.closed) { + this.closed = true; + var _parentage = this._parentage; + if (_parentage) { + this._parentage = null; + if (Array.isArray(_parentage)) { + try { + for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) { + var parent_1 = _parentage_1_1.value; + parent_1.remove(this); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) + _a.call(_parentage_1); + } finally { + if (e_1) + throw e_1.error; + } + } + } else { + _parentage.remove(this); + } + } + var initialTeardown = this.initialTeardown; + if (isFunction_1.isFunction(initialTeardown)) { + try { + initialTeardown(); + } catch (e) { + errors = e instanceof UnsubscriptionError_1.UnsubscriptionError ? e.errors : [e]; + } + } + var _teardowns = this._teardowns; + if (_teardowns) { + this._teardowns = null; + try { + for (var _teardowns_1 = __values(_teardowns), _teardowns_1_1 = _teardowns_1.next(); !_teardowns_1_1.done; _teardowns_1_1 = _teardowns_1.next()) { + var teardown_1 = _teardowns_1_1.value; + try { + execTeardown(teardown_1); + } catch (err) { + errors = errors !== null && errors !== void 0 ? errors : []; + if (err instanceof UnsubscriptionError_1.UnsubscriptionError) { + errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors)); + } else { + errors.push(err); + } + } + } + } catch (e_2_1) { + e_2 = { error: e_2_1 }; + } finally { + try { + if (_teardowns_1_1 && !_teardowns_1_1.done && (_b = _teardowns_1.return)) + _b.call(_teardowns_1); + } finally { + if (e_2) + throw e_2.error; + } + } + } + if (errors) { + throw new UnsubscriptionError_1.UnsubscriptionError(errors); + } + } + }; + Subscription2.prototype.add = function(teardown) { + var _a; + if (teardown && teardown !== this) { + if (this.closed) { + execTeardown(teardown); + } else { + if (teardown instanceof Subscription2) { + if (teardown.closed || teardown._hasParent(this)) { + return; + } + teardown._addParent(this); + } + (this._teardowns = (_a = this._teardowns) !== null && _a !== void 0 ? _a : []).push(teardown); + } + } + }; + Subscription2.prototype._hasParent = function(parent) { + var _parentage = this._parentage; + return _parentage === parent || Array.isArray(_parentage) && _parentage.includes(parent); + }; + Subscription2.prototype._addParent = function(parent) { + var _parentage = this._parentage; + this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent; + }; + Subscription2.prototype._removeParent = function(parent) { + var _parentage = this._parentage; + if (_parentage === parent) { + this._parentage = null; + } else if (Array.isArray(_parentage)) { + arrRemove_1.arrRemove(_parentage, parent); + } + }; + Subscription2.prototype.remove = function(teardown) { + var _teardowns = this._teardowns; + _teardowns && arrRemove_1.arrRemove(_teardowns, teardown); + if (teardown instanceof Subscription2) { + teardown._removeParent(this); + } + }; + Subscription2.EMPTY = function() { + var empty = new Subscription2(); + empty.closed = true; + return empty; + }(); + return Subscription2; + }(); + exports2.Subscription = Subscription; + exports2.EMPTY_SUBSCRIPTION = Subscription.EMPTY; + function isSubscription(value) { + return value instanceof Subscription || value && "closed" in value && isFunction_1.isFunction(value.remove) && isFunction_1.isFunction(value.add) && isFunction_1.isFunction(value.unsubscribe); + } + exports2.isSubscription = isSubscription; + function execTeardown(teardown) { + if (isFunction_1.isFunction(teardown)) { + teardown(); + } else { + teardown.unsubscribe(); + } + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/config.js +var require_config = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/config.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.config = void 0; + exports2.config = { + onUnhandledError: null, + onStoppedNotification: null, + Promise: void 0, + useDeprecatedSynchronousErrorHandling: false, + useDeprecatedNextContext: false + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js +var require_timeoutProvider = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.timeoutProvider = void 0; + exports2.timeoutProvider = { + setTimeout: function() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var delegate = exports2.timeoutProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) || setTimeout).apply(void 0, __spreadArray([], __read(args2))); + }, + clearTimeout: function(handle) { + var delegate = exports2.timeoutProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle); + }, + delegate: void 0 + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js +var require_reportUnhandledError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.reportUnhandledError = void 0; + var config_1 = require_config(); + var timeoutProvider_1 = require_timeoutProvider(); + function reportUnhandledError(err) { + timeoutProvider_1.timeoutProvider.setTimeout(function() { + var onUnhandledError = config_1.config.onUnhandledError; + if (onUnhandledError) { + onUnhandledError(err); + } else { + throw err; + } + }); + } + exports2.reportUnhandledError = reportUnhandledError; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/noop.js +var require_noop = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/noop.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.noop = void 0; + function noop() { + } + exports2.noop = noop; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/NotificationFactories.js +var require_NotificationFactories = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/NotificationFactories.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createNotification = exports2.nextNotification = exports2.errorNotification = exports2.COMPLETE_NOTIFICATION = void 0; + exports2.COMPLETE_NOTIFICATION = function() { + return createNotification("C", void 0, void 0); + }(); + function errorNotification(error) { + return createNotification("E", void 0, error); + } + exports2.errorNotification = errorNotification; + function nextNotification(value) { + return createNotification("N", value, void 0); + } + exports2.nextNotification = nextNotification; + function createNotification(kind, value, error) { + return { + kind, + value, + error + }; + } + exports2.createNotification = createNotification; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/errorContext.js +var require_errorContext = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/errorContext.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.captureError = exports2.errorContext = void 0; + var config_1 = require_config(); + var context = null; + function errorContext(cb) { + if (config_1.config.useDeprecatedSynchronousErrorHandling) { + var isRoot = !context; + if (isRoot) { + context = { errorThrown: false, error: null }; + } + cb(); + if (isRoot) { + var _a = context, errorThrown = _a.errorThrown, error = _a.error; + context = null; + if (errorThrown) { + throw error; + } + } + } else { + cb(); + } + } + exports2.errorContext = errorContext; + function captureError(err) { + if (config_1.config.useDeprecatedSynchronousErrorHandling && context) { + context.errorThrown = true; + context.error = err; + } + } + exports2.captureError = captureError; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Subscriber.js +var require_Subscriber = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Subscriber.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.EMPTY_OBSERVER = exports2.SafeSubscriber = exports2.Subscriber = void 0; + var isFunction_1 = require_isFunction(); + var Subscription_1 = require_Subscription(); + var config_1 = require_config(); + var reportUnhandledError_1 = require_reportUnhandledError(); + var noop_1 = require_noop(); + var NotificationFactories_1 = require_NotificationFactories(); + var timeoutProvider_1 = require_timeoutProvider(); + var errorContext_1 = require_errorContext(); + var Subscriber = function(_super) { + __extends(Subscriber2, _super); + function Subscriber2(destination) { + var _this = _super.call(this) || this; + _this.isStopped = false; + if (destination) { + _this.destination = destination; + if (Subscription_1.isSubscription(destination)) { + destination.add(_this); + } + } else { + _this.destination = exports2.EMPTY_OBSERVER; + } + return _this; + } + Subscriber2.create = function(next, error, complete) { + return new SafeSubscriber(next, error, complete); + }; + Subscriber2.prototype.next = function(value) { + if (this.isStopped) { + handleStoppedNotification(NotificationFactories_1.nextNotification(value), this); + } else { + this._next(value); + } + }; + Subscriber2.prototype.error = function(err) { + if (this.isStopped) { + handleStoppedNotification(NotificationFactories_1.errorNotification(err), this); + } else { + this.isStopped = true; + this._error(err); + } + }; + Subscriber2.prototype.complete = function() { + if (this.isStopped) { + handleStoppedNotification(NotificationFactories_1.COMPLETE_NOTIFICATION, this); + } else { + this.isStopped = true; + this._complete(); + } + }; + Subscriber2.prototype.unsubscribe = function() { + if (!this.closed) { + this.isStopped = true; + _super.prototype.unsubscribe.call(this); + this.destination = null; + } + }; + Subscriber2.prototype._next = function(value) { + this.destination.next(value); + }; + Subscriber2.prototype._error = function(err) { + try { + this.destination.error(err); + } finally { + this.unsubscribe(); + } + }; + Subscriber2.prototype._complete = function() { + try { + this.destination.complete(); + } finally { + this.unsubscribe(); + } + }; + return Subscriber2; + }(Subscription_1.Subscription); + exports2.Subscriber = Subscriber; + var SafeSubscriber = function(_super) { + __extends(SafeSubscriber2, _super); + function SafeSubscriber2(observerOrNext, error, complete) { + var _this = _super.call(this) || this; + var next; + if (isFunction_1.isFunction(observerOrNext)) { + next = observerOrNext; + } else if (observerOrNext) { + next = observerOrNext.next, error = observerOrNext.error, complete = observerOrNext.complete; + var context_1; + if (_this && config_1.config.useDeprecatedNextContext) { + context_1 = Object.create(observerOrNext); + context_1.unsubscribe = function() { + return _this.unsubscribe(); + }; + } else { + context_1 = observerOrNext; + } + next = next === null || next === void 0 ? void 0 : next.bind(context_1); + error = error === null || error === void 0 ? void 0 : error.bind(context_1); + complete = complete === null || complete === void 0 ? void 0 : complete.bind(context_1); + } + _this.destination = { + next: next ? wrapForErrorHandling(next, _this) : noop_1.noop, + error: wrapForErrorHandling(error !== null && error !== void 0 ? error : defaultErrorHandler, _this), + complete: complete ? wrapForErrorHandling(complete, _this) : noop_1.noop + }; + return _this; + } + return SafeSubscriber2; + }(Subscriber); + exports2.SafeSubscriber = SafeSubscriber; + function wrapForErrorHandling(handler, instance) { + return function() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + try { + handler.apply(void 0, __spreadArray([], __read(args2))); + } catch (err) { + if (config_1.config.useDeprecatedSynchronousErrorHandling) { + errorContext_1.captureError(err); + } else { + reportUnhandledError_1.reportUnhandledError(err); + } + } + }; + } + function defaultErrorHandler(err) { + throw err; + } + function handleStoppedNotification(notification, subscriber) { + var onStoppedNotification = config_1.config.onStoppedNotification; + onStoppedNotification && timeoutProvider_1.timeoutProvider.setTimeout(function() { + return onStoppedNotification(notification, subscriber); + }); + } + exports2.EMPTY_OBSERVER = { + closed: true, + next: noop_1.noop, + error: defaultErrorHandler, + complete: noop_1.noop + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/symbol/observable.js +var require_observable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/symbol/observable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.observable = void 0; + exports2.observable = function() { + return typeof Symbol === "function" && Symbol.observable || "@@observable"; + }(); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/identity.js +var require_identity = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/identity.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.identity = void 0; + function identity(x) { + return x; + } + exports2.identity = identity; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/pipe.js +var require_pipe = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/pipe.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pipeFromArray = exports2.pipe = void 0; + var identity_1 = require_identity(); + function pipe() { + var fns = []; + for (var _i = 0; _i < arguments.length; _i++) { + fns[_i] = arguments[_i]; + } + return pipeFromArray(fns); + } + exports2.pipe = pipe; + function pipeFromArray(fns) { + if (fns.length === 0) { + return identity_1.identity; + } + if (fns.length === 1) { + return fns[0]; + } + return function piped(input) { + return fns.reduce(function(prev, fn2) { + return fn2(prev); + }, input); + }; + } + exports2.pipeFromArray = pipeFromArray; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Observable.js +var require_Observable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Observable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Observable = void 0; + var Subscriber_1 = require_Subscriber(); + var Subscription_1 = require_Subscription(); + var observable_1 = require_observable(); + var pipe_1 = require_pipe(); + var config_1 = require_config(); + var isFunction_1 = require_isFunction(); + var errorContext_1 = require_errorContext(); + var Observable = function() { + function Observable2(subscribe) { + if (subscribe) { + this._subscribe = subscribe; + } + } + Observable2.prototype.lift = function(operator) { + var observable = new Observable2(); + observable.source = this; + observable.operator = operator; + return observable; + }; + Observable2.prototype.subscribe = function(observerOrNext, error, complete) { + var _this = this; + var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new Subscriber_1.SafeSubscriber(observerOrNext, error, complete); + errorContext_1.errorContext(function() { + var _a = _this, operator = _a.operator, source = _a.source; + subscriber.add(operator ? operator.call(subscriber, source) : source ? _this._subscribe(subscriber) : _this._trySubscribe(subscriber)); + }); + return subscriber; + }; + Observable2.prototype._trySubscribe = function(sink) { + try { + return this._subscribe(sink); + } catch (err) { + sink.error(err); + } + }; + Observable2.prototype.forEach = function(next, promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor(function(resolve, reject) { + var subscription; + subscription = _this.subscribe(function(value) { + try { + next(value); + } catch (err) { + reject(err); + subscription === null || subscription === void 0 ? void 0 : subscription.unsubscribe(); + } + }, reject, resolve); + }); + }; + Observable2.prototype._subscribe = function(subscriber) { + var _a; + return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber); + }; + Observable2.prototype[observable_1.observable] = function() { + return this; + }; + Observable2.prototype.pipe = function() { + var operations = []; + for (var _i = 0; _i < arguments.length; _i++) { + operations[_i] = arguments[_i]; + } + return pipe_1.pipeFromArray(operations)(this); + }; + Observable2.prototype.toPromise = function(promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor(function(resolve, reject) { + var value; + _this.subscribe(function(x) { + return value = x; + }, function(err) { + return reject(err); + }, function() { + return resolve(value); + }); + }); + }; + Observable2.create = function(subscribe) { + return new Observable2(subscribe); + }; + return Observable2; + }(); + exports2.Observable = Observable; + function getPromiseCtor(promiseCtor) { + var _a; + return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config_1.config.Promise) !== null && _a !== void 0 ? _a : Promise; + } + function isObserver(value) { + return value && isFunction_1.isFunction(value.next) && isFunction_1.isFunction(value.error) && isFunction_1.isFunction(value.complete); + } + function isSubscriber(value) { + return value && value instanceof Subscriber_1.Subscriber || isObserver(value) && Subscription_1.isSubscription(value); + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/lift.js +var require_lift = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/lift.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.operate = exports2.hasLift = void 0; + var isFunction_1 = require_isFunction(); + function hasLift(source) { + return isFunction_1.isFunction(source === null || source === void 0 ? void 0 : source.lift); + } + exports2.hasLift = hasLift; + function operate(init) { + return function(source) { + if (hasLift(source)) { + return source.lift(function(liftedSource) { + try { + return init(liftedSource, this); + } catch (err) { + this.error(err); + } + }); + } + throw new TypeError("Unable to lift unknown Observable type"); + }; + } + exports2.operate = operate; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js +var require_OperatorSubscriber = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OperatorSubscriber = void 0; + var Subscriber_1 = require_Subscriber(); + var OperatorSubscriber = function(_super) { + __extends(OperatorSubscriber2, _super); + function OperatorSubscriber2(destination, onNext, onComplete, onError, onFinalize) { + var _this = _super.call(this, destination) || this; + _this.onFinalize = onFinalize; + _this._next = onNext ? function(value) { + try { + onNext(value); + } catch (err) { + destination.error(err); + } + } : _super.prototype._next; + _this._error = onError ? function(err) { + try { + onError(err); + } catch (err2) { + destination.error(err2); + } finally { + this.unsubscribe(); + } + } : _super.prototype._error; + _this._complete = onComplete ? function() { + try { + onComplete(); + } catch (err) { + destination.error(err); + } finally { + this.unsubscribe(); + } + } : _super.prototype._complete; + return _this; + } + OperatorSubscriber2.prototype.unsubscribe = function() { + var _a; + var closed = this.closed; + _super.prototype.unsubscribe.call(this); + !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this)); + }; + return OperatorSubscriber2; + }(Subscriber_1.Subscriber); + exports2.OperatorSubscriber = OperatorSubscriber; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/refCount.js +var require_refCount = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/refCount.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.refCount = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function refCount() { + return lift_1.operate(function(source, subscriber) { + var connection = null; + source._refCount++; + var refCounter = new OperatorSubscriber_1.OperatorSubscriber(subscriber, void 0, void 0, void 0, function() { + if (!source || source._refCount <= 0 || 0 < --source._refCount) { + connection = null; + return; + } + var sharedConnection = source._connection; + var conn = connection; + connection = null; + if (sharedConnection && (!conn || sharedConnection === conn)) { + sharedConnection.unsubscribe(); + } + subscriber.unsubscribe(); + }); + source.subscribe(refCounter); + if (!refCounter.closed) { + connection = source.connect(); + } + }); + } + exports2.refCount = refCount; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js +var require_ConnectableObservable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ConnectableObservable = void 0; + var Observable_1 = require_Observable(); + var Subscription_1 = require_Subscription(); + var refCount_1 = require_refCount(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var lift_1 = require_lift(); + var ConnectableObservable = function(_super) { + __extends(ConnectableObservable2, _super); + function ConnectableObservable2(source, subjectFactory) { + var _this = _super.call(this) || this; + _this.source = source; + _this.subjectFactory = subjectFactory; + _this._subject = null; + _this._refCount = 0; + _this._connection = null; + if (lift_1.hasLift(source)) { + _this.lift = source.lift; + } + return _this; + } + ConnectableObservable2.prototype._subscribe = function(subscriber) { + return this.getSubject().subscribe(subscriber); + }; + ConnectableObservable2.prototype.getSubject = function() { + var subject = this._subject; + if (!subject || subject.isStopped) { + this._subject = this.subjectFactory(); + } + return this._subject; + }; + ConnectableObservable2.prototype._teardown = function() { + this._refCount = 0; + var _connection = this._connection; + this._subject = this._connection = null; + _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe(); + }; + ConnectableObservable2.prototype.connect = function() { + var _this = this; + var connection = this._connection; + if (!connection) { + connection = this._connection = new Subscription_1.Subscription(); + var subject_1 = this.getSubject(); + connection.add(this.source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subject_1, void 0, function() { + _this._teardown(); + subject_1.complete(); + }, function(err) { + _this._teardown(); + subject_1.error(err); + }, function() { + return _this._teardown(); + }))); + if (connection.closed) { + this._connection = null; + connection = Subscription_1.Subscription.EMPTY; + } + } + return connection; + }; + ConnectableObservable2.prototype.refCount = function() { + return refCount_1.refCount()(this); + }; + return ConnectableObservable2; + }(Observable_1.Observable); + exports2.ConnectableObservable = ConnectableObservable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js +var require_performanceTimestampProvider = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.performanceTimestampProvider = void 0; + exports2.performanceTimestampProvider = { + now: function() { + return (exports2.performanceTimestampProvider.delegate || performance).now(); + }, + delegate: void 0 + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js +var require_animationFrameProvider = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.animationFrameProvider = void 0; + var Subscription_1 = require_Subscription(); + exports2.animationFrameProvider = { + schedule: function(callback) { + var request = requestAnimationFrame; + var cancel = cancelAnimationFrame; + var delegate = exports2.animationFrameProvider.delegate; + if (delegate) { + request = delegate.requestAnimationFrame; + cancel = delegate.cancelAnimationFrame; + } + var handle = request(function(timestamp) { + cancel = void 0; + callback(timestamp); + }); + return new Subscription_1.Subscription(function() { + return cancel === null || cancel === void 0 ? void 0 : cancel(handle); + }); + }, + requestAnimationFrame: function() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var delegate = exports2.animationFrameProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, __spreadArray([], __read(args2))); + }, + cancelAnimationFrame: function() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var delegate = exports2.animationFrameProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame).apply(void 0, __spreadArray([], __read(args2))); + }, + delegate: void 0 + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js +var require_animationFrames = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.animationFrames = void 0; + var Observable_1 = require_Observable(); + var Subscription_1 = require_Subscription(); + var performanceTimestampProvider_1 = require_performanceTimestampProvider(); + var animationFrameProvider_1 = require_animationFrameProvider(); + function animationFrames(timestampProvider) { + return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES; + } + exports2.animationFrames = animationFrames; + function animationFramesFactory(timestampProvider) { + var schedule = animationFrameProvider_1.animationFrameProvider.schedule; + return new Observable_1.Observable(function(subscriber) { + var subscription = new Subscription_1.Subscription(); + var provider = timestampProvider || performanceTimestampProvider_1.performanceTimestampProvider; + var start = provider.now(); + var run = function(timestamp) { + var now = provider.now(); + subscriber.next({ + timestamp: timestampProvider ? now : timestamp, + elapsed: now - start + }); + if (!subscriber.closed) { + subscription.add(schedule(run)); + } + }; + subscription.add(schedule(run)); + return subscription; + }); + } + var DEFAULT_ANIMATION_FRAMES = animationFramesFactory(); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js +var require_ObjectUnsubscribedError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ObjectUnsubscribedError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.ObjectUnsubscribedError = createErrorClass_1.createErrorClass(function(_super) { + return function ObjectUnsubscribedErrorImpl() { + _super(this); + this.name = "ObjectUnsubscribedError"; + this.message = "object unsubscribed"; + }; + }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Subject.js +var require_Subject = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Subject.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + var __values = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousSubject = exports2.Subject = void 0; + var Observable_1 = require_Observable(); + var Subscription_1 = require_Subscription(); + var ObjectUnsubscribedError_1 = require_ObjectUnsubscribedError(); + var arrRemove_1 = require_arrRemove(); + var errorContext_1 = require_errorContext(); + var Subject = function(_super) { + __extends(Subject2, _super); + function Subject2() { + var _this = _super.call(this) || this; + _this.closed = false; + _this.observers = []; + _this.isStopped = false; + _this.hasError = false; + _this.thrownError = null; + return _this; + } + Subject2.prototype.lift = function(operator) { + var subject = new AnonymousSubject(this, this); + subject.operator = operator; + return subject; + }; + Subject2.prototype._throwIfClosed = function() { + if (this.closed) { + throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); + } + }; + Subject2.prototype.next = function(value) { + var _this = this; + errorContext_1.errorContext(function() { + var e_1, _a; + _this._throwIfClosed(); + if (!_this.isStopped) { + var copy = _this.observers.slice(); + try { + for (var copy_1 = __values(copy), copy_1_1 = copy_1.next(); !copy_1_1.done; copy_1_1 = copy_1.next()) { + var observer = copy_1_1.value; + observer.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (copy_1_1 && !copy_1_1.done && (_a = copy_1.return)) + _a.call(copy_1); + } finally { + if (e_1) + throw e_1.error; + } + } + } + }); + }; + Subject2.prototype.error = function(err) { + var _this = this; + errorContext_1.errorContext(function() { + _this._throwIfClosed(); + if (!_this.isStopped) { + _this.hasError = _this.isStopped = true; + _this.thrownError = err; + var observers = _this.observers; + while (observers.length) { + observers.shift().error(err); + } + } + }); + }; + Subject2.prototype.complete = function() { + var _this = this; + errorContext_1.errorContext(function() { + _this._throwIfClosed(); + if (!_this.isStopped) { + _this.isStopped = true; + var observers = _this.observers; + while (observers.length) { + observers.shift().complete(); + } + } + }); + }; + Subject2.prototype.unsubscribe = function() { + this.isStopped = this.closed = true; + this.observers = null; + }; + Object.defineProperty(Subject2.prototype, "observed", { + get: function() { + var _a; + return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0; + }, + enumerable: false, + configurable: true + }); + Subject2.prototype._trySubscribe = function(subscriber) { + this._throwIfClosed(); + return _super.prototype._trySubscribe.call(this, subscriber); + }; + Subject2.prototype._subscribe = function(subscriber) { + this._throwIfClosed(); + this._checkFinalizedStatuses(subscriber); + return this._innerSubscribe(subscriber); + }; + Subject2.prototype._innerSubscribe = function(subscriber) { + var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers; + return hasError || isStopped ? Subscription_1.EMPTY_SUBSCRIPTION : (observers.push(subscriber), new Subscription_1.Subscription(function() { + return arrRemove_1.arrRemove(observers, subscriber); + })); + }; + Subject2.prototype._checkFinalizedStatuses = function(subscriber) { + var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped; + if (hasError) { + subscriber.error(thrownError); + } else if (isStopped) { + subscriber.complete(); + } + }; + Subject2.prototype.asObservable = function() { + var observable = new Observable_1.Observable(); + observable.source = this; + return observable; + }; + Subject2.create = function(destination, source) { + return new AnonymousSubject(destination, source); + }; + return Subject2; + }(Observable_1.Observable); + exports2.Subject = Subject; + var AnonymousSubject = function(_super) { + __extends(AnonymousSubject2, _super); + function AnonymousSubject2(destination, source) { + var _this = _super.call(this) || this; + _this.destination = destination; + _this.source = source; + return _this; + } + AnonymousSubject2.prototype.next = function(value) { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value); + }; + AnonymousSubject2.prototype.error = function(err) { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err); + }; + AnonymousSubject2.prototype.complete = function() { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a); + }; + AnonymousSubject2.prototype._subscribe = function(subscriber) { + var _a, _b; + return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : Subscription_1.EMPTY_SUBSCRIPTION; + }; + return AnonymousSubject2; + }(Subject); + exports2.AnonymousSubject = AnonymousSubject; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/BehaviorSubject.js +var require_BehaviorSubject = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/BehaviorSubject.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BehaviorSubject = void 0; + var Subject_1 = require_Subject(); + var BehaviorSubject = function(_super) { + __extends(BehaviorSubject2, _super); + function BehaviorSubject2(_value) { + var _this = _super.call(this) || this; + _this._value = _value; + return _this; + } + Object.defineProperty(BehaviorSubject2.prototype, "value", { + get: function() { + return this.getValue(); + }, + enumerable: false, + configurable: true + }); + BehaviorSubject2.prototype._subscribe = function(subscriber) { + var subscription = _super.prototype._subscribe.call(this, subscriber); + !subscription.closed && subscriber.next(this._value); + return subscription; + }; + BehaviorSubject2.prototype.getValue = function() { + var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, _value = _a._value; + if (hasError) { + throw thrownError; + } + this._throwIfClosed(); + return _value; + }; + BehaviorSubject2.prototype.next = function(value) { + _super.prototype.next.call(this, this._value = value); + }; + return BehaviorSubject2; + }(Subject_1.Subject); + exports2.BehaviorSubject = BehaviorSubject; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js +var require_dateTimestampProvider = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.dateTimestampProvider = void 0; + exports2.dateTimestampProvider = { + now: function() { + return (exports2.dateTimestampProvider.delegate || Date).now(); + }, + delegate: void 0 + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/ReplaySubject.js +var require_ReplaySubject = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/ReplaySubject.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ReplaySubject = void 0; + var Subject_1 = require_Subject(); + var dateTimestampProvider_1 = require_dateTimestampProvider(); + var ReplaySubject = function(_super) { + __extends(ReplaySubject2, _super); + function ReplaySubject2(_bufferSize, _windowTime, _timestampProvider) { + if (_bufferSize === void 0) { + _bufferSize = Infinity; + } + if (_windowTime === void 0) { + _windowTime = Infinity; + } + if (_timestampProvider === void 0) { + _timestampProvider = dateTimestampProvider_1.dateTimestampProvider; + } + var _this = _super.call(this) || this; + _this._bufferSize = _bufferSize; + _this._windowTime = _windowTime; + _this._timestampProvider = _timestampProvider; + _this._buffer = []; + _this._infiniteTimeWindow = true; + _this._infiniteTimeWindow = _windowTime === Infinity; + _this._bufferSize = Math.max(1, _bufferSize); + _this._windowTime = Math.max(1, _windowTime); + return _this; + } + ReplaySubject2.prototype.next = function(value) { + var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime; + if (!isStopped) { + _buffer.push(value); + !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime); + } + this._trimBuffer(); + _super.prototype.next.call(this, value); + }; + ReplaySubject2.prototype._subscribe = function(subscriber) { + this._throwIfClosed(); + this._trimBuffer(); + var subscription = this._innerSubscribe(subscriber); + var _a = this, _infiniteTimeWindow = _a._infiniteTimeWindow, _buffer = _a._buffer; + var copy = _buffer.slice(); + for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) { + subscriber.next(copy[i]); + } + this._checkFinalizedStatuses(subscriber); + return subscription; + }; + ReplaySubject2.prototype._trimBuffer = function() { + var _a = this, _bufferSize = _a._bufferSize, _timestampProvider = _a._timestampProvider, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow; + var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize; + _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize); + if (!_infiniteTimeWindow) { + var now = _timestampProvider.now(); + var last = 0; + for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) { + last = i; + } + last && _buffer.splice(0, last + 1); + } + }; + return ReplaySubject2; + }(Subject_1.Subject); + exports2.ReplaySubject = ReplaySubject; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/AsyncSubject.js +var require_AsyncSubject = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/AsyncSubject.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AsyncSubject = void 0; + var Subject_1 = require_Subject(); + var AsyncSubject = function(_super) { + __extends(AsyncSubject2, _super); + function AsyncSubject2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this._value = null; + _this._hasValue = false; + _this._isComplete = false; + return _this; + } + AsyncSubject2.prototype._checkFinalizedStatuses = function(subscriber) { + var _a = this, hasError = _a.hasError, _hasValue = _a._hasValue, _value = _a._value, thrownError = _a.thrownError, isStopped = _a.isStopped, _isComplete = _a._isComplete; + if (hasError) { + subscriber.error(thrownError); + } else if (isStopped || _isComplete) { + _hasValue && subscriber.next(_value); + subscriber.complete(); + } + }; + AsyncSubject2.prototype.next = function(value) { + if (!this.isStopped) { + this._value = value; + this._hasValue = true; + } + }; + AsyncSubject2.prototype.complete = function() { + var _a = this, _hasValue = _a._hasValue, _value = _a._value, _isComplete = _a._isComplete; + if (!_isComplete) { + this._isComplete = true; + _hasValue && _super.prototype.next.call(this, _value); + _super.prototype.complete.call(this); + } + }; + return AsyncSubject2; + }(Subject_1.Subject); + exports2.AsyncSubject = AsyncSubject; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/Action.js +var require_Action = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/Action.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Action = void 0; + var Subscription_1 = require_Subscription(); + var Action = function(_super) { + __extends(Action2, _super); + function Action2(scheduler, work) { + return _super.call(this) || this; + } + Action2.prototype.schedule = function(state, delay) { + if (delay === void 0) { + delay = 0; + } + return this; + }; + return Action2; + }(Subscription_1.Subscription); + exports2.Action = Action; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js +var require_intervalProvider = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.intervalProvider = void 0; + exports2.intervalProvider = { + setInterval: function() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var delegate = exports2.intervalProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) || setInterval).apply(void 0, __spreadArray([], __read(args2))); + }, + clearInterval: function(handle) { + var delegate = exports2.intervalProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle); + }, + delegate: void 0 + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js +var require_AsyncAction = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AsyncAction = void 0; + var Action_1 = require_Action(); + var intervalProvider_1 = require_intervalProvider(); + var arrRemove_1 = require_arrRemove(); + var AsyncAction = function(_super) { + __extends(AsyncAction2, _super); + function AsyncAction2(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + _this.pending = false; + return _this; + } + AsyncAction2.prototype.schedule = function(state, delay) { + if (delay === void 0) { + delay = 0; + } + if (this.closed) { + return this; + } + this.state = state; + var id = this.id; + var scheduler = this.scheduler; + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, delay); + } + this.pending = true; + this.delay = delay; + this.id = this.id || this.requestAsyncId(scheduler, this.id, delay); + return this; + }; + AsyncAction2.prototype.requestAsyncId = function(scheduler, _id, delay) { + if (delay === void 0) { + delay = 0; + } + return intervalProvider_1.intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay); + }; + AsyncAction2.prototype.recycleAsyncId = function(_scheduler, id, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay != null && this.delay === delay && this.pending === false) { + return id; + } + intervalProvider_1.intervalProvider.clearInterval(id); + return void 0; + }; + AsyncAction2.prototype.execute = function(state, delay) { + if (this.closed) { + return new Error("executing a cancelled action"); + } + this.pending = false; + var error = this._execute(state, delay); + if (error) { + return error; + } else if (this.pending === false && this.id != null) { + this.id = this.recycleAsyncId(this.scheduler, this.id, null); + } + }; + AsyncAction2.prototype._execute = function(state, _delay) { + var errored = false; + var errorValue; + try { + this.work(state); + } catch (e) { + errored = true; + errorValue = !!e && e || new Error(e); + } + if (errored) { + this.unsubscribe(); + return errorValue; + } + }; + AsyncAction2.prototype.unsubscribe = function() { + if (!this.closed) { + var _a = this, id = _a.id, scheduler = _a.scheduler; + var actions = scheduler.actions; + this.work = this.state = this.scheduler = null; + this.pending = false; + arrRemove_1.arrRemove(actions, this); + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, null); + } + this.delay = null; + _super.prototype.unsubscribe.call(this); + } + }; + return AsyncAction2; + }(Action_1.Action); + exports2.AsyncAction = AsyncAction; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/Immediate.js +var require_Immediate = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/Immediate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TestTools = exports2.Immediate = void 0; + var nextHandle = 1; + var resolved; + var activeHandles = {}; + function findAndClearHandle(handle) { + if (handle in activeHandles) { + delete activeHandles[handle]; + return true; + } + return false; + } + exports2.Immediate = { + setImmediate: function(cb) { + var handle = nextHandle++; + activeHandles[handle] = true; + if (!resolved) { + resolved = Promise.resolve(); + } + resolved.then(function() { + return findAndClearHandle(handle) && cb(); + }); + return handle; + }, + clearImmediate: function(handle) { + findAndClearHandle(handle); + } + }; + exports2.TestTools = { + pending: function() { + return Object.keys(activeHandles).length; + } + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js +var require_immediateProvider = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.immediateProvider = void 0; + var Immediate_1 = require_Immediate(); + var setImmediate2 = Immediate_1.Immediate.setImmediate; + var clearImmediate2 = Immediate_1.Immediate.clearImmediate; + exports2.immediateProvider = { + setImmediate: function() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var delegate = exports2.immediateProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate2).apply(void 0, __spreadArray([], __read(args2))); + }, + clearImmediate: function(handle) { + var delegate = exports2.immediateProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate2)(handle); + }, + delegate: void 0 + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js +var require_AsapAction = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AsapAction = void 0; + var AsyncAction_1 = require_AsyncAction(); + var immediateProvider_1 = require_immediateProvider(); + var AsapAction = function(_super) { + __extends(AsapAction2, _super); + function AsapAction2(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + AsapAction2.prototype.requestAsyncId = function(scheduler, id, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay !== null && delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + } + scheduler.actions.push(this); + return scheduler._scheduled || (scheduler._scheduled = immediateProvider_1.immediateProvider.setImmediate(scheduler.flush.bind(scheduler, void 0))); + }; + AsapAction2.prototype.recycleAsyncId = function(scheduler, id, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay != null && delay > 0 || delay == null && this.delay > 0) { + return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); + } + if (scheduler.actions.length === 0) { + immediateProvider_1.immediateProvider.clearImmediate(id); + scheduler._scheduled = void 0; + } + return void 0; + }; + return AsapAction2; + }(AsyncAction_1.AsyncAction); + exports2.AsapAction = AsapAction; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Scheduler.js +var require_Scheduler = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Scheduler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Scheduler = void 0; + var dateTimestampProvider_1 = require_dateTimestampProvider(); + var Scheduler = function() { + function Scheduler2(schedulerActionCtor, now) { + if (now === void 0) { + now = Scheduler2.now; + } + this.schedulerActionCtor = schedulerActionCtor; + this.now = now; + } + Scheduler2.prototype.schedule = function(work, delay, state) { + if (delay === void 0) { + delay = 0; + } + return new this.schedulerActionCtor(this, work).schedule(state, delay); + }; + Scheduler2.now = dateTimestampProvider_1.dateTimestampProvider.now; + return Scheduler2; + }(); + exports2.Scheduler = Scheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js +var require_AsyncScheduler = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AsyncScheduler = void 0; + var Scheduler_1 = require_Scheduler(); + var AsyncScheduler = function(_super) { + __extends(AsyncScheduler2, _super); + function AsyncScheduler2(SchedulerAction, now) { + if (now === void 0) { + now = Scheduler_1.Scheduler.now; + } + var _this = _super.call(this, SchedulerAction, now) || this; + _this.actions = []; + _this._active = false; + _this._scheduled = void 0; + return _this; + } + AsyncScheduler2.prototype.flush = function(action) { + var actions = this.actions; + if (this._active) { + actions.push(action); + return; + } + var error; + this._active = true; + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while (action = actions.shift()); + this._active = false; + if (error) { + while (action = actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + return AsyncScheduler2; + }(Scheduler_1.Scheduler); + exports2.AsyncScheduler = AsyncScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js +var require_AsapScheduler = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AsapScheduler = void 0; + var AsyncScheduler_1 = require_AsyncScheduler(); + var AsapScheduler = function(_super) { + __extends(AsapScheduler2, _super); + function AsapScheduler2() { + return _super !== null && _super.apply(this, arguments) || this; + } + AsapScheduler2.prototype.flush = function(action) { + this._active = true; + this._scheduled = void 0; + var actions = this.actions; + var error; + var index = -1; + action = action || actions.shift(); + var count = actions.length; + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while (++index < count && (action = actions.shift())); + this._active = false; + if (error) { + while (++index < count && (action = actions.shift())) { + action.unsubscribe(); + } + throw error; + } + }; + return AsapScheduler2; + }(AsyncScheduler_1.AsyncScheduler); + exports2.AsapScheduler = AsapScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/asap.js +var require_asap = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/asap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.asap = exports2.asapScheduler = void 0; + var AsapAction_1 = require_AsapAction(); + var AsapScheduler_1 = require_AsapScheduler(); + exports2.asapScheduler = new AsapScheduler_1.AsapScheduler(AsapAction_1.AsapAction); + exports2.asap = exports2.asapScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/async.js +var require_async = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/async.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.async = exports2.asyncScheduler = void 0; + var AsyncAction_1 = require_AsyncAction(); + var AsyncScheduler_1 = require_AsyncScheduler(); + exports2.asyncScheduler = new AsyncScheduler_1.AsyncScheduler(AsyncAction_1.AsyncAction); + exports2.async = exports2.asyncScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js +var require_QueueAction = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.QueueAction = void 0; + var AsyncAction_1 = require_AsyncAction(); + var QueueAction = function(_super) { + __extends(QueueAction2, _super); + function QueueAction2(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + QueueAction2.prototype.schedule = function(state, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay > 0) { + return _super.prototype.schedule.call(this, state, delay); + } + this.delay = delay; + this.state = state; + this.scheduler.flush(this); + return this; + }; + QueueAction2.prototype.execute = function(state, delay) { + return delay > 0 || this.closed ? _super.prototype.execute.call(this, state, delay) : this._execute(state, delay); + }; + QueueAction2.prototype.requestAsyncId = function(scheduler, id, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay != null && delay > 0 || delay == null && this.delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + } + return scheduler.flush(this); + }; + return QueueAction2; + }(AsyncAction_1.AsyncAction); + exports2.QueueAction = QueueAction; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js +var require_QueueScheduler = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.QueueScheduler = void 0; + var AsyncScheduler_1 = require_AsyncScheduler(); + var QueueScheduler = function(_super) { + __extends(QueueScheduler2, _super); + function QueueScheduler2() { + return _super !== null && _super.apply(this, arguments) || this; + } + return QueueScheduler2; + }(AsyncScheduler_1.AsyncScheduler); + exports2.QueueScheduler = QueueScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/queue.js +var require_queue = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/queue.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.queue = exports2.queueScheduler = void 0; + var QueueAction_1 = require_QueueAction(); + var QueueScheduler_1 = require_QueueScheduler(); + exports2.queueScheduler = new QueueScheduler_1.QueueScheduler(QueueAction_1.QueueAction); + exports2.queue = exports2.queueScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js +var require_AnimationFrameAction = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnimationFrameAction = void 0; + var AsyncAction_1 = require_AsyncAction(); + var animationFrameProvider_1 = require_animationFrameProvider(); + var AnimationFrameAction = function(_super) { + __extends(AnimationFrameAction2, _super); + function AnimationFrameAction2(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + AnimationFrameAction2.prototype.requestAsyncId = function(scheduler, id, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay !== null && delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + } + scheduler.actions.push(this); + return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider_1.animationFrameProvider.requestAnimationFrame(function() { + return scheduler.flush(void 0); + })); + }; + AnimationFrameAction2.prototype.recycleAsyncId = function(scheduler, id, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay != null && delay > 0 || delay == null && this.delay > 0) { + return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); + } + if (scheduler.actions.length === 0) { + animationFrameProvider_1.animationFrameProvider.cancelAnimationFrame(id); + scheduler._scheduled = void 0; + } + return void 0; + }; + return AnimationFrameAction2; + }(AsyncAction_1.AsyncAction); + exports2.AnimationFrameAction = AnimationFrameAction; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js +var require_AnimationFrameScheduler = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnimationFrameScheduler = void 0; + var AsyncScheduler_1 = require_AsyncScheduler(); + var AnimationFrameScheduler = function(_super) { + __extends(AnimationFrameScheduler2, _super); + function AnimationFrameScheduler2() { + return _super !== null && _super.apply(this, arguments) || this; + } + AnimationFrameScheduler2.prototype.flush = function(action) { + this._active = true; + this._scheduled = void 0; + var actions = this.actions; + var error; + var index = -1; + action = action || actions.shift(); + var count = actions.length; + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while (++index < count && (action = actions.shift())); + this._active = false; + if (error) { + while (++index < count && (action = actions.shift())) { + action.unsubscribe(); + } + throw error; + } + }; + return AnimationFrameScheduler2; + }(AsyncScheduler_1.AsyncScheduler); + exports2.AnimationFrameScheduler = AnimationFrameScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js +var require_animationFrame = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.animationFrame = exports2.animationFrameScheduler = void 0; + var AnimationFrameAction_1 = require_AnimationFrameAction(); + var AnimationFrameScheduler_1 = require_AnimationFrameScheduler(); + exports2.animationFrameScheduler = new AnimationFrameScheduler_1.AnimationFrameScheduler(AnimationFrameAction_1.AnimationFrameAction); + exports2.animationFrame = exports2.animationFrameScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js +var require_VirtualTimeScheduler = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.VirtualAction = exports2.VirtualTimeScheduler = void 0; + var AsyncAction_1 = require_AsyncAction(); + var Subscription_1 = require_Subscription(); + var AsyncScheduler_1 = require_AsyncScheduler(); + var VirtualTimeScheduler = function(_super) { + __extends(VirtualTimeScheduler2, _super); + function VirtualTimeScheduler2(schedulerActionCtor, maxFrames) { + if (schedulerActionCtor === void 0) { + schedulerActionCtor = VirtualAction; + } + if (maxFrames === void 0) { + maxFrames = Infinity; + } + var _this = _super.call(this, schedulerActionCtor, function() { + return _this.frame; + }) || this; + _this.maxFrames = maxFrames; + _this.frame = 0; + _this.index = -1; + return _this; + } + VirtualTimeScheduler2.prototype.flush = function() { + var _a = this, actions = _a.actions, maxFrames = _a.maxFrames; + var error; + var action; + while ((action = actions[0]) && action.delay <= maxFrames) { + actions.shift(); + this.frame = action.delay; + if (error = action.execute(action.state, action.delay)) { + break; + } + } + if (error) { + while (action = actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + VirtualTimeScheduler2.frameTimeFactor = 10; + return VirtualTimeScheduler2; + }(AsyncScheduler_1.AsyncScheduler); + exports2.VirtualTimeScheduler = VirtualTimeScheduler; + var VirtualAction = function(_super) { + __extends(VirtualAction2, _super); + function VirtualAction2(scheduler, work, index) { + if (index === void 0) { + index = scheduler.index += 1; + } + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + _this.index = index; + _this.active = true; + _this.index = scheduler.index = index; + return _this; + } + VirtualAction2.prototype.schedule = function(state, delay) { + if (delay === void 0) { + delay = 0; + } + if (Number.isFinite(delay)) { + if (!this.id) { + return _super.prototype.schedule.call(this, state, delay); + } + this.active = false; + var action = new VirtualAction2(this.scheduler, this.work); + this.add(action); + return action.schedule(state, delay); + } else { + return Subscription_1.Subscription.EMPTY; + } + }; + VirtualAction2.prototype.requestAsyncId = function(scheduler, id, delay) { + if (delay === void 0) { + delay = 0; + } + this.delay = scheduler.frame + delay; + var actions = scheduler.actions; + actions.push(this); + actions.sort(VirtualAction2.sortActions); + return true; + }; + VirtualAction2.prototype.recycleAsyncId = function(scheduler, id, delay) { + if (delay === void 0) { + delay = 0; + } + return void 0; + }; + VirtualAction2.prototype._execute = function(state, delay) { + if (this.active === true) { + return _super.prototype._execute.call(this, state, delay); + } + }; + VirtualAction2.sortActions = function(a, b) { + if (a.delay === b.delay) { + if (a.index === b.index) { + return 0; + } else if (a.index > b.index) { + return 1; + } else { + return -1; + } + } else if (a.delay > b.delay) { + return 1; + } else { + return -1; + } + }; + return VirtualAction2; + }(AsyncAction_1.AsyncAction); + exports2.VirtualAction = VirtualAction; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/empty.js +var require_empty = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/empty.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.empty = exports2.EMPTY = void 0; + var Observable_1 = require_Observable(); + exports2.EMPTY = new Observable_1.Observable(function(subscriber) { + return subscriber.complete(); + }); + function empty(scheduler) { + return scheduler ? emptyScheduled(scheduler) : exports2.EMPTY; + } + exports2.empty = empty; + function emptyScheduled(scheduler) { + return new Observable_1.Observable(function(subscriber) { + return scheduler.schedule(function() { + return subscriber.complete(); + }); + }); + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js +var require_scheduleArray = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduleArray = void 0; + var Observable_1 = require_Observable(); + function scheduleArray(input, scheduler) { + return new Observable_1.Observable(function(subscriber) { + var i = 0; + return scheduler.schedule(function() { + if (i === input.length) { + subscriber.complete(); + } else { + subscriber.next(input[i++]); + if (!subscriber.closed) { + this.schedule(); + } + } + }); + }); + } + exports2.scheduleArray = scheduleArray; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js +var require_isArrayLike = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isArrayLike = void 0; + exports2.isArrayLike = function(x) { + return x && typeof x.length === "number" && typeof x !== "function"; + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isPromise.js +var require_isPromise = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isPromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isPromise = void 0; + var isFunction_1 = require_isFunction(); + function isPromise(value) { + return isFunction_1.isFunction(value === null || value === void 0 ? void 0 : value.then); + } + exports2.isPromise = isPromise; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js +var require_scheduleObservable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduleObservable = void 0; + var Observable_1 = require_Observable(); + var Subscription_1 = require_Subscription(); + var observable_1 = require_observable(); + function scheduleObservable(input, scheduler) { + return new Observable_1.Observable(function(subscriber) { + var sub = new Subscription_1.Subscription(); + sub.add(scheduler.schedule(function() { + var observable = input[observable_1.observable](); + sub.add(observable.subscribe({ + next: function(value) { + sub.add(scheduler.schedule(function() { + return subscriber.next(value); + })); + }, + error: function(err) { + sub.add(scheduler.schedule(function() { + return subscriber.error(err); + })); + }, + complete: function() { + sub.add(scheduler.schedule(function() { + return subscriber.complete(); + })); + } + })); + })); + return sub; + }); + } + exports2.scheduleObservable = scheduleObservable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js +var require_schedulePromise = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.schedulePromise = void 0; + var Observable_1 = require_Observable(); + function schedulePromise(input, scheduler) { + return new Observable_1.Observable(function(subscriber) { + return scheduler.schedule(function() { + return input.then(function(value) { + subscriber.add(scheduler.schedule(function() { + subscriber.next(value); + subscriber.add(scheduler.schedule(function() { + return subscriber.complete(); + })); + })); + }, function(err) { + subscriber.add(scheduler.schedule(function() { + return subscriber.error(err); + })); + }); + }); + }); + } + exports2.schedulePromise = schedulePromise; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/symbol/iterator.js +var require_iterator = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/symbol/iterator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.iterator = exports2.getSymbolIterator = void 0; + function getSymbolIterator() { + if (typeof Symbol !== "function" || !Symbol.iterator) { + return "@@iterator"; + } + return Symbol.iterator; + } + exports2.getSymbolIterator = getSymbolIterator; + exports2.iterator = getSymbolIterator(); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/caughtSchedule.js +var require_caughtSchedule = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/caughtSchedule.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.caughtSchedule = void 0; + function caughtSchedule(subscriber, scheduler, execute, delay) { + if (delay === void 0) { + delay = 0; + } + var subscription = scheduler.schedule(function() { + try { + execute.call(this); + } catch (err) { + subscriber.error(err); + } + }, delay); + subscriber.add(subscription); + return subscription; + } + exports2.caughtSchedule = caughtSchedule; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js +var require_scheduleIterable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduleIterable = void 0; + var Observable_1 = require_Observable(); + var iterator_1 = require_iterator(); + var isFunction_1 = require_isFunction(); + var caughtSchedule_1 = require_caughtSchedule(); + function scheduleIterable(input, scheduler) { + return new Observable_1.Observable(function(subscriber) { + var iterator; + subscriber.add(scheduler.schedule(function() { + iterator = input[iterator_1.iterator](); + caughtSchedule_1.caughtSchedule(subscriber, scheduler, function() { + var _a = iterator.next(), value = _a.value, done = _a.done; + if (done) { + subscriber.complete(); + } else { + subscriber.next(value); + this.schedule(); + } + }); + })); + return function() { + return isFunction_1.isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); + }; + }); + } + exports2.scheduleIterable = scheduleIterable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js +var require_scheduleAsyncIterable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduleAsyncIterable = void 0; + var Observable_1 = require_Observable(); + var Subscription_1 = require_Subscription(); + function scheduleAsyncIterable(input, scheduler) { + if (!input) { + throw new Error("Iterable cannot be null"); + } + return new Observable_1.Observable(function(subscriber) { + var sub = new Subscription_1.Subscription(); + sub.add(scheduler.schedule(function() { + var iterator = input[Symbol.asyncIterator](); + sub.add(scheduler.schedule(function() { + var _this = this; + iterator.next().then(function(result) { + if (result.done) { + subscriber.complete(); + } else { + subscriber.next(result.value); + _this.schedule(); + } + }); + })); + })); + return sub; + }); + } + exports2.scheduleAsyncIterable = scheduleAsyncIterable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js +var require_isInteropObservable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isInteropObservable = void 0; + var observable_1 = require_observable(); + var isFunction_1 = require_isFunction(); + function isInteropObservable(input) { + return isFunction_1.isFunction(input[observable_1.observable]); + } + exports2.isInteropObservable = isInteropObservable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isIterable.js +var require_isIterable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isIterable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isIterable = void 0; + var iterator_1 = require_iterator(); + var isFunction_1 = require_isFunction(); + function isIterable(input) { + return isFunction_1.isFunction(input === null || input === void 0 ? void 0 : input[iterator_1.iterator]); + } + exports2.isIterable = isIterable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js +var require_isAsyncIterable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isAsyncIterable = void 0; + var isFunction_1 = require_isFunction(); + function isAsyncIterable(obj) { + return Symbol.asyncIterator && isFunction_1.isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]); + } + exports2.isAsyncIterable = isAsyncIterable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js +var require_throwUnobservableError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createInvalidObservableTypeError = void 0; + function createInvalidObservableTypeError(input) { + return new TypeError("You provided " + (input !== null && typeof input === "object" ? "an invalid object" : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable."); + } + exports2.createInvalidObservableTypeError = createInvalidObservableTypeError; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js +var require_isReadableStreamLike = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js"(exports2) { + "use strict"; + var __generator = exports2 && exports2.__generator || function(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) + throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) + throw new TypeError("Generator is already executing."); + while (_) + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) + return t; + if (y = 0, t) + op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + var __await = exports2 && exports2.__await || function(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + var __asyncGenerator = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) + i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) + resume(q[0][0], q[0][1]); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isReadableStreamLike = exports2.readableStreamLikeToAsyncGenerator = void 0; + var isFunction_1 = require_isFunction(); + function readableStreamLikeToAsyncGenerator(readableStream) { + return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() { + var reader, _a, value, done; + return __generator(this, function(_b) { + switch (_b.label) { + case 0: + reader = readableStream.getReader(); + _b.label = 1; + case 1: + _b.trys.push([1, , 9, 10]); + _b.label = 2; + case 2: + if (false) + return [3, 8]; + return [4, __await(reader.read())]; + case 3: + _a = _b.sent(), value = _a.value, done = _a.done; + if (!done) + return [3, 5]; + return [4, __await(void 0)]; + case 4: + return [2, _b.sent()]; + case 5: + return [4, __await(value)]; + case 6: + return [4, _b.sent()]; + case 7: + _b.sent(); + return [3, 2]; + case 8: + return [3, 10]; + case 9: + reader.releaseLock(); + return [7]; + case 10: + return [2]; + } + }); + }); + } + exports2.readableStreamLikeToAsyncGenerator = readableStreamLikeToAsyncGenerator; + function isReadableStreamLike(obj) { + return isFunction_1.isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader); + } + exports2.isReadableStreamLike = isReadableStreamLike; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js +var require_scheduleReadableStreamLike = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduleReadableStreamLike = void 0; + var scheduleAsyncIterable_1 = require_scheduleAsyncIterable(); + var isReadableStreamLike_1 = require_isReadableStreamLike(); + function scheduleReadableStreamLike(input, scheduler) { + return scheduleAsyncIterable_1.scheduleAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(input), scheduler); + } + exports2.scheduleReadableStreamLike = scheduleReadableStreamLike; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js +var require_scheduled = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduled = void 0; + var scheduleObservable_1 = require_scheduleObservable(); + var schedulePromise_1 = require_schedulePromise(); + var scheduleArray_1 = require_scheduleArray(); + var scheduleIterable_1 = require_scheduleIterable(); + var scheduleAsyncIterable_1 = require_scheduleAsyncIterable(); + var isInteropObservable_1 = require_isInteropObservable(); + var isPromise_1 = require_isPromise(); + var isArrayLike_1 = require_isArrayLike(); + var isIterable_1 = require_isIterable(); + var isAsyncIterable_1 = require_isAsyncIterable(); + var throwUnobservableError_1 = require_throwUnobservableError(); + var isReadableStreamLike_1 = require_isReadableStreamLike(); + var scheduleReadableStreamLike_1 = require_scheduleReadableStreamLike(); + function scheduled(input, scheduler) { + if (input != null) { + if (isInteropObservable_1.isInteropObservable(input)) { + return scheduleObservable_1.scheduleObservable(input, scheduler); + } + if (isArrayLike_1.isArrayLike(input)) { + return scheduleArray_1.scheduleArray(input, scheduler); + } + if (isPromise_1.isPromise(input)) { + return schedulePromise_1.schedulePromise(input, scheduler); + } + if (isAsyncIterable_1.isAsyncIterable(input)) { + return scheduleAsyncIterable_1.scheduleAsyncIterable(input, scheduler); + } + if (isIterable_1.isIterable(input)) { + return scheduleIterable_1.scheduleIterable(input, scheduler); + } + if (isReadableStreamLike_1.isReadableStreamLike(input)) { + return scheduleReadableStreamLike_1.scheduleReadableStreamLike(input, scheduler); + } + } + throw throwUnobservableError_1.createInvalidObservableTypeError(input); + } + exports2.scheduled = scheduled; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/from.js +var require_from2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/from.js"(exports2) { + "use strict"; + var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = exports2 && exports2.__generator || function(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) + throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) + throw new TypeError("Generator is already executing."); + while (_) + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) + return t; + if (y = 0, t) + op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + var __asyncValues = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve({ value: v2, done: d }); + }, reject); + } + }; + var __values = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromArrayLike = exports2.innerFrom = exports2.from = void 0; + var isArrayLike_1 = require_isArrayLike(); + var isPromise_1 = require_isPromise(); + var observable_1 = require_observable(); + var Observable_1 = require_Observable(); + var scheduled_1 = require_scheduled(); + var isFunction_1 = require_isFunction(); + var reportUnhandledError_1 = require_reportUnhandledError(); + var isInteropObservable_1 = require_isInteropObservable(); + var isAsyncIterable_1 = require_isAsyncIterable(); + var throwUnobservableError_1 = require_throwUnobservableError(); + var isIterable_1 = require_isIterable(); + var isReadableStreamLike_1 = require_isReadableStreamLike(); + function from(input, scheduler) { + return scheduler ? scheduled_1.scheduled(input, scheduler) : innerFrom(input); + } + exports2.from = from; + function innerFrom(input) { + if (input instanceof Observable_1.Observable) { + return input; + } + if (input != null) { + if (isInteropObservable_1.isInteropObservable(input)) { + return fromInteropObservable(input); + } + if (isArrayLike_1.isArrayLike(input)) { + return fromArrayLike(input); + } + if (isPromise_1.isPromise(input)) { + return fromPromise(input); + } + if (isAsyncIterable_1.isAsyncIterable(input)) { + return fromAsyncIterable(input); + } + if (isIterable_1.isIterable(input)) { + return fromIterable(input); + } + if (isReadableStreamLike_1.isReadableStreamLike(input)) { + return fromReadableStreamLike(input); + } + } + throw throwUnobservableError_1.createInvalidObservableTypeError(input); + } + exports2.innerFrom = innerFrom; + function fromInteropObservable(obj) { + return new Observable_1.Observable(function(subscriber) { + var obs = obj[observable_1.observable](); + if (isFunction_1.isFunction(obs.subscribe)) { + return obs.subscribe(subscriber); + } + throw new TypeError("Provided object does not correctly implement Symbol.observable"); + }); + } + function fromArrayLike(array) { + return new Observable_1.Observable(function(subscriber) { + for (var i = 0; i < array.length && !subscriber.closed; i++) { + subscriber.next(array[i]); + } + subscriber.complete(); + }); + } + exports2.fromArrayLike = fromArrayLike; + function fromPromise(promise) { + return new Observable_1.Observable(function(subscriber) { + promise.then(function(value) { + if (!subscriber.closed) { + subscriber.next(value); + subscriber.complete(); + } + }, function(err) { + return subscriber.error(err); + }).then(null, reportUnhandledError_1.reportUnhandledError); + }); + } + function fromIterable(iterable) { + return new Observable_1.Observable(function(subscriber) { + var e_1, _a; + try { + for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) { + var value = iterable_1_1.value; + subscriber.next(value); + if (subscriber.closed) { + return; + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) + _a.call(iterable_1); + } finally { + if (e_1) + throw e_1.error; + } + } + subscriber.complete(); + }); + } + function fromAsyncIterable(asyncIterable) { + return new Observable_1.Observable(function(subscriber) { + process2(asyncIterable, subscriber).catch(function(err) { + return subscriber.error(err); + }); + }); + } + function fromReadableStreamLike(readableStream) { + return fromAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(readableStream)); + } + function process2(asyncIterable, subscriber) { + var asyncIterable_1, asyncIterable_1_1; + var e_2, _a; + return __awaiter(this, void 0, void 0, function() { + var value, e_2_1; + return __generator(this, function(_b) { + switch (_b.label) { + case 0: + _b.trys.push([0, 5, 6, 11]); + asyncIterable_1 = __asyncValues(asyncIterable); + _b.label = 1; + case 1: + return [4, asyncIterable_1.next()]; + case 2: + if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) + return [3, 4]; + value = asyncIterable_1_1.value; + subscriber.next(value); + if (subscriber.closed) { + return [2]; + } + _b.label = 3; + case 3: + return [3, 1]; + case 4: + return [3, 11]; + case 5: + e_2_1 = _b.sent(); + e_2 = { error: e_2_1 }; + return [3, 11]; + case 6: + _b.trys.push([6, , 9, 10]); + if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) + return [3, 8]; + return [4, _a.call(asyncIterable_1)]; + case 7: + _b.sent(); + _b.label = 8; + case 8: + return [3, 10]; + case 9: + if (e_2) + throw e_2.error; + return [7]; + case 10: + return [7]; + case 11: + subscriber.complete(); + return [2]; + } + }); + }); + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/fromArray.js +var require_fromArray = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/fromArray.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.internalFromArray = void 0; + var scheduleArray_1 = require_scheduleArray(); + var from_1 = require_from2(); + function internalFromArray(input, scheduler) { + return scheduler ? scheduleArray_1.scheduleArray(input, scheduler) : from_1.fromArrayLike(input); + } + exports2.internalFromArray = internalFromArray; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isScheduler.js +var require_isScheduler = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isScheduler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isScheduler = void 0; + var isFunction_1 = require_isFunction(); + function isScheduler(value) { + return value && isFunction_1.isFunction(value.schedule); + } + exports2.isScheduler = isScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/args.js +var require_args = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/args.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.popNumber = exports2.popScheduler = exports2.popResultSelector = void 0; + var isFunction_1 = require_isFunction(); + var isScheduler_1 = require_isScheduler(); + function last(arr) { + return arr[arr.length - 1]; + } + function popResultSelector(args2) { + return isFunction_1.isFunction(last(args2)) ? args2.pop() : void 0; + } + exports2.popResultSelector = popResultSelector; + function popScheduler(args2) { + return isScheduler_1.isScheduler(last(args2)) ? args2.pop() : void 0; + } + exports2.popScheduler = popScheduler; + function popNumber(args2, defaultValue) { + return typeof last(args2) === "number" ? args2.pop() : defaultValue; + } + exports2.popNumber = popNumber; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/of.js +var require_of = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/of.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.of = void 0; + var fromArray_1 = require_fromArray(); + var scheduleArray_1 = require_scheduleArray(); + var args_1 = require_args(); + function of() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(args2); + return scheduler ? scheduleArray_1.scheduleArray(args2, scheduler) : fromArray_1.internalFromArray(args2); + } + exports2.of = of; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/throwError.js +var require_throwError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/throwError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throwError = void 0; + var Observable_1 = require_Observable(); + var isFunction_1 = require_isFunction(); + function throwError(errorOrErrorFactory, scheduler) { + var errorFactory = isFunction_1.isFunction(errorOrErrorFactory) ? errorOrErrorFactory : function() { + return errorOrErrorFactory; + }; + var init = function(subscriber) { + return subscriber.error(errorFactory()); + }; + return new Observable_1.Observable(scheduler ? function(subscriber) { + return scheduler.schedule(init, 0, subscriber); + } : init); + } + exports2.throwError = throwError; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Notification.js +var require_Notification = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/Notification.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.observeNotification = exports2.Notification = exports2.NotificationKind = void 0; + var empty_1 = require_empty(); + var of_1 = require_of(); + var throwError_1 = require_throwError(); + var isFunction_1 = require_isFunction(); + var NotificationKind; + (function(NotificationKind2) { + NotificationKind2["NEXT"] = "N"; + NotificationKind2["ERROR"] = "E"; + NotificationKind2["COMPLETE"] = "C"; + })(NotificationKind = exports2.NotificationKind || (exports2.NotificationKind = {})); + var Notification = function() { + function Notification2(kind, value, error) { + this.kind = kind; + this.value = value; + this.error = error; + this.hasValue = kind === "N"; + } + Notification2.prototype.observe = function(observer) { + return observeNotification(this, observer); + }; + Notification2.prototype.do = function(nextHandler, errorHandler, completeHandler) { + var _a = this, kind = _a.kind, value = _a.value, error = _a.error; + return kind === "N" ? nextHandler === null || nextHandler === void 0 ? void 0 : nextHandler(value) : kind === "E" ? errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(error) : completeHandler === null || completeHandler === void 0 ? void 0 : completeHandler(); + }; + Notification2.prototype.accept = function(nextOrObserver, error, complete) { + var _a; + return isFunction_1.isFunction((_a = nextOrObserver) === null || _a === void 0 ? void 0 : _a.next) ? this.observe(nextOrObserver) : this.do(nextOrObserver, error, complete); + }; + Notification2.prototype.toObservable = function() { + var _a = this, kind = _a.kind, value = _a.value, error = _a.error; + var result = kind === "N" ? of_1.of(value) : kind === "E" ? throwError_1.throwError(function() { + return error; + }) : kind === "C" ? empty_1.EMPTY : 0; + if (!result) { + throw new TypeError("Unexpected notification kind " + kind); + } + return result; + }; + Notification2.createNext = function(value) { + return new Notification2("N", value); + }; + Notification2.createError = function(err) { + return new Notification2("E", void 0, err); + }; + Notification2.createComplete = function() { + return Notification2.completeNotification; + }; + Notification2.completeNotification = new Notification2("C"); + return Notification2; + }(); + exports2.Notification = Notification; + function observeNotification(notification, observer) { + var _a, _b, _c; + var _d = notification, kind = _d.kind, value = _d.value, error = _d.error; + if (typeof kind !== "string") { + throw new TypeError('Invalid notification, missing "kind"'); + } + kind === "N" ? (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, value) : kind === "E" ? (_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, error) : (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer); + } + exports2.observeNotification = observeNotification; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isObservable.js +var require_isObservable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isObservable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isObservable = void 0; + var Observable_1 = require_Observable(); + var isFunction_1 = require_isFunction(); + function isObservable(obj) { + return !!obj && (obj instanceof Observable_1.Observable || isFunction_1.isFunction(obj.lift) && isFunction_1.isFunction(obj.subscribe)); + } + exports2.isObservable = isObservable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/EmptyError.js +var require_EmptyError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/EmptyError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.EmptyError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.EmptyError = createErrorClass_1.createErrorClass(function(_super) { + return function EmptyErrorImpl() { + _super(this); + this.name = "EmptyError"; + this.message = "no elements in sequence"; + }; + }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/lastValueFrom.js +var require_lastValueFrom = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/lastValueFrom.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.lastValueFrom = void 0; + var EmptyError_1 = require_EmptyError(); + function lastValueFrom(source, config) { + var hasConfig = typeof config === "object"; + return new Promise(function(resolve, reject) { + var _hasValue = false; + var _value; + source.subscribe({ + next: function(value) { + _value = value; + _hasValue = true; + }, + error: reject, + complete: function() { + if (_hasValue) { + resolve(_value); + } else if (hasConfig) { + resolve(config.defaultValue); + } else { + reject(new EmptyError_1.EmptyError()); + } + } + }); + }); + } + exports2.lastValueFrom = lastValueFrom; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/firstValueFrom.js +var require_firstValueFrom = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/firstValueFrom.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.firstValueFrom = void 0; + var EmptyError_1 = require_EmptyError(); + var Subscriber_1 = require_Subscriber(); + function firstValueFrom(source, config) { + var hasConfig = typeof config === "object"; + return new Promise(function(resolve, reject) { + var subscriber = new Subscriber_1.SafeSubscriber({ + next: function(value) { + resolve(value); + subscriber.unsubscribe(); + }, + error: reject, + complete: function() { + if (hasConfig) { + resolve(config.defaultValue); + } else { + reject(new EmptyError_1.EmptyError()); + } + } + }); + source.subscribe(subscriber); + }); + } + exports2.firstValueFrom = firstValueFrom; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js +var require_ArgumentOutOfRangeError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ArgumentOutOfRangeError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.ArgumentOutOfRangeError = createErrorClass_1.createErrorClass(function(_super) { + return function ArgumentOutOfRangeErrorImpl() { + _super(this); + this.name = "ArgumentOutOfRangeError"; + this.message = "argument out of range"; + }; + }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js +var require_NotFoundError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NotFoundError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.NotFoundError = createErrorClass_1.createErrorClass(function(_super) { + return function NotFoundErrorImpl(message2) { + _super(this); + this.name = "NotFoundError"; + this.message = message2; + }; + }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/SequenceError.js +var require_SequenceError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/SequenceError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SequenceError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.SequenceError = createErrorClass_1.createErrorClass(function(_super) { + return function SequenceErrorImpl(message2) { + _super(this); + this.name = "SequenceError"; + this.message = message2; + }; + }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isDate.js +var require_isDate = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/isDate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isValidDate = void 0; + function isValidDate(value) { + return value instanceof Date && !isNaN(value); + } + exports2.isValidDate = isValidDate; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/timeout.js +var require_timeout = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/timeout.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.timeout = exports2.TimeoutError = void 0; + var async_1 = require_async(); + var isDate_1 = require_isDate(); + var lift_1 = require_lift(); + var from_1 = require_from2(); + var createErrorClass_1 = require_createErrorClass(); + var caughtSchedule_1 = require_caughtSchedule(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + exports2.TimeoutError = createErrorClass_1.createErrorClass(function(_super) { + return function TimeoutErrorImpl(info) { + if (info === void 0) { + info = null; + } + _super(this); + this.message = "Timeout has occurred"; + this.name = "TimeoutError"; + this.info = info; + }; + }); + function timeout(config, schedulerArg) { + var _a = isDate_1.isValidDate(config) ? { first: config } : typeof config === "number" ? { each: config } : config, first = _a.first, each = _a.each, _b = _a.with, _with = _b === void 0 ? timeoutErrorFactory : _b, _c = _a.scheduler, scheduler = _c === void 0 ? schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : async_1.asyncScheduler : _c, _d = _a.meta, meta = _d === void 0 ? null : _d; + if (first == null && each == null) { + throw new TypeError("No timeout provided."); + } + return lift_1.operate(function(source, subscriber) { + var originalSourceSubscription; + var timerSubscription; + var lastValue = null; + var seen = 0; + var startTimer = function(delay) { + timerSubscription = caughtSchedule_1.caughtSchedule(subscriber, scheduler, function() { + originalSourceSubscription.unsubscribe(); + from_1.innerFrom(_with({ + meta, + lastValue, + seen + })).subscribe(subscriber); + }, delay); + }; + originalSourceSubscription = source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); + seen++; + subscriber.next(lastValue = value); + each > 0 && startTimer(each); + }, void 0, void 0, function() { + if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) { + timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); + } + lastValue = null; + })); + startTimer(first != null ? typeof first === "number" ? first : +first - scheduler.now() : each); + }); + } + exports2.timeout = timeout; + function timeoutErrorFactory(info) { + throw new exports2.TimeoutError(info); + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js +var require_subscribeOn = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.subscribeOn = void 0; + var lift_1 = require_lift(); + function subscribeOn(scheduler, delay) { + if (delay === void 0) { + delay = 0; + } + return lift_1.operate(function(source, subscriber) { + subscriber.add(scheduler.schedule(function() { + return source.subscribe(subscriber); + }, delay)); + }); + } + exports2.subscribeOn = subscribeOn; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/map.js +var require_map = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/map.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.map = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function map(project, thisArg) { + return lift_1.operate(function(source, subscriber) { + var index = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + subscriber.next(project.call(thisArg, value, index++)); + })); + }); + } + exports2.map = map; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js +var require_mapOneOrManyArgs = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mapOneOrManyArgs = void 0; + var map_1 = require_map(); + var isArray = Array.isArray; + function callOrApply(fn2, args2) { + return isArray(args2) ? fn2.apply(void 0, __spreadArray([], __read(args2))) : fn2(args2); + } + function mapOneOrManyArgs(fn2) { + return map_1.map(function(args2) { + return callOrApply(fn2, args2); + }); + } + exports2.mapOneOrManyArgs = mapOneOrManyArgs; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js +var require_observeOn = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.observeOn = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function observeOn(scheduler, delay) { + if (delay === void 0) { + delay = 0; + } + return lift_1.operate(function(source, subscriber) { + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + return subscriber.add(scheduler.schedule(function() { + return subscriber.next(value); + }, delay)); + }, function() { + return subscriber.add(scheduler.schedule(function() { + return subscriber.complete(); + }, delay)); + }, function(err) { + return subscriber.add(scheduler.schedule(function() { + return subscriber.error(err); + }, delay)); + })); + }); + } + exports2.observeOn = observeOn; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js +var require_bindCallbackInternals = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bindCallbackInternals = void 0; + var isScheduler_1 = require_isScheduler(); + var Observable_1 = require_Observable(); + var subscribeOn_1 = require_subscribeOn(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var observeOn_1 = require_observeOn(); + var AsyncSubject_1 = require_AsyncSubject(); + function bindCallbackInternals(isNodeStyle, callbackFunc, resultSelector, scheduler) { + if (resultSelector) { + if (isScheduler_1.isScheduler(resultSelector)) { + scheduler = resultSelector; + } else { + return function() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + return bindCallbackInternals(isNodeStyle, callbackFunc, scheduler).apply(this, args2).pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)); + }; + } + } + if (scheduler) { + return function() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + return bindCallbackInternals(isNodeStyle, callbackFunc).apply(this, args2).pipe(subscribeOn_1.subscribeOn(scheduler), observeOn_1.observeOn(scheduler)); + }; + } + return function() { + var _this = this; + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var subject = new AsyncSubject_1.AsyncSubject(); + var uninitialized = true; + return new Observable_1.Observable(function(subscriber) { + var subs = subject.subscribe(subscriber); + if (uninitialized) { + uninitialized = false; + var isAsync_1 = false; + var isComplete_1 = false; + callbackFunc.apply(_this, __spreadArray(__spreadArray([], __read(args2)), [ + function() { + var results = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + results[_i2] = arguments[_i2]; + } + if (isNodeStyle) { + var err = results.shift(); + if (err != null) { + subject.error(err); + return; + } + } + subject.next(1 < results.length ? results : results[0]); + isComplete_1 = true; + if (isAsync_1) { + subject.complete(); + } + } + ])); + if (isComplete_1) { + subject.complete(); + } + isAsync_1 = true; + } + return subs; + }); + }; + } + exports2.bindCallbackInternals = bindCallbackInternals; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js +var require_bindCallback = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bindCallback = void 0; + var bindCallbackInternals_1 = require_bindCallbackInternals(); + function bindCallback(callbackFunc, resultSelector, scheduler) { + return bindCallbackInternals_1.bindCallbackInternals(false, callbackFunc, resultSelector, scheduler); + } + exports2.bindCallback = bindCallback; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js +var require_bindNodeCallback = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bindNodeCallback = void 0; + var bindCallbackInternals_1 = require_bindCallbackInternals(); + function bindNodeCallback(callbackFunc, resultSelector, scheduler) { + return bindCallbackInternals_1.bindCallbackInternals(true, callbackFunc, resultSelector, scheduler); + } + exports2.bindNodeCallback = bindNodeCallback; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js +var require_argsArgArrayOrObject = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argsArgArrayOrObject = void 0; + var isArray = Array.isArray; + var getPrototypeOf = Object.getPrototypeOf; + var objectProto = Object.prototype; + var getKeys = Object.keys; + function argsArgArrayOrObject(args2) { + if (args2.length === 1) { + var first_1 = args2[0]; + if (isArray(first_1)) { + return { args: first_1, keys: null }; + } + if (isPOJO(first_1)) { + var keys = getKeys(first_1); + return { + args: keys.map(function(key) { + return first_1[key]; + }), + keys + }; + } + } + return { args: args2, keys: null }; + } + exports2.argsArgArrayOrObject = argsArgArrayOrObject; + function isPOJO(obj) { + return obj && typeof obj === "object" && getPrototypeOf(obj) === objectProto; + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/createObject.js +var require_createObject = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/createObject.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createObject = void 0; + function createObject(keys, values) { + return keys.reduce(function(result, key, i) { + return result[key] = values[i], result; + }, {}); + } + exports2.createObject = createObject; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js +var require_combineLatest = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.combineLatestInit = exports2.combineLatest = void 0; + var Observable_1 = require_Observable(); + var argsArgArrayOrObject_1 = require_argsArgArrayOrObject(); + var from_1 = require_from2(); + var identity_1 = require_identity(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var args_1 = require_args(); + var createObject_1 = require_createObject(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function combineLatest() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(args2); + var resultSelector = args_1.popResultSelector(args2); + var _a = argsArgArrayOrObject_1.argsArgArrayOrObject(args2), observables = _a.args, keys = _a.keys; + if (observables.length === 0) { + return from_1.from([], scheduler); + } + var result = new Observable_1.Observable(combineLatestInit(observables, scheduler, keys ? function(values) { + return createObject_1.createObject(keys, values); + } : identity_1.identity)); + return resultSelector ? result.pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : result; + } + exports2.combineLatest = combineLatest; + function combineLatestInit(observables, scheduler, valueTransform) { + if (valueTransform === void 0) { + valueTransform = identity_1.identity; + } + return function(subscriber) { + maybeSchedule(scheduler, function() { + var length = observables.length; + var values = new Array(length); + var active = length; + var remainingFirstValues = length; + var _loop_1 = function(i2) { + maybeSchedule(scheduler, function() { + var source = from_1.from(observables[i2], scheduler); + var hasFirstValue = false; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + values[i2] = value; + if (!hasFirstValue) { + hasFirstValue = true; + remainingFirstValues--; + } + if (!remainingFirstValues) { + subscriber.next(valueTransform(values.slice())); + } + }, function() { + if (!--active) { + subscriber.complete(); + } + })); + }, subscriber); + }; + for (var i = 0; i < length; i++) { + _loop_1(i); + } + }, subscriber); + }; + } + exports2.combineLatestInit = combineLatestInit; + function maybeSchedule(scheduler, execute, subscription) { + if (scheduler) { + subscription.add(scheduler.schedule(execute)); + } else { + execute(); + } + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js +var require_mergeInternals = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeInternals = void 0; + var from_1 = require_from2(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalTeardown) { + var buffer = []; + var active = 0; + var index = 0; + var isComplete = false; + var checkComplete = function() { + if (isComplete && !buffer.length && !active) { + subscriber.complete(); + } + }; + var outerNext = function(value) { + return active < concurrent ? doInnerSub(value) : buffer.push(value); + }; + var doInnerSub = function(value) { + expand && subscriber.next(value); + active++; + var innerComplete = false; + from_1.innerFrom(project(value, index++)).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(innerValue) { + onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue); + if (expand) { + outerNext(innerValue); + } else { + subscriber.next(innerValue); + } + }, function() { + innerComplete = true; + }, void 0, function() { + if (innerComplete) { + try { + active--; + var _loop_1 = function() { + var bufferedValue = buffer.shift(); + innerSubScheduler ? subscriber.add(innerSubScheduler.schedule(function() { + return doInnerSub(bufferedValue); + })) : doInnerSub(bufferedValue); + }; + while (buffer.length && active < concurrent) { + _loop_1(); + } + checkComplete(); + } catch (err) { + subscriber.error(err); + } + } + })); + }; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, outerNext, function() { + isComplete = true; + checkComplete(); + })); + return function() { + additionalTeardown === null || additionalTeardown === void 0 ? void 0 : additionalTeardown(); + }; + } + exports2.mergeInternals = mergeInternals; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js +var require_mergeMap = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeMap = void 0; + var map_1 = require_map(); + var from_1 = require_from2(); + var lift_1 = require_lift(); + var mergeInternals_1 = require_mergeInternals(); + var isFunction_1 = require_isFunction(); + function mergeMap(project, resultSelector, concurrent) { + if (concurrent === void 0) { + concurrent = Infinity; + } + if (isFunction_1.isFunction(resultSelector)) { + return mergeMap(function(a, i) { + return map_1.map(function(b, ii) { + return resultSelector(a, b, i, ii); + })(from_1.innerFrom(project(a, i))); + }, concurrent); + } else if (typeof resultSelector === "number") { + concurrent = resultSelector; + } + return lift_1.operate(function(source, subscriber) { + return mergeInternals_1.mergeInternals(source, subscriber, project, concurrent); + }); + } + exports2.mergeMap = mergeMap; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js +var require_mergeAll = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeAll = void 0; + var mergeMap_1 = require_mergeMap(); + var identity_1 = require_identity(); + function mergeAll(concurrent) { + if (concurrent === void 0) { + concurrent = Infinity; + } + return mergeMap_1.mergeMap(identity_1.identity, concurrent); + } + exports2.mergeAll = mergeAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/concatAll.js +var require_concatAll = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/concatAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concatAll = void 0; + var mergeAll_1 = require_mergeAll(); + function concatAll() { + return mergeAll_1.mergeAll(1); + } + exports2.concatAll = concatAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/concat.js +var require_concat = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/concat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concat = void 0; + var concatAll_1 = require_concatAll(); + var fromArray_1 = require_fromArray(); + var args_1 = require_args(); + function concat() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + return concatAll_1.concatAll()(fromArray_1.internalFromArray(args2, args_1.popScheduler(args2))); + } + exports2.concat = concat; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/defer.js +var require_defer = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/defer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defer = void 0; + var Observable_1 = require_Observable(); + var from_1 = require_from2(); + function defer(observableFactory) { + return new Observable_1.Observable(function(subscriber) { + from_1.innerFrom(observableFactory()).subscribe(subscriber); + }); + } + exports2.defer = defer; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/connectable.js +var require_connectable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/connectable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.connectable = void 0; + var Subject_1 = require_Subject(); + var Observable_1 = require_Observable(); + var defer_1 = require_defer(); + var DEFAULT_CONFIG = { + connector: function() { + return new Subject_1.Subject(); + }, + resetOnDisconnect: true + }; + function connectable(source, config) { + if (config === void 0) { + config = DEFAULT_CONFIG; + } + var connection = null; + var connector = config.connector, _a = config.resetOnDisconnect, resetOnDisconnect = _a === void 0 ? true : _a; + var subject = connector(); + var result = new Observable_1.Observable(function(subscriber) { + return subject.subscribe(subscriber); + }); + result.connect = function() { + if (!connection || connection.closed) { + connection = defer_1.defer(function() { + return source; + }).subscribe(subject); + if (resetOnDisconnect) { + connection.add(function() { + return subject = connector(); + }); + } + } + return connection; + }; + return result; + } + exports2.connectable = connectable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js +var require_forkJoin = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.forkJoin = void 0; + var Observable_1 = require_Observable(); + var argsArgArrayOrObject_1 = require_argsArgArrayOrObject(); + var from_1 = require_from2(); + var args_1 = require_args(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var createObject_1 = require_createObject(); + function forkJoin() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var resultSelector = args_1.popResultSelector(args2); + var _a = argsArgArrayOrObject_1.argsArgArrayOrObject(args2), sources = _a.args, keys = _a.keys; + var result = new Observable_1.Observable(function(subscriber) { + var length = sources.length; + if (!length) { + subscriber.complete(); + return; + } + var values = new Array(length); + var remainingCompletions = length; + var remainingEmissions = length; + var _loop_1 = function(sourceIndex2) { + var hasValue = false; + from_1.innerFrom(sources[sourceIndex2]).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + if (!hasValue) { + hasValue = true; + remainingEmissions--; + } + values[sourceIndex2] = value; + }, function() { + if (!--remainingCompletions || !hasValue) { + if (!remainingEmissions) { + subscriber.next(keys ? createObject_1.createObject(keys, values) : values); + } + subscriber.complete(); + } + })); + }; + for (var sourceIndex = 0; sourceIndex < length; sourceIndex++) { + _loop_1(sourceIndex); + } + }); + return resultSelector ? result.pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : result; + } + exports2.forkJoin = forkJoin; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js +var require_fromEvent = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromEvent = void 0; + var Observable_1 = require_Observable(); + var mergeMap_1 = require_mergeMap(); + var isArrayLike_1 = require_isArrayLike(); + var isFunction_1 = require_isFunction(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var fromArray_1 = require_fromArray(); + var nodeEventEmitterMethods = ["addListener", "removeListener"]; + var eventTargetMethods = ["addEventListener", "removeEventListener"]; + var jqueryMethods = ["on", "off"]; + function fromEvent(target, eventName, options, resultSelector) { + if (isFunction_1.isFunction(options)) { + resultSelector = options; + options = void 0; + } + if (resultSelector) { + return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)); + } + var _a = __read(isEventTarget(target) ? eventTargetMethods.map(function(methodName) { + return function(handler) { + return target[methodName](eventName, handler, options); + }; + }) : isNodeStyleEventEmitter(target) ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) : isJQueryStyleEventEmitter(target) ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) : [], 2), add = _a[0], remove = _a[1]; + if (!add) { + if (isArrayLike_1.isArrayLike(target)) { + return mergeMap_1.mergeMap(function(subTarget) { + return fromEvent(subTarget, eventName, options); + })(fromArray_1.internalFromArray(target)); + } + } + if (!add) { + throw new TypeError("Invalid event target"); + } + return new Observable_1.Observable(function(subscriber) { + var handler = function() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + return subscriber.next(1 < args2.length ? args2 : args2[0]); + }; + add(handler); + return function() { + return remove(handler); + }; + }); + } + exports2.fromEvent = fromEvent; + function toCommonHandlerRegistry(target, eventName) { + return function(methodName) { + return function(handler) { + return target[methodName](eventName, handler); + }; + }; + } + function isNodeStyleEventEmitter(target) { + return isFunction_1.isFunction(target.addListener) && isFunction_1.isFunction(target.removeListener); + } + function isJQueryStyleEventEmitter(target) { + return isFunction_1.isFunction(target.on) && isFunction_1.isFunction(target.off); + } + function isEventTarget(target) { + return isFunction_1.isFunction(target.addEventListener) && isFunction_1.isFunction(target.removeEventListener); + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/fromEventPattern.js +var require_fromEventPattern = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/fromEventPattern.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromEventPattern = void 0; + var Observable_1 = require_Observable(); + var isFunction_1 = require_isFunction(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + function fromEventPattern(addHandler, removeHandler, resultSelector) { + if (resultSelector) { + return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)); + } + return new Observable_1.Observable(function(subscriber) { + var handler = function() { + var e = []; + for (var _i = 0; _i < arguments.length; _i++) { + e[_i] = arguments[_i]; + } + return subscriber.next(e.length === 1 ? e[0] : e); + }; + var retValue = addHandler(handler); + return isFunction_1.isFunction(removeHandler) ? function() { + return removeHandler(handler, retValue); + } : void 0; + }); + } + exports2.fromEventPattern = fromEventPattern; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/generate.js +var require_generate = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/generate.js"(exports2) { + "use strict"; + var __generator = exports2 && exports2.__generator || function(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) + throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) + throw new TypeError("Generator is already executing."); + while (_) + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) + return t; + if (y = 0, t) + op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generate = void 0; + var identity_1 = require_identity(); + var isScheduler_1 = require_isScheduler(); + var defer_1 = require_defer(); + var scheduleIterable_1 = require_scheduleIterable(); + function generate(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler) { + var _a, _b; + var resultSelector; + var initialState; + if (arguments.length === 1) { + _a = initialStateOrOptions, initialState = _a.initialState, condition = _a.condition, iterate = _a.iterate, _b = _a.resultSelector, resultSelector = _b === void 0 ? identity_1.identity : _b, scheduler = _a.scheduler; + } else { + initialState = initialStateOrOptions; + if (!resultSelectorOrScheduler || isScheduler_1.isScheduler(resultSelectorOrScheduler)) { + resultSelector = identity_1.identity; + scheduler = resultSelectorOrScheduler; + } else { + resultSelector = resultSelectorOrScheduler; + } + } + function gen() { + var state; + return __generator(this, function(_a2) { + switch (_a2.label) { + case 0: + state = initialState; + _a2.label = 1; + case 1: + if (!(!condition || condition(state))) + return [3, 4]; + return [4, resultSelector(state)]; + case 2: + _a2.sent(); + _a2.label = 3; + case 3: + state = iterate(state); + return [3, 1]; + case 4: + return [2]; + } + }); + } + return defer_1.defer(scheduler ? function() { + return scheduleIterable_1.scheduleIterable(gen(), scheduler); + } : gen); + } + exports2.generate = generate; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/iif.js +var require_iif = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/iif.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.iif = void 0; + var defer_1 = require_defer(); + function iif(condition, trueResult, falseResult) { + return defer_1.defer(function() { + return condition() ? trueResult : falseResult; + }); + } + exports2.iif = iif; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/timer.js +var require_timer2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/timer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.timer = void 0; + var Observable_1 = require_Observable(); + var async_1 = require_async(); + var isScheduler_1 = require_isScheduler(); + var isDate_1 = require_isDate(); + function timer(dueTime, intervalOrScheduler, scheduler) { + if (dueTime === void 0) { + dueTime = 0; + } + if (scheduler === void 0) { + scheduler = async_1.async; + } + var intervalDuration = -1; + if (intervalOrScheduler != null) { + if (isScheduler_1.isScheduler(intervalOrScheduler)) { + scheduler = intervalOrScheduler; + } else { + intervalDuration = intervalOrScheduler; + } + } + return new Observable_1.Observable(function(subscriber) { + var due = isDate_1.isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime; + if (due < 0) { + due = 0; + } + var n = 0; + return scheduler.schedule(function() { + if (!subscriber.closed) { + subscriber.next(n++); + if (0 <= intervalDuration) { + this.schedule(void 0, intervalDuration); + } else { + subscriber.complete(); + } + } + }, due); + }); + } + exports2.timer = timer; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/interval.js +var require_interval = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/interval.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.interval = void 0; + var async_1 = require_async(); + var timer_1 = require_timer2(); + function interval(period, scheduler) { + if (period === void 0) { + period = 0; + } + if (scheduler === void 0) { + scheduler = async_1.asyncScheduler; + } + if (period < 0) { + period = 0; + } + return timer_1.timer(period, period, scheduler); + } + exports2.interval = interval; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/merge.js +var require_merge = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/merge.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.merge = void 0; + var mergeAll_1 = require_mergeAll(); + var fromArray_1 = require_fromArray(); + var from_1 = require_from2(); + var empty_1 = require_empty(); + var args_1 = require_args(); + function merge() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(args2); + var concurrent = args_1.popNumber(args2, Infinity); + var sources = args2; + return !sources.length ? empty_1.EMPTY : sources.length === 1 ? from_1.innerFrom(sources[0]) : mergeAll_1.mergeAll(concurrent)(fromArray_1.internalFromArray(sources, scheduler)); + } + exports2.merge = merge; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/never.js +var require_never = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/never.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.never = exports2.NEVER = void 0; + var Observable_1 = require_Observable(); + var noop_1 = require_noop(); + exports2.NEVER = new Observable_1.Observable(noop_1.noop); + function never() { + return exports2.NEVER; + } + exports2.never = never; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js +var require_argsOrArgArray = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argsOrArgArray = void 0; + var isArray = Array.isArray; + function argsOrArgArray(args2) { + return args2.length === 1 && isArray(args2[0]) ? args2[0] : args2; + } + exports2.argsOrArgArray = argsOrArgArray; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNext.js +var require_onErrorResumeNext = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNext.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.onErrorResumeNext = void 0; + var lift_1 = require_lift(); + var from_1 = require_from2(); + var argsOrArgArray_1 = require_argsOrArgArray(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop(); + function onErrorResumeNext() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + var nextSources = argsOrArgArray_1.argsOrArgArray(sources); + return lift_1.operate(function(source, subscriber) { + var remaining = __spreadArray([source], __read(nextSources)); + var subscribeNext = function() { + if (!subscriber.closed) { + if (remaining.length > 0) { + var nextSource = void 0; + try { + nextSource = from_1.innerFrom(remaining.shift()); + } catch (err) { + subscribeNext(); + return; + } + var innerSub = new OperatorSubscriber_1.OperatorSubscriber(subscriber, void 0, noop_1.noop, noop_1.noop); + subscriber.add(nextSource.subscribe(innerSub)); + innerSub.add(subscribeNext); + } else { + subscriber.complete(); + } + } + }; + subscribeNext(); + }); + } + exports2.onErrorResumeNext = onErrorResumeNext; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js +var require_onErrorResumeNext2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.onErrorResumeNext = void 0; + var empty_1 = require_empty(); + var onErrorResumeNext_1 = require_onErrorResumeNext(); + var argsOrArgArray_1 = require_argsOrArgArray(); + function onErrorResumeNext() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + return onErrorResumeNext_1.onErrorResumeNext(argsOrArgArray_1.argsOrArgArray(sources))(empty_1.EMPTY); + } + exports2.onErrorResumeNext = onErrorResumeNext; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/pairs.js +var require_pairs = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/pairs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pairs = void 0; + var from_1 = require_from2(); + function pairs(obj, scheduler) { + return from_1.from(Object.entries(obj), scheduler); + } + exports2.pairs = pairs; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/not.js +var require_not = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/util/not.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.not = void 0; + function not(pred, thisArg) { + return function(value, index) { + return !pred.call(thisArg, value, index); + }; + } + exports2.not = not; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/filter.js +var require_filter = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/filter.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.filter = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function filter(predicate, thisArg) { + return lift_1.operate(function(source, subscriber) { + var index = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + return predicate.call(thisArg, value, index++) && subscriber.next(value); + })); + }); + } + exports2.filter = filter; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/partition.js +var require_partition = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/partition.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.partition = void 0; + var not_1 = require_not(); + var filter_1 = require_filter(); + var from_1 = require_from2(); + function partition(source, predicate, thisArg) { + return [filter_1.filter(predicate, thisArg)(from_1.innerFrom(source)), filter_1.filter(not_1.not(predicate, thisArg))(from_1.innerFrom(source))]; + } + exports2.partition = partition; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/race.js +var require_race = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/race.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.raceInit = exports2.race = void 0; + var Observable_1 = require_Observable(); + var from_1 = require_from2(); + var argsOrArgArray_1 = require_argsOrArgArray(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function race() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + sources = argsOrArgArray_1.argsOrArgArray(sources); + return sources.length === 1 ? from_1.innerFrom(sources[0]) : new Observable_1.Observable(raceInit(sources)); + } + exports2.race = race; + function raceInit(sources) { + return function(subscriber) { + var subscriptions = []; + var _loop_1 = function(i2) { + subscriptions.push(from_1.innerFrom(sources[i2]).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + if (subscriptions) { + for (var s = 0; s < subscriptions.length; s++) { + s !== i2 && subscriptions[s].unsubscribe(); + } + subscriptions = null; + } + subscriber.next(value); + }))); + }; + for (var i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) { + _loop_1(i); + } + }; + } + exports2.raceInit = raceInit; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/range.js +var require_range = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/range.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.range = void 0; + var Observable_1 = require_Observable(); + var empty_1 = require_empty(); + function range(start, count, scheduler) { + if (count == null) { + count = start; + start = 0; + } + if (count <= 0) { + return empty_1.EMPTY; + } + var end = count + start; + return new Observable_1.Observable(scheduler ? function(subscriber) { + var n = start; + return scheduler.schedule(function() { + if (n < end) { + subscriber.next(n++); + this.schedule(); + } else { + subscriber.complete(); + } + }); + } : function(subscriber) { + var n = start; + while (n < end && !subscriber.closed) { + subscriber.next(n++); + } + subscriber.complete(); + }); + } + exports2.range = range; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/using.js +var require_using = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/using.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.using = void 0; + var Observable_1 = require_Observable(); + var from_1 = require_from2(); + var empty_1 = require_empty(); + function using(resourceFactory, observableFactory) { + return new Observable_1.Observable(function(subscriber) { + var resource = resourceFactory(); + var result = observableFactory(resource); + var source = result ? from_1.innerFrom(result) : empty_1.EMPTY; + source.subscribe(subscriber); + return function() { + if (resource) { + resource.unsubscribe(); + } + }; + }); + } + exports2.using = using; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/zip.js +var require_zip = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/zip.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.zip = void 0; + var Observable_1 = require_Observable(); + var from_1 = require_from2(); + var argsOrArgArray_1 = require_argsOrArgArray(); + var empty_1 = require_empty(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var args_1 = require_args(); + function zip() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var resultSelector = args_1.popResultSelector(args2); + var sources = argsOrArgArray_1.argsOrArgArray(args2); + return sources.length ? new Observable_1.Observable(function(subscriber) { + var buffers = sources.map(function() { + return []; + }); + var completed = sources.map(function() { + return false; + }); + subscriber.add(function() { + buffers = completed = null; + }); + var _loop_1 = function(sourceIndex2) { + from_1.innerFrom(sources[sourceIndex2]).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + buffers[sourceIndex2].push(value); + if (buffers.every(function(buffer) { + return buffer.length; + })) { + var result = buffers.map(function(buffer) { + return buffer.shift(); + }); + subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray([], __read(result))) : result); + if (buffers.some(function(buffer, i) { + return !buffer.length && completed[i]; + })) { + subscriber.complete(); + } + } + }, function() { + completed[sourceIndex2] = true; + !buffers[sourceIndex2].length && subscriber.complete(); + })); + }; + for (var sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) { + _loop_1(sourceIndex); + } + return function() { + buffers = completed = null; + }; + }) : empty_1.EMPTY; + } + exports2.zip = zip; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/types.js +var require_types3 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/types.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/audit.js +var require_audit = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/audit.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.audit = void 0; + var lift_1 = require_lift(); + var from_1 = require_from2(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function audit(durationSelector) { + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + var lastValue = null; + var durationSubscriber = null; + var isComplete = false; + var endDuration = function() { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber = null; + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + isComplete && subscriber.complete(); + }; + var cleanupDuration = function() { + durationSubscriber = null; + isComplete && subscriber.complete(); + }; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + hasValue = true; + lastValue = value; + if (!durationSubscriber) { + from_1.innerFrom(durationSelector(value)).subscribe(durationSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, endDuration, cleanupDuration)); + } + }, function() { + isComplete = true; + (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); + })); + }); + } + exports2.audit = audit; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/auditTime.js +var require_auditTime = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/auditTime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.auditTime = void 0; + var async_1 = require_async(); + var audit_1 = require_audit(); + var timer_1 = require_timer2(); + function auditTime(duration, scheduler) { + if (scheduler === void 0) { + scheduler = async_1.async; + } + return audit_1.audit(function() { + return timer_1.timer(duration, scheduler); + }); + } + exports2.auditTime = auditTime; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/buffer.js +var require_buffer = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/buffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buffer = void 0; + var lift_1 = require_lift(); + var noop_1 = require_noop(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function buffer(closingNotifier) { + return lift_1.operate(function(source, subscriber) { + var currentBuffer = []; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + return currentBuffer.push(value); + }, function() { + subscriber.next(currentBuffer); + subscriber.complete(); + })); + closingNotifier.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function() { + var b = currentBuffer; + currentBuffer = []; + subscriber.next(b); + }, noop_1.noop)); + return function() { + currentBuffer = null; + }; + }); + } + exports2.buffer = buffer; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js +var require_bufferCount = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js"(exports2) { + "use strict"; + var __values = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bufferCount = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var arrRemove_1 = require_arrRemove(); + function bufferCount(bufferSize, startBufferEvery) { + if (startBufferEvery === void 0) { + startBufferEvery = null; + } + startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize; + return lift_1.operate(function(source, subscriber) { + var buffers = []; + var count = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var e_1, _a, e_2, _b; + var toEmit = null; + if (count++ % startBufferEvery === 0) { + buffers.push([]); + } + try { + for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { + var buffer = buffers_1_1.value; + buffer.push(value); + if (bufferSize <= buffer.length) { + toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : []; + toEmit.push(buffer); + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) + _a.call(buffers_1); + } finally { + if (e_1) + throw e_1.error; + } + } + if (toEmit) { + try { + for (var toEmit_1 = __values(toEmit), toEmit_1_1 = toEmit_1.next(); !toEmit_1_1.done; toEmit_1_1 = toEmit_1.next()) { + var buffer = toEmit_1_1.value; + arrRemove_1.arrRemove(buffers, buffer); + subscriber.next(buffer); + } + } catch (e_2_1) { + e_2 = { error: e_2_1 }; + } finally { + try { + if (toEmit_1_1 && !toEmit_1_1.done && (_b = toEmit_1.return)) + _b.call(toEmit_1); + } finally { + if (e_2) + throw e_2.error; + } + } + } + }, function() { + var e_3, _a; + try { + for (var buffers_2 = __values(buffers), buffers_2_1 = buffers_2.next(); !buffers_2_1.done; buffers_2_1 = buffers_2.next()) { + var buffer = buffers_2_1.value; + subscriber.next(buffer); + } + } catch (e_3_1) { + e_3 = { error: e_3_1 }; + } finally { + try { + if (buffers_2_1 && !buffers_2_1.done && (_a = buffers_2.return)) + _a.call(buffers_2); + } finally { + if (e_3) + throw e_3.error; + } + } + subscriber.complete(); + }, void 0, function() { + buffers = null; + })); + }); + } + exports2.bufferCount = bufferCount; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js +var require_bufferTime = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js"(exports2) { + "use strict"; + var __values = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bufferTime = void 0; + var Subscription_1 = require_Subscription(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var arrRemove_1 = require_arrRemove(); + var async_1 = require_async(); + var args_1 = require_args(); + function bufferTime(bufferTimeSpan) { + var _a, _b; + var otherArgs = []; + for (var _i = 1; _i < arguments.length; _i++) { + otherArgs[_i - 1] = arguments[_i]; + } + var scheduler = (_a = args_1.popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : async_1.asyncScheduler; + var bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + var maxBufferSize = otherArgs[1] || Infinity; + return lift_1.operate(function(source, subscriber) { + var bufferRecords = []; + var restartOnEmit = false; + var emit = function(record) { + var buffer = record.buffer, subs = record.subs; + subs.unsubscribe(); + arrRemove_1.arrRemove(bufferRecords, record); + subscriber.next(buffer); + restartOnEmit && startBuffer(); + }; + var startBuffer = function() { + if (bufferRecords) { + var subs = new Subscription_1.Subscription(); + subscriber.add(subs); + var buffer = []; + var record_1 = { + buffer, + subs + }; + bufferRecords.push(record_1); + subs.add(scheduler.schedule(function() { + return emit(record_1); + }, bufferTimeSpan)); + } + }; + bufferCreationInterval !== null && bufferCreationInterval >= 0 ? subscriber.add(scheduler.schedule(function() { + startBuffer(); + !this.closed && subscriber.add(this.schedule(null, bufferCreationInterval)); + }, bufferCreationInterval)) : restartOnEmit = true; + startBuffer(); + var bufferTimeSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var e_1, _a2; + var recordsCopy = bufferRecords.slice(); + try { + for (var recordsCopy_1 = __values(recordsCopy), recordsCopy_1_1 = recordsCopy_1.next(); !recordsCopy_1_1.done; recordsCopy_1_1 = recordsCopy_1.next()) { + var record = recordsCopy_1_1.value; + var buffer = record.buffer; + buffer.push(value); + maxBufferSize <= buffer.length && emit(record); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (recordsCopy_1_1 && !recordsCopy_1_1.done && (_a2 = recordsCopy_1.return)) + _a2.call(recordsCopy_1); + } finally { + if (e_1) + throw e_1.error; + } + } + }, function() { + while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) { + subscriber.next(bufferRecords.shift().buffer); + } + bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe(); + subscriber.complete(); + subscriber.unsubscribe(); + }, void 0, function() { + return bufferRecords = null; + }); + source.subscribe(bufferTimeSubscriber); + }); + } + exports2.bufferTime = bufferTime; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js +var require_bufferToggle = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js"(exports2) { + "use strict"; + var __values = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bufferToggle = void 0; + var Subscription_1 = require_Subscription(); + var lift_1 = require_lift(); + var from_1 = require_from2(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop(); + var arrRemove_1 = require_arrRemove(); + function bufferToggle(openings, closingSelector) { + return lift_1.operate(function(source, subscriber) { + var buffers = []; + from_1.innerFrom(openings).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(openValue) { + var buffer = []; + buffers.push(buffer); + var closingSubscription = new Subscription_1.Subscription(); + var emitBuffer = function() { + arrRemove_1.arrRemove(buffers, buffer); + subscriber.next(buffer); + closingSubscription.unsubscribe(); + }; + closingSubscription.add(from_1.innerFrom(closingSelector(openValue)).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, emitBuffer, noop_1.noop))); + }, noop_1.noop)); + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var e_1, _a; + try { + for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { + var buffer = buffers_1_1.value; + buffer.push(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) + _a.call(buffers_1); + } finally { + if (e_1) + throw e_1.error; + } + } + }, function() { + while (buffers.length > 0) { + subscriber.next(buffers.shift()); + } + subscriber.complete(); + })); + }); + } + exports2.bufferToggle = bufferToggle; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js +var require_bufferWhen = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bufferWhen = void 0; + var lift_1 = require_lift(); + var noop_1 = require_noop(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var from_1 = require_from2(); + function bufferWhen(closingSelector) { + return lift_1.operate(function(source, subscriber) { + var buffer = null; + var closingSubscriber = null; + var openBuffer = function() { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + var b = buffer; + buffer = []; + b && subscriber.next(b); + from_1.innerFrom(closingSelector()).subscribe(closingSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, openBuffer, noop_1.noop)); + }; + openBuffer(); + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + return buffer === null || buffer === void 0 ? void 0 : buffer.push(value); + }, function() { + buffer && subscriber.next(buffer); + subscriber.complete(); + }, void 0, function() { + return buffer = closingSubscriber = null; + })); + }); + } + exports2.bufferWhen = bufferWhen; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/catchError.js +var require_catchError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/catchError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.catchError = void 0; + var from_1 = require_from2(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var lift_1 = require_lift(); + function catchError(selector) { + return lift_1.operate(function(source, subscriber) { + var innerSub = null; + var syncUnsub = false; + var handledResult; + innerSub = source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, void 0, void 0, function(err) { + handledResult = from_1.innerFrom(selector(err, catchError(selector)(source))); + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + handledResult.subscribe(subscriber); + } else { + syncUnsub = true; + } + })); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + handledResult.subscribe(subscriber); + } + }); + } + exports2.catchError = catchError; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js +var require_scanInternals = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scanInternals = void 0; + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) { + return function(source, subscriber) { + var hasState = hasSeed; + var state = seed; + var index = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var i = index++; + state = hasState ? accumulator(state, value, i) : (hasState = true, value); + emitOnNext && subscriber.next(state); + }, emitBeforeComplete && function() { + hasState && subscriber.next(state); + subscriber.complete(); + })); + }; + } + exports2.scanInternals = scanInternals; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/reduce.js +var require_reduce = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/reduce.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.reduce = void 0; + var scanInternals_1 = require_scanInternals(); + var lift_1 = require_lift(); + function reduce(accumulator, seed) { + return lift_1.operate(scanInternals_1.scanInternals(accumulator, seed, arguments.length >= 2, false, true)); + } + exports2.reduce = reduce; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/toArray.js +var require_toArray = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/toArray.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toArray = void 0; + var reduce_1 = require_reduce(); + var lift_1 = require_lift(); + var arrReducer = function(arr, value) { + return arr.push(value), arr; + }; + function toArray() { + return lift_1.operate(function(source, subscriber) { + reduce_1.reduce(arrReducer, [])(source).subscribe(subscriber); + }); + } + exports2.toArray = toArray; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js +var require_joinAllInternals = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.joinAllInternals = void 0; + var identity_1 = require_identity(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var pipe_1 = require_pipe(); + var mergeMap_1 = require_mergeMap(); + var toArray_1 = require_toArray(); + function joinAllInternals(joinFn, project) { + return pipe_1.pipe(toArray_1.toArray(), mergeMap_1.mergeMap(function(sources) { + return joinFn(sources); + }), project ? mapOneOrManyArgs_1.mapOneOrManyArgs(project) : identity_1.identity); + } + exports2.joinAllInternals = joinAllInternals; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js +var require_combineLatestAll = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.combineLatestAll = void 0; + var combineLatest_1 = require_combineLatest(); + var joinAllInternals_1 = require_joinAllInternals(); + function combineLatestAll(project) { + return joinAllInternals_1.joinAllInternals(combineLatest_1.combineLatest, project); + } + exports2.combineLatestAll = combineLatestAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/combineAll.js +var require_combineAll = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/combineAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.combineAll = void 0; + var combineLatestAll_1 = require_combineLatestAll(); + exports2.combineAll = combineLatestAll_1.combineLatestAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js +var require_combineLatest2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.combineLatest = void 0; + var combineLatest_1 = require_combineLatest(); + var lift_1 = require_lift(); + var argsOrArgArray_1 = require_argsOrArgArray(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var pipe_1 = require_pipe(); + var args_1 = require_args(); + function combineLatest() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var resultSelector = args_1.popResultSelector(args2); + return resultSelector ? pipe_1.pipe(combineLatest.apply(void 0, __spreadArray([], __read(args2))), mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : lift_1.operate(function(source, subscriber) { + combineLatest_1.combineLatestInit(__spreadArray([source], __read(argsOrArgArray_1.argsOrArgArray(args2))))(subscriber); + }); + } + exports2.combineLatest = combineLatest; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js +var require_combineLatestWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.combineLatestWith = void 0; + var combineLatest_1 = require_combineLatest2(); + function combineLatestWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return combineLatest_1.combineLatest.apply(void 0, __spreadArray([], __read(otherSources))); + } + exports2.combineLatestWith = combineLatestWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/concatMap.js +var require_concatMap = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/concatMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concatMap = void 0; + var mergeMap_1 = require_mergeMap(); + var isFunction_1 = require_isFunction(); + function concatMap(project, resultSelector) { + return isFunction_1.isFunction(resultSelector) ? mergeMap_1.mergeMap(project, resultSelector, 1) : mergeMap_1.mergeMap(project, 1); + } + exports2.concatMap = concatMap; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js +var require_concatMapTo = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concatMapTo = void 0; + var concatMap_1 = require_concatMap(); + var isFunction_1 = require_isFunction(); + function concatMapTo(innerObservable, resultSelector) { + return isFunction_1.isFunction(resultSelector) ? concatMap_1.concatMap(function() { + return innerObservable; + }, resultSelector) : concatMap_1.concatMap(function() { + return innerObservable; + }); + } + exports2.concatMapTo = concatMapTo; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/concat.js +var require_concat2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/concat.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concat = void 0; + var lift_1 = require_lift(); + var concatAll_1 = require_concatAll(); + var fromArray_1 = require_fromArray(); + var args_1 = require_args(); + function concat() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(args2); + return lift_1.operate(function(source, subscriber) { + concatAll_1.concatAll()(fromArray_1.internalFromArray(__spreadArray([source], __read(args2)), scheduler)).subscribe(subscriber); + }); + } + exports2.concat = concat; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/concatWith.js +var require_concatWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/concatWith.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concatWith = void 0; + var concat_1 = require_concat2(); + function concatWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return concat_1.concat.apply(void 0, __spreadArray([], __read(otherSources))); + } + exports2.concatWith = concatWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js +var require_fromSubscribable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromSubscribable = void 0; + var Observable_1 = require_Observable(); + function fromSubscribable(subscribable) { + return new Observable_1.Observable(function(subscriber) { + return subscribable.subscribe(subscriber); + }); + } + exports2.fromSubscribable = fromSubscribable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/connect.js +var require_connect = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/connect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.connect = void 0; + var Subject_1 = require_Subject(); + var from_1 = require_from2(); + var lift_1 = require_lift(); + var fromSubscribable_1 = require_fromSubscribable(); + var DEFAULT_CONFIG = { + connector: function() { + return new Subject_1.Subject(); + } + }; + function connect(selector, config) { + if (config === void 0) { + config = DEFAULT_CONFIG; + } + var connector = config.connector; + return lift_1.operate(function(source, subscriber) { + var subject = connector(); + from_1.from(selector(fromSubscribable_1.fromSubscribable(subject))).subscribe(subscriber); + subscriber.add(source.subscribe(subject)); + }); + } + exports2.connect = connect; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/count.js +var require_count = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/count.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.count = void 0; + var reduce_1 = require_reduce(); + function count(predicate) { + return reduce_1.reduce(function(total, value, i) { + return !predicate || predicate(value, i) ? total + 1 : total; + }, 0); + } + exports2.count = count; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/debounce.js +var require_debounce = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/debounce.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.debounce = void 0; + var lift_1 = require_lift(); + var noop_1 = require_noop(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var from_1 = require_from2(); + function debounce(durationSelector) { + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + var lastValue = null; + var durationSubscriber = null; + var emit = function() { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber = null; + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + hasValue = true; + lastValue = value; + durationSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, emit, noop_1.noop); + from_1.innerFrom(durationSelector(value)).subscribe(durationSubscriber); + }, function() { + emit(); + subscriber.complete(); + }, void 0, function() { + lastValue = durationSubscriber = null; + })); + }); + } + exports2.debounce = debounce; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js +var require_debounceTime = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.debounceTime = void 0; + var async_1 = require_async(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function debounceTime(dueTime, scheduler) { + if (scheduler === void 0) { + scheduler = async_1.asyncScheduler; + } + return lift_1.operate(function(source, subscriber) { + var activeTask = null; + var lastValue = null; + var lastTime = null; + var emit = function() { + if (activeTask) { + activeTask.unsubscribe(); + activeTask = null; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }; + function emitWhenIdle() { + var targetTime = lastTime + dueTime; + var now = scheduler.now(); + if (now < targetTime) { + activeTask = this.schedule(void 0, targetTime - now); + subscriber.add(activeTask); + return; + } + emit(); + } + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + lastValue = value; + lastTime = scheduler.now(); + if (!activeTask) { + activeTask = scheduler.schedule(emitWhenIdle, dueTime); + subscriber.add(activeTask); + } + }, function() { + emit(); + subscriber.complete(); + }, void 0, function() { + lastValue = activeTask = null; + })); + }); + } + exports2.debounceTime = debounceTime; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js +var require_defaultIfEmpty = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultIfEmpty = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function defaultIfEmpty(defaultValue) { + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + hasValue = true; + subscriber.next(value); + }, function() { + if (!hasValue) { + subscriber.next(defaultValue); + } + subscriber.complete(); + })); + }); + } + exports2.defaultIfEmpty = defaultIfEmpty; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/take.js +var require_take = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/take.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.take = void 0; + var empty_1 = require_empty(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function take(count) { + return count <= 0 ? function() { + return empty_1.EMPTY; + } : lift_1.operate(function(source, subscriber) { + var seen = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + if (++seen <= count) { + subscriber.next(value); + if (count <= seen) { + subscriber.complete(); + } + } + })); + }); + } + exports2.take = take; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js +var require_ignoreElements = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ignoreElements = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop(); + function ignoreElements() { + return lift_1.operate(function(source, subscriber) { + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, noop_1.noop)); + }); + } + exports2.ignoreElements = ignoreElements; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mapTo.js +var require_mapTo = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mapTo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mapTo = void 0; + var map_1 = require_map(); + function mapTo(value) { + return map_1.map(function() { + return value; + }); + } + exports2.mapTo = mapTo; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js +var require_delayWhen = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delayWhen = void 0; + var concat_1 = require_concat(); + var take_1 = require_take(); + var ignoreElements_1 = require_ignoreElements(); + var mapTo_1 = require_mapTo(); + var mergeMap_1 = require_mergeMap(); + function delayWhen(delayDurationSelector, subscriptionDelay) { + if (subscriptionDelay) { + return function(source) { + return concat_1.concat(subscriptionDelay.pipe(take_1.take(1), ignoreElements_1.ignoreElements()), source.pipe(delayWhen(delayDurationSelector))); + }; + } + return mergeMap_1.mergeMap(function(value, index) { + return delayDurationSelector(value, index).pipe(take_1.take(1), mapTo_1.mapTo(value)); + }); + } + exports2.delayWhen = delayWhen; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/delay.js +var require_delay = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = void 0; + var async_1 = require_async(); + var delayWhen_1 = require_delayWhen(); + var timer_1 = require_timer2(); + function delay(due, scheduler) { + if (scheduler === void 0) { + scheduler = async_1.asyncScheduler; + } + var duration = timer_1.timer(due, scheduler); + return delayWhen_1.delayWhen(function() { + return duration; + }); + } + exports2.delay = delay; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js +var require_dematerialize = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.dematerialize = void 0; + var Notification_1 = require_Notification(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function dematerialize() { + return lift_1.operate(function(source, subscriber) { + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(notification) { + return Notification_1.observeNotification(notification, subscriber); + })); + }); + } + exports2.dematerialize = dematerialize; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/distinct.js +var require_distinct = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/distinct.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.distinct = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop(); + function distinct(keySelector, flushes) { + return lift_1.operate(function(source, subscriber) { + var distinctKeys = new Set(); + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var key = keySelector ? keySelector(value) : value; + if (!distinctKeys.has(key)) { + distinctKeys.add(key); + subscriber.next(value); + } + })); + flushes === null || flushes === void 0 ? void 0 : flushes.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function() { + return distinctKeys.clear(); + }, noop_1.noop)); + }); + } + exports2.distinct = distinct; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js +var require_distinctUntilChanged = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.distinctUntilChanged = void 0; + var identity_1 = require_identity(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function distinctUntilChanged(comparator, keySelector) { + if (keySelector === void 0) { + keySelector = identity_1.identity; + } + comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare; + return lift_1.operate(function(source, subscriber) { + var previousKey; + var first = true; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var currentKey = keySelector(value); + if (first || !comparator(previousKey, currentKey)) { + first = false; + previousKey = currentKey; + subscriber.next(value); + } + })); + }); + } + exports2.distinctUntilChanged = distinctUntilChanged; + function defaultCompare(a, b) { + return a === b; + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js +var require_distinctUntilKeyChanged = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.distinctUntilKeyChanged = void 0; + var distinctUntilChanged_1 = require_distinctUntilChanged(); + function distinctUntilKeyChanged(key, compare) { + return distinctUntilChanged_1.distinctUntilChanged(function(x, y) { + return compare ? compare(x[key], y[key]) : x[key] === y[key]; + }); + } + exports2.distinctUntilKeyChanged = distinctUntilKeyChanged; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js +var require_throwIfEmpty = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throwIfEmpty = void 0; + var EmptyError_1 = require_EmptyError(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function throwIfEmpty(errorFactory) { + if (errorFactory === void 0) { + errorFactory = defaultErrorFactory; + } + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + hasValue = true; + subscriber.next(value); + }, function() { + return hasValue ? subscriber.complete() : subscriber.error(errorFactory()); + })); + }); + } + exports2.throwIfEmpty = throwIfEmpty; + function defaultErrorFactory() { + return new EmptyError_1.EmptyError(); + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/elementAt.js +var require_elementAt = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/elementAt.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.elementAt = void 0; + var ArgumentOutOfRangeError_1 = require_ArgumentOutOfRangeError(); + var filter_1 = require_filter(); + var throwIfEmpty_1 = require_throwIfEmpty(); + var defaultIfEmpty_1 = require_defaultIfEmpty(); + var take_1 = require_take(); + function elementAt(index, defaultValue) { + if (index < 0) { + throw new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError(); + } + var hasDefaultValue = arguments.length >= 2; + return function(source) { + return source.pipe(filter_1.filter(function(v, i) { + return i === index; + }), take_1.take(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function() { + return new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError(); + })); + }; + } + exports2.elementAt = elementAt; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/endWith.js +var require_endWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/endWith.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.endWith = void 0; + var concat_1 = require_concat(); + var of_1 = require_of(); + function endWith() { + var values = []; + for (var _i = 0; _i < arguments.length; _i++) { + values[_i] = arguments[_i]; + } + return function(source) { + return concat_1.concat(source, of_1.of.apply(void 0, __spreadArray([], __read(values)))); + }; + } + exports2.endWith = endWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/every.js +var require_every = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/every.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.every = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function every(predicate, thisArg) { + return lift_1.operate(function(source, subscriber) { + var index = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + if (!predicate.call(thisArg, value, index++, source)) { + subscriber.next(false); + subscriber.complete(); + } + }, function() { + subscriber.next(true); + subscriber.complete(); + })); + }); + } + exports2.every = every; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js +var require_exhaustAll = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exhaustAll = void 0; + var lift_1 = require_lift(); + var from_1 = require_from2(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function exhaustAll() { + return lift_1.operate(function(source, subscriber) { + var isComplete = false; + var innerSub = null; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(inner) { + if (!innerSub) { + innerSub = from_1.innerFrom(inner).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, void 0, function() { + innerSub = null; + isComplete && subscriber.complete(); + })); + } + }, function() { + isComplete = true; + !innerSub && subscriber.complete(); + })); + }); + } + exports2.exhaustAll = exhaustAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/exhaust.js +var require_exhaust = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/exhaust.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exhaust = void 0; + var exhaustAll_1 = require_exhaustAll(); + exports2.exhaust = exhaustAll_1.exhaustAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js +var require_exhaustMap = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exhaustMap = void 0; + var map_1 = require_map(); + var from_1 = require_from2(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function exhaustMap(project, resultSelector) { + if (resultSelector) { + return function(source) { + return source.pipe(exhaustMap(function(a, i) { + return from_1.innerFrom(project(a, i)).pipe(map_1.map(function(b, ii) { + return resultSelector(a, b, i, ii); + })); + })); + }; + } + return lift_1.operate(function(source, subscriber) { + var index = 0; + var innerSub = null; + var isComplete = false; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(outerValue) { + if (!innerSub) { + innerSub = new OperatorSubscriber_1.OperatorSubscriber(subscriber, void 0, function() { + innerSub = null; + isComplete && subscriber.complete(); + }); + from_1.innerFrom(project(outerValue, index++)).subscribe(innerSub); + } + }, function() { + isComplete = true; + !innerSub && subscriber.complete(); + })); + }); + } + exports2.exhaustMap = exhaustMap; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/expand.js +var require_expand = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/expand.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.expand = void 0; + var lift_1 = require_lift(); + var mergeInternals_1 = require_mergeInternals(); + function expand(project, concurrent, scheduler) { + if (concurrent === void 0) { + concurrent = Infinity; + } + concurrent = (concurrent || 0) < 1 ? Infinity : concurrent; + return lift_1.operate(function(source, subscriber) { + return mergeInternals_1.mergeInternals(source, subscriber, project, concurrent, void 0, true, scheduler); + }); + } + exports2.expand = expand; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/finalize.js +var require_finalize = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/finalize.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.finalize = void 0; + var lift_1 = require_lift(); + function finalize(callback) { + return lift_1.operate(function(source, subscriber) { + try { + source.subscribe(subscriber); + } finally { + subscriber.add(callback); + } + }); + } + exports2.finalize = finalize; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/find.js +var require_find = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/find.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createFind = exports2.find = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function find(predicate, thisArg) { + return lift_1.operate(createFind(predicate, thisArg, "value")); + } + exports2.find = find; + function createFind(predicate, thisArg, emit) { + var findIndex = emit === "index"; + return function(source, subscriber) { + var index = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var i = index++; + if (predicate.call(thisArg, value, i, source)) { + subscriber.next(findIndex ? i : value); + subscriber.complete(); + } + }, function() { + subscriber.next(findIndex ? -1 : void 0); + subscriber.complete(); + })); + }; + } + exports2.createFind = createFind; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/findIndex.js +var require_findIndex = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/findIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findIndex = void 0; + var lift_1 = require_lift(); + var find_1 = require_find(); + function findIndex(predicate, thisArg) { + return lift_1.operate(find_1.createFind(predicate, thisArg, "index")); + } + exports2.findIndex = findIndex; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/first.js +var require_first = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/first.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.first = void 0; + var EmptyError_1 = require_EmptyError(); + var filter_1 = require_filter(); + var take_1 = require_take(); + var defaultIfEmpty_1 = require_defaultIfEmpty(); + var throwIfEmpty_1 = require_throwIfEmpty(); + var identity_1 = require_identity(); + function first(predicate, defaultValue) { + var hasDefaultValue = arguments.length >= 2; + return function(source) { + return source.pipe(predicate ? filter_1.filter(function(v, i) { + return predicate(v, i, source); + }) : identity_1.identity, take_1.take(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function() { + return new EmptyError_1.EmptyError(); + })); + }; + } + exports2.first = first; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js +var require_groupBy = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js"(exports2) { + "use strict"; + var __extends = exports2 && exports2.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) + if (Object.prototype.hasOwnProperty.call(b2, p)) + d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.groupBy = void 0; + var Observable_1 = require_Observable(); + var from_1 = require_from2(); + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function groupBy(keySelector, elementOrOptions, duration, connector) { + return lift_1.operate(function(source, subscriber) { + var element; + if (!elementOrOptions || typeof elementOrOptions === "function") { + element = elementOrOptions; + } else { + duration = elementOrOptions.duration, element = elementOrOptions.element, connector = elementOrOptions.connector; + } + var groups = new Map(); + var notify = function(cb) { + groups.forEach(cb); + cb(subscriber); + }; + var handleError = function(err) { + return notify(function(consumer) { + return consumer.error(err); + }); + }; + var groupBySourceSubscriber = new GroupBySubscriber(subscriber, function(value) { + try { + var key_1 = keySelector(value); + var group_1 = groups.get(key_1); + if (!group_1) { + groups.set(key_1, group_1 = connector ? connector() : new Subject_1.Subject()); + var grouped = createGroupedObservable(key_1, group_1); + subscriber.next(grouped); + if (duration) { + var durationSubscriber_1 = new OperatorSubscriber_1.OperatorSubscriber(group_1, function() { + group_1.complete(); + durationSubscriber_1 === null || durationSubscriber_1 === void 0 ? void 0 : durationSubscriber_1.unsubscribe(); + }, void 0, void 0, function() { + return groups.delete(key_1); + }); + groupBySourceSubscriber.add(from_1.innerFrom(duration(grouped)).subscribe(durationSubscriber_1)); + } + } + group_1.next(element ? element(value) : value); + } catch (err) { + handleError(err); + } + }, function() { + return notify(function(consumer) { + return consumer.complete(); + }); + }, handleError, function() { + return groups.clear(); + }); + source.subscribe(groupBySourceSubscriber); + function createGroupedObservable(key, groupSubject) { + var result = new Observable_1.Observable(function(groupSubscriber) { + groupBySourceSubscriber.activeGroups++; + var innerSub = groupSubject.subscribe(groupSubscriber); + return function() { + innerSub.unsubscribe(); + --groupBySourceSubscriber.activeGroups === 0 && groupBySourceSubscriber.teardownAttempted && groupBySourceSubscriber.unsubscribe(); + }; + }); + result.key = key; + return result; + } + }); + } + exports2.groupBy = groupBy; + var GroupBySubscriber = function(_super) { + __extends(GroupBySubscriber2, _super); + function GroupBySubscriber2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.activeGroups = 0; + _this.teardownAttempted = false; + return _this; + } + GroupBySubscriber2.prototype.unsubscribe = function() { + this.teardownAttempted = true; + this.activeGroups === 0 && _super.prototype.unsubscribe.call(this); + }; + return GroupBySubscriber2; + }(OperatorSubscriber_1.OperatorSubscriber); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js +var require_isEmpty = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isEmpty = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function isEmpty() { + return lift_1.operate(function(source, subscriber) { + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function() { + subscriber.next(false); + subscriber.complete(); + }, function() { + subscriber.next(true); + subscriber.complete(); + })); + }); + } + exports2.isEmpty = isEmpty; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js +var require_takeLast = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js"(exports2) { + "use strict"; + var __values = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.takeLast = void 0; + var empty_1 = require_empty(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function takeLast(count) { + return count <= 0 ? function() { + return empty_1.EMPTY; + } : lift_1.operate(function(source, subscriber) { + var buffer = []; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + buffer.push(value); + count < buffer.length && buffer.shift(); + }, function() { + var e_1, _a; + try { + for (var buffer_1 = __values(buffer), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) { + var value = buffer_1_1.value; + subscriber.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) + _a.call(buffer_1); + } finally { + if (e_1) + throw e_1.error; + } + } + subscriber.complete(); + }, void 0, function() { + buffer = null; + })); + }); + } + exports2.takeLast = takeLast; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/last.js +var require_last = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/last.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.last = void 0; + var EmptyError_1 = require_EmptyError(); + var filter_1 = require_filter(); + var takeLast_1 = require_takeLast(); + var throwIfEmpty_1 = require_throwIfEmpty(); + var defaultIfEmpty_1 = require_defaultIfEmpty(); + var identity_1 = require_identity(); + function last(predicate, defaultValue) { + var hasDefaultValue = arguments.length >= 2; + return function(source) { + return source.pipe(predicate ? filter_1.filter(function(v, i) { + return predicate(v, i, source); + }) : identity_1.identity, takeLast_1.takeLast(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function() { + return new EmptyError_1.EmptyError(); + })); + }; + } + exports2.last = last; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/materialize.js +var require_materialize = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/materialize.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.materialize = void 0; + var Notification_1 = require_Notification(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function materialize() { + return lift_1.operate(function(source, subscriber) { + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + subscriber.next(Notification_1.Notification.createNext(value)); + }, function() { + subscriber.next(Notification_1.Notification.createComplete()); + subscriber.complete(); + }, function(err) { + subscriber.next(Notification_1.Notification.createError(err)); + subscriber.complete(); + })); + }); + } + exports2.materialize = materialize; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/max.js +var require_max = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/max.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.max = void 0; + var reduce_1 = require_reduce(); + var isFunction_1 = require_isFunction(); + function max(comparer) { + return reduce_1.reduce(isFunction_1.isFunction(comparer) ? function(x, y) { + return comparer(x, y) > 0 ? x : y; + } : function(x, y) { + return x > y ? x : y; + }); + } + exports2.max = max; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/flatMap.js +var require_flatMap = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/flatMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.flatMap = void 0; + var mergeMap_1 = require_mergeMap(); + exports2.flatMap = mergeMap_1.mergeMap; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js +var require_mergeMapTo = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeMapTo = void 0; + var mergeMap_1 = require_mergeMap(); + var isFunction_1 = require_isFunction(); + function mergeMapTo(innerObservable, resultSelector, concurrent) { + if (concurrent === void 0) { + concurrent = Infinity; + } + if (isFunction_1.isFunction(resultSelector)) { + return mergeMap_1.mergeMap(function() { + return innerObservable; + }, resultSelector, concurrent); + } + if (typeof resultSelector === "number") { + concurrent = resultSelector; + } + return mergeMap_1.mergeMap(function() { + return innerObservable; + }, concurrent); + } + exports2.mergeMapTo = mergeMapTo; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js +var require_mergeScan = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeScan = void 0; + var lift_1 = require_lift(); + var mergeInternals_1 = require_mergeInternals(); + function mergeScan(accumulator, seed, concurrent) { + if (concurrent === void 0) { + concurrent = Infinity; + } + return lift_1.operate(function(source, subscriber) { + var state = seed; + return mergeInternals_1.mergeInternals(source, subscriber, function(value, index) { + return accumulator(state, value, index); + }, concurrent, function(value) { + state = value; + }, false, void 0, function() { + return state = null; + }); + }); + } + exports2.mergeScan = mergeScan; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/merge.js +var require_merge2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/merge.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.merge = void 0; + var lift_1 = require_lift(); + var argsOrArgArray_1 = require_argsOrArgArray(); + var fromArray_1 = require_fromArray(); + var mergeAll_1 = require_mergeAll(); + var args_1 = require_args(); + function merge() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(args2); + var concurrent = args_1.popNumber(args2, Infinity); + args2 = argsOrArgArray_1.argsOrArgArray(args2); + return lift_1.operate(function(source, subscriber) { + mergeAll_1.mergeAll(concurrent)(fromArray_1.internalFromArray(__spreadArray([source], __read(args2)), scheduler)).subscribe(subscriber); + }); + } + exports2.merge = merge; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js +var require_mergeWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeWith = void 0; + var merge_1 = require_merge2(); + function mergeWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return merge_1.merge.apply(void 0, __spreadArray([], __read(otherSources))); + } + exports2.mergeWith = mergeWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/min.js +var require_min = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/min.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.min = void 0; + var reduce_1 = require_reduce(); + var isFunction_1 = require_isFunction(); + function min(comparer) { + return reduce_1.reduce(isFunction_1.isFunction(comparer) ? function(x, y) { + return comparer(x, y) < 0 ? x : y; + } : function(x, y) { + return x < y ? x : y; + }); + } + exports2.min = min; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/multicast.js +var require_multicast = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/multicast.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multicast = void 0; + var ConnectableObservable_1 = require_ConnectableObservable(); + var isFunction_1 = require_isFunction(); + var connect_1 = require_connect(); + function multicast(subjectOrSubjectFactory, selector) { + var subjectFactory = isFunction_1.isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : function() { + return subjectOrSubjectFactory; + }; + if (isFunction_1.isFunction(selector)) { + return connect_1.connect(selector, { + connector: subjectFactory + }); + } + return function(source) { + return new ConnectableObservable_1.ConnectableObservable(source, subjectFactory); + }; + } + exports2.multicast = multicast; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js +var require_pairwise = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pairwise = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function pairwise() { + return lift_1.operate(function(source, subscriber) { + var prev; + var hasPrev = false; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var p = prev; + prev = value; + hasPrev && subscriber.next([p, value]); + hasPrev = true; + })); + }); + } + exports2.pairwise = pairwise; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/pluck.js +var require_pluck = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/pluck.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pluck = void 0; + var map_1 = require_map(); + function pluck() { + var properties = []; + for (var _i = 0; _i < arguments.length; _i++) { + properties[_i] = arguments[_i]; + } + var length = properties.length; + if (length === 0) { + throw new Error("list of properties cannot be empty."); + } + return map_1.map(function(x) { + var currentProp = x; + for (var i = 0; i < length; i++) { + var p = currentProp === null || currentProp === void 0 ? void 0 : currentProp[properties[i]]; + if (typeof p !== "undefined") { + currentProp = p; + } else { + return void 0; + } + } + return currentProp; + }); + } + exports2.pluck = pluck; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/publish.js +var require_publish = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/publish.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.publish = void 0; + var Subject_1 = require_Subject(); + var multicast_1 = require_multicast(); + var connect_1 = require_connect(); + function publish(selector) { + return selector ? function(source) { + return connect_1.connect(selector)(source); + } : function(source) { + return multicast_1.multicast(new Subject_1.Subject())(source); + }; + } + exports2.publish = publish; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js +var require_publishBehavior = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.publishBehavior = void 0; + var BehaviorSubject_1 = require_BehaviorSubject(); + var ConnectableObservable_1 = require_ConnectableObservable(); + function publishBehavior(initialValue) { + return function(source) { + var subject = new BehaviorSubject_1.BehaviorSubject(initialValue); + return new ConnectableObservable_1.ConnectableObservable(source, function() { + return subject; + }); + }; + } + exports2.publishBehavior = publishBehavior; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/publishLast.js +var require_publishLast = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/publishLast.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.publishLast = void 0; + var AsyncSubject_1 = require_AsyncSubject(); + var ConnectableObservable_1 = require_ConnectableObservable(); + function publishLast() { + return function(source) { + var subject = new AsyncSubject_1.AsyncSubject(); + return new ConnectableObservable_1.ConnectableObservable(source, function() { + return subject; + }); + }; + } + exports2.publishLast = publishLast; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js +var require_publishReplay = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.publishReplay = void 0; + var ReplaySubject_1 = require_ReplaySubject(); + var multicast_1 = require_multicast(); + var isFunction_1 = require_isFunction(); + function publishReplay(bufferSize, windowTime, selectorOrScheduler, timestampProvider) { + if (selectorOrScheduler && !isFunction_1.isFunction(selectorOrScheduler)) { + timestampProvider = selectorOrScheduler; + } + var selector = isFunction_1.isFunction(selectorOrScheduler) ? selectorOrScheduler : void 0; + return function(source) { + return multicast_1.multicast(new ReplaySubject_1.ReplaySubject(bufferSize, windowTime, timestampProvider), selector)(source); + }; + } + exports2.publishReplay = publishReplay; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/raceWith.js +var require_raceWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/raceWith.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.raceWith = void 0; + var race_1 = require_race(); + var lift_1 = require_lift(); + var identity_1 = require_identity(); + function raceWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return !otherSources.length ? identity_1.identity : lift_1.operate(function(source, subscriber) { + race_1.raceInit(__spreadArray([source], __read(otherSources)))(subscriber); + }); + } + exports2.raceWith = raceWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/repeat.js +var require_repeat = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/repeat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.repeat = void 0; + var empty_1 = require_empty(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function repeat(count) { + if (count === void 0) { + count = Infinity; + } + return count <= 0 ? function() { + return empty_1.EMPTY; + } : lift_1.operate(function(source, subscriber) { + var soFar = 0; + var innerSub; + var subscribeForRepeat = function() { + var syncUnsub = false; + innerSub = source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, void 0, function() { + if (++soFar < count) { + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRepeat(); + } else { + syncUnsub = true; + } + } else { + subscriber.complete(); + } + })); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRepeat(); + } + }; + subscribeForRepeat(); + }); + } + exports2.repeat = repeat; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js +var require_repeatWhen = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.repeatWhen = void 0; + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function repeatWhen(notifier) { + return lift_1.operate(function(source, subscriber) { + var innerSub; + var syncResub = false; + var completions$; + var isNotifierComplete = false; + var isMainComplete = false; + var checkComplete = function() { + return isMainComplete && isNotifierComplete && (subscriber.complete(), true); + }; + var getCompletionSubject = function() { + if (!completions$) { + completions$ = new Subject_1.Subject(); + notifier(completions$).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function() { + if (innerSub) { + subscribeForRepeatWhen(); + } else { + syncResub = true; + } + }, function() { + isNotifierComplete = true; + checkComplete(); + })); + } + return completions$; + }; + var subscribeForRepeatWhen = function() { + isMainComplete = false; + innerSub = source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, void 0, function() { + isMainComplete = true; + !checkComplete() && getCompletionSubject().next(); + })); + if (syncResub) { + innerSub.unsubscribe(); + innerSub = null; + syncResub = false; + subscribeForRepeatWhen(); + } + }; + subscribeForRepeatWhen(); + }); + } + exports2.repeatWhen = repeatWhen; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/retry.js +var require_retry = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/retry.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retry = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var identity_1 = require_identity(); + var timer_1 = require_timer2(); + var from_1 = require_from2(); + function retry(configOrCount) { + if (configOrCount === void 0) { + configOrCount = Infinity; + } + var config; + if (configOrCount && typeof configOrCount === "object") { + config = configOrCount; + } else { + config = { + count: configOrCount + }; + } + var _a = config.count, count = _a === void 0 ? Infinity : _a, delay = config.delay, _b = config.resetOnSuccess, resetOnSuccess = _b === void 0 ? false : _b; + return count <= 0 ? identity_1.identity : lift_1.operate(function(source, subscriber) { + var soFar = 0; + var innerSub; + var subscribeForRetry = function() { + var syncUnsub = false; + innerSub = source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + if (resetOnSuccess) { + soFar = 0; + } + subscriber.next(value); + }, void 0, function(err) { + if (soFar++ < count) { + var resub_1 = function() { + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } else { + syncUnsub = true; + } + }; + if (delay != null) { + var notifier = typeof delay === "number" ? timer_1.timer(delay) : from_1.innerFrom(delay(err, soFar)); + var notifierSubscriber_1 = new OperatorSubscriber_1.OperatorSubscriber(subscriber, function() { + notifierSubscriber_1.unsubscribe(); + resub_1(); + }, function() { + subscriber.complete(); + }); + notifier.subscribe(notifierSubscriber_1); + } else { + resub_1(); + } + } else { + subscriber.error(err); + } + })); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } + }; + subscribeForRetry(); + }); + } + exports2.retry = retry; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js +var require_retryWhen = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryWhen = void 0; + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function retryWhen(notifier) { + return lift_1.operate(function(source, subscriber) { + var innerSub; + var syncResub = false; + var errors$; + var subscribeForRetryWhen = function() { + innerSub = source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, void 0, void 0, function(err) { + if (!errors$) { + errors$ = new Subject_1.Subject(); + notifier(errors$).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function() { + return innerSub ? subscribeForRetryWhen() : syncResub = true; + })); + } + if (errors$) { + errors$.next(err); + } + })); + if (syncResub) { + innerSub.unsubscribe(); + innerSub = null; + syncResub = false; + subscribeForRetryWhen(); + } + }; + subscribeForRetryWhen(); + }); + } + exports2.retryWhen = retryWhen; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/sample.js +var require_sample = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/sample.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sample = void 0; + var lift_1 = require_lift(); + var noop_1 = require_noop(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function sample(notifier) { + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + var lastValue = null; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + hasValue = true; + lastValue = value; + })); + var emit = function() { + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }; + notifier.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, emit, noop_1.noop)); + }); + } + exports2.sample = sample; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js +var require_sampleTime = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sampleTime = void 0; + var async_1 = require_async(); + var sample_1 = require_sample(); + var interval_1 = require_interval(); + function sampleTime(period, scheduler) { + if (scheduler === void 0) { + scheduler = async_1.asyncScheduler; + } + return sample_1.sample(interval_1.interval(period, scheduler)); + } + exports2.sampleTime = sampleTime; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/scan.js +var require_scan = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/scan.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scan = void 0; + var lift_1 = require_lift(); + var scanInternals_1 = require_scanInternals(); + function scan(accumulator, seed) { + return lift_1.operate(scanInternals_1.scanInternals(accumulator, seed, arguments.length >= 2, true)); + } + exports2.scan = scan; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js +var require_sequenceEqual = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sequenceEqual = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function sequenceEqual(compareTo, comparator) { + if (comparator === void 0) { + comparator = function(a, b) { + return a === b; + }; + } + return lift_1.operate(function(source, subscriber) { + var aState = createState(); + var bState = createState(); + var emit = function(isEqual) { + subscriber.next(isEqual); + subscriber.complete(); + }; + var createSubscriber = function(selfState, otherState) { + var sequenceEqualSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(a) { + var buffer = otherState.buffer, complete = otherState.complete; + if (buffer.length === 0) { + complete ? emit(false) : selfState.buffer.push(a); + } else { + !comparator(a, buffer.shift()) && emit(false); + } + }, function() { + selfState.complete = true; + var complete = otherState.complete, buffer = otherState.buffer; + complete && emit(buffer.length === 0); + sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe(); + }); + return sequenceEqualSubscriber; + }; + source.subscribe(createSubscriber(aState, bState)); + compareTo.subscribe(createSubscriber(bState, aState)); + }); + } + exports2.sequenceEqual = sequenceEqual; + function createState() { + return { + buffer: [], + complete: false + }; + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/share.js +var require_share = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/share.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.share = void 0; + var from_1 = require_from2(); + var take_1 = require_take(); + var Subject_1 = require_Subject(); + var Subscriber_1 = require_Subscriber(); + var lift_1 = require_lift(); + function share(options) { + if (options === void 0) { + options = {}; + } + var _a = options.connector, connector = _a === void 0 ? function() { + return new Subject_1.Subject(); + } : _a, _b = options.resetOnError, resetOnError = _b === void 0 ? true : _b, _c = options.resetOnComplete, resetOnComplete = _c === void 0 ? true : _c, _d = options.resetOnRefCountZero, resetOnRefCountZero = _d === void 0 ? true : _d; + return function(wrapperSource) { + var connection = null; + var resetConnection = null; + var subject = null; + var refCount = 0; + var hasCompleted = false; + var hasErrored = false; + var cancelReset = function() { + resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe(); + resetConnection = null; + }; + var reset = function() { + cancelReset(); + connection = subject = null; + hasCompleted = hasErrored = false; + }; + var resetAndUnsubscribe = function() { + var conn = connection; + reset(); + conn === null || conn === void 0 ? void 0 : conn.unsubscribe(); + }; + return lift_1.operate(function(source, subscriber) { + refCount++; + if (!hasErrored && !hasCompleted) { + cancelReset(); + } + var dest = subject = subject !== null && subject !== void 0 ? subject : connector(); + subscriber.add(function() { + refCount--; + if (refCount === 0 && !hasErrored && !hasCompleted) { + resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero); + } + }); + dest.subscribe(subscriber); + if (!connection) { + connection = new Subscriber_1.SafeSubscriber({ + next: function(value) { + return dest.next(value); + }, + error: function(err) { + hasErrored = true; + cancelReset(); + resetConnection = handleReset(reset, resetOnError, err); + dest.error(err); + }, + complete: function() { + hasCompleted = true; + cancelReset(); + resetConnection = handleReset(reset, resetOnComplete); + dest.complete(); + } + }); + from_1.from(source).subscribe(connection); + } + })(wrapperSource); + }; + } + exports2.share = share; + function handleReset(reset, on) { + var args2 = []; + for (var _i = 2; _i < arguments.length; _i++) { + args2[_i - 2] = arguments[_i]; + } + if (on === true) { + reset(); + return null; + } + if (on === false) { + return null; + } + return on.apply(void 0, __spreadArray([], __read(args2))).pipe(take_1.take(1)).subscribe(function() { + return reset(); + }); + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js +var require_shareReplay = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.shareReplay = void 0; + var ReplaySubject_1 = require_ReplaySubject(); + var share_1 = require_share(); + function shareReplay(configOrBufferSize, windowTime, scheduler) { + var _a, _b; + var bufferSize; + var refCount = false; + if (configOrBufferSize && typeof configOrBufferSize === "object") { + bufferSize = (_a = configOrBufferSize.bufferSize) !== null && _a !== void 0 ? _a : Infinity; + windowTime = (_b = configOrBufferSize.windowTime) !== null && _b !== void 0 ? _b : Infinity; + refCount = !!configOrBufferSize.refCount; + scheduler = configOrBufferSize.scheduler; + } else { + bufferSize = configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity; + } + return share_1.share({ + connector: function() { + return new ReplaySubject_1.ReplaySubject(bufferSize, windowTime, scheduler); + }, + resetOnError: true, + resetOnComplete: false, + resetOnRefCountZero: refCount + }); + } + exports2.shareReplay = shareReplay; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/single.js +var require_single = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/single.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.single = void 0; + var EmptyError_1 = require_EmptyError(); + var SequenceError_1 = require_SequenceError(); + var NotFoundError_1 = require_NotFoundError(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function single(predicate) { + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + var singleValue; + var seenValue = false; + var index = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + seenValue = true; + if (!predicate || predicate(value, index++, source)) { + hasValue && subscriber.error(new SequenceError_1.SequenceError("Too many matching values")); + hasValue = true; + singleValue = value; + } + }, function() { + if (hasValue) { + subscriber.next(singleValue); + subscriber.complete(); + } else { + subscriber.error(seenValue ? new NotFoundError_1.NotFoundError("No matching values") : new EmptyError_1.EmptyError()); + } + })); + }); + } + exports2.single = single; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/skip.js +var require_skip = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/skip.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.skip = void 0; + var filter_1 = require_filter(); + function skip(count) { + return filter_1.filter(function(_, index) { + return count <= index; + }); + } + exports2.skip = skip; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js +var require_skipLast = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.skipLast = void 0; + var identity_1 = require_identity(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function skipLast(skipCount) { + return skipCount <= 0 ? identity_1.identity : lift_1.operate(function(source, subscriber) { + var ring = new Array(skipCount); + var seen = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var valueIndex = seen++; + if (valueIndex < skipCount) { + ring[valueIndex] = value; + } else { + var index = valueIndex % skipCount; + var oldValue = ring[index]; + ring[index] = value; + subscriber.next(oldValue); + } + })); + return function() { + ring = null; + }; + }); + } + exports2.skipLast = skipLast; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js +var require_skipUntil = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.skipUntil = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var from_1 = require_from2(); + var noop_1 = require_noop(); + function skipUntil(notifier) { + return lift_1.operate(function(source, subscriber) { + var taking = false; + var skipSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, function() { + skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe(); + taking = true; + }, noop_1.noop); + from_1.innerFrom(notifier).subscribe(skipSubscriber); + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + return taking && subscriber.next(value); + })); + }); + } + exports2.skipUntil = skipUntil; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js +var require_skipWhile = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.skipWhile = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function skipWhile(predicate) { + return lift_1.operate(function(source, subscriber) { + var taking = false; + var index = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + return (taking || (taking = !predicate(value, index++))) && subscriber.next(value); + })); + }); + } + exports2.skipWhile = skipWhile; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/startWith.js +var require_startWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/startWith.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.startWith = void 0; + var concat_1 = require_concat(); + var args_1 = require_args(); + var lift_1 = require_lift(); + function startWith() { + var values = []; + for (var _i = 0; _i < arguments.length; _i++) { + values[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(values); + return lift_1.operate(function(source, subscriber) { + (scheduler ? concat_1.concat(values, source, scheduler) : concat_1.concat(values, source)).subscribe(subscriber); + }); + } + exports2.startWith = startWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js +var require_switchMap = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.switchMap = void 0; + var from_1 = require_from2(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function switchMap(project, resultSelector) { + return lift_1.operate(function(source, subscriber) { + var innerSubscriber = null; + var index = 0; + var isComplete = false; + var checkComplete = function() { + return isComplete && !innerSubscriber && subscriber.complete(); + }; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); + var innerIndex = 0; + var outerIndex = index++; + from_1.innerFrom(project(value, outerIndex)).subscribe(innerSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(innerValue) { + return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); + }, function() { + innerSubscriber = null; + checkComplete(); + })); + }, function() { + isComplete = true; + checkComplete(); + })); + }); + } + exports2.switchMap = switchMap; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/switchAll.js +var require_switchAll = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/switchAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.switchAll = void 0; + var switchMap_1 = require_switchMap(); + var identity_1 = require_identity(); + function switchAll() { + return switchMap_1.switchMap(identity_1.identity); + } + exports2.switchAll = switchAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js +var require_switchMapTo = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.switchMapTo = void 0; + var switchMap_1 = require_switchMap(); + var isFunction_1 = require_isFunction(); + function switchMapTo(innerObservable, resultSelector) { + return isFunction_1.isFunction(resultSelector) ? switchMap_1.switchMap(function() { + return innerObservable; + }, resultSelector) : switchMap_1.switchMap(function() { + return innerObservable; + }); + } + exports2.switchMapTo = switchMapTo; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/switchScan.js +var require_switchScan = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/switchScan.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.switchScan = void 0; + var switchMap_1 = require_switchMap(); + var lift_1 = require_lift(); + function switchScan(accumulator, seed) { + return lift_1.operate(function(source, subscriber) { + var state = seed; + switchMap_1.switchMap(function(value, index) { + return accumulator(state, value, index); + }, function(_, innerValue) { + return state = innerValue, innerValue; + })(source).subscribe(subscriber); + return function() { + state = null; + }; + }); + } + exports2.switchScan = switchScan; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js +var require_takeUntil = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.takeUntil = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var from_1 = require_from2(); + var noop_1 = require_noop(); + function takeUntil(notifier) { + return lift_1.operate(function(source, subscriber) { + from_1.innerFrom(notifier).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function() { + return subscriber.complete(); + }, noop_1.noop)); + !subscriber.closed && source.subscribe(subscriber); + }); + } + exports2.takeUntil = takeUntil; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js +var require_takeWhile = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.takeWhile = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function takeWhile(predicate, inclusive) { + if (inclusive === void 0) { + inclusive = false; + } + return lift_1.operate(function(source, subscriber) { + var index = 0; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var result = predicate(value, index++); + (result || inclusive) && subscriber.next(value); + !result && subscriber.complete(); + })); + }); + } + exports2.takeWhile = takeWhile; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/tap.js +var require_tap = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/tap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tap = void 0; + var isFunction_1 = require_isFunction(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var identity_1 = require_identity(); + function tap(observerOrNext, error, complete) { + var tapObserver = isFunction_1.isFunction(observerOrNext) || error || complete ? { next: observerOrNext, error, complete } : observerOrNext; + return tapObserver ? lift_1.operate(function(source, subscriber) { + var _a; + (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); + var isUnsub = true; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var _a2; + (_a2 = tapObserver.next) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver, value); + subscriber.next(value); + }, function() { + var _a2; + isUnsub = false; + (_a2 = tapObserver.complete) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver); + subscriber.complete(); + }, function(err) { + var _a2; + isUnsub = false; + (_a2 = tapObserver.error) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver, err); + subscriber.error(err); + }, function() { + var _a2, _b; + if (isUnsub) { + (_a2 = tapObserver.unsubscribe) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver); + } + (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver); + })); + }) : identity_1.identity; + } + exports2.tap = tap; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/throttle.js +var require_throttle = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/throttle.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throttle = exports2.defaultThrottleConfig = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var from_1 = require_from2(); + exports2.defaultThrottleConfig = { + leading: true, + trailing: false + }; + function throttle(durationSelector, _a) { + var _b = _a === void 0 ? exports2.defaultThrottleConfig : _a, leading = _b.leading, trailing = _b.trailing; + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + var sendValue = null; + var throttled = null; + var isComplete = false; + var endThrottling = function() { + throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe(); + throttled = null; + if (trailing) { + send(); + isComplete && subscriber.complete(); + } + }; + var cleanupThrottling = function() { + throttled = null; + isComplete && subscriber.complete(); + }; + var startThrottle = function(value) { + return throttled = from_1.innerFrom(durationSelector(value)).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, endThrottling, cleanupThrottling)); + }; + var send = function() { + if (hasValue) { + hasValue = false; + var value = sendValue; + sendValue = null; + subscriber.next(value); + !isComplete && startThrottle(value); + } + }; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + hasValue = true; + sendValue = value; + !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value)); + }, function() { + isComplete = true; + !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete(); + })); + }); + } + exports2.throttle = throttle; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js +var require_throttleTime = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throttleTime = void 0; + var async_1 = require_async(); + var throttle_1 = require_throttle(); + var timer_1 = require_timer2(); + function throttleTime(duration, scheduler, config) { + if (scheduler === void 0) { + scheduler = async_1.asyncScheduler; + } + if (config === void 0) { + config = throttle_1.defaultThrottleConfig; + } + var duration$ = timer_1.timer(duration, scheduler); + return throttle_1.throttle(function() { + return duration$; + }, config); + } + exports2.throttleTime = throttleTime; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js +var require_timeInterval = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TimeInterval = exports2.timeInterval = void 0; + var async_1 = require_async(); + var scan_1 = require_scan(); + var defer_1 = require_defer(); + var map_1 = require_map(); + function timeInterval(scheduler) { + if (scheduler === void 0) { + scheduler = async_1.async; + } + return function(source) { + return defer_1.defer(function() { + return source.pipe(scan_1.scan(function(_a, value) { + var current = _a.current; + return { value, current: scheduler.now(), last: current }; + }, { + current: scheduler.now(), + value: void 0, + last: void 0 + }), map_1.map(function(_a) { + var current = _a.current, last = _a.last, value = _a.value; + return new TimeInterval(value, current - last); + })); + }); + }; + } + exports2.timeInterval = timeInterval; + var TimeInterval = function() { + function TimeInterval2(value, interval) { + this.value = value; + this.interval = interval; + } + return TimeInterval2; + }(); + exports2.TimeInterval = TimeInterval; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js +var require_timeoutWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.timeoutWith = void 0; + var async_1 = require_async(); + var isDate_1 = require_isDate(); + var timeout_1 = require_timeout(); + function timeoutWith(due, withObservable, scheduler) { + var first; + var each; + var _with; + scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async_1.async; + if (isDate_1.isValidDate(due)) { + first = due; + } else if (typeof due === "number") { + each = due; + } + if (withObservable) { + _with = function() { + return withObservable; + }; + } else { + throw new TypeError("No observable provided to switch to"); + } + if (first == null && each == null) { + throw new TypeError("No timeout provided."); + } + return timeout_1.timeout({ + first, + each, + scheduler, + with: _with + }); + } + exports2.timeoutWith = timeoutWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/timestamp.js +var require_timestamp = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/timestamp.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.timestamp = void 0; + var dateTimestampProvider_1 = require_dateTimestampProvider(); + var map_1 = require_map(); + function timestamp(timestampProvider) { + if (timestampProvider === void 0) { + timestampProvider = dateTimestampProvider_1.dateTimestampProvider; + } + return map_1.map(function(value) { + return { value, timestamp: timestampProvider.now() }; + }); + } + exports2.timestamp = timestamp; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/window.js +var require_window = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/window.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.window = void 0; + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop(); + function window2(windowBoundaries) { + return lift_1.operate(function(source, subscriber) { + var windowSubject = new Subject_1.Subject(); + subscriber.next(windowSubject.asObservable()); + var errorHandler = function(err) { + windowSubject.error(err); + subscriber.error(err); + }; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + return windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value); + }, function() { + windowSubject.complete(); + subscriber.complete(); + }, errorHandler)); + windowBoundaries.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function() { + windowSubject.complete(); + subscriber.next(windowSubject = new Subject_1.Subject()); + }, noop_1.noop, errorHandler)); + return function() { + windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe(); + windowSubject = null; + }; + }); + } + exports2.window = window2; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js +var require_windowCount = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js"(exports2) { + "use strict"; + var __values = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.windowCount = void 0; + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function windowCount(windowSize, startWindowEvery) { + if (startWindowEvery === void 0) { + startWindowEvery = 0; + } + var startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize; + return lift_1.operate(function(source, subscriber) { + var windows = [new Subject_1.Subject()]; + var starts = []; + var count = 0; + subscriber.next(windows[0].asObservable()); + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var e_1, _a; + try { + for (var windows_1 = __values(windows), windows_1_1 = windows_1.next(); !windows_1_1.done; windows_1_1 = windows_1.next()) { + var window_1 = windows_1_1.value; + window_1.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (windows_1_1 && !windows_1_1.done && (_a = windows_1.return)) + _a.call(windows_1); + } finally { + if (e_1) + throw e_1.error; + } + } + var c = count - windowSize + 1; + if (c >= 0 && c % startEvery === 0) { + windows.shift().complete(); + } + if (++count % startEvery === 0) { + var window_2 = new Subject_1.Subject(); + windows.push(window_2); + subscriber.next(window_2.asObservable()); + } + }, function() { + while (windows.length > 0) { + windows.shift().complete(); + } + subscriber.complete(); + }, function(err) { + while (windows.length > 0) { + windows.shift().error(err); + } + subscriber.error(err); + }, function() { + starts = null; + windows = null; + })); + }); + } + exports2.windowCount = windowCount; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js +var require_windowTime = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.windowTime = void 0; + var Subject_1 = require_Subject(); + var async_1 = require_async(); + var Subscription_1 = require_Subscription(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var arrRemove_1 = require_arrRemove(); + var args_1 = require_args(); + function windowTime(windowTimeSpan) { + var _a, _b; + var otherArgs = []; + for (var _i = 1; _i < arguments.length; _i++) { + otherArgs[_i - 1] = arguments[_i]; + } + var scheduler = (_a = args_1.popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : async_1.asyncScheduler; + var windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + var maxWindowSize = otherArgs[1] || Infinity; + return lift_1.operate(function(source, subscriber) { + var windowRecords = []; + var restartOnClose = false; + var closeWindow = function(record) { + var window2 = record.window, subs = record.subs; + window2.complete(); + subs.unsubscribe(); + arrRemove_1.arrRemove(windowRecords, record); + restartOnClose && startWindow(); + }; + var startWindow = function() { + if (windowRecords) { + var subs = new Subscription_1.Subscription(); + subscriber.add(subs); + var window_1 = new Subject_1.Subject(); + var record_1 = { + window: window_1, + subs, + seen: 0 + }; + windowRecords.push(record_1); + subscriber.next(window_1.asObservable()); + subs.add(scheduler.schedule(function() { + return closeWindow(record_1); + }, windowTimeSpan)); + } + }; + windowCreationInterval !== null && windowCreationInterval >= 0 ? subscriber.add(scheduler.schedule(function() { + startWindow(); + !this.closed && subscriber.add(this.schedule(null, windowCreationInterval)); + }, windowCreationInterval)) : restartOnClose = true; + startWindow(); + var loop = function(cb) { + return windowRecords.slice().forEach(cb); + }; + var terminate = function(cb) { + loop(function(_a2) { + var window2 = _a2.window; + return cb(window2); + }); + cb(subscriber); + subscriber.unsubscribe(); + }; + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + loop(function(record) { + record.window.next(value); + maxWindowSize <= ++record.seen && closeWindow(record); + }); + }, function() { + return terminate(function(consumer) { + return consumer.complete(); + }); + }, function(err) { + return terminate(function(consumer) { + return consumer.error(err); + }); + })); + return function() { + windowRecords = null; + }; + }); + } + exports2.windowTime = windowTime; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js +var require_windowToggle = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js"(exports2) { + "use strict"; + var __values = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.windowToggle = void 0; + var Subject_1 = require_Subject(); + var Subscription_1 = require_Subscription(); + var lift_1 = require_lift(); + var from_1 = require_from2(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop(); + var arrRemove_1 = require_arrRemove(); + function windowToggle(openings, closingSelector) { + return lift_1.operate(function(source, subscriber) { + var windows = []; + var handleError = function(err) { + while (0 < windows.length) { + windows.shift().error(err); + } + subscriber.error(err); + }; + from_1.innerFrom(openings).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(openValue) { + var window2 = new Subject_1.Subject(); + windows.push(window2); + var closingSubscription = new Subscription_1.Subscription(); + var closeWindow = function() { + arrRemove_1.arrRemove(windows, window2); + window2.complete(); + closingSubscription.unsubscribe(); + }; + var closingNotifier; + try { + closingNotifier = from_1.innerFrom(closingSelector(openValue)); + } catch (err) { + handleError(err); + return; + } + subscriber.next(window2.asObservable()); + closingSubscription.add(closingNotifier.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, closeWindow, noop_1.noop, handleError))); + }, noop_1.noop)); + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + var e_1, _a; + var windowsCopy = windows.slice(); + try { + for (var windowsCopy_1 = __values(windowsCopy), windowsCopy_1_1 = windowsCopy_1.next(); !windowsCopy_1_1.done; windowsCopy_1_1 = windowsCopy_1.next()) { + var window_1 = windowsCopy_1_1.value; + window_1.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (windowsCopy_1_1 && !windowsCopy_1_1.done && (_a = windowsCopy_1.return)) + _a.call(windowsCopy_1); + } finally { + if (e_1) + throw e_1.error; + } + } + }, function() { + while (0 < windows.length) { + windows.shift().complete(); + } + subscriber.complete(); + }, handleError, function() { + while (0 < windows.length) { + windows.shift().unsubscribe(); + } + })); + }); + } + exports2.windowToggle = windowToggle; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js +var require_windowWhen = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.windowWhen = void 0; + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var from_1 = require_from2(); + function windowWhen(closingSelector) { + return lift_1.operate(function(source, subscriber) { + var window2; + var closingSubscriber; + var handleError = function(err) { + window2.error(err); + subscriber.error(err); + }; + var openWindow = function() { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + window2 === null || window2 === void 0 ? void 0 : window2.complete(); + window2 = new Subject_1.Subject(); + subscriber.next(window2.asObservable()); + var closingNotifier; + try { + closingNotifier = from_1.innerFrom(closingSelector()); + } catch (err) { + handleError(err); + return; + } + closingNotifier.subscribe(closingSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, openWindow, openWindow, handleError)); + }; + openWindow(); + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + return window2.next(value); + }, function() { + window2.complete(); + subscriber.complete(); + }, handleError, function() { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + window2 = null; + })); + }); + } + exports2.windowWhen = windowWhen; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js +var require_withLatestFrom = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.withLatestFrom = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var from_1 = require_from2(); + var identity_1 = require_identity(); + var noop_1 = require_noop(); + var args_1 = require_args(); + function withLatestFrom() { + var inputs = []; + for (var _i = 0; _i < arguments.length; _i++) { + inputs[_i] = arguments[_i]; + } + var project = args_1.popResultSelector(inputs); + return lift_1.operate(function(source, subscriber) { + var len = inputs.length; + var otherValues = new Array(len); + var hasValue = inputs.map(function() { + return false; + }); + var ready = false; + var _loop_1 = function(i2) { + from_1.innerFrom(inputs[i2]).subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + otherValues[i2] = value; + if (!ready && !hasValue[i2]) { + hasValue[i2] = true; + (ready = hasValue.every(identity_1.identity)) && (hasValue = null); + } + }, noop_1.noop)); + }; + for (var i = 0; i < len; i++) { + _loop_1(i); + } + source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + if (ready) { + var values = __spreadArray([value], __read(otherValues)); + subscriber.next(project ? project.apply(void 0, __spreadArray([], __read(values))) : values); + } + })); + }); + } + exports2.withLatestFrom = withLatestFrom; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/zipAll.js +var require_zipAll = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/zipAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.zipAll = void 0; + var zip_1 = require_zip(); + var joinAllInternals_1 = require_joinAllInternals(); + function zipAll(project) { + return joinAllInternals_1.joinAllInternals(zip_1.zip, project); + } + exports2.zipAll = zipAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/zip.js +var require_zip2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/zip.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.zip = void 0; + var zip_1 = require_zip(); + var lift_1 = require_lift(); + function zip() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + return lift_1.operate(function(source, subscriber) { + zip_1.zip.apply(void 0, __spreadArray([source], __read(sources))).subscribe(subscriber); + }); + } + exports2.zip = zip; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/zipWith.js +var require_zipWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/zipWith.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.zipWith = void 0; + var zip_1 = require_zip2(); + function zipWith() { + var otherInputs = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherInputs[_i] = arguments[_i]; + } + return zip_1.zip.apply(void 0, __spreadArray([], __read(otherInputs))); + } + exports2.zipWith = zipWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/index.js +var require_cjs = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.interval = exports2.iif = exports2.generate = exports2.fromEventPattern = exports2.fromEvent = exports2.from = exports2.forkJoin = exports2.empty = exports2.defer = exports2.connectable = exports2.concat = exports2.combineLatest = exports2.bindNodeCallback = exports2.bindCallback = exports2.UnsubscriptionError = exports2.TimeoutError = exports2.SequenceError = exports2.ObjectUnsubscribedError = exports2.NotFoundError = exports2.EmptyError = exports2.ArgumentOutOfRangeError = exports2.firstValueFrom = exports2.lastValueFrom = exports2.isObservable = exports2.identity = exports2.noop = exports2.pipe = exports2.NotificationKind = exports2.Notification = exports2.Subscriber = exports2.Subscription = exports2.Scheduler = exports2.VirtualAction = exports2.VirtualTimeScheduler = exports2.animationFrameScheduler = exports2.animationFrame = exports2.queueScheduler = exports2.queue = exports2.asyncScheduler = exports2.async = exports2.asapScheduler = exports2.asap = exports2.AsyncSubject = exports2.ReplaySubject = exports2.BehaviorSubject = exports2.Subject = exports2.animationFrames = exports2.observable = exports2.ConnectableObservable = exports2.Observable = void 0; + exports2.filter = exports2.expand = exports2.exhaustMap = exports2.exhaustAll = exports2.exhaust = exports2.every = exports2.endWith = exports2.elementAt = exports2.distinctUntilKeyChanged = exports2.distinctUntilChanged = exports2.distinct = exports2.dematerialize = exports2.delayWhen = exports2.delay = exports2.defaultIfEmpty = exports2.debounceTime = exports2.debounce = exports2.count = exports2.connect = exports2.concatWith = exports2.concatMapTo = exports2.concatMap = exports2.concatAll = exports2.combineLatestWith = exports2.combineLatestAll = exports2.combineAll = exports2.catchError = exports2.bufferWhen = exports2.bufferToggle = exports2.bufferTime = exports2.bufferCount = exports2.buffer = exports2.auditTime = exports2.audit = exports2.config = exports2.NEVER = exports2.EMPTY = exports2.scheduled = exports2.zip = exports2.using = exports2.timer = exports2.throwError = exports2.range = exports2.race = exports2.partition = exports2.pairs = exports2.onErrorResumeNext = exports2.of = exports2.never = exports2.merge = void 0; + exports2.switchMapTo = exports2.switchMap = exports2.switchAll = exports2.subscribeOn = exports2.startWith = exports2.skipWhile = exports2.skipUntil = exports2.skipLast = exports2.skip = exports2.single = exports2.shareReplay = exports2.share = exports2.sequenceEqual = exports2.scan = exports2.sampleTime = exports2.sample = exports2.refCount = exports2.retryWhen = exports2.retry = exports2.repeatWhen = exports2.repeat = exports2.reduce = exports2.raceWith = exports2.publishReplay = exports2.publishLast = exports2.publishBehavior = exports2.publish = exports2.pluck = exports2.pairwise = exports2.observeOn = exports2.multicast = exports2.min = exports2.mergeWith = exports2.mergeScan = exports2.mergeMapTo = exports2.mergeMap = exports2.flatMap = exports2.mergeAll = exports2.max = exports2.materialize = exports2.mapTo = exports2.map = exports2.last = exports2.isEmpty = exports2.ignoreElements = exports2.groupBy = exports2.first = exports2.findIndex = exports2.find = exports2.finalize = void 0; + exports2.zipWith = exports2.zipAll = exports2.withLatestFrom = exports2.windowWhen = exports2.windowToggle = exports2.windowTime = exports2.windowCount = exports2.window = exports2.toArray = exports2.timestamp = exports2.timeoutWith = exports2.timeout = exports2.timeInterval = exports2.throwIfEmpty = exports2.throttleTime = exports2.throttle = exports2.tap = exports2.takeWhile = exports2.takeUntil = exports2.takeLast = exports2.take = exports2.switchScan = void 0; + var Observable_1 = require_Observable(); + Object.defineProperty(exports2, "Observable", { enumerable: true, get: function() { + return Observable_1.Observable; + } }); + var ConnectableObservable_1 = require_ConnectableObservable(); + Object.defineProperty(exports2, "ConnectableObservable", { enumerable: true, get: function() { + return ConnectableObservable_1.ConnectableObservable; + } }); + var observable_1 = require_observable(); + Object.defineProperty(exports2, "observable", { enumerable: true, get: function() { + return observable_1.observable; + } }); + var animationFrames_1 = require_animationFrames(); + Object.defineProperty(exports2, "animationFrames", { enumerable: true, get: function() { + return animationFrames_1.animationFrames; + } }); + var Subject_1 = require_Subject(); + Object.defineProperty(exports2, "Subject", { enumerable: true, get: function() { + return Subject_1.Subject; + } }); + var BehaviorSubject_1 = require_BehaviorSubject(); + Object.defineProperty(exports2, "BehaviorSubject", { enumerable: true, get: function() { + return BehaviorSubject_1.BehaviorSubject; + } }); + var ReplaySubject_1 = require_ReplaySubject(); + Object.defineProperty(exports2, "ReplaySubject", { enumerable: true, get: function() { + return ReplaySubject_1.ReplaySubject; + } }); + var AsyncSubject_1 = require_AsyncSubject(); + Object.defineProperty(exports2, "AsyncSubject", { enumerable: true, get: function() { + return AsyncSubject_1.AsyncSubject; + } }); + var asap_1 = require_asap(); + Object.defineProperty(exports2, "asap", { enumerable: true, get: function() { + return asap_1.asap; + } }); + Object.defineProperty(exports2, "asapScheduler", { enumerable: true, get: function() { + return asap_1.asapScheduler; + } }); + var async_1 = require_async(); + Object.defineProperty(exports2, "async", { enumerable: true, get: function() { + return async_1.async; + } }); + Object.defineProperty(exports2, "asyncScheduler", { enumerable: true, get: function() { + return async_1.asyncScheduler; + } }); + var queue_1 = require_queue(); + Object.defineProperty(exports2, "queue", { enumerable: true, get: function() { + return queue_1.queue; + } }); + Object.defineProperty(exports2, "queueScheduler", { enumerable: true, get: function() { + return queue_1.queueScheduler; + } }); + var animationFrame_1 = require_animationFrame(); + Object.defineProperty(exports2, "animationFrame", { enumerable: true, get: function() { + return animationFrame_1.animationFrame; + } }); + Object.defineProperty(exports2, "animationFrameScheduler", { enumerable: true, get: function() { + return animationFrame_1.animationFrameScheduler; + } }); + var VirtualTimeScheduler_1 = require_VirtualTimeScheduler(); + Object.defineProperty(exports2, "VirtualTimeScheduler", { enumerable: true, get: function() { + return VirtualTimeScheduler_1.VirtualTimeScheduler; + } }); + Object.defineProperty(exports2, "VirtualAction", { enumerable: true, get: function() { + return VirtualTimeScheduler_1.VirtualAction; + } }); + var Scheduler_1 = require_Scheduler(); + Object.defineProperty(exports2, "Scheduler", { enumerable: true, get: function() { + return Scheduler_1.Scheduler; + } }); + var Subscription_1 = require_Subscription(); + Object.defineProperty(exports2, "Subscription", { enumerable: true, get: function() { + return Subscription_1.Subscription; + } }); + var Subscriber_1 = require_Subscriber(); + Object.defineProperty(exports2, "Subscriber", { enumerable: true, get: function() { + return Subscriber_1.Subscriber; + } }); + var Notification_1 = require_Notification(); + Object.defineProperty(exports2, "Notification", { enumerable: true, get: function() { + return Notification_1.Notification; + } }); + Object.defineProperty(exports2, "NotificationKind", { enumerable: true, get: function() { + return Notification_1.NotificationKind; + } }); + var pipe_1 = require_pipe(); + Object.defineProperty(exports2, "pipe", { enumerable: true, get: function() { + return pipe_1.pipe; + } }); + var noop_1 = require_noop(); + Object.defineProperty(exports2, "noop", { enumerable: true, get: function() { + return noop_1.noop; + } }); + var identity_1 = require_identity(); + Object.defineProperty(exports2, "identity", { enumerable: true, get: function() { + return identity_1.identity; + } }); + var isObservable_1 = require_isObservable(); + Object.defineProperty(exports2, "isObservable", { enumerable: true, get: function() { + return isObservable_1.isObservable; + } }); + var lastValueFrom_1 = require_lastValueFrom(); + Object.defineProperty(exports2, "lastValueFrom", { enumerable: true, get: function() { + return lastValueFrom_1.lastValueFrom; + } }); + var firstValueFrom_1 = require_firstValueFrom(); + Object.defineProperty(exports2, "firstValueFrom", { enumerable: true, get: function() { + return firstValueFrom_1.firstValueFrom; + } }); + var ArgumentOutOfRangeError_1 = require_ArgumentOutOfRangeError(); + Object.defineProperty(exports2, "ArgumentOutOfRangeError", { enumerable: true, get: function() { + return ArgumentOutOfRangeError_1.ArgumentOutOfRangeError; + } }); + var EmptyError_1 = require_EmptyError(); + Object.defineProperty(exports2, "EmptyError", { enumerable: true, get: function() { + return EmptyError_1.EmptyError; + } }); + var NotFoundError_1 = require_NotFoundError(); + Object.defineProperty(exports2, "NotFoundError", { enumerable: true, get: function() { + return NotFoundError_1.NotFoundError; + } }); + var ObjectUnsubscribedError_1 = require_ObjectUnsubscribedError(); + Object.defineProperty(exports2, "ObjectUnsubscribedError", { enumerable: true, get: function() { + return ObjectUnsubscribedError_1.ObjectUnsubscribedError; + } }); + var SequenceError_1 = require_SequenceError(); + Object.defineProperty(exports2, "SequenceError", { enumerable: true, get: function() { + return SequenceError_1.SequenceError; + } }); + var timeout_1 = require_timeout(); + Object.defineProperty(exports2, "TimeoutError", { enumerable: true, get: function() { + return timeout_1.TimeoutError; + } }); + var UnsubscriptionError_1 = require_UnsubscriptionError(); + Object.defineProperty(exports2, "UnsubscriptionError", { enumerable: true, get: function() { + return UnsubscriptionError_1.UnsubscriptionError; + } }); + var bindCallback_1 = require_bindCallback(); + Object.defineProperty(exports2, "bindCallback", { enumerable: true, get: function() { + return bindCallback_1.bindCallback; + } }); + var bindNodeCallback_1 = require_bindNodeCallback(); + Object.defineProperty(exports2, "bindNodeCallback", { enumerable: true, get: function() { + return bindNodeCallback_1.bindNodeCallback; + } }); + var combineLatest_1 = require_combineLatest(); + Object.defineProperty(exports2, "combineLatest", { enumerable: true, get: function() { + return combineLatest_1.combineLatest; + } }); + var concat_1 = require_concat(); + Object.defineProperty(exports2, "concat", { enumerable: true, get: function() { + return concat_1.concat; + } }); + var connectable_1 = require_connectable(); + Object.defineProperty(exports2, "connectable", { enumerable: true, get: function() { + return connectable_1.connectable; + } }); + var defer_1 = require_defer(); + Object.defineProperty(exports2, "defer", { enumerable: true, get: function() { + return defer_1.defer; + } }); + var empty_1 = require_empty(); + Object.defineProperty(exports2, "empty", { enumerable: true, get: function() { + return empty_1.empty; + } }); + var forkJoin_1 = require_forkJoin(); + Object.defineProperty(exports2, "forkJoin", { enumerable: true, get: function() { + return forkJoin_1.forkJoin; + } }); + var from_1 = require_from2(); + Object.defineProperty(exports2, "from", { enumerable: true, get: function() { + return from_1.from; + } }); + var fromEvent_1 = require_fromEvent(); + Object.defineProperty(exports2, "fromEvent", { enumerable: true, get: function() { + return fromEvent_1.fromEvent; + } }); + var fromEventPattern_1 = require_fromEventPattern(); + Object.defineProperty(exports2, "fromEventPattern", { enumerable: true, get: function() { + return fromEventPattern_1.fromEventPattern; + } }); + var generate_1 = require_generate(); + Object.defineProperty(exports2, "generate", { enumerable: true, get: function() { + return generate_1.generate; + } }); + var iif_1 = require_iif(); + Object.defineProperty(exports2, "iif", { enumerable: true, get: function() { + return iif_1.iif; + } }); + var interval_1 = require_interval(); + Object.defineProperty(exports2, "interval", { enumerable: true, get: function() { + return interval_1.interval; + } }); + var merge_1 = require_merge(); + Object.defineProperty(exports2, "merge", { enumerable: true, get: function() { + return merge_1.merge; + } }); + var never_1 = require_never(); + Object.defineProperty(exports2, "never", { enumerable: true, get: function() { + return never_1.never; + } }); + var of_1 = require_of(); + Object.defineProperty(exports2, "of", { enumerable: true, get: function() { + return of_1.of; + } }); + var onErrorResumeNext_1 = require_onErrorResumeNext2(); + Object.defineProperty(exports2, "onErrorResumeNext", { enumerable: true, get: function() { + return onErrorResumeNext_1.onErrorResumeNext; + } }); + var pairs_1 = require_pairs(); + Object.defineProperty(exports2, "pairs", { enumerable: true, get: function() { + return pairs_1.pairs; + } }); + var partition_1 = require_partition(); + Object.defineProperty(exports2, "partition", { enumerable: true, get: function() { + return partition_1.partition; + } }); + var race_1 = require_race(); + Object.defineProperty(exports2, "race", { enumerable: true, get: function() { + return race_1.race; + } }); + var range_1 = require_range(); + Object.defineProperty(exports2, "range", { enumerable: true, get: function() { + return range_1.range; + } }); + var throwError_1 = require_throwError(); + Object.defineProperty(exports2, "throwError", { enumerable: true, get: function() { + return throwError_1.throwError; + } }); + var timer_1 = require_timer2(); + Object.defineProperty(exports2, "timer", { enumerable: true, get: function() { + return timer_1.timer; + } }); + var using_1 = require_using(); + Object.defineProperty(exports2, "using", { enumerable: true, get: function() { + return using_1.using; + } }); + var zip_1 = require_zip(); + Object.defineProperty(exports2, "zip", { enumerable: true, get: function() { + return zip_1.zip; + } }); + var scheduled_1 = require_scheduled(); + Object.defineProperty(exports2, "scheduled", { enumerable: true, get: function() { + return scheduled_1.scheduled; + } }); + var empty_2 = require_empty(); + Object.defineProperty(exports2, "EMPTY", { enumerable: true, get: function() { + return empty_2.EMPTY; + } }); + var never_2 = require_never(); + Object.defineProperty(exports2, "NEVER", { enumerable: true, get: function() { + return never_2.NEVER; + } }); + __exportStar(require_types3(), exports2); + var config_1 = require_config(); + Object.defineProperty(exports2, "config", { enumerable: true, get: function() { + return config_1.config; + } }); + var audit_1 = require_audit(); + Object.defineProperty(exports2, "audit", { enumerable: true, get: function() { + return audit_1.audit; + } }); + var auditTime_1 = require_auditTime(); + Object.defineProperty(exports2, "auditTime", { enumerable: true, get: function() { + return auditTime_1.auditTime; + } }); + var buffer_1 = require_buffer(); + Object.defineProperty(exports2, "buffer", { enumerable: true, get: function() { + return buffer_1.buffer; + } }); + var bufferCount_1 = require_bufferCount(); + Object.defineProperty(exports2, "bufferCount", { enumerable: true, get: function() { + return bufferCount_1.bufferCount; + } }); + var bufferTime_1 = require_bufferTime(); + Object.defineProperty(exports2, "bufferTime", { enumerable: true, get: function() { + return bufferTime_1.bufferTime; + } }); + var bufferToggle_1 = require_bufferToggle(); + Object.defineProperty(exports2, "bufferToggle", { enumerable: true, get: function() { + return bufferToggle_1.bufferToggle; + } }); + var bufferWhen_1 = require_bufferWhen(); + Object.defineProperty(exports2, "bufferWhen", { enumerable: true, get: function() { + return bufferWhen_1.bufferWhen; + } }); + var catchError_1 = require_catchError(); + Object.defineProperty(exports2, "catchError", { enumerable: true, get: function() { + return catchError_1.catchError; + } }); + var combineAll_1 = require_combineAll(); + Object.defineProperty(exports2, "combineAll", { enumerable: true, get: function() { + return combineAll_1.combineAll; + } }); + var combineLatestAll_1 = require_combineLatestAll(); + Object.defineProperty(exports2, "combineLatestAll", { enumerable: true, get: function() { + return combineLatestAll_1.combineLatestAll; + } }); + var combineLatestWith_1 = require_combineLatestWith(); + Object.defineProperty(exports2, "combineLatestWith", { enumerable: true, get: function() { + return combineLatestWith_1.combineLatestWith; + } }); + var concatAll_1 = require_concatAll(); + Object.defineProperty(exports2, "concatAll", { enumerable: true, get: function() { + return concatAll_1.concatAll; + } }); + var concatMap_1 = require_concatMap(); + Object.defineProperty(exports2, "concatMap", { enumerable: true, get: function() { + return concatMap_1.concatMap; + } }); + var concatMapTo_1 = require_concatMapTo(); + Object.defineProperty(exports2, "concatMapTo", { enumerable: true, get: function() { + return concatMapTo_1.concatMapTo; + } }); + var concatWith_1 = require_concatWith(); + Object.defineProperty(exports2, "concatWith", { enumerable: true, get: function() { + return concatWith_1.concatWith; + } }); + var connect_1 = require_connect(); + Object.defineProperty(exports2, "connect", { enumerable: true, get: function() { + return connect_1.connect; + } }); + var count_1 = require_count(); + Object.defineProperty(exports2, "count", { enumerable: true, get: function() { + return count_1.count; + } }); + var debounce_1 = require_debounce(); + Object.defineProperty(exports2, "debounce", { enumerable: true, get: function() { + return debounce_1.debounce; + } }); + var debounceTime_1 = require_debounceTime(); + Object.defineProperty(exports2, "debounceTime", { enumerable: true, get: function() { + return debounceTime_1.debounceTime; + } }); + var defaultIfEmpty_1 = require_defaultIfEmpty(); + Object.defineProperty(exports2, "defaultIfEmpty", { enumerable: true, get: function() { + return defaultIfEmpty_1.defaultIfEmpty; + } }); + var delay_1 = require_delay(); + Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { + return delay_1.delay; + } }); + var delayWhen_1 = require_delayWhen(); + Object.defineProperty(exports2, "delayWhen", { enumerable: true, get: function() { + return delayWhen_1.delayWhen; + } }); + var dematerialize_1 = require_dematerialize(); + Object.defineProperty(exports2, "dematerialize", { enumerable: true, get: function() { + return dematerialize_1.dematerialize; + } }); + var distinct_1 = require_distinct(); + Object.defineProperty(exports2, "distinct", { enumerable: true, get: function() { + return distinct_1.distinct; + } }); + var distinctUntilChanged_1 = require_distinctUntilChanged(); + Object.defineProperty(exports2, "distinctUntilChanged", { enumerable: true, get: function() { + return distinctUntilChanged_1.distinctUntilChanged; + } }); + var distinctUntilKeyChanged_1 = require_distinctUntilKeyChanged(); + Object.defineProperty(exports2, "distinctUntilKeyChanged", { enumerable: true, get: function() { + return distinctUntilKeyChanged_1.distinctUntilKeyChanged; + } }); + var elementAt_1 = require_elementAt(); + Object.defineProperty(exports2, "elementAt", { enumerable: true, get: function() { + return elementAt_1.elementAt; + } }); + var endWith_1 = require_endWith(); + Object.defineProperty(exports2, "endWith", { enumerable: true, get: function() { + return endWith_1.endWith; + } }); + var every_1 = require_every(); + Object.defineProperty(exports2, "every", { enumerable: true, get: function() { + return every_1.every; + } }); + var exhaust_1 = require_exhaust(); + Object.defineProperty(exports2, "exhaust", { enumerable: true, get: function() { + return exhaust_1.exhaust; + } }); + var exhaustAll_1 = require_exhaustAll(); + Object.defineProperty(exports2, "exhaustAll", { enumerable: true, get: function() { + return exhaustAll_1.exhaustAll; + } }); + var exhaustMap_1 = require_exhaustMap(); + Object.defineProperty(exports2, "exhaustMap", { enumerable: true, get: function() { + return exhaustMap_1.exhaustMap; + } }); + var expand_1 = require_expand(); + Object.defineProperty(exports2, "expand", { enumerable: true, get: function() { + return expand_1.expand; + } }); + var filter_1 = require_filter(); + Object.defineProperty(exports2, "filter", { enumerable: true, get: function() { + return filter_1.filter; + } }); + var finalize_1 = require_finalize(); + Object.defineProperty(exports2, "finalize", { enumerable: true, get: function() { + return finalize_1.finalize; + } }); + var find_1 = require_find(); + Object.defineProperty(exports2, "find", { enumerable: true, get: function() { + return find_1.find; + } }); + var findIndex_1 = require_findIndex(); + Object.defineProperty(exports2, "findIndex", { enumerable: true, get: function() { + return findIndex_1.findIndex; + } }); + var first_1 = require_first(); + Object.defineProperty(exports2, "first", { enumerable: true, get: function() { + return first_1.first; + } }); + var groupBy_1 = require_groupBy(); + Object.defineProperty(exports2, "groupBy", { enumerable: true, get: function() { + return groupBy_1.groupBy; + } }); + var ignoreElements_1 = require_ignoreElements(); + Object.defineProperty(exports2, "ignoreElements", { enumerable: true, get: function() { + return ignoreElements_1.ignoreElements; + } }); + var isEmpty_1 = require_isEmpty(); + Object.defineProperty(exports2, "isEmpty", { enumerable: true, get: function() { + return isEmpty_1.isEmpty; + } }); + var last_1 = require_last(); + Object.defineProperty(exports2, "last", { enumerable: true, get: function() { + return last_1.last; + } }); + var map_1 = require_map(); + Object.defineProperty(exports2, "map", { enumerable: true, get: function() { + return map_1.map; + } }); + var mapTo_1 = require_mapTo(); + Object.defineProperty(exports2, "mapTo", { enumerable: true, get: function() { + return mapTo_1.mapTo; + } }); + var materialize_1 = require_materialize(); + Object.defineProperty(exports2, "materialize", { enumerable: true, get: function() { + return materialize_1.materialize; + } }); + var max_1 = require_max(); + Object.defineProperty(exports2, "max", { enumerable: true, get: function() { + return max_1.max; + } }); + var mergeAll_1 = require_mergeAll(); + Object.defineProperty(exports2, "mergeAll", { enumerable: true, get: function() { + return mergeAll_1.mergeAll; + } }); + var flatMap_1 = require_flatMap(); + Object.defineProperty(exports2, "flatMap", { enumerable: true, get: function() { + return flatMap_1.flatMap; + } }); + var mergeMap_1 = require_mergeMap(); + Object.defineProperty(exports2, "mergeMap", { enumerable: true, get: function() { + return mergeMap_1.mergeMap; + } }); + var mergeMapTo_1 = require_mergeMapTo(); + Object.defineProperty(exports2, "mergeMapTo", { enumerable: true, get: function() { + return mergeMapTo_1.mergeMapTo; + } }); + var mergeScan_1 = require_mergeScan(); + Object.defineProperty(exports2, "mergeScan", { enumerable: true, get: function() { + return mergeScan_1.mergeScan; + } }); + var mergeWith_1 = require_mergeWith(); + Object.defineProperty(exports2, "mergeWith", { enumerable: true, get: function() { + return mergeWith_1.mergeWith; + } }); + var min_1 = require_min(); + Object.defineProperty(exports2, "min", { enumerable: true, get: function() { + return min_1.min; + } }); + var multicast_1 = require_multicast(); + Object.defineProperty(exports2, "multicast", { enumerable: true, get: function() { + return multicast_1.multicast; + } }); + var observeOn_1 = require_observeOn(); + Object.defineProperty(exports2, "observeOn", { enumerable: true, get: function() { + return observeOn_1.observeOn; + } }); + var pairwise_1 = require_pairwise(); + Object.defineProperty(exports2, "pairwise", { enumerable: true, get: function() { + return pairwise_1.pairwise; + } }); + var pluck_1 = require_pluck(); + Object.defineProperty(exports2, "pluck", { enumerable: true, get: function() { + return pluck_1.pluck; + } }); + var publish_1 = require_publish(); + Object.defineProperty(exports2, "publish", { enumerable: true, get: function() { + return publish_1.publish; + } }); + var publishBehavior_1 = require_publishBehavior(); + Object.defineProperty(exports2, "publishBehavior", { enumerable: true, get: function() { + return publishBehavior_1.publishBehavior; + } }); + var publishLast_1 = require_publishLast(); + Object.defineProperty(exports2, "publishLast", { enumerable: true, get: function() { + return publishLast_1.publishLast; + } }); + var publishReplay_1 = require_publishReplay(); + Object.defineProperty(exports2, "publishReplay", { enumerable: true, get: function() { + return publishReplay_1.publishReplay; + } }); + var raceWith_1 = require_raceWith(); + Object.defineProperty(exports2, "raceWith", { enumerable: true, get: function() { + return raceWith_1.raceWith; + } }); + var reduce_1 = require_reduce(); + Object.defineProperty(exports2, "reduce", { enumerable: true, get: function() { + return reduce_1.reduce; + } }); + var repeat_1 = require_repeat(); + Object.defineProperty(exports2, "repeat", { enumerable: true, get: function() { + return repeat_1.repeat; + } }); + var repeatWhen_1 = require_repeatWhen(); + Object.defineProperty(exports2, "repeatWhen", { enumerable: true, get: function() { + return repeatWhen_1.repeatWhen; + } }); + var retry_1 = require_retry(); + Object.defineProperty(exports2, "retry", { enumerable: true, get: function() { + return retry_1.retry; + } }); + var retryWhen_1 = require_retryWhen(); + Object.defineProperty(exports2, "retryWhen", { enumerable: true, get: function() { + return retryWhen_1.retryWhen; + } }); + var refCount_1 = require_refCount(); + Object.defineProperty(exports2, "refCount", { enumerable: true, get: function() { + return refCount_1.refCount; + } }); + var sample_1 = require_sample(); + Object.defineProperty(exports2, "sample", { enumerable: true, get: function() { + return sample_1.sample; + } }); + var sampleTime_1 = require_sampleTime(); + Object.defineProperty(exports2, "sampleTime", { enumerable: true, get: function() { + return sampleTime_1.sampleTime; + } }); + var scan_1 = require_scan(); + Object.defineProperty(exports2, "scan", { enumerable: true, get: function() { + return scan_1.scan; + } }); + var sequenceEqual_1 = require_sequenceEqual(); + Object.defineProperty(exports2, "sequenceEqual", { enumerable: true, get: function() { + return sequenceEqual_1.sequenceEqual; + } }); + var share_1 = require_share(); + Object.defineProperty(exports2, "share", { enumerable: true, get: function() { + return share_1.share; + } }); + var shareReplay_1 = require_shareReplay(); + Object.defineProperty(exports2, "shareReplay", { enumerable: true, get: function() { + return shareReplay_1.shareReplay; + } }); + var single_1 = require_single(); + Object.defineProperty(exports2, "single", { enumerable: true, get: function() { + return single_1.single; + } }); + var skip_1 = require_skip(); + Object.defineProperty(exports2, "skip", { enumerable: true, get: function() { + return skip_1.skip; + } }); + var skipLast_1 = require_skipLast(); + Object.defineProperty(exports2, "skipLast", { enumerable: true, get: function() { + return skipLast_1.skipLast; + } }); + var skipUntil_1 = require_skipUntil(); + Object.defineProperty(exports2, "skipUntil", { enumerable: true, get: function() { + return skipUntil_1.skipUntil; + } }); + var skipWhile_1 = require_skipWhile(); + Object.defineProperty(exports2, "skipWhile", { enumerable: true, get: function() { + return skipWhile_1.skipWhile; + } }); + var startWith_1 = require_startWith(); + Object.defineProperty(exports2, "startWith", { enumerable: true, get: function() { + return startWith_1.startWith; + } }); + var subscribeOn_1 = require_subscribeOn(); + Object.defineProperty(exports2, "subscribeOn", { enumerable: true, get: function() { + return subscribeOn_1.subscribeOn; + } }); + var switchAll_1 = require_switchAll(); + Object.defineProperty(exports2, "switchAll", { enumerable: true, get: function() { + return switchAll_1.switchAll; + } }); + var switchMap_1 = require_switchMap(); + Object.defineProperty(exports2, "switchMap", { enumerable: true, get: function() { + return switchMap_1.switchMap; + } }); + var switchMapTo_1 = require_switchMapTo(); + Object.defineProperty(exports2, "switchMapTo", { enumerable: true, get: function() { + return switchMapTo_1.switchMapTo; + } }); + var switchScan_1 = require_switchScan(); + Object.defineProperty(exports2, "switchScan", { enumerable: true, get: function() { + return switchScan_1.switchScan; + } }); + var take_1 = require_take(); + Object.defineProperty(exports2, "take", { enumerable: true, get: function() { + return take_1.take; + } }); + var takeLast_1 = require_takeLast(); + Object.defineProperty(exports2, "takeLast", { enumerable: true, get: function() { + return takeLast_1.takeLast; + } }); + var takeUntil_1 = require_takeUntil(); + Object.defineProperty(exports2, "takeUntil", { enumerable: true, get: function() { + return takeUntil_1.takeUntil; + } }); + var takeWhile_1 = require_takeWhile(); + Object.defineProperty(exports2, "takeWhile", { enumerable: true, get: function() { + return takeWhile_1.takeWhile; + } }); + var tap_1 = require_tap(); + Object.defineProperty(exports2, "tap", { enumerable: true, get: function() { + return tap_1.tap; + } }); + var throttle_1 = require_throttle(); + Object.defineProperty(exports2, "throttle", { enumerable: true, get: function() { + return throttle_1.throttle; + } }); + var throttleTime_1 = require_throttleTime(); + Object.defineProperty(exports2, "throttleTime", { enumerable: true, get: function() { + return throttleTime_1.throttleTime; + } }); + var throwIfEmpty_1 = require_throwIfEmpty(); + Object.defineProperty(exports2, "throwIfEmpty", { enumerable: true, get: function() { + return throwIfEmpty_1.throwIfEmpty; + } }); + var timeInterval_1 = require_timeInterval(); + Object.defineProperty(exports2, "timeInterval", { enumerable: true, get: function() { + return timeInterval_1.timeInterval; + } }); + var timeout_2 = require_timeout(); + Object.defineProperty(exports2, "timeout", { enumerable: true, get: function() { + return timeout_2.timeout; + } }); + var timeoutWith_1 = require_timeoutWith(); + Object.defineProperty(exports2, "timeoutWith", { enumerable: true, get: function() { + return timeoutWith_1.timeoutWith; + } }); + var timestamp_1 = require_timestamp(); + Object.defineProperty(exports2, "timestamp", { enumerable: true, get: function() { + return timestamp_1.timestamp; + } }); + var toArray_1 = require_toArray(); + Object.defineProperty(exports2, "toArray", { enumerable: true, get: function() { + return toArray_1.toArray; + } }); + var window_1 = require_window(); + Object.defineProperty(exports2, "window", { enumerable: true, get: function() { + return window_1.window; + } }); + var windowCount_1 = require_windowCount(); + Object.defineProperty(exports2, "windowCount", { enumerable: true, get: function() { + return windowCount_1.windowCount; + } }); + var windowTime_1 = require_windowTime(); + Object.defineProperty(exports2, "windowTime", { enumerable: true, get: function() { + return windowTime_1.windowTime; + } }); + var windowToggle_1 = require_windowToggle(); + Object.defineProperty(exports2, "windowToggle", { enumerable: true, get: function() { + return windowToggle_1.windowToggle; + } }); + var windowWhen_1 = require_windowWhen(); + Object.defineProperty(exports2, "windowWhen", { enumerable: true, get: function() { + return windowWhen_1.windowWhen; + } }); + var withLatestFrom_1 = require_withLatestFrom(); + Object.defineProperty(exports2, "withLatestFrom", { enumerable: true, get: function() { + return withLatestFrom_1.withLatestFrom; + } }); + var zipAll_1 = require_zipAll(); + Object.defineProperty(exports2, "zipAll", { enumerable: true, get: function() { + return zipAll_1.zipAll; + } }); + var zipWith_1 = require_zipWith(); + Object.defineProperty(exports2, "zipWith", { enumerable: true, get: function() { + return zipWith_1.zipWith; + } }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/partition.js +var require_partition2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/partition.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.partition = void 0; + var not_1 = require_not(); + var filter_1 = require_filter(); + function partition(predicate, thisArg) { + return function(source) { + return [filter_1.filter(predicate, thisArg)(source), filter_1.filter(not_1.not(predicate, thisArg))(source)]; + }; + } + exports2.partition = partition; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/race.js +var require_race2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/internal/operators/race.js"(exports2) { + "use strict"; + var __read = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.race = void 0; + var argsOrArgArray_1 = require_argsOrArgArray(); + var raceWith_1 = require_raceWith(); + function race() { + var args2 = []; + for (var _i = 0; _i < arguments.length; _i++) { + args2[_i] = arguments[_i]; + } + return raceWith_1.raceWith.apply(void 0, __spreadArray([], __read(argsOrArgArray_1.argsOrArgArray(args2)))); + } + exports2.race = race; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/operators/index.js +var require_operators = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.3.0/node_modules/rxjs/dist/cjs/operators/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeAll = exports2.merge = exports2.max = exports2.materialize = exports2.mapTo = exports2.map = exports2.last = exports2.isEmpty = exports2.ignoreElements = exports2.groupBy = exports2.first = exports2.findIndex = exports2.find = exports2.finalize = exports2.filter = exports2.expand = exports2.exhaustMap = exports2.exhaustAll = exports2.exhaust = exports2.every = exports2.endWith = exports2.elementAt = exports2.distinctUntilKeyChanged = exports2.distinctUntilChanged = exports2.distinct = exports2.dematerialize = exports2.delayWhen = exports2.delay = exports2.defaultIfEmpty = exports2.debounceTime = exports2.debounce = exports2.count = exports2.connect = exports2.concatWith = exports2.concatMapTo = exports2.concatMap = exports2.concatAll = exports2.concat = exports2.combineLatestWith = exports2.combineLatest = exports2.combineLatestAll = exports2.combineAll = exports2.catchError = exports2.bufferWhen = exports2.bufferToggle = exports2.bufferTime = exports2.bufferCount = exports2.buffer = exports2.auditTime = exports2.audit = void 0; + exports2.timeInterval = exports2.throwIfEmpty = exports2.throttleTime = exports2.throttle = exports2.tap = exports2.takeWhile = exports2.takeUntil = exports2.takeLast = exports2.take = exports2.switchScan = exports2.switchMapTo = exports2.switchMap = exports2.switchAll = exports2.subscribeOn = exports2.startWith = exports2.skipWhile = exports2.skipUntil = exports2.skipLast = exports2.skip = exports2.single = exports2.shareReplay = exports2.share = exports2.sequenceEqual = exports2.scan = exports2.sampleTime = exports2.sample = exports2.refCount = exports2.retryWhen = exports2.retry = exports2.repeatWhen = exports2.repeat = exports2.reduce = exports2.raceWith = exports2.race = exports2.publishReplay = exports2.publishLast = exports2.publishBehavior = exports2.publish = exports2.pluck = exports2.partition = exports2.pairwise = exports2.onErrorResumeNext = exports2.observeOn = exports2.multicast = exports2.min = exports2.mergeWith = exports2.mergeScan = exports2.mergeMapTo = exports2.mergeMap = exports2.flatMap = void 0; + exports2.zipWith = exports2.zipAll = exports2.zip = exports2.withLatestFrom = exports2.windowWhen = exports2.windowToggle = exports2.windowTime = exports2.windowCount = exports2.window = exports2.toArray = exports2.timestamp = exports2.timeoutWith = exports2.timeout = void 0; + var audit_1 = require_audit(); + Object.defineProperty(exports2, "audit", { enumerable: true, get: function() { + return audit_1.audit; + } }); + var auditTime_1 = require_auditTime(); + Object.defineProperty(exports2, "auditTime", { enumerable: true, get: function() { + return auditTime_1.auditTime; + } }); + var buffer_1 = require_buffer(); + Object.defineProperty(exports2, "buffer", { enumerable: true, get: function() { + return buffer_1.buffer; + } }); + var bufferCount_1 = require_bufferCount(); + Object.defineProperty(exports2, "bufferCount", { enumerable: true, get: function() { + return bufferCount_1.bufferCount; + } }); + var bufferTime_1 = require_bufferTime(); + Object.defineProperty(exports2, "bufferTime", { enumerable: true, get: function() { + return bufferTime_1.bufferTime; + } }); + var bufferToggle_1 = require_bufferToggle(); + Object.defineProperty(exports2, "bufferToggle", { enumerable: true, get: function() { + return bufferToggle_1.bufferToggle; + } }); + var bufferWhen_1 = require_bufferWhen(); + Object.defineProperty(exports2, "bufferWhen", { enumerable: true, get: function() { + return bufferWhen_1.bufferWhen; + } }); + var catchError_1 = require_catchError(); + Object.defineProperty(exports2, "catchError", { enumerable: true, get: function() { + return catchError_1.catchError; + } }); + var combineAll_1 = require_combineAll(); + Object.defineProperty(exports2, "combineAll", { enumerable: true, get: function() { + return combineAll_1.combineAll; + } }); + var combineLatestAll_1 = require_combineLatestAll(); + Object.defineProperty(exports2, "combineLatestAll", { enumerable: true, get: function() { + return combineLatestAll_1.combineLatestAll; + } }); + var combineLatest_1 = require_combineLatest2(); + Object.defineProperty(exports2, "combineLatest", { enumerable: true, get: function() { + return combineLatest_1.combineLatest; + } }); + var combineLatestWith_1 = require_combineLatestWith(); + Object.defineProperty(exports2, "combineLatestWith", { enumerable: true, get: function() { + return combineLatestWith_1.combineLatestWith; + } }); + var concat_1 = require_concat2(); + Object.defineProperty(exports2, "concat", { enumerable: true, get: function() { + return concat_1.concat; + } }); + var concatAll_1 = require_concatAll(); + Object.defineProperty(exports2, "concatAll", { enumerable: true, get: function() { + return concatAll_1.concatAll; + } }); + var concatMap_1 = require_concatMap(); + Object.defineProperty(exports2, "concatMap", { enumerable: true, get: function() { + return concatMap_1.concatMap; + } }); + var concatMapTo_1 = require_concatMapTo(); + Object.defineProperty(exports2, "concatMapTo", { enumerable: true, get: function() { + return concatMapTo_1.concatMapTo; + } }); + var concatWith_1 = require_concatWith(); + Object.defineProperty(exports2, "concatWith", { enumerable: true, get: function() { + return concatWith_1.concatWith; + } }); + var connect_1 = require_connect(); + Object.defineProperty(exports2, "connect", { enumerable: true, get: function() { + return connect_1.connect; + } }); + var count_1 = require_count(); + Object.defineProperty(exports2, "count", { enumerable: true, get: function() { + return count_1.count; + } }); + var debounce_1 = require_debounce(); + Object.defineProperty(exports2, "debounce", { enumerable: true, get: function() { + return debounce_1.debounce; + } }); + var debounceTime_1 = require_debounceTime(); + Object.defineProperty(exports2, "debounceTime", { enumerable: true, get: function() { + return debounceTime_1.debounceTime; + } }); + var defaultIfEmpty_1 = require_defaultIfEmpty(); + Object.defineProperty(exports2, "defaultIfEmpty", { enumerable: true, get: function() { + return defaultIfEmpty_1.defaultIfEmpty; + } }); + var delay_1 = require_delay(); + Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { + return delay_1.delay; + } }); + var delayWhen_1 = require_delayWhen(); + Object.defineProperty(exports2, "delayWhen", { enumerable: true, get: function() { + return delayWhen_1.delayWhen; + } }); + var dematerialize_1 = require_dematerialize(); + Object.defineProperty(exports2, "dematerialize", { enumerable: true, get: function() { + return dematerialize_1.dematerialize; + } }); + var distinct_1 = require_distinct(); + Object.defineProperty(exports2, "distinct", { enumerable: true, get: function() { + return distinct_1.distinct; + } }); + var distinctUntilChanged_1 = require_distinctUntilChanged(); + Object.defineProperty(exports2, "distinctUntilChanged", { enumerable: true, get: function() { + return distinctUntilChanged_1.distinctUntilChanged; + } }); + var distinctUntilKeyChanged_1 = require_distinctUntilKeyChanged(); + Object.defineProperty(exports2, "distinctUntilKeyChanged", { enumerable: true, get: function() { + return distinctUntilKeyChanged_1.distinctUntilKeyChanged; + } }); + var elementAt_1 = require_elementAt(); + Object.defineProperty(exports2, "elementAt", { enumerable: true, get: function() { + return elementAt_1.elementAt; + } }); + var endWith_1 = require_endWith(); + Object.defineProperty(exports2, "endWith", { enumerable: true, get: function() { + return endWith_1.endWith; + } }); + var every_1 = require_every(); + Object.defineProperty(exports2, "every", { enumerable: true, get: function() { + return every_1.every; + } }); + var exhaust_1 = require_exhaust(); + Object.defineProperty(exports2, "exhaust", { enumerable: true, get: function() { + return exhaust_1.exhaust; + } }); + var exhaustAll_1 = require_exhaustAll(); + Object.defineProperty(exports2, "exhaustAll", { enumerable: true, get: function() { + return exhaustAll_1.exhaustAll; + } }); + var exhaustMap_1 = require_exhaustMap(); + Object.defineProperty(exports2, "exhaustMap", { enumerable: true, get: function() { + return exhaustMap_1.exhaustMap; + } }); + var expand_1 = require_expand(); + Object.defineProperty(exports2, "expand", { enumerable: true, get: function() { + return expand_1.expand; + } }); + var filter_1 = require_filter(); + Object.defineProperty(exports2, "filter", { enumerable: true, get: function() { + return filter_1.filter; + } }); + var finalize_1 = require_finalize(); + Object.defineProperty(exports2, "finalize", { enumerable: true, get: function() { + return finalize_1.finalize; + } }); + var find_1 = require_find(); + Object.defineProperty(exports2, "find", { enumerable: true, get: function() { + return find_1.find; + } }); + var findIndex_1 = require_findIndex(); + Object.defineProperty(exports2, "findIndex", { enumerable: true, get: function() { + return findIndex_1.findIndex; + } }); + var first_1 = require_first(); + Object.defineProperty(exports2, "first", { enumerable: true, get: function() { + return first_1.first; + } }); + var groupBy_1 = require_groupBy(); + Object.defineProperty(exports2, "groupBy", { enumerable: true, get: function() { + return groupBy_1.groupBy; + } }); + var ignoreElements_1 = require_ignoreElements(); + Object.defineProperty(exports2, "ignoreElements", { enumerable: true, get: function() { + return ignoreElements_1.ignoreElements; + } }); + var isEmpty_1 = require_isEmpty(); + Object.defineProperty(exports2, "isEmpty", { enumerable: true, get: function() { + return isEmpty_1.isEmpty; + } }); + var last_1 = require_last(); + Object.defineProperty(exports2, "last", { enumerable: true, get: function() { + return last_1.last; + } }); + var map_1 = require_map(); + Object.defineProperty(exports2, "map", { enumerable: true, get: function() { + return map_1.map; + } }); + var mapTo_1 = require_mapTo(); + Object.defineProperty(exports2, "mapTo", { enumerable: true, get: function() { + return mapTo_1.mapTo; + } }); + var materialize_1 = require_materialize(); + Object.defineProperty(exports2, "materialize", { enumerable: true, get: function() { + return materialize_1.materialize; + } }); + var max_1 = require_max(); + Object.defineProperty(exports2, "max", { enumerable: true, get: function() { + return max_1.max; + } }); + var merge_1 = require_merge2(); + Object.defineProperty(exports2, "merge", { enumerable: true, get: function() { + return merge_1.merge; + } }); + var mergeAll_1 = require_mergeAll(); + Object.defineProperty(exports2, "mergeAll", { enumerable: true, get: function() { + return mergeAll_1.mergeAll; + } }); + var flatMap_1 = require_flatMap(); + Object.defineProperty(exports2, "flatMap", { enumerable: true, get: function() { + return flatMap_1.flatMap; + } }); + var mergeMap_1 = require_mergeMap(); + Object.defineProperty(exports2, "mergeMap", { enumerable: true, get: function() { + return mergeMap_1.mergeMap; + } }); + var mergeMapTo_1 = require_mergeMapTo(); + Object.defineProperty(exports2, "mergeMapTo", { enumerable: true, get: function() { + return mergeMapTo_1.mergeMapTo; + } }); + var mergeScan_1 = require_mergeScan(); + Object.defineProperty(exports2, "mergeScan", { enumerable: true, get: function() { + return mergeScan_1.mergeScan; + } }); + var mergeWith_1 = require_mergeWith(); + Object.defineProperty(exports2, "mergeWith", { enumerable: true, get: function() { + return mergeWith_1.mergeWith; + } }); + var min_1 = require_min(); + Object.defineProperty(exports2, "min", { enumerable: true, get: function() { + return min_1.min; + } }); + var multicast_1 = require_multicast(); + Object.defineProperty(exports2, "multicast", { enumerable: true, get: function() { + return multicast_1.multicast; + } }); + var observeOn_1 = require_observeOn(); + Object.defineProperty(exports2, "observeOn", { enumerable: true, get: function() { + return observeOn_1.observeOn; + } }); + var onErrorResumeNext_1 = require_onErrorResumeNext(); + Object.defineProperty(exports2, "onErrorResumeNext", { enumerable: true, get: function() { + return onErrorResumeNext_1.onErrorResumeNext; + } }); + var pairwise_1 = require_pairwise(); + Object.defineProperty(exports2, "pairwise", { enumerable: true, get: function() { + return pairwise_1.pairwise; + } }); + var partition_1 = require_partition2(); + Object.defineProperty(exports2, "partition", { enumerable: true, get: function() { + return partition_1.partition; + } }); + var pluck_1 = require_pluck(); + Object.defineProperty(exports2, "pluck", { enumerable: true, get: function() { + return pluck_1.pluck; + } }); + var publish_1 = require_publish(); + Object.defineProperty(exports2, "publish", { enumerable: true, get: function() { + return publish_1.publish; + } }); + var publishBehavior_1 = require_publishBehavior(); + Object.defineProperty(exports2, "publishBehavior", { enumerable: true, get: function() { + return publishBehavior_1.publishBehavior; + } }); + var publishLast_1 = require_publishLast(); + Object.defineProperty(exports2, "publishLast", { enumerable: true, get: function() { + return publishLast_1.publishLast; + } }); + var publishReplay_1 = require_publishReplay(); + Object.defineProperty(exports2, "publishReplay", { enumerable: true, get: function() { + return publishReplay_1.publishReplay; + } }); + var race_1 = require_race2(); + Object.defineProperty(exports2, "race", { enumerable: true, get: function() { + return race_1.race; + } }); + var raceWith_1 = require_raceWith(); + Object.defineProperty(exports2, "raceWith", { enumerable: true, get: function() { + return raceWith_1.raceWith; + } }); + var reduce_1 = require_reduce(); + Object.defineProperty(exports2, "reduce", { enumerable: true, get: function() { + return reduce_1.reduce; + } }); + var repeat_1 = require_repeat(); + Object.defineProperty(exports2, "repeat", { enumerable: true, get: function() { + return repeat_1.repeat; + } }); + var repeatWhen_1 = require_repeatWhen(); + Object.defineProperty(exports2, "repeatWhen", { enumerable: true, get: function() { + return repeatWhen_1.repeatWhen; + } }); + var retry_1 = require_retry(); + Object.defineProperty(exports2, "retry", { enumerable: true, get: function() { + return retry_1.retry; + } }); + var retryWhen_1 = require_retryWhen(); + Object.defineProperty(exports2, "retryWhen", { enumerable: true, get: function() { + return retryWhen_1.retryWhen; + } }); + var refCount_1 = require_refCount(); + Object.defineProperty(exports2, "refCount", { enumerable: true, get: function() { + return refCount_1.refCount; + } }); + var sample_1 = require_sample(); + Object.defineProperty(exports2, "sample", { enumerable: true, get: function() { + return sample_1.sample; + } }); + var sampleTime_1 = require_sampleTime(); + Object.defineProperty(exports2, "sampleTime", { enumerable: true, get: function() { + return sampleTime_1.sampleTime; + } }); + var scan_1 = require_scan(); + Object.defineProperty(exports2, "scan", { enumerable: true, get: function() { + return scan_1.scan; + } }); + var sequenceEqual_1 = require_sequenceEqual(); + Object.defineProperty(exports2, "sequenceEqual", { enumerable: true, get: function() { + return sequenceEqual_1.sequenceEqual; + } }); + var share_1 = require_share(); + Object.defineProperty(exports2, "share", { enumerable: true, get: function() { + return share_1.share; + } }); + var shareReplay_1 = require_shareReplay(); + Object.defineProperty(exports2, "shareReplay", { enumerable: true, get: function() { + return shareReplay_1.shareReplay; + } }); + var single_1 = require_single(); + Object.defineProperty(exports2, "single", { enumerable: true, get: function() { + return single_1.single; + } }); + var skip_1 = require_skip(); + Object.defineProperty(exports2, "skip", { enumerable: true, get: function() { + return skip_1.skip; + } }); + var skipLast_1 = require_skipLast(); + Object.defineProperty(exports2, "skipLast", { enumerable: true, get: function() { + return skipLast_1.skipLast; + } }); + var skipUntil_1 = require_skipUntil(); + Object.defineProperty(exports2, "skipUntil", { enumerable: true, get: function() { + return skipUntil_1.skipUntil; + } }); + var skipWhile_1 = require_skipWhile(); + Object.defineProperty(exports2, "skipWhile", { enumerable: true, get: function() { + return skipWhile_1.skipWhile; + } }); + var startWith_1 = require_startWith(); + Object.defineProperty(exports2, "startWith", { enumerable: true, get: function() { + return startWith_1.startWith; + } }); + var subscribeOn_1 = require_subscribeOn(); + Object.defineProperty(exports2, "subscribeOn", { enumerable: true, get: function() { + return subscribeOn_1.subscribeOn; + } }); + var switchAll_1 = require_switchAll(); + Object.defineProperty(exports2, "switchAll", { enumerable: true, get: function() { + return switchAll_1.switchAll; + } }); + var switchMap_1 = require_switchMap(); + Object.defineProperty(exports2, "switchMap", { enumerable: true, get: function() { + return switchMap_1.switchMap; + } }); + var switchMapTo_1 = require_switchMapTo(); + Object.defineProperty(exports2, "switchMapTo", { enumerable: true, get: function() { + return switchMapTo_1.switchMapTo; + } }); + var switchScan_1 = require_switchScan(); + Object.defineProperty(exports2, "switchScan", { enumerable: true, get: function() { + return switchScan_1.switchScan; + } }); + var take_1 = require_take(); + Object.defineProperty(exports2, "take", { enumerable: true, get: function() { + return take_1.take; + } }); + var takeLast_1 = require_takeLast(); + Object.defineProperty(exports2, "takeLast", { enumerable: true, get: function() { + return takeLast_1.takeLast; + } }); + var takeUntil_1 = require_takeUntil(); + Object.defineProperty(exports2, "takeUntil", { enumerable: true, get: function() { + return takeUntil_1.takeUntil; + } }); + var takeWhile_1 = require_takeWhile(); + Object.defineProperty(exports2, "takeWhile", { enumerable: true, get: function() { + return takeWhile_1.takeWhile; + } }); + var tap_1 = require_tap(); + Object.defineProperty(exports2, "tap", { enumerable: true, get: function() { + return tap_1.tap; + } }); + var throttle_1 = require_throttle(); + Object.defineProperty(exports2, "throttle", { enumerable: true, get: function() { + return throttle_1.throttle; + } }); + var throttleTime_1 = require_throttleTime(); + Object.defineProperty(exports2, "throttleTime", { enumerable: true, get: function() { + return throttleTime_1.throttleTime; + } }); + var throwIfEmpty_1 = require_throwIfEmpty(); + Object.defineProperty(exports2, "throwIfEmpty", { enumerable: true, get: function() { + return throwIfEmpty_1.throwIfEmpty; + } }); + var timeInterval_1 = require_timeInterval(); + Object.defineProperty(exports2, "timeInterval", { enumerable: true, get: function() { + return timeInterval_1.timeInterval; + } }); + var timeout_1 = require_timeout(); + Object.defineProperty(exports2, "timeout", { enumerable: true, get: function() { + return timeout_1.timeout; + } }); + var timeoutWith_1 = require_timeoutWith(); + Object.defineProperty(exports2, "timeoutWith", { enumerable: true, get: function() { + return timeoutWith_1.timeoutWith; + } }); + var timestamp_1 = require_timestamp(); + Object.defineProperty(exports2, "timestamp", { enumerable: true, get: function() { + return timestamp_1.timestamp; + } }); + var toArray_1 = require_toArray(); + Object.defineProperty(exports2, "toArray", { enumerable: true, get: function() { + return toArray_1.toArray; + } }); + var window_1 = require_window(); + Object.defineProperty(exports2, "window", { enumerable: true, get: function() { + return window_1.window; + } }); + var windowCount_1 = require_windowCount(); + Object.defineProperty(exports2, "windowCount", { enumerable: true, get: function() { + return windowCount_1.windowCount; + } }); + var windowTime_1 = require_windowTime(); + Object.defineProperty(exports2, "windowTime", { enumerable: true, get: function() { + return windowTime_1.windowTime; + } }); + var windowToggle_1 = require_windowToggle(); + Object.defineProperty(exports2, "windowToggle", { enumerable: true, get: function() { + return windowToggle_1.windowToggle; + } }); + var windowWhen_1 = require_windowWhen(); + Object.defineProperty(exports2, "windowWhen", { enumerable: true, get: function() { + return windowWhen_1.windowWhen; + } }); + var withLatestFrom_1 = require_withLatestFrom(); + Object.defineProperty(exports2, "withLatestFrom", { enumerable: true, get: function() { + return withLatestFrom_1.withLatestFrom; + } }); + var zip_1 = require_zip2(); + Object.defineProperty(exports2, "zip", { enumerable: true, get: function() { + return zip_1.zip; + } }); + var zipAll_1 = require_zipAll(); + Object.defineProperty(exports2, "zipAll", { enumerable: true, get: function() { + return zipAll_1.zipAll; + } }); + var zipWith_1 = require_zipWith(); + Object.defineProperty(exports2, "zipWith", { enumerable: true, get: function() { + return zipWith_1.zipWith; + } }); + } +}); + +// ../../node_modules/.pnpm/ansi-regex@3.0.0/node_modules/ansi-regex/index.js +var require_ansi_regex = __commonJS({ + "../../node_modules/.pnpm/ansi-regex@3.0.0/node_modules/ansi-regex/index.js"(exports2, module2) { + "use strict"; + module2.exports = () => { + const pattern = [ + "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)", + "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))" + ].join("|"); + return new RegExp(pattern, "g"); + }; + } +}); + +// ../../node_modules/.pnpm/ansi-split@1.0.1/node_modules/ansi-split/index.js +var require_ansi_split = __commonJS({ + "../../node_modules/.pnpm/ansi-split@1.0.1/node_modules/ansi-split/index.js"(exports2, module2) { + var isAnsi = require_ansi_regex()(); + module2.exports = splitAnsi; + function splitAnsi(str) { + var parts = str.match(isAnsi); + if (!parts) + return [str]; + var result = []; + var offset = 0; + var ptr = 0; + for (var i = 0; i < parts.length; i++) { + offset = str.indexOf(parts[i], offset); + if (offset === -1) + throw new Error("Could not split string"); + if (ptr !== offset) + result.push(str.slice(ptr, offset)); + if (ptr === offset && result.length) { + result[result.length - 1] += parts[i]; + } else { + if (offset === 0) + result.push(""); + result.push(parts[i]); + } + ptr = offset + parts[i].length; + } + result.push(str.slice(ptr)); + return result; + } + } +}); + +// ../../node_modules/.pnpm/ansi-diff@1.1.1/node_modules/ansi-diff/index.js +var require_ansi_diff = __commonJS({ + "../../node_modules/.pnpm/ansi-diff@1.1.1/node_modules/ansi-diff/index.js"(exports2, module2) { + var ansi = require_ansi_split(); + var CLEAR_LINE = Buffer.from([27, 91, 48, 75]); + var NEWLINE = Buffer.from("\n"); + module2.exports = Diff; + function Diff(opts) { + if (!(this instanceof Diff)) + return new Diff(opts); + if (!opts) + opts = {}; + this.x = 0; + this.y = 0; + this.width = opts.width || Infinity; + this.height = opts.height || Infinity; + this._buffer = null; + this._out = []; + this._lines = []; + } + Diff.prototype.resize = function(opts) { + if (!opts) + opts = {}; + if (opts.width) + this.width = opts.width; + if (opts.height) + this.height = opts.height; + if (this._buffer) + this.update(this._buffer); + var last = top(this._lines); + if (!last) { + this.x = 0; + this.y = 0; + } else { + this.x = last.remainder; + this.y = last.y + last.height; + } + }; + Diff.prototype.toString = function() { + return this._buffer; + }; + Diff.prototype.update = function(buffer, opts) { + this._buffer = Buffer.isBuffer(buffer) ? buffer.toString() : buffer; + var other = this._buffer; + var oldLines = this._lines; + var lines = split(other, this); + this._lines = lines; + this._out = []; + var min = Math.min(lines.length, oldLines.length); + var i = 0; + var a; + var b; + var scrub = false; + for (; i < min; i++) { + a = lines[i]; + b = oldLines[i]; + if (same(a, b)) + continue; + if (!scrub && this.x !== this.width && inlineDiff(a, b)) { + var left = a.diffLeft(b); + var right = a.diffRight(b); + var slice = a.raw.slice(left, right ? -right : a.length); + if (left + right > 4 && left + slice.length < this.width - 1) { + this._moveTo(left, a.y); + this._push(Buffer.from(slice)); + this.x += slice.length; + continue; + } + } + this._moveTo(0, a.y); + this._write(a); + if (a.y !== b.y || a.height !== b.height) + scrub = true; + if (b.length > a.length || scrub) + this._push(CLEAR_LINE); + if (a.newline) + this._newline(); + } + for (; i < lines.length; i++) { + a = lines[i]; + this._moveTo(0, a.y); + this._write(a); + if (scrub) + this._push(CLEAR_LINE); + if (a.newline) + this._newline(); + } + var oldLast = top(oldLines); + var last = top(lines); + if (oldLast && (!last || last.y + last.height < oldLast.y + oldLast.height)) { + this._clearDown(oldLast.y + oldLast.height); + } + if (opts && opts.moveTo) { + this._moveTo(opts.moveTo[0], opts.moveTo[1]); + } else if (last) { + this._moveTo(last.remainder, last.y + last.height); + } + return Buffer.concat(this._out); + }; + Diff.prototype._clearDown = function(y) { + var x = this.x; + for (var i = this.y; i <= y; i++) { + this._moveTo(x, i); + this._push(CLEAR_LINE); + x = 0; + } + }; + Diff.prototype._newline = function() { + this._push(NEWLINE); + this.x = 0; + this.y++; + }; + Diff.prototype._write = function(line) { + this._out.push(line.toBuffer()); + this.x = line.remainder; + this.y += line.height; + }; + Diff.prototype._moveTo = function(x, y) { + var dx = x - this.x; + var dy = y - this.y; + if (dx > 0) + this._push(moveRight(dx)); + else if (dx < 0) + this._push(moveLeft(-dx)); + if (dy > 0) + this._push(moveDown(dy)); + else if (dy < 0) + this._push(moveUp(-dy)); + this.x = x; + this.y = y; + }; + Diff.prototype._push = function(buf) { + this._out.push(buf); + }; + function same(a, b) { + return a.y === b.y && a.width === b.width && a.raw === b.raw && a.newline === b.newline; + } + function top(list) { + return list.length ? list[list.length - 1] : null; + } + function Line(str, y, nl, term) { + this.y = y; + this.width = term.width; + this.parts = ansi(str); + this.length = length(this.parts); + this.raw = str; + this.newline = nl; + this.height = Math.floor(this.length / term.width); + this.remainder = this.length - (this.height && this.height * term.width); + if (this.height && !this.remainder) { + this.height--; + this.remainder = this.width; + } + } + Line.prototype.diffLeft = function(other) { + var left = 0; + for (; left < this.length; left++) { + if (this.raw[left] !== other.raw[left]) + return left; + } + return left; + }; + Line.prototype.diffRight = function(other) { + var right = 0; + for (; right < this.length; right++) { + var r = this.length - right - 1; + if (this.raw[r] !== other.raw[r]) + return right; + } + return right; + }; + Line.prototype.toBuffer = function() { + return Buffer.from(this.raw); + }; + function inlineDiff(a, b) { + return a.length === b.length && a.parts.length === 1 && b.parts.length === 1 && a.y === b.y && a.newline && b.newline && a.width === b.width; + } + function split(str, term) { + var y = 0; + var lines = str.split("\n"); + var wrapped = []; + var line; + for (var i = 0; i < lines.length; i++) { + line = new Line(lines[i], y, i < lines.length - 1, term); + y += line.height + (line.newline ? 1 : 0); + wrapped.push(line); + } + return wrapped; + } + function moveUp(n) { + return Buffer.from("1b5b" + toHex(n) + "41", "hex"); + } + function moveDown(n) { + return Buffer.from("1b5b" + toHex(n) + "42", "hex"); + } + function moveRight(n) { + return Buffer.from("1b5b" + toHex(n) + "43", "hex"); + } + function moveLeft(n) { + return Buffer.from("1b5b" + toHex(n) + "44", "hex"); + } + function length(parts) { + var len = 0; + for (var i = 0; i < parts.length; i += 2) { + len += parts[i].length; + } + return len; + } + function toHex(n) { + return Buffer.from("" + n).toString("hex"); + } + } +}); + +// ../default-reporter/lib/constants.js +var require_constants2 = __commonJS({ + "../default-reporter/lib/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.EOL = void 0; + exports2.EOL = "\n"; + } +}); + +// ../default-reporter/lib/mergeOutputs.js +var require_mergeOutputs = __commonJS({ + "../default-reporter/lib/mergeOutputs.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var constants_1 = require_constants2(); + function mergeOutputs(outputs) { + let blockNo = 0; + let fixedBlockNo = 0; + let started = false; + let previousOuput = null; + return Rx.merge(...outputs).pipe(operators_1.map((log2) => { + let currentBlockNo = -1; + let currentFixedBlockNo = -1; + return log2.pipe(operators_1.map((msg) => { + if (msg["fixed"]) { + if (currentFixedBlockNo === -1) { + currentFixedBlockNo = fixedBlockNo++; + } + return { + blockNo: currentFixedBlockNo, + fixed: true, + msg: msg.msg + }; + } + if (currentBlockNo === -1) { + currentBlockNo = blockNo++; + } + return { + blockNo: currentBlockNo, + fixed: false, + msg: typeof msg === "string" ? msg : msg.msg, + prevFixedBlockNo: currentFixedBlockNo + }; + })); + }), operators_1.mergeAll(), operators_1.scan((acc, log2) => { + if (log2.fixed) { + acc.fixedBlocks[log2.blockNo] = log2.msg; + } else { + delete acc.fixedBlocks[log2["prevFixedBlockNo"]]; + acc.blocks[log2.blockNo] = log2.msg; + } + return acc; + }, { fixedBlocks: [], blocks: [] }), operators_1.map((sections) => { + const fixedBlocks = sections.fixedBlocks.filter(Boolean); + const nonFixedPart = sections.blocks.filter(Boolean).join(constants_1.EOL); + if (fixedBlocks.length === 0) { + return nonFixedPart; + } + const fixedPart = fixedBlocks.join(constants_1.EOL); + if (!nonFixedPart) { + return fixedPart; + } + return `${nonFixedPart}${constants_1.EOL}${fixedPart}`; + }), operators_1.filter((msg) => { + if (started) { + return true; + } + if (msg === "") + return false; + started = true; + return true; + }), operators_1.filter((msg) => { + if (msg !== previousOuput) { + previousOuput = msg; + return true; + } + return false; + })); + } + exports2.default = mergeOutputs; + } +}); + +// ../../node_modules/.pnpm/pretty-bytes@5.6.0/node_modules/pretty-bytes/index.js +var require_pretty_bytes = __commonJS({ + "../../node_modules/.pnpm/pretty-bytes@5.6.0/node_modules/pretty-bytes/index.js"(exports2, module2) { + "use strict"; + var BYTE_UNITS = [ + "B", + "kB", + "MB", + "GB", + "TB", + "PB", + "EB", + "ZB", + "YB" + ]; + var BIBYTE_UNITS = [ + "B", + "kiB", + "MiB", + "GiB", + "TiB", + "PiB", + "EiB", + "ZiB", + "YiB" + ]; + var BIT_UNITS = [ + "b", + "kbit", + "Mbit", + "Gbit", + "Tbit", + "Pbit", + "Ebit", + "Zbit", + "Ybit" + ]; + var BIBIT_UNITS = [ + "b", + "kibit", + "Mibit", + "Gibit", + "Tibit", + "Pibit", + "Eibit", + "Zibit", + "Yibit" + ]; + var toLocaleString = (number, locale, options) => { + let result = number; + if (typeof locale === "string" || Array.isArray(locale)) { + result = number.toLocaleString(locale, options); + } else if (locale === true || options !== void 0) { + result = number.toLocaleString(void 0, options); + } + return result; + }; + module2.exports = (number, options) => { + if (!Number.isFinite(number)) { + throw new TypeError(`Expected a finite number, got ${typeof number}: ${number}`); + } + options = Object.assign({ bits: false, binary: false }, options); + const UNITS = options.bits ? options.binary ? BIBIT_UNITS : BIT_UNITS : options.binary ? BIBYTE_UNITS : BYTE_UNITS; + if (options.signed && number === 0) { + return ` 0 ${UNITS[0]}`; + } + const isNegative = number < 0; + const prefix = isNegative ? "-" : options.signed ? "+" : ""; + if (isNegative) { + number = -number; + } + let localeOptions; + if (options.minimumFractionDigits !== void 0) { + localeOptions = { minimumFractionDigits: options.minimumFractionDigits }; + } + if (options.maximumFractionDigits !== void 0) { + localeOptions = Object.assign({ maximumFractionDigits: options.maximumFractionDigits }, localeOptions); + } + if (number < 1) { + const numberString2 = toLocaleString(number, options.locale, localeOptions); + return prefix + numberString2 + " " + UNITS[0]; + } + const exponent = Math.min(Math.floor(options.binary ? Math.log(number) / Math.log(1024) : Math.log10(number) / 3), UNITS.length - 1); + number /= Math.pow(options.binary ? 1024 : 1e3, exponent); + if (!localeOptions) { + number = number.toPrecision(3); + } + const numberString = toLocaleString(Number(number), options.locale, localeOptions); + const unit = UNITS[exponent]; + return prefix + numberString + " " + unit; + }; + } +}); + +// ../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js +var require_color_name2 = __commonJS({ + "../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"(exports2, module2) { + "use strict"; + module2.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] + }; + } +}); + +// ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js +var require_conversions2 = __commonJS({ + "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js"(exports2, module2) { + var cssKeywords = require_color_name2(); + var reverseKeywords = {}; + for (const key of Object.keys(cssKeywords)) { + reverseKeywords[cssKeywords[key]] = key; + } + var convert = { + rgb: { channels: 3, labels: "rgb" }, + hsl: { channels: 3, labels: "hsl" }, + hsv: { channels: 3, labels: "hsv" }, + hwb: { channels: 3, labels: "hwb" }, + cmyk: { channels: 4, labels: "cmyk" }, + xyz: { channels: 3, labels: "xyz" }, + lab: { channels: 3, labels: "lab" }, + lch: { channels: 3, labels: "lch" }, + hex: { channels: 1, labels: ["hex"] }, + keyword: { channels: 1, labels: ["keyword"] }, + ansi16: { channels: 1, labels: ["ansi16"] }, + ansi256: { channels: 1, labels: ["ansi256"] }, + hcg: { channels: 3, labels: ["h", "c", "g"] }, + apple: { channels: 3, labels: ["r16", "g16", "b16"] }, + gray: { channels: 1, labels: ["gray"] } + }; + module2.exports = convert; + for (const model of Object.keys(convert)) { + if (!("channels" in convert[model])) { + throw new Error("missing channels property: " + model); + } + if (!("labels" in convert[model])) { + throw new Error("missing channel labels property: " + model); + } + if (convert[model].labels.length !== convert[model].channels) { + throw new Error("channel and label counts mismatch: " + model); + } + const { channels, labels } = convert[model]; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], "channels", { value: channels }); + Object.defineProperty(convert[model], "labels", { value: labels }); + } + convert.rgb.hsl = function(rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const min = Math.min(r, g, b); + const max = Math.max(r, g, b); + const delta = max - min; + let h; + let s; + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + h = Math.min(h * 60, 360); + if (h < 0) { + h += 360; + } + const l = (min + max) / 2; + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); + } + return [h, s * 100, l * 100]; + }; + convert.rgb.hsv = function(rgb) { + let rdif; + let gdif; + let bdif; + let h; + let s; + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const v = Math.max(r, g, b); + const diff = v - Math.min(r, g, b); + const diffc = function(c) { + return (v - c) / 6 / diff + 1 / 2; + }; + if (diff === 0) { + h = 0; + s = 0; + } else { + s = diff / v; + rdif = diffc(r); + gdif = diffc(g); + bdif = diffc(b); + if (r === v) { + h = bdif - gdif; + } else if (g === v) { + h = 1 / 3 + rdif - bdif; + } else if (b === v) { + h = 2 / 3 + gdif - rdif; + } + if (h < 0) { + h += 1; + } else if (h > 1) { + h -= 1; + } + } + return [ + h * 360, + s * 100, + v * 100 + ]; + }; + convert.rgb.hwb = function(rgb) { + const r = rgb[0]; + const g = rgb[1]; + let b = rgb[2]; + const h = convert.rgb.hsl(rgb)[0]; + const w = 1 / 255 * Math.min(r, Math.min(g, b)); + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + return [h, w * 100, b * 100]; + }; + convert.rgb.cmyk = function(rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const k = Math.min(1 - r, 1 - g, 1 - b); + const c = (1 - r - k) / (1 - k) || 0; + const m = (1 - g - k) / (1 - k) || 0; + const y = (1 - b - k) / (1 - k) || 0; + return [c * 100, m * 100, y * 100, k * 100]; + }; + function comparativeDistance(x, y) { + return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2; + } + convert.rgb.keyword = function(rgb) { + const reversed = reverseKeywords[rgb]; + if (reversed) { + return reversed; + } + let currentClosestDistance = Infinity; + let currentClosestKeyword; + for (const keyword of Object.keys(cssKeywords)) { + const value = cssKeywords[keyword]; + const distance = comparativeDistance(rgb, value); + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } + } + return currentClosestKeyword; + }; + convert.keyword.rgb = function(keyword) { + return cssKeywords[keyword]; + }; + convert.rgb.xyz = function(rgb) { + let r = rgb[0] / 255; + let g = rgb[1] / 255; + let b = rgb[2] / 255; + r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92; + g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92; + b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92; + const x = r * 0.4124 + g * 0.3576 + b * 0.1805; + const y = r * 0.2126 + g * 0.7152 + b * 0.0722; + const z = r * 0.0193 + g * 0.1192 + b * 0.9505; + return [x * 100, y * 100, z * 100]; + }; + convert.rgb.lab = function(rgb) { + const xyz = convert.rgb.xyz(rgb); + let x = xyz[0]; + let y = xyz[1]; + let z = xyz[2]; + x /= 95.047; + y /= 100; + z /= 108.883; + x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116; + y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116; + z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116; + const l = 116 * y - 16; + const a = 500 * (x - y); + const b = 200 * (y - z); + return [l, a, b]; + }; + convert.hsl.rgb = function(hsl) { + const h = hsl[0] / 360; + const s = hsl[1] / 100; + const l = hsl[2] / 100; + let t2; + let t3; + let val; + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + if (l < 0.5) { + t2 = l * (1 + s); + } else { + t2 = l + s - l * s; + } + const t1 = 2 * l - t2; + const rgb = [0, 0, 0]; + for (let i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + if (t3 < 0) { + t3++; + } + if (t3 > 1) { + t3--; + } + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + } else { + val = t1; + } + rgb[i] = val * 255; + } + return rgb; + }; + convert.hsl.hsv = function(hsl) { + const h = hsl[0]; + let s = hsl[1] / 100; + let l = hsl[2] / 100; + let smin = s; + const lmin = Math.max(l, 0.01); + l *= 2; + s *= l <= 1 ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + const v = (l + s) / 2; + const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s); + return [h, sv * 100, v * 100]; + }; + convert.hsv.rgb = function(hsv) { + const h = hsv[0] / 60; + const s = hsv[1] / 100; + let v = hsv[2] / 100; + const hi = Math.floor(h) % 6; + const f = h - Math.floor(h); + const p = 255 * v * (1 - s); + const q = 255 * v * (1 - s * f); + const t = 255 * v * (1 - s * (1 - f)); + v *= 255; + switch (hi) { + case 0: + return [v, t, p]; + case 1: + return [q, v, p]; + case 2: + return [p, v, t]; + case 3: + return [p, q, v]; + case 4: + return [t, p, v]; + case 5: + return [v, p, q]; + } + }; + convert.hsv.hsl = function(hsv) { + const h = hsv[0]; + const s = hsv[1] / 100; + const v = hsv[2] / 100; + const vmin = Math.max(v, 0.01); + let sl; + let l; + l = (2 - s) * v; + const lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= lmin <= 1 ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + return [h, sl * 100, l * 100]; + }; + convert.hwb.rgb = function(hwb) { + const h = hwb[0] / 360; + let wh = hwb[1] / 100; + let bl = hwb[2] / 100; + const ratio = wh + bl; + let f; + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + const i = Math.floor(6 * h); + const v = 1 - bl; + f = 6 * h - i; + if ((i & 1) !== 0) { + f = 1 - f; + } + const n = wh + f * (v - wh); + let r; + let g; + let b; + switch (i) { + default: + case 6: + case 0: + r = v; + g = n; + b = wh; + break; + case 1: + r = n; + g = v; + b = wh; + break; + case 2: + r = wh; + g = v; + b = n; + break; + case 3: + r = wh; + g = n; + b = v; + break; + case 4: + r = n; + g = wh; + b = v; + break; + case 5: + r = v; + g = wh; + b = n; + break; + } + return [r * 255, g * 255, b * 255]; + }; + convert.cmyk.rgb = function(cmyk) { + const c = cmyk[0] / 100; + const m = cmyk[1] / 100; + const y = cmyk[2] / 100; + const k = cmyk[3] / 100; + const r = 1 - Math.min(1, c * (1 - k) + k); + const g = 1 - Math.min(1, m * (1 - k) + k); + const b = 1 - Math.min(1, y * (1 - k) + k); + return [r * 255, g * 255, b * 255]; + }; + convert.xyz.rgb = function(xyz) { + const x = xyz[0] / 100; + const y = xyz[1] / 100; + const z = xyz[2] / 100; + let r; + let g; + let b; + r = x * 3.2406 + y * -1.5372 + z * -0.4986; + g = x * -0.9689 + y * 1.8758 + z * 0.0415; + b = x * 0.0557 + y * -0.204 + z * 1.057; + r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92; + g = g > 31308e-7 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92; + b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92; + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + return [r * 255, g * 255, b * 255]; + }; + convert.xyz.lab = function(xyz) { + let x = xyz[0]; + let y = xyz[1]; + let z = xyz[2]; + x /= 95.047; + y /= 100; + z /= 108.883; + x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116; + y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116; + z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116; + const l = 116 * y - 16; + const a = 500 * (x - y); + const b = 200 * (y - z); + return [l, a, b]; + }; + convert.lab.xyz = function(lab) { + const l = lab[0]; + const a = lab[1]; + const b = lab[2]; + let x; + let y; + let z; + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + const y2 = y ** 3; + const x2 = x ** 3; + const z2 = z ** 3; + y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787; + x *= 95.047; + y *= 100; + z *= 108.883; + return [x, y, z]; + }; + convert.lab.lch = function(lab) { + const l = lab[0]; + const a = lab[1]; + const b = lab[2]; + let h; + const hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + if (h < 0) { + h += 360; + } + const c = Math.sqrt(a * a + b * b); + return [l, c, h]; + }; + convert.lch.lab = function(lch) { + const l = lch[0]; + const c = lch[1]; + const h = lch[2]; + const hr = h / 360 * 2 * Math.PI; + const a = c * Math.cos(hr); + const b = c * Math.sin(hr); + return [l, a, b]; + }; + convert.rgb.ansi16 = function(args2, saturation = null) { + const [r, g, b] = args2; + let value = saturation === null ? convert.rgb.hsv(args2)[2] : saturation; + value = Math.round(value / 50); + if (value === 0) { + return 30; + } + let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255)); + if (value === 2) { + ansi += 60; + } + return ansi; + }; + convert.hsv.ansi16 = function(args2) { + return convert.rgb.ansi16(convert.hsv.rgb(args2), args2[2]); + }; + convert.rgb.ansi256 = function(args2) { + const r = args2[0]; + const g = args2[1]; + const b = args2[2]; + if (r === g && g === b) { + if (r < 8) { + return 16; + } + if (r > 248) { + return 231; + } + return Math.round((r - 8) / 247 * 24) + 232; + } + const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5); + return ansi; + }; + convert.ansi16.rgb = function(args2) { + let color = args2 % 10; + if (color === 0 || color === 7) { + if (args2 > 50) { + color += 3.5; + } + color = color / 10.5 * 255; + return [color, color, color]; + } + const mult = (~~(args2 > 50) + 1) * 0.5; + const r = (color & 1) * mult * 255; + const g = (color >> 1 & 1) * mult * 255; + const b = (color >> 2 & 1) * mult * 255; + return [r, g, b]; + }; + convert.ansi256.rgb = function(args2) { + if (args2 >= 232) { + const c = (args2 - 232) * 10 + 8; + return [c, c, c]; + } + args2 -= 16; + let rem; + const r = Math.floor(args2 / 36) / 5 * 255; + const g = Math.floor((rem = args2 % 36) / 6) / 5 * 255; + const b = rem % 6 / 5 * 255; + return [r, g, b]; + }; + convert.rgb.hex = function(args2) { + const integer = ((Math.round(args2[0]) & 255) << 16) + ((Math.round(args2[1]) & 255) << 8) + (Math.round(args2[2]) & 255); + const string = integer.toString(16).toUpperCase(); + return "000000".substring(string.length) + string; + }; + convert.hex.rgb = function(args2) { + const match = args2.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + if (!match) { + return [0, 0, 0]; + } + let colorString = match[0]; + if (match[0].length === 3) { + colorString = colorString.split("").map((char) => { + return char + char; + }).join(""); + } + const integer = parseInt(colorString, 16); + const r = integer >> 16 & 255; + const g = integer >> 8 & 255; + const b = integer & 255; + return [r, g, b]; + }; + convert.rgb.hcg = function(rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const max = Math.max(Math.max(r, g), b); + const min = Math.min(Math.min(r, g), b); + const chroma = max - min; + let grayscale; + let hue; + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; + } + if (chroma <= 0) { + hue = 0; + } else if (max === r) { + hue = (g - b) / chroma % 6; + } else if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma; + } + hue /= 6; + hue %= 1; + return [hue * 360, chroma * 100, grayscale * 100]; + }; + convert.hsl.hcg = function(hsl) { + const s = hsl[1] / 100; + const l = hsl[2] / 100; + const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l); + let f = 0; + if (c < 1) { + f = (l - 0.5 * c) / (1 - c); + } + return [hsl[0], c * 100, f * 100]; + }; + convert.hsv.hcg = function(hsv) { + const s = hsv[1] / 100; + const v = hsv[2] / 100; + const c = s * v; + let f = 0; + if (c < 1) { + f = (v - c) / (1 - c); + } + return [hsv[0], c * 100, f * 100]; + }; + convert.hcg.rgb = function(hcg) { + const h = hcg[0] / 360; + const c = hcg[1] / 100; + const g = hcg[2] / 100; + if (c === 0) { + return [g * 255, g * 255, g * 255]; + } + const pure = [0, 0, 0]; + const hi = h % 1 * 6; + const v = hi % 1; + const w = 1 - v; + let mg = 0; + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; + pure[1] = v; + pure[2] = 0; + break; + case 1: + pure[0] = w; + pure[1] = 1; + pure[2] = 0; + break; + case 2: + pure[0] = 0; + pure[1] = 1; + pure[2] = v; + break; + case 3: + pure[0] = 0; + pure[1] = w; + pure[2] = 1; + break; + case 4: + pure[0] = v; + pure[1] = 0; + pure[2] = 1; + break; + default: + pure[0] = 1; + pure[1] = 0; + pure[2] = w; + } + mg = (1 - c) * g; + return [ + (c * pure[0] + mg) * 255, + (c * pure[1] + mg) * 255, + (c * pure[2] + mg) * 255 + ]; + }; + convert.hcg.hsv = function(hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + const v = c + g * (1 - c); + let f = 0; + if (v > 0) { + f = c / v; + } + return [hcg[0], f * 100, v * 100]; + }; + convert.hcg.hsl = function(hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + const l = g * (1 - c) + 0.5 * c; + let s = 0; + if (l > 0 && l < 0.5) { + s = c / (2 * l); + } else if (l >= 0.5 && l < 1) { + s = c / (2 * (1 - l)); + } + return [hcg[0], s * 100, l * 100]; + }; + convert.hcg.hwb = function(hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + const v = c + g * (1 - c); + return [hcg[0], (v - c) * 100, (1 - v) * 100]; + }; + convert.hwb.hcg = function(hwb) { + const w = hwb[1] / 100; + const b = hwb[2] / 100; + const v = 1 - b; + const c = v - w; + let g = 0; + if (c < 1) { + g = (v - c) / (1 - c); + } + return [hwb[0], c * 100, g * 100]; + }; + convert.apple.rgb = function(apple) { + return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255]; + }; + convert.rgb.apple = function(rgb) { + return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535]; + }; + convert.gray.rgb = function(args2) { + return [args2[0] / 100 * 255, args2[0] / 100 * 255, args2[0] / 100 * 255]; + }; + convert.gray.hsl = function(args2) { + return [0, 0, args2[0]]; + }; + convert.gray.hsv = convert.gray.hsl; + convert.gray.hwb = function(gray) { + return [0, 100, gray[0]]; + }; + convert.gray.cmyk = function(gray) { + return [0, 0, 0, gray[0]]; + }; + convert.gray.lab = function(gray) { + return [gray[0], 0, 0]; + }; + convert.gray.hex = function(gray) { + const val = Math.round(gray[0] / 100 * 255) & 255; + const integer = (val << 16) + (val << 8) + val; + const string = integer.toString(16).toUpperCase(); + return "000000".substring(string.length) + string; + }; + convert.rgb.gray = function(rgb) { + const val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; + }; + } +}); + +// ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js +var require_route2 = __commonJS({ + "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js"(exports2, module2) { + var conversions = require_conversions2(); + function buildGraph() { + const graph = {}; + const models = Object.keys(conversions); + for (let len = models.length, i = 0; i < len; i++) { + graph[models[i]] = { + distance: -1, + parent: null + }; + } + return graph; + } + function deriveBFS(fromModel) { + const graph = buildGraph(); + const queue = [fromModel]; + graph[fromModel].distance = 0; + while (queue.length) { + const current = queue.pop(); + const adjacents = Object.keys(conversions[current]); + for (let len = adjacents.length, i = 0; i < len; i++) { + const adjacent = adjacents[i]; + const node = graph[adjacent]; + if (node.distance === -1) { + node.distance = graph[current].distance + 1; + node.parent = current; + queue.unshift(adjacent); + } + } + } + return graph; + } + function link(from, to) { + return function(args2) { + return to(from(args2)); + }; + } + function wrapConversion(toModel, graph) { + const path = [graph[toModel].parent, toModel]; + let fn2 = conversions[graph[toModel].parent][toModel]; + let cur = graph[toModel].parent; + while (graph[cur].parent) { + path.unshift(graph[cur].parent); + fn2 = link(conversions[graph[cur].parent][cur], fn2); + cur = graph[cur].parent; + } + fn2.conversion = path; + return fn2; + } + module2.exports = function(fromModel) { + const graph = deriveBFS(fromModel); + const conversion = {}; + const models = Object.keys(graph); + for (let len = models.length, i = 0; i < len; i++) { + const toModel = models[i]; + const node = graph[toModel]; + if (node.parent === null) { + continue; + } + conversion[toModel] = wrapConversion(toModel, graph); + } + return conversion; + }; + } +}); + +// ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js +var require_color_convert2 = __commonJS({ + "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js"(exports2, module2) { + var conversions = require_conversions2(); + var route = require_route2(); + var convert = {}; + var models = Object.keys(conversions); + function wrapRaw(fn2) { + const wrappedFn = function(...args2) { + const arg0 = args2[0]; + if (arg0 === void 0 || arg0 === null) { + return arg0; + } + if (arg0.length > 1) { + args2 = arg0; + } + return fn2(args2); + }; + if ("conversion" in fn2) { + wrappedFn.conversion = fn2.conversion; + } + return wrappedFn; + } + function wrapRounded(fn2) { + const wrappedFn = function(...args2) { + const arg0 = args2[0]; + if (arg0 === void 0 || arg0 === null) { + return arg0; + } + if (arg0.length > 1) { + args2 = arg0; + } + const result = fn2(args2); + if (typeof result === "object") { + for (let len = result.length, i = 0; i < len; i++) { + result[i] = Math.round(result[i]); + } + } + return result; + }; + if ("conversion" in fn2) { + wrappedFn.conversion = fn2.conversion; + } + return wrappedFn; + } + models.forEach((fromModel) => { + convert[fromModel] = {}; + Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels }); + Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels }); + const routes = route(fromModel); + const routeModels = Object.keys(routes); + routeModels.forEach((toModel) => { + const fn2 = routes[toModel]; + convert[fromModel][toModel] = wrapRounded(fn2); + convert[fromModel][toModel].raw = wrapRaw(fn2); + }); + }); + module2.exports = convert; + } +}); + +// ../../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js +var require_ansi_styles2 = __commonJS({ + "../../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js"(exports2, module2) { + "use strict"; + var wrapAnsi16 = (fn2, offset) => (...args2) => { + const code = fn2(...args2); + return `[${code + offset}m`; + }; + var wrapAnsi256 = (fn2, offset) => (...args2) => { + const code = fn2(...args2); + return `[${38 + offset};5;${code}m`; + }; + var wrapAnsi16m = (fn2, offset) => (...args2) => { + const rgb = fn2(...args2); + return `[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; + }; + var ansi2ansi = (n) => n; + var rgb2rgb = (r, g, b) => [r, g, b]; + var setLazyProperty = (object, property, get) => { + Object.defineProperty(object, property, { + get: () => { + const value = get(); + Object.defineProperty(object, property, { + value, + enumerable: true, + configurable: true + }); + return value; + }, + enumerable: true, + configurable: true + }); + }; + var colorConvert; + var makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { + if (colorConvert === void 0) { + colorConvert = require_color_convert2(); + } + const offset = isBackground ? 10 : 0; + const styles = {}; + for (const [sourceSpace, suite] of Object.entries(colorConvert)) { + const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace; + if (sourceSpace === targetSpace) { + styles[name] = wrap(identity, offset); + } else if (typeof suite === "object") { + styles[name] = wrap(suite[targetSpace], offset); + } + } + return styles; + }; + function assembleStyles() { + const codes = new Map(); + const styles = { + modifier: { + reset: [0, 0], + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + blackBright: [90, 39], + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; + styles.color.gray = styles.color.blackBright; + styles.bgColor.bgGray = styles.bgColor.bgBlackBright; + styles.color.grey = styles.color.blackBright; + styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; + for (const [groupName, group] of Object.entries(styles)) { + for (const [styleName, style] of Object.entries(group)) { + styles[styleName] = { + open: `[${style[0]}m`, + close: `[${style[1]}m` + }; + group[styleName] = styles[styleName]; + codes.set(style[0], style[1]); + } + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + } + Object.defineProperty(styles, "codes", { + value: codes, + enumerable: false + }); + styles.color.close = ""; + styles.bgColor.close = ""; + setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false)); + setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false)); + setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false)); + setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true)); + setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true)); + setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true)); + return styles; + } + Object.defineProperty(module2, "exports", { + enumerable: true, + get: assembleStyles + }); + } +}); + +// ../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js +var require_has_flag2 = __commonJS({ + "../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports2, module2) { + "use strict"; + module2.exports = (flag, argv2 = process.argv) => { + const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; + const position = argv2.indexOf(prefix + flag); + const terminatorPosition = argv2.indexOf("--"); + return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); + }; + } +}); + +// ../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js +var require_supports_color2 = __commonJS({ + "../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports2, module2) { + "use strict"; + var os = require("os"); + var tty = require("tty"); + var hasFlag = require_has_flag2(); + var { env } = process; + var forceColor; + if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { + forceColor = 0; + } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { + forceColor = 1; + } + if ("FORCE_COLOR" in env) { + if (env.FORCE_COLOR === "true") { + forceColor = 1; + } else if (env.FORCE_COLOR === "false") { + forceColor = 0; + } else { + forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); + } + } + function translateLevel(level) { + if (level === 0) { + return false; + } + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; + } + function supportsColor(haveStream, streamIsTTY) { + if (forceColor === 0) { + return 0; + } + if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { + return 3; + } + if (hasFlag("color=256")) { + return 2; + } + if (haveStream && !streamIsTTY && forceColor === void 0) { + return 0; + } + const min = forceColor || 0; + if (env.TERM === "dumb") { + return min; + } + if (process.platform === "win32") { + const osRelease = os.release().split("."); + if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + return 1; + } + if ("CI" in env) { + if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") { + return 1; + } + return min; + } + if ("TEAMCITY_VERSION" in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + if (env.COLORTERM === "truecolor") { + return 3; + } + if ("TERM_PROGRAM" in env) { + const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); + switch (env.TERM_PROGRAM) { + case "iTerm.app": + return version >= 3 ? 3 : 2; + case "Apple_Terminal": + return 2; + } + } + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + if ("COLORTERM" in env) { + return 1; + } + return min; + } + function getSupportLevel(stream) { + const level = supportsColor(stream, stream && stream.isTTY); + return translateLevel(level); + } + module2.exports = { + supportsColor: getSupportLevel, + stdout: translateLevel(supportsColor(true, tty.isatty(1))), + stderr: translateLevel(supportsColor(true, tty.isatty(2))) + }; + } +}); + +// ../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js +var require_util2 = __commonJS({ + "../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js"(exports2, module2) { + "use strict"; + var stringReplaceAll = (string, substring, replacer) => { + let index = string.indexOf(substring); + if (index === -1) { + return string; + } + const substringLength = substring.length; + let endIndex = 0; + let returnValue = ""; + do { + returnValue += string.substr(endIndex, index - endIndex) + substring + replacer; + endIndex = index + substringLength; + index = string.indexOf(substring, endIndex); + } while (index !== -1); + returnValue += string.substr(endIndex); + return returnValue; + }; + var stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => { + let endIndex = 0; + let returnValue = ""; + do { + const gotCR = string[index - 1] === "\r"; + returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix; + endIndex = index + 1; + index = string.indexOf("\n", endIndex); + } while (index !== -1); + returnValue += string.substr(endIndex); + return returnValue; + }; + module2.exports = { + stringReplaceAll, + stringEncaseCRLFWithFirstIndex + }; + } +}); + +// ../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js +var require_templates2 = __commonJS({ + "../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js"(exports2, module2) { + "use strict"; + var TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; + var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; + var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; + var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi; + var ESCAPES = new Map([ + ["n", "\n"], + ["r", "\r"], + ["t", " "], + ["b", "\b"], + ["f", "\f"], + ["v", "\v"], + ["0", "\0"], + ["\\", "\\"], + ["e", ""], + ["a", "\x07"] + ]); + function unescape2(c) { + const u = c[0] === "u"; + const bracket = c[1] === "{"; + if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) { + return String.fromCharCode(parseInt(c.slice(1), 16)); + } + if (u && bracket) { + return String.fromCodePoint(parseInt(c.slice(2, -1), 16)); + } + return ESCAPES.get(c) || c; + } + function parseArguments(name, arguments_) { + const results = []; + const chunks = arguments_.trim().split(/\s*,\s*/g); + let matches; + for (const chunk of chunks) { + const number = Number(chunk); + if (!Number.isNaN(number)) { + results.push(number); + } else if (matches = chunk.match(STRING_REGEX)) { + results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape2(escape) : character)); + } else { + throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); + } + } + return results; + } + function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + const results = []; + let matches; + while ((matches = STYLE_REGEX.exec(style)) !== null) { + const name = matches[1]; + if (matches[2]) { + const args2 = parseArguments(name, matches[2]); + results.push([name].concat(args2)); + } else { + results.push([name]); + } + } + return results; + } + function buildStyle(chalk, styles) { + const enabled = {}; + for (const layer of styles) { + for (const style of layer.styles) { + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } + } + let current = chalk; + for (const [styleName, styles2] of Object.entries(enabled)) { + if (!Array.isArray(styles2)) { + continue; + } + if (!(styleName in current)) { + throw new Error(`Unknown Chalk style: ${styleName}`); + } + current = styles2.length > 0 ? current[styleName](...styles2) : current[styleName]; + } + return current; + } + module2.exports = (chalk, temporary) => { + const styles = []; + const chunks = []; + let chunk = []; + temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => { + if (escapeCharacter) { + chunk.push(unescape2(escapeCharacter)); + } else if (style) { + const string = chunk.join(""); + chunk = []; + chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string)); + styles.push({ inverse, styles: parseStyle(style) }); + } else if (close) { + if (styles.length === 0) { + throw new Error("Found extraneous } in Chalk template literal"); + } + chunks.push(buildStyle(chalk, styles)(chunk.join(""))); + chunk = []; + styles.pop(); + } else { + chunk.push(character); + } + }); + chunks.push(chunk.join("")); + if (styles.length > 0) { + const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`; + throw new Error(errMessage); + } + return chunks.join(""); + }; + } +}); + +// ../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js +var require_source = __commonJS({ + "../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js"(exports2, module2) { + "use strict"; + var ansiStyles = require_ansi_styles2(); + var { stdout: stdoutColor, stderr: stderrColor } = require_supports_color2(); + var { + stringReplaceAll, + stringEncaseCRLFWithFirstIndex + } = require_util2(); + var { isArray } = Array; + var levelMapping = [ + "ansi", + "ansi", + "ansi256", + "ansi16m" + ]; + var styles = Object.create(null); + var applyOptions = (object, options = {}) => { + if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) { + throw new Error("The `level` option should be an integer from 0 to 3"); + } + const colorLevel = stdoutColor ? stdoutColor.level : 0; + object.level = options.level === void 0 ? colorLevel : options.level; + }; + var ChalkClass = class { + constructor(options) { + return chalkFactory(options); + } + }; + var chalkFactory = (options) => { + const chalk2 = {}; + applyOptions(chalk2, options); + chalk2.template = (...arguments_) => chalkTag(chalk2.template, ...arguments_); + Object.setPrototypeOf(chalk2, Chalk.prototype); + Object.setPrototypeOf(chalk2.template, chalk2); + chalk2.template.constructor = () => { + throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead."); + }; + chalk2.template.Instance = ChalkClass; + return chalk2.template; + }; + function Chalk(options) { + return chalkFactory(options); + } + for (const [styleName, style] of Object.entries(ansiStyles)) { + styles[styleName] = { + get() { + const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty); + Object.defineProperty(this, styleName, { value: builder }); + return builder; + } + }; + } + styles.visible = { + get() { + const builder = createBuilder(this, this._styler, true); + Object.defineProperty(this, "visible", { value: builder }); + return builder; + } + }; + var usedModels = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"]; + for (const model of usedModels) { + styles[model] = { + get() { + const { level } = this; + return function(...arguments_) { + const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler); + return createBuilder(this, styler, this._isEmpty); + }; + } + }; + } + for (const model of usedModels) { + const bgModel = "bg" + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + const { level } = this; + return function(...arguments_) { + const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler); + return createBuilder(this, styler, this._isEmpty); + }; + } + }; + } + var proto = Object.defineProperties(() => { + }, { + ...styles, + level: { + enumerable: true, + get() { + return this._generator.level; + }, + set(level) { + this._generator.level = level; + } + } + }); + var createStyler = (open, close, parent) => { + let openAll; + let closeAll; + if (parent === void 0) { + openAll = open; + closeAll = close; + } else { + openAll = parent.openAll + open; + closeAll = close + parent.closeAll; + } + return { + open, + close, + openAll, + closeAll, + parent + }; + }; + var createBuilder = (self2, _styler, _isEmpty) => { + const builder = (...arguments_) => { + if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) { + return applyStyle(builder, chalkTag(builder, ...arguments_)); + } + return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" ")); + }; + Object.setPrototypeOf(builder, proto); + builder._generator = self2; + builder._styler = _styler; + builder._isEmpty = _isEmpty; + return builder; + }; + var applyStyle = (self2, string) => { + if (self2.level <= 0 || !string) { + return self2._isEmpty ? "" : string; + } + let styler = self2._styler; + if (styler === void 0) { + return string; + } + const { openAll, closeAll } = styler; + if (string.indexOf("") !== -1) { + while (styler !== void 0) { + string = stringReplaceAll(string, styler.close, styler.open); + styler = styler.parent; + } + } + const lfIndex = string.indexOf("\n"); + if (lfIndex !== -1) { + string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex); + } + return openAll + string + closeAll; + }; + var template; + var chalkTag = (chalk2, ...strings) => { + const [firstString] = strings; + if (!isArray(firstString) || !isArray(firstString.raw)) { + return strings.join(" "); + } + const arguments_ = strings.slice(1); + const parts = [firstString.raw[0]]; + for (let i = 1; i < firstString.length; i++) { + parts.push(String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"), String(firstString.raw[i])); + } + if (template === void 0) { + template = require_templates2(); + } + return template(chalk2, parts.join("")); + }; + Object.defineProperties(Chalk.prototype, styles); + var chalk = Chalk(); + chalk.supportsColor = stdoutColor; + chalk.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 }); + chalk.stderr.supportsColor = stderrColor; + module2.exports = chalk; + } +}); + +// ../default-reporter/lib/reporterForClient/outputConstants.js +var require_outputConstants = __commonJS({ + "../default-reporter/lib/reporterForClient/outputConstants.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.REMOVED_CHAR = exports2.ADDED_CHAR = exports2.hlPkgId = exports2.hlValue = exports2.PREFIX_MAX_LENGTH = void 0; + var chalk_1 = __importDefault(require_source()); + exports2.PREFIX_MAX_LENGTH = 40; + exports2.hlValue = chalk_1.default.cyanBright; + exports2.hlPkgId = chalk_1.default["whiteBright"]; + exports2.ADDED_CHAR = chalk_1.default.green("+"); + exports2.REMOVED_CHAR = chalk_1.default.red("-"); + } +}); + +// ../default-reporter/lib/reporterForClient/reportBigTarballsProgress.js +var require_reportBigTarballsProgress = __commonJS({ + "../default-reporter/lib/reporterForClient/reportBigTarballsProgress.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var operators_1 = require_operators(); + var pretty_bytes_1 = __importDefault(require_pretty_bytes()); + var outputConstants_1 = require_outputConstants(); + var BIG_TARBALL_SIZE = 1024 * 1024 * 5; + exports2.default = (log$) => { + return log$.fetchingProgress.pipe(operators_1.filter((log2) => log2.status === "started" && typeof log2.size === "number" && log2.size >= BIG_TARBALL_SIZE && log2.attempt === 1), operators_1.map((startedLog) => { + const size = pretty_bytes_1.default(startedLog["size"]); + return log$.fetchingProgress.pipe(operators_1.filter((log2) => log2.status === "in_progress" && log2.packageId === startedLog["packageId"]), operators_1.map((log2) => log2["downloaded"]), operators_1.startWith(0), operators_1.map((downloadedRaw) => { + const done = startedLog["size"] === downloadedRaw; + const downloaded = pretty_bytes_1.default(downloadedRaw); + return { + fixed: !done, + msg: `Downloading ${outputConstants_1.hlPkgId(startedLog["packageId"])}: ${outputConstants_1.hlValue(downloaded)}/${outputConstants_1.hlValue(size)}${done ? ", done" : ""}` + }; + })); + })); + }; + } +}); + +// ../../node_modules/.pnpm/normalize-path@3.0.0/node_modules/normalize-path/index.js +var require_normalize_path = __commonJS({ + "../../node_modules/.pnpm/normalize-path@3.0.0/node_modules/normalize-path/index.js"(exports2, module2) { + module2.exports = function(path, stripTrailing) { + if (typeof path !== "string") { + throw new TypeError("expected path to be a string"); + } + if (path === "\\" || path === "/") + return "/"; + var len = path.length; + if (len <= 1) + return path; + var prefix = ""; + if (len > 4 && path[3] === "\\") { + var ch = path[2]; + if ((ch === "?" || ch === ".") && path.slice(0, 2) === "\\\\") { + path = path.slice(2); + prefix = "//"; + } + } + var segs = path.split(/[/\\]+/); + if (stripTrailing !== false && segs[segs.length - 1] === "") { + segs.pop(); + } + return prefix + segs.join("/"); + }; + } +}); + +// ../default-reporter/lib/reporterForClient/reportContext.js +var require_reportContext = __commonJS({ + "../default-reporter/lib/reporterForClient/reportContext.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var normalize_path_1 = __importDefault(require_normalize_path()); + exports2.default = (log$, opts) => { + return Rx.combineLatest(log$.context.pipe(operators_1.take(1)), log$.packageImportMethod.pipe(operators_1.take(1))).pipe(operators_1.map(([context, packageImportMethod]) => { + if (context.currentLockfileExists) { + return Rx.NEVER; + } + let method; + switch (packageImportMethod.method) { + case "copy": + method = "copied"; + break; + case "clone": + method = "cloned"; + break; + case "hardlink": + method = "hard linked"; + break; + default: + method = packageImportMethod.method; + break; + } + return Rx.of({ + msg: `Packages are ${method} from the content-addressable store to the virtual store. + Content-addressable store is at: ${context.storeDir} + Virtual store is at: ${normalize_path_1.default(path_1.default.relative(opts.cwd, context.virtualStoreDir))}` + }); + })); + }; + } +}); + +// ../default-reporter/lib/reporterForClient/utils/formatWarn.js +var require_formatWarn = __commonJS({ + "../default-reporter/lib/reporterForClient/utils/formatWarn.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var chalk_1 = __importDefault(require_source()); + function formatWarn(message2) { + return `${chalk_1.default.bgYellow.black("\u2009WARN\u2009")} ${message2}`; + } + exports2.default = formatWarn; + } +}); + +// ../../node_modules/.pnpm/right-pad@1.0.1/node_modules/right-pad/rightpad.js +var require_rightpad = __commonJS({ + "../../node_modules/.pnpm/right-pad@1.0.1/node_modules/right-pad/rightpad.js"(exports2, module2) { + "use strict"; + exports2 = module2.exports = function rightPad(_string, _length, _char) { + if (typeof _string !== "string") { + throw new Error("The string parameter must be a string."); + } + if (_string.length < 1) { + throw new Error("The string parameter must be 1 character or longer."); + } + if (typeof _length !== "number") { + throw new Error("The length parameter must be a number."); + } + if (typeof _char !== "string" && _char) { + throw new Error("The character parameter must be a string."); + } + var i = -1; + _length = _length - _string.length; + if (!_char && _char !== 0) { + _char = " "; + } + while (++i < _length) { + _string += _char; + } + return _string; + }; + } +}); + +// ../default-reporter/lib/reporterForClient/utils/formatPrefix.js +var require_formatPrefix = __commonJS({ + "../default-reporter/lib/reporterForClient/utils/formatPrefix.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.formatPrefixNoTrim = void 0; + var path_1 = __importDefault(require("path")); + var normalize_path_1 = __importDefault(require_normalize_path()); + var outputConstants_1 = require_outputConstants(); + function formatPrefix(cwd, prefix) { + prefix = formatPrefixNoTrim(cwd, prefix); + if (prefix.length <= outputConstants_1.PREFIX_MAX_LENGTH) { + return prefix; + } + const shortPrefix = prefix.substr(-outputConstants_1.PREFIX_MAX_LENGTH + 3); + const separatorLocation = shortPrefix.indexOf("/"); + if (separatorLocation <= 0) { + return `...${shortPrefix}`; + } + return `...${shortPrefix.substr(separatorLocation)}`; + } + exports2.default = formatPrefix; + function formatPrefixNoTrim(cwd, prefix) { + return normalize_path_1.default(path_1.default.relative(cwd, prefix) || "."); + } + exports2.formatPrefixNoTrim = formatPrefixNoTrim; + } +}); + +// ../default-reporter/lib/reporterForClient/utils/zooming.js +var require_zooming = __commonJS({ + "../default-reporter/lib/reporterForClient/utils/zooming.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.zoomOut = exports2.autozoom = void 0; + var right_pad_1 = __importDefault(require_rightpad()); + var outputConstants_1 = require_outputConstants(); + var formatPrefix_1 = __importDefault(require_formatPrefix()); + function autozoom(currentPrefix, logPrefix, line, opts) { + if (!logPrefix || !opts.zoomOutCurrent && currentPrefix === logPrefix) { + return line; + } + return zoomOut(currentPrefix, logPrefix, line); + } + exports2.autozoom = autozoom; + function zoomOut(currentPrefix, logPrefix, line) { + return `${right_pad_1.default(formatPrefix_1.default(currentPrefix, logPrefix), outputConstants_1.PREFIX_MAX_LENGTH)} | ${line}`; + } + exports2.zoomOut = zoomOut; + } +}); + +// ../default-reporter/lib/reporterForClient/reportDeprecations.js +var require_reportDeprecations = __commonJS({ + "../default-reporter/lib/reporterForClient/reportDeprecations.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var chalk_1 = __importDefault(require_source()); + var formatWarn_1 = __importDefault(require_formatWarn()); + var zooming_1 = require_zooming(); + exports2.default = (deprecation$, opts) => { + return deprecation$.pipe(operators_1.filter((log2) => log2.depth === 0), operators_1.map((log2) => { + if (!opts.isRecursive && log2.prefix === opts.cwd) { + return Rx.of({ + msg: formatWarn_1.default(`${chalk_1.default.red("deprecated")} ${log2.pkgName}@${log2.pkgVersion}: ${log2.deprecated}`) + }); + } + return Rx.of({ + msg: zooming_1.zoomOut(opts.cwd, log2.prefix, formatWarn_1.default(`${chalk_1.default.red("deprecated")} ${log2.pkgName}@${log2.pkgVersion}`)) + }); + })); + }; + } +}); + +// ../default-reporter/lib/reporterForClient/reportHooks.js +var require_reportHooks = __commonJS({ + "../default-reporter/lib/reporterForClient/reportHooks.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var chalk_1 = __importDefault(require_source()); + var zooming_1 = require_zooming(); + exports2.default = (hook$, opts) => { + return hook$.pipe(operators_1.map((log2) => Rx.of({ + msg: zooming_1.autozoom(opts.cwd, log2.prefix, `${chalk_1.default.magentaBright(log2.hook)}: ${log2.message}`, { + zoomOutCurrent: opts.isRecursive + }) + }))); + }; + } +}); + +// ../default-reporter/lib/reporterForClient/reportInstallChecks.js +var require_reportInstallChecks = __commonJS({ + "../default-reporter/lib/reporterForClient/reportInstallChecks.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var formatWarn_1 = __importDefault(require_formatWarn()); + var zooming_1 = require_zooming(); + exports2.default = (installCheck$, opts) => { + return installCheck$.pipe(operators_1.map((log2) => formatInstallCheck(opts.cwd, log2)), operators_1.filter(Boolean), operators_1.map((msg) => Rx.of({ msg }))); + }; + function formatInstallCheck(currentPrefix, logObj, opts) { + var _a; + const zoomOutCurrent = (_a = opts === null || opts === void 0 ? void 0 : opts.zoomOutCurrent) !== null && _a !== void 0 ? _a : false; + switch (logObj.code) { + case "EBADPLATFORM": + return zooming_1.autozoom(currentPrefix, logObj["prefix"], formatWarn_1.default(`Unsupported system. Skipping dependency ${logObj.pkgId}`), { zoomOutCurrent }); + case "ENOTSUP": + return zooming_1.autozoom(currentPrefix, logObj["prefix"], logObj.toString(), { zoomOutCurrent }); + default: + return void 0; + } + } + } +}); + +// ../../node_modules/.pnpm/parse-ms@2.1.0/node_modules/parse-ms/index.js +var require_parse_ms = __commonJS({ + "../../node_modules/.pnpm/parse-ms@2.1.0/node_modules/parse-ms/index.js"(exports2, module2) { + "use strict"; + module2.exports = (milliseconds) => { + if (typeof milliseconds !== "number") { + throw new TypeError("Expected a number"); + } + const roundTowardsZero = milliseconds > 0 ? Math.floor : Math.ceil; + return { + days: roundTowardsZero(milliseconds / 864e5), + hours: roundTowardsZero(milliseconds / 36e5) % 24, + minutes: roundTowardsZero(milliseconds / 6e4) % 60, + seconds: roundTowardsZero(milliseconds / 1e3) % 60, + milliseconds: roundTowardsZero(milliseconds) % 1e3, + microseconds: roundTowardsZero(milliseconds * 1e3) % 1e3, + nanoseconds: roundTowardsZero(milliseconds * 1e6) % 1e3 + }; + }; + } +}); + +// ../../node_modules/.pnpm/pretty-ms@7.0.1/node_modules/pretty-ms/index.js +var require_pretty_ms = __commonJS({ + "../../node_modules/.pnpm/pretty-ms@7.0.1/node_modules/pretty-ms/index.js"(exports2, module2) { + "use strict"; + var parseMilliseconds = require_parse_ms(); + var pluralize = (word, count) => count === 1 ? word : `${word}s`; + var SECOND_ROUNDING_EPSILON = 1e-7; + module2.exports = (milliseconds, options = {}) => { + if (!Number.isFinite(milliseconds)) { + throw new TypeError("Expected a finite number"); + } + if (options.colonNotation) { + options.compact = false; + options.formatSubMilliseconds = false; + options.separateMilliseconds = false; + options.verbose = false; + } + if (options.compact) { + options.secondsDecimalDigits = 0; + options.millisecondsDecimalDigits = 0; + } + const result = []; + const floorDecimals = (value, decimalDigits) => { + const flooredInterimValue = Math.floor(value * 10 ** decimalDigits + SECOND_ROUNDING_EPSILON); + const flooredValue = Math.round(flooredInterimValue) / 10 ** decimalDigits; + return flooredValue.toFixed(decimalDigits); + }; + const add = (value, long, short, valueString) => { + if ((result.length === 0 || !options.colonNotation) && value === 0 && !(options.colonNotation && short === "m")) { + return; + } + valueString = (valueString || value || "0").toString(); + let prefix; + let suffix; + if (options.colonNotation) { + prefix = result.length > 0 ? ":" : ""; + suffix = ""; + const wholeDigits = valueString.includes(".") ? valueString.split(".")[0].length : valueString.length; + const minLength = result.length > 0 ? 2 : 1; + valueString = "0".repeat(Math.max(0, minLength - wholeDigits)) + valueString; + } else { + prefix = ""; + suffix = options.verbose ? " " + pluralize(long, value) : short; + } + result.push(prefix + valueString + suffix); + }; + const parsed = parseMilliseconds(milliseconds); + add(Math.trunc(parsed.days / 365), "year", "y"); + add(parsed.days % 365, "day", "d"); + add(parsed.hours, "hour", "h"); + add(parsed.minutes, "minute", "m"); + if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3) { + add(parsed.seconds, "second", "s"); + if (options.formatSubMilliseconds) { + add(parsed.milliseconds, "millisecond", "ms"); + add(parsed.microseconds, "microsecond", "\xB5s"); + add(parsed.nanoseconds, "nanosecond", "ns"); + } else { + const millisecondsAndBelow = parsed.milliseconds + parsed.microseconds / 1e3 + parsed.nanoseconds / 1e6; + const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === "number" ? options.millisecondsDecimalDigits : 0; + const roundedMiliseconds = millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow); + const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : roundedMiliseconds; + add(Number.parseFloat(millisecondsString, 10), "millisecond", "ms", millisecondsString); + } + } else { + const seconds = milliseconds / 1e3 % 60; + const secondsDecimalDigits = typeof options.secondsDecimalDigits === "number" ? options.secondsDecimalDigits : 1; + const secondsFixed = floorDecimals(seconds, secondsDecimalDigits); + const secondsString = options.keepDecimalsOnWholeSeconds ? secondsFixed : secondsFixed.replace(/\.0+$/, ""); + add(Number.parseFloat(secondsString, 10), "second", "s", secondsString); + } + if (result.length === 0) { + return "0" + (options.verbose ? " milliseconds" : "ms"); + } + if (options.compact) { + return result[0]; + } + if (typeof options.unitCount === "number") { + const separator = options.colonNotation ? "" : " "; + return result.slice(0, Math.max(options.unitCount, 1)).join(separator); + } + return options.colonNotation ? result.join("") : result.join(" "); + }; + } +}); + +// ../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js +var require_ansi_regex2 = __commonJS({ + "../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(exports2, module2) { + "use strict"; + module2.exports = ({ onlyFirst = false } = {}) => { + const pattern = [ + "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", + "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))" + ].join("|"); + return new RegExp(pattern, onlyFirst ? void 0 : "g"); + }; + } +}); + +// ../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js +var require_strip_ansi = __commonJS({ + "../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(exports2, module2) { + "use strict"; + var ansiRegex = require_ansi_regex2(); + module2.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string; + } +}); + +// ../default-reporter/lib/reporterForClient/reportLifecycleScripts.js +var require_reportLifecycleScripts = __commonJS({ + "../default-reporter/lib/reporterForClient/reportLifecycleScripts.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var chalk_1 = __importDefault(require_source()); + var pretty_ms_1 = __importDefault(require_pretty_ms()); + var strip_ansi_1 = __importDefault(require_strip_ansi()); + var constants_1 = require_constants2(); + var formatPrefix_1 = __importStar2(require_formatPrefix()); + var outputConstants_1 = require_outputConstants(); + var NODE_MODULES = `${path_1.default.sep}node_modules${path_1.default.sep}`; + var colorWheel = ["cyan", "magenta", "blue", "yellow", "green", "red"]; + var NUM_COLORS = colorWheel.length; + var currentColor = 0; + exports2.default = (log$, opts) => { + if (opts.appendOnly) { + const streamLifecycleOutput2 = createStreamLifecycleOutput(opts.cwd); + return log$.lifecycle.pipe(operators_1.map((log2) => Rx.of({ + msg: streamLifecycleOutput2(log2) + }))); + } + const lifecycleMessages = {}; + const lifecycleStreamByDepPath = {}; + const lifecyclePushStream = new Rx.Subject(); + log$.lifecycle.forEach((log2) => { + const key = `${log2.stage}:${log2.depPath}`; + lifecycleMessages[key] = lifecycleMessages[key] || { + collapsed: log2.wd.includes(NODE_MODULES), + output: [], + startTime: process.hrtime(), + status: formatIndentedStatus(chalk_1.default.magentaBright("Running...")) + }; + const exit = typeof log2["exitCode"] === "number"; + let msg; + if (lifecycleMessages[key].collapsed) { + msg = renderCollapsedScriptOutput(log2, lifecycleMessages[key], { cwd: opts.cwd, exit, maxWidth: opts.width }); + } else { + msg = renderScriptOutput(log2, lifecycleMessages[key], { cwd: opts.cwd, exit, maxWidth: opts.width }); + } + if (exit) { + delete lifecycleMessages[key]; + } + if (!lifecycleStreamByDepPath[key]) { + lifecycleStreamByDepPath[key] = new Rx.Subject(); + lifecyclePushStream.next(Rx.from(lifecycleStreamByDepPath[key])); + } + lifecycleStreamByDepPath[key].next({ msg }); + if (exit) { + lifecycleStreamByDepPath[key].complete(); + } + }); + return Rx.from(lifecyclePushStream); + }; + function toNano(time) { + return (time[0] + time[1] / 1e9) * 1e3; + } + function renderCollapsedScriptOutput(log2, messageCache, opts) { + var _a; + messageCache.label = (_a = messageCache.label) !== null && _a !== void 0 ? _a : `${highlightLastFolder(formatPrefix_1.formatPrefixNoTrim(opts.cwd, log2.wd))}: Running ${log2.stage} script`; + if (!opts.exit) { + updateMessageCache(log2, messageCache, opts); + return `${messageCache.label}...`; + } + const time = pretty_ms_1.default(toNano(process.hrtime(messageCache.startTime))); + if (log2["exitCode"] === 0) { + return `${messageCache.label}, done in ${time}`; + } + if (log2["optional"] === true) { + return `${messageCache.label}, failed in ${time} (skipped as optional)`; + } + return `${messageCache.label}, failed in ${time}${constants_1.EOL}${renderScriptOutput(log2, messageCache, opts)}`; + } + function renderScriptOutput(log2, messageCache, opts) { + updateMessageCache(log2, messageCache, opts); + if (opts.exit && log2["exitCode"] !== 0) { + return [ + messageCache.script, + ...messageCache.output, + messageCache.status + ].join(constants_1.EOL); + } + if (messageCache.output.length > 10) { + return [ + messageCache.script, + `[${messageCache.output.length - 10} lines collapsed]`, + ...messageCache.output.slice(messageCache.output.length - 10), + messageCache.status + ].join(constants_1.EOL); + } + return [ + messageCache.script, + ...messageCache.output, + messageCache.status + ].join(constants_1.EOL); + } + function updateMessageCache(log2, messageCache, opts) { + if (log2["script"]) { + const prefix = `${formatPrefix_1.default(opts.cwd, log2.wd)} ${outputConstants_1.hlValue(log2.stage)}`; + const maxLineWidth = opts.maxWidth - prefix.length - 2 + ANSI_ESCAPES_LENGTH_OF_PREFIX; + messageCache.script = `${prefix}$ ${cutLine(log2["script"], maxLineWidth)}`; + } else if (opts.exit) { + const time = pretty_ms_1.default(toNano(process.hrtime(messageCache.startTime))); + if (log2["exitCode"] === 0) { + messageCache.status = formatIndentedStatus(chalk_1.default.magentaBright(`Done in ${time}`)); + } else { + messageCache.status = formatIndentedStatus(chalk_1.default.red(`Failed in ${time}`)); + } + } else { + messageCache.output.push(formatIndentedOutput(opts.maxWidth, log2)); + } + } + function formatIndentedStatus(status) { + return `${chalk_1.default.magentaBright("\u2514\u2500")} ${status}`; + } + function highlightLastFolder(p) { + const lastSlash = p.lastIndexOf("/") + 1; + return `${chalk_1.default.gray(p.substr(0, lastSlash))}${p.substr(lastSlash)}`; + } + var ANSI_ESCAPES_LENGTH_OF_PREFIX = outputConstants_1.hlValue(" ").length - 1; + function createStreamLifecycleOutput(cwd) { + currentColor = 0; + const colorByPrefix = new Map(); + return streamLifecycleOutput.bind(null, colorByPrefix, cwd); + } + function streamLifecycleOutput(colorByPkg, cwd, logObj) { + const prefix = formatLifecycleScriptPrefix(colorByPkg, cwd, logObj.wd, logObj.stage); + if (typeof logObj["exitCode"] === "number") { + if (logObj["exitCode"] === 0) { + return `${prefix}: Done`; + } else { + return `${prefix}: Failed`; + } + } + if (logObj["script"]) { + return `${prefix}$ ${logObj["script"]}`; + } + const line = formatLine(Infinity, logObj); + return `${prefix}: ${line}`; + } + function formatIndentedOutput(maxWidth, logObj) { + return `${chalk_1.default.magentaBright("\u2502")} ${formatLine(maxWidth - 2, logObj)}`; + } + function formatLifecycleScriptPrefix(colorByPkg, cwd, wd, stage) { + if (!colorByPkg.has(wd)) { + const colorName = colorWheel[currentColor % NUM_COLORS]; + colorByPkg.set(wd, chalk_1.default[colorName]); + currentColor += 1; + } + const color = colorByPkg.get(wd); + return `${color(formatPrefix_1.default(cwd, wd))} ${outputConstants_1.hlValue(stage)}`; + } + function formatLine(maxWidth, logObj) { + const line = cutLine(logObj["line"], maxWidth); + if (logObj["stdio"] === "stderr") { + return chalk_1.default.gray(line); + } + return line; + } + function cutLine(line, maxLength) { + return strip_ansi_1.default(line).substr(0, maxLength); + } + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_curry2.js +var require_curry2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_curry2.js"(exports2, module2) { + var _curry1 = require_curry1(); + var _isPlaceholder = require_isPlaceholder(); + function _curry2(fn2) { + return function f2(a, b) { + switch (arguments.length) { + case 0: + return f2; + case 1: + return _isPlaceholder(a) ? f2 : _curry1(function(_b) { + return fn2(a, _b); + }); + default: + return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function(_a) { + return fn2(_a, b); + }) : _isPlaceholder(b) ? _curry1(function(_b) { + return fn2(a, _b); + }) : fn2(a, b); + } + }; + } + module2.exports = _curry2; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_arrayFromIterator.js +var require_arrayFromIterator = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_arrayFromIterator.js"(exports2, module2) { + function _arrayFromIterator(iter) { + var list = []; + var next; + while (!(next = iter.next()).done) { + list.push(next.value); + } + return list; + } + module2.exports = _arrayFromIterator; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_includesWith.js +var require_includesWith = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_includesWith.js"(exports2, module2) { + function _includesWith(pred, x, list) { + var idx = 0; + var len = list.length; + while (idx < len) { + if (pred(x, list[idx])) { + return true; + } + idx += 1; + } + return false; + } + module2.exports = _includesWith; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_functionName.js +var require_functionName = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_functionName.js"(exports2, module2) { + function _functionName(f) { + var match = String(f).match(/^function (\w*)/); + return match == null ? "" : match[1]; + } + module2.exports = _functionName; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_has.js +var require_has = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_has.js"(exports2, module2) { + function _has(prop, obj) { + return Object.prototype.hasOwnProperty.call(obj, prop); + } + module2.exports = _has; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_objectIs.js +var require_objectIs = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_objectIs.js"(exports2, module2) { + function _objectIs(a, b) { + if (a === b) { + return a !== 0 || 1 / a === 1 / b; + } else { + return a !== a && b !== b; + } + } + module2.exports = typeof Object.is === "function" ? Object.is : _objectIs; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isArguments.js +var require_isArguments = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isArguments.js"(exports2, module2) { + var _has = require_has(); + var toString = Object.prototype.toString; + var _isArguments = /* @__PURE__ */ function() { + return toString.call(arguments) === "[object Arguments]" ? function _isArguments2(x) { + return toString.call(x) === "[object Arguments]"; + } : function _isArguments2(x) { + return _has("callee", x); + }; + }(); + module2.exports = _isArguments; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/keys.js +var require_keys = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/keys.js"(exports2, module2) { + var _curry1 = require_curry1(); + var _has = require_has(); + var _isArguments = require_isArguments(); + var hasEnumBug = !/* @__PURE__ */ { + toString: null + }.propertyIsEnumerable("toString"); + var nonEnumerableProps = ["constructor", "valueOf", "isPrototypeOf", "toString", "propertyIsEnumerable", "hasOwnProperty", "toLocaleString"]; + var hasArgsEnumBug = /* @__PURE__ */ function() { + "use strict"; + return arguments.propertyIsEnumerable("length"); + }(); + var contains = function contains2(list, item) { + var idx = 0; + while (idx < list.length) { + if (list[idx] === item) { + return true; + } + idx += 1; + } + return false; + }; + var keys = typeof Object.keys === "function" && !hasArgsEnumBug ? /* @__PURE__ */ _curry1(function keys2(obj) { + return Object(obj) !== obj ? [] : Object.keys(obj); + }) : /* @__PURE__ */ _curry1(function keys2(obj) { + if (Object(obj) !== obj) { + return []; + } + var prop, nIdx; + var ks = []; + var checkArgsLength = hasArgsEnumBug && _isArguments(obj); + for (prop in obj) { + if (_has(prop, obj) && (!checkArgsLength || prop !== "length")) { + ks[ks.length] = prop; + } + } + if (hasEnumBug) { + nIdx = nonEnumerableProps.length - 1; + while (nIdx >= 0) { + prop = nonEnumerableProps[nIdx]; + if (_has(prop, obj) && !contains(ks, prop)) { + ks[ks.length] = prop; + } + nIdx -= 1; + } + } + return ks; + }); + module2.exports = keys; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/type.js +var require_type = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/type.js"(exports2, module2) { + var _curry1 = require_curry1(); + var type = /* @__PURE__ */ _curry1(function type2(val) { + return val === null ? "Null" : val === void 0 ? "Undefined" : Object.prototype.toString.call(val).slice(8, -1); + }); + module2.exports = type; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_equals.js +var require_equals = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_equals.js"(exports2, module2) { + var _arrayFromIterator = require_arrayFromIterator(); + var _includesWith = require_includesWith(); + var _functionName = require_functionName(); + var _has = require_has(); + var _objectIs = require_objectIs(); + var keys = require_keys(); + var type = require_type(); + function _uniqContentEquals(aIterator, bIterator, stackA, stackB) { + var a = _arrayFromIterator(aIterator); + var b = _arrayFromIterator(bIterator); + function eq(_a, _b) { + return _equals(_a, _b, stackA.slice(), stackB.slice()); + } + return !_includesWith(function(b2, aItem) { + return !_includesWith(eq, aItem, b2); + }, b, a); + } + function _equals(a, b, stackA, stackB) { + if (_objectIs(a, b)) { + return true; + } + var typeA = type(a); + if (typeA !== type(b)) { + return false; + } + if (a == null || b == null) { + return false; + } + if (typeof a["fantasy-land/equals"] === "function" || typeof b["fantasy-land/equals"] === "function") { + return typeof a["fantasy-land/equals"] === "function" && a["fantasy-land/equals"](b) && typeof b["fantasy-land/equals"] === "function" && b["fantasy-land/equals"](a); + } + if (typeof a.equals === "function" || typeof b.equals === "function") { + return typeof a.equals === "function" && a.equals(b) && typeof b.equals === "function" && b.equals(a); + } + switch (typeA) { + case "Arguments": + case "Array": + case "Object": + if (typeof a.constructor === "function" && _functionName(a.constructor) === "Promise") { + return a === b; + } + break; + case "Boolean": + case "Number": + case "String": + if (!(typeof a === typeof b && _objectIs(a.valueOf(), b.valueOf()))) { + return false; + } + break; + case "Date": + if (!_objectIs(a.valueOf(), b.valueOf())) { + return false; + } + break; + case "Error": + return a.name === b.name && a.message === b.message; + case "RegExp": + if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) { + return false; + } + break; + } + var idx = stackA.length - 1; + while (idx >= 0) { + if (stackA[idx] === a) { + return stackB[idx] === b; + } + idx -= 1; + } + switch (typeA) { + case "Map": + if (a.size !== b.size) { + return false; + } + return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b])); + case "Set": + if (a.size !== b.size) { + return false; + } + return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b])); + case "Arguments": + case "Array": + case "Object": + case "Boolean": + case "Number": + case "String": + case "Date": + case "Error": + case "RegExp": + case "Int8Array": + case "Uint8Array": + case "Uint8ClampedArray": + case "Int16Array": + case "Uint16Array": + case "Int32Array": + case "Uint32Array": + case "Float32Array": + case "Float64Array": + case "ArrayBuffer": + break; + default: + return false; + } + var keysA = keys(a); + if (keysA.length !== keys(b).length) { + return false; + } + var extendedStackA = stackA.concat([a]); + var extendedStackB = stackB.concat([b]); + idx = keysA.length - 1; + while (idx >= 0) { + var key = keysA[idx]; + if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) { + return false; + } + idx -= 1; + } + return true; + } + module2.exports = _equals; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/equals.js +var require_equals2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/equals.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _equals = require_equals(); + var equals = /* @__PURE__ */ _curry2(function equals2(a, b) { + return _equals(a, b, [], []); + }); + module2.exports = equals; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64.js +var require_base64 = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64.js"(exports2) { + var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""); + exports2.encode = function(number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + exports2.decode = function(charCode) { + var bigA = 65; + var bigZ = 90; + var littleA = 97; + var littleZ = 122; + var zero = 48; + var nine = 57; + var plus = 43; + var slash = 47; + var littleOffset = 26; + var numberOffset = 52; + if (bigA <= charCode && charCode <= bigZ) { + return charCode - bigA; + } + if (littleA <= charCode && charCode <= littleZ) { + return charCode - littleA + littleOffset; + } + if (zero <= charCode && charCode <= nine) { + return charCode - zero + numberOffset; + } + if (charCode == plus) { + return 62; + } + if (charCode == slash) { + return 63; + } + return -1; + }; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64-vlq.js +var require_base64_vlq = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64-vlq.js"(exports2) { + var base64 = require_base64(); + var VLQ_BASE_SHIFT = 5; + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + var VLQ_BASE_MASK = VLQ_BASE - 1; + var VLQ_CONTINUATION_BIT = VLQ_BASE; + function toVLQSigned(aValue) { + return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0; + } + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative ? -shifted : shifted; + } + exports2.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + var vlq = toVLQSigned(aValue); + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + return encoded; + }; + exports2.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/util.js +var require_util3 = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/util.js"(exports2) { + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports2.getArg = getArg; + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports2.urlParse = urlParse; + function urlGenerate(aParsedUrl) { + var url = ""; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ":"; + } + url += "//"; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + "@"; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port; + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports2.urlGenerate = urlGenerate; + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports2.isAbsolute(path); + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === ".") { + parts.splice(i, 1); + } else if (part === "..") { + up++; + } else if (up > 0) { + if (part === "") { + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join("/"); + if (path === "") { + path = isAbsolute ? "/" : "."; + } + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports2.normalize = normalize; + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || "/"; + } + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + var joined = aPath.charAt(0) === "/" ? aPath : normalize(aRoot.replace(/\/+$/, "") + "/" + aPath); + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports2.join = join; + exports2.isAbsolute = function(aPath) { + return aPath.charAt(0) === "/" || urlRegexp.test(aPath); + }; + function relative2(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + aRoot = aRoot.replace(/\/$/, ""); + var level = 0; + while (aPath.indexOf(aRoot + "/") !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + ++level; + } + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports2.relative = relative2; + var supportsNullProto = function() { + var obj = Object.create(null); + return !("__proto__" in obj); + }(); + function identity(s) { + return s; + } + function toSetString(aStr) { + if (isProtoString(aStr)) { + return "$" + aStr; + } + return aStr; + } + exports2.toSetString = supportsNullProto ? identity : toSetString; + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + return aStr; + } + exports2.fromSetString = supportsNullProto ? identity : fromSetString; + function isProtoString(s) { + if (!s) { + return false; + } + var length = s.length; + if (length < 9) { + return false; + } + if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) { + return false; + } + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36) { + return false; + } + } + return true; + } + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + return strcmp(mappingA.name, mappingB.name); + } + exports2.compareByOriginalPositions = compareByOriginalPositions; + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + return strcmp(mappingA.name, mappingB.name); + } + exports2.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + if (aStr1 === null) { + return 1; + } + if (aStr2 === null) { + return -1; + } + if (aStr1 > aStr2) { + return 1; + } + return -1; + } + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + return strcmp(mappingA.name, mappingB.name); + } + exports2.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, "")); + } + exports2.parseSourceMapInput = parseSourceMapInput; + function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ""; + if (sourceRoot) { + if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/") { + sourceRoot += "/"; + } + sourceURL = sourceRoot + sourceURL; + } + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + var index = parsed.path.lastIndexOf("/"); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + return normalize(sourceURL); + } + exports2.computeSourceURL = computeSourceURL; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/array-set.js +var require_array_set = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/array-set.js"(exports2) { + var util = require_util3(); + var has = Object.prototype.hasOwnProperty; + var hasNativeMap = typeof Map !== "undefined"; + function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); + } + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; + }; + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } + }; + ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } + }; + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + throw new Error('"' + aStr + '" is not in the set.'); + }; + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error("No element indexed by " + aIdx); + }; + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + exports2.ArraySet = ArraySet; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/mapping-list.js +var require_mapping_list = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/mapping-list.js"(exports2) { + var util = require_util3(); + function generatedPositionAfter(mappingA, mappingB) { + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + function MappingList() { + this._array = []; + this._sorted = true; + this._last = { generatedLine: -1, generatedColumn: 0 }; + } + MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + exports2.MappingList = MappingList; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-generator.js +var require_source_map_generator = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-generator.js"(exports2) { + var base64VLQ = require_base64_vlq(); + var util = require_util3(); + var ArraySet = require_array_set().ArraySet; + var MappingList = require_mapping_list().MappingList; + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, "file", null); + this._sourceRoot = util.getArg(aArgs, "sourceRoot", null); + this._skipValidation = util.getArg(aArgs, "skipValidation", false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + SourceMapGenerator.prototype._version = 3; + SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot + }); + aSourceMapConsumer.eachMapping(function(mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function(sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util.relative(sourceRoot, sourceFile); + } + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, "generated"); + var original = util.getArg(aArgs, "original", null); + var source = util.getArg(aArgs, "source", null); + var name = util.getArg(aArgs, "name", null); + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source, + name + }); + }; + SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + if (aSourceContent != null) { + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + var newSources = new ArraySet(); + var newNames = new ArraySet(); + this._mappings.unsortedForEach(function(mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source); + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + }, this); + this._sources = newSources; + this._names = newNames; + aSourceMapConsumer.sources.forEach(function(sourceFile2) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile2); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile2 = util.join(aSourceMapPath, sourceFile2); + } + if (sourceRoot != null) { + sourceFile2 = util.relative(sourceRoot, sourceFile2); + } + this.setSourceContent(sourceFile2, content); + } + }, this); + }; + SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) { + if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") { + throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values."); + } + if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) { + return; + } else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) { + return; + } else { + throw new Error("Invalid mapping: " + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ""; + var next; + var mapping; + var nameIdx; + var sourceIdx; + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = ""; + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ";"; + previousGeneratedLine++; + } + } else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ","; + } + } + next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + result += next; + } + return result; + }; + SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function(source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null; + }, this); + }; + SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + return map; + }; + SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + exports2.SourceMapGenerator = SourceMapGenerator; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/binary-search.js +var require_binary_search = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/binary-search.js"(exports2) { + exports2.GREATEST_LOWER_BOUND = 1; + exports2.LEAST_UPPER_BOUND = 2; + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + return mid; + } else if (cmp > 0) { + if (aHigh - mid > 1) { + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + if (aBias == exports2.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } else { + if (mid - aLow > 1) { + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + if (aBias == exports2.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + exports2.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports2.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + return index; + }; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/quick-sort.js +var require_quick_sort = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/quick-sort.js"(exports2) { + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + function randomIntInRange(low, high) { + return Math.round(low + Math.random() * (high - low)); + } + function doQuickSort(ary, comparator, p, r) { + if (p < r) { + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + swap(ary, pivotIndex, r); + var pivot = ary[r]; + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + swap(ary, i + 1, j); + var q = i + 1; + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + exports2.quickSort = function(ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-consumer.js +var require_source_map_consumer = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-consumer.js"(exports2) { + var util = require_util3(); + var binarySearch = require_binary_search(); + var ArraySet = require_array_set().ArraySet; + var base64VLQ = require_base64_vlq(); + var quickSort = require_quick_sort().quickSort; + function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === "string") { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); + } + SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); + }; + SourceMapConsumer.prototype._version = 3; + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, "_generatedMappings", { + configurable: true, + enumerable: true, + get: function() { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + return this.__generatedMappings; + } + }); + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, "_originalMappings", { + configurable: true, + enumerable: true, + get: function() { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + return this.__originalMappings; + } + }); + SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + var sourceRoot = this.sourceRoot; + mappings.map(function(mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); + return { + source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, "line"); + var needle = { + source: util.getArg(aArgs, "source"), + originalLine: line, + originalColumn: util.getArg(aArgs, "column", 0) + }; + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + var mappings = []; + var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + if (aArgs.column === void 0) { + var originalLine = mapping.originalLine; + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, "generatedLine", null), + column: util.getArg(mapping, "generatedColumn", null), + lastColumn: util.getArg(mapping, "lastGeneratedColumn", null) + }); + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, "generatedLine", null), + column: util.getArg(mapping, "generatedColumn", null), + lastColumn: util.getArg(mapping, "lastGeneratedColumn", null) + }); + mapping = this._originalMappings[++index]; + } + } + } + return mappings; + }; + exports2.SourceMapConsumer = SourceMapConsumer; + function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === "string") { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + var version = util.getArg(sourceMap, "version"); + var sources = util.getArg(sourceMap, "sources"); + var names = util.getArg(sourceMap, "names", []); + var sourceRoot = util.getArg(sourceMap, "sourceRoot", null); + var sourcesContent = util.getArg(sourceMap, "sourcesContent", null); + var mappings = util.getArg(sourceMap, "mappings"); + var file = util.getArg(sourceMap, "file", null); + if (version != this._version) { + throw new Error("Unsupported version: " + version); + } + if (sourceRoot) { + sourceRoot = util.normalize(sourceRoot); + } + sources = sources.map(String).map(util.normalize).map(function(source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source; + }); + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + this._absoluteSources = this._sources.toArray().map(function(s) { + return util.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; + } + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + return -1; + }; + BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function(s) { + return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping(); + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + destOriginalMappings.push(destMapping); + } + destGeneratedMappings.push(destMapping); + } + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + return smc; + }; + BasicSourceMapConsumer.prototype._version = 3; + Object.defineProperty(BasicSourceMapConsumer.prototype, "sources", { + get: function() { + return this._absoluteSources.slice(); + } + }); + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + while (index < length) { + if (aStr.charAt(index) === ";") { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } else if (aStr.charAt(index) === ",") { + index++; + } else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + if (segment.length === 2) { + throw new Error("Found a source, but no line and column"); + } + if (segment.length === 3) { + throw new Error("Found a source and line, but no column"); + } + cachedSegments[str] = segment; + } + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + if (segment.length > 1) { + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + mapping.originalLine += 1; + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + if (segment.length > 4) { + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + generatedMappings.push(mapping); + if (typeof mapping.originalLine === "number") { + originalMappings.push(mapping); + } + } + } + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) { + if (aNeedle[aLineName] <= 0) { + throw new TypeError("Line must be greater than or equal to 1, got " + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError("Column must be greater than or equal to 0, got " + aNeedle[aColumnName]); + } + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + mapping.lastGeneratedColumn = Infinity; + } + }; + BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, "line"), + generatedColumn: util.getArg(aArgs, "column") + }; + var index = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util.compareByGeneratedPositionsDeflated, util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)); + if (index >= 0) { + var mapping = this._generatedMappings[index]; + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, "source", null); + if (source !== null) { + source = this._sources.at(source); + source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util.getArg(mapping, "name", null); + if (name !== null) { + name = this._names.at(name); + } + return { + source, + line: util.getArg(mapping, "originalLine", null), + column: util.getArg(mapping, "originalColumn", null), + name + }; + } + } + return { + source: null, + line: null, + column: null, + name: null + }; + }; + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) { + return sc == null; + }); + }; + BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + var url; + if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) { + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]; + } + if ((!url.path || url.path == "/") && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + if (nullOnMissing) { + return null; + } else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, "source"); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + var needle = { + source, + originalLine: util.getArg(aArgs, "line"), + originalColumn: util.getArg(aArgs, "column") + }; + var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)); + if (index >= 0) { + var mapping = this._originalMappings[index]; + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, "generatedLine", null), + column: util.getArg(mapping, "generatedColumn", null), + lastColumn: util.getArg(mapping, "lastGeneratedColumn", null) + }; + } + } + return { + line: null, + column: null, + lastColumn: null + }; + }; + exports2.BasicSourceMapConsumer = BasicSourceMapConsumer; + function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === "string") { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + var version = util.getArg(sourceMap, "version"); + var sections = util.getArg(sourceMap, "sections"); + if (version != this._version) { + throw new Error("Unsupported version: " + version); + } + this._sources = new ArraySet(); + this._names = new ArraySet(); + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function(s) { + if (s.url) { + throw new Error("Support for url field in sections not implemented."); + } + var offset = util.getArg(s, "offset"); + var offsetLine = util.getArg(offset, "line"); + var offsetColumn = util.getArg(offset, "column"); + if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) { + throw new Error("Section offsets must be ordered and non-overlapping."); + } + lastOffset = offset; + return { + generatedOffset: { + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, "map"), aSourceMapURL) + }; + }); + } + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + IndexedSourceMapConsumer.prototype._version = 3; + Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", { + get: function() { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, "line"), + generatedColumn: util.getArg(aArgs, "column") + }; + var sectionIndex = binarySearch.search(needle, this._sections, function(needle2, section2) { + var cmp = needle2.generatedLine - section2.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + return needle2.generatedColumn - section2.generatedOffset.generatedColumn; + }); + var section = this._sections[sectionIndex]; + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + return section.consumer.originalPositionFor({ + line: needle.generatedLine - (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0), + bias: aArgs.bias + }); + }; + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function(s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + if (section.consumer._findSourceIndex(util.getArg(aArgs, "source")) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0) + }; + return ret; + } + } + return { + line: null, + column: null + }; + }; + IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + var source = section.consumer._sources.at(mapping.source); + source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + this._sources.add(source); + source = this._sources.indexOf(source); + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + var adjustedMapping = { + source, + generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name + }; + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === "number") { + this.__originalMappings.push(adjustedMapping); + } + } + } + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + exports2.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-node.js +var require_source_node = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-node.js"(exports2) { + var SourceMapGenerator = require_source_map_generator().SourceMapGenerator; + var util = require_util3(); + var REGEX_NEWLINE = /(\r?\n)/; + var NEWLINE_CODE = 10; + var isSourceNode = "$$$isSourceNode$$$"; + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) + this.add(aChunks); + } + SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + var node = new SourceNode(); + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + var newLine = getNextLine() || ""; + return lineContents + newLine; + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : void 0; + } + }; + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + var lastMapping = null; + aSourceMapConsumer.eachMapping(function(mapping) { + if (lastMapping !== null) { + if (lastGeneratedLine < mapping.generatedLine) { + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + } else { + var nextLine = remainingLines[remainingLinesIndex] || ""; + var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + lastMapping = mapping; + return; + } + } + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ""; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + addMappingWithCode(lastMapping, shiftNextLine()); + } + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + aSourceMapConsumer.sources.forEach(function(sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + return node; + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === void 0) { + node.add(code); + } else { + var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source; + node.add(new SourceNode(mapping.originalLine, mapping.originalColumn, source, code, mapping.name)); + } + } + }; + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function(chunk) { + this.add(chunk); + }, this); + } else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } else { + throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk); + } + return this; + }; + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length - 1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } else { + throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk); + } + return this; + }; + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } else { + if (chunk !== "") { + aFn(chunk, { + source: this.source, + line: this.line, + column: this.column, + name: this.name + }); + } + } + } + }; + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len - 1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } else if (typeof lastChild === "string") { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } else { + this.children.push("".replace(aPattern, aReplacement)); + } + return this; + }; + SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function(chunk) { + str += chunk; + }); + return str; + }; + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function(chunk, original) { + generated.code += chunk; + if (original.source !== null && original.line !== null && original.column !== null) { + if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function(sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + return { code: generated.code, map }; + }; + exports2.SourceNode = SourceNode; + } +}); + +// ../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/source-map.js +var require_source_map = __commonJS({ + "../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/source-map.js"(exports2) { + exports2.SourceMapGenerator = require_source_map_generator().SourceMapGenerator; + exports2.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer; + exports2.SourceNode = require_source_node().SourceNode; + } +}); + +// ../../node_modules/.pnpm/get-source@1.0.42/node_modules/get-source/impl/path.js +var require_path = __commonJS({ + "../../node_modules/.pnpm/get-source@1.0.42/node_modules/get-source/impl/path.js"(exports2, module2) { + "use strict"; + var isBrowser = typeof window !== "undefined" && window.window === window && window.navigator; + var cwd = isBrowser ? window.location.href : process.cwd(); + var urlRegexp = new RegExp("^((https|http)://)?[a-z0-9A-Z]{3}.[a-z0-9A-Z][a-z0-9A-Z]{0,61}?[a-z0-9A-Z].com|net|cn|cc (:s[0-9]{1-4})?/$"); + var path = module2.exports = { + concat(a, b) { + const a_endsWithSlash = a[a.length - 1] === "/", b_startsWithSlash = b[0] === "/"; + return a + (a_endsWithSlash || b_startsWithSlash ? "" : "/") + (a_endsWithSlash && b_startsWithSlash ? b.substring(1) : b); + }, + resolve(x) { + if (path.isAbsolute(x)) { + return path.normalize(x); + } + return path.normalize(path.concat(cwd, x)); + }, + normalize(x) { + let output = [], skip = 0; + x.split("/").reverse().filter((x2) => x2 !== ".").forEach((x2) => { + if (x2 === "..") { + skip++; + } else if (skip === 0) { + output.push(x2); + } else { + skip--; + } + }); + const result = output.reverse().join("/"); + return (isBrowser && result[0] === "/" ? window.location.origin : "") + result; + }, + isData: (x) => x.indexOf("data:") === 0, + isURL: (x) => urlRegexp.test(x), + isAbsolute: (x) => x[0] === "/" || /^[^\/]*:/.test(x), + relativeToFile(a, b) { + return path.isData(a) || path.isAbsolute(b) ? path.normalize(b) : path.normalize(path.concat(a.split("/").slice(0, -1).join("/"), b)); + } + }; + } +}); + +// ../../node_modules/.pnpm/data-uri-to-buffer@2.0.2/node_modules/data-uri-to-buffer/index.js +var require_data_uri_to_buffer = __commonJS({ + "../../node_modules/.pnpm/data-uri-to-buffer@2.0.2/node_modules/data-uri-to-buffer/index.js"(exports2, module2) { + "use strict"; + module2.exports = dataUriToBuffer; + function dataUriToBuffer(uri) { + if (!/^data\:/i.test(uri)) { + throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")'); + } + uri = uri.replace(/\r?\n/g, ""); + var firstComma = uri.indexOf(","); + if (firstComma === -1 || firstComma <= 4) { + throw new TypeError("malformed data: URI"); + } + var meta = uri.substring(5, firstComma).split(";"); + var type = meta[0] || "text/plain"; + var typeFull = type; + var base64 = false; + var charset = ""; + for (var i = 1; i < meta.length; i++) { + if (meta[i] == "base64") { + base64 = true; + } else { + typeFull += ";" + meta[i]; + if (meta[i].indexOf("charset=") == 0) { + charset = meta[i].substring(8); + } + } + } + if (!meta[0] && !charset.length) { + typeFull += ";charset=US-ASCII"; + charset = "US-ASCII"; + } + var data = unescape(uri.substring(firstComma + 1)); + var encoding = base64 ? "base64" : "ascii"; + var buffer = Buffer.from ? Buffer.from(data, encoding) : new Buffer(data, encoding); + buffer.type = type; + buffer.typeFull = typeFull; + buffer.charset = charset; + return buffer; + } + } +}); + +// ../../node_modules/.pnpm/get-source@1.0.42/node_modules/get-source/get-source.js +var require_get_source = __commonJS({ + "../../node_modules/.pnpm/get-source@1.0.42/node_modules/get-source/get-source.js"(exports2, module2) { + "use strict"; + var O = Object; + var isBrowser = typeof window !== "undefined" && window.window === window && window.navigator; + var SourceMapConsumer = require_source_map().SourceMapConsumer; + var path = require_path(); + var isURL = path.isURL; + var dataURIToBuffer = require_data_uri_to_buffer(); + var memoize = (f) => { + const m = (x) => x in m.cache ? m.cache[x] : m.cache[x] = f(x); + m.forgetEverything = () => { + m.cache = Object.create(null); + }; + m.cache = Object.create(null); + return m; + }; + var newSourceFileMemoized = memoize((file) => new SourceFile(file)); + var getSource = module2.exports = (file) => { + return newSourceFileMemoized(path.resolve(file)); + }; + getSource.resetCache = () => newSourceFileMemoized.forgetEverything(); + getSource.getCache = () => newSourceFileMemoized.cache; + var SourceMap = class { + constructor(originalFilePath, sourceMapPath) { + this.file = sourceMapPath.startsWith("data:") ? new SourceFile(originalFilePath, dataURIToBuffer(sourceMapPath).toString()) : getSource(path.relativeToFile(originalFilePath, sourceMapPath)); + this.parsed = this.file.text && SourceMapConsumer(JSON.parse(this.file.text)) || null; + this.sourceFor = memoize(this.sourceFor.bind(this)); + } + sourceFor(file) { + const content = this.parsed.sourceContentFor(file, true); + const fullPath = path.relativeToFile(this.file.path, file); + return content ? new SourceFile(fullPath, content) : getSource(fullPath); + } + resolve(loc) { + const originalLoc = this.parsed.originalPositionFor(loc); + return originalLoc.source ? this.sourceFor(originalLoc.source).resolve(O.assign({}, loc, { + line: originalLoc.line, + column: originalLoc.column + 1, + name: originalLoc.name + })) : loc; + } + }; + var SourceFile = class { + constructor(path2, text) { + this.path = path2; + if (text) { + this.text = text; + } else { + try { + if (isBrowser) { + let xhr = new XMLHttpRequest(); + xhr.open("GET", path2, false); + xhr.send(null); + this.text = xhr.responseText; + } else { + this.text = require("fs").readFileSync(path2, { encoding: "utf8" }); + } + } catch (e) { + this.error = e; + this.text = ""; + } + } + } + get lines() { + return this.lines_ = this.lines_ || this.text.split("\n"); + } + get sourceMap() { + try { + if (this.sourceMap_ === void 0) { + const re = /\u0023 sourceMappingURL=(.+)\n?/g; + let lastMatch = void 0; + while (true) { + const match = re.exec(this.text); + if (match) + lastMatch = match; + else + break; + } + const url = lastMatch && lastMatch[1]; + if (url) { + const sourceMap = new SourceMap(this.path, url); + if (sourceMap.parsed) { + this.sourceMap_ = sourceMap; + } + } else { + this.sourceMap_ = null; + } + } + } catch (e) { + this.sourceMap_ = null; + this.sourceMapError = e; + } + return this.sourceMap_; + } + resolve(loc) { + if (this.sourceMap) { + const newLoc = this.sourceMap.resolve(loc); + if (newLoc.sourceFile) + return newLoc; + } + return O.assign({}, loc, { + sourceFile: this, + sourceLine: this.lines[loc.line - 1] || "", + error: this.error + }); + } + }; + } +}); + +// ../../node_modules/.pnpm/stacktracey@1.2.127/node_modules/stacktracey/impl/partition.js +var require_partition3 = __commonJS({ + "../../node_modules/.pnpm/stacktracey@1.2.127/node_modules/stacktracey/impl/partition.js"(exports2, module2) { + "use strict"; + module2.exports = (arr_, pred) => { + const arr = arr_ || [], spans = []; + let span = { + label: void 0, + items: [arr.first] + }; + arr.forEach((x) => { + const label = pred(x); + if (span.label !== label && span.items.length) { + spans.push(span = { label, items: [x] }); + } else { + span.items.push(x); + } + }); + return spans; + }; + } +}); + +// ../../node_modules/.pnpm/printable-characters@1.0.42/node_modules/printable-characters/build/printable-characters.js +var require_printable_characters = __commonJS({ + "../../node_modules/.pnpm/printable-characters@1.0.42/node_modules/printable-characters/build/printable-characters.js"(exports2, module2) { + "use strict"; + var _slicedToArray = function() { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = void 0; + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) + break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) + _i["return"](); + } finally { + if (_d) + throw _e; + } + } + return _arr; + } + return function(arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; + }(); + var ansiEscapeCode = "[\x9B][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]"; + var zeroWidthCharacterExceptNewline = "\0-\b\v-\x9B\xAD\u200B\u2028\u2029\uFEFF\uFE00-\uFE0F"; + var zeroWidthCharacter = "\n" + zeroWidthCharacterExceptNewline; + var zeroWidthCharactersExceptNewline = new RegExp("(?:" + ansiEscapeCode + ")|[" + zeroWidthCharacterExceptNewline + "]", "g"); + var zeroWidthCharacters = new RegExp("(?:" + ansiEscapeCode + ")|[" + zeroWidthCharacter + "]", "g"); + var partition = new RegExp("((?:" + ansiEscapeCode + ")|[ " + zeroWidthCharacter + "])?([^ " + zeroWidthCharacter + "]*)", "g"); + module2.exports = { + zeroWidthCharacters, + ansiEscapeCodes: new RegExp(ansiEscapeCode, "g"), + strlen: (s) => Array.from(s.replace(zeroWidthCharacters, "")).length, + isBlank: (s) => s.replace(zeroWidthCharacters, "").replace(/\s/g, "").length === 0, + blank: (s) => Array.from(s.replace(zeroWidthCharactersExceptNewline, "")).map((x) => x === " " || x === "\n" ? x : " ").join(""), + partition(s) { + for (var m, spans = []; partition.lastIndex !== s.length && (m = partition.exec(s)); ) { + spans.push([m[1] || "", m[2]]); + } + partition.lastIndex = 0; + return spans; + }, + first(s, n) { + let result = "", length = 0; + for (const _ref of module2.exports.partition(s)) { + var _ref2 = _slicedToArray(_ref, 2); + const nonPrintable = _ref2[0]; + const printable = _ref2[1]; + const text = Array.from(printable).slice(0, n - length); + result += nonPrintable + text.join(""); + length += text.length; + } + return result; + } + }; + } +}); + +// ../../node_modules/.pnpm/as-table@1.0.55/node_modules/as-table/build/as-table.js +var require_as_table = __commonJS({ + "../../node_modules/.pnpm/as-table@1.0.55/node_modules/as-table/build/as-table.js"(exports2, module2) { + "use strict"; + function _toConsumableArray(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) + arr2[i] = arr[i]; + return arr2; + } else { + return Array.from(arr); + } + } + var O = Object; + var _require = require_printable_characters(); + var first = _require.first; + var strlen = _require.strlen; + var limit = (s, n) => first(s, n - 1) + "\u2026"; + var asColumns = (rows, cfg_) => { + const zip = (arrs, f) => arrs.reduce((a, b) => b.map((b2, i) => [].concat(_toConsumableArray(a[i] || []), [b2])), []).map((args2) => f.apply(void 0, _toConsumableArray(args2))), cells = rows.map((r) => r.map((c) => c.replace(/\n/g, "\\n"))), cellWidths = cells.map((r) => r.map(strlen)), maxWidths = zip(cellWidths, Math.max), cfg = O.assign({ + delimiter: " ", + minColumnWidths: maxWidths.map((x) => 0), + maxTotalWidth: 0 + }, cfg_), delimiterLength = strlen(cfg.delimiter), totalWidth = maxWidths.reduce((a, b) => a + b, 0), relativeWidths = maxWidths.map((w) => w / totalWidth), maxTotalWidth = cfg.maxTotalWidth - delimiterLength * (maxWidths.length - 1), excessWidth = Math.max(0, totalWidth - maxTotalWidth), computedWidths = zip([cfg.minColumnWidths, maxWidths, relativeWidths], (min, max, relative2) => Math.max(min, Math.floor(max - excessWidth * relative2))), restCellWidths = cellWidths.map((widths) => zip([computedWidths, widths], (a, b) => a - b)); + return zip([cells, restCellWidths], (a, b) => zip([a, b], (str, w) => w >= 0 ? cfg.right ? " ".repeat(w) + str : str + " ".repeat(w) : limit(str, strlen(str) + w)).join(cfg.delimiter)); + }; + var asTable = (cfg) => O.assign((arr) => { + var _ref; + if (arr[0] && Array.isArray(arr[0])) { + return asColumns(arr.map((r) => r.map((c, i) => c === void 0 ? "" : cfg.print(c, i))), cfg).join("\n"); + } + const colNames = [].concat(_toConsumableArray(new Set((_ref = []).concat.apply(_ref, _toConsumableArray(arr.map(O.keys)))))), columns = [colNames.map(cfg.title)].concat(_toConsumableArray(arr.map((o) => colNames.map((key) => o[key] === void 0 ? "" : cfg.print(o[key], key))))), lines = asColumns(columns, cfg); + return (cfg.dash ? [lines[0], cfg.dash.repeat(strlen(lines[0]))].concat(_toConsumableArray(lines.slice(1))) : lines).join("\n"); + }, cfg, { + configure: (newConfig) => asTable(O.assign({}, cfg, newConfig)) + }); + module2.exports = asTable({ + maxTotalWidth: Number.MAX_SAFE_INTEGER, + print: String, + title: String, + dash: "-", + right: false + }); + } +}); + +// ../../node_modules/.pnpm/stacktracey@1.2.127/node_modules/stacktracey/stacktracey.js +var require_stacktracey = __commonJS({ + "../../node_modules/.pnpm/stacktracey@1.2.127/node_modules/stacktracey/stacktracey.js"(exports2, module2) { + "use strict"; + var O = Object; + var isBrowser = typeof window !== "undefined" && window.window === window && window.navigator; + var lastOf = (x) => x[x.length - 1]; + var getSource = require_get_source(); + var partition = require_partition3(); + var asTable = require_as_table(); + var nixSlashes = (x) => x.replace(/\\/g, "/"); + var pathRoot = isBrowser ? window.location.href : nixSlashes(process.cwd()) + "/"; + var pathToRelative = isBrowser ? (root, full) => full.replace(root, "") : require("path").relative; + var StackTracey = class extends Array { + constructor(input, offset) { + const originalInput = input, isParseableSyntaxError = input && (input instanceof SyntaxError && !isBrowser); + super(); + this.constructor = StackTracey; + this.__proto__ = StackTracey.prototype; + if (!input) { + input = new Error(); + offset = offset === void 0 ? 1 : offset; + } + if (input instanceof Error) { + input = input[StackTracey.stack] || input.stack || ""; + } + if (typeof input === "string") { + input = StackTracey.rawParse(input).slice(offset).map(StackTracey.extractEntryMetadata); + } + if (Array.isArray(input)) { + if (isParseableSyntaxError) { + const rawLines = require("util").inspect(originalInput).split("\n"), fileLine = rawLines[0].split(":"), line = fileLine.pop(), file = fileLine.join(":"); + if (file) { + input.unshift({ + file: nixSlashes(file), + line, + column: (rawLines[2] || "").indexOf("^") + 1, + sourceLine: rawLines[1], + callee: "(syntax error)", + syntaxError: true + }); + } + } + this.length = input.length; + input.forEach((x, i) => this[i] = x); + } + } + static extractEntryMetadata(e) { + const fileRelative = StackTracey.relativePath(e.file || ""); + return O.assign(e, { + calleeShort: e.calleeShort || lastOf((e.callee || "").split(".")), + fileRelative, + fileShort: StackTracey.shortenPath(fileRelative), + fileName: lastOf((e.file || "").split("/")), + thirdParty: StackTracey.isThirdParty(fileRelative) && !e.index + }); + } + static shortenPath(relativePath) { + return relativePath.replace(/^node_modules\//, "").replace(/^webpack\/bootstrap\//, ""); + } + static relativePath(fullPath) { + return nixSlashes(pathToRelative(pathRoot, fullPath)).replace(/^.*\:\/\/?\/?/, ""); + } + static isThirdParty(relativePath) { + return relativePath[0] === "~" || relativePath[0] === "/" || relativePath.indexOf("node_modules") === 0 || relativePath.indexOf("webpack/bootstrap") === 0; + } + static rawParse(str) { + const lines = (str || "").split("\n"); + const entries = lines.map((line) => { + line = line.trim(); + let callee, fileLineColumn = [], native, planA, planB; + if ((planA = line.match(/at (.+) \((.+)\)/)) || line.slice(0, 3) !== "at " && (planA = line.match(/(.*)@(.*)/))) { + callee = planA[1]; + native = planA[2] === "native"; + fileLineColumn = (planA[2].match(/(.*):(.+):(.+)/) || []).slice(1); + } else if (planB = line.match(/^(at\s+)*(.+):([0-9]+):([0-9]+)/)) { + fileLineColumn = planB.slice(2); + } else { + return void 0; + } + if (callee && !fileLineColumn[0]) { + const type = callee.split(".")[0]; + if (type === "Array") { + native = true; + } + } + return { + beforeParse: line, + callee: callee || "", + index: isBrowser && fileLineColumn[0] === window.location.href, + native: native || false, + file: nixSlashes(fileLineColumn[0] || ""), + line: parseInt(fileLineColumn[1] || "", 10) || void 0, + column: parseInt(fileLineColumn[2] || "", 10) || void 0 + }; + }); + return entries.filter((x) => x !== void 0); + } + withSource(i) { + return this[i] && StackTracey.withSource(this[i]); + } + static withSource(loc) { + if (loc.sourceFile || loc.file && loc.file.indexOf("<") >= 0) { + return loc; + } else { + let resolved = getSource(loc.file || "").resolve(loc); + if (!resolved.sourceFile) { + return loc; + } + if (!resolved.sourceFile.error) { + resolved.file = nixSlashes(resolved.sourceFile.path); + resolved = StackTracey.extractEntryMetadata(resolved); + } + if (!resolved.sourceLine.error) { + if (resolved.sourceLine.includes("// @hide")) { + resolved.sourceLine = resolved.sourceLine.replace("// @hide", ""); + resolved.hide = true; + } + if (resolved.sourceLine.includes("__webpack_require__") || resolved.sourceLine.includes("/******/ ({")) { + resolved.thirdParty = true; + } + } + return O.assign({ sourceLine: "" }, loc, resolved); + } + } + get withSources() { + return new StackTracey(this.map(StackTracey.withSource)); + } + get mergeRepeatedLines() { + return new StackTracey(partition(this, (e) => e.file + e.line).map((group) => { + return group.items.slice(1).reduce((memo, entry) => { + memo.callee = (memo.callee || "") + " \u2192 " + (entry.callee || ""); + memo.calleeShort = (memo.calleeShort || "") + " \u2192 " + (entry.calleeShort || ""); + return memo; + }, O.assign({}, group.items[0])); + })); + } + get clean() { + return this.withSources.mergeRepeatedLines.filter((e, i) => i === 0 || !(e.thirdParty || e.hide || e.native)); + } + at(i) { + return O.assign({ + beforeParse: "", + callee: "", + index: false, + native: false, + file: "", + line: 0, + column: 0 + }, this[i]); + } + static locationsEqual(a, b) { + return a.file === b.file && a.line === b.line && a.column === b.column; + } + get pretty() { + const trimEnd = (s, n) => s && (s.length > n ? s.slice(0, n - 1) + "\u2026" : s); + const trimStart = (s, n) => s && (s.length > n ? "\u2026" + s.slice(-(n - 1)) : s); + return asTable(this.withSources.map((e) => [ + "at " + trimEnd(e.calleeShort, StackTracey.maxColumnWidths.callee), + trimStart(e.fileShort && e.fileShort + ":" + e.line || "", StackTracey.maxColumnWidths.file), + trimEnd((e.sourceLine || "").trim() || "", StackTracey.maxColumnWidths.sourceLine) + ])); + } + static resetCache() { + getSource.resetCache(); + } + }; + StackTracey.maxColumnWidths = { + callee: 30, + file: 60, + sourceLine: 80 + }; + (() => { + const methods = { + include(pred) { + const f = StackTracey.isThirdParty; + O.assign(StackTracey.isThirdParty = (path) => f(path) || pred(path), methods); + }, + except(pred) { + const f = StackTracey.isThirdParty; + O.assign(StackTracey.isThirdParty = (path) => f(path) && !pred(path), methods); + } + }; + O.assign(StackTracey.isThirdParty, methods); + })(); + ["map", "filter", "slice", "concat", "reverse"].forEach((name) => { + StackTracey.prototype[name] = function() { + const arr = Array.from(this); + return new StackTracey(arr[name].apply(arr, arguments)); + }; + }); + StackTracey.stack = typeof Symbol !== "undefined" ? Symbol.for("StackTracey") : "__StackTracey"; + module2.exports = StackTracey; + } +}); + +// ../default-reporter/lib/reportError.js +var require_reportError = __commonJS({ + "../default-reporter/lib/reportError.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var chalk_1 = __importDefault(require_source()); + var equals_1 = __importDefault(require_equals2()); + var stacktracey_1 = __importDefault(require_stacktracey()); + var constants_1 = require_constants2(); + stacktracey_1.default.maxColumnWidths = { + callee: 25, + file: 350, + sourceLine: 25 + }; + var highlight = chalk_1.default.yellow; + var colorPath = chalk_1.default.gray; + function reportError(logObj, config) { + const errorInfo = getErrorInfo(logObj, config); + let output = formatErrorSummary(errorInfo.title, logObj["err"]["code"]); + if (errorInfo.body) { + output += ` + +${errorInfo.body}`; + } + return output; + } + exports2.default = reportError; + function getErrorInfo(logObj, config) { + var _a, _b, _c, _d, _e; + if (logObj["err"]) { + const err = logObj["err"]; + switch (err.code) { + case "ERR_PNPM_UNEXPECTED_STORE": + return reportUnexpectedStore(err, logObj); + case "ERR_PNPM_UNEXPECTED_VIRTUAL_STORE": + return reportUnexpectedVirtualStoreDir(err, logObj); + case "ERR_PNPM_STORE_BREAKING_CHANGE": + return reportStoreBreakingChange(logObj); + case "ERR_PNPM_MODULES_BREAKING_CHANGE": + return reportModulesBreakingChange(logObj); + case "ERR_PNPM_MODIFIED_DEPENDENCY": + return reportModifiedDependency(logObj); + case "ERR_PNPM_LOCKFILE_BREAKING_CHANGE": + return reportLockfileBreakingChange(err, logObj); + case "ERR_PNPM_RECURSIVE_RUN_NO_SCRIPT": + return { title: err.message }; + case "ERR_PNPM_NO_MATCHING_VERSION": + return formatNoMatchingVersion(err, logObj); + case "ERR_PNPM_RECURSIVE_FAIL": + return formatRecursiveCommandSummary(logObj); + case "ERR_PNPM_BAD_TARBALL_SIZE": + return reportBadTarballSize(err, logObj); + case "ELIFECYCLE": + return reportLifecycleError(logObj); + case "ERR_PNPM_UNSUPPORTED_ENGINE": + return reportEngineError(logObj); + case "ERR_PNPM_FETCH_401": + case "ERR_PNPM_FETCH_403": + return reportAuthError(err, logObj, config); + default: { + if (!((_b = (_a = err.code) === null || _a === void 0 ? void 0 : _a.startsWith) === null || _b === void 0 ? void 0 : _b.call(_a, "ERR_PNPM_"))) { + return formatGenericError((_c = err.message) !== null && _c !== void 0 ? _c : logObj["message"], err.stack); + } + const errorOutput = []; + if ((_d = logObj["pkgsStack"]) === null || _d === void 0 ? void 0 : _d.length) { + errorOutput.push(formatPkgsStack(logObj["pkgsStack"])); + } + if (logObj["hint"]) { + errorOutput.push(logObj["hint"]); + } + return { + title: (_e = err.message) !== null && _e !== void 0 ? _e : "", + body: errorOutput.join(constants_1.EOL) + }; + } + } + } + return { title: logObj["message"] }; + } + function formatPkgsStack(pkgsStack) { + return `This error happened while installing the dependencies of ${pkgsStack[0].name}@${pkgsStack[0].version}${pkgsStack.slice(1).map(({ name, version }) => `${constants_1.EOL} at ${name}@${version}`).join("")}`; + } + function formatNoMatchingVersion(err, msg) { + const meta = msg["packageMeta"]; + let output = `The latest release of ${meta.name} is "${meta["dist-tags"].latest}".${constants_1.EOL}`; + if (!equals_1.default(Object.keys(meta["dist-tags"]), ["latest"])) { + output += constants_1.EOL + "Other releases are:" + constants_1.EOL; + for (const tag in meta["dist-tags"]) { + if (tag !== "latest") { + output += ` * ${tag}: ${meta["dist-tags"][tag]}${constants_1.EOL}`; + } + } + } + output += `${constants_1.EOL}If you need the full list of all ${Object.keys(meta.versions).length} published versions run "$ pnpm view ${meta.name} versions".`; + return { + title: err.message, + body: output + }; + } + function reportUnexpectedStore(err, msg) { + return { + title: err.message, + body: `The dependencies at "${msg.modulesDir}" are currently linked from the store at "${msg.expectedStorePath}". + +pnpm now wants to use the store at "${msg.actualStorePath}" to link dependencies. + +If you want to use the new store location, reinstall your dependencies with "pnpm install". + +You may change the global store location by running "pnpm config set store-dir ". +(This error may happen if the node_modules was installed with a different major version of pnpm)` + }; + } + function reportUnexpectedVirtualStoreDir(err, msg) { + return { + title: err.message, + body: `The dependencies at "${msg.modulesDir}" are currently symlinked from the virtual store directory at "${msg.expected}". + +pnpm now wants to use the virtual store at "${msg.actual}" to link dependencies from the store. + +If you want to use the new virtual store location, reinstall your dependencies with "pnpm install". + +You may change the virtual store location by changing the value of the virtual-store-dir config.` + }; + } + function reportStoreBreakingChange(msg) { + let output = `Store path: ${colorPath(msg.storePath)} + +Run "pnpm install" to recreate node_modules.`; + if (msg.additionalInformation) { + output = `${output}${constants_1.EOL}${constants_1.EOL}${msg.additionalInformation}`; + } + output += formatRelatedSources(msg); + return { + title: "The store used for the current node_modules is incomatible with the current version of pnpm", + body: output + }; + } + function reportModulesBreakingChange(msg) { + let output = `node_modules path: ${colorPath(msg.modulesPath)} + +Run ${highlight("pnpm install")} to recreate node_modules.`; + if (msg.additionalInformation) { + output = `${output}${constants_1.EOL}${constants_1.EOL}${msg.additionalInformation}`; + } + output += formatRelatedSources(msg); + return { + title: "The current version of pnpm is not compatible with the available node_modules structure", + body: output + }; + } + function formatRelatedSources(msg) { + let output = ""; + if (!msg.relatedIssue && !msg.relatedPR) + return output; + output += constants_1.EOL; + if (msg.relatedIssue) { + output += constants_1.EOL + `Related issue: ${colorPath(`https://github.com/pnpm/pnpm/issues/${msg.relatedIssue}`)}`; + } + if (msg.relatedPR) { + output += constants_1.EOL + `Related PR: ${colorPath(`https://github.com/pnpm/pnpm/pull/${msg.relatedPR}`)}`; + } + return output; + } + function formatGenericError(errorMessage, stack2) { + if (stack2) { + let prettyStack; + try { + prettyStack = new stacktracey_1.default(stack2).pretty; + } catch (err) { + prettyStack = void 0; + } + if (prettyStack) { + return { + title: errorMessage, + body: prettyStack + }; + } + } + return { title: errorMessage }; + } + function formatErrorSummary(message2, code) { + return `${chalk_1.default.bgRed.black(`\u2009${code !== null && code !== void 0 ? code : "ERROR"}\u2009`)} ${chalk_1.default.red(message2)}`; + } + function reportModifiedDependency(msg) { + return { + title: "Packages in the store have been mutated", + body: `These packages are modified: +${msg.modified.map((pkgPath) => colorPath(pkgPath)).join(constants_1.EOL)} + +You can run ${highlight("pnpm install")} to refetch the modified packages` + }; + } + function reportLockfileBreakingChange(err, msg) { + return { + title: err.message, + body: `Run with the ${highlight("--force")} parameter to recreate the lockfile.` + }; + } + function formatRecursiveCommandSummary(msg) { + const output = constants_1.EOL + `Summary: ${chalk_1.default.red(`${msg.fails.length} fails`)}, ${msg.passes} passes` + constants_1.EOL + constants_1.EOL + msg.fails.map((fail) => { + return fail.prefix + ":" + constants_1.EOL + formatErrorSummary(fail.message); + }).join(constants_1.EOL + constants_1.EOL); + return { + title: "", + body: output + }; + } + function reportBadTarballSize(err, msg) { + return { + title: err.message, + body: `Seems like you have internet connection issues. +Try running the same command again. +If that doesn't help, try one of the following: + +- Set a bigger value for the \`fetch-retries\` config. + To check the current value of \`fetch-retries\`, run \`pnpm get fetch-retries\`. + To set a new value, run \`pnpm set fetch-retries \`. + +- Set \`network-concurrency\` to 1. + This change will slow down installation times, so it is recommended to + delete the config once the internet connection is good again: \`pnpm config delete network-concurrency\` + +NOTE: You may also override configs via flags. +For instance, \`pnpm install --fetch-retries 5 --network-concurrency 1\`` + }; + } + function reportLifecycleError(msg) { + if (msg.stage === "test") { + return { title: "Test failed. See above for more details." }; + } + if (typeof msg.errno === "number") { + return { title: `Command failed with exit code ${msg.errno}.` }; + } + return { title: "Command failed." }; + } + function reportEngineError(msg) { + let output = ""; + if (msg.wanted.pnpm) { + output += `Your pnpm version is incompatible with "${msg.packageId}". + +Expected version: ${msg.wanted.pnpm} +Got: ${msg.current.pnpm} + +This is happening because the package's manifest has an engines.pnpm field specified. +To fix this issue, install the required pnpm version globally. + +To install the latest version of pnpm, run "pnpm i -g pnpm". +To check your pnpm version, run "pnpm -v".`; + } + if (msg.wanted.node) { + if (output) + output += constants_1.EOL + constants_1.EOL; + output += `Your Node version is incompatible with "${msg.packageId}". + +Expected version: ${msg.wanted.node} +Got: ${msg.current.node} + +This is happening because the package's manifest has an engines.node field specified. +To fix this issue, install the required Node version.`; + } + return { + title: "Unsupported environment (bad pnpm and/or Node.js version)", + body: output + }; + } + function reportAuthError(err, msg, config) { + var _a; + const foundSettings = []; + for (const [key, value] of Object.entries((_a = config === null || config === void 0 ? void 0 : config.rawConfig) !== null && _a !== void 0 ? _a : {})) { + if (key.startsWith("@")) { + foundSettings.push(`${key}=${value}`); + continue; + } + if (key.endsWith("_auth") || key.endsWith("_authToken") || key.endsWith("username") || key.endsWith("_password") || key.endsWith("always-auth")) { + foundSettings.push(`${key}=${hideSecureInfo(key, value)}`); + } + } + let output = msg.hint ? `${msg.hint}${constants_1.EOL}${constants_1.EOL}` : ""; + if (foundSettings.length === 0) { + output += `No authorization settings were found in the configs. +Try to log in to the registry by running "pnpm login" +or add the auth tokens manually to the ~/.npmrc file.`; + } else { + output += `These authorization settings were found: +${foundSettings.join("\n")}`; + } + return { + title: err.message, + body: output + }; + } + function hideSecureInfo(key, value) { + if (key.endsWith("_password")) + return "[hidden]"; + if (key.endsWith("_auth") || key.endsWith("_authToken")) + return `${value.substring(0, 4)}[hidden]`; + return value; + } + } +}); + +// ../default-reporter/lib/reporterForClient/reportMisc.js +var require_reportMisc = __commonJS({ + "../default-reporter/lib/reporterForClient/reportMisc.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var os_1 = __importDefault(require("os")); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var reportError_1 = __importDefault(require_reportError()); + var formatWarn_1 = __importDefault(require_formatWarn()); + var zooming_1 = require_zooming(); + var LOG_LEVEL_NUMBER = { + error: 0, + warn: 1, + info: 2, + debug: 3 + }; + var MAX_SHOWN_WARNINGS = 5; + exports2.default = (log$, opts) => { + var _a, _b; + const maxLogLevel = (_b = LOG_LEVEL_NUMBER[(_a = opts.logLevel) !== null && _a !== void 0 ? _a : "info"]) !== null && _b !== void 0 ? _b : LOG_LEVEL_NUMBER["info"]; + const reportWarning = makeWarningReporter(opts); + return Rx.merge(log$.registry, log$.other).pipe(operators_1.filter((obj) => LOG_LEVEL_NUMBER[obj.level] <= maxLogLevel && (obj.level !== "info" || !obj["prefix"] || obj["prefix"] === opts.cwd)), operators_1.map((obj) => { + switch (obj.level) { + case "warn": { + return reportWarning(obj); + } + case "error": + if (obj["prefix"] && obj["prefix"] !== opts.cwd) { + return Rx.of({ + msg: `${obj["prefix"]}:` + os_1.default.EOL + reportError_1.default(obj, opts.config) + }); + } + return Rx.of({ msg: reportError_1.default(obj, opts.config) }); + default: + return Rx.of({ msg: obj["message"] }); + } + })); + }; + function makeWarningReporter(opts) { + let warningsCounter = 0; + let collapsedWarnings; + return (obj) => { + warningsCounter++; + if (opts.appendOnly || warningsCounter <= MAX_SHOWN_WARNINGS) { + return Rx.of({ msg: zooming_1.autozoom(opts.cwd, obj.prefix, formatWarn_1.default(obj.message), opts) }); + } + const warningMsg = formatWarn_1.default(`${warningsCounter - MAX_SHOWN_WARNINGS} other warnings`); + if (!collapsedWarnings) { + collapsedWarnings = new Rx.Subject(); + setTimeout(() => collapsedWarnings.next({ msg: warningMsg }), 0); + return Rx.from(collapsedWarnings); + } + setTimeout(() => collapsedWarnings.next({ msg: warningMsg }), 0); + return Rx.NEVER; + }; + } + } +}); + +// ../default-reporter/lib/reporterForClient/reportProgress.js +var require_reportProgress = __commonJS({ + "../default-reporter/lib/reporterForClient/reportProgress.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var outputConstants_1 = require_outputConstants(); + var zooming_1 = require_zooming(); + exports2.default = (log$, opts) => { + const progressOutput = throttledProgressOutput.bind(null, opts.throttle); + return getModulesInstallProgress$(log$.stage, log$.progress).pipe(operators_1.map(({ importingDone$, progress$, requirer }) => { + const output$ = progressOutput(importingDone$, progress$); + if (requirer === opts.cwd) { + return output$; + } + return output$.pipe(operators_1.map((msg) => { + msg["msg"] = zooming_1.zoomOut(opts.cwd, requirer, msg["msg"]); + return msg; + })); + })); + }; + function throttledProgressOutput(throttle, importingDone$, progress$) { + let combinedProgress = Rx.combineLatest(progress$, importingDone$).pipe(operators_1.takeWhile(([, importingDone]) => !importingDone, true)); + if (throttle != null) { + combinedProgress = combinedProgress.pipe(throttle); + } + return combinedProgress.pipe(operators_1.map(createStatusMessage)); + } + function getModulesInstallProgress$(stage$, progress$) { + const modulesInstallProgressPushStream = new Rx.Subject(); + const progessStatsPushStreamByRequirer = getProgessStatsPushStreamByRequirer(progress$); + const stagePushStreamByRequirer = {}; + stage$.forEach((log2) => { + if (!stagePushStreamByRequirer[log2.prefix]) { + stagePushStreamByRequirer[log2.prefix] = new Rx.Subject(); + if (!progessStatsPushStreamByRequirer[log2.prefix]) { + progessStatsPushStreamByRequirer[log2.prefix] = new Rx.Subject(); + } + modulesInstallProgressPushStream.next({ + importingDone$: stage$ToImportingDone$(Rx.from(stagePushStreamByRequirer[log2.prefix])), + progress$: Rx.from(progessStatsPushStreamByRequirer[log2.prefix]), + requirer: log2.prefix + }); + } + stagePushStreamByRequirer[log2.prefix].next(log2); + if (log2.stage === "importing_done") { + progessStatsPushStreamByRequirer[log2.prefix].complete(); + stagePushStreamByRequirer[log2.prefix].complete(); + } + }).catch(() => { + }); + return Rx.from(modulesInstallProgressPushStream); + } + function stage$ToImportingDone$(stage$) { + return stage$.pipe(operators_1.filter((log2) => log2.stage === "importing_done"), operators_1.mapTo(true), operators_1.take(1), operators_1.startWith(false)); + } + function getProgessStatsPushStreamByRequirer(progress$) { + const progessStatsPushStreamByRequirer = {}; + const previousProgressStatsByRequirer = {}; + progress$.forEach((log2) => { + if (!previousProgressStatsByRequirer[log2.requester]) { + previousProgressStatsByRequirer[log2.requester] = { + fetched: 0, + imported: 0, + resolved: 0, + reused: 0 + }; + } + switch (log2.status) { + case "resolved": + previousProgressStatsByRequirer[log2.requester].resolved++; + break; + case "fetched": + previousProgressStatsByRequirer[log2.requester].fetched++; + break; + case "found_in_store": + previousProgressStatsByRequirer[log2.requester].reused++; + break; + case "imported": + previousProgressStatsByRequirer[log2.requester].imported++; + break; + } + if (!progessStatsPushStreamByRequirer[log2.requester]) { + progessStatsPushStreamByRequirer[log2.requester] = new Rx.Subject(); + } + progessStatsPushStreamByRequirer[log2.requester].next(previousProgressStatsByRequirer[log2.requester]); + }).catch(() => { + }); + return progessStatsPushStreamByRequirer; + } + function createStatusMessage([progress, importingDone]) { + const msg = `Progress: resolved ${outputConstants_1.hlValue(progress.resolved.toString())}, reused ${outputConstants_1.hlValue(progress.reused.toString())}, downloaded ${outputConstants_1.hlValue(progress.fetched.toString())}, added ${outputConstants_1.hlValue(progress.imported.toString())}`; + if (importingDone) { + return { + done: true, + fixed: false, + msg: `${msg}, done` + }; + } + return { + fixed: true, + msg + }; + } + } +}); + +// ../default-reporter/lib/reporterForClient/reportRequestRetry.js +var require_reportRequestRetry = __commonJS({ + "../default-reporter/lib/reporterForClient/reportRequestRetry.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var pretty_ms_1 = __importDefault(require_pretty_ms()); + var formatWarn_1 = __importDefault(require_formatWarn()); + exports2.default = (requestRetry$) => { + return requestRetry$.pipe(operators_1.map((log2) => { + const retriesLeft = log2.maxRetries - log2.attempt + 1; + const errorCode = log2.error["httpStatusCode"] || log2.error["status"] || log2.error["errno"] || log2.error["code"]; + const msg = `${log2.method} ${log2.url} error (${errorCode}). Will retry in ${pretty_ms_1.default(log2.timeout, { verbose: true })}. ${retriesLeft} retries left.`; + return Rx.of({ msg: formatWarn_1.default(msg) }); + })); + }; + } +}); + +// ../default-reporter/lib/reporterForClient/reportScope.js +var require_reportScope = __commonJS({ + "../default-reporter/lib/reporterForClient/reportScope.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var COMMANDS_THAT_REPORT_SCOPE = new Set([ + "install", + "link", + "prune", + "rebuild", + "remove", + "unlink", + "update", + "run", + "test" + ]); + exports2.default = (scope$, opts) => { + if (!COMMANDS_THAT_REPORT_SCOPE.has(opts.cmd)) { + return Rx.NEVER; + } + return scope$.pipe(operators_1.take(1), operators_1.map((log2) => { + if (log2.selected === 1) { + return Rx.NEVER; + } + let msg = "Scope: "; + if (log2.selected === log2.total) { + msg += `all ${log2.total}`; + } else { + msg += `${log2.selected}`; + if (log2.total) { + msg += ` of ${log2.total}`; + } + } + if (log2.workspacePrefix) { + msg += " workspace projects"; + } else { + msg += " projects"; + } + return Rx.of({ msg }); + })); + }; + } +}); + +// ../default-reporter/lib/reporterForClient/reportSkippedOptionalDependencies.js +var require_reportSkippedOptionalDependencies = __commonJS({ + "../default-reporter/lib/reporterForClient/reportSkippedOptionalDependencies.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + exports2.default = (skippedOptionalDependency$, opts) => { + return skippedOptionalDependency$.pipe(operators_1.filter((log2) => Boolean(log2["prefix"] === opts.cwd && log2.parents && log2.parents.length === 0)), operators_1.map((log2) => Rx.of({ + msg: `info: ${log2.package["id"] || log2.package.name && `${log2.package.name}@${log2.package.version}` || log2.package["pref"]} is an optional dependency and failed compatibility check. Excluding it from installation.` + }))); + }; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/always.js +var require_always = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/always.js"(exports2, module2) { + var _curry1 = require_curry1(); + var always = /* @__PURE__ */ _curry1(function always2(val) { + return function() { + return val; + }; + }); + module2.exports = always; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/times.js +var require_times = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/times.js"(exports2, module2) { + var _curry2 = require_curry2(); + var times = /* @__PURE__ */ _curry2(function times2(fn2, n) { + var len = Number(n); + var idx = 0; + var list; + if (len < 0 || isNaN(len)) { + throw new RangeError("n must be a non-negative number"); + } + list = new Array(len); + while (idx < len) { + list[idx] = fn2(idx); + idx += 1; + } + return list; + }); + module2.exports = times; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/repeat.js +var require_repeat2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/repeat.js"(exports2, module2) { + var _curry2 = require_curry2(); + var always = require_always(); + var times = require_times(); + var repeat = /* @__PURE__ */ _curry2(function repeat2(value, n) { + return times(always(value), n); + }); + module2.exports = repeat; + } +}); + +// ../../node_modules/.pnpm/char-regex@1.0.2/node_modules/char-regex/index.js +var require_char_regex = __commonJS({ + "../../node_modules/.pnpm/char-regex@1.0.2/node_modules/char-regex/index.js"(exports2, module2) { + "use strict"; + module2.exports = () => { + const astralRange = "\\ud800-\\udfff"; + const comboMarksRange = "\\u0300-\\u036f"; + const comboHalfMarksRange = "\\ufe20-\\ufe2f"; + const comboSymbolsRange = "\\u20d0-\\u20ff"; + const comboMarksExtendedRange = "\\u1ab0-\\u1aff"; + const comboMarksSupplementRange = "\\u1dc0-\\u1dff"; + const comboRange = comboMarksRange + comboHalfMarksRange + comboSymbolsRange + comboMarksExtendedRange + comboMarksSupplementRange; + const varRange = "\\ufe0e\\ufe0f"; + const familyRange = "\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93"; + const astral = `[${astralRange}]`; + const combo = `[${comboRange}]`; + const fitz = "\\ud83c[\\udffb-\\udfff]"; + const modifier = `(?:${combo}|${fitz})`; + const nonAstral = `[^${astralRange}]`; + const regional = "(?:\\uD83C[\\uDDE6-\\uDDFF]){2}"; + const surrogatePair = "[\\ud800-\\udbff][\\udc00-\\udfff]"; + const zwj = "\\u200d"; + const blackFlag = "(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)"; + const family = `[${familyRange}]`; + const optModifier = `${modifier}?`; + const optVar = `[${varRange}]?`; + const optJoin = `(?:${zwj}(?:${[nonAstral, regional, surrogatePair].join("|")})${optVar + optModifier})*`; + const seq = optVar + optModifier + optJoin; + const nonAstralCombo = `${nonAstral}${combo}?`; + const symbol = `(?:${[nonAstralCombo, combo, regional, surrogatePair, astral, family].join("|")})`; + return new RegExp(`${blackFlag}|${fitz}(?=${fitz})|${symbol + seq}`, "g"); + }; + } +}); + +// ../../node_modules/.pnpm/string-length@4.0.2/node_modules/string-length/index.js +var require_string_length = __commonJS({ + "../../node_modules/.pnpm/string-length@4.0.2/node_modules/string-length/index.js"(exports2, module2) { + "use strict"; + var stripAnsi = require_strip_ansi(); + var charRegex = require_char_regex(); + var stringLength = (string) => { + if (string === "") { + return 0; + } + const strippedString = stripAnsi(string); + if (strippedString === "") { + return 0; + } + return strippedString.match(charRegex()).length; + }; + module2.exports = stringLength; + } +}); + +// ../default-reporter/lib/reporterForClient/reportStats.js +var require_reportStats = __commonJS({ + "../default-reporter/lib/reporterForClient/reportStats.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var chalk_1 = __importDefault(require_source()); + var repeat_1 = __importDefault(require_repeat2()); + var string_length_1 = __importDefault(require_string_length()); + var constants_1 = require_constants2(); + var outputConstants_1 = require_outputConstants(); + var zooming_1 = require_zooming(); + exports2.default = (log$, opts) => { + const stats$ = opts.isRecursive ? log$.stats : log$.stats.pipe(operators_1.filter((log2) => log2.prefix !== opts.cwd)); + const outputs = [ + statsForNotCurrentPackage(stats$, { + cmd: opts.cmd, + currentPrefix: opts.cwd, + width: opts.width + }) + ]; + if (!opts.isRecursive) { + outputs.push(statsForCurrentPackage(log$.stats, { + cmd: opts.cmd, + currentPrefix: opts.cwd, + width: opts.width + })); + } + return outputs; + }; + function statsForCurrentPackage(stats$, opts) { + return stats$.pipe(operators_1.filter((log2) => log2.prefix === opts.currentPrefix), operators_1.take(opts.cmd === "install" || opts.cmd === "install-test" || opts.cmd === "add" || opts.cmd === "update" ? 2 : 1), operators_1.reduce((acc, log2) => { + if (typeof log2["added"] === "number") { + acc["added"] = log2["added"]; + } else if (typeof log2["removed"] === "number") { + acc["removed"] = log2["removed"]; + } + return acc; + }, {}), operators_1.map((stats) => { + if (!stats["removed"] && !stats["added"]) { + if (opts.cmd === "link") { + return Rx.NEVER; + } + return Rx.of({ msg: "Already up-to-date" }); + } + let msg = "Packages:"; + if (stats["added"]) { + msg += " " + chalk_1.default.green(`+${stats["added"].toString()}`); + } + if (stats["removed"]) { + msg += " " + chalk_1.default.red(`-${stats["removed"].toString()}`); + } + msg += constants_1.EOL + printPlusesAndMinuses(opts.width, stats["added"] || 0, stats["removed"] || 0); + return Rx.of({ msg }); + })); + } + function statsForNotCurrentPackage(stats$, opts) { + const stats = {}; + const cookedStats$ = opts.cmd !== "remove" ? stats$.pipe(operators_1.map((log2) => { + if (!stats[log2.prefix]) { + stats[log2.prefix] = log2; + return { seed: stats, value: null }; + } else if (typeof stats[log2.prefix].added === "number" && typeof log2["added"] === "number") { + stats[log2.prefix].added += log2["added"]; + return { seed: stats, value: null }; + } else if (typeof stats[log2.prefix].removed === "number" && typeof log2["removed"] === "number") { + stats[log2.prefix].removed += log2["removed"]; + return { seed: stats, value: null }; + } else { + const value = { ...stats[log2.prefix], ...log2 }; + delete stats[log2.prefix]; + return value; + } + }, {})) : stats$; + return cookedStats$.pipe(operators_1.filter((stats2) => stats2 !== null && (stats2["removed"] || stats2["added"])), operators_1.map((stats2) => { + const parts = []; + if (stats2["added"]) { + parts.push(padStep(chalk_1.default.green(`+${stats2["added"].toString()}`), 4)); + } + if (stats2["removed"]) { + parts.push(padStep(chalk_1.default.red(`-${stats2["removed"].toString()}`), 4)); + } + let msg = zooming_1.zoomOut(opts.currentPrefix, stats2["prefix"], parts.join(" ")); + const rest = Math.max(0, opts.width - 1 - string_length_1.default(msg)); + msg += " " + printPlusesAndMinuses(rest, roundStats(stats2["added"] || 0), roundStats(stats2["removed"] || 0)); + return Rx.of({ msg }); + })); + } + function padStep(s, step) { + const sLength = string_length_1.default(s); + const placeholderLength = Math.ceil(sLength / step) * step; + if (sLength < placeholderLength) { + return repeat_1.default(" ", placeholderLength - sLength).join("") + s; + } + return s; + } + function roundStats(stat) { + if (stat === 0) + return 0; + return Math.max(1, Math.round(stat / 10)); + } + function printPlusesAndMinuses(maxWidth, added, removed) { + if (maxWidth === 0) + return ""; + const changes = added + removed; + let addedChars; + let removedChars; + if (changes > maxWidth) { + if (!added) { + addedChars = 0; + removedChars = maxWidth; + } else if (!removed) { + addedChars = maxWidth; + removedChars = 0; + } else { + const p = maxWidth / changes; + addedChars = Math.min(Math.max(Math.floor(added * p), 1), maxWidth - 1); + removedChars = maxWidth - addedChars; + } + } else { + addedChars = added; + removedChars = removed; + } + return `${repeat_1.default(outputConstants_1.ADDED_CHAR, addedChars).join("")}${repeat_1.default(outputConstants_1.REMOVED_CHAR, removedChars).join("")}`; + } + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/internal/constants.js +var require_constants3 = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/internal/constants.js"(exports2, module2) { + var SEMVER_SPEC_VERSION = "2.0.0"; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; + var MAX_SAFE_COMPONENT_LENGTH = 16; + module2.exports = { + SEMVER_SPEC_VERSION, + MAX_LENGTH, + MAX_SAFE_INTEGER, + MAX_SAFE_COMPONENT_LENGTH + }; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/internal/debug.js +var require_debug = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/internal/debug.js"(exports2, module2) { + var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args2) => console.error("SEMVER", ...args2) : () => { + }; + module2.exports = debug; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/internal/re.js +var require_re = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/internal/re.js"(exports2, module2) { + var { MAX_SAFE_COMPONENT_LENGTH } = require_constants3(); + var debug = require_debug(); + exports2 = module2.exports = {}; + var re = exports2.re = []; + var src = exports2.src = []; + var t = exports2.t = {}; + var R = 0; + var createToken = (name, value, isGlobal) => { + const index = R++; + debug(index, value); + t[name] = index; + src[index] = value; + re[index] = new RegExp(value, isGlobal ? "g" : void 0); + }; + createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); + createToken("NUMERICIDENTIFIERLOOSE", "[0-9]+"); + createToken("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*"); + createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); + createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`); + createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`); + createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); + createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); + createToken("BUILDIDENTIFIER", "[0-9A-Za-z-]+"); + createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); + createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); + createToken("FULL", `^${src[t.FULLPLAIN]}$`); + createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); + createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); + createToken("GTLT", "((?:<|>)?=?)"); + createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); + createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); + createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); + createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`); + createToken("COERCERTL", src[t.COERCE], true); + createToken("LONETILDE", "(?:~>?)"); + createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); + exports2.tildeTrimReplace = "$1~"; + createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); + createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("LONECARET", "(?:\\^)"); + createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); + exports2.caretTrimReplace = "$1^"; + createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); + createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); + createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); + createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); + exports2.comparatorTrimReplace = "$1$2$3"; + createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); + createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); + createToken("STAR", "(<|>)?=?\\s*\\*"); + createToken("GTE0", "^\\s*>=\\s*0.0.0\\s*$"); + createToken("GTE0PRE", "^\\s*>=\\s*0.0.0-0\\s*$"); + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/internal/parse-options.js +var require_parse_options = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/internal/parse-options.js"(exports2, module2) { + var opts = ["includePrerelease", "loose", "rtl"]; + var parseOptions = (options) => !options ? {} : typeof options !== "object" ? { loose: true } : opts.filter((k) => options[k]).reduce((options2, k) => { + options2[k] = true; + return options2; + }, {}); + module2.exports = parseOptions; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/internal/identifiers.js +var require_identifiers = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/internal/identifiers.js"(exports2, module2) { + var numeric = /^[0-9]+$/; + var compareIdentifiers = (a, b) => { + const anum = numeric.test(a); + const bnum = numeric.test(b); + if (anum && bnum) { + a = +a; + b = +b; + } + return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; + }; + var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a); + module2.exports = { + compareIdentifiers, + rcompareIdentifiers + }; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/classes/semver.js +var require_semver = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/classes/semver.js"(exports2, module2) { + var debug = require_debug(); + var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants3(); + var { re, t } = require_re(); + var parseOptions = require_parse_options(); + var { compareIdentifiers } = require_identifiers(); + var SemVer = class { + constructor(version, options) { + options = parseOptions(options); + if (version instanceof SemVer) { + if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) { + return version; + } else { + version = version.version; + } + } else if (typeof version !== "string") { + throw new TypeError(`Invalid Version: ${version}`); + } + if (version.length > MAX_LENGTH) { + throw new TypeError(`version is longer than ${MAX_LENGTH} characters`); + } + debug("SemVer", version, options); + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); + if (!m) { + throw new TypeError(`Invalid Version: ${version}`); + } + this.raw = version; + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError("Invalid major version"); + } + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError("Invalid minor version"); + } + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError("Invalid patch version"); + } + if (!m[4]) { + this.prerelease = []; + } else { + this.prerelease = m[4].split(".").map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num; + } + } + return id; + }); + } + this.build = m[5] ? m[5].split(".") : []; + this.format(); + } + format() { + this.version = `${this.major}.${this.minor}.${this.patch}`; + if (this.prerelease.length) { + this.version += `-${this.prerelease.join(".")}`; + } + return this.version; + } + toString() { + return this.version; + } + compare(other) { + debug("SemVer.compare", this.version, this.options, other); + if (!(other instanceof SemVer)) { + if (typeof other === "string" && other === this.version) { + return 0; + } + other = new SemVer(other, this.options); + } + if (other.version === this.version) { + return 0; + } + return this.compareMain(other) || this.comparePre(other); + } + compareMain(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); + } + comparePre(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + if (this.prerelease.length && !other.prerelease.length) { + return -1; + } else if (!this.prerelease.length && other.prerelease.length) { + return 1; + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0; + } + let i = 0; + do { + const a = this.prerelease[i]; + const b = other.prerelease[i]; + debug("prerelease compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i); + } + compareBuild(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + let i = 0; + do { + const a = this.build[i]; + const b = other.build[i]; + debug("prerelease compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i); + } + inc(release, identifier) { + switch (release) { + case "premajor": + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc("pre", identifier); + break; + case "preminor": + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc("pre", identifier); + break; + case "prepatch": + this.prerelease.length = 0; + this.inc("patch", identifier); + this.inc("pre", identifier); + break; + case "prerelease": + if (this.prerelease.length === 0) { + this.inc("patch", identifier); + } + this.inc("pre", identifier); + break; + case "major": + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { + this.major++; + } + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case "minor": + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++; + } + this.patch = 0; + this.prerelease = []; + break; + case "patch": + if (this.prerelease.length === 0) { + this.patch++; + } + this.prerelease = []; + break; + case "pre": + if (this.prerelease.length === 0) { + this.prerelease = [0]; + } else { + let i = this.prerelease.length; + while (--i >= 0) { + if (typeof this.prerelease[i] === "number") { + this.prerelease[i]++; + i = -2; + } + } + if (i === -1) { + this.prerelease.push(0); + } + } + if (identifier) { + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0]; + } + } else { + this.prerelease = [identifier, 0]; + } + } + break; + default: + throw new Error(`invalid increment argument: ${release}`); + } + this.format(); + this.raw = this.version; + return this; + } + }; + module2.exports = SemVer; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/parse.js +var require_parse = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/parse.js"(exports2, module2) { + var { MAX_LENGTH } = require_constants3(); + var { re, t } = require_re(); + var SemVer = require_semver(); + var parseOptions = require_parse_options(); + var parse = (version, options) => { + options = parseOptions(options); + if (version instanceof SemVer) { + return version; + } + if (typeof version !== "string") { + return null; + } + if (version.length > MAX_LENGTH) { + return null; + } + const r = options.loose ? re[t.LOOSE] : re[t.FULL]; + if (!r.test(version)) { + return null; + } + try { + return new SemVer(version, options); + } catch (er) { + return null; + } + }; + module2.exports = parse; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/valid.js +var require_valid = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/valid.js"(exports2, module2) { + var parse = require_parse(); + var valid = (version, options) => { + const v = parse(version, options); + return v ? v.version : null; + }; + module2.exports = valid; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/clean.js +var require_clean = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/clean.js"(exports2, module2) { + var parse = require_parse(); + var clean = (version, options) => { + const s = parse(version.trim().replace(/^[=v]+/, ""), options); + return s ? s.version : null; + }; + module2.exports = clean; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/inc.js +var require_inc = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/inc.js"(exports2, module2) { + var SemVer = require_semver(); + var inc = (version, release, options, identifier) => { + if (typeof options === "string") { + identifier = options; + options = void 0; + } + try { + return new SemVer(version, options).inc(release, identifier).version; + } catch (er) { + return null; + } + }; + module2.exports = inc; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/compare.js +var require_compare = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/compare.js"(exports2, module2) { + var SemVer = require_semver(); + var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)); + module2.exports = compare; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/eq.js +var require_eq = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/eq.js"(exports2, module2) { + var compare = require_compare(); + var eq = (a, b, loose) => compare(a, b, loose) === 0; + module2.exports = eq; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/diff.js +var require_diff = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/diff.js"(exports2, module2) { + var parse = require_parse(); + var eq = require_eq(); + var diff = (version1, version2) => { + if (eq(version1, version2)) { + return null; + } else { + const v1 = parse(version1); + const v2 = parse(version2); + const hasPre = v1.prerelease.length || v2.prerelease.length; + const prefix = hasPre ? "pre" : ""; + const defaultResult = hasPre ? "prerelease" : ""; + for (const key in v1) { + if (key === "major" || key === "minor" || key === "patch") { + if (v1[key] !== v2[key]) { + return prefix + key; + } + } + } + return defaultResult; + } + }; + module2.exports = diff; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/major.js +var require_major = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/major.js"(exports2, module2) { + var SemVer = require_semver(); + var major = (a, loose) => new SemVer(a, loose).major; + module2.exports = major; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/minor.js +var require_minor = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/minor.js"(exports2, module2) { + var SemVer = require_semver(); + var minor = (a, loose) => new SemVer(a, loose).minor; + module2.exports = minor; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/patch.js +var require_patch = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/patch.js"(exports2, module2) { + var SemVer = require_semver(); + var patch = (a, loose) => new SemVer(a, loose).patch; + module2.exports = patch; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/prerelease.js +var require_prerelease = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/prerelease.js"(exports2, module2) { + var parse = require_parse(); + var prerelease = (version, options) => { + const parsed = parse(version, options); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; + }; + module2.exports = prerelease; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/rcompare.js +var require_rcompare = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/rcompare.js"(exports2, module2) { + var compare = require_compare(); + var rcompare = (a, b, loose) => compare(b, a, loose); + module2.exports = rcompare; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/compare-loose.js +var require_compare_loose = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/compare-loose.js"(exports2, module2) { + var compare = require_compare(); + var compareLoose = (a, b) => compare(a, b, true); + module2.exports = compareLoose; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/compare-build.js +var require_compare_build = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/compare-build.js"(exports2, module2) { + var SemVer = require_semver(); + var compareBuild = (a, b, loose) => { + const versionA = new SemVer(a, loose); + const versionB = new SemVer(b, loose); + return versionA.compare(versionB) || versionA.compareBuild(versionB); + }; + module2.exports = compareBuild; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/sort.js +var require_sort2 = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/sort.js"(exports2, module2) { + var compareBuild = require_compare_build(); + var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)); + module2.exports = sort; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/rsort.js +var require_rsort = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/rsort.js"(exports2, module2) { + var compareBuild = require_compare_build(); + var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)); + module2.exports = rsort; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/gt.js +var require_gt = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/gt.js"(exports2, module2) { + var compare = require_compare(); + var gt = (a, b, loose) => compare(a, b, loose) > 0; + module2.exports = gt; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/lt.js +var require_lt = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/lt.js"(exports2, module2) { + var compare = require_compare(); + var lt = (a, b, loose) => compare(a, b, loose) < 0; + module2.exports = lt; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/neq.js +var require_neq = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/neq.js"(exports2, module2) { + var compare = require_compare(); + var neq = (a, b, loose) => compare(a, b, loose) !== 0; + module2.exports = neq; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/gte.js +var require_gte = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/gte.js"(exports2, module2) { + var compare = require_compare(); + var gte = (a, b, loose) => compare(a, b, loose) >= 0; + module2.exports = gte; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/lte.js +var require_lte = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/lte.js"(exports2, module2) { + var compare = require_compare(); + var lte = (a, b, loose) => compare(a, b, loose) <= 0; + module2.exports = lte; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/cmp.js +var require_cmp = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/cmp.js"(exports2, module2) { + var eq = require_eq(); + var neq = require_neq(); + var gt = require_gt(); + var gte = require_gte(); + var lt = require_lt(); + var lte = require_lte(); + var cmp = (a, op, b, loose) => { + switch (op) { + case "===": + if (typeof a === "object") + a = a.version; + if (typeof b === "object") + b = b.version; + return a === b; + case "!==": + if (typeof a === "object") + a = a.version; + if (typeof b === "object") + b = b.version; + return a !== b; + case "": + case "=": + case "==": + return eq(a, b, loose); + case "!=": + return neq(a, b, loose); + case ">": + return gt(a, b, loose); + case ">=": + return gte(a, b, loose); + case "<": + return lt(a, b, loose); + case "<=": + return lte(a, b, loose); + default: + throw new TypeError(`Invalid operator: ${op}`); + } + }; + module2.exports = cmp; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/coerce.js +var require_coerce = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/coerce.js"(exports2, module2) { + var SemVer = require_semver(); + var parse = require_parse(); + var { re, t } = require_re(); + var coerce = (version, options) => { + if (version instanceof SemVer) { + return version; + } + if (typeof version === "number") { + version = String(version); + } + if (typeof version !== "string") { + return null; + } + options = options || {}; + let match = null; + if (!options.rtl) { + match = version.match(re[t.COERCE]); + } else { + let next; + while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) { + if (!match || next.index + next[0].length !== match.index + match[0].length) { + match = next; + } + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; + } + re[t.COERCERTL].lastIndex = -1; + } + if (match === null) + return null; + return parse(`${match[2]}.${match[3] || "0"}.${match[4] || "0"}`, options); + }; + module2.exports = coerce; + } +}); + +// ../../node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/iterator.js +var require_iterator2 = __commonJS({ + "../../node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/iterator.js"(exports2, module2) { + "use strict"; + module2.exports = function(Yallist) { + Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value; + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/yallist.js +var require_yallist = __commonJS({ + "../../node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/yallist.js"(exports2, module2) { + "use strict"; + module2.exports = Yallist; + Yallist.Node = Node; + Yallist.create = Yallist; + function Yallist(list) { + var self2 = this; + if (!(self2 instanceof Yallist)) { + self2 = new Yallist(); + } + self2.tail = null; + self2.head = null; + self2.length = 0; + if (list && typeof list.forEach === "function") { + list.forEach(function(item) { + self2.push(item); + }); + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self2.push(arguments[i]); + } + } + return self2; + } + Yallist.prototype.removeNode = function(node) { + if (node.list !== this) { + throw new Error("removing node which does not belong to this list"); + } + var next = node.next; + var prev = node.prev; + if (next) { + next.prev = prev; + } + if (prev) { + prev.next = next; + } + if (node === this.head) { + this.head = next; + } + if (node === this.tail) { + this.tail = prev; + } + node.list.length--; + node.next = null; + node.prev = null; + node.list = null; + return next; + }; + Yallist.prototype.unshiftNode = function(node) { + if (node === this.head) { + return; + } + if (node.list) { + node.list.removeNode(node); + } + var head = this.head; + node.list = this; + node.next = head; + if (head) { + head.prev = node; + } + this.head = node; + if (!this.tail) { + this.tail = node; + } + this.length++; + }; + Yallist.prototype.pushNode = function(node) { + if (node === this.tail) { + return; + } + if (node.list) { + node.list.removeNode(node); + } + var tail = this.tail; + node.list = this; + node.prev = tail; + if (tail) { + tail.next = node; + } + this.tail = node; + if (!this.head) { + this.head = node; + } + this.length++; + }; + Yallist.prototype.push = function() { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]); + } + return this.length; + }; + Yallist.prototype.unshift = function() { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]); + } + return this.length; + }; + Yallist.prototype.pop = function() { + if (!this.tail) { + return void 0; + } + var res = this.tail.value; + this.tail = this.tail.prev; + if (this.tail) { + this.tail.next = null; + } else { + this.head = null; + } + this.length--; + return res; + }; + Yallist.prototype.shift = function() { + if (!this.head) { + return void 0; + } + var res = this.head.value; + this.head = this.head.next; + if (this.head) { + this.head.prev = null; + } else { + this.tail = null; + } + this.length--; + return res; + }; + Yallist.prototype.forEach = function(fn2, thisp) { + thisp = thisp || this; + for (var walker = this.head, i = 0; walker !== null; i++) { + fn2.call(thisp, walker.value, i, this); + walker = walker.next; + } + }; + Yallist.prototype.forEachReverse = function(fn2, thisp) { + thisp = thisp || this; + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn2.call(thisp, walker.value, i, this); + walker = walker.prev; + } + }; + Yallist.prototype.get = function(n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + walker = walker.next; + } + if (i === n && walker !== null) { + return walker.value; + } + }; + Yallist.prototype.getReverse = function(n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + walker = walker.prev; + } + if (i === n && walker !== null) { + return walker.value; + } + }; + Yallist.prototype.map = function(fn2, thisp) { + thisp = thisp || this; + var res = new Yallist(); + for (var walker = this.head; walker !== null; ) { + res.push(fn2.call(thisp, walker.value, this)); + walker = walker.next; + } + return res; + }; + Yallist.prototype.mapReverse = function(fn2, thisp) { + thisp = thisp || this; + var res = new Yallist(); + for (var walker = this.tail; walker !== null; ) { + res.push(fn2.call(thisp, walker.value, this)); + walker = walker.prev; + } + return res; + }; + Yallist.prototype.reduce = function(fn2, initial) { + var acc; + var walker = this.head; + if (arguments.length > 1) { + acc = initial; + } else if (this.head) { + walker = this.head.next; + acc = this.head.value; + } else { + throw new TypeError("Reduce of empty list with no initial value"); + } + for (var i = 0; walker !== null; i++) { + acc = fn2(acc, walker.value, i); + walker = walker.next; + } + return acc; + }; + Yallist.prototype.reduceReverse = function(fn2, initial) { + var acc; + var walker = this.tail; + if (arguments.length > 1) { + acc = initial; + } else if (this.tail) { + walker = this.tail.prev; + acc = this.tail.value; + } else { + throw new TypeError("Reduce of empty list with no initial value"); + } + for (var i = this.length - 1; walker !== null; i--) { + acc = fn2(acc, walker.value, i); + walker = walker.prev; + } + return acc; + }; + Yallist.prototype.toArray = function() { + var arr = new Array(this.length); + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value; + walker = walker.next; + } + return arr; + }; + Yallist.prototype.toArrayReverse = function() { + var arr = new Array(this.length); + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value; + walker = walker.prev; + } + return arr; + }; + Yallist.prototype.slice = function(from, to) { + to = to || this.length; + if (to < 0) { + to += this.length; + } + from = from || 0; + if (from < 0) { + from += this.length; + } + var ret = new Yallist(); + if (to < from || to < 0) { + return ret; + } + if (from < 0) { + from = 0; + } + if (to > this.length) { + to = this.length; + } + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next; + } + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value); + } + return ret; + }; + Yallist.prototype.sliceReverse = function(from, to) { + to = to || this.length; + if (to < 0) { + to += this.length; + } + from = from || 0; + if (from < 0) { + from += this.length; + } + var ret = new Yallist(); + if (to < from || to < 0) { + return ret; + } + if (from < 0) { + from = 0; + } + if (to > this.length) { + to = this.length; + } + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev; + } + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value); + } + return ret; + }; + Yallist.prototype.splice = function(start, deleteCount, ...nodes) { + if (start > this.length) { + start = this.length - 1; + } + if (start < 0) { + start = this.length + start; + } + for (var i = 0, walker = this.head; walker !== null && i < start; i++) { + walker = walker.next; + } + var ret = []; + for (var i = 0; walker && i < deleteCount; i++) { + ret.push(walker.value); + walker = this.removeNode(walker); + } + if (walker === null) { + walker = this.tail; + } + if (walker !== this.head && walker !== this.tail) { + walker = walker.prev; + } + for (var i = 0; i < nodes.length; i++) { + walker = insert(this, walker, nodes[i]); + } + return ret; + }; + Yallist.prototype.reverse = function() { + var head = this.head; + var tail = this.tail; + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev; + walker.prev = walker.next; + walker.next = p; + } + this.head = tail; + this.tail = head; + return this; + }; + function insert(self2, node, value) { + var inserted = node === self2.head ? new Node(value, null, node, self2) : new Node(value, node, node.next, self2); + if (inserted.next === null) { + self2.tail = inserted; + } + if (inserted.prev === null) { + self2.head = inserted; + } + self2.length++; + return inserted; + } + function push(self2, item) { + self2.tail = new Node(item, self2.tail, null, self2); + if (!self2.head) { + self2.head = self2.tail; + } + self2.length++; + } + function unshift(self2, item) { + self2.head = new Node(item, null, self2.head, self2); + if (!self2.tail) { + self2.tail = self2.head; + } + self2.length++; + } + function Node(value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list); + } + this.list = list; + this.value = value; + if (prev) { + prev.next = this; + this.prev = prev; + } else { + this.prev = null; + } + if (next) { + next.prev = this; + this.next = next; + } else { + this.next = null; + } + } + try { + require_iterator2()(Yallist); + } catch (er) { + } + } +}); + +// ../../node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/index.js +var require_lru_cache = __commonJS({ + "../../node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/index.js"(exports2, module2) { + "use strict"; + var Yallist = require_yallist(); + var MAX = Symbol("max"); + var LENGTH = Symbol("length"); + var LENGTH_CALCULATOR = Symbol("lengthCalculator"); + var ALLOW_STALE = Symbol("allowStale"); + var MAX_AGE = Symbol("maxAge"); + var DISPOSE = Symbol("dispose"); + var NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet"); + var LRU_LIST = Symbol("lruList"); + var CACHE = Symbol("cache"); + var UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet"); + var naiveLength = () => 1; + var LRUCache = class { + constructor(options) { + if (typeof options === "number") + options = { max: options }; + if (!options) + options = {}; + if (options.max && (typeof options.max !== "number" || options.max < 0)) + throw new TypeError("max must be a non-negative number"); + const max = this[MAX] = options.max || Infinity; + const lc = options.length || naiveLength; + this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc; + this[ALLOW_STALE] = options.stale || false; + if (options.maxAge && typeof options.maxAge !== "number") + throw new TypeError("maxAge must be a number"); + this[MAX_AGE] = options.maxAge || 0; + this[DISPOSE] = options.dispose; + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false; + this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false; + this.reset(); + } + set max(mL) { + if (typeof mL !== "number" || mL < 0) + throw new TypeError("max must be a non-negative number"); + this[MAX] = mL || Infinity; + trim(this); + } + get max() { + return this[MAX]; + } + set allowStale(allowStale) { + this[ALLOW_STALE] = !!allowStale; + } + get allowStale() { + return this[ALLOW_STALE]; + } + set maxAge(mA) { + if (typeof mA !== "number") + throw new TypeError("maxAge must be a non-negative number"); + this[MAX_AGE] = mA; + trim(this); + } + get maxAge() { + return this[MAX_AGE]; + } + set lengthCalculator(lC) { + if (typeof lC !== "function") + lC = naiveLength; + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC; + this[LENGTH] = 0; + this[LRU_LIST].forEach((hit) => { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key); + this[LENGTH] += hit.length; + }); + } + trim(this); + } + get lengthCalculator() { + return this[LENGTH_CALCULATOR]; + } + get length() { + return this[LENGTH]; + } + get itemCount() { + return this[LRU_LIST].length; + } + rforEach(fn2, thisp) { + thisp = thisp || this; + for (let walker = this[LRU_LIST].tail; walker !== null; ) { + const prev = walker.prev; + forEachStep(this, fn2, walker, thisp); + walker = prev; + } + } + forEach(fn2, thisp) { + thisp = thisp || this; + for (let walker = this[LRU_LIST].head; walker !== null; ) { + const next = walker.next; + forEachStep(this, fn2, walker, thisp); + walker = next; + } + } + keys() { + return this[LRU_LIST].toArray().map((k) => k.key); + } + values() { + return this[LRU_LIST].toArray().map((k) => k.value); + } + reset() { + if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) { + this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value)); + } + this[CACHE] = new Map(); + this[LRU_LIST] = new Yallist(); + this[LENGTH] = 0; + } + dump() { + return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + }).toArray().filter((h) => h); + } + dumpLru() { + return this[LRU_LIST]; + } + set(key, value, maxAge) { + maxAge = maxAge || this[MAX_AGE]; + if (maxAge && typeof maxAge !== "number") + throw new TypeError("maxAge must be a number"); + const now = maxAge ? Date.now() : 0; + const len = this[LENGTH_CALCULATOR](value, key); + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key)); + return false; + } + const node = this[CACHE].get(key); + const item = node.value; + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) + this[DISPOSE](key, item.value); + } + item.now = now; + item.maxAge = maxAge; + item.value = value; + this[LENGTH] += len - item.length; + item.length = len; + this.get(key); + trim(this); + return true; + } + const hit = new Entry(key, value, len, now, maxAge); + if (hit.length > this[MAX]) { + if (this[DISPOSE]) + this[DISPOSE](key, value); + return false; + } + this[LENGTH] += hit.length; + this[LRU_LIST].unshift(hit); + this[CACHE].set(key, this[LRU_LIST].head); + trim(this); + return true; + } + has(key) { + if (!this[CACHE].has(key)) + return false; + const hit = this[CACHE].get(key).value; + return !isStale(this, hit); + } + get(key) { + return get(this, key, true); + } + peek(key) { + return get(this, key, false); + } + pop() { + const node = this[LRU_LIST].tail; + if (!node) + return null; + del(this, node); + return node.value; + } + del(key) { + del(this, this[CACHE].get(key)); + } + load(arr) { + this.reset(); + const now = Date.now(); + for (let l = arr.length - 1; l >= 0; l--) { + const hit = arr[l]; + const expiresAt = hit.e || 0; + if (expiresAt === 0) + this.set(hit.k, hit.v); + else { + const maxAge = expiresAt - now; + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge); + } + } + } + } + prune() { + this[CACHE].forEach((value, key) => get(this, key, false)); + } + }; + var get = (self2, key, doUse) => { + const node = self2[CACHE].get(key); + if (node) { + const hit = node.value; + if (isStale(self2, hit)) { + del(self2, node); + if (!self2[ALLOW_STALE]) + return void 0; + } else { + if (doUse) { + if (self2[UPDATE_AGE_ON_GET]) + node.value.now = Date.now(); + self2[LRU_LIST].unshiftNode(node); + } + } + return hit.value; + } + }; + var isStale = (self2, hit) => { + if (!hit || !hit.maxAge && !self2[MAX_AGE]) + return false; + const diff = Date.now() - hit.now; + return hit.maxAge ? diff > hit.maxAge : self2[MAX_AGE] && diff > self2[MAX_AGE]; + }; + var trim = (self2) => { + if (self2[LENGTH] > self2[MAX]) { + for (let walker = self2[LRU_LIST].tail; self2[LENGTH] > self2[MAX] && walker !== null; ) { + const prev = walker.prev; + del(self2, walker); + walker = prev; + } + } + }; + var del = (self2, node) => { + if (node) { + const hit = node.value; + if (self2[DISPOSE]) + self2[DISPOSE](hit.key, hit.value); + self2[LENGTH] -= hit.length; + self2[CACHE].delete(hit.key); + self2[LRU_LIST].removeNode(node); + } + }; + var Entry = class { + constructor(key, value, length, now, maxAge) { + this.key = key; + this.value = value; + this.length = length; + this.now = now; + this.maxAge = maxAge || 0; + } + }; + var forEachStep = (self2, fn2, node, thisp) => { + let hit = node.value; + if (isStale(self2, hit)) { + del(self2, node); + if (!self2[ALLOW_STALE]) + hit = void 0; + } + if (hit) + fn2.call(thisp, hit.value, hit.key, self2); + }; + module2.exports = LRUCache; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/classes/range.js +var require_range2 = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/classes/range.js"(exports2, module2) { + var Range = class { + constructor(range, options) { + options = parseOptions(options); + if (range instanceof Range) { + if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { + return range; + } else { + return new Range(range.raw, options); + } + } + if (range instanceof Comparator) { + this.raw = range.value; + this.set = [[range]]; + this.format(); + return this; + } + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + this.raw = range; + this.set = range.split(/\s*\|\|\s*/).map((range2) => this.parseRange(range2.trim())).filter((c) => c.length); + if (!this.set.length) { + throw new TypeError(`Invalid SemVer Range: ${range}`); + } + if (this.set.length > 1) { + const first = this.set[0]; + this.set = this.set.filter((c) => !isNullSet(c[0])); + if (this.set.length === 0) + this.set = [first]; + else if (this.set.length > 1) { + for (const c of this.set) { + if (c.length === 1 && isAny(c[0])) { + this.set = [c]; + break; + } + } + } + } + this.format(); + } + format() { + this.range = this.set.map((comps) => { + return comps.join(" ").trim(); + }).join("||").trim(); + return this.range; + } + toString() { + return this.range; + } + parseRange(range) { + range = range.trim(); + const memoOpts = Object.keys(this.options).join(","); + const memoKey = `parseRange:${memoOpts}:${range}`; + const cached = cache.get(memoKey); + if (cached) + return cached; + const loose = this.options.loose; + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); + debug("hyphen replace", range); + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); + debug("comparator trim", range, re[t.COMPARATORTRIM]); + range = range.replace(re[t.TILDETRIM], tildeTrimReplace); + range = range.replace(re[t.CARETTRIM], caretTrimReplace); + range = range.split(/\s+/).join(" "); + const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; + const rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)).filter(this.options.loose ? (comp) => !!comp.match(compRe) : () => true).map((comp) => new Comparator(comp, this.options)); + const l = rangeList.length; + const rangeMap = new Map(); + for (const comp of rangeList) { + if (isNullSet(comp)) + return [comp]; + rangeMap.set(comp.value, comp); + } + if (rangeMap.size > 1 && rangeMap.has("")) + rangeMap.delete(""); + const result = [...rangeMap.values()]; + cache.set(memoKey, result); + return result; + } + intersects(range, options) { + if (!(range instanceof Range)) { + throw new TypeError("a Range is required"); + } + return this.set.some((thisComparators) => { + return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { + return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { + return rangeComparators.every((rangeComparator) => { + return thisComparator.intersects(rangeComparator, options); + }); + }); + }); + }); + } + test(version) { + if (!version) { + return false; + } + if (typeof version === "string") { + try { + version = new SemVer(version, this.options); + } catch (er) { + return false; + } + } + for (let i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true; + } + } + return false; + } + }; + module2.exports = Range; + var LRU = require_lru_cache(); + var cache = new LRU({ max: 1e3 }); + var parseOptions = require_parse_options(); + var Comparator = require_comparator(); + var debug = require_debug(); + var SemVer = require_semver(); + var { + re, + t, + comparatorTrimReplace, + tildeTrimReplace, + caretTrimReplace + } = require_re(); + var isNullSet = (c) => c.value === "<0.0.0-0"; + var isAny = (c) => c.value === ""; + var isSatisfiable = (comparators, options) => { + let result = true; + const remainingComparators = comparators.slice(); + let testComparator = remainingComparators.pop(); + while (result && remainingComparators.length) { + result = remainingComparators.every((otherComparator) => { + return testComparator.intersects(otherComparator, options); + }); + testComparator = remainingComparators.pop(); + } + return result; + }; + var parseComparator = (comp, options) => { + debug("comp", comp, options); + comp = replaceCarets(comp, options); + debug("caret", comp); + comp = replaceTildes(comp, options); + debug("tildes", comp); + comp = replaceXRanges(comp, options); + debug("xrange", comp); + comp = replaceStars(comp, options); + debug("stars", comp); + return comp; + }; + var isX = (id) => !id || id.toLowerCase() === "x" || id === "*"; + var replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((comp2) => { + return replaceTilde(comp2, options); + }).join(" "); + var replaceTilde = (comp, options) => { + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; + return comp.replace(r, (_, M, m, p, pr) => { + debug("tilde", comp, _, M, m, p, pr); + let ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = `>=${M}.0.0 <${+M + 1}.0.0-0`; + } else if (isX(p)) { + ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`; + } else if (pr) { + debug("replaceTilde pr", pr); + ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; + } else { + ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; + } + debug("tilde return", ret); + return ret; + }); + }; + var replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((comp2) => { + return replaceCaret(comp2, options); + }).join(" "); + var replaceCaret = (comp, options) => { + debug("caret", comp, options); + const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; + const z = options.includePrerelease ? "-0" : ""; + return comp.replace(r, (_, M, m, p, pr) => { + debug("caret", comp, _, M, m, p, pr); + let ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; + } else if (isX(p)) { + if (M === "0") { + ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; + } else { + ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`; + } + } else if (pr) { + debug("replaceCaret pr", pr); + if (M === "0") { + if (m === "0") { + ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`; + } else { + ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; + } + } else { + ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`; + } + } else { + debug("no pr"); + if (M === "0") { + if (m === "0") { + ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`; + } else { + ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`; + } + } else { + ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`; + } + } + debug("caret return", ret); + return ret; + }); + }; + var replaceXRanges = (comp, options) => { + debug("replaceXRanges", comp, options); + return comp.split(/\s+/).map((comp2) => { + return replaceXRange(comp2, options); + }).join(" "); + }; + var replaceXRange = (comp, options) => { + comp = comp.trim(); + const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; + return comp.replace(r, (ret, gtlt, M, m, p, pr) => { + debug("xRange", comp, ret, gtlt, M, m, p, pr); + const xM = isX(M); + const xm = xM || isX(m); + const xp = xm || isX(p); + const anyX = xp; + if (gtlt === "=" && anyX) { + gtlt = ""; + } + pr = options.includePrerelease ? "-0" : ""; + if (xM) { + if (gtlt === ">" || gtlt === "<") { + ret = "<0.0.0-0"; + } else { + ret = "*"; + } + } else if (gtlt && anyX) { + if (xm) { + m = 0; + } + p = 0; + if (gtlt === ">") { + gtlt = ">="; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else { + m = +m + 1; + p = 0; + } + } else if (gtlt === "<=") { + gtlt = "<"; + if (xm) { + M = +M + 1; + } else { + m = +m + 1; + } + } + if (gtlt === "<") + pr = "-0"; + ret = `${gtlt + M}.${m}.${p}${pr}`; + } else if (xm) { + ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`; + } else if (xp) { + ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`; + } + debug("xRange return", ret); + return ret; + }); + }; + var replaceStars = (comp, options) => { + debug("replaceStars", comp, options); + return comp.trim().replace(re[t.STAR], ""); + }; + var replaceGTE0 = (comp, options) => { + debug("replaceGTE0", comp, options); + return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ""); + }; + var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => { + if (isX(fM)) { + from = ""; + } else if (isX(fm)) { + from = `>=${fM}.0.0${incPr ? "-0" : ""}`; + } else if (isX(fp)) { + from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`; + } else if (fpr) { + from = `>=${from}`; + } else { + from = `>=${from}${incPr ? "-0" : ""}`; + } + if (isX(tM)) { + to = ""; + } else if (isX(tm)) { + to = `<${+tM + 1}.0.0-0`; + } else if (isX(tp)) { + to = `<${tM}.${+tm + 1}.0-0`; + } else if (tpr) { + to = `<=${tM}.${tm}.${tp}-${tpr}`; + } else if (incPr) { + to = `<${tM}.${tm}.${+tp + 1}-0`; + } else { + to = `<=${to}`; + } + return `${from} ${to}`.trim(); + }; + var testSet = (set, version, options) => { + for (let i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false; + } + } + if (version.prerelease.length && !options.includePrerelease) { + for (let i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === Comparator.ANY) { + continue; + } + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver; + if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) { + return true; + } + } + } + return false; + } + return true; + }; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/classes/comparator.js +var require_comparator = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/classes/comparator.js"(exports2, module2) { + var ANY = Symbol("SemVer ANY"); + var Comparator = class { + static get ANY() { + return ANY; + } + constructor(comp, options) { + options = parseOptions(options); + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp; + } else { + comp = comp.value; + } + } + debug("comparator", comp, options); + this.options = options; + this.loose = !!options.loose; + this.parse(comp); + if (this.semver === ANY) { + this.value = ""; + } else { + this.value = this.operator + this.semver.version; + } + debug("comp", this); + } + parse(comp) { + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; + const m = comp.match(r); + if (!m) { + throw new TypeError(`Invalid comparator: ${comp}`); + } + this.operator = m[1] !== void 0 ? m[1] : ""; + if (this.operator === "=") { + this.operator = ""; + } + if (!m[2]) { + this.semver = ANY; + } else { + this.semver = new SemVer(m[2], this.options.loose); + } + } + toString() { + return this.value; + } + test(version) { + debug("Comparator.test", version, this.options.loose); + if (this.semver === ANY || version === ANY) { + return true; + } + if (typeof version === "string") { + try { + version = new SemVer(version, this.options); + } catch (er) { + return false; + } + } + return cmp(version, this.operator, this.semver, this.options); + } + intersects(comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError("a Comparator is required"); + } + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + if (this.operator === "") { + if (this.value === "") { + return true; + } + return new Range(comp.value, options).test(this.value); + } else if (comp.operator === "") { + if (comp.value === "") { + return true; + } + return new Range(this.value, options).test(comp.semver); + } + const sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">"); + const sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<"); + const sameSemVer = this.semver.version === comp.semver.version; + const differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<="); + const oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && (this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<"); + const oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && (this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">"); + return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; + } + }; + module2.exports = Comparator; + var parseOptions = require_parse_options(); + var { re, t } = require_re(); + var cmp = require_cmp(); + var debug = require_debug(); + var SemVer = require_semver(); + var Range = require_range2(); + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/satisfies.js +var require_satisfies = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/functions/satisfies.js"(exports2, module2) { + var Range = require_range2(); + var satisfies = (version, range, options) => { + try { + range = new Range(range, options); + } catch (er) { + return false; + } + return range.test(version); + }; + module2.exports = satisfies; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/to-comparators.js +var require_to_comparators = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/to-comparators.js"(exports2, module2) { + var Range = require_range2(); + var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); + module2.exports = toComparators; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/max-satisfying.js +var require_max_satisfying = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/max-satisfying.js"(exports2, module2) { + var SemVer = require_semver(); + var Range = require_range2(); + var maxSatisfying = (versions, range, options) => { + let max = null; + let maxSV = null; + let rangeObj = null; + try { + rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + if (!max || maxSV.compare(v) === -1) { + max = v; + maxSV = new SemVer(max, options); + } + } + }); + return max; + }; + module2.exports = maxSatisfying; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/min-satisfying.js +var require_min_satisfying = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/min-satisfying.js"(exports2, module2) { + var SemVer = require_semver(); + var Range = require_range2(); + var minSatisfying = (versions, range, options) => { + let min = null; + let minSV = null; + let rangeObj = null; + try { + rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + if (!min || minSV.compare(v) === 1) { + min = v; + minSV = new SemVer(min, options); + } + } + }); + return min; + }; + module2.exports = minSatisfying; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/min-version.js +var require_min_version = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/min-version.js"(exports2, module2) { + var SemVer = require_semver(); + var Range = require_range2(); + var gt = require_gt(); + var minVersion = (range, loose) => { + range = new Range(range, loose); + let minver = new SemVer("0.0.0"); + if (range.test(minver)) { + return minver; + } + minver = new SemVer("0.0.0-0"); + if (range.test(minver)) { + return minver; + } + minver = null; + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; + let setMin = null; + comparators.forEach((comparator) => { + const compver = new SemVer(comparator.semver.version); + switch (comparator.operator) { + case ">": + if (compver.prerelease.length === 0) { + compver.patch++; + } else { + compver.prerelease.push(0); + } + compver.raw = compver.format(); + case "": + case ">=": + if (!setMin || gt(compver, setMin)) { + setMin = compver; + } + break; + case "<": + case "<=": + break; + default: + throw new Error(`Unexpected operation: ${comparator.operator}`); + } + }); + if (setMin && (!minver || gt(minver, setMin))) + minver = setMin; + } + if (minver && range.test(minver)) { + return minver; + } + return null; + }; + module2.exports = minVersion; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/valid.js +var require_valid2 = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/valid.js"(exports2, module2) { + var Range = require_range2(); + var validRange = (range, options) => { + try { + return new Range(range, options).range || "*"; + } catch (er) { + return null; + } + }; + module2.exports = validRange; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/outside.js +var require_outside = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/outside.js"(exports2, module2) { + var SemVer = require_semver(); + var Comparator = require_comparator(); + var { ANY } = Comparator; + var Range = require_range2(); + var satisfies = require_satisfies(); + var gt = require_gt(); + var lt = require_lt(); + var lte = require_lte(); + var gte = require_gte(); + var outside = (version, range, hilo, options) => { + version = new SemVer(version, options); + range = new Range(range, options); + let gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case ">": + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = ">"; + ecomp = ">="; + break; + case "<": + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = "<"; + ecomp = "<="; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + if (satisfies(version, range, options)) { + return false; + } + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; + let high = null; + let low = null; + comparators.forEach((comparator) => { + if (comparator.semver === ANY) { + comparator = new Comparator(">=0.0.0"); + } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator; + } + }); + if (high.operator === comp || high.operator === ecomp) { + return false; + } + if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false; + } + } + return true; + }; + module2.exports = outside; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/gtr.js +var require_gtr = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/gtr.js"(exports2, module2) { + var outside = require_outside(); + var gtr = (version, range, options) => outside(version, range, ">", options); + module2.exports = gtr; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/ltr.js +var require_ltr = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/ltr.js"(exports2, module2) { + var outside = require_outside(); + var ltr = (version, range, options) => outside(version, range, "<", options); + module2.exports = ltr; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/intersects.js +var require_intersects = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/intersects.js"(exports2, module2) { + var Range = require_range2(); + var intersects = (r1, r2, options) => { + r1 = new Range(r1, options); + r2 = new Range(r2, options); + return r1.intersects(r2); + }; + module2.exports = intersects; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/simplify.js +var require_simplify = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/simplify.js"(exports2, module2) { + var satisfies = require_satisfies(); + var compare = require_compare(); + module2.exports = (versions, range, options) => { + const set = []; + let min = null; + let prev = null; + const v = versions.sort((a, b) => compare(a, b, options)); + for (const version of v) { + const included = satisfies(version, range, options); + if (included) { + prev = version; + if (!min) + min = version; + } else { + if (prev) { + set.push([min, prev]); + } + prev = null; + min = null; + } + } + if (min) + set.push([min, null]); + const ranges = []; + for (const [min2, max] of set) { + if (min2 === max) + ranges.push(min2); + else if (!max && min2 === v[0]) + ranges.push("*"); + else if (!max) + ranges.push(`>=${min2}`); + else if (min2 === v[0]) + ranges.push(`<=${max}`); + else + ranges.push(`${min2} - ${max}`); + } + const simplified = ranges.join(" || "); + const original = typeof range.raw === "string" ? range.raw : String(range); + return simplified.length < original.length ? simplified : range; + }; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/subset.js +var require_subset = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/ranges/subset.js"(exports2, module2) { + var Range = require_range2(); + var Comparator = require_comparator(); + var { ANY } = Comparator; + var satisfies = require_satisfies(); + var compare = require_compare(); + var subset = (sub, dom, options = {}) => { + if (sub === dom) + return true; + sub = new Range(sub, options); + dom = new Range(dom, options); + let sawNonNull = false; + OUTER: + for (const simpleSub of sub.set) { + for (const simpleDom of dom.set) { + const isSub = simpleSubset(simpleSub, simpleDom, options); + sawNonNull = sawNonNull || isSub !== null; + if (isSub) + continue OUTER; + } + if (sawNonNull) + return false; + } + return true; + }; + var simpleSubset = (sub, dom, options) => { + if (sub === dom) + return true; + if (sub.length === 1 && sub[0].semver === ANY) { + if (dom.length === 1 && dom[0].semver === ANY) + return true; + else if (options.includePrerelease) + sub = [new Comparator(">=0.0.0-0")]; + else + sub = [new Comparator(">=0.0.0")]; + } + if (dom.length === 1 && dom[0].semver === ANY) { + if (options.includePrerelease) + return true; + else + dom = [new Comparator(">=0.0.0")]; + } + const eqSet = new Set(); + let gt, lt; + for (const c of sub) { + if (c.operator === ">" || c.operator === ">=") + gt = higherGT(gt, c, options); + else if (c.operator === "<" || c.operator === "<=") + lt = lowerLT(lt, c, options); + else + eqSet.add(c.semver); + } + if (eqSet.size > 1) + return null; + let gtltComp; + if (gt && lt) { + gtltComp = compare(gt.semver, lt.semver, options); + if (gtltComp > 0) + return null; + else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) + return null; + } + for (const eq of eqSet) { + if (gt && !satisfies(eq, String(gt), options)) + return null; + if (lt && !satisfies(eq, String(lt), options)) + return null; + for (const c of dom) { + if (!satisfies(eq, String(c), options)) + return false; + } + return true; + } + let higher, lower; + let hasDomLT, hasDomGT; + let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false; + let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false; + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) { + needDomLTPre = false; + } + for (const c of dom) { + hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">="; + hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<="; + if (gt) { + if (needDomGTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) { + needDomGTPre = false; + } + } + if (c.operator === ">" || c.operator === ">=") { + higher = higherGT(gt, c, options); + if (higher === c && higher !== gt) + return false; + } else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) + return false; + } + if (lt) { + if (needDomLTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) { + needDomLTPre = false; + } + } + if (c.operator === "<" || c.operator === "<=") { + lower = lowerLT(lt, c, options); + if (lower === c && lower !== lt) + return false; + } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) + return false; + } + if (!c.operator && (lt || gt) && gtltComp !== 0) + return false; + } + if (gt && hasDomLT && !lt && gtltComp !== 0) + return false; + if (lt && hasDomGT && !gt && gtltComp !== 0) + return false; + if (needDomGTPre || needDomLTPre) + return false; + return true; + }; + var higherGT = (a, b, options) => { + if (!a) + return b; + const comp = compare(a.semver, b.semver, options); + return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a; + }; + var lowerLT = (a, b, options) => { + if (!a) + return b; + const comp = compare(a.semver, b.semver, options); + return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a; + }; + module2.exports = subset; + } +}); + +// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/index.js +var require_semver2 = __commonJS({ + "../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/index.js"(exports2, module2) { + var internalRe = require_re(); + module2.exports = { + re: internalRe.re, + src: internalRe.src, + tokens: internalRe.t, + SEMVER_SPEC_VERSION: require_constants3().SEMVER_SPEC_VERSION, + SemVer: require_semver(), + compareIdentifiers: require_identifiers().compareIdentifiers, + rcompareIdentifiers: require_identifiers().rcompareIdentifiers, + parse: require_parse(), + valid: require_valid(), + clean: require_clean(), + inc: require_inc(), + diff: require_diff(), + major: require_major(), + minor: require_minor(), + patch: require_patch(), + prerelease: require_prerelease(), + compare: require_compare(), + rcompare: require_rcompare(), + compareLoose: require_compare_loose(), + compareBuild: require_compare_build(), + sort: require_sort2(), + rsort: require_rsort(), + gt: require_gt(), + lt: require_lt(), + eq: require_eq(), + neq: require_neq(), + gte: require_gte(), + lte: require_lte(), + cmp: require_cmp(), + coerce: require_coerce(), + Comparator: require_comparator(), + Range: require_range2(), + satisfies: require_satisfies(), + toComparators: require_to_comparators(), + maxSatisfying: require_max_satisfying(), + minSatisfying: require_min_satisfying(), + minVersion: require_min_version(), + validRange: require_valid2(), + outside: require_outside(), + gtr: require_gtr(), + ltr: require_ltr(), + intersects: require_intersects(), + simplifyRange: require_simplify(), + subset: require_subset() + }; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_objectAssign.js +var require_objectAssign = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_objectAssign.js"(exports2, module2) { + var _has = require_has(); + function _objectAssign(target) { + if (target == null) { + throw new TypeError("Cannot convert undefined or null to object"); + } + var output = Object(target); + var idx = 1; + var length = arguments.length; + while (idx < length) { + var source = arguments[idx]; + if (source != null) { + for (var nextKey in source) { + if (_has(nextKey, source)) { + output[nextKey] = source[nextKey]; + } + } + } + idx += 1; + } + return output; + } + module2.exports = typeof Object.assign === "function" ? Object.assign : _objectAssign; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/merge.js +var require_merge3 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/merge.js"(exports2, module2) { + var _objectAssign = require_objectAssign(); + var _curry2 = require_curry2(); + var merge = /* @__PURE__ */ _curry2(function merge2(l, r) { + return _objectAssign({}, l, r); + }); + module2.exports = merge; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_indexOf.js +var require_indexOf = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_indexOf.js"(exports2, module2) { + var equals = require_equals2(); + function _indexOf(list, a, idx) { + var inf, item; + if (typeof list.indexOf === "function") { + switch (typeof a) { + case "number": + if (a === 0) { + inf = 1 / a; + while (idx < list.length) { + item = list[idx]; + if (item === 0 && 1 / item === inf) { + return idx; + } + idx += 1; + } + return -1; + } else if (a !== a) { + while (idx < list.length) { + item = list[idx]; + if (typeof item === "number" && item !== item) { + return idx; + } + idx += 1; + } + return -1; + } + return list.indexOf(a, idx); + case "string": + case "boolean": + case "function": + case "undefined": + return list.indexOf(a, idx); + case "object": + if (a === null) { + return list.indexOf(a, idx); + } + } + } + while (idx < list.length) { + if (equals(list[idx], a)) { + return idx; + } + idx += 1; + } + return -1; + } + module2.exports = _indexOf; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_includes.js +var require_includes = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_includes.js"(exports2, module2) { + var _indexOf = require_indexOf(); + function _includes(a, list) { + return _indexOf(list, a, 0) >= 0; + } + module2.exports = _includes; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_Set.js +var require_Set = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_Set.js"(exports2, module2) { + var _includes = require_includes(); + var _Set = /* @__PURE__ */ function() { + function _Set2() { + this._nativeSet = typeof Set === "function" ? new Set() : null; + this._items = {}; + } + _Set2.prototype.add = function(item) { + return !hasOrAdd(item, true, this); + }; + _Set2.prototype.has = function(item) { + return hasOrAdd(item, false, this); + }; + return _Set2; + }(); + function hasOrAdd(item, shouldAdd, set) { + var type = typeof item; + var prevSize, newSize; + switch (type) { + case "string": + case "number": + if (item === 0 && 1 / item === -Infinity) { + if (set._items["-0"]) { + return true; + } else { + if (shouldAdd) { + set._items["-0"] = true; + } + return false; + } + } + if (set._nativeSet !== null) { + if (shouldAdd) { + prevSize = set._nativeSet.size; + set._nativeSet.add(item); + newSize = set._nativeSet.size; + return newSize === prevSize; + } else { + return set._nativeSet.has(item); + } + } else { + if (!(type in set._items)) { + if (shouldAdd) { + set._items[type] = {}; + set._items[type][item] = true; + } + return false; + } else if (item in set._items[type]) { + return true; + } else { + if (shouldAdd) { + set._items[type][item] = true; + } + return false; + } + } + case "boolean": + if (type in set._items) { + var bIdx = item ? 1 : 0; + if (set._items[type][bIdx]) { + return true; + } else { + if (shouldAdd) { + set._items[type][bIdx] = true; + } + return false; + } + } else { + if (shouldAdd) { + set._items[type] = item ? [false, true] : [true, false]; + } + return false; + } + case "function": + if (set._nativeSet !== null) { + if (shouldAdd) { + prevSize = set._nativeSet.size; + set._nativeSet.add(item); + newSize = set._nativeSet.size; + return newSize === prevSize; + } else { + return set._nativeSet.has(item); + } + } else { + if (!(type in set._items)) { + if (shouldAdd) { + set._items[type] = [item]; + } + return false; + } + if (!_includes(item, set._items[type])) { + if (shouldAdd) { + set._items[type].push(item); + } + return false; + } + return true; + } + case "undefined": + if (set._items[type]) { + return true; + } else { + if (shouldAdd) { + set._items[type] = true; + } + return false; + } + case "object": + if (item === null) { + if (!set._items["null"]) { + if (shouldAdd) { + set._items["null"] = true; + } + return false; + } + return true; + } + default: + type = Object.prototype.toString.call(item); + if (!(type in set._items)) { + if (shouldAdd) { + set._items[type] = [item]; + } + return false; + } + if (!_includes(item, set._items[type])) { + if (shouldAdd) { + set._items[type].push(item); + } + return false; + } + return true; + } + } + module2.exports = _Set; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/difference.js +var require_difference = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/difference.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _Set = require_Set(); + var difference = /* @__PURE__ */ _curry2(function difference2(first, second) { + var out = []; + var idx = 0; + var firstLen = first.length; + var secondLen = second.length; + var toFilterOut = new _Set(); + for (var i = 0; i < secondLen; i += 1) { + toFilterOut.add(second[i]); + } + while (idx < firstLen) { + if (toFilterOut.add(first[idx])) { + out[out.length] = first[idx]; + } + idx += 1; + } + return out; + }); + module2.exports = difference; + } +}); + +// ../default-reporter/lib/reporterForClient/pkgsDiff.js +var require_pkgsDiff = __commonJS({ + "../default-reporter/lib/reporterForClient/pkgsDiff.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.propertyByDependencyType = void 0; + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var merge_1 = __importDefault(require_merge3()); + var difference_1 = __importDefault(require_difference()); + exports2.propertyByDependencyType = { + dev: "devDependencies", + nodeModulesOnly: "node_modules", + optional: "optionalDependencies", + peer: "peerDependencies", + prod: "dependencies" + }; + function default_1(log$, opts) { + const deprecationSet$ = log$.deprecation.pipe(operators_1.filter((log2) => log2.prefix === opts.prefix), operators_1.scan((acc, log2) => { + acc.add(log2.pkgId); + return acc; + }, new Set()), operators_1.startWith(new Set())); + const filterPrefix = operators_1.filter((log2) => log2.prefix === opts.prefix); + const pkgsDiff$ = Rx.combineLatest(log$.root.pipe(filterPrefix), deprecationSet$).pipe(operators_1.scan((pkgsDiff, args2) => { + const rootLog = args2[0]; + const deprecationSet = args2[1]; + if (rootLog["added"]) { + pkgsDiff[rootLog["added"].dependencyType || "nodeModulesOnly"][`+${rootLog["added"].name}`] = { + added: true, + deprecated: deprecationSet.has(rootLog["added"].id), + from: rootLog["added"].linkedFrom, + latest: rootLog["added"].latest, + name: rootLog["added"].name, + realName: rootLog["added"].realName, + version: rootLog["added"].version + }; + return pkgsDiff; + } + if (rootLog["removed"]) { + pkgsDiff[rootLog["removed"].dependencyType || "nodeModulesOnly"][`-${rootLog["removed"].name}`] = { + added: false, + name: rootLog["removed"].name, + version: rootLog["removed"].version + }; + return pkgsDiff; + } + return pkgsDiff; + }, { + dev: {}, + nodeModulesOnly: {}, + optional: {}, + peer: {}, + prod: {} + }), operators_1.startWith({ + dev: {}, + nodeModulesOnly: {}, + optional: {}, + peer: {}, + prod: {} + })); + const packageManifest$ = Rx.merge(log$.packageManifest.pipe(filterPrefix), log$.summary.pipe(filterPrefix, operators_1.mapTo({}))).pipe(operators_1.take(2), operators_1.reduce(merge_1.default, {})); + return Rx.combineLatest(pkgsDiff$, packageManifest$).pipe(operators_1.map(([pkgsDiff, packageManifests]) => { + if (packageManifests["initial"] == null || packageManifests["updated"] == null) + return pkgsDiff; + const initialPackageManifest = removeOptionalFromProdDeps(packageManifests["initial"]); + const updatedPackageManifest = removeOptionalFromProdDeps(packageManifests["updated"]); + for (const depType of ["peer", "prod", "optional", "dev"]) { + const prop = exports2.propertyByDependencyType[depType]; + const initialDeps = Object.keys(initialPackageManifest[prop] || {}); + const updatedDeps = Object.keys(updatedPackageManifest[prop] || {}); + const removedDeps = difference_1.default(initialDeps, updatedDeps); + for (const removedDep of removedDeps) { + if (!pkgsDiff[depType][`-${removedDep}`]) { + pkgsDiff[depType][`-${removedDep}`] = { + added: false, + name: removedDep, + version: initialPackageManifest[prop][removedDep] + }; + } + } + const addedDeps = difference_1.default(updatedDeps, initialDeps); + for (const addedDep of addedDeps) { + if (!pkgsDiff[depType][`+${addedDep}`]) { + pkgsDiff[depType][`+${addedDep}`] = { + added: true, + name: addedDep, + version: updatedPackageManifest[prop][addedDep] + }; + } + } + } + return pkgsDiff; + })); + } + exports2.default = default_1; + function removeOptionalFromProdDeps(pkg) { + if (pkg.dependencies == null || pkg.optionalDependencies == null) + return pkg; + for (const depName of Object.keys(pkg.dependencies)) { + if (pkg.optionalDependencies[depName]) { + delete pkg.dependencies[depName]; + } + } + return pkg; + } + } +}); + +// ../default-reporter/lib/reporterForClient/reportSummary.js +var require_reportSummary = __commonJS({ + "../default-reporter/lib/reporterForClient/reportSummary.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var chalk_1 = __importDefault(require_source()); + var semver_1 = __importDefault(require_semver2()); + var constants_1 = require_constants2(); + var pkgsDiff_1 = __importStar2(require_pkgsDiff()); + var outputConstants_1 = require_outputConstants(); + exports2.default = (log$, opts) => { + const pkgsDiff$ = pkgsDiff_1.default(log$, { prefix: opts.cwd }); + const summaryLog$ = log$.summary.pipe(operators_1.take(1)); + return Rx.combineLatest(pkgsDiff$, summaryLog$).pipe(operators_1.take(1), operators_1.map(([pkgsDiff]) => { + var _a; + let msg = ""; + for (const depType of ["prod", "optional", "peer", "dev", "nodeModulesOnly"]) { + const diffs = Object.values(pkgsDiff[depType]); + if (diffs.length > 0) { + msg += constants_1.EOL; + if ((_a = opts.pnpmConfig) === null || _a === void 0 ? void 0 : _a.global) { + msg += chalk_1.default.cyanBright(`${opts.cwd}:`); + } else { + msg += chalk_1.default.cyanBright(`${pkgsDiff_1.propertyByDependencyType[depType]}:`); + } + msg += constants_1.EOL; + msg += printDiffs(diffs, { prefix: opts.cwd }); + msg += constants_1.EOL; + } + } + return Rx.of({ msg }); + })); + }; + function printDiffs(pkgsDiff, opts) { + pkgsDiff.sort((a, b) => a.name.localeCompare(b.name) * 10 + (Number(!b.added) - Number(!a.added))); + const msg = pkgsDiff.map((pkg) => { + let result = pkg.added ? outputConstants_1.ADDED_CHAR : outputConstants_1.REMOVED_CHAR; + if (!pkg.realName || pkg.name === pkg.realName) { + result += ` ${pkg.name}`; + } else { + result += ` ${pkg.name} <- ${pkg.realName}`; + } + if (pkg.version) { + result += ` ${chalk_1.default.grey(pkg.version)}`; + if (pkg.latest && semver_1.default.lt(pkg.version, pkg.latest)) { + result += ` ${chalk_1.default.grey(`(${pkg.latest} is available)`)}`; + } + } + if (pkg.deprecated) { + result += ` ${chalk_1.default.red("deprecated")}`; + } + if (pkg.from) { + result += ` ${chalk_1.default.grey(`<- ${pkg.from && path_1.default.relative(opts.prefix, pkg.from) || "???"}`)}`; + } + return result; + }).join(constants_1.EOL); + return msg; + } + } +}); + +// ../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js +var require_is_fullwidth_code_point = __commonJS({ + "../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js"(exports2, module2) { + "use strict"; + var isFullwidthCodePoint = (codePoint) => { + if (Number.isNaN(codePoint)) { + return false; + } + if (codePoint >= 4352 && (codePoint <= 4447 || codePoint === 9001 || codePoint === 9002 || 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || 12880 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65131 || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 262141)) { + return true; + } + return false; + }; + module2.exports = isFullwidthCodePoint; + module2.exports.default = isFullwidthCodePoint; + } +}); + +// ../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js +var require_emoji_regex = __commonJS({ + "../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js"(exports2, module2) { + "use strict"; + module2.exports = function() { + return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; + }; + } +}); + +// ../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js +var require_string_width = __commonJS({ + "../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(exports2, module2) { + "use strict"; + var stripAnsi = require_strip_ansi(); + var isFullwidthCodePoint = require_is_fullwidth_code_point(); + var emojiRegex = require_emoji_regex(); + var stringWidth = (string) => { + if (typeof string !== "string" || string.length === 0) { + return 0; + } + string = stripAnsi(string); + if (string.length === 0) { + return 0; + } + string = string.replace(emojiRegex(), " "); + let width = 0; + for (let i = 0; i < string.length; i++) { + const code = string.codePointAt(i); + if (code <= 31 || code >= 127 && code <= 159) { + continue; + } + if (code >= 768 && code <= 879) { + continue; + } + if (code > 65535) { + i++; + } + width += isFullwidthCodePoint(code) ? 2 : 1; + } + return width; + }; + module2.exports = stringWidth; + module2.exports.default = stringWidth; + } +}); + +// ../../node_modules/.pnpm/widest-line@3.1.0/node_modules/widest-line/index.js +var require_widest_line = __commonJS({ + "../../node_modules/.pnpm/widest-line@3.1.0/node_modules/widest-line/index.js"(exports2, module2) { + "use strict"; + var stringWidth = require_string_width(); + var widestLine = (input) => { + let max = 0; + for (const line of input.split("\n")) { + max = Math.max(max, stringWidth(line)); + } + return max; + }; + module2.exports = widestLine; + module2.exports.default = widestLine; + } +}); + +// ../../node_modules/.pnpm/cli-boxes@2.2.1/node_modules/cli-boxes/boxes.json +var require_boxes = __commonJS({ + "../../node_modules/.pnpm/cli-boxes@2.2.1/node_modules/cli-boxes/boxes.json"(exports2, module2) { + module2.exports = { + single: { + topLeft: "\u250C", + topRight: "\u2510", + bottomRight: "\u2518", + bottomLeft: "\u2514", + vertical: "\u2502", + horizontal: "\u2500" + }, + double: { + topLeft: "\u2554", + topRight: "\u2557", + bottomRight: "\u255D", + bottomLeft: "\u255A", + vertical: "\u2551", + horizontal: "\u2550" + }, + round: { + topLeft: "\u256D", + topRight: "\u256E", + bottomRight: "\u256F", + bottomLeft: "\u2570", + vertical: "\u2502", + horizontal: "\u2500" + }, + bold: { + topLeft: "\u250F", + topRight: "\u2513", + bottomRight: "\u251B", + bottomLeft: "\u2517", + vertical: "\u2503", + horizontal: "\u2501" + }, + singleDouble: { + topLeft: "\u2553", + topRight: "\u2556", + bottomRight: "\u255C", + bottomLeft: "\u2559", + vertical: "\u2551", + horizontal: "\u2500" + }, + doubleSingle: { + topLeft: "\u2552", + topRight: "\u2555", + bottomRight: "\u255B", + bottomLeft: "\u2558", + vertical: "\u2502", + horizontal: "\u2550" + }, + classic: { + topLeft: "+", + topRight: "+", + bottomRight: "+", + bottomLeft: "+", + vertical: "|", + horizontal: "-" + } + }; + } +}); + +// ../../node_modules/.pnpm/cli-boxes@2.2.1/node_modules/cli-boxes/index.js +var require_cli_boxes = __commonJS({ + "../../node_modules/.pnpm/cli-boxes@2.2.1/node_modules/cli-boxes/index.js"(exports2, module2) { + "use strict"; + var cliBoxes = require_boxes(); + module2.exports = cliBoxes; + module2.exports.default = cliBoxes; + } +}); + +// ../../node_modules/.pnpm/ansi-regex@4.1.0/node_modules/ansi-regex/index.js +var require_ansi_regex3 = __commonJS({ + "../../node_modules/.pnpm/ansi-regex@4.1.0/node_modules/ansi-regex/index.js"(exports2, module2) { + "use strict"; + module2.exports = (options) => { + options = Object.assign({ + onlyFirst: false + }, options); + const pattern = [ + "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", + "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))" + ].join("|"); + return new RegExp(pattern, options.onlyFirst ? void 0 : "g"); + }; + } +}); + +// ../../node_modules/.pnpm/strip-ansi@5.2.0/node_modules/strip-ansi/index.js +var require_strip_ansi2 = __commonJS({ + "../../node_modules/.pnpm/strip-ansi@5.2.0/node_modules/strip-ansi/index.js"(exports2, module2) { + "use strict"; + var ansiRegex = require_ansi_regex3(); + var stripAnsi = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string; + module2.exports = stripAnsi; + module2.exports.default = stripAnsi; + } +}); + +// ../../node_modules/.pnpm/is-fullwidth-code-point@2.0.0/node_modules/is-fullwidth-code-point/index.js +var require_is_fullwidth_code_point2 = __commonJS({ + "../../node_modules/.pnpm/is-fullwidth-code-point@2.0.0/node_modules/is-fullwidth-code-point/index.js"(exports2, module2) { + "use strict"; + module2.exports = (x) => { + if (Number.isNaN(x)) { + return false; + } + if (x >= 4352 && (x <= 4447 || x === 9001 || x === 9002 || 11904 <= x && x <= 12871 && x !== 12351 || 12880 <= x && x <= 19903 || 19968 <= x && x <= 42182 || 43360 <= x && x <= 43388 || 44032 <= x && x <= 55203 || 63744 <= x && x <= 64255 || 65040 <= x && x <= 65049 || 65072 <= x && x <= 65131 || 65281 <= x && x <= 65376 || 65504 <= x && x <= 65510 || 110592 <= x && x <= 110593 || 127488 <= x && x <= 127569 || 131072 <= x && x <= 262141)) { + return true; + } + return false; + }; + } +}); + +// ../../node_modules/.pnpm/emoji-regex@7.0.3/node_modules/emoji-regex/index.js +var require_emoji_regex2 = __commonJS({ + "../../node_modules/.pnpm/emoji-regex@7.0.3/node_modules/emoji-regex/index.js"(exports2, module2) { + "use strict"; + module2.exports = function() { + return /\uD83C\uDFF4(?:\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74)\uDB40\uDC7F|\u200D\u2620\uFE0F)|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3]))|\uD83D\uDC69\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83D\uDC69\u200D[\u2695\u2696\u2708])\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC68(?:\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDD1-\uDDDD])/g; + }; + } +}); + +// ../../node_modules/.pnpm/string-width@3.1.0/node_modules/string-width/index.js +var require_string_width2 = __commonJS({ + "../../node_modules/.pnpm/string-width@3.1.0/node_modules/string-width/index.js"(exports2, module2) { + "use strict"; + var stripAnsi = require_strip_ansi2(); + var isFullwidthCodePoint = require_is_fullwidth_code_point2(); + var emojiRegex = require_emoji_regex2()(); + module2.exports = (input) => { + input = input.replace(emojiRegex, " "); + if (typeof input !== "string" || input.length === 0) { + return 0; + } + input = stripAnsi(input); + let width = 0; + for (let i = 0; i < input.length; i++) { + const code = input.codePointAt(i); + if (code <= 31 || code >= 127 && code <= 159) { + continue; + } + if (code >= 768 && code <= 879) { + continue; + } + if (code > 65535) { + i++; + } + width += isFullwidthCodePoint(code) ? 2 : 1; + } + return width; + }; + } +}); + +// ../../node_modules/.pnpm/ansi-align@3.0.0/node_modules/ansi-align/index.js +var require_ansi_align = __commonJS({ + "../../node_modules/.pnpm/ansi-align@3.0.0/node_modules/ansi-align/index.js"(exports2, module2) { + "use strict"; + var stringWidth = require_string_width2(); + function ansiAlign(text, opts) { + if (!text) + return text; + opts = opts || {}; + const align = opts.align || "center"; + if (align === "left") + return text; + const split = opts.split || "\n"; + const pad = opts.pad || " "; + const widthDiffFn = align !== "right" ? halfDiff : fullDiff; + let returnString = false; + if (!Array.isArray(text)) { + returnString = true; + text = String(text).split(split); + } + let width; + let maxWidth = 0; + text = text.map(function(str) { + str = String(str); + width = stringWidth(str); + maxWidth = Math.max(width, maxWidth); + return { + str, + width + }; + }).map(function(obj) { + return new Array(widthDiffFn(maxWidth, obj.width) + 1).join(pad) + obj.str; + }); + return returnString ? text.join(split) : text; + } + ansiAlign.left = function left(text) { + return ansiAlign(text, { align: "left" }); + }; + ansiAlign.center = function center(text) { + return ansiAlign(text, { align: "center" }); + }; + ansiAlign.right = function right(text) { + return ansiAlign(text, { align: "right" }); + }; + module2.exports = ansiAlign; + function halfDiff(maxWidth, curWidth) { + return Math.floor((maxWidth - curWidth) / 2); + } + function fullDiff(maxWidth, curWidth) { + return maxWidth - curWidth; + } + } +}); + +// ../../node_modules/.pnpm/wrap-ansi@7.0.0/node_modules/wrap-ansi/index.js +var require_wrap_ansi = __commonJS({ + "../../node_modules/.pnpm/wrap-ansi@7.0.0/node_modules/wrap-ansi/index.js"(exports2, module2) { + "use strict"; + var stringWidth = require_string_width(); + var stripAnsi = require_strip_ansi(); + var ansiStyles = require_ansi_styles2(); + var ESCAPES = new Set([ + "", + "\x9B" + ]); + var END_CODE = 39; + var ANSI_ESCAPE_BELL = "\x07"; + var ANSI_CSI = "["; + var ANSI_OSC = "]"; + var ANSI_SGR_TERMINATOR = "m"; + var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`; + var wrapAnsi = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`; + var wrapAnsiHyperlink = (uri) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`; + var wordLengths = (string) => string.split(" ").map((character) => stringWidth(character)); + var wrapWord = (rows, word, columns) => { + const characters = [...word]; + let isInsideEscape = false; + let isInsideLinkEscape = false; + let visible = stringWidth(stripAnsi(rows[rows.length - 1])); + for (const [index, character] of characters.entries()) { + const characterLength = stringWidth(character); + if (visible + characterLength <= columns) { + rows[rows.length - 1] += character; + } else { + rows.push(character); + visible = 0; + } + if (ESCAPES.has(character)) { + isInsideEscape = true; + isInsideLinkEscape = characters.slice(index + 1).join("").startsWith(ANSI_ESCAPE_LINK); + } + if (isInsideEscape) { + if (isInsideLinkEscape) { + if (character === ANSI_ESCAPE_BELL) { + isInsideEscape = false; + isInsideLinkEscape = false; + } + } else if (character === ANSI_SGR_TERMINATOR) { + isInsideEscape = false; + } + continue; + } + visible += characterLength; + if (visible === columns && index < characters.length - 1) { + rows.push(""); + visible = 0; + } + } + if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) { + rows[rows.length - 2] += rows.pop(); + } + }; + var stringVisibleTrimSpacesRight = (string) => { + const words = string.split(" "); + let last = words.length; + while (last > 0) { + if (stringWidth(words[last - 1]) > 0) { + break; + } + last--; + } + if (last === words.length) { + return string; + } + return words.slice(0, last).join(" ") + words.slice(last).join(""); + }; + var exec = (string, columns, options = {}) => { + if (options.trim !== false && string.trim() === "") { + return ""; + } + let returnValue = ""; + let escapeCode; + let escapeUrl; + const lengths = wordLengths(string); + let rows = [""]; + for (const [index, word] of string.split(" ").entries()) { + if (options.trim !== false) { + rows[rows.length - 1] = rows[rows.length - 1].trimStart(); + } + let rowLength = stringWidth(rows[rows.length - 1]); + if (index !== 0) { + if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) { + rows.push(""); + rowLength = 0; + } + if (rowLength > 0 || options.trim === false) { + rows[rows.length - 1] += " "; + rowLength++; + } + } + if (options.hard && lengths[index] > columns) { + const remainingColumns = columns - rowLength; + const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns); + const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns); + if (breaksStartingNextLine < breaksStartingThisLine) { + rows.push(""); + } + wrapWord(rows, word, columns); + continue; + } + if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) { + if (options.wordWrap === false && rowLength < columns) { + wrapWord(rows, word, columns); + continue; + } + rows.push(""); + } + if (rowLength + lengths[index] > columns && options.wordWrap === false) { + wrapWord(rows, word, columns); + continue; + } + rows[rows.length - 1] += word; + } + if (options.trim !== false) { + rows = rows.map(stringVisibleTrimSpacesRight); + } + const pre = [...rows.join("\n")]; + for (const [index, character] of pre.entries()) { + returnValue += character; + if (ESCAPES.has(character)) { + const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?\\d+)m|\\${ANSI_ESCAPE_LINK}(?.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join("")) || { groups: {} }; + if (groups.code !== void 0) { + const code2 = Number.parseFloat(groups.code); + escapeCode = code2 === END_CODE ? void 0 : code2; + } else if (groups.uri !== void 0) { + escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri; + } + } + const code = ansiStyles.codes.get(Number(escapeCode)); + if (pre[index + 1] === "\n") { + if (escapeUrl) { + returnValue += wrapAnsiHyperlink(""); + } + if (escapeCode && code) { + returnValue += wrapAnsi(code); + } + } else if (character === "\n") { + if (escapeCode && code) { + returnValue += wrapAnsi(escapeCode); + } + if (escapeUrl) { + returnValue += wrapAnsiHyperlink(escapeUrl); + } + } + } + return returnValue; + }; + module2.exports = (string, columns, options) => { + return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line) => exec(line, columns, options)).join("\n"); + }; + } +}); + +// ../../node_modules/.pnpm/boxen@5.1.2/node_modules/boxen/index.js +var require_boxen = __commonJS({ + "../../node_modules/.pnpm/boxen@5.1.2/node_modules/boxen/index.js"(exports2, module2) { + "use strict"; + var stringWidth = require_string_width(); + var chalk = require_source(); + var widestLine = require_widest_line(); + var cliBoxes = require_cli_boxes(); + var camelCase = require_camelcase(); + var ansiAlign = require_ansi_align(); + var wrapAnsi = require_wrap_ansi(); + var NL = "\n"; + var PAD = " "; + var terminalColumns = () => { + const { env, stdout, stderr } = process; + if (stdout && stdout.columns) { + return stdout.columns; + } + if (stderr && stderr.columns) { + return stderr.columns; + } + if (env.COLUMNS) { + return Number.parseInt(env.COLUMNS, 10); + } + return 80; + }; + var getObject = (detail) => { + return typeof detail === "number" ? { + top: detail, + right: detail * 3, + bottom: detail, + left: detail * 3 + } : { + top: 0, + right: 0, + bottom: 0, + left: 0, + ...detail + }; + }; + var getBorderChars = (borderStyle) => { + const sides = [ + "topLeft", + "topRight", + "bottomRight", + "bottomLeft", + "vertical", + "horizontal" + ]; + let chararacters; + if (typeof borderStyle === "string") { + chararacters = cliBoxes[borderStyle]; + if (!chararacters) { + throw new TypeError(`Invalid border style: ${borderStyle}`); + } + } else { + for (const side of sides) { + if (!borderStyle[side] || typeof borderStyle[side] !== "string") { + throw new TypeError(`Invalid border style: ${side}`); + } + } + chararacters = borderStyle; + } + return chararacters; + }; + var makeTitle = (text, horizontal, alignement) => { + let title = ""; + const textWidth = stringWidth(text); + switch (alignement) { + case "left": + title = text + horizontal.slice(textWidth); + break; + case "right": + title = horizontal.slice(textWidth) + text; + break; + default: + horizontal = horizontal.slice(textWidth); + if (horizontal.length % 2 === 1) { + horizontal = horizontal.slice(Math.floor(horizontal.length / 2)); + title = horizontal.slice(1) + text + horizontal; + } else { + horizontal = horizontal.slice(horizontal.length / 2); + title = horizontal + text + horizontal; + } + break; + } + return title; + }; + var makeContentText = (text, padding, columns, align) => { + text = ansiAlign(text, { align }); + let lines = text.split(NL); + const textWidth = widestLine(text); + const max = columns - padding.left - padding.right; + if (textWidth > max) { + const newLines = []; + for (const line of lines) { + const createdLines = wrapAnsi(line, max, { hard: true }); + const alignedLines = ansiAlign(createdLines, { align }); + const alignedLinesArray = alignedLines.split("\n"); + const longestLength = Math.max(...alignedLinesArray.map((s) => stringWidth(s))); + for (const alignedLine of alignedLinesArray) { + let paddedLine; + switch (align) { + case "center": + paddedLine = PAD.repeat((max - longestLength) / 2) + alignedLine; + break; + case "right": + paddedLine = PAD.repeat(max - longestLength) + alignedLine; + break; + default: + paddedLine = alignedLine; + break; + } + newLines.push(paddedLine); + } + } + lines = newLines; + } + if (align === "center" && textWidth < max) { + lines = lines.map((line) => PAD.repeat((max - textWidth) / 2) + line); + } else if (align === "right" && textWidth < max) { + lines = lines.map((line) => PAD.repeat(max - textWidth) + line); + } + const paddingLeft = PAD.repeat(padding.left); + const paddingRight = PAD.repeat(padding.right); + lines = lines.map((line) => paddingLeft + line + paddingRight); + lines = lines.map((line) => { + if (columns - stringWidth(line) > 0) { + switch (align) { + case "center": + return line + PAD.repeat(columns - stringWidth(line)); + case "right": + return line + PAD.repeat(columns - stringWidth(line)); + default: + return line + PAD.repeat(columns - stringWidth(line)); + } + } + return line; + }); + if (padding.top > 0) { + lines = new Array(padding.top).fill(PAD.repeat(columns)).concat(lines); + } + if (padding.bottom > 0) { + lines = lines.concat(new Array(padding.bottom).fill(PAD.repeat(columns))); + } + return lines.join(NL); + }; + var isHex = (color) => color.match(/^#(?:[0-f]{3}){1,2}$/i); + var isColorValid = (color) => typeof color === "string" && (chalk[color] || isHex(color)); + var getColorFn = (color) => isHex(color) ? chalk.hex(color) : chalk[color]; + var getBGColorFn = (color) => isHex(color) ? chalk.bgHex(color) : chalk[camelCase(["bg", color])]; + module2.exports = (text, options) => { + options = { + padding: 0, + borderStyle: "single", + dimBorder: false, + textAlignment: "left", + float: "left", + titleAlignment: "left", + ...options + }; + if (options.align) { + options.textAlignment = options.align; + } + const BORDERS_WIDTH = 2; + if (options.borderColor && !isColorValid(options.borderColor)) { + throw new Error(`${options.borderColor} is not a valid borderColor`); + } + if (options.backgroundColor && !isColorValid(options.backgroundColor)) { + throw new Error(`${options.backgroundColor} is not a valid backgroundColor`); + } + const chars = getBorderChars(options.borderStyle); + const padding = getObject(options.padding); + const margin = getObject(options.margin); + const colorizeBorder = (border) => { + const newBorder = options.borderColor ? getColorFn(options.borderColor)(border) : border; + return options.dimBorder ? chalk.dim(newBorder) : newBorder; + }; + const colorizeContent = (content) => options.backgroundColor ? getBGColorFn(options.backgroundColor)(content) : content; + const columns = terminalColumns(); + let contentWidth = widestLine(wrapAnsi(text, columns - BORDERS_WIDTH, { hard: true, trim: false })) + padding.left + padding.right; + let title = options.title && options.title.slice(0, columns - 4 - margin.left - margin.right); + if (title) { + title = ` ${title} `; + if (stringWidth(title) > contentWidth) { + contentWidth = stringWidth(title); + } + } + if (margin.left && margin.right && contentWidth + BORDERS_WIDTH + margin.left + margin.right > columns) { + const spaceForMargins = columns - contentWidth - BORDERS_WIDTH; + const multiplier = spaceForMargins / (margin.left + margin.right); + margin.left = Math.max(0, Math.floor(margin.left * multiplier)); + margin.right = Math.max(0, Math.floor(margin.right * multiplier)); + } + contentWidth = Math.min(contentWidth, columns - BORDERS_WIDTH - margin.left - margin.right); + text = makeContentText(text, padding, contentWidth, options.textAlignment); + let marginLeft = PAD.repeat(margin.left); + if (options.float === "center") { + const marginWidth = Math.max((columns - contentWidth - BORDERS_WIDTH) / 2, 0); + marginLeft = PAD.repeat(marginWidth); + } else if (options.float === "right") { + const marginWidth = Math.max(columns - contentWidth - margin.right - BORDERS_WIDTH, 0); + marginLeft = PAD.repeat(marginWidth); + } + const horizontal = chars.horizontal.repeat(contentWidth); + const top = colorizeBorder(NL.repeat(margin.top) + marginLeft + chars.topLeft + (title ? makeTitle(title, horizontal, options.titleAlignment) : horizontal) + chars.topRight); + const bottom = colorizeBorder(marginLeft + chars.bottomLeft + horizontal + chars.bottomRight + NL.repeat(margin.bottom)); + const side = colorizeBorder(chars.vertical); + const LINE_SEPARATOR = contentWidth + BORDERS_WIDTH + margin.left >= columns ? "" : NL; + const lines = text.split(NL); + const middle = lines.map((line) => { + return marginLeft + side + colorizeContent(line) + side; + }).join(LINE_SEPARATOR); + return top + LINE_SEPARATOR + middle + LINE_SEPARATOR + bottom; + }; + module2.exports._borderStyles = cliBoxes; + } +}); + +// ../default-reporter/lib/reporterForClient/reportUpdateCheck.js +var require_reportUpdateCheck = __commonJS({ + "../default-reporter/lib/reporterForClient/reportUpdateCheck.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var boxen_1 = __importDefault(require_boxen()); + var chalk_1 = __importDefault(require_source()); + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var semver_1 = __importDefault(require_semver2()); + exports2.default = (log$) => { + return log$.pipe(operators_1.take(1), operators_1.filter((log2) => semver_1.default.gt(log2.latestVersion, log2.currentVersion)), operators_1.map((log2) => Rx.of({ + msg: boxen_1.default(`Update available! ${chalk_1.default.red(log2.currentVersion)} \u2192 ${chalk_1.default.green(log2.latestVersion)}. +${chalk_1.default.magenta("Changelog:")} https://github.com/pnpm/pnpm/releases/tag/v${log2.latestVersion} +Run ${chalk_1.default.magenta("pnpm add -g pnpm")} to update. + +Follow ${chalk_1.default.magenta("@pnpmjs")} for updates: https://twitter.com/pnpmjs`, { + padding: 1, + margin: 1, + align: "center", + borderColor: "yellow", + borderStyle: "round" + }) + }))); + }; + } +}); + +// ../default-reporter/lib/reporterForClient/index.js +var require_reporterForClient = __commonJS({ + "../default-reporter/lib/reporterForClient/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var operators_1 = require_operators(); + var reportBigTarballsProgress_1 = __importDefault(require_reportBigTarballsProgress()); + var reportContext_1 = __importDefault(require_reportContext()); + var reportDeprecations_1 = __importDefault(require_reportDeprecations()); + var reportHooks_1 = __importDefault(require_reportHooks()); + var reportInstallChecks_1 = __importDefault(require_reportInstallChecks()); + var reportLifecycleScripts_1 = __importDefault(require_reportLifecycleScripts()); + var reportMisc_1 = __importDefault(require_reportMisc()); + var reportProgress_1 = __importDefault(require_reportProgress()); + var reportRequestRetry_1 = __importDefault(require_reportRequestRetry()); + var reportScope_1 = __importDefault(require_reportScope()); + var reportSkippedOptionalDependencies_1 = __importDefault(require_reportSkippedOptionalDependencies()); + var reportStats_1 = __importDefault(require_reportStats()); + var reportSummary_1 = __importDefault(require_reportSummary()); + var reportUpdateCheck_1 = __importDefault(require_reportUpdateCheck()); + function default_1(log$, opts) { + var _a, _b, _c, _d; + const width = (_b = (_a = opts.width) !== null && _a !== void 0 ? _a : process.stdout.columns) !== null && _b !== void 0 ? _b : 80; + const cwd = (_d = (_c = opts.pnpmConfig) === null || _c === void 0 ? void 0 : _c.dir) !== null && _d !== void 0 ? _d : process.cwd(); + const throttle = typeof opts.throttleProgress === "number" && opts.throttleProgress > 0 ? operators_1.throttleTime(opts.throttleProgress, void 0, { leading: true, trailing: true }) : void 0; + const outputs = [ + reportProgress_1.default(log$, { + cwd, + throttle + }), + reportLifecycleScripts_1.default(log$, { + appendOnly: opts.appendOnly === true || opts.streamLifecycleOutput, + cwd, + width + }), + reportDeprecations_1.default(log$.deprecation, { cwd, isRecursive: opts.isRecursive }), + reportMisc_1.default(log$, { + appendOnly: opts.appendOnly === true, + config: opts.config, + cwd, + logLevel: opts.logLevel, + zoomOutCurrent: opts.isRecursive + }), + ...reportStats_1.default(log$, { + cmd: opts.cmd, + cwd, + isRecursive: opts.isRecursive, + width + }), + reportInstallChecks_1.default(log$.installCheck, { cwd }), + reportRequestRetry_1.default(log$.requestRetry), + reportScope_1.default(log$.scope, { isRecursive: opts.isRecursive, cmd: opts.cmd }), + reportSkippedOptionalDependencies_1.default(log$.skippedOptionalDependency, { cwd }), + reportHooks_1.default(log$.hook, { cwd, isRecursive: opts.isRecursive }), + reportContext_1.default(log$, { cwd }), + reportUpdateCheck_1.default(log$.updateCheck) + ]; + if (!opts.appendOnly) { + outputs.push(reportBigTarballsProgress_1.default(log$)); + } + if (!opts.isRecursive) { + outputs.push(reportSummary_1.default(log$, { + cwd, + pnpmConfig: opts.pnpmConfig + })); + } + return outputs; + } + exports2.default = default_1; + } +}); + +// ../default-reporter/lib/reporterForServer.js +var require_reporterForServer = __commonJS({ + "../default-reporter/lib/reporterForServer.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var chalk_1 = __importDefault(require_source()); + var reportError_1 = __importDefault(require_reportError()); + function default_1(log$, config) { + log$.subscribe({ + complete: () => void 0, + error: () => void 0, + next(log2) { + if (log2.name === "pnpm:fetching-progress") { + console.log(`${chalk_1.default.cyan(`fetching_${log2.status}`)} ${log2.packageId}`); + return; + } + switch (log2.level) { + case "warn": + console.log(formatWarn(log2["message"])); + return; + case "error": + console.log(reportError_1.default(log2, config)); + return; + case "debug": + return; + default: + console.log(log2["message"]); + } + } + }); + } + exports2.default = default_1; + function formatWarn(message2) { + return `${chalk_1.default.bgYellow.black("\u2009WARN\u2009")} ${message2}`; + } + } +}); + +// ../default-reporter/lib/index.js +var require_lib11 = __commonJS({ + "../default-reporter/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toOutput$ = exports2.formatWarn = void 0; + var Rx = __importStar2(require_cjs()); + var operators_1 = require_operators(); + var ansi_diff_1 = __importDefault(require_ansi_diff()); + var constants_1 = require_constants2(); + var mergeOutputs_1 = __importDefault(require_mergeOutputs()); + var reporterForClient_1 = __importDefault(require_reporterForClient()); + var formatWarn_1 = __importDefault(require_formatWarn()); + exports2.formatWarn = formatWarn_1.default; + var reporterForServer_1 = __importDefault(require_reporterForServer()); + function default_1(opts) { + var _a, _b, _c, _d; + if (opts.context.argv[0] === "server") { + const log$ = Rx.fromEvent(opts.streamParser, "data"); + reporterForServer_1.default(log$, opts.context.config); + return; + } + const outputMaxWidth = (_c = (_b = (_a = opts.reportingOptions) === null || _a === void 0 ? void 0 : _a.outputMaxWidth) !== null && _b !== void 0 ? _b : process.stdout.columns && process.stdout.columns - 2) !== null && _c !== void 0 ? _c : 80; + const output$ = toOutput$({ ...opts, reportingOptions: { ...opts.reportingOptions, outputMaxWidth } }); + if ((_d = opts.reportingOptions) === null || _d === void 0 ? void 0 : _d.appendOnly) { + const writeNext = opts.useStderr ? console.error.bind(console) : console.log.bind(console); + output$.subscribe({ + complete() { + }, + error: (err) => console.error(err.message), + next: writeNext + }); + return; + } + const diff = ansi_diff_1.default({ + height: process.stdout.rows, + outputMaxWidth + }); + output$.subscribe({ + complete() { + }, + error: (err) => logUpdate(err.message), + next: logUpdate + }); + const write = opts.useStderr ? process.stderr.write.bind(process.stderr) : process.stdout.write.bind(process.stdout); + function logUpdate(view) { + if (!view.endsWith(constants_1.EOL)) + view += constants_1.EOL; + write(diff.update(view)); + } + } + exports2.default = default_1; + function toOutput$(opts) { + var _a, _b, _c, _d, _e, _f, _g; + opts = opts || {}; + const contextPushStream = new Rx.Subject(); + const fetchingProgressPushStream = new Rx.Subject(); + const progressPushStream = new Rx.Subject(); + const stagePushStream = new Rx.Subject(); + const deprecationPushStream = new Rx.Subject(); + const summaryPushStream = new Rx.Subject(); + const lifecyclePushStream = new Rx.Subject(); + const statsPushStream = new Rx.Subject(); + const packageImportMethodPushStream = new Rx.Subject(); + const installCheckPushStream = new Rx.Subject(); + const registryPushStream = new Rx.Subject(); + const rootPushStream = new Rx.Subject(); + const packageManifestPushStream = new Rx.Subject(); + const linkPushStream = new Rx.Subject(); + const otherPushStream = new Rx.Subject(); + const hookPushStream = new Rx.Subject(); + const skippedOptionalDependencyPushStream = new Rx.Subject(); + const scopePushStream = new Rx.Subject(); + const requestRetryPushStream = new Rx.Subject(); + const updateCheckPushStream = new Rx.Subject(); + setTimeout(() => { + opts.streamParser["on"]("data", (log2) => { + switch (log2.name) { + case "pnpm:context": + contextPushStream.next(log2); + break; + case "pnpm:fetching-progress": + fetchingProgressPushStream.next(log2); + break; + case "pnpm:progress": + progressPushStream.next(log2); + break; + case "pnpm:stage": + stagePushStream.next(log2); + break; + case "pnpm:deprecation": + deprecationPushStream.next(log2); + break; + case "pnpm:summary": + summaryPushStream.next(log2); + break; + case "pnpm:lifecycle": + lifecyclePushStream.next(log2); + break; + case "pnpm:stats": + statsPushStream.next(log2); + break; + case "pnpm:package-import-method": + packageImportMethodPushStream.next(log2); + break; + case "pnpm:install-check": + installCheckPushStream.next(log2); + break; + case "pnpm:registry": + registryPushStream.next(log2); + break; + case "pnpm:root": + rootPushStream.next(log2); + break; + case "pnpm:package-manifest": + packageManifestPushStream.next(log2); + break; + case "pnpm:link": + linkPushStream.next(log2); + break; + case "pnpm:hook": + hookPushStream.next(log2); + break; + case "pnpm:skipped-optional-dependency": + skippedOptionalDependencyPushStream.next(log2); + break; + case "pnpm:scope": + scopePushStream.next(log2); + break; + case "pnpm:request-retry": + requestRetryPushStream.next(log2); + break; + case "pnpm:update-check": + updateCheckPushStream.next(log2); + break; + case "pnpm": + case "pnpm:global": + case "pnpm:store": + case "pnpm:lockfile": + otherPushStream.next(log2); + break; + } + }); + }, 0); + const log$ = { + context: Rx.from(contextPushStream), + deprecation: Rx.from(deprecationPushStream), + fetchingProgress: Rx.from(fetchingProgressPushStream), + hook: Rx.from(hookPushStream), + installCheck: Rx.from(installCheckPushStream), + lifecycle: Rx.from(lifecyclePushStream), + link: Rx.from(linkPushStream), + other: Rx.from(otherPushStream), + packageImportMethod: Rx.from(packageImportMethodPushStream), + packageManifest: Rx.from(packageManifestPushStream), + progress: Rx.from(progressPushStream), + registry: Rx.from(registryPushStream), + requestRetry: Rx.from(requestRetryPushStream), + root: Rx.from(rootPushStream), + scope: Rx.from(scopePushStream), + skippedOptionalDependency: Rx.from(skippedOptionalDependencyPushStream), + stage: Rx.from(stagePushStream), + stats: Rx.from(statsPushStream), + summary: Rx.from(summaryPushStream), + updateCheck: Rx.from(updateCheckPushStream) + }; + const outputs = reporterForClient_1.default(log$, { + appendOnly: (_a = opts.reportingOptions) === null || _a === void 0 ? void 0 : _a.appendOnly, + cmd: opts.context.argv[0], + config: opts.context.config, + isRecursive: ((_b = opts.context.config) === null || _b === void 0 ? void 0 : _b["recursive"]) === true, + logLevel: (_c = opts.reportingOptions) === null || _c === void 0 ? void 0 : _c.logLevel, + pnpmConfig: opts.context.config, + streamLifecycleOutput: (_d = opts.reportingOptions) === null || _d === void 0 ? void 0 : _d.streamLifecycleOutput, + throttleProgress: (_e = opts.reportingOptions) === null || _e === void 0 ? void 0 : _e.throttleProgress, + width: (_f = opts.reportingOptions) === null || _f === void 0 ? void 0 : _f.outputMaxWidth + }); + if ((_g = opts.reportingOptions) === null || _g === void 0 ? void 0 : _g.appendOnly) { + return Rx.merge(...outputs).pipe(operators_1.map((log2) => log2.pipe(operators_1.map((msg) => msg.msg))), operators_1.mergeAll()); + } + return mergeOutputs_1.default(outputs); + } + exports2.toOutput$ = toOutput$; + } +}); + +// ../cli-utils/lib/getConfig.js +var require_getConfig = __commonJS({ + "../cli-utils/lib/getConfig.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var cli_meta_1 = __importDefault(require_lib4()); + var config_1 = __importDefault(require_lib10()); + var default_reporter_1 = require_lib11(); + async function default_1(cliOptions, opts) { + const { config, warnings } = await config_1.default({ + cliOptions, + globalDirShouldAllowWrite: opts.globalDirShouldAllowWrite, + packageManager: cli_meta_1.default, + rcOptionsTypes: opts.rcOptionsTypes, + workspaceDir: opts.workspaceDir, + checkUnknownSetting: opts.checkUnknownSetting + }); + config.cliOptions = cliOptions; + if (opts.excludeReporter) { + delete config.reporter; + } + if (warnings.length > 0) { + console.log(warnings.map((warning) => default_reporter_1.formatWarn(warning)).join("\n")); + } + return config; + } + exports2.default = default_1; + } +}); + +// ../core-loggers/lib/contextLogger.js +var require_contextLogger = __commonJS({ + "../core-loggers/lib/contextLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.contextLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.contextLogger = logger_1.default("context"); + } +}); + +// ../core-loggers/lib/deprecationLogger.js +var require_deprecationLogger = __commonJS({ + "../core-loggers/lib/deprecationLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.deprecationLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.deprecationLogger = logger_1.default("deprecation"); + } +}); + +// ../core-loggers/lib/fetchingProgressLogger.js +var require_fetchingProgressLogger = __commonJS({ + "../core-loggers/lib/fetchingProgressLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fetchingProgressLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.fetchingProgressLogger = logger_1.default("fetching-progress"); + } +}); + +// ../core-loggers/lib/hookLogger.js +var require_hookLogger = __commonJS({ + "../core-loggers/lib/hookLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hookLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.hookLogger = logger_1.default("hook"); + } +}); + +// ../core-loggers/lib/installCheckLogger.js +var require_installCheckLogger = __commonJS({ + "../core-loggers/lib/installCheckLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.installCheckLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.installCheckLogger = logger_1.default("install-check"); + } +}); + +// ../core-loggers/lib/lifecycleLogger.js +var require_lifecycleLogger = __commonJS({ + "../core-loggers/lib/lifecycleLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.lifecycleLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.lifecycleLogger = logger_1.default("lifecycle"); + } +}); + +// ../core-loggers/lib/linkLogger.js +var require_linkLogger = __commonJS({ + "../core-loggers/lib/linkLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.linkLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.linkLogger = logger_1.default("link"); + } +}); + +// ../core-loggers/lib/packageImportMethodLogger.js +var require_packageImportMethodLogger = __commonJS({ + "../core-loggers/lib/packageImportMethodLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageImportMethodLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.packageImportMethodLogger = logger_1.default("package-import-method"); + } +}); + +// ../core-loggers/lib/packageManifestLogger.js +var require_packageManifestLogger = __commonJS({ + "../core-loggers/lib/packageManifestLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageManifestLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.packageManifestLogger = logger_1.default("package-manifest"); + } +}); + +// ../core-loggers/lib/progressLogger.js +var require_progressLogger = __commonJS({ + "../core-loggers/lib/progressLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.progressLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.progressLogger = logger_1.default("progress"); + } +}); + +// ../core-loggers/lib/registryLogger.js +var require_registryLogger = __commonJS({ + "../core-loggers/lib/registryLogger.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../core-loggers/lib/removalLogger.js +var require_removalLogger = __commonJS({ + "../core-loggers/lib/removalLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.removalLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.removalLogger = logger_1.default("removal"); + } +}); + +// ../core-loggers/lib/requestRetryLogger.js +var require_requestRetryLogger = __commonJS({ + "../core-loggers/lib/requestRetryLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.requestRetryLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.requestRetryLogger = logger_1.default("request-retry"); + } +}); + +// ../core-loggers/lib/rootLogger.js +var require_rootLogger = __commonJS({ + "../core-loggers/lib/rootLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rootLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.rootLogger = logger_1.default("root"); + } +}); + +// ../core-loggers/lib/scopeLogger.js +var require_scopeLogger = __commonJS({ + "../core-loggers/lib/scopeLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scopeLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.scopeLogger = logger_1.default("scope"); + } +}); + +// ../core-loggers/lib/skippedOptionalDependencyLogger.js +var require_skippedOptionalDependencyLogger = __commonJS({ + "../core-loggers/lib/skippedOptionalDependencyLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.skippedOptionalDependencyLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.skippedOptionalDependencyLogger = logger_1.default("skipped-optional-dependency"); + } +}); + +// ../core-loggers/lib/stageLogger.js +var require_stageLogger = __commonJS({ + "../core-loggers/lib/stageLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.stageLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.stageLogger = logger_1.default("stage"); + } +}); + +// ../core-loggers/lib/statsLogger.js +var require_statsLogger = __commonJS({ + "../core-loggers/lib/statsLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.statsLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.statsLogger = logger_1.default("stats"); + } +}); + +// ../core-loggers/lib/summaryLogger.js +var require_summaryLogger = __commonJS({ + "../core-loggers/lib/summaryLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summaryLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.summaryLogger = logger_1.default("summary"); + } +}); + +// ../core-loggers/lib/updateCheckLogger.js +var require_updateCheckLogger = __commonJS({ + "../core-loggers/lib/updateCheckLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.updateCheckLogger = void 0; + var logger_1 = __importDefault(require_lib6()); + exports2.updateCheckLogger = logger_1.default("update-check"); + } +}); + +// ../core-loggers/lib/all.js +var require_all = __commonJS({ + "../core-loggers/lib/all.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar(require_contextLogger(), exports2); + __exportStar(require_deprecationLogger(), exports2); + __exportStar(require_fetchingProgressLogger(), exports2); + __exportStar(require_hookLogger(), exports2); + __exportStar(require_installCheckLogger(), exports2); + __exportStar(require_lifecycleLogger(), exports2); + __exportStar(require_linkLogger(), exports2); + __exportStar(require_packageImportMethodLogger(), exports2); + __exportStar(require_packageManifestLogger(), exports2); + __exportStar(require_progressLogger(), exports2); + __exportStar(require_registryLogger(), exports2); + __exportStar(require_removalLogger(), exports2); + __exportStar(require_requestRetryLogger(), exports2); + __exportStar(require_rootLogger(), exports2); + __exportStar(require_scopeLogger(), exports2); + __exportStar(require_skippedOptionalDependencyLogger(), exports2); + __exportStar(require_stageLogger(), exports2); + __exportStar(require_statsLogger(), exports2); + __exportStar(require_summaryLogger(), exports2); + __exportStar(require_updateCheckLogger(), exports2); + } +}); + +// ../core-loggers/lib/index.js +var require_lib12 = __commonJS({ + "../core-loggers/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar(require_all(), exports2); + } +}); + +// ../package-is-installable/lib/checkEngine.js +var require_checkEngine = __commonJS({ + "../package-is-installable/lib/checkEngine.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UnsupportedEngineError = void 0; + var error_1 = __importDefault(require_lib8()); + var semver_1 = __importDefault(require_semver2()); + var UnsupportedEngineError = class extends error_1.default { + constructor(packageId, wanted, current) { + super("UNSUPPORTED_ENGINE", `Unsupported engine for ${packageId}: wanted: ${JSON.stringify(wanted)} (current: ${JSON.stringify(current)})`); + this.packageId = packageId; + this.wanted = wanted; + this.current = current; + } + }; + exports2.UnsupportedEngineError = UnsupportedEngineError; + function checkEngine(packageId, wantedEngine, currentEngine) { + if (!wantedEngine) + return null; + const unsatisfiedWanted = {}; + if (wantedEngine.node && !semver_1.default.satisfies(currentEngine.node, wantedEngine.node)) { + unsatisfiedWanted.node = wantedEngine.node; + } + if (currentEngine.pnpm && wantedEngine.pnpm && !semver_1.default.satisfies(currentEngine.pnpm, wantedEngine.pnpm)) { + unsatisfiedWanted.pnpm = wantedEngine.pnpm; + } + if (Object.keys(unsatisfiedWanted).length > 0) { + return new UnsupportedEngineError(packageId, unsatisfiedWanted, currentEngine); + } + return null; + } + exports2.default = checkEngine; + } +}); + +// ../package-is-installable/lib/checkPlatform.js +var require_checkPlatform = __commonJS({ + "../package-is-installable/lib/checkPlatform.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UnsupportedPlatformError = void 0; + var error_1 = __importDefault(require_lib8()); + var UnsupportedPlatformError = class extends error_1.default { + constructor(packageId, wanted, current) { + super("UNSUPPORTED_PLATFORM", `Unsupported platform for ${packageId}: wanted ${JSON.stringify(wanted)} (current: ${JSON.stringify(current)})`); + this.wanted = wanted; + this.current = current; + } + }; + exports2.UnsupportedPlatformError = UnsupportedPlatformError; + function checkPlatform(packageId, wantedPlatform) { + const platform = process.platform; + const arch = process.arch; + let osOk = true; + let cpuOk = true; + if (wantedPlatform.os) { + osOk = checkList(platform, wantedPlatform.os); + } + if (wantedPlatform.cpu) { + cpuOk = checkList(arch, wantedPlatform.cpu); + } + if (!osOk || !cpuOk) { + return new UnsupportedPlatformError(packageId, wantedPlatform, { os: platform, cpu: arch }); + } + return null; + } + exports2.default = checkPlatform; + function checkList(value, list) { + let tmp; + let match = false; + let blc = 0; + if (typeof list === "string") { + list = [list]; + } + if (list.length === 1 && list[0] === "any") { + return true; + } + for (let i = 0; i < list.length; ++i) { + tmp = list[i]; + if (tmp[0] === "!") { + tmp = tmp.slice(1); + if (tmp === value) { + return false; + } + ++blc; + } else { + match = match || tmp === value; + } + } + return match || blc === list.length; + } + } +}); + +// ../package-is-installable/lib/index.js +var require_lib13 = __commonJS({ + "../package-is-installable/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkPackage = exports2.UnsupportedPlatformError = exports2.UnsupportedEngineError = void 0; + var core_loggers_1 = require_lib12(); + var checkEngine_1 = __importStar2(require_checkEngine()); + Object.defineProperty(exports2, "UnsupportedEngineError", { enumerable: true, get: function() { + return checkEngine_1.UnsupportedEngineError; + } }); + var checkPlatform_1 = __importStar2(require_checkPlatform()); + Object.defineProperty(exports2, "UnsupportedPlatformError", { enumerable: true, get: function() { + return checkPlatform_1.UnsupportedPlatformError; + } }); + function packageIsInstallable(pkgId, pkg, options) { + const warn = checkPackage(pkgId, pkg, options); + if (warn == null) + return true; + core_loggers_1.installCheckLogger.warn({ + message: warn.message, + prefix: options.lockfileDir + }); + if (options.optional) { + core_loggers_1.skippedOptionalDependencyLogger.debug({ + details: warn.toString(), + package: { + id: pkgId, + name: pkg.name, + version: pkg.version + }, + prefix: options.lockfileDir, + reason: warn.code === "ERR_PNPM_UNSUPPORTED_ENGINE" ? "unsupported_engine" : "unsupported_platform" + }); + return false; + } + if (options.engineStrict) + throw warn; + return null; + } + exports2.default = packageIsInstallable; + function checkPackage(pkgId, manifest, options) { + var _a, _b, _c, _d; + return (_c = checkPlatform_1.default(pkgId, { + cpu: (_a = manifest.cpu) !== null && _a !== void 0 ? _a : ["any"], + os: (_b = manifest.os) !== null && _b !== void 0 ? _b : ["any"] + })) !== null && _c !== void 0 ? _c : manifest.engines == null ? null : checkEngine_1.default(pkgId, manifest.engines, { + node: (_d = options.nodeVersion) !== null && _d !== void 0 ? _d : process.version, + pnpm: options.pnpmVersion + }); + } + exports2.checkPackage = checkPackage; + } +}); + +// ../cli-utils/lib/packageIsInstallable.js +var require_packageIsInstallable = __commonJS({ + "../cli-utils/lib/packageIsInstallable.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.packageIsInstallable = void 0; + var cli_meta_1 = __importDefault(require_lib4()); + var logger_1 = __importDefault(require_lib6()); + var package_is_installable_1 = require_lib13(); + function packageIsInstallable(pkgPath, pkg, opts) { + var _a; + const pnpmVersion = cli_meta_1.default.name === "pnpm" ? cli_meta_1.default.stableVersion : void 0; + const err = package_is_installable_1.checkPackage(pkgPath, pkg, { pnpmVersion }); + if (err === null) + return; + if ((_a = err instanceof package_is_installable_1.UnsupportedEngineError && err.wanted.pnpm) !== null && _a !== void 0 ? _a : opts.engineStrict) + throw err; + logger_1.default.warn({ + message: `Unsupported ${err instanceof package_is_installable_1.UnsupportedEngineError ? "engine" : "platform"}: wanted: ${JSON.stringify(err.wanted)} (current: ${JSON.stringify(err.current)})`, + prefix: pkgPath + }); + } + exports2.packageIsInstallable = packageIsInstallable; + } +}); + +// ../manifest-utils/lib/getSpecFromPackageManifest.js +var require_getSpecFromPackageManifest = __commonJS({ + "../manifest-utils/lib/getSpecFromPackageManifest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = (manifest, depName) => { + var _a, _b, _c, _d, _e, _f; + return (_f = (_d = (_b = (_a = manifest.optionalDependencies) === null || _a === void 0 ? void 0 : _a[depName]) !== null && _b !== void 0 ? _b : (_c = manifest.dependencies) === null || _c === void 0 ? void 0 : _c[depName]) !== null && _d !== void 0 ? _d : (_e = manifest.devDependencies) === null || _e === void 0 ? void 0 : _e[depName]) !== null && _f !== void 0 ? _f : ""; + }; + } +}); + +// ../manifest-utils/lib/getPref.js +var require_getPref = __commonJS({ + "../manifest-utils/lib/getPref.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createVersionSpec = exports2.getPref = exports2.getPrefix = void 0; + var error_1 = __importDefault(require_lib8()); + var getPrefix = (alias, name) => alias !== name ? `npm:${name}@` : ""; + exports2.getPrefix = getPrefix; + function getPref(alias, name, version, opts) { + const prefix = exports2.getPrefix(alias, name); + return `${prefix}${createVersionSpec(version, opts.pinnedVersion)}`; + } + exports2.getPref = getPref; + function createVersionSpec(version, pinnedVersion) { + switch (pinnedVersion !== null && pinnedVersion !== void 0 ? pinnedVersion : "major") { + case "none": + return "*"; + case "major": + return `^${version}`; + case "minor": + return `~${version}`; + case "patch": + return `${version}`; + default: + throw new error_1.default("BAD_PINNED_VERSION", `Cannot pin '${pinnedVersion !== null && pinnedVersion !== void 0 ? pinnedVersion : "undefined"}'`); + } + } + exports2.createVersionSpec = createVersionSpec; + } +}); + +// ../types/lib/misc.js +var require_misc = __commonJS({ + "../types/lib/misc.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEPENDENCIES_FIELDS = void 0; + exports2.DEPENDENCIES_FIELDS = [ + "optionalDependencies", + "dependencies", + "devDependencies" + ]; + } +}); + +// ../types/lib/options.js +var require_options = __commonJS({ + "../types/lib/options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../types/lib/package.js +var require_package = __commonJS({ + "../types/lib/package.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../types/lib/project.js +var require_project = __commonJS({ + "../types/lib/project.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../types/lib/index.js +var require_lib14 = __commonJS({ + "../types/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar(require_misc(), exports2); + __exportStar(require_options(), exports2); + __exportStar(require_package(), exports2); + __exportStar(require_project(), exports2); + } +}); + +// ../manifest-utils/lib/updateProjectManifestObject.js +var require_updateProjectManifestObject = __commonJS({ + "../manifest-utils/lib/updateProjectManifestObject.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.guessDependencyType = exports2.updateProjectManifestObject = void 0; + var core_loggers_1 = require_lib12(); + var types_1 = require_lib14(); + async function updateProjectManifestObject(prefix, packageManifest, packageSpecs) { + packageSpecs.forEach((packageSpec) => { + var _a, _b, _c, _d, _e; + if (packageSpec.saveType) { + const spec = (_a = packageSpec.pref) !== null && _a !== void 0 ? _a : findSpec(packageSpec.alias, packageManifest); + if (spec) { + packageManifest[packageSpec.saveType] = (_b = packageManifest[packageSpec.saveType]) !== null && _b !== void 0 ? _b : {}; + packageManifest[packageSpec.saveType][packageSpec.alias] = spec; + types_1.DEPENDENCIES_FIELDS.filter((depField) => depField !== packageSpec.saveType).forEach((deptype) => { + if (packageManifest[deptype] != null) { + delete packageManifest[deptype][packageSpec.alias]; + } + }); + if (packageSpec.peer === true) { + packageManifest.peerDependencies = (_c = packageManifest.peerDependencies) !== null && _c !== void 0 ? _c : {}; + packageManifest.peerDependencies[packageSpec.alias] = spec; + } + } + } else if (packageSpec.pref) { + const usedDepType = (_d = guessDependencyType(packageSpec.alias, packageManifest)) !== null && _d !== void 0 ? _d : "dependencies"; + packageManifest[usedDepType] = (_e = packageManifest[usedDepType]) !== null && _e !== void 0 ? _e : {}; + packageManifest[usedDepType][packageSpec.alias] = packageSpec.pref; + } + if (packageSpec.nodeExecPath) { + if (packageManifest.dependenciesMeta == null) { + packageManifest.dependenciesMeta = {}; + } + packageManifest.dependenciesMeta[packageSpec.alias] = { node: packageSpec.nodeExecPath }; + } + }); + core_loggers_1.packageManifestLogger.debug({ + prefix, + updated: packageManifest + }); + return packageManifest; + } + exports2.updateProjectManifestObject = updateProjectManifestObject; + function findSpec(alias, manifest) { + const foundDepType = guessDependencyType(alias, manifest); + return foundDepType && manifest[foundDepType][alias]; + } + function guessDependencyType(alias, manifest) { + return types_1.DEPENDENCIES_FIELDS.find((depField) => { + var _a; + return Boolean((_a = manifest[depField]) === null || _a === void 0 ? void 0 : _a[alias]); + }); + } + exports2.guessDependencyType = guessDependencyType; + } +}); + +// ../manifest-utils/lib/index.js +var require_lib15 = __commonJS({ + "../manifest-utils/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getAllDependenciesFromManifest = exports2.filterDependenciesByType = exports2.getSpecFromPackageManifest = void 0; + var getSpecFromPackageManifest_1 = __importDefault(require_getSpecFromPackageManifest()); + exports2.getSpecFromPackageManifest = getSpecFromPackageManifest_1.default; + __exportStar(require_getPref(), exports2); + __exportStar(require_updateProjectManifestObject(), exports2); + function filterDependenciesByType(manifest, include) { + return { + ...include.devDependencies ? manifest.devDependencies : {}, + ...include.dependencies ? manifest.dependencies : {}, + ...include.optionalDependencies ? manifest.optionalDependencies : {} + }; + } + exports2.filterDependenciesByType = filterDependenciesByType; + function getAllDependenciesFromManifest(manifest) { + return { + ...manifest.devDependencies, + ...manifest.dependencies, + ...manifest.optionalDependencies + }; + } + exports2.getAllDependenciesFromManifest = getAllDependenciesFromManifest; + } +}); + +// ../../node_modules/.pnpm/json5@2.2.0/node_modules/json5/lib/unicode.js +var require_unicode = __commonJS({ + "../../node_modules/.pnpm/json5@2.2.0/node_modules/json5/lib/unicode.js"(exports2, module2) { + module2.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/; + module2.exports.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/; + module2.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/; + } +}); + +// ../../node_modules/.pnpm/json5@2.2.0/node_modules/json5/lib/util.js +var require_util4 = __commonJS({ + "../../node_modules/.pnpm/json5@2.2.0/node_modules/json5/lib/util.js"(exports2, module2) { + var unicode = require_unicode(); + module2.exports = { + isSpaceSeparator(c) { + return typeof c === "string" && unicode.Space_Separator.test(c); + }, + isIdStartChar(c) { + return typeof c === "string" && (c >= "a" && c <= "z" || c >= "A" && c <= "Z" || c === "$" || c === "_" || unicode.ID_Start.test(c)); + }, + isIdContinueChar(c) { + return typeof c === "string" && (c >= "a" && c <= "z" || c >= "A" && c <= "Z" || c >= "0" && c <= "9" || c === "$" || c === "_" || c === "\u200C" || c === "\u200D" || unicode.ID_Continue.test(c)); + }, + isDigit(c) { + return typeof c === "string" && /[0-9]/.test(c); + }, + isHexDigit(c) { + return typeof c === "string" && /[0-9A-Fa-f]/.test(c); + } + }; + } +}); + +// ../../node_modules/.pnpm/json5@2.2.0/node_modules/json5/lib/parse.js +var require_parse2 = __commonJS({ + "../../node_modules/.pnpm/json5@2.2.0/node_modules/json5/lib/parse.js"(exports2, module2) { + var util = require_util4(); + var source; + var parseState; + var stack2; + var pos; + var line; + var column; + var token; + var key; + var root; + module2.exports = function parse(text, reviver) { + source = String(text); + parseState = "start"; + stack2 = []; + pos = 0; + line = 1; + column = 0; + token = void 0; + key = void 0; + root = void 0; + do { + token = lex(); + parseStates[parseState](); + } while (token.type !== "eof"); + if (typeof reviver === "function") { + return internalize({ "": root }, "", reviver); + } + return root; + }; + function internalize(holder, name, reviver) { + const value = holder[name]; + if (value != null && typeof value === "object") { + for (const key2 in value) { + const replacement = internalize(value, key2, reviver); + if (replacement === void 0) { + delete value[key2]; + } else { + value[key2] = replacement; + } + } + } + return reviver.call(holder, name, value); + } + var lexState; + var buffer; + var doubleQuote; + var sign; + var c; + function lex() { + lexState = "default"; + buffer = ""; + doubleQuote = false; + sign = 1; + for (; ; ) { + c = peek(); + const token2 = lexStates[lexState](); + if (token2) { + return token2; + } + } + } + function peek() { + if (source[pos]) { + return String.fromCodePoint(source.codePointAt(pos)); + } + } + function read() { + const c2 = peek(); + if (c2 === "\n") { + line++; + column = 0; + } else if (c2) { + column += c2.length; + } else { + column++; + } + if (c2) { + pos += c2.length; + } + return c2; + } + var lexStates = { + default() { + switch (c) { + case " ": + case "\v": + case "\f": + case " ": + case "\xA0": + case "\uFEFF": + case "\n": + case "\r": + case "\u2028": + case "\u2029": + read(); + return; + case "/": + read(); + lexState = "comment"; + return; + case void 0: + read(); + return newToken("eof"); + } + if (util.isSpaceSeparator(c)) { + read(); + return; + } + return lexStates[parseState](); + }, + comment() { + switch (c) { + case "*": + read(); + lexState = "multiLineComment"; + return; + case "/": + read(); + lexState = "singleLineComment"; + return; + } + throw invalidChar(read()); + }, + multiLineComment() { + switch (c) { + case "*": + read(); + lexState = "multiLineCommentAsterisk"; + return; + case void 0: + throw invalidChar(read()); + } + read(); + }, + multiLineCommentAsterisk() { + switch (c) { + case "*": + read(); + return; + case "/": + read(); + lexState = "default"; + return; + case void 0: + throw invalidChar(read()); + } + read(); + lexState = "multiLineComment"; + }, + singleLineComment() { + switch (c) { + case "\n": + case "\r": + case "\u2028": + case "\u2029": + read(); + lexState = "default"; + return; + case void 0: + read(); + return newToken("eof"); + } + read(); + }, + value() { + switch (c) { + case "{": + case "[": + return newToken("punctuator", read()); + case "n": + read(); + literal("ull"); + return newToken("null", null); + case "t": + read(); + literal("rue"); + return newToken("boolean", true); + case "f": + read(); + literal("alse"); + return newToken("boolean", false); + case "-": + case "+": + if (read() === "-") { + sign = -1; + } + lexState = "sign"; + return; + case ".": + buffer = read(); + lexState = "decimalPointLeading"; + return; + case "0": + buffer = read(); + lexState = "zero"; + return; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + buffer = read(); + lexState = "decimalInteger"; + return; + case "I": + read(); + literal("nfinity"); + return newToken("numeric", Infinity); + case "N": + read(); + literal("aN"); + return newToken("numeric", NaN); + case '"': + case "'": + doubleQuote = read() === '"'; + buffer = ""; + lexState = "string"; + return; + } + throw invalidChar(read()); + }, + identifierNameStartEscape() { + if (c !== "u") { + throw invalidChar(read()); + } + read(); + const u = unicodeEscape(); + switch (u) { + case "$": + case "_": + break; + default: + if (!util.isIdStartChar(u)) { + throw invalidIdentifier(); + } + break; + } + buffer += u; + lexState = "identifierName"; + }, + identifierName() { + switch (c) { + case "$": + case "_": + case "\u200C": + case "\u200D": + buffer += read(); + return; + case "\\": + read(); + lexState = "identifierNameEscape"; + return; + } + if (util.isIdContinueChar(c)) { + buffer += read(); + return; + } + return newToken("identifier", buffer); + }, + identifierNameEscape() { + if (c !== "u") { + throw invalidChar(read()); + } + read(); + const u = unicodeEscape(); + switch (u) { + case "$": + case "_": + case "\u200C": + case "\u200D": + break; + default: + if (!util.isIdContinueChar(u)) { + throw invalidIdentifier(); + } + break; + } + buffer += u; + lexState = "identifierName"; + }, + sign() { + switch (c) { + case ".": + buffer = read(); + lexState = "decimalPointLeading"; + return; + case "0": + buffer = read(); + lexState = "zero"; + return; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + buffer = read(); + lexState = "decimalInteger"; + return; + case "I": + read(); + literal("nfinity"); + return newToken("numeric", sign * Infinity); + case "N": + read(); + literal("aN"); + return newToken("numeric", NaN); + } + throw invalidChar(read()); + }, + zero() { + switch (c) { + case ".": + buffer += read(); + lexState = "decimalPoint"; + return; + case "e": + case "E": + buffer += read(); + lexState = "decimalExponent"; + return; + case "x": + case "X": + buffer += read(); + lexState = "hexadecimal"; + return; + } + return newToken("numeric", sign * 0); + }, + decimalInteger() { + switch (c) { + case ".": + buffer += read(); + lexState = "decimalPoint"; + return; + case "e": + case "E": + buffer += read(); + lexState = "decimalExponent"; + return; + } + if (util.isDigit(c)) { + buffer += read(); + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + decimalPointLeading() { + if (util.isDigit(c)) { + buffer += read(); + lexState = "decimalFraction"; + return; + } + throw invalidChar(read()); + }, + decimalPoint() { + switch (c) { + case "e": + case "E": + buffer += read(); + lexState = "decimalExponent"; + return; + } + if (util.isDigit(c)) { + buffer += read(); + lexState = "decimalFraction"; + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + decimalFraction() { + switch (c) { + case "e": + case "E": + buffer += read(); + lexState = "decimalExponent"; + return; + } + if (util.isDigit(c)) { + buffer += read(); + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + decimalExponent() { + switch (c) { + case "+": + case "-": + buffer += read(); + lexState = "decimalExponentSign"; + return; + } + if (util.isDigit(c)) { + buffer += read(); + lexState = "decimalExponentInteger"; + return; + } + throw invalidChar(read()); + }, + decimalExponentSign() { + if (util.isDigit(c)) { + buffer += read(); + lexState = "decimalExponentInteger"; + return; + } + throw invalidChar(read()); + }, + decimalExponentInteger() { + if (util.isDigit(c)) { + buffer += read(); + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + hexadecimal() { + if (util.isHexDigit(c)) { + buffer += read(); + lexState = "hexadecimalInteger"; + return; + } + throw invalidChar(read()); + }, + hexadecimalInteger() { + if (util.isHexDigit(c)) { + buffer += read(); + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + string() { + switch (c) { + case "\\": + read(); + buffer += escape(); + return; + case '"': + if (doubleQuote) { + read(); + return newToken("string", buffer); + } + buffer += read(); + return; + case "'": + if (!doubleQuote) { + read(); + return newToken("string", buffer); + } + buffer += read(); + return; + case "\n": + case "\r": + throw invalidChar(read()); + case "\u2028": + case "\u2029": + separatorChar(c); + break; + case void 0: + throw invalidChar(read()); + } + buffer += read(); + }, + start() { + switch (c) { + case "{": + case "[": + return newToken("punctuator", read()); + } + lexState = "value"; + }, + beforePropertyName() { + switch (c) { + case "$": + case "_": + buffer = read(); + lexState = "identifierName"; + return; + case "\\": + read(); + lexState = "identifierNameStartEscape"; + return; + case "}": + return newToken("punctuator", read()); + case '"': + case "'": + doubleQuote = read() === '"'; + lexState = "string"; + return; + } + if (util.isIdStartChar(c)) { + buffer += read(); + lexState = "identifierName"; + return; + } + throw invalidChar(read()); + }, + afterPropertyName() { + if (c === ":") { + return newToken("punctuator", read()); + } + throw invalidChar(read()); + }, + beforePropertyValue() { + lexState = "value"; + }, + afterPropertyValue() { + switch (c) { + case ",": + case "}": + return newToken("punctuator", read()); + } + throw invalidChar(read()); + }, + beforeArrayValue() { + if (c === "]") { + return newToken("punctuator", read()); + } + lexState = "value"; + }, + afterArrayValue() { + switch (c) { + case ",": + case "]": + return newToken("punctuator", read()); + } + throw invalidChar(read()); + }, + end() { + throw invalidChar(read()); + } + }; + function newToken(type, value) { + return { + type, + value, + line, + column + }; + } + function literal(s) { + for (const c2 of s) { + const p = peek(); + if (p !== c2) { + throw invalidChar(read()); + } + read(); + } + } + function escape() { + const c2 = peek(); + switch (c2) { + case "b": + read(); + return "\b"; + case "f": + read(); + return "\f"; + case "n": + read(); + return "\n"; + case "r": + read(); + return "\r"; + case "t": + read(); + return " "; + case "v": + read(); + return "\v"; + case "0": + read(); + if (util.isDigit(peek())) { + throw invalidChar(read()); + } + return "\0"; + case "x": + read(); + return hexEscape(); + case "u": + read(); + return unicodeEscape(); + case "\n": + case "\u2028": + case "\u2029": + read(); + return ""; + case "\r": + read(); + if (peek() === "\n") { + read(); + } + return ""; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + throw invalidChar(read()); + case void 0: + throw invalidChar(read()); + } + return read(); + } + function hexEscape() { + let buffer2 = ""; + let c2 = peek(); + if (!util.isHexDigit(c2)) { + throw invalidChar(read()); + } + buffer2 += read(); + c2 = peek(); + if (!util.isHexDigit(c2)) { + throw invalidChar(read()); + } + buffer2 += read(); + return String.fromCodePoint(parseInt(buffer2, 16)); + } + function unicodeEscape() { + let buffer2 = ""; + let count = 4; + while (count-- > 0) { + const c2 = peek(); + if (!util.isHexDigit(c2)) { + throw invalidChar(read()); + } + buffer2 += read(); + } + return String.fromCodePoint(parseInt(buffer2, 16)); + } + var parseStates = { + start() { + if (token.type === "eof") { + throw invalidEOF(); + } + push(); + }, + beforePropertyName() { + switch (token.type) { + case "identifier": + case "string": + key = token.value; + parseState = "afterPropertyName"; + return; + case "punctuator": + pop(); + return; + case "eof": + throw invalidEOF(); + } + }, + afterPropertyName() { + if (token.type === "eof") { + throw invalidEOF(); + } + parseState = "beforePropertyValue"; + }, + beforePropertyValue() { + if (token.type === "eof") { + throw invalidEOF(); + } + push(); + }, + beforeArrayValue() { + if (token.type === "eof") { + throw invalidEOF(); + } + if (token.type === "punctuator" && token.value === "]") { + pop(); + return; + } + push(); + }, + afterPropertyValue() { + if (token.type === "eof") { + throw invalidEOF(); + } + switch (token.value) { + case ",": + parseState = "beforePropertyName"; + return; + case "}": + pop(); + } + }, + afterArrayValue() { + if (token.type === "eof") { + throw invalidEOF(); + } + switch (token.value) { + case ",": + parseState = "beforeArrayValue"; + return; + case "]": + pop(); + } + }, + end() { + } + }; + function push() { + let value; + switch (token.type) { + case "punctuator": + switch (token.value) { + case "{": + value = {}; + break; + case "[": + value = []; + break; + } + break; + case "null": + case "boolean": + case "numeric": + case "string": + value = token.value; + break; + } + if (root === void 0) { + root = value; + } else { + const parent = stack2[stack2.length - 1]; + if (Array.isArray(parent)) { + parent.push(value); + } else { + parent[key] = value; + } + } + if (value !== null && typeof value === "object") { + stack2.push(value); + if (Array.isArray(value)) { + parseState = "beforeArrayValue"; + } else { + parseState = "beforePropertyName"; + } + } else { + const current = stack2[stack2.length - 1]; + if (current == null) { + parseState = "end"; + } else if (Array.isArray(current)) { + parseState = "afterArrayValue"; + } else { + parseState = "afterPropertyValue"; + } + } + } + function pop() { + stack2.pop(); + const current = stack2[stack2.length - 1]; + if (current == null) { + parseState = "end"; + } else if (Array.isArray(current)) { + parseState = "afterArrayValue"; + } else { + parseState = "afterPropertyValue"; + } + } + function invalidChar(c2) { + if (c2 === void 0) { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`); + } + return syntaxError(`JSON5: invalid character '${formatChar(c2)}' at ${line}:${column}`); + } + function invalidEOF() { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`); + } + function invalidIdentifier() { + column -= 5; + return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`); + } + function separatorChar(c2) { + console.warn(`JSON5: '${formatChar(c2)}' in strings is not valid ECMAScript; consider escaping`); + } + function formatChar(c2) { + const replacements = { + "'": "\\'", + '"': '\\"', + "\\": "\\\\", + "\b": "\\b", + "\f": "\\f", + "\n": "\\n", + "\r": "\\r", + " ": "\\t", + "\v": "\\v", + "\0": "\\0", + "\u2028": "\\u2028", + "\u2029": "\\u2029" + }; + if (replacements[c2]) { + return replacements[c2]; + } + if (c2 < " ") { + const hexString = c2.charCodeAt(0).toString(16); + return "\\x" + ("00" + hexString).substring(hexString.length); + } + return c2; + } + function syntaxError(message2) { + const err = new SyntaxError(message2); + err.lineNumber = line; + err.columnNumber = column; + return err; + } + } +}); + +// ../../node_modules/.pnpm/json5@2.2.0/node_modules/json5/lib/stringify.js +var require_stringify2 = __commonJS({ + "../../node_modules/.pnpm/json5@2.2.0/node_modules/json5/lib/stringify.js"(exports2, module2) { + var util = require_util4(); + module2.exports = function stringify(value, replacer, space) { + const stack2 = []; + let indent = ""; + let propertyList; + let replacerFunc; + let gap = ""; + let quote; + if (replacer != null && typeof replacer === "object" && !Array.isArray(replacer)) { + space = replacer.space; + quote = replacer.quote; + replacer = replacer.replacer; + } + if (typeof replacer === "function") { + replacerFunc = replacer; + } else if (Array.isArray(replacer)) { + propertyList = []; + for (const v of replacer) { + let item; + if (typeof v === "string") { + item = v; + } else if (typeof v === "number" || v instanceof String || v instanceof Number) { + item = String(v); + } + if (item !== void 0 && propertyList.indexOf(item) < 0) { + propertyList.push(item); + } + } + } + if (space instanceof Number) { + space = Number(space); + } else if (space instanceof String) { + space = String(space); + } + if (typeof space === "number") { + if (space > 0) { + space = Math.min(10, Math.floor(space)); + gap = " ".substr(0, space); + } + } else if (typeof space === "string") { + gap = space.substr(0, 10); + } + return serializeProperty("", { "": value }); + function serializeProperty(key, holder) { + let value2 = holder[key]; + if (value2 != null) { + if (typeof value2.toJSON5 === "function") { + value2 = value2.toJSON5(key); + } else if (typeof value2.toJSON === "function") { + value2 = value2.toJSON(key); + } + } + if (replacerFunc) { + value2 = replacerFunc.call(holder, key, value2); + } + if (value2 instanceof Number) { + value2 = Number(value2); + } else if (value2 instanceof String) { + value2 = String(value2); + } else if (value2 instanceof Boolean) { + value2 = value2.valueOf(); + } + switch (value2) { + case null: + return "null"; + case true: + return "true"; + case false: + return "false"; + } + if (typeof value2 === "string") { + return quoteString(value2, false); + } + if (typeof value2 === "number") { + return String(value2); + } + if (typeof value2 === "object") { + return Array.isArray(value2) ? serializeArray(value2) : serializeObject(value2); + } + return void 0; + } + function quoteString(value2) { + const quotes = { + "'": 0.1, + '"': 0.2 + }; + const replacements = { + "'": "\\'", + '"': '\\"', + "\\": "\\\\", + "\b": "\\b", + "\f": "\\f", + "\n": "\\n", + "\r": "\\r", + " ": "\\t", + "\v": "\\v", + "\0": "\\0", + "\u2028": "\\u2028", + "\u2029": "\\u2029" + }; + let product = ""; + for (let i = 0; i < value2.length; i++) { + const c = value2[i]; + switch (c) { + case "'": + case '"': + quotes[c]++; + product += c; + continue; + case "\0": + if (util.isDigit(value2[i + 1])) { + product += "\\x00"; + continue; + } + } + if (replacements[c]) { + product += replacements[c]; + continue; + } + if (c < " ") { + let hexString = c.charCodeAt(0).toString(16); + product += "\\x" + ("00" + hexString).substring(hexString.length); + continue; + } + product += c; + } + const quoteChar = quote || Object.keys(quotes).reduce((a, b) => quotes[a] < quotes[b] ? a : b); + product = product.replace(new RegExp(quoteChar, "g"), replacements[quoteChar]); + return quoteChar + product + quoteChar; + } + function serializeObject(value2) { + if (stack2.indexOf(value2) >= 0) { + throw TypeError("Converting circular structure to JSON5"); + } + stack2.push(value2); + let stepback = indent; + indent = indent + gap; + let keys = propertyList || Object.keys(value2); + let partial = []; + for (const key of keys) { + const propertyString = serializeProperty(key, value2); + if (propertyString !== void 0) { + let member = serializeKey(key) + ":"; + if (gap !== "") { + member += " "; + } + member += propertyString; + partial.push(member); + } + } + let final; + if (partial.length === 0) { + final = "{}"; + } else { + let properties; + if (gap === "") { + properties = partial.join(","); + final = "{" + properties + "}"; + } else { + let separator = ",\n" + indent; + properties = partial.join(separator); + final = "{\n" + indent + properties + ",\n" + stepback + "}"; + } + } + stack2.pop(); + indent = stepback; + return final; + } + function serializeKey(key) { + if (key.length === 0) { + return quoteString(key, true); + } + const firstChar = String.fromCodePoint(key.codePointAt(0)); + if (!util.isIdStartChar(firstChar)) { + return quoteString(key, true); + } + for (let i = firstChar.length; i < key.length; i++) { + if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) { + return quoteString(key, true); + } + } + return key; + } + function serializeArray(value2) { + if (stack2.indexOf(value2) >= 0) { + throw TypeError("Converting circular structure to JSON5"); + } + stack2.push(value2); + let stepback = indent; + indent = indent + gap; + let partial = []; + for (let i = 0; i < value2.length; i++) { + const propertyString = serializeProperty(String(i), value2); + partial.push(propertyString !== void 0 ? propertyString : "null"); + } + let final; + if (partial.length === 0) { + final = "[]"; + } else { + if (gap === "") { + let properties = partial.join(","); + final = "[" + properties + "]"; + } else { + let separator = ",\n" + indent; + let properties = partial.join(separator); + final = "[\n" + indent + properties + ",\n" + stepback + "]"; + } + } + stack2.pop(); + indent = stepback; + return final; + } + }; + } +}); + +// ../../node_modules/.pnpm/json5@2.2.0/node_modules/json5/lib/index.js +var require_lib16 = __commonJS({ + "../../node_modules/.pnpm/json5@2.2.0/node_modules/json5/lib/index.js"(exports2, module2) { + var parse = require_parse2(); + var stringify = require_stringify2(); + var JSON5 = { + parse, + stringify + }; + module2.exports = JSON5; + } +}); + +// ../../node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.js +var require_imurmurhash = __commonJS({ + "../../node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.js"(exports2, module2) { + (function() { + var cache; + function MurmurHash3(key, seed) { + var m = this instanceof MurmurHash3 ? this : cache; + m.reset(seed); + if (typeof key === "string" && key.length > 0) { + m.hash(key); + } + if (m !== this) { + return m; + } + } + ; + MurmurHash3.prototype.hash = function(key) { + var h1, k1, i, top, len; + len = key.length; + this.len += len; + k1 = this.k1; + i = 0; + switch (this.rem) { + case 0: + k1 ^= len > i ? key.charCodeAt(i++) & 65535 : 0; + case 1: + k1 ^= len > i ? (key.charCodeAt(i++) & 65535) << 8 : 0; + case 2: + k1 ^= len > i ? (key.charCodeAt(i++) & 65535) << 16 : 0; + case 3: + k1 ^= len > i ? (key.charCodeAt(i) & 255) << 24 : 0; + k1 ^= len > i ? (key.charCodeAt(i++) & 65280) >> 8 : 0; + } + this.rem = len + this.rem & 3; + len -= this.rem; + if (len > 0) { + h1 = this.h1; + while (1) { + k1 = k1 * 11601 + (k1 & 65535) * 3432906752 & 4294967295; + k1 = k1 << 15 | k1 >>> 17; + k1 = k1 * 13715 + (k1 & 65535) * 461832192 & 4294967295; + h1 ^= k1; + h1 = h1 << 13 | h1 >>> 19; + h1 = h1 * 5 + 3864292196 & 4294967295; + if (i >= len) { + break; + } + k1 = key.charCodeAt(i++) & 65535 ^ (key.charCodeAt(i++) & 65535) << 8 ^ (key.charCodeAt(i++) & 65535) << 16; + top = key.charCodeAt(i++); + k1 ^= (top & 255) << 24 ^ (top & 65280) >> 8; + } + k1 = 0; + switch (this.rem) { + case 3: + k1 ^= (key.charCodeAt(i + 2) & 65535) << 16; + case 2: + k1 ^= (key.charCodeAt(i + 1) & 65535) << 8; + case 1: + k1 ^= key.charCodeAt(i) & 65535; + } + this.h1 = h1; + } + this.k1 = k1; + return this; + }; + MurmurHash3.prototype.result = function() { + var k1, h1; + k1 = this.k1; + h1 = this.h1; + if (k1 > 0) { + k1 = k1 * 11601 + (k1 & 65535) * 3432906752 & 4294967295; + k1 = k1 << 15 | k1 >>> 17; + k1 = k1 * 13715 + (k1 & 65535) * 461832192 & 4294967295; + h1 ^= k1; + } + h1 ^= this.len; + h1 ^= h1 >>> 16; + h1 = h1 * 51819 + (h1 & 65535) * 2246770688 & 4294967295; + h1 ^= h1 >>> 13; + h1 = h1 * 44597 + (h1 & 65535) * 3266445312 & 4294967295; + h1 ^= h1 >>> 16; + return h1 >>> 0; + }; + MurmurHash3.prototype.reset = function(seed) { + this.h1 = typeof seed === "number" ? seed : 0; + this.rem = this.k1 = this.len = 0; + return this; + }; + cache = new MurmurHash3(); + if (typeof module2 != "undefined") { + module2.exports = MurmurHash3; + } else { + this.MurmurHash3 = MurmurHash3; + } + })(); + } +}); + +// ../../node_modules/.pnpm/is-typedarray@1.0.0/node_modules/is-typedarray/index.js +var require_is_typedarray = __commonJS({ + "../../node_modules/.pnpm/is-typedarray@1.0.0/node_modules/is-typedarray/index.js"(exports2, module2) { + module2.exports = isTypedArray; + isTypedArray.strict = isStrictTypedArray; + isTypedArray.loose = isLooseTypedArray; + var toString = Object.prototype.toString; + var names = { + "[object Int8Array]": true, + "[object Int16Array]": true, + "[object Int32Array]": true, + "[object Uint8Array]": true, + "[object Uint8ClampedArray]": true, + "[object Uint16Array]": true, + "[object Uint32Array]": true, + "[object Float32Array]": true, + "[object Float64Array]": true + }; + function isTypedArray(arr) { + return isStrictTypedArray(arr) || isLooseTypedArray(arr); + } + function isStrictTypedArray(arr) { + return arr instanceof Int8Array || arr instanceof Int16Array || arr instanceof Int32Array || arr instanceof Uint8Array || arr instanceof Uint8ClampedArray || arr instanceof Uint16Array || arr instanceof Uint32Array || arr instanceof Float32Array || arr instanceof Float64Array; + } + function isLooseTypedArray(arr) { + return names[toString.call(arr)]; + } + } +}); + +// ../../node_modules/.pnpm/typedarray-to-buffer@3.1.5/node_modules/typedarray-to-buffer/index.js +var require_typedarray_to_buffer = __commonJS({ + "../../node_modules/.pnpm/typedarray-to-buffer@3.1.5/node_modules/typedarray-to-buffer/index.js"(exports2, module2) { + var isTypedArray = require_is_typedarray().strict; + module2.exports = function typedarrayToBuffer(arr) { + if (isTypedArray(arr)) { + var buf = Buffer.from(arr.buffer); + if (arr.byteLength !== arr.buffer.byteLength) { + buf = buf.slice(arr.byteOffset, arr.byteOffset + arr.byteLength); + } + return buf; + } else { + return Buffer.from(arr); + } + }; + } +}); + +// ../../node_modules/.pnpm/write-file-atomic@3.0.3/node_modules/write-file-atomic/index.js +var require_write_file_atomic = __commonJS({ + "../../node_modules/.pnpm/write-file-atomic@3.0.3/node_modules/write-file-atomic/index.js"(exports2, module2) { + "use strict"; + module2.exports = writeFile; + module2.exports.sync = writeFileSync; + module2.exports._getTmpname = getTmpname; + module2.exports._cleanupOnExit = cleanupOnExit; + var fs = require("fs"); + var MurmurHash3 = require_imurmurhash(); + var onExit = require_signal_exit(); + var path = require("path"); + var isTypedArray = require_is_typedarray(); + var typedArrayToBuffer = require_typedarray_to_buffer(); + var { promisify } = require("util"); + var activeFiles = {}; + var threadId = function getId() { + try { + const workerThreads = require("worker_threads"); + return workerThreads.threadId; + } catch (e) { + return 0; + } + }(); + var invocations = 0; + function getTmpname(filename) { + return filename + "." + MurmurHash3(__filename).hash(String(process.pid)).hash(String(threadId)).hash(String(++invocations)).result(); + } + function cleanupOnExit(tmpfile) { + return () => { + try { + fs.unlinkSync(typeof tmpfile === "function" ? tmpfile() : tmpfile); + } catch (_) { + } + }; + } + function serializeActiveFile(absoluteName) { + return new Promise((resolve) => { + if (!activeFiles[absoluteName]) + activeFiles[absoluteName] = []; + activeFiles[absoluteName].push(resolve); + if (activeFiles[absoluteName].length === 1) + resolve(); + }); + } + function isChownErrOk(err) { + if (err.code === "ENOSYS") { + return true; + } + const nonroot = !process.getuid || process.getuid() !== 0; + if (nonroot) { + if (err.code === "EINVAL" || err.code === "EPERM") { + return true; + } + } + return false; + } + async function writeFileAsync(filename, data, options = {}) { + if (typeof options === "string") { + options = { encoding: options }; + } + let fd; + let tmpfile; + const removeOnExitHandler = onExit(cleanupOnExit(() => tmpfile)); + const absoluteName = path.resolve(filename); + try { + await serializeActiveFile(absoluteName); + const truename = await promisify(fs.realpath)(filename).catch(() => filename); + tmpfile = getTmpname(truename); + if (!options.mode || !options.chown) { + const stats = await promisify(fs.stat)(truename).catch(() => { + }); + if (stats) { + if (options.mode == null) { + options.mode = stats.mode; + } + if (options.chown == null && process.getuid) { + options.chown = { uid: stats.uid, gid: stats.gid }; + } + } + } + fd = await promisify(fs.open)(tmpfile, "w", options.mode); + if (options.tmpfileCreated) { + await options.tmpfileCreated(tmpfile); + } + if (isTypedArray(data)) { + data = typedArrayToBuffer(data); + } + if (Buffer.isBuffer(data)) { + await promisify(fs.write)(fd, data, 0, data.length, 0); + } else if (data != null) { + await promisify(fs.write)(fd, String(data), 0, String(options.encoding || "utf8")); + } + if (options.fsync !== false) { + await promisify(fs.fsync)(fd); + } + await promisify(fs.close)(fd); + fd = null; + if (options.chown) { + await promisify(fs.chown)(tmpfile, options.chown.uid, options.chown.gid).catch((err) => { + if (!isChownErrOk(err)) { + throw err; + } + }); + } + if (options.mode) { + await promisify(fs.chmod)(tmpfile, options.mode).catch((err) => { + if (!isChownErrOk(err)) { + throw err; + } + }); + } + await promisify(fs.rename)(tmpfile, truename); + } finally { + if (fd) { + await promisify(fs.close)(fd).catch(() => { + }); + } + removeOnExitHandler(); + await promisify(fs.unlink)(tmpfile).catch(() => { + }); + activeFiles[absoluteName].shift(); + if (activeFiles[absoluteName].length > 0) { + activeFiles[absoluteName][0](); + } else + delete activeFiles[absoluteName]; + } + } + function writeFile(filename, data, options, callback) { + if (options instanceof Function) { + callback = options; + options = {}; + } + const promise = writeFileAsync(filename, data, options); + if (callback) { + promise.then(callback, callback); + } + return promise; + } + function writeFileSync(filename, data, options) { + if (typeof options === "string") + options = { encoding: options }; + else if (!options) + options = {}; + try { + filename = fs.realpathSync(filename); + } catch (ex) { + } + const tmpfile = getTmpname(filename); + if (!options.mode || !options.chown) { + try { + const stats = fs.statSync(filename); + options = Object.assign({}, options); + if (!options.mode) { + options.mode = stats.mode; + } + if (!options.chown && process.getuid) { + options.chown = { uid: stats.uid, gid: stats.gid }; + } + } catch (ex) { + } + } + let fd; + const cleanup = cleanupOnExit(tmpfile); + const removeOnExitHandler = onExit(cleanup); + let threw = true; + try { + fd = fs.openSync(tmpfile, "w", options.mode || 438); + if (options.tmpfileCreated) { + options.tmpfileCreated(tmpfile); + } + if (isTypedArray(data)) { + data = typedArrayToBuffer(data); + } + if (Buffer.isBuffer(data)) { + fs.writeSync(fd, data, 0, data.length, 0); + } else if (data != null) { + fs.writeSync(fd, String(data), 0, String(options.encoding || "utf8")); + } + if (options.fsync !== false) { + fs.fsyncSync(fd); + } + fs.closeSync(fd); + fd = null; + if (options.chown) { + try { + fs.chownSync(tmpfile, options.chown.uid, options.chown.gid); + } catch (err) { + if (!isChownErrOk(err)) { + throw err; + } + } + } + if (options.mode) { + try { + fs.chmodSync(tmpfile, options.mode); + } catch (err) { + if (!isChownErrOk(err)) { + throw err; + } + } + } + fs.renameSync(tmpfile, filename); + threw = false; + } finally { + if (fd) { + try { + fs.closeSync(fd); + } catch (ex) { + } + } + removeOnExitHandler(); + if (threw) { + cleanup(); + } + } + } + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/common.js +var require_common2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/common.js"(exports2, module2) { + "use strict"; + function isNothing(subject) { + return typeof subject === "undefined" || subject === null; + } + function isObject(subject) { + return typeof subject === "object" && subject !== null; + } + function toArray(sequence) { + if (Array.isArray(sequence)) + return sequence; + else if (isNothing(sequence)) + return []; + return [sequence]; + } + function extend(target, source) { + var index, length, key, sourceKeys; + if (source) { + sourceKeys = Object.keys(source); + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + return target; + } + function repeat(string, count) { + var result = "", cycle; + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + return result; + } + function isNegativeZero(number) { + return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; + } + module2.exports.isNothing = isNothing; + module2.exports.isObject = isObject; + module2.exports.toArray = toArray; + module2.exports.repeat = repeat; + module2.exports.isNegativeZero = isNegativeZero; + module2.exports.extend = extend; + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/exception.js +var require_exception = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/exception.js"(exports2, module2) { + "use strict"; + function formatError(exception, compact) { + var where = "", message2 = exception.reason || "(unknown reason)"; + if (!exception.mark) + return message2; + if (exception.mark.name) { + where += 'in "' + exception.mark.name + '" '; + } + where += "(" + (exception.mark.line + 1) + ":" + (exception.mark.column + 1) + ")"; + if (!compact && exception.mark.snippet) { + where += "\n\n" + exception.mark.snippet; + } + return message2 + " " + where; + } + function YAMLException(reason, mark) { + Error.call(this); + this.name = "YAMLException"; + this.reason = reason; + this.mark = mark; + this.message = formatError(this, false); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + this.stack = new Error().stack || ""; + } + } + YAMLException.prototype = Object.create(Error.prototype); + YAMLException.prototype.constructor = YAMLException; + YAMLException.prototype.toString = function toString(compact) { + return this.name + ": " + formatError(this, compact); + }; + module2.exports = YAMLException; + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/snippet.js +var require_snippet2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/snippet.js"(exports2, module2) { + "use strict"; + var common = require_common2(); + function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { + var head = ""; + var tail = ""; + var maxHalfLength = Math.floor(maxLineLength / 2) - 1; + if (position - lineStart > maxHalfLength) { + head = " ... "; + lineStart = position - maxHalfLength + head.length; + } + if (lineEnd - position > maxHalfLength) { + tail = " ..."; + lineEnd = position + maxHalfLength - tail.length; + } + return { + str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail, + pos: position - lineStart + head.length + }; + } + function padStart(string, max) { + return common.repeat(" ", max - string.length) + string; + } + function makeSnippet(mark, options) { + options = Object.create(options || null); + if (!mark.buffer) + return null; + if (!options.maxLength) + options.maxLength = 79; + if (typeof options.indent !== "number") + options.indent = 1; + if (typeof options.linesBefore !== "number") + options.linesBefore = 3; + if (typeof options.linesAfter !== "number") + options.linesAfter = 2; + var re = /\r?\n|\r|\0/g; + var lineStarts = [0]; + var lineEnds = []; + var match; + var foundLineNo = -1; + while (match = re.exec(mark.buffer)) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + if (mark.position <= match.index && foundLineNo < 0) { + foundLineNo = lineStarts.length - 2; + } + } + if (foundLineNo < 0) + foundLineNo = lineStarts.length - 1; + var result = "", i, line; + var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; + var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); + for (i = 1; i <= options.linesBefore; i++) { + if (foundLineNo - i < 0) + break; + line = getLine(mark.buffer, lineStarts[foundLineNo - i], lineEnds[foundLineNo - i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), maxLineLength); + result = common.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line.str + "\n" + result; + } + line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + "\n"; + result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n"; + for (i = 1; i <= options.linesAfter; i++) { + if (foundLineNo + i >= lineEnds.length) + break; + line = getLine(mark.buffer, lineStarts[foundLineNo + i], lineEnds[foundLineNo + i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), maxLineLength); + result += common.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line.str + "\n"; + } + return result.replace(/\n$/, ""); + } + module2.exports = makeSnippet; + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type.js +var require_type2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type.js"(exports2, module2) { + "use strict"; + var YAMLException = require_exception(); + var TYPE_CONSTRUCTOR_OPTIONS = [ + "kind", + "multi", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "representName", + "defaultStyle", + "styleAliases" + ]; + var YAML_NODE_KINDS = [ + "scalar", + "sequence", + "mapping" + ]; + function compileStyleAliases(map) { + var result = {}; + if (map !== null) { + Object.keys(map).forEach(function(style) { + map[style].forEach(function(alias) { + result[String(alias)] = style; + }); + }); + } + return result; + } + function Type(tag, options) { + options = options || {}; + Object.keys(options).forEach(function(name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + this.tag = tag; + this.kind = options["kind"] || null; + this.resolve = options["resolve"] || function() { + return true; + }; + this.construct = options["construct"] || function(data) { + return data; + }; + this.instanceOf = options["instanceOf"] || null; + this.predicate = options["predicate"] || null; + this.represent = options["represent"] || null; + this.representName = options["representName"] || null; + this.defaultStyle = options["defaultStyle"] || null; + this.multi = options["multi"] || false; + this.styleAliases = compileStyleAliases(options["styleAliases"] || null); + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } + } + module2.exports = Type; + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/schema.js +var require_schema = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/schema.js"(exports2, module2) { + "use strict"; + var YAMLException = require_exception(); + var Type = require_type2(); + function compileList(schema, name, result) { + var exclude = []; + schema[name].forEach(function(currentType) { + result.forEach(function(previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) { + exclude.push(previousIndex); + } + }); + result.push(currentType); + }); + return result.filter(function(type, index) { + return exclude.indexOf(index) === -1; + }); + } + function compileMap() { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }, index, length; + function collectType(type) { + if (type.multi) { + result.multi[type.kind].push(type); + result.multi["fallback"].push(type); + } else { + result[type.kind][type.tag] = result["fallback"][type.tag] = type; + } + } + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; + } + function Schema(definition) { + return this.extend(definition); + } + Schema.prototype.extend = function extend(definition) { + var implicit = []; + var explicit = []; + if (definition instanceof Type) { + explicit.push(definition); + } else if (Array.isArray(definition)) { + explicit = explicit.concat(definition); + } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { + if (definition.implicit) + implicit = implicit.concat(definition.implicit); + if (definition.explicit) + explicit = explicit.concat(definition.explicit); + } else { + throw new YAMLException("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); + } + implicit.forEach(function(type) { + if (!(type instanceof Type)) { + throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + if (type.loadKind && type.loadKind !== "scalar") { + throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); + } + if (type.multi) { + throw new YAMLException("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); + } + }); + explicit.forEach(function(type) { + if (!(type instanceof Type)) { + throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + }); + var result = Object.create(Schema.prototype); + result.implicit = (this.implicit || []).concat(implicit); + result.explicit = (this.explicit || []).concat(explicit); + result.compiledImplicit = compileList(result, "implicit", []); + result.compiledExplicit = compileList(result, "explicit", []); + result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); + return result; + }; + module2.exports = Schema; + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/str.js +var require_str = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/str.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + module2.exports = new Type("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(data) { + return data !== null ? data : ""; + } + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/seq.js +var require_seq = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/seq.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + module2.exports = new Type("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(data) { + return data !== null ? data : []; + } + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/map.js +var require_map2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/map.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + module2.exports = new Type("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(data) { + return data !== null ? data : {}; + } + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/schema/failsafe.js +var require_failsafe = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/schema/failsafe.js"(exports2, module2) { + "use strict"; + var Schema = require_schema(); + module2.exports = new Schema({ + explicit: [ + require_str(), + require_seq(), + require_map2() + ] + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/null.js +var require_null = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/null.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + function resolveYamlNull(data) { + if (data === null) + return true; + var max = data.length; + return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); + } + function constructYamlNull() { + return null; + } + function isNull(object) { + return object === null; + } + module2.exports = new Type("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function() { + return "~"; + }, + lowercase: function() { + return "null"; + }, + uppercase: function() { + return "NULL"; + }, + camelcase: function() { + return "Null"; + }, + empty: function() { + return ""; + } + }, + defaultStyle: "lowercase" + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/bool.js +var require_bool = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/bool.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + function resolveYamlBoolean(data) { + if (data === null) + return false; + var max = data.length; + return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE"); + } + function constructYamlBoolean(data) { + return data === "true" || data === "True" || data === "TRUE"; + } + function isBoolean(object) { + return Object.prototype.toString.call(object) === "[object Boolean]"; + } + module2.exports = new Type("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function(object) { + return object ? "true" : "false"; + }, + uppercase: function(object) { + return object ? "TRUE" : "FALSE"; + }, + camelcase: function(object) { + return object ? "True" : "False"; + } + }, + defaultStyle: "lowercase" + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/int.js +var require_int = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/int.js"(exports2, module2) { + "use strict"; + var common = require_common2(); + var Type = require_type2(); + function isHexCode(c) { + return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102; + } + function isOctCode(c) { + return 48 <= c && c <= 55; + } + function isDecCode(c) { + return 48 <= c && c <= 57; + } + function resolveYamlInteger(data) { + if (data === null) + return false; + var max = data.length, index = 0, hasDigits = false, ch; + if (!max) + return false; + ch = data[index]; + if (ch === "-" || ch === "+") { + ch = data[++index]; + } + if (ch === "0") { + if (index + 1 === max) + return true; + ch = data[++index]; + if (ch === "b") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (ch !== "0" && ch !== "1") + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "x") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (!isHexCode(data.charCodeAt(index))) + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "o") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (!isOctCode(data.charCodeAt(index))) + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + } + if (ch === "_") + return false; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + if (!hasDigits || ch === "_") + return false; + return true; + } + function constructYamlInteger(data) { + var value = data, sign = 1, ch; + if (value.indexOf("_") !== -1) { + value = value.replace(/_/g, ""); + } + ch = value[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") + sign = -1; + value = value.slice(1); + ch = value[0]; + } + if (value === "0") + return 0; + if (ch === "0") { + if (value[1] === "b") + return sign * parseInt(value.slice(2), 2); + if (value[1] === "x") + return sign * parseInt(value.slice(2), 16); + if (value[1] === "o") + return sign * parseInt(value.slice(2), 8); + } + return sign * parseInt(value, 10); + } + function isInteger(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object)); + } + module2.exports = new Type("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function(obj) { + return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); + }, + octal: function(obj) { + return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1); + }, + decimal: function(obj) { + return obj.toString(10); + }, + hexadecimal: function(obj) { + return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); + } + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] + } + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/float.js +var require_float = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/float.js"(exports2, module2) { + "use strict"; + var common = require_common2(); + var Type = require_type2(); + var YAML_FLOAT_PATTERN = new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); + function resolveYamlFloat(data) { + if (data === null) + return false; + if (!YAML_FLOAT_PATTERN.test(data) || data[data.length - 1] === "_") { + return false; + } + return true; + } + function constructYamlFloat(data) { + var value, sign; + value = data.replace(/_/g, "").toLowerCase(); + sign = value[0] === "-" ? -1 : 1; + if ("+-".indexOf(value[0]) >= 0) { + value = value.slice(1); + } + if (value === ".inf") { + return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + } else if (value === ".nan") { + return NaN; + } + return sign * parseFloat(value, 10); + } + var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + function representYamlFloat(object, style) { + var res; + if (isNaN(object)) { + switch (style) { + case "lowercase": + return ".nan"; + case "uppercase": + return ".NAN"; + case "camelcase": + return ".NaN"; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return ".inf"; + case "uppercase": + return ".INF"; + case "camelcase": + return ".Inf"; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return "-.inf"; + case "uppercase": + return "-.INF"; + case "camelcase": + return "-.Inf"; + } + } else if (common.isNegativeZero(object)) { + return "-0.0"; + } + res = object.toString(10); + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; + } + function isFloat(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); + } + module2.exports = new Type("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: "lowercase" + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/schema/json.js +var require_json = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/schema/json.js"(exports2, module2) { + "use strict"; + module2.exports = require_failsafe().extend({ + implicit: [ + require_null(), + require_bool(), + require_int(), + require_float() + ] + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/schema/core.js +var require_core2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/schema/core.js"(exports2, module2) { + "use strict"; + module2.exports = require_json(); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/timestamp.js +var require_timestamp2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/timestamp.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + var YAML_DATE_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"); + var YAML_TIMESTAMP_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"); + function resolveYamlTimestamp(data) { + if (data === null) + return false; + if (YAML_DATE_REGEXP.exec(data) !== null) + return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) + return true; + return false; + } + function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; + match = YAML_DATE_REGEXP.exec(data); + if (match === null) + match = YAML_TIMESTAMP_REGEXP.exec(data); + if (match === null) + throw new Error("Date resolve error"); + year = +match[1]; + month = +match[2] - 1; + day = +match[3]; + if (!match[4]) { + return new Date(Date.UTC(year, month, day)); + } + hour = +match[4]; + minute = +match[5]; + second = +match[6]; + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { + fraction += "0"; + } + fraction = +fraction; + } + if (match[9]) { + tz_hour = +match[10]; + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 6e4; + if (match[9] === "-") + delta = -delta; + } + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + if (delta) + date.setTime(date.getTime() - delta); + return date; + } + function representYamlTimestamp(object) { + return object.toISOString(); + } + module2.exports = new Type("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/merge.js +var require_merge4 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/merge.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + function resolveYamlMerge(data) { + return data === "<<" || data === null; + } + module2.exports = new Type("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/binary.js +var require_binary = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/binary.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; + function resolveYamlBinary(data) { + if (data === null) + return false; + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + if (code > 64) + continue; + if (code < 0) + return false; + bitlen += 6; + } + return bitlen % 8 === 0; + } + function constructYamlBinary(data) { + var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map = BASE64_MAP, bits = 0, result = []; + for (idx = 0; idx < max; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } + bits = bits << 6 | map.indexOf(input.charAt(idx)); + } + tailbits = max % 4 * 6; + if (tailbits === 0) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } else if (tailbits === 18) { + result.push(bits >> 10 & 255); + result.push(bits >> 2 & 255); + } else if (tailbits === 12) { + result.push(bits >> 4 & 255); + } + return new Uint8Array(result); + } + function representYamlBinary(object) { + var result = "", bits = 0, idx, tail, max = object.length, map = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } + bits = (bits << 8) + object[idx]; + } + tail = max % 3; + if (tail === 0) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } else if (tail === 2) { + result += map[bits >> 10 & 63]; + result += map[bits >> 4 & 63]; + result += map[bits << 2 & 63]; + result += map[64]; + } else if (tail === 1) { + result += map[bits >> 2 & 63]; + result += map[bits << 4 & 63]; + result += map[64]; + result += map[64]; + } + return result; + } + function isBinary(obj) { + return Object.prototype.toString.call(obj) === "[object Uint8Array]"; + } + module2.exports = new Type("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/omap.js +var require_omap = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/omap.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var _toString = Object.prototype.toString; + function resolveYamlOmap(data) { + if (data === null) + return true; + var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data; + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + if (_toString.call(pair) !== "[object Object]") + return false; + for (pairKey in pair) { + if (_hasOwnProperty.call(pair, pairKey)) { + if (!pairHasKey) + pairHasKey = true; + else + return false; + } + } + if (!pairHasKey) + return false; + if (objectKeys.indexOf(pairKey) === -1) + objectKeys.push(pairKey); + else + return false; + } + return true; + } + function constructYamlOmap(data) { + return data !== null ? data : []; + } + module2.exports = new Type("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap, + construct: constructYamlOmap + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/pairs.js +var require_pairs2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/pairs.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + var _toString = Object.prototype.toString; + function resolveYamlPairs(data) { + if (data === null) + return true; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + if (_toString.call(pair) !== "[object Object]") + return false; + keys = Object.keys(pair); + if (keys.length !== 1) + return false; + result[index] = [keys[0], pair[keys[0]]]; + } + return true; + } + function constructYamlPairs(data) { + if (data === null) + return []; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + keys = Object.keys(pair); + result[index] = [keys[0], pair[keys[0]]]; + } + return result; + } + module2.exports = new Type("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs, + construct: constructYamlPairs + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/set.js +var require_set = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/type/set.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + function resolveYamlSet(data) { + if (data === null) + return true; + var key, object = data; + for (key in object) { + if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) + return false; + } + } + return true; + } + function constructYamlSet(data) { + return data !== null ? data : {}; + } + module2.exports = new Type("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet, + construct: constructYamlSet + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/schema/default.js +var require_default = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/schema/default.js"(exports2, module2) { + "use strict"; + module2.exports = require_core2().extend({ + implicit: [ + require_timestamp2(), + require_merge4() + ], + explicit: [ + require_binary(), + require_omap(), + require_pairs2(), + require_set() + ] + }); + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/loader.js +var require_loader = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/loader.js"(exports2, module2) { + "use strict"; + var common = require_common2(); + var YAMLException = require_exception(); + var makeSnippet = require_snippet2(); + var DEFAULT_SCHEMA = require_default(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CONTEXT_FLOW_IN = 1; + var CONTEXT_FLOW_OUT = 2; + var CONTEXT_BLOCK_IN = 3; + var CONTEXT_BLOCK_OUT = 4; + var CHOMPING_CLIP = 1; + var CHOMPING_STRIP = 2; + var CHOMPING_KEEP = 3; + var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; + var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; + var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; + var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + function _class(obj) { + return Object.prototype.toString.call(obj); + } + function is_EOL(c) { + return c === 10 || c === 13; + } + function is_WHITE_SPACE(c) { + return c === 9 || c === 32; + } + function is_WS_OR_EOL(c) { + return c === 9 || c === 32 || c === 10 || c === 13; + } + function is_FLOW_INDICATOR(c) { + return c === 44 || c === 91 || c === 93 || c === 123 || c === 125; + } + function fromHexCode(c) { + var lc; + if (48 <= c && c <= 57) { + return c - 48; + } + lc = c | 32; + if (97 <= lc && lc <= 102) { + return lc - 97 + 10; + } + return -1; + } + function escapedHexLen(c) { + if (c === 120) { + return 2; + } + if (c === 117) { + return 4; + } + if (c === 85) { + return 8; + } + return 0; + } + function fromDecimalCode(c) { + if (48 <= c && c <= 57) { + return c - 48; + } + return -1; + } + function simpleEscapeSequence(c) { + return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\x85" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : ""; + } + function charFromCodepoint(c) { + if (c <= 65535) { + return String.fromCharCode(c); + } + return String.fromCharCode((c - 65536 >> 10) + 55296, (c - 65536 & 1023) + 56320); + } + var simpleEscapeCheck = new Array(256); + var simpleEscapeMap = new Array(256); + for (i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); + } + var i; + function State(input, options) { + this.input = input; + this.filename = options["filename"] || null; + this.schema = options["schema"] || DEFAULT_SCHEMA; + this.onWarning = options["onWarning"] || null; + this.legacy = options["legacy"] || false; + this.json = options["json"] || false; + this.listener = options["listener"] || null; + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + this.firstTabInLine = -1; + this.documents = []; + } + function generateError(state, message2) { + var mark = { + name: state.filename, + buffer: state.input.slice(0, -1), + position: state.position, + line: state.line, + column: state.position - state.lineStart + }; + mark.snippet = makeSnippet(mark); + return new YAMLException(message2, mark); + } + function throwError(state, message2) { + throw generateError(state, message2); + } + function throwWarning(state, message2) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message2)); + } + } + var directiveHandlers = { + YAML: function handleYamlDirective(state, name, args2) { + var match, major, minor; + if (state.version !== null) { + throwError(state, "duplication of %YAML directive"); + } + if (args2.length !== 1) { + throwError(state, "YAML directive accepts exactly one argument"); + } + match = /^([0-9]+)\.([0-9]+)$/.exec(args2[0]); + if (match === null) { + throwError(state, "ill-formed argument of the YAML directive"); + } + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + if (major !== 1) { + throwError(state, "unacceptable YAML version of the document"); + } + state.version = args2[0]; + state.checkLineBreaks = minor < 2; + if (minor !== 1 && minor !== 2) { + throwWarning(state, "unsupported YAML version of the document"); + } + }, + TAG: function handleTagDirective(state, name, args2) { + var handle, prefix; + if (args2.length !== 2) { + throwError(state, "TAG directive accepts exactly two arguments"); + } + handle = args2[0]; + prefix = args2[1]; + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, "ill-formed tag handle (first argument) of the TAG directive"); + } + if (_hasOwnProperty.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, "ill-formed tag prefix (second argument) of the TAG directive"); + } + try { + prefix = decodeURIComponent(prefix); + } catch (err) { + throwError(state, "tag prefix is malformed: " + prefix); + } + state.tagMap[handle] = prefix; + } + }; + function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + if (start < end) { + _result = state.input.slice(start, end); + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 9 || 32 <= _character && _character <= 1114111)) { + throwError(state, "expected valid JSON character"); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, "the stream contains non-printable characters"); + } + state.result += _result; + } + } + function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + if (!common.isObject(source)) { + throwError(state, "cannot merge mappings; the provided source object is unacceptable"); + } + sourceKeys = Object.keys(source); + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + if (!_hasOwnProperty.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } + } + function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) { + var index, quantity; + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state, "nested arrays are not supported inside keys"); + } + if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") { + keyNode[index] = "[object Object]"; + } + } + } + if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") { + keyNode = "[object Object]"; + } + keyNode = String(keyNode); + if (_result === null) { + _result = {}; + } + if (keyTag === "tag:yaml.org,2002:merge") { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) { + state.line = startLine || state.line; + state.lineStart = startLineStart || state.lineStart; + state.position = startPos || state.position; + throwError(state, "duplicated mapping key"); + } + if (keyNode === "__proto__") { + Object.defineProperty(_result, keyNode, { + configurable: true, + enumerable: true, + writable: true, + value: valueNode + }); + } else { + _result[keyNode] = valueNode; + } + delete overridableKeys[keyNode]; + } + return _result; + } + function readLineBreak(state) { + var ch; + ch = state.input.charCodeAt(state.position); + if (ch === 10) { + state.position++; + } else if (ch === 13) { + state.position++; + if (state.input.charCodeAt(state.position) === 10) { + state.position++; + } + } else { + throwError(state, "a line break is expected"); + } + state.line += 1; + state.lineStart = state.position; + state.firstTabInLine = -1; + } + function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + if (ch === 9 && state.firstTabInLine === -1) { + state.firstTabInLine = state.position; + } + ch = state.input.charCodeAt(++state.position); + } + if (allowComments && ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 10 && ch !== 13 && ch !== 0); + } + if (is_EOL(ch)) { + readLineBreak(state); + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + while (ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, "deficient indentation"); + } + return lineBreaks; + } + function testDocumentSeparator(state) { + var _position = state.position, ch; + ch = state.input.charCodeAt(_position); + if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) { + _position += 3; + ch = state.input.charCodeAt(_position); + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + return false; + } + function writeFoldedLines(state, count) { + if (count === 1) { + state.result += " "; + } else if (count > 1) { + state.result += common.repeat("\n", count - 1); + } + } + function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch; + ch = state.input.charCodeAt(state.position); + if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) { + return false; + } + if (ch === 63 || ch === 45) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + state.kind = "scalar"; + state.result = ""; + captureStart = captureEnd = state.position; + hasPendingContent = false; + while (ch !== 0) { + if (ch === 58) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + } else if (ch === 35) { + preceding = state.input.charCodeAt(state.position - 1); + if (is_WS_OR_EOL(preceding)) { + break; + } + } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + ch = state.input.charCodeAt(++state.position); + } + captureSegment(state, captureStart, captureEnd, false); + if (state.result) { + return true; + } + state.kind = _kind; + state.result = _result; + return false; + } + function readSingleQuotedScalar(state, nodeIndent) { + var ch, captureStart, captureEnd; + ch = state.input.charCodeAt(state.position); + if (ch !== 39) { + return false; + } + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 39) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (ch === 39) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, "unexpected end of the document within a single quoted scalar"); + } else { + state.position++; + captureEnd = state.position; + } + } + throwError(state, "unexpected end of the stream within a single quoted scalar"); + } + function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, captureEnd, hexLength, hexResult, tmp, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 34) { + return false; + } + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 34) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + } else if (ch === 92) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + } else { + throwError(state, "expected hexadecimal character"); + } + } + state.result += charFromCodepoint(hexResult); + state.position++; + } else { + throwError(state, "unknown escape sequence"); + } + captureStart = captureEnd = state.position; + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, "unexpected end of the document within a double quoted scalar"); + } else { + state.position++; + captureEnd = state.position; + } + } + throwError(state, "unexpected end of the stream within a double quoted scalar"); + } + function readFlowCollection(state, nodeIndent) { + var readNext = true, _line, _lineStart, _pos, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = Object.create(null), keyNode, keyTag, valueNode, ch; + ch = state.input.charCodeAt(state.position); + if (ch === 91) { + terminator = 93; + isMapping = false; + _result = []; + } else if (ch === 123) { + terminator = 125; + isMapping = true; + _result = {}; + } else { + return false; + } + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(++state.position); + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? "mapping" : "sequence"; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, "missed comma between flow collection entries"); + } else if (ch === 44) { + throwError(state, "expected the node content, but found ','"); + } + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + if (ch === 63) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + _line = state.line; + _lineStart = state.lineStart; + _pos = state.position; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if ((isExplicitPair || state.line === _line) && ch === 58) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); + } else { + _result.push(keyNode); + } + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === 44) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + throwError(state, "unexpected end of the stream within a flow collection"); + } + function readBlockScalar(state, nodeIndent) { + var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch; + ch = state.input.charCodeAt(state.position); + if (ch === 124) { + folding = false; + } else if (ch === 62) { + folding = true; + } else { + return false; + } + state.kind = "scalar"; + state.result = ""; + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + if (ch === 43 || ch === 45) { + if (CHOMPING_CLIP === chomping) { + chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, "repeat of a chomping mode identifier"); + } + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one"); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, "repeat of an indentation width identifier"); + } + } else { + break; + } + } + if (is_WHITE_SPACE(ch)) { + do { + ch = state.input.charCodeAt(++state.position); + } while (is_WHITE_SPACE(ch)); + if (ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (!is_EOL(ch) && ch !== 0); + } + } + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + ch = state.input.charCodeAt(state.position); + while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + if (is_EOL(ch)) { + emptyLines++; + continue; + } + if (state.lineIndent < textIndent) { + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { + state.result += "\n"; + } + } + break; + } + if (folding) { + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat("\n", emptyLines + 1); + } else if (emptyLines === 0) { + if (didReadContent) { + state.result += " "; + } + } else { + state.result += common.repeat("\n", emptyLines); + } + } else { + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + while (!is_EOL(ch) && ch !== 0) { + ch = state.input.charCodeAt(++state.position); + } + captureSegment(state, captureStart, state.position, false); + } + return true; + } + function readBlockSequence(state, nodeIndent) { + var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch; + if (state.firstTabInLine !== -1) + return false; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + if (state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, "tab characters must not be used in indentation"); + } + if (ch !== 45) { + break; + } + following = state.input.charCodeAt(state.position + 1); + if (!is_WS_OR_EOL(following)) { + break; + } + detected = true; + state.position++; + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { + throwError(state, "bad indentation of a sequence entry"); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "sequence"; + state.result = _result; + return true; + } + return false; + } + function readBlockMapping(state, nodeIndent, flowIndent) { + var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch; + if (state.firstTabInLine !== -1) + return false; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + if (!atExplicitKey && state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, "tab characters must not be used in indentation"); + } + following = state.input.charCodeAt(state.position + 1); + _line = state.line; + if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) { + if (ch === 63) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = true; + allowCompact = true; + } else if (atExplicitKey) { + atExplicitKey = false; + allowCompact = true; + } else { + throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"); + } + state.position += 1; + ch = following; + } else { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + break; + } + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (ch === 58) { + ch = state.input.charCodeAt(++state.position); + if (!is_WS_OR_EOL(ch)) { + throwError(state, "a whitespace character is expected after the key-value separator within a block mapping"); + } + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + } else if (detected) { + throwError(state, "can not read an implicit mapping pair; a colon is missed"); + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } else if (detected) { + throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key"); + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } + if (state.line === _line || state.lineIndent > nodeIndent) { + if (atExplicitKey) { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + } + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { + throwError(state, "bad indentation of a mapping entry"); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "mapping"; + state.result = _result; + } + return detected; + } + function readTagProperty(state) { + var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 33) + return false; + if (state.tag !== null) { + throwError(state, "duplication of a tag property"); + } + ch = state.input.charCodeAt(++state.position); + if (ch === 60) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + } else if (ch === 33) { + isNamed = true; + tagHandle = "!!"; + ch = state.input.charCodeAt(++state.position); + } else { + tagHandle = "!"; + } + _position = state.position; + if (isVerbatim) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0 && ch !== 62); + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, "unexpected end of the stream within a verbatim tag"); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + if (ch === 33) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, "named tag handle cannot contain such characters"); + } + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, "tag suffix cannot contain exclamation marks"); + } + } + ch = state.input.charCodeAt(++state.position); + } + tagName = state.input.slice(_position, state.position); + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, "tag suffix cannot contain flow indicator characters"); + } + } + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, "tag name cannot contain such characters: " + tagName); + } + try { + tagName = decodeURIComponent(tagName); + } catch (err) { + throwError(state, "tag name is malformed: " + tagName); + } + if (isVerbatim) { + state.tag = tagName; + } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + } else if (tagHandle === "!") { + state.tag = "!" + tagName; + } else if (tagHandle === "!!") { + state.tag = "tag:yaml.org,2002:" + tagName; + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + return true; + } + function readAnchorProperty(state) { + var _position, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 38) + return false; + if (state.anchor !== null) { + throwError(state, "duplication of an anchor property"); + } + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position === _position) { + throwError(state, "name of an anchor node must contain at least one character"); + } + state.anchor = state.input.slice(_position, state.position); + return true; + } + function readAlias(state) { + var _position, alias, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 42) + return false; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position === _position) { + throwError(state, "name of an alias node must contain at least one character"); + } + alias = state.input.slice(_position, state.position); + if (!_hasOwnProperty.call(state.anchorMap, alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; + } + function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type, flowIndent, blockIndent; + if (state.listener !== null) { + state.listener("open", state); + } + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext; + if (allowToSeek) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + blockIndent = state.position - state.lineStart; + if (indentStatus === 1) { + if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + } else if (readAlias(state)) { + hasContent = true; + if (state.tag !== null || state.anchor !== null) { + throwError(state, "alias node should not have any properties"); + } + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + if (state.tag === null) { + state.tag = "?"; + } + } + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + if (state.tag === null) { + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } else if (state.tag === "?") { + if (state.result !== null && state.kind !== "scalar") { + throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); + } + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + if (type.resolve(state.result)) { + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (state.tag !== "!") { + if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) { + type = state.typeMap[state.kind || "fallback"][state.tag]; + } else { + type = null; + typeList = state.typeMap.multi[state.kind || "fallback"]; + for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { + if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type = typeList[typeIndex]; + break; + } + } + } + if (!type) { + throwError(state, "unknown tag !<" + state.tag + ">"); + } + if (state.result !== null && type.kind !== state.kind) { + throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + if (!type.resolve(state.result, state.tag)) { + throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag"); + } else { + state.result = type.construct(state.result, state.tag); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } + if (state.listener !== null) { + state.listener("close", state); + } + return state.tag !== null || state.anchor !== null || hasContent; + } + function readDocument(state) { + var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = Object.create(null); + state.anchorMap = Object.create(null); + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if (state.lineIndent > 0 || ch !== 37) { + break; + } + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + if (directiveName.length < 1) { + throwError(state, "directive name must not be less than one character in length"); + } + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0 && !is_EOL(ch)); + break; + } + if (is_EOL(ch)) + break; + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveArgs.push(state.input.slice(_position, state.position)); + } + if (ch !== 0) + readLineBreak(state); + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + skipSeparationSpace(state, true, -1); + if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } else if (hasDirectives) { + throwError(state, "directives end mark is expected"); + } + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, "non-ASCII line breaks are interpreted as content"); + } + state.documents.push(state.result); + if (state.position === state.lineStart && testDocumentSeparator(state)) { + if (state.input.charCodeAt(state.position) === 46) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + if (state.position < state.length - 1) { + throwError(state, "end of the stream or a document separator is expected"); + } else { + return; + } + } + function loadDocuments(input, options) { + input = String(input); + options = options || {}; + if (input.length !== 0) { + if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) { + input += "\n"; + } + if (input.charCodeAt(0) === 65279) { + input = input.slice(1); + } + } + var state = new State(input, options); + var nullpos = input.indexOf("\0"); + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, "null byte is not allowed in input"); + } + state.input += "\0"; + while (state.input.charCodeAt(state.position) === 32) { + state.lineIndent += 1; + state.position += 1; + } + while (state.position < state.length - 1) { + readDocument(state); + } + return state.documents; + } + function loadAll(input, iterator, options) { + if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") { + options = iterator; + iterator = null; + } + var documents = loadDocuments(input, options); + if (typeof iterator !== "function") { + return documents; + } + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } + } + function load(input, options) { + var documents = loadDocuments(input, options); + if (documents.length === 0) { + return void 0; + } else if (documents.length === 1) { + return documents[0]; + } + throw new YAMLException("expected a single document in the stream, but found more"); + } + module2.exports.loadAll = loadAll; + module2.exports.load = load; + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/dumper.js +var require_dumper = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/lib/dumper.js"(exports2, module2) { + "use strict"; + var common = require_common2(); + var YAMLException = require_exception(); + var DEFAULT_SCHEMA = require_default(); + var _toString = Object.prototype.toString; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CHAR_BOM = 65279; + var CHAR_TAB = 9; + var CHAR_LINE_FEED = 10; + var CHAR_CARRIAGE_RETURN = 13; + var CHAR_SPACE = 32; + var CHAR_EXCLAMATION = 33; + var CHAR_DOUBLE_QUOTE = 34; + var CHAR_SHARP = 35; + var CHAR_PERCENT = 37; + var CHAR_AMPERSAND = 38; + var CHAR_SINGLE_QUOTE = 39; + var CHAR_ASTERISK = 42; + var CHAR_COMMA = 44; + var CHAR_MINUS = 45; + var CHAR_COLON = 58; + var CHAR_EQUALS = 61; + var CHAR_GREATER_THAN = 62; + var CHAR_QUESTION = 63; + var CHAR_COMMERCIAL_AT = 64; + var CHAR_LEFT_SQUARE_BRACKET = 91; + var CHAR_RIGHT_SQUARE_BRACKET = 93; + var CHAR_GRAVE_ACCENT = 96; + var CHAR_LEFT_CURLY_BRACKET = 123; + var CHAR_VERTICAL_LINE = 124; + var CHAR_RIGHT_CURLY_BRACKET = 125; + var ESCAPE_SEQUENCES = {}; + ESCAPE_SEQUENCES[0] = "\\0"; + ESCAPE_SEQUENCES[7] = "\\a"; + ESCAPE_SEQUENCES[8] = "\\b"; + ESCAPE_SEQUENCES[9] = "\\t"; + ESCAPE_SEQUENCES[10] = "\\n"; + ESCAPE_SEQUENCES[11] = "\\v"; + ESCAPE_SEQUENCES[12] = "\\f"; + ESCAPE_SEQUENCES[13] = "\\r"; + ESCAPE_SEQUENCES[27] = "\\e"; + ESCAPE_SEQUENCES[34] = '\\"'; + ESCAPE_SEQUENCES[92] = "\\\\"; + ESCAPE_SEQUENCES[133] = "\\N"; + ESCAPE_SEQUENCES[160] = "\\_"; + ESCAPE_SEQUENCES[8232] = "\\L"; + ESCAPE_SEQUENCES[8233] = "\\P"; + var DEPRECATED_BOOLEANS_SYNTAX = [ + "y", + "Y", + "yes", + "Yes", + "YES", + "on", + "On", + "ON", + "n", + "N", + "no", + "No", + "NO", + "off", + "Off", + "OFF" + ]; + var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; + var SINGLE_LINE_KEYS = { + cpu: true, + engines: true, + os: true, + resolution: true + }; + function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + if (map === null) + return {}; + result = {}; + keys = Object.keys(map); + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + if (tag.slice(0, 2) === "!!") { + tag = "tag:yaml.org,2002:" + tag.slice(2); + } + type = schema.compiledTypeMap["fallback"][tag]; + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + result[tag] = style; + } + return result; + } + function encodeHex(character) { + var string, handle, length; + string = character.toString(16).toUpperCase(); + if (character <= 255) { + handle = "x"; + length = 2; + } else if (character <= 65535) { + handle = "u"; + length = 4; + } else if (character <= 4294967295) { + handle = "U"; + length = 8; + } else { + throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF"); + } + return "\\" + handle + common.repeat("0", length - string.length) + string; + } + var QUOTING_TYPE_SINGLE = 1; + var QUOTING_TYPE_DOUBLE = 2; + function State(options) { + this.blankLines = options["blankLines"] || false; + this.schema = options["schema"] || DEFAULT_SCHEMA; + this.indent = Math.max(1, options["indent"] || 2); + this.noArrayIndent = options["noArrayIndent"] || false; + this.skipInvalid = options["skipInvalid"] || false; + this.flowLevel = common.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"]; + this.styleMap = compileStyleMap(this.schema, options["styles"] || null); + this.sortKeys = options["sortKeys"] || false; + this.lineWidth = options["lineWidth"] || 80; + this.noRefs = options["noRefs"] || false; + this.noCompatMode = options["noCompatMode"] || false; + this.condenseFlow = options["condenseFlow"] || false; + this.quotingType = options["quotingType"] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; + this.forceQuotes = options["forceQuotes"] || false; + this.replacer = typeof options["replacer"] === "function" ? options["replacer"] : null; + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + this.tag = null; + this.result = ""; + this.duplicates = []; + this.usedDuplicates = null; + } + function indentString(string, spaces) { + var ind = common.repeat(" ", spaces), position = 0, next = -1, result = "", line, length = string.length; + while (position < length) { + next = string.indexOf("\n", position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + if (line.length && line !== "\n") + result += ind; + result += line; + } + return result; + } + function generateNextLine(state, level, doubleLine) { + return "\n" + (doubleLine ? "\n" : "") + common.repeat(" ", state.indent * level); + } + function testImplicitResolving(state, str) { + var index, length, type; + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + if (type.resolve(str)) { + return true; + } + } + return false; + } + function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; + } + function isPrintable(c) { + return 32 <= c && c <= 126 || 161 <= c && c <= 55295 && c !== 8232 && c !== 8233 || 57344 <= c && c <= 65533 && c !== CHAR_BOM || 65536 <= c && c <= 1114111; + } + function isNsCharOrWhitespace(c) { + return isPrintable(c) && c !== CHAR_BOM && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED; + } + function isPlainSafe(c, prev, inblock) { + var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); + var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); + return (inblock ? cIsNsCharOrWhitespace : cIsNsCharOrWhitespace && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET) && c !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar; + } + function isPlainSafeFirst(c) { + return isPrintable(c) && c !== CHAR_BOM && !isWhitespace(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT; + } + function isPlainSafeLast(c) { + return !isWhitespace(c) && c !== CHAR_COLON; + } + function codePointAt(string, pos) { + var first = string.charCodeAt(pos), second; + if (first >= 55296 && first <= 56319 && pos + 1 < string.length) { + second = string.charCodeAt(pos + 1); + if (second >= 56320 && second <= 57343) { + return (first - 55296) * 1024 + second - 56320 + 65536; + } + } + return first; + } + function needIndentIndicator(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); + } + var STYLE_PLAIN = 1; + var STYLE_SINGLE = 2; + var STYLE_LITERAL = 3; + var STYLE_FOLDED = 4; + var STYLE_DOUBLE = 5; + function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) { + var i; + var char = 0; + var prevChar = null; + var hasLineBreak = false; + var hasFoldableLine = false; + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; + var plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1)); + if (singleLineOnly || forceQuotes) { + for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { + char = codePointAt(string, i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + } else { + for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { + char = codePointAt(string, i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "; + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "); + } + if (!hasLineBreak && !hasFoldableLine) { + if (plain && !forceQuotes && !testAmbiguousType(string)) { + return STYLE_PLAIN; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + if (indentPerLevel > 9 && needIndentIndicator(string)) { + return STYLE_DOUBLE; + } + if (!forceQuotes) { + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + function writeScalar(state, string, level, iskey, inblock, singleLO) { + state.dump = function() { + if (string.length === 0) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; + } + if (!state.noCompatMode) { + if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'"; + } + } + var indent = state.indent * Math.max(1, level); + var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + var singleLineOnly = iskey || singleLO || state.flowLevel > -1 && level >= state.flowLevel; + function testAmbiguity(string2) { + return testImplicitResolving(state, string2); + } + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return "|" + blockHeader(string, state.indent) + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return ">" + blockHeader(string, state.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + default: + throw new YAMLException("impossible error: invalid scalar style"); + } + }(); + } + function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ""; + var clip = string[string.length - 1] === "\n"; + var keep = clip && (string[string.length - 2] === "\n" || string === "\n"); + var chomp = keep ? "+" : clip ? "" : "-"; + return indentIndicator + chomp + "\n"; + } + function dropEndingNewline(string) { + return string[string.length - 1] === "\n" ? string.slice(0, -1) : string; + } + function foldString(string, width) { + var lineRe = /(\n+)([^\n]*)/g; + var result = function() { + var nextLF = string.indexOf("\n"); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }(); + var prevMoreIndented = string[0] === "\n" || string[0] === " "; + var moreIndented; + var match; + while (match = lineRe.exec(string)) { + var prefix = match[1], line = match[2]; + moreIndented = line[0] === " "; + result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); + prevMoreIndented = moreIndented; + } + return result; + } + function foldLine(line, width) { + if (line === "" || line[0] === " ") + return line; + var breakRe = / [^ ]/g; + var match; + var start = 0, end, curr = 0, next = 0; + var result = ""; + while (match = breakRe.exec(line)) { + next = match.index; + if (next - start > width) { + end = curr > start ? curr : next; + result += "\n" + line.slice(start, end); + start = end + 1; + } + curr = next; + } + result += "\n"; + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + "\n" + line.slice(curr + 1); + } else { + result += line.slice(start); + } + return result.slice(1); + } + function escapeString(string) { + var result = ""; + var char = 0; + var escapeSeq; + for (var i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { + char = codePointAt(string, i); + escapeSeq = ESCAPE_SEQUENCES[char]; + if (!escapeSeq && isPrintable(char)) { + result += string[i]; + if (char >= 65536) + result += string[i + 1]; + } else { + result += escapeSeq || encodeHex(char); + } + } + return result; + } + function writeFlowSequence(state, level, object) { + var _result = "", _tag = state.tag, index, length, value; + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + if (writeNode(state, level, value, false, false) || typeof value === "undefined" && writeNode(state, level, null, false, false)) { + if (_result !== "") + _result += "," + (!state.condenseFlow ? " " : ""); + _result += state.dump; + } + } + state.tag = _tag; + state.dump = "[" + _result + "]"; + } + function writeBlockSequence(state, level, object, compact) { + var _result = "", _tag = state.tag, index, length, value; + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + if (writeNode(state, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state, level + 1, null, true, true, false, true)) { + if (!compact || _result !== "") { + _result += generateNextLine(state, level); + } + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += "-"; + } else { + _result += "- "; + } + _result += state.dump; + } + } + state.tag = _tag; + state.dump = _result || "[]"; + } + function writeFlowMapping(state, level, object, singleLineOnly) { + var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer; + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ""; + if (_result !== "") + pairBuffer += ", "; + if (state.condenseFlow) + pairBuffer += '"'; + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + if (!writeNode(state, level, objectKey, false, false, singleLineOnly)) { + continue; + } + if (state.dump.length > 1024) + pairBuffer += "? "; + pairBuffer += state.dump + (state.condenseFlow ? '"' : "") + ":" + (state.condenseFlow ? "" : " "); + if (!writeNode(state, level, objectValue, false, false, singleLineOnly)) { + continue; + } + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = "{" + _result + "}"; + } + function writeBlockMapping(state, level, object, compact, doubleLine) { + var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer; + if (state.sortKeys === true) { + objectKeyList.sort(); + } else if (typeof state.sortKeys === "function") { + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + throw new YAMLException("sortKeys must be a boolean or a function"); + } + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ""; + if (!compact || _result !== "") { + pairBuffer += generateNextLine(state, level, doubleLine); + } + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; + } + explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024; + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += "?"; + } else { + pairBuffer += "? "; + } + } + pairBuffer += state.dump; + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + if (!writeNode(state, level + 1, objectValue, true, explicitPair, null, null, objectKey)) { + continue; + } + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ":"; + } else { + pairBuffer += ": "; + } + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = _result || "{}"; + } + function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + typeList = explicit ? state.explicitTypes : state.implicitTypes; + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) { + if (explicit) { + if (type.multi && type.representName) { + state.tag = type.representName(object); + } else { + state.tag = type.tag; + } + } else { + state.tag = "?"; + } + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + if (_toString.call(type.represent) === "[object Function]") { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new YAMLException("!<" + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + state.dump = _result; + } + return true; + } + } + return false; + } + function writeNode(state, level, object, block, compact, iskey, isblockseq, objectKey, singleLineOnly) { + state.tag = null; + state.dump = object; + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + var type = _toString.call(state.dump); + var inblock = block; + var tagStr; + if (block) { + block = state.flowLevel < 0 || state.flowLevel > level; + } + var objectOrArray = type === "[object Object]" || type === "[object Array]", duplicateIndex, duplicate; + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) { + compact = false; + } + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = "*ref_" + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === "[object Object]") { + singleLineOnly = SINGLE_LINE_KEYS[objectKey]; + if (block && Object.keys(state.dump).length !== 0 && !singleLineOnly) { + var doubleLine = state.blankLines ? objectKey === "packages" || objectKey === "importers" || level === 0 : false; + writeBlockMapping(state, level, state.dump, compact, doubleLine); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump, singleLineOnly); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + } + } else if (type === "[object Array]") { + singleLineOnly = SINGLE_LINE_KEYS[objectKey]; + if (block && state.dump.length !== 0 && !singleLineOnly) { + if (state.noArrayIndent && !isblockseq && level > 0) { + writeBlockSequence(state, level - 1, state.dump, compact); + } else { + writeBlockSequence(state, level, state.dump, compact); + } + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, level, state.dump, singleLineOnly); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + } + } else if (type === "[object String]") { + if (state.tag !== "?") { + writeScalar(state, state.dump, level, iskey, inblock, singleLineOnly); + } + } else if (type === "[object Undefined]") { + return false; + } else { + if (state.skipInvalid) + return false; + throw new YAMLException("unacceptable kind of an object to dump " + type); + } + if (state.tag !== null && state.tag !== "?") { + tagStr = encodeURI(state.tag[0] === "!" ? state.tag.slice(1) : state.tag).replace(/!/g, "%21"); + if (state.tag[0] === "!") { + tagStr = "!" + tagStr; + } else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") { + tagStr = "!!" + tagStr.slice(18); + } else { + tagStr = "!<" + tagStr + ">"; + } + state.dump = tagStr + " " + state.dump; + } + } + return true; + } + function getDuplicateReferences(object, state) { + var objects = [], duplicatesIndexes = [], index, length; + inspectNode(object, objects, duplicatesIndexes); + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); + } + function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, index, length; + if (object !== null && typeof object === "object") { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } + } + function dump(input, options) { + options = options || {}; + var state = new State(options); + if (!state.noRefs) + getDuplicateReferences(input, state); + var value = input; + if (state.replacer) { + value = state.replacer.call({ "": value }, "", value); + } + if (writeNode(state, 0, value, true, true)) + return state.dump + "\n"; + return ""; + } + module2.exports.dump = dump; + } +}); + +// ../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/index.js +var require_js_yaml = __commonJS({ + "../../node_modules/.pnpm/@zkochan+js-yaml@0.0.5/node_modules/@zkochan/js-yaml/index.js"(exports2, module2) { + "use strict"; + var loader = require_loader(); + var dumper = require_dumper(); + function renamed(from, to) { + return function() { + throw new Error("Function yaml." + from + " is removed in js-yaml 4. Use yaml." + to + " instead, which is now safe by default."); + }; + } + module2.exports.Type = require_type2(); + module2.exports.Schema = require_schema(); + module2.exports.FAILSAFE_SCHEMA = require_failsafe(); + module2.exports.JSON_SCHEMA = require_json(); + module2.exports.CORE_SCHEMA = require_core2(); + module2.exports.DEFAULT_SCHEMA = require_default(); + module2.exports.load = loader.load; + module2.exports.loadAll = loader.loadAll; + module2.exports.dump = dumper.dump; + module2.exports.YAMLException = require_exception(); + module2.exports.safeLoad = renamed("safeLoad", "load"); + module2.exports.safeLoadAll = renamed("safeLoadAll", "loadAll"); + module2.exports.safeDump = renamed("safeDump", "dump"); + } +}); + +// ../../node_modules/.pnpm/write-yaml-file@4.2.0/node_modules/write-yaml-file/index.js +var require_write_yaml_file = __commonJS({ + "../../node_modules/.pnpm/write-yaml-file@4.2.0/node_modules/write-yaml-file/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var fs = require("fs"); + var writeFileAtomic = require_write_file_atomic(); + var YAML = require_js_yaml(); + var main = (fn2, fp, data, opts) => { + if (!fp) { + throw new TypeError("Expected a filepath"); + } + if (data === void 0) { + throw new TypeError("Expected data to stringify"); + } + opts = opts || {}; + const yaml = YAML.dump(data, opts); + return fn2(fp, yaml, { mode: opts.mode }); + }; + module2.exports = async (fp, data, opts) => { + await fs.promises.mkdir(path.dirname(fp), { recursive: true }); + return main(writeFileAtomic, fp, data, opts); + }; + module2.exports.sync = (fp, data, opts) => { + fs.mkdirSync(path.dirname(fp), { recursive: true }); + main(writeFileAtomic.sync, fp, data, opts); + }; + } +}); + +// ../write-project-manifest/lib/index.js +var require_lib17 = __commonJS({ + "../write-project-manifest/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var json5_1 = __importDefault(require_lib16()); + var write_file_atomic_1 = __importDefault(require_write_file_atomic()); + var write_yaml_file_1 = __importDefault(require_write_yaml_file()); + var YAML_FORMAT = { + noCompatMode: true, + noRefs: true + }; + async function writeProjectManifest(filePath, manifest, opts) { + var _a; + const fileType = filePath.substr(filePath.lastIndexOf(".") + 1).toLowerCase(); + if (fileType === "yaml") { + return write_yaml_file_1.default(filePath, manifest, YAML_FORMAT); + } + await fs_1.promises.mkdir(path_1.default.dirname(filePath), { recursive: true }); + const trailingNewline = (opts === null || opts === void 0 ? void 0 : opts.insertFinalNewline) === false ? "" : "\n"; + const json = (fileType === "json5" ? json5_1.default : JSON).stringify(manifest, void 0, (_a = opts === null || opts === void 0 ? void 0 : opts.indent) !== null && _a !== void 0 ? _a : " "); + return write_file_atomic_1.default(filePath, `${json}${trailingNewline}`); + } + exports2.default = writeProjectManifest; + } +}); + +// ../../node_modules/.pnpm/read-yaml-file@2.1.0/node_modules/read-yaml-file/index.js +var require_read_yaml_file = __commonJS({ + "../../node_modules/.pnpm/read-yaml-file@2.1.0/node_modules/read-yaml-file/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var stripBom = require_strip_bom(); + var yaml = require_js_yaml(); + var parse = (data) => yaml.load(stripBom(data)); + var readYamlFile = (fp) => fs.promises.readFile(fp, "utf8").then((data) => parse(data)); + module2.exports = readYamlFile; + module2.exports.default = readYamlFile; + module2.exports.sync = (fp) => parse(fs.readFileSync(fp, "utf8")); + } +}); + +// ../../node_modules/.pnpm/detect-indent@6.1.0/node_modules/detect-indent/index.js +var require_detect_indent = __commonJS({ + "../../node_modules/.pnpm/detect-indent@6.1.0/node_modules/detect-indent/index.js"(exports2, module2) { + "use strict"; + var INDENT_REGEX = /^(?:( )+|\t+)/; + var INDENT_TYPE_SPACE = "space"; + var INDENT_TYPE_TAB = "tab"; + function makeIndentsMap(string, ignoreSingleSpaces) { + const indents = new Map(); + let previousSize = 0; + let previousIndentType; + let key; + for (const line of string.split(/\n/g)) { + if (!line) { + continue; + } + let indent; + let indentType; + let weight; + let entry; + const matches = line.match(INDENT_REGEX); + if (matches === null) { + previousSize = 0; + previousIndentType = ""; + } else { + indent = matches[0].length; + if (matches[1]) { + indentType = INDENT_TYPE_SPACE; + } else { + indentType = INDENT_TYPE_TAB; + } + if (ignoreSingleSpaces && indentType === INDENT_TYPE_SPACE && indent === 1) { + continue; + } + if (indentType !== previousIndentType) { + previousSize = 0; + } + previousIndentType = indentType; + weight = 0; + const indentDifference = indent - previousSize; + previousSize = indent; + if (indentDifference === 0) { + weight++; + } else { + const absoluteIndentDifference = indentDifference > 0 ? indentDifference : -indentDifference; + key = encodeIndentsKey(indentType, absoluteIndentDifference); + } + entry = indents.get(key); + if (entry === void 0) { + entry = [1, 0]; + } else { + entry = [++entry[0], entry[1] + weight]; + } + indents.set(key, entry); + } + } + return indents; + } + function encodeIndentsKey(indentType, indentAmount) { + const typeCharacter = indentType === INDENT_TYPE_SPACE ? "s" : "t"; + return typeCharacter + String(indentAmount); + } + function decodeIndentsKey(indentsKey) { + const keyHasTypeSpace = indentsKey[0] === "s"; + const type = keyHasTypeSpace ? INDENT_TYPE_SPACE : INDENT_TYPE_TAB; + const amount = Number(indentsKey.slice(1)); + return { type, amount }; + } + function getMostUsedKey(indents) { + let result; + let maxUsed = 0; + let maxWeight = 0; + for (const [key, [usedCount, weight]] of indents) { + if (usedCount > maxUsed || usedCount === maxUsed && weight > maxWeight) { + maxUsed = usedCount; + maxWeight = weight; + result = key; + } + } + return result; + } + function makeIndentString(type, amount) { + const indentCharacter = type === INDENT_TYPE_SPACE ? " " : " "; + return indentCharacter.repeat(amount); + } + module2.exports = (string) => { + if (typeof string !== "string") { + throw new TypeError("Expected a string"); + } + let indents = makeIndentsMap(string, true); + if (indents.size === 0) { + indents = makeIndentsMap(string, false); + } + const keyOfMostUsedIndent = getMostUsedKey(indents); + let type; + let amount = 0; + let indent = ""; + if (keyOfMostUsedIndent !== void 0) { + ({ type, amount } = decodeIndentsKey(keyOfMostUsedIndent)); + indent = makeIndentString(type, amount); + } + return { + amount, + type, + indent + }; + }; + } +}); + +// ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +var require_fast_deep_equal = __commonJS({ + "../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports2, module2) { + "use strict"; + module2.exports = function equal(a, b) { + if (a === b) + return true; + if (a && b && typeof a == "object" && typeof b == "object") { + if (a.constructor !== b.constructor) + return false; + var length, i, keys; + if (Array.isArray(a)) { + length = a.length; + if (length != b.length) + return false; + for (i = length; i-- !== 0; ) + if (!equal(a[i], b[i])) + return false; + return true; + } + if (a.constructor === RegExp) + return a.source === b.source && a.flags === b.flags; + if (a.valueOf !== Object.prototype.valueOf) + return a.valueOf() === b.valueOf(); + if (a.toString !== Object.prototype.toString) + return a.toString() === b.toString(); + keys = Object.keys(a); + length = keys.length; + if (length !== Object.keys(b).length) + return false; + for (i = length; i-- !== 0; ) + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) + return false; + for (i = length; i-- !== 0; ) { + var key = keys[i]; + if (!equal(a[key], b[key])) + return false; + } + return true; + } + return a !== a && b !== b; + }; + } +}); + +// ../../node_modules/.pnpm/is-plain-obj@2.1.0/node_modules/is-plain-obj/index.js +var require_is_plain_obj = __commonJS({ + "../../node_modules/.pnpm/is-plain-obj@2.1.0/node_modules/is-plain-obj/index.js"(exports2, module2) { + "use strict"; + module2.exports = (value) => { + if (Object.prototype.toString.call(value) !== "[object Object]") { + return false; + } + const prototype = Object.getPrototypeOf(value); + return prototype === null || prototype === Object.prototype; + }; + } +}); + +// ../../node_modules/.pnpm/sort-keys@4.2.0/node_modules/sort-keys/index.js +var require_sort_keys = __commonJS({ + "../../node_modules/.pnpm/sort-keys@4.2.0/node_modules/sort-keys/index.js"(exports2, module2) { + "use strict"; + var isPlainObject = require_is_plain_obj(); + module2.exports = (object, options = {}) => { + if (!isPlainObject(object) && !Array.isArray(object)) { + throw new TypeError("Expected a plain object or array"); + } + const { deep } = options; + const seenInput = []; + const seenOutput = []; + const deepSortArray = (array) => { + const seenIndex = seenInput.indexOf(array); + if (seenIndex !== -1) { + return seenOutput[seenIndex]; + } + const result = []; + seenInput.push(array); + seenOutput.push(result); + result.push(...array.map((item) => { + if (Array.isArray(item)) { + return deepSortArray(item); + } + if (isPlainObject(item)) { + return sortKeys(item); + } + return item; + })); + return result; + }; + const sortKeys = (object2) => { + const seenIndex = seenInput.indexOf(object2); + if (seenIndex !== -1) { + return seenOutput[seenIndex]; + } + const result = {}; + const keys = Object.keys(object2).sort(options.compare); + seenInput.push(object2); + seenOutput.push(result); + for (const key of keys) { + const value = object2[key]; + let newValue; + if (deep && Array.isArray(value)) { + newValue = deepSortArray(value); + } else { + newValue = deep && isPlainObject(value) ? sortKeys(value) : value; + } + Object.defineProperty(result, key, { + ...Object.getOwnPropertyDescriptor(object2, key), + value: newValue + }); + } + return result; + }; + if (Array.isArray(object)) { + return deep ? deepSortArray(object) : object.slice(); + } + return sortKeys(object); + }; + } +}); + +// ../graceful-fs/lib/index.js +var require_lib18 = __commonJS({ + "../graceful-fs/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var util_1 = require("util"); + var graceful_fs_1 = __importDefault(require_graceful_fs()); + exports2.default = { + createReadStream: graceful_fs_1.default.createReadStream, + readFile: util_1.promisify(graceful_fs_1.default.readFile), + writeFile: util_1.promisify(graceful_fs_1.default.writeFile) + }; + } +}); + +// ../read-project-manifest/lib/readFile.js +var require_readFile = __commonJS({ + "../read-project-manifest/lib/readFile.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readJsonFile = exports2.readJson5File = void 0; + var graceful_fs_1 = __importDefault(require_lib18()); + var json5_1 = __importDefault(require_lib16()); + var parse_json_1 = __importDefault(require_parse_json()); + var strip_bom_1 = __importDefault(require_strip_bom()); + async function readJson5File(filePath) { + const text = await readFileWithoutBom(filePath); + try { + return { + data: json5_1.default.parse(text), + text + }; + } catch (err) { + err.message = `${err.message} in ${filePath}`; + err["code"] = "ERR_PNPM_JSON5_PARSE"; + throw err; + } + } + exports2.readJson5File = readJson5File; + async function readJsonFile(filePath) { + const text = await readFileWithoutBom(filePath); + try { + return { + data: parse_json_1.default(text, filePath), + text + }; + } catch (err) { + err["code"] = "ERR_PNPM_JSON_PARSE"; + throw err; + } + } + exports2.readJsonFile = readJsonFile; + async function readFileWithoutBom(path) { + return strip_bom_1.default(await graceful_fs_1.default.readFile(path, "utf8")); + } + } +}); + +// ../read-project-manifest/lib/index.js +var require_lib19 = __commonJS({ + "../read-project-manifest/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readExactProjectManifest = exports2.tryReadProjectManifest = exports2.readProjectManifestOnly = exports2.safeReadProjectManifestOnly = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var write_project_manifest_1 = __importDefault(require_lib17()); + var read_yaml_file_1 = __importDefault(require_read_yaml_file()); + var detect_indent_1 = __importDefault(require_detect_indent()); + var fast_deep_equal_1 = __importDefault(require_fast_deep_equal()); + var is_windows_1 = __importDefault(require_is_windows()); + var sort_keys_1 = __importDefault(require_sort_keys()); + var readFile_1 = require_readFile(); + async function safeReadProjectManifestOnly(projectDir) { + try { + return await readProjectManifestOnly(projectDir); + } catch (err) { + if (err.code === "ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND") { + return null; + } + throw err; + } + } + exports2.safeReadProjectManifestOnly = safeReadProjectManifestOnly; + async function readProjectManifest(projectDir) { + const result = await tryReadProjectManifest(projectDir); + if (result.manifest !== null) { + return result; + } + throw new error_1.default("NO_IMPORTER_MANIFEST_FOUND", `No package.json (or package.yaml, or package.json5) was found in "${projectDir}".`); + } + exports2.default = readProjectManifest; + async function readProjectManifestOnly(projectDir) { + const { manifest } = await readProjectManifest(projectDir); + return manifest; + } + exports2.readProjectManifestOnly = readProjectManifestOnly; + async function tryReadProjectManifest(projectDir) { + try { + const manifestPath = path_1.default.join(projectDir, "package.json"); + const { data, text } = await readFile_1.readJsonFile(manifestPath); + return { + fileName: "package.json", + manifest: data, + writeProjectManifest: createManifestWriter({ + ...detectFileFormatting(text), + initialManifest: data, + manifestPath + }) + }; + } catch (err) { + if (err.code !== "ENOENT") + throw err; + } + try { + const manifestPath = path_1.default.join(projectDir, "package.json5"); + const { data, text } = await readFile_1.readJson5File(manifestPath); + return { + fileName: "package.json5", + manifest: data, + writeProjectManifest: createManifestWriter({ + ...detectFileFormatting(text), + initialManifest: data, + manifestPath + }) + }; + } catch (err) { + if (err.code !== "ENOENT") + throw err; + } + try { + const manifestPath = path_1.default.join(projectDir, "package.yaml"); + const manifest = await readPackageYaml(manifestPath); + return { + fileName: "package.yaml", + manifest, + writeProjectManifest: createManifestWriter({ initialManifest: manifest, manifestPath }) + }; + } catch (err) { + if (err.code !== "ENOENT") + throw err; + } + if (is_windows_1.default()) { + let s; + try { + s = await fs_1.promises.stat(projectDir); + } catch (err) { + } + if (s != null && !s.isDirectory()) { + const err = new Error(`"${projectDir}" is not a directory`); + err["code"] = "ENOTDIR"; + throw err; + } + } + const filePath = path_1.default.join(projectDir, "package.json"); + return { + fileName: "package.json", + manifest: null, + writeProjectManifest: async (manifest) => write_project_manifest_1.default(filePath, manifest) + }; + } + exports2.tryReadProjectManifest = tryReadProjectManifest; + function detectFileFormatting(text) { + return { + indent: detect_indent_1.default(text).indent, + insertFinalNewline: text.endsWith("\n") + }; + } + async function readExactProjectManifest(manifestPath) { + const base = path_1.default.basename(manifestPath).toLowerCase(); + switch (base) { + case "package.json": { + const { data, text } = await readFile_1.readJsonFile(manifestPath); + return { + manifest: data, + writeProjectManifest: createManifestWriter({ + ...detectFileFormatting(text), + initialManifest: data, + manifestPath + }) + }; + } + case "package.json5": { + const { data, text } = await readFile_1.readJson5File(manifestPath); + return { + manifest: data, + writeProjectManifest: createManifestWriter({ + ...detectFileFormatting(text), + initialManifest: data, + manifestPath + }) + }; + } + case "package.yaml": { + const manifest = await readPackageYaml(manifestPath); + return { + manifest, + writeProjectManifest: createManifestWriter({ initialManifest: manifest, manifestPath }) + }; + } + } + throw new Error(`Not supported manifest name "${base}"`); + } + exports2.readExactProjectManifest = readExactProjectManifest; + async function readPackageYaml(filePath) { + try { + return await read_yaml_file_1.default(filePath); + } catch (err) { + if (err.name !== "YAMLException") + throw err; + err.message = `${err.message} +in ${filePath}`; + err.code = "ERR_PNPM_YAML_PARSE"; + throw err; + } + } + function createManifestWriter(opts) { + const initialManifest = normalize(JSON.parse(JSON.stringify(opts.initialManifest))); + return async (updatedManifest, force) => { + updatedManifest = normalize(updatedManifest); + if (force === true || !fast_deep_equal_1.default(initialManifest, updatedManifest)) { + return write_project_manifest_1.default(opts.manifestPath, updatedManifest, { + indent: opts.indent, + insertFinalNewline: opts.insertFinalNewline + }); + } + return Promise.resolve(void 0); + }; + } + var dependencyKeys = new Set([ + "dependencies", + "devDependencies", + "optionalDependencies", + "peerDependencies" + ]); + function normalize(manifest) { + const result = {}; + for (const key of Object.keys(manifest)) { + if (!dependencyKeys.has(key)) { + result[key] = manifest[key]; + } else if (Object.keys(manifest[key]).length !== 0) { + result[key] = sort_keys_1.default(manifest[key]); + } + } + return result; + } + } +}); + +// ../cli-utils/lib/readDepNameCompletions.js +var require_readDepNameCompletions = __commonJS({ + "../cli-utils/lib/readDepNameCompletions.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readDepNameCompletions = void 0; + var manifest_utils_1 = require_lib15(); + var read_project_manifest_1 = __importDefault(require_lib19()); + async function readDepNameCompletions(dir) { + const { manifest } = await read_project_manifest_1.default(dir !== null && dir !== void 0 ? dir : process.cwd()); + return Object.keys(manifest_utils_1.getAllDependenciesFromManifest(manifest)).map((name) => ({ name })); + } + exports2.readDepNameCompletions = readDepNameCompletions; + } +}); + +// ../cli-utils/lib/readProjectManifest.js +var require_readProjectManifest = __commonJS({ + "../cli-utils/lib/readProjectManifest.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tryReadProjectManifest = exports2.readProjectManifestOnly = exports2.readProjectManifest = void 0; + var read_project_manifest_1 = __importStar2(require_lib19()); + var utils = read_project_manifest_1; + var packageIsInstallable_1 = require_packageIsInstallable(); + async function readProjectManifest(projectDir, opts) { + const { fileName, manifest, writeProjectManifest } = await read_project_manifest_1.default(projectDir); + packageIsInstallable_1.packageIsInstallable(projectDir, manifest, opts); + return { fileName, manifest, writeProjectManifest }; + } + exports2.readProjectManifest = readProjectManifest; + async function readProjectManifestOnly(projectDir, opts) { + const manifest = await utils.readProjectManifestOnly(projectDir); + packageIsInstallable_1.packageIsInstallable(projectDir, manifest, opts); + return manifest; + } + exports2.readProjectManifestOnly = readProjectManifestOnly; + async function tryReadProjectManifest(projectDir, opts) { + const { fileName, manifest, writeProjectManifest } = await utils.tryReadProjectManifest(projectDir); + if (manifest == null) + return { fileName, manifest, writeProjectManifest }; + packageIsInstallable_1.packageIsInstallable(projectDir, manifest, opts); + return { fileName, manifest, writeProjectManifest }; + } + exports2.tryReadProjectManifest = tryReadProjectManifest; + } +}); + +// ../cli-utils/lib/recursiveSummary.js +var require_recursiveSummary = __commonJS({ + "../cli-utils/lib/recursiveSummary.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throwOnCommandFail = void 0; + var error_1 = __importDefault(require_lib8()); + var RecursiveFailError = class extends error_1.default { + constructor(command, recursiveSummary) { + super("RECURSIVE_FAIL", `"${command}" failed in ${recursiveSummary.fails.length} packages`); + this.fails = recursiveSummary.fails; + this.passes = recursiveSummary.passes; + } + }; + function throwOnCommandFail(command, recursiveSummary) { + if (recursiveSummary.fails.length > 0) { + throw new RecursiveFailError(command, recursiveSummary); + } + } + exports2.throwOnCommandFail = throwOnCommandFail; + } +}); + +// ../cli-utils/lib/style.js +var require_style = __commonJS({ + "../cli-utils/lib/style.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TABLE_OPTIONS = void 0; + var chalk_1 = __importDefault(require_source()); + exports2.TABLE_OPTIONS = { + border: { + topBody: "\u2500", + topJoin: "\u252C", + topLeft: "\u250C", + topRight: "\u2510", + bottomBody: "\u2500", + bottomJoin: "\u2534", + bottomLeft: "\u2514", + bottomRight: "\u2518", + bodyJoin: "\u2502", + bodyLeft: "\u2502", + bodyRight: "\u2502", + joinBody: "\u2500", + joinJoin: "\u253C", + joinLeft: "\u251C", + joinRight: "\u2524" + }, + columns: {} + }; + for (const [key, value] of Object.entries(exports2.TABLE_OPTIONS.border)) { + exports2.TABLE_OPTIONS.border[key] = chalk_1.default.grey(value); + } + } +}); + +// ../cli-utils/lib/index.js +var require_lib20 = __commonJS({ + "../cli-utils/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.docsUrl = exports2.getConfig = void 0; + var cli_meta_1 = __importDefault(require_lib4()); + var getConfig_1 = __importDefault(require_getConfig()); + exports2.getConfig = getConfig_1.default; + __exportStar(require_packageIsInstallable(), exports2); + __exportStar(require_readDepNameCompletions(), exports2); + __exportStar(require_readProjectManifest(), exports2); + __exportStar(require_recursiveSummary(), exports2); + __exportStar(require_style(), exports2); + var docsUrl = (cmd) => { + const [pnpmMajorVersion] = cli_meta_1.default.version.split("."); + return `https://pnpm.io/${pnpmMajorVersion}.x/cli/${cmd}`; + }; + exports2.docsUrl = docsUrl; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/array.js +var require_array2 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/array.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.splitWhen = exports2.flatten = void 0; + function flatten(items) { + return items.reduce((collection, item) => [].concat(collection, item), []); + } + exports2.flatten = flatten; + function splitWhen(items, predicate) { + const result = [[]]; + let groupIndex = 0; + for (const item of items) { + if (predicate(item)) { + groupIndex++; + result[groupIndex] = []; + } else { + result[groupIndex].push(item); + } + } + return result; + } + exports2.splitWhen = splitWhen; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/errno.js +var require_errno = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/errno.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isEnoentCodeError = void 0; + function isEnoentCodeError(error) { + return error.code === "ENOENT"; + } + exports2.isEnoentCodeError = isEnoentCodeError; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/fs.js +var require_fs = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/fs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDirentFromStats = void 0; + var DirentFromStats = class { + constructor(name, stats) { + this.name = name; + this.isBlockDevice = stats.isBlockDevice.bind(stats); + this.isCharacterDevice = stats.isCharacterDevice.bind(stats); + this.isDirectory = stats.isDirectory.bind(stats); + this.isFIFO = stats.isFIFO.bind(stats); + this.isFile = stats.isFile.bind(stats); + this.isSocket = stats.isSocket.bind(stats); + this.isSymbolicLink = stats.isSymbolicLink.bind(stats); + } + }; + function createDirentFromStats(name, stats) { + return new DirentFromStats(name, stats); + } + exports2.createDirentFromStats = createDirentFromStats; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/path.js +var require_path2 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/path.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.removeLeadingDotSegment = exports2.escape = exports2.makeAbsolute = exports2.unixify = void 0; + var path = require("path"); + var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; + var UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g; + function unixify(filepath) { + return filepath.replace(/\\/g, "/"); + } + exports2.unixify = unixify; + function makeAbsolute(cwd, filepath) { + return path.resolve(cwd, filepath); + } + exports2.makeAbsolute = makeAbsolute; + function escape(pattern) { + return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, "\\$2"); + } + exports2.escape = escape; + function removeLeadingDotSegment(entry) { + if (entry.charAt(0) === ".") { + const secondCharactery = entry.charAt(1); + if (secondCharactery === "/" || secondCharactery === "\\") { + return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT); + } + } + return entry; + } + exports2.removeLeadingDotSegment = removeLeadingDotSegment; + } +}); + +// ../../node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.js +var require_is_extglob = __commonJS({ + "../../node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.js"(exports2, module2) { + module2.exports = function isExtglob(str) { + if (typeof str !== "string" || str === "") { + return false; + } + var match; + while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str)) { + if (match[2]) + return true; + str = str.slice(match.index + match[0].length); + } + return false; + }; + } +}); + +// ../../node_modules/.pnpm/is-glob@4.0.1/node_modules/is-glob/index.js +var require_is_glob = __commonJS({ + "../../node_modules/.pnpm/is-glob@4.0.1/node_modules/is-glob/index.js"(exports2, module2) { + var isExtglob = require_is_extglob(); + var chars = { "{": "}", "(": ")", "[": "]" }; + var strictRegex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/; + var relaxedRegex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/; + module2.exports = function isGlob(str, options) { + if (typeof str !== "string" || str === "") { + return false; + } + if (isExtglob(str)) { + return true; + } + var regex = strictRegex; + var match; + if (options && options.strict === false) { + regex = relaxedRegex; + } + while (match = regex.exec(str)) { + if (match[2]) + return true; + var idx = match.index + match[0].length; + var open = match[1]; + var close = open ? chars[open] : null; + if (open && close) { + var n = str.indexOf(close, idx); + if (n !== -1) { + idx = n + 1; + } + } + str = str.slice(idx); + } + return false; + }; + } +}); + +// ../../node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.js +var require_glob_parent = __commonJS({ + "../../node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.js"(exports2, module2) { + "use strict"; + var isGlob = require_is_glob(); + var pathPosixDirname = require("path").posix.dirname; + var isWin32 = require("os").platform() === "win32"; + var slash = "/"; + var backslash = /\\/g; + var enclosure = /[\{\[].*[\}\]]$/; + var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; + var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; + module2.exports = function globParent(str, opts) { + var options = Object.assign({ flipBackslashes: true }, opts); + if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { + str = str.replace(backslash, slash); + } + if (enclosure.test(str)) { + str += slash; + } + str += "a"; + do { + str = pathPosixDirname(str); + } while (isGlob(str) || globby.test(str)); + return str.replace(escaped, "$1"); + }; + } +}); + +// ../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/utils.js +var require_utils3 = __commonJS({ + "../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/utils.js"(exports2) { + "use strict"; + exports2.isInteger = (num) => { + if (typeof num === "number") { + return Number.isInteger(num); + } + if (typeof num === "string" && num.trim() !== "") { + return Number.isInteger(Number(num)); + } + return false; + }; + exports2.find = (node, type) => node.nodes.find((node2) => node2.type === type); + exports2.exceedsLimit = (min, max, step = 1, limit) => { + if (limit === false) + return false; + if (!exports2.isInteger(min) || !exports2.isInteger(max)) + return false; + return (Number(max) - Number(min)) / Number(step) >= limit; + }; + exports2.escapeNode = (block, n = 0, type) => { + let node = block.nodes[n]; + if (!node) + return; + if (type && node.type === type || node.type === "open" || node.type === "close") { + if (node.escaped !== true) { + node.value = "\\" + node.value; + node.escaped = true; + } + } + }; + exports2.encloseBrace = (node) => { + if (node.type !== "brace") + return false; + if (node.commas >> 0 + node.ranges >> 0 === 0) { + node.invalid = true; + return true; + } + return false; + }; + exports2.isInvalidBrace = (block) => { + if (block.type !== "brace") + return false; + if (block.invalid === true || block.dollar) + return true; + if (block.commas >> 0 + block.ranges >> 0 === 0) { + block.invalid = true; + return true; + } + if (block.open !== true || block.close !== true) { + block.invalid = true; + return true; + } + return false; + }; + exports2.isOpenOrClose = (node) => { + if (node.type === "open" || node.type === "close") { + return true; + } + return node.open === true || node.close === true; + }; + exports2.reduce = (nodes) => nodes.reduce((acc, node) => { + if (node.type === "text") + acc.push(node.value); + if (node.type === "range") + node.type = "text"; + return acc; + }, []); + exports2.flatten = (...args2) => { + const result = []; + const flat = (arr) => { + for (let i = 0; i < arr.length; i++) { + let ele = arr[i]; + Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele); + } + return result; + }; + flat(args2); + return result; + }; + } +}); + +// ../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/stringify.js +var require_stringify3 = __commonJS({ + "../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/stringify.js"(exports2, module2) { + "use strict"; + var utils = require_utils3(); + module2.exports = (ast, options = {}) => { + let stringify = (node, parent = {}) => { + let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); + let invalidNode = node.invalid === true && options.escapeInvalid === true; + let output = ""; + if (node.value) { + if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { + return "\\" + node.value; + } + return node.value; + } + if (node.value) { + return node.value; + } + if (node.nodes) { + for (let child of node.nodes) { + output += stringify(child); + } + } + return output; + }; + return stringify(ast); + }; + } +}); + +// ../../node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.js +var require_is_number = __commonJS({ + "../../node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.js"(exports2, module2) { + "use strict"; + module2.exports = function(num) { + if (typeof num === "number") { + return num - num === 0; + } + if (typeof num === "string" && num.trim() !== "") { + return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); + } + return false; + }; + } +}); + +// ../../node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.js +var require_to_regex_range = __commonJS({ + "../../node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.js"(exports2, module2) { + "use strict"; + var isNumber = require_is_number(); + var toRegexRange = (min, max, options) => { + if (isNumber(min) === false) { + throw new TypeError("toRegexRange: expected the first argument to be a number"); + } + if (max === void 0 || min === max) { + return String(min); + } + if (isNumber(max) === false) { + throw new TypeError("toRegexRange: expected the second argument to be a number."); + } + let opts = { relaxZeros: true, ...options }; + if (typeof opts.strictZeros === "boolean") { + opts.relaxZeros = opts.strictZeros === false; + } + let relax = String(opts.relaxZeros); + let shorthand = String(opts.shorthand); + let capture = String(opts.capture); + let wrap = String(opts.wrap); + let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap; + if (toRegexRange.cache.hasOwnProperty(cacheKey)) { + return toRegexRange.cache[cacheKey].result; + } + let a = Math.min(min, max); + let b = Math.max(min, max); + if (Math.abs(a - b) === 1) { + let result = min + "|" + max; + if (opts.capture) { + return `(${result})`; + } + if (opts.wrap === false) { + return result; + } + return `(?:${result})`; + } + let isPadded = hasPadding(min) || hasPadding(max); + let state = { min, max, a, b }; + let positives = []; + let negatives = []; + if (isPadded) { + state.isPadded = isPadded; + state.maxLen = String(state.max).length; + } + if (a < 0) { + let newMin = b < 0 ? Math.abs(b) : 1; + negatives = splitToPatterns(newMin, Math.abs(a), state, opts); + a = state.a = 0; + } + if (b >= 0) { + positives = splitToPatterns(a, b, state, opts); + } + state.negatives = negatives; + state.positives = positives; + state.result = collatePatterns(negatives, positives, opts); + if (opts.capture === true) { + state.result = `(${state.result})`; + } else if (opts.wrap !== false && positives.length + negatives.length > 1) { + state.result = `(?:${state.result})`; + } + toRegexRange.cache[cacheKey] = state; + return state.result; + }; + function collatePatterns(neg, pos, options) { + let onlyNegative = filterPatterns(neg, pos, "-", false, options) || []; + let onlyPositive = filterPatterns(pos, neg, "", false, options) || []; + let intersected = filterPatterns(neg, pos, "-?", true, options) || []; + let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); + return subpatterns.join("|"); + } + function splitToRanges(min, max) { + let nines = 1; + let zeros = 1; + let stop = countNines(min, nines); + let stops = new Set([max]); + while (min <= stop && stop <= max) { + stops.add(stop); + nines += 1; + stop = countNines(min, nines); + } + stop = countZeros(max + 1, zeros) - 1; + while (min < stop && stop <= max) { + stops.add(stop); + zeros += 1; + stop = countZeros(max + 1, zeros) - 1; + } + stops = [...stops]; + stops.sort(compare); + return stops; + } + function rangeToPattern(start, stop, options) { + if (start === stop) { + return { pattern: start, count: [], digits: 0 }; + } + let zipped = zip(start, stop); + let digits = zipped.length; + let pattern = ""; + let count = 0; + for (let i = 0; i < digits; i++) { + let [startDigit, stopDigit] = zipped[i]; + if (startDigit === stopDigit) { + pattern += startDigit; + } else if (startDigit !== "0" || stopDigit !== "9") { + pattern += toCharacterClass(startDigit, stopDigit, options); + } else { + count++; + } + } + if (count) { + pattern += options.shorthand === true ? "\\d" : "[0-9]"; + } + return { pattern, count: [count], digits }; + } + function splitToPatterns(min, max, tok, options) { + let ranges = splitToRanges(min, max); + let tokens = []; + let start = min; + let prev; + for (let i = 0; i < ranges.length; i++) { + let max2 = ranges[i]; + let obj = rangeToPattern(String(start), String(max2), options); + let zeros = ""; + if (!tok.isPadded && prev && prev.pattern === obj.pattern) { + if (prev.count.length > 1) { + prev.count.pop(); + } + prev.count.push(obj.count[0]); + prev.string = prev.pattern + toQuantifier(prev.count); + start = max2 + 1; + continue; + } + if (tok.isPadded) { + zeros = padZeros(max2, tok, options); + } + obj.string = zeros + obj.pattern + toQuantifier(obj.count); + tokens.push(obj); + start = max2 + 1; + prev = obj; + } + return tokens; + } + function filterPatterns(arr, comparison, prefix, intersection, options) { + let result = []; + for (let ele of arr) { + let { string } = ele; + if (!intersection && !contains(comparison, "string", string)) { + result.push(prefix + string); + } + if (intersection && contains(comparison, "string", string)) { + result.push(prefix + string); + } + } + return result; + } + function zip(a, b) { + let arr = []; + for (let i = 0; i < a.length; i++) + arr.push([a[i], b[i]]); + return arr; + } + function compare(a, b) { + return a > b ? 1 : b > a ? -1 : 0; + } + function contains(arr, key, val) { + return arr.some((ele) => ele[key] === val); + } + function countNines(min, len) { + return Number(String(min).slice(0, -len) + "9".repeat(len)); + } + function countZeros(integer, zeros) { + return integer - integer % Math.pow(10, zeros); + } + function toQuantifier(digits) { + let [start = 0, stop = ""] = digits; + if (stop || start > 1) { + return `{${start + (stop ? "," + stop : "")}}`; + } + return ""; + } + function toCharacterClass(a, b, options) { + return `[${a}${b - a === 1 ? "" : "-"}${b}]`; + } + function hasPadding(str) { + return /^-?(0+)\d/.test(str); + } + function padZeros(value, tok, options) { + if (!tok.isPadded) { + return value; + } + let diff = Math.abs(tok.maxLen - String(value).length); + let relax = options.relaxZeros !== false; + switch (diff) { + case 0: + return ""; + case 1: + return relax ? "0?" : "0"; + case 2: + return relax ? "0{0,2}" : "00"; + default: { + return relax ? `0{0,${diff}}` : `0{${diff}}`; + } + } + } + toRegexRange.cache = {}; + toRegexRange.clearCache = () => toRegexRange.cache = {}; + module2.exports = toRegexRange; + } +}); + +// ../../node_modules/.pnpm/fill-range@7.0.1/node_modules/fill-range/index.js +var require_fill_range = __commonJS({ + "../../node_modules/.pnpm/fill-range@7.0.1/node_modules/fill-range/index.js"(exports2, module2) { + "use strict"; + var util = require("util"); + var toRegexRange = require_to_regex_range(); + var isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val); + var transform = (toNumber) => { + return (value) => toNumber === true ? Number(value) : String(value); + }; + var isValidValue = (value) => { + return typeof value === "number" || typeof value === "string" && value !== ""; + }; + var isNumber = (num) => Number.isInteger(+num); + var zeros = (input) => { + let value = `${input}`; + let index = -1; + if (value[0] === "-") + value = value.slice(1); + if (value === "0") + return false; + while (value[++index] === "0") + ; + return index > 0; + }; + var stringify = (start, end, options) => { + if (typeof start === "string" || typeof end === "string") { + return true; + } + return options.stringify === true; + }; + var pad = (input, maxLength, toNumber) => { + if (maxLength > 0) { + let dash = input[0] === "-" ? "-" : ""; + if (dash) + input = input.slice(1); + input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0"); + } + if (toNumber === false) { + return String(input); + } + return input; + }; + var toMaxLen = (input, maxLength) => { + let negative = input[0] === "-" ? "-" : ""; + if (negative) { + input = input.slice(1); + maxLength--; + } + while (input.length < maxLength) + input = "0" + input; + return negative ? "-" + input : input; + }; + var toSequence = (parts, options) => { + parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + let prefix = options.capture ? "" : "?:"; + let positives = ""; + let negatives = ""; + let result; + if (parts.positives.length) { + positives = parts.positives.join("|"); + } + if (parts.negatives.length) { + negatives = `-(${prefix}${parts.negatives.join("|")})`; + } + if (positives && negatives) { + result = `${positives}|${negatives}`; + } else { + result = positives || negatives; + } + if (options.wrap) { + return `(${prefix}${result})`; + } + return result; + }; + var toRange = (a, b, isNumbers, options) => { + if (isNumbers) { + return toRegexRange(a, b, { wrap: false, ...options }); + } + let start = String.fromCharCode(a); + if (a === b) + return start; + let stop = String.fromCharCode(b); + return `[${start}-${stop}]`; + }; + var toRegex = (start, end, options) => { + if (Array.isArray(start)) { + let wrap = options.wrap === true; + let prefix = options.capture ? "" : "?:"; + return wrap ? `(${prefix}${start.join("|")})` : start.join("|"); + } + return toRegexRange(start, end, options); + }; + var rangeError = (...args2) => { + return new RangeError("Invalid range arguments: " + util.inspect(...args2)); + }; + var invalidRange = (start, end, options) => { + if (options.strictRanges === true) + throw rangeError([start, end]); + return []; + }; + var invalidStep = (step, options) => { + if (options.strictRanges === true) { + throw new TypeError(`Expected step "${step}" to be a number`); + } + return []; + }; + var fillNumbers = (start, end, step = 1, options = {}) => { + let a = Number(start); + let b = Number(end); + if (!Number.isInteger(a) || !Number.isInteger(b)) { + if (options.strictRanges === true) + throw rangeError([start, end]); + return []; + } + if (a === 0) + a = 0; + if (b === 0) + b = 0; + let descending = a > b; + let startString = String(start); + let endString = String(end); + let stepString = String(step); + step = Math.max(Math.abs(step), 1); + let padded = zeros(startString) || zeros(endString) || zeros(stepString); + let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; + let toNumber = padded === false && stringify(start, end, options) === false; + let format = options.transform || transform(toNumber); + if (options.toRegex && step === 1) { + return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); + } + let parts = { negatives: [], positives: [] }; + let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)); + let range = []; + let index = 0; + while (descending ? a >= b : a <= b) { + if (options.toRegex === true && step > 1) { + push(a); + } else { + range.push(pad(format(a, index), maxLen, toNumber)); + } + a = descending ? a - step : a + step; + index++; + } + if (options.toRegex === true) { + return step > 1 ? toSequence(parts, options) : toRegex(range, null, { wrap: false, ...options }); + } + return range; + }; + var fillLetters = (start, end, step = 1, options = {}) => { + if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) { + return invalidRange(start, end, options); + } + let format = options.transform || ((val) => String.fromCharCode(val)); + let a = `${start}`.charCodeAt(0); + let b = `${end}`.charCodeAt(0); + let descending = a > b; + let min = Math.min(a, b); + let max = Math.max(a, b); + if (options.toRegex && step === 1) { + return toRange(min, max, false, options); + } + let range = []; + let index = 0; + while (descending ? a >= b : a <= b) { + range.push(format(a, index)); + a = descending ? a - step : a + step; + index++; + } + if (options.toRegex === true) { + return toRegex(range, null, { wrap: false, options }); + } + return range; + }; + var fill = (start, end, step, options = {}) => { + if (end == null && isValidValue(start)) { + return [start]; + } + if (!isValidValue(start) || !isValidValue(end)) { + return invalidRange(start, end, options); + } + if (typeof step === "function") { + return fill(start, end, 1, { transform: step }); + } + if (isObject(step)) { + return fill(start, end, 0, step); + } + let opts = { ...options }; + if (opts.capture === true) + opts.wrap = true; + step = step || opts.step || 1; + if (!isNumber(step)) { + if (step != null && !isObject(step)) + return invalidStep(step, opts); + return fill(start, end, 1, step); + } + if (isNumber(start) && isNumber(end)) { + return fillNumbers(start, end, step, opts); + } + return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); + }; + module2.exports = fill; + } +}); + +// ../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/compile.js +var require_compile = __commonJS({ + "../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/compile.js"(exports2, module2) { + "use strict"; + var fill = require_fill_range(); + var utils = require_utils3(); + var compile = (ast, options = {}) => { + let walk = (node, parent = {}) => { + let invalidBlock = utils.isInvalidBrace(parent); + let invalidNode = node.invalid === true && options.escapeInvalid === true; + let invalid = invalidBlock === true || invalidNode === true; + let prefix = options.escapeInvalid === true ? "\\" : ""; + let output = ""; + if (node.isOpen === true) { + return prefix + node.value; + } + if (node.isClose === true) { + return prefix + node.value; + } + if (node.type === "open") { + return invalid ? prefix + node.value : "("; + } + if (node.type === "close") { + return invalid ? prefix + node.value : ")"; + } + if (node.type === "comma") { + return node.prev.type === "comma" ? "" : invalid ? node.value : "|"; + } + if (node.value) { + return node.value; + } + if (node.nodes && node.ranges > 0) { + let args2 = utils.reduce(node.nodes); + let range = fill(...args2, { ...options, wrap: false, toRegex: true }); + if (range.length !== 0) { + return args2.length > 1 && range.length > 1 ? `(${range})` : range; + } + } + if (node.nodes) { + for (let child of node.nodes) { + output += walk(child, node); + } + } + return output; + }; + return walk(ast); + }; + module2.exports = compile; + } +}); + +// ../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/expand.js +var require_expand2 = __commonJS({ + "../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/expand.js"(exports2, module2) { + "use strict"; + var fill = require_fill_range(); + var stringify = require_stringify3(); + var utils = require_utils3(); + var append = (queue = "", stash = "", enclose = false) => { + let result = []; + queue = [].concat(queue); + stash = [].concat(stash); + if (!stash.length) + return queue; + if (!queue.length) { + return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash; + } + for (let item of queue) { + if (Array.isArray(item)) { + for (let value of item) { + result.push(append(value, stash, enclose)); + } + } else { + for (let ele of stash) { + if (enclose === true && typeof ele === "string") + ele = `{${ele}}`; + result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele); + } + } + } + return utils.flatten(result); + }; + var expand = (ast, options = {}) => { + let rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit; + let walk = (node, parent = {}) => { + node.queue = []; + let p = parent; + let q = parent.queue; + while (p.type !== "brace" && p.type !== "root" && p.parent) { + p = p.parent; + q = p.queue; + } + if (node.invalid || node.dollar) { + q.push(append(q.pop(), stringify(node, options))); + return; + } + if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) { + q.push(append(q.pop(), ["{}"])); + return; + } + if (node.nodes && node.ranges > 0) { + let args2 = utils.reduce(node.nodes); + if (utils.exceedsLimit(...args2, options.step, rangeLimit)) { + throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit."); + } + let range = fill(...args2, options); + if (range.length === 0) { + range = stringify(node, options); + } + q.push(append(q.pop(), range)); + node.nodes = []; + return; + } + let enclose = utils.encloseBrace(node); + let queue = node.queue; + let block = node; + while (block.type !== "brace" && block.type !== "root" && block.parent) { + block = block.parent; + queue = block.queue; + } + for (let i = 0; i < node.nodes.length; i++) { + let child = node.nodes[i]; + if (child.type === "comma" && node.type === "brace") { + if (i === 1) + queue.push(""); + queue.push(""); + continue; + } + if (child.type === "close") { + q.push(append(q.pop(), queue, enclose)); + continue; + } + if (child.value && child.type !== "open") { + queue.push(append(queue.pop(), child.value)); + continue; + } + if (child.nodes) { + walk(child, node); + } + } + return queue; + }; + return utils.flatten(walk(ast)); + }; + module2.exports = expand; + } +}); + +// ../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/constants.js +var require_constants4 = __commonJS({ + "../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/constants.js"(exports2, module2) { + "use strict"; + module2.exports = { + MAX_LENGTH: 1024 * 64, + CHAR_0: "0", + CHAR_9: "9", + CHAR_UPPERCASE_A: "A", + CHAR_LOWERCASE_A: "a", + CHAR_UPPERCASE_Z: "Z", + CHAR_LOWERCASE_Z: "z", + CHAR_LEFT_PARENTHESES: "(", + CHAR_RIGHT_PARENTHESES: ")", + CHAR_ASTERISK: "*", + CHAR_AMPERSAND: "&", + CHAR_AT: "@", + CHAR_BACKSLASH: "\\", + CHAR_BACKTICK: "`", + CHAR_CARRIAGE_RETURN: "\r", + CHAR_CIRCUMFLEX_ACCENT: "^", + CHAR_COLON: ":", + CHAR_COMMA: ",", + CHAR_DOLLAR: "$", + CHAR_DOT: ".", + CHAR_DOUBLE_QUOTE: '"', + CHAR_EQUAL: "=", + CHAR_EXCLAMATION_MARK: "!", + CHAR_FORM_FEED: "\f", + CHAR_FORWARD_SLASH: "/", + CHAR_HASH: "#", + CHAR_HYPHEN_MINUS: "-", + CHAR_LEFT_ANGLE_BRACKET: "<", + CHAR_LEFT_CURLY_BRACE: "{", + CHAR_LEFT_SQUARE_BRACKET: "[", + CHAR_LINE_FEED: "\n", + CHAR_NO_BREAK_SPACE: "\xA0", + CHAR_PERCENT: "%", + CHAR_PLUS: "+", + CHAR_QUESTION_MARK: "?", + CHAR_RIGHT_ANGLE_BRACKET: ">", + CHAR_RIGHT_CURLY_BRACE: "}", + CHAR_RIGHT_SQUARE_BRACKET: "]", + CHAR_SEMICOLON: ";", + CHAR_SINGLE_QUOTE: "'", + CHAR_SPACE: " ", + CHAR_TAB: " ", + CHAR_UNDERSCORE: "_", + CHAR_VERTICAL_LINE: "|", + CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF" + }; + } +}); + +// ../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.js +var require_parse3 = __commonJS({ + "../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.js"(exports2, module2) { + "use strict"; + var stringify = require_stringify3(); + var { + MAX_LENGTH, + CHAR_BACKSLASH, + CHAR_BACKTICK, + CHAR_COMMA, + CHAR_DOT, + CHAR_LEFT_PARENTHESES, + CHAR_RIGHT_PARENTHESES, + CHAR_LEFT_CURLY_BRACE, + CHAR_RIGHT_CURLY_BRACE, + CHAR_LEFT_SQUARE_BRACKET, + CHAR_RIGHT_SQUARE_BRACKET, + CHAR_DOUBLE_QUOTE, + CHAR_SINGLE_QUOTE, + CHAR_NO_BREAK_SPACE, + CHAR_ZERO_WIDTH_NOBREAK_SPACE + } = require_constants4(); + var parse = (input, options = {}) => { + if (typeof input !== "string") { + throw new TypeError("Expected a string"); + } + let opts = options || {}; + let max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + if (input.length > max) { + throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); + } + let ast = { type: "root", input, nodes: [] }; + let stack2 = [ast]; + let block = ast; + let prev = ast; + let brackets = 0; + let length = input.length; + let index = 0; + let depth = 0; + let value; + let memo = {}; + const advance = () => input[index++]; + const push = (node) => { + if (node.type === "text" && prev.type === "dot") { + prev.type = "text"; + } + if (prev && prev.type === "text" && node.type === "text") { + prev.value += node.value; + return; + } + block.nodes.push(node); + node.parent = block; + node.prev = prev; + prev = node; + return node; + }; + push({ type: "bos" }); + while (index < length) { + block = stack2[stack2.length - 1]; + value = advance(); + if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { + continue; + } + if (value === CHAR_BACKSLASH) { + push({ type: "text", value: (options.keepEscaping ? value : "") + advance() }); + continue; + } + if (value === CHAR_RIGHT_SQUARE_BRACKET) { + push({ type: "text", value: "\\" + value }); + continue; + } + if (value === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + let closed = true; + let next; + while (index < length && (next = advance())) { + value += next; + if (next === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + continue; + } + if (next === CHAR_BACKSLASH) { + value += advance(); + continue; + } + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + brackets--; + if (brackets === 0) { + break; + } + } + } + push({ type: "text", value }); + continue; + } + if (value === CHAR_LEFT_PARENTHESES) { + block = push({ type: "paren", nodes: [] }); + stack2.push(block); + push({ type: "text", value }); + continue; + } + if (value === CHAR_RIGHT_PARENTHESES) { + if (block.type !== "paren") { + push({ type: "text", value }); + continue; + } + block = stack2.pop(); + push({ type: "text", value }); + block = stack2[stack2.length - 1]; + continue; + } + if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { + let open = value; + let next; + if (options.keepQuotes !== true) { + value = ""; + } + while (index < length && (next = advance())) { + if (next === CHAR_BACKSLASH) { + value += next + advance(); + continue; + } + if (next === open) { + if (options.keepQuotes === true) + value += next; + break; + } + value += next; + } + push({ type: "text", value }); + continue; + } + if (value === CHAR_LEFT_CURLY_BRACE) { + depth++; + let dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true; + let brace = { + type: "brace", + open: true, + close: false, + dollar, + depth, + commas: 0, + ranges: 0, + nodes: [] + }; + block = push(brace); + stack2.push(block); + push({ type: "open", value }); + continue; + } + if (value === CHAR_RIGHT_CURLY_BRACE) { + if (block.type !== "brace") { + push({ type: "text", value }); + continue; + } + let type = "close"; + block = stack2.pop(); + block.close = true; + push({ type, value }); + depth--; + block = stack2[stack2.length - 1]; + continue; + } + if (value === CHAR_COMMA && depth > 0) { + if (block.ranges > 0) { + block.ranges = 0; + let open = block.nodes.shift(); + block.nodes = [open, { type: "text", value: stringify(block) }]; + } + push({ type: "comma", value }); + block.commas++; + continue; + } + if (value === CHAR_DOT && depth > 0 && block.commas === 0) { + let siblings = block.nodes; + if (depth === 0 || siblings.length === 0) { + push({ type: "text", value }); + continue; + } + if (prev.type === "dot") { + block.range = []; + prev.value += value; + prev.type = "range"; + if (block.nodes.length !== 3 && block.nodes.length !== 5) { + block.invalid = true; + block.ranges = 0; + prev.type = "text"; + continue; + } + block.ranges++; + block.args = []; + continue; + } + if (prev.type === "range") { + siblings.pop(); + let before = siblings[siblings.length - 1]; + before.value += prev.value + value; + prev = before; + block.ranges--; + continue; + } + push({ type: "dot", value }); + continue; + } + push({ type: "text", value }); + } + do { + block = stack2.pop(); + if (block.type !== "root") { + block.nodes.forEach((node) => { + if (!node.nodes) { + if (node.type === "open") + node.isOpen = true; + if (node.type === "close") + node.isClose = true; + if (!node.nodes) + node.type = "text"; + node.invalid = true; + } + }); + let parent = stack2[stack2.length - 1]; + let index2 = parent.nodes.indexOf(block); + parent.nodes.splice(index2, 1, ...block.nodes); + } + } while (stack2.length > 0); + push({ type: "eos" }); + return ast; + }; + module2.exports = parse; + } +}); + +// ../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/index.js +var require_braces = __commonJS({ + "../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/index.js"(exports2, module2) { + "use strict"; + var stringify = require_stringify3(); + var compile = require_compile(); + var expand = require_expand2(); + var parse = require_parse3(); + var braces = (input, options = {}) => { + let output = []; + if (Array.isArray(input)) { + for (let pattern of input) { + let result = braces.create(pattern, options); + if (Array.isArray(result)) { + output.push(...result); + } else { + output.push(result); + } + } + } else { + output = [].concat(braces.create(input, options)); + } + if (options && options.expand === true && options.nodupes === true) { + output = [...new Set(output)]; + } + return output; + }; + braces.parse = (input, options = {}) => parse(input, options); + braces.stringify = (input, options = {}) => { + if (typeof input === "string") { + return stringify(braces.parse(input, options), options); + } + return stringify(input, options); + }; + braces.compile = (input, options = {}) => { + if (typeof input === "string") { + input = braces.parse(input, options); + } + return compile(input, options); + }; + braces.expand = (input, options = {}) => { + if (typeof input === "string") { + input = braces.parse(input, options); + } + let result = expand(input, options); + if (options.noempty === true) { + result = result.filter(Boolean); + } + if (options.nodupes === true) { + result = [...new Set(result)]; + } + return result; + }; + braces.create = (input, options = {}) => { + if (input === "" || input.length < 3) { + return [input]; + } + return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options); + }; + module2.exports = braces; + } +}); + +// ../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/lib/constants.js +var require_constants5 = __commonJS({ + "../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/lib/constants.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var WIN_SLASH = "\\\\/"; + var WIN_NO_SLASH = `[^${WIN_SLASH}]`; + var DOT_LITERAL = "\\."; + var PLUS_LITERAL = "\\+"; + var QMARK_LITERAL = "\\?"; + var SLASH_LITERAL = "\\/"; + var ONE_CHAR = "(?=.)"; + var QMARK = "[^/]"; + var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; + var START_ANCHOR = `(?:^|${SLASH_LITERAL})`; + var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; + var NO_DOT = `(?!${DOT_LITERAL})`; + var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; + var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; + var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; + var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; + var STAR = `${QMARK}*?`; + var POSIX_CHARS = { + DOT_LITERAL, + PLUS_LITERAL, + QMARK_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + QMARK, + END_ANCHOR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK_NO_DOT, + STAR, + START_ANCHOR + }; + var WINDOWS_CHARS = { + ...POSIX_CHARS, + SLASH_LITERAL: `[${WIN_SLASH}]`, + QMARK: WIN_NO_SLASH, + STAR: `${WIN_NO_SLASH}*?`, + DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, + NO_DOT: `(?!${DOT_LITERAL})`, + NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, + NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + QMARK_NO_DOT: `[^.${WIN_SLASH}]`, + START_ANCHOR: `(?:^|[${WIN_SLASH}])`, + END_ANCHOR: `(?:[${WIN_SLASH}]|$)` + }; + var POSIX_REGEX_SOURCE = { + alnum: "a-zA-Z0-9", + alpha: "a-zA-Z", + ascii: "\\x00-\\x7F", + blank: " \\t", + cntrl: "\\x00-\\x1F\\x7F", + digit: "0-9", + graph: "\\x21-\\x7E", + lower: "a-z", + print: "\\x20-\\x7E ", + punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~", + space: " \\t\\r\\n\\v\\f", + upper: "A-Z", + word: "A-Za-z0-9_", + xdigit: "A-Fa-f0-9" + }; + module2.exports = { + MAX_LENGTH: 1024 * 64, + POSIX_REGEX_SOURCE, + REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, + REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, + REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, + REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, + REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, + REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, + REPLACEMENTS: { + "***": "*", + "**/**": "**", + "**/**/**": "**" + }, + CHAR_0: 48, + CHAR_9: 57, + CHAR_UPPERCASE_A: 65, + CHAR_LOWERCASE_A: 97, + CHAR_UPPERCASE_Z: 90, + CHAR_LOWERCASE_Z: 122, + CHAR_LEFT_PARENTHESES: 40, + CHAR_RIGHT_PARENTHESES: 41, + CHAR_ASTERISK: 42, + CHAR_AMPERSAND: 38, + CHAR_AT: 64, + CHAR_BACKWARD_SLASH: 92, + CHAR_CARRIAGE_RETURN: 13, + CHAR_CIRCUMFLEX_ACCENT: 94, + CHAR_COLON: 58, + CHAR_COMMA: 44, + CHAR_DOT: 46, + CHAR_DOUBLE_QUOTE: 34, + CHAR_EQUAL: 61, + CHAR_EXCLAMATION_MARK: 33, + CHAR_FORM_FEED: 12, + CHAR_FORWARD_SLASH: 47, + CHAR_GRAVE_ACCENT: 96, + CHAR_HASH: 35, + CHAR_HYPHEN_MINUS: 45, + CHAR_LEFT_ANGLE_BRACKET: 60, + CHAR_LEFT_CURLY_BRACE: 123, + CHAR_LEFT_SQUARE_BRACKET: 91, + CHAR_LINE_FEED: 10, + CHAR_NO_BREAK_SPACE: 160, + CHAR_PERCENT: 37, + CHAR_PLUS: 43, + CHAR_QUESTION_MARK: 63, + CHAR_RIGHT_ANGLE_BRACKET: 62, + CHAR_RIGHT_CURLY_BRACE: 125, + CHAR_RIGHT_SQUARE_BRACKET: 93, + CHAR_SEMICOLON: 59, + CHAR_SINGLE_QUOTE: 39, + CHAR_SPACE: 32, + CHAR_TAB: 9, + CHAR_UNDERSCORE: 95, + CHAR_VERTICAL_LINE: 124, + CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, + SEP: path.sep, + extglobChars(chars) { + return { + "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` }, + "?": { type: "qmark", open: "(?:", close: ")?" }, + "+": { type: "plus", open: "(?:", close: ")+" }, + "*": { type: "star", open: "(?:", close: ")*" }, + "@": { type: "at", open: "(?:", close: ")" } + }; + }, + globChars(win32) { + return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; + } + }; + } +}); + +// ../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/lib/utils.js +var require_utils4 = __commonJS({ + "../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/lib/utils.js"(exports2) { + "use strict"; + var path = require("path"); + var win32 = process.platform === "win32"; + var { + REGEX_BACKSLASH, + REGEX_REMOVE_BACKSLASH, + REGEX_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_GLOBAL + } = require_constants5(); + exports2.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val); + exports2.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str); + exports2.isRegexChar = (str) => str.length === 1 && exports2.hasRegexChars(str); + exports2.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); + exports2.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/"); + exports2.removeBackslashes = (str) => { + return str.replace(REGEX_REMOVE_BACKSLASH, (match) => { + return match === "\\" ? "" : match; + }); + }; + exports2.supportsLookbehinds = () => { + const segs = process.version.slice(1).split(".").map(Number); + if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) { + return true; + } + return false; + }; + exports2.isWindows = (options) => { + if (options && typeof options.windows === "boolean") { + return options.windows; + } + return win32 === true || path.sep === "\\"; + }; + exports2.escapeLast = (input, char, lastIdx) => { + const idx = input.lastIndexOf(char, lastIdx); + if (idx === -1) + return input; + if (input[idx - 1] === "\\") + return exports2.escapeLast(input, char, idx - 1); + return `${input.slice(0, idx)}\\${input.slice(idx)}`; + }; + exports2.removePrefix = (input, state = {}) => { + let output = input; + if (output.startsWith("./")) { + output = output.slice(2); + state.prefix = "./"; + } + return output; + }; + exports2.wrapOutput = (input, state = {}, options = {}) => { + const prepend = options.contains ? "" : "^"; + const append = options.contains ? "" : "$"; + let output = `${prepend}(?:${input})${append}`; + if (state.negated === true) { + output = `(?:^(?!${output}).*$)`; + } + return output; + }; + } +}); + +// ../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/lib/scan.js +var require_scan2 = __commonJS({ + "../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/lib/scan.js"(exports2, module2) { + "use strict"; + var utils = require_utils4(); + var { + CHAR_ASTERISK, + CHAR_AT, + CHAR_BACKWARD_SLASH, + CHAR_COMMA, + CHAR_DOT, + CHAR_EXCLAMATION_MARK, + CHAR_FORWARD_SLASH, + CHAR_LEFT_CURLY_BRACE, + CHAR_LEFT_PARENTHESES, + CHAR_LEFT_SQUARE_BRACKET, + CHAR_PLUS, + CHAR_QUESTION_MARK, + CHAR_RIGHT_CURLY_BRACE, + CHAR_RIGHT_PARENTHESES, + CHAR_RIGHT_SQUARE_BRACKET + } = require_constants5(); + var isPathSeparator = (code) => { + return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; + }; + var depth = (token) => { + if (token.isPrefix !== true) { + token.depth = token.isGlobstar ? Infinity : 1; + } + }; + var scan = (input, options) => { + const opts = options || {}; + const length = input.length - 1; + const scanToEnd = opts.parts === true || opts.scanToEnd === true; + const slashes = []; + const tokens = []; + const parts = []; + let str = input; + let index = -1; + let start = 0; + let lastIndex = 0; + let isBrace = false; + let isBracket = false; + let isGlob = false; + let isExtglob = false; + let isGlobstar = false; + let braceEscaped = false; + let backslashes = false; + let negated = false; + let negatedExtglob = false; + let finished = false; + let braces = 0; + let prev; + let code; + let token = { value: "", depth: 0, isGlob: false }; + const eos = () => index >= length; + const peek = () => str.charCodeAt(index + 1); + const advance = () => { + prev = code; + return str.charCodeAt(++index); + }; + while (index < length) { + code = advance(); + let next; + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + if (code === CHAR_LEFT_CURLY_BRACE) { + braceEscaped = true; + } + continue; + } + if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { + braces++; + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + if (code === CHAR_LEFT_CURLY_BRACE) { + braces++; + continue; + } + if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + if (braceEscaped !== true && code === CHAR_COMMA) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + if (code === CHAR_RIGHT_CURLY_BRACE) { + braces--; + if (braces === 0) { + braceEscaped = false; + isBrace = token.isBrace = true; + finished = true; + break; + } + } + } + if (scanToEnd === true) { + continue; + } + break; + } + if (code === CHAR_FORWARD_SLASH) { + slashes.push(index); + tokens.push(token); + token = { value: "", depth: 0, isGlob: false }; + if (finished === true) + continue; + if (prev === CHAR_DOT && index === start + 1) { + start += 2; + continue; + } + lastIndex = index + 1; + continue; + } + if (opts.noext !== true) { + const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK; + if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + isExtglob = token.isExtglob = true; + finished = true; + if (code === CHAR_EXCLAMATION_MARK && index === start) { + negatedExtglob = true; + } + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + if (code === CHAR_RIGHT_PARENTHESES) { + isGlob = token.isGlob = true; + finished = true; + break; + } + } + continue; + } + break; + } + } + if (code === CHAR_ASTERISK) { + if (prev === CHAR_ASTERISK) + isGlobstar = token.isGlobstar = true; + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + if (code === CHAR_QUESTION_MARK) { + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + if (code === CHAR_LEFT_SQUARE_BRACKET) { + while (eos() !== true && (next = advance())) { + if (next === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + isBracket = token.isBracket = true; + isGlob = token.isGlob = true; + finished = true; + break; + } + } + if (scanToEnd === true) { + continue; + } + break; + } + if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { + negated = token.negated = true; + start++; + continue; + } + if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_LEFT_PARENTHESES) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + if (code === CHAR_RIGHT_PARENTHESES) { + finished = true; + break; + } + } + continue; + } + break; + } + if (isGlob === true) { + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + } + if (opts.noext === true) { + isExtglob = false; + isGlob = false; + } + let base = str; + let prefix = ""; + let glob = ""; + if (start > 0) { + prefix = str.slice(0, start); + str = str.slice(start); + lastIndex -= start; + } + if (base && isGlob === true && lastIndex > 0) { + base = str.slice(0, lastIndex); + glob = str.slice(lastIndex); + } else if (isGlob === true) { + base = ""; + glob = str; + } else { + base = str; + } + if (base && base !== "" && base !== "/" && base !== str) { + if (isPathSeparator(base.charCodeAt(base.length - 1))) { + base = base.slice(0, -1); + } + } + if (opts.unescape === true) { + if (glob) + glob = utils.removeBackslashes(glob); + if (base && backslashes === true) { + base = utils.removeBackslashes(base); + } + } + const state = { + prefix, + input, + start, + base, + glob, + isBrace, + isBracket, + isGlob, + isExtglob, + isGlobstar, + negated, + negatedExtglob + }; + if (opts.tokens === true) { + state.maxDepth = 0; + if (!isPathSeparator(code)) { + tokens.push(token); + } + state.tokens = tokens; + } + if (opts.parts === true || opts.tokens === true) { + let prevIndex; + for (let idx = 0; idx < slashes.length; idx++) { + const n = prevIndex ? prevIndex + 1 : start; + const i = slashes[idx]; + const value = input.slice(n, i); + if (opts.tokens) { + if (idx === 0 && start !== 0) { + tokens[idx].isPrefix = true; + tokens[idx].value = prefix; + } else { + tokens[idx].value = value; + } + depth(tokens[idx]); + state.maxDepth += tokens[idx].depth; + } + if (idx !== 0 || value !== "") { + parts.push(value); + } + prevIndex = i; + } + if (prevIndex && prevIndex + 1 < input.length) { + const value = input.slice(prevIndex + 1); + parts.push(value); + if (opts.tokens) { + tokens[tokens.length - 1].value = value; + depth(tokens[tokens.length - 1]); + state.maxDepth += tokens[tokens.length - 1].depth; + } + } + state.slashes = slashes; + state.parts = parts; + } + return state; + }; + module2.exports = scan; + } +}); + +// ../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/lib/parse.js +var require_parse4 = __commonJS({ + "../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/lib/parse.js"(exports2, module2) { + "use strict"; + var constants = require_constants5(); + var utils = require_utils4(); + var { + MAX_LENGTH, + POSIX_REGEX_SOURCE, + REGEX_NON_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_BACKREF, + REPLACEMENTS + } = constants; + var expandRange = (args2, options) => { + if (typeof options.expandRange === "function") { + return options.expandRange(...args2, options); + } + args2.sort(); + const value = `[${args2.join("-")}]`; + try { + new RegExp(value); + } catch (ex) { + return args2.map((v) => utils.escapeRegex(v)).join(".."); + } + return value; + }; + var syntaxError = (type, char) => { + return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; + }; + var parse = (input, options) => { + if (typeof input !== "string") { + throw new TypeError("Expected a string"); + } + input = REPLACEMENTS[input] || input; + const opts = { ...options }; + const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + let len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + const bos = { type: "bos", value: "", output: opts.prepend || "" }; + const tokens = [bos]; + const capture = opts.capture ? "" : "?:"; + const win32 = utils.isWindows(options); + const PLATFORM_CHARS = constants.globChars(win32); + const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); + const { + DOT_LITERAL, + PLUS_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK, + QMARK_NO_DOT, + STAR, + START_ANCHOR + } = PLATFORM_CHARS; + const globstar = (opts2) => { + return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + const nodot = opts.dot ? "" : NO_DOT; + const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; + let star = opts.bash === true ? globstar(opts) : STAR; + if (opts.capture) { + star = `(${star})`; + } + if (typeof opts.noext === "boolean") { + opts.noextglob = opts.noext; + } + const state = { + input, + index: -1, + start: 0, + dot: opts.dot === true, + consumed: "", + output: "", + prefix: "", + backtrack: false, + negated: false, + brackets: 0, + braces: 0, + parens: 0, + quotes: 0, + globstar: false, + tokens + }; + input = utils.removePrefix(input, state); + len = input.length; + const extglobs = []; + const braces = []; + const stack2 = []; + let prev = bos; + let value; + const eos = () => state.index === len - 1; + const peek = state.peek = (n = 1) => input[state.index + n]; + const advance = state.advance = () => input[++state.index] || ""; + const remaining = () => input.slice(state.index + 1); + const consume = (value2 = "", num = 0) => { + state.consumed += value2; + state.index += num; + }; + const append = (token) => { + state.output += token.output != null ? token.output : token.value; + consume(token.value); + }; + const negate = () => { + let count = 1; + while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) { + advance(); + state.start++; + count++; + } + if (count % 2 === 0) { + return false; + } + state.negated = true; + state.start++; + return true; + }; + const increment = (type) => { + state[type]++; + stack2.push(type); + }; + const decrement = (type) => { + state[type]--; + stack2.pop(); + }; + const push = (tok) => { + if (prev.type === "globstar") { + const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace"); + const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren"); + if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) { + state.output = state.output.slice(0, -prev.output.length); + prev.type = "star"; + prev.value = "*"; + prev.output = star; + state.output += prev.output; + } + } + if (extglobs.length && tok.type !== "paren") { + extglobs[extglobs.length - 1].inner += tok.value; + } + if (tok.value || tok.output) + append(tok); + if (prev && prev.type === "text" && tok.type === "text") { + prev.value += tok.value; + prev.output = (prev.output || "") + tok.value; + return; + } + tok.prev = prev; + tokens.push(tok); + prev = tok; + }; + const extglobOpen = (type, value2) => { + const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" }; + token.prev = prev; + token.parens = state.parens; + token.output = state.output; + const output = (opts.capture ? "(" : "") + token.open; + increment("parens"); + push({ type, value: value2, output: state.output ? "" : ONE_CHAR }); + push({ type: "paren", extglob: true, value: advance(), output }); + extglobs.push(token); + }; + const extglobClose = (token) => { + let output = token.close + (opts.capture ? ")" : ""); + let rest; + if (token.type === "negate") { + let extglobStar = star; + if (token.inner && token.inner.length > 1 && token.inner.includes("/")) { + extglobStar = globstar(opts); + } + if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { + output = token.close = `)$))${extglobStar}`; + } + if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { + output = token.close = `)${rest})${extglobStar})`; + } + if (token.prev.type === "bos") { + state.negatedExtglob = true; + } + } + push({ type: "paren", extglob: true, value, output }); + decrement("parens"); + }; + if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { + let backslashes = false; + let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { + if (first === "\\") { + backslashes = true; + return m; + } + if (first === "?") { + if (esc) { + return esc + first + (rest ? QMARK.repeat(rest.length) : ""); + } + if (index === 0) { + return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ""); + } + return QMARK.repeat(chars.length); + } + if (first === ".") { + return DOT_LITERAL.repeat(chars.length); + } + if (first === "*") { + if (esc) { + return esc + first + (rest ? star : ""); + } + return star; + } + return esc ? m : `\\${m}`; + }); + if (backslashes === true) { + if (opts.unescape === true) { + output = output.replace(/\\/g, ""); + } else { + output = output.replace(/\\+/g, (m) => { + return m.length % 2 === 0 ? "\\\\" : m ? "\\" : ""; + }); + } + } + if (output === input && opts.contains === true) { + state.output = input; + return state; + } + state.output = utils.wrapOutput(output, state, options); + return state; + } + while (!eos()) { + value = advance(); + if (value === "\0") { + continue; + } + if (value === "\\") { + const next = peek(); + if (next === "/" && opts.bash !== true) { + continue; + } + if (next === "." || next === ";") { + continue; + } + if (!next) { + value += "\\"; + push({ type: "text", value }); + continue; + } + const match = /^\\+/.exec(remaining()); + let slashes = 0; + if (match && match[0].length > 2) { + slashes = match[0].length; + state.index += slashes; + if (slashes % 2 !== 0) { + value += "\\"; + } + } + if (opts.unescape === true) { + value = advance(); + } else { + value += advance(); + } + if (state.brackets === 0) { + push({ type: "text", value }); + continue; + } + } + if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) { + if (opts.posix !== false && value === ":") { + const inner = prev.value.slice(1); + if (inner.includes("[")) { + prev.posix = true; + if (inner.includes(":")) { + const idx = prev.value.lastIndexOf("["); + const pre = prev.value.slice(0, idx); + const rest2 = prev.value.slice(idx + 2); + const posix = POSIX_REGEX_SOURCE[rest2]; + if (posix) { + prev.value = pre + posix; + state.backtrack = true; + advance(); + if (!bos.output && tokens.indexOf(prev) === 1) { + bos.output = ONE_CHAR; + } + continue; + } + } + } + } + if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") { + value = `\\${value}`; + } + if (value === "]" && (prev.value === "[" || prev.value === "[^")) { + value = `\\${value}`; + } + if (opts.posix === true && value === "!" && prev.value === "[") { + value = "^"; + } + prev.value += value; + append({ value }); + continue; + } + if (state.quotes === 1 && value !== '"') { + value = utils.escapeRegex(value); + prev.value += value; + append({ value }); + continue; + } + if (value === '"') { + state.quotes = state.quotes === 1 ? 0 : 1; + if (opts.keepQuotes === true) { + push({ type: "text", value }); + } + continue; + } + if (value === "(") { + increment("parens"); + push({ type: "paren", value }); + continue; + } + if (value === ")") { + if (state.parens === 0 && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError("opening", "(")); + } + const extglob = extglobs[extglobs.length - 1]; + if (extglob && state.parens === extglob.parens + 1) { + extglobClose(extglobs.pop()); + continue; + } + push({ type: "paren", value, output: state.parens ? ")" : "\\)" }); + decrement("parens"); + continue; + } + if (value === "[") { + if (opts.nobracket === true || !remaining().includes("]")) { + if (opts.nobracket !== true && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError("closing", "]")); + } + value = `\\${value}`; + } else { + increment("brackets"); + } + push({ type: "bracket", value }); + continue; + } + if (value === "]") { + if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) { + push({ type: "text", value, output: `\\${value}` }); + continue; + } + if (state.brackets === 0) { + if (opts.strictBrackets === true) { + throw new SyntaxError(syntaxError("opening", "[")); + } + push({ type: "text", value, output: `\\${value}` }); + continue; + } + decrement("brackets"); + const prevValue = prev.value.slice(1); + if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) { + value = `/${value}`; + } + prev.value += value; + append({ value }); + if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { + continue; + } + const escaped = utils.escapeRegex(prev.value); + state.output = state.output.slice(0, -prev.value.length); + if (opts.literalBrackets === true) { + state.output += escaped; + prev.value = escaped; + continue; + } + prev.value = `(${capture}${escaped}|${prev.value})`; + state.output += prev.value; + continue; + } + if (value === "{" && opts.nobrace !== true) { + increment("braces"); + const open = { + type: "brace", + value, + output: "(", + outputIndex: state.output.length, + tokensIndex: state.tokens.length + }; + braces.push(open); + push(open); + continue; + } + if (value === "}") { + const brace = braces[braces.length - 1]; + if (opts.nobrace === true || !brace) { + push({ type: "text", value, output: value }); + continue; + } + let output = ")"; + if (brace.dots === true) { + const arr = tokens.slice(); + const range = []; + for (let i = arr.length - 1; i >= 0; i--) { + tokens.pop(); + if (arr[i].type === "brace") { + break; + } + if (arr[i].type !== "dots") { + range.unshift(arr[i].value); + } + } + output = expandRange(range, opts); + state.backtrack = true; + } + if (brace.comma !== true && brace.dots !== true) { + const out = state.output.slice(0, brace.outputIndex); + const toks = state.tokens.slice(brace.tokensIndex); + brace.value = brace.output = "\\{"; + value = output = "\\}"; + state.output = out; + for (const t of toks) { + state.output += t.output || t.value; + } + } + push({ type: "brace", value, output }); + decrement("braces"); + braces.pop(); + continue; + } + if (value === "|") { + if (extglobs.length > 0) { + extglobs[extglobs.length - 1].conditions++; + } + push({ type: "text", value }); + continue; + } + if (value === ",") { + let output = value; + const brace = braces[braces.length - 1]; + if (brace && stack2[stack2.length - 1] === "braces") { + brace.comma = true; + output = "|"; + } + push({ type: "comma", value, output }); + continue; + } + if (value === "/") { + if (prev.type === "dot" && state.index === state.start + 1) { + state.start = state.index + 1; + state.consumed = ""; + state.output = ""; + tokens.pop(); + prev = bos; + continue; + } + push({ type: "slash", value, output: SLASH_LITERAL }); + continue; + } + if (value === ".") { + if (state.braces > 0 && prev.type === "dot") { + if (prev.value === ".") + prev.output = DOT_LITERAL; + const brace = braces[braces.length - 1]; + prev.type = "dots"; + prev.output += value; + prev.value += value; + brace.dots = true; + continue; + } + if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") { + push({ type: "text", value, output: DOT_LITERAL }); + continue; + } + push({ type: "dot", value, output: DOT_LITERAL }); + continue; + } + if (value === "?") { + const isGroup = prev && prev.value === "("; + if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { + extglobOpen("qmark", value); + continue; + } + if (prev && prev.type === "paren") { + const next = peek(); + let output = value; + if (next === "<" && !utils.supportsLookbehinds()) { + throw new Error("Node.js v10 or higher is required for regex lookbehinds"); + } + if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) { + output = `\\${value}`; + } + push({ type: "text", value, output }); + continue; + } + if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) { + push({ type: "qmark", value, output: QMARK_NO_DOT }); + continue; + } + push({ type: "qmark", value, output: QMARK }); + continue; + } + if (value === "!") { + if (opts.noextglob !== true && peek() === "(") { + if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) { + extglobOpen("negate", value); + continue; + } + } + if (opts.nonegate !== true && state.index === 0) { + negate(); + continue; + } + } + if (value === "+") { + if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { + extglobOpen("plus", value); + continue; + } + if (prev && prev.value === "(" || opts.regex === false) { + push({ type: "plus", value, output: PLUS_LITERAL }); + continue; + } + if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) { + push({ type: "plus", value }); + continue; + } + push({ type: "plus", value: PLUS_LITERAL }); + continue; + } + if (value === "@") { + if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { + push({ type: "at", extglob: true, value, output: "" }); + continue; + } + push({ type: "text", value }); + continue; + } + if (value !== "*") { + if (value === "$" || value === "^") { + value = `\\${value}`; + } + const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); + if (match) { + value += match[0]; + state.index += match[0].length; + } + push({ type: "text", value }); + continue; + } + if (prev && (prev.type === "globstar" || prev.star === true)) { + prev.type = "star"; + prev.star = true; + prev.value += value; + prev.output = star; + state.backtrack = true; + state.globstar = true; + consume(value); + continue; + } + let rest = remaining(); + if (opts.noextglob !== true && /^\([^?]/.test(rest)) { + extglobOpen("star", value); + continue; + } + if (prev.type === "star") { + if (opts.noglobstar === true) { + consume(value); + continue; + } + const prior = prev.prev; + const before = prior.prev; + const isStart = prior.type === "slash" || prior.type === "bos"; + const afterStar = before && (before.type === "star" || before.type === "globstar"); + if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) { + push({ type: "star", value, output: "" }); + continue; + } + const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace"); + const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren"); + if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) { + push({ type: "star", value, output: "" }); + continue; + } + while (rest.slice(0, 3) === "/**") { + const after = input[state.index + 4]; + if (after && after !== "/") { + break; + } + rest = rest.slice(3); + consume("/**", 3); + } + if (prior.type === "bos" && eos()) { + prev.type = "globstar"; + prev.value += value; + prev.output = globstar(opts); + state.output = prev.output; + state.globstar = true; + consume(value); + continue; + } + if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) { + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + prev.type = "globstar"; + prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)"); + prev.value += value; + state.globstar = true; + state.output += prior.output + prev.output; + consume(value); + continue; + } + if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") { + const end = rest[1] !== void 0 ? "|$" : ""; + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + prev.type = "globstar"; + prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; + prev.value += value; + state.output += prior.output + prev.output; + state.globstar = true; + consume(value + advance()); + push({ type: "slash", value: "/", output: "" }); + continue; + } + if (prior.type === "bos" && rest[0] === "/") { + prev.type = "globstar"; + prev.value += value; + prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; + state.output = prev.output; + state.globstar = true; + consume(value + advance()); + push({ type: "slash", value: "/", output: "" }); + continue; + } + state.output = state.output.slice(0, -prev.output.length); + prev.type = "globstar"; + prev.output = globstar(opts); + prev.value += value; + state.output += prev.output; + state.globstar = true; + consume(value); + continue; + } + const token = { type: "star", value, output: star }; + if (opts.bash === true) { + token.output = ".*?"; + if (prev.type === "bos" || prev.type === "slash") { + token.output = nodot + token.output; + } + push(token); + continue; + } + if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) { + token.output = value; + push(token); + continue; + } + if (state.index === state.start || prev.type === "slash" || prev.type === "dot") { + if (prev.type === "dot") { + state.output += NO_DOT_SLASH; + prev.output += NO_DOT_SLASH; + } else if (opts.dot === true) { + state.output += NO_DOTS_SLASH; + prev.output += NO_DOTS_SLASH; + } else { + state.output += nodot; + prev.output += nodot; + } + if (peek() !== "*") { + state.output += ONE_CHAR; + prev.output += ONE_CHAR; + } + } + push(token); + } + while (state.brackets > 0) { + if (opts.strictBrackets === true) + throw new SyntaxError(syntaxError("closing", "]")); + state.output = utils.escapeLast(state.output, "["); + decrement("brackets"); + } + while (state.parens > 0) { + if (opts.strictBrackets === true) + throw new SyntaxError(syntaxError("closing", ")")); + state.output = utils.escapeLast(state.output, "("); + decrement("parens"); + } + while (state.braces > 0) { + if (opts.strictBrackets === true) + throw new SyntaxError(syntaxError("closing", "}")); + state.output = utils.escapeLast(state.output, "{"); + decrement("braces"); + } + if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) { + push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` }); + } + if (state.backtrack === true) { + state.output = ""; + for (const token of state.tokens) { + state.output += token.output != null ? token.output : token.value; + if (token.suffix) { + state.output += token.suffix; + } + } + } + return state; + }; + parse.fastpaths = (input, options) => { + const opts = { ...options }; + const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + const len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + input = REPLACEMENTS[input] || input; + const win32 = utils.isWindows(options); + const { + DOT_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOTS_SLASH, + STAR, + START_ANCHOR + } = constants.globChars(win32); + const nodot = opts.dot ? NO_DOTS : NO_DOT; + const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; + const capture = opts.capture ? "" : "?:"; + const state = { negated: false, prefix: "" }; + let star = opts.bash === true ? ".*?" : STAR; + if (opts.capture) { + star = `(${star})`; + } + const globstar = (opts2) => { + if (opts2.noglobstar === true) + return star; + return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + const create = (str) => { + switch (str) { + case "*": + return `${nodot}${ONE_CHAR}${star}`; + case ".*": + return `${DOT_LITERAL}${ONE_CHAR}${star}`; + case "*.*": + return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + case "*/*": + return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; + case "**": + return nodot + globstar(opts); + case "**/*": + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; + case "**/*.*": + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + case "**/.*": + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; + default: { + const match = /^(.*?)\.(\w+)$/.exec(str); + if (!match) + return; + const source2 = create(match[1]); + if (!source2) + return; + return source2 + DOT_LITERAL + match[2]; + } + } + }; + const output = utils.removePrefix(input, state); + let source = create(output); + if (source && opts.strictSlashes !== true) { + source += `${SLASH_LITERAL}?`; + } + return source; + }; + module2.exports = parse; + } +}); + +// ../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/lib/picomatch.js +var require_picomatch = __commonJS({ + "../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/lib/picomatch.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var scan = require_scan2(); + var parse = require_parse4(); + var utils = require_utils4(); + var constants = require_constants5(); + var isObject = (val) => val && typeof val === "object" && !Array.isArray(val); + var picomatch = (glob, options, returnState = false) => { + if (Array.isArray(glob)) { + const fns = glob.map((input) => picomatch(input, options, returnState)); + const arrayMatcher = (str) => { + for (const isMatch of fns) { + const state2 = isMatch(str); + if (state2) + return state2; + } + return false; + }; + return arrayMatcher; + } + const isState = isObject(glob) && glob.tokens && glob.input; + if (glob === "" || typeof glob !== "string" && !isState) { + throw new TypeError("Expected pattern to be a non-empty string"); + } + const opts = options || {}; + const posix = utils.isWindows(options); + const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true); + const state = regex.state; + delete regex.state; + let isIgnored = () => false; + if (opts.ignore) { + const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; + isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); + } + const matcher = (input, returnObject = false) => { + const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix }); + const result = { glob, state, regex, posix, input, output, match, isMatch }; + if (typeof opts.onResult === "function") { + opts.onResult(result); + } + if (isMatch === false) { + result.isMatch = false; + return returnObject ? result : false; + } + if (isIgnored(input)) { + if (typeof opts.onIgnore === "function") { + opts.onIgnore(result); + } + result.isMatch = false; + return returnObject ? result : false; + } + if (typeof opts.onMatch === "function") { + opts.onMatch(result); + } + return returnObject ? result : true; + }; + if (returnState) { + matcher.state = state; + } + return matcher; + }; + picomatch.test = (input, regex, options, { glob, posix } = {}) => { + if (typeof input !== "string") { + throw new TypeError("Expected input to be a string"); + } + if (input === "") { + return { isMatch: false, output: "" }; + } + const opts = options || {}; + const format = opts.format || (posix ? utils.toPosixSlashes : null); + let match = input === glob; + let output = match && format ? format(input) : input; + if (match === false) { + output = format ? format(input) : input; + match = output === glob; + } + if (match === false || opts.capture === true) { + if (opts.matchBase === true || opts.basename === true) { + match = picomatch.matchBase(input, regex, options, posix); + } else { + match = regex.exec(output); + } + } + return { isMatch: Boolean(match), match, output }; + }; + picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { + const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); + return regex.test(path.basename(input)); + }; + picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); + picomatch.parse = (pattern, options) => { + if (Array.isArray(pattern)) + return pattern.map((p) => picomatch.parse(p, options)); + return parse(pattern, { ...options, fastpaths: false }); + }; + picomatch.scan = (input, options) => scan(input, options); + picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { + if (returnOutput === true) { + return state.output; + } + const opts = options || {}; + const prepend = opts.contains ? "" : "^"; + const append = opts.contains ? "" : "$"; + let source = `${prepend}(?:${state.output})${append}`; + if (state && state.negated === true) { + source = `^(?!${source}).*$`; + } + const regex = picomatch.toRegex(source, options); + if (returnState === true) { + regex.state = state; + } + return regex; + }; + picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { + if (!input || typeof input !== "string") { + throw new TypeError("Expected a non-empty string"); + } + let parsed = { negated: false, fastpaths: true }; + if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) { + parsed.output = parse.fastpaths(input, options); + } + if (!parsed.output) { + parsed = parse(input, options); + } + return picomatch.compileRe(parsed, options, returnOutput, returnState); + }; + picomatch.toRegex = (source, options) => { + try { + const opts = options || {}; + return new RegExp(source, opts.flags || (opts.nocase ? "i" : "")); + } catch (err) { + if (options && options.debug === true) + throw err; + return /$^/; + } + }; + picomatch.constants = constants; + module2.exports = picomatch; + } +}); + +// ../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/index.js +var require_picomatch2 = __commonJS({ + "../../node_modules/.pnpm/picomatch@2.3.0/node_modules/picomatch/index.js"(exports2, module2) { + "use strict"; + module2.exports = require_picomatch(); + } +}); + +// ../../node_modules/.pnpm/micromatch@4.0.4/node_modules/micromatch/index.js +var require_micromatch = __commonJS({ + "../../node_modules/.pnpm/micromatch@4.0.4/node_modules/micromatch/index.js"(exports2, module2) { + "use strict"; + var util = require("util"); + var braces = require_braces(); + var picomatch = require_picomatch2(); + var utils = require_utils4(); + var isEmptyString = (val) => val === "" || val === "./"; + var micromatch = (list, patterns, options) => { + patterns = [].concat(patterns); + list = [].concat(list); + let omit = new Set(); + let keep = new Set(); + let items = new Set(); + let negatives = 0; + let onResult = (state) => { + items.add(state.output); + if (options && options.onResult) { + options.onResult(state); + } + }; + for (let i = 0; i < patterns.length; i++) { + let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true); + let negated = isMatch.state.negated || isMatch.state.negatedExtglob; + if (negated) + negatives++; + for (let item of list) { + let matched = isMatch(item, true); + let match = negated ? !matched.isMatch : matched.isMatch; + if (!match) + continue; + if (negated) { + omit.add(matched.output); + } else { + omit.delete(matched.output); + keep.add(matched.output); + } + } + } + let result = negatives === patterns.length ? [...items] : [...keep]; + let matches = result.filter((item) => !omit.has(item)); + if (options && matches.length === 0) { + if (options.failglob === true) { + throw new Error(`No matches found for "${patterns.join(", ")}"`); + } + if (options.nonull === true || options.nullglob === true) { + return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns; + } + } + return matches; + }; + micromatch.match = micromatch; + micromatch.matcher = (pattern, options) => picomatch(pattern, options); + micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); + micromatch.any = micromatch.isMatch; + micromatch.not = (list, patterns, options = {}) => { + patterns = [].concat(patterns).map(String); + let result = new Set(); + let items = []; + let onResult = (state) => { + if (options.onResult) + options.onResult(state); + items.push(state.output); + }; + let matches = micromatch(list, patterns, { ...options, onResult }); + for (let item of items) { + if (!matches.includes(item)) { + result.add(item); + } + } + return [...result]; + }; + micromatch.contains = (str, pattern, options) => { + if (typeof str !== "string") { + throw new TypeError(`Expected a string: "${util.inspect(str)}"`); + } + if (Array.isArray(pattern)) { + return pattern.some((p) => micromatch.contains(str, p, options)); + } + if (typeof pattern === "string") { + if (isEmptyString(str) || isEmptyString(pattern)) { + return false; + } + if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) { + return true; + } + } + return micromatch.isMatch(str, pattern, { ...options, contains: true }); + }; + micromatch.matchKeys = (obj, patterns, options) => { + if (!utils.isObject(obj)) { + throw new TypeError("Expected the first argument to be an object"); + } + let keys = micromatch(Object.keys(obj), patterns, options); + let res = {}; + for (let key of keys) + res[key] = obj[key]; + return res; + }; + micromatch.some = (list, patterns, options) => { + let items = [].concat(list); + for (let pattern of [].concat(patterns)) { + let isMatch = picomatch(String(pattern), options); + if (items.some((item) => isMatch(item))) { + return true; + } + } + return false; + }; + micromatch.every = (list, patterns, options) => { + let items = [].concat(list); + for (let pattern of [].concat(patterns)) { + let isMatch = picomatch(String(pattern), options); + if (!items.every((item) => isMatch(item))) { + return false; + } + } + return true; + }; + micromatch.all = (str, patterns, options) => { + if (typeof str !== "string") { + throw new TypeError(`Expected a string: "${util.inspect(str)}"`); + } + return [].concat(patterns).every((p) => picomatch(p, options)(str)); + }; + micromatch.capture = (glob, input, options) => { + let posix = utils.isWindows(options); + let regex = picomatch.makeRe(String(glob), { ...options, capture: true }); + let match = regex.exec(posix ? utils.toPosixSlashes(input) : input); + if (match) { + return match.slice(1).map((v) => v === void 0 ? "" : v); + } + }; + micromatch.makeRe = (...args2) => picomatch.makeRe(...args2); + micromatch.scan = (...args2) => picomatch.scan(...args2); + micromatch.parse = (patterns, options) => { + let res = []; + for (let pattern of [].concat(patterns || [])) { + for (let str of braces(String(pattern), options)) { + res.push(picomatch.parse(str, options)); + } + } + return res; + }; + micromatch.braces = (pattern, options) => { + if (typeof pattern !== "string") + throw new TypeError("Expected a string"); + if (options && options.nobrace === true || !/\{.*\}/.test(pattern)) { + return [pattern]; + } + return braces(pattern, options); + }; + micromatch.braceExpand = (pattern, options) => { + if (typeof pattern !== "string") + throw new TypeError("Expected a string"); + return micromatch.braces(pattern, { ...options, expand: true }); + }; + module2.exports = micromatch; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/pattern.js +var require_pattern = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/pattern.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0; + var path = require("path"); + var globParent = require_glob_parent(); + var micromatch = require_micromatch(); + var GLOBSTAR = "**"; + var ESCAPE_SYMBOL = "\\"; + var COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/; + var REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[.*]/; + var REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\(.*\|.*\)/; + var GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\(.*\)/; + var BRACE_EXPANSIONS_SYMBOLS_RE = /{.*(?:,|\.\.).*}/; + function isStaticPattern(pattern, options = {}) { + return !isDynamicPattern(pattern, options); + } + exports2.isStaticPattern = isStaticPattern; + function isDynamicPattern(pattern, options = {}) { + if (pattern === "") { + return false; + } + if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) { + return true; + } + if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) { + return true; + } + if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) { + return true; + } + if (options.braceExpansion !== false && BRACE_EXPANSIONS_SYMBOLS_RE.test(pattern)) { + return true; + } + return false; + } + exports2.isDynamicPattern = isDynamicPattern; + function convertToPositivePattern(pattern) { + return isNegativePattern(pattern) ? pattern.slice(1) : pattern; + } + exports2.convertToPositivePattern = convertToPositivePattern; + function convertToNegativePattern(pattern) { + return "!" + pattern; + } + exports2.convertToNegativePattern = convertToNegativePattern; + function isNegativePattern(pattern) { + return pattern.startsWith("!") && pattern[1] !== "("; + } + exports2.isNegativePattern = isNegativePattern; + function isPositivePattern(pattern) { + return !isNegativePattern(pattern); + } + exports2.isPositivePattern = isPositivePattern; + function getNegativePatterns(patterns) { + return patterns.filter(isNegativePattern); + } + exports2.getNegativePatterns = getNegativePatterns; + function getPositivePatterns(patterns) { + return patterns.filter(isPositivePattern); + } + exports2.getPositivePatterns = getPositivePatterns; + function getPatternsInsideCurrentDirectory(patterns) { + return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern)); + } + exports2.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory; + function getPatternsOutsideCurrentDirectory(patterns) { + return patterns.filter(isPatternRelatedToParentDirectory); + } + exports2.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory; + function isPatternRelatedToParentDirectory(pattern) { + return pattern.startsWith("..") || pattern.startsWith("./.."); + } + exports2.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory; + function getBaseDirectory(pattern) { + return globParent(pattern, { flipBackslashes: false }); + } + exports2.getBaseDirectory = getBaseDirectory; + function hasGlobStar(pattern) { + return pattern.includes(GLOBSTAR); + } + exports2.hasGlobStar = hasGlobStar; + function endsWithSlashGlobStar(pattern) { + return pattern.endsWith("/" + GLOBSTAR); + } + exports2.endsWithSlashGlobStar = endsWithSlashGlobStar; + function isAffectDepthOfReadingPattern(pattern) { + const basename = path.basename(pattern); + return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); + } + exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; + function expandPatternsWithBraceExpansion(patterns) { + return patterns.reduce((collection, pattern) => { + return collection.concat(expandBraceExpansion(pattern)); + }, []); + } + exports2.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion; + function expandBraceExpansion(pattern) { + return micromatch.braces(pattern, { + expand: true, + nodupes: true + }); + } + exports2.expandBraceExpansion = expandBraceExpansion; + function getPatternParts(pattern, options) { + let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true })); + if (parts.length === 0) { + parts = [pattern]; + } + if (parts[0].startsWith("/")) { + parts[0] = parts[0].slice(1); + parts.unshift(""); + } + return parts; + } + exports2.getPatternParts = getPatternParts; + function makeRe(pattern, options) { + return micromatch.makeRe(pattern, options); + } + exports2.makeRe = makeRe; + function convertPatternsToRe(patterns, options) { + return patterns.map((pattern) => makeRe(pattern, options)); + } + exports2.convertPatternsToRe = convertPatternsToRe; + function matchAny(entry, patternsRe) { + return patternsRe.some((patternRe) => patternRe.test(entry)); + } + exports2.matchAny = matchAny; + } +}); + +// ../../node_modules/.pnpm/merge2@1.4.1/node_modules/merge2/index.js +var require_merge22 = __commonJS({ + "../../node_modules/.pnpm/merge2@1.4.1/node_modules/merge2/index.js"(exports2, module2) { + "use strict"; + var Stream = require("stream"); + var PassThrough = Stream.PassThrough; + var slice = Array.prototype.slice; + module2.exports = merge2; + function merge2() { + const streamsQueue = []; + const args2 = slice.call(arguments); + let merging = false; + let options = args2[args2.length - 1]; + if (options && !Array.isArray(options) && options.pipe == null) { + args2.pop(); + } else { + options = {}; + } + const doEnd = options.end !== false; + const doPipeError = options.pipeError === true; + if (options.objectMode == null) { + options.objectMode = true; + } + if (options.highWaterMark == null) { + options.highWaterMark = 64 * 1024; + } + const mergedStream = PassThrough(options); + function addStream() { + for (let i = 0, len = arguments.length; i < len; i++) { + streamsQueue.push(pauseStreams(arguments[i], options)); + } + mergeStream(); + return this; + } + function mergeStream() { + if (merging) { + return; + } + merging = true; + let streams = streamsQueue.shift(); + if (!streams) { + process.nextTick(endStream); + return; + } + if (!Array.isArray(streams)) { + streams = [streams]; + } + let pipesCount = streams.length + 1; + function next() { + if (--pipesCount > 0) { + return; + } + merging = false; + mergeStream(); + } + function pipe(stream) { + function onend() { + stream.removeListener("merge2UnpipeEnd", onend); + stream.removeListener("end", onend); + if (doPipeError) { + stream.removeListener("error", onerror); + } + next(); + } + function onerror(err) { + mergedStream.emit("error", err); + } + if (stream._readableState.endEmitted) { + return next(); + } + stream.on("merge2UnpipeEnd", onend); + stream.on("end", onend); + if (doPipeError) { + stream.on("error", onerror); + } + stream.pipe(mergedStream, { end: false }); + stream.resume(); + } + for (let i = 0; i < streams.length; i++) { + pipe(streams[i]); + } + next(); + } + function endStream() { + merging = false; + mergedStream.emit("queueDrain"); + if (doEnd) { + mergedStream.end(); + } + } + mergedStream.setMaxListeners(0); + mergedStream.add = addStream; + mergedStream.on("unpipe", function(stream) { + stream.emit("merge2UnpipeEnd"); + }); + if (args2.length) { + addStream.apply(null, args2); + } + return mergedStream; + } + function pauseStreams(streams, options) { + if (!Array.isArray(streams)) { + if (!streams._readableState && streams.pipe) { + streams = streams.pipe(PassThrough(options)); + } + if (!streams._readableState || !streams.pause || !streams.pipe) { + throw new Error("Only readable stream can be merged."); + } + streams.pause(); + } else { + for (let i = 0, len = streams.length; i < len; i++) { + streams[i] = pauseStreams(streams[i], options); + } + } + return streams; + } + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/stream.js +var require_stream2 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/stream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.merge = void 0; + var merge2 = require_merge22(); + function merge(streams) { + const mergedStream = merge2(streams); + streams.forEach((stream) => { + stream.once("error", (error) => mergedStream.emit("error", error)); + }); + mergedStream.once("close", () => propagateCloseEventToSources(streams)); + mergedStream.once("end", () => propagateCloseEventToSources(streams)); + return mergedStream; + } + exports2.merge = merge; + function propagateCloseEventToSources(streams) { + streams.forEach((stream) => stream.emit("close")); + } + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/string.js +var require_string2 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/string.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isEmpty = exports2.isString = void 0; + function isString(input) { + return typeof input === "string"; + } + exports2.isString = isString; + function isEmpty(input) { + return input === ""; + } + exports2.isEmpty = isEmpty; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/index.js +var require_utils5 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/utils/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.string = exports2.stream = exports2.pattern = exports2.path = exports2.fs = exports2.errno = exports2.array = void 0; + var array = require_array2(); + exports2.array = array; + var errno = require_errno(); + exports2.errno = errno; + var fs = require_fs(); + exports2.fs = fs; + var path = require_path2(); + exports2.path = path; + var pattern = require_pattern(); + exports2.pattern = pattern; + var stream = require_stream2(); + exports2.stream = stream; + var string = require_string2(); + exports2.string = string; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/managers/tasks.js +var require_tasks = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/managers/tasks.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.convertPatternGroupToTask = exports2.convertPatternGroupsToTasks = exports2.groupPatternsByBaseDirectory = exports2.getNegativePatternsAsPositive = exports2.getPositivePatterns = exports2.convertPatternsToTasks = exports2.generate = void 0; + var utils = require_utils5(); + function generate(patterns, settings) { + const positivePatterns = getPositivePatterns(patterns); + const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore); + const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)); + const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)); + const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, false); + const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, true); + return staticTasks.concat(dynamicTasks); + } + exports2.generate = generate; + function convertPatternsToTasks(positive, negative, dynamic) { + const tasks = []; + const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive); + const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive); + const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory); + const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory); + tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic)); + if ("." in insideCurrentDirectoryGroup) { + tasks.push(convertPatternGroupToTask(".", patternsInsideCurrentDirectory, negative, dynamic)); + } else { + tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic)); + } + return tasks; + } + exports2.convertPatternsToTasks = convertPatternsToTasks; + function getPositivePatterns(patterns) { + return utils.pattern.getPositivePatterns(patterns); + } + exports2.getPositivePatterns = getPositivePatterns; + function getNegativePatternsAsPositive(patterns, ignore) { + const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore); + const positive = negative.map(utils.pattern.convertToPositivePattern); + return positive; + } + exports2.getNegativePatternsAsPositive = getNegativePatternsAsPositive; + function groupPatternsByBaseDirectory(patterns) { + const group = {}; + return patterns.reduce((collection, pattern) => { + const base = utils.pattern.getBaseDirectory(pattern); + if (base in collection) { + collection[base].push(pattern); + } else { + collection[base] = [pattern]; + } + return collection; + }, group); + } + exports2.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory; + function convertPatternGroupsToTasks(positive, negative, dynamic) { + return Object.keys(positive).map((base) => { + return convertPatternGroupToTask(base, positive[base], negative, dynamic); + }); + } + exports2.convertPatternGroupsToTasks = convertPatternGroupsToTasks; + function convertPatternGroupToTask(base, positive, negative, dynamic) { + return { + dynamic, + positive, + negative, + base, + patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern)) + }; + } + exports2.convertPatternGroupToTask = convertPatternGroupToTask; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js +var require_async2 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.read = void 0; + function read(path, settings, callback) { + settings.fs.lstat(path, (lstatError, lstat) => { + if (lstatError !== null) { + callFailureCallback(callback, lstatError); + return; + } + if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { + callSuccessCallback(callback, lstat); + return; + } + settings.fs.stat(path, (statError, stat) => { + if (statError !== null) { + if (settings.throwErrorOnBrokenSymbolicLink) { + callFailureCallback(callback, statError); + return; + } + callSuccessCallback(callback, lstat); + return; + } + if (settings.markSymbolicLink) { + stat.isSymbolicLink = () => true; + } + callSuccessCallback(callback, stat); + }); + }); + } + exports2.read = read; + function callFailureCallback(callback, error) { + callback(error); + } + function callSuccessCallback(callback, result) { + callback(null, result); + } + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js +var require_sync = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.read = void 0; + function read(path, settings) { + const lstat = settings.fs.lstatSync(path); + if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { + return lstat; + } + try { + const stat = settings.fs.statSync(path); + if (settings.markSymbolicLink) { + stat.isSymbolicLink = () => true; + } + return stat; + } catch (error) { + if (!settings.throwErrorOnBrokenSymbolicLink) { + return lstat; + } + throw error; + } + } + exports2.read = read; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.js +var require_fs2 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; + var fs = require("fs"); + exports2.FILE_SYSTEM_ADAPTER = { + lstat: fs.lstat, + stat: fs.stat, + lstatSync: fs.lstatSync, + statSync: fs.statSync + }; + function createFileSystemAdapter(fsMethods) { + if (fsMethods === void 0) { + return exports2.FILE_SYSTEM_ADAPTER; + } + return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods); + } + exports2.createFileSystemAdapter = createFileSystemAdapter; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js +var require_settings = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs = require_fs2(); + var Settings = class { + constructor(_options = {}) { + this._options = _options; + this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); + this.fs = fs.createFileSystemAdapter(this._options.fs); + this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } + }; + exports2.default = Settings; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.js +var require_out = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.statSync = exports2.stat = exports2.Settings = void 0; + var async = require_async2(); + var sync = require_sync(); + var settings_1 = require_settings(); + exports2.Settings = settings_1.default; + function stat(path, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === "function") { + async.read(path, getSettings(), optionsOrSettingsOrCallback); + return; + } + async.read(path, getSettings(optionsOrSettingsOrCallback), callback); + } + exports2.stat = stat; + function statSync(path, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return sync.read(path, settings); + } + exports2.statSync = statSync; + function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) { + return settingsOrOptions; + } + return new settings_1.default(settingsOrOptions); + } + } +}); + +// ../../node_modules/.pnpm/queue-microtask@1.2.3/node_modules/queue-microtask/index.js +var require_queue_microtask = __commonJS({ + "../../node_modules/.pnpm/queue-microtask@1.2.3/node_modules/queue-microtask/index.js"(exports2, module2) { + var promise; + module2.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => { + throw err; + }, 0)); + } +}); + +// ../../node_modules/.pnpm/run-parallel@1.2.0/node_modules/run-parallel/index.js +var require_run_parallel = __commonJS({ + "../../node_modules/.pnpm/run-parallel@1.2.0/node_modules/run-parallel/index.js"(exports2, module2) { + module2.exports = runParallel; + var queueMicrotask2 = require_queue_microtask(); + function runParallel(tasks, cb) { + let results, pending, keys; + let isSync = true; + if (Array.isArray(tasks)) { + results = []; + pending = tasks.length; + } else { + keys = Object.keys(tasks); + results = {}; + pending = keys.length; + } + function done(err) { + function end() { + if (cb) + cb(err, results); + cb = null; + } + if (isSync) + queueMicrotask2(end); + else + end(); + } + function each(i, err, result) { + results[i] = result; + if (--pending === 0 || err) { + done(err); + } + } + if (!pending) { + done(null); + } else if (keys) { + keys.forEach(function(key) { + tasks[key](function(err, result) { + each(key, err, result); + }); + }); + } else { + tasks.forEach(function(task, i) { + task(function(err, result) { + each(i, err, result); + }); + }); + } + isSync = false; + } + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js +var require_constants6 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; + var NODE_PROCESS_VERSION_PARTS = process.versions.node.split("."); + if (NODE_PROCESS_VERSION_PARTS[0] === void 0 || NODE_PROCESS_VERSION_PARTS[1] === void 0) { + throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); + } + var MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); + var MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); + var SUPPORTED_MAJOR_VERSION = 10; + var SUPPORTED_MINOR_VERSION = 10; + var IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION; + var IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION; + exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.js +var require_fs3 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDirentFromStats = void 0; + var DirentFromStats = class { + constructor(name, stats) { + this.name = name; + this.isBlockDevice = stats.isBlockDevice.bind(stats); + this.isCharacterDevice = stats.isCharacterDevice.bind(stats); + this.isDirectory = stats.isDirectory.bind(stats); + this.isFIFO = stats.isFIFO.bind(stats); + this.isFile = stats.isFile.bind(stats); + this.isSocket = stats.isSocket.bind(stats); + this.isSymbolicLink = stats.isSymbolicLink.bind(stats); + } + }; + function createDirentFromStats(name, stats) { + return new DirentFromStats(name, stats); + } + exports2.createDirentFromStats = createDirentFromStats; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.js +var require_utils6 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fs = void 0; + var fs = require_fs3(); + exports2.fs = fs; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.js +var require_common3 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.joinPathSegments = void 0; + function joinPathSegments(a, b, separator) { + if (a.endsWith(separator)) { + return a + b; + } + return a + separator + b; + } + exports2.joinPathSegments = joinPathSegments; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.js +var require_async3 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0; + var fsStat = require_out(); + var rpl = require_run_parallel(); + var constants_1 = require_constants6(); + var utils = require_utils6(); + var common = require_common3(); + function read(directory, settings, callback) { + if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { + readdirWithFileTypes(directory, settings, callback); + return; + } + readdir(directory, settings, callback); + } + exports2.read = read; + function readdirWithFileTypes(directory, settings, callback) { + settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { + if (readdirError !== null) { + callFailureCallback(callback, readdirError); + return; + } + const entries = dirents.map((dirent) => ({ + dirent, + name: dirent.name, + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + })); + if (!settings.followSymbolicLinks) { + callSuccessCallback(callback, entries); + return; + } + const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings)); + rpl(tasks, (rplError, rplEntries) => { + if (rplError !== null) { + callFailureCallback(callback, rplError); + return; + } + callSuccessCallback(callback, rplEntries); + }); + }); + } + exports2.readdirWithFileTypes = readdirWithFileTypes; + function makeRplTaskEntry(entry, settings) { + return (done) => { + if (!entry.dirent.isSymbolicLink()) { + done(null, entry); + return; + } + settings.fs.stat(entry.path, (statError, stats) => { + if (statError !== null) { + if (settings.throwErrorOnBrokenSymbolicLink) { + done(statError); + return; + } + done(null, entry); + return; + } + entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); + done(null, entry); + }); + }; + } + function readdir(directory, settings, callback) { + settings.fs.readdir(directory, (readdirError, names) => { + if (readdirError !== null) { + callFailureCallback(callback, readdirError); + return; + } + const tasks = names.map((name) => { + const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + return (done) => { + fsStat.stat(path, settings.fsStatSettings, (error, stats) => { + if (error !== null) { + done(error); + return; + } + const entry = { + name, + path, + dirent: utils.fs.createDirentFromStats(name, stats) + }; + if (settings.stats) { + entry.stats = stats; + } + done(null, entry); + }); + }; + }); + rpl(tasks, (rplError, entries) => { + if (rplError !== null) { + callFailureCallback(callback, rplError); + return; + } + callSuccessCallback(callback, entries); + }); + }); + } + exports2.readdir = readdir; + function callFailureCallback(callback, error) { + callback(error); + } + function callSuccessCallback(callback, result) { + callback(null, result); + } + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.js +var require_sync2 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0; + var fsStat = require_out(); + var constants_1 = require_constants6(); + var utils = require_utils6(); + var common = require_common3(); + function read(directory, settings) { + if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { + return readdirWithFileTypes(directory, settings); + } + return readdir(directory, settings); + } + exports2.read = read; + function readdirWithFileTypes(directory, settings) { + const dirents = settings.fs.readdirSync(directory, { withFileTypes: true }); + return dirents.map((dirent) => { + const entry = { + dirent, + name: dirent.name, + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + }; + if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { + try { + const stats = settings.fs.statSync(entry.path); + entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); + } catch (error) { + if (settings.throwErrorOnBrokenSymbolicLink) { + throw error; + } + } + } + return entry; + }); + } + exports2.readdirWithFileTypes = readdirWithFileTypes; + function readdir(directory, settings) { + const names = settings.fs.readdirSync(directory); + return names.map((name) => { + const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const stats = fsStat.statSync(entryPath, settings.fsStatSettings); + const entry = { + name, + path: entryPath, + dirent: utils.fs.createDirentFromStats(name, stats) + }; + if (settings.stats) { + entry.stats = stats; + } + return entry; + }); + } + exports2.readdir = readdir; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.js +var require_fs4 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; + var fs = require("fs"); + exports2.FILE_SYSTEM_ADAPTER = { + lstat: fs.lstat, + stat: fs.stat, + lstatSync: fs.lstatSync, + statSync: fs.statSync, + readdir: fs.readdir, + readdirSync: fs.readdirSync + }; + function createFileSystemAdapter(fsMethods) { + if (fsMethods === void 0) { + return exports2.FILE_SYSTEM_ADAPTER; + } + return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods); + } + exports2.createFileSystemAdapter = createFileSystemAdapter; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js +var require_settings2 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path = require("path"); + var fsStat = require_out(); + var fs = require_fs4(); + var Settings = class { + constructor(_options = {}) { + this._options = _options; + this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); + this.fs = fs.createFileSystemAdapter(this._options.fs); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); + this.stats = this._getValue(this._options.stats, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); + this.fsStatSettings = new fsStat.Settings({ + followSymbolicLink: this.followSymbolicLinks, + fs: this.fs, + throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink + }); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } + }; + exports2.default = Settings; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.js +var require_out2 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Settings = exports2.scandirSync = exports2.scandir = void 0; + var async = require_async3(); + var sync = require_sync2(); + var settings_1 = require_settings2(); + exports2.Settings = settings_1.default; + function scandir(path, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === "function") { + async.read(path, getSettings(), optionsOrSettingsOrCallback); + return; + } + async.read(path, getSettings(optionsOrSettingsOrCallback), callback); + } + exports2.scandir = scandir; + function scandirSync(path, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return sync.read(path, settings); + } + exports2.scandirSync = scandirSync; + function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) { + return settingsOrOptions; + } + return new settings_1.default(settingsOrOptions); + } + } +}); + +// ../../node_modules/.pnpm/reusify@1.0.4/node_modules/reusify/reusify.js +var require_reusify = __commonJS({ + "../../node_modules/.pnpm/reusify@1.0.4/node_modules/reusify/reusify.js"(exports2, module2) { + "use strict"; + function reusify(Constructor) { + var head = new Constructor(); + var tail = head; + function get() { + var current = head; + if (current.next) { + head = current.next; + } else { + head = new Constructor(); + tail = head; + } + current.next = null; + return current; + } + function release(obj) { + tail.next = obj; + tail = obj; + } + return { + get, + release + }; + } + module2.exports = reusify; + } +}); + +// ../../node_modules/.pnpm/fastq@1.13.0/node_modules/fastq/queue.js +var require_queue2 = __commonJS({ + "../../node_modules/.pnpm/fastq@1.13.0/node_modules/fastq/queue.js"(exports2, module2) { + "use strict"; + var reusify = require_reusify(); + function fastqueue(context, worker, concurrency) { + if (typeof context === "function") { + concurrency = worker; + worker = context; + context = null; + } + if (concurrency < 1) { + throw new Error("fastqueue concurrency must be greater than 1"); + } + var cache = reusify(Task); + var queueHead = null; + var queueTail = null; + var _running = 0; + var errorHandler = null; + var self2 = { + push, + drain: noop, + saturated: noop, + pause, + paused: false, + concurrency, + running, + resume, + idle, + length, + getQueue, + unshift, + empty: noop, + kill, + killAndDrain, + error + }; + return self2; + function running() { + return _running; + } + function pause() { + self2.paused = true; + } + function length() { + var current = queueHead; + var counter = 0; + while (current) { + current = current.next; + counter++; + } + return counter; + } + function getQueue() { + var current = queueHead; + var tasks = []; + while (current) { + tasks.push(current.value); + current = current.next; + } + return tasks; + } + function resume() { + if (!self2.paused) + return; + self2.paused = false; + for (var i = 0; i < self2.concurrency; i++) { + _running++; + release(); + } + } + function idle() { + return _running === 0 && self2.length() === 0; + } + function push(value, done) { + var current = cache.get(); + current.context = context; + current.release = release; + current.value = value; + current.callback = done || noop; + current.errorHandler = errorHandler; + if (_running === self2.concurrency || self2.paused) { + if (queueTail) { + queueTail.next = current; + queueTail = current; + } else { + queueHead = current; + queueTail = current; + self2.saturated(); + } + } else { + _running++; + worker.call(context, current.value, current.worked); + } + } + function unshift(value, done) { + var current = cache.get(); + current.context = context; + current.release = release; + current.value = value; + current.callback = done || noop; + if (_running === self2.concurrency || self2.paused) { + if (queueHead) { + current.next = queueHead; + queueHead = current; + } else { + queueHead = current; + queueTail = current; + self2.saturated(); + } + } else { + _running++; + worker.call(context, current.value, current.worked); + } + } + function release(holder) { + if (holder) { + cache.release(holder); + } + var next = queueHead; + if (next) { + if (!self2.paused) { + if (queueTail === queueHead) { + queueTail = null; + } + queueHead = next.next; + next.next = null; + worker.call(context, next.value, next.worked); + if (queueTail === null) { + self2.empty(); + } + } else { + _running--; + } + } else if (--_running === 0) { + self2.drain(); + } + } + function kill() { + queueHead = null; + queueTail = null; + self2.drain = noop; + } + function killAndDrain() { + queueHead = null; + queueTail = null; + self2.drain(); + self2.drain = noop; + } + function error(handler) { + errorHandler = handler; + } + } + function noop() { + } + function Task() { + this.value = null; + this.callback = noop; + this.next = null; + this.release = noop; + this.context = null; + this.errorHandler = null; + var self2 = this; + this.worked = function worked(err, result) { + var callback = self2.callback; + var errorHandler = self2.errorHandler; + var val = self2.value; + self2.value = null; + self2.callback = noop; + if (self2.errorHandler) { + errorHandler(err, val); + } + callback.call(self2.context, err, result); + self2.release(self2); + }; + } + function queueAsPromised(context, worker, concurrency) { + if (typeof context === "function") { + concurrency = worker; + worker = context; + context = null; + } + function asyncWrapper(arg, cb) { + worker.call(this, arg).then(function(res) { + cb(null, res); + }, cb); + } + var queue = fastqueue(context, asyncWrapper, concurrency); + var pushCb = queue.push; + var unshiftCb = queue.unshift; + queue.push = push; + queue.unshift = unshift; + queue.drained = drained; + return queue; + function push(value) { + var p = new Promise(function(resolve, reject) { + pushCb(value, function(err, result) { + if (err) { + reject(err); + return; + } + resolve(result); + }); + }); + p.catch(noop); + return p; + } + function unshift(value) { + var p = new Promise(function(resolve, reject) { + unshiftCb(value, function(err, result) { + if (err) { + reject(err); + return; + } + resolve(result); + }); + }); + p.catch(noop); + return p; + } + function drained() { + var previousDrain = queue.drain; + var p = new Promise(function(resolve) { + queue.drain = function() { + previousDrain(); + resolve(); + }; + }); + return p; + } + } + module2.exports = fastqueue; + module2.exports.promise = queueAsPromised; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js +var require_common4 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.joinPathSegments = exports2.replacePathSegmentSeparator = exports2.isAppliedFilter = exports2.isFatalError = void 0; + function isFatalError(settings, error) { + if (settings.errorFilter === null) { + return true; + } + return !settings.errorFilter(error); + } + exports2.isFatalError = isFatalError; + function isAppliedFilter(filter, value) { + return filter === null || filter(value); + } + exports2.isAppliedFilter = isAppliedFilter; + function replacePathSegmentSeparator(filepath, separator) { + return filepath.split(/[/\\]/).join(separator); + } + exports2.replacePathSegmentSeparator = replacePathSegmentSeparator; + function joinPathSegments(a, b, separator) { + if (a === "") { + return b; + } + if (a.endsWith(separator)) { + return a + b; + } + return a + separator + b; + } + exports2.joinPathSegments = joinPathSegments; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.js +var require_reader = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var common = require_common4(); + var Reader = class { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); + } + }; + exports2.default = Reader; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/async.js +var require_async4 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/async.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var events_1 = require("events"); + var fsScandir = require_out2(); + var fastq = require_queue2(); + var common = require_common4(); + var reader_1 = require_reader(); + var AsyncReader = class extends reader_1.default { + constructor(_root, _settings) { + super(_root, _settings); + this._settings = _settings; + this._scandir = fsScandir.scandir; + this._emitter = new events_1.EventEmitter(); + this._queue = fastq(this._worker.bind(this), this._settings.concurrency); + this._isFatalError = false; + this._isDestroyed = false; + this._queue.drain = () => { + if (!this._isFatalError) { + this._emitter.emit("end"); + } + }; + } + read() { + this._isFatalError = false; + this._isDestroyed = false; + setImmediate(() => { + this._pushToQueue(this._root, this._settings.basePath); + }); + return this._emitter; + } + get isDestroyed() { + return this._isDestroyed; + } + destroy() { + if (this._isDestroyed) { + throw new Error("The reader is already destroyed"); + } + this._isDestroyed = true; + this._queue.killAndDrain(); + } + onEntry(callback) { + this._emitter.on("entry", callback); + } + onError(callback) { + this._emitter.once("error", callback); + } + onEnd(callback) { + this._emitter.once("end", callback); + } + _pushToQueue(directory, base) { + const queueItem = { directory, base }; + this._queue.push(queueItem, (error) => { + if (error !== null) { + this._handleError(error); + } + }); + } + _worker(item, done) { + this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => { + if (error !== null) { + done(error, void 0); + return; + } + for (const entry of entries) { + this._handleEntry(entry, item.base); + } + done(null, void 0); + }); + } + _handleError(error) { + if (this._isDestroyed || !common.isFatalError(this._settings, error)) { + return; + } + this._isFatalError = true; + this._isDestroyed = true; + this._emitter.emit("error", error); + } + _handleEntry(entry, base) { + if (this._isDestroyed || this._isFatalError) { + return; + } + const fullpath = entry.path; + if (base !== void 0) { + entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + } + if (common.isAppliedFilter(this._settings.entryFilter, entry)) { + this._emitEntry(entry); + } + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { + this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); + } + } + _emitEntry(entry) { + this._emitter.emit("entry", entry); + } + }; + exports2.default = AsyncReader; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.js +var require_async5 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var async_1 = require_async4(); + var AsyncProvider = class { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new async_1.default(this._root, this._settings); + this._storage = []; + } + read(callback) { + this._reader.onError((error) => { + callFailureCallback(callback, error); + }); + this._reader.onEntry((entry) => { + this._storage.push(entry); + }); + this._reader.onEnd(() => { + callSuccessCallback(callback, this._storage); + }); + this._reader.read(); + } + }; + exports2.default = AsyncProvider; + function callFailureCallback(callback, error) { + callback(error); + } + function callSuccessCallback(callback, entries) { + callback(null, entries); + } + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/stream.js +var require_stream3 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/stream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var stream_1 = require("stream"); + var async_1 = require_async4(); + var StreamProvider = class { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new async_1.default(this._root, this._settings); + this._stream = new stream_1.Readable({ + objectMode: true, + read: () => { + }, + destroy: () => { + if (!this._reader.isDestroyed) { + this._reader.destroy(); + } + } + }); + } + read() { + this._reader.onError((error) => { + this._stream.emit("error", error); + }); + this._reader.onEntry((entry) => { + this._stream.push(entry); + }); + this._reader.onEnd(() => { + this._stream.push(null); + }); + this._reader.read(); + return this._stream; + } + }; + exports2.default = StreamProvider; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.js +var require_sync3 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fsScandir = require_out2(); + var common = require_common4(); + var reader_1 = require_reader(); + var SyncReader = class extends reader_1.default { + constructor() { + super(...arguments); + this._scandir = fsScandir.scandirSync; + this._storage = []; + this._queue = new Set(); + } + read() { + this._pushToQueue(this._root, this._settings.basePath); + this._handleQueue(); + return this._storage; + } + _pushToQueue(directory, base) { + this._queue.add({ directory, base }); + } + _handleQueue() { + for (const item of this._queue.values()) { + this._handleDirectory(item.directory, item.base); + } + } + _handleDirectory(directory, base) { + try { + const entries = this._scandir(directory, this._settings.fsScandirSettings); + for (const entry of entries) { + this._handleEntry(entry, base); + } + } catch (error) { + this._handleError(error); + } + } + _handleError(error) { + if (!common.isFatalError(this._settings, error)) { + return; + } + throw error; + } + _handleEntry(entry, base) { + const fullpath = entry.path; + if (base !== void 0) { + entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + } + if (common.isAppliedFilter(this._settings.entryFilter, entry)) { + this._pushToStorage(entry); + } + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { + this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); + } + } + _pushToStorage(entry) { + this._storage.push(entry); + } + }; + exports2.default = SyncReader; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.js +var require_sync4 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var sync_1 = require_sync3(); + var SyncProvider = class { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new sync_1.default(this._root, this._settings); + } + read() { + return this._reader.read(); + } + }; + exports2.default = SyncProvider; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js +var require_settings3 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path = require("path"); + var fsScandir = require_out2(); + var Settings = class { + constructor(_options = {}) { + this._options = _options; + this.basePath = this._getValue(this._options.basePath, void 0); + this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY); + this.deepFilter = this._getValue(this._options.deepFilter, null); + this.entryFilter = this._getValue(this._options.entryFilter, null); + this.errorFilter = this._getValue(this._options.errorFilter, null); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); + this.fsScandirSettings = new fsScandir.Settings({ + followSymbolicLinks: this._options.followSymbolicLinks, + fs: this._options.fs, + pathSegmentSeparator: this._options.pathSegmentSeparator, + stats: this._options.stats, + throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink + }); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } + }; + exports2.default = Settings; + } +}); + +// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.js +var require_out3 = __commonJS({ + "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Settings = exports2.walkStream = exports2.walkSync = exports2.walk = void 0; + var async_1 = require_async5(); + var stream_1 = require_stream3(); + var sync_1 = require_sync4(); + var settings_1 = require_settings3(); + exports2.Settings = settings_1.default; + function walk(directory, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === "function") { + new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); + return; + } + new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); + } + exports2.walk = walk; + function walkSync(directory, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + const provider = new sync_1.default(directory, settings); + return provider.read(); + } + exports2.walkSync = walkSync; + function walkStream(directory, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + const provider = new stream_1.default(directory, settings); + return provider.read(); + } + exports2.walkStream = walkStream; + function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) { + return settingsOrOptions; + } + return new settings_1.default(settingsOrOptions); + } + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/readers/reader.js +var require_reader2 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/readers/reader.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path = require("path"); + var fsStat = require_out(); + var utils = require_utils5(); + var Reader = class { + constructor(_settings) { + this._settings = _settings; + this._fsStatSettings = new fsStat.Settings({ + followSymbolicLink: this._settings.followSymbolicLinks, + fs: this._settings.fs, + throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks + }); + } + _getFullEntryPath(filepath) { + return path.resolve(this._settings.cwd, filepath); + } + _makeEntry(stats, pattern) { + const entry = { + name: pattern, + path: pattern, + dirent: utils.fs.createDirentFromStats(pattern, stats) + }; + if (this._settings.stats) { + entry.stats = stats; + } + return entry; + } + _isFatalError(error) { + return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors; + } + }; + exports2.default = Reader; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/readers/stream.js +var require_stream4 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/readers/stream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var stream_1 = require("stream"); + var fsStat = require_out(); + var fsWalk = require_out3(); + var reader_1 = require_reader2(); + var ReaderStream = class extends reader_1.default { + constructor() { + super(...arguments); + this._walkStream = fsWalk.walkStream; + this._stat = fsStat.stat; + } + dynamic(root, options) { + return this._walkStream(root, options); + } + static(patterns, options) { + const filepaths = patterns.map(this._getFullEntryPath, this); + const stream = new stream_1.PassThrough({ objectMode: true }); + stream._write = (index, _enc, done) => { + return this._getEntry(filepaths[index], patterns[index], options).then((entry) => { + if (entry !== null && options.entryFilter(entry)) { + stream.push(entry); + } + if (index === filepaths.length - 1) { + stream.end(); + } + done(); + }).catch(done); + }; + for (let i = 0; i < filepaths.length; i++) { + stream.write(i); + } + return stream; + } + _getEntry(filepath, pattern, options) { + return this._getStat(filepath).then((stats) => this._makeEntry(stats, pattern)).catch((error) => { + if (options.errorFilter(error)) { + return null; + } + throw error; + }); + } + _getStat(filepath) { + return new Promise((resolve, reject) => { + this._stat(filepath, this._fsStatSettings, (error, stats) => { + return error === null ? resolve(stats) : reject(error); + }); + }); + } + }; + exports2.default = ReaderStream; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/matchers/matcher.js +var require_matcher = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/matchers/matcher.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var utils = require_utils5(); + var Matcher = class { + constructor(_patterns, _settings, _micromatchOptions) { + this._patterns = _patterns; + this._settings = _settings; + this._micromatchOptions = _micromatchOptions; + this._storage = []; + this._fillStorage(); + } + _fillStorage() { + const patterns = utils.pattern.expandPatternsWithBraceExpansion(this._patterns); + for (const pattern of patterns) { + const segments = this._getPatternSegments(pattern); + const sections = this._splitSegmentsIntoSections(segments); + this._storage.push({ + complete: sections.length <= 1, + pattern, + segments, + sections + }); + } + } + _getPatternSegments(pattern) { + const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions); + return parts.map((part) => { + const dynamic = utils.pattern.isDynamicPattern(part, this._settings); + if (!dynamic) { + return { + dynamic: false, + pattern: part + }; + } + return { + dynamic: true, + pattern: part, + patternRe: utils.pattern.makeRe(part, this._micromatchOptions) + }; + }); + } + _splitSegmentsIntoSections(segments) { + return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern)); + } + }; + exports2.default = Matcher; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/matchers/partial.js +var require_partial = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/matchers/partial.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var matcher_1 = require_matcher(); + var PartialMatcher = class extends matcher_1.default { + match(filepath) { + const parts = filepath.split("/"); + const levels = parts.length; + const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels); + for (const pattern of patterns) { + const section = pattern.sections[0]; + if (!pattern.complete && levels > section.length) { + return true; + } + const match = parts.every((part, index) => { + const segment = pattern.segments[index]; + if (segment.dynamic && segment.patternRe.test(part)) { + return true; + } + if (!segment.dynamic && segment.pattern === part) { + return true; + } + return false; + }); + if (match) { + return true; + } + } + return false; + } + }; + exports2.default = PartialMatcher; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/filters/deep.js +var require_deep = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/filters/deep.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var utils = require_utils5(); + var partial_1 = require_partial(); + var DeepFilter = class { + constructor(_settings, _micromatchOptions) { + this._settings = _settings; + this._micromatchOptions = _micromatchOptions; + } + getFilter(basePath2, positive, negative) { + const matcher = this._getMatcher(positive); + const negativeRe = this._getNegativePatternsRe(negative); + return (entry) => this._filter(basePath2, entry, matcher, negativeRe); + } + _getMatcher(patterns) { + return new partial_1.default(patterns, this._settings, this._micromatchOptions); + } + _getNegativePatternsRe(patterns) { + const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern); + return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions); + } + _filter(basePath2, entry, matcher, negativeRe) { + if (this._isSkippedByDeep(basePath2, entry.path)) { + return false; + } + if (this._isSkippedSymbolicLink(entry)) { + return false; + } + const filepath = utils.path.removeLeadingDotSegment(entry.path); + if (this._isSkippedByPositivePatterns(filepath, matcher)) { + return false; + } + return this._isSkippedByNegativePatterns(filepath, negativeRe); + } + _isSkippedByDeep(basePath2, entryPath) { + if (this._settings.deep === Infinity) { + return false; + } + return this._getEntryLevel(basePath2, entryPath) >= this._settings.deep; + } + _getEntryLevel(basePath2, entryPath) { + const entryPathDepth = entryPath.split("/").length; + if (basePath2 === "") { + return entryPathDepth; + } + const basePathDepth = basePath2.split("/").length; + return entryPathDepth - basePathDepth; + } + _isSkippedSymbolicLink(entry) { + return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink(); + } + _isSkippedByPositivePatterns(entryPath, matcher) { + return !this._settings.baseNameMatch && !matcher.match(entryPath); + } + _isSkippedByNegativePatterns(entryPath, patternsRe) { + return !utils.pattern.matchAny(entryPath, patternsRe); + } + }; + exports2.default = DeepFilter; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/filters/entry.js +var require_entry = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/filters/entry.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var utils = require_utils5(); + var EntryFilter = class { + constructor(_settings, _micromatchOptions) { + this._settings = _settings; + this._micromatchOptions = _micromatchOptions; + this.index = new Map(); + } + getFilter(positive, negative) { + const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions); + const negativeRe = utils.pattern.convertPatternsToRe(negative, this._micromatchOptions); + return (entry) => this._filter(entry, positiveRe, negativeRe); + } + _filter(entry, positiveRe, negativeRe) { + if (this._settings.unique && this._isDuplicateEntry(entry)) { + return false; + } + if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) { + return false; + } + if (this._isSkippedByAbsoluteNegativePatterns(entry.path, negativeRe)) { + return false; + } + const filepath = this._settings.baseNameMatch ? entry.name : entry.path; + const isMatched = this._isMatchToPatterns(filepath, positiveRe) && !this._isMatchToPatterns(entry.path, negativeRe); + if (this._settings.unique && isMatched) { + this._createIndexRecord(entry); + } + return isMatched; + } + _isDuplicateEntry(entry) { + return this.index.has(entry.path); + } + _createIndexRecord(entry) { + this.index.set(entry.path, void 0); + } + _onlyFileFilter(entry) { + return this._settings.onlyFiles && !entry.dirent.isFile(); + } + _onlyDirectoryFilter(entry) { + return this._settings.onlyDirectories && !entry.dirent.isDirectory(); + } + _isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) { + if (!this._settings.absolute) { + return false; + } + const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath); + return utils.pattern.matchAny(fullpath, patternsRe); + } + _isMatchToPatterns(entryPath, patternsRe) { + const filepath = utils.path.removeLeadingDotSegment(entryPath); + return utils.pattern.matchAny(filepath, patternsRe); + } + }; + exports2.default = EntryFilter; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/filters/error.js +var require_error = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/filters/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var utils = require_utils5(); + var ErrorFilter = class { + constructor(_settings) { + this._settings = _settings; + } + getFilter() { + return (error) => this._isNonFatalError(error); + } + _isNonFatalError(error) { + return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors; + } + }; + exports2.default = ErrorFilter; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/transformers/entry.js +var require_entry2 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/transformers/entry.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var utils = require_utils5(); + var EntryTransformer = class { + constructor(_settings) { + this._settings = _settings; + } + getTransformer() { + return (entry) => this._transform(entry); + } + _transform(entry) { + let filepath = entry.path; + if (this._settings.absolute) { + filepath = utils.path.makeAbsolute(this._settings.cwd, filepath); + filepath = utils.path.unixify(filepath); + } + if (this._settings.markDirectories && entry.dirent.isDirectory()) { + filepath += "/"; + } + if (!this._settings.objectMode) { + return filepath; + } + return Object.assign(Object.assign({}, entry), { path: filepath }); + } + }; + exports2.default = EntryTransformer; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/provider.js +var require_provider = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/provider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path = require("path"); + var deep_1 = require_deep(); + var entry_1 = require_entry(); + var error_1 = require_error(); + var entry_2 = require_entry2(); + var Provider = class { + constructor(_settings) { + this._settings = _settings; + this.errorFilter = new error_1.default(this._settings); + this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions()); + this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions()); + this.entryTransformer = new entry_2.default(this._settings); + } + _getRootDirectory(task) { + return path.resolve(this._settings.cwd, task.base); + } + _getReaderOptions(task) { + const basePath2 = task.base === "." ? "" : task.base; + return { + basePath: basePath2, + pathSegmentSeparator: "/", + concurrency: this._settings.concurrency, + deepFilter: this.deepFilter.getFilter(basePath2, task.positive, task.negative), + entryFilter: this.entryFilter.getFilter(task.positive, task.negative), + errorFilter: this.errorFilter.getFilter(), + followSymbolicLinks: this._settings.followSymbolicLinks, + fs: this._settings.fs, + stats: this._settings.stats, + throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink, + transform: this.entryTransformer.getTransformer() + }; + } + _getMicromatchOptions() { + return { + dot: this._settings.dot, + matchBase: this._settings.baseNameMatch, + nobrace: !this._settings.braceExpansion, + nocase: !this._settings.caseSensitiveMatch, + noext: !this._settings.extglob, + noglobstar: !this._settings.globstar, + posix: true, + strictSlashes: false + }; + } + }; + exports2.default = Provider; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/async.js +var require_async6 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/async.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var stream_1 = require_stream4(); + var provider_1 = require_provider(); + var ProviderAsync = class extends provider_1.default { + constructor() { + super(...arguments); + this._reader = new stream_1.default(this._settings); + } + read(task) { + const root = this._getRootDirectory(task); + const options = this._getReaderOptions(task); + const entries = []; + return new Promise((resolve, reject) => { + const stream = this.api(root, task, options); + stream.once("error", reject); + stream.on("data", (entry) => entries.push(options.transform(entry))); + stream.once("end", () => resolve(entries)); + }); + } + api(root, task, options) { + if (task.dynamic) { + return this._reader.dynamic(root, options); + } + return this._reader.static(task.patterns, options); + } + }; + exports2.default = ProviderAsync; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/stream.js +var require_stream5 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/stream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var stream_1 = require("stream"); + var stream_2 = require_stream4(); + var provider_1 = require_provider(); + var ProviderStream = class extends provider_1.default { + constructor() { + super(...arguments); + this._reader = new stream_2.default(this._settings); + } + read(task) { + const root = this._getRootDirectory(task); + const options = this._getReaderOptions(task); + const source = this.api(root, task, options); + const destination = new stream_1.Readable({ objectMode: true, read: () => { + } }); + source.once("error", (error) => destination.emit("error", error)).on("data", (entry) => destination.emit("data", options.transform(entry))).once("end", () => destination.emit("end")); + destination.once("close", () => source.destroy()); + return destination; + } + api(root, task, options) { + if (task.dynamic) { + return this._reader.dynamic(root, options); + } + return this._reader.static(task.patterns, options); + } + }; + exports2.default = ProviderStream; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/readers/sync.js +var require_sync5 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/readers/sync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fsStat = require_out(); + var fsWalk = require_out3(); + var reader_1 = require_reader2(); + var ReaderSync = class extends reader_1.default { + constructor() { + super(...arguments); + this._walkSync = fsWalk.walkSync; + this._statSync = fsStat.statSync; + } + dynamic(root, options) { + return this._walkSync(root, options); + } + static(patterns, options) { + const entries = []; + for (const pattern of patterns) { + const filepath = this._getFullEntryPath(pattern); + const entry = this._getEntry(filepath, pattern, options); + if (entry === null || !options.entryFilter(entry)) { + continue; + } + entries.push(entry); + } + return entries; + } + _getEntry(filepath, pattern, options) { + try { + const stats = this._getStat(filepath); + return this._makeEntry(stats, pattern); + } catch (error) { + if (options.errorFilter(error)) { + return null; + } + throw error; + } + } + _getStat(filepath) { + return this._statSync(filepath, this._fsStatSettings); + } + }; + exports2.default = ReaderSync; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/sync.js +var require_sync6 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/providers/sync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var sync_1 = require_sync5(); + var provider_1 = require_provider(); + var ProviderSync = class extends provider_1.default { + constructor() { + super(...arguments); + this._reader = new sync_1.default(this._settings); + } + read(task) { + const root = this._getRootDirectory(task); + const options = this._getReaderOptions(task); + const entries = this.api(root, task, options); + return entries.map(options.transform); + } + api(root, task, options) { + if (task.dynamic) { + return this._reader.dynamic(root, options); + } + return this._reader.static(task.patterns, options); + } + }; + exports2.default = ProviderSync; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/settings.js +var require_settings4 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/settings.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; + var fs = require("fs"); + var os = require("os"); + var CPU_COUNT = Math.max(os.cpus().length, 1); + exports2.DEFAULT_FILE_SYSTEM_ADAPTER = { + lstat: fs.lstat, + lstatSync: fs.lstatSync, + stat: fs.stat, + statSync: fs.statSync, + readdir: fs.readdir, + readdirSync: fs.readdirSync + }; + var Settings = class { + constructor(_options = {}) { + this._options = _options; + this.absolute = this._getValue(this._options.absolute, false); + this.baseNameMatch = this._getValue(this._options.baseNameMatch, false); + this.braceExpansion = this._getValue(this._options.braceExpansion, true); + this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true); + this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT); + this.cwd = this._getValue(this._options.cwd, process.cwd()); + this.deep = this._getValue(this._options.deep, Infinity); + this.dot = this._getValue(this._options.dot, false); + this.extglob = this._getValue(this._options.extglob, true); + this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true); + this.fs = this._getFileSystemMethods(this._options.fs); + this.globstar = this._getValue(this._options.globstar, true); + this.ignore = this._getValue(this._options.ignore, []); + this.markDirectories = this._getValue(this._options.markDirectories, false); + this.objectMode = this._getValue(this._options.objectMode, false); + this.onlyDirectories = this._getValue(this._options.onlyDirectories, false); + this.onlyFiles = this._getValue(this._options.onlyFiles, true); + this.stats = this._getValue(this._options.stats, false); + this.suppressErrors = this._getValue(this._options.suppressErrors, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false); + this.unique = this._getValue(this._options.unique, true); + if (this.onlyDirectories) { + this.onlyFiles = false; + } + if (this.stats) { + this.objectMode = true; + } + } + _getValue(option, value) { + return option === void 0 ? value : option; + } + _getFileSystemMethods(methods = {}) { + return Object.assign(Object.assign({}, exports2.DEFAULT_FILE_SYSTEM_ADAPTER), methods); + } + }; + exports2.default = Settings; + } +}); + +// ../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/index.js +var require_out4 = __commonJS({ + "../../node_modules/.pnpm/fast-glob@3.2.7/node_modules/fast-glob/out/index.js"(exports2, module2) { + "use strict"; + var taskManager = require_tasks(); + var async_1 = require_async6(); + var stream_1 = require_stream5(); + var sync_1 = require_sync6(); + var settings_1 = require_settings4(); + var utils = require_utils5(); + async function FastGlob(source, options) { + assertPatternsInput(source); + const works = getWorks(source, async_1.default, options); + const result = await Promise.all(works); + return utils.array.flatten(result); + } + (function(FastGlob2) { + function sync(source, options) { + assertPatternsInput(source); + const works = getWorks(source, sync_1.default, options); + return utils.array.flatten(works); + } + FastGlob2.sync = sync; + function stream(source, options) { + assertPatternsInput(source); + const works = getWorks(source, stream_1.default, options); + return utils.stream.merge(works); + } + FastGlob2.stream = stream; + function generateTasks(source, options) { + assertPatternsInput(source); + const patterns = [].concat(source); + const settings = new settings_1.default(options); + return taskManager.generate(patterns, settings); + } + FastGlob2.generateTasks = generateTasks; + function isDynamicPattern(source, options) { + assertPatternsInput(source); + const settings = new settings_1.default(options); + return utils.pattern.isDynamicPattern(source, settings); + } + FastGlob2.isDynamicPattern = isDynamicPattern; + function escapePath(source) { + assertPatternsInput(source); + return utils.path.escape(source); + } + FastGlob2.escapePath = escapePath; + })(FastGlob || (FastGlob = {})); + function getWorks(source, _Provider, options) { + const patterns = [].concat(source); + const settings = new settings_1.default(options); + const tasks = taskManager.generate(patterns, settings); + const provider = new _Provider(settings); + return tasks.map(provider.read, provider); + } + function assertPatternsInput(input) { + const source = [].concat(input); + const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); + if (!isValidSource) { + throw new TypeError("Patterns must be a string (non empty) or an array of strings"); + } + } + module2.exports = FastGlob; + } +}); + +// ../../node_modules/.pnpm/p-map@2.1.0/node_modules/p-map/index.js +var require_p_map = __commonJS({ + "../../node_modules/.pnpm/p-map@2.1.0/node_modules/p-map/index.js"(exports2, module2) { + "use strict"; + var pMap = (iterable, mapper, options) => new Promise((resolve, reject) => { + options = Object.assign({ + concurrency: Infinity + }, options); + if (typeof mapper !== "function") { + throw new TypeError("Mapper function is required"); + } + const { concurrency } = options; + if (!(typeof concurrency === "number" && concurrency >= 1)) { + throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${concurrency}\` (${typeof concurrency})`); + } + const ret = []; + const iterator = iterable[Symbol.iterator](); + let isRejected = false; + let isIterableDone = false; + let resolvingCount = 0; + let currentIndex = 0; + const next = () => { + if (isRejected) { + return; + } + const nextItem = iterator.next(); + const i = currentIndex; + currentIndex++; + if (nextItem.done) { + isIterableDone = true; + if (resolvingCount === 0) { + resolve(ret); + } + return; + } + resolvingCount++; + Promise.resolve(nextItem.value).then((element) => mapper(element, i)).then((value) => { + ret[i] = value; + resolvingCount--; + next(); + }, (error) => { + isRejected = true; + reject(error); + }); + }; + for (let i = 0; i < concurrency; i++) { + next(); + if (isIterableDone) { + break; + } + } + }); + module2.exports = pMap; + module2.exports.default = pMap; + } +}); + +// ../../node_modules/.pnpm/p-filter@2.1.0/node_modules/p-filter/index.js +var require_p_filter = __commonJS({ + "../../node_modules/.pnpm/p-filter@2.1.0/node_modules/p-filter/index.js"(exports2, module2) { + "use strict"; + var pMap = require_p_map(); + var pFilter = async (iterable, filterer, options) => { + const values = await pMap(iterable, (element, index) => Promise.all([filterer(element, index), element]), options); + return values.filter((value) => Boolean(value[0])).map((value) => value[1]); + }; + module2.exports = pFilter; + module2.exports.default = pFilter; + } +}); + +// ../find-packages/lib/index.js +var require_lib21 = __commonJS({ + "../find-packages/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var read_project_manifest_1 = require_lib19(); + var fast_glob_1 = __importDefault(require_out4()); + var p_filter_1 = __importDefault(require_p_filter()); + var DEFAULT_IGNORE = [ + "**/node_modules/**", + "**/bower_components/**", + "**/test/**", + "**/tests/**" + ]; + async function findPkgs(root, opts) { + var _a; + opts = opts !== null && opts !== void 0 ? opts : {}; + const globOpts = { ...opts, cwd: root, includeRoot: void 0 }; + globOpts.ignore = (_a = opts.ignore) !== null && _a !== void 0 ? _a : DEFAULT_IGNORE; + const patterns = normalizePatterns(opts.patterns != null ? opts.patterns : [".", "**"]); + const paths = await fast_glob_1.default(patterns, globOpts); + if (opts.includeRoot) { + Array.prototype.push.apply(paths, await fast_glob_1.default(normalizePatterns(["."]), globOpts)); + } + return p_filter_1.default(Array.from(new Set(paths.map((manifestPath) => path_1.default.join(root, manifestPath)).sort((path1, path2) => path_1.default.dirname(path1).localeCompare(path_1.default.dirname(path2)))), async (manifestPath) => { + try { + return { + dir: path_1.default.dirname(manifestPath), + ...await read_project_manifest_1.readExactProjectManifest(manifestPath) + }; + } catch (err) { + if (err.code === "ENOENT") { + return null; + } + throw err; + } + }), Boolean); + } + exports2.default = findPkgs; + function normalizePatterns(patterns) { + const normalizedPatterns = []; + for (const pattern of patterns) { + normalizedPatterns.push(pattern.replace(/\/?$/, "/package.json")); + normalizedPatterns.push(pattern.replace(/\/?$/, "/package.json5")); + normalizedPatterns.push(pattern.replace(/\/?$/, "/package.yaml")); + } + return normalizedPatterns; + } + } +}); + +// ../find-workspace-packages/lib/index.js +var require_lib22 = __commonJS({ + "../find-workspace-packages/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.arrayOfWorkspacePackagesToMap = exports2.findWorkspacePackagesNoCheck = void 0; + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var constants_1 = require_lib7(); + var find_packages_1 = __importDefault(require_lib21()); + var read_yaml_file_1 = __importDefault(require_read_yaml_file()); + exports2.default = async (workspaceRoot, opts) => { + const pkgs = await findWorkspacePackagesNoCheck(workspaceRoot, opts); + for (const pkg of pkgs) { + cli_utils_1.packageIsInstallable(pkg.dir, pkg.manifest, opts !== null && opts !== void 0 ? opts : {}); + } + return pkgs; + }; + async function findWorkspacePackagesNoCheck(workspaceRoot, opts) { + var _a; + let patterns = opts === null || opts === void 0 ? void 0 : opts.patterns; + if (patterns == null) { + const packagesManifest = await requirePackagesManifest(workspaceRoot); + patterns = (_a = packagesManifest === null || packagesManifest === void 0 ? void 0 : packagesManifest.packages) !== null && _a !== void 0 ? _a : void 0; + } + const pkgs = await find_packages_1.default(workspaceRoot, { + ignore: [ + "**/node_modules/**", + "**/bower_components/**" + ], + includeRoot: true, + patterns + }); + pkgs.sort((pkg1, pkg2) => pkg1.dir.localeCompare(pkg2.dir)); + return pkgs; + } + exports2.findWorkspacePackagesNoCheck = findWorkspacePackagesNoCheck; + async function requirePackagesManifest(dir) { + try { + return await read_yaml_file_1.default(path_1.default.join(dir, constants_1.WORKSPACE_MANIFEST_FILENAME)); + } catch (err) { + if (err["code"] === "ENOENT") { + return null; + } + throw err; + } + } + function arrayOfWorkspacePackagesToMap(pkgs) { + return pkgs.reduce((acc, pkg) => { + var _a; + if (!pkg.manifest.name) + return acc; + if (!acc[pkg.manifest.name]) { + acc[pkg.manifest.name] = {}; + } + acc[pkg.manifest.name][(_a = pkg.manifest.version) !== null && _a !== void 0 ? _a : "0.0.0"] = pkg; + return acc; + }, {}); + } + exports2.arrayOfWorkspacePackagesToMap = arrayOfWorkspacePackagesToMap; + } +}); + +// ../../node_modules/.pnpm/escape-string-regexp@4.0.0/node_modules/escape-string-regexp/index.js +var require_escape_string_regexp2 = __commonJS({ + "../../node_modules/.pnpm/escape-string-regexp@4.0.0/node_modules/escape-string-regexp/index.js"(exports2, module2) { + "use strict"; + module2.exports = (string) => { + if (typeof string !== "string") { + throw new TypeError("Expected a string"); + } + return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); + }; + } +}); + +// ../matcher/lib/index.js +var require_lib23 = __commonJS({ + "../matcher/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var escape_string_regexp_1 = __importDefault(require_escape_string_regexp2()); + function matcher(patterns) { + if (typeof patterns === "string") + return matcherFromPattern(patterns); + switch (patterns.length) { + case 0: + return () => false; + case 1: + return matcherFromPattern(patterns[0]); + } + const matchArr = patterns.map(matcherFromPattern); + return (input) => matchArr.some((match) => match(input)); + } + exports2.default = matcher; + function matcherFromPattern(pattern) { + if (pattern === "*") { + return () => true; + } + const escapedPattern = escape_string_regexp_1.default(pattern).replace(/\\\*/g, ".*"); + if (escapedPattern === pattern) { + return (input) => input === pattern; + } + const regexp = new RegExp(`^${escapedPattern}$`); + return (input) => regexp.test(input); + } + } +}); + +// ../resolve-workspace-range/lib/index.js +var require_lib24 = __commonJS({ + "../resolve-workspace-range/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var semver_1 = __importDefault(require_semver2()); + function default_1(range, versions) { + if (range === "*" || range === "^" || range === "~") { + return semver_1.default.maxSatisfying(versions, "*", { + includePrerelease: true + }); + } + return semver_1.default.maxSatisfying(versions, range, { + loose: true + }); + } + exports2.default = default_1; + } +}); + +// ../../node_modules/.pnpm/builtins@1.0.3/node_modules/builtins/builtins.json +var require_builtins = __commonJS({ + "../../node_modules/.pnpm/builtins@1.0.3/node_modules/builtins/builtins.json"(exports2, module2) { + module2.exports = [ + "assert", + "buffer", + "child_process", + "cluster", + "console", + "constants", + "crypto", + "dgram", + "dns", + "domain", + "events", + "fs", + "http", + "https", + "module", + "net", + "os", + "path", + "process", + "punycode", + "querystring", + "readline", + "repl", + "stream", + "string_decoder", + "timers", + "tls", + "tty", + "url", + "util", + "v8", + "vm", + "zlib" + ]; + } +}); + +// ../../node_modules/.pnpm/validate-npm-package-name@3.0.0/node_modules/validate-npm-package-name/index.js +var require_validate_npm_package_name = __commonJS({ + "../../node_modules/.pnpm/validate-npm-package-name@3.0.0/node_modules/validate-npm-package-name/index.js"(exports2, module2) { + "use strict"; + var scopedPackagePattern = new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"); + var builtins = require_builtins(); + var blacklist = [ + "node_modules", + "favicon.ico" + ]; + var validate = module2.exports = function(name) { + var warnings = []; + var errors = []; + if (name === null) { + errors.push("name cannot be null"); + return done(warnings, errors); + } + if (name === void 0) { + errors.push("name cannot be undefined"); + return done(warnings, errors); + } + if (typeof name !== "string") { + errors.push("name must be a string"); + return done(warnings, errors); + } + if (!name.length) { + errors.push("name length must be greater than zero"); + } + if (name.match(/^\./)) { + errors.push("name cannot start with a period"); + } + if (name.match(/^_/)) { + errors.push("name cannot start with an underscore"); + } + if (name.trim() !== name) { + errors.push("name cannot contain leading or trailing spaces"); + } + blacklist.forEach(function(blacklistedName) { + if (name.toLowerCase() === blacklistedName) { + errors.push(blacklistedName + " is a blacklisted name"); + } + }); + builtins.forEach(function(builtin) { + if (name.toLowerCase() === builtin) { + warnings.push(builtin + " is a core module name"); + } + }); + if (name.length > 214) { + warnings.push("name can no longer contain more than 214 characters"); + } + if (name.toLowerCase() !== name) { + warnings.push("name can no longer contain capital letters"); + } + if (/[~'!()*]/.test(name.split("/").slice(-1)[0])) { + warnings.push(`name can no longer contain special characters ("~'!()*")`); + } + if (encodeURIComponent(name) !== name) { + var nameMatch = name.match(scopedPackagePattern); + if (nameMatch) { + var user = nameMatch[1]; + var pkg = nameMatch[2]; + if (encodeURIComponent(user) === user && encodeURIComponent(pkg) === pkg) { + return done(warnings, errors); + } + } + errors.push("name can only contain URL-friendly characters"); + } + return done(warnings, errors); + }; + validate.scopedPackagePattern = scopedPackagePattern; + var done = function(warnings, errors) { + var result = { + validForNewPackages: errors.length === 0 && warnings.length === 0, + validForOldPackages: errors.length === 0, + warnings, + errors + }; + if (!result.warnings.length) + delete result.warnings; + if (!result.errors.length) + delete result.errors; + return result; + }; + } +}); + +// ../../node_modules/.pnpm/@zkochan+hosted-git-info@4.0.2/node_modules/@zkochan/hosted-git-info/git-host-info.js +var require_git_host_info = __commonJS({ + "../../node_modules/.pnpm/@zkochan+hosted-git-info@4.0.2/node_modules/@zkochan/hosted-git-info/git-host-info.js"(exports2, module2) { + "use strict"; + var maybeJoin = (...args2) => args2.every((arg) => arg) ? args2.join("") : ""; + var maybeEncode = (arg) => arg ? encodeURIComponent(arg) : ""; + var defaults = { + sshtemplate: ({ domain, user, project, committish }) => `git@${domain}:${user}/${project}.git${maybeJoin("#", committish)}`, + sshurltemplate: ({ domain, user, project, committish }) => `git+ssh://git@${domain}/${user}/${project}.git${maybeJoin("#", committish)}`, + browsetemplate: ({ domain, user, project, committish, treepath }) => `https://${domain}/${user}/${project}${maybeJoin("/", treepath, "/", maybeEncode(committish))}`, + browsefiletemplate: ({ domain, user, project, committish, treepath, path, fragment, hashformat }) => `https://${domain}/${user}/${project}/${treepath}/${maybeEncode(committish || "master")}/${path}${maybeJoin("#", hashformat(fragment || ""))}`, + docstemplate: ({ domain, user, project, treepath, committish }) => `https://${domain}/${user}/${project}${maybeJoin("/", treepath, "/", maybeEncode(committish))}#readme`, + httpstemplate: ({ auth, domain, user, project, committish }) => `git+https://${maybeJoin(auth, "@")}${domain}/${user}/${project}.git${maybeJoin("#", committish)}`, + filetemplate: ({ domain, user, project, committish, path }) => `https://${domain}/${user}/${project}/raw/${maybeEncode(committish) || "master"}/${path}`, + shortcuttemplate: ({ type, user, project, committish }) => `${type}:${user}/${project}${maybeJoin("#", committish)}`, + pathtemplate: ({ user, project, committish }) => `${user}/${project}${maybeJoin("#", committish)}`, + bugstemplate: ({ domain, user, project }) => `https://${domain}/${user}/${project}/issues`, + hashformat: formatHashFragment + }; + var gitHosts = {}; + gitHosts.github = Object.assign({}, defaults, { + protocols: ["git:", "http:", "git+ssh:", "git+https:", "ssh:", "https:"], + domain: "github.com", + treepath: "tree", + filetemplate: ({ auth, user, project, committish, path }) => `https://${maybeJoin(auth, "@")}raw.githubusercontent.com/${user}/${project}/${maybeEncode(committish) || "master"}/${path}`, + gittemplate: ({ auth, domain, user, project, committish }) => `git://${maybeJoin(auth, "@")}${domain}/${user}/${project}.git${maybeJoin("#", committish)}`, + tarballtemplate: ({ domain, user, project, committish }) => `https://codeload.${domain}/${user}/${project}/tar.gz/${maybeEncode(committish) || "master"}`, + extract: (url) => { + let [, user, project, type, committish] = url.pathname.split("/", 5); + if (type && type !== "tree") { + return; + } + if (!type) { + committish = url.hash.slice(1); + } + if (project && project.endsWith(".git")) { + project = project.slice(0, -4); + } + if (!user || !project) { + return; + } + return { user, project, committish }; + } + }); + gitHosts.bitbucket = Object.assign({}, defaults, { + protocols: ["git+ssh:", "git+https:", "ssh:", "https:"], + domain: "bitbucket.org", + treepath: "src", + tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/get/${maybeEncode(committish) || "master"}.tar.gz`, + extract: (url) => { + let [, user, project, aux] = url.pathname.split("/", 4); + if (["get"].includes(aux)) { + return; + } + if (project && project.endsWith(".git")) { + project = project.slice(0, -4); + } + if (!user || !project) { + return; + } + return { user, project, committish: url.hash.slice(1) }; + } + }); + gitHosts.gitlab = Object.assign({}, defaults, { + protocols: ["git+ssh:", "git+https:", "ssh:", "https:"], + domain: "gitlab.com", + treepath: "tree", + httpstemplate: ({ auth, domain, user, project, committish }) => `git+https://${maybeJoin(auth, "@")}${domain}/${user}/${project}.git${maybeJoin("#", committish)}`, + tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/api/v4/projects/${user}%2F${project}/repository/archive.tar.gz?ref=${maybeEncode(committish) || "master"}`, + extract: (url) => { + const path = url.pathname.slice(1); + if (path.includes("/-/") || path.includes("/archive.tar.gz")) { + return; + } + const segments = path.split("/"); + let project = segments.pop(); + if (project.endsWith(".git")) { + project = project.slice(0, -4); + } + const user = segments.join("/"); + if (!user || !project) { + return; + } + return { user, project, committish: url.hash.slice(1) }; + } + }); + gitHosts.gist = Object.assign({}, defaults, { + protocols: ["git:", "git+ssh:", "git+https:", "ssh:", "https:"], + domain: "gist.github.com", + sshtemplate: ({ domain, project, committish }) => `git@${domain}:${project}.git${maybeJoin("#", committish)}`, + sshurltemplate: ({ domain, project, committish }) => `git+ssh://git@${domain}/${project}.git${maybeJoin("#", committish)}`, + browsetemplate: ({ domain, project, committish }) => `https://${domain}/${project}${maybeJoin("/", maybeEncode(committish))}`, + browsefiletemplate: ({ domain, project, committish, path, hashformat }) => `https://${domain}/${project}${maybeJoin("/", maybeEncode(committish))}${maybeJoin("#", hashformat(path))}`, + docstemplate: ({ domain, project, committish }) => `https://${domain}/${project}${maybeJoin("/", maybeEncode(committish))}`, + httpstemplate: ({ domain, project, committish }) => `git+https://${domain}/${project}.git${maybeJoin("#", committish)}`, + filetemplate: ({ user, project, committish, path }) => `https://gist.githubusercontent.com/${user}/${project}/raw${maybeJoin("/", maybeEncode(committish))}/${path}`, + shortcuttemplate: ({ type, project, committish }) => `${type}:${project}${maybeJoin("#", committish)}`, + pathtemplate: ({ project, committish }) => `${project}${maybeJoin("#", committish)}`, + bugstemplate: ({ domain, project }) => `https://${domain}/${project}`, + gittemplate: ({ domain, project, committish }) => `git://${domain}/${project}.git${maybeJoin("#", committish)}`, + tarballtemplate: ({ project, committish }) => `https://codeload.github.com/gist/${project}/tar.gz/${maybeEncode(committish) || "master"}`, + extract: (url) => { + let [, user, project, aux] = url.pathname.split("/", 4); + if (aux === "raw") { + return; + } + if (!project) { + if (!user) { + return; + } + project = user; + user = null; + } + if (project.endsWith(".git")) { + project = project.slice(0, -4); + } + return { user, project, committish: url.hash.slice(1) }; + }, + hashformat: function(fragment) { + return fragment && "file-" + formatHashFragment(fragment); + } + }); + var names = Object.keys(gitHosts); + gitHosts.byShortcut = {}; + gitHosts.byDomain = {}; + for (const name of names) { + gitHosts.byShortcut[`${name}:`] = name; + gitHosts.byDomain[gitHosts[name].domain] = name; + } + function formatHashFragment(fragment) { + return fragment.toLowerCase().replace(/^\W+|\/|\W+$/g, "").replace(/\W+/g, "-"); + } + module2.exports = gitHosts; + } +}); + +// ../../node_modules/.pnpm/@zkochan+hosted-git-info@4.0.2/node_modules/@zkochan/hosted-git-info/git-host.js +var require_git_host = __commonJS({ + "../../node_modules/.pnpm/@zkochan+hosted-git-info@4.0.2/node_modules/@zkochan/hosted-git-info/git-host.js"(exports2, module2) { + "use strict"; + var gitHosts = require_git_host_info(); + var GitHost = class { + constructor(type, user, auth, project, committish, defaultRepresentation, opts = {}) { + Object.assign(this, gitHosts[type]); + this.type = type; + this.user = user; + this.auth = auth; + this.project = project; + this.committish = committish; + this.default = defaultRepresentation; + this.opts = opts; + } + hash() { + return this.committish ? `#${this.committish}` : ""; + } + ssh(opts) { + return this._fill(this.sshtemplate, opts); + } + _fill(template, opts) { + if (typeof template === "function") { + const options = { ...this, ...this.opts, ...opts }; + if (!options.path) { + options.path = ""; + } + if (options.path.startsWith("/")) { + options.path = options.path.slice(1); + } + if (options.noCommittish) { + options.committish = null; + } + const result = template(options); + return options.noGitPlus && result.startsWith("git+") ? result.slice(4) : result; + } + return null; + } + sshurl(opts) { + return this._fill(this.sshurltemplate, opts); + } + browse(path, fragment, opts) { + if (typeof path !== "string") { + return this._fill(this.browsetemplate, path); + } + if (typeof fragment !== "string") { + opts = fragment; + fragment = null; + } + return this._fill(this.browsefiletemplate, { ...opts, fragment, path }); + } + docs(opts) { + return this._fill(this.docstemplate, opts); + } + bugs(opts) { + return this._fill(this.bugstemplate, opts); + } + https(opts) { + return this._fill(this.httpstemplate, opts); + } + git(opts) { + return this._fill(this.gittemplate, opts); + } + shortcut(opts) { + return this._fill(this.shortcuttemplate, opts); + } + path(opts) { + return this._fill(this.pathtemplate, opts); + } + tarball(opts) { + return this._fill(this.tarballtemplate, { ...opts, noCommittish: false }); + } + file(path, opts) { + return this._fill(this.filetemplate, { ...opts, path }); + } + getDefaultRepresentation() { + return this.default; + } + toString(opts) { + if (this.default && typeof this[this.default] === "function") { + return this[this.default](opts); + } + return this.sshurl(opts); + } + }; + module2.exports = GitHost; + } +}); + +// ../../node_modules/.pnpm/@zkochan+hosted-git-info@4.0.2/node_modules/@zkochan/hosted-git-info/index.js +var require_hosted_git_info = __commonJS({ + "../../node_modules/.pnpm/@zkochan+hosted-git-info@4.0.2/node_modules/@zkochan/hosted-git-info/index.js"(exports2, module2) { + "use strict"; + var url = require("url"); + var gitHosts = require_git_host_info(); + var GitHost = module2.exports = require_git_host(); + var LRU = require_lru_cache(); + var cache = new LRU({ max: 1e3 }); + var protocolToRepresentationMap = { + "git+ssh:": "sshurl", + "git+https:": "https", + "ssh:": "sshurl", + "git:": "git" + }; + function protocolToRepresentation(protocol) { + return protocolToRepresentationMap[protocol] || protocol.slice(0, -1); + } + var authProtocols = { + "git:": true, + "https:": true, + "git+https:": true, + "http:": true, + "git+http:": true + }; + var knownProtocols = Object.keys(gitHosts.byShortcut).concat(["http:", "https:", "git:", "git+ssh:", "git+https:", "ssh:"]); + module2.exports.fromUrl = function(giturl, opts) { + if (typeof giturl !== "string") { + return; + } + const key = giturl + JSON.stringify(opts || {}); + if (!cache.has(key)) { + cache.set(key, fromUrl(giturl, opts)); + } + return cache.get(key); + }; + function fromUrl(giturl, opts) { + if (!giturl) { + return; + } + const url2 = isGitHubShorthand(giturl) ? "github:" + giturl : correctProtocol(giturl); + const parsed = parseGitUrl(url2); + if (!parsed) { + return parsed; + } + const gitHostShortcut = gitHosts.byShortcut[parsed.protocol]; + const gitHostDomain = gitHosts.byDomain[parsed.hostname.startsWith("www.") ? parsed.hostname.slice(4) : parsed.hostname]; + const gitHostName = gitHostShortcut || gitHostDomain; + if (!gitHostName) { + return; + } + const gitHostInfo = gitHosts[gitHostShortcut || gitHostDomain]; + let auth = null; + if (authProtocols[parsed.protocol] && (parsed.username || parsed.password)) { + auth = `${parsed.username}${parsed.password ? ":" + parsed.password : ""}`; + } + let committish = null; + let user = null; + let project = null; + let defaultRepresentation = null; + try { + if (gitHostShortcut) { + let pathname = parsed.pathname.startsWith("/") ? parsed.pathname.slice(1) : parsed.pathname; + const firstAt = pathname.indexOf("@"); + if (firstAt > -1) { + pathname = pathname.slice(firstAt + 1); + } + const lastSlash = pathname.lastIndexOf("/"); + if (lastSlash > -1) { + user = decodeURIComponent(pathname.slice(0, lastSlash)); + if (!user) { + user = null; + } + project = decodeURIComponent(pathname.slice(lastSlash + 1)); + } else { + project = decodeURIComponent(pathname); + } + if (project.endsWith(".git")) { + project = project.slice(0, -4); + } + if (parsed.hash) { + committish = decodeURIComponent(parsed.hash.slice(1)); + } + defaultRepresentation = "shortcut"; + } else { + if (!gitHostInfo.protocols.includes(parsed.protocol)) { + return; + } + const segments = gitHostInfo.extract(parsed); + if (!segments) { + return; + } + user = segments.user && decodeURIComponent(segments.user); + project = decodeURIComponent(segments.project); + committish = decodeURIComponent(segments.committish); + defaultRepresentation = protocolToRepresentation(parsed.protocol); + } + } catch (err) { + if (err instanceof URIError) { + return; + } else { + throw err; + } + } + return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation, opts); + } + var correctProtocol = (arg) => { + const firstColon = arg.indexOf(":"); + const proto = arg.slice(0, firstColon + 1); + if (knownProtocols.includes(proto)) { + return arg; + } + const firstAt = arg.indexOf("@"); + if (firstAt > -1) { + if (firstAt > firstColon) { + return `git+ssh://${arg}`; + } else { + return arg; + } + } + const doubleSlash = arg.indexOf("//"); + if (doubleSlash === firstColon + 1) { + return arg; + } + return arg.slice(0, firstColon + 1) + "//" + arg.slice(firstColon + 1); + }; + var isGitHubShorthand = (arg) => { + const firstHash = arg.indexOf("#"); + const firstSlash = arg.indexOf("/"); + const secondSlash = arg.indexOf("/", firstSlash + 1); + const firstColon = arg.indexOf(":"); + const firstSpace = /\s/.exec(arg); + const firstAt = arg.indexOf("@"); + const spaceOnlyAfterHash = !firstSpace || firstHash > -1 && firstSpace.index > firstHash; + const atOnlyAfterHash = firstAt === -1 || firstHash > -1 && firstAt > firstHash; + const colonOnlyAfterHash = firstColon === -1 || firstHash > -1 && firstColon > firstHash; + const secondSlashOnlyAfterHash = secondSlash === -1 || firstHash > -1 && secondSlash > firstHash; + const hasSlash = firstSlash > 0; + const doesNotEndWithSlash = firstHash > -1 ? arg[firstHash - 1] !== "/" : !arg.endsWith("/"); + const doesNotStartWithDot = !arg.startsWith("."); + return spaceOnlyAfterHash && hasSlash && doesNotEndWithSlash && doesNotStartWithDot && atOnlyAfterHash && colonOnlyAfterHash && secondSlashOnlyAfterHash; + }; + var correctUrl = (giturl) => { + const firstAt = giturl.indexOf("@"); + const lastHash = giturl.lastIndexOf("#"); + let firstColon = giturl.indexOf(":"); + let lastColon = giturl.lastIndexOf(":", lastHash > -1 ? lastHash : Infinity); + let corrected; + if (lastColon > firstAt) { + corrected = giturl.slice(0, lastColon) + "/" + giturl.slice(lastColon + 1); + firstColon = corrected.indexOf(":"); + lastColon = corrected.lastIndexOf(":"); + } + if (firstColon === -1 && giturl.indexOf("//") === -1) { + corrected = `git+ssh://${corrected}`; + } + return corrected; + }; + var parseGitUrl = (giturl) => { + let result; + try { + result = new url.URL(giturl); + } catch (err) { + } + if (result) { + return result; + } + const correctedUrl = correctUrl(giturl); + try { + result = new url.URL(correctedUrl); + } catch (err) { + } + return result; + }; + } +}); + +// ../../node_modules/.pnpm/@zkochan+npm-package-arg@2.0.1/node_modules/@zkochan/npm-package-arg/npa.js +var require_npa = __commonJS({ + "../../node_modules/.pnpm/@zkochan+npm-package-arg@2.0.1/node_modules/@zkochan/npm-package-arg/npa.js"(exports2, module2) { + "use strict"; + module2.exports = npa; + module2.exports.resolve = resolve; + module2.exports.Result = Result; + var url; + var HostedGit; + var semver; + var path; + var validatePackageName; + var os; + var isWindows = process.platform === "win32" || global.FAKE_WINDOWS; + var hasSlashes = isWindows ? /\\|[/]/ : /[/]/; + var isURL = /^(?:git[+])?[a-z]+:/i; + var isFilename = /[.](?:tgz|tar.gz|tar)$/i; + function npa(arg, where) { + let name; + let spec; + if (typeof arg === "object") { + if (arg instanceof Result && (!where || where === arg.where)) { + return arg; + } else if (arg.name && arg.rawSpec) { + return npa.resolve(arg.name, arg.rawSpec, where || arg.where); + } else { + return npa(arg.raw, where || arg.where); + } + } + const nameEndsAt = arg[0] === "@" ? arg.slice(1).indexOf("@") + 1 : arg.indexOf("@"); + const namePart = nameEndsAt > 0 ? arg.slice(0, nameEndsAt) : arg; + if (isURL.test(arg)) { + spec = arg; + } else if (namePart[0] !== "@" && (hasSlashes.test(namePart) || isFilename.test(namePart))) { + spec = arg; + } else if (nameEndsAt > 0) { + name = namePart; + spec = arg.slice(nameEndsAt + 1); + } else { + if (!validatePackageName) + validatePackageName = require_validate_npm_package_name(); + const valid = validatePackageName(arg); + if (valid.validForOldPackages) { + name = arg; + } else { + spec = arg; + } + } + return resolve(name, spec, where, arg); + } + var isFilespec = isWindows ? /^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/ : /^(?:[.]|~[/]|[/]|[a-zA-Z]:)/; + function resolve(name, spec, where, arg) { + const res = new Result({ + raw: arg, + name, + rawSpec: spec, + fromArgument: arg != null + }); + if (name) + res.setName(name); + if (spec && (isFilespec.test(spec) || /^file:/i.test(spec))) { + return fromFile(res, where); + } + if (spec && spec.startsWith("npm:")) { + return Object.assign(npa(spec.substr(4), where), { + alias: name, + raw: res.raw, + rawSpec: res.rawSpec + }); + } + if (!HostedGit) + HostedGit = require_hosted_git_info(); + const hosted = HostedGit.fromUrl(spec, { noGitPlus: true, noCommittish: true }); + if (hosted) { + return fromHostedGit(res, hosted); + } else if (spec && isURL.test(spec)) { + return fromURL(res); + } else if (spec && (hasSlashes.test(spec) || isFilename.test(spec))) { + return fromFile(res, where); + } else { + return fromRegistry(res); + } + } + function invalidPackageName(name, valid) { + const err = new Error(`Invalid package name "${name}": ${valid.errors.join("; ")}`); + err.code = "EINVALIDPACKAGENAME"; + return err; + } + function invalidTagName(name) { + const err = new Error(`Invalid tag name "${name}": Tags may not have any characters that encodeURIComponent encodes.`); + err.code = "EINVALIDTAGNAME"; + return err; + } + function Result(opts) { + this.type = opts.type; + this.registry = opts.registry; + this.where = opts.where; + if (opts.raw == null) { + this.raw = opts.name ? opts.name + "@" + opts.rawSpec : opts.rawSpec; + } else { + this.raw = opts.raw; + } + this.name = void 0; + this.escapedName = void 0; + this.scope = void 0; + this.rawSpec = opts.rawSpec == null ? "" : opts.rawSpec; + this.saveSpec = opts.saveSpec; + this.fetchSpec = opts.fetchSpec; + if (opts.name) + this.setName(opts.name); + this.gitRange = opts.gitRange; + this.gitCommittish = opts.gitCommittish; + this.hosted = opts.hosted; + } + Result.prototype = {}; + Result.prototype.setName = function(name) { + if (!validatePackageName) + validatePackageName = require_validate_npm_package_name(); + const valid = validatePackageName(name); + if (!valid.validForOldPackages) { + throw invalidPackageName(name, valid); + } + this.name = name; + this.scope = name[0] === "@" ? name.slice(0, name.indexOf("/")) : void 0; + this.escapedName = name.replace("/", "%2f"); + return this; + }; + Result.prototype.toString = function() { + const full = []; + if (this.name != null && this.name !== "") + full.push(this.name); + const spec = this.saveSpec || this.fetchSpec || this.rawSpec; + if (spec != null && spec !== "") + full.push(spec); + return full.length ? full.join("@") : this.raw; + }; + Result.prototype.toJSON = function() { + const result = Object.assign({}, this); + delete result.hosted; + return result; + }; + function setGitCommittish(res, committish) { + if (committish != null && committish.length >= 7 && committish.slice(0, 7) === "semver:") { + res.gitRange = decodeURIComponent(committish.slice(7)); + res.gitCommittish = null; + } else { + res.gitCommittish = committish === "" ? null : committish; + } + return res; + } + var isAbsolutePath = /^[/]|^[A-Za-z]:/; + function resolvePath(where, spec) { + if (isAbsolutePath.test(spec)) + return spec; + if (!path) + path = require("path"); + return path.resolve(where, spec); + } + function isAbsolute(dir) { + if (dir[0] === "/") + return true; + if (/^[A-Za-z]:/.test(dir)) + return true; + return false; + } + function fromFile(res, where) { + if (!where) + where = process.cwd(); + res.type = isFilename.test(res.rawSpec) ? "file" : "directory"; + res.where = where; + const spec = res.rawSpec.replace(/\\/g, "/").replace(/^file:[/]*([A-Za-z]:)/, "$1").replace(/^file:(?:[/]*([~./]))?/, "$1"); + if (/^~[/]/.test(spec)) { + if (!os) + os = require("os"); + res.fetchSpec = resolvePath(os.homedir(), spec.slice(2)); + res.saveSpec = "file:" + spec; + } else { + res.fetchSpec = resolvePath(where, spec); + if (isAbsolute(spec)) { + res.saveSpec = "file:" + spec; + } else { + if (!path) + path = require("path"); + res.saveSpec = "file:" + path.relative(where, res.fetchSpec); + } + } + return res; + } + function fromHostedGit(res, hosted) { + res.type = "git"; + res.hosted = hosted; + res.saveSpec = hosted.toString({ noGitPlus: false, noCommittish: false }); + res.fetchSpec = hosted.getDefaultRepresentation() === "shortcut" ? null : hosted.toString(); + return setGitCommittish(res, hosted.committish); + } + function unsupportedURLType(protocol, spec) { + const err = new Error(`Unsupported URL Type "${protocol}": ${spec}`); + err.code = "EUNSUPPORTEDPROTOCOL"; + return err; + } + function matchGitScp(spec) { + const matched = spec.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i); + return matched && !matched[1].match(/:[0-9]+\/?.*$/i) && { + fetchSpec: matched[1], + gitCommittish: matched[2] == null ? null : matched[2] + }; + } + function fromURL(res) { + if (!url) + url = require("url"); + const urlparse = url.parse(res.rawSpec); + res.saveSpec = res.rawSpec; + switch (urlparse.protocol) { + case "git:": + case "git+http:": + case "git+https:": + case "git+rsync:": + case "git+ftp:": + case "git+file:": + case "git+ssh:": { + res.type = "git"; + const match = urlparse.protocol === "git+ssh:" && matchGitScp(res.rawSpec); + if (match) { + res.fetchSpec = match.fetchSpec; + res.gitCommittish = match.gitCommittish; + } else { + setGitCommittish(res, urlparse.hash != null ? urlparse.hash.slice(1) : ""); + urlparse.protocol = urlparse.protocol.replace(/^git[+]/, ""); + delete urlparse.hash; + res.fetchSpec = url.format(urlparse); + } + break; + } + case "http:": + case "https:": + res.type = "remote"; + res.fetchSpec = res.saveSpec; + break; + default: + throw unsupportedURLType(urlparse.protocol, res.rawSpec); + } + return res; + } + function fromRegistry(res) { + res.registry = true; + const spec = res.rawSpec === "" ? "latest" : res.rawSpec; + res.saveSpec = null; + res.fetchSpec = spec; + if (!semver) + semver = require_semver2(); + const version = semver.valid(spec, true); + const range = semver.validRange(spec, true); + if (version) { + res.type = "version"; + } else if (range) { + res.type = "range"; + } else { + if (encodeURIComponent(spec) !== spec) { + throw invalidTagName(spec); + } + res.type = "tag"; + } + return res; + } + } +}); + +// ../pkgs-graph/lib/index.js +var require_lib25 = __commonJS({ + "../pkgs-graph/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var resolve_workspace_range_1 = __importDefault(require_lib24()); + var npm_package_arg_1 = __importDefault(require_npa()); + function default_1(pkgs, opts) { + const pkgMap = createPkgMap(pkgs); + const unmatched = []; + const graph = Object.keys(pkgMap).reduce((acc, pkgSpec) => { + acc[pkgSpec] = { + dependencies: createNode(pkgMap[pkgSpec]), + package: pkgMap[pkgSpec] + }; + return acc; + }, {}); + return { graph, unmatched }; + function createNode(pkg) { + const dependencies = { + ...!(opts === null || opts === void 0 ? void 0 : opts.ignoreDevDeps) && pkg.manifest.devDependencies, + ...pkg.manifest.optionalDependencies, + ...pkg.manifest.dependencies + }; + return Object.keys(dependencies).map((depName) => { + let spec; + let rawSpec = dependencies[depName]; + const isWorkspaceSpec = rawSpec.startsWith("workspace:"); + try { + if (isWorkspaceSpec) { + rawSpec = rawSpec.substr(10); + if (rawSpec === "^" || rawSpec === "~") { + rawSpec = "*"; + } + ; + } + spec = npm_package_arg_1.default.resolve(depName, rawSpec, pkg.dir); + } catch (err) { + return ""; + } + if (spec.type === "directory") { + const matchedPkg2 = Object.values(pkgMap).find((pkg2) => path_1.default.relative(pkg2.dir, spec.fetchSpec) === ""); + if (matchedPkg2 == null) { + return ""; + } + return matchedPkg2.dir; + } + if (spec.type !== "version" && spec.type !== "range") + return ""; + const pkgs2 = Object.values(pkgMap).filter((pkg2) => pkg2.manifest.name === depName); + if (pkgs2.length === 0) + return ""; + const versions = pkgs2.filter(({ manifest }) => manifest.version).map((pkg2) => pkg2.manifest.version); + const strictWorkspaceMatching = (opts === null || opts === void 0 ? void 0 : opts.linkWorkspacePackages) === false && !isWorkspaceSpec; + if (strictWorkspaceMatching) { + unmatched.push({ pkgName: depName, range: rawSpec }); + return ""; + } + if (versions.includes(rawSpec)) { + const matchedPkg2 = pkgs2.find((pkg2) => pkg2.manifest.name === depName && pkg2.manifest.version === rawSpec); + return matchedPkg2.dir; + } + const matched = resolve_workspace_range_1.default(rawSpec, versions); + if (!matched) { + unmatched.push({ pkgName: depName, range: rawSpec }); + return ""; + } + const matchedPkg = pkgs2.find((pkg2) => pkg2.manifest.name === depName && pkg2.manifest.version === matched); + return matchedPkg.dir; + }).filter(Boolean); + } + } + exports2.default = default_1; + function createPkgMap(pkgs) { + const pkgMap = {}; + for (const pkg of pkgs) { + pkgMap[pkg.dir] = pkg; + } + return pkgMap; + } + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isArray.js +var require_isArray = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isArray.js"(exports2, module2) { + module2.exports = Array.isArray || function _isArray(val) { + return val != null && val.length >= 0 && Object.prototype.toString.call(val) === "[object Array]"; + }; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isTransformer.js +var require_isTransformer = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isTransformer.js"(exports2, module2) { + function _isTransformer(obj) { + return obj != null && typeof obj["@@transducer/step"] === "function"; + } + module2.exports = _isTransformer; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_dispatchable.js +var require_dispatchable = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_dispatchable.js"(exports2, module2) { + var _isArray = require_isArray(); + var _isTransformer = require_isTransformer(); + function _dispatchable(methodNames, xf, fn2) { + return function() { + if (arguments.length === 0) { + return fn2(); + } + var args2 = Array.prototype.slice.call(arguments, 0); + var obj = args2.pop(); + if (!_isArray(obj)) { + var idx = 0; + while (idx < methodNames.length) { + if (typeof obj[methodNames[idx]] === "function") { + return obj[methodNames[idx]].apply(obj, args2); + } + idx += 1; + } + if (_isTransformer(obj)) { + var transducer = xf.apply(null, args2); + return transducer(obj); + } + } + return fn2.apply(this, arguments); + }; + } + module2.exports = _dispatchable; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_filter.js +var require_filter2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_filter.js"(exports2, module2) { + function _filter(fn2, list) { + var idx = 0; + var len = list.length; + var result = []; + while (idx < len) { + if (fn2(list[idx])) { + result[result.length] = list[idx]; + } + idx += 1; + } + return result; + } + module2.exports = _filter; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isObject.js +var require_isObject = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isObject.js"(exports2, module2) { + function _isObject(x) { + return Object.prototype.toString.call(x) === "[object Object]"; + } + module2.exports = _isObject; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isString.js +var require_isString = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isString.js"(exports2, module2) { + function _isString(x) { + return Object.prototype.toString.call(x) === "[object String]"; + } + module2.exports = _isString; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isArrayLike.js +var require_isArrayLike2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isArrayLike.js"(exports2, module2) { + var _curry1 = require_curry1(); + var _isArray = require_isArray(); + var _isString = require_isString(); + var _isArrayLike = /* @__PURE__ */ _curry1(function isArrayLike(x) { + if (_isArray(x)) { + return true; + } + if (!x) { + return false; + } + if (typeof x !== "object") { + return false; + } + if (_isString(x)) { + return false; + } + if (x.nodeType === 1) { + return !!x.length; + } + if (x.length === 0) { + return true; + } + if (x.length > 0) { + return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1); + } + return false; + }); + module2.exports = _isArrayLike; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xwrap.js +var require_xwrap = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xwrap.js"(exports2, module2) { + var XWrap = /* @__PURE__ */ function() { + function XWrap2(fn2) { + this.f = fn2; + } + XWrap2.prototype["@@transducer/init"] = function() { + throw new Error("init not implemented on XWrap"); + }; + XWrap2.prototype["@@transducer/result"] = function(acc) { + return acc; + }; + XWrap2.prototype["@@transducer/step"] = function(acc, x) { + return this.f(acc, x); + }; + return XWrap2; + }(); + function _xwrap(fn2) { + return new XWrap(fn2); + } + module2.exports = _xwrap; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_arity.js +var require_arity = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_arity.js"(exports2, module2) { + function _arity(n, fn2) { + switch (n) { + case 0: + return function() { + return fn2.apply(this, arguments); + }; + case 1: + return function(a0) { + return fn2.apply(this, arguments); + }; + case 2: + return function(a0, a1) { + return fn2.apply(this, arguments); + }; + case 3: + return function(a0, a1, a2) { + return fn2.apply(this, arguments); + }; + case 4: + return function(a0, a1, a2, a3) { + return fn2.apply(this, arguments); + }; + case 5: + return function(a0, a1, a2, a3, a4) { + return fn2.apply(this, arguments); + }; + case 6: + return function(a0, a1, a2, a3, a4, a5) { + return fn2.apply(this, arguments); + }; + case 7: + return function(a0, a1, a2, a3, a4, a5, a6) { + return fn2.apply(this, arguments); + }; + case 8: + return function(a0, a1, a2, a3, a4, a5, a6, a7) { + return fn2.apply(this, arguments); + }; + case 9: + return function(a0, a1, a2, a3, a4, a5, a6, a7, a8) { + return fn2.apply(this, arguments); + }; + case 10: + return function(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { + return fn2.apply(this, arguments); + }; + default: + throw new Error("First argument to _arity must be a non-negative integer no greater than ten"); + } + } + module2.exports = _arity; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/bind.js +var require_bind = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/bind.js"(exports2, module2) { + var _arity = require_arity(); + var _curry2 = require_curry2(); + var bind = /* @__PURE__ */ _curry2(function bind2(fn2, thisObj) { + return _arity(fn2.length, function() { + return fn2.apply(thisObj, arguments); + }); + }); + module2.exports = bind; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_reduce.js +var require_reduce2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_reduce.js"(exports2, module2) { + var _isArrayLike = require_isArrayLike2(); + var _xwrap = require_xwrap(); + var bind = require_bind(); + function _arrayReduce(xf, acc, list) { + var idx = 0; + var len = list.length; + while (idx < len) { + acc = xf["@@transducer/step"](acc, list[idx]); + if (acc && acc["@@transducer/reduced"]) { + acc = acc["@@transducer/value"]; + break; + } + idx += 1; + } + return xf["@@transducer/result"](acc); + } + function _iterableReduce(xf, acc, iter) { + var step = iter.next(); + while (!step.done) { + acc = xf["@@transducer/step"](acc, step.value); + if (acc && acc["@@transducer/reduced"]) { + acc = acc["@@transducer/value"]; + break; + } + step = iter.next(); + } + return xf["@@transducer/result"](acc); + } + function _methodReduce(xf, acc, obj, methodName) { + return xf["@@transducer/result"](obj[methodName](bind(xf["@@transducer/step"], xf), acc)); + } + var symIterator = typeof Symbol !== "undefined" ? Symbol.iterator : "@@iterator"; + function _reduce(fn2, acc, list) { + if (typeof fn2 === "function") { + fn2 = _xwrap(fn2); + } + if (_isArrayLike(list)) { + return _arrayReduce(fn2, acc, list); + } + if (typeof list["fantasy-land/reduce"] === "function") { + return _methodReduce(fn2, acc, list, "fantasy-land/reduce"); + } + if (list[symIterator] != null) { + return _iterableReduce(fn2, acc, list[symIterator]()); + } + if (typeof list.next === "function") { + return _iterableReduce(fn2, acc, list); + } + if (typeof list.reduce === "function") { + return _methodReduce(fn2, acc, list, "reduce"); + } + throw new TypeError("reduce: list must be array or iterable"); + } + module2.exports = _reduce; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xfBase.js +var require_xfBase = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xfBase.js"(exports2, module2) { + module2.exports = { + init: function() { + return this.xf["@@transducer/init"](); + }, + result: function(result) { + return this.xf["@@transducer/result"](result); + } + }; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xfilter.js +var require_xfilter = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xfilter.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _xfBase = require_xfBase(); + var XFilter = /* @__PURE__ */ function() { + function XFilter2(f, xf) { + this.xf = xf; + this.f = f; + } + XFilter2.prototype["@@transducer/init"] = _xfBase.init; + XFilter2.prototype["@@transducer/result"] = _xfBase.result; + XFilter2.prototype["@@transducer/step"] = function(result, input) { + return this.f(input) ? this.xf["@@transducer/step"](result, input) : result; + }; + return XFilter2; + }(); + var _xfilter = /* @__PURE__ */ _curry2(function _xfilter2(f, xf) { + return new XFilter(f, xf); + }); + module2.exports = _xfilter; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/filter.js +var require_filter3 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/filter.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _dispatchable = require_dispatchable(); + var _filter = require_filter2(); + var _isObject = require_isObject(); + var _reduce = require_reduce2(); + var _xfilter = require_xfilter(); + var keys = require_keys(); + var filter = /* @__PURE__ */ _curry2(/* @__PURE__ */ _dispatchable(["filter"], _xfilter, function(pred, filterable) { + return _isObject(filterable) ? _reduce(function(acc, key) { + if (pred(filterable[key])) { + acc[key] = filterable[key]; + } + return acc; + }, {}, keys(filterable)) : _filter(pred, filterable); + })); + module2.exports = filter; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_map.js +var require_map3 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_map.js"(exports2, module2) { + function _map(fn2, functor) { + var idx = 0; + var len = functor.length; + var result = Array(len); + while (idx < len) { + result[idx] = fn2(functor[idx]); + idx += 1; + } + return result; + } + module2.exports = _map; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_curryN.js +var require_curryN = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_curryN.js"(exports2, module2) { + var _arity = require_arity(); + var _isPlaceholder = require_isPlaceholder(); + function _curryN(length, received, fn2) { + return function() { + var combined = []; + var argsIdx = 0; + var left = length; + var combinedIdx = 0; + while (combinedIdx < received.length || argsIdx < arguments.length) { + var result; + if (combinedIdx < received.length && (!_isPlaceholder(received[combinedIdx]) || argsIdx >= arguments.length)) { + result = received[combinedIdx]; + } else { + result = arguments[argsIdx]; + argsIdx += 1; + } + combined[combinedIdx] = result; + if (!_isPlaceholder(result)) { + left -= 1; + } + combinedIdx += 1; + } + return left <= 0 ? fn2.apply(this, combined) : _arity(left, _curryN(length, combined, fn2)); + }; + } + module2.exports = _curryN; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/curryN.js +var require_curryN2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/curryN.js"(exports2, module2) { + var _arity = require_arity(); + var _curry1 = require_curry1(); + var _curry2 = require_curry2(); + var _curryN = require_curryN(); + var curryN = /* @__PURE__ */ _curry2(function curryN2(length, fn2) { + if (length === 1) { + return _curry1(fn2); + } + return _arity(length, _curryN(length, [], fn2)); + }); + module2.exports = curryN; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/max.js +var require_max2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/max.js"(exports2, module2) { + var _curry2 = require_curry2(); + var max = /* @__PURE__ */ _curry2(function max2(a, b) { + return b > a ? b : a; + }); + module2.exports = max; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xmap.js +var require_xmap = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xmap.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _xfBase = require_xfBase(); + var XMap = /* @__PURE__ */ function() { + function XMap2(f, xf) { + this.xf = xf; + this.f = f; + } + XMap2.prototype["@@transducer/init"] = _xfBase.init; + XMap2.prototype["@@transducer/result"] = _xfBase.result; + XMap2.prototype["@@transducer/step"] = function(result, input) { + return this.xf["@@transducer/step"](result, this.f(input)); + }; + return XMap2; + }(); + var _xmap = /* @__PURE__ */ _curry2(function _xmap2(f, xf) { + return new XMap(f, xf); + }); + module2.exports = _xmap; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/map.js +var require_map4 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/map.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _dispatchable = require_dispatchable(); + var _map = require_map3(); + var _reduce = require_reduce2(); + var _xmap = require_xmap(); + var curryN = require_curryN2(); + var keys = require_keys(); + var map = /* @__PURE__ */ _curry2(/* @__PURE__ */ _dispatchable(["fantasy-land/map", "map"], _xmap, function map2(fn2, functor) { + switch (Object.prototype.toString.call(functor)) { + case "[object Function]": + return curryN(functor.length, function() { + return fn2.call(this, functor.apply(this, arguments)); + }); + case "[object Object]": + return _reduce(function(acc, key) { + acc[key] = fn2(functor[key]); + return acc; + }, {}, keys(functor)); + default: + return _map(fn2, functor); + } + })); + module2.exports = map; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isInteger.js +var require_isInteger = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_isInteger.js"(exports2, module2) { + module2.exports = Number.isInteger || function _isInteger(n) { + return n << 0 === n; + }; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/nth.js +var require_nth = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/nth.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _isString = require_isString(); + var nth = /* @__PURE__ */ _curry2(function nth2(offset, list) { + var idx = offset < 0 ? list.length + offset : offset; + return _isString(list) ? list.charAt(idx) : list[idx]; + }); + module2.exports = nth; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/paths.js +var require_paths = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/paths.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _isInteger = require_isInteger(); + var nth = require_nth(); + var paths = /* @__PURE__ */ _curry2(function paths2(pathsArray, obj) { + return pathsArray.map(function(paths3) { + var val = obj; + var idx = 0; + var p; + while (idx < paths3.length) { + if (val == null) { + return; + } + p = paths3[idx]; + val = _isInteger(p) ? nth(p, val) : val[p]; + idx += 1; + } + return val; + }); + }); + module2.exports = paths; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/path.js +var require_path3 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/path.js"(exports2, module2) { + var _curry2 = require_curry2(); + var paths = require_paths(); + var path = /* @__PURE__ */ _curry2(function path2(pathAr, obj) { + return paths([pathAr], obj)[0]; + }); + module2.exports = path; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/prop.js +var require_prop = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/prop.js"(exports2, module2) { + var _curry2 = require_curry2(); + var path = require_path3(); + var prop = /* @__PURE__ */ _curry2(function prop2(p, obj) { + return path([p], obj); + }); + module2.exports = prop; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/pluck.js +var require_pluck2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/pluck.js"(exports2, module2) { + var _curry2 = require_curry2(); + var map = require_map4(); + var prop = require_prop(); + var pluck = /* @__PURE__ */ _curry2(function pluck2(p, list) { + return map(prop(p), list); + }); + module2.exports = pluck; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_curry3.js +var require_curry3 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_curry3.js"(exports2, module2) { + var _curry1 = require_curry1(); + var _curry2 = require_curry2(); + var _isPlaceholder = require_isPlaceholder(); + function _curry3(fn2) { + return function f3(a, b, c) { + switch (arguments.length) { + case 0: + return f3; + case 1: + return _isPlaceholder(a) ? f3 : _curry2(function(_b, _c) { + return fn2(a, _b, _c); + }); + case 2: + return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function(_a, _c) { + return fn2(_a, b, _c); + }) : _isPlaceholder(b) ? _curry2(function(_b, _c) { + return fn2(a, _b, _c); + }) : _curry1(function(_c) { + return fn2(a, b, _c); + }); + default: + return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function(_a, _b) { + return fn2(_a, _b, c); + }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function(_a, _c) { + return fn2(_a, b, _c); + }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function(_b, _c) { + return fn2(a, _b, _c); + }) : _isPlaceholder(a) ? _curry1(function(_a) { + return fn2(_a, b, c); + }) : _isPlaceholder(b) ? _curry1(function(_b) { + return fn2(a, _b, c); + }) : _isPlaceholder(c) ? _curry1(function(_c) { + return fn2(a, b, _c); + }) : fn2(a, b, c); + } + }; + } + module2.exports = _curry3; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/reduce.js +var require_reduce3 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/reduce.js"(exports2, module2) { + var _curry3 = require_curry3(); + var _reduce = require_reduce2(); + var reduce = /* @__PURE__ */ _curry3(_reduce); + module2.exports = reduce; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/converge.js +var require_converge = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/converge.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _map = require_map3(); + var curryN = require_curryN2(); + var max = require_max2(); + var pluck = require_pluck2(); + var reduce = require_reduce3(); + var converge = /* @__PURE__ */ _curry2(function converge2(after, fns) { + return curryN(reduce(max, 0, pluck("length", fns)), function() { + var args2 = arguments; + var context = this; + return after.apply(context, _map(function(fn2) { + return fn2.apply(context, args2); + }, fns)); + }); + }); + module2.exports = converge; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/juxt.js +var require_juxt = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/juxt.js"(exports2, module2) { + var _curry1 = require_curry1(); + var converge = require_converge(); + var juxt = /* @__PURE__ */ _curry1(function juxt2(fns) { + return converge(function() { + return Array.prototype.slice.call(arguments, 0); + }, fns); + }); + module2.exports = juxt; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_complement.js +var require_complement = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_complement.js"(exports2, module2) { + function _complement(f) { + return function() { + return !f.apply(this, arguments); + }; + } + module2.exports = _complement; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/reject.js +var require_reject = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/reject.js"(exports2, module2) { + var _complement = require_complement(); + var _curry2 = require_curry2(); + var filter = require_filter3(); + var reject = /* @__PURE__ */ _curry2(function reject2(pred, filterable) { + return filter(_complement(pred), filterable); + }); + module2.exports = reject; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/partition.js +var require_partition4 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/partition.js"(exports2, module2) { + var filter = require_filter3(); + var juxt = require_juxt(); + var reject = require_reject(); + var partition = /* @__PURE__ */ juxt([filter, reject]); + module2.exports = partition; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/pick.js +var require_pick = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/pick.js"(exports2, module2) { + var _curry2 = require_curry2(); + var pick = /* @__PURE__ */ _curry2(function pick2(names, obj) { + var result = {}; + var idx = 0; + while (idx < names.length) { + if (names[idx] in obj) { + result[names[idx]] = obj[names[idx]]; + } + idx += 1; + } + return result; + }); + module2.exports = pick; + } +}); + +// ../../node_modules/.pnpm/@zkochan+which@2.0.3/node_modules/@zkochan/which/which.js +var require_which2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+which@2.0.3/node_modules/@zkochan/which/which.js"(exports2, module2) { + var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys"; + var path = require("path"); + var COLON = isWindows ? ";" : ":"; + var isexe = require_isexe(); + var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }); + var getPathInfo = (cmd, opt) => { + const colon = opt.colon || COLON; + const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : (opt.path || process.env.PATH || "").split(colon); + const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : ""; + const pathExt = isWindows ? pathExtExe.split(colon) : [""]; + if (isWindows) { + if (cmd.indexOf(".") !== -1 && pathExt[0] !== "") + pathExt.unshift(""); + } + return { + pathEnv, + pathExt, + pathExtExe + }; + }; + var which = (cmd, opt, cb) => { + if (typeof opt === "function") { + cb = opt; + opt = {}; + } + if (!opt) + opt = {}; + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); + const found = []; + const step = (i) => new Promise((resolve, reject) => { + if (i === pathEnv.length) + return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd)); + const ppRaw = pathEnv[i]; + const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; + const pCmd = path.join(pathPart, cmd); + const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; + resolve(subStep(p, i, 0)); + }); + const subStep = (p, i, ii) => new Promise((resolve, reject) => { + if (ii === pathExt.length) + return resolve(step(i + 1)); + const ext = pathExt[ii]; + isexe(p + ext, { pathExt: pathExtExe }, (er, is) => { + if (!er && is) { + if (opt.all) + found.push(p + ext); + else + return resolve(p + ext); + } + return resolve(subStep(p, i, ii + 1)); + }); + }); + return cb ? step(0).then((res) => cb(null, res), cb) : step(0); + }; + var whichSync = (cmd, opt) => { + opt = opt || {}; + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); + const found = []; + for (let i = 0; i < pathEnv.length; i++) { + const ppRaw = pathEnv[i]; + const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; + const pCmd = path.join(pathPart, cmd); + const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; + for (let j = 0; j < pathExt.length; j++) { + const cur = p + pathExt[j]; + try { + const is = isexe.sync(cur, { pathExt: pathExtExe }); + if (is) { + if (opt.all) + found.push(cur); + else + return cur; + } + } catch (ex) { + } + } + } + if (opt.all && found.length) + return found; + if (opt.nothrow) + return null; + throw getNotFoundError(cmd); + }; + module2.exports = which; + which.sync = whichSync; + } +}); + +// ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js +var require_path_key = __commonJS({ + "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports2, module2) { + "use strict"; + var pathKey = (options = {}) => { + const environment = options.env || process.env; + const platform = options.platform || process.platform; + if (platform !== "win32") { + return "PATH"; + } + return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path"; + }; + module2.exports = pathKey; + module2.exports.default = pathKey; + } +}); + +// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js +var require_resolveCommand = __commonJS({ + "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var which = require_which(); + var getPathKey = require_path_key(); + function resolveCommandAttempt(parsed, withoutPathExt) { + const env = parsed.options.env || process.env; + const cwd = process.cwd(); + const hasCustomCwd = parsed.options.cwd != null; + const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled; + if (shouldSwitchCwd) { + try { + process.chdir(parsed.options.cwd); + } catch (err) { + } + } + let resolved; + try { + resolved = which.sync(parsed.command, { + path: env[getPathKey({ env })], + pathExt: withoutPathExt ? path.delimiter : void 0 + }); + } catch (e) { + } finally { + if (shouldSwitchCwd) { + process.chdir(cwd); + } + } + if (resolved) { + resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved); + } + return resolved; + } + function resolveCommand(parsed) { + return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); + } + module2.exports = resolveCommand; + } +}); + +// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js +var require_escape = __commonJS({ + "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js"(exports2, module2) { + "use strict"; + var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; + function escapeCommand(arg) { + arg = arg.replace(metaCharsRegExp, "^$1"); + return arg; + } + function escapeArgument(arg, doubleEscapeMetaChars) { + arg = `${arg}`; + arg = arg.replace(/(\\*)"/g, '$1$1\\"'); + arg = arg.replace(/(\\*)$/, "$1$1"); + arg = `"${arg}"`; + arg = arg.replace(metaCharsRegExp, "^$1"); + if (doubleEscapeMetaChars) { + arg = arg.replace(metaCharsRegExp, "^$1"); + } + return arg; + } + module2.exports.command = escapeCommand; + module2.exports.argument = escapeArgument; + } +}); + +// ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js +var require_shebang_regex = __commonJS({ + "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports2, module2) { + "use strict"; + module2.exports = /^#!(.*)/; + } +}); + +// ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js +var require_shebang_command = __commonJS({ + "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports2, module2) { + "use strict"; + var shebangRegex = require_shebang_regex(); + module2.exports = (string = "") => { + const match = string.match(shebangRegex); + if (!match) { + return null; + } + const [path, argument] = match[0].replace(/#! ?/, "").split(" "); + const binary = path.split("/").pop(); + if (binary === "env") { + return argument; + } + return argument ? `${binary} ${argument}` : binary; + }; + } +}); + +// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js +var require_readShebang = __commonJS({ + "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var shebangCommand = require_shebang_command(); + function readShebang(command) { + const size = 150; + const buffer = Buffer.alloc(size); + let fd; + try { + fd = fs.openSync(command, "r"); + fs.readSync(fd, buffer, 0, size, 0); + fs.closeSync(fd); + } catch (e) { + } + return shebangCommand(buffer.toString()); + } + module2.exports = readShebang; + } +}); + +// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js +var require_parse5 = __commonJS({ + "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var resolveCommand = require_resolveCommand(); + var escape = require_escape(); + var readShebang = require_readShebang(); + var isWin = process.platform === "win32"; + var isExecutableRegExp = /\.(?:com|exe)$/i; + var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; + function detectShebang(parsed) { + parsed.file = resolveCommand(parsed); + const shebang = parsed.file && readShebang(parsed.file); + if (shebang) { + parsed.args.unshift(parsed.file); + parsed.command = shebang; + return resolveCommand(parsed); + } + return parsed.file; + } + function parseNonShell(parsed) { + if (!isWin) { + return parsed; + } + const commandFile = detectShebang(parsed); + const needsShell = !isExecutableRegExp.test(commandFile); + if (parsed.options.forceShell || needsShell) { + const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); + parsed.command = path.normalize(parsed.command); + parsed.command = escape.command(parsed.command); + parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); + const shellCommand = [parsed.command].concat(parsed.args).join(" "); + parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`]; + parsed.command = process.env.comspec || "cmd.exe"; + parsed.options.windowsVerbatimArguments = true; + } + return parsed; + } + function parse(command, args2, options) { + if (args2 && !Array.isArray(args2)) { + options = args2; + args2 = null; + } + args2 = args2 ? args2.slice(0) : []; + options = Object.assign({}, options); + const parsed = { + command, + args: args2, + options, + file: void 0, + original: { + command, + args: args2 + } + }; + return options.shell ? parsed : parseNonShell(parsed); + } + module2.exports = parse; + } +}); + +// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js +var require_enoent = __commonJS({ + "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js"(exports2, module2) { + "use strict"; + var isWin = process.platform === "win32"; + function notFoundError(original, syscall) { + return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { + code: "ENOENT", + errno: "ENOENT", + syscall: `${syscall} ${original.command}`, + path: original.command, + spawnargs: original.args + }); + } + function hookChildProcess(cp, parsed) { + if (!isWin) { + return; + } + const originalEmit = cp.emit; + cp.emit = function(name, arg1) { + if (name === "exit") { + const err = verifyENOENT(arg1, parsed, "spawn"); + if (err) { + return originalEmit.call(cp, "error", err); + } + } + return originalEmit.apply(cp, arguments); + }; + } + function verifyENOENT(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, "spawn"); + } + return null; + } + function verifyENOENTSync(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, "spawnSync"); + } + return null; + } + module2.exports = { + hookChildProcess, + verifyENOENT, + verifyENOENTSync, + notFoundError + }; + } +}); + +// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js +var require_cross_spawn = __commonJS({ + "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js"(exports2, module2) { + "use strict"; + var cp = require("child_process"); + var parse = require_parse5(); + var enoent = require_enoent(); + function spawn(command, args2, options) { + const parsed = parse(command, args2, options); + const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); + enoent.hookChildProcess(spawned, parsed); + return spawned; + } + function spawnSync(command, args2, options) { + const parsed = parse(command, args2, options); + const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); + result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); + return result; + } + module2.exports = spawn; + module2.exports.spawn = spawn; + module2.exports.sync = spawnSync; + module2.exports._parse = parse; + module2.exports._enoent = enoent; + } +}); + +// ../../node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js +var require_strip_final_newline = __commonJS({ + "../../node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js"(exports2, module2) { + "use strict"; + module2.exports = (input) => { + const LF = typeof input === "string" ? "\n" : "\n".charCodeAt(); + const CR = typeof input === "string" ? "\r" : "\r".charCodeAt(); + if (input[input.length - 1] === LF) { + input = input.slice(0, input.length - 1); + } + if (input[input.length - 1] === CR) { + input = input.slice(0, input.length - 1); + } + return input; + }; + } +}); + +// ../../node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js +var require_npm_run_path = __commonJS({ + "../../node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var pathKey = require_path_key(); + var npmRunPath = (options) => { + options = { + cwd: process.cwd(), + path: process.env[pathKey()], + execPath: process.execPath, + ...options + }; + let previous; + let cwdPath = path.resolve(options.cwd); + const result = []; + while (previous !== cwdPath) { + result.push(path.join(cwdPath, "node_modules/.bin")); + previous = cwdPath; + cwdPath = path.resolve(cwdPath, ".."); + } + const execPathDir = path.resolve(options.cwd, options.execPath, ".."); + result.push(execPathDir); + return result.concat(options.path).join(path.delimiter); + }; + module2.exports = npmRunPath; + module2.exports.default = npmRunPath; + module2.exports.env = (options) => { + options = { + env: process.env, + ...options + }; + const env = { ...options.env }; + const path2 = pathKey({ env }); + options.path = env[path2]; + env[path2] = module2.exports(options); + return env; + }; + } +}); + +// ../../node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js +var require_mimic_fn = __commonJS({ + "../../node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js"(exports2, module2) { + "use strict"; + var mimicFn = (to, from) => { + for (const prop of Reflect.ownKeys(from)) { + Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); + } + return to; + }; + module2.exports = mimicFn; + module2.exports.default = mimicFn; + } +}); + +// ../../node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js +var require_onetime = __commonJS({ + "../../node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js"(exports2, module2) { + "use strict"; + var mimicFn = require_mimic_fn(); + var calledFunctions = new WeakMap(); + var onetime = (function_, options = {}) => { + if (typeof function_ !== "function") { + throw new TypeError("Expected a function"); + } + let returnValue; + let callCount = 0; + const functionName = function_.displayName || function_.name || ""; + const onetime2 = function(...arguments_) { + calledFunctions.set(onetime2, ++callCount); + if (callCount === 1) { + returnValue = function_.apply(this, arguments_); + function_ = null; + } else if (options.throw === true) { + throw new Error(`Function \`${functionName}\` can only be called once`); + } + return returnValue; + }; + mimicFn(onetime2, function_); + calledFunctions.set(onetime2, callCount); + return onetime2; + }; + module2.exports = onetime; + module2.exports.default = onetime; + module2.exports.callCount = (function_) => { + if (!calledFunctions.has(function_)) { + throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`); + } + return calledFunctions.get(function_); + }; + } +}); + +// ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js +var require_core3 = __commonJS({ + "../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SIGNALS = void 0; + var SIGNALS = [ + { + name: "SIGHUP", + number: 1, + action: "terminate", + description: "Terminal closed", + standard: "posix" + }, + { + name: "SIGINT", + number: 2, + action: "terminate", + description: "User interruption with CTRL-C", + standard: "ansi" + }, + { + name: "SIGQUIT", + number: 3, + action: "core", + description: "User interruption with CTRL-\\", + standard: "posix" + }, + { + name: "SIGILL", + number: 4, + action: "core", + description: "Invalid machine instruction", + standard: "ansi" + }, + { + name: "SIGTRAP", + number: 5, + action: "core", + description: "Debugger breakpoint", + standard: "posix" + }, + { + name: "SIGABRT", + number: 6, + action: "core", + description: "Aborted", + standard: "ansi" + }, + { + name: "SIGIOT", + number: 6, + action: "core", + description: "Aborted", + standard: "bsd" + }, + { + name: "SIGBUS", + number: 7, + action: "core", + description: "Bus error due to misaligned, non-existing address or paging error", + standard: "bsd" + }, + { + name: "SIGEMT", + number: 7, + action: "terminate", + description: "Command should be emulated but is not implemented", + standard: "other" + }, + { + name: "SIGFPE", + number: 8, + action: "core", + description: "Floating point arithmetic error", + standard: "ansi" + }, + { + name: "SIGKILL", + number: 9, + action: "terminate", + description: "Forced termination", + standard: "posix", + forced: true + }, + { + name: "SIGUSR1", + number: 10, + action: "terminate", + description: "Application-specific signal", + standard: "posix" + }, + { + name: "SIGSEGV", + number: 11, + action: "core", + description: "Segmentation fault", + standard: "ansi" + }, + { + name: "SIGUSR2", + number: 12, + action: "terminate", + description: "Application-specific signal", + standard: "posix" + }, + { + name: "SIGPIPE", + number: 13, + action: "terminate", + description: "Broken pipe or socket", + standard: "posix" + }, + { + name: "SIGALRM", + number: 14, + action: "terminate", + description: "Timeout or timer", + standard: "posix" + }, + { + name: "SIGTERM", + number: 15, + action: "terminate", + description: "Termination", + standard: "ansi" + }, + { + name: "SIGSTKFLT", + number: 16, + action: "terminate", + description: "Stack is empty or overflowed", + standard: "other" + }, + { + name: "SIGCHLD", + number: 17, + action: "ignore", + description: "Child process terminated, paused or unpaused", + standard: "posix" + }, + { + name: "SIGCLD", + number: 17, + action: "ignore", + description: "Child process terminated, paused or unpaused", + standard: "other" + }, + { + name: "SIGCONT", + number: 18, + action: "unpause", + description: "Unpaused", + standard: "posix", + forced: true + }, + { + name: "SIGSTOP", + number: 19, + action: "pause", + description: "Paused", + standard: "posix", + forced: true + }, + { + name: "SIGTSTP", + number: 20, + action: "pause", + description: 'Paused using CTRL-Z or "suspend"', + standard: "posix" + }, + { + name: "SIGTTIN", + number: 21, + action: "pause", + description: "Background process cannot read terminal input", + standard: "posix" + }, + { + name: "SIGBREAK", + number: 21, + action: "terminate", + description: "User interruption with CTRL-BREAK", + standard: "other" + }, + { + name: "SIGTTOU", + number: 22, + action: "pause", + description: "Background process cannot write to terminal output", + standard: "posix" + }, + { + name: "SIGURG", + number: 23, + action: "ignore", + description: "Socket received out-of-band data", + standard: "bsd" + }, + { + name: "SIGXCPU", + number: 24, + action: "core", + description: "Process timed out", + standard: "bsd" + }, + { + name: "SIGXFSZ", + number: 25, + action: "core", + description: "File too big", + standard: "bsd" + }, + { + name: "SIGVTALRM", + number: 26, + action: "terminate", + description: "Timeout or timer", + standard: "bsd" + }, + { + name: "SIGPROF", + number: 27, + action: "terminate", + description: "Timeout or timer", + standard: "bsd" + }, + { + name: "SIGWINCH", + number: 28, + action: "ignore", + description: "Terminal window size changed", + standard: "bsd" + }, + { + name: "SIGIO", + number: 29, + action: "terminate", + description: "I/O is available", + standard: "other" + }, + { + name: "SIGPOLL", + number: 29, + action: "terminate", + description: "Watched event", + standard: "other" + }, + { + name: "SIGINFO", + number: 29, + action: "ignore", + description: "Request for process information", + standard: "other" + }, + { + name: "SIGPWR", + number: 30, + action: "terminate", + description: "Device running out of power", + standard: "systemv" + }, + { + name: "SIGSYS", + number: 31, + action: "core", + description: "Invalid system call", + standard: "other" + }, + { + name: "SIGUNUSED", + number: 31, + action: "terminate", + description: "Invalid system call", + standard: "other" + } + ]; + exports2.SIGNALS = SIGNALS; + } +}); + +// ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js +var require_realtime = __commonJS({ + "../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SIGRTMAX = exports2.getRealtimeSignals = void 0; + var getRealtimeSignals = function() { + const length = SIGRTMAX - SIGRTMIN + 1; + return Array.from({ length }, getRealtimeSignal); + }; + exports2.getRealtimeSignals = getRealtimeSignals; + var getRealtimeSignal = function(value, index) { + return { + name: `SIGRT${index + 1}`, + number: SIGRTMIN + index, + action: "terminate", + description: "Application-specific signal (realtime)", + standard: "posix" + }; + }; + var SIGRTMIN = 34; + var SIGRTMAX = 64; + exports2.SIGRTMAX = SIGRTMAX; + } +}); + +// ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js +var require_signals2 = __commonJS({ + "../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getSignals = void 0; + var _os = require("os"); + var _core = require_core3(); + var _realtime = require_realtime(); + var getSignals = function() { + const realtimeSignals = (0, _realtime.getRealtimeSignals)(); + const signals = [..._core.SIGNALS, ...realtimeSignals].map(normalizeSignal); + return signals; + }; + exports2.getSignals = getSignals; + var normalizeSignal = function({ + name, + number: defaultNumber, + description, + action, + forced = false, + standard + }) { + const { + signals: { [name]: constantSignal } + } = _os.constants; + const supported = constantSignal !== void 0; + const number = supported ? constantSignal : defaultNumber; + return { name, number, description, supported, action, forced, standard }; + }; + } +}); + +// ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js +var require_main = __commonJS({ + "../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.signalsByNumber = exports2.signalsByName = void 0; + var _os = require("os"); + var _signals = require_signals2(); + var _realtime = require_realtime(); + var getSignalsByName = function() { + const signals = (0, _signals.getSignals)(); + return signals.reduce(getSignalByName, {}); + }; + var getSignalByName = function(signalByNameMemo, { name, number, description, supported, action, forced, standard }) { + return { + ...signalByNameMemo, + [name]: { name, number, description, supported, action, forced, standard } + }; + }; + var signalsByName = getSignalsByName(); + exports2.signalsByName = signalsByName; + var getSignalsByNumber = function() { + const signals = (0, _signals.getSignals)(); + const length = _realtime.SIGRTMAX + 1; + const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals)); + return Object.assign({}, ...signalsA); + }; + var getSignalByNumber = function(number, signals) { + const signal = findSignalByNumber(number, signals); + if (signal === void 0) { + return {}; + } + const { name, description, supported, action, forced, standard } = signal; + return { + [number]: { + name, + number, + description, + supported, + action, + forced, + standard + } + }; + }; + var findSignalByNumber = function(number, signals) { + const signal = signals.find(({ name }) => _os.constants.signals[name] === number); + if (signal !== void 0) { + return signal; + } + return signals.find((signalA) => signalA.number === number); + }; + var signalsByNumber = getSignalsByNumber(); + exports2.signalsByNumber = signalsByNumber; + } +}); + +// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js +var require_error2 = __commonJS({ + "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js"(exports2, module2) { + "use strict"; + var { signalsByName } = require_main(); + var getErrorPrefix = ({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }) => { + if (timedOut) { + return `timed out after ${timeout} milliseconds`; + } + if (isCanceled) { + return "was canceled"; + } + if (errorCode !== void 0) { + return `failed with ${errorCode}`; + } + if (signal !== void 0) { + return `was killed with ${signal} (${signalDescription})`; + } + if (exitCode !== void 0) { + return `failed with exit code ${exitCode}`; + } + return "failed"; + }; + var makeError = ({ + stdout, + stderr, + all, + error, + signal, + exitCode, + command, + escapedCommand, + timedOut, + isCanceled, + killed, + parsed: { options: { timeout } } + }) => { + exitCode = exitCode === null ? void 0 : exitCode; + signal = signal === null ? void 0 : signal; + const signalDescription = signal === void 0 ? void 0 : signalsByName[signal].description; + const errorCode = error && error.code; + const prefix = getErrorPrefix({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }); + const execaMessage = `Command ${prefix}: ${command}`; + const isError = Object.prototype.toString.call(error) === "[object Error]"; + const shortMessage = isError ? `${execaMessage} +${error.message}` : execaMessage; + const message2 = [shortMessage, stderr, stdout].filter(Boolean).join("\n"); + if (isError) { + error.originalMessage = error.message; + error.message = message2; + } else { + error = new Error(message2); + } + error.shortMessage = shortMessage; + error.command = command; + error.escapedCommand = escapedCommand; + error.exitCode = exitCode; + error.signal = signal; + error.signalDescription = signalDescription; + error.stdout = stdout; + error.stderr = stderr; + if (all !== void 0) { + error.all = all; + } + if ("bufferedData" in error) { + delete error.bufferedData; + } + error.failed = true; + error.timedOut = Boolean(timedOut); + error.isCanceled = isCanceled; + error.killed = killed && !timedOut; + return error; + }; + module2.exports = makeError; + } +}); + +// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js +var require_stdio = __commonJS({ + "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js"(exports2, module2) { + "use strict"; + var aliases = ["stdin", "stdout", "stderr"]; + var hasAlias = (options) => aliases.some((alias) => options[alias] !== void 0); + var normalizeStdio = (options) => { + if (!options) { + return; + } + const { stdio } = options; + if (stdio === void 0) { + return aliases.map((alias) => options[alias]); + } + if (hasAlias(options)) { + throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map((alias) => `\`${alias}\``).join(", ")}`); + } + if (typeof stdio === "string") { + return stdio; + } + if (!Array.isArray(stdio)) { + throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); + } + const length = Math.max(stdio.length, aliases.length); + return Array.from({ length }, (value, index) => stdio[index]); + }; + module2.exports = normalizeStdio; + module2.exports.node = (options) => { + const stdio = normalizeStdio(options); + if (stdio === "ipc") { + return "ipc"; + } + if (stdio === void 0 || typeof stdio === "string") { + return [stdio, stdio, stdio, "ipc"]; + } + if (stdio.includes("ipc")) { + return stdio; + } + return [...stdio, "ipc"]; + }; + } +}); + +// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js +var require_kill = __commonJS({ + "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js"(exports2, module2) { + "use strict"; + var os = require("os"); + var onExit = require_signal_exit(); + var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5; + var spawnedKill = (kill, signal = "SIGTERM", options = {}) => { + const killResult = kill(signal); + setKillTimeout(kill, signal, options, killResult); + return killResult; + }; + var setKillTimeout = (kill, signal, options, killResult) => { + if (!shouldForceKill(signal, options, killResult)) { + return; + } + const timeout = getForceKillAfterTimeout(options); + const t = setTimeout(() => { + kill("SIGKILL"); + }, timeout); + if (t.unref) { + t.unref(); + } + }; + var shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => { + return isSigterm(signal) && forceKillAfterTimeout !== false && killResult; + }; + var isSigterm = (signal) => { + return signal === os.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM"; + }; + var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => { + if (forceKillAfterTimeout === true) { + return DEFAULT_FORCE_KILL_TIMEOUT; + } + if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) { + throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`); + } + return forceKillAfterTimeout; + }; + var spawnedCancel = (spawned, context) => { + const killResult = spawned.kill(); + if (killResult) { + context.isCanceled = true; + } + }; + var timeoutKill = (spawned, signal, reject) => { + spawned.kill(signal); + reject(Object.assign(new Error("Timed out"), { timedOut: true, signal })); + }; + var setupTimeout = (spawned, { timeout, killSignal = "SIGTERM" }, spawnedPromise) => { + if (timeout === 0 || timeout === void 0) { + return spawnedPromise; + } + let timeoutId; + const timeoutPromise = new Promise((resolve, reject) => { + timeoutId = setTimeout(() => { + timeoutKill(spawned, killSignal, reject); + }, timeout); + }); + const safeSpawnedPromise = spawnedPromise.finally(() => { + clearTimeout(timeoutId); + }); + return Promise.race([timeoutPromise, safeSpawnedPromise]); + }; + var validateTimeout = ({ timeout }) => { + if (timeout !== void 0 && (!Number.isFinite(timeout) || timeout < 0)) { + throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`); + } + }; + var setExitHandler = async (spawned, { cleanup, detached }, timedPromise) => { + if (!cleanup || detached) { + return timedPromise; + } + const removeExitHandler = onExit(() => { + spawned.kill(); + }); + return timedPromise.finally(() => { + removeExitHandler(); + }); + }; + module2.exports = { + spawnedKill, + spawnedCancel, + setupTimeout, + validateTimeout, + setExitHandler + }; + } +}); + +// ../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js +var require_is_stream = __commonJS({ + "../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js"(exports2, module2) { + "use strict"; + var isStream = (stream) => stream !== null && typeof stream === "object" && typeof stream.pipe === "function"; + isStream.writable = (stream) => isStream(stream) && stream.writable !== false && typeof stream._write === "function" && typeof stream._writableState === "object"; + isStream.readable = (stream) => isStream(stream) && stream.readable !== false && typeof stream._read === "function" && typeof stream._readableState === "object"; + isStream.duplex = (stream) => isStream.writable(stream) && isStream.readable(stream); + isStream.transform = (stream) => isStream.duplex(stream) && typeof stream._transform === "function"; + module2.exports = isStream; + } +}); + +// ../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js +var require_buffer_stream = __commonJS({ + "../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js"(exports2, module2) { + "use strict"; + var { PassThrough: PassThroughStream } = require("stream"); + module2.exports = (options) => { + options = { ...options }; + const { array } = options; + let { encoding } = options; + const isBuffer = encoding === "buffer"; + let objectMode = false; + if (array) { + objectMode = !(encoding || isBuffer); + } else { + encoding = encoding || "utf8"; + } + if (isBuffer) { + encoding = null; + } + const stream = new PassThroughStream({ objectMode }); + if (encoding) { + stream.setEncoding(encoding); + } + let length = 0; + const chunks = []; + stream.on("data", (chunk) => { + chunks.push(chunk); + if (objectMode) { + length = chunks.length; + } else { + length += chunk.length; + } + }); + stream.getBufferedValue = () => { + if (array) { + return chunks; + } + return isBuffer ? Buffer.concat(chunks, length) : chunks.join(""); + }; + stream.getBufferedLength = () => length; + return stream; + }; + } +}); + +// ../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js +var require_get_stream = __commonJS({ + "../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js"(exports2, module2) { + "use strict"; + var { constants: BufferConstants } = require("buffer"); + var stream = require("stream"); + var { promisify } = require("util"); + var bufferStream = require_buffer_stream(); + var streamPipelinePromisified = promisify(stream.pipeline); + var MaxBufferError = class extends Error { + constructor() { + super("maxBuffer exceeded"); + this.name = "MaxBufferError"; + } + }; + async function getStream(inputStream, options) { + if (!inputStream) { + throw new Error("Expected a stream"); + } + options = { + maxBuffer: Infinity, + ...options + }; + const { maxBuffer } = options; + const stream2 = bufferStream(options); + await new Promise((resolve, reject) => { + const rejectPromise = (error) => { + if (error && stream2.getBufferedLength() <= BufferConstants.MAX_LENGTH) { + error.bufferedData = stream2.getBufferedValue(); + } + reject(error); + }; + (async () => { + try { + await streamPipelinePromisified(inputStream, stream2); + resolve(); + } catch (error) { + rejectPromise(error); + } + })(); + stream2.on("data", () => { + if (stream2.getBufferedLength() > maxBuffer) { + rejectPromise(new MaxBufferError()); + } + }); + }); + return stream2.getBufferedValue(); + } + module2.exports = getStream; + module2.exports.buffer = (stream2, options) => getStream(stream2, { ...options, encoding: "buffer" }); + module2.exports.array = (stream2, options) => getStream(stream2, { ...options, array: true }); + module2.exports.MaxBufferError = MaxBufferError; + } +}); + +// ../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js +var require_merge_stream = __commonJS({ + "../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js"(exports2, module2) { + "use strict"; + var { PassThrough } = require("stream"); + module2.exports = function() { + var sources = []; + var output = new PassThrough({ objectMode: true }); + output.setMaxListeners(0); + output.add = add; + output.isEmpty = isEmpty; + output.on("unpipe", remove); + Array.prototype.slice.call(arguments).forEach(add); + return output; + function add(source) { + if (Array.isArray(source)) { + source.forEach(add); + return this; + } + sources.push(source); + source.once("end", remove.bind(null, source)); + source.once("error", output.emit.bind(output, "error")); + source.pipe(output, { end: false }); + return this; + } + function isEmpty() { + return sources.length == 0; + } + function remove(source) { + sources = sources.filter(function(it) { + return it !== source; + }); + if (!sources.length && output.readable) { + output.end(); + } + } + }; + } +}); + +// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js +var require_stream6 = __commonJS({ + "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js"(exports2, module2) { + "use strict"; + var isStream = require_is_stream(); + var getStream = require_get_stream(); + var mergeStream = require_merge_stream(); + var handleInput = (spawned, input) => { + if (input === void 0 || spawned.stdin === void 0) { + return; + } + if (isStream(input)) { + input.pipe(spawned.stdin); + } else { + spawned.stdin.end(input); + } + }; + var makeAllStream = (spawned, { all }) => { + if (!all || !spawned.stdout && !spawned.stderr) { + return; + } + const mixed = mergeStream(); + if (spawned.stdout) { + mixed.add(spawned.stdout); + } + if (spawned.stderr) { + mixed.add(spawned.stderr); + } + return mixed; + }; + var getBufferedData = async (stream, streamPromise) => { + if (!stream) { + return; + } + stream.destroy(); + try { + return await streamPromise; + } catch (error) { + return error.bufferedData; + } + }; + var getStreamPromise = (stream, { encoding, buffer, maxBuffer }) => { + if (!stream || !buffer) { + return; + } + if (encoding) { + return getStream(stream, { encoding, maxBuffer }); + } + return getStream.buffer(stream, { maxBuffer }); + }; + var getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => { + const stdoutPromise = getStreamPromise(stdout, { encoding, buffer, maxBuffer }); + const stderrPromise = getStreamPromise(stderr, { encoding, buffer, maxBuffer }); + const allPromise = getStreamPromise(all, { encoding, buffer, maxBuffer: maxBuffer * 2 }); + try { + return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]); + } catch (error) { + return Promise.all([ + { error, signal: error.signal, timedOut: error.timedOut }, + getBufferedData(stdout, stdoutPromise), + getBufferedData(stderr, stderrPromise), + getBufferedData(all, allPromise) + ]); + } + }; + var validateInputSync = ({ input }) => { + if (isStream(input)) { + throw new TypeError("The `input` option cannot be a stream in sync mode"); + } + }; + module2.exports = { + handleInput, + makeAllStream, + getSpawnedResult, + validateInputSync + }; + } +}); + +// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js +var require_promise = __commonJS({ + "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js"(exports2, module2) { + "use strict"; + var nativePromisePrototype = (async () => { + })().constructor.prototype; + var descriptors = ["then", "catch", "finally"].map((property) => [ + property, + Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property) + ]); + var mergePromise = (spawned, promise) => { + for (const [property, descriptor] of descriptors) { + const value = typeof promise === "function" ? (...args2) => Reflect.apply(descriptor.value, promise(), args2) : descriptor.value.bind(promise); + Reflect.defineProperty(spawned, property, { ...descriptor, value }); + } + return spawned; + }; + var getSpawnedPromise = (spawned) => { + return new Promise((resolve, reject) => { + spawned.on("exit", (exitCode, signal) => { + resolve({ exitCode, signal }); + }); + spawned.on("error", (error) => { + reject(error); + }); + if (spawned.stdin) { + spawned.stdin.on("error", (error) => { + reject(error); + }); + } + }); + }; + module2.exports = { + mergePromise, + getSpawnedPromise + }; + } +}); + +// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js +var require_command = __commonJS({ + "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js"(exports2, module2) { + "use strict"; + var normalizeArgs = (file, args2 = []) => { + if (!Array.isArray(args2)) { + return [file]; + } + return [file, ...args2]; + }; + var NO_ESCAPE_REGEXP = /^[\w.-]+$/; + var DOUBLE_QUOTES_REGEXP = /"/g; + var escapeArg = (arg) => { + if (typeof arg !== "string" || NO_ESCAPE_REGEXP.test(arg)) { + return arg; + } + return `"${arg.replace(DOUBLE_QUOTES_REGEXP, '\\"')}"`; + }; + var joinCommand = (file, args2) => { + return normalizeArgs(file, args2).join(" "); + }; + var getEscapedCommand = (file, args2) => { + return normalizeArgs(file, args2).map((arg) => escapeArg(arg)).join(" "); + }; + var SPACES_REGEXP = / +/g; + var parseCommand = (command) => { + const tokens = []; + for (const token of command.trim().split(SPACES_REGEXP)) { + const previousToken = tokens[tokens.length - 1]; + if (previousToken && previousToken.endsWith("\\")) { + tokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`; + } else { + tokens.push(token); + } + } + return tokens; + }; + module2.exports = { + joinCommand, + getEscapedCommand, + parseCommand + }; + } +}); + +// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js +var require_execa = __commonJS({ + "../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var childProcess = require("child_process"); + var crossSpawn = require_cross_spawn(); + var stripFinalNewline = require_strip_final_newline(); + var npmRunPath = require_npm_run_path(); + var onetime = require_onetime(); + var makeError = require_error2(); + var normalizeStdio = require_stdio(); + var { spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler } = require_kill(); + var { handleInput, getSpawnedResult, makeAllStream, validateInputSync } = require_stream6(); + var { mergePromise, getSpawnedPromise } = require_promise(); + var { joinCommand, parseCommand, getEscapedCommand } = require_command(); + var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100; + var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => { + const env = extendEnv ? { ...process.env, ...envOption } : envOption; + if (preferLocal) { + return npmRunPath.env({ env, cwd: localDir, execPath }); + } + return env; + }; + var handleArguments = (file, args2, options = {}) => { + const parsed = crossSpawn._parse(file, args2, options); + file = parsed.command; + args2 = parsed.args; + options = parsed.options; + options = { + maxBuffer: DEFAULT_MAX_BUFFER, + buffer: true, + stripFinalNewline: true, + extendEnv: true, + preferLocal: false, + localDir: options.cwd || process.cwd(), + execPath: process.execPath, + encoding: "utf8", + reject: true, + cleanup: true, + all: false, + windowsHide: true, + ...options + }; + options.env = getEnv(options); + options.stdio = normalizeStdio(options); + if (process.platform === "win32" && path.basename(file, ".exe") === "cmd") { + args2.unshift("/q"); + } + return { file, args: args2, options, parsed }; + }; + var handleOutput = (options, value, error) => { + if (typeof value !== "string" && !Buffer.isBuffer(value)) { + return error === void 0 ? void 0 : ""; + } + if (options.stripFinalNewline) { + return stripFinalNewline(value); + } + return value; + }; + var execa = (file, args2, options) => { + const parsed = handleArguments(file, args2, options); + const command = joinCommand(file, args2); + const escapedCommand = getEscapedCommand(file, args2); + validateTimeout(parsed.options); + let spawned; + try { + spawned = childProcess.spawn(parsed.file, parsed.args, parsed.options); + } catch (error) { + const dummySpawned = new childProcess.ChildProcess(); + const errorPromise = Promise.reject(makeError({ + error, + stdout: "", + stderr: "", + all: "", + command, + escapedCommand, + parsed, + timedOut: false, + isCanceled: false, + killed: false + })); + return mergePromise(dummySpawned, errorPromise); + } + const spawnedPromise = getSpawnedPromise(spawned); + const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise); + const processDone = setExitHandler(spawned, parsed.options, timedPromise); + const context = { isCanceled: false }; + spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned)); + spawned.cancel = spawnedCancel.bind(null, spawned, context); + const handlePromise = async () => { + const [{ error, exitCode, signal, timedOut }, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone); + const stdout = handleOutput(parsed.options, stdoutResult); + const stderr = handleOutput(parsed.options, stderrResult); + const all = handleOutput(parsed.options, allResult); + if (error || exitCode !== 0 || signal !== null) { + const returnedError = makeError({ + error, + exitCode, + signal, + stdout, + stderr, + all, + command, + escapedCommand, + parsed, + timedOut, + isCanceled: context.isCanceled, + killed: spawned.killed + }); + if (!parsed.options.reject) { + return returnedError; + } + throw returnedError; + } + return { + command, + escapedCommand, + exitCode: 0, + stdout, + stderr, + all, + failed: false, + timedOut: false, + isCanceled: false, + killed: false + }; + }; + const handlePromiseOnce = onetime(handlePromise); + handleInput(spawned, parsed.options.input); + spawned.all = makeAllStream(spawned, parsed.options); + return mergePromise(spawned, handlePromiseOnce); + }; + module2.exports = execa; + module2.exports.sync = (file, args2, options) => { + const parsed = handleArguments(file, args2, options); + const command = joinCommand(file, args2); + const escapedCommand = getEscapedCommand(file, args2); + validateInputSync(parsed.options); + let result; + try { + result = childProcess.spawnSync(parsed.file, parsed.args, parsed.options); + } catch (error) { + throw makeError({ + error, + stdout: "", + stderr: "", + all: "", + command, + escapedCommand, + parsed, + timedOut: false, + isCanceled: false, + killed: false + }); + } + const stdout = handleOutput(parsed.options, result.stdout, result.error); + const stderr = handleOutput(parsed.options, result.stderr, result.error); + if (result.error || result.status !== 0 || result.signal !== null) { + const error = makeError({ + stdout, + stderr, + error: result.error, + signal: result.signal, + exitCode: result.status, + command, + escapedCommand, + parsed, + timedOut: result.error && result.error.code === "ETIMEDOUT", + isCanceled: false, + killed: result.signal !== null + }); + if (!parsed.options.reject) { + return error; + } + throw error; + } + return { + command, + escapedCommand, + exitCode: 0, + stdout, + stderr, + failed: false, + timedOut: false, + isCanceled: false, + killed: false + }; + }; + module2.exports.command = (command, options) => { + const [file, ...args2] = parseCommand(command); + return execa(file, args2, options); + }; + module2.exports.commandSync = (command, options) => { + const [file, ...args2] = parseCommand(command); + return execa.sync(file, args2, options); + }; + module2.exports.node = (scriptPath, args2, options = {}) => { + if (args2 && !Array.isArray(args2) && typeof args2 === "object") { + options = args2; + args2 = []; + } + const stdio = normalizeStdio.node(options); + const defaultExecArgv = process.execArgv.filter((arg) => !arg.startsWith("--inspect")); + const { + nodePath = process.execPath, + nodeOptions = defaultExecArgv + } = options; + return execa(nodePath, [ + ...nodeOptions, + scriptPath, + ...Array.isArray(args2) ? args2 : [] + ], { + ...options, + stdin: void 0, + stdout: void 0, + stderr: void 0, + stdio, + shell: false + }); + }; + } +}); + +// ../../node_modules/.pnpm/safe-execa@0.1.1/node_modules/safe-execa/lib/index.js +var require_lib26 = __commonJS({ + "../../node_modules/.pnpm/safe-execa@0.1.1/node_modules/safe-execa/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sync = void 0; + var which_1 = __importDefault(require_which2()); + var execa_1 = __importDefault(require_execa()); + var path_name_1 = __importDefault(require_path_name()); + var pathCache = new Map(); + function sync(file, args2, options) { + const fileAbsolutePath = getCommandAbsolutePathSync(file, options); + return execa_1.default.sync(fileAbsolutePath, args2, options); + } + exports2.sync = sync; + function getCommandAbsolutePathSync(file, options) { + var _a, _b; + if (file.includes("\\") || file.includes("/")) + return file; + const path = (_b = (_a = options === null || options === void 0 ? void 0 : options.env) === null || _a === void 0 ? void 0 : _a[path_name_1.default]) !== null && _b !== void 0 ? _b : process.env[path_name_1.default]; + const key = JSON.stringify([path, file]); + let fileAbsolutePath = pathCache.get(key); + if (fileAbsolutePath == null) { + fileAbsolutePath = which_1.default.sync(file, { path }); + pathCache.set(key, fileAbsolutePath); + } + if (fileAbsolutePath == null) { + throw new Error(`Couldn't find ${file}`); + } + return fileAbsolutePath; + } + function default_1(file, args2, options) { + const fileAbsolutePath = getCommandAbsolutePathSync(file, options); + return execa_1.default(fileAbsolutePath, args2, options); + } + exports2.default = default_1; + } +}); + +// ../../node_modules/.pnpm/yocto-queue@0.1.0/node_modules/yocto-queue/index.js +var require_yocto_queue = __commonJS({ + "../../node_modules/.pnpm/yocto-queue@0.1.0/node_modules/yocto-queue/index.js"(exports2, module2) { + var Node = class { + constructor(value) { + this.value = value; + this.next = void 0; + } + }; + var Queue = class { + constructor() { + this.clear(); + } + enqueue(value) { + const node = new Node(value); + if (this._head) { + this._tail.next = node; + this._tail = node; + } else { + this._head = node; + this._tail = node; + } + this._size++; + } + dequeue() { + const current = this._head; + if (!current) { + return; + } + this._head = this._head.next; + this._size--; + return current.value; + } + clear() { + this._head = void 0; + this._tail = void 0; + this._size = 0; + } + get size() { + return this._size; + } + *[Symbol.iterator]() { + let current = this._head; + while (current) { + yield current.value; + current = current.next; + } + } + }; + module2.exports = Queue; + } +}); + +// ../../node_modules/.pnpm/p-limit@3.1.0/node_modules/p-limit/index.js +var require_p_limit = __commonJS({ + "../../node_modules/.pnpm/p-limit@3.1.0/node_modules/p-limit/index.js"(exports2, module2) { + "use strict"; + var Queue = require_yocto_queue(); + var pLimit = (concurrency) => { + if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { + throw new TypeError("Expected `concurrency` to be a number from 1 and up"); + } + const queue = new Queue(); + let activeCount = 0; + const next = () => { + activeCount--; + if (queue.size > 0) { + queue.dequeue()(); + } + }; + const run = async (fn2, resolve, ...args2) => { + activeCount++; + const result = (async () => fn2(...args2))(); + resolve(result); + try { + await result; + } catch { + } + next(); + }; + const enqueue = (fn2, resolve, ...args2) => { + queue.enqueue(run.bind(null, fn2, resolve, ...args2)); + (async () => { + await Promise.resolve(); + if (activeCount < concurrency && queue.size > 0) { + queue.dequeue()(); + } + })(); + }; + const generator = (fn2, ...args2) => new Promise((resolve) => { + enqueue(fn2, resolve, ...args2); + }); + Object.defineProperties(generator, { + activeCount: { + get: () => activeCount + }, + pendingCount: { + get: () => queue.size + }, + clearQueue: { + value: () => { + queue.clear(); + } + } + }); + return generator; + }; + module2.exports = pLimit; + } +}); + +// ../../node_modules/.pnpm/p-locate@5.0.0/node_modules/p-locate/index.js +var require_p_locate = __commonJS({ + "../../node_modules/.pnpm/p-locate@5.0.0/node_modules/p-locate/index.js"(exports2, module2) { + "use strict"; + var pLimit = require_p_limit(); + var EndError = class extends Error { + constructor(value) { + super(); + this.value = value; + } + }; + var testElement = async (element, tester) => tester(await element); + var finder = async (element) => { + const values = await Promise.all(element); + if (values[1] === true) { + throw new EndError(values[0]); + } + return false; + }; + var pLocate = async (iterable, tester, options) => { + options = { + concurrency: Infinity, + preserveOrder: true, + ...options + }; + const limit = pLimit(options.concurrency); + const items = [...iterable].map((element) => [element, limit(testElement, element, tester)]); + const checkLimit = pLimit(options.preserveOrder ? 1 : Infinity); + try { + await Promise.all(items.map((element) => checkLimit(finder, element))); + } catch (error) { + if (error instanceof EndError) { + return error.value; + } + throw error; + } + }; + module2.exports = pLocate; + } +}); + +// ../../node_modules/.pnpm/locate-path@6.0.0/node_modules/locate-path/index.js +var require_locate_path = __commonJS({ + "../../node_modules/.pnpm/locate-path@6.0.0/node_modules/locate-path/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var fs = require("fs"); + var { promisify } = require("util"); + var pLocate = require_p_locate(); + var fsStat = promisify(fs.stat); + var fsLStat = promisify(fs.lstat); + var typeMappings = { + directory: "isDirectory", + file: "isFile" + }; + function checkType({ type }) { + if (type in typeMappings) { + return; + } + throw new Error(`Invalid type specified: ${type}`); + } + var matchType = (type, stat) => type === void 0 || stat[typeMappings[type]](); + module2.exports = async (paths, options) => { + options = { + cwd: process.cwd(), + type: "file", + allowSymlinks: true, + ...options + }; + checkType(options); + const statFn = options.allowSymlinks ? fsStat : fsLStat; + return pLocate(paths, async (path_) => { + try { + const stat = await statFn(path.resolve(options.cwd, path_)); + return matchType(options.type, stat); + } catch { + return false; + } + }, options); + }; + module2.exports.sync = (paths, options) => { + options = { + cwd: process.cwd(), + allowSymlinks: true, + type: "file", + ...options + }; + checkType(options); + const statFn = options.allowSymlinks ? fs.statSync : fs.lstatSync; + for (const path_ of paths) { + try { + const stat = statFn(path.resolve(options.cwd, path_)); + if (matchType(options.type, stat)) { + return path_; + } + } catch { + } + } + }; + } +}); + +// ../../node_modules/.pnpm/path-exists@4.0.0/node_modules/path-exists/index.js +var require_path_exists = __commonJS({ + "../../node_modules/.pnpm/path-exists@4.0.0/node_modules/path-exists/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var { promisify } = require("util"); + var pAccess = promisify(fs.access); + module2.exports = async (path) => { + try { + await pAccess(path); + return true; + } catch (_) { + return false; + } + }; + module2.exports.sync = (path) => { + try { + fs.accessSync(path); + return true; + } catch (_) { + return false; + } + }; + } +}); + +// ../../node_modules/.pnpm/find-up@5.0.0/node_modules/find-up/index.js +var require_find_up = __commonJS({ + "../../node_modules/.pnpm/find-up@5.0.0/node_modules/find-up/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var locatePath = require_locate_path(); + var pathExists = require_path_exists(); + var stop = Symbol("findUp.stop"); + module2.exports = async (name, options = {}) => { + let directory = path.resolve(options.cwd || ""); + const { root } = path.parse(directory); + const paths = [].concat(name); + const runMatcher = async (locateOptions) => { + if (typeof name !== "function") { + return locatePath(paths, locateOptions); + } + const foundPath = await name(locateOptions.cwd); + if (typeof foundPath === "string") { + return locatePath([foundPath], locateOptions); + } + return foundPath; + }; + while (true) { + const foundPath = await runMatcher({ ...options, cwd: directory }); + if (foundPath === stop) { + return; + } + if (foundPath) { + return path.resolve(directory, foundPath); + } + if (directory === root) { + return; + } + directory = path.dirname(directory); + } + }; + module2.exports.sync = (name, options = {}) => { + let directory = path.resolve(options.cwd || ""); + const { root } = path.parse(directory); + const paths = [].concat(name); + const runMatcher = (locateOptions) => { + if (typeof name !== "function") { + return locatePath.sync(paths, locateOptions); + } + const foundPath = name(locateOptions.cwd); + if (typeof foundPath === "string") { + return locatePath.sync([foundPath], locateOptions); + } + return foundPath; + }; + while (true) { + const foundPath = runMatcher({ ...options, cwd: directory }); + if (foundPath === stop) { + return; + } + if (foundPath) { + return path.resolve(directory, foundPath); + } + if (directory === root) { + return; + } + directory = path.dirname(directory); + } + }; + module2.exports.exists = pathExists; + module2.exports.sync.exists = pathExists.sync; + module2.exports.stop = stop; + } +}); + +// ../filter-workspace-packages/lib/getChangedPackages.js +var require_getChangedPackages = __commonJS({ + "../filter-workspace-packages/lib/getChangedPackages.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var micromatch = __importStar2(require_micromatch()); + var execa_1 = __importDefault(require_lib26()); + var find_up_1 = __importDefault(require_find_up()); + async function changedSince(packageDirs, commit, opts) { + var _a, _b, _c; + const repoRoot = path_1.default.resolve((_a = await find_up_1.default(".git", { cwd: opts.workspaceDir, type: "directory" })) !== null && _a !== void 0 ? _a : opts.workspaceDir, ".."); + const changedDirs = (await getChangedDirsSinceCommit(commit, opts.workspaceDir, (_b = opts.testPattern) !== null && _b !== void 0 ? _b : [], (_c = opts.changedFilesIgnorePattern) !== null && _c !== void 0 ? _c : [])).map((changedDir) => ({ ...changedDir, dir: path_1.default.join(repoRoot, changedDir.dir) })); + const pkgChangeTypes = new Map(); + for (const pkgDir of packageDirs) { + pkgChangeTypes.set(pkgDir, void 0); + } + for (const changedDir of changedDirs) { + let currentDir = changedDir.dir; + while (!pkgChangeTypes.has(currentDir)) { + const nextDir = path_1.default.dirname(currentDir); + if (nextDir === currentDir) + break; + currentDir = nextDir; + } + if (pkgChangeTypes.get(currentDir) === "source") + continue; + pkgChangeTypes.set(currentDir, changedDir.changeType); + } + const changedPkgs = []; + const ignoreDependentForPkgs = []; + for (const [changedDir, changeType] of pkgChangeTypes.entries()) { + switch (changeType) { + case "source": + changedPkgs.push(changedDir); + break; + case "test": + ignoreDependentForPkgs.push(changedDir); + break; + } + } + return [changedPkgs, ignoreDependentForPkgs]; + } + exports2.default = changedSince; + async function getChangedDirsSinceCommit(commit, workingDir, testPattern, changedFilesIgnorePattern) { + let diff; + try { + diff = (await execa_1.default("git", [ + "diff", + "--name-only", + commit, + "--", + workingDir + ], { cwd: workingDir })).stdout; + } catch (err) { + throw new error_1.default("FILTER_CHANGED", `Filtering by changed packages failed. ${err.stderr}`); + } + const changedDirs = new Map(); + if (!diff) { + return []; + } + const allChangedFiles = diff.split("\n"); + const patterns = changedFilesIgnorePattern.filter((pattern) => pattern.length); + const changedFiles = patterns.length > 0 ? micromatch.not(allChangedFiles, patterns, { + dot: true + }) : allChangedFiles; + for (const changedFile of changedFiles) { + const dir = path_1.default.dirname(changedFile); + if (changedDirs.get(dir) === "source") + continue; + const changeType = testPattern.some((pattern) => micromatch.isMatch(changedFile, pattern)) ? "test" : "source"; + changedDirs.set(dir, changeType); + } + return Array.from(changedDirs.entries()).map(([dir, changeType]) => ({ dir, changeType })); + } + } +}); + +// ../filter-workspace-packages/lib/parsePackageSelector.js +var require_parsePackageSelector = __commonJS({ + "../filter-workspace-packages/lib/parsePackageSelector.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + exports2.default = (rawSelector, prefix) => { + var _a; + let exclude = false; + if (rawSelector[0] === "!") { + exclude = true; + rawSelector = rawSelector.substring(1); + } + let excludeSelf = false; + const includeDependencies = rawSelector.endsWith("..."); + if (includeDependencies) { + rawSelector = rawSelector.substring(0, rawSelector.length - 3); + if (rawSelector.endsWith("^")) { + excludeSelf = true; + rawSelector = rawSelector.substr(0, rawSelector.length - 1); + } + } + const includeDependents = rawSelector.startsWith("..."); + if (includeDependents) { + rawSelector = rawSelector.substring(3); + if (rawSelector.startsWith("^")) { + excludeSelf = true; + rawSelector = rawSelector.substr(1); + } + } + const matches = rawSelector.match(/^([^.][^{}[\]]*)?(\{[^}]+\})?(\[[^\]]+\])?$/); + if (matches === null) { + if (isSelectorByLocation(rawSelector)) { + return { + exclude, + excludeSelf: false, + parentDir: path_1.default.join(prefix, rawSelector) + }; + } + return { + excludeSelf: false, + namePattern: rawSelector + }; + } + return { + diff: (_a = matches[3]) === null || _a === void 0 ? void 0 : _a.substr(1, matches[3].length - 2), + exclude, + excludeSelf, + includeDependencies, + includeDependents, + namePattern: matches[1], + parentDir: matches[2] && path_1.default.join(prefix, matches[2].substr(1, matches[2].length - 2)) + }; + }; + function isSelectorByLocation(rawSelector) { + if (rawSelector[0] !== ".") + return false; + if (rawSelector.length === 1 || rawSelector[1] === "/" || rawSelector[1] === "\\") + return true; + if (rawSelector[1] !== ".") + return false; + return rawSelector.length === 2 || rawSelector[2] === "/" || rawSelector[2] === "\\"; + } + } +}); + +// ../filter-workspace-packages/lib/index.js +var require_lib27 = __commonJS({ + "../filter-workspace-packages/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.filterPkgsBySelectorObjects = exports2.filterPackages = exports2.readProjects = exports2.parsePackageSelector = void 0; + var find_workspace_packages_1 = __importDefault(require_lib22()); + var matcher_1 = __importDefault(require_lib23()); + var pkgs_graph_1 = __importDefault(require_lib25()); + var is_subdir_1 = __importDefault(require_is_subdir()); + var difference_1 = __importDefault(require_difference()); + var partition_1 = __importDefault(require_partition4()); + var pick_1 = __importDefault(require_pick()); + var micromatch = __importStar2(require_micromatch()); + var getChangedPackages_1 = __importDefault(require_getChangedPackages()); + var parsePackageSelector_1 = __importDefault(require_parsePackageSelector()); + exports2.parsePackageSelector = parsePackageSelector_1.default; + async function readProjects(workspaceDir, pkgSelectors, opts) { + const allProjects = await find_workspace_packages_1.default(workspaceDir, {}); + const { selectedProjectsGraph } = await filterPkgsBySelectorObjects(allProjects, pkgSelectors, { + linkWorkspacePackages: opts === null || opts === void 0 ? void 0 : opts.linkWorkspacePackages, + workspaceDir, + changedFilesIgnorePattern: opts === null || opts === void 0 ? void 0 : opts.changedFilesIgnorePattern + }); + return { allProjects, selectedProjectsGraph }; + } + exports2.readProjects = readProjects; + async function filterPackages(pkgs, filter, opts) { + const packageSelectors = filter.map(({ filter: f, followProdDepsOnly }) => ({ ...parsePackageSelector_1.default(f, opts.prefix), followProdDepsOnly })); + return filterPkgsBySelectorObjects(pkgs, packageSelectors, opts); + } + exports2.filterPackages = filterPackages; + async function filterPkgsBySelectorObjects(pkgs, packageSelectors, opts) { + const [prodPackageSelectors, allPackageSelectors] = partition_1.default(({ followProdDepsOnly }) => !!followProdDepsOnly, packageSelectors); + if (allPackageSelectors.length > 0 || prodPackageSelectors.length > 0) { + let filteredGraph; + if (allPackageSelectors.length > 0) { + const { graph } = pkgs_graph_1.default(pkgs, { linkWorkspacePackages: opts.linkWorkspacePackages }); + filteredGraph = await filterGraph(graph, allPackageSelectors, { + workspaceDir: opts.workspaceDir, + testPattern: opts.testPattern, + changedFilesIgnorePattern: opts.changedFilesIgnorePattern, + useGlobDirFiltering: opts.useGlobDirFiltering + }); + } + let prodFilteredGraph; + if (prodPackageSelectors.length > 0) { + const { graph } = pkgs_graph_1.default(pkgs, { ignoreDevDeps: true, linkWorkspacePackages: opts.linkWorkspacePackages }); + prodFilteredGraph = await filterGraph(graph, prodPackageSelectors, { + workspaceDir: opts.workspaceDir, + testPattern: opts.testPattern, + changedFilesIgnorePattern: opts.changedFilesIgnorePattern, + useGlobDirFiltering: opts.useGlobDirFiltering + }); + } + return Promise.resolve({ + selectedProjectsGraph: { + ...prodFilteredGraph === null || prodFilteredGraph === void 0 ? void 0 : prodFilteredGraph.selectedProjectsGraph, + ...filteredGraph === null || filteredGraph === void 0 ? void 0 : filteredGraph.selectedProjectsGraph + }, + unmatchedFilters: [ + ...prodFilteredGraph !== void 0 ? prodFilteredGraph.unmatchedFilters : [], + ...filteredGraph !== void 0 ? filteredGraph.unmatchedFilters : [] + ] + }); + } else { + const { graph } = pkgs_graph_1.default(pkgs, { linkWorkspacePackages: opts.linkWorkspacePackages }); + return Promise.resolve({ selectedProjectsGraph: graph, unmatchedFilters: [] }); + } + } + exports2.filterPkgsBySelectorObjects = filterPkgsBySelectorObjects; + async function filterGraph(pkgGraph, packageSelectors, opts) { + const [excludeSelectors, includeSelectors] = partition_1.default((selector) => selector.exclude === true, packageSelectors); + const fg = _filterGraph.bind(null, pkgGraph, opts); + const include = includeSelectors.length === 0 ? { selected: Object.keys(pkgGraph), unmatchedFilters: [] } : await fg(includeSelectors); + const exclude = await fg(excludeSelectors); + return { + selectedProjectsGraph: pick_1.default(difference_1.default(include.selected, exclude.selected), pkgGraph), + unmatchedFilters: [...include.unmatchedFilters, ...exclude.unmatchedFilters] + }; + } + exports2.default = filterGraph; + async function _filterGraph(pkgGraph, opts, packageSelectors) { + var _a; + const cherryPickedPackages = []; + const walkedDependencies = new Set(); + const walkedDependents = new Set(); + const walkedDependentsDependencies = new Set(); + const graph = pkgGraphToGraph(pkgGraph); + const unmatchedFilters = []; + let reversedGraph; + const matchPackagesByPath = opts.useGlobDirFiltering === true ? matchPackagesByGlob : matchPackagesByExactPath; + for (const selector of packageSelectors) { + let entryPackages = null; + if (selector.diff) { + let ignoreDependentForPkgs = []; + [entryPackages, ignoreDependentForPkgs] = await getChangedPackages_1.default(Object.keys(pkgGraph), selector.diff, { workspaceDir: (_a = selector.parentDir) !== null && _a !== void 0 ? _a : opts.workspaceDir, testPattern: opts.testPattern, changedFilesIgnorePattern: opts.changedFilesIgnorePattern }); + selectEntries({ + ...selector, + includeDependents: false + }, ignoreDependentForPkgs); + } else if (selector.parentDir) { + entryPackages = matchPackagesByPath(pkgGraph, selector.parentDir); + } + if (selector.namePattern) { + if (entryPackages == null) { + entryPackages = matchPackages(pkgGraph, selector.namePattern); + } else { + entryPackages = matchPackages(pick_1.default(entryPackages, pkgGraph), selector.namePattern); + } + } + if (entryPackages == null) { + throw new Error(`Unsupported package selector: ${JSON.stringify(selector)}`); + } + if (entryPackages.length === 0) { + if (selector.namePattern) { + unmatchedFilters.push(selector.namePattern); + } + if (selector.parentDir) { + unmatchedFilters.push(selector.parentDir); + } + } + selectEntries(selector, entryPackages); + } + const walked = new Set([...walkedDependencies, ...walkedDependents, ...walkedDependentsDependencies]); + cherryPickedPackages.forEach((cherryPickedPackage) => walked.add(cherryPickedPackage)); + return { + selected: Array.from(walked), + unmatchedFilters + }; + function selectEntries(selector, entryPackages) { + if (selector.includeDependencies) { + pickSubgraph(graph, entryPackages, walkedDependencies, { includeRoot: !selector.excludeSelf }); + } + if (selector.includeDependents) { + if (reversedGraph == null) { + reversedGraph = reverseGraph(graph); + } + pickSubgraph(reversedGraph, entryPackages, walkedDependents, { includeRoot: !selector.excludeSelf }); + } + if (selector.includeDependencies && selector.includeDependents) { + pickSubgraph(graph, Array.from(walkedDependents), walkedDependentsDependencies, { includeRoot: false }); + } + if (!selector.includeDependencies && !selector.includeDependents) { + Array.prototype.push.apply(cherryPickedPackages, entryPackages); + } + } + } + function pkgGraphToGraph(pkgGraph) { + const graph = {}; + Object.keys(pkgGraph).forEach((nodeId) => { + graph[nodeId] = pkgGraph[nodeId].dependencies; + }); + return graph; + } + function reverseGraph(graph) { + const reversedGraph = {}; + Object.keys(graph).forEach((dependentNodeId) => { + graph[dependentNodeId].forEach((dependencyNodeId) => { + if (!reversedGraph[dependencyNodeId]) { + reversedGraph[dependencyNodeId] = [dependentNodeId]; + } else { + reversedGraph[dependencyNodeId].push(dependentNodeId); + } + }); + }); + return reversedGraph; + } + function matchPackages(graph, pattern) { + const match = matcher_1.default(pattern); + return Object.keys(graph).filter((id) => graph[id].package.manifest.name && match(graph[id].package.manifest.name)); + } + function matchPackagesByExactPath(graph, pathStartsWith) { + return Object.keys(graph).filter((parentDir) => is_subdir_1.default(pathStartsWith, parentDir)); + } + function matchPackagesByGlob(graph, pathStartsWith) { + const format = (str) => str.replace(/\/$/, ""); + const formattedFilter = pathStartsWith.replace(/\\/g, "/").replace(/\/$/, ""); + return Object.keys(graph).filter((parentDir) => micromatch.isMatch(parentDir, formattedFilter, { format })); + } + function pickSubgraph(graph, nextNodeIds, walked, opts) { + for (const nextNodeId of nextNodeIds) { + if (!walked.has(nextNodeId)) { + if (opts.includeRoot) { + walked.add(nextNodeId); + } + if (graph[nextNodeId]) + pickSubgraph(graph, graph[nextNodeId], walked, { includeRoot: true }); + } + } + } + } +}); + +// ../../node_modules/.pnpm/@zkochan+retry@0.2.0/node_modules/@zkochan/retry/lib/retry_operation.js +var require_retry_operation = __commonJS({ + "../../node_modules/.pnpm/@zkochan+retry@0.2.0/node_modules/@zkochan/retry/lib/retry_operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var RetryOperation = class { + constructor(timeouts, options) { + var _a; + this._originalTimeouts = [...timeouts]; + this._timeouts = timeouts; + this._maxRetryTime = (_a = options === null || options === void 0 ? void 0 : options.maxRetryTime) !== null && _a !== void 0 ? _a : Infinity; + this._fn = null; + this._errors = []; + this._attempts = 1; + this._operationStart = null; + this._timer = null; + } + reset() { + this._attempts = 1; + this._timeouts = this._originalTimeouts; + } + stop() { + if (this._timer) { + clearTimeout(this._timer); + } + this._timeouts = []; + } + retry(err) { + if (!err) { + return false; + } + var currentTime = new Date().getTime(); + if (err && currentTime - this._operationStart >= this._maxRetryTime) { + this._errors.unshift(new Error("RetryOperation timeout occurred")); + return false; + } + this._errors.push(err); + var timeout = this._timeouts.shift(); + if (timeout === void 0) { + return false; + } + this._timer = setTimeout(() => this._fn(++this._attempts), timeout); + return timeout; + } + attempt(fn2) { + this._fn = fn2; + this._operationStart = new Date().getTime(); + this._fn(this._attempts); + } + errors() { + return this._errors; + } + attempts() { + return this._attempts; + } + mainError() { + if (this._errors.length === 0) { + return null; + } + var counts = {}; + var mainError = null; + var mainErrorCount = 0; + for (var i = 0; i < this._errors.length; i++) { + var error = this._errors[i]; + var message2 = error.message; + var count = (counts[message2] || 0) + 1; + counts[message2] = count; + if (count >= mainErrorCount) { + mainError = error; + mainErrorCount = count; + } + } + return mainError; + } + }; + exports2.default = RetryOperation; + } +}); + +// ../../node_modules/.pnpm/@zkochan+retry@0.2.0/node_modules/@zkochan/retry/lib/retry.js +var require_retry2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+retry@0.2.0/node_modules/@zkochan/retry/lib/retry.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createTimeout = exports2.createTimeouts = exports2.operation = void 0; + var retry_operation_1 = require_retry_operation(); + function operation(options) { + var timeouts = createTimeouts(options); + return new retry_operation_1.default(timeouts, { + maxRetryTime: options && options.maxRetryTime + }); + } + exports2.operation = operation; + function createTimeouts(options) { + var opts = { + retries: 10, + factor: 2, + minTimeout: 1 * 1e3, + maxTimeout: Infinity, + randomize: false, + ...options + }; + if (opts.minTimeout > opts.maxTimeout) { + throw new Error("minTimeout is greater than maxTimeout"); + } + var timeouts = []; + for (var i = 0; i < opts.retries; i++) { + timeouts.push(createTimeout(i, opts)); + } + timeouts.sort(function(a, b) { + return a - b; + }); + return timeouts; + } + exports2.createTimeouts = createTimeouts; + function createTimeout(attempt, opts) { + var random = opts.randomize ? Math.random() + 1 : 1; + var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt)); + timeout = Math.min(timeout, opts.maxTimeout); + return timeout; + } + exports2.createTimeout = createTimeout; + } +}); + +// ../../node_modules/.pnpm/data-uri-to-buffer@3.0.1/node_modules/data-uri-to-buffer/dist/src/index.js +var require_src2 = __commonJS({ + "../../node_modules/.pnpm/data-uri-to-buffer@3.0.1/node_modules/data-uri-to-buffer/dist/src/index.js"(exports2, module2) { + "use strict"; + function dataUriToBuffer(uri) { + if (!/^data:/i.test(uri)) { + throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")'); + } + uri = uri.replace(/\r?\n/g, ""); + const firstComma = uri.indexOf(","); + if (firstComma === -1 || firstComma <= 4) { + throw new TypeError("malformed data: URI"); + } + const meta = uri.substring(5, firstComma).split(";"); + let charset = ""; + let base64 = false; + const type = meta[0] || "text/plain"; + let typeFull = type; + for (let i = 1; i < meta.length; i++) { + if (meta[i] === "base64") { + base64 = true; + } else { + typeFull += `;${meta[i]}`; + if (meta[i].indexOf("charset=") === 0) { + charset = meta[i].substring(8); + } + } + } + if (!meta[0] && !charset.length) { + typeFull += ";charset=US-ASCII"; + charset = "US-ASCII"; + } + const encoding = base64 ? "base64" : "ascii"; + const data = unescape(uri.substring(firstComma + 1)); + const buffer = Buffer.from(data, encoding); + buffer.type = type; + buffer.typeFull = typeFull; + buffer.charset = charset; + return buffer; + } + module2.exports = dataUriToBuffer; + } +}); + +// ../../node_modules/.pnpm/fetch-blob@2.1.2/node_modules/fetch-blob/index.js +var require_fetch_blob = __commonJS({ + "../../node_modules/.pnpm/fetch-blob@2.1.2/node_modules/fetch-blob/index.js"(exports2, module2) { + var { Readable } = require("stream"); + var wm = new WeakMap(); + async function* read(parts) { + for (const part of parts) { + if ("stream" in part) { + yield* part.stream(); + } else { + yield part; + } + } + } + var Blob = class { + constructor(blobParts = [], options = {}) { + let size = 0; + const parts = blobParts.map((element) => { + let buffer; + if (element instanceof Buffer) { + buffer = element; + } else if (ArrayBuffer.isView(element)) { + buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); + } else if (element instanceof ArrayBuffer) { + buffer = Buffer.from(element); + } else if (element instanceof Blob) { + buffer = element; + } else { + buffer = Buffer.from(typeof element === "string" ? element : String(element)); + } + size += buffer.length || buffer.size || 0; + return buffer; + }); + const type = options.type === void 0 ? "" : String(options.type).toLowerCase(); + wm.set(this, { + type: /[^\u0020-\u007E]/.test(type) ? "" : type, + size, + parts + }); + } + get size() { + return wm.get(this).size; + } + get type() { + return wm.get(this).type; + } + async text() { + return Buffer.from(await this.arrayBuffer()).toString(); + } + async arrayBuffer() { + const data = new Uint8Array(this.size); + let offset = 0; + for await (const chunk of this.stream()) { + data.set(chunk, offset); + offset += chunk.length; + } + return data.buffer; + } + stream() { + return Readable.from(read(wm.get(this).parts)); + } + slice(start = 0, end = this.size, type = "") { + const { size } = this; + let relativeStart = start < 0 ? Math.max(size + start, 0) : Math.min(start, size); + let relativeEnd = end < 0 ? Math.max(size + end, 0) : Math.min(end, size); + const span = Math.max(relativeEnd - relativeStart, 0); + const parts = wm.get(this).parts.values(); + const blobParts = []; + let added = 0; + for (const part of parts) { + const size2 = ArrayBuffer.isView(part) ? part.byteLength : part.size; + if (relativeStart && size2 <= relativeStart) { + relativeStart -= size2; + relativeEnd -= size2; + } else { + const chunk = part.slice(relativeStart, Math.min(size2, relativeEnd)); + blobParts.push(chunk); + added += ArrayBuffer.isView(chunk) ? chunk.byteLength : chunk.size; + relativeStart = 0; + if (added >= span) { + break; + } + } + } + const blob = new Blob([], { type: String(type).toLowerCase() }); + Object.assign(wm.get(blob), { size: span, parts: blobParts }); + return blob; + } + get [Symbol.toStringTag]() { + return "Blob"; + } + static [Symbol.hasInstance](object) { + return object && typeof object === "object" && typeof object.stream === "function" && object.stream.length === 0 && typeof object.constructor === "function" && /^(Blob|File)$/.test(object[Symbol.toStringTag]); + } + }; + Object.defineProperties(Blob.prototype, { + size: { enumerable: true }, + type: { enumerable: true }, + slice: { enumerable: true } + }); + module2.exports = Blob; + } +}); + +// ../../node_modules/.pnpm/node-fetch@3.0.0-beta.9/node_modules/node-fetch/dist/index.cjs +var require_dist2 = __commonJS({ + "../../node_modules/.pnpm/node-fetch@3.0.0-beta.9/node_modules/node-fetch/dist/index.cjs"(exports2, module2) { + "use strict"; + exports2 = module2.exports = fetch; + var http = require("http"); + var https = require("https"); + var zlib = require("zlib"); + var Stream = require("stream"); + var dataUriToBuffer = require_src2(); + var util = require("util"); + var Blob = require_fetch_blob(); + var crypto = require("crypto"); + var url = require("url"); + var FetchBaseError = class extends Error { + constructor(message2, type) { + super(message2); + Error.captureStackTrace(this, this.constructor); + this.type = type; + } + get name() { + return this.constructor.name; + } + get [Symbol.toStringTag]() { + return this.constructor.name; + } + }; + var FetchError = class extends FetchBaseError { + constructor(message2, type, systemError) { + super(message2, type); + if (systemError) { + this.code = this.errno = systemError.code; + this.erroredSysCall = systemError.syscall; + } + } + }; + var NAME = Symbol.toStringTag; + var isURLSearchParameters = (object) => { + return typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && typeof object.sort === "function" && object[NAME] === "URLSearchParams"; + }; + var isBlob = (object) => { + return typeof object === "object" && typeof object.arrayBuffer === "function" && typeof object.type === "string" && typeof object.stream === "function" && typeof object.constructor === "function" && /^(Blob|File)$/.test(object[NAME]); + }; + function isFormData(object) { + return typeof object === "object" && typeof object.append === "function" && typeof object.set === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.delete === "function" && typeof object.keys === "function" && typeof object.values === "function" && typeof object.entries === "function" && typeof object.constructor === "function" && object[NAME] === "FormData"; + } + var isAbortSignal = (object) => { + return typeof object === "object" && object[NAME] === "AbortSignal"; + }; + var carriage = "\r\n"; + var dashes = "-".repeat(2); + var carriageLength = Buffer.byteLength(carriage); + var getFooter = (boundary) => `${dashes}${boundary}${dashes}${carriage.repeat(2)}`; + function getHeader(boundary, name, field) { + let header = ""; + header += `${dashes}${boundary}${carriage}`; + header += `Content-Disposition: form-data; name="${name}"`; + if (isBlob(field)) { + header += `; filename="${field.name}"${carriage}`; + header += `Content-Type: ${field.type || "application/octet-stream"}`; + } + return `${header}${carriage.repeat(2)}`; + } + var getBoundary = () => crypto.randomBytes(8).toString("hex"); + async function* formDataIterator(form, boundary) { + for (const [name, value] of form) { + yield getHeader(boundary, name, value); + if (isBlob(value)) { + yield* value.stream(); + } else { + yield value; + } + yield carriage; + } + yield getFooter(boundary); + } + function getFormDataLength(form, boundary) { + let length = 0; + for (const [name, value] of form) { + length += Buffer.byteLength(getHeader(boundary, name, value)); + if (isBlob(value)) { + length += value.size; + } else { + length += Buffer.byteLength(String(value)); + } + length += carriageLength; + } + length += Buffer.byteLength(getFooter(boundary)); + return length; + } + var INTERNALS = Symbol("Body internals"); + var Body = class { + constructor(body, { + size = 0 + } = {}) { + let boundary = null; + if (body === null) { + body = null; + } else if (isURLSearchParameters(body)) { + body = Buffer.from(body.toString()); + } else if (isBlob(body)) + ; + else if (Buffer.isBuffer(body)) + ; + else if (util.types.isAnyArrayBuffer(body)) { + body = Buffer.from(body); + } else if (ArrayBuffer.isView(body)) { + body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); + } else if (body instanceof Stream) + ; + else if (isFormData(body)) { + boundary = `NodeFetchFormDataBoundary${getBoundary()}`; + body = Stream.Readable.from(formDataIterator(body, boundary)); + } else { + body = Buffer.from(String(body)); + } + this[INTERNALS] = { + body, + boundary, + disturbed: false, + error: null + }; + this.size = size; + if (body instanceof Stream) { + body.on("error", (err) => { + const error = err instanceof FetchBaseError ? err : new FetchError(`Invalid response body while trying to fetch ${this.url}: ${err.message}`, "system", err); + this[INTERNALS].error = error; + }); + } + } + get body() { + return this[INTERNALS].body; + } + get bodyUsed() { + return this[INTERNALS].disturbed; + } + async arrayBuffer() { + const { buffer, byteOffset, byteLength } = await consumeBody(this); + return buffer.slice(byteOffset, byteOffset + byteLength); + } + async blob() { + const ct = this.headers && this.headers.get("content-type") || this[INTERNALS].body && this[INTERNALS].body.type || ""; + const buf = await this.buffer(); + return new Blob([buf], { + type: ct + }); + } + async json() { + const buffer = await consumeBody(this); + return JSON.parse(buffer.toString()); + } + async text() { + const buffer = await consumeBody(this); + return buffer.toString(); + } + buffer() { + return consumeBody(this); + } + }; + Object.defineProperties(Body.prototype, { + body: { enumerable: true }, + bodyUsed: { enumerable: true }, + arrayBuffer: { enumerable: true }, + blob: { enumerable: true }, + json: { enumerable: true }, + text: { enumerable: true } + }); + async function consumeBody(data) { + if (data[INTERNALS].disturbed) { + throw new TypeError(`body used already for: ${data.url}`); + } + data[INTERNALS].disturbed = true; + if (data[INTERNALS].error) { + throw data[INTERNALS].error; + } + let { body } = data; + if (body === null) { + return Buffer.alloc(0); + } + if (isBlob(body)) { + body = body.stream(); + } + if (Buffer.isBuffer(body)) { + return body; + } + if (!(body instanceof Stream)) { + return Buffer.alloc(0); + } + const accum = []; + let accumBytes = 0; + try { + for await (const chunk of body) { + if (data.size > 0 && accumBytes + chunk.length > data.size) { + const err = new FetchError(`content size at ${data.url} over limit: ${data.size}`, "max-size"); + body.destroy(err); + throw err; + } + accumBytes += chunk.length; + accum.push(chunk); + } + } catch (error) { + if (error instanceof FetchBaseError) { + throw error; + } else { + throw new FetchError(`Invalid response body while trying to fetch ${data.url}: ${error.message}`, "system", error); + } + } + if (body.readableEnded === true || body._readableState.ended === true) { + try { + if (accum.every((c) => typeof c === "string")) { + return Buffer.from(accum.join("")); + } + return Buffer.concat(accum, accumBytes); + } catch (error) { + throw new FetchError(`Could not create Buffer from response body for ${data.url}: ${error.message}`, "system", error); + } + } else { + throw new FetchError(`Premature close of server response while trying to fetch ${data.url}`); + } + } + var clone = (instance, highWaterMark) => { + let p1; + let p2; + let { body } = instance; + if (instance.bodyUsed) { + throw new Error("cannot clone body after it is used"); + } + if (body instanceof Stream && typeof body.getBoundary !== "function") { + p1 = new Stream.PassThrough({ highWaterMark }); + p2 = new Stream.PassThrough({ highWaterMark }); + body.pipe(p1); + body.pipe(p2); + instance[INTERNALS].body = p1; + body = p2; + } + return body; + }; + var extractContentType = (body, request) => { + if (body === null) { + return null; + } + if (typeof body === "string") { + return "text/plain;charset=UTF-8"; + } + if (isURLSearchParameters(body)) { + return "application/x-www-form-urlencoded;charset=UTF-8"; + } + if (isBlob(body)) { + return body.type || null; + } + if (Buffer.isBuffer(body) || util.types.isAnyArrayBuffer(body) || ArrayBuffer.isView(body)) { + return null; + } + if (body && typeof body.getBoundary === "function") { + return `multipart/form-data;boundary=${body.getBoundary()}`; + } + if (isFormData(body)) { + return `multipart/form-data; boundary=${request[INTERNALS].boundary}`; + } + if (body instanceof Stream) { + return null; + } + return "text/plain;charset=UTF-8"; + }; + var getTotalBytes = (request) => { + const { body } = request; + if (body === null) { + return 0; + } + if (isBlob(body)) { + return body.size; + } + if (Buffer.isBuffer(body)) { + return body.length; + } + if (body && typeof body.getLengthSync === "function") { + return body.hasKnownLength && body.hasKnownLength() ? body.getLengthSync() : null; + } + if (isFormData(body)) { + return getFormDataLength(request[INTERNALS].boundary); + } + return null; + }; + var writeToStream = (dest, { body }) => { + if (body === null) { + dest.end(); + } else if (isBlob(body)) { + body.stream().pipe(dest); + } else if (Buffer.isBuffer(body)) { + dest.write(body); + dest.end(); + } else { + body.pipe(dest); + } + }; + var validateHeaderName = typeof http.validateHeaderName === "function" ? http.validateHeaderName : (name) => { + if (!/^[\^`\-\w!#$%&'*+.|~]+$/.test(name)) { + const err = new TypeError(`Header name must be a valid HTTP token [${name}]`); + Object.defineProperty(err, "code", { value: "ERR_INVALID_HTTP_TOKEN" }); + throw err; + } + }; + var validateHeaderValue = typeof http.validateHeaderValue === "function" ? http.validateHeaderValue : (name, value) => { + if (/[^\t\u0020-\u007E\u0080-\u00FF]/.test(value)) { + const err = new TypeError(`Invalid character in header content ["${name}"]`); + Object.defineProperty(err, "code", { value: "ERR_INVALID_CHAR" }); + throw err; + } + }; + var Headers = class extends URLSearchParams { + constructor(init) { + let result = []; + if (init instanceof Headers) { + const raw = init.raw(); + for (const [name, values] of Object.entries(raw)) { + result.push(...values.map((value) => [name, value])); + } + } else if (init == null) + ; + else if (typeof init === "object" && !util.types.isBoxedPrimitive(init)) { + const method = init[Symbol.iterator]; + if (method == null) { + result.push(...Object.entries(init)); + } else { + if (typeof method !== "function") { + throw new TypeError("Header pairs must be iterable"); + } + result = [...init].map((pair) => { + if (typeof pair !== "object" || util.types.isBoxedPrimitive(pair)) { + throw new TypeError("Each header pair must be an iterable object"); + } + return [...pair]; + }).map((pair) => { + if (pair.length !== 2) { + throw new TypeError("Each header pair must be a name/value tuple"); + } + return [...pair]; + }); + } + } else { + throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence> or record)"); + } + result = result.length > 0 ? result.map(([name, value]) => { + validateHeaderName(name); + validateHeaderValue(name, String(value)); + return [String(name).toLowerCase(), String(value)]; + }) : void 0; + super(result); + return new Proxy(this, { + get(target, p, receiver) { + switch (p) { + case "append": + case "set": + return (name, value) => { + validateHeaderName(name); + validateHeaderValue(name, String(value)); + return URLSearchParams.prototype[p].call(receiver, String(name).toLowerCase(), String(value)); + }; + case "delete": + case "has": + case "getAll": + return (name) => { + validateHeaderName(name); + return URLSearchParams.prototype[p].call(receiver, String(name).toLowerCase()); + }; + case "keys": + return () => { + target.sort(); + return new Set(URLSearchParams.prototype.keys.call(target)).keys(); + }; + default: + return Reflect.get(target, p, receiver); + } + } + }); + } + get [Symbol.toStringTag]() { + return this.constructor.name; + } + toString() { + return Object.prototype.toString.call(this); + } + get(name) { + const values = this.getAll(name); + if (values.length === 0) { + return null; + } + let value = values.join(", "); + if (/^content-encoding$/i.test(name)) { + value = value.toLowerCase(); + } + return value; + } + forEach(callback) { + for (const name of this.keys()) { + callback(this.get(name), name); + } + } + *values() { + for (const name of this.keys()) { + yield this.get(name); + } + } + *entries() { + for (const name of this.keys()) { + yield [name, this.get(name)]; + } + } + [Symbol.iterator]() { + return this.entries(); + } + raw() { + return [...this.keys()].reduce((result, key) => { + result[key] = this.getAll(key); + return result; + }, {}); + } + [Symbol.for("nodejs.util.inspect.custom")]() { + return [...this.keys()].reduce((result, key) => { + const values = this.getAll(key); + if (key === "host") { + result[key] = values[0]; + } else { + result[key] = values.length > 1 ? values : values[0]; + } + return result; + }, {}); + } + }; + Object.defineProperties(Headers.prototype, ["get", "entries", "forEach", "values"].reduce((result, property) => { + result[property] = { enumerable: true }; + return result; + }, {})); + function fromRawHeaders(headers = []) { + return new Headers(headers.reduce((result, value, index, array) => { + if (index % 2 === 0) { + result.push(array.slice(index, index + 2)); + } + return result; + }, []).filter(([name, value]) => { + try { + validateHeaderName(name); + validateHeaderValue(name, String(value)); + return true; + } catch { + return false; + } + })); + } + var redirectStatus = new Set([301, 302, 303, 307, 308]); + var isRedirect = (code) => { + return redirectStatus.has(code); + }; + var INTERNALS$1 = Symbol("Response internals"); + var Response = class extends Body { + constructor(body = null, options = {}) { + super(body, options); + const status = options.status || 200; + const headers = new Headers(options.headers); + if (body !== null && !headers.has("Content-Type")) { + const contentType = extractContentType(body); + if (contentType) { + headers.append("Content-Type", contentType); + } + } + this[INTERNALS$1] = { + url: options.url, + status, + statusText: options.statusText || "", + headers, + counter: options.counter, + highWaterMark: options.highWaterMark + }; + } + get url() { + return this[INTERNALS$1].url || ""; + } + get status() { + return this[INTERNALS$1].status; + } + get ok() { + return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; + } + get redirected() { + return this[INTERNALS$1].counter > 0; + } + get statusText() { + return this[INTERNALS$1].statusText; + } + get headers() { + return this[INTERNALS$1].headers; + } + get highWaterMark() { + return this[INTERNALS$1].highWaterMark; + } + clone() { + return new Response(clone(this, this.highWaterMark), { + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok, + redirected: this.redirected, + size: this.size + }); + } + static redirect(url2, status = 302) { + if (!isRedirect(status)) { + throw new RangeError('Failed to execute "redirect" on "response": Invalid status code'); + } + return new Response(null, { + headers: { + location: new URL(url2).toString() + }, + status + }); + } + get [Symbol.toStringTag]() { + return "Response"; + } + }; + Object.defineProperties(Response.prototype, { + url: { enumerable: true }, + status: { enumerable: true }, + ok: { enumerable: true }, + redirected: { enumerable: true }, + statusText: { enumerable: true }, + headers: { enumerable: true }, + clone: { enumerable: true } + }); + var getSearch = (parsedURL) => { + if (parsedURL.search) { + return parsedURL.search; + } + const lastOffset = parsedURL.href.length - 1; + const hash = parsedURL.hash || (parsedURL.href[lastOffset] === "#" ? "#" : ""); + return parsedURL.href[lastOffset - hash.length] === "?" ? "?" : ""; + }; + var INTERNALS$2 = Symbol("Request internals"); + var isRequest = (object) => { + return typeof object === "object" && typeof object[INTERNALS$2] === "object"; + }; + var Request = class extends Body { + constructor(input, init = {}) { + let parsedURL; + if (isRequest(input)) { + parsedURL = new URL(input.url); + } else { + parsedURL = new URL(input); + input = {}; + } + let method = init.method || input.method || "GET"; + method = method.toUpperCase(); + if ((init.body != null || isRequest(input)) && input.body !== null && (method === "GET" || method === "HEAD")) { + throw new TypeError("Request with GET/HEAD method cannot have body"); + } + const inputBody = init.body ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; + super(inputBody, { + size: init.size || input.size || 0 + }); + const headers = new Headers(init.headers || input.headers || {}); + if (inputBody !== null && !headers.has("Content-Type")) { + const contentType = extractContentType(inputBody, this); + if (contentType) { + headers.append("Content-Type", contentType); + } + } + let signal = isRequest(input) ? input.signal : null; + if ("signal" in init) { + signal = init.signal; + } + if (signal !== null && !isAbortSignal(signal)) { + throw new TypeError("Expected signal to be an instanceof AbortSignal"); + } + this[INTERNALS$2] = { + method, + redirect: init.redirect || input.redirect || "follow", + headers, + parsedURL, + signal + }; + this.follow = init.follow === void 0 ? input.follow === void 0 ? 20 : input.follow : init.follow; + this.compress = init.compress === void 0 ? input.compress === void 0 ? true : input.compress : init.compress; + this.counter = init.counter || input.counter || 0; + this.agent = init.agent || input.agent; + this.highWaterMark = init.highWaterMark || input.highWaterMark || 16384; + this.insecureHTTPParser = init.insecureHTTPParser || input.insecureHTTPParser || false; + } + get method() { + return this[INTERNALS$2].method; + } + get url() { + return url.format(this[INTERNALS$2].parsedURL); + } + get headers() { + return this[INTERNALS$2].headers; + } + get redirect() { + return this[INTERNALS$2].redirect; + } + get signal() { + return this[INTERNALS$2].signal; + } + clone() { + return new Request(this); + } + get [Symbol.toStringTag]() { + return "Request"; + } + }; + Object.defineProperties(Request.prototype, { + method: { enumerable: true }, + url: { enumerable: true }, + headers: { enumerable: true }, + redirect: { enumerable: true }, + clone: { enumerable: true }, + signal: { enumerable: true } + }); + var getNodeRequestOptions = (request) => { + const { parsedURL } = request[INTERNALS$2]; + const headers = new Headers(request[INTERNALS$2].headers); + if (!headers.has("Accept")) { + headers.set("Accept", "*/*"); + } + let contentLengthValue = null; + if (request.body === null && /^(post|put)$/i.test(request.method)) { + contentLengthValue = "0"; + } + if (request.body !== null) { + const totalBytes = getTotalBytes(request); + if (typeof totalBytes === "number" && !Number.isNaN(totalBytes)) { + contentLengthValue = String(totalBytes); + } + } + if (contentLengthValue) { + headers.set("Content-Length", contentLengthValue); + } + if (!headers.has("User-Agent")) { + headers.set("User-Agent", "node-fetch"); + } + if (request.compress && !headers.has("Accept-Encoding")) { + headers.set("Accept-Encoding", "gzip,deflate,br"); + } + let { agent } = request; + if (typeof agent === "function") { + agent = agent(parsedURL); + } + if (!headers.has("Connection") && !agent) { + headers.set("Connection", "close"); + } + const search = getSearch(parsedURL); + const requestOptions = { + path: parsedURL.pathname + search, + pathname: parsedURL.pathname, + hostname: parsedURL.hostname, + protocol: parsedURL.protocol, + port: parsedURL.port, + hash: parsedURL.hash, + search: parsedURL.search, + query: parsedURL.query, + href: parsedURL.href, + method: request.method, + headers: headers[Symbol.for("nodejs.util.inspect.custom")](), + insecureHTTPParser: request.insecureHTTPParser, + agent + }; + return requestOptions; + }; + var AbortError = class extends FetchBaseError { + constructor(message2, type = "aborted") { + super(message2, type); + } + }; + var supportedSchemas = new Set(["data:", "http:", "https:"]); + async function fetch(url2, options_) { + return new Promise((resolve, reject) => { + const request = new Request(url2, options_); + const options = getNodeRequestOptions(request); + if (!supportedSchemas.has(options.protocol)) { + throw new TypeError(`node-fetch cannot load ${url2}. URL scheme "${options.protocol.replace(/:$/, "")}" is not supported.`); + } + if (options.protocol === "data:") { + const data = dataUriToBuffer(request.url); + const response2 = new Response(data, { headers: { "Content-Type": data.typeFull } }); + resolve(response2); + return; + } + const send = (options.protocol === "https:" ? https : http).request; + const { signal } = request; + let response = null; + const abort = () => { + const error = new AbortError("The operation was aborted."); + reject(error); + if (request.body && request.body instanceof Stream.Readable) { + request.body.destroy(error); + } + if (!response || !response.body) { + return; + } + response.body.emit("error", error); + }; + if (signal && signal.aborted) { + abort(); + return; + } + const abortAndFinalize = () => { + abort(); + finalize(); + }; + const request_ = send(options); + if (signal) { + signal.addEventListener("abort", abortAndFinalize); + } + const finalize = () => { + request_.abort(); + if (signal) { + signal.removeEventListener("abort", abortAndFinalize); + } + }; + request_.on("error", (err) => { + reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, "system", err)); + finalize(); + }); + request_.on("response", (response_) => { + request_.setTimeout(0); + const headers = fromRawHeaders(response_.rawHeaders); + if (isRedirect(response_.statusCode)) { + const location = headers.get("Location"); + const locationURL = location === null ? null : new URL(location, request.url); + switch (request.redirect) { + case "error": + reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, "no-redirect")); + finalize(); + return; + case "manual": + if (locationURL !== null) { + try { + headers.set("Location", locationURL); + } catch (error) { + reject(error); + } + } + break; + case "follow": { + if (locationURL === null) { + break; + } + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${request.url}`, "max-redirect")); + finalize(); + return; + } + const requestOptions = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: request.body, + signal: request.signal, + size: request.size + }; + if (response_.statusCode !== 303 && request.body && options_.body instanceof Stream.Readable) { + reject(new FetchError("Cannot follow redirect with body being a readable stream", "unsupported-redirect")); + finalize(); + return; + } + if (response_.statusCode === 303 || (response_.statusCode === 301 || response_.statusCode === 302) && request.method === "POST") { + requestOptions.method = "GET"; + requestOptions.body = void 0; + requestOptions.headers.delete("content-length"); + } + resolve(fetch(new Request(locationURL, requestOptions))); + finalize(); + return; + } + } + } + response_.once("end", () => { + if (signal) { + signal.removeEventListener("abort", abortAndFinalize); + } + }); + let body = Stream.pipeline(response_, new Stream.PassThrough(), (error) => { + reject(error); + }); + if (process.version < "v12.10") { + response_.on("aborted", abortAndFinalize); + } + const responseOptions = { + url: request.url, + status: response_.statusCode, + statusText: response_.statusMessage, + headers, + size: request.size, + counter: request.counter, + highWaterMark: request.highWaterMark + }; + const codings = headers.get("Content-Encoding"); + if (!request.compress || request.method === "HEAD" || codings === null || response_.statusCode === 204 || response_.statusCode === 304) { + response = new Response(body, responseOptions); + resolve(response); + return; + } + const zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + }; + if (codings === "gzip" || codings === "x-gzip") { + body = Stream.pipeline(body, zlib.createGunzip(zlibOptions), (error) => { + reject(error); + }); + response = new Response(body, responseOptions); + resolve(response); + return; + } + if (codings === "deflate" || codings === "x-deflate") { + const raw = Stream.pipeline(response_, new Stream.PassThrough(), (error) => { + reject(error); + }); + raw.once("data", (chunk) => { + if ((chunk[0] & 15) === 8) { + body = Stream.pipeline(body, zlib.createInflate(), (error) => { + reject(error); + }); + } else { + body = Stream.pipeline(body, zlib.createInflateRaw(), (error) => { + reject(error); + }); + } + response = new Response(body, responseOptions); + resolve(response); + }); + return; + } + if (codings === "br") { + body = Stream.pipeline(body, zlib.createBrotliDecompress(), (error) => { + reject(error); + }); + response = new Response(body, responseOptions); + resolve(response); + return; + } + response = new Response(body, responseOptions); + resolve(response); + }); + writeToStream(request_, request); + }); + } + exports2.AbortError = AbortError; + exports2.FetchError = FetchError; + exports2.Headers = Headers; + exports2.Request = Request; + exports2.Response = Response; + exports2.default = fetch; + exports2.isRedirect = isRedirect; + } +}); + +// ../fetch/lib/fetch.js +var require_fetch = __commonJS({ + "../fetch/lib/fetch.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ResponseError = exports2.isRedirect = exports2.Response = void 0; + var core_loggers_1 = require_lib12(); + var retry_1 = require_retry2(); + var node_fetch_1 = __importStar2(require_dist2()); + Object.defineProperty(exports2, "Response", { enumerable: true, get: function() { + return node_fetch_1.Response; + } }); + var MIN_TIMEOUT = 10; + var MAX_RETRIES = 5; + var MAX_RETRY_AFTER = 20; + var FACTOR = 6; + exports2.isRedirect = node_fetch_1.default.isRedirect; + async function fetchRetry(url, opts = {}) { + const retryOpts = Object.assign({ + factor: FACTOR, + maxRetryAfter: MAX_RETRY_AFTER, + minTimeout: MIN_TIMEOUT, + retries: MAX_RETRIES + }, opts.retry); + const op = retry_1.operation(retryOpts); + try { + return await new Promise((resolve, reject) => op.attempt(async (attempt) => { + var _a; + try { + const res = await node_fetch_1.default(url, opts); + if (res.status >= 500 && res.status < 600 || res.status === 429) { + throw new ResponseError(res); + } else { + resolve(res); + return; + } + } catch (error) { + const timeout = op.retry(error); + if (timeout === false) { + reject(op.mainError()); + return; + } + core_loggers_1.requestRetryLogger.debug({ + attempt, + error, + maxRetries: retryOpts.retries, + method: (_a = opts.method) !== null && _a !== void 0 ? _a : "GET", + timeout, + url: url.toString() + }); + } + })); + } catch (err) { + if (err instanceof ResponseError) { + return err.res; + } + throw err; + } + } + exports2.default = fetchRetry; + var ResponseError = class extends Error { + constructor(res) { + super(res.statusText); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, ResponseError); + } + this.name = this.constructor.name; + this.res = res; + this.code = this.status = this.statusCode = res.status; + this.url = res.url; + } + }; + exports2.ResponseError = ResponseError; + } +}); + +// ../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js +var require_ms2 = __commonJS({ + "../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports2, module2) { + var s = 1e3; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var w = d * 7; + var y = d * 365.25; + module2.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === "string" && val.length > 0) { + return parse(val); + } else if (type === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val)); + }; + function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || "ms").toLowerCase(); + switch (type) { + case "years": + case "year": + case "yrs": + case "yr": + case "y": + return n * y; + case "weeks": + case "week": + case "w": + return n * w; + case "days": + case "day": + case "d": + return n * d; + case "hours": + case "hour": + case "hrs": + case "hr": + case "h": + return n * h; + case "minutes": + case "minute": + case "mins": + case "min": + case "m": + return n * m; + case "seconds": + case "second": + case "secs": + case "sec": + case "s": + return n * s; + case "milliseconds": + case "millisecond": + case "msecs": + case "msec": + case "ms": + return n; + default: + return void 0; + } + } + function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + "d"; + } + if (msAbs >= h) { + return Math.round(ms / h) + "h"; + } + if (msAbs >= m) { + return Math.round(ms / m) + "m"; + } + if (msAbs >= s) { + return Math.round(ms / s) + "s"; + } + return ms + "ms"; + } + function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, "day"); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, "hour"); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, "minute"); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, "second"); + } + return ms + " ms"; + } + function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); + } + } +}); + +// ../../node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/index.js +var require_humanize_ms = __commonJS({ + "../../node_modules/.pnpm/humanize-ms@1.2.1/node_modules/humanize-ms/index.js"(exports2, module2) { + "use strict"; + var util = require("util"); + var ms = require_ms2(); + module2.exports = function(t) { + if (typeof t === "number") + return t; + var r = ms(t); + if (r === void 0) { + var err = new Error(util.format("humanize-ms(%j) result undefined", t)); + console.warn(err.stack); + } + return r; + }; + } +}); + +// ../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/lib/compat/callsite-tostring.js +var require_callsite_tostring = __commonJS({ + "../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/lib/compat/callsite-tostring.js"(exports2, module2) { + "use strict"; + module2.exports = callSiteToString2; + function callSiteFileLocation(callSite) { + var fileName; + var fileLocation = ""; + if (callSite.isNative()) { + fileLocation = "native"; + } else if (callSite.isEval()) { + fileName = callSite.getScriptNameOrSourceURL(); + if (!fileName) { + fileLocation = callSite.getEvalOrigin(); + } + } else { + fileName = callSite.getFileName(); + } + if (fileName) { + fileLocation += fileName; + var lineNumber = callSite.getLineNumber(); + if (lineNumber != null) { + fileLocation += ":" + lineNumber; + var columnNumber = callSite.getColumnNumber(); + if (columnNumber) { + fileLocation += ":" + columnNumber; + } + } + } + return fileLocation || "unknown source"; + } + function callSiteToString2(callSite) { + var addSuffix = true; + var fileLocation = callSiteFileLocation(callSite); + var functionName = callSite.getFunctionName(); + var isConstructor = callSite.isConstructor(); + var isMethodCall = !(callSite.isToplevel() || isConstructor); + var line = ""; + if (isMethodCall) { + var methodName = callSite.getMethodName(); + var typeName = getConstructorName(callSite); + if (functionName) { + if (typeName && functionName.indexOf(typeName) !== 0) { + line += typeName + "."; + } + line += functionName; + if (methodName && functionName.lastIndexOf("." + methodName) !== functionName.length - methodName.length - 1) { + line += " [as " + methodName + "]"; + } + } else { + line += typeName + "." + (methodName || ""); + } + } else if (isConstructor) { + line += "new " + (functionName || ""); + } else if (functionName) { + line += functionName; + } else { + addSuffix = false; + line += fileLocation; + } + if (addSuffix) { + line += " (" + fileLocation + ")"; + } + return line; + } + function getConstructorName(obj) { + var receiver = obj.receiver; + return receiver.constructor && receiver.constructor.name || null; + } + } +}); + +// ../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/lib/compat/event-listener-count.js +var require_event_listener_count = __commonJS({ + "../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/lib/compat/event-listener-count.js"(exports2, module2) { + "use strict"; + module2.exports = eventListenerCount2; + function eventListenerCount2(emitter, type) { + return emitter.listeners(type).length; + } + } +}); + +// ../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/lib/compat/index.js +var require_compat = __commonJS({ + "../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/lib/compat/index.js"(exports2, module2) { + "use strict"; + var EventEmitter = require("events").EventEmitter; + lazyProperty(module2.exports, "callSiteToString", function callSiteToString2() { + var limit = Error.stackTraceLimit; + var obj = {}; + var prep = Error.prepareStackTrace; + function prepareObjectStackTrace2(obj2, stack3) { + return stack3; + } + Error.prepareStackTrace = prepareObjectStackTrace2; + Error.stackTraceLimit = 2; + Error.captureStackTrace(obj); + var stack2 = obj.stack.slice(); + Error.prepareStackTrace = prep; + Error.stackTraceLimit = limit; + return stack2[0].toString ? toString : require_callsite_tostring(); + }); + lazyProperty(module2.exports, "eventListenerCount", function eventListenerCount2() { + return EventEmitter.listenerCount || require_event_listener_count(); + }); + function lazyProperty(obj, prop, getter) { + function get() { + var val = getter(); + Object.defineProperty(obj, prop, { + configurable: true, + enumerable: true, + value: val + }); + return val; + } + Object.defineProperty(obj, prop, { + configurable: true, + enumerable: true, + get + }); + } + function toString(obj) { + return obj.toString(); + } + } +}); + +// ../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/index.js +var require_depd = __commonJS({ + "../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/index.js"(exports, module) { + var callSiteToString = require_compat().callSiteToString; + var eventListenerCount = require_compat().eventListenerCount; + var relative = require("path").relative; + module.exports = depd; + var basePath = process.cwd(); + function containsNamespace(str, namespace) { + var vals = str.split(/[ ,]+/); + var ns = String(namespace).toLowerCase(); + for (var i = 0; i < vals.length; i++) { + var val = vals[i]; + if (val && (val === "*" || val.toLowerCase() === ns)) { + return true; + } + } + return false; + } + function convertDataDescriptorToAccessor(obj, prop, message2) { + var descriptor = Object.getOwnPropertyDescriptor(obj, prop); + var value = descriptor.value; + descriptor.get = function getter() { + return value; + }; + if (descriptor.writable) { + descriptor.set = function setter(val) { + return value = val; + }; + } + delete descriptor.value; + delete descriptor.writable; + Object.defineProperty(obj, prop, descriptor); + return descriptor; + } + function createArgumentsString(arity) { + var str = ""; + for (var i = 0; i < arity; i++) { + str += ", arg" + i; + } + return str.substr(2); + } + function createStackString(stack2) { + var str = this.name + ": " + this.namespace; + if (this.message) { + str += " deprecated " + this.message; + } + for (var i = 0; i < stack2.length; i++) { + str += "\n at " + callSiteToString(stack2[i]); + } + return str; + } + function depd(namespace) { + if (!namespace) { + throw new TypeError("argument namespace is required"); + } + var stack2 = getStack(); + var site2 = callSiteLocation(stack2[1]); + var file = site2[0]; + function deprecate2(message2) { + log.call(deprecate2, message2); + } + deprecate2._file = file; + deprecate2._ignored = isignored(namespace); + deprecate2._namespace = namespace; + deprecate2._traced = istraced(namespace); + deprecate2._warned = Object.create(null); + deprecate2.function = wrapfunction; + deprecate2.property = wrapproperty; + return deprecate2; + } + function isignored(namespace) { + if (process.noDeprecation) { + return true; + } + var str = process.env.NO_DEPRECATION || ""; + return containsNamespace(str, namespace); + } + function istraced(namespace) { + if (process.traceDeprecation) { + return true; + } + var str = process.env.TRACE_DEPRECATION || ""; + return containsNamespace(str, namespace); + } + function log(message2, site2) { + var haslisteners = eventListenerCount(process, "deprecation") !== 0; + if (!haslisteners && this._ignored) { + return; + } + var caller; + var callFile; + var callSite; + var depSite; + var i = 0; + var seen = false; + var stack2 = getStack(); + var file = this._file; + if (site2) { + depSite = site2; + callSite = callSiteLocation(stack2[1]); + callSite.name = depSite.name; + file = callSite[0]; + } else { + i = 2; + depSite = callSiteLocation(stack2[i]); + callSite = depSite; + } + for (; i < stack2.length; i++) { + caller = callSiteLocation(stack2[i]); + callFile = caller[0]; + if (callFile === file) { + seen = true; + } else if (callFile === this._file) { + file = this._file; + } else if (seen) { + break; + } + } + var key = caller ? depSite.join(":") + "__" + caller.join(":") : void 0; + if (key !== void 0 && key in this._warned) { + return; + } + this._warned[key] = true; + var msg = message2; + if (!msg) { + msg = callSite === depSite || !callSite.name ? defaultMessage(depSite) : defaultMessage(callSite); + } + if (haslisteners) { + var err = DeprecationError(this._namespace, msg, stack2.slice(i)); + process.emit("deprecation", err); + return; + } + var format = process.stderr.isTTY ? formatColor : formatPlain; + var output = format.call(this, msg, caller, stack2.slice(i)); + process.stderr.write(output + "\n", "utf8"); + } + function callSiteLocation(callSite) { + var file = callSite.getFileName() || ""; + var line = callSite.getLineNumber(); + var colm = callSite.getColumnNumber(); + if (callSite.isEval()) { + file = callSite.getEvalOrigin() + ", " + file; + } + var site2 = [file, line, colm]; + site2.callSite = callSite; + site2.name = callSite.getFunctionName(); + return site2; + } + function defaultMessage(site2) { + var callSite = site2.callSite; + var funcName = site2.name; + if (!funcName) { + funcName = ""; + } + var context = callSite.getThis(); + var typeName = context && callSite.getTypeName(); + if (typeName === "Object") { + typeName = void 0; + } + if (typeName === "Function") { + typeName = context.name || typeName; + } + return typeName && callSite.getMethodName() ? typeName + "." + funcName : funcName; + } + function formatPlain(msg, caller, stack2) { + var timestamp = new Date().toUTCString(); + var formatted = timestamp + " " + this._namespace + " deprecated " + msg; + if (this._traced) { + for (var i = 0; i < stack2.length; i++) { + formatted += "\n at " + callSiteToString(stack2[i]); + } + return formatted; + } + if (caller) { + formatted += " at " + formatLocation(caller); + } + return formatted; + } + function formatColor(msg, caller, stack2) { + var formatted = "" + this._namespace + " deprecated " + msg + ""; + if (this._traced) { + for (var i = 0; i < stack2.length; i++) { + formatted += "\n at " + callSiteToString(stack2[i]) + ""; + } + return formatted; + } + if (caller) { + formatted += " " + formatLocation(caller) + ""; + } + return formatted; + } + function formatLocation(callSite) { + return relative(basePath, callSite[0]) + ":" + callSite[1] + ":" + callSite[2]; + } + function getStack() { + var limit = Error.stackTraceLimit; + var obj = {}; + var prep = Error.prepareStackTrace; + Error.prepareStackTrace = prepareObjectStackTrace; + Error.stackTraceLimit = Math.max(10, limit); + Error.captureStackTrace(obj); + var stack2 = obj.stack.slice(1); + Error.prepareStackTrace = prep; + Error.stackTraceLimit = limit; + return stack2; + } + function prepareObjectStackTrace(obj, stack2) { + return stack2; + } + function wrapfunction(fn, message) { + if (typeof fn !== "function") { + throw new TypeError("argument fn must be a function"); + } + var args = createArgumentsString(fn.length); + var deprecate = this; + var stack = getStack(); + var site = callSiteLocation(stack[1]); + site.name = fn.name; + var deprecatedfn = eval("(function (" + args + ') {\n"use strict"\nlog.call(deprecate, message, site)\nreturn fn.apply(this, arguments)\n})'); + return deprecatedfn; + } + function wrapproperty(obj, prop, message2) { + if (!obj || typeof obj !== "object" && typeof obj !== "function") { + throw new TypeError("argument obj must be object"); + } + var descriptor = Object.getOwnPropertyDescriptor(obj, prop); + if (!descriptor) { + throw new TypeError("must call property on owner object"); + } + if (!descriptor.configurable) { + throw new TypeError("property must be configurable"); + } + var deprecate2 = this; + var stack2 = getStack(); + var site2 = callSiteLocation(stack2[1]); + site2.name = prop; + if ("value" in descriptor) { + descriptor = convertDataDescriptorToAccessor(obj, prop, message2); + } + var get = descriptor.get; + var set = descriptor.set; + if (typeof get === "function") { + descriptor.get = function getter() { + log.call(deprecate2, message2, site2); + return get.apply(this, arguments); + }; + } + if (typeof set === "function") { + descriptor.set = function setter() { + log.call(deprecate2, message2, site2); + return set.apply(this, arguments); + }; + } + Object.defineProperty(obj, prop, descriptor); + } + function DeprecationError(namespace, message2, stack2) { + var error = new Error(); + var stackString; + Object.defineProperty(error, "constructor", { + value: DeprecationError + }); + Object.defineProperty(error, "message", { + configurable: true, + enumerable: false, + value: message2, + writable: true + }); + Object.defineProperty(error, "name", { + enumerable: false, + configurable: true, + value: "DeprecationError", + writable: true + }); + Object.defineProperty(error, "namespace", { + configurable: true, + enumerable: false, + value: namespace, + writable: true + }); + Object.defineProperty(error, "stack", { + configurable: true, + enumerable: false, + get: function() { + if (stackString !== void 0) { + return stackString; + } + return stackString = createStackString.call(this, stack2); + }, + set: function setter(val) { + stackString = val; + } + }); + return error; + } + } +}); + +// ../../node_modules/.pnpm/agentkeepalive@4.1.4/node_modules/agentkeepalive/lib/constants.js +var require_constants7 = __commonJS({ + "../../node_modules/.pnpm/agentkeepalive@4.1.4/node_modules/agentkeepalive/lib/constants.js"(exports2, module2) { + "use strict"; + module2.exports = { + CURRENT_ID: Symbol("agentkeepalive#currentId"), + CREATE_ID: Symbol("agentkeepalive#createId"), + INIT_SOCKET: Symbol("agentkeepalive#initSocket"), + CREATE_HTTPS_CONNECTION: Symbol("agentkeepalive#createHttpsConnection"), + SOCKET_CREATED_TIME: Symbol("agentkeepalive#socketCreatedTime"), + SOCKET_NAME: Symbol("agentkeepalive#socketName"), + SOCKET_REQUEST_COUNT: Symbol("agentkeepalive#socketRequestCount"), + SOCKET_REQUEST_FINISHED_COUNT: Symbol("agentkeepalive#socketRequestFinishedCount") + }; + } +}); + +// ../../node_modules/.pnpm/agentkeepalive@4.1.4/node_modules/agentkeepalive/lib/agent.js +var require_agent = __commonJS({ + "../../node_modules/.pnpm/agentkeepalive@4.1.4/node_modules/agentkeepalive/lib/agent.js"(exports2, module2) { + "use strict"; + var OriginalAgent = require("http").Agent; + var ms = require_humanize_ms(); + var debug = require_src()("agentkeepalive"); + var deprecate2 = require_depd()("agentkeepalive"); + var { + INIT_SOCKET, + CURRENT_ID, + CREATE_ID, + SOCKET_CREATED_TIME, + SOCKET_NAME, + SOCKET_REQUEST_COUNT, + SOCKET_REQUEST_FINISHED_COUNT + } = require_constants7(); + var defaultTimeoutListenerCount = 1; + var majorVersion = parseInt(process.version.split(".", 1)[0].substring(1)); + if (majorVersion >= 11 && majorVersion <= 12) { + defaultTimeoutListenerCount = 2; + } else if (majorVersion >= 13) { + defaultTimeoutListenerCount = 3; + } + var Agent = class extends OriginalAgent { + constructor(options) { + options = options || {}; + options.keepAlive = options.keepAlive !== false; + if (options.freeSocketTimeout === void 0) { + options.freeSocketTimeout = 15e3; + } + if (options.keepAliveTimeout) { + deprecate2("options.keepAliveTimeout is deprecated, please use options.freeSocketTimeout instead"); + options.freeSocketTimeout = options.keepAliveTimeout; + delete options.keepAliveTimeout; + } + if (options.freeSocketKeepAliveTimeout) { + deprecate2("options.freeSocketKeepAliveTimeout is deprecated, please use options.freeSocketTimeout instead"); + options.freeSocketTimeout = options.freeSocketKeepAliveTimeout; + delete options.freeSocketKeepAliveTimeout; + } + if (options.timeout === void 0) { + options.timeout = Math.max(options.freeSocketTimeout * 2, 3e4); + } + options.timeout = ms(options.timeout); + options.freeSocketTimeout = ms(options.freeSocketTimeout); + options.socketActiveTTL = options.socketActiveTTL ? ms(options.socketActiveTTL) : 0; + super(options); + this[CURRENT_ID] = 0; + this.createSocketCount = 0; + this.createSocketCountLastCheck = 0; + this.createSocketErrorCount = 0; + this.createSocketErrorCountLastCheck = 0; + this.closeSocketCount = 0; + this.closeSocketCountLastCheck = 0; + this.errorSocketCount = 0; + this.errorSocketCountLastCheck = 0; + this.requestCount = 0; + this.requestCountLastCheck = 0; + this.timeoutSocketCount = 0; + this.timeoutSocketCountLastCheck = 0; + this.on("free", (socket) => { + const timeout = this.calcSocketTimeout(socket); + if (timeout > 0 && socket.timeout !== timeout) { + socket.setTimeout(timeout); + } + }); + } + get freeSocketKeepAliveTimeout() { + deprecate2("agent.freeSocketKeepAliveTimeout is deprecated, please use agent.options.freeSocketTimeout instead"); + return this.options.freeSocketTimeout; + } + get timeout() { + deprecate2("agent.timeout is deprecated, please use agent.options.timeout instead"); + return this.options.timeout; + } + get socketActiveTTL() { + deprecate2("agent.socketActiveTTL is deprecated, please use agent.options.socketActiveTTL instead"); + return this.options.socketActiveTTL; + } + calcSocketTimeout(socket) { + let freeSocketTimeout = this.options.freeSocketTimeout; + const socketActiveTTL = this.options.socketActiveTTL; + if (socketActiveTTL) { + const aliveTime = Date.now() - socket[SOCKET_CREATED_TIME]; + const diff = socketActiveTTL - aliveTime; + if (diff <= 0) { + return diff; + } + if (freeSocketTimeout && diff < freeSocketTimeout) { + freeSocketTimeout = diff; + } + } + if (freeSocketTimeout) { + const customFreeSocketTimeout = socket.freeSocketTimeout || socket.freeSocketKeepAliveTimeout; + return customFreeSocketTimeout || freeSocketTimeout; + } + } + keepSocketAlive(socket) { + const result = super.keepSocketAlive(socket); + if (!result) + return result; + const customTimeout = this.calcSocketTimeout(socket); + if (typeof customTimeout === "undefined") { + return true; + } + if (customTimeout <= 0) { + debug("%s(requests: %s, finished: %s) free but need to destroy by TTL, request count %s, diff is %s", socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], customTimeout); + return false; + } + if (socket.timeout !== customTimeout) { + socket.setTimeout(customTimeout); + } + return true; + } + reuseSocket(...args2) { + super.reuseSocket(...args2); + const socket = args2[0]; + const req = args2[1]; + req.reusedSocket = true; + const agentTimeout = this.options.timeout; + if (getSocketTimeout(socket) !== agentTimeout) { + socket.setTimeout(agentTimeout); + debug("%s reset timeout to %sms", socket[SOCKET_NAME], agentTimeout); + } + socket[SOCKET_REQUEST_COUNT]++; + debug("%s(requests: %s, finished: %s) reuse on addRequest, timeout %sms", socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], getSocketTimeout(socket)); + } + [CREATE_ID]() { + const id = this[CURRENT_ID]++; + if (this[CURRENT_ID] === Number.MAX_SAFE_INTEGER) + this[CURRENT_ID] = 0; + return id; + } + [INIT_SOCKET](socket, options) { + if (options.timeout) { + const timeout = getSocketTimeout(socket); + if (!timeout) { + socket.setTimeout(options.timeout); + } + } + if (this.options.keepAlive) { + socket.setNoDelay(true); + } + this.createSocketCount++; + if (this.options.socketActiveTTL) { + socket[SOCKET_CREATED_TIME] = Date.now(); + } + socket[SOCKET_NAME] = `sock[${this[CREATE_ID]()}#${options._agentKey}]`.split("-----BEGIN", 1)[0]; + socket[SOCKET_REQUEST_COUNT] = 1; + socket[SOCKET_REQUEST_FINISHED_COUNT] = 0; + installListeners(this, socket, options); + } + createConnection(options, oncreate) { + let called = false; + const onNewCreate = (err, socket) => { + if (called) + return; + called = true; + if (err) { + this.createSocketErrorCount++; + return oncreate(err); + } + this[INIT_SOCKET](socket, options); + oncreate(err, socket); + }; + const newSocket = super.createConnection(options, onNewCreate); + if (newSocket) + onNewCreate(null, newSocket); + } + get statusChanged() { + const changed = this.createSocketCount !== this.createSocketCountLastCheck || this.createSocketErrorCount !== this.createSocketErrorCountLastCheck || this.closeSocketCount !== this.closeSocketCountLastCheck || this.errorSocketCount !== this.errorSocketCountLastCheck || this.timeoutSocketCount !== this.timeoutSocketCountLastCheck || this.requestCount !== this.requestCountLastCheck; + if (changed) { + this.createSocketCountLastCheck = this.createSocketCount; + this.createSocketErrorCountLastCheck = this.createSocketErrorCount; + this.closeSocketCountLastCheck = this.closeSocketCount; + this.errorSocketCountLastCheck = this.errorSocketCount; + this.timeoutSocketCountLastCheck = this.timeoutSocketCount; + this.requestCountLastCheck = this.requestCount; + } + return changed; + } + getCurrentStatus() { + return { + createSocketCount: this.createSocketCount, + createSocketErrorCount: this.createSocketErrorCount, + closeSocketCount: this.closeSocketCount, + errorSocketCount: this.errorSocketCount, + timeoutSocketCount: this.timeoutSocketCount, + requestCount: this.requestCount, + freeSockets: inspect(this.freeSockets), + sockets: inspect(this.sockets), + requests: inspect(this.requests) + }; + } + }; + function getSocketTimeout(socket) { + return socket.timeout || socket._idleTimeout; + } + function installListeners(agent, socket, options) { + debug("%s create, timeout %sms", socket[SOCKET_NAME], getSocketTimeout(socket)); + function onFree() { + if (!socket._httpMessage && socket[SOCKET_REQUEST_COUNT] === 1) + return; + socket[SOCKET_REQUEST_FINISHED_COUNT]++; + agent.requestCount++; + debug("%s(requests: %s, finished: %s) free", socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]); + const name = agent.getName(options); + if (socket.writable && agent.requests[name] && agent.requests[name].length) { + socket[SOCKET_REQUEST_COUNT]++; + debug("%s(requests: %s, finished: %s) will be reuse on agent free event", socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]); + } + } + socket.on("free", onFree); + function onClose(isError) { + debug("%s(requests: %s, finished: %s) close, isError: %s", socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], isError); + agent.closeSocketCount++; + } + socket.on("close", onClose); + function onTimeout() { + const listenerCount = socket.listeners("timeout").length; + const timeout = getSocketTimeout(socket); + const req = socket._httpMessage; + const reqTimeoutListenerCount = req && req.listeners("timeout").length || 0; + debug("%s(requests: %s, finished: %s) timeout after %sms, listeners %s, defaultTimeoutListenerCount %s, hasHttpRequest %s, HttpRequest timeoutListenerCount %s", socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], timeout, listenerCount, defaultTimeoutListenerCount, !!req, reqTimeoutListenerCount); + if (debug.enabled) { + debug("timeout listeners: %s", socket.listeners("timeout").map((f) => f.name).join(", ")); + } + agent.timeoutSocketCount++; + const name = agent.getName(options); + if (agent.freeSockets[name] && agent.freeSockets[name].indexOf(socket) !== -1) { + socket.destroy(); + agent.removeSocket(socket, options); + debug("%s is free, destroy quietly", socket[SOCKET_NAME]); + } else { + if (reqTimeoutListenerCount === 0) { + const error = new Error("Socket timeout"); + error.code = "ERR_SOCKET_TIMEOUT"; + error.timeout = timeout; + socket.destroy(error); + agent.removeSocket(socket, options); + debug("%s destroy with timeout error", socket[SOCKET_NAME]); + } + } + } + socket.on("timeout", onTimeout); + function onError(err) { + const listenerCount = socket.listeners("error").length; + debug("%s(requests: %s, finished: %s) error: %s, listenerCount: %s", socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], err, listenerCount); + agent.errorSocketCount++; + if (listenerCount === 1) { + debug("%s emit uncaught error event", socket[SOCKET_NAME]); + socket.removeListener("error", onError); + socket.emit("error", err); + } + } + socket.on("error", onError); + function onRemove() { + debug("%s(requests: %s, finished: %s) agentRemove", socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT]); + socket.removeListener("close", onClose); + socket.removeListener("error", onError); + socket.removeListener("free", onFree); + socket.removeListener("timeout", onTimeout); + socket.removeListener("agentRemove", onRemove); + } + socket.on("agentRemove", onRemove); + } + module2.exports = Agent; + function inspect(obj) { + const res = {}; + for (const key in obj) { + res[key] = obj[key].length; + } + return res; + } + } +}); + +// ../../node_modules/.pnpm/agentkeepalive@4.1.4/node_modules/agentkeepalive/lib/https_agent.js +var require_https_agent = __commonJS({ + "../../node_modules/.pnpm/agentkeepalive@4.1.4/node_modules/agentkeepalive/lib/https_agent.js"(exports2, module2) { + "use strict"; + var OriginalHttpsAgent = require("https").Agent; + var HttpAgent = require_agent(); + var { + INIT_SOCKET, + CREATE_HTTPS_CONNECTION + } = require_constants7(); + var HttpsAgent = class extends HttpAgent { + constructor(options) { + super(options); + this.defaultPort = 443; + this.protocol = "https:"; + this.maxCachedSessions = this.options.maxCachedSessions; + if (this.maxCachedSessions === void 0) { + this.maxCachedSessions = 100; + } + this._sessionCache = { + map: {}, + list: [] + }; + } + createConnection(options) { + const socket = this[CREATE_HTTPS_CONNECTION](options); + this[INIT_SOCKET](socket, options); + return socket; + } + }; + HttpsAgent.prototype[CREATE_HTTPS_CONNECTION] = OriginalHttpsAgent.prototype.createConnection; + [ + "getName", + "_getSession", + "_cacheSession", + "_evictSession" + ].forEach(function(method) { + if (typeof OriginalHttpsAgent.prototype[method] === "function") { + HttpsAgent.prototype[method] = OriginalHttpsAgent.prototype[method]; + } + }); + module2.exports = HttpsAgent; + } +}); + +// ../../node_modules/.pnpm/agentkeepalive@4.1.4/node_modules/agentkeepalive/index.js +var require_agentkeepalive = __commonJS({ + "../../node_modules/.pnpm/agentkeepalive@4.1.4/node_modules/agentkeepalive/index.js"(exports2, module2) { + "use strict"; + module2.exports = require_agent(); + module2.exports.HttpsAgent = require_https_agent(); + module2.exports.constants = require_constants7(); + } +}); + +// ../../node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/dist/index.js +var require_dist3 = __commonJS({ + "../../node_modules/.pnpm/@tootallnate+once@1.1.2/node_modules/@tootallnate/once/dist/index.js"(exports2, module2) { + "use strict"; + function noop() { + } + function once(emitter, name) { + const o = once.spread(emitter, name); + const r = o.then((args2) => args2[0]); + r.cancel = o.cancel; + return r; + } + (function(once2) { + function spread(emitter, name) { + let c = null; + const p = new Promise((resolve, reject) => { + function cancel() { + emitter.removeListener(name, onEvent); + emitter.removeListener("error", onError); + p.cancel = noop; + } + function onEvent(...args2) { + cancel(); + resolve(args2); + } + function onError(err) { + cancel(); + reject(err); + } + c = cancel; + emitter.on(name, onEvent); + emitter.on("error", onError); + }); + if (!c) { + throw new TypeError("Could not get `cancel()` function"); + } + p.cancel = c; + return p; + } + once2.spread = spread; + })(once || (once = {})); + module2.exports = once; + } +}); + +// ../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.js +var require_promisify = __commonJS({ + "../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function promisify(fn2) { + return function(req, opts) { + return new Promise((resolve, reject) => { + fn2.call(this, req, opts, (err, rtn) => { + if (err) { + reject(err); + } else { + resolve(rtn); + } + }); + }); + }; + } + exports2.default = promisify; + } +}); + +// ../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js +var require_src3 = __commonJS({ + "../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js"(exports2, module2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + var events_1 = require("events"); + var debug_1 = __importDefault(require_src()); + var promisify_1 = __importDefault(require_promisify()); + var debug = debug_1.default("agent-base"); + function isAgent(v) { + return Boolean(v) && typeof v.addRequest === "function"; + } + function isSecureEndpoint() { + const { stack: stack2 } = new Error(); + if (typeof stack2 !== "string") + return false; + return stack2.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1); + } + function createAgent(callback, opts) { + return new createAgent.Agent(callback, opts); + } + (function(createAgent2) { + class Agent extends events_1.EventEmitter { + constructor(callback, _opts) { + super(); + let opts = _opts; + if (typeof callback === "function") { + this.callback = callback; + } else if (callback) { + opts = callback; + } + this.timeout = null; + if (opts && typeof opts.timeout === "number") { + this.timeout = opts.timeout; + } + this.maxFreeSockets = 1; + this.maxSockets = 1; + this.maxTotalSockets = Infinity; + this.sockets = {}; + this.freeSockets = {}; + this.requests = {}; + this.options = {}; + } + get defaultPort() { + if (typeof this.explicitDefaultPort === "number") { + return this.explicitDefaultPort; + } + return isSecureEndpoint() ? 443 : 80; + } + set defaultPort(v) { + this.explicitDefaultPort = v; + } + get protocol() { + if (typeof this.explicitProtocol === "string") { + return this.explicitProtocol; + } + return isSecureEndpoint() ? "https:" : "http:"; + } + set protocol(v) { + this.explicitProtocol = v; + } + callback(req, opts, fn2) { + throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`'); + } + addRequest(req, _opts) { + const opts = Object.assign({}, _opts); + if (typeof opts.secureEndpoint !== "boolean") { + opts.secureEndpoint = isSecureEndpoint(); + } + if (opts.host == null) { + opts.host = "localhost"; + } + if (opts.port == null) { + opts.port = opts.secureEndpoint ? 443 : 80; + } + if (opts.protocol == null) { + opts.protocol = opts.secureEndpoint ? "https:" : "http:"; + } + if (opts.host && opts.path) { + delete opts.path; + } + delete opts.agent; + delete opts.hostname; + delete opts._defaultAgent; + delete opts.defaultPort; + delete opts.createConnection; + req._last = true; + req.shouldKeepAlive = false; + let timedOut = false; + let timeoutId = null; + const timeoutMs = opts.timeout || this.timeout; + const onerror = (err) => { + if (req._hadError) + return; + req.emit("error", err); + req._hadError = true; + }; + const ontimeout = () => { + timeoutId = null; + timedOut = true; + const err = new Error(`A "socket" was not created for HTTP request before ${timeoutMs}ms`); + err.code = "ETIMEOUT"; + onerror(err); + }; + const callbackError = (err) => { + if (timedOut) + return; + if (timeoutId !== null) { + clearTimeout(timeoutId); + timeoutId = null; + } + onerror(err); + }; + const onsocket = (socket) => { + if (timedOut) + return; + if (timeoutId != null) { + clearTimeout(timeoutId); + timeoutId = null; + } + if (isAgent(socket)) { + debug("Callback returned another Agent instance %o", socket.constructor.name); + socket.addRequest(req, opts); + return; + } + if (socket) { + socket.once("free", () => { + this.freeSocket(socket, opts); + }); + req.onSocket(socket); + return; + } + const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``); + onerror(err); + }; + if (typeof this.callback !== "function") { + onerror(new Error("`callback` is not defined")); + return; + } + if (!this.promisifiedCallback) { + if (this.callback.length >= 3) { + debug("Converting legacy callback function to promise"); + this.promisifiedCallback = promisify_1.default(this.callback); + } else { + this.promisifiedCallback = this.callback; + } + } + if (typeof timeoutMs === "number" && timeoutMs > 0) { + timeoutId = setTimeout(ontimeout, timeoutMs); + } + if ("port" in opts && typeof opts.port !== "number") { + opts.port = Number(opts.port); + } + try { + debug("Resolving socket for %o request: %o", opts.protocol, `${req.method} ${req.path}`); + Promise.resolve(this.promisifiedCallback(req, opts)).then(onsocket, callbackError); + } catch (err) { + Promise.reject(err).catch(callbackError); + } + } + freeSocket(socket, opts) { + debug("Freeing socket %o %o", socket.constructor.name, opts); + socket.destroy(); + } + destroy() { + debug("Destroying agent %o", this.constructor.name); + } + } + createAgent2.Agent = Agent; + createAgent2.prototype = createAgent2.Agent.prototype; + })(createAgent || (createAgent = {})); + module2.exports = createAgent; + } +}); + +// ../../node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/agent.js +var require_agent2 = __commonJS({ + "../../node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/agent.js"(exports2) { + "use strict"; + var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var net_1 = __importDefault(require("net")); + var tls_1 = __importDefault(require("tls")); + var url_1 = __importDefault(require("url")); + var debug_1 = __importDefault(require_src()); + var once_1 = __importDefault(require_dist3()); + var agent_base_1 = require_src3(); + var debug = debug_1.default("http-proxy-agent"); + function isHTTPS(protocol) { + return typeof protocol === "string" ? /^https:?$/i.test(protocol) : false; + } + var HttpProxyAgent = class extends agent_base_1.Agent { + constructor(_opts) { + let opts; + if (typeof _opts === "string") { + opts = url_1.default.parse(_opts); + } else { + opts = _opts; + } + if (!opts) { + throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!"); + } + debug("Creating new HttpProxyAgent instance: %o", opts); + super(opts); + const proxy = Object.assign({}, opts); + this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol); + proxy.host = proxy.hostname || proxy.host; + if (typeof proxy.port === "string") { + proxy.port = parseInt(proxy.port, 10); + } + if (!proxy.port && proxy.host) { + proxy.port = this.secureProxy ? 443 : 80; + } + if (proxy.host && proxy.path) { + delete proxy.path; + delete proxy.pathname; + } + this.proxy = proxy; + } + callback(req, opts) { + return __awaiter(this, void 0, void 0, function* () { + const { proxy, secureProxy } = this; + const parsed = url_1.default.parse(req.path); + if (!parsed.protocol) { + parsed.protocol = "http:"; + } + if (!parsed.hostname) { + parsed.hostname = opts.hostname || opts.host || null; + } + if (parsed.port == null && typeof opts.port) { + parsed.port = String(opts.port); + } + if (parsed.port === "80") { + delete parsed.port; + } + req.path = url_1.default.format(parsed); + if (proxy.auth) { + req.setHeader("Proxy-Authorization", `Basic ${Buffer.from(proxy.auth).toString("base64")}`); + } + let socket; + if (secureProxy) { + debug("Creating `tls.Socket`: %o", proxy); + socket = tls_1.default.connect(proxy); + } else { + debug("Creating `net.Socket`: %o", proxy); + socket = net_1.default.connect(proxy); + } + if (req._header) { + let first; + let endOfHeaders; + debug("Regenerating stored HTTP header string for request"); + req._header = null; + req._implicitHeader(); + if (req.output && req.output.length > 0) { + debug("Patching connection write() output buffer with updated header"); + first = req.output[0]; + endOfHeaders = first.indexOf("\r\n\r\n") + 4; + req.output[0] = req._header + first.substring(endOfHeaders); + debug("Output buffer: %o", req.output); + } else if (req.outputData && req.outputData.length > 0) { + debug("Patching connection write() output buffer with updated header"); + first = req.outputData[0].data; + endOfHeaders = first.indexOf("\r\n\r\n") + 4; + req.outputData[0].data = req._header + first.substring(endOfHeaders); + debug("Output buffer: %o", req.outputData[0].data); + } + } + yield once_1.default(socket, "connect"); + return socket; + }); + } + }; + exports2.default = HttpProxyAgent; + } +}); + +// ../../node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/index.js +var require_dist4 = __commonJS({ + "../../node_modules/.pnpm/http-proxy-agent@4.0.1/node_modules/http-proxy-agent/dist/index.js"(exports2, module2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + var agent_1 = __importDefault(require_agent2()); + function createHttpProxyAgent(opts) { + return new agent_1.default(opts); + } + (function(createHttpProxyAgent2) { + createHttpProxyAgent2.HttpProxyAgent = agent_1.default; + createHttpProxyAgent2.prototype = agent_1.default.prototype; + })(createHttpProxyAgent || (createHttpProxyAgent = {})); + module2.exports = createHttpProxyAgent; + } +}); + +// ../../node_modules/.pnpm/agent-base@4.3.0/node_modules/agent-base/patch-core.js +var require_patch_core = __commonJS({ + "../../node_modules/.pnpm/agent-base@4.3.0/node_modules/agent-base/patch-core.js"() { + "use strict"; + var url = require("url"); + var https = require("https"); + var patchMarker = "__agent_base_https_request_patched__"; + if (!https.request[patchMarker]) { + https.request = function(request) { + return function(_options, cb) { + let options; + if (typeof _options === "string") { + options = url.parse(_options); + } else { + options = Object.assign({}, _options); + } + if (options.port == null) { + options.port = 443; + } + options.secureEndpoint = true; + return request.call(https, options, cb); + }; + }(https.request); + https.request[patchMarker] = true; + } + https.get = function(_url, _options, cb) { + let options; + if (typeof _url === "string" && _options && typeof _options !== "function") { + options = Object.assign({}, url.parse(_url), _options); + } else if (!_options && !cb) { + options = _url; + } else if (!cb) { + options = _url; + cb = _options; + } + const req = https.request(options, cb); + req.end(); + return req; + }; + } +}); + +// ../../node_modules/.pnpm/es6-promise@4.2.8/node_modules/es6-promise/dist/es6-promise.js +var require_es6_promise = __commonJS({ + "../../node_modules/.pnpm/es6-promise@4.2.8/node_modules/es6-promise/dist/es6-promise.js"(exports2, module2) { + (function(global2, factory) { + typeof exports2 === "object" && typeof module2 !== "undefined" ? module2.exports = factory() : typeof define === "function" && define.amd ? define(factory) : global2.ES6Promise = factory(); + })(exports2, function() { + "use strict"; + function objectOrFunction(x) { + var type = typeof x; + return x !== null && (type === "object" || type === "function"); + } + function isFunction(x) { + return typeof x === "function"; + } + var _isArray = void 0; + if (Array.isArray) { + _isArray = Array.isArray; + } else { + _isArray = function(x) { + return Object.prototype.toString.call(x) === "[object Array]"; + }; + } + var isArray = _isArray; + var len = 0; + var vertxNext = void 0; + var customSchedulerFn = void 0; + var asap = function asap2(callback, arg) { + queue[len] = callback; + queue[len + 1] = arg; + len += 2; + if (len === 2) { + if (customSchedulerFn) { + customSchedulerFn(flush); + } else { + scheduleFlush(); + } + } + }; + function setScheduler(scheduleFn) { + customSchedulerFn = scheduleFn; + } + function setAsap(asapFn) { + asap = asapFn; + } + var browserWindow = typeof window !== "undefined" ? window : void 0; + var browserGlobal = browserWindow || {}; + var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver; + var isNode = typeof self === "undefined" && typeof process !== "undefined" && {}.toString.call(process) === "[object process]"; + var isWorker = typeof Uint8ClampedArray !== "undefined" && typeof importScripts !== "undefined" && typeof MessageChannel !== "undefined"; + function useNextTick() { + return function() { + return process.nextTick(flush); + }; + } + function useVertxTimer() { + if (typeof vertxNext !== "undefined") { + return function() { + vertxNext(flush); + }; + } + return useSetTimeout(); + } + function useMutationObserver() { + var iterations = 0; + var observer = new BrowserMutationObserver(flush); + var node = document.createTextNode(""); + observer.observe(node, { characterData: true }); + return function() { + node.data = iterations = ++iterations % 2; + }; + } + function useMessageChannel() { + var channel = new MessageChannel(); + channel.port1.onmessage = flush; + return function() { + return channel.port2.postMessage(0); + }; + } + function useSetTimeout() { + var globalSetTimeout = setTimeout; + return function() { + return globalSetTimeout(flush, 1); + }; + } + var queue = new Array(1e3); + function flush() { + for (var i = 0; i < len; i += 2) { + var callback = queue[i]; + var arg = queue[i + 1]; + callback(arg); + queue[i] = void 0; + queue[i + 1] = void 0; + } + len = 0; + } + function attemptVertx() { + try { + var vertx = Function("return this")().require("vertx"); + vertxNext = vertx.runOnLoop || vertx.runOnContext; + return useVertxTimer(); + } catch (e) { + return useSetTimeout(); + } + } + var scheduleFlush = void 0; + if (isNode) { + scheduleFlush = useNextTick(); + } else if (BrowserMutationObserver) { + scheduleFlush = useMutationObserver(); + } else if (isWorker) { + scheduleFlush = useMessageChannel(); + } else if (browserWindow === void 0 && typeof require === "function") { + scheduleFlush = attemptVertx(); + } else { + scheduleFlush = useSetTimeout(); + } + function then(onFulfillment, onRejection) { + var parent = this; + var child = new this.constructor(noop); + if (child[PROMISE_ID] === void 0) { + makePromise(child); + } + var _state = parent._state; + if (_state) { + var callback = arguments[_state - 1]; + asap(function() { + return invokeCallback(_state, child, callback, parent._result); + }); + } else { + subscribe(parent, child, onFulfillment, onRejection); + } + return child; + } + function resolve$1(object) { + var Constructor = this; + if (object && typeof object === "object" && object.constructor === Constructor) { + return object; + } + var promise = new Constructor(noop); + resolve(promise, object); + return promise; + } + var PROMISE_ID = Math.random().toString(36).substring(2); + function noop() { + } + var PENDING = void 0; + var FULFILLED = 1; + var REJECTED = 2; + function selfFulfillment() { + return new TypeError("You cannot resolve a promise with itself"); + } + function cannotReturnOwn() { + return new TypeError("A promises callback cannot return that same promise."); + } + function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) { + try { + then$$1.call(value, fulfillmentHandler, rejectionHandler); + } catch (e) { + return e; + } + } + function handleForeignThenable(promise, thenable, then$$1) { + asap(function(promise2) { + var sealed = false; + var error = tryThen(then$$1, thenable, function(value) { + if (sealed) { + return; + } + sealed = true; + if (thenable !== value) { + resolve(promise2, value); + } else { + fulfill(promise2, value); + } + }, function(reason) { + if (sealed) { + return; + } + sealed = true; + reject(promise2, reason); + }, "Settle: " + (promise2._label || " unknown promise")); + if (!sealed && error) { + sealed = true; + reject(promise2, error); + } + }, promise); + } + function handleOwnThenable(promise, thenable) { + if (thenable._state === FULFILLED) { + fulfill(promise, thenable._result); + } else if (thenable._state === REJECTED) { + reject(promise, thenable._result); + } else { + subscribe(thenable, void 0, function(value) { + return resolve(promise, value); + }, function(reason) { + return reject(promise, reason); + }); + } + } + function handleMaybeThenable(promise, maybeThenable, then$$1) { + if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) { + handleOwnThenable(promise, maybeThenable); + } else { + if (then$$1 === void 0) { + fulfill(promise, maybeThenable); + } else if (isFunction(then$$1)) { + handleForeignThenable(promise, maybeThenable, then$$1); + } else { + fulfill(promise, maybeThenable); + } + } + } + function resolve(promise, value) { + if (promise === value) { + reject(promise, selfFulfillment()); + } else if (objectOrFunction(value)) { + var then$$1 = void 0; + try { + then$$1 = value.then; + } catch (error) { + reject(promise, error); + return; + } + handleMaybeThenable(promise, value, then$$1); + } else { + fulfill(promise, value); + } + } + function publishRejection(promise) { + if (promise._onerror) { + promise._onerror(promise._result); + } + publish(promise); + } + function fulfill(promise, value) { + if (promise._state !== PENDING) { + return; + } + promise._result = value; + promise._state = FULFILLED; + if (promise._subscribers.length !== 0) { + asap(publish, promise); + } + } + function reject(promise, reason) { + if (promise._state !== PENDING) { + return; + } + promise._state = REJECTED; + promise._result = reason; + asap(publishRejection, promise); + } + function subscribe(parent, child, onFulfillment, onRejection) { + var _subscribers = parent._subscribers; + var length = _subscribers.length; + parent._onerror = null; + _subscribers[length] = child; + _subscribers[length + FULFILLED] = onFulfillment; + _subscribers[length + REJECTED] = onRejection; + if (length === 0 && parent._state) { + asap(publish, parent); + } + } + function publish(promise) { + var subscribers = promise._subscribers; + var settled = promise._state; + if (subscribers.length === 0) { + return; + } + var child = void 0, callback = void 0, detail = promise._result; + for (var i = 0; i < subscribers.length; i += 3) { + child = subscribers[i]; + callback = subscribers[i + settled]; + if (child) { + invokeCallback(settled, child, callback, detail); + } else { + callback(detail); + } + } + promise._subscribers.length = 0; + } + function invokeCallback(settled, promise, callback, detail) { + var hasCallback = isFunction(callback), value = void 0, error = void 0, succeeded = true; + if (hasCallback) { + try { + value = callback(detail); + } catch (e) { + succeeded = false; + error = e; + } + if (promise === value) { + reject(promise, cannotReturnOwn()); + return; + } + } else { + value = detail; + } + if (promise._state !== PENDING) { + } else if (hasCallback && succeeded) { + resolve(promise, value); + } else if (succeeded === false) { + reject(promise, error); + } else if (settled === FULFILLED) { + fulfill(promise, value); + } else if (settled === REJECTED) { + reject(promise, value); + } + } + function initializePromise(promise, resolver) { + try { + resolver(function resolvePromise(value) { + resolve(promise, value); + }, function rejectPromise(reason) { + reject(promise, reason); + }); + } catch (e) { + reject(promise, e); + } + } + var id = 0; + function nextId() { + return id++; + } + function makePromise(promise) { + promise[PROMISE_ID] = id++; + promise._state = void 0; + promise._result = void 0; + promise._subscribers = []; + } + function validationError() { + return new Error("Array Methods must be provided an Array"); + } + var Enumerator = function() { + function Enumerator2(Constructor, input) { + this._instanceConstructor = Constructor; + this.promise = new Constructor(noop); + if (!this.promise[PROMISE_ID]) { + makePromise(this.promise); + } + if (isArray(input)) { + this.length = input.length; + this._remaining = input.length; + this._result = new Array(this.length); + if (this.length === 0) { + fulfill(this.promise, this._result); + } else { + this.length = this.length || 0; + this._enumerate(input); + if (this._remaining === 0) { + fulfill(this.promise, this._result); + } + } + } else { + reject(this.promise, validationError()); + } + } + Enumerator2.prototype._enumerate = function _enumerate(input) { + for (var i = 0; this._state === PENDING && i < input.length; i++) { + this._eachEntry(input[i], i); + } + }; + Enumerator2.prototype._eachEntry = function _eachEntry(entry, i) { + var c = this._instanceConstructor; + var resolve$$1 = c.resolve; + if (resolve$$1 === resolve$1) { + var _then = void 0; + var error = void 0; + var didError = false; + try { + _then = entry.then; + } catch (e) { + didError = true; + error = e; + } + if (_then === then && entry._state !== PENDING) { + this._settledAt(entry._state, i, entry._result); + } else if (typeof _then !== "function") { + this._remaining--; + this._result[i] = entry; + } else if (c === Promise$1) { + var promise = new c(noop); + if (didError) { + reject(promise, error); + } else { + handleMaybeThenable(promise, entry, _then); + } + this._willSettleAt(promise, i); + } else { + this._willSettleAt(new c(function(resolve$$12) { + return resolve$$12(entry); + }), i); + } + } else { + this._willSettleAt(resolve$$1(entry), i); + } + }; + Enumerator2.prototype._settledAt = function _settledAt(state, i, value) { + var promise = this.promise; + if (promise._state === PENDING) { + this._remaining--; + if (state === REJECTED) { + reject(promise, value); + } else { + this._result[i] = value; + } + } + if (this._remaining === 0) { + fulfill(promise, this._result); + } + }; + Enumerator2.prototype._willSettleAt = function _willSettleAt(promise, i) { + var enumerator = this; + subscribe(promise, void 0, function(value) { + return enumerator._settledAt(FULFILLED, i, value); + }, function(reason) { + return enumerator._settledAt(REJECTED, i, reason); + }); + }; + return Enumerator2; + }(); + function all(entries) { + return new Enumerator(this, entries).promise; + } + function race(entries) { + var Constructor = this; + if (!isArray(entries)) { + return new Constructor(function(_, reject2) { + return reject2(new TypeError("You must pass an array to race.")); + }); + } else { + return new Constructor(function(resolve2, reject2) { + var length = entries.length; + for (var i = 0; i < length; i++) { + Constructor.resolve(entries[i]).then(resolve2, reject2); + } + }); + } + } + function reject$1(reason) { + var Constructor = this; + var promise = new Constructor(noop); + reject(promise, reason); + return promise; + } + function needsResolver() { + throw new TypeError("You must pass a resolver function as the first argument to the promise constructor"); + } + function needsNew() { + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); + } + var Promise$1 = function() { + function Promise2(resolver) { + this[PROMISE_ID] = nextId(); + this._result = this._state = void 0; + this._subscribers = []; + if (noop !== resolver) { + typeof resolver !== "function" && needsResolver(); + this instanceof Promise2 ? initializePromise(this, resolver) : needsNew(); + } + } + Promise2.prototype.catch = function _catch(onRejection) { + return this.then(null, onRejection); + }; + Promise2.prototype.finally = function _finally(callback) { + var promise = this; + var constructor = promise.constructor; + if (isFunction(callback)) { + return promise.then(function(value) { + return constructor.resolve(callback()).then(function() { + return value; + }); + }, function(reason) { + return constructor.resolve(callback()).then(function() { + throw reason; + }); + }); + } + return promise.then(callback, callback); + }; + return Promise2; + }(); + Promise$1.prototype.then = then; + Promise$1.all = all; + Promise$1.race = race; + Promise$1.resolve = resolve$1; + Promise$1.reject = reject$1; + Promise$1._setScheduler = setScheduler; + Promise$1._setAsap = setAsap; + Promise$1._asap = asap; + function polyfill() { + var local = void 0; + if (typeof global !== "undefined") { + local = global; + } else if (typeof self !== "undefined") { + local = self; + } else { + try { + local = Function("return this")(); + } catch (e) { + throw new Error("polyfill failed because global object is unavailable in this environment"); + } + } + var P = local.Promise; + if (P) { + var promiseToString = null; + try { + promiseToString = Object.prototype.toString.call(P.resolve()); + } catch (e) { + } + if (promiseToString === "[object Promise]" && !P.cast) { + return; + } + } + local.Promise = Promise$1; + } + Promise$1.polyfill = polyfill; + Promise$1.Promise = Promise$1; + return Promise$1; + }); + } +}); + +// ../../node_modules/.pnpm/es6-promisify@5.0.0/node_modules/es6-promisify/dist/promise.js +var require_promise2 = __commonJS({ + "../../node_modules/.pnpm/es6-promisify@5.0.0/node_modules/es6-promisify/dist/promise.js"(exports2, module2) { + "use strict"; + module2.exports = function() { + "use strict"; + var globalObject = void 0; + function isFunction(x) { + return typeof x === "function"; + } + if (global !== void 0) { + globalObject = global; + } else if (window !== void 0 && window.document) { + globalObject = window; + } else { + globalObject = self; + } + var hasPromiseSupport = function() { + if (!globalObject.hasOwnProperty("Promise")) { + return false; + } + var P = globalObject.Promise; + if (!P.hasOwnProperty("resolve") || !P.hasOwnProperty("reject")) { + return false; + } + if (!P.hasOwnProperty("all") || !P.hasOwnProperty("race")) { + return false; + } + return function() { + var resolve = void 0; + var p = new globalObject.Promise(function(r) { + resolve = r; + }); + if (p) { + return isFunction(resolve); + } + return false; + }(); + }(); + if (hasPromiseSupport) { + return globalObject.Promise; + } + return require_es6_promise().Promise; + }(); + } +}); + +// ../../node_modules/.pnpm/es6-promisify@5.0.0/node_modules/es6-promisify/dist/promisify.js +var require_promisify2 = __commonJS({ + "../../node_modules/.pnpm/es6-promisify@5.0.0/node_modules/es6-promisify/dist/promisify.js"(exports2, module2) { + "use strict"; + module2.exports = function() { + "use strict"; + var ES6Promise = require_promise2(); + function thatLooksLikeAPromiseToMe(o) { + return o && typeof o.then === "function" && typeof o.catch === "function"; + } + return function promisify(original, settings) { + return function() { + for (var _len = arguments.length, args2 = Array(_len), _key = 0; _key < _len; _key++) { + args2[_key] = arguments[_key]; + } + var returnMultipleArguments = settings && settings.multiArgs; + var target = void 0; + if (settings && settings.thisArg) { + target = settings.thisArg; + } else if (settings) { + target = settings; + } + return new ES6Promise(function(resolve, reject) { + args2.push(function callback(err) { + if (err) { + return reject(err); + } + for (var _len2 = arguments.length, values = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + values[_key2 - 1] = arguments[_key2]; + } + if (!!returnMultipleArguments === false) { + return resolve(values[0]); + } + resolve(values); + }); + var response = original.apply(target, args2); + if (thatLooksLikeAPromiseToMe(response)) { + resolve(response); + } + }); + }; + }; + }(); + } +}); + +// ../../node_modules/.pnpm/agent-base@4.3.0/node_modules/agent-base/index.js +var require_agent_base = __commonJS({ + "../../node_modules/.pnpm/agent-base@4.3.0/node_modules/agent-base/index.js"(exports2, module2) { + "use strict"; + require_patch_core(); + var inherits = require("util").inherits; + var promisify = require_promisify2(); + var EventEmitter = require("events").EventEmitter; + module2.exports = Agent; + function isAgent(v) { + return v && typeof v.addRequest === "function"; + } + function Agent(callback, _opts) { + if (!(this instanceof Agent)) { + return new Agent(callback, _opts); + } + EventEmitter.call(this); + this._promisifiedCallback = false; + let opts = _opts; + if (typeof callback === "function") { + this.callback = callback; + } else if (callback) { + opts = callback; + } + this.timeout = opts && opts.timeout || null; + this.options = opts; + } + inherits(Agent, EventEmitter); + Agent.prototype.callback = function callback(req, opts) { + throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`'); + }; + Agent.prototype.addRequest = function addRequest(req, _opts) { + const ownOpts = Object.assign({}, _opts); + if (ownOpts.host == null) { + ownOpts.host = "localhost"; + } + if (ownOpts.port == null) { + ownOpts.port = ownOpts.secureEndpoint ? 443 : 80; + } + const opts = Object.assign({}, this.options, ownOpts); + if (opts.host && opts.path) { + delete opts.path; + } + delete opts.agent; + delete opts.hostname; + delete opts._defaultAgent; + delete opts.defaultPort; + delete opts.createConnection; + req._last = true; + req.shouldKeepAlive = false; + let timeout; + let timedOut = false; + const timeoutMs = this.timeout; + const freeSocket = this.freeSocket; + function onerror(err) { + if (req._hadError) + return; + req.emit("error", err); + req._hadError = true; + } + function ontimeout() { + timeout = null; + timedOut = true; + const err = new Error('A "socket" was not created for HTTP request before ' + timeoutMs + "ms"); + err.code = "ETIMEOUT"; + onerror(err); + } + function callbackError(err) { + if (timedOut) + return; + if (timeout != null) { + clearTimeout(timeout); + timeout = null; + } + onerror(err); + } + function onsocket(socket) { + if (timedOut) + return; + if (timeout != null) { + clearTimeout(timeout); + timeout = null; + } + if (isAgent(socket)) { + socket.addRequest(req, opts); + } else if (socket) { + let onfree = function() { + freeSocket(socket, opts); + }; + socket.on("free", onfree); + req.onSocket(socket); + } else { + const err = new Error("no Duplex stream was returned to agent-base for `" + req.method + " " + req.path + "`"); + onerror(err); + } + } + if (!this._promisifiedCallback && this.callback.length >= 3) { + this.callback = promisify(this.callback, this); + this._promisifiedCallback = true; + } + if (timeoutMs > 0) { + timeout = setTimeout(ontimeout, timeoutMs); + } + try { + Promise.resolve(this.callback(req, opts)).then(onsocket, callbackError); + } catch (err) { + Promise.reject(err).catch(callbackError); + } + }; + Agent.prototype.freeSocket = function freeSocket(socket, opts) { + socket.destroy(); + }; + } +}); + +// ../../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/common.js +var require_common5 = __commonJS({ + "../../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/common.js"(exports2, module2) { + "use strict"; + function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require_ms2(); + Object.keys(env).forEach(function(key) { + createDebug[key] = env[key]; + }); + createDebug.instances = []; + createDebug.names = []; + createDebug.skips = []; + createDebug.formatters = {}; + function selectColor(namespace) { + var hash = 0; + for (var i = 0; i < namespace.length; i++) { + hash = (hash << 5) - hash + namespace.charCodeAt(i); + hash |= 0; + } + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + function createDebug(namespace) { + var prevTime; + function debug() { + if (!debug.enabled) { + return; + } + for (var _len = arguments.length, args2 = new Array(_len), _key = 0; _key < _len; _key++) { + args2[_key] = arguments[_key]; + } + var self2 = debug; + var curr = Number(new Date()); + var ms = curr - (prevTime || curr); + self2.diff = ms; + self2.prev = prevTime; + self2.curr = curr; + prevTime = curr; + args2[0] = createDebug.coerce(args2[0]); + if (typeof args2[0] !== "string") { + args2.unshift("%O"); + } + var index = 0; + args2[0] = args2[0].replace(/%([a-zA-Z%])/g, function(match, format) { + if (match === "%%") { + return match; + } + index++; + var formatter = createDebug.formatters[format]; + if (typeof formatter === "function") { + var val = args2[index]; + match = formatter.call(self2, val); + args2.splice(index, 1); + index--; + } + return match; + }); + createDebug.formatArgs.call(self2, args2); + var logFn = self2.log || createDebug.log; + logFn.apply(self2, args2); + } + debug.namespace = namespace; + debug.enabled = createDebug.enabled(namespace); + debug.useColors = createDebug.useColors(); + debug.color = selectColor(namespace); + debug.destroy = destroy; + debug.extend = extend; + if (typeof createDebug.init === "function") { + createDebug.init(debug); + } + createDebug.instances.push(debug); + return debug; + } + function destroy() { + var index = createDebug.instances.indexOf(this); + if (index !== -1) { + createDebug.instances.splice(index, 1); + return true; + } + return false; + } + function extend(namespace, delimiter) { + return createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); + } + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.names = []; + createDebug.skips = []; + var i; + var split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); + var len = split.length; + for (i = 0; i < len; i++) { + if (!split[i]) { + continue; + } + namespaces = split[i].replace(/\*/g, ".*?"); + if (namespaces[0] === "-") { + createDebug.skips.push(new RegExp("^" + namespaces.substr(1) + "$")); + } else { + createDebug.names.push(new RegExp("^" + namespaces + "$")); + } + } + for (i = 0; i < createDebug.instances.length; i++) { + var instance = createDebug.instances[i]; + instance.enabled = createDebug.enabled(instance.namespace); + } + } + function disable() { + createDebug.enable(""); + } + function enabled(name) { + if (name[name.length - 1] === "*") { + return true; + } + var i; + var len; + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + return false; + } + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + createDebug.enable(createDebug.load()); + return createDebug; + } + module2.exports = setup; + } +}); + +// ../../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js +var require_browser2 = __commonJS({ + "../../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js"(exports2, module2) { + "use strict"; + function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof2(obj2) { + return typeof obj2; + }; + } else { + _typeof = function _typeof2(obj2) { + return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2; + }; + } + return _typeof(obj); + } + exports2.log = log2; + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.storage = localstorage(); + exports2.colors = ["#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC", "#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99", "#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC", "#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99", "#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00", "#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33", "#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300", "#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633", "#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066", "#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399", "#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00", "#FFCC33"]; + function useColors() { + if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { + return true; + } + if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); + } + function formatArgs(args2) { + args2[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args2[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); + if (!this.useColors) { + return; + } + var c = "color: " + this.color; + args2.splice(1, 0, c, "color: inherit"); + var index = 0; + var lastC = 0; + args2[0].replace(/%[a-zA-Z%]/g, function(match) { + if (match === "%%") { + return; + } + index++; + if (match === "%c") { + lastC = index; + } + }); + args2.splice(lastC, 0, c); + } + function log2() { + var _console; + return (typeof console === "undefined" ? "undefined" : _typeof(console)) === "object" && console.log && (_console = console).log.apply(_console, arguments); + } + function save(namespaces) { + try { + if (namespaces) { + exports2.storage.setItem("debug", namespaces); + } else { + exports2.storage.removeItem("debug"); + } + } catch (error) { + } + } + function load() { + var r; + try { + r = exports2.storage.getItem("debug"); + } catch (error) { + } + if (!r && typeof process !== "undefined" && "env" in process) { + r = process.env.DEBUG; + } + return r; + } + function localstorage() { + try { + return localStorage; + } catch (error) { + } + } + module2.exports = require_common5()(exports2); + var formatters = module2.exports.formatters; + formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (error) { + return "[UnexpectedJSONParseError]: " + error.message; + } + }; + } +}); + +// ../../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/node.js +var require_node3 = __commonJS({ + "../../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/node.js"(exports2, module2) { + "use strict"; + var tty = require("tty"); + var util = require("util"); + exports2.init = init; + exports2.log = log2; + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.colors = [6, 2, 3, 4, 5, 1]; + try { + supportsColor = require("supports-color"); + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports2.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221]; + } + } catch (error) { + } + var supportsColor; + exports2.inspectOpts = Object.keys(process.env).filter(function(key) { + return /^debug_/i.test(key); + }).reduce(function(obj, key) { + var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_, k) { + return k.toUpperCase(); + }); + var val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === "null") { + val = null; + } else { + val = Number(val); + } + obj[prop] = val; + return obj; + }, {}); + function useColors() { + return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd); + } + function formatArgs(args2) { + var name = this.namespace, useColors2 = this.useColors; + if (useColors2) { + var c = this.color; + var colorCode = "[3" + (c < 8 ? c : "8;5;" + c); + var prefix = " ".concat(colorCode, ";1m").concat(name, " "); + args2[0] = prefix + args2[0].split("\n").join("\n" + prefix); + args2.push(colorCode + "m+" + module2.exports.humanize(this.diff) + ""); + } else { + args2[0] = getDate() + name + " " + args2[0]; + } + } + function getDate() { + if (exports2.inspectOpts.hideDate) { + return ""; + } + return new Date().toISOString() + " "; + } + function log2() { + return process.stderr.write(util.format.apply(util, arguments) + "\n"); + } + function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + delete process.env.DEBUG; + } + } + function load() { + return process.env.DEBUG; + } + function init(debug) { + debug.inspectOpts = {}; + var keys = Object.keys(exports2.inspectOpts); + for (var i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; + } + } + module2.exports = require_common5()(exports2); + var formatters = module2.exports.formatters; + formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts).split("\n").map(function(str) { + return str.trim(); + }).join(" "); + }; + formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); + }; + } +}); + +// ../../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/index.js +var require_src4 = __commonJS({ + "../../node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/index.js"(exports2, module2) { + "use strict"; + if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { + module2.exports = require_browser2(); + } else { + module2.exports = require_node3(); + } + } +}); + +// ../../node_modules/.pnpm/https-proxy-agent@3.0.1/node_modules/https-proxy-agent/index.js +var require_https_proxy_agent = __commonJS({ + "../../node_modules/.pnpm/https-proxy-agent@3.0.1/node_modules/https-proxy-agent/index.js"(exports2, module2) { + var net = require("net"); + var tls = require("tls"); + var url = require("url"); + var assert = require("assert"); + var Agent = require_agent_base(); + var inherits = require("util").inherits; + var debug = require_src4()("https-proxy-agent"); + module2.exports = HttpsProxyAgent; + function HttpsProxyAgent(opts) { + if (!(this instanceof HttpsProxyAgent)) + return new HttpsProxyAgent(opts); + if (typeof opts == "string") + opts = url.parse(opts); + if (!opts) + throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!"); + debug("creating new HttpsProxyAgent instance: %o", opts); + Agent.call(this, opts); + var proxy = Object.assign({}, opts); + this.secureProxy = proxy.protocol ? /^https:?$/i.test(proxy.protocol) : false; + proxy.host = proxy.hostname || proxy.host; + proxy.port = +proxy.port || (this.secureProxy ? 443 : 80); + if (this.secureProxy && !("ALPNProtocols" in proxy)) { + proxy.ALPNProtocols = ["http 1.1"]; + } + if (proxy.host && proxy.path) { + delete proxy.path; + delete proxy.pathname; + } + this.proxy = proxy; + this.defaultPort = 443; + } + inherits(HttpsProxyAgent, Agent); + HttpsProxyAgent.prototype.callback = function connect(req, opts, fn2) { + var proxy = this.proxy; + var socket; + if (this.secureProxy) { + socket = tls.connect(proxy); + } else { + socket = net.connect(proxy); + } + var buffers = []; + var buffersLength = 0; + function read() { + var b = socket.read(); + if (b) + ondata(b); + else + socket.once("readable", read); + } + function cleanup() { + socket.removeListener("end", onend); + socket.removeListener("error", onerror); + socket.removeListener("close", onclose); + socket.removeListener("readable", read); + } + function onclose(err) { + debug("onclose had error %o", err); + } + function onend() { + debug("onend"); + } + function onerror(err) { + cleanup(); + fn2(err); + } + function ondata(b) { + buffers.push(b); + buffersLength += b.length; + var buffered = Buffer.concat(buffers, buffersLength); + var str = buffered.toString("ascii"); + if (!~str.indexOf("\r\n\r\n")) { + debug("have not received end of HTTP headers yet..."); + read(); + return; + } + var firstLine = str.substring(0, str.indexOf("\r\n")); + var statusCode = +firstLine.split(" ")[1]; + debug("got proxy server response: %o", firstLine); + if (statusCode == 200) { + var sock = socket; + buffers = buffered = null; + if (opts.secureEndpoint) { + debug("upgrading proxy-connected socket to TLS connection: %o", opts.host); + opts.socket = socket; + opts.servername = opts.servername || opts.host; + opts.host = null; + opts.hostname = null; + opts.port = null; + sock = tls.connect(opts); + } + cleanup(); + req.once("socket", resume); + fn2(null, sock); + } else { + cleanup(); + socket.destroy(); + socket = new net.Socket(); + socket.readable = true; + buffers = buffered; + req.once("socket", onsocket); + fn2(null, socket); + } + } + function onsocket(socket2) { + debug("replaying proxy buffer for failed request"); + assert(socket2.listenerCount("data") > 0); + socket2.push(buffers); + buffers = null; + } + socket.on("error", onerror); + socket.on("close", onclose); + socket.on("end", onend); + read(); + var hostname = opts.host + ":" + opts.port; + var msg = "CONNECT " + hostname + " HTTP/1.1\r\n"; + var headers = Object.assign({}, proxy.headers); + if (proxy.auth) { + headers["Proxy-Authorization"] = "Basic " + Buffer.from(proxy.auth).toString("base64"); + } + var host = opts.host; + if (!isDefaultPort(opts.port, opts.secureEndpoint)) { + host += ":" + opts.port; + } + headers["Host"] = host; + headers["Connection"] = "close"; + Object.keys(headers).forEach(function(name) { + msg += name + ": " + headers[name] + "\r\n"; + }); + socket.write(msg + "\r\n"); + }; + function resume(socket) { + socket.resume(); + } + function isDefaultPort(port, secure) { + return Boolean(!secure && port === 80 || secure && port === 443); + } + } +}); + +// ../../node_modules/.pnpm/ip@1.1.5/node_modules/ip/lib/ip.js +var require_ip = __commonJS({ + "../../node_modules/.pnpm/ip@1.1.5/node_modules/ip/lib/ip.js"(exports2) { + "use strict"; + var ip = exports2; + var Buffer2 = require("buffer").Buffer; + var os = require("os"); + ip.toBuffer = function(ip2, buff, offset) { + offset = ~~offset; + var result; + if (this.isV4Format(ip2)) { + result = buff || new Buffer2(offset + 4); + ip2.split(/\./g).map(function(byte) { + result[offset++] = parseInt(byte, 10) & 255; + }); + } else if (this.isV6Format(ip2)) { + var sections = ip2.split(":", 8); + var i; + for (i = 0; i < sections.length; i++) { + var isv4 = this.isV4Format(sections[i]); + var v4Buffer; + if (isv4) { + v4Buffer = this.toBuffer(sections[i]); + sections[i] = v4Buffer.slice(0, 2).toString("hex"); + } + if (v4Buffer && ++i < 8) { + sections.splice(i, 0, v4Buffer.slice(2, 4).toString("hex")); + } + } + if (sections[0] === "") { + while (sections.length < 8) + sections.unshift("0"); + } else if (sections[sections.length - 1] === "") { + while (sections.length < 8) + sections.push("0"); + } else if (sections.length < 8) { + for (i = 0; i < sections.length && sections[i] !== ""; i++) + ; + var argv2 = [i, 1]; + for (i = 9 - sections.length; i > 0; i--) { + argv2.push("0"); + } + sections.splice.apply(sections, argv2); + } + result = buff || new Buffer2(offset + 16); + for (i = 0; i < sections.length; i++) { + var word = parseInt(sections[i], 16); + result[offset++] = word >> 8 & 255; + result[offset++] = word & 255; + } + } + if (!result) { + throw Error("Invalid ip address: " + ip2); + } + return result; + }; + ip.toString = function(buff, offset, length) { + offset = ~~offset; + length = length || buff.length - offset; + var result = []; + if (length === 4) { + for (var i = 0; i < length; i++) { + result.push(buff[offset + i]); + } + result = result.join("."); + } else if (length === 16) { + for (var i = 0; i < length; i += 2) { + result.push(buff.readUInt16BE(offset + i).toString(16)); + } + result = result.join(":"); + result = result.replace(/(^|:)0(:0)*:0(:|$)/, "$1::$3"); + result = result.replace(/:{3,4}/, "::"); + } + return result; + }; + var ipv4Regex = /^(\d{1,3}\.){3,3}\d{1,3}$/; + var ipv6Regex = /^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i; + ip.isV4Format = function(ip2) { + return ipv4Regex.test(ip2); + }; + ip.isV6Format = function(ip2) { + return ipv6Regex.test(ip2); + }; + function _normalizeFamily(family) { + return family ? family.toLowerCase() : "ipv4"; + } + ip.fromPrefixLen = function(prefixlen, family) { + if (prefixlen > 32) { + family = "ipv6"; + } else { + family = _normalizeFamily(family); + } + var len = 4; + if (family === "ipv6") { + len = 16; + } + var buff = new Buffer2(len); + for (var i = 0, n = buff.length; i < n; ++i) { + var bits = 8; + if (prefixlen < 8) { + bits = prefixlen; + } + prefixlen -= bits; + buff[i] = ~(255 >> bits) & 255; + } + return ip.toString(buff); + }; + ip.mask = function(addr, mask) { + addr = ip.toBuffer(addr); + mask = ip.toBuffer(mask); + var result = new Buffer2(Math.max(addr.length, mask.length)); + var i = 0; + if (addr.length === mask.length) { + for (i = 0; i < addr.length; i++) { + result[i] = addr[i] & mask[i]; + } + } else if (mask.length === 4) { + for (i = 0; i < mask.length; i++) { + result[i] = addr[addr.length - 4 + i] & mask[i]; + } + } else { + for (var i = 0; i < result.length - 6; i++) { + result[i] = 0; + } + result[10] = 255; + result[11] = 255; + for (i = 0; i < addr.length; i++) { + result[i + 12] = addr[i] & mask[i + 12]; + } + i = i + 12; + } + for (; i < result.length; i++) + result[i] = 0; + return ip.toString(result); + }; + ip.cidr = function(cidrString) { + var cidrParts = cidrString.split("/"); + var addr = cidrParts[0]; + if (cidrParts.length !== 2) + throw new Error("invalid CIDR subnet: " + addr); + var mask = ip.fromPrefixLen(parseInt(cidrParts[1], 10)); + return ip.mask(addr, mask); + }; + ip.subnet = function(addr, mask) { + var networkAddress = ip.toLong(ip.mask(addr, mask)); + var maskBuffer = ip.toBuffer(mask); + var maskLength = 0; + for (var i = 0; i < maskBuffer.length; i++) { + if (maskBuffer[i] === 255) { + maskLength += 8; + } else { + var octet = maskBuffer[i] & 255; + while (octet) { + octet = octet << 1 & 255; + maskLength++; + } + } + } + var numberOfAddresses = Math.pow(2, 32 - maskLength); + return { + networkAddress: ip.fromLong(networkAddress), + firstAddress: numberOfAddresses <= 2 ? ip.fromLong(networkAddress) : ip.fromLong(networkAddress + 1), + lastAddress: numberOfAddresses <= 2 ? ip.fromLong(networkAddress + numberOfAddresses - 1) : ip.fromLong(networkAddress + numberOfAddresses - 2), + broadcastAddress: ip.fromLong(networkAddress + numberOfAddresses - 1), + subnetMask: mask, + subnetMaskLength: maskLength, + numHosts: numberOfAddresses <= 2 ? numberOfAddresses : numberOfAddresses - 2, + length: numberOfAddresses, + contains: function(other) { + return networkAddress === ip.toLong(ip.mask(other, mask)); + } + }; + }; + ip.cidrSubnet = function(cidrString) { + var cidrParts = cidrString.split("/"); + var addr = cidrParts[0]; + if (cidrParts.length !== 2) + throw new Error("invalid CIDR subnet: " + addr); + var mask = ip.fromPrefixLen(parseInt(cidrParts[1], 10)); + return ip.subnet(addr, mask); + }; + ip.not = function(addr) { + var buff = ip.toBuffer(addr); + for (var i = 0; i < buff.length; i++) { + buff[i] = 255 ^ buff[i]; + } + return ip.toString(buff); + }; + ip.or = function(a, b) { + a = ip.toBuffer(a); + b = ip.toBuffer(b); + if (a.length === b.length) { + for (var i = 0; i < a.length; ++i) { + a[i] |= b[i]; + } + return ip.toString(a); + } else { + var buff = a; + var other = b; + if (b.length > a.length) { + buff = b; + other = a; + } + var offset = buff.length - other.length; + for (var i = offset; i < buff.length; ++i) { + buff[i] |= other[i - offset]; + } + return ip.toString(buff); + } + }; + ip.isEqual = function(a, b) { + a = ip.toBuffer(a); + b = ip.toBuffer(b); + if (a.length === b.length) { + for (var i = 0; i < a.length; i++) { + if (a[i] !== b[i]) + return false; + } + return true; + } + if (b.length === 4) { + var t = b; + b = a; + a = t; + } + for (var i = 0; i < 10; i++) { + if (b[i] !== 0) + return false; + } + var word = b.readUInt16BE(10); + if (word !== 0 && word !== 65535) + return false; + for (var i = 0; i < 4; i++) { + if (a[i] !== b[i + 12]) + return false; + } + return true; + }; + ip.isPrivate = function(addr) { + return /^(::f{4}:)?10\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || /^(::f{4}:)?192\.168\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || /^(::f{4}:)?172\.(1[6-9]|2\d|30|31)\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || /^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || /^(::f{4}:)?169\.254\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || /^f[cd][0-9a-f]{2}:/i.test(addr) || /^fe80:/i.test(addr) || /^::1$/.test(addr) || /^::$/.test(addr); + }; + ip.isPublic = function(addr) { + return !ip.isPrivate(addr); + }; + ip.isLoopback = function(addr) { + return /^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/.test(addr) || /^fe80::1$/.test(addr) || /^::1$/.test(addr) || /^::$/.test(addr); + }; + ip.loopback = function(family) { + family = _normalizeFamily(family); + if (family !== "ipv4" && family !== "ipv6") { + throw new Error("family must be ipv4 or ipv6"); + } + return family === "ipv4" ? "127.0.0.1" : "fe80::1"; + }; + ip.address = function(name, family) { + var interfaces = os.networkInterfaces(); + var all; + family = _normalizeFamily(family); + if (name && name !== "private" && name !== "public") { + var res = interfaces[name].filter(function(details) { + var itemFamily = details.family.toLowerCase(); + return itemFamily === family; + }); + if (res.length === 0) + return void 0; + return res[0].address; + } + var all = Object.keys(interfaces).map(function(nic) { + var addresses = interfaces[nic].filter(function(details) { + details.family = details.family.toLowerCase(); + if (details.family !== family || ip.isLoopback(details.address)) { + return false; + } else if (!name) { + return true; + } + return name === "public" ? ip.isPrivate(details.address) : ip.isPublic(details.address); + }); + return addresses.length ? addresses[0].address : void 0; + }).filter(Boolean); + return !all.length ? ip.loopback(family) : all[0]; + }; + ip.toLong = function(ip2) { + var ipl = 0; + ip2.split(".").forEach(function(octet) { + ipl <<= 8; + ipl += parseInt(octet); + }); + return ipl >>> 0; + }; + ip.fromLong = function(ipl) { + return (ipl >>> 24) + "." + (ipl >> 16 & 255) + "." + (ipl >> 8 & 255) + "." + (ipl & 255); + }; + } +}); + +// ../../node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/build/utils.js +var require_utils7 = __commonJS({ + "../../node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/build/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var buffer_1 = require("buffer"); + var ERRORS = { + INVALID_ENCODING: "Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.", + INVALID_SMARTBUFFER_SIZE: "Invalid size provided. Size must be a valid integer greater than zero.", + INVALID_SMARTBUFFER_BUFFER: "Invalid Buffer provided in SmartBufferOptions.", + INVALID_SMARTBUFFER_OBJECT: "Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.", + INVALID_OFFSET: "An invalid offset value was provided.", + INVALID_OFFSET_NON_NUMBER: "An invalid offset value was provided. A numeric value is required.", + INVALID_LENGTH: "An invalid length value was provided.", + INVALID_LENGTH_NON_NUMBER: "An invalid length value was provived. A numeric value is required.", + INVALID_TARGET_OFFSET: "Target offset is beyond the bounds of the internal SmartBuffer data.", + INVALID_TARGET_LENGTH: "Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.", + INVALID_READ_BEYOND_BOUNDS: "Attempted to read beyond the bounds of the managed data.", + INVALID_WRITE_BEYOND_BOUNDS: "Attempted to write beyond the bounds of the managed data." + }; + exports2.ERRORS = ERRORS; + function checkEncoding(encoding) { + if (!buffer_1.Buffer.isEncoding(encoding)) { + throw new Error(ERRORS.INVALID_ENCODING); + } + } + exports2.checkEncoding = checkEncoding; + function isFiniteInteger(value) { + return typeof value === "number" && isFinite(value) && isInteger(value); + } + exports2.isFiniteInteger = isFiniteInteger; + function checkOffsetOrLengthValue(value, offset) { + if (typeof value === "number") { + if (!isFiniteInteger(value) || value < 0) { + throw new Error(offset ? ERRORS.INVALID_OFFSET : ERRORS.INVALID_LENGTH); + } + } else { + throw new Error(offset ? ERRORS.INVALID_OFFSET_NON_NUMBER : ERRORS.INVALID_LENGTH_NON_NUMBER); + } + } + function checkLengthValue(length) { + checkOffsetOrLengthValue(length, false); + } + exports2.checkLengthValue = checkLengthValue; + function checkOffsetValue(offset) { + checkOffsetOrLengthValue(offset, true); + } + exports2.checkOffsetValue = checkOffsetValue; + function checkTargetOffset(offset, buff) { + if (offset < 0 || offset > buff.length) { + throw new Error(ERRORS.INVALID_TARGET_OFFSET); + } + } + exports2.checkTargetOffset = checkTargetOffset; + function isInteger(value) { + return typeof value === "number" && isFinite(value) && Math.floor(value) === value; + } + function bigIntAndBufferInt64Check(bufferMethod) { + if (typeof BigInt === "undefined") { + throw new Error("Platform does not support JS BigInt type."); + } + if (typeof buffer_1.Buffer.prototype[bufferMethod] === "undefined") { + throw new Error(`Platform does not support Buffer.prototype.${bufferMethod}.`); + } + } + exports2.bigIntAndBufferInt64Check = bigIntAndBufferInt64Check; + } +}); + +// ../../node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/build/smartbuffer.js +var require_smartbuffer = __commonJS({ + "../../node_modules/.pnpm/smart-buffer@4.2.0/node_modules/smart-buffer/build/smartbuffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var utils_1 = require_utils7(); + var DEFAULT_SMARTBUFFER_SIZE = 4096; + var DEFAULT_SMARTBUFFER_ENCODING = "utf8"; + var SmartBuffer = class { + constructor(options) { + this.length = 0; + this._encoding = DEFAULT_SMARTBUFFER_ENCODING; + this._writeOffset = 0; + this._readOffset = 0; + if (SmartBuffer.isSmartBufferOptions(options)) { + if (options.encoding) { + utils_1.checkEncoding(options.encoding); + this._encoding = options.encoding; + } + if (options.size) { + if (utils_1.isFiniteInteger(options.size) && options.size > 0) { + this._buff = Buffer.allocUnsafe(options.size); + } else { + throw new Error(utils_1.ERRORS.INVALID_SMARTBUFFER_SIZE); + } + } else if (options.buff) { + if (Buffer.isBuffer(options.buff)) { + this._buff = options.buff; + this.length = options.buff.length; + } else { + throw new Error(utils_1.ERRORS.INVALID_SMARTBUFFER_BUFFER); + } + } else { + this._buff = Buffer.allocUnsafe(DEFAULT_SMARTBUFFER_SIZE); + } + } else { + if (typeof options !== "undefined") { + throw new Error(utils_1.ERRORS.INVALID_SMARTBUFFER_OBJECT); + } + this._buff = Buffer.allocUnsafe(DEFAULT_SMARTBUFFER_SIZE); + } + } + static fromSize(size, encoding) { + return new this({ + size, + encoding + }); + } + static fromBuffer(buff, encoding) { + return new this({ + buff, + encoding + }); + } + static fromOptions(options) { + return new this(options); + } + static isSmartBufferOptions(options) { + const castOptions = options; + return castOptions && (castOptions.encoding !== void 0 || castOptions.size !== void 0 || castOptions.buff !== void 0); + } + readInt8(offset) { + return this._readNumberValue(Buffer.prototype.readInt8, 1, offset); + } + readInt16BE(offset) { + return this._readNumberValue(Buffer.prototype.readInt16BE, 2, offset); + } + readInt16LE(offset) { + return this._readNumberValue(Buffer.prototype.readInt16LE, 2, offset); + } + readInt32BE(offset) { + return this._readNumberValue(Buffer.prototype.readInt32BE, 4, offset); + } + readInt32LE(offset) { + return this._readNumberValue(Buffer.prototype.readInt32LE, 4, offset); + } + readBigInt64BE(offset) { + utils_1.bigIntAndBufferInt64Check("readBigInt64BE"); + return this._readNumberValue(Buffer.prototype.readBigInt64BE, 8, offset); + } + readBigInt64LE(offset) { + utils_1.bigIntAndBufferInt64Check("readBigInt64LE"); + return this._readNumberValue(Buffer.prototype.readBigInt64LE, 8, offset); + } + writeInt8(value, offset) { + this._writeNumberValue(Buffer.prototype.writeInt8, 1, value, offset); + return this; + } + insertInt8(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeInt8, 1, value, offset); + } + writeInt16BE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeInt16BE, 2, value, offset); + } + insertInt16BE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeInt16BE, 2, value, offset); + } + writeInt16LE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeInt16LE, 2, value, offset); + } + insertInt16LE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeInt16LE, 2, value, offset); + } + writeInt32BE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeInt32BE, 4, value, offset); + } + insertInt32BE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeInt32BE, 4, value, offset); + } + writeInt32LE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeInt32LE, 4, value, offset); + } + insertInt32LE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeInt32LE, 4, value, offset); + } + writeBigInt64BE(value, offset) { + utils_1.bigIntAndBufferInt64Check("writeBigInt64BE"); + return this._writeNumberValue(Buffer.prototype.writeBigInt64BE, 8, value, offset); + } + insertBigInt64BE(value, offset) { + utils_1.bigIntAndBufferInt64Check("writeBigInt64BE"); + return this._insertNumberValue(Buffer.prototype.writeBigInt64BE, 8, value, offset); + } + writeBigInt64LE(value, offset) { + utils_1.bigIntAndBufferInt64Check("writeBigInt64LE"); + return this._writeNumberValue(Buffer.prototype.writeBigInt64LE, 8, value, offset); + } + insertBigInt64LE(value, offset) { + utils_1.bigIntAndBufferInt64Check("writeBigInt64LE"); + return this._insertNumberValue(Buffer.prototype.writeBigInt64LE, 8, value, offset); + } + readUInt8(offset) { + return this._readNumberValue(Buffer.prototype.readUInt8, 1, offset); + } + readUInt16BE(offset) { + return this._readNumberValue(Buffer.prototype.readUInt16BE, 2, offset); + } + readUInt16LE(offset) { + return this._readNumberValue(Buffer.prototype.readUInt16LE, 2, offset); + } + readUInt32BE(offset) { + return this._readNumberValue(Buffer.prototype.readUInt32BE, 4, offset); + } + readUInt32LE(offset) { + return this._readNumberValue(Buffer.prototype.readUInt32LE, 4, offset); + } + readBigUInt64BE(offset) { + utils_1.bigIntAndBufferInt64Check("readBigUInt64BE"); + return this._readNumberValue(Buffer.prototype.readBigUInt64BE, 8, offset); + } + readBigUInt64LE(offset) { + utils_1.bigIntAndBufferInt64Check("readBigUInt64LE"); + return this._readNumberValue(Buffer.prototype.readBigUInt64LE, 8, offset); + } + writeUInt8(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeUInt8, 1, value, offset); + } + insertUInt8(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeUInt8, 1, value, offset); + } + writeUInt16BE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeUInt16BE, 2, value, offset); + } + insertUInt16BE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeUInt16BE, 2, value, offset); + } + writeUInt16LE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeUInt16LE, 2, value, offset); + } + insertUInt16LE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeUInt16LE, 2, value, offset); + } + writeUInt32BE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeUInt32BE, 4, value, offset); + } + insertUInt32BE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeUInt32BE, 4, value, offset); + } + writeUInt32LE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeUInt32LE, 4, value, offset); + } + insertUInt32LE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeUInt32LE, 4, value, offset); + } + writeBigUInt64BE(value, offset) { + utils_1.bigIntAndBufferInt64Check("writeBigUInt64BE"); + return this._writeNumberValue(Buffer.prototype.writeBigUInt64BE, 8, value, offset); + } + insertBigUInt64BE(value, offset) { + utils_1.bigIntAndBufferInt64Check("writeBigUInt64BE"); + return this._insertNumberValue(Buffer.prototype.writeBigUInt64BE, 8, value, offset); + } + writeBigUInt64LE(value, offset) { + utils_1.bigIntAndBufferInt64Check("writeBigUInt64LE"); + return this._writeNumberValue(Buffer.prototype.writeBigUInt64LE, 8, value, offset); + } + insertBigUInt64LE(value, offset) { + utils_1.bigIntAndBufferInt64Check("writeBigUInt64LE"); + return this._insertNumberValue(Buffer.prototype.writeBigUInt64LE, 8, value, offset); + } + readFloatBE(offset) { + return this._readNumberValue(Buffer.prototype.readFloatBE, 4, offset); + } + readFloatLE(offset) { + return this._readNumberValue(Buffer.prototype.readFloatLE, 4, offset); + } + writeFloatBE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeFloatBE, 4, value, offset); + } + insertFloatBE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeFloatBE, 4, value, offset); + } + writeFloatLE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeFloatLE, 4, value, offset); + } + insertFloatLE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeFloatLE, 4, value, offset); + } + readDoubleBE(offset) { + return this._readNumberValue(Buffer.prototype.readDoubleBE, 8, offset); + } + readDoubleLE(offset) { + return this._readNumberValue(Buffer.prototype.readDoubleLE, 8, offset); + } + writeDoubleBE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeDoubleBE, 8, value, offset); + } + insertDoubleBE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeDoubleBE, 8, value, offset); + } + writeDoubleLE(value, offset) { + return this._writeNumberValue(Buffer.prototype.writeDoubleLE, 8, value, offset); + } + insertDoubleLE(value, offset) { + return this._insertNumberValue(Buffer.prototype.writeDoubleLE, 8, value, offset); + } + readString(arg1, encoding) { + let lengthVal; + if (typeof arg1 === "number") { + utils_1.checkLengthValue(arg1); + lengthVal = Math.min(arg1, this.length - this._readOffset); + } else { + encoding = arg1; + lengthVal = this.length - this._readOffset; + } + if (typeof encoding !== "undefined") { + utils_1.checkEncoding(encoding); + } + const value = this._buff.slice(this._readOffset, this._readOffset + lengthVal).toString(encoding || this._encoding); + this._readOffset += lengthVal; + return value; + } + insertString(value, offset, encoding) { + utils_1.checkOffsetValue(offset); + return this._handleString(value, true, offset, encoding); + } + writeString(value, arg2, encoding) { + return this._handleString(value, false, arg2, encoding); + } + readStringNT(encoding) { + if (typeof encoding !== "undefined") { + utils_1.checkEncoding(encoding); + } + let nullPos = this.length; + for (let i = this._readOffset; i < this.length; i++) { + if (this._buff[i] === 0) { + nullPos = i; + break; + } + } + const value = this._buff.slice(this._readOffset, nullPos); + this._readOffset = nullPos + 1; + return value.toString(encoding || this._encoding); + } + insertStringNT(value, offset, encoding) { + utils_1.checkOffsetValue(offset); + this.insertString(value, offset, encoding); + this.insertUInt8(0, offset + value.length); + return this; + } + writeStringNT(value, arg2, encoding) { + this.writeString(value, arg2, encoding); + this.writeUInt8(0, typeof arg2 === "number" ? arg2 + value.length : this.writeOffset); + return this; + } + readBuffer(length) { + if (typeof length !== "undefined") { + utils_1.checkLengthValue(length); + } + const lengthVal = typeof length === "number" ? length : this.length; + const endPoint = Math.min(this.length, this._readOffset + lengthVal); + const value = this._buff.slice(this._readOffset, endPoint); + this._readOffset = endPoint; + return value; + } + insertBuffer(value, offset) { + utils_1.checkOffsetValue(offset); + return this._handleBuffer(value, true, offset); + } + writeBuffer(value, offset) { + return this._handleBuffer(value, false, offset); + } + readBufferNT() { + let nullPos = this.length; + for (let i = this._readOffset; i < this.length; i++) { + if (this._buff[i] === 0) { + nullPos = i; + break; + } + } + const value = this._buff.slice(this._readOffset, nullPos); + this._readOffset = nullPos + 1; + return value; + } + insertBufferNT(value, offset) { + utils_1.checkOffsetValue(offset); + this.insertBuffer(value, offset); + this.insertUInt8(0, offset + value.length); + return this; + } + writeBufferNT(value, offset) { + if (typeof offset !== "undefined") { + utils_1.checkOffsetValue(offset); + } + this.writeBuffer(value, offset); + this.writeUInt8(0, typeof offset === "number" ? offset + value.length : this._writeOffset); + return this; + } + clear() { + this._writeOffset = 0; + this._readOffset = 0; + this.length = 0; + return this; + } + remaining() { + return this.length - this._readOffset; + } + get readOffset() { + return this._readOffset; + } + set readOffset(offset) { + utils_1.checkOffsetValue(offset); + utils_1.checkTargetOffset(offset, this); + this._readOffset = offset; + } + get writeOffset() { + return this._writeOffset; + } + set writeOffset(offset) { + utils_1.checkOffsetValue(offset); + utils_1.checkTargetOffset(offset, this); + this._writeOffset = offset; + } + get encoding() { + return this._encoding; + } + set encoding(encoding) { + utils_1.checkEncoding(encoding); + this._encoding = encoding; + } + get internalBuffer() { + return this._buff; + } + toBuffer() { + return this._buff.slice(0, this.length); + } + toString(encoding) { + const encodingVal = typeof encoding === "string" ? encoding : this._encoding; + utils_1.checkEncoding(encodingVal); + return this._buff.toString(encodingVal, 0, this.length); + } + destroy() { + this.clear(); + return this; + } + _handleString(value, isInsert, arg3, encoding) { + let offsetVal = this._writeOffset; + let encodingVal = this._encoding; + if (typeof arg3 === "number") { + offsetVal = arg3; + } else if (typeof arg3 === "string") { + utils_1.checkEncoding(arg3); + encodingVal = arg3; + } + if (typeof encoding === "string") { + utils_1.checkEncoding(encoding); + encodingVal = encoding; + } + const byteLength = Buffer.byteLength(value, encodingVal); + if (isInsert) { + this.ensureInsertable(byteLength, offsetVal); + } else { + this._ensureWriteable(byteLength, offsetVal); + } + this._buff.write(value, offsetVal, byteLength, encodingVal); + if (isInsert) { + this._writeOffset += byteLength; + } else { + if (typeof arg3 === "number") { + this._writeOffset = Math.max(this._writeOffset, offsetVal + byteLength); + } else { + this._writeOffset += byteLength; + } + } + return this; + } + _handleBuffer(value, isInsert, offset) { + const offsetVal = typeof offset === "number" ? offset : this._writeOffset; + if (isInsert) { + this.ensureInsertable(value.length, offsetVal); + } else { + this._ensureWriteable(value.length, offsetVal); + } + value.copy(this._buff, offsetVal); + if (isInsert) { + this._writeOffset += value.length; + } else { + if (typeof offset === "number") { + this._writeOffset = Math.max(this._writeOffset, offsetVal + value.length); + } else { + this._writeOffset += value.length; + } + } + return this; + } + ensureReadable(length, offset) { + let offsetVal = this._readOffset; + if (typeof offset !== "undefined") { + utils_1.checkOffsetValue(offset); + offsetVal = offset; + } + if (offsetVal < 0 || offsetVal + length > this.length) { + throw new Error(utils_1.ERRORS.INVALID_READ_BEYOND_BOUNDS); + } + } + ensureInsertable(dataLength, offset) { + utils_1.checkOffsetValue(offset); + this._ensureCapacity(this.length + dataLength); + if (offset < this.length) { + this._buff.copy(this._buff, offset + dataLength, offset, this._buff.length); + } + if (offset + dataLength > this.length) { + this.length = offset + dataLength; + } else { + this.length += dataLength; + } + } + _ensureWriteable(dataLength, offset) { + const offsetVal = typeof offset === "number" ? offset : this._writeOffset; + this._ensureCapacity(offsetVal + dataLength); + if (offsetVal + dataLength > this.length) { + this.length = offsetVal + dataLength; + } + } + _ensureCapacity(minLength) { + const oldLength = this._buff.length; + if (minLength > oldLength) { + let data = this._buff; + let newLength = oldLength * 3 / 2 + 1; + if (newLength < minLength) { + newLength = minLength; + } + this._buff = Buffer.allocUnsafe(newLength); + data.copy(this._buff, 0, 0, oldLength); + } + } + _readNumberValue(func, byteSize, offset) { + this.ensureReadable(byteSize, offset); + const value = func.call(this._buff, typeof offset === "number" ? offset : this._readOffset); + if (typeof offset === "undefined") { + this._readOffset += byteSize; + } + return value; + } + _insertNumberValue(func, byteSize, value, offset) { + utils_1.checkOffsetValue(offset); + this.ensureInsertable(byteSize, offset); + func.call(this._buff, value, offset); + this._writeOffset += byteSize; + return this; + } + _writeNumberValue(func, byteSize, value, offset) { + if (typeof offset === "number") { + if (offset < 0) { + throw new Error(utils_1.ERRORS.INVALID_WRITE_BEYOND_BOUNDS); + } + utils_1.checkOffsetValue(offset); + } + const offsetVal = typeof offset === "number" ? offset : this._writeOffset; + this._ensureWriteable(byteSize, offsetVal); + func.call(this._buff, value, offsetVal); + if (typeof offset === "number") { + this._writeOffset = Math.max(this._writeOffset, offsetVal + byteSize); + } else { + this._writeOffset += byteSize; + } + return this; + } + }; + exports2.SmartBuffer = SmartBuffer; + } +}); + +// ../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/common/constants.js +var require_constants8 = __commonJS({ + "../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/common/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SOCKS5_NO_ACCEPTABLE_AUTH = exports2.SOCKS5_CUSTOM_AUTH_END = exports2.SOCKS5_CUSTOM_AUTH_START = exports2.SOCKS_INCOMING_PACKET_SIZES = exports2.SocksClientState = exports2.Socks5Response = exports2.Socks5HostType = exports2.Socks5Auth = exports2.Socks4Response = exports2.SocksCommand = exports2.ERRORS = exports2.DEFAULT_TIMEOUT = void 0; + var DEFAULT_TIMEOUT = 3e4; + exports2.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT; + var ERRORS = { + InvalidSocksCommand: "An invalid SOCKS command was provided. Valid options are connect, bind, and associate.", + InvalidSocksCommandForOperation: "An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.", + InvalidSocksCommandChain: "An invalid SOCKS command was provided. Chaining currently only supports the connect command.", + InvalidSocksClientOptionsDestination: "An invalid destination host was provided.", + InvalidSocksClientOptionsExistingSocket: "An invalid existing socket was provided. This should be an instance of stream.Duplex.", + InvalidSocksClientOptionsProxy: "Invalid SOCKS proxy details were provided.", + InvalidSocksClientOptionsTimeout: "An invalid timeout value was provided. Please enter a value above 0 (in ms).", + InvalidSocksClientOptionsProxiesLength: "At least two socks proxies must be provided for chaining.", + InvalidSocksClientOptionsCustomAuthRange: "Custom auth must be a value between 0x80 and 0xFE.", + InvalidSocksClientOptionsCustomAuthOptions: "When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.", + NegotiationError: "Negotiation error", + SocketClosed: "Socket closed", + ProxyConnectionTimedOut: "Proxy connection timed out", + InternalError: "SocksClient internal error (this should not happen)", + InvalidSocks4HandshakeResponse: "Received invalid Socks4 handshake response", + Socks4ProxyRejectedConnection: "Socks4 Proxy rejected connection", + InvalidSocks4IncomingConnectionResponse: "Socks4 invalid incoming connection response", + Socks4ProxyRejectedIncomingBoundConnection: "Socks4 Proxy rejected incoming bound connection", + InvalidSocks5InitialHandshakeResponse: "Received invalid Socks5 initial handshake response", + InvalidSocks5IntiailHandshakeSocksVersion: "Received invalid Socks5 initial handshake (invalid socks version)", + InvalidSocks5InitialHandshakeNoAcceptedAuthType: "Received invalid Socks5 initial handshake (no accepted authentication type)", + InvalidSocks5InitialHandshakeUnknownAuthType: "Received invalid Socks5 initial handshake (unknown authentication type)", + Socks5AuthenticationFailed: "Socks5 Authentication failed", + InvalidSocks5FinalHandshake: "Received invalid Socks5 final handshake response", + InvalidSocks5FinalHandshakeRejected: "Socks5 proxy rejected connection", + InvalidSocks5IncomingConnectionResponse: "Received invalid Socks5 incoming connection response", + Socks5ProxyRejectedIncomingBoundConnection: "Socks5 Proxy rejected incoming bound connection" + }; + exports2.ERRORS = ERRORS; + var SOCKS_INCOMING_PACKET_SIZES = { + Socks5InitialHandshakeResponse: 2, + Socks5UserPassAuthenticationResponse: 2, + Socks5ResponseHeader: 5, + Socks5ResponseIPv4: 10, + Socks5ResponseIPv6: 22, + Socks5ResponseHostname: (hostNameLength) => hostNameLength + 7, + Socks4Response: 8 + }; + exports2.SOCKS_INCOMING_PACKET_SIZES = SOCKS_INCOMING_PACKET_SIZES; + var SocksCommand; + (function(SocksCommand2) { + SocksCommand2[SocksCommand2["connect"] = 1] = "connect"; + SocksCommand2[SocksCommand2["bind"] = 2] = "bind"; + SocksCommand2[SocksCommand2["associate"] = 3] = "associate"; + })(SocksCommand || (SocksCommand = {})); + exports2.SocksCommand = SocksCommand; + var Socks4Response; + (function(Socks4Response2) { + Socks4Response2[Socks4Response2["Granted"] = 90] = "Granted"; + Socks4Response2[Socks4Response2["Failed"] = 91] = "Failed"; + Socks4Response2[Socks4Response2["Rejected"] = 92] = "Rejected"; + Socks4Response2[Socks4Response2["RejectedIdent"] = 93] = "RejectedIdent"; + })(Socks4Response || (Socks4Response = {})); + exports2.Socks4Response = Socks4Response; + var Socks5Auth; + (function(Socks5Auth2) { + Socks5Auth2[Socks5Auth2["NoAuth"] = 0] = "NoAuth"; + Socks5Auth2[Socks5Auth2["GSSApi"] = 1] = "GSSApi"; + Socks5Auth2[Socks5Auth2["UserPass"] = 2] = "UserPass"; + })(Socks5Auth || (Socks5Auth = {})); + exports2.Socks5Auth = Socks5Auth; + var SOCKS5_CUSTOM_AUTH_START = 128; + exports2.SOCKS5_CUSTOM_AUTH_START = SOCKS5_CUSTOM_AUTH_START; + var SOCKS5_CUSTOM_AUTH_END = 254; + exports2.SOCKS5_CUSTOM_AUTH_END = SOCKS5_CUSTOM_AUTH_END; + var SOCKS5_NO_ACCEPTABLE_AUTH = 255; + exports2.SOCKS5_NO_ACCEPTABLE_AUTH = SOCKS5_NO_ACCEPTABLE_AUTH; + var Socks5Response; + (function(Socks5Response2) { + Socks5Response2[Socks5Response2["Granted"] = 0] = "Granted"; + Socks5Response2[Socks5Response2["Failure"] = 1] = "Failure"; + Socks5Response2[Socks5Response2["NotAllowed"] = 2] = "NotAllowed"; + Socks5Response2[Socks5Response2["NetworkUnreachable"] = 3] = "NetworkUnreachable"; + Socks5Response2[Socks5Response2["HostUnreachable"] = 4] = "HostUnreachable"; + Socks5Response2[Socks5Response2["ConnectionRefused"] = 5] = "ConnectionRefused"; + Socks5Response2[Socks5Response2["TTLExpired"] = 6] = "TTLExpired"; + Socks5Response2[Socks5Response2["CommandNotSupported"] = 7] = "CommandNotSupported"; + Socks5Response2[Socks5Response2["AddressNotSupported"] = 8] = "AddressNotSupported"; + })(Socks5Response || (Socks5Response = {})); + exports2.Socks5Response = Socks5Response; + var Socks5HostType; + (function(Socks5HostType2) { + Socks5HostType2[Socks5HostType2["IPv4"] = 1] = "IPv4"; + Socks5HostType2[Socks5HostType2["Hostname"] = 3] = "Hostname"; + Socks5HostType2[Socks5HostType2["IPv6"] = 4] = "IPv6"; + })(Socks5HostType || (Socks5HostType = {})); + exports2.Socks5HostType = Socks5HostType; + var SocksClientState; + (function(SocksClientState2) { + SocksClientState2[SocksClientState2["Created"] = 0] = "Created"; + SocksClientState2[SocksClientState2["Connecting"] = 1] = "Connecting"; + SocksClientState2[SocksClientState2["Connected"] = 2] = "Connected"; + SocksClientState2[SocksClientState2["SentInitialHandshake"] = 3] = "SentInitialHandshake"; + SocksClientState2[SocksClientState2["ReceivedInitialHandshakeResponse"] = 4] = "ReceivedInitialHandshakeResponse"; + SocksClientState2[SocksClientState2["SentAuthentication"] = 5] = "SentAuthentication"; + SocksClientState2[SocksClientState2["ReceivedAuthenticationResponse"] = 6] = "ReceivedAuthenticationResponse"; + SocksClientState2[SocksClientState2["SentFinalHandshake"] = 7] = "SentFinalHandshake"; + SocksClientState2[SocksClientState2["ReceivedFinalResponse"] = 8] = "ReceivedFinalResponse"; + SocksClientState2[SocksClientState2["BoundWaitingForConnection"] = 9] = "BoundWaitingForConnection"; + SocksClientState2[SocksClientState2["Established"] = 10] = "Established"; + SocksClientState2[SocksClientState2["Disconnected"] = 11] = "Disconnected"; + SocksClientState2[SocksClientState2["Error"] = 99] = "Error"; + })(SocksClientState || (SocksClientState = {})); + exports2.SocksClientState = SocksClientState; + } +}); + +// ../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/common/util.js +var require_util5 = __commonJS({ + "../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/common/util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.shuffleArray = exports2.SocksClientError = void 0; + var SocksClientError = class extends Error { + constructor(message2, options) { + super(message2); + this.options = options; + } + }; + exports2.SocksClientError = SocksClientError; + function shuffleArray(array) { + for (let i = array.length - 1; i > 0; i--) { + const j = Math.floor(Math.random() * (i + 1)); + [array[i], array[j]] = [array[j], array[i]]; + } + } + exports2.shuffleArray = shuffleArray; + } +}); + +// ../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/common/helpers.js +var require_helpers = __commonJS({ + "../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/common/helpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.validateSocksClientChainOptions = exports2.validateSocksClientOptions = void 0; + var util_1 = require_util5(); + var constants_1 = require_constants8(); + var stream = require("stream"); + function validateSocksClientOptions(options, acceptedCommands = ["connect", "bind", "associate"]) { + if (!constants_1.SocksCommand[options.command]) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksCommand, options); + } + if (acceptedCommands.indexOf(options.command) === -1) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksCommandForOperation, options); + } + if (!isValidSocksRemoteHost(options.destination)) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsDestination, options); + } + if (!isValidSocksProxy(options.proxy)) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsProxy, options); + } + validateCustomProxyAuth(options.proxy, options); + if (options.timeout && !isValidTimeoutValue(options.timeout)) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsTimeout, options); + } + if (options.existing_socket && !(options.existing_socket instanceof stream.Duplex)) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsExistingSocket, options); + } + } + exports2.validateSocksClientOptions = validateSocksClientOptions; + function validateSocksClientChainOptions(options) { + if (options.command !== "connect") { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksCommandChain, options); + } + if (!isValidSocksRemoteHost(options.destination)) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsDestination, options); + } + if (!(options.proxies && Array.isArray(options.proxies) && options.proxies.length >= 2)) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsProxiesLength, options); + } + options.proxies.forEach((proxy) => { + if (!isValidSocksProxy(proxy)) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsProxy, options); + } + validateCustomProxyAuth(proxy, options); + }); + if (options.timeout && !isValidTimeoutValue(options.timeout)) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsTimeout, options); + } + } + exports2.validateSocksClientChainOptions = validateSocksClientChainOptions; + function validateCustomProxyAuth(proxy, options) { + if (proxy.custom_auth_method !== void 0) { + if (proxy.custom_auth_method < constants_1.SOCKS5_CUSTOM_AUTH_START || proxy.custom_auth_method > constants_1.SOCKS5_CUSTOM_AUTH_END) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthRange, options); + } + if (proxy.custom_auth_request_handler === void 0 || typeof proxy.custom_auth_request_handler !== "function") { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthOptions, options); + } + if (proxy.custom_auth_response_size === void 0) { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthOptions, options); + } + if (proxy.custom_auth_response_handler === void 0 || typeof proxy.custom_auth_response_handler !== "function") { + throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthOptions, options); + } + } + } + function isValidSocksRemoteHost(remoteHost) { + return remoteHost && typeof remoteHost.host === "string" && typeof remoteHost.port === "number" && remoteHost.port >= 0 && remoteHost.port <= 65535; + } + function isValidSocksProxy(proxy) { + return proxy && (typeof proxy.host === "string" || typeof proxy.ipaddress === "string") && typeof proxy.port === "number" && proxy.port >= 0 && proxy.port <= 65535 && (proxy.type === 4 || proxy.type === 5); + } + function isValidTimeoutValue(value) { + return typeof value === "number" && value > 0; + } + } +}); + +// ../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/common/receivebuffer.js +var require_receivebuffer = __commonJS({ + "../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/common/receivebuffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ReceiveBuffer = void 0; + var ReceiveBuffer = class { + constructor(size = 4096) { + this.buffer = Buffer.allocUnsafe(size); + this.offset = 0; + this.originalSize = size; + } + get length() { + return this.offset; + } + append(data) { + if (!Buffer.isBuffer(data)) { + throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer."); + } + if (this.offset + data.length >= this.buffer.length) { + const tmp = this.buffer; + this.buffer = Buffer.allocUnsafe(Math.max(this.buffer.length + this.originalSize, this.buffer.length + data.length)); + tmp.copy(this.buffer); + } + data.copy(this.buffer, this.offset); + return this.offset += data.length; + } + peek(length) { + if (length > this.offset) { + throw new Error("Attempted to read beyond the bounds of the managed internal data."); + } + return this.buffer.slice(0, length); + } + get(length) { + if (length > this.offset) { + throw new Error("Attempted to read beyond the bounds of the managed internal data."); + } + const value = Buffer.allocUnsafe(length); + this.buffer.slice(0, length).copy(value); + this.buffer.copyWithin(0, length, length + this.offset - length); + this.offset -= length; + return value; + } + }; + exports2.ReceiveBuffer = ReceiveBuffer; + } +}); + +// ../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/client/socksclient.js +var require_socksclient = __commonJS({ + "../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/client/socksclient.js"(exports2) { + "use strict"; + var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SocksClientError = exports2.SocksClient = void 0; + var events_1 = require("events"); + var net = require("net"); + var ip = require_ip(); + var smart_buffer_1 = require_smartbuffer(); + var constants_1 = require_constants8(); + var helpers_1 = require_helpers(); + var receivebuffer_1 = require_receivebuffer(); + var util_1 = require_util5(); + Object.defineProperty(exports2, "SocksClientError", { enumerable: true, get: function() { + return util_1.SocksClientError; + } }); + var SocksClient = class extends events_1.EventEmitter { + constructor(options) { + super(); + this.options = Object.assign({}, options); + helpers_1.validateSocksClientOptions(options); + this.setState(constants_1.SocksClientState.Created); + } + static createConnection(options, callback) { + return new Promise((resolve, reject) => { + try { + helpers_1.validateSocksClientOptions(options, ["connect"]); + } catch (err) { + if (typeof callback === "function") { + callback(err); + return resolve(err); + } else { + return reject(err); + } + } + const client = new SocksClient(options); + client.connect(options.existing_socket); + client.once("established", (info) => { + client.removeAllListeners(); + if (typeof callback === "function") { + callback(null, info); + resolve(info); + } else { + resolve(info); + } + }); + client.once("error", (err) => { + client.removeAllListeners(); + if (typeof callback === "function") { + callback(err); + resolve(err); + } else { + reject(err); + } + }); + }); + } + static createConnectionChain(options, callback) { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + try { + helpers_1.validateSocksClientChainOptions(options); + } catch (err) { + if (typeof callback === "function") { + callback(err); + return resolve(err); + } else { + return reject(err); + } + } + let sock; + if (options.randomizeChain) { + util_1.shuffleArray(options.proxies); + } + try { + for (let i = 0; i < options.proxies.length; i++) { + const nextProxy = options.proxies[i]; + const nextDestination = i === options.proxies.length - 1 ? options.destination : { + host: options.proxies[i + 1].ipaddress, + port: options.proxies[i + 1].port + }; + const result = yield SocksClient.createConnection({ + command: "connect", + proxy: nextProxy, + destination: nextDestination + }); + if (!sock) { + sock = result.socket; + } + } + if (typeof callback === "function") { + callback(null, { socket: sock }); + resolve({ socket: sock }); + } else { + resolve({ socket: sock }); + } + } catch (err) { + if (typeof callback === "function") { + callback(err); + resolve(err); + } else { + reject(err); + } + } + })); + } + static createUDPFrame(options) { + const buff = new smart_buffer_1.SmartBuffer(); + buff.writeUInt16BE(0); + buff.writeUInt8(options.frameNumber || 0); + if (net.isIPv4(options.remoteHost.host)) { + buff.writeUInt8(constants_1.Socks5HostType.IPv4); + buff.writeUInt32BE(ip.toLong(options.remoteHost.host)); + } else if (net.isIPv6(options.remoteHost.host)) { + buff.writeUInt8(constants_1.Socks5HostType.IPv6); + buff.writeBuffer(ip.toBuffer(options.remoteHost.host)); + } else { + buff.writeUInt8(constants_1.Socks5HostType.Hostname); + buff.writeUInt8(Buffer.byteLength(options.remoteHost.host)); + buff.writeString(options.remoteHost.host); + } + buff.writeUInt16BE(options.remoteHost.port); + buff.writeBuffer(options.data); + return buff.toBuffer(); + } + static parseUDPFrame(data) { + const buff = smart_buffer_1.SmartBuffer.fromBuffer(data); + buff.readOffset = 2; + const frameNumber = buff.readUInt8(); + const hostType = buff.readUInt8(); + let remoteHost; + if (hostType === constants_1.Socks5HostType.IPv4) { + remoteHost = ip.fromLong(buff.readUInt32BE()); + } else if (hostType === constants_1.Socks5HostType.IPv6) { + remoteHost = ip.toString(buff.readBuffer(16)); + } else { + remoteHost = buff.readString(buff.readUInt8()); + } + const remotePort = buff.readUInt16BE(); + return { + frameNumber, + remoteHost: { + host: remoteHost, + port: remotePort + }, + data: buff.readBuffer() + }; + } + setState(newState) { + if (this.state !== constants_1.SocksClientState.Error) { + this.state = newState; + } + } + connect(existingSocket) { + this.onDataReceived = (data) => this.onDataReceivedHandler(data); + this.onClose = () => this.onCloseHandler(); + this.onError = (err) => this.onErrorHandler(err); + this.onConnect = () => this.onConnectHandler(); + const timer = setTimeout(() => this.onEstablishedTimeout(), this.options.timeout || constants_1.DEFAULT_TIMEOUT); + if (timer.unref && typeof timer.unref === "function") { + timer.unref(); + } + if (existingSocket) { + this.socket = existingSocket; + } else { + this.socket = new net.Socket(); + } + this.socket.once("close", this.onClose); + this.socket.once("error", this.onError); + this.socket.once("connect", this.onConnect); + this.socket.on("data", this.onDataReceived); + this.setState(constants_1.SocksClientState.Connecting); + this.receiveBuffer = new receivebuffer_1.ReceiveBuffer(); + if (existingSocket) { + this.socket.emit("connect"); + } else { + this.socket.connect(this.getSocketOptions()); + if (this.options.set_tcp_nodelay !== void 0 && this.options.set_tcp_nodelay !== null) { + this.socket.setNoDelay(!!this.options.set_tcp_nodelay); + } + } + this.prependOnceListener("established", (info) => { + setImmediate(() => { + if (this.receiveBuffer.length > 0) { + const excessData = this.receiveBuffer.get(this.receiveBuffer.length); + info.socket.emit("data", excessData); + } + info.socket.resume(); + }); + }); + } + getSocketOptions() { + return Object.assign(Object.assign({}, this.options.socket_options), { host: this.options.proxy.host || this.options.proxy.ipaddress, port: this.options.proxy.port }); + } + onEstablishedTimeout() { + if (this.state !== constants_1.SocksClientState.Established && this.state !== constants_1.SocksClientState.BoundWaitingForConnection) { + this.closeSocket(constants_1.ERRORS.ProxyConnectionTimedOut); + } + } + onConnectHandler() { + this.setState(constants_1.SocksClientState.Connected); + if (this.options.proxy.type === 4) { + this.sendSocks4InitialHandshake(); + } else { + this.sendSocks5InitialHandshake(); + } + this.setState(constants_1.SocksClientState.SentInitialHandshake); + } + onDataReceivedHandler(data) { + this.receiveBuffer.append(data); + this.processData(); + } + processData() { + while (this.state !== constants_1.SocksClientState.Established && this.state !== constants_1.SocksClientState.Error && this.receiveBuffer.length >= this.nextRequiredPacketBufferSize) { + if (this.state === constants_1.SocksClientState.SentInitialHandshake) { + if (this.options.proxy.type === 4) { + this.handleSocks4FinalHandshakeResponse(); + } else { + this.handleInitialSocks5HandshakeResponse(); + } + } else if (this.state === constants_1.SocksClientState.SentAuthentication) { + this.handleInitialSocks5AuthenticationHandshakeResponse(); + } else if (this.state === constants_1.SocksClientState.SentFinalHandshake) { + this.handleSocks5FinalHandshakeResponse(); + } else if (this.state === constants_1.SocksClientState.BoundWaitingForConnection) { + if (this.options.proxy.type === 4) { + this.handleSocks4IncomingConnectionResponse(); + } else { + this.handleSocks5IncomingConnectionResponse(); + } + } else { + this.closeSocket(constants_1.ERRORS.InternalError); + break; + } + } + } + onCloseHandler() { + this.closeSocket(constants_1.ERRORS.SocketClosed); + } + onErrorHandler(err) { + this.closeSocket(err.message); + } + removeInternalSocketHandlers() { + this.socket.pause(); + this.socket.removeListener("data", this.onDataReceived); + this.socket.removeListener("close", this.onClose); + this.socket.removeListener("error", this.onError); + this.socket.removeListener("connect", this.onConnect); + } + closeSocket(err) { + if (this.state !== constants_1.SocksClientState.Error) { + this.setState(constants_1.SocksClientState.Error); + this.socket.destroy(); + this.removeInternalSocketHandlers(); + this.emit("error", new util_1.SocksClientError(err, this.options)); + } + } + sendSocks4InitialHandshake() { + const userId = this.options.proxy.userId || ""; + const buff = new smart_buffer_1.SmartBuffer(); + buff.writeUInt8(4); + buff.writeUInt8(constants_1.SocksCommand[this.options.command]); + buff.writeUInt16BE(this.options.destination.port); + if (net.isIPv4(this.options.destination.host)) { + buff.writeBuffer(ip.toBuffer(this.options.destination.host)); + buff.writeStringNT(userId); + } else { + buff.writeUInt8(0); + buff.writeUInt8(0); + buff.writeUInt8(0); + buff.writeUInt8(1); + buff.writeStringNT(userId); + buff.writeStringNT(this.options.destination.host); + } + this.nextRequiredPacketBufferSize = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks4Response; + this.socket.write(buff.toBuffer()); + } + handleSocks4FinalHandshakeResponse() { + const data = this.receiveBuffer.get(8); + if (data[1] !== constants_1.Socks4Response.Granted) { + this.closeSocket(`${constants_1.ERRORS.Socks4ProxyRejectedConnection} - (${constants_1.Socks4Response[data[1]]})`); + } else { + if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.bind) { + const buff = smart_buffer_1.SmartBuffer.fromBuffer(data); + buff.readOffset = 2; + const remoteHost = { + port: buff.readUInt16BE(), + host: ip.fromLong(buff.readUInt32BE()) + }; + if (remoteHost.host === "0.0.0.0") { + remoteHost.host = this.options.proxy.ipaddress; + } + this.setState(constants_1.SocksClientState.BoundWaitingForConnection); + this.emit("bound", { remoteHost, socket: this.socket }); + } else { + this.setState(constants_1.SocksClientState.Established); + this.removeInternalSocketHandlers(); + this.emit("established", { socket: this.socket }); + } + } + } + handleSocks4IncomingConnectionResponse() { + const data = this.receiveBuffer.get(8); + if (data[1] !== constants_1.Socks4Response.Granted) { + this.closeSocket(`${constants_1.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${constants_1.Socks4Response[data[1]]})`); + } else { + const buff = smart_buffer_1.SmartBuffer.fromBuffer(data); + buff.readOffset = 2; + const remoteHost = { + port: buff.readUInt16BE(), + host: ip.fromLong(buff.readUInt32BE()) + }; + this.setState(constants_1.SocksClientState.Established); + this.removeInternalSocketHandlers(); + this.emit("established", { remoteHost, socket: this.socket }); + } + } + sendSocks5InitialHandshake() { + const buff = new smart_buffer_1.SmartBuffer(); + const supportedAuthMethods = [constants_1.Socks5Auth.NoAuth]; + if (this.options.proxy.userId || this.options.proxy.password) { + supportedAuthMethods.push(constants_1.Socks5Auth.UserPass); + } + if (this.options.proxy.custom_auth_method !== void 0) { + supportedAuthMethods.push(this.options.proxy.custom_auth_method); + } + buff.writeUInt8(5); + buff.writeUInt8(supportedAuthMethods.length); + for (const authMethod of supportedAuthMethods) { + buff.writeUInt8(authMethod); + } + this.nextRequiredPacketBufferSize = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse; + this.socket.write(buff.toBuffer()); + this.setState(constants_1.SocksClientState.SentInitialHandshake); + } + handleInitialSocks5HandshakeResponse() { + const data = this.receiveBuffer.get(2); + if (data[0] !== 5) { + this.closeSocket(constants_1.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion); + } else if (data[1] === constants_1.SOCKS5_NO_ACCEPTABLE_AUTH) { + this.closeSocket(constants_1.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType); + } else { + if (data[1] === constants_1.Socks5Auth.NoAuth) { + this.socks5ChosenAuthType = constants_1.Socks5Auth.NoAuth; + this.sendSocks5CommandRequest(); + } else if (data[1] === constants_1.Socks5Auth.UserPass) { + this.socks5ChosenAuthType = constants_1.Socks5Auth.UserPass; + this.sendSocks5UserPassAuthentication(); + } else if (data[1] === this.options.proxy.custom_auth_method) { + this.socks5ChosenAuthType = this.options.proxy.custom_auth_method; + this.sendSocks5CustomAuthentication(); + } else { + this.closeSocket(constants_1.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType); + } + } + } + sendSocks5UserPassAuthentication() { + const userId = this.options.proxy.userId || ""; + const password = this.options.proxy.password || ""; + const buff = new smart_buffer_1.SmartBuffer(); + buff.writeUInt8(1); + buff.writeUInt8(Buffer.byteLength(userId)); + buff.writeString(userId); + buff.writeUInt8(Buffer.byteLength(password)); + buff.writeString(password); + this.nextRequiredPacketBufferSize = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse; + this.socket.write(buff.toBuffer()); + this.setState(constants_1.SocksClientState.SentAuthentication); + } + sendSocks5CustomAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + this.nextRequiredPacketBufferSize = this.options.proxy.custom_auth_response_size; + this.socket.write(yield this.options.proxy.custom_auth_request_handler()); + this.setState(constants_1.SocksClientState.SentAuthentication); + }); + } + handleSocks5CustomAuthHandshakeResponse(data) { + return __awaiter(this, void 0, void 0, function* () { + return yield this.options.proxy.custom_auth_response_handler(data); + }); + } + handleSocks5AuthenticationNoAuthHandshakeResponse(data) { + return __awaiter(this, void 0, void 0, function* () { + return data[1] === 0; + }); + } + handleSocks5AuthenticationUserPassHandshakeResponse(data) { + return __awaiter(this, void 0, void 0, function* () { + return data[1] === 0; + }); + } + handleInitialSocks5AuthenticationHandshakeResponse() { + return __awaiter(this, void 0, void 0, function* () { + this.setState(constants_1.SocksClientState.ReceivedAuthenticationResponse); + let authResult = false; + if (this.socks5ChosenAuthType === constants_1.Socks5Auth.NoAuth) { + authResult = yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2)); + } else if (this.socks5ChosenAuthType === constants_1.Socks5Auth.UserPass) { + authResult = yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2)); + } else if (this.socks5ChosenAuthType === this.options.proxy.custom_auth_method) { + authResult = yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size)); + } + if (!authResult) { + this.closeSocket(constants_1.ERRORS.Socks5AuthenticationFailed); + } else { + this.sendSocks5CommandRequest(); + } + }); + } + sendSocks5CommandRequest() { + const buff = new smart_buffer_1.SmartBuffer(); + buff.writeUInt8(5); + buff.writeUInt8(constants_1.SocksCommand[this.options.command]); + buff.writeUInt8(0); + if (net.isIPv4(this.options.destination.host)) { + buff.writeUInt8(constants_1.Socks5HostType.IPv4); + buff.writeBuffer(ip.toBuffer(this.options.destination.host)); + } else if (net.isIPv6(this.options.destination.host)) { + buff.writeUInt8(constants_1.Socks5HostType.IPv6); + buff.writeBuffer(ip.toBuffer(this.options.destination.host)); + } else { + buff.writeUInt8(constants_1.Socks5HostType.Hostname); + buff.writeUInt8(this.options.destination.host.length); + buff.writeString(this.options.destination.host); + } + buff.writeUInt16BE(this.options.destination.port); + this.nextRequiredPacketBufferSize = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader; + this.socket.write(buff.toBuffer()); + this.setState(constants_1.SocksClientState.SentFinalHandshake); + } + handleSocks5FinalHandshakeResponse() { + const header = this.receiveBuffer.peek(5); + if (header[0] !== 5 || header[1] !== constants_1.Socks5Response.Granted) { + this.closeSocket(`${constants_1.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${constants_1.Socks5Response[header[1]]}`); + } else { + const addressType = header[3]; + let remoteHost; + let buff; + if (addressType === constants_1.Socks5HostType.IPv4) { + const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4; + if (this.receiveBuffer.length < dataNeeded) { + this.nextRequiredPacketBufferSize = dataNeeded; + return; + } + buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4)); + remoteHost = { + host: ip.fromLong(buff.readUInt32BE()), + port: buff.readUInt16BE() + }; + if (remoteHost.host === "0.0.0.0") { + remoteHost.host = this.options.proxy.ipaddress; + } + } else if (addressType === constants_1.Socks5HostType.Hostname) { + const hostLength = header[4]; + const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(hostLength); + if (this.receiveBuffer.length < dataNeeded) { + this.nextRequiredPacketBufferSize = dataNeeded; + return; + } + buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(5)); + remoteHost = { + host: buff.readString(hostLength), + port: buff.readUInt16BE() + }; + } else if (addressType === constants_1.Socks5HostType.IPv6) { + const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6; + if (this.receiveBuffer.length < dataNeeded) { + this.nextRequiredPacketBufferSize = dataNeeded; + return; + } + buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4)); + remoteHost = { + host: ip.toString(buff.readBuffer(16)), + port: buff.readUInt16BE() + }; + } + this.setState(constants_1.SocksClientState.ReceivedFinalResponse); + if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.connect) { + this.setState(constants_1.SocksClientState.Established); + this.removeInternalSocketHandlers(); + this.emit("established", { remoteHost, socket: this.socket }); + } else if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.bind) { + this.setState(constants_1.SocksClientState.BoundWaitingForConnection); + this.nextRequiredPacketBufferSize = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader; + this.emit("bound", { remoteHost, socket: this.socket }); + } else if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.associate) { + this.setState(constants_1.SocksClientState.Established); + this.removeInternalSocketHandlers(); + this.emit("established", { + remoteHost, + socket: this.socket + }); + } + } + } + handleSocks5IncomingConnectionResponse() { + const header = this.receiveBuffer.peek(5); + if (header[0] !== 5 || header[1] !== constants_1.Socks5Response.Granted) { + this.closeSocket(`${constants_1.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${constants_1.Socks5Response[header[1]]}`); + } else { + const addressType = header[3]; + let remoteHost; + let buff; + if (addressType === constants_1.Socks5HostType.IPv4) { + const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4; + if (this.receiveBuffer.length < dataNeeded) { + this.nextRequiredPacketBufferSize = dataNeeded; + return; + } + buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4)); + remoteHost = { + host: ip.fromLong(buff.readUInt32BE()), + port: buff.readUInt16BE() + }; + if (remoteHost.host === "0.0.0.0") { + remoteHost.host = this.options.proxy.ipaddress; + } + } else if (addressType === constants_1.Socks5HostType.Hostname) { + const hostLength = header[4]; + const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(hostLength); + if (this.receiveBuffer.length < dataNeeded) { + this.nextRequiredPacketBufferSize = dataNeeded; + return; + } + buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(5)); + remoteHost = { + host: buff.readString(hostLength), + port: buff.readUInt16BE() + }; + } else if (addressType === constants_1.Socks5HostType.IPv6) { + const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6; + if (this.receiveBuffer.length < dataNeeded) { + this.nextRequiredPacketBufferSize = dataNeeded; + return; + } + buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4)); + remoteHost = { + host: ip.toString(buff.readBuffer(16)), + port: buff.readUInt16BE() + }; + } + this.setState(constants_1.SocksClientState.Established); + this.removeInternalSocketHandlers(); + this.emit("established", { remoteHost, socket: this.socket }); + } + } + get socksClientOptions() { + return Object.assign({}, this.options); + } + }; + exports2.SocksClient = SocksClient; + } +}); + +// ../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/index.js +var require_build = __commonJS({ + "../../node_modules/.pnpm/socks@2.6.1/node_modules/socks/build/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar(require_socksclient(), exports2); + } +}); + +// ../../node_modules/.pnpm/socks-proxy-agent@5.0.1/node_modules/socks-proxy-agent/dist/agent.js +var require_agent3 = __commonJS({ + "../../node_modules/.pnpm/socks-proxy-agent@5.0.1/node_modules/socks-proxy-agent/dist/agent.js"(exports2) { + "use strict"; + var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var dns_1 = __importDefault(require("dns")); + var tls_1 = __importDefault(require("tls")); + var url_1 = __importDefault(require("url")); + var debug_1 = __importDefault(require_src()); + var agent_base_1 = require_src3(); + var socks_1 = require_build(); + var debug = debug_1.default("socks-proxy-agent"); + function dnsLookup(host) { + return new Promise((resolve, reject) => { + dns_1.default.lookup(host, (err, res) => { + if (err) { + reject(err); + } else { + resolve(res); + } + }); + }); + } + function parseSocksProxy(opts) { + let port = 0; + let lookup = false; + let type = 5; + const host = opts.hostname || opts.host; + if (!host) { + throw new TypeError('No "host"'); + } + if (typeof opts.port === "number") { + port = opts.port; + } else if (typeof opts.port === "string") { + port = parseInt(opts.port, 10); + } + if (!port) { + port = 1080; + } + if (opts.protocol) { + switch (opts.protocol.replace(":", "")) { + case "socks4": + lookup = true; + case "socks4a": + type = 4; + break; + case "socks5": + lookup = true; + case "socks": + case "socks5h": + type = 5; + break; + default: + throw new TypeError(`A "socks" protocol must be specified! Got: ${opts.protocol}`); + } + } + if (typeof opts.type !== "undefined") { + if (opts.type === 4 || opts.type === 5) { + type = opts.type; + } else { + throw new TypeError(`"type" must be 4 or 5, got: ${opts.type}`); + } + } + const proxy = { + host, + port, + type + }; + let userId = opts.userId || opts.username; + let password = opts.password; + if (opts.auth) { + const auth = opts.auth.split(":"); + userId = auth[0]; + password = auth[1]; + } + if (userId) { + Object.defineProperty(proxy, "userId", { + value: userId, + enumerable: false + }); + } + if (password) { + Object.defineProperty(proxy, "password", { + value: password, + enumerable: false + }); + } + return { lookup, proxy }; + } + var SocksProxyAgent = class extends agent_base_1.Agent { + constructor(_opts) { + let opts; + if (typeof _opts === "string") { + opts = url_1.default.parse(_opts); + } else { + opts = _opts; + } + if (!opts) { + throw new TypeError("a SOCKS proxy server `host` and `port` must be specified!"); + } + super(opts); + const parsedProxy = parseSocksProxy(opts); + this.lookup = parsedProxy.lookup; + this.proxy = parsedProxy.proxy; + } + callback(req, opts) { + return __awaiter(this, void 0, void 0, function* () { + const { lookup, proxy } = this; + let { host, port, timeout } = opts; + if (!host) { + throw new Error("No `host` defined!"); + } + if (lookup) { + host = yield dnsLookup(host); + } + const socksOpts = { + proxy, + destination: { host, port }, + command: "connect", + timeout + }; + debug("Creating socks proxy connection: %o", socksOpts); + const { socket } = yield socks_1.SocksClient.createConnection(socksOpts); + debug("Successfully created socks proxy connection"); + if (opts.secureEndpoint) { + debug("Upgrading socket connection to TLS"); + const servername = opts.servername || host; + return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, "host", "hostname", "path", "port")), { + socket, + servername + })); + } + return socket; + }); + } + }; + exports2.default = SocksProxyAgent; + function omit(obj, ...keys) { + const ret = {}; + let key; + for (key in obj) { + if (!keys.includes(key)) { + ret[key] = obj[key]; + } + } + return ret; + } + } +}); + +// ../../node_modules/.pnpm/socks-proxy-agent@5.0.1/node_modules/socks-proxy-agent/dist/index.js +var require_dist5 = __commonJS({ + "../../node_modules/.pnpm/socks-proxy-agent@5.0.1/node_modules/socks-proxy-agent/dist/index.js"(exports2, module2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + var agent_1 = __importDefault(require_agent3()); + function createSocksProxyAgent(opts) { + return new agent_1.default(opts); + } + (function(createSocksProxyAgent2) { + createSocksProxyAgent2.SocksProxyAgent = agent_1.default; + createSocksProxyAgent2.prototype = agent_1.default.prototype; + })(createSocksProxyAgent || (createSocksProxyAgent = {})); + module2.exports = createSocksProxyAgent; + } +}); + +// ../npm-registry-agent/lib/index.js +var require_lib28 = __commonJS({ + "../npm-registry-agent/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var url_1 = require("url"); + var agentkeepalive_1 = __importDefault(require_agentkeepalive()); + var http_proxy_agent_1 = __importDefault(require_dist4()); + var https_proxy_agent_1 = __importDefault(require_https_proxy_agent()); + var lru_cache_1 = __importDefault(require_lru_cache()); + var socks_proxy_agent_1 = __importDefault(require_dist5()); + var HttpsAgent = agentkeepalive_1.default.HttpsAgent; + var DEFAULT_MAX_SOCKETS = 50; + var AGENT_CACHE = new lru_cache_1.default({ max: 50 }); + function getAgent(uri, opts) { + var _a, _b, _c; + const parsedUri = new url_1.URL(uri); + const isHttps = parsedUri.protocol === "https:"; + const pxuri = getProxyUri(uri, opts); + const key = [ + `https:${isHttps.toString()}`, + pxuri ? `proxy:${pxuri.protocol}//${pxuri.host}:${pxuri.port}` : ">no-proxy<", + `local-address:${(_a = opts.localAddress) !== null && _a !== void 0 ? _a : ">no-local-address<"}`, + `strict-ssl:${isHttps ? Boolean(opts.strictSsl).toString() : ">no-strict-ssl<"}`, + `ca:${isHttps && opts.ca || ">no-ca<"}`, + `cert:${isHttps && opts.cert || ">no-cert<"}`, + `key:${isHttps && opts.key || ">no-key<"}` + ].join(":"); + if (AGENT_CACHE.peek(key)) { + return AGENT_CACHE.get(key); + } + if (pxuri) { + const proxy = getProxy(pxuri, opts, isHttps); + AGENT_CACHE.set(key, proxy); + return proxy; + } + const agentTimeout = typeof opts.timeout !== "number" || opts.timeout === 0 ? 0 : opts.timeout + 1; + const agent = isHttps ? new HttpsAgent({ + ca: opts.ca, + cert: opts.cert, + key: opts.key, + localAddress: opts.localAddress, + maxSockets: (_b = opts.maxSockets) !== null && _b !== void 0 ? _b : DEFAULT_MAX_SOCKETS, + rejectUnauthorized: opts.strictSsl, + timeout: agentTimeout + }) : new agentkeepalive_1.default({ + localAddress: opts.localAddress, + maxSockets: (_c = opts.maxSockets) !== null && _c !== void 0 ? _c : DEFAULT_MAX_SOCKETS, + timeout: agentTimeout + }); + AGENT_CACHE.set(key, agent); + return agent; + } + exports2.default = getAgent; + function checkNoProxy(uri, opts) { + const host = new url_1.URL(uri).hostname.split(".").filter((x) => x).reverse(); + if (typeof opts.noProxy === "string") { + const noproxyArr = opts.noProxy.split(/\s*,\s*/g); + return noproxyArr.some((no) => { + const noParts = no.split(".").filter((x) => x).reverse(); + if (noParts.length === 0) { + return false; + } + for (let i = 0; i < noParts.length; i++) { + if (host[i] !== noParts[i]) { + return false; + } + } + return true; + }); + } + return opts.noProxy; + } + function getProxyUri(uri, opts) { + const { protocol } = new url_1.URL(uri); + let proxy; + switch (protocol) { + case "http:": { + proxy = opts.httpProxy; + break; + } + case "https:": { + proxy = opts.httpsProxy; + break; + } + } + if (!proxy) { + return null; + } + if (!proxy.includes("://")) { + proxy = `${protocol}//${proxy}`; + } + const parsedProxy = typeof proxy === "string" ? new url_1.URL(proxy) : proxy; + return !checkNoProxy(uri, opts) && parsedProxy; + } + function getProxy(proxyUrl, opts, isHttps) { + var _a, _b; + const popts = { + auth: proxyUrl.username ? proxyUrl.password ? `${proxyUrl.username}:${proxyUrl.password}` : proxyUrl.username : void 0, + ca: opts.ca, + cert: opts.cert, + host: proxyUrl.hostname, + key: opts.key, + localAddress: opts.localAddress, + maxSockets: (_a = opts.maxSockets) !== null && _a !== void 0 ? _a : DEFAULT_MAX_SOCKETS, + path: proxyUrl.pathname, + port: proxyUrl.port, + protocol: proxyUrl.protocol, + rejectUnauthorized: opts.strictSsl, + timeout: typeof opts.timeout !== "number" || opts.timeout === 0 ? 0 : opts.timeout + 1 + }; + if (proxyUrl.protocol === "http:" || proxyUrl.protocol === "https:") { + if (!isHttps) { + return http_proxy_agent_1.default(popts); + } else { + return new https_proxy_agent_1.default(popts); + } + } + if ((_b = proxyUrl.protocol) === null || _b === void 0 ? void 0 : _b.startsWith("socks")) { + return new socks_proxy_agent_1.default(popts); + } + } + } +}); + +// ../fetch/lib/fetchFromRegistry.js +var require_fetchFromRegistry = __commonJS({ + "../fetch/lib/fetchFromRegistry.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var url_1 = require("url"); + var npm_registry_agent_1 = __importDefault(require_lib28()); + var fetch_1 = __importStar2(require_fetch()); + var USER_AGENT = "pnpm"; + var CORGI_DOC = "application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"; + var JSON_DOC = "application/json"; + var MAX_FOLLOWED_REDIRECTS = 20; + function default_1(defaultOpts) { + return async (url, opts) => { + var _a, _b, _c; + const headers = { + "user-agent": USER_AGENT, + ...getHeaders({ + auth: opts === null || opts === void 0 ? void 0 : opts.authHeaderValue, + fullMetadata: defaultOpts.fullMetadata, + userAgent: defaultOpts.userAgent + }) + }; + let redirects = 0; + let urlObject = new url_1.URL(url); + const originalHost = urlObject.host; + while (true) { + const agent = npm_registry_agent_1.default(urlObject.href, { + ...defaultOpts, + ...opts, + strictSsl: (_a = defaultOpts.strictSsl) !== null && _a !== void 0 ? _a : true + }); + headers["connection"] = agent ? "keep-alive" : "close"; + const response = await fetch_1.default(urlObject, { + agent, + compress: (_b = opts === null || opts === void 0 ? void 0 : opts.compress) !== null && _b !== void 0 ? _b : false, + headers, + redirect: "manual", + retry: opts === null || opts === void 0 ? void 0 : opts.retry, + timeout: (_c = opts === null || opts === void 0 ? void 0 : opts.timeout) !== null && _c !== void 0 ? _c : 6e4 + }); + if (!fetch_1.isRedirect(response.status) || redirects >= MAX_FOLLOWED_REDIRECTS) { + return response; + } + redirects++; + urlObject = new url_1.URL(response.headers.get("location")); + if (!headers["authorization"] || originalHost === urlObject.host) + continue; + delete headers.authorization; + } + }; + } + exports2.default = default_1; + function getHeaders(opts) { + const headers = { + accept: opts.fullMetadata === true ? JSON_DOC : CORGI_DOC + }; + if (opts.auth) { + headers["authorization"] = opts.auth; + } + if (opts.userAgent) { + headers["user-agent"] = opts.userAgent; + } + return headers; + } + } +}); + +// ../fetch/lib/index.js +var require_lib29 = __commonJS({ + "../fetch/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createFetchFromRegistry = void 0; + var fetch_1 = __importDefault(require_fetch()); + var fetchFromRegistry_1 = __importDefault(require_fetchFromRegistry()); + exports2.createFetchFromRegistry = fetchFromRegistry_1.default; + exports2.default = fetch_1.default; + } +}); + +// ../../node_modules/.pnpm/cmd-extension@1.0.2/node_modules/cmd-extension/index.js +var require_cmd_extension = __commonJS({ + "../../node_modules/.pnpm/cmd-extension@1.0.2/node_modules/cmd-extension/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var cmdExtension; + if (process.env.PATHEXT) { + cmdExtension = process.env.PATHEXT.split(path.delimiter).find((ext) => ext.toUpperCase() === ".CMD"); + } + module2.exports = cmdExtension || ".cmd"; + } +}); + +// ../../node_modules/.pnpm/@zkochan+cmd-shim@5.2.1/node_modules/@zkochan/cmd-shim/index.js +var require_cmd_shim = __commonJS({ + "../../node_modules/.pnpm/@zkochan+cmd-shim@5.2.1/node_modules/@zkochan/cmd-shim/index.js"(exports2, module2) { + "use strict"; + cmdShim.ifExists = cmdShimIfExists; + var util_1 = require("util"); + var path = require("path"); + var isWindows = require_is_windows(); + var CMD_EXTENSION = require_cmd_extension(); + var shebangExpr = /^#!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/; + var DEFAULT_OPTIONS = { + createPwshFile: true, + createCmdFile: isWindows(), + fs: require("fs") + }; + var extensionToProgramMap = new Map([ + [".js", "node"], + [".cjs", "node"], + [".mjs", "node"], + [".cmd", "cmd"], + [".bat", "cmd"], + [".ps1", "pwsh"], + [".sh", "sh"] + ]); + function ingestOptions(opts) { + const opts_ = { ...DEFAULT_OPTIONS, ...opts }; + const fs = opts_.fs; + opts_.fs_ = { + chmod: fs.chmod ? util_1.promisify(fs.chmod) : async () => { + }, + mkdir: util_1.promisify(fs.mkdir), + readFile: util_1.promisify(fs.readFile), + stat: util_1.promisify(fs.stat), + unlink: util_1.promisify(fs.unlink), + writeFile: util_1.promisify(fs.writeFile) + }; + return opts_; + } + async function cmdShim(src, to, opts) { + const opts_ = ingestOptions(opts); + await opts_.fs_.stat(src); + await cmdShim_(src, to, opts_); + } + function cmdShimIfExists(src, to, opts) { + return cmdShim(src, to, opts).catch(() => { + }); + } + function rm(path2, opts) { + return opts.fs_.unlink(path2).catch(() => { + }); + } + async function cmdShim_(src, to, opts) { + const srcRuntimeInfo = await searchScriptRuntime(src, opts); + await writeShimsPreCommon(to, opts); + return writeAllShims(src, to, srcRuntimeInfo, opts); + } + function writeShimsPreCommon(target, opts) { + return opts.fs_.mkdir(path.dirname(target), { recursive: true }); + } + function writeAllShims(src, to, srcRuntimeInfo, opts) { + const opts_ = ingestOptions(opts); + const generatorAndExts = [{ generator: generateShShim, extension: "" }]; + if (opts_.createCmdFile) { + generatorAndExts.push({ generator: generateCmdShim, extension: CMD_EXTENSION }); + } + if (opts_.createPwshFile) { + generatorAndExts.push({ generator: generatePwshShim, extension: ".ps1" }); + } + return Promise.all(generatorAndExts.map((generatorAndExt) => writeShim(src, to + generatorAndExt.extension, srcRuntimeInfo, generatorAndExt.generator, opts_))); + } + function writeShimPre(target, opts) { + return rm(target, opts); + } + function writeShimPost(target, opts) { + return chmodShim(target, opts); + } + async function searchScriptRuntime(target, opts) { + const data = await opts.fs_.readFile(target, "utf8"); + const firstLine = data.trim().split(/\r*\n/)[0]; + const shebang = firstLine.match(shebangExpr); + if (!shebang) { + const targetExtension = path.extname(target).toLowerCase(); + return { + program: extensionToProgramMap.get(targetExtension) || null, + additionalArgs: "" + }; + } + return { + program: shebang[1], + additionalArgs: shebang[2] + }; + } + async function writeShim(src, to, srcRuntimeInfo, generateShimScript, opts) { + const defaultArgs = opts.preserveSymlinks ? "--preserve-symlinks" : ""; + const args2 = [srcRuntimeInfo.additionalArgs, defaultArgs].filter((arg) => arg).join(" "); + opts = Object.assign({}, opts, { + prog: srcRuntimeInfo.program, + args: args2 + }); + await writeShimPre(to, opts); + await opts.fs_.writeFile(to, generateShimScript(src, to, opts), "utf8"); + return writeShimPost(to, opts); + } + function generateCmdShim(src, to, opts) { + const shTarget = path.relative(path.dirname(to), src); + let target = shTarget.split("/").join("\\"); + const quotedPathToTarget = path.isAbsolute(target) ? `"${target}"` : `"%~dp0\\${target}"`; + let longProg; + let prog = opts.prog; + let args2 = opts.args || ""; + const nodePath = normalizePathEnvVar(opts.nodePath).win32; + if (!prog) { + prog = quotedPathToTarget; + args2 = ""; + target = ""; + } else if (prog === "node" && opts.nodeExecPath) { + prog = `"${opts.nodeExecPath}"`; + target = quotedPathToTarget; + } else { + longProg = `"%~dp0\\${prog}.exe"`; + target = quotedPathToTarget; + } + let progArgs = opts.progArgs ? `${opts.progArgs.join(` `)} ` : ""; + let cmd = "@SETLOCAL\r\n"; + if (nodePath) { + cmd += `@IF NOT DEFINED NODE_PATH (\r + @SET "NODE_PATH=${nodePath}"\r +) ELSE (\r + @SET "NODE_PATH=%NODE_PATH%;${nodePath}"\r +)\r +`; + } + if (longProg) { + cmd += `@IF EXIST ${longProg} (\r + ${longProg} ${args2} ${target} ${progArgs}%*\r +) ELSE (\r + @SET PATHEXT=%PATHEXT:;.JS;=;%\r + ${prog} ${args2} ${target} ${progArgs}%*\r +)\r +`; + } else { + cmd += `@${prog} ${args2} ${target} ${progArgs}%*\r +`; + } + return cmd; + } + function generateShShim(src, to, opts) { + let shTarget = path.relative(path.dirname(to), src); + let shProg = opts.prog && opts.prog.split("\\").join("/"); + let shLongProg; + shTarget = shTarget.split("\\").join("/"); + const quotedPathToTarget = path.isAbsolute(shTarget) ? `"${shTarget}"` : `"$basedir/${shTarget}"`; + let args2 = opts.args || ""; + const shNodePath = normalizePathEnvVar(opts.nodePath).posix; + if (!shProg) { + shProg = quotedPathToTarget; + args2 = ""; + shTarget = ""; + } else if (opts.prog === "node" && opts.nodeExecPath) { + shProg = `"${opts.nodeExecPath}"`; + shTarget = quotedPathToTarget; + } else { + shLongProg = `"$basedir/${opts.prog}"`; + shTarget = quotedPathToTarget; + } + let progArgs = opts.progArgs ? `${opts.progArgs.join(` `)} ` : ""; + let sh = `#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')") + +case \`uname\` in + *CYGWIN*) basedir=\`cygpath -w "$basedir"\`;; +esac + +`; + if (opts.nodePath) { + sh += `if [ -z "$NODE_PATH" ]; then + export NODE_PATH="${shNodePath}" +else + export NODE_PATH="$NODE_PATH:${shNodePath}" +fi +`; + } + if (shLongProg) { + sh += `if [ -x ${shLongProg} ]; then + exec ${shLongProg} ${args2} ${shTarget} ${progArgs}"$@" +else + exec ${shProg} ${args2} ${shTarget} ${progArgs}"$@" +fi +`; + } else { + sh += `${shProg} ${args2} ${shTarget} ${progArgs}"$@" +exit $? +`; + } + return sh; + } + function generatePwshShim(src, to, opts) { + let shTarget = path.relative(path.dirname(to), src); + const shProg = opts.prog && opts.prog.split("\\").join("/"); + let pwshProg = shProg && `"${shProg}$exe"`; + let pwshLongProg; + shTarget = shTarget.split("\\").join("/"); + const quotedPathToTarget = path.isAbsolute(shTarget) ? `"${shTarget}"` : `"$basedir/${shTarget}"`; + let args2 = opts.args || ""; + let normalizedPathEnvVar = normalizePathEnvVar(opts.nodePath); + const nodePath = normalizedPathEnvVar.win32; + const shNodePath = normalizedPathEnvVar.posix; + if (!pwshProg) { + pwshProg = quotedPathToTarget; + args2 = ""; + shTarget = ""; + } else if (opts.prog === "node" && opts.nodeExecPath) { + pwshProg = `"${opts.nodeExecPath}"`; + shTarget = quotedPathToTarget; + } else { + pwshLongProg = `"$basedir/${opts.prog}$exe"`; + shTarget = quotedPathToTarget; + } + let progArgs = opts.progArgs ? `${opts.progArgs.join(` `)} ` : ""; + let pwsh = `#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +${opts.nodePath ? `$pathsep=":" +$env_node_path=$env:NODE_PATH +$new_node_path="${nodePath}" +` : ""}if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +${opts.nodePath ? ' $pathsep=";"\n' : ""}}`; + if (opts.nodePath) { + pwsh += ` else { + $new_node_path="${shNodePath}" +} +if ([string]::IsNullOrEmpty($env_node_path)) { + $env:NODE_PATH=$new_node_path +} else { + $env:NODE_PATH="$env_node_path$pathsep$new_node_path" +} +`; + } + if (pwshLongProg) { + pwsh += ` +$ret=0 +if (Test-Path ${pwshLongProg}) { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & ${pwshLongProg} ${args2} ${shTarget} ${progArgs}$args + } else { + & ${pwshLongProg} ${args2} ${shTarget} ${progArgs}$args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & ${pwshProg} ${args2} ${shTarget} ${progArgs}$args + } else { + & ${pwshProg} ${args2} ${shTarget} ${progArgs}$args + } + $ret=$LASTEXITCODE +} +${opts.nodePath ? "$env:NODE_PATH=$env_node_path\n" : ""}exit $ret +`; + } else { + pwsh += ` +# Support pipeline input +if ($MyInvocation.ExpectingInput) { + $input | & ${pwshProg} ${args2} ${shTarget} ${progArgs}$args +} else { + & ${pwshProg} ${args2} ${shTarget} ${progArgs}$args +} +${opts.nodePath ? "$env:NODE_PATH=$env_node_path\n" : ""}exit $LASTEXITCODE +`; + } + return pwsh; + } + function chmodShim(to, opts) { + return opts.fs_.chmod(to, 493); + } + function normalizePathEnvVar(nodePath) { + if (!nodePath) { + return { + win32: "", + posix: "" + }; + } + let split = typeof nodePath === "string" ? nodePath.split(path.delimiter) : Array.from(nodePath); + let result = {}; + for (let i = 0; i < split.length; i++) { + const win32 = split[i].split("/").join("\\"); + const posix = isWindows() ? split[i].split("\\").join("/").replace(/^([^:\\/]*):/, (_, $1) => `/mnt/${$1.toLowerCase()}`) : split[i]; + result.win32 = result.win32 ? `${result.win32};${win32}` : win32; + result.posix = result.posix ? `${result.posix}:${posix}` : posix; + result[i] = { win32, posix }; + } + return result; + } + module2.exports = cmdShim; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_freeGlobal.js +var require_freeGlobal = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_freeGlobal.js"(exports2, module2) { + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + module2.exports = freeGlobal; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js +var require_root = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js"(exports2, module2) { + var freeGlobal = require_freeGlobal(); + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + module2.exports = root; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js +var require_Symbol = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js"(exports2, module2) { + var root = require_root(); + var Symbol2 = root.Symbol; + module2.exports = Symbol2; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getRawTag.js +var require_getRawTag = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getRawTag.js"(exports2, module2) { + var Symbol2 = require_Symbol(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + var nativeObjectToString = objectProto.toString; + var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0; + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; + try { + value[symToStringTag] = void 0; + var unmasked = true; + } catch (e) { + } + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + module2.exports = getRawTag; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_objectToString.js +var require_objectToString = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_objectToString.js"(exports2, module2) { + var objectProto = Object.prototype; + var nativeObjectToString = objectProto.toString; + function objectToString(value) { + return nativeObjectToString.call(value); + } + module2.exports = objectToString; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js +var require_baseGetTag = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js"(exports2, module2) { + var Symbol2 = require_Symbol(); + var getRawTag = require_getRawTag(); + var objectToString = require_objectToString(); + var nullTag = "[object Null]"; + var undefinedTag = "[object Undefined]"; + var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0; + function baseGetTag(value) { + if (value == null) { + return value === void 0 ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); + } + module2.exports = baseGetTag; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js +var require_isObject2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js"(exports2, module2) { + function isObject(value) { + var type = typeof value; + return value != null && (type == "object" || type == "function"); + } + module2.exports = isObject; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isFunction.js +var require_isFunction2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isFunction.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isObject = require_isObject2(); + var asyncTag = "[object AsyncFunction]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var proxyTag = "[object Proxy]"; + function isFunction(value) { + if (!isObject(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + module2.exports = isFunction; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_coreJsData.js +var require_coreJsData = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_coreJsData.js"(exports2, module2) { + var root = require_root(); + var coreJsData = root["__core-js_shared__"]; + module2.exports = coreJsData; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isMasked.js +var require_isMasked = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isMasked.js"(exports2, module2) { + var coreJsData = require_coreJsData(); + var maskSrcKey = function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; + }(); + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + module2.exports = isMasked; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toSource.js +var require_toSource = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toSource.js"(exports2, module2) { + var funcProto = Function.prototype; + var funcToString = funcProto.toString; + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) { + } + try { + return func + ""; + } catch (e) { + } + } + return ""; + } + module2.exports = toSource; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNative.js +var require_baseIsNative = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNative.js"(exports2, module2) { + var isFunction = require_isFunction2(); + var isMasked = require_isMasked(); + var isObject = require_isObject2(); + var toSource = require_toSource(); + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var reIsHostCtor = /^\[object .+?Constructor\]$/; + var funcProto = Function.prototype; + var objectProto = Object.prototype; + var funcToString = funcProto.toString; + var hasOwnProperty = objectProto.hasOwnProperty; + var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"); + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + module2.exports = baseIsNative; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getValue.js +var require_getValue = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getValue.js"(exports2, module2) { + function getValue(object, key) { + return object == null ? void 0 : object[key]; + } + module2.exports = getValue; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getNative.js +var require_getNative = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getNative.js"(exports2, module2) { + var baseIsNative = require_baseIsNative(); + var getValue = require_getValue(); + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : void 0; + } + module2.exports = getNative; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_defineProperty.js +var require_defineProperty = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_defineProperty.js"(exports2, module2) { + var getNative = require_getNative(); + var defineProperty = function() { + try { + var func = getNative(Object, "defineProperty"); + func({}, "", {}); + return func; + } catch (e) { + } + }(); + module2.exports = defineProperty; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignValue.js +var require_baseAssignValue = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignValue.js"(exports2, module2) { + var defineProperty = require_defineProperty(); + function baseAssignValue(object, key, value) { + if (key == "__proto__" && defineProperty) { + defineProperty(object, key, { + "configurable": true, + "enumerable": true, + "value": value, + "writable": true + }); + } else { + object[key] = value; + } + } + module2.exports = baseAssignValue; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createBaseFor.js +var require_createBaseFor = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createBaseFor.js"(exports2, module2) { + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + module2.exports = createBaseFor; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFor.js +var require_baseFor = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFor.js"(exports2, module2) { + var createBaseFor = require_createBaseFor(); + var baseFor = createBaseFor(); + module2.exports = baseFor; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTimes.js +var require_baseTimes = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTimes.js"(exports2, module2) { + function baseTimes(n, iteratee) { + var index = -1, result = Array(n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + module2.exports = baseTimes; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js +var require_isObjectLike = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js"(exports2, module2) { + function isObjectLike(value) { + return value != null && typeof value == "object"; + } + module2.exports = isObjectLike; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsArguments.js +var require_baseIsArguments = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsArguments.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isObjectLike = require_isObjectLike(); + var argsTag = "[object Arguments]"; + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + module2.exports = baseIsArguments; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArguments.js +var require_isArguments2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArguments.js"(exports2, module2) { + var baseIsArguments = require_baseIsArguments(); + var isObjectLike = require_isObjectLike(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var isArguments = baseIsArguments(function() { + return arguments; + }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee"); + }; + module2.exports = isArguments; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js +var require_isArray2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js"(exports2, module2) { + var isArray = Array.isArray; + module2.exports = isArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/stubFalse.js +var require_stubFalse = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/stubFalse.js"(exports2, module2) { + function stubFalse() { + return false; + } + module2.exports = stubFalse; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBuffer.js +var require_isBuffer = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBuffer.js"(exports2, module2) { + var root = require_root(); + var stubFalse = require_stubFalse(); + var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2; + var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2; + var moduleExports = freeModule && freeModule.exports === freeExports; + var Buffer2 = moduleExports ? root.Buffer : void 0; + var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0; + var isBuffer = nativeIsBuffer || stubFalse; + module2.exports = isBuffer; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIndex.js +var require_isIndex = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIndex.js"(exports2, module2) { + var MAX_SAFE_INTEGER = 9007199254740991; + var reIsUint = /^(?:0|[1-9]\d*)$/; + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); + } + module2.exports = isIndex; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isLength.js +var require_isLength = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isLength.js"(exports2, module2) { + var MAX_SAFE_INTEGER = 9007199254740991; + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + module2.exports = isLength; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsTypedArray.js +var require_baseIsTypedArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsTypedArray.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isLength = require_isLength(); + var isObjectLike = require_isObjectLike(); + var argsTag = "[object Arguments]"; + var arrayTag = "[object Array]"; + var boolTag = "[object Boolean]"; + var dateTag = "[object Date]"; + var errorTag = "[object Error]"; + var funcTag = "[object Function]"; + var mapTag = "[object Map]"; + var numberTag = "[object Number]"; + var objectTag = "[object Object]"; + var regexpTag = "[object RegExp]"; + var setTag = "[object Set]"; + var stringTag = "[object String]"; + var weakMapTag = "[object WeakMap]"; + var arrayBufferTag = "[object ArrayBuffer]"; + var dataViewTag = "[object DataView]"; + var float32Tag = "[object Float32Array]"; + var float64Tag = "[object Float64Array]"; + var int8Tag = "[object Int8Array]"; + var int16Tag = "[object Int16Array]"; + var int32Tag = "[object Int32Array]"; + var uint8Tag = "[object Uint8Array]"; + var uint8ClampedTag = "[object Uint8ClampedArray]"; + var uint16Tag = "[object Uint16Array]"; + var uint32Tag = "[object Uint32Array]"; + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + module2.exports = baseIsTypedArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js +var require_baseUnary = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js"(exports2, module2) { + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + module2.exports = baseUnary; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nodeUtil.js +var require_nodeUtil = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nodeUtil.js"(exports2, module2) { + var freeGlobal = require_freeGlobal(); + var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2; + var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2; + var moduleExports = freeModule && freeModule.exports === freeExports; + var freeProcess = moduleExports && freeGlobal.process; + var nodeUtil = function() { + try { + var types = freeModule && freeModule.require && freeModule.require("util").types; + if (types) { + return types; + } + return freeProcess && freeProcess.binding && freeProcess.binding("util"); + } catch (e) { + } + }(); + module2.exports = nodeUtil; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isTypedArray.js +var require_isTypedArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isTypedArray.js"(exports2, module2) { + var baseIsTypedArray = require_baseIsTypedArray(); + var baseUnary = require_baseUnary(); + var nodeUtil = require_nodeUtil(); + var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + module2.exports = isTypedArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayLikeKeys.js +var require_arrayLikeKeys = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayLikeKeys.js"(exports2, module2) { + var baseTimes = require_baseTimes(); + var isArguments = require_isArguments2(); + var isArray = require_isArray2(); + var isBuffer = require_isBuffer(); + var isIndex = require_isIndex(); + var isTypedArray = require_isTypedArray(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) { + result.push(key); + } + } + return result; + } + module2.exports = arrayLikeKeys; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isPrototype.js +var require_isPrototype = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isPrototype.js"(exports2, module2) { + var objectProto = Object.prototype; + function isPrototype(value) { + var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto; + return value === proto; + } + module2.exports = isPrototype; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overArg.js +var require_overArg = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overArg.js"(exports2, module2) { + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + module2.exports = overArg; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeKeys.js +var require_nativeKeys = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeKeys.js"(exports2, module2) { + var overArg = require_overArg(); + var nativeKeys = overArg(Object.keys, Object); + module2.exports = nativeKeys; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeys.js +var require_baseKeys = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeys.js"(exports2, module2) { + var isPrototype = require_isPrototype(); + var nativeKeys = require_nativeKeys(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != "constructor") { + result.push(key); + } + } + return result; + } + module2.exports = baseKeys; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js +var require_isArrayLike3 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js"(exports2, module2) { + var isFunction = require_isFunction2(); + var isLength = require_isLength(); + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + module2.exports = isArrayLike; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keys.js +var require_keys2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keys.js"(exports2, module2) { + var arrayLikeKeys = require_arrayLikeKeys(); + var baseKeys = require_baseKeys(); + var isArrayLike = require_isArrayLike3(); + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + module2.exports = keys; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseForOwn.js +var require_baseForOwn = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseForOwn.js"(exports2, module2) { + var baseFor = require_baseFor(); + var keys = require_keys2(); + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + module2.exports = baseForOwn; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheClear.js +var require_listCacheClear = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheClear.js"(exports2, module2) { + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + module2.exports = listCacheClear; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js +var require_eq2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js"(exports2, module2) { + function eq(value, other) { + return value === other || value !== value && other !== other; + } + module2.exports = eq; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js +var require_assocIndexOf = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js"(exports2, module2) { + var eq = require_eq2(); + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + module2.exports = assocIndexOf; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js +var require_listCacheDelete = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js"(exports2, module2) { + var assocIndexOf = require_assocIndexOf(); + var arrayProto = Array.prototype; + var splice = arrayProto.splice; + function listCacheDelete(key) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + module2.exports = listCacheDelete; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheGet.js +var require_listCacheGet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheGet.js"(exports2, module2) { + var assocIndexOf = require_assocIndexOf(); + function listCacheGet(key) { + var data = this.__data__, index = assocIndexOf(data, key); + return index < 0 ? void 0 : data[index][1]; + } + module2.exports = listCacheGet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheHas.js +var require_listCacheHas = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheHas.js"(exports2, module2) { + var assocIndexOf = require_assocIndexOf(); + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + module2.exports = listCacheHas; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheSet.js +var require_listCacheSet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheSet.js"(exports2, module2) { + var assocIndexOf = require_assocIndexOf(); + function listCacheSet(key, value) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + module2.exports = listCacheSet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_ListCache.js +var require_ListCache = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_ListCache.js"(exports2, module2) { + var listCacheClear = require_listCacheClear(); + var listCacheDelete = require_listCacheDelete(); + var listCacheGet = require_listCacheGet(); + var listCacheHas = require_listCacheHas(); + var listCacheSet = require_listCacheSet(); + function ListCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + ListCache.prototype.clear = listCacheClear; + ListCache.prototype["delete"] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + module2.exports = ListCache; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackClear.js +var require_stackClear = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackClear.js"(exports2, module2) { + var ListCache = require_ListCache(); + function stackClear() { + this.__data__ = new ListCache(); + this.size = 0; + } + module2.exports = stackClear; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackDelete.js +var require_stackDelete = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackDelete.js"(exports2, module2) { + function stackDelete(key) { + var data = this.__data__, result = data["delete"](key); + this.size = data.size; + return result; + } + module2.exports = stackDelete; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackGet.js +var require_stackGet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackGet.js"(exports2, module2) { + function stackGet(key) { + return this.__data__.get(key); + } + module2.exports = stackGet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackHas.js +var require_stackHas = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackHas.js"(exports2, module2) { + function stackHas(key) { + return this.__data__.has(key); + } + module2.exports = stackHas; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Map.js +var require_Map = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Map.js"(exports2, module2) { + var getNative = require_getNative(); + var root = require_root(); + var Map2 = getNative(root, "Map"); + module2.exports = Map2; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeCreate.js +var require_nativeCreate = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeCreate.js"(exports2, module2) { + var getNative = require_getNative(); + var nativeCreate = getNative(Object, "create"); + module2.exports = nativeCreate; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashClear.js +var require_hashClear = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashClear.js"(exports2, module2) { + var nativeCreate = require_nativeCreate(); + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + module2.exports = hashClear; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashDelete.js +var require_hashDelete = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashDelete.js"(exports2, module2) { + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + module2.exports = hashDelete; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashGet.js +var require_hashGet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashGet.js"(exports2, module2) { + var nativeCreate = require_nativeCreate(); + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? void 0 : result; + } + return hasOwnProperty.call(data, key) ? data[key] : void 0; + } + module2.exports = hashGet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashHas.js +var require_hashHas = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashHas.js"(exports2, module2) { + var nativeCreate = require_nativeCreate(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key); + } + module2.exports = hashHas; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashSet.js +var require_hashSet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashSet.js"(exports2, module2) { + var nativeCreate = require_nativeCreate(); + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value; + return this; + } + module2.exports = hashSet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Hash.js +var require_Hash = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Hash.js"(exports2, module2) { + var hashClear = require_hashClear(); + var hashDelete = require_hashDelete(); + var hashGet = require_hashGet(); + var hashHas = require_hashHas(); + var hashSet = require_hashSet(); + function Hash(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + Hash.prototype.clear = hashClear; + Hash.prototype["delete"] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + module2.exports = Hash; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheClear.js +var require_mapCacheClear = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheClear.js"(exports2, module2) { + var Hash = require_Hash(); + var ListCache = require_ListCache(); + var Map2 = require_Map(); + function mapCacheClear() { + this.size = 0; + this.__data__ = { + "hash": new Hash(), + "map": new (Map2 || ListCache)(), + "string": new Hash() + }; + } + module2.exports = mapCacheClear; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKeyable.js +var require_isKeyable = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKeyable.js"(exports2, module2) { + function isKeyable(value) { + var type = typeof value; + return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; + } + module2.exports = isKeyable; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMapData.js +var require_getMapData = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMapData.js"(exports2, module2) { + var isKeyable = require_isKeyable(); + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; + } + module2.exports = getMapData; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheDelete.js +var require_mapCacheDelete = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheDelete.js"(exports2, module2) { + var getMapData = require_getMapData(); + function mapCacheDelete(key) { + var result = getMapData(this, key)["delete"](key); + this.size -= result ? 1 : 0; + return result; + } + module2.exports = mapCacheDelete; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheGet.js +var require_mapCacheGet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheGet.js"(exports2, module2) { + var getMapData = require_getMapData(); + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + module2.exports = mapCacheGet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheHas.js +var require_mapCacheHas = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheHas.js"(exports2, module2) { + var getMapData = require_getMapData(); + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + module2.exports = mapCacheHas; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheSet.js +var require_mapCacheSet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheSet.js"(exports2, module2) { + var getMapData = require_getMapData(); + function mapCacheSet(key, value) { + var data = getMapData(this, key), size = data.size; + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + module2.exports = mapCacheSet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_MapCache.js +var require_MapCache = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_MapCache.js"(exports2, module2) { + var mapCacheClear = require_mapCacheClear(); + var mapCacheDelete = require_mapCacheDelete(); + var mapCacheGet = require_mapCacheGet(); + var mapCacheHas = require_mapCacheHas(); + var mapCacheSet = require_mapCacheSet(); + function MapCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype["delete"] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + module2.exports = MapCache; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackSet.js +var require_stackSet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackSet.js"(exports2, module2) { + var ListCache = require_ListCache(); + var Map2 = require_Map(); + var MapCache = require_MapCache(); + var LARGE_ARRAY_SIZE = 200; + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + module2.exports = stackSet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Stack.js +var require_Stack = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Stack.js"(exports2, module2) { + var ListCache = require_ListCache(); + var stackClear = require_stackClear(); + var stackDelete = require_stackDelete(); + var stackGet = require_stackGet(); + var stackHas = require_stackHas(); + var stackSet = require_stackSet(); + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + Stack.prototype.clear = stackClear; + Stack.prototype["delete"] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + module2.exports = Stack; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setCacheAdd.js +var require_setCacheAdd = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setCacheAdd.js"(exports2, module2) { + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + module2.exports = setCacheAdd; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setCacheHas.js +var require_setCacheHas = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setCacheHas.js"(exports2, module2) { + function setCacheHas(value) { + return this.__data__.has(value); + } + module2.exports = setCacheHas; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_SetCache.js +var require_SetCache = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_SetCache.js"(exports2, module2) { + var MapCache = require_MapCache(); + var setCacheAdd = require_setCacheAdd(); + var setCacheHas = require_setCacheHas(); + function SetCache(values) { + var index = -1, length = values == null ? 0 : values.length; + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values[index]); + } + } + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + module2.exports = SetCache; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arraySome.js +var require_arraySome = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arraySome.js"(exports2, module2) { + function arraySome(array, predicate) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + module2.exports = arraySome; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cacheHas.js +var require_cacheHas = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cacheHas.js"(exports2, module2) { + function cacheHas(cache, key) { + return cache.has(key); + } + module2.exports = cacheHas; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalArrays.js +var require_equalArrays = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalArrays.js"(exports2, module2) { + var SetCache = require_SetCache(); + var arraySome = require_arraySome(); + var cacheHas = require_cacheHas(); + var COMPARE_PARTIAL_FLAG = 1; + var COMPARE_UNORDERED_FLAG = 2; + function equalArrays(array, other, bitmask, customizer, equalFunc, stack2) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + var arrStacked = stack2.get(array); + var othStacked = stack2.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : void 0; + stack2.set(array, other); + stack2.set(other, array); + while (++index < arrLength) { + var arrValue = array[index], othValue = other[index]; + if (customizer) { + var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack2) : customizer(arrValue, othValue, index, array, other, stack2); + } + if (compared !== void 0) { + if (compared) { + continue; + } + result = false; + break; + } + if (seen) { + if (!arraySome(other, function(othValue2, othIndex) { + if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack2))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack2))) { + result = false; + break; + } + } + stack2["delete"](array); + stack2["delete"](other); + return result; + } + module2.exports = equalArrays; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Uint8Array.js +var require_Uint8Array = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Uint8Array.js"(exports2, module2) { + var root = require_root(); + var Uint8Array2 = root.Uint8Array; + module2.exports = Uint8Array2; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapToArray.js +var require_mapToArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapToArray.js"(exports2, module2) { + function mapToArray(map) { + var index = -1, result = Array(map.size); + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + module2.exports = mapToArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setToArray.js +var require_setToArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setToArray.js"(exports2, module2) { + function setToArray(set) { + var index = -1, result = Array(set.size); + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + module2.exports = setToArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalByTag.js +var require_equalByTag = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalByTag.js"(exports2, module2) { + var Symbol2 = require_Symbol(); + var Uint8Array2 = require_Uint8Array(); + var eq = require_eq2(); + var equalArrays = require_equalArrays(); + var mapToArray = require_mapToArray(); + var setToArray = require_setToArray(); + var COMPARE_PARTIAL_FLAG = 1; + var COMPARE_UNORDERED_FLAG = 2; + var boolTag = "[object Boolean]"; + var dateTag = "[object Date]"; + var errorTag = "[object Error]"; + var mapTag = "[object Map]"; + var numberTag = "[object Number]"; + var regexpTag = "[object RegExp]"; + var setTag = "[object Set]"; + var stringTag = "[object String]"; + var symbolTag = "[object Symbol]"; + var arrayBufferTag = "[object ArrayBuffer]"; + var dataViewTag = "[object DataView]"; + var symbolProto = Symbol2 ? Symbol2.prototype : void 0; + var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0; + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack2) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + object = object.buffer; + other = other.buffer; + case arrayBufferTag: + if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) { + return false; + } + return true; + case boolTag: + case dateTag: + case numberTag: + return eq(+object, +other); + case errorTag: + return object.name == other.name && object.message == other.message; + case regexpTag: + case stringTag: + return object == other + ""; + case mapTag: + var convert = mapToArray; + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + if (object.size != other.size && !isPartial) { + return false; + } + var stacked = stack2.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + stack2.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack2); + stack2["delete"](object); + return result; + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + module2.exports = equalByTag; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayPush.js +var require_arrayPush = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayPush.js"(exports2, module2) { + function arrayPush(array, values) { + var index = -1, length = values.length, offset = array.length; + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + module2.exports = arrayPush; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetAllKeys.js +var require_baseGetAllKeys = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetAllKeys.js"(exports2, module2) { + var arrayPush = require_arrayPush(); + var isArray = require_isArray2(); + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + module2.exports = baseGetAllKeys; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayFilter.js +var require_arrayFilter = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayFilter.js"(exports2, module2) { + function arrayFilter(array, predicate) { + var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + module2.exports = arrayFilter; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/stubArray.js +var require_stubArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/stubArray.js"(exports2, module2) { + function stubArray() { + return []; + } + module2.exports = stubArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getSymbols.js +var require_getSymbols = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getSymbols.js"(exports2, module2) { + var arrayFilter = require_arrayFilter(); + var stubArray = require_stubArray(); + var objectProto = Object.prototype; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var nativeGetSymbols = Object.getOwnPropertySymbols; + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + module2.exports = getSymbols; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getAllKeys.js +var require_getAllKeys = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getAllKeys.js"(exports2, module2) { + var baseGetAllKeys = require_baseGetAllKeys(); + var getSymbols = require_getSymbols(); + var keys = require_keys2(); + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + module2.exports = getAllKeys; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalObjects.js +var require_equalObjects = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalObjects.js"(exports2, module2) { + var getAllKeys = require_getAllKeys(); + var COMPARE_PARTIAL_FLAG = 1; + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function equalObjects(object, other, bitmask, customizer, equalFunc, stack2) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var objStacked = stack2.get(object); + var othStacked = stack2.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack2.set(object, other); + stack2.set(other, object); + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], othValue = other[key]; + if (customizer) { + var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack2) : customizer(objValue, othValue, key, object, other, stack2); + } + if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack2) : compared)) { + result = false; + break; + } + skipCtor || (skipCtor = key == "constructor"); + } + if (result && !skipCtor) { + var objCtor = object.constructor, othCtor = other.constructor; + if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) { + result = false; + } + } + stack2["delete"](object); + stack2["delete"](other); + return result; + } + module2.exports = equalObjects; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_DataView.js +var require_DataView = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_DataView.js"(exports2, module2) { + var getNative = require_getNative(); + var root = require_root(); + var DataView2 = getNative(root, "DataView"); + module2.exports = DataView2; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Promise.js +var require_Promise = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Promise.js"(exports2, module2) { + var getNative = require_getNative(); + var root = require_root(); + var Promise2 = getNative(root, "Promise"); + module2.exports = Promise2; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Set.js +var require_Set2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Set.js"(exports2, module2) { + var getNative = require_getNative(); + var root = require_root(); + var Set2 = getNative(root, "Set"); + module2.exports = Set2; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_WeakMap.js +var require_WeakMap = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_WeakMap.js"(exports2, module2) { + var getNative = require_getNative(); + var root = require_root(); + var WeakMap2 = getNative(root, "WeakMap"); + module2.exports = WeakMap2; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getTag.js +var require_getTag = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getTag.js"(exports2, module2) { + var DataView2 = require_DataView(); + var Map2 = require_Map(); + var Promise2 = require_Promise(); + var Set2 = require_Set2(); + var WeakMap2 = require_WeakMap(); + var baseGetTag = require_baseGetTag(); + var toSource = require_toSource(); + var mapTag = "[object Map]"; + var objectTag = "[object Object]"; + var promiseTag = "[object Promise]"; + var setTag = "[object Set]"; + var weakMapTag = "[object WeakMap]"; + var dataViewTag = "[object DataView]"; + var dataViewCtorString = toSource(DataView2); + var mapCtorString = toSource(Map2); + var promiseCtorString = toSource(Promise2); + var setCtorString = toSource(Set2); + var weakMapCtorString = toSource(WeakMap2); + var getTag = baseGetTag; + if (DataView2 && getTag(new DataView2(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) { + getTag = function(value) { + var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : ""; + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + case mapCtorString: + return mapTag; + case promiseCtorString: + return promiseTag; + case setCtorString: + return setTag; + case weakMapCtorString: + return weakMapTag; + } + } + return result; + }; + } + module2.exports = getTag; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqualDeep.js +var require_baseIsEqualDeep = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqualDeep.js"(exports2, module2) { + var Stack = require_Stack(); + var equalArrays = require_equalArrays(); + var equalByTag = require_equalByTag(); + var equalObjects = require_equalObjects(); + var getTag = require_getTag(); + var isArray = require_isArray2(); + var isBuffer = require_isBuffer(); + var isTypedArray = require_isTypedArray(); + var COMPARE_PARTIAL_FLAG = 1; + var argsTag = "[object Arguments]"; + var arrayTag = "[object Array]"; + var objectTag = "[object Object]"; + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack2) { + var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack2 || (stack2 = new Stack()); + return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack2) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack2); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__"); + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; + stack2 || (stack2 = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack2); + } + } + if (!isSameTag) { + return false; + } + stack2 || (stack2 = new Stack()); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack2); + } + module2.exports = baseIsEqualDeep; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqual.js +var require_baseIsEqual = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqual.js"(exports2, module2) { + var baseIsEqualDeep = require_baseIsEqualDeep(); + var isObjectLike = require_isObjectLike(); + function baseIsEqual(value, other, bitmask, customizer, stack2) { + if (value === other) { + return true; + } + if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack2); + } + module2.exports = baseIsEqual; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsMatch.js +var require_baseIsMatch = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsMatch.js"(exports2, module2) { + var Stack = require_Stack(); + var baseIsEqual = require_baseIsEqual(); + var COMPARE_PARTIAL_FLAG = 1; + var COMPARE_UNORDERED_FLAG = 2; + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, length = index, noCustomizer = !customizer; + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], objValue = object[key], srcValue = data[1]; + if (noCustomizer && data[2]) { + if (objValue === void 0 && !(key in object)) { + return false; + } + } else { + var stack2 = new Stack(); + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack2); + } + if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack2) : result)) { + return false; + } + } + } + return true; + } + module2.exports = baseIsMatch; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isStrictComparable.js +var require_isStrictComparable = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isStrictComparable.js"(exports2, module2) { + var isObject = require_isObject2(); + function isStrictComparable(value) { + return value === value && !isObject(value); + } + module2.exports = isStrictComparable; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMatchData.js +var require_getMatchData = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMatchData.js"(exports2, module2) { + var isStrictComparable = require_isStrictComparable(); + var keys = require_keys2(); + function getMatchData(object) { + var result = keys(object), length = result.length; + while (length--) { + var key = result[length], value = object[key]; + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + module2.exports = getMatchData; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_matchesStrictComparable.js +var require_matchesStrictComparable = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_matchesStrictComparable.js"(exports2, module2) { + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && (srcValue !== void 0 || key in Object(object)); + }; + } + module2.exports = matchesStrictComparable; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseMatches.js +var require_baseMatches = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseMatches.js"(exports2, module2) { + var baseIsMatch = require_baseIsMatch(); + var getMatchData = require_getMatchData(); + var matchesStrictComparable = require_matchesStrictComparable(); + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + module2.exports = baseMatches; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSymbol.js +var require_isSymbol = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSymbol.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isObjectLike = require_isObjectLike(); + var symbolTag = "[object Symbol]"; + function isSymbol(value) { + return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag; + } + module2.exports = isSymbol; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKey.js +var require_isKey = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKey.js"(exports2, module2) { + var isArray = require_isArray2(); + var isSymbol = require_isSymbol(); + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/; + var reIsPlainProp = /^\w*$/; + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object); + } + module2.exports = isKey; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/memoize.js +var require_memoize = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/memoize.js"(exports2, module2) { + var MapCache = require_MapCache(); + var FUNC_ERROR_TEXT = "Expected a function"; + function memoize(func, resolver) { + if (typeof func != "function" || resolver != null && typeof resolver != "function") { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args2 = arguments, key = resolver ? resolver.apply(this, args2) : args2[0], cache = memoized.cache; + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args2); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache)(); + return memoized; + } + memoize.Cache = MapCache; + module2.exports = memoize; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_memoizeCapped.js +var require_memoizeCapped = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_memoizeCapped.js"(exports2, module2) { + var memoize = require_memoize(); + var MAX_MEMOIZE_SIZE = 500; + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + var cache = result.cache; + return result; + } + module2.exports = memoizeCapped; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stringToPath.js +var require_stringToPath = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stringToPath.js"(exports2, module2) { + var memoizeCapped = require_memoizeCapped(); + var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + var reEscapeChar = /\\(\\)?/g; + var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46) { + result.push(""); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match); + }); + return result; + }); + module2.exports = stringToPath; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js +var require_arrayMap = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js"(exports2, module2) { + function arrayMap(array, iteratee) { + var index = -1, length = array == null ? 0 : array.length, result = Array(length); + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + module2.exports = arrayMap; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseToString.js +var require_baseToString = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseToString.js"(exports2, module2) { + var Symbol2 = require_Symbol(); + var arrayMap = require_arrayMap(); + var isArray = require_isArray2(); + var isSymbol = require_isSymbol(); + var INFINITY = 1 / 0; + var symbolProto = Symbol2 ? Symbol2.prototype : void 0; + var symbolToString = symbolProto ? symbolProto.toString : void 0; + function baseToString(value) { + if (typeof value == "string") { + return value; + } + if (isArray(value)) { + return arrayMap(value, baseToString) + ""; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ""; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY ? "-0" : result; + } + module2.exports = baseToString; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toString.js +var require_toString = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toString.js"(exports2, module2) { + var baseToString = require_baseToString(); + function toString(value) { + return value == null ? "" : baseToString(value); + } + module2.exports = toString; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castPath.js +var require_castPath = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castPath.js"(exports2, module2) { + var isArray = require_isArray2(); + var isKey = require_isKey(); + var stringToPath = require_stringToPath(); + var toString = require_toString(); + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + module2.exports = castPath; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toKey.js +var require_toKey = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toKey.js"(exports2, module2) { + var isSymbol = require_isSymbol(); + var INFINITY = 1 / 0; + function toKey(value) { + if (typeof value == "string" || isSymbol(value)) { + return value; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY ? "-0" : result; + } + module2.exports = toKey; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGet.js +var require_baseGet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGet.js"(exports2, module2) { + var castPath = require_castPath(); + var toKey = require_toKey(); + function baseGet(object, path) { + path = castPath(path, object); + var index = 0, length = path.length; + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return index && index == length ? object : void 0; + } + module2.exports = baseGet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/get.js +var require_get = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/get.js"(exports2, module2) { + var baseGet = require_baseGet(); + function get(object, path, defaultValue) { + var result = object == null ? void 0 : baseGet(object, path); + return result === void 0 ? defaultValue : result; + } + module2.exports = get; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseHasIn.js +var require_baseHasIn = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseHasIn.js"(exports2, module2) { + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + module2.exports = baseHasIn; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hasPath.js +var require_hasPath = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hasPath.js"(exports2, module2) { + var castPath = require_castPath(); + var isArguments = require_isArguments2(); + var isArray = require_isArray2(); + var isIndex = require_isIndex(); + var isLength = require_isLength(); + var toKey = require_toKey(); + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + var index = -1, length = path.length, result = false; + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); + } + module2.exports = hasPath; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/hasIn.js +var require_hasIn = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/hasIn.js"(exports2, module2) { + var baseHasIn = require_baseHasIn(); + var hasPath = require_hasPath(); + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + module2.exports = hasIn; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseMatchesProperty.js +var require_baseMatchesProperty = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseMatchesProperty.js"(exports2, module2) { + var baseIsEqual = require_baseIsEqual(); + var get = require_get(); + var hasIn = require_hasIn(); + var isKey = require_isKey(); + var isStrictComparable = require_isStrictComparable(); + var matchesStrictComparable = require_matchesStrictComparable(); + var toKey = require_toKey(); + var COMPARE_PARTIAL_FLAG = 1; + var COMPARE_UNORDERED_FLAG = 2; + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + module2.exports = baseMatchesProperty; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/identity.js +var require_identity2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/identity.js"(exports2, module2) { + function identity(value) { + return value; + } + module2.exports = identity; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseProperty.js +var require_baseProperty = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseProperty.js"(exports2, module2) { + function baseProperty(key) { + return function(object) { + return object == null ? void 0 : object[key]; + }; + } + module2.exports = baseProperty; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePropertyDeep.js +var require_basePropertyDeep = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePropertyDeep.js"(exports2, module2) { + var baseGet = require_baseGet(); + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + module2.exports = basePropertyDeep; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/property.js +var require_property = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/property.js"(exports2, module2) { + var baseProperty = require_baseProperty(); + var basePropertyDeep = require_basePropertyDeep(); + var isKey = require_isKey(); + var toKey = require_toKey(); + function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); + } + module2.exports = property; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIteratee.js +var require_baseIteratee = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIteratee.js"(exports2, module2) { + var baseMatches = require_baseMatches(); + var baseMatchesProperty = require_baseMatchesProperty(); + var identity = require_identity2(); + var isArray = require_isArray2(); + var property = require_property(); + function baseIteratee(value) { + if (typeof value == "function") { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == "object") { + return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); + } + return property(value); + } + module2.exports = baseIteratee; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/mapValues.js +var require_mapValues = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/mapValues.js"(exports2, module2) { + var baseAssignValue = require_baseAssignValue(); + var baseForOwn = require_baseForOwn(); + var baseIteratee = require_baseIteratee(); + function mapValues(object, iteratee) { + var result = {}; + iteratee = baseIteratee(iteratee, 3); + baseForOwn(object, function(value, key, object2) { + baseAssignValue(result, key, iteratee(value, key, object2)); + }); + return result; + } + module2.exports = mapValues; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isNumber.js +var require_isNumber = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isNumber.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isObjectLike = require_isObjectLike(); + var numberTag = "[object Number]"; + function isNumber(value) { + return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag; + } + module2.exports = isNumber; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isString.js +var require_isString2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isString.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isArray = require_isArray2(); + var isObjectLike = require_isObjectLike(); + var stringTag = "[object String]"; + function isString(value) { + return typeof value == "string" || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag; + } + module2.exports = isString; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/alignString.js +var require_alignString = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/alignString.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _isNumber2 = _interopRequireDefault(require_isNumber()); + var _isString2 = _interopRequireDefault(require_isString2()); + var _stringWidth = _interopRequireDefault(require_string_width()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var alignments = ["left", "right", "center"]; + var alignLeft = (subject, width) => { + return subject + " ".repeat(width); + }; + var alignRight = (subject, width) => { + return " ".repeat(width) + subject; + }; + var alignCenter = (subject, width) => { + let halfWidth; + halfWidth = width / 2; + if (width % 2 === 0) { + return " ".repeat(halfWidth) + subject + " ".repeat(halfWidth); + } else { + halfWidth = Math.floor(halfWidth); + return " ".repeat(halfWidth) + subject + " ".repeat(halfWidth + 1); + } + }; + var alignString = (subject, containerWidth, alignment) => { + if (!(0, _isString2.default)(subject)) { + throw new TypeError("Subject parameter value must be a string."); + } + if (!(0, _isNumber2.default)(containerWidth)) { + throw new TypeError("Container width parameter value must be a number."); + } + const subjectWidth = (0, _stringWidth.default)(subject); + if (subjectWidth > containerWidth) { + throw new Error("Subject parameter value width cannot be greater than the container width."); + } + if (!(0, _isString2.default)(alignment)) { + throw new TypeError("Alignment parameter value must be a string."); + } + if (!alignments.includes(alignment)) { + throw new Error("Alignment parameter value must be a known alignment parameter value (left, right, center)."); + } + if (subjectWidth === 0) { + return " ".repeat(containerWidth); + } + const availableWidth = containerWidth - subjectWidth; + if (alignment === "left") { + return alignLeft(subject, availableWidth); + } + if (alignment === "right") { + return alignRight(subject, availableWidth); + } + return alignCenter(subject, availableWidth); + }; + var _default = alignString; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/alignTableData.js +var require_alignTableData = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/alignTableData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _stringWidth = _interopRequireDefault(require_string_width()); + var _alignString = _interopRequireDefault(require_alignString()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var alignTableData = (rows, config) => { + return rows.map((cells) => { + return cells.map((value, index1) => { + const column = config.columns[index1]; + if ((0, _stringWidth.default)(value) === column.width) { + return value; + } else { + return (0, _alignString.default)(value, column.width, column.alignment); + } + }); + }); + }; + var _default = alignTableData; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseExtremum.js +var require_baseExtremum = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseExtremum.js"(exports2, module2) { + var isSymbol = require_isSymbol(); + function baseExtremum(array, iteratee, comparator) { + var index = -1, length = array.length; + while (++index < length) { + var value = array[index], current = iteratee(value); + if (current != null && (computed === void 0 ? current === current && !isSymbol(current) : comparator(current, computed))) { + var computed = current, result = value; + } + } + return result; + } + module2.exports = baseExtremum; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGt.js +var require_baseGt = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGt.js"(exports2, module2) { + function baseGt(value, other) { + return value > other; + } + module2.exports = baseGt; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/max.js +var require_max3 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/max.js"(exports2, module2) { + var baseExtremum = require_baseExtremum(); + var baseGt = require_baseGt(); + var identity = require_identity2(); + function max(array) { + return array && array.length ? baseExtremum(array, identity, baseGt) : void 0; + } + module2.exports = max; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBoolean.js +var require_isBoolean = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBoolean.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isObjectLike = require_isObjectLike(); + var boolTag = "[object Boolean]"; + function isBoolean(value) { + return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag; + } + module2.exports = isBoolean; + } +}); + +// ../../node_modules/.pnpm/astral-regex@2.0.0/node_modules/astral-regex/index.js +var require_astral_regex = __commonJS({ + "../../node_modules/.pnpm/astral-regex@2.0.0/node_modules/astral-regex/index.js"(exports2, module2) { + "use strict"; + var regex = "[\uD800-\uDBFF][\uDC00-\uDFFF]"; + var astralRegex = (options) => options && options.exact ? new RegExp(`^${regex}$`) : new RegExp(regex, "g"); + module2.exports = astralRegex; + } +}); + +// ../../node_modules/.pnpm/slice-ansi@4.0.0/node_modules/slice-ansi/index.js +var require_slice_ansi = __commonJS({ + "../../node_modules/.pnpm/slice-ansi@4.0.0/node_modules/slice-ansi/index.js"(exports2, module2) { + "use strict"; + var isFullwidthCodePoint = require_is_fullwidth_code_point(); + var astralRegex = require_astral_regex(); + var ansiStyles = require_ansi_styles2(); + var ESCAPES = [ + "", + "\x9B" + ]; + var wrapAnsi = (code) => `${ESCAPES[0]}[${code}m`; + var checkAnsi = (ansiCodes, isEscapes, endAnsiCode) => { + let output = []; + ansiCodes = [...ansiCodes]; + for (let ansiCode of ansiCodes) { + const ansiCodeOrigin = ansiCode; + if (ansiCode.includes(";")) { + ansiCode = ansiCode.split(";")[0][0] + "0"; + } + const item = ansiStyles.codes.get(Number.parseInt(ansiCode, 10)); + if (item) { + const indexEscape = ansiCodes.indexOf(item.toString()); + if (indexEscape === -1) { + output.push(wrapAnsi(isEscapes ? item : ansiCodeOrigin)); + } else { + ansiCodes.splice(indexEscape, 1); + } + } else if (isEscapes) { + output.push(wrapAnsi(0)); + break; + } else { + output.push(wrapAnsi(ansiCodeOrigin)); + } + } + if (isEscapes) { + output = output.filter((element, index) => output.indexOf(element) === index); + if (endAnsiCode !== void 0) { + const fistEscapeCode = wrapAnsi(ansiStyles.codes.get(Number.parseInt(endAnsiCode, 10))); + output = output.reduce((current, next) => next === fistEscapeCode ? [next, ...current] : [...current, next], []); + } + } + return output.join(""); + }; + module2.exports = (string, begin, end) => { + const characters = [...string]; + const ansiCodes = []; + let stringEnd = typeof end === "number" ? end : characters.length; + let isInsideEscape = false; + let ansiCode; + let visible = 0; + let output = ""; + for (const [index, character] of characters.entries()) { + let leftEscape = false; + if (ESCAPES.includes(character)) { + const code = /\d[^m]*/.exec(string.slice(index, index + 18)); + ansiCode = code && code.length > 0 ? code[0] : void 0; + if (visible < stringEnd) { + isInsideEscape = true; + if (ansiCode !== void 0) { + ansiCodes.push(ansiCode); + } + } + } else if (isInsideEscape && character === "m") { + isInsideEscape = false; + leftEscape = true; + } + if (!isInsideEscape && !leftEscape) { + visible++; + } + if (!astralRegex({ exact: true }).test(character) && isFullwidthCodePoint(character.codePointAt())) { + visible++; + if (typeof end !== "number") { + stringEnd++; + } + } + if (visible > begin && visible <= stringEnd) { + output += character; + } else if (visible === begin && !isInsideEscape && ansiCode !== void 0) { + output = checkAnsi(ansiCodes); + } else if (visible >= stringEnd) { + output += checkAnsi(ansiCodes, true, ansiCode); + break; + } + } + return output; + }; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/wrapString.js +var require_wrapString = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/wrapString.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _sliceAnsi = _interopRequireDefault(require_slice_ansi()); + var _stringWidth = _interopRequireDefault(require_string_width()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var wrapString = (subject, size) => { + let subjectSlice; + subjectSlice = subject; + const chunks = []; + do { + chunks.push((0, _sliceAnsi.default)(subjectSlice, 0, size)); + subjectSlice = (0, _sliceAnsi.default)(subjectSlice, size).trim(); + } while ((0, _stringWidth.default)(subjectSlice)); + return chunks; + }; + var _default = wrapString; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/wrapWord.js +var require_wrapWord = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/wrapWord.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _sliceAnsi = _interopRequireDefault(require_slice_ansi()); + var _stringWidth = _interopRequireDefault(require_string_width()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var wrapWord = (input, size) => { + let subject; + subject = input; + const chunks = []; + const re = new RegExp("(^.{1," + size + "}(\\s+|$))|(^.{1," + (size - 1) + "}(\\\\|/|_|\\.|,|;|-))"); + do { + let chunk; + chunk = subject.match(re); + if (chunk) { + chunk = chunk[0]; + subject = (0, _sliceAnsi.default)(subject, (0, _stringWidth.default)(chunk)); + chunk = chunk.trim(); + } else { + chunk = (0, _sliceAnsi.default)(subject, 0, size); + subject = (0, _sliceAnsi.default)(subject, size); + } + chunks.push(chunk); + } while ((0, _stringWidth.default)(subject)); + return chunks; + }; + var _default = wrapWord; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/wrapCell.js +var require_wrapCell = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/wrapCell.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _wrapString = _interopRequireDefault(require_wrapString()); + var _wrapWord = _interopRequireDefault(require_wrapWord()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var wrapCell = (cellValue, columnWidth, useWrapWord) => { + const cellLines = cellValue.split("\n"); + for (let lineNr = 0; lineNr < cellLines.length; ) { + let lineChunks; + if (useWrapWord) { + lineChunks = (0, _wrapWord.default)(cellLines[lineNr], columnWidth); + } else { + lineChunks = (0, _wrapString.default)(cellLines[lineNr], columnWidth); + } + cellLines.splice(lineNr, 1, ...lineChunks); + lineNr += lineChunks.length; + } + return cellLines; + }; + var _default = wrapCell; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/calculateCellHeight.js +var require_calculateCellHeight = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/calculateCellHeight.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _isString2 = _interopRequireDefault(require_isString2()); + var _wrapCell = _interopRequireDefault(require_wrapCell()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var calculateCellHeight = (value, columnWidth, useWrapWord = false) => { + if (!(0, _isString2.default)(value)) { + throw new TypeError("Value must be a string."); + } + if (!Number.isInteger(columnWidth)) { + throw new TypeError("Column width must be an integer."); + } + if (columnWidth < 1) { + throw new Error("Column width must be greater than 0."); + } + return (0, _wrapCell.default)(value, columnWidth, useWrapWord).length; + }; + var _default = calculateCellHeight; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/calculateRowHeightIndex.js +var require_calculateRowHeightIndex = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/calculateRowHeightIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _max2 = _interopRequireDefault(require_max3()); + var _isBoolean2 = _interopRequireDefault(require_isBoolean()); + var _isNumber2 = _interopRequireDefault(require_isNumber()); + var _calculateCellHeight = _interopRequireDefault(require_calculateCellHeight()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var calculateRowHeightIndex = (rows, config) => { + const tableWidth = rows[0].length; + const rowSpanIndex = []; + rows.forEach((cells) => { + const cellHeightIndex = new Array(tableWidth).fill(1); + cells.forEach((value, index1) => { + if (!(0, _isNumber2.default)(config.columns[index1].width)) { + throw new TypeError("column[index].width must be a number."); + } + if (!(0, _isBoolean2.default)(config.columns[index1].wrapWord)) { + throw new TypeError("column[index].wrapWord must be a boolean."); + } + cellHeightIndex[index1] = (0, _calculateCellHeight.default)(value, config.columns[index1].width, config.columns[index1].wrapWord); + }); + rowSpanIndex.push((0, _max2.default)(cellHeightIndex)); + }); + return rowSpanIndex; + }; + var _default = calculateRowHeightIndex; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/drawBorder.js +var require_drawBorder = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/drawBorder.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.drawBorderTop = exports2.drawBorderJoin = exports2.drawBorderBottom = exports2.drawBorder = void 0; + var drawBorder = (columnSizeIndex, parts) => { + const columns = columnSizeIndex.map((size) => { + return parts.body.repeat(size); + }).join(parts.join); + return parts.left + columns + parts.right + "\n"; + }; + exports2.drawBorder = drawBorder; + var drawBorderTop = (columnSizeIndex, parts) => { + const border = drawBorder(columnSizeIndex, { + body: parts.topBody, + join: parts.topJoin, + left: parts.topLeft, + right: parts.topRight + }); + if (border === "\n") { + return ""; + } + return border; + }; + exports2.drawBorderTop = drawBorderTop; + var drawBorderJoin = (columnSizeIndex, parts) => { + return drawBorder(columnSizeIndex, { + body: parts.joinBody, + join: parts.joinJoin, + left: parts.joinLeft, + right: parts.joinRight + }); + }; + exports2.drawBorderJoin = drawBorderJoin; + var drawBorderBottom = (columnSizeIndex, parts) => { + return drawBorder(columnSizeIndex, { + body: parts.bottomBody, + join: parts.bottomJoin, + left: parts.bottomLeft, + right: parts.bottomRight + }); + }; + exports2.drawBorderBottom = drawBorderBottom; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/drawRow.js +var require_drawRow = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/drawRow.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var drawRow = (columns, border) => { + return border.bodyLeft + columns.join(border.bodyJoin) + border.bodyRight + "\n"; + }; + var _default = drawRow; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayEach.js +var require_arrayEach = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayEach.js"(exports2, module2) { + function arrayEach(array, iteratee) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + module2.exports = arrayEach; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assignValue.js +var require_assignValue = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assignValue.js"(exports2, module2) { + var baseAssignValue = require_baseAssignValue(); + var eq = require_eq2(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) { + baseAssignValue(object, key, value); + } + } + module2.exports = assignValue; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copyObject.js +var require_copyObject = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copyObject.js"(exports2, module2) { + var assignValue = require_assignValue(); + var baseAssignValue = require_baseAssignValue(); + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + var index = -1, length = props.length; + while (++index < length) { + var key = props[index]; + var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0; + if (newValue === void 0) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + module2.exports = copyObject; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssign.js +var require_baseAssign = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssign.js"(exports2, module2) { + var copyObject = require_copyObject(); + var keys = require_keys2(); + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + module2.exports = baseAssign; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeKeysIn.js +var require_nativeKeysIn = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeKeysIn.js"(exports2, module2) { + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + module2.exports = nativeKeysIn; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeysIn.js +var require_baseKeysIn = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeysIn.js"(exports2, module2) { + var isObject = require_isObject2(); + var isPrototype = require_isPrototype(); + var nativeKeysIn = require_nativeKeysIn(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), result = []; + for (var key in object) { + if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + module2.exports = baseKeysIn; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keysIn.js +var require_keysIn = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keysIn.js"(exports2, module2) { + var arrayLikeKeys = require_arrayLikeKeys(); + var baseKeysIn = require_baseKeysIn(); + var isArrayLike = require_isArrayLike3(); + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + module2.exports = keysIn; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignIn.js +var require_baseAssignIn = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignIn.js"(exports2, module2) { + var copyObject = require_copyObject(); + var keysIn = require_keysIn(); + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + module2.exports = baseAssignIn; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneBuffer.js +var require_cloneBuffer = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneBuffer.js"(exports2, module2) { + var root = require_root(); + var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2; + var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2; + var moduleExports = freeModule && freeModule.exports === freeExports; + var Buffer2 = moduleExports ? root.Buffer : void 0; + var allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0; + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + buffer.copy(result); + return result; + } + module2.exports = cloneBuffer; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copyArray.js +var require_copyArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copyArray.js"(exports2, module2) { + function copyArray(source, array) { + var index = -1, length = source.length; + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + module2.exports = copyArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copySymbols.js +var require_copySymbols = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copySymbols.js"(exports2, module2) { + var copyObject = require_copyObject(); + var getSymbols = require_getSymbols(); + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + module2.exports = copySymbols; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getPrototype.js +var require_getPrototype = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getPrototype.js"(exports2, module2) { + var overArg = require_overArg(); + var getPrototype = overArg(Object.getPrototypeOf, Object); + module2.exports = getPrototype; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getSymbolsIn.js +var require_getSymbolsIn = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getSymbolsIn.js"(exports2, module2) { + var arrayPush = require_arrayPush(); + var getPrototype = require_getPrototype(); + var getSymbols = require_getSymbols(); + var stubArray = require_stubArray(); + var nativeGetSymbols = Object.getOwnPropertySymbols; + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; + module2.exports = getSymbolsIn; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copySymbolsIn.js +var require_copySymbolsIn = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copySymbolsIn.js"(exports2, module2) { + var copyObject = require_copyObject(); + var getSymbolsIn = require_getSymbolsIn(); + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + module2.exports = copySymbolsIn; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getAllKeysIn.js +var require_getAllKeysIn = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getAllKeysIn.js"(exports2, module2) { + var baseGetAllKeys = require_baseGetAllKeys(); + var getSymbolsIn = require_getSymbolsIn(); + var keysIn = require_keysIn(); + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + module2.exports = getAllKeysIn; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_initCloneArray.js +var require_initCloneArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_initCloneArray.js"(exports2, module2) { + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function initCloneArray(array) { + var length = array.length, result = new array.constructor(length); + if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) { + result.index = array.index; + result.input = array.input; + } + return result; + } + module2.exports = initCloneArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneArrayBuffer.js +var require_cloneArrayBuffer = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneArrayBuffer.js"(exports2, module2) { + var Uint8Array2 = require_Uint8Array(); + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array2(result).set(new Uint8Array2(arrayBuffer)); + return result; + } + module2.exports = cloneArrayBuffer; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneDataView.js +var require_cloneDataView = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneDataView.js"(exports2, module2) { + var cloneArrayBuffer = require_cloneArrayBuffer(); + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + module2.exports = cloneDataView; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneRegExp.js +var require_cloneRegExp = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneRegExp.js"(exports2, module2) { + var reFlags = /\w*$/; + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + module2.exports = cloneRegExp; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneSymbol.js +var require_cloneSymbol = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneSymbol.js"(exports2, module2) { + var Symbol2 = require_Symbol(); + var symbolProto = Symbol2 ? Symbol2.prototype : void 0; + var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0; + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + module2.exports = cloneSymbol; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneTypedArray.js +var require_cloneTypedArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneTypedArray.js"(exports2, module2) { + var cloneArrayBuffer = require_cloneArrayBuffer(); + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + module2.exports = cloneTypedArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_initCloneByTag.js +var require_initCloneByTag = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_initCloneByTag.js"(exports2, module2) { + var cloneArrayBuffer = require_cloneArrayBuffer(); + var cloneDataView = require_cloneDataView(); + var cloneRegExp = require_cloneRegExp(); + var cloneSymbol = require_cloneSymbol(); + var cloneTypedArray = require_cloneTypedArray(); + var boolTag = "[object Boolean]"; + var dateTag = "[object Date]"; + var mapTag = "[object Map]"; + var numberTag = "[object Number]"; + var regexpTag = "[object RegExp]"; + var setTag = "[object Set]"; + var stringTag = "[object String]"; + var symbolTag = "[object Symbol]"; + var arrayBufferTag = "[object ArrayBuffer]"; + var dataViewTag = "[object DataView]"; + var float32Tag = "[object Float32Array]"; + var float64Tag = "[object Float64Array]"; + var int8Tag = "[object Int8Array]"; + var int16Tag = "[object Int16Array]"; + var int32Tag = "[object Int32Array]"; + var uint8Tag = "[object Uint8Array]"; + var uint8ClampedTag = "[object Uint8ClampedArray]"; + var uint16Tag = "[object Uint16Array]"; + var uint32Tag = "[object Uint32Array]"; + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + case boolTag: + case dateTag: + return new Ctor(+object); + case dataViewTag: + return cloneDataView(object, isDeep); + case float32Tag: + case float64Tag: + case int8Tag: + case int16Tag: + case int32Tag: + case uint8Tag: + case uint8ClampedTag: + case uint16Tag: + case uint32Tag: + return cloneTypedArray(object, isDeep); + case mapTag: + return new Ctor(); + case numberTag: + case stringTag: + return new Ctor(object); + case regexpTag: + return cloneRegExp(object); + case setTag: + return new Ctor(); + case symbolTag: + return cloneSymbol(object); + } + } + module2.exports = initCloneByTag; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseCreate.js +var require_baseCreate = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseCreate.js"(exports2, module2) { + var isObject = require_isObject2(); + var objectCreate = Object.create; + var baseCreate = function() { + function object() { + } + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object(); + object.prototype = void 0; + return result; + }; + }(); + module2.exports = baseCreate; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_initCloneObject.js +var require_initCloneObject = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_initCloneObject.js"(exports2, module2) { + var baseCreate = require_baseCreate(); + var getPrototype = require_getPrototype(); + var isPrototype = require_isPrototype(); + function initCloneObject(object) { + return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {}; + } + module2.exports = initCloneObject; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsMap.js +var require_baseIsMap = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsMap.js"(exports2, module2) { + var getTag = require_getTag(); + var isObjectLike = require_isObjectLike(); + var mapTag = "[object Map]"; + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + module2.exports = baseIsMap; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isMap.js +var require_isMap = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isMap.js"(exports2, module2) { + var baseIsMap = require_baseIsMap(); + var baseUnary = require_baseUnary(); + var nodeUtil = require_nodeUtil(); + var nodeIsMap = nodeUtil && nodeUtil.isMap; + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + module2.exports = isMap; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsSet.js +var require_baseIsSet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsSet.js"(exports2, module2) { + var getTag = require_getTag(); + var isObjectLike = require_isObjectLike(); + var setTag = "[object Set]"; + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + module2.exports = baseIsSet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSet.js +var require_isSet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSet.js"(exports2, module2) { + var baseIsSet = require_baseIsSet(); + var baseUnary = require_baseUnary(); + var nodeUtil = require_nodeUtil(); + var nodeIsSet = nodeUtil && nodeUtil.isSet; + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + module2.exports = isSet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseClone.js +var require_baseClone = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseClone.js"(exports2, module2) { + var Stack = require_Stack(); + var arrayEach = require_arrayEach(); + var assignValue = require_assignValue(); + var baseAssign = require_baseAssign(); + var baseAssignIn = require_baseAssignIn(); + var cloneBuffer = require_cloneBuffer(); + var copyArray = require_copyArray(); + var copySymbols = require_copySymbols(); + var copySymbolsIn = require_copySymbolsIn(); + var getAllKeys = require_getAllKeys(); + var getAllKeysIn = require_getAllKeysIn(); + var getTag = require_getTag(); + var initCloneArray = require_initCloneArray(); + var initCloneByTag = require_initCloneByTag(); + var initCloneObject = require_initCloneObject(); + var isArray = require_isArray2(); + var isBuffer = require_isBuffer(); + var isMap = require_isMap(); + var isObject = require_isObject2(); + var isSet = require_isSet(); + var keys = require_keys2(); + var keysIn = require_keysIn(); + var CLONE_DEEP_FLAG = 1; + var CLONE_FLAT_FLAG = 2; + var CLONE_SYMBOLS_FLAG = 4; + var argsTag = "[object Arguments]"; + var arrayTag = "[object Array]"; + var boolTag = "[object Boolean]"; + var dateTag = "[object Date]"; + var errorTag = "[object Error]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var mapTag = "[object Map]"; + var numberTag = "[object Number]"; + var objectTag = "[object Object]"; + var regexpTag = "[object RegExp]"; + var setTag = "[object Set]"; + var stringTag = "[object String]"; + var symbolTag = "[object Symbol]"; + var weakMapTag = "[object WeakMap]"; + var arrayBufferTag = "[object ArrayBuffer]"; + var dataViewTag = "[object DataView]"; + var float32Tag = "[object Float32Array]"; + var float64Tag = "[object Float64Array]"; + var int8Tag = "[object Int8Array]"; + var int16Tag = "[object Int16Array]"; + var int32Tag = "[object Int32Array]"; + var uint8Tag = "[object Uint8Array]"; + var uint8ClampedTag = "[object Uint8ClampedArray]"; + var uint16Tag = "[object Uint16Array]"; + var uint32Tag = "[object Uint32Array]"; + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; + function baseClone(value, bitmask, customizer, key, object, stack2) { + var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG; + if (customizer) { + result = object ? customizer(value, key, object, stack2) : customizer(value); + } + if (result !== void 0) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || isFunc && !object) { + result = isFlat || isFunc ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + stack2 || (stack2 = new Stack()); + var stacked = stack2.get(value); + if (stacked) { + return stacked; + } + stack2.set(value, result); + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack2)); + }); + } else if (isMap(value)) { + value.forEach(function(subValue, key2) { + result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack2)); + }); + } + var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys; + var props = isArr ? void 0 : keysFunc(value); + arrayEach(props || value, function(subValue, key2) { + if (props) { + key2 = subValue; + subValue = value[key2]; + } + assignValue(result, key2, baseClone(subValue, bitmask, customizer, key2, value, stack2)); + }); + return result; + } + module2.exports = baseClone; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/cloneDeep.js +var require_cloneDeep = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/cloneDeep.js"(exports2, module2) { + var baseClone = require_baseClone(); + var CLONE_DEEP_FLAG = 1; + var CLONE_SYMBOLS_FLAG = 4; + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + module2.exports = cloneDeep; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isUndefined.js +var require_isUndefined = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isUndefined.js"(exports2, module2) { + function isUndefined(value) { + return value === void 0; + } + module2.exports = isUndefined; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castFunction.js +var require_castFunction = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castFunction.js"(exports2, module2) { + var identity = require_identity2(); + function castFunction(value) { + return typeof value == "function" ? value : identity; + } + module2.exports = castFunction; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.js +var require_trimmedEndIndex = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.js"(exports2, module2) { + var reWhitespace = /\s/; + function trimmedEndIndex(string) { + var index = string.length; + while (index-- && reWhitespace.test(string.charAt(index))) { + } + return index; + } + module2.exports = trimmedEndIndex; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTrim.js +var require_baseTrim = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTrim.js"(exports2, module2) { + var trimmedEndIndex = require_trimmedEndIndex(); + var reTrimStart = /^\s+/; + function baseTrim(string) { + return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string; + } + module2.exports = baseTrim; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toNumber.js +var require_toNumber = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toNumber.js"(exports2, module2) { + var baseTrim = require_baseTrim(); + var isObject = require_isObject2(); + var isSymbol = require_isSymbol(); + var NAN = 0 / 0; + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + var reIsBinary = /^0b[01]+$/i; + var reIsOctal = /^0o[0-7]+$/i; + var freeParseInt = parseInt; + function toNumber(value) { + if (typeof value == "number") { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == "function" ? value.valueOf() : value; + value = isObject(other) ? other + "" : other; + } + if (typeof value != "string") { + return value === 0 ? value : +value; + } + value = baseTrim(value); + var isBinary = reIsBinary.test(value); + return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; + } + module2.exports = toNumber; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toFinite.js +var require_toFinite = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toFinite.js"(exports2, module2) { + var toNumber = require_toNumber(); + var INFINITY = 1 / 0; + var MAX_INTEGER = 17976931348623157e292; + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = value < 0 ? -1 : 1; + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + module2.exports = toFinite; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toInteger.js +var require_toInteger = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toInteger.js"(exports2, module2) { + var toFinite = require_toFinite(); + function toInteger(value) { + var result = toFinite(value), remainder = result % 1; + return result === result ? remainder ? result - remainder : result : 0; + } + module2.exports = toInteger; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/times.js +var require_times2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/times.js"(exports2, module2) { + var baseTimes = require_baseTimes(); + var castFunction = require_castFunction(); + var toInteger = require_toInteger(); + var MAX_SAFE_INTEGER = 9007199254740991; + var MAX_ARRAY_LENGTH = 4294967295; + var nativeMin = Math.min; + function times(n, iteratee) { + n = toInteger(n); + if (n < 1 || n > MAX_SAFE_INTEGER) { + return []; + } + var index = MAX_ARRAY_LENGTH, length = nativeMin(n, MAX_ARRAY_LENGTH); + iteratee = castFunction(iteratee); + n -= MAX_ARRAY_LENGTH; + var result = baseTimes(length, iteratee); + while (++index < n) { + iteratee(index); + } + return result; + } + module2.exports = times; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/getBorderCharacters.js +var require_getBorderCharacters = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/getBorderCharacters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var getBorderCharacters = (name) => { + if (name === "honeywell") { + return { + topBody: "\u2550", + topJoin: "\u2564", + topLeft: "\u2554", + topRight: "\u2557", + bottomBody: "\u2550", + bottomJoin: "\u2567", + bottomLeft: "\u255A", + bottomRight: "\u255D", + bodyLeft: "\u2551", + bodyRight: "\u2551", + bodyJoin: "\u2502", + joinBody: "\u2500", + joinLeft: "\u255F", + joinRight: "\u2562", + joinJoin: "\u253C" + }; + } + if (name === "norc") { + return { + topBody: "\u2500", + topJoin: "\u252C", + topLeft: "\u250C", + topRight: "\u2510", + bottomBody: "\u2500", + bottomJoin: "\u2534", + bottomLeft: "\u2514", + bottomRight: "\u2518", + bodyLeft: "\u2502", + bodyRight: "\u2502", + bodyJoin: "\u2502", + joinBody: "\u2500", + joinLeft: "\u251C", + joinRight: "\u2524", + joinJoin: "\u253C" + }; + } + if (name === "ramac") { + return { + topBody: "-", + topJoin: "+", + topLeft: "+", + topRight: "+", + bottomBody: "-", + bottomJoin: "+", + bottomLeft: "+", + bottomRight: "+", + bodyLeft: "|", + bodyRight: "|", + bodyJoin: "|", + joinBody: "-", + joinLeft: "|", + joinRight: "|", + joinJoin: "|" + }; + } + if (name === "void") { + return { + topBody: "", + topJoin: "", + topLeft: "", + topRight: "", + bottomBody: "", + bottomJoin: "", + bottomLeft: "", + bottomRight: "", + bodyLeft: "", + bodyRight: "", + bodyJoin: "", + joinBody: "", + joinLeft: "", + joinRight: "", + joinJoin: "" + }; + } + throw new Error('Unknown border template "' + name + '".'); + }; + var _default = getBorderCharacters; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/equal.js +var require_equal = __commonJS({ + "../../node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/equal.js"(exports2, module2) { + "use strict"; + module2.exports = require_fast_deep_equal(); + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/validateConfig.js +var require_validateConfig = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/validateConfig.js"(exports2, module2) { + "use strict"; + var equal = require_equal(); + var validate = function() { + var pattern0 = new RegExp("^[0-9]+$"); + var refVal = []; + var refVal1 = function() { + var pattern02 = new RegExp("^[0-9]+$"); + return function validate2(data, dataPath, parentData, parentDataProperty, rootData) { + "use strict"; + var vErrors = null; + var errors = 0; + if (rootData === void 0) + rootData = data; + if (data && typeof data === "object" && !Array.isArray(data)) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !validate2.schema.properties.hasOwnProperty(key0); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: "additionalProperties", + dataPath: (dataPath || "") + "", + schemaPath: "#/additionalProperties", + params: { + additionalProperty: "" + key0 + "" + }, + message: "should NOT have additional properties" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + } + if (data.topBody !== void 0) { + var errs_1 = errors; + if (!refVal2(data.topBody, (dataPath || "") + ".topBody", data, "topBody", rootData)) { + if (vErrors === null) + vErrors = refVal2.errors; + else + vErrors = vErrors.concat(refVal2.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topJoin !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.topJoin, (dataPath || "") + ".topJoin", data, "topJoin", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topLeft !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.topLeft, (dataPath || "") + ".topLeft", data, "topLeft", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topRight !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.topRight, (dataPath || "") + ".topRight", data, "topRight", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomBody !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bottomBody, (dataPath || "") + ".bottomBody", data, "bottomBody", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomJoin !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bottomJoin, (dataPath || "") + ".bottomJoin", data, "bottomJoin", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomLeft !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bottomLeft, (dataPath || "") + ".bottomLeft", data, "bottomLeft", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomRight !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bottomRight, (dataPath || "") + ".bottomRight", data, "bottomRight", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyLeft !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bodyLeft, (dataPath || "") + ".bodyLeft", data, "bodyLeft", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyRight !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bodyRight, (dataPath || "") + ".bodyRight", data, "bodyRight", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyJoin !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bodyJoin, (dataPath || "") + ".bodyJoin", data, "bodyJoin", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinBody !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.joinBody, (dataPath || "") + ".joinBody", data, "joinBody", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinLeft !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.joinLeft, (dataPath || "") + ".joinLeft", data, "joinLeft", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinRight !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.joinRight, (dataPath || "") + ".joinRight", data, "joinRight", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinJoin !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.joinJoin, (dataPath || "") + ".joinJoin", data, "joinJoin", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: "type", + dataPath: (dataPath || "") + "", + schemaPath: "#/type", + params: { + type: "object" + }, + message: "should be object" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + validate2.errors = vErrors; + return errors === 0; + }; + }(); + refVal1.schema = { + "type": "object", + "properties": { + "topBody": { + "$ref": "#/definitions/border" + }, + "topJoin": { + "$ref": "#/definitions/border" + }, + "topLeft": { + "$ref": "#/definitions/border" + }, + "topRight": { + "$ref": "#/definitions/border" + }, + "bottomBody": { + "$ref": "#/definitions/border" + }, + "bottomJoin": { + "$ref": "#/definitions/border" + }, + "bottomLeft": { + "$ref": "#/definitions/border" + }, + "bottomRight": { + "$ref": "#/definitions/border" + }, + "bodyLeft": { + "$ref": "#/definitions/border" + }, + "bodyRight": { + "$ref": "#/definitions/border" + }, + "bodyJoin": { + "$ref": "#/definitions/border" + }, + "joinBody": { + "$ref": "#/definitions/border" + }, + "joinLeft": { + "$ref": "#/definitions/border" + }, + "joinRight": { + "$ref": "#/definitions/border" + }, + "joinJoin": { + "$ref": "#/definitions/border" + } + }, + "additionalProperties": false + }; + refVal1.errors = null; + refVal[1] = refVal1; + var refVal2 = function() { + var pattern02 = new RegExp("^[0-9]+$"); + return function validate2(data, dataPath, parentData, parentDataProperty, rootData) { + "use strict"; + var vErrors = null; + var errors = 0; + if (rootData === void 0) + rootData = data; + if (typeof data !== "string") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + "", + schemaPath: "#/type", + params: { + type: "string" + }, + message: "should be string" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + validate2.errors = vErrors; + return errors === 0; + }; + }(); + refVal2.schema = { + "type": "string" + }; + refVal2.errors = null; + refVal[2] = refVal2; + var refVal3 = function() { + var pattern02 = new RegExp("^[0-9]+$"); + return function validate2(data, dataPath, parentData, parentDataProperty, rootData) { + "use strict"; + var vErrors = null; + var errors = 0; + if (rootData === void 0) + rootData = data; + if (data && typeof data === "object" && !Array.isArray(data)) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !pattern02.test(key0); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: "additionalProperties", + dataPath: (dataPath || "") + "", + schemaPath: "#/additionalProperties", + params: { + additionalProperty: "" + key0 + "" + }, + message: "should NOT have additional properties" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + } + for (var key0 in data) { + if (pattern02.test(key0)) { + var errs_1 = errors; + if (!refVal4(data[key0], (dataPath || "") + "['" + key0 + "']", data, key0, rootData)) { + if (vErrors === null) + vErrors = refVal4.errors; + else + vErrors = vErrors.concat(refVal4.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + } + } else { + var err = { + keyword: "type", + dataPath: (dataPath || "") + "", + schemaPath: "#/type", + params: { + type: "object" + }, + message: "should be object" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + validate2.errors = vErrors; + return errors === 0; + }; + }(); + refVal3.schema = { + "type": "object", + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/column" + } + }, + "additionalProperties": false + }; + refVal3.errors = null; + refVal[3] = refVal3; + var refVal4 = function() { + var pattern02 = new RegExp("^[0-9]+$"); + return function validate2(data, dataPath, parentData, parentDataProperty, rootData) { + "use strict"; + var vErrors = null; + var errors = 0; + if (rootData === void 0) + rootData = data; + if (data && typeof data === "object" && !Array.isArray(data)) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(key0 == "alignment" || key0 == "width" || key0 == "wrapWord" || key0 == "truncate" || key0 == "paddingLeft" || key0 == "paddingRight"); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: "additionalProperties", + dataPath: (dataPath || "") + "", + schemaPath: "#/additionalProperties", + params: { + additionalProperty: "" + key0 + "" + }, + message: "should NOT have additional properties" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + } + var data1 = data.alignment; + if (data1 !== void 0) { + var errs_1 = errors; + if (typeof data1 !== "string") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".alignment", + schemaPath: "#/properties/alignment/type", + params: { + type: "string" + }, + message: "should be string" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var schema1 = validate2.schema.properties.alignment.enum; + var valid1; + valid1 = false; + for (var i1 = 0; i1 < schema1.length; i1++) + if (equal(data1, schema1[i1])) { + valid1 = true; + break; + } + if (!valid1) { + var err = { + keyword: "enum", + dataPath: (dataPath || "") + ".alignment", + schemaPath: "#/properties/alignment/enum", + params: { + allowedValues: schema1 + }, + message: "should be equal to one of the allowed values" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.width !== void 0) { + var errs_1 = errors; + if (typeof data.width !== "number") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".width", + schemaPath: "#/properties/width/type", + params: { + type: "number" + }, + message: "should be number" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.wrapWord !== void 0) { + var errs_1 = errors; + if (typeof data.wrapWord !== "boolean") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".wrapWord", + schemaPath: "#/properties/wrapWord/type", + params: { + type: "boolean" + }, + message: "should be boolean" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.truncate !== void 0) { + var errs_1 = errors; + if (typeof data.truncate !== "number") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".truncate", + schemaPath: "#/properties/truncate/type", + params: { + type: "number" + }, + message: "should be number" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.paddingLeft !== void 0) { + var errs_1 = errors; + if (typeof data.paddingLeft !== "number") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".paddingLeft", + schemaPath: "#/properties/paddingLeft/type", + params: { + type: "number" + }, + message: "should be number" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.paddingRight !== void 0) { + var errs_1 = errors; + if (typeof data.paddingRight !== "number") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".paddingRight", + schemaPath: "#/properties/paddingRight/type", + params: { + type: "number" + }, + message: "should be number" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: "type", + dataPath: (dataPath || "") + "", + schemaPath: "#/type", + params: { + type: "object" + }, + message: "should be object" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + validate2.errors = vErrors; + return errors === 0; + }; + }(); + refVal4.schema = { + "type": "object", + "properties": { + "alignment": { + "type": "string", + "enum": ["left", "right", "center"] + }, + "width": { + "type": "number" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "number" + }, + "paddingLeft": { + "type": "number" + }, + "paddingRight": { + "type": "number" + } + }, + "additionalProperties": false + }; + refVal4.errors = null; + refVal[4] = refVal4; + return function validate2(data, dataPath, parentData, parentDataProperty, rootData) { + "use strict"; + var vErrors = null; + var errors = 0; + if (rootData === void 0) + rootData = data; + if (data && typeof data === "object" && !Array.isArray(data)) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(key0 == "border" || key0 == "columns" || key0 == "columnDefault" || key0 == "drawHorizontalLine"); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: "additionalProperties", + dataPath: (dataPath || "") + "", + schemaPath: "#/additionalProperties", + params: { + additionalProperty: "" + key0 + "" + }, + message: "should NOT have additional properties" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + } + if (data.border !== void 0) { + var errs_1 = errors; + if (!refVal1(data.border, (dataPath || "") + ".border", data, "border", rootData)) { + if (vErrors === null) + vErrors = refVal1.errors; + else + vErrors = vErrors.concat(refVal1.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.columns !== void 0) { + var errs_1 = errors; + if (!refVal3(data.columns, (dataPath || "") + ".columns", data, "columns", rootData)) { + if (vErrors === null) + vErrors = refVal3.errors; + else + vErrors = vErrors.concat(refVal3.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.columnDefault !== void 0) { + var errs_1 = errors; + if (!refVal[4](data.columnDefault, (dataPath || "") + ".columnDefault", data, "columnDefault", rootData)) { + if (vErrors === null) + vErrors = refVal[4].errors; + else + vErrors = vErrors.concat(refVal[4].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.drawHorizontalLine !== void 0) { + var errs_1 = errors; + var errs__1 = errors; + var valid1; + valid1 = typeof data.drawHorizontalLine == "function"; + if (!valid1) { + if (errs__1 == errors) { + var err = { + keyword: "typeof", + dataPath: (dataPath || "") + ".drawHorizontalLine", + schemaPath: "#/properties/drawHorizontalLine/typeof", + params: { + keyword: "typeof" + }, + message: 'should pass "typeof" keyword validation' + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } else { + for (var i1 = errs__1; i1 < errors; i1++) { + var ruleErr1 = vErrors[i1]; + if (ruleErr1.dataPath === void 0) + ruleErr1.dataPath = (dataPath || "") + ".drawHorizontalLine"; + if (ruleErr1.schemaPath === void 0) { + ruleErr1.schemaPath = "#/properties/drawHorizontalLine/typeof"; + } + } + } + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: "type", + dataPath: (dataPath || "") + "", + schemaPath: "#/type", + params: { + type: "object" + }, + message: "should be object" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + validate2.errors = vErrors; + return errors === 0; + }; + }(); + validate.schema = { + "$id": "config.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "border": { + "$ref": "#/definitions/borders" + }, + "columns": { + "$ref": "#/definitions/columns" + }, + "columnDefault": { + "$ref": "#/definitions/column" + }, + "drawHorizontalLine": { + "typeof": "function" + } + }, + "additionalProperties": false, + "definitions": { + "columns": { + "type": "object", + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/column" + } + }, + "additionalProperties": false + }, + "column": { + "type": "object", + "properties": { + "alignment": { + "type": "string", + "enum": ["left", "right", "center"] + }, + "width": { + "type": "number" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "number" + }, + "paddingLeft": { + "type": "number" + }, + "paddingRight": { + "type": "number" + } + }, + "additionalProperties": false + }, + "borders": { + "type": "object", + "properties": { + "topBody": { + "$ref": "#/definitions/border" + }, + "topJoin": { + "$ref": "#/definitions/border" + }, + "topLeft": { + "$ref": "#/definitions/border" + }, + "topRight": { + "$ref": "#/definitions/border" + }, + "bottomBody": { + "$ref": "#/definitions/border" + }, + "bottomJoin": { + "$ref": "#/definitions/border" + }, + "bottomLeft": { + "$ref": "#/definitions/border" + }, + "bottomRight": { + "$ref": "#/definitions/border" + }, + "bodyLeft": { + "$ref": "#/definitions/border" + }, + "bodyRight": { + "$ref": "#/definitions/border" + }, + "bodyJoin": { + "$ref": "#/definitions/border" + }, + "joinBody": { + "$ref": "#/definitions/border" + }, + "joinLeft": { + "$ref": "#/definitions/border" + }, + "joinRight": { + "$ref": "#/definitions/border" + }, + "joinJoin": { + "$ref": "#/definitions/border" + } + }, + "additionalProperties": false + }, + "border": { + "type": "string" + } + } + }; + validate.errors = null; + module2.exports = validate; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/makeStreamConfig.js +var require_makeStreamConfig = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/makeStreamConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _cloneDeep2 = _interopRequireDefault(require_cloneDeep()); + var _isUndefined2 = _interopRequireDefault(require_isUndefined()); + var _times2 = _interopRequireDefault(require_times2()); + var _getBorderCharacters = _interopRequireDefault(require_getBorderCharacters()); + var _validateConfig = _interopRequireDefault(require_validateConfig()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var makeBorder = (border = {}) => { + return Object.assign({}, (0, _getBorderCharacters.default)("honeywell"), border); + }; + var makeColumns = (columnCount, columns = {}, columnDefault = {}) => { + (0, _times2.default)(columnCount, (index) => { + if ((0, _isUndefined2.default)(columns[index])) { + columns[index] = {}; + } + columns[index] = Object.assign({ + alignment: "left", + paddingLeft: 1, + paddingRight: 1, + truncate: Infinity, + wrapWord: false + }, columnDefault, columns[index]); + }); + return columns; + }; + var makeStreamConfig = (userConfig = {}) => { + (0, _validateConfig.default)("streamConfig.json", userConfig); + const config = (0, _cloneDeep2.default)(userConfig); + if (!config.columnDefault || !config.columnDefault.width) { + throw new Error("Must provide config.columnDefault.width when creating a stream."); + } + if (!config.columnCount) { + throw new Error("Must provide config.columnCount."); + } + config.border = makeBorder(config.border); + config.columns = makeColumns(config.columnCount, config.columns, config.columnDefault); + return config; + }; + var _default = makeStreamConfig; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isFlattenable.js +var require_isFlattenable = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isFlattenable.js"(exports2, module2) { + var Symbol2 = require_Symbol(); + var isArguments = require_isArguments2(); + var isArray = require_isArray2(); + var spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : void 0; + function isFlattenable(value) { + return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); + } + module2.exports = isFlattenable; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js +var require_baseFlatten = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js"(exports2, module2) { + var arrayPush = require_arrayPush(); + var isFlattenable = require_isFlattenable(); + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, length = array.length; + predicate || (predicate = isFlattenable); + result || (result = []); + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + module2.exports = baseFlatten; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/flatten.js +var require_flatten = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/flatten.js"(exports2, module2) { + var baseFlatten = require_baseFlatten(); + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + module2.exports = flatten; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/mapDataUsingRowHeightIndex.js +var require_mapDataUsingRowHeightIndex = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/mapDataUsingRowHeightIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _flatten2 = _interopRequireDefault(require_flatten()); + var _times2 = _interopRequireDefault(require_times2()); + var _wrapCell = _interopRequireDefault(require_wrapCell()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var mapDataUsingRowHeightIndex = (unmappedRows, rowHeightIndex, config) => { + const tableWidth = unmappedRows[0].length; + const mappedRows = unmappedRows.map((cells, index0) => { + const rowHeight = (0, _times2.default)(rowHeightIndex[index0], () => { + return new Array(tableWidth).fill(""); + }); + cells.forEach((value, index1) => { + const cellLines = (0, _wrapCell.default)(value, config.columns[index1].width, config.columns[index1].wrapWord); + cellLines.forEach((cellLine, index2) => { + rowHeight[index2][index1] = cellLine; + }); + }); + return rowHeight; + }); + return (0, _flatten2.default)(mappedRows); + }; + var _default = mapDataUsingRowHeightIndex; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/padTableData.js +var require_padTableData = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/padTableData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var padTableData = (rows, config) => { + return rows.map((cells) => { + return cells.map((value, index1) => { + const column = config.columns[index1]; + return " ".repeat(column.paddingLeft) + value + " ".repeat(column.paddingRight); + }); + }); + }; + var _default = padTableData; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/stringifyTableData.js +var require_stringifyTableData = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/stringifyTableData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var stringifyTableData = (rows) => { + return rows.map((cells) => { + return cells.map(String); + }); + }; + var _default = stringifyTableData; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSlice.js +var require_baseSlice = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSlice.js"(exports2, module2) { + function baseSlice(array, start, end) { + var index = -1, length = array.length; + if (start < 0) { + start = -start > length ? 0 : length + start; + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : end - start >>> 0; + start >>>= 0; + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + module2.exports = baseSlice; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castSlice.js +var require_castSlice = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castSlice.js"(exports2, module2) { + var baseSlice = require_baseSlice(); + function castSlice(array, start, end) { + var length = array.length; + end = end === void 0 ? length : end; + return !start && end >= length ? array : baseSlice(array, start, end); + } + module2.exports = castSlice; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hasUnicode.js +var require_hasUnicode = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hasUnicode.js"(exports2, module2) { + var rsAstralRange = "\\ud800-\\udfff"; + var rsComboMarksRange = "\\u0300-\\u036f"; + var reComboHalfMarksRange = "\\ufe20-\\ufe2f"; + var rsComboSymbolsRange = "\\u20d0-\\u20ff"; + var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; + var rsVarRange = "\\ufe0e\\ufe0f"; + var rsZWJ = "\\u200d"; + var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]"); + function hasUnicode(string) { + return reHasUnicode.test(string); + } + module2.exports = hasUnicode; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsRegExp.js +var require_baseIsRegExp = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsRegExp.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isObjectLike = require_isObjectLike(); + var regexpTag = "[object RegExp]"; + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + module2.exports = baseIsRegExp; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isRegExp.js +var require_isRegExp = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isRegExp.js"(exports2, module2) { + var baseIsRegExp = require_baseIsRegExp(); + var baseUnary = require_baseUnary(); + var nodeUtil = require_nodeUtil(); + var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp; + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + module2.exports = isRegExp; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_asciiSize.js +var require_asciiSize = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_asciiSize.js"(exports2, module2) { + var baseProperty = require_baseProperty(); + var asciiSize = baseProperty("length"); + module2.exports = asciiSize; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_unicodeSize.js +var require_unicodeSize = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_unicodeSize.js"(exports2, module2) { + var rsAstralRange = "\\ud800-\\udfff"; + var rsComboMarksRange = "\\u0300-\\u036f"; + var reComboHalfMarksRange = "\\ufe20-\\ufe2f"; + var rsComboSymbolsRange = "\\u20d0-\\u20ff"; + var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; + var rsVarRange = "\\ufe0e\\ufe0f"; + var rsAstral = "[" + rsAstralRange + "]"; + var rsCombo = "[" + rsComboRange + "]"; + var rsFitz = "\\ud83c[\\udffb-\\udfff]"; + var rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")"; + var rsNonAstral = "[^" + rsAstralRange + "]"; + var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}"; + var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]"; + var rsZWJ = "\\u200d"; + var reOptMod = rsModifier + "?"; + var rsOptVar = "[" + rsVarRange + "]?"; + var rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*"; + var rsSeq = rsOptVar + reOptMod + rsOptJoin; + var rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")"; + var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g"); + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } + module2.exports = unicodeSize; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stringSize.js +var require_stringSize = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stringSize.js"(exports2, module2) { + var asciiSize = require_asciiSize(); + var hasUnicode = require_hasUnicode(); + var unicodeSize = require_unicodeSize(); + function stringSize(string) { + return hasUnicode(string) ? unicodeSize(string) : asciiSize(string); + } + module2.exports = stringSize; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_asciiToArray.js +var require_asciiToArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_asciiToArray.js"(exports2, module2) { + function asciiToArray(string) { + return string.split(""); + } + module2.exports = asciiToArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_unicodeToArray.js +var require_unicodeToArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_unicodeToArray.js"(exports2, module2) { + var rsAstralRange = "\\ud800-\\udfff"; + var rsComboMarksRange = "\\u0300-\\u036f"; + var reComboHalfMarksRange = "\\ufe20-\\ufe2f"; + var rsComboSymbolsRange = "\\u20d0-\\u20ff"; + var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; + var rsVarRange = "\\ufe0e\\ufe0f"; + var rsAstral = "[" + rsAstralRange + "]"; + var rsCombo = "[" + rsComboRange + "]"; + var rsFitz = "\\ud83c[\\udffb-\\udfff]"; + var rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")"; + var rsNonAstral = "[^" + rsAstralRange + "]"; + var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}"; + var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]"; + var rsZWJ = "\\u200d"; + var reOptMod = rsModifier + "?"; + var rsOptVar = "[" + rsVarRange + "]?"; + var rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*"; + var rsSeq = rsOptVar + reOptMod + rsOptJoin; + var rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")"; + var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g"); + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + module2.exports = unicodeToArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stringToArray.js +var require_stringToArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stringToArray.js"(exports2, module2) { + var asciiToArray = require_asciiToArray(); + var hasUnicode = require_hasUnicode(); + var unicodeToArray = require_unicodeToArray(); + function stringToArray(string) { + return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string); + } + module2.exports = stringToArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/truncate.js +var require_truncate = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/truncate.js"(exports2, module2) { + var baseToString = require_baseToString(); + var castSlice = require_castSlice(); + var hasUnicode = require_hasUnicode(); + var isObject = require_isObject2(); + var isRegExp = require_isRegExp(); + var stringSize = require_stringSize(); + var stringToArray = require_stringToArray(); + var toInteger = require_toInteger(); + var toString = require_toString(); + var DEFAULT_TRUNC_LENGTH = 30; + var DEFAULT_TRUNC_OMISSION = "..."; + var reFlags = /\w*$/; + function truncate(string, options) { + var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION; + if (isObject(options)) { + var separator = "separator" in options ? options.separator : separator; + length = "length" in options ? toInteger(options.length) : length; + omission = "omission" in options ? baseToString(options.omission) : omission; + } + string = toString(string); + var strLength = string.length; + if (hasUnicode(string)) { + var strSymbols = stringToArray(string); + strLength = strSymbols.length; + } + if (length >= strLength) { + return string; + } + var end = length - stringSize(omission); + if (end < 1) { + return omission; + } + var result = strSymbols ? castSlice(strSymbols, 0, end).join("") : string.slice(0, end); + if (separator === void 0) { + return result + omission; + } + if (strSymbols) { + end += result.length - end; + } + if (isRegExp(separator)) { + if (string.slice(end).search(separator)) { + var match, substring = result; + if (!separator.global) { + separator = RegExp(separator.source, toString(reFlags.exec(separator)) + "g"); + } + separator.lastIndex = 0; + while (match = separator.exec(substring)) { + var newEnd = match.index; + } + result = result.slice(0, newEnd === void 0 ? end : newEnd); + } + } else if (string.indexOf(baseToString(separator), end) != end) { + var index = result.lastIndexOf(separator); + if (index > -1) { + result = result.slice(0, index); + } + } + return result + omission; + } + module2.exports = truncate; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/truncateTableData.js +var require_truncateTableData = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/truncateTableData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _truncate2 = _interopRequireDefault(require_truncate()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var truncateTableData = (rows, config) => { + return rows.map((cells) => { + return cells.map((content, index) => { + return (0, _truncate2.default)(content, { + length: config.columns[index].truncate + }); + }); + }); + }; + var _default = truncateTableData; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/createStream.js +var require_createStream = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/createStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _mapValues2 = _interopRequireDefault(require_mapValues()); + var _alignTableData = _interopRequireDefault(require_alignTableData()); + var _calculateRowHeightIndex = _interopRequireDefault(require_calculateRowHeightIndex()); + var _drawBorder = require_drawBorder(); + var _drawRow = _interopRequireDefault(require_drawRow()); + var _makeStreamConfig = _interopRequireDefault(require_makeStreamConfig()); + var _mapDataUsingRowHeightIndex = _interopRequireDefault(require_mapDataUsingRowHeightIndex()); + var _padTableData = _interopRequireDefault(require_padTableData()); + var _stringifyTableData = _interopRequireDefault(require_stringifyTableData()); + var _truncateTableData = _interopRequireDefault(require_truncateTableData()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var prepareData = (data, config) => { + let rows; + rows = (0, _stringifyTableData.default)(data); + rows = (0, _truncateTableData.default)(data, config); + const rowHeightIndex = (0, _calculateRowHeightIndex.default)(rows, config); + rows = (0, _mapDataUsingRowHeightIndex.default)(rows, rowHeightIndex, config); + rows = (0, _alignTableData.default)(rows, config); + rows = (0, _padTableData.default)(rows, config); + return rows; + }; + var create = (row, columnWidthIndex, config) => { + const rows = prepareData([row], config); + const body = rows.map((literalRow) => { + return (0, _drawRow.default)(literalRow, config.border); + }).join(""); + let output; + output = ""; + output += (0, _drawBorder.drawBorderTop)(columnWidthIndex, config.border); + output += body; + output += (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border); + output = output.trimEnd(); + process.stdout.write(output); + }; + var append = (row, columnWidthIndex, config) => { + const rows = prepareData([row], config); + const body = rows.map((literalRow) => { + return (0, _drawRow.default)(literalRow, config.border); + }).join(""); + let output = ""; + const bottom = (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border); + if (bottom !== "\n") { + output = "\r"; + } + output += (0, _drawBorder.drawBorderJoin)(columnWidthIndex, config.border); + output += body; + output += bottom; + output = output.trimEnd(); + process.stdout.write(output); + }; + var createStream = (userConfig = {}) => { + const config = (0, _makeStreamConfig.default)(userConfig); + const columnWidthIndex = Object.values((0, _mapValues2.default)(config.columns, (column) => { + return column.width + column.paddingLeft + column.paddingRight; + })); + let empty; + empty = true; + return { + write: (row) => { + if (row.length !== config.columnCount) { + throw new Error("Row cell count does not match the config.columnCount."); + } + if (empty) { + empty = false; + return create(row, columnWidthIndex, config); + } else { + return append(row, columnWidthIndex, config); + } + } + }; + }; + var _default = createStream; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/calculateCellWidthIndex.js +var require_calculateCellWidthIndex = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/calculateCellWidthIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _stringWidth = _interopRequireDefault(require_string_width()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var calculateCellWidthIndex = (cells) => { + return cells.map((value) => { + return Math.max(...value.split("\n").map((line) => { + return (0, _stringWidth.default)(line); + })); + }); + }; + var _default = calculateCellWidthIndex; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/drawTable.js +var require_drawTable = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/drawTable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _drawBorder = require_drawBorder(); + var _drawRow = _interopRequireDefault(require_drawRow()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var drawTable = (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine, singleLine) => { + let output; + let realRowIndex; + let rowHeight; + const rowCount = rows.length; + realRowIndex = 0; + output = ""; + if (drawHorizontalLine(realRowIndex, rowCount)) { + output += (0, _drawBorder.drawBorderTop)(columnSizeIndex, border); + } + rows.forEach((row, index0) => { + output += (0, _drawRow.default)(row, border); + if (!rowHeight) { + rowHeight = rowSpanIndex[realRowIndex]; + realRowIndex++; + } + rowHeight--; + if (!singleLine && rowHeight === 0 && index0 !== rowCount - 1 && drawHorizontalLine(realRowIndex, rowCount)) { + output += (0, _drawBorder.drawBorderJoin)(columnSizeIndex, border); + } + }); + if (drawHorizontalLine(realRowIndex, rowCount)) { + output += (0, _drawBorder.drawBorderBottom)(columnSizeIndex, border); + } + return output; + }; + var _default = drawTable; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/calculateMaximumColumnWidthIndex.js +var require_calculateMaximumColumnWidthIndex = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/calculateMaximumColumnWidthIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _calculateCellWidthIndex = _interopRequireDefault(require_calculateCellWidthIndex()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var calculateMaximumColumnWidthIndex = (rows) => { + if (!rows[0]) { + throw new Error("Dataset must have at least one row."); + } + const columns = new Array(rows[0].length).fill(0); + rows.forEach((row) => { + const columnWidthIndex = (0, _calculateCellWidthIndex.default)(row); + columnWidthIndex.forEach((valueWidth, index0) => { + if (columns[index0] < valueWidth) { + columns[index0] = valueWidth; + } + }); + }); + return columns; + }; + var _default = calculateMaximumColumnWidthIndex; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/makeConfig.js +var require_makeConfig = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/makeConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _cloneDeep2 = _interopRequireDefault(require_cloneDeep()); + var _isUndefined2 = _interopRequireDefault(require_isUndefined()); + var _times2 = _interopRequireDefault(require_times2()); + var _calculateMaximumColumnWidthIndex = _interopRequireDefault(require_calculateMaximumColumnWidthIndex()); + var _getBorderCharacters = _interopRequireDefault(require_getBorderCharacters()); + var _validateConfig = _interopRequireDefault(require_validateConfig()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var makeBorder = (border = {}) => { + return Object.assign({}, (0, _getBorderCharacters.default)("honeywell"), border); + }; + var makeColumns = (rows, columns = {}, columnDefault = {}) => { + const maximumColumnWidthIndex = (0, _calculateMaximumColumnWidthIndex.default)(rows); + (0, _times2.default)(rows[0].length, (index) => { + if ((0, _isUndefined2.default)(columns[index])) { + columns[index] = {}; + } + columns[index] = Object.assign({ + alignment: "left", + paddingLeft: 1, + paddingRight: 1, + truncate: Infinity, + width: maximumColumnWidthIndex[index], + wrapWord: false + }, columnDefault, columns[index]); + }); + return columns; + }; + var makeConfig = (rows, userConfig = {}) => { + (0, _validateConfig.default)("config.json", userConfig); + const config = (0, _cloneDeep2.default)(userConfig); + config.border = makeBorder(config.border); + config.columns = makeColumns(rows, config.columns, config.columnDefault); + if (!config.drawHorizontalLine) { + config.drawHorizontalLine = () => { + return true; + }; + } + if (config.singleLine === void 0) { + config.singleLine = false; + } + return config; + }; + var _default = makeConfig; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/validateTableData.js +var require_validateTableData = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/validateTableData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var validateTableData = (rows) => { + if (!Array.isArray(rows)) { + throw new TypeError("Table data must be an array."); + } + if (rows.length === 0) { + throw new Error("Table must define at least one row."); + } + if (rows[0].length === 0) { + throw new Error("Table must define at least one column."); + } + const columnNumber = rows[0].length; + for (const cells of rows) { + if (!Array.isArray(cells)) { + throw new TypeError("Table row data must be an array."); + } + if (cells.length !== columnNumber) { + throw new Error("Table must have a consistent number of cells."); + } + for (const cell of cells) { + if (/[\u0001-\u0006\u0008\u0009\u000B-\u001A]/.test(cell)) { + throw new Error("Table data must not contain control characters."); + } + } + } + }; + var _default = validateTableData; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/table.js +var require_table = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/table.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _alignTableData = _interopRequireDefault(require_alignTableData()); + var _calculateCellWidthIndex = _interopRequireDefault(require_calculateCellWidthIndex()); + var _calculateRowHeightIndex = _interopRequireDefault(require_calculateRowHeightIndex()); + var _drawTable = _interopRequireDefault(require_drawTable()); + var _makeConfig = _interopRequireDefault(require_makeConfig()); + var _mapDataUsingRowHeightIndex = _interopRequireDefault(require_mapDataUsingRowHeightIndex()); + var _padTableData = _interopRequireDefault(require_padTableData()); + var _stringifyTableData = _interopRequireDefault(require_stringifyTableData()); + var _truncateTableData = _interopRequireDefault(require_truncateTableData()); + var _validateTableData = _interopRequireDefault(require_validateTableData()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var table = (data, userConfig = {}) => { + let rows; + (0, _validateTableData.default)(data); + rows = (0, _stringifyTableData.default)(data); + const config = (0, _makeConfig.default)(rows, userConfig); + rows = (0, _truncateTableData.default)(data, config); + const rowHeightIndex = (0, _calculateRowHeightIndex.default)(rows, config); + rows = (0, _mapDataUsingRowHeightIndex.default)(rows, rowHeightIndex, config); + rows = (0, _alignTableData.default)(rows, config); + rows = (0, _padTableData.default)(rows, config); + const cellWidthIndex = (0, _calculateCellWidthIndex.default)(rows[0]); + return (0, _drawTable.default)(rows, config.border, cellWidthIndex, rowHeightIndex, config.drawHorizontalLine, config.singleLine); + }; + var _default = table; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/index.js +var require_dist6 = __commonJS({ + "../../node_modules/.pnpm/table@6.0.4/node_modules/table/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + Object.defineProperty(exports2, "createStream", { + enumerable: true, + get: function() { + return _createStream.default; + } + }); + Object.defineProperty(exports2, "getBorderCharacters", { + enumerable: true, + get: function() { + return _getBorderCharacters.default; + } + }); + Object.defineProperty(exports2, "table", { + enumerable: true, + get: function() { + return _table.default; + } + }); + var _createStream = _interopRequireDefault(require_createStream()); + var _getBorderCharacters = _interopRequireDefault(require_getBorderCharacters()); + var _table = _interopRequireDefault(require_table()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + } +}); + +// ../../node_modules/.pnpm/render-help@1.0.2/node_modules/render-help/lib/index.js +var require_lib30 = __commonJS({ + "../../node_modules/.pnpm/render-help@1.0.2/node_modules/render-help/lib/index.js"(exports2, module2) { + "use strict"; + var table_1 = require_dist6(); + var NO_BORDERS = { + topBody: "", + topJoin: "", + topLeft: "", + topRight: "", + bottomBody: "", + bottomJoin: "", + bottomLeft: "", + bottomRight: "", + bodyJoin: "", + bodyLeft: "", + bodyRight: "", + joinBody: "", + joinLeft: "", + joinRight: "" + }; + var TABLE_OPTIONS = { + border: NO_BORDERS, + singleLine: true + }; + var FIRST_COLUMN = { paddingLeft: 2, width: 3 }; + var SHORT_OPTION_COLUMN = { alignment: "right" }; + var LONG_OPTION_COLUMN = { paddingLeft: 0 }; + var DESCRIPTION_COLUMN = { + paddingRight: 0, + wrapWord: true + }; + function renderDescriptionList(descriptionItems, width) { + const data = descriptionItems.sort((item1, item2) => item1.name.localeCompare(item2.name)).map(({ shortAlias, name, description }) => [shortAlias && `${shortAlias},` || " ", name, description || ""]); + const firstColumnMaxWidth = getColumnMaxWidth(data, 0); + const nameColumnWidth = Math.max(getColumnMaxWidth(data, 1), 19); + const descriptionColumnWidth = Math.max(2, width - firstColumnMaxWidth - nameColumnWidth - 2 - 2 - 1); + return multiTrim(table_1.table(data, Object.assign(Object.assign({}, TABLE_OPTIONS), { columns: { + 0: Object.assign(Object.assign({}, SHORT_OPTION_COLUMN), FIRST_COLUMN), + 1: Object.assign({ width: nameColumnWidth }, LONG_OPTION_COLUMN), + 2: Object.assign({ width: descriptionColumnWidth }, DESCRIPTION_COLUMN) + } }))); + } + function multiTrim(str) { + return str.split("\n").map((line) => line.trimRight()).filter(Boolean).join("\n"); + } + function getColumnMaxWidth(data, columnNumber) { + return data.reduce((maxWidth, row) => Math.max(maxWidth, row[columnNumber].length), 0); + } + module2.exports = function renderHelp(config) { + var _a, _b; + const width = (_b = (_a = config.width) !== null && _a !== void 0 ? _a : process.stdout.columns) !== null && _b !== void 0 ? _b : 80; + let outputSections = []; + if (config.usages.length > 0) { + const [firstUsage, ...restUsages] = config.usages; + let usageOutput = `Usage: ${firstUsage}`; + for (let usage of restUsages) { + usageOutput += ` + ${usage}`; + } + outputSections.push(usageOutput); + } + if (config.aliases && config.aliases.length) { + outputSections.push(`${config.aliases.length === 1 ? "Alias" : "Aliases"}: ${config.aliases.join(", ")}`); + } + if (config.description) + outputSections.push(`${config.description}`); + if (config.descriptionLists) { + for (let { title, list } of config.descriptionLists) { + outputSections.push(`${title}: +` + renderDescriptionList(list, width)); + } + } + if (config.url) { + outputSections.push(`Visit ${config.url} for documentation about this command.`); + } + return outputSections.join("\n\n"); + }; + } +}); + +// ../../node_modules/.pnpm/version-selector-type@3.0.0/node_modules/version-selector-type/index.js +var require_version_selector_type = __commonJS({ + "../../node_modules/.pnpm/version-selector-type@3.0.0/node_modules/version-selector-type/index.js"(exports2, module2) { + "use strict"; + var semver = require_semver2(); + module2.exports = (selector) => versionSelectorType(true, selector); + module2.exports.strict = (selector) => versionSelectorType(false, selector); + function versionSelectorType(loose, selector) { + if (typeof selector !== "string") { + throw new TypeError("`selector` should be a string"); + } + let normalizedSelector; + if (normalizedSelector = semver.valid(selector, loose)) { + return { + normalized: normalizedSelector, + type: "version" + }; + } + if (normalizedSelector = semver.validRange(selector, loose)) { + return { + normalized: normalizedSelector, + type: "range" + }; + } + if (encodeURIComponent(selector) === selector) { + return { + normalized: selector, + type: "tag" + }; + } + return null; + } + } +}); + +// ../../node_modules/.pnpm/@zkochan+rimraf@2.1.1/node_modules/@zkochan/rimraf/index.js +var require_rimraf = __commonJS({ + "../../node_modules/.pnpm/@zkochan+rimraf@2.1.1/node_modules/@zkochan/rimraf/index.js"(exports2, module2) { + var fs = require("fs"); + var rm = fs.promises.rm ? fs.promises.rm : fs.promises.rmdir; + var rmdirSync = fs.rmSync ? fs.rmSync : fs.rmdirSync; + module2.exports = async (p) => { + try { + await rm(p, { recursive: true, maxRetries: 3 }); + } catch (err) { + if (err.code === "ENOTDIR" || err.code === "ENOENT") + return; + throw err; + } + }; + module2.exports.sync = (p) => { + try { + rmdirSync(p, { recursive: true, maxRetries: 3 }); + } catch (err) { + if (err.code === "ENOTDIR" || err.code === "ENOENT") + return; + throw err; + } + }; + } +}); + +// ../../node_modules/.pnpm/rename-overwrite@4.0.0/node_modules/rename-overwrite/index.js +var require_rename_overwrite = __commonJS({ + "../../node_modules/.pnpm/rename-overwrite@4.0.0/node_modules/rename-overwrite/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var path = require("path"); + var rimraf = require_rimraf(); + module2.exports = async function renameOverwrite(oldPath, newPath) { + try { + await fs.promises.rename(oldPath, newPath); + } catch (err) { + switch (err.code) { + case "ENOTEMPTY": + case "EEXIST": + await rimraf(newPath); + await renameOverwrite(oldPath, newPath); + break; + case "EPERM": + case "EACCESS": { + await rimraf(newPath); + const start = Date.now(); + let backoff = 0; + let lastError = err; + while (Date.now() - start < 6e4 && (lastError.code === "EPERM" || lastError.code === "EACCESS")) { + await new Promise((resolve) => setTimeout(resolve, backoff)); + try { + await fs.promises.rename(oldPath, newPath); + return; + } catch (err2) { + lastError = err2; + } + if (backoff < 100) { + backoff += 10; + } + } + throw lastError; + } + case "ENOENT": + try { + await fs.promises.stat(oldPath); + } catch (statErr) { + if (statErr.code === "ENOENT") { + throw statErr; + } + } + await fs.promises.mkdir(path.dirname(newPath), { recursive: true }); + await renameOverwrite(oldPath, newPath); + break; + default: + throw err; + } + } + }; + module2.exports.sync = function renameOverwriteSync(oldPath, newPath) { + try { + fs.renameSync(oldPath, newPath); + } catch (err) { + switch (err.code) { + case "ENOTEMPTY": + case "EEXIST": + case "EPERM": + rimraf.sync(newPath); + fs.renameSync(oldPath, newPath); + return; + case "ENOENT": + fs.mkdirSync(path.dirname(newPath), { recursive: true }); + renameOverwriteSync(oldPath, newPath); + return; + default: + throw err; + } + } + }; + } +}); + +// ../../node_modules/.pnpm/minipass@3.1.5/node_modules/minipass/index.js +var require_minipass = __commonJS({ + "../../node_modules/.pnpm/minipass@3.1.5/node_modules/minipass/index.js"(exports2, module2) { + "use strict"; + var proc = typeof process === "object" && process ? process : { + stdout: null, + stderr: null + }; + var EE = require("events"); + var Stream = require("stream"); + var Yallist = require_yallist(); + var SD = require("string_decoder").StringDecoder; + var EOF = Symbol("EOF"); + var MAYBE_EMIT_END = Symbol("maybeEmitEnd"); + var EMITTED_END = Symbol("emittedEnd"); + var EMITTING_END = Symbol("emittingEnd"); + var EMITTED_ERROR = Symbol("emittedError"); + var CLOSED = Symbol("closed"); + var READ = Symbol("read"); + var FLUSH = Symbol("flush"); + var FLUSHCHUNK = Symbol("flushChunk"); + var ENCODING = Symbol("encoding"); + var DECODER = Symbol("decoder"); + var FLOWING = Symbol("flowing"); + var PAUSED = Symbol("paused"); + var RESUME = Symbol("resume"); + var BUFFERLENGTH = Symbol("bufferLength"); + var BUFFERPUSH = Symbol("bufferPush"); + var BUFFERSHIFT = Symbol("bufferShift"); + var OBJECTMODE = Symbol("objectMode"); + var DESTROYED = Symbol("destroyed"); + var doIter = global._MP_NO_ITERATOR_SYMBOLS_ !== "1"; + var ASYNCITERATOR = doIter && Symbol.asyncIterator || Symbol("asyncIterator not implemented"); + var ITERATOR = doIter && Symbol.iterator || Symbol("iterator not implemented"); + var isEndish = (ev) => ev === "end" || ev === "finish" || ev === "prefinish"; + var isArrayBuffer = (b) => b instanceof ArrayBuffer || typeof b === "object" && b.constructor && b.constructor.name === "ArrayBuffer" && b.byteLength >= 0; + var isArrayBufferView = (b) => !Buffer.isBuffer(b) && ArrayBuffer.isView(b); + module2.exports = class Minipass extends Stream { + constructor(options) { + super(); + this[FLOWING] = false; + this[PAUSED] = false; + this.pipes = new Yallist(); + this.buffer = new Yallist(); + this[OBJECTMODE] = options && options.objectMode || false; + if (this[OBJECTMODE]) + this[ENCODING] = null; + else + this[ENCODING] = options && options.encoding || null; + if (this[ENCODING] === "buffer") + this[ENCODING] = null; + this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null; + this[EOF] = false; + this[EMITTED_END] = false; + this[EMITTING_END] = false; + this[CLOSED] = false; + this[EMITTED_ERROR] = null; + this.writable = true; + this.readable = true; + this[BUFFERLENGTH] = 0; + this[DESTROYED] = false; + } + get bufferLength() { + return this[BUFFERLENGTH]; + } + get encoding() { + return this[ENCODING]; + } + set encoding(enc) { + if (this[OBJECTMODE]) + throw new Error("cannot set encoding in objectMode"); + if (this[ENCODING] && enc !== this[ENCODING] && (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH])) + throw new Error("cannot change encoding"); + if (this[ENCODING] !== enc) { + this[DECODER] = enc ? new SD(enc) : null; + if (this.buffer.length) + this.buffer = this.buffer.map((chunk) => this[DECODER].write(chunk)); + } + this[ENCODING] = enc; + } + setEncoding(enc) { + this.encoding = enc; + } + get objectMode() { + return this[OBJECTMODE]; + } + set objectMode(om) { + this[OBJECTMODE] = this[OBJECTMODE] || !!om; + } + write(chunk, encoding, cb) { + if (this[EOF]) + throw new Error("write after end"); + if (this[DESTROYED]) { + this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })); + return true; + } + if (typeof encoding === "function") + cb = encoding, encoding = "utf8"; + if (!encoding) + encoding = "utf8"; + if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) { + if (isArrayBufferView(chunk)) + chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength); + else if (isArrayBuffer(chunk)) + chunk = Buffer.from(chunk); + else if (typeof chunk !== "string") + this.objectMode = true; + } + if (!this.objectMode && !chunk.length) { + if (this[BUFFERLENGTH] !== 0) + this.emit("readable"); + if (cb) + cb(); + return this.flowing; + } + if (typeof chunk === "string" && !this[OBJECTMODE] && !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) { + chunk = Buffer.from(chunk, encoding); + } + if (Buffer.isBuffer(chunk) && this[ENCODING]) + chunk = this[DECODER].write(chunk); + if (this.flowing) { + if (this[BUFFERLENGTH] !== 0) + this[FLUSH](true); + this.emit("data", chunk); + } else + this[BUFFERPUSH](chunk); + if (this[BUFFERLENGTH] !== 0) + this.emit("readable"); + if (cb) + cb(); + return this.flowing; + } + read(n) { + if (this[DESTROYED]) + return null; + try { + if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) + return null; + if (this[OBJECTMODE]) + n = null; + if (this.buffer.length > 1 && !this[OBJECTMODE]) { + if (this.encoding) + this.buffer = new Yallist([ + Array.from(this.buffer).join("") + ]); + else + this.buffer = new Yallist([ + Buffer.concat(Array.from(this.buffer), this[BUFFERLENGTH]) + ]); + } + return this[READ](n || null, this.buffer.head.value); + } finally { + this[MAYBE_EMIT_END](); + } + } + [READ](n, chunk) { + if (n === chunk.length || n === null) + this[BUFFERSHIFT](); + else { + this.buffer.head.value = chunk.slice(n); + chunk = chunk.slice(0, n); + this[BUFFERLENGTH] -= n; + } + this.emit("data", chunk); + if (!this.buffer.length && !this[EOF]) + this.emit("drain"); + return chunk; + } + end(chunk, encoding, cb) { + if (typeof chunk === "function") + cb = chunk, chunk = null; + if (typeof encoding === "function") + cb = encoding, encoding = "utf8"; + if (chunk) + this.write(chunk, encoding); + if (cb) + this.once("end", cb); + this[EOF] = true; + this.writable = false; + if (this.flowing || !this[PAUSED]) + this[MAYBE_EMIT_END](); + return this; + } + [RESUME]() { + if (this[DESTROYED]) + return; + this[PAUSED] = false; + this[FLOWING] = true; + this.emit("resume"); + if (this.buffer.length) + this[FLUSH](); + else if (this[EOF]) + this[MAYBE_EMIT_END](); + else + this.emit("drain"); + } + resume() { + return this[RESUME](); + } + pause() { + this[FLOWING] = false; + this[PAUSED] = true; + } + get destroyed() { + return this[DESTROYED]; + } + get flowing() { + return this[FLOWING]; + } + get paused() { + return this[PAUSED]; + } + [BUFFERPUSH](chunk) { + if (this[OBJECTMODE]) + this[BUFFERLENGTH] += 1; + else + this[BUFFERLENGTH] += chunk.length; + return this.buffer.push(chunk); + } + [BUFFERSHIFT]() { + if (this.buffer.length) { + if (this[OBJECTMODE]) + this[BUFFERLENGTH] -= 1; + else + this[BUFFERLENGTH] -= this.buffer.head.value.length; + } + return this.buffer.shift(); + } + [FLUSH](noDrain) { + do { + } while (this[FLUSHCHUNK](this[BUFFERSHIFT]())); + if (!noDrain && !this.buffer.length && !this[EOF]) + this.emit("drain"); + } + [FLUSHCHUNK](chunk) { + return chunk ? (this.emit("data", chunk), this.flowing) : false; + } + pipe(dest, opts) { + if (this[DESTROYED]) + return; + const ended = this[EMITTED_END]; + opts = opts || {}; + if (dest === proc.stdout || dest === proc.stderr) + opts.end = false; + else + opts.end = opts.end !== false; + const p = { dest, opts, ondrain: (_) => this[RESUME]() }; + this.pipes.push(p); + dest.on("drain", p.ondrain); + this[RESUME](); + if (ended && p.opts.end) + p.dest.end(); + return dest; + } + addListener(ev, fn2) { + return this.on(ev, fn2); + } + on(ev, fn2) { + try { + return super.on(ev, fn2); + } finally { + if (ev === "data" && !this.pipes.length && !this.flowing) + this[RESUME](); + else if (isEndish(ev) && this[EMITTED_END]) { + super.emit(ev); + this.removeAllListeners(ev); + } else if (ev === "error" && this[EMITTED_ERROR]) { + fn2.call(this, this[EMITTED_ERROR]); + } + } + } + get emittedEnd() { + return this[EMITTED_END]; + } + [MAYBE_EMIT_END]() { + if (!this[EMITTING_END] && !this[EMITTED_END] && !this[DESTROYED] && this.buffer.length === 0 && this[EOF]) { + this[EMITTING_END] = true; + this.emit("end"); + this.emit("prefinish"); + this.emit("finish"); + if (this[CLOSED]) + this.emit("close"); + this[EMITTING_END] = false; + } + } + emit(ev, data) { + if (ev !== "error" && ev !== "close" && ev !== DESTROYED && this[DESTROYED]) + return; + else if (ev === "data") { + if (!data) + return; + if (this.pipes.length) + this.pipes.forEach((p) => p.dest.write(data) === false && this.pause()); + } else if (ev === "end") { + if (this[EMITTED_END] === true) + return; + this[EMITTED_END] = true; + this.readable = false; + if (this[DECODER]) { + data = this[DECODER].end(); + if (data) { + this.pipes.forEach((p) => p.dest.write(data)); + super.emit("data", data); + } + } + this.pipes.forEach((p) => { + p.dest.removeListener("drain", p.ondrain); + if (p.opts.end) + p.dest.end(); + }); + } else if (ev === "close") { + this[CLOSED] = true; + if (!this[EMITTED_END] && !this[DESTROYED]) + return; + } else if (ev === "error") { + this[EMITTED_ERROR] = data; + } + const args2 = new Array(arguments.length); + args2[0] = ev; + args2[1] = data; + if (arguments.length > 2) { + for (let i = 2; i < arguments.length; i++) { + args2[i] = arguments[i]; + } + } + try { + return super.emit.apply(this, args2); + } finally { + if (!isEndish(ev)) + this[MAYBE_EMIT_END](); + else + this.removeAllListeners(ev); + } + } + collect() { + const buf = []; + if (!this[OBJECTMODE]) + buf.dataLength = 0; + const p = this.promise(); + this.on("data", (c) => { + buf.push(c); + if (!this[OBJECTMODE]) + buf.dataLength += c.length; + }); + return p.then(() => buf); + } + concat() { + return this[OBJECTMODE] ? Promise.reject(new Error("cannot concat in objectMode")) : this.collect().then((buf) => this[OBJECTMODE] ? Promise.reject(new Error("cannot concat in objectMode")) : this[ENCODING] ? buf.join("") : Buffer.concat(buf, buf.dataLength)); + } + promise() { + return new Promise((resolve, reject) => { + this.on(DESTROYED, () => reject(new Error("stream destroyed"))); + this.on("error", (er) => reject(er)); + this.on("end", () => resolve()); + }); + } + [ASYNCITERATOR]() { + const next = () => { + const res = this.read(); + if (res !== null) + return Promise.resolve({ done: false, value: res }); + if (this[EOF]) + return Promise.resolve({ done: true }); + let resolve = null; + let reject = null; + const onerr = (er) => { + this.removeListener("data", ondata); + this.removeListener("end", onend); + reject(er); + }; + const ondata = (value) => { + this.removeListener("error", onerr); + this.removeListener("end", onend); + this.pause(); + resolve({ value, done: !!this[EOF] }); + }; + const onend = () => { + this.removeListener("error", onerr); + this.removeListener("data", ondata); + resolve({ done: true }); + }; + const ondestroy = () => onerr(new Error("stream destroyed")); + return new Promise((res2, rej) => { + reject = rej; + resolve = res2; + this.once(DESTROYED, ondestroy); + this.once("error", onerr); + this.once("end", onend); + this.once("data", ondata); + }); + }; + return { next }; + } + [ITERATOR]() { + const next = () => { + const value = this.read(); + const done = value === null; + return { value, done }; + }; + return { next }; + } + destroy(er) { + if (this[DESTROYED]) { + if (er) + this.emit("error", er); + else + this.emit(DESTROYED); + return this; + } + this[DESTROYED] = true; + this.buffer = new Yallist(); + this[BUFFERLENGTH] = 0; + if (typeof this.close === "function" && !this[CLOSED]) + this.close(); + if (er) + this.emit("error", er); + else + this.emit(DESTROYED); + return this; + } + static isStream(s) { + return !!s && (s instanceof Minipass || s instanceof Stream || s instanceof EE && (typeof s.pipe === "function" || typeof s.write === "function" && typeof s.end === "function")); + } + }; + } +}); + +// ../../node_modules/.pnpm/ssri@8.0.1/node_modules/ssri/index.js +var require_ssri = __commonJS({ + "../../node_modules/.pnpm/ssri@8.0.1/node_modules/ssri/index.js"(exports2, module2) { + "use strict"; + var crypto = require("crypto"); + var MiniPass = require_minipass(); + var SPEC_ALGORITHMS = ["sha256", "sha384", "sha512"]; + var BASE64_REGEX = /^[a-z0-9+/]+(?:=?=?)$/i; + var SRI_REGEX = /^([a-z0-9]+)-([^?]+)([?\S*]*)$/; + var STRICT_SRI_REGEX = /^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)?$/; + var VCHAR_REGEX = /^[\x21-\x7E]+$/; + var defaultOpts = { + algorithms: ["sha512"], + error: false, + options: [], + pickAlgorithm: getPrioritizedHash, + sep: " ", + single: false, + strict: false + }; + var ssriOpts = (opts = {}) => ({ ...defaultOpts, ...opts }); + var getOptString = (options) => !options || !options.length ? "" : `?${options.join("?")}`; + var _onEnd = Symbol("_onEnd"); + var _getOptions = Symbol("_getOptions"); + var IntegrityStream = class extends MiniPass { + constructor(opts) { + super(); + this.size = 0; + this.opts = opts; + this[_getOptions](); + const { algorithms = defaultOpts.algorithms } = opts; + this.algorithms = Array.from(new Set(algorithms.concat(this.algorithm ? [this.algorithm] : []))); + this.hashes = this.algorithms.map(crypto.createHash); + } + [_getOptions]() { + const { + integrity, + size, + options + } = { ...defaultOpts, ...this.opts }; + this.sri = integrity ? parse(integrity, this.opts) : null; + this.expectedSize = size; + this.goodSri = this.sri ? !!Object.keys(this.sri).length : false; + this.algorithm = this.goodSri ? this.sri.pickAlgorithm(this.opts) : null; + this.digests = this.goodSri ? this.sri[this.algorithm] : null; + this.optString = getOptString(options); + } + emit(ev, data) { + if (ev === "end") + this[_onEnd](); + return super.emit(ev, data); + } + write(data) { + this.size += data.length; + this.hashes.forEach((h) => h.update(data)); + return super.write(data); + } + [_onEnd]() { + if (!this.goodSri) { + this[_getOptions](); + } + const newSri = parse(this.hashes.map((h, i) => { + return `${this.algorithms[i]}-${h.digest("base64")}${this.optString}`; + }).join(" "), this.opts); + const match = this.goodSri && newSri.match(this.sri, this.opts); + if (typeof this.expectedSize === "number" && this.size !== this.expectedSize) { + const err = new Error(`stream size mismatch when checking ${this.sri}. + Wanted: ${this.expectedSize} + Found: ${this.size}`); + err.code = "EBADSIZE"; + err.found = this.size; + err.expected = this.expectedSize; + err.sri = this.sri; + this.emit("error", err); + } else if (this.sri && !match) { + const err = new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${newSri}. (${this.size} bytes)`); + err.code = "EINTEGRITY"; + err.found = newSri; + err.expected = this.digests; + err.algorithm = this.algorithm; + err.sri = this.sri; + this.emit("error", err); + } else { + this.emit("size", this.size); + this.emit("integrity", newSri); + match && this.emit("verified", match); + } + } + }; + var Hash = class { + get isHash() { + return true; + } + constructor(hash, opts) { + opts = ssriOpts(opts); + const strict = !!opts.strict; + this.source = hash.trim(); + this.digest = ""; + this.algorithm = ""; + this.options = []; + const match = this.source.match(strict ? STRICT_SRI_REGEX : SRI_REGEX); + if (!match) { + return; + } + if (strict && !SPEC_ALGORITHMS.some((a) => a === match[1])) { + return; + } + this.algorithm = match[1]; + this.digest = match[2]; + const rawOpts = match[3]; + if (rawOpts) { + this.options = rawOpts.slice(1).split("?"); + } + } + hexDigest() { + return this.digest && Buffer.from(this.digest, "base64").toString("hex"); + } + toJSON() { + return this.toString(); + } + toString(opts) { + opts = ssriOpts(opts); + if (opts.strict) { + if (!(SPEC_ALGORITHMS.some((x) => x === this.algorithm) && this.digest.match(BASE64_REGEX) && this.options.every((opt) => opt.match(VCHAR_REGEX)))) { + return ""; + } + } + const options = this.options && this.options.length ? `?${this.options.join("?")}` : ""; + return `${this.algorithm}-${this.digest}${options}`; + } + }; + var Integrity = class { + get isIntegrity() { + return true; + } + toJSON() { + return this.toString(); + } + isEmpty() { + return Object.keys(this).length === 0; + } + toString(opts) { + opts = ssriOpts(opts); + let sep = opts.sep || " "; + if (opts.strict) { + sep = sep.replace(/\S+/g, " "); + } + return Object.keys(this).map((k) => { + return this[k].map((hash) => { + return Hash.prototype.toString.call(hash, opts); + }).filter((x) => x.length).join(sep); + }).filter((x) => x.length).join(sep); + } + concat(integrity, opts) { + opts = ssriOpts(opts); + const other = typeof integrity === "string" ? integrity : stringify(integrity, opts); + return parse(`${this.toString(opts)} ${other}`, opts); + } + hexDigest() { + return parse(this, { single: true }).hexDigest(); + } + merge(integrity, opts) { + opts = ssriOpts(opts); + const other = parse(integrity, opts); + for (const algo in other) { + if (this[algo]) { + if (!this[algo].find((hash) => other[algo].find((otherhash) => hash.digest === otherhash.digest))) { + throw new Error("hashes do not match, cannot update integrity"); + } + } else { + this[algo] = other[algo]; + } + } + } + match(integrity, opts) { + opts = ssriOpts(opts); + const other = parse(integrity, opts); + const algo = other.pickAlgorithm(opts); + return this[algo] && other[algo] && this[algo].find((hash) => other[algo].find((otherhash) => hash.digest === otherhash.digest)) || false; + } + pickAlgorithm(opts) { + opts = ssriOpts(opts); + const pickAlgorithm = opts.pickAlgorithm; + const keys = Object.keys(this); + return keys.reduce((acc, algo) => { + return pickAlgorithm(acc, algo) || acc; + }); + } + }; + module2.exports.parse = parse; + function parse(sri, opts) { + if (!sri) + return null; + opts = ssriOpts(opts); + if (typeof sri === "string") { + return _parse(sri, opts); + } else if (sri.algorithm && sri.digest) { + const fullSri = new Integrity(); + fullSri[sri.algorithm] = [sri]; + return _parse(stringify(fullSri, opts), opts); + } else { + return _parse(stringify(sri, opts), opts); + } + } + function _parse(integrity, opts) { + if (opts.single) { + return new Hash(integrity, opts); + } + const hashes = integrity.trim().split(/\s+/).reduce((acc, string) => { + const hash = new Hash(string, opts); + if (hash.algorithm && hash.digest) { + const algo = hash.algorithm; + if (!acc[algo]) { + acc[algo] = []; + } + acc[algo].push(hash); + } + return acc; + }, new Integrity()); + return hashes.isEmpty() ? null : hashes; + } + module2.exports.stringify = stringify; + function stringify(obj, opts) { + opts = ssriOpts(opts); + if (obj.algorithm && obj.digest) { + return Hash.prototype.toString.call(obj, opts); + } else if (typeof obj === "string") { + return stringify(parse(obj, opts), opts); + } else { + return Integrity.prototype.toString.call(obj, opts); + } + } + module2.exports.fromHex = fromHex; + function fromHex(hexDigest, algorithm, opts) { + opts = ssriOpts(opts); + const optString = getOptString(opts.options); + return parse(`${algorithm}-${Buffer.from(hexDigest, "hex").toString("base64")}${optString}`, opts); + } + module2.exports.fromData = fromData; + function fromData(data, opts) { + opts = ssriOpts(opts); + const algorithms = opts.algorithms; + const optString = getOptString(opts.options); + return algorithms.reduce((acc, algo) => { + const digest = crypto.createHash(algo).update(data).digest("base64"); + const hash = new Hash(`${algo}-${digest}${optString}`, opts); + if (hash.algorithm && hash.digest) { + const algo2 = hash.algorithm; + if (!acc[algo2]) { + acc[algo2] = []; + } + acc[algo2].push(hash); + } + return acc; + }, new Integrity()); + } + module2.exports.fromStream = fromStream; + function fromStream(stream, opts) { + opts = ssriOpts(opts); + const istream = integrityStream(opts); + return new Promise((resolve, reject) => { + stream.pipe(istream); + stream.on("error", reject); + istream.on("error", reject); + let sri; + istream.on("integrity", (s) => { + sri = s; + }); + istream.on("end", () => resolve(sri)); + istream.on("data", () => { + }); + }); + } + module2.exports.checkData = checkData; + function checkData(data, sri, opts) { + opts = ssriOpts(opts); + sri = parse(sri, opts); + if (!sri || !Object.keys(sri).length) { + if (opts.error) { + throw Object.assign(new Error("No valid integrity hashes to check against"), { + code: "EINTEGRITY" + }); + } else { + return false; + } + } + const algorithm = sri.pickAlgorithm(opts); + const digest = crypto.createHash(algorithm).update(data).digest("base64"); + const newSri = parse({ algorithm, digest }); + const match = newSri.match(sri, opts); + if (match || !opts.error) { + return match; + } else if (typeof opts.size === "number" && data.length !== opts.size) { + const err = new Error(`data size mismatch when checking ${sri}. + Wanted: ${opts.size} + Found: ${data.length}`); + err.code = "EBADSIZE"; + err.found = data.length; + err.expected = opts.size; + err.sri = sri; + throw err; + } else { + const err = new Error(`Integrity checksum failed when using ${algorithm}: Wanted ${sri}, but got ${newSri}. (${data.length} bytes)`); + err.code = "EINTEGRITY"; + err.found = newSri; + err.expected = sri; + err.algorithm = algorithm; + err.sri = sri; + throw err; + } + } + module2.exports.checkStream = checkStream; + function checkStream(stream, sri, opts) { + opts = ssriOpts(opts); + opts.integrity = sri; + sri = parse(sri, opts); + if (!sri || !Object.keys(sri).length) { + return Promise.reject(Object.assign(new Error("No valid integrity hashes to check against"), { + code: "EINTEGRITY" + })); + } + const checker = integrityStream(opts); + return new Promise((resolve, reject) => { + stream.pipe(checker); + stream.on("error", reject); + checker.on("error", reject); + let sri2; + checker.on("verified", (s) => { + sri2 = s; + }); + checker.on("end", () => resolve(sri2)); + checker.on("data", () => { + }); + }); + } + module2.exports.integrityStream = integrityStream; + function integrityStream(opts = {}) { + return new IntegrityStream(opts); + } + module2.exports.create = createIntegrity; + function createIntegrity(opts) { + opts = ssriOpts(opts); + const algorithms = opts.algorithms; + const optString = getOptString(opts.options); + const hashes = algorithms.map(crypto.createHash); + return { + update: function(chunk, enc) { + hashes.forEach((h) => h.update(chunk, enc)); + return this; + }, + digest: function(enc) { + const integrity = algorithms.reduce((acc, algo) => { + const digest = hashes.shift().digest("base64"); + const hash = new Hash(`${algo}-${digest}${optString}`, opts); + if (hash.algorithm && hash.digest) { + const algo2 = hash.algorithm; + if (!acc[algo2]) { + acc[algo2] = []; + } + acc[algo2].push(hash); + } + return acc; + }, new Integrity()); + return integrity; + } + }; + } + var NODE_HASHES = new Set(crypto.getHashes()); + var DEFAULT_PRIORITY = [ + "md5", + "whirlpool", + "sha1", + "sha224", + "sha256", + "sha384", + "sha512", + "sha3", + "sha3-256", + "sha3-384", + "sha3-512", + "sha3_256", + "sha3_384", + "sha3_512" + ].filter((algo) => NODE_HASHES.has(algo)); + function getPrioritizedHash(algo1, algo2) { + return DEFAULT_PRIORITY.indexOf(algo1.toLowerCase()) >= DEFAULT_PRIORITY.indexOf(algo2.toLowerCase()) ? algo1 : algo2; + } + } +}); + +// ../../node_modules/.pnpm/buffer-from@1.1.2/node_modules/buffer-from/index.js +var require_buffer_from = __commonJS({ + "../../node_modules/.pnpm/buffer-from@1.1.2/node_modules/buffer-from/index.js"(exports2, module2) { + var toString = Object.prototype.toString; + var isModern = typeof Buffer !== "undefined" && typeof Buffer.alloc === "function" && typeof Buffer.allocUnsafe === "function" && typeof Buffer.from === "function"; + function isArrayBuffer(input) { + return toString.call(input).slice(8, -1) === "ArrayBuffer"; + } + function fromArrayBuffer(obj, byteOffset, length) { + byteOffset >>>= 0; + var maxLength = obj.byteLength - byteOffset; + if (maxLength < 0) { + throw new RangeError("'offset' is out of bounds"); + } + if (length === void 0) { + length = maxLength; + } else { + length >>>= 0; + if (length > maxLength) { + throw new RangeError("'length' is out of bounds"); + } + } + return isModern ? Buffer.from(obj.slice(byteOffset, byteOffset + length)) : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length))); + } + function fromString(string, encoding) { + if (typeof encoding !== "string" || encoding === "") { + encoding = "utf8"; + } + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding'); + } + return isModern ? Buffer.from(string, encoding) : new Buffer(string, encoding); + } + function bufferFrom(value, encodingOrOffset, length) { + if (typeof value === "number") { + throw new TypeError('"value" argument must not be a number'); + } + if (isArrayBuffer(value)) { + return fromArrayBuffer(value, encodingOrOffset, length); + } + if (typeof value === "string") { + return fromString(value, encodingOrOffset); + } + return isModern ? Buffer.from(value) : new Buffer(value); + } + module2.exports = bufferFrom; + } +}); + +// ../../node_modules/.pnpm/typedarray@0.0.6/node_modules/typedarray/index.js +var require_typedarray = __commonJS({ + "../../node_modules/.pnpm/typedarray@0.0.6/node_modules/typedarray/index.js"(exports2) { + var undefined2 = void 0; + var MAX_ARRAY_LENGTH = 1e5; + var ECMAScript = function() { + var opts = Object.prototype.toString, ophop = Object.prototype.hasOwnProperty; + return { + Class: function(v) { + return opts.call(v).replace(/^\[object *|\]$/g, ""); + }, + HasProperty: function(o, p) { + return p in o; + }, + HasOwnProperty: function(o, p) { + return ophop.call(o, p); + }, + IsCallable: function(o) { + return typeof o === "function"; + }, + ToInt32: function(v) { + return v >> 0; + }, + ToUint32: function(v) { + return v >>> 0; + } + }; + }(); + var LN2 = Math.LN2; + var abs = Math.abs; + var floor = Math.floor; + var log2 = Math.log; + var min = Math.min; + var pow = Math.pow; + var round = Math.round; + function configureProperties(obj) { + if (getOwnPropNames && defineProp) { + var props = getOwnPropNames(obj), i; + for (i = 0; i < props.length; i += 1) { + defineProp(obj, props[i], { + value: obj[props[i]], + writable: false, + enumerable: false, + configurable: false + }); + } + } + } + var defineProp; + if (Object.defineProperty && function() { + try { + Object.defineProperty({}, "x", {}); + return true; + } catch (e) { + return false; + } + }()) { + defineProp = Object.defineProperty; + } else { + defineProp = function(o, p, desc) { + if (!o === Object(o)) + throw new TypeError("Object.defineProperty called on non-object"); + if (ECMAScript.HasProperty(desc, "get") && Object.prototype.__defineGetter__) { + Object.prototype.__defineGetter__.call(o, p, desc.get); + } + if (ECMAScript.HasProperty(desc, "set") && Object.prototype.__defineSetter__) { + Object.prototype.__defineSetter__.call(o, p, desc.set); + } + if (ECMAScript.HasProperty(desc, "value")) { + o[p] = desc.value; + } + return o; + }; + } + var getOwnPropNames = Object.getOwnPropertyNames || function(o) { + if (o !== Object(o)) + throw new TypeError("Object.getOwnPropertyNames called on non-object"); + var props = [], p; + for (p in o) { + if (ECMAScript.HasOwnProperty(o, p)) { + props.push(p); + } + } + return props; + }; + function makeArrayAccessors(obj) { + if (!defineProp) { + return; + } + if (obj.length > MAX_ARRAY_LENGTH) + throw new RangeError("Array too large for polyfill"); + function makeArrayAccessor(index) { + defineProp(obj, index, { + "get": function() { + return obj._getter(index); + }, + "set": function(v) { + obj._setter(index, v); + }, + enumerable: true, + configurable: false + }); + } + var i; + for (i = 0; i < obj.length; i += 1) { + makeArrayAccessor(i); + } + } + function as_signed(value, bits) { + var s = 32 - bits; + return value << s >> s; + } + function as_unsigned(value, bits) { + var s = 32 - bits; + return value << s >>> s; + } + function packI8(n) { + return [n & 255]; + } + function unpackI8(bytes) { + return as_signed(bytes[0], 8); + } + function packU8(n) { + return [n & 255]; + } + function unpackU8(bytes) { + return as_unsigned(bytes[0], 8); + } + function packU8Clamped(n) { + n = round(Number(n)); + return [n < 0 ? 0 : n > 255 ? 255 : n & 255]; + } + function packI16(n) { + return [n >> 8 & 255, n & 255]; + } + function unpackI16(bytes) { + return as_signed(bytes[0] << 8 | bytes[1], 16); + } + function packU16(n) { + return [n >> 8 & 255, n & 255]; + } + function unpackU16(bytes) { + return as_unsigned(bytes[0] << 8 | bytes[1], 16); + } + function packI32(n) { + return [n >> 24 & 255, n >> 16 & 255, n >> 8 & 255, n & 255]; + } + function unpackI32(bytes) { + return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); + } + function packU32(n) { + return [n >> 24 & 255, n >> 16 & 255, n >> 8 & 255, n & 255]; + } + function unpackU32(bytes) { + return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); + } + function packIEEE754(v, ebits, fbits) { + var bias = (1 << ebits - 1) - 1, s, e, f, ln, i, bits, str, bytes; + function roundToEven(n) { + var w = floor(n), f2 = n - w; + if (f2 < 0.5) + return w; + if (f2 > 0.5) + return w + 1; + return w % 2 ? w + 1 : w; + } + if (v !== v) { + e = (1 << ebits) - 1; + f = pow(2, fbits - 1); + s = 0; + } else if (v === Infinity || v === -Infinity) { + e = (1 << ebits) - 1; + f = 0; + s = v < 0 ? 1 : 0; + } else if (v === 0) { + e = 0; + f = 0; + s = 1 / v === -Infinity ? 1 : 0; + } else { + s = v < 0; + v = abs(v); + if (v >= pow(2, 1 - bias)) { + e = min(floor(log2(v) / LN2), 1023); + f = roundToEven(v / pow(2, e) * pow(2, fbits)); + if (f / pow(2, fbits) >= 2) { + e = e + 1; + f = 1; + } + if (e > bias) { + e = (1 << ebits) - 1; + f = 0; + } else { + e = e + bias; + f = f - pow(2, fbits); + } + } else { + e = 0; + f = roundToEven(v / pow(2, 1 - bias - fbits)); + } + } + bits = []; + for (i = fbits; i; i -= 1) { + bits.push(f % 2 ? 1 : 0); + f = floor(f / 2); + } + for (i = ebits; i; i -= 1) { + bits.push(e % 2 ? 1 : 0); + e = floor(e / 2); + } + bits.push(s ? 1 : 0); + bits.reverse(); + str = bits.join(""); + bytes = []; + while (str.length) { + bytes.push(parseInt(str.substring(0, 8), 2)); + str = str.substring(8); + } + return bytes; + } + function unpackIEEE754(bytes, ebits, fbits) { + var bits = [], i, j, b, str, bias, s, e, f; + for (i = bytes.length; i; i -= 1) { + b = bytes[i - 1]; + for (j = 8; j; j -= 1) { + bits.push(b % 2 ? 1 : 0); + b = b >> 1; + } + } + bits.reverse(); + str = bits.join(""); + bias = (1 << ebits - 1) - 1; + s = parseInt(str.substring(0, 1), 2) ? -1 : 1; + e = parseInt(str.substring(1, 1 + ebits), 2); + f = parseInt(str.substring(1 + ebits), 2); + if (e === (1 << ebits) - 1) { + return f !== 0 ? NaN : s * Infinity; + } else if (e > 0) { + return s * pow(2, e - bias) * (1 + f / pow(2, fbits)); + } else if (f !== 0) { + return s * pow(2, -(bias - 1)) * (f / pow(2, fbits)); + } else { + return s < 0 ? -0 : 0; + } + } + function unpackF64(b) { + return unpackIEEE754(b, 11, 52); + } + function packF64(v) { + return packIEEE754(v, 11, 52); + } + function unpackF32(b) { + return unpackIEEE754(b, 8, 23); + } + function packF32(v) { + return packIEEE754(v, 8, 23); + } + (function() { + var ArrayBuffer2 = function ArrayBuffer3(length) { + length = ECMAScript.ToInt32(length); + if (length < 0) + throw new RangeError("ArrayBuffer size is not a small enough positive integer"); + this.byteLength = length; + this._bytes = []; + this._bytes.length = length; + var i; + for (i = 0; i < this.byteLength; i += 1) { + this._bytes[i] = 0; + } + configureProperties(this); + }; + exports2.ArrayBuffer = exports2.ArrayBuffer || ArrayBuffer2; + var ArrayBufferView = function ArrayBufferView2() { + }; + function makeConstructor(bytesPerElement, pack, unpack) { + var ctor; + ctor = function(buffer, byteOffset, length) { + var array, sequence, i, s; + if (!arguments.length || typeof arguments[0] === "number") { + this.length = ECMAScript.ToInt32(arguments[0]); + if (length < 0) + throw new RangeError("ArrayBufferView size is not a small enough positive integer"); + this.byteLength = this.length * this.BYTES_PER_ELEMENT; + this.buffer = new ArrayBuffer2(this.byteLength); + this.byteOffset = 0; + } else if (typeof arguments[0] === "object" && arguments[0].constructor === ctor) { + array = arguments[0]; + this.length = array.length; + this.byteLength = this.length * this.BYTES_PER_ELEMENT; + this.buffer = new ArrayBuffer2(this.byteLength); + this.byteOffset = 0; + for (i = 0; i < this.length; i += 1) { + this._setter(i, array._getter(i)); + } + } else if (typeof arguments[0] === "object" && !(arguments[0] instanceof ArrayBuffer2 || ECMAScript.Class(arguments[0]) === "ArrayBuffer")) { + sequence = arguments[0]; + this.length = ECMAScript.ToUint32(sequence.length); + this.byteLength = this.length * this.BYTES_PER_ELEMENT; + this.buffer = new ArrayBuffer2(this.byteLength); + this.byteOffset = 0; + for (i = 0; i < this.length; i += 1) { + s = sequence[i]; + this._setter(i, Number(s)); + } + } else if (typeof arguments[0] === "object" && (arguments[0] instanceof ArrayBuffer2 || ECMAScript.Class(arguments[0]) === "ArrayBuffer")) { + this.buffer = buffer; + this.byteOffset = ECMAScript.ToUint32(byteOffset); + if (this.byteOffset > this.buffer.byteLength) { + throw new RangeError("byteOffset out of range"); + } + if (this.byteOffset % this.BYTES_PER_ELEMENT) { + throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size."); + } + if (arguments.length < 3) { + this.byteLength = this.buffer.byteLength - this.byteOffset; + if (this.byteLength % this.BYTES_PER_ELEMENT) { + throw new RangeError("length of buffer minus byteOffset not a multiple of the element size"); + } + this.length = this.byteLength / this.BYTES_PER_ELEMENT; + } else { + this.length = ECMAScript.ToUint32(length); + this.byteLength = this.length * this.BYTES_PER_ELEMENT; + } + if (this.byteOffset + this.byteLength > this.buffer.byteLength) { + throw new RangeError("byteOffset and length reference an area beyond the end of the buffer"); + } + } else { + throw new TypeError("Unexpected argument type(s)"); + } + this.constructor = ctor; + configureProperties(this); + makeArrayAccessors(this); + }; + ctor.prototype = new ArrayBufferView(); + ctor.prototype.BYTES_PER_ELEMENT = bytesPerElement; + ctor.prototype._pack = pack; + ctor.prototype._unpack = unpack; + ctor.BYTES_PER_ELEMENT = bytesPerElement; + ctor.prototype._getter = function(index) { + if (arguments.length < 1) + throw new SyntaxError("Not enough arguments"); + index = ECMAScript.ToUint32(index); + if (index >= this.length) { + return undefined2; + } + var bytes = [], i, o; + for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; i < this.BYTES_PER_ELEMENT; i += 1, o += 1) { + bytes.push(this.buffer._bytes[o]); + } + return this._unpack(bytes); + }; + ctor.prototype.get = ctor.prototype._getter; + ctor.prototype._setter = function(index, value) { + if (arguments.length < 2) + throw new SyntaxError("Not enough arguments"); + index = ECMAScript.ToUint32(index); + if (index >= this.length) { + return undefined2; + } + var bytes = this._pack(value), i, o; + for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; i < this.BYTES_PER_ELEMENT; i += 1, o += 1) { + this.buffer._bytes[o] = bytes[i]; + } + }; + ctor.prototype.set = function(index, value) { + if (arguments.length < 1) + throw new SyntaxError("Not enough arguments"); + var array, sequence, offset, len, i, s, d, byteOffset, byteLength, tmp; + if (typeof arguments[0] === "object" && arguments[0].constructor === this.constructor) { + array = arguments[0]; + offset = ECMAScript.ToUint32(arguments[1]); + if (offset + array.length > this.length) { + throw new RangeError("Offset plus length of array is out of range"); + } + byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT; + byteLength = array.length * this.BYTES_PER_ELEMENT; + if (array.buffer === this.buffer) { + tmp = []; + for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) { + tmp[i] = array.buffer._bytes[s]; + } + for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) { + this.buffer._bytes[d] = tmp[i]; + } + } else { + for (i = 0, s = array.byteOffset, d = byteOffset; i < byteLength; i += 1, s += 1, d += 1) { + this.buffer._bytes[d] = array.buffer._bytes[s]; + } + } + } else if (typeof arguments[0] === "object" && typeof arguments[0].length !== "undefined") { + sequence = arguments[0]; + len = ECMAScript.ToUint32(sequence.length); + offset = ECMAScript.ToUint32(arguments[1]); + if (offset + len > this.length) { + throw new RangeError("Offset plus length of array is out of range"); + } + for (i = 0; i < len; i += 1) { + s = sequence[i]; + this._setter(offset + i, Number(s)); + } + } else { + throw new TypeError("Unexpected argument type(s)"); + } + }; + ctor.prototype.subarray = function(start, end) { + function clamp(v, min2, max) { + return v < min2 ? min2 : v > max ? max : v; + } + start = ECMAScript.ToInt32(start); + end = ECMAScript.ToInt32(end); + if (arguments.length < 1) { + start = 0; + } + if (arguments.length < 2) { + end = this.length; + } + if (start < 0) { + start = this.length + start; + } + if (end < 0) { + end = this.length + end; + } + start = clamp(start, 0, this.length); + end = clamp(end, 0, this.length); + var len = end - start; + if (len < 0) { + len = 0; + } + return new this.constructor(this.buffer, this.byteOffset + start * this.BYTES_PER_ELEMENT, len); + }; + return ctor; + } + var Int8Array2 = makeConstructor(1, packI8, unpackI8); + var Uint8Array2 = makeConstructor(1, packU8, unpackU8); + var Uint8ClampedArray2 = makeConstructor(1, packU8Clamped, unpackU8); + var Int16Array2 = makeConstructor(2, packI16, unpackI16); + var Uint16Array2 = makeConstructor(2, packU16, unpackU16); + var Int32Array2 = makeConstructor(4, packI32, unpackI32); + var Uint32Array2 = makeConstructor(4, packU32, unpackU32); + var Float32Array2 = makeConstructor(4, packF32, unpackF32); + var Float64Array2 = makeConstructor(8, packF64, unpackF64); + exports2.Int8Array = exports2.Int8Array || Int8Array2; + exports2.Uint8Array = exports2.Uint8Array || Uint8Array2; + exports2.Uint8ClampedArray = exports2.Uint8ClampedArray || Uint8ClampedArray2; + exports2.Int16Array = exports2.Int16Array || Int16Array2; + exports2.Uint16Array = exports2.Uint16Array || Uint16Array2; + exports2.Int32Array = exports2.Int32Array || Int32Array2; + exports2.Uint32Array = exports2.Uint32Array || Uint32Array2; + exports2.Float32Array = exports2.Float32Array || Float32Array2; + exports2.Float64Array = exports2.Float64Array || Float64Array2; + })(); + (function() { + function r(array, index) { + return ECMAScript.IsCallable(array.get) ? array.get(index) : array[index]; + } + var IS_BIG_ENDIAN = function() { + var u16array = new exports2.Uint16Array([4660]), u8array = new exports2.Uint8Array(u16array.buffer); + return r(u8array, 0) === 18; + }(); + var DataView2 = function DataView3(buffer, byteOffset, byteLength) { + if (arguments.length === 0) { + buffer = new exports2.ArrayBuffer(0); + } else if (!(buffer instanceof exports2.ArrayBuffer || ECMAScript.Class(buffer) === "ArrayBuffer")) { + throw new TypeError("TypeError"); + } + this.buffer = buffer || new exports2.ArrayBuffer(0); + this.byteOffset = ECMAScript.ToUint32(byteOffset); + if (this.byteOffset > this.buffer.byteLength) { + throw new RangeError("byteOffset out of range"); + } + if (arguments.length < 3) { + this.byteLength = this.buffer.byteLength - this.byteOffset; + } else { + this.byteLength = ECMAScript.ToUint32(byteLength); + } + if (this.byteOffset + this.byteLength > this.buffer.byteLength) { + throw new RangeError("byteOffset and length reference an area beyond the end of the buffer"); + } + configureProperties(this); + }; + function makeGetter(arrayType) { + return function(byteOffset, littleEndian) { + byteOffset = ECMAScript.ToUint32(byteOffset); + if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) { + throw new RangeError("Array index out of range"); + } + byteOffset += this.byteOffset; + var uint8Array = new exports2.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT), bytes = [], i; + for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) { + bytes.push(r(uint8Array, i)); + } + if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) { + bytes.reverse(); + } + return r(new arrayType(new exports2.Uint8Array(bytes).buffer), 0); + }; + } + DataView2.prototype.getUint8 = makeGetter(exports2.Uint8Array); + DataView2.prototype.getInt8 = makeGetter(exports2.Int8Array); + DataView2.prototype.getUint16 = makeGetter(exports2.Uint16Array); + DataView2.prototype.getInt16 = makeGetter(exports2.Int16Array); + DataView2.prototype.getUint32 = makeGetter(exports2.Uint32Array); + DataView2.prototype.getInt32 = makeGetter(exports2.Int32Array); + DataView2.prototype.getFloat32 = makeGetter(exports2.Float32Array); + DataView2.prototype.getFloat64 = makeGetter(exports2.Float64Array); + function makeSetter(arrayType) { + return function(byteOffset, value, littleEndian) { + byteOffset = ECMAScript.ToUint32(byteOffset); + if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) { + throw new RangeError("Array index out of range"); + } + var typeArray = new arrayType([value]), byteArray = new exports2.Uint8Array(typeArray.buffer), bytes = [], i, byteView; + for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) { + bytes.push(r(byteArray, i)); + } + if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) { + bytes.reverse(); + } + byteView = new exports2.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT); + byteView.set(bytes); + }; + } + DataView2.prototype.setUint8 = makeSetter(exports2.Uint8Array); + DataView2.prototype.setInt8 = makeSetter(exports2.Int8Array); + DataView2.prototype.setUint16 = makeSetter(exports2.Uint16Array); + DataView2.prototype.setInt16 = makeSetter(exports2.Int16Array); + DataView2.prototype.setUint32 = makeSetter(exports2.Uint32Array); + DataView2.prototype.setInt32 = makeSetter(exports2.Int32Array); + DataView2.prototype.setFloat32 = makeSetter(exports2.Float32Array); + DataView2.prototype.setFloat64 = makeSetter(exports2.Float64Array); + exports2.DataView = exports2.DataView || DataView2; + })(); + } +}); + +// ../../node_modules/.pnpm/concat-stream@2.0.0/node_modules/concat-stream/index.js +var require_concat_stream = __commonJS({ + "../../node_modules/.pnpm/concat-stream@2.0.0/node_modules/concat-stream/index.js"(exports2, module2) { + var Writable = require_readable().Writable; + var inherits = require_inherits(); + var bufferFrom = require_buffer_from(); + if (typeof Uint8Array === "undefined") { + U8 = require_typedarray().Uint8Array; + } else { + U8 = Uint8Array; + } + var U8; + function ConcatStream(opts, cb) { + if (!(this instanceof ConcatStream)) + return new ConcatStream(opts, cb); + if (typeof opts === "function") { + cb = opts; + opts = {}; + } + if (!opts) + opts = {}; + var encoding = opts.encoding; + var shouldInferEncoding = false; + if (!encoding) { + shouldInferEncoding = true; + } else { + encoding = String(encoding).toLowerCase(); + if (encoding === "u8" || encoding === "uint8") { + encoding = "uint8array"; + } + } + Writable.call(this, { objectMode: true }); + this.encoding = encoding; + this.shouldInferEncoding = shouldInferEncoding; + if (cb) + this.on("finish", function() { + cb(this.getBody()); + }); + this.body = []; + } + module2.exports = ConcatStream; + inherits(ConcatStream, Writable); + ConcatStream.prototype._write = function(chunk, enc, next) { + this.body.push(chunk); + next(); + }; + ConcatStream.prototype.inferEncoding = function(buff) { + var firstBuffer = buff === void 0 ? this.body[0] : buff; + if (Buffer.isBuffer(firstBuffer)) + return "buffer"; + if (typeof Uint8Array !== "undefined" && firstBuffer instanceof Uint8Array) + return "uint8array"; + if (Array.isArray(firstBuffer)) + return "array"; + if (typeof firstBuffer === "string") + return "string"; + if (Object.prototype.toString.call(firstBuffer) === "[object Object]") + return "object"; + return "buffer"; + }; + ConcatStream.prototype.getBody = function() { + if (!this.encoding && this.body.length === 0) + return []; + if (this.shouldInferEncoding) + this.encoding = this.inferEncoding(); + if (this.encoding === "array") + return arrayConcat(this.body); + if (this.encoding === "string") + return stringConcat(this.body); + if (this.encoding === "buffer") + return bufferConcat(this.body); + if (this.encoding === "uint8array") + return u8Concat(this.body); + return this.body; + }; + var isArray = Array.isArray || function(arr) { + return Object.prototype.toString.call(arr) == "[object Array]"; + }; + function isArrayish(arr) { + return /Array\]$/.test(Object.prototype.toString.call(arr)); + } + function isBufferish(p) { + return typeof p === "string" || isArrayish(p) || p && typeof p.subarray === "function"; + } + function stringConcat(parts) { + var strings = []; + var needsToString = false; + for (var i = 0; i < parts.length; i++) { + var p = parts[i]; + if (typeof p === "string") { + strings.push(p); + } else if (Buffer.isBuffer(p)) { + strings.push(p); + } else if (isBufferish(p)) { + strings.push(bufferFrom(p)); + } else { + strings.push(bufferFrom(String(p))); + } + } + if (Buffer.isBuffer(parts[0])) { + strings = Buffer.concat(strings); + strings = strings.toString("utf8"); + } else { + strings = strings.join(""); + } + return strings; + } + function bufferConcat(parts) { + var bufs = []; + for (var i = 0; i < parts.length; i++) { + var p = parts[i]; + if (Buffer.isBuffer(p)) { + bufs.push(p); + } else if (isBufferish(p)) { + bufs.push(bufferFrom(p)); + } else { + bufs.push(bufferFrom(String(p))); + } + } + return Buffer.concat(bufs); + } + function arrayConcat(parts) { + var res = []; + for (var i = 0; i < parts.length; i++) { + res.push.apply(res, parts[i]); + } + return res; + } + function u8Concat(parts) { + var len = 0; + for (var i = 0; i < parts.length; i++) { + if (typeof parts[i] === "string") { + parts[i] = bufferFrom(parts[i]); + } + len += parts[i].length; + } + var u8 = new U8(len); + for (var i = 0, offset = 0; i < parts.length; i++) { + var part = parts[i]; + for (var j = 0; j < part.length; j++) { + u8[offset++] = part[j]; + } + } + return u8; + } + } +}); + +// ../cafs/lib/parseJson.js +var require_parseJson = __commonJS({ + "../cafs/lib/parseJson.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.parseJsonStream = exports2.parseJsonBuffer = void 0; + var concat_stream_1 = __importDefault(require_concat_stream()); + var strip_bom_1 = __importDefault(require_strip_bom()); + function parseJsonBuffer(buffer, deferred) { + try { + deferred.resolve(JSON.parse(strip_bom_1.default(buffer.toString()))); + } catch (err) { + deferred.reject(err); + } + } + exports2.parseJsonBuffer = parseJsonBuffer; + function parseJsonStream(stream, deferred) { + stream.pipe(concat_stream_1.default((buffer) => parseJsonBuffer(buffer, deferred))); + } + exports2.parseJsonStream = parseJsonStream; + } +}); + +// ../cafs/lib/addFilesFromDir.js +var require_addFilesFromDir = __commonJS({ + "../cafs/lib/addFilesFromDir.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var graceful_fs_1 = __importDefault(require_lib18()); + var p_limit_1 = __importDefault(require_p_limit()); + var parseJson_1 = require_parseJson(); + var limit = p_limit_1.default(20); + var MAX_BULK_SIZE = 1 * 1024 * 1024; + async function default_1(cafs, dirname, manifest) { + const index = {}; + await _retrieveFileIntegrities(cafs, dirname, dirname, index, manifest); + return index; + } + exports2.default = default_1; + async function _retrieveFileIntegrities(cafs, rootDir, currDir, index, deferredManifest) { + try { + const files = await fs_1.promises.readdir(currDir); + await Promise.all(files.map(async (file) => { + const fullPath = path_1.default.join(currDir, file); + const stat = await fs_1.promises.stat(fullPath); + if (stat.isDirectory()) { + await _retrieveFileIntegrities(cafs, rootDir, fullPath, index); + return; + } + if (stat.isFile()) { + const relativePath = path_1.default.relative(rootDir, fullPath); + const writeResult = limit(async () => { + if (deferredManifest != null && rootDir === currDir && file === "package.json") { + const buffer = await graceful_fs_1.default.readFile(fullPath); + parseJson_1.parseJsonBuffer(buffer, deferredManifest); + return cafs.addBuffer(buffer, stat.mode); + } + if (stat.size < MAX_BULK_SIZE) { + const buffer = await graceful_fs_1.default.readFile(fullPath); + return cafs.addBuffer(buffer, stat.mode); + } + return cafs.addStream(graceful_fs_1.default.createReadStream(fullPath), stat.mode); + }); + index[relativePath] = { + mode: stat.mode, + size: stat.size, + writeResult + }; + } + })); + } catch (err) { + if (err.code !== "ENOENT") { + throw err; + } + } + } + } +}); + +// ../../node_modules/.pnpm/through@2.3.8/node_modules/through/index.js +var require_through = __commonJS({ + "../../node_modules/.pnpm/through@2.3.8/node_modules/through/index.js"(exports2, module2) { + var Stream = require("stream"); + exports2 = module2.exports = through; + through.through = through; + function through(write, end, opts) { + write = write || function(data) { + this.queue(data); + }; + end = end || function() { + this.queue(null); + }; + var ended = false, destroyed = false, buffer = [], _ended = false; + var stream = new Stream(); + stream.readable = stream.writable = true; + stream.paused = false; + stream.autoDestroy = !(opts && opts.autoDestroy === false); + stream.write = function(data) { + write.call(this, data); + return !stream.paused; + }; + function drain() { + while (buffer.length && !stream.paused) { + var data = buffer.shift(); + if (data === null) + return stream.emit("end"); + else + stream.emit("data", data); + } + } + stream.queue = stream.push = function(data) { + if (_ended) + return stream; + if (data === null) + _ended = true; + buffer.push(data); + drain(); + return stream; + }; + stream.on("end", function() { + stream.readable = false; + if (!stream.writable && stream.autoDestroy) + process.nextTick(function() { + stream.destroy(); + }); + }); + function _end() { + stream.writable = false; + end.call(stream); + if (!stream.readable && stream.autoDestroy) + stream.destroy(); + } + stream.end = function(data) { + if (ended) + return; + ended = true; + if (arguments.length) + stream.write(data); + _end(); + return stream; + }; + stream.destroy = function() { + if (destroyed) + return; + destroyed = true; + ended = true; + buffer.length = 0; + stream.writable = stream.readable = false; + stream.emit("close"); + return stream; + }; + stream.pause = function() { + if (stream.paused) + return; + stream.paused = true; + return stream; + }; + stream.resume = function() { + if (stream.paused) { + stream.paused = false; + stream.emit("resume"); + } + drain(); + if (!stream.paused) + stream.emit("drain"); + return stream; + }; + return stream; + } + } +}); + +// ../../node_modules/.pnpm/unbzip2-stream@1.4.3/node_modules/unbzip2-stream/lib/bzip2.js +var require_bzip2 = __commonJS({ + "../../node_modules/.pnpm/unbzip2-stream@1.4.3/node_modules/unbzip2-stream/lib/bzip2.js"(exports2, module2) { + function Bzip2Error(message3) { + this.name = "Bzip2Error"; + this.message = message3; + this.stack = new Error().stack; + } + Bzip2Error.prototype = new Error(); + var message2 = { + Error: function(message3) { + throw new Bzip2Error(message3); + } + }; + var bzip2 = {}; + bzip2.Bzip2Error = Bzip2Error; + bzip2.crcTable = [ + 0, + 79764919, + 159529838, + 222504665, + 319059676, + 398814059, + 445009330, + 507990021, + 638119352, + 583659535, + 797628118, + 726387553, + 890018660, + 835552979, + 1015980042, + 944750013, + 1276238704, + 1221641927, + 1167319070, + 1095957929, + 1595256236, + 1540665371, + 1452775106, + 1381403509, + 1780037320, + 1859660671, + 1671105958, + 1733955601, + 2031960084, + 2111593891, + 1889500026, + 1952343757, + 2552477408, + 2632100695, + 2443283854, + 2506133561, + 2334638140, + 2414271883, + 2191915858, + 2254759653, + 3190512472, + 3135915759, + 3081330742, + 3009969537, + 2905550212, + 2850959411, + 2762807018, + 2691435357, + 3560074640, + 3505614887, + 3719321342, + 3648080713, + 3342211916, + 3287746299, + 3467911202, + 3396681109, + 4063920168, + 4143685023, + 4223187782, + 4286162673, + 3779000052, + 3858754371, + 3904687514, + 3967668269, + 881225847, + 809987520, + 1023691545, + 969234094, + 662832811, + 591600412, + 771767749, + 717299826, + 311336399, + 374308984, + 453813921, + 533576470, + 25881363, + 88864420, + 134795389, + 214552010, + 2023205639, + 2086057648, + 1897238633, + 1976864222, + 1804852699, + 1867694188, + 1645340341, + 1724971778, + 1587496639, + 1516133128, + 1461550545, + 1406951526, + 1302016099, + 1230646740, + 1142491917, + 1087903418, + 2896545431, + 2825181984, + 2770861561, + 2716262478, + 3215044683, + 3143675388, + 3055782693, + 3001194130, + 2326604591, + 2389456536, + 2200899649, + 2280525302, + 2578013683, + 2640855108, + 2418763421, + 2498394922, + 3769900519, + 3832873040, + 3912640137, + 3992402750, + 4088425275, + 4151408268, + 4197601365, + 4277358050, + 3334271071, + 3263032808, + 3476998961, + 3422541446, + 3585640067, + 3514407732, + 3694837229, + 3640369242, + 1762451694, + 1842216281, + 1619975040, + 1682949687, + 2047383090, + 2127137669, + 1938468188, + 2001449195, + 1325665622, + 1271206113, + 1183200824, + 1111960463, + 1543535498, + 1489069629, + 1434599652, + 1363369299, + 622672798, + 568075817, + 748617968, + 677256519, + 907627842, + 853037301, + 1067152940, + 995781531, + 51762726, + 131386257, + 177728840, + 240578815, + 269590778, + 349224269, + 429104020, + 491947555, + 4046411278, + 4126034873, + 4172115296, + 4234965207, + 3794477266, + 3874110821, + 3953728444, + 4016571915, + 3609705398, + 3555108353, + 3735388376, + 3664026991, + 3290680682, + 3236090077, + 3449943556, + 3378572211, + 3174993278, + 3120533705, + 3032266256, + 2961025959, + 2923101090, + 2868635157, + 2813903052, + 2742672763, + 2604032198, + 2683796849, + 2461293480, + 2524268063, + 2284983834, + 2364738477, + 2175806836, + 2238787779, + 1569362073, + 1498123566, + 1409854455, + 1355396672, + 1317987909, + 1246755826, + 1192025387, + 1137557660, + 2072149281, + 2135122070, + 1912620623, + 1992383480, + 1753615357, + 1816598090, + 1627664531, + 1707420964, + 295390185, + 358241886, + 404320391, + 483945776, + 43990325, + 106832002, + 186451547, + 266083308, + 932423249, + 861060070, + 1041341759, + 986742920, + 613929101, + 542559546, + 756411363, + 701822548, + 3316196985, + 3244833742, + 3425377559, + 3370778784, + 3601682597, + 3530312978, + 3744426955, + 3689838204, + 3819031489, + 3881883254, + 3928223919, + 4007849240, + 4037393693, + 4100235434, + 4180117107, + 4259748804, + 2310601993, + 2373574846, + 2151335527, + 2231098320, + 2596047829, + 2659030626, + 2470359227, + 2550115596, + 2947551409, + 2876312838, + 2788305887, + 2733848168, + 3165939309, + 3094707162, + 3040238851, + 2985771188 + ]; + bzip2.array = function(bytes) { + var bit = 0, byte = 0; + var BITMASK = [0, 1, 3, 7, 15, 31, 63, 127, 255]; + return function(n) { + var result = 0; + while (n > 0) { + var left = 8 - bit; + if (n >= left) { + result <<= left; + result |= BITMASK[left] & bytes[byte++]; + bit = 0; + n -= left; + } else { + result <<= n; + result |= (bytes[byte] & BITMASK[n] << 8 - n - bit) >> 8 - n - bit; + bit += n; + n = 0; + } + } + return result; + }; + }; + bzip2.simple = function(srcbuffer, stream) { + var bits = bzip2.array(srcbuffer); + var size = bzip2.header(bits); + var ret = false; + var bufsize = 1e5 * size; + var buf = new Int32Array(bufsize); + do { + ret = bzip2.decompress(bits, stream, buf, bufsize); + } while (!ret); + }; + bzip2.header = function(bits) { + this.byteCount = new Int32Array(256); + this.symToByte = new Uint8Array(256); + this.mtfSymbol = new Int32Array(256); + this.selectors = new Uint8Array(32768); + if (bits(8 * 3) != 4348520) + message2.Error("No magic number found"); + var i = bits(8) - 48; + if (i < 1 || i > 9) + message2.Error("Not a BZIP archive"); + return i; + }; + bzip2.decompress = function(bits, stream, buf, bufsize, streamCRC) { + var MAX_HUFCODE_BITS = 20; + var MAX_SYMBOLS = 258; + var SYMBOL_RUNA = 0; + var SYMBOL_RUNB = 1; + var GROUP_SIZE = 50; + var crc = 0 ^ -1; + for (var h = "", i = 0; i < 6; i++) + h += bits(8).toString(16); + if (h == "177245385090") { + var finalCRC = bits(32) | 0; + if (finalCRC !== streamCRC) + message2.Error("Error in bzip2: crc32 do not match"); + bits(null); + return null; + } + if (h != "314159265359") + message2.Error("eek not valid bzip data"); + var crcblock = bits(32) | 0; + if (bits(1)) + message2.Error("unsupported obsolete version"); + var origPtr = bits(24); + if (origPtr > bufsize) + message2.Error("Initial position larger than buffer size"); + var t = bits(16); + var symTotal = 0; + for (i = 0; i < 16; i++) { + if (t & 1 << 15 - i) { + var k = bits(16); + for (j = 0; j < 16; j++) { + if (k & 1 << 15 - j) { + this.symToByte[symTotal++] = 16 * i + j; + } + } + } + } + var groupCount = bits(3); + if (groupCount < 2 || groupCount > 6) + message2.Error("another error"); + var nSelectors = bits(15); + if (nSelectors == 0) + message2.Error("meh"); + for (var i = 0; i < groupCount; i++) + this.mtfSymbol[i] = i; + for (var i = 0; i < nSelectors; i++) { + for (var j = 0; bits(1); j++) + if (j >= groupCount) + message2.Error("whoops another error"); + var uc = this.mtfSymbol[j]; + for (var k = j - 1; k >= 0; k--) { + this.mtfSymbol[k + 1] = this.mtfSymbol[k]; + } + this.mtfSymbol[0] = uc; + this.selectors[i] = uc; + } + var symCount = symTotal + 2; + var groups = []; + var length = new Uint8Array(MAX_SYMBOLS), temp = new Uint16Array(MAX_HUFCODE_BITS + 1); + var hufGroup; + for (var j = 0; j < groupCount; j++) { + t = bits(5); + for (var i = 0; i < symCount; i++) { + while (true) { + if (t < 1 || t > MAX_HUFCODE_BITS) + message2.Error("I gave up a while ago on writing error messages"); + if (!bits(1)) + break; + if (!bits(1)) + t++; + else + t--; + } + length[i] = t; + } + var minLen, maxLen; + minLen = maxLen = length[0]; + for (var i = 1; i < symCount; i++) { + if (length[i] > maxLen) + maxLen = length[i]; + else if (length[i] < minLen) + minLen = length[i]; + } + hufGroup = groups[j] = {}; + hufGroup.permute = new Int32Array(MAX_SYMBOLS); + hufGroup.limit = new Int32Array(MAX_HUFCODE_BITS + 1); + hufGroup.base = new Int32Array(MAX_HUFCODE_BITS + 1); + hufGroup.minLen = minLen; + hufGroup.maxLen = maxLen; + var base = hufGroup.base; + var limit = hufGroup.limit; + var pp = 0; + for (var i = minLen; i <= maxLen; i++) + for (var t = 0; t < symCount; t++) + if (length[t] == i) + hufGroup.permute[pp++] = t; + for (i = minLen; i <= maxLen; i++) + temp[i] = limit[i] = 0; + for (i = 0; i < symCount; i++) + temp[length[i]]++; + pp = t = 0; + for (i = minLen; i < maxLen; i++) { + pp += temp[i]; + limit[i] = pp - 1; + pp <<= 1; + base[i + 1] = pp - (t += temp[i]); + } + limit[maxLen] = pp + temp[maxLen] - 1; + base[minLen] = 0; + } + for (var i = 0; i < 256; i++) { + this.mtfSymbol[i] = i; + this.byteCount[i] = 0; + } + var runPos, count, symCount, selector; + runPos = count = symCount = selector = 0; + while (true) { + if (!symCount--) { + symCount = GROUP_SIZE - 1; + if (selector >= nSelectors) + message2.Error("meow i'm a kitty, that's an error"); + hufGroup = groups[this.selectors[selector++]]; + base = hufGroup.base; + limit = hufGroup.limit; + } + i = hufGroup.minLen; + j = bits(i); + while (true) { + if (i > hufGroup.maxLen) + message2.Error("rawr i'm a dinosaur"); + if (j <= limit[i]) + break; + i++; + j = j << 1 | bits(1); + } + j -= base[i]; + if (j < 0 || j >= MAX_SYMBOLS) + message2.Error("moo i'm a cow"); + var nextSym = hufGroup.permute[j]; + if (nextSym == SYMBOL_RUNA || nextSym == SYMBOL_RUNB) { + if (!runPos) { + runPos = 1; + t = 0; + } + if (nextSym == SYMBOL_RUNA) + t += runPos; + else + t += 2 * runPos; + runPos <<= 1; + continue; + } + if (runPos) { + runPos = 0; + if (count + t > bufsize) + message2.Error("Boom."); + uc = this.symToByte[this.mtfSymbol[0]]; + this.byteCount[uc] += t; + while (t--) + buf[count++] = uc; + } + if (nextSym > symTotal) + break; + if (count >= bufsize) + message2.Error("I can't think of anything. Error"); + i = nextSym - 1; + uc = this.mtfSymbol[i]; + for (var k = i - 1; k >= 0; k--) { + this.mtfSymbol[k + 1] = this.mtfSymbol[k]; + } + this.mtfSymbol[0] = uc; + uc = this.symToByte[uc]; + this.byteCount[uc]++; + buf[count++] = uc; + } + if (origPtr < 0 || origPtr >= count) + message2.Error("I'm a monkey and I'm throwing something at someone, namely you"); + var j = 0; + for (var i = 0; i < 256; i++) { + k = j + this.byteCount[i]; + this.byteCount[i] = j; + j = k; + } + for (var i = 0; i < count; i++) { + uc = buf[i] & 255; + buf[this.byteCount[uc]] |= i << 8; + this.byteCount[uc]++; + } + var pos = 0, current = 0, run = 0; + if (count) { + pos = buf[origPtr]; + current = pos & 255; + pos >>= 8; + run = -1; + } + count = count; + var copies, previous, outbyte; + while (count) { + count--; + previous = current; + pos = buf[pos]; + current = pos & 255; + pos >>= 8; + if (run++ == 3) { + copies = current; + outbyte = previous; + current = -1; + } else { + copies = 1; + outbyte = current; + } + while (copies--) { + crc = (crc << 8 ^ this.crcTable[(crc >> 24 ^ outbyte) & 255]) & 4294967295; + stream(outbyte); + } + if (current != previous) + run = 0; + } + crc = (crc ^ -1) >>> 0; + if ((crc | 0) != (crcblock | 0)) + message2.Error("Error in bzip2: crc32 do not match"); + streamCRC = (crc ^ (streamCRC << 1 | streamCRC >>> 31)) & 4294967295; + return streamCRC; + }; + module2.exports = bzip2; + } +}); + +// ../../node_modules/.pnpm/unbzip2-stream@1.4.3/node_modules/unbzip2-stream/lib/bit_iterator.js +var require_bit_iterator = __commonJS({ + "../../node_modules/.pnpm/unbzip2-stream@1.4.3/node_modules/unbzip2-stream/lib/bit_iterator.js"(exports2, module2) { + var BITMASK = [0, 1, 3, 7, 15, 31, 63, 127, 255]; + module2.exports = function bitIterator(nextBuffer) { + var bit = 0, byte = 0; + var bytes = nextBuffer(); + var f = function(n) { + if (n === null && bit != 0) { + bit = 0; + byte++; + return; + } + var result = 0; + while (n > 0) { + if (byte >= bytes.length) { + byte = 0; + bytes = nextBuffer(); + } + var left = 8 - bit; + if (bit === 0 && n > 0) + f.bytesRead++; + if (n >= left) { + result <<= left; + result |= BITMASK[left] & bytes[byte++]; + bit = 0; + n -= left; + } else { + result <<= n; + result |= (bytes[byte] & BITMASK[n] << 8 - n - bit) >> 8 - n - bit; + bit += n; + n = 0; + } + } + return result; + }; + f.bytesRead = 0; + return f; + }; + } +}); + +// ../../node_modules/.pnpm/unbzip2-stream@1.4.3/node_modules/unbzip2-stream/index.js +var require_unbzip2_stream = __commonJS({ + "../../node_modules/.pnpm/unbzip2-stream@1.4.3/node_modules/unbzip2-stream/index.js"(exports2, module2) { + var through = require_through(); + var bz2 = require_bzip2(); + var bitIterator = require_bit_iterator(); + module2.exports = unbzip2Stream; + function unbzip2Stream() { + var bufferQueue = []; + var hasBytes = 0; + var blockSize = 0; + var broken = false; + var done = false; + var bitReader = null; + var streamCRC = null; + function decompressBlock(push) { + if (!blockSize) { + blockSize = bz2.header(bitReader); + streamCRC = 0; + return true; + } else { + var bufsize = 1e5 * blockSize; + var buf = new Int32Array(bufsize); + var chunk = []; + var f = function(b) { + chunk.push(b); + }; + streamCRC = bz2.decompress(bitReader, f, buf, bufsize, streamCRC); + if (streamCRC === null) { + blockSize = 0; + return false; + } else { + push(Buffer.from(chunk)); + return true; + } + } + } + var outlength = 0; + function decompressAndQueue(stream) { + if (broken) + return; + try { + return decompressBlock(function(d) { + stream.queue(d); + if (d !== null) { + outlength += d.length; + } else { + } + }); + } catch (e) { + stream.emit("error", e); + broken = true; + return false; + } + } + return through(function write(data) { + bufferQueue.push(data); + hasBytes += data.length; + if (bitReader === null) { + bitReader = bitIterator(function() { + return bufferQueue.shift(); + }); + } + while (!broken && hasBytes - bitReader.bytesRead + 1 >= (25e3 + 1e5 * blockSize || 4)) { + decompressAndQueue(this); + } + }, function end(x) { + while (!broken && bitReader && hasBytes > bitReader.bytesRead) { + decompressAndQueue(this); + } + if (!broken) { + if (streamCRC !== null) + this.emit("error", new Error("input stream ended prematurely")); + this.queue(null); + } + }); + } + } +}); + +// ../../node_modules/.pnpm/is-bzip2@1.0.0/node_modules/is-bzip2/index.js +var require_is_bzip2 = __commonJS({ + "../../node_modules/.pnpm/is-bzip2@1.0.0/node_modules/is-bzip2/index.js"(exports2, module2) { + "use strict"; + module2.exports = function(buf) { + if (!buf || buf.length < 3) { + return false; + } + return buf[0] === 66 && buf[1] === 90 && buf[2] === 104; + }; + } +}); + +// ../../node_modules/.pnpm/process-nextick-args@2.0.1/node_modules/process-nextick-args/index.js +var require_process_nextick_args = __commonJS({ + "../../node_modules/.pnpm/process-nextick-args@2.0.1/node_modules/process-nextick-args/index.js"(exports2, module2) { + "use strict"; + if (typeof process === "undefined" || !process.version || process.version.indexOf("v0.") === 0 || process.version.indexOf("v1.") === 0 && process.version.indexOf("v1.8.") !== 0) { + module2.exports = { nextTick }; + } else { + module2.exports = process; + } + function nextTick(fn2, arg1, arg2, arg3) { + if (typeof fn2 !== "function") { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args2, i; + switch (len) { + case 0: + case 1: + return process.nextTick(fn2); + case 2: + return process.nextTick(function afterTickOne() { + fn2.call(null, arg1); + }); + case 3: + return process.nextTick(function afterTickTwo() { + fn2.call(null, arg1, arg2); + }); + case 4: + return process.nextTick(function afterTickThree() { + fn2.call(null, arg1, arg2, arg3); + }); + default: + args2 = new Array(len - 1); + i = 0; + while (i < args2.length) { + args2[i++] = arguments[i]; + } + return process.nextTick(function afterTick() { + fn2.apply(null, args2); + }); + } + } + } +}); + +// ../../node_modules/.pnpm/isarray@1.0.0/node_modules/isarray/index.js +var require_isarray = __commonJS({ + "../../node_modules/.pnpm/isarray@1.0.0/node_modules/isarray/index.js"(exports2, module2) { + var toString = {}.toString; + module2.exports = Array.isArray || function(arr) { + return toString.call(arr) == "[object Array]"; + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/internal/streams/stream.js +var require_stream7 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/internal/streams/stream.js"(exports2, module2) { + module2.exports = require("stream"); + } +}); + +// ../../node_modules/.pnpm/safe-buffer@5.1.2/node_modules/safe-buffer/index.js +var require_safe_buffer = __commonJS({ + "../../node_modules/.pnpm/safe-buffer@5.1.2/node_modules/safe-buffer/index.js"(exports2, module2) { + var buffer = require("buffer"); + var Buffer2 = buffer.Buffer; + function copyProps(src, dst) { + for (var key in src) { + dst[key] = src[key]; + } + } + if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) { + module2.exports = buffer; + } else { + copyProps(buffer, exports2); + exports2.Buffer = SafeBuffer; + } + function SafeBuffer(arg, encodingOrOffset, length) { + return Buffer2(arg, encodingOrOffset, length); + } + copyProps(Buffer2, SafeBuffer); + SafeBuffer.from = function(arg, encodingOrOffset, length) { + if (typeof arg === "number") { + throw new TypeError("Argument must not be a number"); + } + return Buffer2(arg, encodingOrOffset, length); + }; + SafeBuffer.alloc = function(size, fill, encoding) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + var buf = Buffer2(size); + if (fill !== void 0) { + if (typeof encoding === "string") { + buf.fill(fill, encoding); + } else { + buf.fill(fill); + } + } else { + buf.fill(0); + } + return buf; + }; + SafeBuffer.allocUnsafe = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return Buffer2(size); + }; + SafeBuffer.allocUnsafeSlow = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return buffer.SlowBuffer(size); + }; + } +}); + +// ../../node_modules/.pnpm/core-util-is@1.0.3/node_modules/core-util-is/lib/util.js +var require_util6 = __commonJS({ + "../../node_modules/.pnpm/core-util-is@1.0.3/node_modules/core-util-is/lib/util.js"(exports2) { + function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === "[object Array]"; + } + exports2.isArray = isArray; + function isBoolean(arg) { + return typeof arg === "boolean"; + } + exports2.isBoolean = isBoolean; + function isNull(arg) { + return arg === null; + } + exports2.isNull = isNull; + function isNullOrUndefined(arg) { + return arg == null; + } + exports2.isNullOrUndefined = isNullOrUndefined; + function isNumber(arg) { + return typeof arg === "number"; + } + exports2.isNumber = isNumber; + function isString(arg) { + return typeof arg === "string"; + } + exports2.isString = isString; + function isSymbol(arg) { + return typeof arg === "symbol"; + } + exports2.isSymbol = isSymbol; + function isUndefined(arg) { + return arg === void 0; + } + exports2.isUndefined = isUndefined; + function isRegExp(re) { + return objectToString(re) === "[object RegExp]"; + } + exports2.isRegExp = isRegExp; + function isObject(arg) { + return typeof arg === "object" && arg !== null; + } + exports2.isObject = isObject; + function isDate(d) { + return objectToString(d) === "[object Date]"; + } + exports2.isDate = isDate; + function isError(e) { + return objectToString(e) === "[object Error]" || e instanceof Error; + } + exports2.isError = isError; + function isFunction(arg) { + return typeof arg === "function"; + } + exports2.isFunction = isFunction; + function isPrimitive(arg) { + return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || typeof arg === "undefined"; + } + exports2.isPrimitive = isPrimitive; + exports2.isBuffer = require("buffer").Buffer.isBuffer; + function objectToString(o) { + return Object.prototype.toString.call(o); + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/internal/streams/BufferList.js +var require_BufferList = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/internal/streams/BufferList.js"(exports2, module2) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + var Buffer2 = require_safe_buffer().Buffer; + var util = require("util"); + function copyBuffer(src, target, offset) { + src.copy(target, offset); + } + module2.exports = function() { + function BufferList() { + _classCallCheck(this, BufferList); + this.head = null; + this.tail = null; + this.length = 0; + } + BufferList.prototype.push = function push(v) { + var entry = { data: v, next: null }; + if (this.length > 0) + this.tail.next = entry; + else + this.head = entry; + this.tail = entry; + ++this.length; + }; + BufferList.prototype.unshift = function unshift(v) { + var entry = { data: v, next: this.head }; + if (this.length === 0) + this.tail = entry; + this.head = entry; + ++this.length; + }; + BufferList.prototype.shift = function shift() { + if (this.length === 0) + return; + var ret = this.head.data; + if (this.length === 1) + this.head = this.tail = null; + else + this.head = this.head.next; + --this.length; + return ret; + }; + BufferList.prototype.clear = function clear() { + this.head = this.tail = null; + this.length = 0; + }; + BufferList.prototype.join = function join(s) { + if (this.length === 0) + return ""; + var p = this.head; + var ret = "" + p.data; + while (p = p.next) { + ret += s + p.data; + } + return ret; + }; + BufferList.prototype.concat = function concat(n) { + if (this.length === 0) + return Buffer2.alloc(0); + if (this.length === 1) + return this.head.data; + var ret = Buffer2.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } + return ret; + }; + return BufferList; + }(); + if (util && util.inspect && util.inspect.custom) { + module2.exports.prototype[util.inspect.custom] = function() { + var obj = util.inspect({ length: this.length }); + return this.constructor.name + " " + obj; + }; + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/internal/streams/destroy.js +var require_destroy2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/internal/streams/destroy.js"(exports2, module2) { + "use strict"; + var pna = require_process_nextick_args(); + function destroy(err, cb) { + var _this = this; + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { + pna.nextTick(emitErrorNT, this, err); + } + return this; + } + if (this._readableState) { + this._readableState.destroyed = true; + } + if (this._writableState) { + this._writableState.destroyed = true; + } + this._destroy(err || null, function(err2) { + if (!cb && err2) { + pna.nextTick(emitErrorNT, _this, err2); + if (_this._writableState) { + _this._writableState.errorEmitted = true; + } + } else if (cb) { + cb(err2); + } + }); + return this; + } + function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } + } + function emitErrorNT(self2, err) { + self2.emit("error", err); + } + module2.exports = { + destroy, + undestroy + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/_stream_writable.js +var require_stream_writable2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/_stream_writable.js"(exports2, module2) { + "use strict"; + var pna = require_process_nextick_args(); + module2.exports = Writable; + function CorkedRequest(state) { + var _this = this; + this.next = null; + this.entry = null; + this.finish = function() { + onCorkedFinish(_this, state); + }; + } + var asyncWrite = !process.browser && ["v0.10", "v0.9."].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; + var Duplex; + Writable.WritableState = WritableState; + var util = Object.create(require_util6()); + util.inherits = require_inherits(); + var internalUtil = { + deprecate: require_node2() + }; + var Stream = require_stream7(); + var Buffer2 = require_safe_buffer().Buffer; + var OurUint8Array = global.Uint8Array || function() { + }; + function _uint8ArrayToBuffer(chunk) { + return Buffer2.from(chunk); + } + function _isUint8Array(obj) { + return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; + } + var destroyImpl = require_destroy2(); + util.inherits(Writable, Stream); + function nop() { + } + function WritableState(options, stream) { + Duplex = Duplex || require_stream_duplex2(); + options = options || {}; + var isDuplex = stream instanceof Duplex; + this.objectMode = !!options.objectMode; + if (isDuplex) + this.objectMode = this.objectMode || !!options.writableObjectMode; + var hwm = options.highWaterMark; + var writableHwm = options.writableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + if (hwm || hwm === 0) + this.highWaterMark = hwm; + else if (isDuplex && (writableHwm || writableHwm === 0)) + this.highWaterMark = writableHwm; + else + this.highWaterMark = defaultHwm; + this.highWaterMark = Math.floor(this.highWaterMark); + this.finalCalled = false; + this.needDrain = false; + this.ending = false; + this.ended = false; + this.finished = false; + this.destroyed = false; + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + this.defaultEncoding = options.defaultEncoding || "utf8"; + this.length = 0; + this.writing = false; + this.corked = 0; + this.sync = true; + this.bufferProcessing = false; + this.onwrite = function(er) { + onwrite(stream, er); + }; + this.writecb = null; + this.writelen = 0; + this.bufferedRequest = null; + this.lastBufferedRequest = null; + this.pendingcb = 0; + this.prefinished = false; + this.errorEmitted = false; + this.bufferedRequestCount = 0; + this.corkedRequestsFree = new CorkedRequest(this); + } + WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; + }; + (function() { + try { + Object.defineProperty(WritableState.prototype, "buffer", { + get: internalUtil.deprecate(function() { + return this.getBuffer(); + }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") + }); + } catch (_) { + } + })(); + var realHasInstance; + if (typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function") { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function(object) { + if (realHasInstance.call(this, object)) + return true; + if (this !== Writable) + return false; + return object && object._writableState instanceof WritableState; + } + }); + } else { + realHasInstance = function(object) { + return object instanceof this; + }; + } + function Writable(options) { + Duplex = Duplex || require_stream_duplex2(); + if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { + return new Writable(options); + } + this._writableState = new WritableState(options, this); + this.writable = true; + if (options) { + if (typeof options.write === "function") + this._write = options.write; + if (typeof options.writev === "function") + this._writev = options.writev; + if (typeof options.destroy === "function") + this._destroy = options.destroy; + if (typeof options.final === "function") + this._final = options.final; + } + Stream.call(this); + } + Writable.prototype.pipe = function() { + this.emit("error", new Error("Cannot pipe, not readable")); + }; + function writeAfterEnd(stream, cb) { + var er = new Error("write after end"); + stream.emit("error", er); + pna.nextTick(cb, er); + } + function validChunk(stream, state, chunk, cb) { + var valid = true; + var er = false; + if (chunk === null) { + er = new TypeError("May not write null values to stream"); + } else if (typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) { + er = new TypeError("Invalid non-string/buffer chunk"); + } + if (er) { + stream.emit("error", er); + pna.nextTick(cb, er); + valid = false; + } + return valid; + } + Writable.prototype.write = function(chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + if (isBuf && !Buffer2.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (typeof encoding === "function") { + cb = encoding; + encoding = null; + } + if (isBuf) + encoding = "buffer"; + else if (!encoding) + encoding = state.defaultEncoding; + if (typeof cb !== "function") + cb = nop; + if (state.ended) + writeAfterEnd(this, cb); + else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + return ret; + }; + Writable.prototype.cork = function() { + var state = this._writableState; + state.corked++; + }; + Writable.prototype.uncork = function() { + var state = this._writableState; + if (state.corked) { + state.corked--; + if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) + clearBuffer(this, state); + } + }; + Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + if (typeof encoding === "string") + encoding = encoding.toLowerCase(); + if (!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((encoding + "").toLowerCase()) > -1)) + throw new TypeError("Unknown encoding: " + encoding); + this._writableState.defaultEncoding = encoding; + return this; + }; + function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === "string") { + chunk = Buffer2.from(chunk, encoding); + } + return chunk; + } + Object.defineProperty(Writable.prototype, "writableHighWaterMark", { + enumerable: false, + get: function() { + return this._writableState.highWaterMark; + } + }); + function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = "buffer"; + chunk = newChunk; + } + } + var len = state.objectMode ? 1 : chunk.length; + state.length += len; + var ret = state.length < state.highWaterMark; + if (!ret) + state.needDrain = true; + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk, + encoding, + isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + return ret; + } + function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) + stream._writev(chunk, state.onwrite); + else + stream._write(chunk, encoding, state.onwrite); + state.sync = false; + } + function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + if (sync) { + pna.nextTick(cb, er); + pna.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + stream.emit("error", er); + } else { + cb(er); + stream._writableState.errorEmitted = true; + stream.emit("error", er); + finishMaybe(stream, state); + } + } + function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; + } + function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + onwriteStateUpdate(state); + if (er) + onwriteError(stream, state, sync, er, cb); + else { + var finished = needFinish(state); + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + if (sync) { + asyncWrite(afterWrite, stream, state, finished, cb); + } else { + afterWrite(stream, state, finished, cb); + } + } + } + function afterWrite(stream, state, finished, cb) { + if (!finished) + onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); + } + function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit("drain"); + } + } + function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + if (stream._writev && entry && entry.next) { + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) + allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + doWrite(stream, state, true, state.length, buffer, "", holder.finish); + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + state.bufferedRequestCount = 0; + } else { + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + if (state.writing) { + break; + } + } + if (entry === null) + state.lastBufferedRequest = null; + } + state.bufferedRequest = entry; + state.bufferProcessing = false; + } + Writable.prototype._write = function(chunk, encoding, cb) { + cb(new Error("_write() is not implemented")); + }; + Writable.prototype._writev = null; + Writable.prototype.end = function(chunk, encoding, cb) { + var state = this._writableState; + if (typeof chunk === "function") { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === "function") { + cb = encoding; + encoding = null; + } + if (chunk !== null && chunk !== void 0) + this.write(chunk, encoding); + if (state.corked) { + state.corked = 1; + this.uncork(); + } + if (!state.ending && !state.finished) + endWritable(this, state, cb); + }; + function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; + } + function callFinal(stream, state) { + stream._final(function(err) { + state.pendingcb--; + if (err) { + stream.emit("error", err); + } + state.prefinished = true; + stream.emit("prefinish"); + finishMaybe(stream, state); + }); + } + function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === "function") { + state.pendingcb++; + state.finalCalled = true; + pna.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit("prefinish"); + } + } + } + function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit("finish"); + } + } + return need; + } + function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) + pna.nextTick(cb); + else + stream.once("finish", cb); + } + state.ended = true; + stream.writable = false; + } + function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + if (state.corkedRequestsFree) { + state.corkedRequestsFree.next = corkReq; + } else { + state.corkedRequestsFree = corkReq; + } + } + Object.defineProperty(Writable.prototype, "destroyed", { + get: function() { + if (this._writableState === void 0) { + return false; + } + return this._writableState.destroyed; + }, + set: function(value) { + if (!this._writableState) { + return; + } + this._writableState.destroyed = value; + } + }); + Writable.prototype.destroy = destroyImpl.destroy; + Writable.prototype._undestroy = destroyImpl.undestroy; + Writable.prototype._destroy = function(err, cb) { + this.end(); + cb(err); + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/_stream_duplex.js +var require_stream_duplex2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/_stream_duplex.js"(exports2, module2) { + "use strict"; + var pna = require_process_nextick_args(); + var objectKeys = Object.keys || function(obj) { + var keys2 = []; + for (var key in obj) { + keys2.push(key); + } + return keys2; + }; + module2.exports = Duplex; + var util = Object.create(require_util6()); + util.inherits = require_inherits(); + var Readable = require_stream_readable2(); + var Writable = require_stream_writable2(); + util.inherits(Duplex, Readable); + { + keys = objectKeys(Writable.prototype); + for (v = 0; v < keys.length; v++) { + method = keys[v]; + if (!Duplex.prototype[method]) + Duplex.prototype[method] = Writable.prototype[method]; + } + } + var keys; + var method; + var v; + function Duplex(options) { + if (!(this instanceof Duplex)) + return new Duplex(options); + Readable.call(this, options); + Writable.call(this, options); + if (options && options.readable === false) + this.readable = false; + if (options && options.writable === false) + this.writable = false; + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) + this.allowHalfOpen = false; + this.once("end", onend); + } + Object.defineProperty(Duplex.prototype, "writableHighWaterMark", { + enumerable: false, + get: function() { + return this._writableState.highWaterMark; + } + }); + function onend() { + if (this.allowHalfOpen || this._writableState.ended) + return; + pna.nextTick(onEndNT, this); + } + function onEndNT(self2) { + self2.end(); + } + Object.defineProperty(Duplex.prototype, "destroyed", { + get: function() { + if (this._readableState === void 0 || this._writableState === void 0) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function(value) { + if (this._readableState === void 0 || this._writableState === void 0) { + return; + } + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } + }); + Duplex.prototype._destroy = function(err, cb) { + this.push(null); + this.end(); + pna.nextTick(cb, err); + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/_stream_readable.js +var require_stream_readable2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/_stream_readable.js"(exports2, module2) { + "use strict"; + var pna = require_process_nextick_args(); + module2.exports = Readable; + var isArray = require_isarray(); + var Duplex; + Readable.ReadableState = ReadableState; + var EE = require("events").EventEmitter; + var EElistenerCount = function(emitter, type) { + return emitter.listeners(type).length; + }; + var Stream = require_stream7(); + var Buffer2 = require_safe_buffer().Buffer; + var OurUint8Array = global.Uint8Array || function() { + }; + function _uint8ArrayToBuffer(chunk) { + return Buffer2.from(chunk); + } + function _isUint8Array(obj) { + return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; + } + var util = Object.create(require_util6()); + util.inherits = require_inherits(); + var debugUtil = require("util"); + var debug = void 0; + if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog("stream"); + } else { + debug = function() { + }; + } + var BufferList = require_BufferList(); + var destroyImpl = require_destroy2(); + var StringDecoder; + util.inherits(Readable, Stream); + var kProxyEvents = ["error", "close", "destroy", "pause", "resume"]; + function prependListener(emitter, event, fn2) { + if (typeof emitter.prependListener === "function") + return emitter.prependListener(event, fn2); + if (!emitter._events || !emitter._events[event]) + emitter.on(event, fn2); + else if (isArray(emitter._events[event])) + emitter._events[event].unshift(fn2); + else + emitter._events[event] = [fn2, emitter._events[event]]; + } + function ReadableState(options, stream) { + Duplex = Duplex || require_stream_duplex2(); + options = options || {}; + var isDuplex = stream instanceof Duplex; + this.objectMode = !!options.objectMode; + if (isDuplex) + this.objectMode = this.objectMode || !!options.readableObjectMode; + var hwm = options.highWaterMark; + var readableHwm = options.readableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + if (hwm || hwm === 0) + this.highWaterMark = hwm; + else if (isDuplex && (readableHwm || readableHwm === 0)) + this.highWaterMark = readableHwm; + else + this.highWaterMark = defaultHwm; + this.highWaterMark = Math.floor(this.highWaterMark); + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + this.sync = true; + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + this.destroyed = false; + this.defaultEncoding = options.defaultEncoding || "utf8"; + this.awaitDrain = 0; + this.readingMore = false; + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) + StringDecoder = require("string_decoder/").StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } + } + function Readable(options) { + Duplex = Duplex || require_stream_duplex2(); + if (!(this instanceof Readable)) + return new Readable(options); + this._readableState = new ReadableState(options, this); + this.readable = true; + if (options) { + if (typeof options.read === "function") + this._read = options.read; + if (typeof options.destroy === "function") + this._destroy = options.destroy; + } + Stream.call(this); + } + Object.defineProperty(Readable.prototype, "destroyed", { + get: function() { + if (this._readableState === void 0) { + return false; + } + return this._readableState.destroyed; + }, + set: function(value) { + if (!this._readableState) { + return; + } + this._readableState.destroyed = value; + } + }); + Readable.prototype.destroy = destroyImpl.destroy; + Readable.prototype._undestroy = destroyImpl.undestroy; + Readable.prototype._destroy = function(err, cb) { + this.push(null); + cb(err); + }; + Readable.prototype.push = function(chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + if (!state.objectMode) { + if (typeof chunk === "string") { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer2.from(chunk, encoding); + encoding = ""; + } + skipChunkCheck = true; + } + } else { + skipChunkCheck = true; + } + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); + }; + Readable.prototype.unshift = function(chunk) { + return readableAddChunk(this, chunk, null, true, false); + }; + function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) + er = chunkInvalid(state, chunk); + if (er) { + stream.emit("error", er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== "string" && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer2.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (addToFront) { + if (state.endEmitted) + stream.emit("error", new Error("stream.unshift() after end event")); + else + addChunk(stream, state, chunk, true); + } else if (state.ended) { + stream.emit("error", new Error("stream.push() after EOF")); + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) + addChunk(stream, state, chunk, false); + else + maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); + } + } + } else if (!addToFront) { + state.reading = false; + } + } + return needMoreData(state); + } + function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit("data", chunk); + stream.read(0); + } else { + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) + state.buffer.unshift(chunk); + else + state.buffer.push(chunk); + if (state.needReadable) + emitReadable(stream); + } + maybeReadMore(stream, state); + } + function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) { + er = new TypeError("Invalid non-string/buffer chunk"); + } + return er; + } + function needMoreData(state) { + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); + } + Readable.prototype.isPaused = function() { + return this._readableState.flowing === false; + }; + Readable.prototype.setEncoding = function(enc) { + if (!StringDecoder) + StringDecoder = require("string_decoder/").StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; + }; + var MAX_HWM = 8388608; + function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; + } + function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) + return 0; + if (state.objectMode) + return 1; + if (n !== n) { + if (state.flowing && state.length) + return state.buffer.head.data.length; + else + return state.length; + } + if (n > state.highWaterMark) + state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) + return n; + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; + } + Readable.prototype.read = function(n) { + debug("read", n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + if (n !== 0) + state.emittedReadable = false; + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { + debug("read: emitReadable", state.length, state.ended); + if (state.length === 0 && state.ended) + endReadable(this); + else + emitReadable(this); + return null; + } + n = howMuchToRead(n, state); + if (n === 0 && state.ended) { + if (state.length === 0) + endReadable(this); + return null; + } + var doRead = state.needReadable; + debug("need readable", doRead); + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug("length less than watermark", doRead); + } + if (state.ended || state.reading) { + doRead = false; + debug("reading or ended", doRead); + } else if (doRead) { + debug("do read"); + state.reading = true; + state.sync = true; + if (state.length === 0) + state.needReadable = true; + this._read(state.highWaterMark); + state.sync = false; + if (!state.reading) + n = howMuchToRead(nOrig, state); + } + var ret; + if (n > 0) + ret = fromList(n, state); + else + ret = null; + if (ret === null) { + state.needReadable = true; + n = 0; + } else { + state.length -= n; + } + if (state.length === 0) { + if (!state.ended) + state.needReadable = true; + if (nOrig !== n && state.ended) + endReadable(this); + } + if (ret !== null) + this.emit("data", ret); + return ret; + }; + function onEofChunk(stream, state) { + if (state.ended) + return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + emitReadable(stream); + } + function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug("emitReadable", state.flowing); + state.emittedReadable = true; + if (state.sync) + pna.nextTick(emitReadable_, stream); + else + emitReadable_(stream); + } + } + function emitReadable_(stream) { + debug("emit readable"); + stream.emit("readable"); + flow(stream); + } + function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + pna.nextTick(maybeReadMore_, stream, state); + } + } + function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { + debug("maybeReadMore read 0"); + stream.read(0); + if (len === state.length) + break; + else + len = state.length; + } + state.readingMore = false; + } + Readable.prototype._read = function(n) { + this.emit("error", new Error("_read() is not implemented")); + }; + Readable.prototype.pipe = function(dest, pipeOpts) { + var src = this; + var state = this._readableState; + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug("pipe count=%d opts=%j", state.pipesCount, pipeOpts); + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) + pna.nextTick(endFn); + else + src.once("end", endFn); + dest.on("unpipe", onunpipe); + function onunpipe(readable, unpipeInfo) { + debug("onunpipe"); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } + } + } + function onend() { + debug("onend"); + dest.end(); + } + var ondrain = pipeOnDrain(src); + dest.on("drain", ondrain); + var cleanedUp = false; + function cleanup() { + debug("cleanup"); + dest.removeListener("close", onclose); + dest.removeListener("finish", onfinish); + dest.removeListener("drain", ondrain); + dest.removeListener("error", onerror); + dest.removeListener("unpipe", onunpipe); + src.removeListener("end", onend); + src.removeListener("end", unpipe); + src.removeListener("data", ondata); + cleanedUp = true; + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) + ondrain(); + } + var increasedAwaitDrain = false; + src.on("data", ondata); + function ondata(chunk) { + debug("ondata"); + increasedAwaitDrain = false; + var ret = dest.write(chunk); + if (ret === false && !increasedAwaitDrain) { + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug("false write response, pause", src._readableState.awaitDrain); + src._readableState.awaitDrain++; + increasedAwaitDrain = true; + } + src.pause(); + } + } + function onerror(er) { + debug("onerror", er); + unpipe(); + dest.removeListener("error", onerror); + if (EElistenerCount(dest, "error") === 0) + dest.emit("error", er); + } + prependListener(dest, "error", onerror); + function onclose() { + dest.removeListener("finish", onfinish); + unpipe(); + } + dest.once("close", onclose); + function onfinish() { + debug("onfinish"); + dest.removeListener("close", onclose); + unpipe(); + } + dest.once("finish", onfinish); + function unpipe() { + debug("unpipe"); + src.unpipe(dest); + } + dest.emit("pipe", src); + if (!state.flowing) { + debug("pipe resume"); + src.resume(); + } + return dest; + }; + function pipeOnDrain(src) { + return function() { + var state = src._readableState; + debug("pipeOnDrain", state.awaitDrain); + if (state.awaitDrain) + state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, "data")) { + state.flowing = true; + flow(src); + } + }; + } + Readable.prototype.unpipe = function(dest) { + var state = this._readableState; + var unpipeInfo = { hasUnpiped: false }; + if (state.pipesCount === 0) + return this; + if (state.pipesCount === 1) { + if (dest && dest !== state.pipes) + return this; + if (!dest) + dest = state.pipes; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) + dest.emit("unpipe", this, unpipeInfo); + return this; + } + if (!dest) { + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + for (var i = 0; i < len; i++) { + dests[i].emit("unpipe", this, unpipeInfo); + } + return this; + } + var index = indexOf(state.pipes, dest); + if (index === -1) + return this; + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) + state.pipes = state.pipes[0]; + dest.emit("unpipe", this, unpipeInfo); + return this; + }; + Readable.prototype.on = function(ev, fn2) { + var res = Stream.prototype.on.call(this, ev, fn2); + if (ev === "data") { + if (this._readableState.flowing !== false) + this.resume(); + } else if (ev === "readable") { + var state = this._readableState; + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.emittedReadable = false; + if (!state.reading) { + pna.nextTick(nReadingNextTick, this); + } else if (state.length) { + emitReadable(this); + } + } + } + return res; + }; + Readable.prototype.addListener = Readable.prototype.on; + function nReadingNextTick(self2) { + debug("readable nexttick read 0"); + self2.read(0); + } + Readable.prototype.resume = function() { + var state = this._readableState; + if (!state.flowing) { + debug("resume"); + state.flowing = true; + resume(this, state); + } + return this; + }; + function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + pna.nextTick(resume_, stream, state); + } + } + function resume_(stream, state) { + if (!state.reading) { + debug("resume read 0"); + stream.read(0); + } + state.resumeScheduled = false; + state.awaitDrain = 0; + stream.emit("resume"); + flow(stream); + if (state.flowing && !state.reading) + stream.read(0); + } + Readable.prototype.pause = function() { + debug("call pause flowing=%j", this._readableState.flowing); + if (this._readableState.flowing !== false) { + debug("pause"); + this._readableState.flowing = false; + this.emit("pause"); + } + return this; + }; + function flow(stream) { + var state = stream._readableState; + debug("flow", state.flowing); + while (state.flowing && stream.read() !== null) { + } + } + Readable.prototype.wrap = function(stream) { + var _this = this; + var state = this._readableState; + var paused = false; + stream.on("end", function() { + debug("wrapped end"); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) + _this.push(chunk); + } + _this.push(null); + }); + stream.on("data", function(chunk) { + debug("wrapped data"); + if (state.decoder) + chunk = state.decoder.write(chunk); + if (state.objectMode && (chunk === null || chunk === void 0)) + return; + else if (!state.objectMode && (!chunk || !chunk.length)) + return; + var ret = _this.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + for (var i in stream) { + if (this[i] === void 0 && typeof stream[i] === "function") { + this[i] = function(method) { + return function() { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } + this._read = function(n2) { + debug("wrapped _read", n2); + if (paused) { + paused = false; + stream.resume(); + } + }; + return this; + }; + Object.defineProperty(Readable.prototype, "readableHighWaterMark", { + enumerable: false, + get: function() { + return this._readableState.highWaterMark; + } + }); + Readable._fromList = fromList; + function fromList(n, state) { + if (state.length === 0) + return null; + var ret; + if (state.objectMode) + ret = state.buffer.shift(); + else if (!n || n >= state.length) { + if (state.decoder) + ret = state.buffer.join(""); + else if (state.buffer.length === 1) + ret = state.buffer.head.data; + else + ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + ret = fromListPartial(n, state.buffer, state.decoder); + } + return ret; + } + function fromListPartial(n, list, hasStrings) { + var ret; + if (n < list.head.data.length) { + ret = list.head.data.slice(0, n); + list.head.data = list.head.data.slice(n); + } else if (n === list.head.data.length) { + ret = list.shift(); + } else { + ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); + } + return ret; + } + function copyFromBufferString(n, list) { + var p = list.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) + ret += str; + else + ret += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) + list.head = p.next; + else + list.head = list.tail = null; + } else { + list.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; + } + function copyFromBuffer(n, list) { + var ret = Buffer2.allocUnsafe(n); + var p = list.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) + list.head = p.next; + else + list.head = list.tail = null; + } else { + list.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; + } + function endReadable(stream) { + var state = stream._readableState; + if (state.length > 0) + throw new Error('"endReadable()" called on non-empty stream'); + if (!state.endEmitted) { + state.ended = true; + pna.nextTick(endReadableNT, state, stream); + } + } + function endReadableNT(state, stream) { + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit("end"); + } + } + function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) + return i; + } + return -1; + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/_stream_transform.js +var require_stream_transform2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/_stream_transform.js"(exports2, module2) { + "use strict"; + module2.exports = Transform; + var Duplex = require_stream_duplex2(); + var util = Object.create(require_util6()); + util.inherits = require_inherits(); + util.inherits(Transform, Duplex); + function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + var cb = ts.writecb; + if (!cb) { + return this.emit("error", new Error("write callback called multiple times")); + } + ts.writechunk = null; + ts.writecb = null; + if (data != null) + this.push(data); + cb(er); + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } + } + function Transform(options) { + if (!(this instanceof Transform)) + return new Transform(options); + Duplex.call(this, options); + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; + this._readableState.needReadable = true; + this._readableState.sync = false; + if (options) { + if (typeof options.transform === "function") + this._transform = options.transform; + if (typeof options.flush === "function") + this._flush = options.flush; + } + this.on("prefinish", prefinish); + } + function prefinish() { + var _this = this; + if (typeof this._flush === "function") { + this._flush(function(er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } + } + Transform.prototype.push = function(chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); + }; + Transform.prototype._transform = function(chunk, encoding, cb) { + throw new Error("_transform() is not implemented"); + }; + Transform.prototype._write = function(chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) + this._read(rs.highWaterMark); + } + }; + Transform.prototype._read = function(n) { + var ts = this._transformState; + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + ts.needTransform = true; + } + }; + Transform.prototype._destroy = function(err, cb) { + var _this2 = this; + Duplex.prototype._destroy.call(this, err, function(err2) { + cb(err2); + _this2.emit("close"); + }); + }; + function done(stream, er, data) { + if (er) + return stream.emit("error", er); + if (data != null) + stream.push(data); + if (stream._writableState.length) + throw new Error("Calling transform done when ws.length != 0"); + if (stream._transformState.transforming) + throw new Error("Calling transform done when still transforming"); + return stream.push(null); + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/_stream_passthrough.js +var require_stream_passthrough2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/lib/_stream_passthrough.js"(exports2, module2) { + "use strict"; + module2.exports = PassThrough; + var Transform = require_stream_transform2(); + var util = Object.create(require_util6()); + util.inherits = require_inherits(); + util.inherits(PassThrough, Transform); + function PassThrough(options) { + if (!(this instanceof PassThrough)) + return new PassThrough(options); + Transform.call(this, options); + } + PassThrough.prototype._transform = function(chunk, encoding, cb) { + cb(null, chunk); + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/readable.js +var require_readable2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.7/node_modules/readable-stream/readable.js"(exports2, module2) { + var Stream = require("stream"); + if (process.env.READABLE_STREAM === "disable" && Stream) { + module2.exports = Stream; + exports2 = module2.exports = Stream.Readable; + exports2.Readable = Stream.Readable; + exports2.Writable = Stream.Writable; + exports2.Duplex = Stream.Duplex; + exports2.Transform = Stream.Transform; + exports2.PassThrough = Stream.PassThrough; + exports2.Stream = Stream; + } else { + exports2 = module2.exports = require_stream_readable2(); + exports2.Stream = Stream || exports2; + exports2.Readable = exports2; + exports2.Writable = require_stream_writable2(); + exports2.Duplex = require_stream_duplex2(); + exports2.Transform = require_stream_transform2(); + exports2.PassThrough = require_stream_passthrough2(); + } + } +}); + +// ../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js +var require_wrappy = __commonJS({ + "../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js"(exports2, module2) { + module2.exports = wrappy; + function wrappy(fn2, cb) { + if (fn2 && cb) + return wrappy(fn2)(cb); + if (typeof fn2 !== "function") + throw new TypeError("need wrapper function"); + Object.keys(fn2).forEach(function(k) { + wrapper[k] = fn2[k]; + }); + return wrapper; + function wrapper() { + var args2 = new Array(arguments.length); + for (var i = 0; i < args2.length; i++) { + args2[i] = arguments[i]; + } + var ret = fn2.apply(this, args2); + var cb2 = args2[args2.length - 1]; + if (typeof ret === "function" && ret !== cb2) { + Object.keys(cb2).forEach(function(k) { + ret[k] = cb2[k]; + }); + } + return ret; + } + } + } +}); + +// ../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js +var require_once = __commonJS({ + "../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js"(exports2, module2) { + var wrappy = require_wrappy(); + module2.exports = wrappy(once); + module2.exports.strict = wrappy(onceStrict); + once.proto = once(function() { + Object.defineProperty(Function.prototype, "once", { + value: function() { + return once(this); + }, + configurable: true + }); + Object.defineProperty(Function.prototype, "onceStrict", { + value: function() { + return onceStrict(this); + }, + configurable: true + }); + }); + function once(fn2) { + var f = function() { + if (f.called) + return f.value; + f.called = true; + return f.value = fn2.apply(this, arguments); + }; + f.called = false; + return f; + } + function onceStrict(fn2) { + var f = function() { + if (f.called) + throw new Error(f.onceError); + f.called = true; + return f.value = fn2.apply(this, arguments); + }; + var name = fn2.name || "Function wrapped with `once`"; + f.onceError = name + " shouldn't be called more than once"; + f.called = false; + return f; + } + } +}); + +// ../../node_modules/.pnpm/end-of-stream@1.4.4/node_modules/end-of-stream/index.js +var require_end_of_stream2 = __commonJS({ + "../../node_modules/.pnpm/end-of-stream@1.4.4/node_modules/end-of-stream/index.js"(exports2, module2) { + var once = require_once(); + var noop = function() { + }; + var isRequest = function(stream) { + return stream.setHeader && typeof stream.abort === "function"; + }; + var isChildProcess = function(stream) { + return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3; + }; + var eos = function(stream, opts, callback) { + if (typeof opts === "function") + return eos(stream, null, opts); + if (!opts) + opts = {}; + callback = once(callback || noop); + var ws = stream._writableState; + var rs = stream._readableState; + var readable = opts.readable || opts.readable !== false && stream.readable; + var writable = opts.writable || opts.writable !== false && stream.writable; + var cancelled = false; + var onlegacyfinish = function() { + if (!stream.writable) + onfinish(); + }; + var onfinish = function() { + writable = false; + if (!readable) + callback.call(stream); + }; + var onend = function() { + readable = false; + if (!writable) + callback.call(stream); + }; + var onexit = function(exitCode) { + callback.call(stream, exitCode ? new Error("exited with error code: " + exitCode) : null); + }; + var onerror = function(err) { + callback.call(stream, err); + }; + var onclose = function() { + process.nextTick(onclosenexttick); + }; + var onclosenexttick = function() { + if (cancelled) + return; + if (readable && !(rs && (rs.ended && !rs.destroyed))) + return callback.call(stream, new Error("premature close")); + if (writable && !(ws && (ws.ended && !ws.destroyed))) + return callback.call(stream, new Error("premature close")); + }; + var onrequest = function() { + stream.req.on("finish", onfinish); + }; + if (isRequest(stream)) { + stream.on("complete", onfinish); + stream.on("abort", onclose); + if (stream.req) + onrequest(); + else + stream.on("request", onrequest); + } else if (writable && !ws) { + stream.on("end", onlegacyfinish); + stream.on("close", onlegacyfinish); + } + if (isChildProcess(stream)) + stream.on("exit", onexit); + stream.on("end", onend); + stream.on("finish", onfinish); + if (opts.error !== false) + stream.on("error", onerror); + stream.on("close", onclose); + return function() { + cancelled = true; + stream.removeListener("complete", onfinish); + stream.removeListener("abort", onclose); + stream.removeListener("request", onrequest); + if (stream.req) + stream.req.removeListener("finish", onfinish); + stream.removeListener("end", onlegacyfinish); + stream.removeListener("close", onlegacyfinish); + stream.removeListener("finish", onfinish); + stream.removeListener("exit", onexit); + stream.removeListener("end", onend); + stream.removeListener("error", onerror); + stream.removeListener("close", onclose); + }; + }; + module2.exports = eos; + } +}); + +// ../../node_modules/.pnpm/stream-shift@1.0.1/node_modules/stream-shift/index.js +var require_stream_shift = __commonJS({ + "../../node_modules/.pnpm/stream-shift@1.0.1/node_modules/stream-shift/index.js"(exports2, module2) { + module2.exports = shift; + function shift(stream) { + var rs = stream._readableState; + if (!rs) + return null; + return rs.objectMode || typeof stream._duplexState === "number" ? stream.read() : stream.read(getStateLength(rs)); + } + function getStateLength(state) { + if (state.buffer.length) { + if (state.buffer.head) { + return state.buffer.head.data.length; + } + return state.buffer[0].length; + } + return state.length; + } + } +}); + +// ../../node_modules/.pnpm/duplexify@3.7.1/node_modules/duplexify/index.js +var require_duplexify = __commonJS({ + "../../node_modules/.pnpm/duplexify@3.7.1/node_modules/duplexify/index.js"(exports2, module2) { + var stream = require_readable2(); + var eos = require_end_of_stream2(); + var inherits = require_inherits(); + var shift = require_stream_shift(); + var SIGNAL_FLUSH = Buffer.from && Buffer.from !== Uint8Array.from ? Buffer.from([0]) : new Buffer([0]); + var onuncork = function(self2, fn2) { + if (self2._corked) + self2.once("uncork", fn2); + else + fn2(); + }; + var autoDestroy = function(self2, err) { + if (self2._autoDestroy) + self2.destroy(err); + }; + var destroyer = function(self2, end2) { + return function(err) { + if (err) + autoDestroy(self2, err.message === "premature close" ? null : err); + else if (end2 && !self2._ended) + self2.end(); + }; + }; + var end = function(ws, fn2) { + if (!ws) + return fn2(); + if (ws._writableState && ws._writableState.finished) + return fn2(); + if (ws._writableState) + return ws.end(fn2); + ws.end(); + fn2(); + }; + var toStreams2 = function(rs) { + return new stream.Readable({ objectMode: true, highWaterMark: 16 }).wrap(rs); + }; + var Duplexify = function(writable, readable, opts) { + if (!(this instanceof Duplexify)) + return new Duplexify(writable, readable, opts); + stream.Duplex.call(this, opts); + this._writable = null; + this._readable = null; + this._readable2 = null; + this._autoDestroy = !opts || opts.autoDestroy !== false; + this._forwardDestroy = !opts || opts.destroy !== false; + this._forwardEnd = !opts || opts.end !== false; + this._corked = 1; + this._ondrain = null; + this._drained = false; + this._forwarding = false; + this._unwrite = null; + this._unread = null; + this._ended = false; + this.destroyed = false; + if (writable) + this.setWritable(writable); + if (readable) + this.setReadable(readable); + }; + inherits(Duplexify, stream.Duplex); + Duplexify.obj = function(writable, readable, opts) { + if (!opts) + opts = {}; + opts.objectMode = true; + opts.highWaterMark = 16; + return new Duplexify(writable, readable, opts); + }; + Duplexify.prototype.cork = function() { + if (++this._corked === 1) + this.emit("cork"); + }; + Duplexify.prototype.uncork = function() { + if (this._corked && --this._corked === 0) + this.emit("uncork"); + }; + Duplexify.prototype.setWritable = function(writable) { + if (this._unwrite) + this._unwrite(); + if (this.destroyed) { + if (writable && writable.destroy) + writable.destroy(); + return; + } + if (writable === null || writable === false) { + this.end(); + return; + } + var self2 = this; + var unend = eos(writable, { writable: true, readable: false }, destroyer(this, this._forwardEnd)); + var ondrain = function() { + var ondrain2 = self2._ondrain; + self2._ondrain = null; + if (ondrain2) + ondrain2(); + }; + var clear = function() { + self2._writable.removeListener("drain", ondrain); + unend(); + }; + if (this._unwrite) + process.nextTick(ondrain); + this._writable = writable; + this._writable.on("drain", ondrain); + this._unwrite = clear; + this.uncork(); + }; + Duplexify.prototype.setReadable = function(readable) { + if (this._unread) + this._unread(); + if (this.destroyed) { + if (readable && readable.destroy) + readable.destroy(); + return; + } + if (readable === null || readable === false) { + this.push(null); + this.resume(); + return; + } + var self2 = this; + var unend = eos(readable, { writable: false, readable: true }, destroyer(this)); + var onreadable = function() { + self2._forward(); + }; + var onend = function() { + self2.push(null); + }; + var clear = function() { + self2._readable2.removeListener("readable", onreadable); + self2._readable2.removeListener("end", onend); + unend(); + }; + this._drained = true; + this._readable = readable; + this._readable2 = readable._readableState ? readable : toStreams2(readable); + this._readable2.on("readable", onreadable); + this._readable2.on("end", onend); + this._unread = clear; + this._forward(); + }; + Duplexify.prototype._read = function() { + this._drained = true; + this._forward(); + }; + Duplexify.prototype._forward = function() { + if (this._forwarding || !this._readable2 || !this._drained) + return; + this._forwarding = true; + var data; + while (this._drained && (data = shift(this._readable2)) !== null) { + if (this.destroyed) + continue; + this._drained = this.push(data); + } + this._forwarding = false; + }; + Duplexify.prototype.destroy = function(err) { + if (this.destroyed) + return; + this.destroyed = true; + var self2 = this; + process.nextTick(function() { + self2._destroy(err); + }); + }; + Duplexify.prototype._destroy = function(err) { + if (err) { + var ondrain = this._ondrain; + this._ondrain = null; + if (ondrain) + ondrain(err); + else + this.emit("error", err); + } + if (this._forwardDestroy) { + if (this._readable && this._readable.destroy) + this._readable.destroy(); + if (this._writable && this._writable.destroy) + this._writable.destroy(); + } + this.emit("close"); + }; + Duplexify.prototype._write = function(data, enc, cb) { + if (this.destroyed) + return cb(); + if (this._corked) + return onuncork(this, this._write.bind(this, data, enc, cb)); + if (data === SIGNAL_FLUSH) + return this._finish(cb); + if (!this._writable) + return cb(); + if (this._writable.write(data) === false) + this._ondrain = cb; + else + cb(); + }; + Duplexify.prototype._finish = function(cb) { + var self2 = this; + this.emit("preend"); + onuncork(this, function() { + end(self2._forwardEnd && self2._writable, function() { + if (self2._writableState.prefinished === false) + self2._writableState.prefinished = true; + self2.emit("prefinish"); + onuncork(self2, cb); + }); + }); + }; + Duplexify.prototype.end = function(data, enc, cb) { + if (typeof data === "function") + return this.end(null, null, data); + if (typeof enc === "function") + return this.end(data, null, enc); + this._ended = true; + if (data) + this.write(data); + if (!this._writableState.ending) + this.write(SIGNAL_FLUSH); + return stream.Writable.prototype.end.call(this, cb); + }; + module2.exports = Duplexify; + } +}); + +// ../../node_modules/.pnpm/xtend@4.0.2/node_modules/xtend/immutable.js +var require_immutable = __commonJS({ + "../../node_modules/.pnpm/xtend@4.0.2/node_modules/xtend/immutable.js"(exports2, module2) { + module2.exports = extend; + var hasOwnProperty = Object.prototype.hasOwnProperty; + function extend() { + var target = {}; + for (var i = 0; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + } + } +}); + +// ../../node_modules/.pnpm/through2@2.0.5/node_modules/through2/through2.js +var require_through22 = __commonJS({ + "../../node_modules/.pnpm/through2@2.0.5/node_modules/through2/through2.js"(exports2, module2) { + var Transform = require_readable2().Transform; + var inherits = require("util").inherits; + var xtend = require_immutable(); + function DestroyableTransform(opts) { + Transform.call(this, opts); + this._destroyed = false; + } + inherits(DestroyableTransform, Transform); + DestroyableTransform.prototype.destroy = function(err) { + if (this._destroyed) + return; + this._destroyed = true; + var self2 = this; + process.nextTick(function() { + if (err) + self2.emit("error", err); + self2.emit("close"); + }); + }; + function noop(chunk, enc, callback) { + callback(null, chunk); + } + function through2(construct) { + return function(options, transform, flush) { + if (typeof options == "function") { + flush = transform; + transform = options; + options = {}; + } + if (typeof transform != "function") + transform = noop; + if (typeof flush != "function") + flush = null; + return construct(options, transform, flush); + }; + } + module2.exports = through2(function(options, transform, flush) { + var t2 = new DestroyableTransform(options); + t2._transform = transform; + if (flush) + t2._flush = flush; + return t2; + }); + module2.exports.ctor = through2(function(options, transform, flush) { + function Through2(override) { + if (!(this instanceof Through2)) + return new Through2(override); + this.options = xtend(options, override); + DestroyableTransform.call(this, this.options); + } + inherits(Through2, DestroyableTransform); + Through2.prototype._transform = transform; + if (flush) + Through2.prototype._flush = flush; + return Through2; + }); + module2.exports.obj = through2(function(options, transform, flush) { + var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options)); + t2._transform = transform; + if (flush) + t2._flush = flush; + return t2; + }); + } +}); + +// ../../node_modules/.pnpm/peek-stream@1.1.3/node_modules/peek-stream/index.js +var require_peek_stream = __commonJS({ + "../../node_modules/.pnpm/peek-stream@1.1.3/node_modules/peek-stream/index.js"(exports2, module2) { + var duplexify = require_duplexify(); + var through = require_through22(); + var bufferFrom = require_buffer_from(); + var isObject = function(data) { + return !Buffer.isBuffer(data) && typeof data !== "string"; + }; + var peek = function(opts, onpeek) { + if (typeof opts === "number") + opts = { maxBuffer: opts }; + if (typeof opts === "function") + return peek(null, opts); + if (!opts) + opts = {}; + var maxBuffer = typeof opts.maxBuffer === "number" ? opts.maxBuffer : 65535; + var strict = opts.strict; + var newline = opts.newline !== false; + var buffer = []; + var bufferSize = 0; + var dup = duplexify.obj(); + var peeker = through.obj({ highWaterMark: 1 }, function(data, enc, cb) { + if (isObject(data)) + return ready(data, null, cb); + if (!Buffer.isBuffer(data)) + data = bufferFrom(data); + if (newline) { + var nl = Array.prototype.indexOf.call(data, 10); + if (nl > 0 && data[nl - 1] === 13) + nl--; + if (nl > -1) { + buffer.push(data.slice(0, nl)); + return ready(Buffer.concat(buffer), data.slice(nl), cb); + } + } + buffer.push(data); + bufferSize += data.length; + if (bufferSize < maxBuffer) + return cb(); + if (strict) + return cb(new Error("No newline found")); + ready(Buffer.concat(buffer), null, cb); + }); + var onpreend = function() { + if (strict) + return dup.destroy(new Error("No newline found")); + dup.cork(); + ready(Buffer.concat(buffer), null, function(err) { + if (err) + return dup.destroy(err); + dup.uncork(); + }); + }; + var ready = function(data, overflow, cb) { + dup.removeListener("preend", onpreend); + onpeek(data, function(err, parser) { + if (err) + return cb(err); + dup.setWritable(parser); + dup.setReadable(parser); + if (data) + parser.write(data); + if (overflow) + parser.write(overflow); + overflow = buffer = peeker = null; + cb(); + }); + }; + dup.on("preend", onpreend); + dup.setWritable(peeker); + return dup; + }; + module2.exports = peek; + } +}); + +// ../../node_modules/.pnpm/pump@2.0.1/node_modules/pump/index.js +var require_pump = __commonJS({ + "../../node_modules/.pnpm/pump@2.0.1/node_modules/pump/index.js"(exports2, module2) { + var once = require_once(); + var eos = require_end_of_stream2(); + var fs = require("fs"); + var noop = function() { + }; + var ancient = /^v?\.0/.test(process.version); + var isFn = function(fn2) { + return typeof fn2 === "function"; + }; + var isFS = function(stream) { + if (!ancient) + return false; + if (!fs) + return false; + return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close); + }; + var isRequest = function(stream) { + return stream.setHeader && isFn(stream.abort); + }; + var destroyer = function(stream, reading, writing, callback) { + callback = once(callback); + var closed = false; + stream.on("close", function() { + closed = true; + }); + eos(stream, { readable: reading, writable: writing }, function(err) { + if (err) + return callback(err); + closed = true; + callback(); + }); + var destroyed = false; + return function(err) { + if (closed) + return; + if (destroyed) + return; + destroyed = true; + if (isFS(stream)) + return stream.close(noop); + if (isRequest(stream)) + return stream.abort(); + if (isFn(stream.destroy)) + return stream.destroy(); + callback(err || new Error("stream was destroyed")); + }; + }; + var call = function(fn2) { + fn2(); + }; + var pipe = function(from, to) { + return from.pipe(to); + }; + var pump = function() { + var streams = Array.prototype.slice.call(arguments); + var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop; + if (Array.isArray(streams[0])) + streams = streams[0]; + if (streams.length < 2) + throw new Error("pump requires two streams per minimum"); + var error; + var destroys = streams.map(function(stream, i) { + var reading = i < streams.length - 1; + var writing = i > 0; + return destroyer(stream, reading, writing, function(err) { + if (!error) + error = err; + if (err) + destroys.forEach(call); + if (reading) + return; + destroys.forEach(call); + callback(error); + }); + }); + streams.reduce(pipe); + }; + module2.exports = pump; + } +}); + +// ../../node_modules/.pnpm/pumpify@1.5.1/node_modules/pumpify/index.js +var require_pumpify = __commonJS({ + "../../node_modules/.pnpm/pumpify@1.5.1/node_modules/pumpify/index.js"(exports2, module2) { + var pump = require_pump(); + var inherits = require_inherits(); + var Duplexify = require_duplexify(); + var toArray = function(args2) { + if (!args2.length) + return []; + return Array.isArray(args2[0]) ? args2[0] : Array.prototype.slice.call(args2); + }; + var define2 = function(opts) { + var Pumpify = function() { + var streams = toArray(arguments); + if (!(this instanceof Pumpify)) + return new Pumpify(streams); + Duplexify.call(this, null, null, opts); + if (streams.length) + this.setPipeline(streams); + }; + inherits(Pumpify, Duplexify); + Pumpify.prototype.setPipeline = function() { + var streams = toArray(arguments); + var self2 = this; + var ended = false; + var w = streams[0]; + var r = streams[streams.length - 1]; + r = r.readable ? r : null; + w = w.writable ? w : null; + var onclose = function() { + streams[0].emit("error", new Error("stream was destroyed")); + }; + this.on("close", onclose); + this.on("prefinish", function() { + if (!ended) + self2.cork(); + }); + pump(streams, function(err) { + self2.removeListener("close", onclose); + if (err) + return self2.destroy(err.message === "premature close" ? null : err); + ended = true; + if (self2._autoDestroy === false) + self2._autoDestroy = true; + self2.uncork(); + }); + if (this.destroyed) + return onclose(); + this.setWritable(w); + this.setReadable(r); + }; + return Pumpify; + }; + module2.exports = define2({ autoDestroy: false, destroy: false }); + module2.exports.obj = define2({ autoDestroy: false, destroy: false, objectMode: true, highWaterMark: 16 }); + module2.exports.ctor = define2; + } +}); + +// ../../node_modules/.pnpm/bzip2-maybe@1.0.0/node_modules/bzip2-maybe/index.js +var require_bzip2_maybe = __commonJS({ + "../../node_modules/.pnpm/bzip2-maybe@1.0.0/node_modules/bzip2-maybe/index.js"(exports2, module2) { + var bz2 = require_unbzip2_stream(); + var isBzip2 = require_is_bzip2(); + var peek = require_peek_stream(); + var pumpify = require_pumpify(); + var through = require_through22(); + var bzip2 = function() { + return peek({ newline: false, maxBuffer: 10 }, function(data, swap) { + if (isBzip2(data)) { + return swap(null, pumpify(bz2(), bzip2())); + } + swap(null, through()); + }); + }; + module2.exports = bzip2; + } +}); + +// ../../node_modules/.pnpm/is-gzip@1.0.0/node_modules/is-gzip/index.js +var require_is_gzip = __commonJS({ + "../../node_modules/.pnpm/is-gzip@1.0.0/node_modules/is-gzip/index.js"(exports2, module2) { + "use strict"; + module2.exports = function(buf) { + if (!buf || buf.length < 3) { + return false; + } + return buf[0] === 31 && buf[1] === 139 && buf[2] === 8; + }; + } +}); + +// ../../node_modules/.pnpm/is-deflate@1.0.0/node_modules/is-deflate/index.js +var require_is_deflate = __commonJS({ + "../../node_modules/.pnpm/is-deflate@1.0.0/node_modules/is-deflate/index.js"(exports2, module2) { + "use strict"; + module2.exports = function(buf) { + if (!buf || buf.length < 2) + return false; + return buf[0] === 120 && (buf[1] === 1 || buf[1] === 156 || buf[1] === 218); + }; + } +}); + +// ../../node_modules/.pnpm/gunzip-maybe@1.4.2/node_modules/gunzip-maybe/index.js +var require_gunzip_maybe = __commonJS({ + "../../node_modules/.pnpm/gunzip-maybe@1.4.2/node_modules/gunzip-maybe/index.js"(exports2, module2) { + var zlib = require("zlib"); + var peek = require_peek_stream(); + var through = require_through22(); + var pumpify = require_pumpify(); + var isGzip = require_is_gzip(); + var isDeflate = require_is_deflate(); + var isCompressed = function(data) { + if (isGzip(data)) + return 1; + if (isDeflate(data)) + return 2; + return 0; + }; + var gunzip = function(maxRecursion) { + if (maxRecursion === void 0) + maxRecursion = 3; + return peek({ newline: false, maxBuffer: 10 }, function(data, swap) { + if (maxRecursion < 0) + return swap(new Error("Maximum recursion reached")); + switch (isCompressed(data)) { + case 1: + swap(null, pumpify(zlib.createGunzip(), gunzip(maxRecursion - 1))); + break; + case 2: + swap(null, pumpify(zlib.createInflate(), gunzip(maxRecursion - 1))); + break; + default: + swap(null, through()); + } + }); + }; + module2.exports = gunzip; + } +}); + +// ../../node_modules/.pnpm/decompress-maybe@1.0.0/node_modules/decompress-maybe/index.js +var require_decompress_maybe = __commonJS({ + "../../node_modules/.pnpm/decompress-maybe@1.0.0/node_modules/decompress-maybe/index.js"(exports2, module2) { + var bzipMaybe = require_bzip2_maybe(); + var gunzipMaybe = require_gunzip_maybe(); + var pumpify = require_pumpify(); + module2.exports = function() { + return pumpify(bzipMaybe(), gunzipMaybe()); + }; + } +}); + +// ../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/BufferList.js +var require_BufferList2 = __commonJS({ + "../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/BufferList.js"(exports2, module2) { + "use strict"; + var { Buffer: Buffer2 } = require("buffer"); + var symbol = Symbol.for("BufferList"); + function BufferList(buf) { + if (!(this instanceof BufferList)) { + return new BufferList(buf); + } + BufferList._init.call(this, buf); + } + BufferList._init = function _init(buf) { + Object.defineProperty(this, symbol, { value: true }); + this._bufs = []; + this.length = 0; + if (buf) { + this.append(buf); + } + }; + BufferList.prototype._new = function _new(buf) { + return new BufferList(buf); + }; + BufferList.prototype._offset = function _offset(offset) { + if (offset === 0) { + return [0, 0]; + } + let tot = 0; + for (let i = 0; i < this._bufs.length; i++) { + const _t = tot + this._bufs[i].length; + if (offset < _t || i === this._bufs.length - 1) { + return [i, offset - tot]; + } + tot = _t; + } + }; + BufferList.prototype._reverseOffset = function(blOffset) { + const bufferId = blOffset[0]; + let offset = blOffset[1]; + for (let i = 0; i < bufferId; i++) { + offset += this._bufs[i].length; + } + return offset; + }; + BufferList.prototype.get = function get(index) { + if (index > this.length || index < 0) { + return void 0; + } + const offset = this._offset(index); + return this._bufs[offset[0]][offset[1]]; + }; + BufferList.prototype.slice = function slice(start, end) { + if (typeof start === "number" && start < 0) { + start += this.length; + } + if (typeof end === "number" && end < 0) { + end += this.length; + } + return this.copy(null, 0, start, end); + }; + BufferList.prototype.copy = function copy(dst, dstStart, srcStart, srcEnd) { + if (typeof srcStart !== "number" || srcStart < 0) { + srcStart = 0; + } + if (typeof srcEnd !== "number" || srcEnd > this.length) { + srcEnd = this.length; + } + if (srcStart >= this.length) { + return dst || Buffer2.alloc(0); + } + if (srcEnd <= 0) { + return dst || Buffer2.alloc(0); + } + const copy2 = !!dst; + const off = this._offset(srcStart); + const len = srcEnd - srcStart; + let bytes = len; + let bufoff = copy2 && dstStart || 0; + let start = off[1]; + if (srcStart === 0 && srcEnd === this.length) { + if (!copy2) { + return this._bufs.length === 1 ? this._bufs[0] : Buffer2.concat(this._bufs, this.length); + } + for (let i = 0; i < this._bufs.length; i++) { + this._bufs[i].copy(dst, bufoff); + bufoff += this._bufs[i].length; + } + return dst; + } + if (bytes <= this._bufs[off[0]].length - start) { + return copy2 ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes) : this._bufs[off[0]].slice(start, start + bytes); + } + if (!copy2) { + dst = Buffer2.allocUnsafe(len); + } + for (let i = off[0]; i < this._bufs.length; i++) { + const l = this._bufs[i].length - start; + if (bytes > l) { + this._bufs[i].copy(dst, bufoff, start); + bufoff += l; + } else { + this._bufs[i].copy(dst, bufoff, start, start + bytes); + bufoff += l; + break; + } + bytes -= l; + if (start) { + start = 0; + } + } + if (dst.length > bufoff) + return dst.slice(0, bufoff); + return dst; + }; + BufferList.prototype.shallowSlice = function shallowSlice(start, end) { + start = start || 0; + end = typeof end !== "number" ? this.length : end; + if (start < 0) { + start += this.length; + } + if (end < 0) { + end += this.length; + } + if (start === end) { + return this._new(); + } + const startOffset = this._offset(start); + const endOffset = this._offset(end); + const buffers = this._bufs.slice(startOffset[0], endOffset[0] + 1); + if (endOffset[1] === 0) { + buffers.pop(); + } else { + buffers[buffers.length - 1] = buffers[buffers.length - 1].slice(0, endOffset[1]); + } + if (startOffset[1] !== 0) { + buffers[0] = buffers[0].slice(startOffset[1]); + } + return this._new(buffers); + }; + BufferList.prototype.toString = function toString(encoding, start, end) { + return this.slice(start, end).toString(encoding); + }; + BufferList.prototype.consume = function consume(bytes) { + bytes = Math.trunc(bytes); + if (Number.isNaN(bytes) || bytes <= 0) + return this; + while (this._bufs.length) { + if (bytes >= this._bufs[0].length) { + bytes -= this._bufs[0].length; + this.length -= this._bufs[0].length; + this._bufs.shift(); + } else { + this._bufs[0] = this._bufs[0].slice(bytes); + this.length -= bytes; + break; + } + } + return this; + }; + BufferList.prototype.duplicate = function duplicate() { + const copy = this._new(); + for (let i = 0; i < this._bufs.length; i++) { + copy.append(this._bufs[i]); + } + return copy; + }; + BufferList.prototype.append = function append(buf) { + if (buf == null) { + return this; + } + if (buf.buffer) { + this._appendBuffer(Buffer2.from(buf.buffer, buf.byteOffset, buf.byteLength)); + } else if (Array.isArray(buf)) { + for (let i = 0; i < buf.length; i++) { + this.append(buf[i]); + } + } else if (this._isBufferList(buf)) { + for (let i = 0; i < buf._bufs.length; i++) { + this.append(buf._bufs[i]); + } + } else { + if (typeof buf === "number") { + buf = buf.toString(); + } + this._appendBuffer(Buffer2.from(buf)); + } + return this; + }; + BufferList.prototype._appendBuffer = function appendBuffer(buf) { + this._bufs.push(buf); + this.length += buf.length; + }; + BufferList.prototype.indexOf = function(search, offset, encoding) { + if (encoding === void 0 && typeof offset === "string") { + encoding = offset; + offset = void 0; + } + if (typeof search === "function" || Array.isArray(search)) { + throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.'); + } else if (typeof search === "number") { + search = Buffer2.from([search]); + } else if (typeof search === "string") { + search = Buffer2.from(search, encoding); + } else if (this._isBufferList(search)) { + search = search.slice(); + } else if (Array.isArray(search.buffer)) { + search = Buffer2.from(search.buffer, search.byteOffset, search.byteLength); + } else if (!Buffer2.isBuffer(search)) { + search = Buffer2.from(search); + } + offset = Number(offset || 0); + if (isNaN(offset)) { + offset = 0; + } + if (offset < 0) { + offset = this.length + offset; + } + if (offset < 0) { + offset = 0; + } + if (search.length === 0) { + return offset > this.length ? this.length : offset; + } + const blOffset = this._offset(offset); + let blIndex = blOffset[0]; + let buffOffset = blOffset[1]; + for (; blIndex < this._bufs.length; blIndex++) { + const buff = this._bufs[blIndex]; + while (buffOffset < buff.length) { + const availableWindow = buff.length - buffOffset; + if (availableWindow >= search.length) { + const nativeSearchResult = buff.indexOf(search, buffOffset); + if (nativeSearchResult !== -1) { + return this._reverseOffset([blIndex, nativeSearchResult]); + } + buffOffset = buff.length - search.length + 1; + } else { + const revOffset = this._reverseOffset([blIndex, buffOffset]); + if (this._match(revOffset, search)) { + return revOffset; + } + buffOffset++; + } + } + buffOffset = 0; + } + return -1; + }; + BufferList.prototype._match = function(offset, search) { + if (this.length - offset < search.length) { + return false; + } + for (let searchOffset = 0; searchOffset < search.length; searchOffset++) { + if (this.get(offset + searchOffset) !== search[searchOffset]) { + return false; + } + } + return true; + }; + (function() { + const methods = { + readDoubleBE: 8, + readDoubleLE: 8, + readFloatBE: 4, + readFloatLE: 4, + readInt32BE: 4, + readInt32LE: 4, + readUInt32BE: 4, + readUInt32LE: 4, + readInt16BE: 2, + readInt16LE: 2, + readUInt16BE: 2, + readUInt16LE: 2, + readInt8: 1, + readUInt8: 1, + readIntBE: null, + readIntLE: null, + readUIntBE: null, + readUIntLE: null + }; + for (const m in methods) { + (function(m2) { + if (methods[m2] === null) { + BufferList.prototype[m2] = function(offset, byteLength) { + return this.slice(offset, offset + byteLength)[m2](0, byteLength); + }; + } else { + BufferList.prototype[m2] = function(offset = 0) { + return this.slice(offset, offset + methods[m2])[m2](0); + }; + } + })(m); + } + })(); + BufferList.prototype._isBufferList = function _isBufferList(b) { + return b instanceof BufferList || BufferList.isBufferList(b); + }; + BufferList.isBufferList = function isBufferList(b) { + return b != null && b[symbol]; + }; + module2.exports = BufferList; + } +}); + +// ../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/bl.js +var require_bl = __commonJS({ + "../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/bl.js"(exports2, module2) { + "use strict"; + var DuplexStream = require_readable().Duplex; + var inherits = require_inherits(); + var BufferList = require_BufferList2(); + function BufferListStream(callback) { + if (!(this instanceof BufferListStream)) { + return new BufferListStream(callback); + } + if (typeof callback === "function") { + this._callback = callback; + const piper = function piper2(err) { + if (this._callback) { + this._callback(err); + this._callback = null; + } + }.bind(this); + this.on("pipe", function onPipe(src) { + src.on("error", piper); + }); + this.on("unpipe", function onUnpipe(src) { + src.removeListener("error", piper); + }); + callback = null; + } + BufferList._init.call(this, callback); + DuplexStream.call(this); + } + inherits(BufferListStream, DuplexStream); + Object.assign(BufferListStream.prototype, BufferList.prototype); + BufferListStream.prototype._new = function _new(callback) { + return new BufferListStream(callback); + }; + BufferListStream.prototype._write = function _write(buf, encoding, callback) { + this._appendBuffer(buf); + if (typeof callback === "function") { + callback(); + } + }; + BufferListStream.prototype._read = function _read(size) { + if (!this.length) { + return this.push(null); + } + size = Math.min(size, this.length); + this.push(this.slice(0, size)); + this.consume(size); + }; + BufferListStream.prototype.end = function end(chunk) { + DuplexStream.prototype.end.call(this, chunk); + if (this._callback) { + this._callback(null, this.slice()); + this._callback = null; + } + }; + BufferListStream.prototype._destroy = function _destroy(err, cb) { + this._bufs.length = 0; + this.length = 0; + cb(err); + }; + BufferListStream.prototype._isBufferList = function _isBufferList(b) { + return b instanceof BufferListStream || b instanceof BufferList || BufferListStream.isBufferList(b); + }; + BufferListStream.isBufferList = BufferList.isBufferList; + module2.exports = BufferListStream; + module2.exports.BufferListStream = BufferListStream; + module2.exports.BufferList = BufferList; + } +}); + +// ../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/headers.js +var require_headers = __commonJS({ + "../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/headers.js"(exports2) { + var alloc = Buffer.alloc; + var ZEROS = "0000000000000000000"; + var SEVENS = "7777777777777777777"; + var ZERO_OFFSET = "0".charCodeAt(0); + var USTAR_MAGIC = Buffer.from("ustar\0", "binary"); + var USTAR_VER = Buffer.from("00", "binary"); + var GNU_MAGIC = Buffer.from("ustar ", "binary"); + var GNU_VER = Buffer.from(" \0", "binary"); + var MASK = parseInt("7777", 8); + var MAGIC_OFFSET = 257; + var VERSION_OFFSET = 263; + var clamp = function(index, len, defaultValue) { + if (typeof index !== "number") + return defaultValue; + index = ~~index; + if (index >= len) + return len; + if (index >= 0) + return index; + index += len; + if (index >= 0) + return index; + return 0; + }; + var toType = function(flag) { + switch (flag) { + case 0: + return "file"; + case 1: + return "link"; + case 2: + return "symlink"; + case 3: + return "character-device"; + case 4: + return "block-device"; + case 5: + return "directory"; + case 6: + return "fifo"; + case 7: + return "contiguous-file"; + case 72: + return "pax-header"; + case 55: + return "pax-global-header"; + case 27: + return "gnu-long-link-path"; + case 28: + case 30: + return "gnu-long-path"; + } + return null; + }; + var toTypeflag = function(flag) { + switch (flag) { + case "file": + return 0; + case "link": + return 1; + case "symlink": + return 2; + case "character-device": + return 3; + case "block-device": + return 4; + case "directory": + return 5; + case "fifo": + return 6; + case "contiguous-file": + return 7; + case "pax-header": + return 72; + } + return 0; + }; + var indexOf = function(block, num, offset, end) { + for (; offset < end; offset++) { + if (block[offset] === num) + return offset; + } + return end; + }; + var cksum = function(block) { + var sum = 8 * 32; + for (var i = 0; i < 148; i++) + sum += block[i]; + for (var j = 156; j < 512; j++) + sum += block[j]; + return sum; + }; + var encodeOct = function(val, n) { + val = val.toString(8); + if (val.length > n) + return SEVENS.slice(0, n) + " "; + else + return ZEROS.slice(0, n - val.length) + val + " "; + }; + function parse256(buf) { + var positive; + if (buf[0] === 128) + positive = true; + else if (buf[0] === 255) + positive = false; + else + return null; + var tuple = []; + for (var i = buf.length - 1; i > 0; i--) { + var byte = buf[i]; + if (positive) + tuple.push(byte); + else + tuple.push(255 - byte); + } + var sum = 0; + var l = tuple.length; + for (i = 0; i < l; i++) { + sum += tuple[i] * Math.pow(256, i); + } + return positive ? sum : -1 * sum; + } + var decodeOct = function(val, offset, length) { + val = val.slice(offset, offset + length); + offset = 0; + if (val[offset] & 128) { + return parse256(val); + } else { + while (offset < val.length && val[offset] === 32) + offset++; + var end = clamp(indexOf(val, 32, offset, val.length), val.length, val.length); + while (offset < end && val[offset] === 0) + offset++; + if (end === offset) + return 0; + return parseInt(val.slice(offset, end).toString(), 8); + } + }; + var decodeStr = function(val, offset, length, encoding) { + return val.slice(offset, indexOf(val, 0, offset, offset + length)).toString(encoding); + }; + var addLength = function(str) { + var len = Buffer.byteLength(str); + var digits = Math.floor(Math.log(len) / Math.log(10)) + 1; + if (len + digits >= Math.pow(10, digits)) + digits++; + return len + digits + str; + }; + exports2.decodeLongPath = function(buf, encoding) { + return decodeStr(buf, 0, buf.length, encoding); + }; + exports2.encodePax = function(opts) { + var result = ""; + if (opts.name) + result += addLength(" path=" + opts.name + "\n"); + if (opts.linkname) + result += addLength(" linkpath=" + opts.linkname + "\n"); + var pax = opts.pax; + if (pax) { + for (var key in pax) { + result += addLength(" " + key + "=" + pax[key] + "\n"); + } + } + return Buffer.from(result); + }; + exports2.decodePax = function(buf) { + var result = {}; + while (buf.length) { + var i = 0; + while (i < buf.length && buf[i] !== 32) + i++; + var len = parseInt(buf.slice(0, i).toString(), 10); + if (!len) + return result; + var b = buf.slice(i + 1, len - 1).toString(); + var keyIndex = b.indexOf("="); + if (keyIndex === -1) + return result; + result[b.slice(0, keyIndex)] = b.slice(keyIndex + 1); + buf = buf.slice(len); + } + return result; + }; + exports2.encode = function(opts) { + var buf = alloc(512); + var name = opts.name; + var prefix = ""; + if (opts.typeflag === 5 && name[name.length - 1] !== "/") + name += "/"; + if (Buffer.byteLength(name) !== name.length) + return null; + while (Buffer.byteLength(name) > 100) { + var i = name.indexOf("/"); + if (i === -1) + return null; + prefix += prefix ? "/" + name.slice(0, i) : name.slice(0, i); + name = name.slice(i + 1); + } + if (Buffer.byteLength(name) > 100 || Buffer.byteLength(prefix) > 155) + return null; + if (opts.linkname && Buffer.byteLength(opts.linkname) > 100) + return null; + buf.write(name); + buf.write(encodeOct(opts.mode & MASK, 6), 100); + buf.write(encodeOct(opts.uid, 6), 108); + buf.write(encodeOct(opts.gid, 6), 116); + buf.write(encodeOct(opts.size, 11), 124); + buf.write(encodeOct(opts.mtime.getTime() / 1e3 | 0, 11), 136); + buf[156] = ZERO_OFFSET + toTypeflag(opts.type); + if (opts.linkname) + buf.write(opts.linkname, 157); + USTAR_MAGIC.copy(buf, MAGIC_OFFSET); + USTAR_VER.copy(buf, VERSION_OFFSET); + if (opts.uname) + buf.write(opts.uname, 265); + if (opts.gname) + buf.write(opts.gname, 297); + buf.write(encodeOct(opts.devmajor || 0, 6), 329); + buf.write(encodeOct(opts.devminor || 0, 6), 337); + if (prefix) + buf.write(prefix, 345); + buf.write(encodeOct(cksum(buf), 6), 148); + return buf; + }; + exports2.decode = function(buf, filenameEncoding, allowUnknownFormat) { + var typeflag = buf[156] === 0 ? 0 : buf[156] - ZERO_OFFSET; + var name = decodeStr(buf, 0, 100, filenameEncoding); + var mode = decodeOct(buf, 100, 8); + var uid = decodeOct(buf, 108, 8); + var gid = decodeOct(buf, 116, 8); + var size = decodeOct(buf, 124, 12); + var mtime = decodeOct(buf, 136, 12); + var type = toType(typeflag); + var linkname = buf[157] === 0 ? null : decodeStr(buf, 157, 100, filenameEncoding); + var uname = decodeStr(buf, 265, 32); + var gname = decodeStr(buf, 297, 32); + var devmajor = decodeOct(buf, 329, 8); + var devminor = decodeOct(buf, 337, 8); + var c = cksum(buf); + if (c === 8 * 32) + return null; + if (c !== decodeOct(buf, 148, 8)) + throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?"); + if (USTAR_MAGIC.compare(buf, MAGIC_OFFSET, MAGIC_OFFSET + 6) === 0) { + if (buf[345]) + name = decodeStr(buf, 345, 155, filenameEncoding) + "/" + name; + } else if (GNU_MAGIC.compare(buf, MAGIC_OFFSET, MAGIC_OFFSET + 6) === 0 && GNU_VER.compare(buf, VERSION_OFFSET, VERSION_OFFSET + 2) === 0) { + } else { + if (!allowUnknownFormat) { + throw new Error("Invalid tar header: unknown format."); + } + } + if (typeflag === 0 && name && name[name.length - 1] === "/") + typeflag = 5; + return { + name, + mode, + uid, + gid, + size, + mtime: new Date(1e3 * mtime), + type, + linkname, + uname, + gname, + devmajor, + devminor + }; + }; + } +}); + +// ../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/extract.js +var require_extract = __commonJS({ + "../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/extract.js"(exports2, module2) { + var util = require("util"); + var bl = require_bl(); + var headers = require_headers(); + var Writable = require_readable().Writable; + var PassThrough = require_readable().PassThrough; + var noop = function() { + }; + var overflow = function(size) { + size &= 511; + return size && 512 - size; + }; + var emptyStream = function(self2, offset) { + var s = new Source(self2, offset); + s.end(); + return s; + }; + var mixinPax = function(header, pax) { + if (pax.path) + header.name = pax.path; + if (pax.linkpath) + header.linkname = pax.linkpath; + if (pax.size) + header.size = parseInt(pax.size, 10); + header.pax = pax; + return header; + }; + var Source = function(self2, offset) { + this._parent = self2; + this.offset = offset; + PassThrough.call(this, { autoDestroy: false }); + }; + util.inherits(Source, PassThrough); + Source.prototype.destroy = function(err) { + this._parent.destroy(err); + }; + var Extract = function(opts) { + if (!(this instanceof Extract)) + return new Extract(opts); + Writable.call(this, opts); + opts = opts || {}; + this._offset = 0; + this._buffer = bl(); + this._missing = 0; + this._partial = false; + this._onparse = noop; + this._header = null; + this._stream = null; + this._overflow = null; + this._cb = null; + this._locked = false; + this._destroyed = false; + this._pax = null; + this._paxGlobal = null; + this._gnuLongPath = null; + this._gnuLongLinkPath = null; + var self2 = this; + var b = self2._buffer; + var oncontinue = function() { + self2._continue(); + }; + var onunlock = function(err) { + self2._locked = false; + if (err) + return self2.destroy(err); + if (!self2._stream) + oncontinue(); + }; + var onstreamend = function() { + self2._stream = null; + var drain = overflow(self2._header.size); + if (drain) + self2._parse(drain, ondrain); + else + self2._parse(512, onheader); + if (!self2._locked) + oncontinue(); + }; + var ondrain = function() { + self2._buffer.consume(overflow(self2._header.size)); + self2._parse(512, onheader); + oncontinue(); + }; + var onpaxglobalheader = function() { + var size = self2._header.size; + self2._paxGlobal = headers.decodePax(b.slice(0, size)); + b.consume(size); + onstreamend(); + }; + var onpaxheader = function() { + var size = self2._header.size; + self2._pax = headers.decodePax(b.slice(0, size)); + if (self2._paxGlobal) + self2._pax = Object.assign({}, self2._paxGlobal, self2._pax); + b.consume(size); + onstreamend(); + }; + var ongnulongpath = function() { + var size = self2._header.size; + this._gnuLongPath = headers.decodeLongPath(b.slice(0, size), opts.filenameEncoding); + b.consume(size); + onstreamend(); + }; + var ongnulonglinkpath = function() { + var size = self2._header.size; + this._gnuLongLinkPath = headers.decodeLongPath(b.slice(0, size), opts.filenameEncoding); + b.consume(size); + onstreamend(); + }; + var onheader = function() { + var offset = self2._offset; + var header; + try { + header = self2._header = headers.decode(b.slice(0, 512), opts.filenameEncoding, opts.allowUnknownFormat); + } catch (err) { + self2.emit("error", err); + } + b.consume(512); + if (!header) { + self2._parse(512, onheader); + oncontinue(); + return; + } + if (header.type === "gnu-long-path") { + self2._parse(header.size, ongnulongpath); + oncontinue(); + return; + } + if (header.type === "gnu-long-link-path") { + self2._parse(header.size, ongnulonglinkpath); + oncontinue(); + return; + } + if (header.type === "pax-global-header") { + self2._parse(header.size, onpaxglobalheader); + oncontinue(); + return; + } + if (header.type === "pax-header") { + self2._parse(header.size, onpaxheader); + oncontinue(); + return; + } + if (self2._gnuLongPath) { + header.name = self2._gnuLongPath; + self2._gnuLongPath = null; + } + if (self2._gnuLongLinkPath) { + header.linkname = self2._gnuLongLinkPath; + self2._gnuLongLinkPath = null; + } + if (self2._pax) { + self2._header = header = mixinPax(header, self2._pax); + self2._pax = null; + } + self2._locked = true; + if (!header.size || header.type === "directory") { + self2._parse(512, onheader); + self2.emit("entry", header, emptyStream(self2, offset), onunlock); + return; + } + self2._stream = new Source(self2, offset); + self2.emit("entry", header, self2._stream, onunlock); + self2._parse(header.size, onstreamend); + oncontinue(); + }; + this._onheader = onheader; + this._parse(512, onheader); + }; + util.inherits(Extract, Writable); + Extract.prototype.destroy = function(err) { + if (this._destroyed) + return; + this._destroyed = true; + if (err) + this.emit("error", err); + this.emit("close"); + if (this._stream) + this._stream.emit("close"); + }; + Extract.prototype._parse = function(size, onparse) { + if (this._destroyed) + return; + this._offset += size; + this._missing = size; + if (onparse === this._onheader) + this._partial = false; + this._onparse = onparse; + }; + Extract.prototype._continue = function() { + if (this._destroyed) + return; + var cb = this._cb; + this._cb = noop; + if (this._overflow) + this._write(this._overflow, void 0, cb); + else + cb(); + }; + Extract.prototype._write = function(data, enc, cb) { + if (this._destroyed) + return; + var s = this._stream; + var b = this._buffer; + var missing = this._missing; + if (data.length) + this._partial = true; + if (data.length < missing) { + this._missing -= data.length; + this._overflow = null; + if (s) + return s.write(data, cb); + b.append(data); + return cb(); + } + this._cb = cb; + this._missing = 0; + var overflow2 = null; + if (data.length > missing) { + overflow2 = data.slice(missing); + data = data.slice(0, missing); + } + if (s) + s.end(data); + else + b.append(data); + this._overflow = overflow2; + this._onparse(); + }; + Extract.prototype._final = function(cb) { + if (this._partial) + return this.destroy(new Error("Unexpected end of data")); + cb(); + }; + module2.exports = Extract; + } +}); + +// ../../node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/index.js +var require_fs_constants = __commonJS({ + "../../node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/index.js"(exports2, module2) { + module2.exports = require("fs").constants || require("constants"); + } +}); + +// ../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/pack.js +var require_pack = __commonJS({ + "../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/pack.js"(exports2, module2) { + var constants = require_fs_constants(); + var eos = require_end_of_stream2(); + var inherits = require_inherits(); + var alloc = Buffer.alloc; + var Readable = require_readable().Readable; + var Writable = require_readable().Writable; + var StringDecoder = require("string_decoder").StringDecoder; + var headers = require_headers(); + var DMODE = parseInt("755", 8); + var FMODE = parseInt("644", 8); + var END_OF_TAR = alloc(1024); + var noop = function() { + }; + var overflow = function(self2, size) { + size &= 511; + if (size) + self2.push(END_OF_TAR.slice(0, 512 - size)); + }; + function modeToType(mode) { + switch (mode & constants.S_IFMT) { + case constants.S_IFBLK: + return "block-device"; + case constants.S_IFCHR: + return "character-device"; + case constants.S_IFDIR: + return "directory"; + case constants.S_IFIFO: + return "fifo"; + case constants.S_IFLNK: + return "symlink"; + } + return "file"; + } + var Sink = function(to) { + Writable.call(this); + this.written = 0; + this._to = to; + this._destroyed = false; + }; + inherits(Sink, Writable); + Sink.prototype._write = function(data, enc, cb) { + this.written += data.length; + if (this._to.push(data)) + return cb(); + this._to._drain = cb; + }; + Sink.prototype.destroy = function() { + if (this._destroyed) + return; + this._destroyed = true; + this.emit("close"); + }; + var LinkSink = function() { + Writable.call(this); + this.linkname = ""; + this._decoder = new StringDecoder("utf-8"); + this._destroyed = false; + }; + inherits(LinkSink, Writable); + LinkSink.prototype._write = function(data, enc, cb) { + this.linkname += this._decoder.write(data); + cb(); + }; + LinkSink.prototype.destroy = function() { + if (this._destroyed) + return; + this._destroyed = true; + this.emit("close"); + }; + var Void = function() { + Writable.call(this); + this._destroyed = false; + }; + inherits(Void, Writable); + Void.prototype._write = function(data, enc, cb) { + cb(new Error("No body allowed for this entry")); + }; + Void.prototype.destroy = function() { + if (this._destroyed) + return; + this._destroyed = true; + this.emit("close"); + }; + var Pack = function(opts) { + if (!(this instanceof Pack)) + return new Pack(opts); + Readable.call(this, opts); + this._drain = noop; + this._finalized = false; + this._finalizing = false; + this._destroyed = false; + this._stream = null; + }; + inherits(Pack, Readable); + Pack.prototype.entry = function(header, buffer, callback) { + if (this._stream) + throw new Error("already piping an entry"); + if (this._finalized || this._destroyed) + return; + if (typeof buffer === "function") { + callback = buffer; + buffer = null; + } + if (!callback) + callback = noop; + var self2 = this; + if (!header.size || header.type === "symlink") + header.size = 0; + if (!header.type) + header.type = modeToType(header.mode); + if (!header.mode) + header.mode = header.type === "directory" ? DMODE : FMODE; + if (!header.uid) + header.uid = 0; + if (!header.gid) + header.gid = 0; + if (!header.mtime) + header.mtime = new Date(); + if (typeof buffer === "string") + buffer = Buffer.from(buffer); + if (Buffer.isBuffer(buffer)) { + header.size = buffer.length; + this._encode(header); + var ok = this.push(buffer); + overflow(self2, header.size); + if (ok) + process.nextTick(callback); + else + this._drain = callback; + return new Void(); + } + if (header.type === "symlink" && !header.linkname) { + var linkSink = new LinkSink(); + eos(linkSink, function(err) { + if (err) { + self2.destroy(); + return callback(err); + } + header.linkname = linkSink.linkname; + self2._encode(header); + callback(); + }); + return linkSink; + } + this._encode(header); + if (header.type !== "file" && header.type !== "contiguous-file") { + process.nextTick(callback); + return new Void(); + } + var sink = new Sink(this); + this._stream = sink; + eos(sink, function(err) { + self2._stream = null; + if (err) { + self2.destroy(); + return callback(err); + } + if (sink.written !== header.size) { + self2.destroy(); + return callback(new Error("size mismatch")); + } + overflow(self2, header.size); + if (self2._finalizing) + self2.finalize(); + callback(); + }); + return sink; + }; + Pack.prototype.finalize = function() { + if (this._stream) { + this._finalizing = true; + return; + } + if (this._finalized) + return; + this._finalized = true; + this.push(END_OF_TAR); + this.push(null); + }; + Pack.prototype.destroy = function(err) { + if (this._destroyed) + return; + this._destroyed = true; + if (err) + this.emit("error", err); + this.emit("close"); + if (this._stream && this._stream.destroy) + this._stream.destroy(); + }; + Pack.prototype._encode = function(header) { + if (!header.pax) { + var buf = headers.encode(header); + if (buf) { + this.push(buf); + return; + } + } + this._encodePax(header); + }; + Pack.prototype._encodePax = function(header) { + var paxHeader = headers.encodePax({ + name: header.name, + linkname: header.linkname, + pax: header.pax + }); + var newHeader = { + name: "PaxHeader", + mode: header.mode, + uid: header.uid, + gid: header.gid, + size: paxHeader.length, + mtime: header.mtime, + type: "pax-header", + linkname: header.linkname && "PaxHeader", + uname: header.uname, + gname: header.gname, + devmajor: header.devmajor, + devminor: header.devminor + }; + this.push(headers.encode(newHeader)); + this.push(paxHeader); + overflow(this, paxHeader.length); + newHeader.size = header.size; + newHeader.type = header.type; + this.push(headers.encode(newHeader)); + }; + Pack.prototype._read = function(n) { + var drain = this._drain; + this._drain = noop; + drain(); + }; + module2.exports = Pack; + } +}); + +// ../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/index.js +var require_tar_stream = __commonJS({ + "../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/index.js"(exports2) { + exports2.extract = require_extract(); + exports2.pack = require_pack(); + } +}); + +// ../cafs/lib/addFilesFromTarball.js +var require_addFilesFromTarball = __commonJS({ + "../cafs/lib/addFilesFromTarball.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var decompress_maybe_1 = __importDefault(require_decompress_maybe()); + var tar_stream_1 = __importDefault(require_tar_stream()); + var parseJson_1 = require_parseJson(); + async function default_1(addStreamToCafs, _ignore, stream, manifest) { + const ignore = _ignore !== null && _ignore !== void 0 ? _ignore : () => false; + const extract = tar_stream_1.default.extract(); + const filesIndex = {}; + await new Promise((resolve, reject) => { + extract.on("entry", (header, fileStream, next) => { + const filename = header.name.substr(header.name.indexOf("/") + 1).replace(/\/\//g, "/"); + if (header.type !== "file" || ignore(filename) || filesIndex[filename]) { + fileStream.resume(); + next(); + return; + } + if (filename === "package.json" && manifest != null) { + parseJson_1.parseJsonStream(fileStream, manifest); + } + const writeResult = addStreamToCafs(fileStream, header.mode); + filesIndex[filename] = { + mode: header.mode, + size: header.size, + writeResult + }; + next(); + }); + extract.on("finish", () => resolve()); + extract.on("error", reject); + stream.on("error", reject).pipe(decompress_maybe_1.default()).on("error", reject).pipe(extract); + }); + return filesIndex; + } + exports2.default = default_1; + } +}); + +// ../cafs/lib/getFilePathInCafs.js +var require_getFilePathInCafs = __commonJS({ + "../cafs/lib/getFilePathInCafs.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.contentPathFromHex = exports2.getFilePathByModeInCafs = exports2.modeIsExecutable = void 0; + var path_1 = __importDefault(require("path")); + var ssri_1 = __importDefault(require_ssri()); + var modeIsExecutable = (mode) => (mode & 73) === 73; + exports2.modeIsExecutable = modeIsExecutable; + function getFilePathByModeInCafs(cafsDir, integrity, mode) { + const fileType = exports2.modeIsExecutable(mode) ? "exec" : "nonexec"; + return path_1.default.join(cafsDir, contentPathFromIntegrity(integrity, fileType)); + } + exports2.getFilePathByModeInCafs = getFilePathByModeInCafs; + function getFilePathInCafs(cafsDir, integrity, fileType) { + return path_1.default.join(cafsDir, contentPathFromIntegrity(integrity, fileType)); + } + exports2.default = getFilePathInCafs; + function contentPathFromIntegrity(integrity, fileType) { + const sri = ssri_1.default.parse(integrity, { single: true }); + return contentPathFromHex(fileType, sri.hexDigest()); + } + function contentPathFromHex(fileType, hex) { + const p = path_1.default.join(hex.slice(0, 2), hex.slice(2)); + switch (fileType) { + case "exec": + return `${p}-exec`; + case "nonexec": + return p; + case "index": + return `${p}-index.json`; + } + } + exports2.contentPathFromHex = contentPathFromHex; + } +}); + +// ../cafs/lib/checkFilesIntegrity.js +var require_checkFilesIntegrity = __commonJS({ + "../cafs/lib/checkFilesIntegrity.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.verifyFileIntegrity = void 0; + var fs_1 = require("fs"); + var graceful_fs_1 = __importDefault(require_lib18()); + var rimraf_1 = __importDefault(require_rimraf()); + var p_limit_1 = __importDefault(require_p_limit()); + var ssri_1 = __importDefault(require_ssri()); + var getFilePathInCafs_1 = require_getFilePathInCafs(); + var parseJson_1 = require_parseJson(); + var limit = p_limit_1.default(20); + var MAX_BULK_SIZE = 1 * 1024 * 1024; + async function default_1(cafsDir, pkgIndex, manifest) { + let verified = true; + await Promise.all(Object.keys(pkgIndex).map(async (f) => limit(async () => { + const fstat = pkgIndex[f]; + if (!fstat.integrity) { + throw new Error(`Integrity checksum is missing for ${f}`); + } + if (!await verifyFile(getFilePathInCafs_1.getFilePathByModeInCafs(cafsDir, fstat.integrity, fstat.mode), fstat, f === "package.json" ? manifest : void 0)) { + verified = false; + } + }))); + return verified; + } + exports2.default = default_1; + async function verifyFile(filename, fstat, deferredManifest) { + const currentFile = await checkFile(filename, fstat.checkedAt); + if (currentFile == null) + return false; + if (currentFile.isModified) { + if (currentFile.size !== fstat.size) { + await rimraf_1.default(filename); + return false; + } + return verifyFileIntegrity(filename, fstat, deferredManifest); + } + if (deferredManifest != null) { + parseJson_1.parseJsonBuffer(await graceful_fs_1.default.readFile(filename), deferredManifest); + } + return true; + } + async function verifyFileIntegrity(filename, expectedFile, deferredManifest) { + try { + if (expectedFile.size > MAX_BULK_SIZE && deferredManifest == null) { + const ok2 = Boolean(await ssri_1.default.checkStream(graceful_fs_1.default.createReadStream(filename), expectedFile.integrity)); + if (!ok2) { + await rimraf_1.default(filename); + } + return ok2; + } + const data = await graceful_fs_1.default.readFile(filename); + const ok = Boolean(ssri_1.default.checkData(data, expectedFile.integrity)); + if (!ok) { + await rimraf_1.default(filename); + } else if (deferredManifest != null) { + parseJson_1.parseJsonBuffer(data, deferredManifest); + } + return ok; + } catch (err) { + switch (err.code) { + case "ENOENT": + return false; + case "EINTEGRITY": { + await rimraf_1.default(filename); + return false; + } + } + throw err; + } + } + exports2.verifyFileIntegrity = verifyFileIntegrity; + async function checkFile(filename, checkedAt) { + try { + const { mtimeMs, size } = await fs_1.promises.stat(filename); + return { + isModified: mtimeMs - (checkedAt !== null && checkedAt !== void 0 ? checkedAt : 0) > 100, + size + }; + } catch (err) { + if (err.code === "ENOENT") + return null; + throw err; + } + } + } +}); + +// ../cafs/lib/writeFile.js +var require_writeFile = __commonJS({ + "../cafs/lib/writeFile.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var graceful_fs_1 = __importDefault(require_lib18()); + var dirs = new Set(); + async function default_1(fileDest, buffer, mode) { + await makeDirForFile(fileDest); + await graceful_fs_1.default.writeFile(fileDest, buffer, { mode }); + } + exports2.default = default_1; + async function makeDirForFile(fileDest) { + const dir = path_1.default.dirname(fileDest); + if (!dirs.has(dir)) { + await fs_1.promises.mkdir(dir, { recursive: true }); + dirs.add(dir); + } + } + } +}); + +// ../cafs/lib/index.js +var require_lib31 = __commonJS({ + "../cafs/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getFilePathInCafs = exports2.getFilePathByModeInCafs = exports2.checkFilesIntegrity = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var get_stream_1 = __importDefault(require_get_stream()); + var path_temp_1 = __importDefault(require_path_temp()); + var rename_overwrite_1 = __importDefault(require_rename_overwrite()); + var ssri_1 = __importDefault(require_ssri()); + var addFilesFromDir_1 = __importDefault(require_addFilesFromDir()); + var addFilesFromTarball_1 = __importDefault(require_addFilesFromTarball()); + var checkFilesIntegrity_1 = __importStar2(require_checkFilesIntegrity()); + exports2.checkFilesIntegrity = checkFilesIntegrity_1.default; + var getFilePathInCafs_1 = __importStar2(require_getFilePathInCafs()); + exports2.getFilePathInCafs = getFilePathInCafs_1.default; + Object.defineProperty(exports2, "getFilePathByModeInCafs", { enumerable: true, get: function() { + return getFilePathInCafs_1.getFilePathByModeInCafs; + } }); + var writeFile_1 = __importDefault(require_writeFile()); + function createCafs(cafsDir, ignore) { + const locker = new Map(); + const _writeBufferToCafs = writeBufferToCafs.bind(null, locker, cafsDir); + const addStream = addStreamToCafs.bind(null, _writeBufferToCafs); + const addBuffer = addBufferToCafs.bind(null, _writeBufferToCafs); + return { + addFilesFromDir: addFilesFromDir_1.default.bind(null, { addBuffer, addStream }), + addFilesFromTarball: addFilesFromTarball_1.default.bind(null, addStream, ignore !== null && ignore !== void 0 ? ignore : null) + }; + } + exports2.default = createCafs; + async function addStreamToCafs(writeBufferToCafs2, fileStream, mode) { + const buffer = await get_stream_1.default.buffer(fileStream); + return addBufferToCafs(writeBufferToCafs2, buffer, mode); + } + async function addBufferToCafs(writeBufferToCafs2, buffer, mode) { + const integrity = ssri_1.default.fromData(buffer); + const isExecutable = getFilePathInCafs_1.modeIsExecutable(mode); + const fileDest = getFilePathInCafs_1.contentPathFromHex(isExecutable ? "exec" : "nonexec", integrity.hexDigest()); + const checkedAt = await writeBufferToCafs2(buffer, fileDest, isExecutable ? 493 : void 0, integrity); + return { checkedAt, integrity }; + } + async function writeBufferToCafs(locker, cafsDir, buffer, fileDest, mode, integrity) { + fileDest = path_1.default.join(cafsDir, fileDest); + if (locker.has(fileDest)) { + return locker.get(fileDest); + } + const p = (async () => { + if (await existsSame(fileDest, integrity)) { + return Date.now(); + } + const temp = path_temp_1.default(path_1.default.dirname(fileDest)); + await writeFile_1.default(temp, buffer, mode); + const birthtimeMs = Date.now(); + await rename_overwrite_1.default(temp, fileDest); + return birthtimeMs; + })(); + locker.set(fileDest, p); + return p; + } + async function existsSame(filename, integrity) { + let existingFile; + try { + existingFile = await fs_1.promises.stat(filename); + } catch (err) { + return false; + } + return checkFilesIntegrity_1.verifyFileIntegrity(filename, { + size: existingFile.size, + integrity + }); + } + } +}); + +// ../../node_modules/.pnpm/spdx-license-ids@3.0.10/node_modules/spdx-license-ids/index.json +var require_spdx_license_ids = __commonJS({ + "../../node_modules/.pnpm/spdx-license-ids@3.0.10/node_modules/spdx-license-ids/index.json"(exports2, module2) { + module2.exports = [ + "0BSD", + "AAL", + "ADSL", + "AFL-1.1", + "AFL-1.2", + "AFL-2.0", + "AFL-2.1", + "AFL-3.0", + "AGPL-1.0-only", + "AGPL-1.0-or-later", + "AGPL-3.0-only", + "AGPL-3.0-or-later", + "AMDPLPA", + "AML", + "AMPAS", + "ANTLR-PD", + "ANTLR-PD-fallback", + "APAFML", + "APL-1.0", + "APSL-1.0", + "APSL-1.1", + "APSL-1.2", + "APSL-2.0", + "Abstyles", + "Adobe-2006", + "Adobe-Glyph", + "Afmparse", + "Aladdin", + "Apache-1.0", + "Apache-1.1", + "Apache-2.0", + "Artistic-1.0", + "Artistic-1.0-Perl", + "Artistic-1.0-cl8", + "Artistic-2.0", + "BSD-1-Clause", + "BSD-2-Clause", + "BSD-2-Clause-Patent", + "BSD-2-Clause-Views", + "BSD-3-Clause", + "BSD-3-Clause-Attribution", + "BSD-3-Clause-Clear", + "BSD-3-Clause-LBNL", + "BSD-3-Clause-Modification", + "BSD-3-Clause-No-Military-License", + "BSD-3-Clause-No-Nuclear-License", + "BSD-3-Clause-No-Nuclear-License-2014", + "BSD-3-Clause-No-Nuclear-Warranty", + "BSD-3-Clause-Open-MPI", + "BSD-4-Clause", + "BSD-4-Clause-Shortened", + "BSD-4-Clause-UC", + "BSD-Protection", + "BSD-Source-Code", + "BSL-1.0", + "BUSL-1.1", + "Bahyph", + "Barr", + "Beerware", + "BitTorrent-1.0", + "BitTorrent-1.1", + "BlueOak-1.0.0", + "Borceux", + "C-UDA-1.0", + "CAL-1.0", + "CAL-1.0-Combined-Work-Exception", + "CATOSL-1.1", + "CC-BY-1.0", + "CC-BY-2.0", + "CC-BY-2.5", + "CC-BY-2.5-AU", + "CC-BY-3.0", + "CC-BY-3.0-AT", + "CC-BY-3.0-DE", + "CC-BY-3.0-NL", + "CC-BY-3.0-US", + "CC-BY-4.0", + "CC-BY-NC-1.0", + "CC-BY-NC-2.0", + "CC-BY-NC-2.5", + "CC-BY-NC-3.0", + "CC-BY-NC-3.0-DE", + "CC-BY-NC-4.0", + "CC-BY-NC-ND-1.0", + "CC-BY-NC-ND-2.0", + "CC-BY-NC-ND-2.5", + "CC-BY-NC-ND-3.0", + "CC-BY-NC-ND-3.0-DE", + "CC-BY-NC-ND-3.0-IGO", + "CC-BY-NC-ND-4.0", + "CC-BY-NC-SA-1.0", + "CC-BY-NC-SA-2.0", + "CC-BY-NC-SA-2.0-FR", + "CC-BY-NC-SA-2.0-UK", + "CC-BY-NC-SA-2.5", + "CC-BY-NC-SA-3.0", + "CC-BY-NC-SA-3.0-DE", + "CC-BY-NC-SA-3.0-IGO", + "CC-BY-NC-SA-4.0", + "CC-BY-ND-1.0", + "CC-BY-ND-2.0", + "CC-BY-ND-2.5", + "CC-BY-ND-3.0", + "CC-BY-ND-3.0-DE", + "CC-BY-ND-4.0", + "CC-BY-SA-1.0", + "CC-BY-SA-2.0", + "CC-BY-SA-2.0-UK", + "CC-BY-SA-2.1-JP", + "CC-BY-SA-2.5", + "CC-BY-SA-3.0", + "CC-BY-SA-3.0-AT", + "CC-BY-SA-3.0-DE", + "CC-BY-SA-4.0", + "CC-PDDC", + "CC0-1.0", + "CDDL-1.0", + "CDDL-1.1", + "CDL-1.0", + "CDLA-Permissive-1.0", + "CDLA-Permissive-2.0", + "CDLA-Sharing-1.0", + "CECILL-1.0", + "CECILL-1.1", + "CECILL-2.0", + "CECILL-2.1", + "CECILL-B", + "CECILL-C", + "CERN-OHL-1.1", + "CERN-OHL-1.2", + "CERN-OHL-P-2.0", + "CERN-OHL-S-2.0", + "CERN-OHL-W-2.0", + "CNRI-Jython", + "CNRI-Python", + "CNRI-Python-GPL-Compatible", + "CPAL-1.0", + "CPL-1.0", + "CPOL-1.02", + "CUA-OPL-1.0", + "Caldera", + "ClArtistic", + "Condor-1.1", + "Crossword", + "CrystalStacker", + "Cube", + "D-FSL-1.0", + "DOC", + "DRL-1.0", + "DSDP", + "Dotseqn", + "ECL-1.0", + "ECL-2.0", + "EFL-1.0", + "EFL-2.0", + "EPICS", + "EPL-1.0", + "EPL-2.0", + "EUDatagrid", + "EUPL-1.0", + "EUPL-1.1", + "EUPL-1.2", + "Entessa", + "ErlPL-1.1", + "Eurosym", + "FSFAP", + "FSFUL", + "FSFULLR", + "FTL", + "Fair", + "Frameworx-1.0", + "FreeBSD-DOC", + "FreeImage", + "GD", + "GFDL-1.1-invariants-only", + "GFDL-1.1-invariants-or-later", + "GFDL-1.1-no-invariants-only", + "GFDL-1.1-no-invariants-or-later", + "GFDL-1.1-only", + "GFDL-1.1-or-later", + "GFDL-1.2-invariants-only", + "GFDL-1.2-invariants-or-later", + "GFDL-1.2-no-invariants-only", + "GFDL-1.2-no-invariants-or-later", + "GFDL-1.2-only", + "GFDL-1.2-or-later", + "GFDL-1.3-invariants-only", + "GFDL-1.3-invariants-or-later", + "GFDL-1.3-no-invariants-only", + "GFDL-1.3-no-invariants-or-later", + "GFDL-1.3-only", + "GFDL-1.3-or-later", + "GL2PS", + "GLWTPL", + "GPL-1.0-only", + "GPL-1.0-or-later", + "GPL-2.0-only", + "GPL-2.0-or-later", + "GPL-3.0-only", + "GPL-3.0-or-later", + "Giftware", + "Glide", + "Glulxe", + "HPND", + "HPND-sell-variant", + "HTMLTIDY", + "HaskellReport", + "Hippocratic-2.1", + "IBM-pibs", + "ICU", + "IJG", + "IPA", + "IPL-1.0", + "ISC", + "ImageMagick", + "Imlib2", + "Info-ZIP", + "Intel", + "Intel-ACPI", + "Interbase-1.0", + "JPNIC", + "JSON", + "JasPer-2.0", + "LAL-1.2", + "LAL-1.3", + "LGPL-2.0-only", + "LGPL-2.0-or-later", + "LGPL-2.1-only", + "LGPL-2.1-or-later", + "LGPL-3.0-only", + "LGPL-3.0-or-later", + "LGPLLR", + "LPL-1.0", + "LPL-1.02", + "LPPL-1.0", + "LPPL-1.1", + "LPPL-1.2", + "LPPL-1.3a", + "LPPL-1.3c", + "Latex2e", + "Leptonica", + "LiLiQ-P-1.1", + "LiLiQ-R-1.1", + "LiLiQ-Rplus-1.1", + "Libpng", + "Linux-OpenIB", + "MIT", + "MIT-0", + "MIT-CMU", + "MIT-Modern-Variant", + "MIT-advertising", + "MIT-enna", + "MIT-feh", + "MIT-open-group", + "MITNFA", + "MPL-1.0", + "MPL-1.1", + "MPL-2.0", + "MPL-2.0-no-copyleft-exception", + "MS-PL", + "MS-RL", + "MTLL", + "MakeIndex", + "MirOS", + "Motosoto", + "MulanPSL-1.0", + "MulanPSL-2.0", + "Multics", + "Mup", + "NAIST-2003", + "NASA-1.3", + "NBPL-1.0", + "NCGL-UK-2.0", + "NCSA", + "NGPL", + "NIST-PD", + "NIST-PD-fallback", + "NLOD-1.0", + "NLOD-2.0", + "NLPL", + "NOSL", + "NPL-1.0", + "NPL-1.1", + "NPOSL-3.0", + "NRL", + "NTP", + "NTP-0", + "Naumen", + "Net-SNMP", + "NetCDF", + "Newsletr", + "Nokia", + "Noweb", + "O-UDA-1.0", + "OCCT-PL", + "OCLC-2.0", + "ODC-By-1.0", + "ODbL-1.0", + "OFL-1.0", + "OFL-1.0-RFN", + "OFL-1.0-no-RFN", + "OFL-1.1", + "OFL-1.1-RFN", + "OFL-1.1-no-RFN", + "OGC-1.0", + "OGDL-Taiwan-1.0", + "OGL-Canada-2.0", + "OGL-UK-1.0", + "OGL-UK-2.0", + "OGL-UK-3.0", + "OGTSL", + "OLDAP-1.1", + "OLDAP-1.2", + "OLDAP-1.3", + "OLDAP-1.4", + "OLDAP-2.0", + "OLDAP-2.0.1", + "OLDAP-2.1", + "OLDAP-2.2", + "OLDAP-2.2.1", + "OLDAP-2.2.2", + "OLDAP-2.3", + "OLDAP-2.4", + "OLDAP-2.5", + "OLDAP-2.6", + "OLDAP-2.7", + "OLDAP-2.8", + "OML", + "OPL-1.0", + "OPUBL-1.0", + "OSET-PL-2.1", + "OSL-1.0", + "OSL-1.1", + "OSL-2.0", + "OSL-2.1", + "OSL-3.0", + "OpenSSL", + "PDDL-1.0", + "PHP-3.0", + "PHP-3.01", + "PSF-2.0", + "Parity-6.0.0", + "Parity-7.0.0", + "Plexus", + "PolyForm-Noncommercial-1.0.0", + "PolyForm-Small-Business-1.0.0", + "PostgreSQL", + "Python-2.0", + "QPL-1.0", + "Qhull", + "RHeCos-1.1", + "RPL-1.1", + "RPL-1.5", + "RPSL-1.0", + "RSA-MD", + "RSCPL", + "Rdisc", + "Ruby", + "SAX-PD", + "SCEA", + "SGI-B-1.0", + "SGI-B-1.1", + "SGI-B-2.0", + "SHL-0.5", + "SHL-0.51", + "SISSL", + "SISSL-1.2", + "SMLNJ", + "SMPPL", + "SNIA", + "SPL-1.0", + "SSH-OpenSSH", + "SSH-short", + "SSPL-1.0", + "SWL", + "Saxpath", + "Sendmail", + "Sendmail-8.23", + "SimPL-2.0", + "Sleepycat", + "Spencer-86", + "Spencer-94", + "Spencer-99", + "SugarCRM-1.1.3", + "TAPR-OHL-1.0", + "TCL", + "TCP-wrappers", + "TMate", + "TORQUE-1.1", + "TOSL", + "TU-Berlin-1.0", + "TU-Berlin-2.0", + "UCL-1.0", + "UPL-1.0", + "Unicode-DFS-2015", + "Unicode-DFS-2016", + "Unicode-TOU", + "Unlicense", + "VOSTROM", + "VSL-1.0", + "Vim", + "W3C", + "W3C-19980720", + "W3C-20150513", + "WTFPL", + "Watcom-1.0", + "Wsuipa", + "X11", + "XFree86-1.1", + "XSkat", + "Xerox", + "Xnet", + "YPL-1.0", + "YPL-1.1", + "ZPL-1.1", + "ZPL-2.0", + "ZPL-2.1", + "Zed", + "Zend-2.0", + "Zimbra-1.3", + "Zimbra-1.4", + "Zlib", + "blessing", + "bzip2-1.0.5", + "bzip2-1.0.6", + "copyleft-next-0.3.0", + "copyleft-next-0.3.1", + "curl", + "diffmark", + "dvipdfm", + "eGenix", + "etalab-2.0", + "gSOAP-1.3b", + "gnuplot", + "iMatix", + "libpng-2.0", + "libselinux-1.0", + "libtiff", + "mpich2", + "psfrag", + "psutils", + "xinetd", + "xpp", + "zlib-acknowledgement" + ]; + } +}); + +// ../../node_modules/.pnpm/spdx-license-ids@3.0.10/node_modules/spdx-license-ids/deprecated.json +var require_deprecated = __commonJS({ + "../../node_modules/.pnpm/spdx-license-ids@3.0.10/node_modules/spdx-license-ids/deprecated.json"(exports2, module2) { + module2.exports = [ + "AGPL-1.0", + "AGPL-3.0", + "BSD-2-Clause-FreeBSD", + "BSD-2-Clause-NetBSD", + "GFDL-1.1", + "GFDL-1.2", + "GFDL-1.3", + "GPL-1.0", + "GPL-2.0", + "GPL-2.0-with-GCC-exception", + "GPL-2.0-with-autoconf-exception", + "GPL-2.0-with-bison-exception", + "GPL-2.0-with-classpath-exception", + "GPL-2.0-with-font-exception", + "GPL-3.0", + "GPL-3.0-with-GCC-exception", + "GPL-3.0-with-autoconf-exception", + "LGPL-2.0", + "LGPL-2.1", + "LGPL-3.0", + "Nunit", + "StandardML-NJ", + "eCos-2.0", + "wxWindows" + ]; + } +}); + +// ../../node_modules/.pnpm/spdx-exceptions@2.3.0/node_modules/spdx-exceptions/index.json +var require_spdx_exceptions = __commonJS({ + "../../node_modules/.pnpm/spdx-exceptions@2.3.0/node_modules/spdx-exceptions/index.json"(exports2, module2) { + module2.exports = [ + "389-exception", + "Autoconf-exception-2.0", + "Autoconf-exception-3.0", + "Bison-exception-2.2", + "Bootloader-exception", + "Classpath-exception-2.0", + "CLISP-exception-2.0", + "DigiRule-FOSS-exception", + "eCos-exception-2.0", + "Fawkes-Runtime-exception", + "FLTK-exception", + "Font-exception-2.0", + "freertos-exception-2.0", + "GCC-exception-2.0", + "GCC-exception-3.1", + "gnu-javamail-exception", + "GPL-3.0-linking-exception", + "GPL-3.0-linking-source-exception", + "GPL-CC-1.0", + "i2p-gpl-java-exception", + "Libtool-exception", + "Linux-syscall-note", + "LLVM-exception", + "LZMA-exception", + "mif-exception", + "Nokia-Qt-exception-1.1", + "OCaml-LGPL-linking-exception", + "OCCT-exception-1.0", + "OpenJDK-assembly-exception-1.0", + "openvpn-openssl-exception", + "PS-or-PDF-font-exception-20170817", + "Qt-GPL-exception-1.0", + "Qt-LGPL-exception-1.1", + "Qwt-exception-1.0", + "Swift-exception", + "u-boot-exception-2.0", + "Universal-FOSS-exception-1.0", + "WxWindows-exception-3.1" + ]; + } +}); + +// ../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/scan.js +var require_scan3 = __commonJS({ + "../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/scan.js"(exports2, module2) { + "use strict"; + var licenses = [].concat(require_spdx_license_ids()).concat(require_deprecated()); + var exceptions = require_spdx_exceptions(); + module2.exports = function(source) { + var index = 0; + function hasMore() { + return index < source.length; + } + function read(value) { + if (value instanceof RegExp) { + var chars = source.slice(index); + var match = chars.match(value); + if (match) { + index += match[0].length; + return match[0]; + } + } else { + if (source.indexOf(value, index) === index) { + index += value.length; + return value; + } + } + } + function skipWhitespace() { + read(/[ ]*/); + } + function operator() { + var string; + var possibilities = ["WITH", "AND", "OR", "(", ")", ":", "+"]; + for (var i = 0; i < possibilities.length; i++) { + string = read(possibilities[i]); + if (string) { + break; + } + } + if (string === "+" && index > 1 && source[index - 2] === " ") { + throw new Error("Space before `+`"); + } + return string && { + type: "OPERATOR", + string + }; + } + function idstring() { + return read(/[A-Za-z0-9-.]+/); + } + function expectIdstring() { + var string = idstring(); + if (!string) { + throw new Error("Expected idstring at offset " + index); + } + return string; + } + function documentRef() { + if (read("DocumentRef-")) { + var string = expectIdstring(); + return { type: "DOCUMENTREF", string }; + } + } + function licenseRef() { + if (read("LicenseRef-")) { + var string = expectIdstring(); + return { type: "LICENSEREF", string }; + } + } + function identifier() { + var begin = index; + var string = idstring(); + if (licenses.indexOf(string) !== -1) { + return { + type: "LICENSE", + string + }; + } else if (exceptions.indexOf(string) !== -1) { + return { + type: "EXCEPTION", + string + }; + } + index = begin; + } + function parseToken() { + return operator() || documentRef() || licenseRef() || identifier(); + } + var tokens = []; + while (hasMore()) { + skipWhitespace(); + if (!hasMore()) { + break; + } + var token = parseToken(); + if (!token) { + throw new Error("Unexpected `" + source[index] + "` at offset " + index); + } + tokens.push(token); + } + return tokens; + }; + } +}); + +// ../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/parse.js +var require_parse6 = __commonJS({ + "../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/parse.js"(exports2, module2) { + "use strict"; + module2.exports = function(tokens) { + var index = 0; + function hasMore() { + return index < tokens.length; + } + function token() { + return hasMore() ? tokens[index] : null; + } + function next() { + if (!hasMore()) { + throw new Error(); + } + index++; + } + function parseOperator(operator) { + var t = token(); + if (t && t.type === "OPERATOR" && operator === t.string) { + next(); + return t.string; + } + } + function parseWith() { + if (parseOperator("WITH")) { + var t = token(); + if (t && t.type === "EXCEPTION") { + next(); + return t.string; + } + throw new Error("Expected exception after `WITH`"); + } + } + function parseLicenseRef() { + var begin = index; + var string = ""; + var t = token(); + if (t.type === "DOCUMENTREF") { + next(); + string += "DocumentRef-" + t.string + ":"; + if (!parseOperator(":")) { + throw new Error("Expected `:` after `DocumentRef-...`"); + } + } + t = token(); + if (t.type === "LICENSEREF") { + next(); + string += "LicenseRef-" + t.string; + return { license: string }; + } + index = begin; + } + function parseLicense() { + var t = token(); + if (t && t.type === "LICENSE") { + next(); + var node2 = { license: t.string }; + if (parseOperator("+")) { + node2.plus = true; + } + var exception = parseWith(); + if (exception) { + node2.exception = exception; + } + return node2; + } + } + function parseParenthesizedExpression() { + var left = parseOperator("("); + if (!left) { + return; + } + var expr = parseExpression(); + if (!parseOperator(")")) { + throw new Error("Expected `)`"); + } + return expr; + } + function parseAtom() { + return parseParenthesizedExpression() || parseLicenseRef() || parseLicense(); + } + function makeBinaryOpParser(operator, nextParser) { + return function parseBinaryOp() { + var left = nextParser(); + if (!left) { + return; + } + if (!parseOperator(operator)) { + return left; + } + var right = parseBinaryOp(); + if (!right) { + throw new Error("Expected expression"); + } + return { + left, + conjunction: operator.toLowerCase(), + right + }; + }; + } + var parseAnd = makeBinaryOpParser("AND", parseAtom); + var parseExpression = makeBinaryOpParser("OR", parseAnd); + var node = parseExpression(); + if (!node || hasMore()) { + throw new Error("Syntax error"); + } + return node; + }; + } +}); + +// ../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/index.js +var require_spdx_expression_parse = __commonJS({ + "../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/index.js"(exports2, module2) { + "use strict"; + var scan = require_scan3(); + var parse = require_parse6(); + module2.exports = function(source) { + return parse(scan(source)); + }; + } +}); + +// ../../node_modules/.pnpm/spdx-correct@3.1.1/node_modules/spdx-correct/index.js +var require_spdx_correct = __commonJS({ + "../../node_modules/.pnpm/spdx-correct@3.1.1/node_modules/spdx-correct/index.js"(exports2, module2) { + var parse = require_spdx_expression_parse(); + var spdxLicenseIds = require_spdx_license_ids(); + function valid(string) { + try { + parse(string); + return true; + } catch (error) { + return false; + } + } + var transpositions = [ + ["APGL", "AGPL"], + ["Gpl", "GPL"], + ["GLP", "GPL"], + ["APL", "Apache"], + ["ISD", "ISC"], + ["GLP", "GPL"], + ["IST", "ISC"], + ["Claude", "Clause"], + [" or later", "+"], + [" International", ""], + ["GNU", "GPL"], + ["GUN", "GPL"], + ["+", ""], + ["GNU GPL", "GPL"], + ["GNU/GPL", "GPL"], + ["GNU GLP", "GPL"], + ["GNU General Public License", "GPL"], + ["Gnu public license", "GPL"], + ["GNU Public License", "GPL"], + ["GNU GENERAL PUBLIC LICENSE", "GPL"], + ["MTI", "MIT"], + ["Mozilla Public License", "MPL"], + ["Universal Permissive License", "UPL"], + ["WTH", "WTF"], + ["-License", ""] + ]; + var TRANSPOSED = 0; + var CORRECT = 1; + var transforms = [ + function(argument) { + return argument.toUpperCase(); + }, + function(argument) { + return argument.trim(); + }, + function(argument) { + return argument.replace(/\./g, ""); + }, + function(argument) { + return argument.replace(/\s+/g, ""); + }, + function(argument) { + return argument.replace(/\s+/g, "-"); + }, + function(argument) { + return argument.replace("v", "-"); + }, + function(argument) { + return argument.replace(/,?\s*(\d)/, "-$1"); + }, + function(argument) { + return argument.replace(/,?\s*(\d)/, "-$1.0"); + }, + function(argument) { + return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, "-$2"); + }, + function(argument) { + return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, "-$2.0"); + }, + function(argument) { + return argument[0].toUpperCase() + argument.slice(1); + }, + function(argument) { + return argument.replace("/", "-"); + }, + function(argument) { + return argument.replace(/\s*V\s*(\d)/, "-$1").replace(/(\d)$/, "$1.0"); + }, + function(argument) { + if (argument.indexOf("3.0") !== -1) { + return argument + "-or-later"; + } else { + return argument + "-only"; + } + }, + function(argument) { + return argument + "only"; + }, + function(argument) { + return argument.replace(/(\d)$/, "-$1.0"); + }, + function(argument) { + return argument.replace(/(-| )?(\d)$/, "-$2-Clause"); + }, + function(argument) { + return argument.replace(/(-| )clause(-| )(\d)/, "-$3-Clause"); + }, + function(argument) { + return argument.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i, "BSD-3-Clause"); + }, + function(argument) { + return argument.replace(/\bSimplified(-| )?BSD((-| )License)?/i, "BSD-2-Clause"); + }, + function(argument) { + return argument.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i, "BSD-2-Clause-$1BSD"); + }, + function(argument) { + return argument.replace(/\bClear(-| )?BSD((-| )License)?/i, "BSD-3-Clause-Clear"); + }, + function(argument) { + return argument.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i, "BSD-4-Clause"); + }, + function(argument) { + return "CC-" + argument; + }, + function(argument) { + return "CC-" + argument + "-4.0"; + }, + function(argument) { + return argument.replace("Attribution", "BY").replace("NonCommercial", "NC").replace("NoDerivatives", "ND").replace(/ (\d)/, "-$1").replace(/ ?International/, ""); + }, + function(argument) { + return "CC-" + argument.replace("Attribution", "BY").replace("NonCommercial", "NC").replace("NoDerivatives", "ND").replace(/ (\d)/, "-$1").replace(/ ?International/, "") + "-4.0"; + } + ]; + var licensesWithVersions = spdxLicenseIds.map(function(id) { + var match = /^(.*)-\d+\.\d+$/.exec(id); + return match ? [match[0], match[1]] : [id, null]; + }).reduce(function(objectMap, item) { + var key = item[1]; + objectMap[key] = objectMap[key] || []; + objectMap[key].push(item[0]); + return objectMap; + }, {}); + var licensesWithOneVersion = Object.keys(licensesWithVersions).map(function makeEntries(key) { + return [key, licensesWithVersions[key]]; + }).filter(function identifySoleVersions(item) { + return item[1].length === 1 && item[0] !== null && item[0] !== "APL"; + }).map(function createLastResorts(item) { + return [item[0], item[1][0]]; + }); + licensesWithVersions = void 0; + var lastResorts = [ + ["UNLI", "Unlicense"], + ["WTF", "WTFPL"], + ["2 CLAUSE", "BSD-2-Clause"], + ["2-CLAUSE", "BSD-2-Clause"], + ["3 CLAUSE", "BSD-3-Clause"], + ["3-CLAUSE", "BSD-3-Clause"], + ["AFFERO", "AGPL-3.0-or-later"], + ["AGPL", "AGPL-3.0-or-later"], + ["APACHE", "Apache-2.0"], + ["ARTISTIC", "Artistic-2.0"], + ["Affero", "AGPL-3.0-or-later"], + ["BEER", "Beerware"], + ["BOOST", "BSL-1.0"], + ["BSD", "BSD-2-Clause"], + ["CDDL", "CDDL-1.1"], + ["ECLIPSE", "EPL-1.0"], + ["FUCK", "WTFPL"], + ["GNU", "GPL-3.0-or-later"], + ["LGPL", "LGPL-3.0-or-later"], + ["GPLV1", "GPL-1.0-only"], + ["GPL-1", "GPL-1.0-only"], + ["GPLV2", "GPL-2.0-only"], + ["GPL-2", "GPL-2.0-only"], + ["GPL", "GPL-3.0-or-later"], + ["MIT +NO-FALSE-ATTRIBS", "MITNFA"], + ["MIT", "MIT"], + ["MPL", "MPL-2.0"], + ["X11", "X11"], + ["ZLIB", "Zlib"] + ].concat(licensesWithOneVersion); + var SUBSTRING = 0; + var IDENTIFIER = 1; + var validTransformation = function(identifier) { + for (var i = 0; i < transforms.length; i++) { + var transformed = transforms[i](identifier).trim(); + if (transformed !== identifier && valid(transformed)) { + return transformed; + } + } + return null; + }; + var validLastResort = function(identifier) { + var upperCased = identifier.toUpperCase(); + for (var i = 0; i < lastResorts.length; i++) { + var lastResort = lastResorts[i]; + if (upperCased.indexOf(lastResort[SUBSTRING]) > -1) { + return lastResort[IDENTIFIER]; + } + } + return null; + }; + var anyCorrection = function(identifier, check) { + for (var i = 0; i < transpositions.length; i++) { + var transposition = transpositions[i]; + var transposed = transposition[TRANSPOSED]; + if (identifier.indexOf(transposed) > -1) { + var corrected = identifier.replace(transposed, transposition[CORRECT]); + var checked = check(corrected); + if (checked !== null) { + return checked; + } + } + } + return null; + }; + module2.exports = function(identifier, options) { + options = options || {}; + var upgrade = options.upgrade === void 0 ? true : !!options.upgrade; + function postprocess(value) { + return upgrade ? upgradeGPLs(value) : value; + } + var validArugment = typeof identifier === "string" && identifier.trim().length !== 0; + if (!validArugment) { + throw Error("Invalid argument. Expected non-empty string."); + } + identifier = identifier.trim(); + if (valid(identifier)) { + return postprocess(identifier); + } + var noPlus = identifier.replace(/\+$/, "").trim(); + if (valid(noPlus)) { + return postprocess(noPlus); + } + var transformed = validTransformation(identifier); + if (transformed !== null) { + return postprocess(transformed); + } + transformed = anyCorrection(identifier, function(argument) { + if (valid(argument)) { + return argument; + } + return validTransformation(argument); + }); + if (transformed !== null) { + return postprocess(transformed); + } + transformed = validLastResort(identifier); + if (transformed !== null) { + return postprocess(transformed); + } + transformed = anyCorrection(identifier, validLastResort); + if (transformed !== null) { + return postprocess(transformed); + } + return null; + }; + function upgradeGPLs(value) { + if ([ + "GPL-1.0", + "LGPL-1.0", + "AGPL-1.0", + "GPL-2.0", + "LGPL-2.0", + "AGPL-2.0", + "LGPL-2.1" + ].indexOf(value) !== -1) { + return value + "-only"; + } else if ([ + "GPL-1.0+", + "GPL-2.0+", + "GPL-3.0+", + "LGPL-2.0+", + "LGPL-2.1+", + "LGPL-3.0+", + "AGPL-1.0+", + "AGPL-3.0+" + ].indexOf(value) !== -1) { + return value.replace(/\+$/, "-or-later"); + } else if (["GPL-3.0", "LGPL-3.0", "AGPL-3.0"].indexOf(value) !== -1) { + return value + "-or-later"; + } else { + return value; + } + } + } +}); + +// ../../node_modules/.pnpm/validate-npm-package-license@3.0.4/node_modules/validate-npm-package-license/index.js +var require_validate_npm_package_license = __commonJS({ + "../../node_modules/.pnpm/validate-npm-package-license@3.0.4/node_modules/validate-npm-package-license/index.js"(exports2, module2) { + var parse = require_spdx_expression_parse(); + var correct = require_spdx_correct(); + var genericWarning = 'license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN "'; + var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/; + function startsWith(prefix, string) { + return string.slice(0, prefix.length) === prefix; + } + function usesLicenseRef(ast) { + if (ast.hasOwnProperty("license")) { + var license = ast.license; + return startsWith("LicenseRef", license) || startsWith("DocumentRef", license); + } else { + return usesLicenseRef(ast.left) || usesLicenseRef(ast.right); + } + } + module2.exports = function(argument) { + var ast; + try { + ast = parse(argument); + } catch (e) { + var match; + if (argument === "UNLICENSED" || argument === "UNLICENCED") { + return { + validForOldPackages: true, + validForNewPackages: true, + unlicensed: true + }; + } else if (match = fileReferenceRE.exec(argument)) { + return { + validForOldPackages: true, + validForNewPackages: true, + inFile: match[1] + }; + } else { + var result = { + validForOldPackages: false, + validForNewPackages: false, + warnings: [genericWarning] + }; + if (argument.trim().length !== 0) { + var corrected = correct(argument); + if (corrected) { + result.warnings.push('license is similar to the valid expression "' + corrected + '"'); + } + } + return result; + } + } + if (usesLicenseRef(ast)) { + return { + validForNewPackages: false, + validForOldPackages: false, + spdx: true, + warnings: [genericWarning] + }; + } else { + return { + validForNewPackages: true, + validForOldPackages: true, + spdx: true + }; + } + }; + } +}); + +// ../../node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js +var require_implementation = __commonJS({ + "../../node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js"(exports2, module2) { + "use strict"; + var ERROR_MESSAGE = "Function.prototype.bind called on incompatible "; + var slice = Array.prototype.slice; + var toStr = Object.prototype.toString; + var funcType = "[object Function]"; + module2.exports = function bind(that) { + var target = this; + if (typeof target !== "function" || toStr.call(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args2 = slice.call(arguments, 1); + var bound; + var binder = function() { + if (this instanceof bound) { + var result = target.apply(this, args2.concat(slice.call(arguments))); + if (Object(result) === result) { + return result; + } + return this; + } else { + return target.apply(that, args2.concat(slice.call(arguments))); + } + }; + var boundLength = Math.max(0, target.length - args2.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs.push("$" + i); + } + bound = Function("binder", "return function (" + boundArgs.join(",") + "){ return binder.apply(this,arguments); }")(binder); + if (target.prototype) { + var Empty = function Empty2() { + }; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + return bound; + }; + } +}); + +// ../../node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js +var require_function_bind = __commonJS({ + "../../node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js"(exports2, module2) { + "use strict"; + var implementation = require_implementation(); + module2.exports = Function.prototype.bind || implementation; + } +}); + +// ../../node_modules/.pnpm/has@1.0.3/node_modules/has/src/index.js +var require_src5 = __commonJS({ + "../../node_modules/.pnpm/has@1.0.3/node_modules/has/src/index.js"(exports2, module2) { + "use strict"; + var bind = require_function_bind(); + module2.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); + } +}); + +// ../../node_modules/.pnpm/is-core-module@2.6.0/node_modules/is-core-module/core.json +var require_core4 = __commonJS({ + "../../node_modules/.pnpm/is-core-module@2.6.0/node_modules/is-core-module/core.json"(exports2, module2) { + module2.exports = { + assert: true, + "node:assert": ">= 16", + "assert/strict": ">= 15", + "node:assert/strict": ">= 16", + async_hooks: ">= 8", + "node:async_hooks": ">= 16", + buffer_ieee754: "< 0.9.7", + buffer: true, + "node:buffer": ">= 16", + child_process: true, + "node:child_process": ">= 16", + cluster: true, + "node:cluster": ">= 16", + console: true, + "node:console": ">= 16", + constants: true, + "node:constants": ">= 16", + crypto: true, + "node:crypto": ">= 16", + _debug_agent: ">= 1 && < 8", + _debugger: "< 8", + dgram: true, + "node:dgram": ">= 16", + diagnostics_channel: [">= 14.17 && < 15", ">= 15.1"], + "node:diagnostics_channel": ">= 16", + dns: true, + "node:dns": ">= 16", + "dns/promises": ">= 15", + "node:dns/promises": ">= 16", + domain: ">= 0.7.12", + "node:domain": ">= 16", + events: true, + "node:events": ">= 16", + freelist: "< 6", + fs: true, + "node:fs": ">= 16", + "fs/promises": [">= 10 && < 10.1", ">= 14"], + "node:fs/promises": ">= 16", + _http_agent: ">= 0.11.1", + "node:_http_agent": ">= 16", + _http_client: ">= 0.11.1", + "node:_http_client": ">= 16", + _http_common: ">= 0.11.1", + "node:_http_common": ">= 16", + _http_incoming: ">= 0.11.1", + "node:_http_incoming": ">= 16", + _http_outgoing: ">= 0.11.1", + "node:_http_outgoing": ">= 16", + _http_server: ">= 0.11.1", + "node:_http_server": ">= 16", + http: true, + "node:http": ">= 16", + http2: ">= 8.8", + "node:http2": ">= 16", + https: true, + "node:https": ">= 16", + inspector: ">= 8", + "node:inspector": ">= 16", + _linklist: "< 8", + module: true, + "node:module": ">= 16", + net: true, + "node:net": ">= 16", + "node-inspect/lib/_inspect": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12", + os: true, + "node:os": ">= 16", + path: true, + "node:path": ">= 16", + "path/posix": ">= 15.3", + "node:path/posix": ">= 16", + "path/win32": ">= 15.3", + "node:path/win32": ">= 16", + perf_hooks: ">= 8.5", + "node:perf_hooks": ">= 16", + process: ">= 1", + "node:process": ">= 16", + punycode: true, + "node:punycode": ">= 16", + querystring: true, + "node:querystring": ">= 16", + readline: true, + "node:readline": ">= 16", + repl: true, + "node:repl": ">= 16", + smalloc: ">= 0.11.5 && < 3", + _stream_duplex: ">= 0.9.4", + "node:_stream_duplex": ">= 16", + _stream_transform: ">= 0.9.4", + "node:_stream_transform": ">= 16", + _stream_wrap: ">= 1.4.1", + "node:_stream_wrap": ">= 16", + _stream_passthrough: ">= 0.9.4", + "node:_stream_passthrough": ">= 16", + _stream_readable: ">= 0.9.4", + "node:_stream_readable": ">= 16", + _stream_writable: ">= 0.9.4", + "node:_stream_writable": ">= 16", + stream: true, + "node:stream": ">= 16", + "stream/consumers": ">= 16.7", + "node:stream/consumers": ">= 16.7", + "stream/promises": ">= 15", + "node:stream/promises": ">= 16", + "stream/web": ">= 16.5", + "node:stream/web": ">= 16.5", + string_decoder: true, + "node:string_decoder": ">= 16", + sys: [">= 0.6 && < 0.7", ">= 0.8"], + "node:sys": ">= 16", + timers: true, + "node:timers": ">= 16", + "timers/promises": ">= 15", + "node:timers/promises": ">= 16", + _tls_common: ">= 0.11.13", + "node:_tls_common": ">= 16", + _tls_legacy: ">= 0.11.3 && < 10", + _tls_wrap: ">= 0.11.3", + "node:_tls_wrap": ">= 16", + tls: true, + "node:tls": ">= 16", + trace_events: ">= 10", + "node:trace_events": ">= 16", + tty: true, + "node:tty": ">= 16", + url: true, + "node:url": ">= 16", + util: true, + "node:util": ">= 16", + "util/types": ">= 15.3", + "node:util/types": ">= 16", + "v8/tools/arguments": ">= 10 && < 12", + "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"], + v8: ">= 1", + "node:v8": ">= 16", + vm: true, + "node:vm": ">= 16", + wasi: ">= 13.4 && < 13.5", + worker_threads: ">= 11.7", + "node:worker_threads": ">= 16", + zlib: true, + "node:zlib": ">= 16" + }; + } +}); + +// ../../node_modules/.pnpm/is-core-module@2.6.0/node_modules/is-core-module/index.js +var require_is_core_module = __commonJS({ + "../../node_modules/.pnpm/is-core-module@2.6.0/node_modules/is-core-module/index.js"(exports2, module2) { + "use strict"; + var has = require_src5(); + function specifierIncluded(current, specifier) { + var nodeParts = current.split("."); + var parts = specifier.split(" "); + var op = parts.length > 1 ? parts[0] : "="; + var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split("."); + for (var i = 0; i < 3; ++i) { + var cur = parseInt(nodeParts[i] || 0, 10); + var ver = parseInt(versionParts[i] || 0, 10); + if (cur === ver) { + continue; + } + if (op === "<") { + return cur < ver; + } + if (op === ">=") { + return cur >= ver; + } + return false; + } + return op === ">="; + } + function matchesRange(current, range) { + var specifiers = range.split(/ ?&& ?/); + if (specifiers.length === 0) { + return false; + } + for (var i = 0; i < specifiers.length; ++i) { + if (!specifierIncluded(current, specifiers[i])) { + return false; + } + } + return true; + } + function versionIncluded(nodeVersion, specifierValue) { + if (typeof specifierValue === "boolean") { + return specifierValue; + } + var current = typeof nodeVersion === "undefined" ? process.versions && process.versions.node : nodeVersion; + if (typeof current !== "string") { + throw new TypeError(typeof nodeVersion === "undefined" ? "Unable to determine current node version" : "If provided, a valid node version is required"); + } + if (specifierValue && typeof specifierValue === "object") { + for (var i = 0; i < specifierValue.length; ++i) { + if (matchesRange(current, specifierValue[i])) { + return true; + } + } + return false; + } + return matchesRange(current, specifierValue); + } + var data = require_core4(); + module2.exports = function isCore(x, nodeVersion) { + return has(data, x) && versionIncluded(nodeVersion, data[x]); + }; + } +}); + +// ../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/extract_description.js +var require_extract_description = __commonJS({ + "../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/extract_description.js"(exports2, module2) { + module2.exports = extractDescription; + function extractDescription(d) { + if (!d) { + return; + } + if (d === "ERROR: No README data found!") { + return; + } + d = d.trim().split("\n"); + for (var s = 0; d[s] && d[s].trim().match(/^(#|$)/); s++) { + ; + } + var l = d.length; + for (var e = s + 1; e < l && d[e].trim(); e++) { + ; + } + return d.slice(s, e).join(" ").trim(); + } + } +}); + +// ../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/typos.json +var require_typos = __commonJS({ + "../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/typos.json"(exports2, module2) { + module2.exports = { + topLevel: { + dependancies: "dependencies", + dependecies: "dependencies", + depdenencies: "dependencies", + devEependencies: "devDependencies", + depends: "dependencies", + "dev-dependencies": "devDependencies", + devDependences: "devDependencies", + devDepenencies: "devDependencies", + devdependencies: "devDependencies", + repostitory: "repository", + repo: "repository", + prefereGlobal: "preferGlobal", + hompage: "homepage", + hampage: "homepage", + autohr: "author", + autor: "author", + contributers: "contributors", + publicationConfig: "publishConfig", + script: "scripts" + }, + bugs: { web: "url", name: "url" }, + script: { server: "start", tests: "test" } + }; + } +}); + +// ../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/fixer.js +var require_fixer = __commonJS({ + "../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/fixer.js"(exports2, module2) { + var isValidSemver = require_valid(); + var cleanSemver = require_clean(); + var validateLicense = require_validate_npm_package_license(); + var hostedGitInfo = require_hosted_git_info(); + var isBuiltinModule = require_is_core_module(); + var depTypes = ["dependencies", "devDependencies", "optionalDependencies"]; + var extractDescription = require_extract_description(); + var url = require("url"); + var typos = require_typos(); + module2.exports = { + warn: function() { + }, + fixRepositoryField: function(data) { + if (data.repositories) { + this.warn("repositories"); + data.repository = data.repositories[0]; + } + if (!data.repository) { + return this.warn("missingRepository"); + } + if (typeof data.repository === "string") { + data.repository = { + type: "git", + url: data.repository + }; + } + var r = data.repository.url || ""; + if (r) { + var hosted = hostedGitInfo.fromUrl(r); + if (hosted) { + r = data.repository.url = hosted.getDefaultRepresentation() === "shortcut" ? hosted.https() : hosted.toString(); + } + } + if (r.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)) { + this.warn("brokenGitUrl", r); + } + }, + fixTypos: function(data) { + Object.keys(typos.topLevel).forEach(function(d) { + if (Object.prototype.hasOwnProperty.call(data, d)) { + this.warn("typo", d, typos.topLevel[d]); + } + }, this); + }, + fixScriptsField: function(data) { + if (!data.scripts) { + return; + } + if (typeof data.scripts !== "object") { + this.warn("nonObjectScripts"); + delete data.scripts; + return; + } + Object.keys(data.scripts).forEach(function(k) { + if (typeof data.scripts[k] !== "string") { + this.warn("nonStringScript"); + delete data.scripts[k]; + } else if (typos.script[k] && !data.scripts[typos.script[k]]) { + this.warn("typo", k, typos.script[k], "scripts"); + } + }, this); + }, + fixFilesField: function(data) { + var files = data.files; + if (files && !Array.isArray(files)) { + this.warn("nonArrayFiles"); + delete data.files; + } else if (data.files) { + data.files = data.files.filter(function(file) { + if (!file || typeof file !== "string") { + this.warn("invalidFilename", file); + return false; + } else { + return true; + } + }, this); + } + }, + fixBinField: function(data) { + if (!data.bin) { + return; + } + if (typeof data.bin === "string") { + var b = {}; + var match; + if (match = data.name.match(/^@[^/]+[/](.*)$/)) { + b[match[1]] = data.bin; + } else { + b[data.name] = data.bin; + } + data.bin = b; + } + }, + fixManField: function(data) { + if (!data.man) { + return; + } + if (typeof data.man === "string") { + data.man = [data.man]; + } + }, + fixBundleDependenciesField: function(data) { + var bdd = "bundledDependencies"; + var bd = "bundleDependencies"; + if (data[bdd] && !data[bd]) { + data[bd] = data[bdd]; + delete data[bdd]; + } + if (data[bd] && !Array.isArray(data[bd])) { + this.warn("nonArrayBundleDependencies"); + delete data[bd]; + } else if (data[bd]) { + data[bd] = data[bd].filter(function(bd2) { + if (!bd2 || typeof bd2 !== "string") { + this.warn("nonStringBundleDependency", bd2); + return false; + } else { + if (!data.dependencies) { + data.dependencies = {}; + } + if (Object.prototype.hasOwnProperty.call(data.dependencies, bd2)) { + this.warn("nonDependencyBundleDependency", bd2); + data.dependencies[bd2] = "*"; + } + return true; + } + }, this); + } + }, + fixDependencies: function(data, strict) { + objectifyDeps(data, this.warn); + addOptionalDepsToDeps(data, this.warn); + this.fixBundleDependenciesField(data); + ["dependencies", "devDependencies"].forEach(function(deps) { + if (!(deps in data)) { + return; + } + if (!data[deps] || typeof data[deps] !== "object") { + this.warn("nonObjectDependencies", deps); + delete data[deps]; + return; + } + Object.keys(data[deps]).forEach(function(d) { + var r = data[deps][d]; + if (typeof r !== "string") { + this.warn("nonStringDependency", d, JSON.stringify(r)); + delete data[deps][d]; + } + var hosted = hostedGitInfo.fromUrl(data[deps][d]); + if (hosted) { + data[deps][d] = hosted.toString(); + } + }, this); + }, this); + }, + fixModulesField: function(data) { + if (data.modules) { + this.warn("deprecatedModules"); + delete data.modules; + } + }, + fixKeywordsField: function(data) { + if (typeof data.keywords === "string") { + data.keywords = data.keywords.split(/,\s+/); + } + if (data.keywords && !Array.isArray(data.keywords)) { + delete data.keywords; + this.warn("nonArrayKeywords"); + } else if (data.keywords) { + data.keywords = data.keywords.filter(function(kw) { + if (typeof kw !== "string" || !kw) { + this.warn("nonStringKeyword"); + return false; + } else { + return true; + } + }, this); + } + }, + fixVersionField: function(data, strict) { + var loose = !strict; + if (!data.version) { + data.version = ""; + return true; + } + if (!isValidSemver(data.version, loose)) { + throw new Error('Invalid version: "' + data.version + '"'); + } + data.version = cleanSemver(data.version, loose); + return true; + }, + fixPeople: function(data) { + modifyPeople(data, unParsePerson); + modifyPeople(data, parsePerson); + }, + fixNameField: function(data, options) { + if (typeof options === "boolean") { + options = { strict: options }; + } else if (typeof options === "undefined") { + options = {}; + } + var strict = options.strict; + if (!data.name && !strict) { + data.name = ""; + return; + } + if (typeof data.name !== "string") { + throw new Error("name field must be a string."); + } + if (!strict) { + data.name = data.name.trim(); + } + ensureValidName(data.name, strict, options.allowLegacyCase); + if (isBuiltinModule(data.name)) { + this.warn("conflictingName", data.name); + } + }, + fixDescriptionField: function(data) { + if (data.description && typeof data.description !== "string") { + this.warn("nonStringDescription"); + delete data.description; + } + if (data.readme && !data.description) { + data.description = extractDescription(data.readme); + } + if (data.description === void 0) { + delete data.description; + } + if (!data.description) { + this.warn("missingDescription"); + } + }, + fixReadmeField: function(data) { + if (!data.readme) { + this.warn("missingReadme"); + data.readme = "ERROR: No README data found!"; + } + }, + fixBugsField: function(data) { + if (!data.bugs && data.repository && data.repository.url) { + var hosted = hostedGitInfo.fromUrl(data.repository.url); + if (hosted && hosted.bugs()) { + data.bugs = { url: hosted.bugs() }; + } + } else if (data.bugs) { + var emailRe = /^.+@.*\..+$/; + if (typeof data.bugs === "string") { + if (emailRe.test(data.bugs)) { + data.bugs = { email: data.bugs }; + } else if (url.parse(data.bugs).protocol) { + data.bugs = { url: data.bugs }; + } else { + this.warn("nonEmailUrlBugsString"); + } + } else { + bugsTypos(data.bugs, this.warn); + var oldBugs = data.bugs; + data.bugs = {}; + if (oldBugs.url) { + if (typeof oldBugs.url === "string" && url.parse(oldBugs.url).protocol) { + data.bugs.url = oldBugs.url; + } else { + this.warn("nonUrlBugsUrlField"); + } + } + if (oldBugs.email) { + if (typeof oldBugs.email === "string" && emailRe.test(oldBugs.email)) { + data.bugs.email = oldBugs.email; + } else { + this.warn("nonEmailBugsEmailField"); + } + } + } + if (!data.bugs.email && !data.bugs.url) { + delete data.bugs; + this.warn("emptyNormalizedBugs"); + } + } + }, + fixHomepageField: function(data) { + if (!data.homepage && data.repository && data.repository.url) { + var hosted = hostedGitInfo.fromUrl(data.repository.url); + if (hosted && hosted.docs()) { + data.homepage = hosted.docs(); + } + } + if (!data.homepage) { + return; + } + if (typeof data.homepage !== "string") { + this.warn("nonUrlHomepage"); + return delete data.homepage; + } + if (!url.parse(data.homepage).protocol) { + data.homepage = "http://" + data.homepage; + } + }, + fixLicenseField: function(data) { + const license = data.license || data.licence; + if (!license) { + return this.warn("missingLicense"); + } + if (typeof license !== "string" || license.length < 1 || license.trim() === "") { + return this.warn("invalidLicense"); + } + if (!validateLicense(license).validForNewPackages) { + return this.warn("invalidLicense"); + } + } + }; + function isValidScopedPackageName(spec) { + if (spec.charAt(0) !== "@") { + return false; + } + var rest = spec.slice(1).split("/"); + if (rest.length !== 2) { + return false; + } + return rest[0] && rest[1] && rest[0] === encodeURIComponent(rest[0]) && rest[1] === encodeURIComponent(rest[1]); + } + function isCorrectlyEncodedName(spec) { + return !spec.match(/[/@\s+%:]/) && spec === encodeURIComponent(spec); + } + function ensureValidName(name, strict, allowLegacyCase) { + if (name.charAt(0) === "." || !(isValidScopedPackageName(name) || isCorrectlyEncodedName(name)) || strict && !allowLegacyCase && name !== name.toLowerCase() || name.toLowerCase() === "node_modules" || name.toLowerCase() === "favicon.ico") { + throw new Error("Invalid name: " + JSON.stringify(name)); + } + } + function modifyPeople(data, fn2) { + if (data.author) { + data.author = fn2(data.author); + } + ["maintainers", "contributors"].forEach(function(set) { + if (!Array.isArray(data[set])) { + return; + } + data[set] = data[set].map(fn2); + }); + return data; + } + function unParsePerson(person) { + if (typeof person === "string") { + return person; + } + var name = person.name || ""; + var u = person.url || person.web; + var url2 = u ? " (" + u + ")" : ""; + var e = person.email || person.mail; + var email = e ? " <" + e + ">" : ""; + return name + email + url2; + } + function parsePerson(person) { + if (typeof person !== "string") { + return person; + } + var name = person.match(/^([^(<]+)/); + var url2 = person.match(/\(([^)]+)\)/); + var email = person.match(/<([^>]+)>/); + var obj = {}; + if (name && name[0].trim()) { + obj.name = name[0].trim(); + } + if (email) { + obj.email = email[1]; + } + if (url2) { + obj.url = url2[1]; + } + return obj; + } + function addOptionalDepsToDeps(data, warn) { + var o = data.optionalDependencies; + if (!o) { + return; + } + var d = data.dependencies || {}; + Object.keys(o).forEach(function(k) { + d[k] = o[k]; + }); + data.dependencies = d; + } + function depObjectify(deps, type, warn) { + if (!deps) { + return {}; + } + if (typeof deps === "string") { + deps = deps.trim().split(/[\n\r\s\t ,]+/); + } + if (!Array.isArray(deps)) { + return deps; + } + warn("deprecatedArrayDependencies", type); + var o = {}; + deps.filter(function(d) { + return typeof d === "string"; + }).forEach(function(d) { + d = d.trim().split(/(:?[@\s><=])/); + var dn = d.shift(); + var dv = d.join(""); + dv = dv.trim(); + dv = dv.replace(/^@/, ""); + o[dn] = dv; + }); + return o; + } + function objectifyDeps(data, warn) { + depTypes.forEach(function(type) { + if (!data[type]) { + return; + } + data[type] = depObjectify(data[type], type, warn); + }); + } + function bugsTypos(bugs, warn) { + if (!bugs) { + return; + } + Object.keys(bugs).forEach(function(k) { + if (typos.bugs[k]) { + warn("typo", k, typos.bugs[k], "bugs"); + bugs[typos.bugs[k]] = bugs[k]; + delete bugs[k]; + } + }); + } + } +}); + +// ../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/warning_messages.json +var require_warning_messages = __commonJS({ + "../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/warning_messages.json"(exports2, module2) { + module2.exports = { + repositories: "'repositories' (plural) Not supported. Please pick one as the 'repository' field", + missingRepository: "No repository field.", + brokenGitUrl: "Probably broken git url: %s", + nonObjectScripts: "scripts must be an object", + nonStringScript: "script values must be string commands", + nonArrayFiles: "Invalid 'files' member", + invalidFilename: "Invalid filename in 'files' list: %s", + nonArrayBundleDependencies: "Invalid 'bundleDependencies' list. Must be array of package names", + nonStringBundleDependency: "Invalid bundleDependencies member: %s", + nonDependencyBundleDependency: "Non-dependency in bundleDependencies: %s", + nonObjectDependencies: "%s field must be an object", + nonStringDependency: "Invalid dependency: %s %s", + deprecatedArrayDependencies: "specifying %s as array is deprecated", + deprecatedModules: "modules field is deprecated", + nonArrayKeywords: "keywords should be an array of strings", + nonStringKeyword: "keywords should be an array of strings", + conflictingName: "%s is also the name of a node core module.", + nonStringDescription: "'description' field should be a string", + missingDescription: "No description", + missingReadme: "No README data", + missingLicense: "No license field.", + nonEmailUrlBugsString: "Bug string field must be url, email, or {email,url}", + nonUrlBugsUrlField: "bugs.url field must be a string url. Deleted.", + nonEmailBugsEmailField: "bugs.email field must be a string email. Deleted.", + emptyNormalizedBugs: "Normalized value of bugs field is an empty object. Deleted.", + nonUrlHomepage: "homepage field must be a string url. Deleted.", + invalidLicense: "license should be a valid SPDX license expression", + typo: "%s should probably be %s." + }; + } +}); + +// ../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/make_warning.js +var require_make_warning = __commonJS({ + "../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/make_warning.js"(exports2, module2) { + var util = require("util"); + var messages = require_warning_messages(); + module2.exports = function() { + var args2 = Array.prototype.slice.call(arguments, 0); + var warningName = args2.shift(); + if (warningName === "typo") { + return makeTypoWarning.apply(null, args2); + } else { + var msgTemplate = messages[warningName] ? messages[warningName] : warningName + ": '%s'"; + args2.unshift(msgTemplate); + return util.format.apply(null, args2); + } + }; + function makeTypoWarning(providedName, probableName, field) { + if (field) { + providedName = field + "['" + providedName + "']"; + probableName = field + "['" + probableName + "']"; + } + return util.format(messages.typo, providedName, probableName); + } + } +}); + +// ../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/normalize.js +var require_normalize = __commonJS({ + "../../node_modules/.pnpm/normalize-package-data@3.0.3/node_modules/normalize-package-data/lib/normalize.js"(exports2, module2) { + module2.exports = normalize; + var fixer = require_fixer(); + normalize.fixer = fixer; + var makeWarning = require_make_warning(); + var fieldsToFix = [ + "name", + "version", + "description", + "repository", + "modules", + "scripts", + "files", + "bin", + "man", + "bugs", + "keywords", + "readme", + "homepage", + "license" + ]; + var otherThingsToFix = ["dependencies", "people", "typos"]; + var thingsToFix = fieldsToFix.map(function(fieldName) { + return ucFirst(fieldName) + "Field"; + }); + thingsToFix = thingsToFix.concat(otherThingsToFix); + function normalize(data, warn, strict) { + if (warn === true) { + warn = null; + strict = true; + } + if (!strict) { + strict = false; + } + if (!warn || data.private) { + warn = function(msg) { + }; + } + if (data.scripts && data.scripts.install === "node-gyp rebuild" && !data.scripts.preinstall) { + data.gypfile = true; + } + fixer.warn = function() { + warn(makeWarning.apply(null, arguments)); + }; + thingsToFix.forEach(function(thingName) { + fixer["fix" + ucFirst(thingName)](data, strict); + }); + data._id = data.name + "@" + data.version; + } + function ucFirst(string) { + return string.charAt(0).toUpperCase() + string.slice(1); + } + } +}); + +// ../read-package-json/lib/index.js +var require_lib32 = __commonJS({ + "../read-package-json/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.safeReadPackageFromDir = exports2.safeReadPackage = exports2.fromDir = void 0; + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var load_json_file_1 = __importDefault(require_load_json_file()); + var normalize_package_data_1 = __importDefault(require_normalize()); + async function readPkg(pkgPath) { + try { + const manifest = await load_json_file_1.default(pkgPath); + normalize_package_data_1.default(manifest); + return manifest; + } catch (err) { + if (err.code) + throw err; + throw new error_1.default("BAD_PACKAGE_JSON", `${pkgPath}: ${err.message}`); + } + } + exports2.default = readPkg; + async function fromDir(pkgPath) { + return readPkg(path_1.default.join(pkgPath, "package.json")); + } + exports2.fromDir = fromDir; + async function safeReadPackage(pkgPath) { + try { + return await readPkg(pkgPath); + } catch (err) { + if (err.code !== "ENOENT") + throw err; + return null; + } + } + exports2.safeReadPackage = safeReadPackage; + async function safeReadPackageFromDir(pkgPath) { + return safeReadPackage(path_1.default.join(pkgPath, "package.json")); + } + exports2.safeReadPackageFromDir = safeReadPackageFromDir; + } +}); + +// ../../node_modules/.pnpm/mimic-fn@3.1.0/node_modules/mimic-fn/index.js +var require_mimic_fn2 = __commonJS({ + "../../node_modules/.pnpm/mimic-fn@3.1.0/node_modules/mimic-fn/index.js"(exports2, module2) { + "use strict"; + var copyProperty = (to, from, property, ignoreNonConfigurable) => { + if (property === "length" || property === "prototype") { + return; + } + if (property === "arguments" || property === "caller") { + return; + } + const toDescriptor = Object.getOwnPropertyDescriptor(to, property); + const fromDescriptor = Object.getOwnPropertyDescriptor(from, property); + if (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) { + return; + } + Object.defineProperty(to, property, fromDescriptor); + }; + var canCopyProperty = function(toDescriptor, fromDescriptor) { + return toDescriptor === void 0 || toDescriptor.configurable || toDescriptor.writable === fromDescriptor.writable && toDescriptor.enumerable === fromDescriptor.enumerable && toDescriptor.configurable === fromDescriptor.configurable && (toDescriptor.writable || toDescriptor.value === fromDescriptor.value); + }; + var changePrototype = (to, from) => { + const fromPrototype = Object.getPrototypeOf(from); + if (fromPrototype === Object.getPrototypeOf(to)) { + return; + } + Object.setPrototypeOf(to, fromPrototype); + }; + var wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/ +${fromBody}`; + var toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, "toString"); + var toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, "name"); + var changeToString = (to, from, name) => { + const withName = name === "" ? "" : `with ${name.trim()}() `; + const newToString = wrappedToString.bind(null, withName, from.toString()); + Object.defineProperty(newToString, "name", toStringName); + Object.defineProperty(to, "toString", { ...toStringDescriptor, value: newToString }); + }; + var mimicFn = (to, from, { ignoreNonConfigurable = false } = {}) => { + const { name } = to; + for (const property of Reflect.ownKeys(from)) { + copyProperty(to, from, property, ignoreNonConfigurable); + } + changePrototype(to, from); + changeToString(to, from, name); + return to; + }; + module2.exports = mimicFn; + } +}); + +// ../../node_modules/.pnpm/p-defer@1.0.0/node_modules/p-defer/index.js +var require_p_defer = __commonJS({ + "../../node_modules/.pnpm/p-defer@1.0.0/node_modules/p-defer/index.js"(exports2, module2) { + "use strict"; + module2.exports = () => { + const ret = {}; + ret.promise = new Promise((resolve, reject) => { + ret.resolve = resolve; + ret.reject = reject; + }); + return ret; + }; + } +}); + +// ../../node_modules/.pnpm/map-age-cleaner@0.1.3/node_modules/map-age-cleaner/dist/index.js +var require_dist7 = __commonJS({ + "../../node_modules/.pnpm/map-age-cleaner@0.1.3/node_modules/map-age-cleaner/dist/index.js"(exports2, module2) { + "use strict"; + var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : new P(function(resolve2) { + resolve2(result.value); + }).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var p_defer_1 = __importDefault(require_p_defer()); + function mapAgeCleaner(map, property = "maxAge") { + let processingKey; + let processingTimer; + let processingDeferred; + const cleanup = () => __awaiter(this, void 0, void 0, function* () { + if (processingKey !== void 0) { + return; + } + const setupTimer = (item) => __awaiter(this, void 0, void 0, function* () { + processingDeferred = p_defer_1.default(); + const delay = item[1][property] - Date.now(); + if (delay <= 0) { + map.delete(item[0]); + processingDeferred.resolve(); + return; + } + processingKey = item[0]; + processingTimer = setTimeout(() => { + map.delete(item[0]); + if (processingDeferred) { + processingDeferred.resolve(); + } + }, delay); + if (typeof processingTimer.unref === "function") { + processingTimer.unref(); + } + return processingDeferred.promise; + }); + try { + for (const entry of map) { + yield setupTimer(entry); + } + } catch (_a) { + } + processingKey = void 0; + }); + const reset = () => { + processingKey = void 0; + if (processingTimer !== void 0) { + clearTimeout(processingTimer); + processingTimer = void 0; + } + if (processingDeferred !== void 0) { + processingDeferred.reject(void 0); + processingDeferred = void 0; + } + }; + const originalSet = map.set.bind(map); + map.set = (key, value) => { + if (map.has(key)) { + map.delete(key); + } + const result = originalSet(key, value); + if (processingKey && processingKey === key) { + reset(); + } + cleanup(); + return result; + }; + cleanup(); + return map; + } + exports2.default = mapAgeCleaner; + module2.exports = mapAgeCleaner; + module2.exports.default = mapAgeCleaner; + } +}); + +// ../../node_modules/.pnpm/mem@8.1.1/node_modules/mem/dist/index.js +var require_dist8 = __commonJS({ + "../../node_modules/.pnpm/mem@8.1.1/node_modules/mem/dist/index.js"(exports2, module2) { + "use strict"; + var mimicFn = require_mimic_fn2(); + var mapAgeCleaner = require_dist7(); + var decoratorInstanceMap = new WeakMap(); + var cacheStore = new WeakMap(); + var mem = (fn2, { cacheKey, cache = new Map(), maxAge } = {}) => { + if (typeof maxAge === "number") { + mapAgeCleaner(cache); + } + const memoized = function(...arguments_) { + const key = cacheKey ? cacheKey(arguments_) : arguments_[0]; + const cacheItem = cache.get(key); + if (cacheItem) { + return cacheItem.data; + } + const result = fn2.apply(this, arguments_); + cache.set(key, { + data: result, + maxAge: maxAge ? Date.now() + maxAge : Number.POSITIVE_INFINITY + }); + return result; + }; + mimicFn(memoized, fn2, { + ignoreNonConfigurable: true + }); + cacheStore.set(memoized, cache); + return memoized; + }; + mem.decorator = (options = {}) => (target, propertyKey, descriptor) => { + const input = target[propertyKey]; + if (typeof input !== "function") { + throw new TypeError("The decorated value must be a function"); + } + delete descriptor.value; + delete descriptor.writable; + descriptor.get = function() { + if (!decoratorInstanceMap.has(this)) { + const value = mem(input, options); + decoratorInstanceMap.set(this, value); + return value; + } + return decoratorInstanceMap.get(this); + }; + }; + mem.clear = (fn2) => { + const cache = cacheStore.get(fn2); + if (!cache) { + throw new TypeError("Can't clear a function that was not memoized!"); + } + if (typeof cache.clear !== "function") { + throw new TypeError("The cache Map can't be cleared!"); + } + cache.clear(); + }; + module2.exports = mem; + } +}); + +// ../../node_modules/.pnpm/encode-registry@3.0.0/node_modules/encode-registry/index.js +var require_encode_registry = __commonJS({ + "../../node_modules/.pnpm/encode-registry@3.0.0/node_modules/encode-registry/index.js"(exports2, module2) { + "use strict"; + var assert = require("assert"); + var { URL: URL2 } = require("url"); + var mem = require_dist8(); + module2.exports = mem(encodeRegistry); + function encodeRegistry(registry) { + assert(registry, "`registry` is required"); + assert(typeof registry === "string", "`registry` should be a string"); + const host = getHost(registry); + return escapeHost(host); + } + function escapeHost(host) { + return host.replace(":", "+"); + } + function getHost(rawUrl) { + const urlObj = new URL2(rawUrl); + if (!urlObj || !urlObj.host) { + throw new Error(`Couldn't get host from ${rawUrl}`); + } + return urlObj.host; + } + } +}); + +// ../dependency-path/lib/index.js +var require_lib33 = __commonJS({ + "../dependency-path/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.depPathToFilename = exports2.parse = exports2.refToRelative = exports2.relative = exports2.getRegistryByPackageName = exports2.refToAbsolute = exports2.tryGetPackageId = exports2.resolve = exports2.isAbsolute = void 0; + var crypto_1 = __importDefault(require("crypto")); + var path_1 = __importDefault(require("path")); + var encode_registry_1 = __importDefault(require_encode_registry()); + var normalize_path_1 = __importDefault(require_normalize_path()); + var semver_1 = __importDefault(require_semver2()); + function isAbsolute(dependencyPath) { + return dependencyPath[0] !== "/"; + } + exports2.isAbsolute = isAbsolute; + function resolve(registries, resolutionLocation) { + if (!isAbsolute(resolutionLocation)) { + let registryUrl; + if (resolutionLocation[1] === "@") { + const scope = resolutionLocation.substr(1, resolutionLocation.indexOf("/", 1) - 1); + registryUrl = registries[scope] || registries.default; + } else { + registryUrl = registries.default; + } + const registryDirectory = encode_registry_1.default(registryUrl); + return `${registryDirectory}${resolutionLocation}`; + } + return resolutionLocation; + } + exports2.resolve = resolve; + function tryGetPackageId(registries, relDepPath) { + if (relDepPath[0] !== "/") { + return null; + } + const underscoreIndex = relDepPath.indexOf("_", relDepPath.lastIndexOf("/")); + if (underscoreIndex !== -1) { + return resolve(registries, relDepPath.substr(0, underscoreIndex)); + } + return resolve(registries, relDepPath); + } + exports2.tryGetPackageId = tryGetPackageId; + function refToAbsolute(reference, pkgName, registries) { + if (reference.startsWith("link:")) { + return null; + } + if (!reference.includes("/")) { + const registryName2 = encode_registry_1.default(getRegistryByPackageName(registries, pkgName)); + return `${registryName2}/${pkgName}/${reference}`; + } + if (reference[0] !== "/") + return reference; + const registryName = encode_registry_1.default(getRegistryByPackageName(registries, pkgName)); + return `${registryName}${reference}`; + } + exports2.refToAbsolute = refToAbsolute; + function getRegistryByPackageName(registries, packageName) { + if (packageName[0] !== "@") + return registries.default; + const scope = packageName.substr(0, packageName.indexOf("/")); + return registries[scope] || registries.default; + } + exports2.getRegistryByPackageName = getRegistryByPackageName; + function relative2(registries, packageName, absoluteResolutionLoc) { + const registryName = encode_registry_1.default(getRegistryByPackageName(registries, packageName)); + if (absoluteResolutionLoc.startsWith(`${registryName}/`)) { + return absoluteResolutionLoc.substr(absoluteResolutionLoc.indexOf("/")); + } + return absoluteResolutionLoc; + } + exports2.relative = relative2; + function refToRelative(reference, pkgName) { + if (reference.startsWith("link:")) { + return null; + } + if (reference.startsWith("file:")) { + return reference; + } + if (!reference.includes("/")) { + return `/${pkgName}/${reference}`; + } + return reference; + } + exports2.refToRelative = refToRelative; + function parse(dependencyPath) { + if (typeof dependencyPath !== "string") { + throw new TypeError(`Expected \`dependencyPath\` to be of type \`string\`, got \`${dependencyPath === null ? "null" : typeof dependencyPath}\``); + } + const _isAbsolute = isAbsolute(dependencyPath); + const parts = dependencyPath.split("/"); + if (!_isAbsolute) + parts.shift(); + const host = _isAbsolute ? parts.shift() : void 0; + const name = parts[0].startsWith("@") ? `${parts.shift()}/${parts.shift()}` : parts.shift(); + let version = parts.shift(); + if (version) { + const underscoreIndex = version.indexOf("_"); + let peersSuffix; + if (underscoreIndex !== -1) { + peersSuffix = version.substring(underscoreIndex + 1); + version = version.substring(0, underscoreIndex); + } + if (semver_1.default.valid(version)) { + return { + host, + isAbsolute: _isAbsolute, + name, + peersSuffix, + version + }; + } + } + if (!_isAbsolute) + throw new Error(`${dependencyPath} is an invalid relative dependency path`); + return { + host, + isAbsolute: _isAbsolute + }; + } + exports2.parse = parse; + function depPathToFilename(depPath, lockfileDir) { + const filename = depPathToFilenameUnescaped(depPath, lockfileDir).replace(/\//g, "+"); + if (filename.length > 120 || filename !== filename.toLowerCase() && !filename.startsWith("local+")) { + return `${filename.substring(0, 50)}_${crypto_1.default.createHash("md5").update(filename).digest("hex")}`; + } + return filename; + } + exports2.depPathToFilename = depPathToFilename; + function depPathToFilenameUnescaped(depPath, lockfileDir) { + if (depPath.indexOf("file:") !== 0) { + if (depPath.startsWith("/")) { + depPath = depPath.substring(1); + } + const index = depPath.lastIndexOf("/"); + return `${depPath.substring(0, index)}@${depPath.substr(index + 1)}`; + } + const absolutePath = normalize_path_1.default(path_1.default.join(lockfileDir, depPath.slice(5))); + return `local+${absolutePath.replace(":", "+")}`; + } + } +}); + +// ../../node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js +var require_eventemitter3 = __commonJS({ + "../../node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js"(exports2, module2) { + "use strict"; + var has = Object.prototype.hasOwnProperty; + var prefix = "~"; + function Events() { + } + if (Object.create) { + Events.prototype = Object.create(null); + if (!new Events().__proto__) + prefix = false; + } + function EE(fn2, context, once) { + this.fn = fn2; + this.context = context; + this.once = once || false; + } + function addListener(emitter, event, fn2, context, once) { + if (typeof fn2 !== "function") { + throw new TypeError("The listener must be a function"); + } + var listener = new EE(fn2, context || emitter, once), evt = prefix ? prefix + event : event; + if (!emitter._events[evt]) + emitter._events[evt] = listener, emitter._eventsCount++; + else if (!emitter._events[evt].fn) + emitter._events[evt].push(listener); + else + emitter._events[evt] = [emitter._events[evt], listener]; + return emitter; + } + function clearEvent(emitter, evt) { + if (--emitter._eventsCount === 0) + emitter._events = new Events(); + else + delete emitter._events[evt]; + } + function EventEmitter() { + this._events = new Events(); + this._eventsCount = 0; + } + EventEmitter.prototype.eventNames = function eventNames() { + var names = [], events, name; + if (this._eventsCount === 0) + return names; + for (name in events = this._events) { + if (has.call(events, name)) + names.push(prefix ? name.slice(1) : name); + } + if (Object.getOwnPropertySymbols) { + return names.concat(Object.getOwnPropertySymbols(events)); + } + return names; + }; + EventEmitter.prototype.listeners = function listeners(event) { + var evt = prefix ? prefix + event : event, handlers = this._events[evt]; + if (!handlers) + return []; + if (handlers.fn) + return [handlers.fn]; + for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) { + ee[i] = handlers[i].fn; + } + return ee; + }; + EventEmitter.prototype.listenerCount = function listenerCount(event) { + var evt = prefix ? prefix + event : event, listeners = this._events[evt]; + if (!listeners) + return 0; + if (listeners.fn) + return 1; + return listeners.length; + }; + EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { + var evt = prefix ? prefix + event : event; + if (!this._events[evt]) + return false; + var listeners = this._events[evt], len = arguments.length, args2, i; + if (listeners.fn) { + if (listeners.once) + this.removeListener(event, listeners.fn, void 0, true); + switch (len) { + case 1: + return listeners.fn.call(listeners.context), true; + case 2: + return listeners.fn.call(listeners.context, a1), true; + case 3: + return listeners.fn.call(listeners.context, a1, a2), true; + case 4: + return listeners.fn.call(listeners.context, a1, a2, a3), true; + case 5: + return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; + case 6: + return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; + } + for (i = 1, args2 = new Array(len - 1); i < len; i++) { + args2[i - 1] = arguments[i]; + } + listeners.fn.apply(listeners.context, args2); + } else { + var length = listeners.length, j; + for (i = 0; i < length; i++) { + if (listeners[i].once) + this.removeListener(event, listeners[i].fn, void 0, true); + switch (len) { + case 1: + listeners[i].fn.call(listeners[i].context); + break; + case 2: + listeners[i].fn.call(listeners[i].context, a1); + break; + case 3: + listeners[i].fn.call(listeners[i].context, a1, a2); + break; + case 4: + listeners[i].fn.call(listeners[i].context, a1, a2, a3); + break; + default: + if (!args2) + for (j = 1, args2 = new Array(len - 1); j < len; j++) { + args2[j - 1] = arguments[j]; + } + listeners[i].fn.apply(listeners[i].context, args2); + } + } + } + return true; + }; + EventEmitter.prototype.on = function on(event, fn2, context) { + return addListener(this, event, fn2, context, false); + }; + EventEmitter.prototype.once = function once(event, fn2, context) { + return addListener(this, event, fn2, context, true); + }; + EventEmitter.prototype.removeListener = function removeListener(event, fn2, context, once) { + var evt = prefix ? prefix + event : event; + if (!this._events[evt]) + return this; + if (!fn2) { + clearEvent(this, evt); + return this; + } + var listeners = this._events[evt]; + if (listeners.fn) { + if (listeners.fn === fn2 && (!once || listeners.once) && (!context || listeners.context === context)) { + clearEvent(this, evt); + } + } else { + for (var i = 0, events = [], length = listeners.length; i < length; i++) { + if (listeners[i].fn !== fn2 || once && !listeners[i].once || context && listeners[i].context !== context) { + events.push(listeners[i]); + } + } + if (events.length) + this._events[evt] = events.length === 1 ? events[0] : events; + else + clearEvent(this, evt); + } + return this; + }; + EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { + var evt; + if (event) { + evt = prefix ? prefix + event : event; + if (this._events[evt]) + clearEvent(this, evt); + } else { + this._events = new Events(); + this._eventsCount = 0; + } + return this; + }; + EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + EventEmitter.prototype.addListener = EventEmitter.prototype.on; + EventEmitter.prefixed = prefix; + EventEmitter.EventEmitter = EventEmitter; + if (typeof module2 !== "undefined") { + module2.exports = EventEmitter; + } + } +}); + +// ../../node_modules/.pnpm/p-finally@1.0.0/node_modules/p-finally/index.js +var require_p_finally = __commonJS({ + "../../node_modules/.pnpm/p-finally@1.0.0/node_modules/p-finally/index.js"(exports2, module2) { + "use strict"; + module2.exports = (promise, onFinally) => { + onFinally = onFinally || (() => { + }); + return promise.then((val) => new Promise((resolve) => { + resolve(onFinally()); + }).then(() => val), (err) => new Promise((resolve) => { + resolve(onFinally()); + }).then(() => { + throw err; + })); + }; + } +}); + +// ../../node_modules/.pnpm/p-timeout@3.2.0/node_modules/p-timeout/index.js +var require_p_timeout = __commonJS({ + "../../node_modules/.pnpm/p-timeout@3.2.0/node_modules/p-timeout/index.js"(exports2, module2) { + "use strict"; + var pFinally = require_p_finally(); + var TimeoutError = class extends Error { + constructor(message2) { + super(message2); + this.name = "TimeoutError"; + } + }; + var pTimeout = (promise, milliseconds, fallback) => new Promise((resolve, reject) => { + if (typeof milliseconds !== "number" || milliseconds < 0) { + throw new TypeError("Expected `milliseconds` to be a positive number"); + } + if (milliseconds === Infinity) { + resolve(promise); + return; + } + const timer = setTimeout(() => { + if (typeof fallback === "function") { + try { + resolve(fallback()); + } catch (error) { + reject(error); + } + return; + } + const message2 = typeof fallback === "string" ? fallback : `Promise timed out after ${milliseconds} milliseconds`; + const timeoutError = fallback instanceof Error ? fallback : new TimeoutError(message2); + if (typeof promise.cancel === "function") { + promise.cancel(); + } + reject(timeoutError); + }, milliseconds); + pFinally(promise.then(resolve, reject), () => { + clearTimeout(timer); + }); + }); + module2.exports = pTimeout; + module2.exports.default = pTimeout; + module2.exports.TimeoutError = TimeoutError; + } +}); + +// ../../node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/lower-bound.js +var require_lower_bound = __commonJS({ + "../../node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/lower-bound.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function lowerBound(array, value, comparator) { + let first = 0; + let count = array.length; + while (count > 0) { + const step = count / 2 | 0; + let it = first + step; + if (comparator(array[it], value) <= 0) { + first = ++it; + count -= step + 1; + } else { + count = step; + } + } + return first; + } + exports2.default = lowerBound; + } +}); + +// ../../node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/priority-queue.js +var require_priority_queue = __commonJS({ + "../../node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/priority-queue.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var lower_bound_1 = require_lower_bound(); + var PriorityQueue = class { + constructor() { + this._queue = []; + } + enqueue(run, options) { + options = Object.assign({ priority: 0 }, options); + const element = { + priority: options.priority, + run + }; + if (this.size && this._queue[this.size - 1].priority >= options.priority) { + this._queue.push(element); + return; + } + const index = lower_bound_1.default(this._queue, element, (a, b) => b.priority - a.priority); + this._queue.splice(index, 0, element); + } + dequeue() { + const item = this._queue.shift(); + return item === null || item === void 0 ? void 0 : item.run; + } + filter(options) { + return this._queue.filter((element) => element.priority === options.priority).map((element) => element.run); + } + get size() { + return this._queue.length; + } + }; + exports2.default = PriorityQueue; + } +}); + +// ../../node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.js +var require_dist9 = __commonJS({ + "../../node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var EventEmitter = require_eventemitter3(); + var p_timeout_1 = require_p_timeout(); + var priority_queue_1 = require_priority_queue(); + var empty = () => { + }; + var timeoutError = new p_timeout_1.TimeoutError(); + var PQueue = class extends EventEmitter { + constructor(options) { + var _a, _b, _c, _d; + super(); + this._intervalCount = 0; + this._intervalEnd = 0; + this._pendingCount = 0; + this._resolveEmpty = empty; + this._resolveIdle = empty; + options = Object.assign({ carryoverConcurrencyCount: false, intervalCap: Infinity, interval: 0, concurrency: Infinity, autoStart: true, queueClass: priority_queue_1.default }, options); + if (!(typeof options.intervalCap === "number" && options.intervalCap >= 1)) { + throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(_b = (_a = options.intervalCap) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ""}\` (${typeof options.intervalCap})`); + } + if (options.interval === void 0 || !(Number.isFinite(options.interval) && options.interval >= 0)) { + throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(_d = (_c = options.interval) === null || _c === void 0 ? void 0 : _c.toString()) !== null && _d !== void 0 ? _d : ""}\` (${typeof options.interval})`); + } + this._carryoverConcurrencyCount = options.carryoverConcurrencyCount; + this._isIntervalIgnored = options.intervalCap === Infinity || options.interval === 0; + this._intervalCap = options.intervalCap; + this._interval = options.interval; + this._queue = new options.queueClass(); + this._queueClass = options.queueClass; + this.concurrency = options.concurrency; + this._timeout = options.timeout; + this._throwOnTimeout = options.throwOnTimeout === true; + this._isPaused = options.autoStart === false; + } + get _doesIntervalAllowAnother() { + return this._isIntervalIgnored || this._intervalCount < this._intervalCap; + } + get _doesConcurrentAllowAnother() { + return this._pendingCount < this._concurrency; + } + _next() { + this._pendingCount--; + this._tryToStartAnother(); + this.emit("next"); + } + _resolvePromises() { + this._resolveEmpty(); + this._resolveEmpty = empty; + if (this._pendingCount === 0) { + this._resolveIdle(); + this._resolveIdle = empty; + this.emit("idle"); + } + } + _onResumeInterval() { + this._onInterval(); + this._initializeIntervalIfNeeded(); + this._timeoutId = void 0; + } + _isIntervalPaused() { + const now = Date.now(); + if (this._intervalId === void 0) { + const delay = this._intervalEnd - now; + if (delay < 0) { + this._intervalCount = this._carryoverConcurrencyCount ? this._pendingCount : 0; + } else { + if (this._timeoutId === void 0) { + this._timeoutId = setTimeout(() => { + this._onResumeInterval(); + }, delay); + } + return true; + } + } + return false; + } + _tryToStartAnother() { + if (this._queue.size === 0) { + if (this._intervalId) { + clearInterval(this._intervalId); + } + this._intervalId = void 0; + this._resolvePromises(); + return false; + } + if (!this._isPaused) { + const canInitializeInterval = !this._isIntervalPaused(); + if (this._doesIntervalAllowAnother && this._doesConcurrentAllowAnother) { + const job = this._queue.dequeue(); + if (!job) { + return false; + } + this.emit("active"); + job(); + if (canInitializeInterval) { + this._initializeIntervalIfNeeded(); + } + return true; + } + } + return false; + } + _initializeIntervalIfNeeded() { + if (this._isIntervalIgnored || this._intervalId !== void 0) { + return; + } + this._intervalId = setInterval(() => { + this._onInterval(); + }, this._interval); + this._intervalEnd = Date.now() + this._interval; + } + _onInterval() { + if (this._intervalCount === 0 && this._pendingCount === 0 && this._intervalId) { + clearInterval(this._intervalId); + this._intervalId = void 0; + } + this._intervalCount = this._carryoverConcurrencyCount ? this._pendingCount : 0; + this._processQueue(); + } + _processQueue() { + while (this._tryToStartAnother()) { + } + } + get concurrency() { + return this._concurrency; + } + set concurrency(newConcurrency) { + if (!(typeof newConcurrency === "number" && newConcurrency >= 1)) { + throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${newConcurrency}\` (${typeof newConcurrency})`); + } + this._concurrency = newConcurrency; + this._processQueue(); + } + async add(fn2, options = {}) { + return new Promise((resolve, reject) => { + const run = async () => { + this._pendingCount++; + this._intervalCount++; + try { + const operation = this._timeout === void 0 && options.timeout === void 0 ? fn2() : p_timeout_1.default(Promise.resolve(fn2()), options.timeout === void 0 ? this._timeout : options.timeout, () => { + if (options.throwOnTimeout === void 0 ? this._throwOnTimeout : options.throwOnTimeout) { + reject(timeoutError); + } + return void 0; + }); + resolve(await operation); + } catch (error) { + reject(error); + } + this._next(); + }; + this._queue.enqueue(run, options); + this._tryToStartAnother(); + this.emit("add"); + }); + } + async addAll(functions, options) { + return Promise.all(functions.map(async (function_) => this.add(function_, options))); + } + start() { + if (!this._isPaused) { + return this; + } + this._isPaused = false; + this._processQueue(); + return this; + } + pause() { + this._isPaused = true; + } + clear() { + this._queue = new this._queueClass(); + } + async onEmpty() { + if (this._queue.size === 0) { + return; + } + return new Promise((resolve) => { + const existingResolve = this._resolveEmpty; + this._resolveEmpty = () => { + existingResolve(); + resolve(); + }; + }); + } + async onIdle() { + if (this._pendingCount === 0 && this._queue.size === 0) { + return; + } + return new Promise((resolve) => { + const existingResolve = this._resolveIdle; + this._resolveIdle = () => { + existingResolve(); + resolve(); + }; + }); + } + get size() { + return this._queue.size; + } + sizeBy(options) { + return this._queue.filter(options).length; + } + get pending() { + return this._pendingCount; + } + get isPaused() { + return this._isPaused; + } + get timeout() { + return this._timeout; + } + set timeout(milliseconds) { + this._timeout = milliseconds; + } + }; + exports2.default = PQueue; + } +}); + +// ../../node_modules/.pnpm/p-defer@3.0.0/node_modules/p-defer/index.js +var require_p_defer2 = __commonJS({ + "../../node_modules/.pnpm/p-defer@3.0.0/node_modules/p-defer/index.js"(exports2, module2) { + "use strict"; + var pDefer = () => { + const deferred = {}; + deferred.promise = new Promise((resolve, reject) => { + deferred.resolve = resolve; + deferred.reject = reject; + }); + return deferred; + }; + module2.exports = pDefer; + } +}); + +// ../../node_modules/.pnpm/p-reflect@2.1.0/node_modules/p-reflect/index.js +var require_p_reflect = __commonJS({ + "../../node_modules/.pnpm/p-reflect@2.1.0/node_modules/p-reflect/index.js"(exports2, module2) { + "use strict"; + var pReflect = async (promise) => { + try { + const value = await promise; + return { + isFulfilled: true, + isRejected: false, + value + }; + } catch (error) { + return { + isFulfilled: false, + isRejected: true, + reason: error + }; + } + }; + module2.exports = pReflect; + module2.exports.default = pReflect; + } +}); + +// ../../node_modules/.pnpm/promise-share@1.0.0/node_modules/promise-share/index.js +var require_promise_share = __commonJS({ + "../../node_modules/.pnpm/promise-share@1.0.0/node_modules/promise-share/index.js"(exports2, module2) { + "use strict"; + var pReflect = require_p_reflect(); + module2.exports = function pShare(p) { + const reflected = pReflect(p); + return async () => { + const reflection = await reflected; + if (reflection.isRejected) + throw reflection.reason; + return reflection.value; + }; + }; + } +}); + +// ../package-requester/lib/safeDeferredPromise.js +var require_safeDeferredPromise = __commonJS({ + "../package-requester/lib/safeDeferredPromise.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var promise_share_1 = __importDefault(require_promise_share()); + function safeDeferredPromise() { + let _resolve; + let _reject; + const promiseFn = promise_share_1.default(new Promise((resolve, reject) => { + _resolve = resolve; + _reject = reject; + })); + return Object.assign(promiseFn, { resolve: _resolve, reject: _reject }); + } + exports2.default = safeDeferredPromise; + } +}); + +// ../package-requester/lib/packageRequester.js +var require_packageRequester = __commonJS({ + "../package-requester/lib/packageRequester.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var cafs_1 = require_lib31(); + var core_loggers_1 = require_lib12(); + var error_1 = __importDefault(require_lib8()); + var graceful_fs_1 = __importDefault(require_lib18()); + var logger_1 = __importDefault(require_lib6()); + var package_is_installable_1 = __importDefault(require_lib13()); + var read_package_json_1 = __importDefault(require_lib32()); + var dependency_path_1 = require_lib33(); + var p_queue_1 = __importDefault(require_dist9()); + var load_json_file_1 = __importDefault(require_load_json_file()); + var p_defer_1 = __importDefault(require_p_defer2()); + var path_temp_1 = __importDefault(require_path_temp()); + var promise_share_1 = __importDefault(require_promise_share()); + var pick_1 = __importDefault(require_pick()); + var rename_overwrite_1 = __importDefault(require_rename_overwrite()); + var ssri_1 = __importDefault(require_ssri()); + var safeDeferredPromise_1 = __importDefault(require_safeDeferredPromise()); + var TARBALL_INTEGRITY_FILENAME = "tarball-integrity"; + var packageRequestLogger = logger_1.default("package-requester"); + var pickBundledManifest = pick_1.default([ + "bin", + "bundledDependencies", + "bundleDependencies", + "dependencies", + "directories", + "engines", + "name", + "optionalDependencies", + "os", + "peerDependencies", + "peerDependenciesMeta", + "scripts", + "version" + ]); + function default_1(opts) { + var _a; + opts = opts || {}; + const networkConcurrency = (_a = opts.networkConcurrency) !== null && _a !== void 0 ? _a : 16; + const requestsQueue = new p_queue_1.default({ + concurrency: networkConcurrency + }); + requestsQueue["counter"] = 0; + requestsQueue["concurrency"] = networkConcurrency; + const cafsDir = path_1.default.join(opts.storeDir, "files"); + const getFilePathInCafs = cafs_1.getFilePathInCafs.bind(null, cafsDir); + const fetch = fetcher.bind(null, opts.fetchers, opts.cafs); + const fetchPackageToStore = fetchToStore.bind(null, { + checkFilesIntegrity: cafs_1.checkFilesIntegrity.bind(null, cafsDir), + fetch, + fetchingLocker: new Map(), + getFilePathByModeInCafs: cafs_1.getFilePathByModeInCafs.bind(null, cafsDir), + getFilePathInCafs, + requestsQueue, + storeDir: opts.storeDir, + verifyStoreIntegrity: opts.verifyStoreIntegrity + }); + const requestPackage = resolveAndFetch.bind(null, { + engineStrict: opts.engineStrict, + nodeVersion: opts.nodeVersion, + pnpmVersion: opts.pnpmVersion, + force: opts.force, + fetchPackageToStore, + requestsQueue, + resolve: opts.resolve, + storeDir: opts.storeDir, + verifyStoreIntegrity: opts.verifyStoreIntegrity + }); + return Object.assign(requestPackage, { fetchPackageToStore, requestPackage }); + } + exports2.default = default_1; + async function resolveAndFetch(ctx, wantedDependency, options) { + var _a, _b, _c, _d, _e, _f; + let latest; + let manifest; + let normalizedPref; + let resolution = (_a = options.currentPkg) === null || _a === void 0 ? void 0 : _a.resolution; + let pkgId = (_b = options.currentPkg) === null || _b === void 0 ? void 0 : _b.id; + const skipResolution = resolution && !options.update; + let forceFetch = false; + let updated = false; + let resolvedVia; + if (!skipResolution || options.skipFetch === true || Boolean(pkgId === null || pkgId === void 0 ? void 0 : pkgId.startsWith("file:")) || wantedDependency.optional === true) { + const resolveResult = await ctx.requestsQueue.add(async () => ctx.resolve(wantedDependency, { + alwaysTryWorkspacePackages: options.alwaysTryWorkspacePackages, + defaultTag: options.defaultTag, + lockfileDir: options.lockfileDir, + preferredVersions: options.preferredVersions, + preferWorkspacePackages: options.preferWorkspacePackages, + projectDir: options.projectDir, + registry: options.registry, + workspacePackages: options.workspacePackages + }), { priority: options.downloadPriority }); + manifest = resolveResult.manifest; + latest = resolveResult.latest; + resolvedVia = resolveResult.resolvedVia; + forceFetch = Boolean(((_c = options.currentPkg) === null || _c === void 0 ? void 0 : _c.resolution) != null && (pkgId === null || pkgId === void 0 ? void 0 : pkgId.startsWith("file:")) && ((_d = options.currentPkg) === null || _d === void 0 ? void 0 : _d.resolution["integrity"]) !== resolveResult.resolution["integrity"]); + updated = pkgId !== resolveResult.id || !resolution || forceFetch; + resolution = resolveResult.resolution; + pkgId = resolveResult.id; + normalizedPref = resolveResult.normalizedPref; + } + const id = pkgId; + if (resolution.type === "directory") { + if (manifest == null) { + throw new Error(`Couldn't read package.json of local dependency ${wantedDependency.alias ? wantedDependency.alias + "@" : ""}${(_e = wantedDependency.pref) !== null && _e !== void 0 ? _e : ""}`); + } + return { + body: { + id, + isLocal: true, + manifest, + normalizedPref, + resolution, + resolvedVia, + updated + } + }; + } + const isInstallable = ctx.force === true || (manifest == null ? void 0 : package_is_installable_1.default(id, manifest, { + engineStrict: ctx.engineStrict, + lockfileDir: options.lockfileDir, + nodeVersion: ctx.nodeVersion, + optional: wantedDependency.optional === true, + pnpmVersion: ctx.pnpmVersion + })); + if ((options.skipFetch === true || isInstallable === false) && manifest != null) { + return { + body: { + id, + isLocal: false, + isInstallable: isInstallable !== null && isInstallable !== void 0 ? isInstallable : void 0, + latest, + manifest, + normalizedPref, + resolution, + resolvedVia, + updated + } + }; + } + const fetchResult = ctx.fetchPackageToStore({ + fetchRawManifest: true, + force: forceFetch, + lockfileDir: options.lockfileDir, + pkg: { + ...pick_1.default(["name", "version"], (_f = manifest !== null && manifest !== void 0 ? manifest : options.currentPkg) !== null && _f !== void 0 ? _f : {}), + id, + resolution + } + }); + return { + body: { + id, + isLocal: false, + isInstallable: isInstallable !== null && isInstallable !== void 0 ? isInstallable : void 0, + latest, + manifest, + normalizedPref, + resolution, + resolvedVia, + updated + }, + bundledManifest: fetchResult.bundledManifest, + files: fetchResult.files, + filesIndexFile: fetchResult.filesIndexFile, + finishing: fetchResult.finishing + }; + } + function fetchToStore(ctx, opts) { + const targetRelative = dependency_path_1.depPathToFilename(opts.pkg.id, opts.lockfileDir); + const target = path_1.default.join(ctx.storeDir, targetRelative); + if (!ctx.fetchingLocker.has(opts.pkg.id)) { + const bundledManifest = p_defer_1.default(); + const files = p_defer_1.default(); + const finishing = p_defer_1.default(); + const filesIndexFile = opts.pkg.resolution["integrity"] ? ctx.getFilePathInCafs(opts.pkg.resolution["integrity"], "index") : path_1.default.join(target, "integrity.json"); + doFetchToStore(filesIndexFile, bundledManifest, files, finishing); + if (opts.fetchRawManifest) { + ctx.fetchingLocker.set(opts.pkg.id, { + bundledManifest: removeKeyOnFail(bundledManifest.promise), + files: removeKeyOnFail(files.promise), + filesIndexFile, + finishing: removeKeyOnFail(finishing.promise) + }); + } else { + ctx.fetchingLocker.set(opts.pkg.id, { + files: removeKeyOnFail(files.promise), + filesIndexFile, + finishing: removeKeyOnFail(finishing.promise) + }); + } + files.promise.then((cache) => { + if (cache.fromStore) { + return; + } + const tmp = ctx.fetchingLocker.get(opts.pkg.id); + if (tmp == null) + return; + ctx.fetchingLocker.set(opts.pkg.id, { + ...tmp, + files: Promise.resolve({ + ...cache, + fromStore: true + }) + }); + }).catch(() => { + ctx.fetchingLocker.delete(opts.pkg.id); + }); + } + const result = ctx.fetchingLocker.get(opts.pkg.id); + if (opts.fetchRawManifest && result.bundledManifest == null) { + result.bundledManifest = removeKeyOnFail(result.files.then(async ({ filesIndex }) => { + const { integrity, mode } = filesIndex["package.json"]; + const manifestPath = ctx.getFilePathByModeInCafs(integrity, mode); + return readBundledManifest(manifestPath); + })); + } + return { + bundledManifest: result.bundledManifest != null ? promise_share_1.default(result.bundledManifest) : void 0, + files: promise_share_1.default(result.files), + filesIndexFile: result.filesIndexFile, + finishing: promise_share_1.default(result.finishing) + }; + async function removeKeyOnFail(p) { + try { + return await p; + } catch (err) { + ctx.fetchingLocker.delete(opts.pkg.id); + throw err; + } + } + async function doFetchToStore(filesIndexFile, bundledManifest, files, finishing) { + try { + const isLocalTarballDep = opts.pkg.id.startsWith("file:"); + if (!opts.force && (!isLocalTarballDep || await tarballIsUpToDate(opts.pkg.resolution, target, opts.lockfileDir))) { + let pkgFilesIndex; + try { + pkgFilesIndex = await load_json_file_1.default(filesIndexFile); + } catch (err) { + } + if ((pkgFilesIndex === null || pkgFilesIndex === void 0 ? void 0 : pkgFilesIndex.files) != null) { + const manifest = opts.fetchRawManifest ? safeDeferredPromise_1.default() : void 0; + if (pkgFilesIndex.name != null && opts.pkg.name != null && pkgFilesIndex.name !== opts.pkg.name || pkgFilesIndex.version != null && opts.pkg.version != null && pkgFilesIndex.version !== opts.pkg.version) { + throw new error_1.default("UNEXPECTED_PKG_CONTENT_IN_STORE", `Package name mismatch found while reading ${JSON.stringify(opts.pkg.resolution)} from the store. This means that the lockfile is broken. Expected package: ${opts.pkg.name}@${opts.pkg.version}. Actual package in the store by the given integrity: ${pkgFilesIndex.name}@${pkgFilesIndex.version}.`); + } + const verified = await ctx.checkFilesIntegrity(pkgFilesIndex.files, manifest); + if (verified) { + files.resolve({ + filesIndex: pkgFilesIndex.files, + fromStore: true, + sideEffects: pkgFilesIndex.sideEffects + }); + if (manifest != null) { + manifest().then((manifest2) => bundledManifest.resolve(pickBundledManifest(manifest2))).catch(bundledManifest.reject); + } + finishing.resolve(void 0); + return; + } + packageRequestLogger.warn({ + message: `Refetching ${target} to store. It was either modified or had no integrity checksums`, + prefix: opts.lockfileDir + }); + } + } + const priority = (++ctx.requestsQueue["counter"] % ctx.requestsQueue["concurrency"] === 0 ? -1 : 1) * 1e3; + const fetchManifest = opts.fetchRawManifest ? safeDeferredPromise_1.default() : void 0; + if (fetchManifest != null) { + fetchManifest().then((manifest) => bundledManifest.resolve(pickBundledManifest(manifest))).catch(bundledManifest.reject); + } + const fetchedPackage = await ctx.requestsQueue.add(async () => ctx.fetch(opts.pkg.id, opts.pkg.resolution, { + lockfileDir: opts.lockfileDir, + manifest: fetchManifest, + onProgress: (downloaded) => { + core_loggers_1.fetchingProgressLogger.debug({ + downloaded, + packageId: opts.pkg.id, + status: "in_progress" + }); + }, + onStart: (size, attempt) => { + core_loggers_1.fetchingProgressLogger.debug({ + attempt, + packageId: opts.pkg.id, + size, + status: "started" + }); + } + }), { priority }); + const filesIndex = fetchedPackage.filesIndex; + const integrity = {}; + await Promise.all(Object.keys(filesIndex).map(async (filename) => { + const { checkedAt, integrity: fileIntegrity } = await filesIndex[filename].writeResult; + integrity[filename] = { + checkedAt, + integrity: fileIntegrity.toString(), + mode: filesIndex[filename].mode, + size: filesIndex[filename].size + }; + })); + await writeJsonFile(filesIndexFile, { + name: opts.pkg.name, + version: opts.pkg.version, + files: integrity + }); + if (isLocalTarballDep && opts.pkg.resolution["integrity"]) { + await fs_1.promises.mkdir(target, { recursive: true }); + await graceful_fs_1.default.writeFile(path_1.default.join(target, TARBALL_INTEGRITY_FILENAME), opts.pkg.resolution["integrity"], "utf8"); + } + files.resolve({ + filesIndex: integrity, + fromStore: false + }); + finishing.resolve(void 0); + } catch (err) { + files.reject(err); + if (opts.fetchRawManifest) { + bundledManifest.reject(err); + } + } + } + } + async function writeJsonFile(filePath, data) { + const targetDir = path_1.default.dirname(filePath); + await fs_1.promises.mkdir(targetDir, { recursive: true }); + const temp = path_temp_1.default(targetDir); + await graceful_fs_1.default.writeFile(temp, JSON.stringify(data)); + await rename_overwrite_1.default(temp, filePath); + } + async function readBundledManifest(pkgJsonPath) { + return pickBundledManifest(await read_package_json_1.default(pkgJsonPath)); + } + async function tarballIsUpToDate(resolution, pkgInStoreLocation, lockfileDir) { + let currentIntegrity; + try { + currentIntegrity = await graceful_fs_1.default.readFile(path_1.default.join(pkgInStoreLocation, TARBALL_INTEGRITY_FILENAME), "utf8"); + } catch (err) { + return false; + } + if (resolution.integrity && currentIntegrity !== resolution.integrity) + return false; + const tarball = path_1.default.join(lockfileDir, resolution.tarball.slice(5)); + const tarballStream = fs_1.createReadStream(tarball); + try { + return Boolean(await ssri_1.default.checkStream(tarballStream, currentIntegrity)); + } catch (err) { + return false; + } + } + async function fetcher(fetcherByHostingType, cafs, packageId, resolution, opts) { + var _a, _b; + const fetch = fetcherByHostingType[(_a = resolution.type) !== null && _a !== void 0 ? _a : "tarball"]; + if (!fetch) { + throw new Error(`Fetching for dependency type "${(_b = resolution.type) !== null && _b !== void 0 ? _b : "undefined"}" is not supported`); + } + try { + return await fetch(cafs, resolution, opts); + } catch (err) { + packageRequestLogger.warn({ + message: `Fetching ${packageId} failed!`, + prefix: opts.lockfileDir + }); + throw err; + } + } + } +}); + +// ../package-requester/lib/index.js +var require_lib34 = __commonJS({ + "../package-requester/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var packageRequester_1 = __importDefault(require_packageRequester()); + exports2.default = packageRequester_1.default; + } +}); + +// ../../node_modules/.pnpm/semver@6.3.0/node_modules/semver/semver.js +var require_semver3 = __commonJS({ + "../../node_modules/.pnpm/semver@6.3.0/node_modules/semver/semver.js"(exports2, module2) { + exports2 = module2.exports = SemVer; + var debug; + if (typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function() { + var args2 = Array.prototype.slice.call(arguments, 0); + args2.unshift("SEMVER"); + console.log.apply(console, args2); + }; + } else { + debug = function() { + }; + } + exports2.SEMVER_SPEC_VERSION = "2.0.0"; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; + var MAX_SAFE_COMPONENT_LENGTH = 16; + var re = exports2.re = []; + var src = exports2.src = []; + var t = exports2.tokens = {}; + var R = 0; + function tok(n) { + t[n] = R++; + } + tok("NUMERICIDENTIFIER"); + src[t.NUMERICIDENTIFIER] = "0|[1-9]\\d*"; + tok("NUMERICIDENTIFIERLOOSE"); + src[t.NUMERICIDENTIFIERLOOSE] = "[0-9]+"; + tok("NONNUMERICIDENTIFIER"); + src[t.NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-][a-zA-Z0-9-]*"; + tok("MAINVERSION"); + src[t.MAINVERSION] = "(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")"; + tok("MAINVERSIONLOOSE"); + src[t.MAINVERSIONLOOSE] = "(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")"; + tok("PRERELEASEIDENTIFIER"); + src[t.PRERELEASEIDENTIFIER] = "(?:" + src[t.NUMERICIDENTIFIER] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; + tok("PRERELEASEIDENTIFIERLOOSE"); + src[t.PRERELEASEIDENTIFIERLOOSE] = "(?:" + src[t.NUMERICIDENTIFIERLOOSE] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; + tok("PRERELEASE"); + src[t.PRERELEASE] = "(?:-(" + src[t.PRERELEASEIDENTIFIER] + "(?:\\." + src[t.PRERELEASEIDENTIFIER] + ")*))"; + tok("PRERELEASELOOSE"); + src[t.PRERELEASELOOSE] = "(?:-?(" + src[t.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t.PRERELEASEIDENTIFIERLOOSE] + ")*))"; + tok("BUILDIDENTIFIER"); + src[t.BUILDIDENTIFIER] = "[0-9A-Za-z-]+"; + tok("BUILD"); + src[t.BUILD] = "(?:\\+(" + src[t.BUILDIDENTIFIER] + "(?:\\." + src[t.BUILDIDENTIFIER] + ")*))"; + tok("FULL"); + tok("FULLPLAIN"); + src[t.FULLPLAIN] = "v?" + src[t.MAINVERSION] + src[t.PRERELEASE] + "?" + src[t.BUILD] + "?"; + src[t.FULL] = "^" + src[t.FULLPLAIN] + "$"; + tok("LOOSEPLAIN"); + src[t.LOOSEPLAIN] = "[v=\\s]*" + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + "?" + src[t.BUILD] + "?"; + tok("LOOSE"); + src[t.LOOSE] = "^" + src[t.LOOSEPLAIN] + "$"; + tok("GTLT"); + src[t.GTLT] = "((?:<|>)?=?)"; + tok("XRANGEIDENTIFIERLOOSE"); + src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*"; + tok("XRANGEIDENTIFIER"); + src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + "|x|X|\\*"; + tok("XRANGEPLAIN"); + src[t.XRANGEPLAIN] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:" + src[t.PRERELEASE] + ")?" + src[t.BUILD] + "?)?)?"; + tok("XRANGEPLAINLOOSE"); + src[t.XRANGEPLAINLOOSE] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:" + src[t.PRERELEASELOOSE] + ")?" + src[t.BUILD] + "?)?)?"; + tok("XRANGE"); + src[t.XRANGE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAIN] + "$"; + tok("XRANGELOOSE"); + src[t.XRANGELOOSE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAINLOOSE] + "$"; + tok("COERCE"); + src[t.COERCE] = "(^|[^\\d])(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:$|[^\\d])"; + tok("COERCERTL"); + re[t.COERCERTL] = new RegExp(src[t.COERCE], "g"); + tok("LONETILDE"); + src[t.LONETILDE] = "(?:~>?)"; + tok("TILDETRIM"); + src[t.TILDETRIM] = "(\\s*)" + src[t.LONETILDE] + "\\s+"; + re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], "g"); + var tildeTrimReplace = "$1~"; + tok("TILDE"); + src[t.TILDE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAIN] + "$"; + tok("TILDELOOSE"); + src[t.TILDELOOSE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + "$"; + tok("LONECARET"); + src[t.LONECARET] = "(?:\\^)"; + tok("CARETTRIM"); + src[t.CARETTRIM] = "(\\s*)" + src[t.LONECARET] + "\\s+"; + re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], "g"); + var caretTrimReplace = "$1^"; + tok("CARET"); + src[t.CARET] = "^" + src[t.LONECARET] + src[t.XRANGEPLAIN] + "$"; + tok("CARETLOOSE"); + src[t.CARETLOOSE] = "^" + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + "$"; + tok("COMPARATORLOOSE"); + src[t.COMPARATORLOOSE] = "^" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + ")$|^$"; + tok("COMPARATOR"); + src[t.COMPARATOR] = "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$"; + tok("COMPARATORTRIM"); + src[t.COMPARATORTRIM] = "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")"; + re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], "g"); + var comparatorTrimReplace = "$1$2$3"; + tok("HYPHENRANGE"); + src[t.HYPHENRANGE] = "^\\s*(" + src[t.XRANGEPLAIN] + ")\\s+-\\s+(" + src[t.XRANGEPLAIN] + ")\\s*$"; + tok("HYPHENRANGELOOSE"); + src[t.HYPHENRANGELOOSE] = "^\\s*(" + src[t.XRANGEPLAINLOOSE] + ")\\s+-\\s+(" + src[t.XRANGEPLAINLOOSE] + ")\\s*$"; + tok("STAR"); + src[t.STAR] = "(<|>)?=?\\s*\\*"; + for (i = 0; i < R; i++) { + debug(i, src[i]); + if (!re[i]) { + re[i] = new RegExp(src[i]); + } + } + var i; + exports2.parse = parse; + function parse(version, options) { + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + if (version instanceof SemVer) { + return version; + } + if (typeof version !== "string") { + return null; + } + if (version.length > MAX_LENGTH) { + return null; + } + var r = options.loose ? re[t.LOOSE] : re[t.FULL]; + if (!r.test(version)) { + return null; + } + try { + return new SemVer(version, options); + } catch (er) { + return null; + } + } + exports2.valid = valid; + function valid(version, options) { + var v = parse(version, options); + return v ? v.version : null; + } + exports2.clean = clean; + function clean(version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ""), options); + return s ? s.version : null; + } + exports2.SemVer = SemVer; + function SemVer(version, options) { + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + if (version instanceof SemVer) { + if (version.loose === options.loose) { + return version; + } else { + version = version.version; + } + } else if (typeof version !== "string") { + throw new TypeError("Invalid Version: " + version); + } + if (version.length > MAX_LENGTH) { + throw new TypeError("version is longer than " + MAX_LENGTH + " characters"); + } + if (!(this instanceof SemVer)) { + return new SemVer(version, options); + } + debug("SemVer", version, options); + this.options = options; + this.loose = !!options.loose; + var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); + if (!m) { + throw new TypeError("Invalid Version: " + version); + } + this.raw = version; + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError("Invalid major version"); + } + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError("Invalid minor version"); + } + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError("Invalid patch version"); + } + if (!m[4]) { + this.prerelease = []; + } else { + this.prerelease = m[4].split(".").map(function(id) { + if (/^[0-9]+$/.test(id)) { + var num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num; + } + } + return id; + }); + } + this.build = m[5] ? m[5].split(".") : []; + this.format(); + } + SemVer.prototype.format = function() { + this.version = this.major + "." + this.minor + "." + this.patch; + if (this.prerelease.length) { + this.version += "-" + this.prerelease.join("."); + } + return this.version; + }; + SemVer.prototype.toString = function() { + return this.version; + }; + SemVer.prototype.compare = function(other) { + debug("SemVer.compare", this.version, this.options, other); + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + return this.compareMain(other) || this.comparePre(other); + }; + SemVer.prototype.compareMain = function(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); + }; + SemVer.prototype.comparePre = function(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + if (this.prerelease.length && !other.prerelease.length) { + return -1; + } else if (!this.prerelease.length && other.prerelease.length) { + return 1; + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0; + } + var i2 = 0; + do { + var a = this.prerelease[i2]; + var b = other.prerelease[i2]; + debug("prerelease compare", i2, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i2); + }; + SemVer.prototype.compareBuild = function(other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options); + } + var i2 = 0; + do { + var a = this.build[i2]; + var b = other.build[i2]; + debug("prerelease compare", i2, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i2); + }; + SemVer.prototype.inc = function(release, identifier) { + switch (release) { + case "premajor": + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc("pre", identifier); + break; + case "preminor": + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc("pre", identifier); + break; + case "prepatch": + this.prerelease.length = 0; + this.inc("patch", identifier); + this.inc("pre", identifier); + break; + case "prerelease": + if (this.prerelease.length === 0) { + this.inc("patch", identifier); + } + this.inc("pre", identifier); + break; + case "major": + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { + this.major++; + } + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case "minor": + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++; + } + this.patch = 0; + this.prerelease = []; + break; + case "patch": + if (this.prerelease.length === 0) { + this.patch++; + } + this.prerelease = []; + break; + case "pre": + if (this.prerelease.length === 0) { + this.prerelease = [0]; + } else { + var i2 = this.prerelease.length; + while (--i2 >= 0) { + if (typeof this.prerelease[i2] === "number") { + this.prerelease[i2]++; + i2 = -2; + } + } + if (i2 === -1) { + this.prerelease.push(0); + } + } + if (identifier) { + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0]; + } + } else { + this.prerelease = [identifier, 0]; + } + } + break; + default: + throw new Error("invalid increment argument: " + release); + } + this.format(); + this.raw = this.version; + return this; + }; + exports2.inc = inc; + function inc(version, release, loose, identifier) { + if (typeof loose === "string") { + identifier = loose; + loose = void 0; + } + try { + return new SemVer(version, loose).inc(release, identifier).version; + } catch (er) { + return null; + } + } + exports2.diff = diff; + function diff(version1, version2) { + if (eq(version1, version2)) { + return null; + } else { + var v1 = parse(version1); + var v2 = parse(version2); + var prefix = ""; + if (v1.prerelease.length || v2.prerelease.length) { + prefix = "pre"; + var defaultResult = "prerelease"; + } + for (var key in v1) { + if (key === "major" || key === "minor" || key === "patch") { + if (v1[key] !== v2[key]) { + return prefix + key; + } + } + } + return defaultResult; + } + } + exports2.compareIdentifiers = compareIdentifiers; + var numeric = /^[0-9]+$/; + function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); + if (anum && bnum) { + a = +a; + b = +b; + } + return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; + } + exports2.rcompareIdentifiers = rcompareIdentifiers; + function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); + } + exports2.major = major; + function major(a, loose) { + return new SemVer(a, loose).major; + } + exports2.minor = minor; + function minor(a, loose) { + return new SemVer(a, loose).minor; + } + exports2.patch = patch; + function patch(a, loose) { + return new SemVer(a, loose).patch; + } + exports2.compare = compare; + function compare(a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)); + } + exports2.compareLoose = compareLoose; + function compareLoose(a, b) { + return compare(a, b, true); + } + exports2.compareBuild = compareBuild; + function compareBuild(a, b, loose) { + var versionA = new SemVer(a, loose); + var versionB = new SemVer(b, loose); + return versionA.compare(versionB) || versionA.compareBuild(versionB); + } + exports2.rcompare = rcompare; + function rcompare(a, b, loose) { + return compare(b, a, loose); + } + exports2.sort = sort; + function sort(list, loose) { + return list.sort(function(a, b) { + return exports2.compareBuild(a, b, loose); + }); + } + exports2.rsort = rsort; + function rsort(list, loose) { + return list.sort(function(a, b) { + return exports2.compareBuild(b, a, loose); + }); + } + exports2.gt = gt; + function gt(a, b, loose) { + return compare(a, b, loose) > 0; + } + exports2.lt = lt; + function lt(a, b, loose) { + return compare(a, b, loose) < 0; + } + exports2.eq = eq; + function eq(a, b, loose) { + return compare(a, b, loose) === 0; + } + exports2.neq = neq; + function neq(a, b, loose) { + return compare(a, b, loose) !== 0; + } + exports2.gte = gte; + function gte(a, b, loose) { + return compare(a, b, loose) >= 0; + } + exports2.lte = lte; + function lte(a, b, loose) { + return compare(a, b, loose) <= 0; + } + exports2.cmp = cmp; + function cmp(a, op, b, loose) { + switch (op) { + case "===": + if (typeof a === "object") + a = a.version; + if (typeof b === "object") + b = b.version; + return a === b; + case "!==": + if (typeof a === "object") + a = a.version; + if (typeof b === "object") + b = b.version; + return a !== b; + case "": + case "=": + case "==": + return eq(a, b, loose); + case "!=": + return neq(a, b, loose); + case ">": + return gt(a, b, loose); + case ">=": + return gte(a, b, loose); + case "<": + return lt(a, b, loose); + case "<=": + return lte(a, b, loose); + default: + throw new TypeError("Invalid operator: " + op); + } + } + exports2.Comparator = Comparator; + function Comparator(comp, options) { + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp; + } else { + comp = comp.value; + } + } + if (!(this instanceof Comparator)) { + return new Comparator(comp, options); + } + debug("comparator", comp, options); + this.options = options; + this.loose = !!options.loose; + this.parse(comp); + if (this.semver === ANY) { + this.value = ""; + } else { + this.value = this.operator + this.semver.version; + } + debug("comp", this); + } + var ANY = {}; + Comparator.prototype.parse = function(comp) { + var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; + var m = comp.match(r); + if (!m) { + throw new TypeError("Invalid comparator: " + comp); + } + this.operator = m[1] !== void 0 ? m[1] : ""; + if (this.operator === "=") { + this.operator = ""; + } + if (!m[2]) { + this.semver = ANY; + } else { + this.semver = new SemVer(m[2], this.options.loose); + } + }; + Comparator.prototype.toString = function() { + return this.value; + }; + Comparator.prototype.test = function(version) { + debug("Comparator.test", version, this.options.loose); + if (this.semver === ANY || version === ANY) { + return true; + } + if (typeof version === "string") { + try { + version = new SemVer(version, this.options); + } catch (er) { + return false; + } + } + return cmp(version, this.operator, this.semver, this.options); + }; + Comparator.prototype.intersects = function(comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError("a Comparator is required"); + } + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + var rangeTmp; + if (this.operator === "") { + if (this.value === "") { + return true; + } + rangeTmp = new Range(comp.value, options); + return satisfies(this.value, rangeTmp, options); + } else if (comp.operator === "") { + if (comp.value === "") { + return true; + } + rangeTmp = new Range(this.value, options); + return satisfies(comp.semver, rangeTmp, options); + } + var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">"); + var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<"); + var sameSemVer = this.semver.version === comp.semver.version; + var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<="); + var oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && ((this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<")); + var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && ((this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">")); + return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; + }; + exports2.Range = Range; + function Range(range, options) { + if (!options || typeof options !== "object") { + options = { + loose: !!options, + includePrerelease: false + }; + } + if (range instanceof Range) { + if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { + return range; + } else { + return new Range(range.raw, options); + } + } + if (range instanceof Comparator) { + return new Range(range.value, options); + } + if (!(this instanceof Range)) { + return new Range(range, options); + } + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + this.raw = range; + this.set = range.split(/\s*\|\|\s*/).map(function(range2) { + return this.parseRange(range2.trim()); + }, this).filter(function(c) { + return c.length; + }); + if (!this.set.length) { + throw new TypeError("Invalid SemVer Range: " + range); + } + this.format(); + } + Range.prototype.format = function() { + this.range = this.set.map(function(comps) { + return comps.join(" ").trim(); + }).join("||").trim(); + return this.range; + }; + Range.prototype.toString = function() { + return this.range; + }; + Range.prototype.parseRange = function(range) { + var loose = this.options.loose; + range = range.trim(); + var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + debug("hyphen replace", range); + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); + debug("comparator trim", range, re[t.COMPARATORTRIM]); + range = range.replace(re[t.TILDETRIM], tildeTrimReplace); + range = range.replace(re[t.CARETTRIM], caretTrimReplace); + range = range.split(/\s+/).join(" "); + var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; + var set = range.split(" ").map(function(comp) { + return parseComparator(comp, this.options); + }, this).join(" ").split(/\s+/); + if (this.options.loose) { + set = set.filter(function(comp) { + return !!comp.match(compRe); + }); + } + set = set.map(function(comp) { + return new Comparator(comp, this.options); + }, this); + return set; + }; + Range.prototype.intersects = function(range, options) { + if (!(range instanceof Range)) { + throw new TypeError("a Range is required"); + } + return this.set.some(function(thisComparators) { + return isSatisfiable(thisComparators, options) && range.set.some(function(rangeComparators) { + return isSatisfiable(rangeComparators, options) && thisComparators.every(function(thisComparator) { + return rangeComparators.every(function(rangeComparator) { + return thisComparator.intersects(rangeComparator, options); + }); + }); + }); + }); + }; + function isSatisfiable(comparators, options) { + var result = true; + var remainingComparators = comparators.slice(); + var testComparator = remainingComparators.pop(); + while (result && remainingComparators.length) { + result = remainingComparators.every(function(otherComparator) { + return testComparator.intersects(otherComparator, options); + }); + testComparator = remainingComparators.pop(); + } + return result; + } + exports2.toComparators = toComparators; + function toComparators(range, options) { + return new Range(range, options).set.map(function(comp) { + return comp.map(function(c) { + return c.value; + }).join(" ").trim().split(" "); + }); + } + function parseComparator(comp, options) { + debug("comp", comp, options); + comp = replaceCarets(comp, options); + debug("caret", comp); + comp = replaceTildes(comp, options); + debug("tildes", comp); + comp = replaceXRanges(comp, options); + debug("xrange", comp); + comp = replaceStars(comp, options); + debug("stars", comp); + return comp; + } + function isX(id) { + return !id || id.toLowerCase() === "x" || id === "*"; + } + function replaceTildes(comp, options) { + return comp.trim().split(/\s+/).map(function(comp2) { + return replaceTilde(comp2, options); + }).join(" "); + } + function replaceTilde(comp, options) { + var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; + return comp.replace(r, function(_, M, m, p, pr) { + debug("tilde", comp, _, M, m, p, pr); + var ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; + } else if (isX(p)) { + ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; + } else if (pr) { + debug("replaceTilde pr", pr); + ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; + } else { + ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; + } + debug("tilde return", ret); + return ret; + }); + } + function replaceCarets(comp, options) { + return comp.trim().split(/\s+/).map(function(comp2) { + return replaceCaret(comp2, options); + }).join(" "); + } + function replaceCaret(comp, options) { + debug("caret", comp, options); + var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; + return comp.replace(r, function(_, M, m, p, pr) { + debug("caret", comp, _, M, m, p, pr); + var ret; + if (isX(M)) { + ret = ""; + } else if (isX(m)) { + ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; + } else if (isX(p)) { + if (M === "0") { + ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; + } else { + ret = ">=" + M + "." + m + ".0 <" + (+M + 1) + ".0.0"; + } + } else if (pr) { + debug("replaceCaret pr", pr); + if (M === "0") { + if (m === "0") { + ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1); + } else { + ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; + } + } else { + ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0"; + } + } else { + debug("no pr"); + if (M === "0") { + if (m === "0") { + ret = ">=" + M + "." + m + "." + p + " <" + M + "." + m + "." + (+p + 1); + } else { + ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; + } + } else { + ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0"; + } + } + debug("caret return", ret); + return ret; + }); + } + function replaceXRanges(comp, options) { + debug("replaceXRanges", comp, options); + return comp.split(/\s+/).map(function(comp2) { + return replaceXRange(comp2, options); + }).join(" "); + } + function replaceXRange(comp, options) { + comp = comp.trim(); + var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; + return comp.replace(r, function(ret, gtlt, M, m, p, pr) { + debug("xRange", comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + if (gtlt === "=" && anyX) { + gtlt = ""; + } + pr = options.includePrerelease ? "-0" : ""; + if (xM) { + if (gtlt === ">" || gtlt === "<") { + ret = "<0.0.0-0"; + } else { + ret = "*"; + } + } else if (gtlt && anyX) { + if (xm) { + m = 0; + } + p = 0; + if (gtlt === ">") { + gtlt = ">="; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else { + m = +m + 1; + p = 0; + } + } else if (gtlt === "<=") { + gtlt = "<"; + if (xm) { + M = +M + 1; + } else { + m = +m + 1; + } + } + ret = gtlt + M + "." + m + "." + p + pr; + } else if (xm) { + ret = ">=" + M + ".0.0" + pr + " <" + (+M + 1) + ".0.0" + pr; + } else if (xp) { + ret = ">=" + M + "." + m + ".0" + pr + " <" + M + "." + (+m + 1) + ".0" + pr; + } + debug("xRange return", ret); + return ret; + }); + } + function replaceStars(comp, options) { + debug("replaceStars", comp, options); + return comp.trim().replace(re[t.STAR], ""); + } + function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = ""; + } else if (isX(fm)) { + from = ">=" + fM + ".0.0"; + } else if (isX(fp)) { + from = ">=" + fM + "." + fm + ".0"; + } else { + from = ">=" + from; + } + if (isX(tM)) { + to = ""; + } else if (isX(tm)) { + to = "<" + (+tM + 1) + ".0.0"; + } else if (isX(tp)) { + to = "<" + tM + "." + (+tm + 1) + ".0"; + } else if (tpr) { + to = "<=" + tM + "." + tm + "." + tp + "-" + tpr; + } else { + to = "<=" + to; + } + return (from + " " + to).trim(); + } + Range.prototype.test = function(version) { + if (!version) { + return false; + } + if (typeof version === "string") { + try { + version = new SemVer(version, this.options); + } catch (er) { + return false; + } + } + for (var i2 = 0; i2 < this.set.length; i2++) { + if (testSet(this.set[i2], version, this.options)) { + return true; + } + } + return false; + }; + function testSet(set, version, options) { + for (var i2 = 0; i2 < set.length; i2++) { + if (!set[i2].test(version)) { + return false; + } + } + if (version.prerelease.length && !options.includePrerelease) { + for (i2 = 0; i2 < set.length; i2++) { + debug(set[i2].semver); + if (set[i2].semver === ANY) { + continue; + } + if (set[i2].semver.prerelease.length > 0) { + var allowed = set[i2].semver; + if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) { + return true; + } + } + } + return false; + } + return true; + } + exports2.satisfies = satisfies; + function satisfies(version, range, options) { + try { + range = new Range(range, options); + } catch (er) { + return false; + } + return range.test(version); + } + exports2.maxSatisfying = maxSatisfying; + function maxSatisfying(versions, range, options) { + var max = null; + var maxSV = null; + try { + var rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach(function(v) { + if (rangeObj.test(v)) { + if (!max || maxSV.compare(v) === -1) { + max = v; + maxSV = new SemVer(max, options); + } + } + }); + return max; + } + exports2.minSatisfying = minSatisfying; + function minSatisfying(versions, range, options) { + var min = null; + var minSV = null; + try { + var rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach(function(v) { + if (rangeObj.test(v)) { + if (!min || minSV.compare(v) === 1) { + min = v; + minSV = new SemVer(min, options); + } + } + }); + return min; + } + exports2.minVersion = minVersion; + function minVersion(range, loose) { + range = new Range(range, loose); + var minver = new SemVer("0.0.0"); + if (range.test(minver)) { + return minver; + } + minver = new SemVer("0.0.0-0"); + if (range.test(minver)) { + return minver; + } + minver = null; + for (var i2 = 0; i2 < range.set.length; ++i2) { + var comparators = range.set[i2]; + comparators.forEach(function(comparator) { + var compver = new SemVer(comparator.semver.version); + switch (comparator.operator) { + case ">": + if (compver.prerelease.length === 0) { + compver.patch++; + } else { + compver.prerelease.push(0); + } + compver.raw = compver.format(); + case "": + case ">=": + if (!minver || gt(minver, compver)) { + minver = compver; + } + break; + case "<": + case "<=": + break; + default: + throw new Error("Unexpected operation: " + comparator.operator); + } + }); + } + if (minver && range.test(minver)) { + return minver; + } + return null; + } + exports2.validRange = validRange; + function validRange(range, options) { + try { + return new Range(range, options).range || "*"; + } catch (er) { + return null; + } + } + exports2.ltr = ltr; + function ltr(version, range, options) { + return outside(version, range, "<", options); + } + exports2.gtr = gtr; + function gtr(version, range, options) { + return outside(version, range, ">", options); + } + exports2.outside = outside; + function outside(version, range, hilo, options) { + version = new SemVer(version, options); + range = new Range(range, options); + var gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case ">": + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = ">"; + ecomp = ">="; + break; + case "<": + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = "<"; + ecomp = "<="; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + if (satisfies(version, range, options)) { + return false; + } + for (var i2 = 0; i2 < range.set.length; ++i2) { + var comparators = range.set[i2]; + var high = null; + var low = null; + comparators.forEach(function(comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator(">=0.0.0"); + } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator; + } + }); + if (high.operator === comp || high.operator === ecomp) { + return false; + } + if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false; + } + } + return true; + } + exports2.prerelease = prerelease; + function prerelease(version, options) { + var parsed = parse(version, options); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; + } + exports2.intersects = intersects; + function intersects(r1, r2, options) { + r1 = new Range(r1, options); + r2 = new Range(r2, options); + return r1.intersects(r2); + } + exports2.coerce = coerce; + function coerce(version, options) { + if (version instanceof SemVer) { + return version; + } + if (typeof version === "number") { + version = String(version); + } + if (typeof version !== "string") { + return null; + } + options = options || {}; + var match = null; + if (!options.rtl) { + match = version.match(re[t.COERCE]); + } else { + var next; + while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) { + if (!match || next.index + next[0].length !== match.index + match[0].length) { + match = next; + } + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; + } + re[t.COERCERTL].lastIndex = -1; + } + if (match === null) { + return null; + } + return parse(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); + } + } +}); + +// ../../node_modules/.pnpm/make-dir@3.1.0/node_modules/make-dir/index.js +var require_make_dir = __commonJS({ + "../../node_modules/.pnpm/make-dir@3.1.0/node_modules/make-dir/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var path = require("path"); + var { promisify } = require("util"); + var semver = require_semver3(); + var useNativeRecursiveOption = semver.satisfies(process.version, ">=10.12.0"); + var checkPath = (pth) => { + if (process.platform === "win32") { + const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, "")); + if (pathHasInvalidWinCharacters) { + const error = new Error(`Path contains invalid characters: ${pth}`); + error.code = "EINVAL"; + throw error; + } + } + }; + var processOptions = (options) => { + const defaults = { + mode: 511, + fs + }; + return { + ...defaults, + ...options + }; + }; + var permissionError = (pth) => { + const error = new Error(`operation not permitted, mkdir '${pth}'`); + error.code = "EPERM"; + error.errno = -4048; + error.path = pth; + error.syscall = "mkdir"; + return error; + }; + var makeDir = async (input, options) => { + checkPath(input); + options = processOptions(options); + const mkdir = promisify(options.fs.mkdir); + const stat = promisify(options.fs.stat); + if (useNativeRecursiveOption && options.fs.mkdir === fs.mkdir) { + const pth = path.resolve(input); + await mkdir(pth, { + mode: options.mode, + recursive: true + }); + return pth; + } + const make = async (pth) => { + try { + await mkdir(pth, options.mode); + return pth; + } catch (error) { + if (error.code === "EPERM") { + throw error; + } + if (error.code === "ENOENT") { + if (path.dirname(pth) === pth) { + throw permissionError(pth); + } + if (error.message.includes("null bytes")) { + throw error; + } + await make(path.dirname(pth)); + return make(pth); + } + try { + const stats = await stat(pth); + if (!stats.isDirectory()) { + throw new Error("The path is not a directory"); + } + } catch (_) { + throw error; + } + return pth; + } + }; + return make(path.resolve(input)); + }; + module2.exports = makeDir; + module2.exports.sync = (input, options) => { + checkPath(input); + options = processOptions(options); + if (useNativeRecursiveOption && options.fs.mkdirSync === fs.mkdirSync) { + const pth = path.resolve(input); + fs.mkdirSync(pth, { + mode: options.mode, + recursive: true + }); + return pth; + } + const make = (pth) => { + try { + options.fs.mkdirSync(pth, options.mode); + } catch (error) { + if (error.code === "EPERM") { + throw error; + } + if (error.code === "ENOENT") { + if (path.dirname(pth) === pth) { + throw permissionError(pth); + } + if (error.message.includes("null bytes")) { + throw error; + } + make(path.dirname(pth)); + return make(pth); + } + try { + if (!options.fs.statSync(pth).isDirectory()) { + throw new Error("The path is not a directory"); + } + } catch (_) { + throw error; + } + } + return pth; + }; + return make(path.resolve(input)); + }; + } +}); + +// ../../node_modules/.pnpm/write-json-file@4.3.0/node_modules/write-json-file/index.js +var require_write_json_file = __commonJS({ + "../../node_modules/.pnpm/write-json-file@4.3.0/node_modules/write-json-file/index.js"(exports2, module2) { + "use strict"; + var { promisify } = require("util"); + var path = require("path"); + var fs = require_graceful_fs(); + var writeFileAtomic = require_write_file_atomic(); + var sortKeys = require_sort_keys(); + var makeDir = require_make_dir(); + var detectIndent = require_detect_indent(); + var isPlainObj = require_is_plain_obj(); + var readFile = promisify(fs.readFile); + var init = (fn2, filePath, data, options) => { + if (!filePath) { + throw new TypeError("Expected a filepath"); + } + if (data === void 0) { + throw new TypeError("Expected data to stringify"); + } + options = { + indent: " ", + sortKeys: false, + ...options + }; + if (options.sortKeys && isPlainObj(data)) { + data = sortKeys(data, { + deep: true, + compare: typeof options.sortKeys === "function" ? options.sortKeys : void 0 + }); + } + return fn2(filePath, data, options); + }; + var main = async (filePath, data, options) => { + let { indent } = options; + let trailingNewline = "\n"; + try { + const file = await readFile(filePath, "utf8"); + if (!file.endsWith("\n")) { + trailingNewline = ""; + } + if (options.detectIndent) { + indent = detectIndent(file).indent; + } + } catch (error) { + if (error.code !== "ENOENT") { + throw error; + } + } + const json = JSON.stringify(data, options.replacer, indent); + return writeFileAtomic(filePath, `${json}${trailingNewline}`, { mode: options.mode, chown: false }); + }; + var mainSync = (filePath, data, options) => { + let { indent } = options; + let trailingNewline = "\n"; + try { + const file = fs.readFileSync(filePath, "utf8"); + if (!file.endsWith("\n")) { + trailingNewline = ""; + } + if (options.detectIndent) { + indent = detectIndent(file).indent; + } + } catch (error) { + if (error.code !== "ENOENT") { + throw error; + } + } + const json = JSON.stringify(data, options.replacer, indent); + return writeFileAtomic.sync(filePath, `${json}${trailingNewline}`, { mode: options.mode, chown: false }); + }; + module2.exports = async (filePath, data, options) => { + await makeDir(path.dirname(filePath), { fs }); + return init(main, filePath, data, options); + }; + module2.exports.sync = (filePath, data, options) => { + makeDir.sync(path.dirname(filePath), { fs }); + init(mainSync, filePath, data, options); + }; + } +}); + +// ../../node_modules/.pnpm/truncate-utf8-bytes@1.0.2/node_modules/truncate-utf8-bytes/lib/truncate.js +var require_truncate2 = __commonJS({ + "../../node_modules/.pnpm/truncate-utf8-bytes@1.0.2/node_modules/truncate-utf8-bytes/lib/truncate.js"(exports2, module2) { + "use strict"; + function isHighSurrogate(codePoint) { + return codePoint >= 55296 && codePoint <= 56319; + } + function isLowSurrogate(codePoint) { + return codePoint >= 56320 && codePoint <= 57343; + } + module2.exports = function truncate(getLength, string, byteLength) { + if (typeof string !== "string") { + throw new Error("Input must be string"); + } + var charLength = string.length; + var curByteLength = 0; + var codePoint; + var segment; + for (var i = 0; i < charLength; i += 1) { + codePoint = string.charCodeAt(i); + segment = string[i]; + if (isHighSurrogate(codePoint) && isLowSurrogate(string.charCodeAt(i + 1))) { + i += 1; + segment += string[i]; + } + curByteLength += getLength(segment); + if (curByteLength === byteLength) { + return string.slice(0, i + 1); + } else if (curByteLength > byteLength) { + return string.slice(0, i - segment.length + 1); + } + } + return string; + }; + } +}); + +// ../../node_modules/.pnpm/truncate-utf8-bytes@1.0.2/node_modules/truncate-utf8-bytes/index.js +var require_truncate_utf8_bytes = __commonJS({ + "../../node_modules/.pnpm/truncate-utf8-bytes@1.0.2/node_modules/truncate-utf8-bytes/index.js"(exports2, module2) { + "use strict"; + var truncate = require_truncate2(); + var getLength = Buffer.byteLength.bind(Buffer); + module2.exports = truncate.bind(null, getLength); + } +}); + +// ../../node_modules/.pnpm/sanitize-filename@1.6.3/node_modules/sanitize-filename/index.js +var require_sanitize_filename = __commonJS({ + "../../node_modules/.pnpm/sanitize-filename@1.6.3/node_modules/sanitize-filename/index.js"(exports2, module2) { + "use strict"; + var truncate = require_truncate_utf8_bytes(); + var illegalRe = /[\/\?<>\\:\*\|"]/g; + var controlRe = /[\x00-\x1f\x80-\x9f]/g; + var reservedRe = /^\.+$/; + var windowsReservedRe = /^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i; + var windowsTrailingRe = /[\. ]+$/; + function sanitize(input, replacement) { + if (typeof input !== "string") { + throw new Error("Input must be string"); + } + var sanitized = input.replace(illegalRe, replacement).replace(controlRe, replacement).replace(reservedRe, replacement).replace(windowsReservedRe, replacement).replace(windowsTrailingRe, replacement); + return truncate(sanitized, 255); + } + module2.exports = function(input, options) { + var replacement = options && options.replacement || ""; + var output = sanitize(input, replacement); + if (replacement === "") { + return output; + } + return sanitize(output, ""); + }; + } +}); + +// ../../node_modules/.pnpm/make-empty-dir@2.0.0/node_modules/make-empty-dir/index.js +var require_make_empty_dir = __commonJS({ + "../../node_modules/.pnpm/make-empty-dir@2.0.0/node_modules/make-empty-dir/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs").promises; + var path = require("path"); + var rimraf = require_rimraf(); + module2.exports = async function makeEmptyDir(dir, opts) { + if (opts && opts.recursive) { + await fs.mkdir(path.dirname(dir), { recursive: true }); + } + try { + await fs.mkdir(dir); + return "created"; + } catch (err) { + if (err.code === "EEXIST") { + await removeContentsOfDir(dir); + return "emptied"; + } + throw err; + } + }; + async function removeContentsOfDir(dir) { + const items = await fs.readdir(dir); + for (const item of items) { + await rimraf(path.join(dir, item)); + } + } + } +}); + +// ../package-store/lib/fs/importIndexedDir.js +var require_importIndexedDir = __commonJS({ + "../package-store/lib/fs/importIndexedDir.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var logger_1 = __importStar2(require_lib6()); + var rimraf_1 = __importDefault(require_rimraf()); + var sanitize_filename_1 = __importDefault(require_sanitize_filename()); + var make_empty_dir_1 = __importDefault(require_make_empty_dir()); + var path_temp_1 = __importDefault(require_path_temp()); + var rename_overwrite_1 = __importDefault(require_rename_overwrite()); + var filenameConflictsLogger = logger_1.default("_filename-conflicts"); + async function importIndexedDir(importFile, newDir, filenames) { + const stage = path_temp_1.default(path_1.default.dirname(newDir)); + try { + await tryImportIndexedDir(importFile, stage, filenames); + await rename_overwrite_1.default(stage, newDir); + } catch (err) { + try { + await rimraf_1.default(stage); + } catch (err2) { + } + if (err["code"] === "EEXIST") { + const { uniqueFileMap, conflictingFileNames } = getUniqueFileMap(filenames); + if (Object.keys(conflictingFileNames).length === 0) + throw err; + filenameConflictsLogger.debug({ + conflicts: conflictingFileNames, + writingTo: newDir + }); + logger_1.globalWarn(`Not all files were linked to "${path_1.default.relative(process.cwd(), newDir)}". Some of the files have equal names in different case, which is an issue on case-insensitive filesystems. The conflicting file names are: ${JSON.stringify(conflictingFileNames)}`); + await importIndexedDir(importFile, newDir, uniqueFileMap); + return; + } + if (err["code"] === "ENOENT") { + const { sanitizedFilenames, invalidFilenames } = sanitizeFilenames(filenames); + if (invalidFilenames.length === 0) + throw err; + logger_1.globalWarn(`The package linked to "${path_1.default.relative(process.cwd(), newDir)}" had files with invalid names: ${invalidFilenames.join(", ")}. They were renamed.`); + await importIndexedDir(importFile, newDir, sanitizedFilenames); + return; + } + throw err; + } + } + exports2.default = importIndexedDir; + function sanitizeFilenames(filenames) { + const sanitizedFilenames = {}; + const invalidFilenames = []; + for (const [filename, src] of Object.entries(filenames)) { + const sanitizedFilename = filename.split("/").map((f) => sanitize_filename_1.default(f)).join("/"); + if (sanitizedFilename !== filename) { + invalidFilenames.push(filename); + } + sanitizedFilenames[sanitizedFilename] = src; + } + return { sanitizedFilenames, invalidFilenames }; + } + async function tryImportIndexedDir(importFile, newDir, filenames) { + await make_empty_dir_1.default(newDir, { recursive: true }); + const alldirs = new Set(); + Object.keys(filenames).forEach((f) => { + const dir = path_1.default.dirname(f); + if (dir === ".") + return; + alldirs.add(dir); + }); + await Promise.all(Array.from(alldirs).sort((d1, d2) => d1.length - d2.length).map(async (dir) => fs_1.promises.mkdir(path_1.default.join(newDir, dir), { recursive: true }))); + await Promise.all(Object.entries(filenames).map(async ([f, src]) => { + const dest = path_1.default.join(newDir, f); + await importFile(src, dest); + })); + } + function getUniqueFileMap(fileMap) { + const lowercaseFiles = new Map(); + const conflictingFileNames = {}; + const uniqueFileMap = {}; + for (const filename of Object.keys(fileMap).sort()) { + const lowercaseFilename = filename.toLowerCase(); + if (lowercaseFiles.has(lowercaseFilename)) { + conflictingFileNames[filename] = lowercaseFiles.get(lowercaseFilename); + continue; + } + lowercaseFiles.set(lowercaseFilename, filename); + uniqueFileMap[filename] = fileMap[filename]; + } + return { + conflictingFileNames, + uniqueFileMap + }; + } + } +}); + +// ../package-store/lib/storeController/createImportPackage.js +var require_createImportPackage = __commonJS({ + "../package-store/lib/storeController/createImportPackage.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.copyPkg = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var logger_1 = require_lib6(); + var core_loggers_1 = require_lib12(); + var p_limit_1 = __importDefault(require_p_limit()); + var path_exists_1 = __importDefault(require_path_exists()); + var importIndexedDir_1 = __importDefault(require_importIndexedDir()); + var limitLinking = p_limit_1.default(16); + exports2.default = (packageImportMethod) => { + const importPackage = createImportPackage(packageImportMethod); + return async (to, opts) => limitLinking(async () => importPackage(to, opts)); + }; + function createImportPackage(packageImportMethod) { + switch (packageImportMethod !== null && packageImportMethod !== void 0 ? packageImportMethod : "auto") { + case "clone": + core_loggers_1.packageImportMethodLogger.debug({ method: "clone" }); + return clonePkg; + case "hardlink": + core_loggers_1.packageImportMethodLogger.debug({ method: "hardlink" }); + return hardlinkPkg.bind(null, linkOrCopy); + case "auto": { + return createAutoImporter(); + } + case "copy": + core_loggers_1.packageImportMethodLogger.debug({ method: "copy" }); + return copyPkg; + default: + throw new Error(`Unknown package import method ${packageImportMethod}`); + } + } + function createAutoImporter() { + let auto = initialAuto; + return async (to, opts) => auto(to, opts); + async function initialAuto(to, opts) { + try { + if (!await clonePkg(to, opts)) + return void 0; + core_loggers_1.packageImportMethodLogger.debug({ method: "clone" }); + auto = clonePkg; + return "clone"; + } catch (err) { + } + try { + if (!await hardlinkPkg(fs_1.promises.link, to, opts)) + return void 0; + core_loggers_1.packageImportMethodLogger.debug({ method: "hardlink" }); + auto = hardlinkPkg.bind(null, linkOrCopy); + return "hardlink"; + } catch (err) { + if (err.message.startsWith("EXDEV: cross-device link not permitted")) { + logger_1.globalWarn(err.message); + logger_1.globalInfo("Falling back to copying packages from store"); + core_loggers_1.packageImportMethodLogger.debug({ method: "copy" }); + auto = copyPkg; + return auto(to, opts); + } + core_loggers_1.packageImportMethodLogger.debug({ method: "hardlink" }); + auto = hardlinkPkg.bind(null, linkOrCopy); + return auto(to, opts); + } + } + } + async function clonePkg(to, opts) { + const pkgJsonPath = path_1.default.join(to, "package.json"); + if (!opts.fromStore || opts.force || !await path_exists_1.default(pkgJsonPath)) { + await importIndexedDir_1.default(cloneFile, to, opts.filesMap); + return "clone"; + } + return void 0; + } + async function cloneFile(from, to) { + await fs_1.promises.copyFile(from, to, fs_1.constants.COPYFILE_FICLONE_FORCE); + } + async function hardlinkPkg(importFile, to, opts) { + const pkgJsonPath = path_1.default.join(to, "package.json"); + if (!opts.fromStore || opts.force || !await path_exists_1.default(pkgJsonPath) || !await pkgLinkedToStore(pkgJsonPath, opts.filesMap["package.json"], to)) { + await importIndexedDir_1.default(importFile, to, opts.filesMap); + return "hardlink"; + } + return void 0; + } + async function linkOrCopy(existingPath, newPath) { + try { + await fs_1.promises.link(existingPath, newPath); + } catch (err) { + if (err["code"] === "EEXIST") + return; + await fs_1.promises.copyFile(existingPath, newPath); + } + } + async function pkgLinkedToStore(pkgJsonPath, pkgJsonPathInStore, to) { + if (await isSameFile(pkgJsonPath, pkgJsonPathInStore)) + return true; + logger_1.globalInfo(`Relinking ${to} from the store`); + return false; + } + async function isSameFile(file1, file2) { + const stats = await Promise.all([fs_1.promises.stat(file1), fs_1.promises.stat(file2)]); + return stats[0].ino === stats[1].ino; + } + async function copyPkg(to, opts) { + const pkgJsonPath = path_1.default.join(to, "package.json"); + if (!opts.fromStore || opts.force || !await path_exists_1.default(pkgJsonPath)) { + await importIndexedDir_1.default(fs_1.promises.copyFile, to, opts.filesMap); + return "copy"; + } + return void 0; + } + exports2.copyPkg = copyPkg; + } +}); + +// ../package-store/lib/storeController/prune.js +var require_prune = __commonJS({ + "../package-store/lib/storeController/prune.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var logger_1 = require_lib6(); + var rimraf_1 = __importDefault(require_rimraf()); + var load_json_file_1 = __importDefault(require_load_json_file()); + var ssri_1 = __importDefault(require_ssri()); + var BIG_ONE = BigInt(1); + async function prune(storeDir) { + const cafsDir = path_1.default.join(storeDir, "files"); + await rimraf_1.default(path_1.default.join(storeDir, "metadata")); + await rimraf_1.default(path_1.default.join(storeDir, "metadata-full")); + await rimraf_1.default(path_1.default.join(storeDir, "tmp")); + logger_1.globalInfo("Removed all cached metadata files"); + const pkgIndexFiles = []; + const removedHashes = new Set(); + const dirs = (await fs_1.promises.readdir(cafsDir, { withFileTypes: true })).filter((entry) => entry.isDirectory()).map((dir) => dir.name); + let fileCounter = 0; + for (const dir of dirs) { + const subdir = path_1.default.join(cafsDir, dir); + for (const fileName of await fs_1.promises.readdir(subdir)) { + const filePath = path_1.default.join(subdir, fileName); + if (fileName.endsWith("-index.json")) { + pkgIndexFiles.push(filePath); + continue; + } + const stat = await fs_1.promises.stat(filePath); + if (stat.nlink === 1 || stat.nlink === BIG_ONE) { + await fs_1.promises.unlink(filePath); + fileCounter++; + removedHashes.add(ssri_1.default.fromHex(`${dir}${fileName}`, "sha512").toString()); + } + } + } + logger_1.globalInfo(`Removed ${fileCounter} file${fileCounter === 1 ? "" : "s"}`); + let pkgCounter = 0; + for (const pkgIndexFilePath of pkgIndexFiles) { + const { files: pkgFilesIndex } = await load_json_file_1.default(pkgIndexFilePath); + if (removedHashes.has(pkgFilesIndex["package.json"].integrity)) { + await fs_1.promises.unlink(pkgIndexFilePath); + pkgCounter++; + } + } + logger_1.globalInfo(`Removed ${pkgCounter} package${pkgCounter === 1 ? "" : "s"}`); + } + exports2.default = prune; + } +}); + +// ../package-store/lib/storeController/index.js +var require_storeController = __commonJS({ + "../package-store/lib/storeController/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createCafsStore = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var cafs_1 = __importStar2(require_lib31()); + var package_requester_1 = __importDefault(require_lib34()); + var load_json_file_1 = __importDefault(require_load_json_file()); + var path_temp_1 = __importDefault(require_path_temp()); + var write_json_file_1 = __importDefault(require_write_json_file()); + var createImportPackage_1 = __importDefault(require_createImportPackage()); + var prune_1 = __importDefault(require_prune()); + function createPackageImporter(opts) { + const impPkg = createImportPackage_1.default(opts.packageImportMethod); + const getFilePathByModeInCafs = cafs_1.getFilePathByModeInCafs.bind(null, opts.cafsDir); + return async (to, opts2) => { + var _a, _b; + const filesMap = {}; + let isBuilt; + let filesIndex; + if (opts2.targetEngine && ((_a = opts2.filesResponse.sideEffects) === null || _a === void 0 ? void 0 : _a[opts2.targetEngine]) != null) { + filesIndex = (_b = opts2.filesResponse.sideEffects) === null || _b === void 0 ? void 0 : _b[opts2.targetEngine]; + isBuilt = true; + } else { + filesIndex = opts2.filesResponse.filesIndex; + isBuilt = false; + } + for (const [fileName, fileMeta] of Object.entries(filesIndex)) { + filesMap[fileName] = getFilePathByModeInCafs(fileMeta.integrity, fileMeta.mode); + } + const importMethod = await impPkg(to, { filesMap, fromStore: opts2.filesResponse.fromStore, force: opts2.force }); + return { importMethod, isBuilt }; + }; + } + function createCafsStore(storeDir, opts) { + const cafsDir = path_1.default.join(storeDir, "files"); + const baseTempDir = path_1.default.join(storeDir, "tmp"); + const importPackage = createPackageImporter({ + packageImportMethod: opts === null || opts === void 0 ? void 0 : opts.packageImportMethod, + cafsDir + }); + return { + ...cafs_1.default(cafsDir, opts === null || opts === void 0 ? void 0 : opts.ignoreFile), + importPackage, + tempDir: async () => { + const tmpDir = path_temp_1.default(baseTempDir); + await fs_1.promises.mkdir(tmpDir, { recursive: true }); + return tmpDir; + } + }; + } + exports2.createCafsStore = createCafsStore; + async function default_1(resolve, fetchers, initOpts) { + const storeDir = initOpts.storeDir; + const cafs = createCafsStore(storeDir, initOpts); + const packageRequester = package_requester_1.default({ + force: initOpts.force, + engineStrict: initOpts.engineStrict, + nodeVersion: initOpts.nodeVersion, + pnpmVersion: initOpts.pnpmVersion, + resolve, + fetchers, + cafs, + ignoreFile: initOpts.ignoreFile, + networkConcurrency: initOpts.networkConcurrency, + storeDir: initOpts.storeDir, + verifyStoreIntegrity: initOpts.verifyStoreIntegrity + }); + return { + close: async () => { + }, + fetchPackage: packageRequester.fetchPackageToStore, + importPackage: cafs.importPackage, + prune: prune_1.default.bind(null, storeDir), + requestPackage: packageRequester.requestPackage, + upload + }; + async function upload(builtPkgLocation, opts) { + var _a; + const sideEffectsIndex = await cafs.addFilesFromDir(builtPkgLocation); + const integrity = {}; + await Promise.all(Object.keys(sideEffectsIndex).map(async (filename) => { + const { checkedAt, integrity: fileIntegrity } = await sideEffectsIndex[filename].writeResult; + integrity[filename] = { + checkedAt, + integrity: fileIntegrity.toString(), + mode: sideEffectsIndex[filename].mode, + size: sideEffectsIndex[filename].size + }; + })); + let filesIndex; + try { + filesIndex = await load_json_file_1.default(opts.filesIndexFile); + } catch (err) { + filesIndex = { files: integrity }; + } + filesIndex.sideEffects = (_a = filesIndex.sideEffects) !== null && _a !== void 0 ? _a : {}; + filesIndex.sideEffects[opts.engine] = integrity; + await write_json_file_1.default(opts.filesIndexFile, filesIndex, { indent: void 0 }); + } + } + exports2.default = default_1; + } +}); + +// ../resolver-base/lib/index.js +var require_lib35 = __commonJS({ + "../resolver-base/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../store-controller-types/lib/index.js +var require_lib36 = __commonJS({ + "../store-controller-types/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar(require_lib35(), exports2); + } +}); + +// ../package-store/lib/index.js +var require_lib37 = __commonJS({ + "../package-store/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createCafsStore = void 0; + var storeController_1 = __importStar2(require_storeController()); + Object.defineProperty(exports2, "createCafsStore", { enumerable: true, get: function() { + return storeController_1.createCafsStore; + } }); + exports2.default = storeController_1.default; + __exportStar(require_lib36(), exports2); + } +}); + +// ../../node_modules/.pnpm/can-link@2.0.0/node_modules/can-link/index.js +var require_can_link = __commonJS({ + "../../node_modules/.pnpm/can-link@2.0.0/node_modules/can-link/index.js"(exports2, module2) { + "use strict"; + var defaultFS = require("fs"); + module2.exports = async (existingPath, newPath, customFS) => { + const fs = customFS || defaultFS; + try { + await fs.promises.link(existingPath, newPath); + fs.promises.unlink(newPath).catch(() => { + }); + return true; + } catch (err) { + if (err.code === "EXDEV" || err.code === "EACCES" || err.code === "EPERM") { + return false; + } + throw err; + } + }; + module2.exports.sync = (existingPath, newPath, customFS) => { + const fs = customFS || defaultFS; + try { + fs.linkSync(existingPath, newPath); + fs.unlinkSync(newPath); + return true; + } catch (err) { + if (err.code === "EXDEV" || err.code === "EACCES" || err.code === "EPERM") { + return false; + } + throw err; + } + }; + } +}); + +// ../../node_modules/.pnpm/path-absolute@1.0.1/node_modules/path-absolute/index.js +var require_path_absolute = __commonJS({ + "../../node_modules/.pnpm/path-absolute@1.0.1/node_modules/path-absolute/index.js"(exports2, module2) { + "use strict"; + var os = require("os"); + var path = require("path"); + module2.exports = function(filepath, cwd) { + const home = getHomedir(); + if (isHomepath(filepath)) { + return path.join(home, filepath.substr(2)); + } + if (path.isAbsolute(filepath)) { + return filepath; + } + if (cwd) { + return path.join(cwd, filepath); + } + return path.resolve(filepath); + }; + function getHomedir() { + const home = os.homedir(); + if (!home) + throw new Error("Could not find the homedir"); + return home; + } + function isHomepath(filepath) { + return filepath.indexOf("~/") === 0 || filepath.indexOf("~\\") === 0; + } + } +}); + +// ../../node_modules/.pnpm/next-path@1.0.0/node_modules/next-path/index.js +var require_next_path = __commonJS({ + "../../node_modules/.pnpm/next-path@1.0.0/node_modules/next-path/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var nextPath = (from, to) => { + const diff = path.relative(from, to); + const sepIndex = diff.indexOf(path.sep); + const next = sepIndex >= 0 ? diff.substring(0, sepIndex) : diff; + return path.join(from, next); + }; + module2.exports = nextPath; + } +}); + +// ../../node_modules/.pnpm/root-link-target@3.1.0/node_modules/root-link-target/index.js +var require_root_link_target = __commonJS({ + "../../node_modules/.pnpm/root-link-target@3.1.0/node_modules/root-link-target/index.js"(exports2, module2) { + "use strict"; + var canLink = require_can_link(); + var path = require("path"); + var pathTemp = require_path_temp(); + var nextPath = require_next_path(); + module2.exports = async (filePath) => { + filePath = path.resolve(filePath); + const end = path.dirname(filePath); + let dir = path.parse(end).root; + while (true) { + const result = await canLink(filePath, pathTemp(dir)); + if (result) { + return dir; + } else if (dir === end) { + throw new Error(`${filePath} cannot be linked to anywhere`); + } else { + dir = nextPath(dir, end); + } + } + }; + module2.exports.sync = (filePath) => { + filePath = path.resolve(filePath); + const end = path.dirname(filePath); + let dir = path.parse(end).root; + while (true) { + const result = canLink.sync(filePath, pathTemp(dir)); + if (result) { + return dir; + } else if (dir === end) { + throw new Error(`${filePath} cannot be linked to anywhere`); + } else { + dir = nextPath(dir, end); + } + } + }; + } +}); + +// ../../node_modules/.pnpm/touch@3.1.0/node_modules/touch/index.js +var require_touch = __commonJS({ + "../../node_modules/.pnpm/touch@3.1.0/node_modules/touch/index.js"(exports2, module2) { + "use strict"; + var EE = require("events").EventEmitter; + var cons = require("constants"); + var fs = require("fs"); + module2.exports = (f, options, cb) => { + if (typeof options === "function") + cb = options, options = {}; + const p = new Promise((res, rej) => { + new Touch(validOpts(options, f, null)).on("done", res).on("error", rej); + }); + return cb ? p.then((res) => cb(null, res), cb) : p; + }; + module2.exports.sync = module2.exports.touchSync = (f, options) => (new TouchSync(validOpts(options, f, null)), void 0); + module2.exports.ftouch = (fd, options, cb) => { + if (typeof options === "function") + cb = options, options = {}; + const p = new Promise((res, rej) => { + new Touch(validOpts(options, null, fd)).on("done", res).on("error", rej); + }); + return cb ? p.then((res) => cb(null, res), cb) : p; + }; + module2.exports.ftouchSync = (fd, opt) => (new TouchSync(validOpts(opt, null, fd)), void 0); + var validOpts = (options, path, fd) => { + options = Object.create(options || {}); + options.fd = fd; + options.path = path; + const now = parseInt(new Date(options.time || Date.now()).getTime() / 1e3); + if (!options.atime && !options.mtime) + options.atime = options.mtime = now; + else { + if (options.atime === true) + options.atime = now; + if (options.mtime === true) + options.mtime = now; + } + let oflags = 0; + if (!options.force) + oflags = oflags | cons.O_RDWR; + if (!options.nocreate) + oflags = oflags | cons.O_CREAT; + options.oflags = oflags; + return options; + }; + var Touch = class extends EE { + constructor(options) { + super(options); + this.fd = options.fd; + this.path = options.path; + this.atime = options.atime; + this.mtime = options.mtime; + this.ref = options.ref; + this.nocreate = !!options.nocreate; + this.force = !!options.force; + this.closeAfter = options.closeAfter; + this.oflags = options.oflags; + this.options = options; + if (typeof this.fd !== "number") { + this.closeAfter = true; + this.open(); + } else + this.onopen(null, this.fd); + } + emit(ev, data) { + this.close(); + return super.emit(ev, data); + } + close() { + if (typeof this.fd === "number" && this.closeAfter) + fs.close(this.fd, () => { + }); + } + open() { + fs.open(this.path, this.oflags, (er, fd) => this.onopen(er, fd)); + } + onopen(er, fd) { + if (er) { + if (er.code === "EISDIR") + this.onopen(null, null); + else if (er.code === "ENOENT" && this.nocreate) + this.emit("done"); + else + this.emit("error", er); + } else { + this.fd = fd; + if (this.ref) + this.statref(); + else if (!this.atime || !this.mtime) + this.fstat(); + else + this.futimes(); + } + } + statref() { + fs.stat(this.ref, (er, st) => { + if (er) + this.emit("error", er); + else + this.onstatref(st); + }); + } + onstatref(st) { + this.atime = this.atime && parseInt(st.atime.getTime() / 1e3, 10); + this.mtime = this.mtime && parseInt(st.mtime.getTime() / 1e3, 10); + if (!this.atime || !this.mtime) + this.fstat(); + else + this.futimes(); + } + fstat() { + const stat = this.fd ? "fstat" : "stat"; + const target = this.fd || this.path; + fs[stat](target, (er, st) => { + if (er) + this.emit("error", er); + else + this.onfstat(st); + }); + } + onfstat(st) { + if (typeof this.atime !== "number") + this.atime = parseInt(st.atime.getTime() / 1e3, 10); + if (typeof this.mtime !== "number") + this.mtime = parseInt(st.mtime.getTime() / 1e3, 10); + this.futimes(); + } + futimes() { + const utimes = this.fd ? "futimes" : "utimes"; + const target = this.fd || this.path; + fs[utimes](target, "" + this.atime, "" + this.mtime, (er) => { + if (er) + this.emit("error", er); + else + this.emit("done"); + }); + } + }; + var TouchSync = class extends Touch { + open() { + try { + this.onopen(null, fs.openSync(this.path, this.oflags)); + } catch (er) { + this.onopen(er); + } + } + statref() { + let threw = true; + try { + this.onstatref(fs.statSync(this.ref)); + threw = false; + } finally { + if (threw) + this.close(); + } + } + fstat() { + let threw = true; + const stat = this.fd ? "fstatSync" : "statSync"; + const target = this.fd || this.path; + try { + this.onfstat(fs[stat](target)); + threw = false; + } finally { + if (threw) + this.close(); + } + } + futimes() { + let threw = true; + const utimes = this.fd ? "futimesSync" : "utimesSync"; + const target = this.fd || this.path; + try { + fs[utimes](target, this.atime, this.mtime); + threw = false; + } finally { + if (threw) + this.close(); + } + this.emit("done"); + } + close() { + if (typeof this.fd === "number" && this.closeAfter) + try { + fs.closeSync(this.fd); + } catch (er) { + } + } + }; + } +}); + +// ../../node_modules/.pnpm/@pnpm+store-path@5.0.0/node_modules/@pnpm/store-path/lib/index.js +var require_lib38 = __commonJS({ + "../../node_modules/.pnpm/@pnpm+store-path@5.0.0/node_modules/@pnpm/store-path/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var rimraf = require_rimraf(); + var canLink = require_can_link(); + var os = require("os"); + var path = require("path"); + var pathAbsolute = require_path_absolute(); + var pathTemp = require_path_temp(); + var rootLinkTarget = require_root_link_target(); + var touch = require_touch(); + var STORE_VERSION = "v3"; + async function default_1(pkgRoot, storePath) { + if (!storePath || isHomepath(storePath)) { + const relStorePath = storePath ? storePath.substr(2) : ".pnpm-store"; + return await storePathRelativeToHome(pkgRoot, relStorePath); + } + const storeBasePath = pathAbsolute(storePath, pkgRoot); + if (storeBasePath.endsWith(`${path.sep}${STORE_VERSION}`)) { + return storeBasePath; + } + return path.join(storeBasePath, STORE_VERSION); + } + exports2.default = default_1; + async function storePathRelativeToHome(pkgRoot, relStore) { + const tempFile = pathTemp(pkgRoot); + await fs_1.promises.mkdir(path.dirname(tempFile), { recursive: true }); + await touch(tempFile); + const homedir = getHomedir(); + if (await canLinkToSubdir(tempFile, homedir)) { + await fs_1.promises.unlink(tempFile); + return path.join(homedir, relStore, STORE_VERSION); + } + try { + let mountpoint = await rootLinkTarget(tempFile); + const mountpointParent = path.join(mountpoint, ".."); + if (!dirsAreEqual(mountpointParent, mountpoint) && await canLinkToSubdir(tempFile, mountpointParent)) { + mountpoint = mountpointParent; + } + if (dirsAreEqual(pkgRoot, mountpoint)) { + return path.join(homedir, relStore, STORE_VERSION); + } + return path.join(mountpoint, relStore, STORE_VERSION); + } catch (err) { + return path.join(homedir, relStore, STORE_VERSION); + } finally { + await fs_1.promises.unlink(tempFile); + } + } + async function canLinkToSubdir(fileToLink, dir) { + let result = false; + const tmpDir = pathTemp(dir); + try { + await fs_1.promises.mkdir(tmpDir, { recursive: true }); + result = await canLink(fileToLink, pathTemp(tmpDir)); + } catch (err) { + result = false; + } finally { + await safeRmdir(tmpDir); + } + return result; + } + async function safeRmdir(dir) { + try { + await rimraf(dir); + } catch (err) { + } + } + function dirsAreEqual(dir1, dir2) { + return path.relative(dir1, dir2) === "."; + } + function getHomedir() { + const home = os.homedir(); + if (!home) + throw new Error("Could not find the homedir"); + return home; + } + function isHomepath(filepath) { + return filepath.indexOf("~/") === 0 || filepath.indexOf("~\\") === 0; + } + } +}); + +// ../../node_modules/.pnpm/p-try@2.2.0/node_modules/p-try/index.js +var require_p_try = __commonJS({ + "../../node_modules/.pnpm/p-try@2.2.0/node_modules/p-try/index.js"(exports2, module2) { + "use strict"; + var pTry = (fn2, ...arguments_) => new Promise((resolve) => { + resolve(fn2(...arguments_)); + }); + module2.exports = pTry; + module2.exports.default = pTry; + } +}); + +// ../../node_modules/.pnpm/p-limit@2.3.0/node_modules/p-limit/index.js +var require_p_limit2 = __commonJS({ + "../../node_modules/.pnpm/p-limit@2.3.0/node_modules/p-limit/index.js"(exports2, module2) { + "use strict"; + var pTry = require_p_try(); + var pLimit = (concurrency) => { + if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { + return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up")); + } + const queue = []; + let activeCount = 0; + const next = () => { + activeCount--; + if (queue.length > 0) { + queue.shift()(); + } + }; + const run = (fn2, resolve, ...args2) => { + activeCount++; + const result = pTry(fn2, ...args2); + resolve(result); + result.then(next, next); + }; + const enqueue = (fn2, resolve, ...args2) => { + if (activeCount < concurrency) { + run(fn2, resolve, ...args2); + } else { + queue.push(run.bind(null, fn2, resolve, ...args2)); + } + }; + const generator = (fn2, ...args2) => new Promise((resolve) => enqueue(fn2, resolve, ...args2)); + Object.defineProperties(generator, { + activeCount: { + get: () => activeCount + }, + pendingCount: { + get: () => queue.length + }, + clearQueue: { + value: () => { + queue.length = 0; + } + } + }); + return generator; + }; + module2.exports = pLimit; + module2.exports.default = pLimit; + } +}); + +// ../../node_modules/.pnpm/p-locate@4.1.0/node_modules/p-locate/index.js +var require_p_locate2 = __commonJS({ + "../../node_modules/.pnpm/p-locate@4.1.0/node_modules/p-locate/index.js"(exports2, module2) { + "use strict"; + var pLimit = require_p_limit2(); + var EndError = class extends Error { + constructor(value) { + super(); + this.value = value; + } + }; + var testElement = async (element, tester) => tester(await element); + var finder = async (element) => { + const values = await Promise.all(element); + if (values[1] === true) { + throw new EndError(values[0]); + } + return false; + }; + var pLocate = async (iterable, tester, options) => { + options = { + concurrency: Infinity, + preserveOrder: true, + ...options + }; + const limit = pLimit(options.concurrency); + const items = [...iterable].map((element) => [element, limit(testElement, element, tester)]); + const checkLimit = pLimit(options.preserveOrder ? 1 : Infinity); + try { + await Promise.all(items.map((element) => checkLimit(finder, element))); + } catch (error) { + if (error instanceof EndError) { + return error.value; + } + throw error; + } + }; + module2.exports = pLocate; + module2.exports.default = pLocate; + } +}); + +// ../../node_modules/.pnpm/locate-path@5.0.0/node_modules/locate-path/index.js +var require_locate_path2 = __commonJS({ + "../../node_modules/.pnpm/locate-path@5.0.0/node_modules/locate-path/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var fs = require("fs"); + var { promisify } = require("util"); + var pLocate = require_p_locate2(); + var fsStat = promisify(fs.stat); + var fsLStat = promisify(fs.lstat); + var typeMappings = { + directory: "isDirectory", + file: "isFile" + }; + function checkType({ type }) { + if (type in typeMappings) { + return; + } + throw new Error(`Invalid type specified: ${type}`); + } + var matchType = (type, stat) => type === void 0 || stat[typeMappings[type]](); + module2.exports = async (paths, options) => { + options = { + cwd: process.cwd(), + type: "file", + allowSymlinks: true, + ...options + }; + checkType(options); + const statFn = options.allowSymlinks ? fsStat : fsLStat; + return pLocate(paths, async (path_) => { + try { + const stat = await statFn(path.resolve(options.cwd, path_)); + return matchType(options.type, stat); + } catch (_) { + return false; + } + }, options); + }; + module2.exports.sync = (paths, options) => { + options = { + cwd: process.cwd(), + allowSymlinks: true, + type: "file", + ...options + }; + checkType(options); + const statFn = options.allowSymlinks ? fs.statSync : fs.lstatSync; + for (const path_ of paths) { + try { + const stat = statFn(path.resolve(options.cwd, path_)); + if (matchType(options.type, stat)) { + return path_; + } + } catch (_) { + } + } + }; + } +}); + +// ../../node_modules/.pnpm/find-up@4.1.0/node_modules/find-up/index.js +var require_find_up2 = __commonJS({ + "../../node_modules/.pnpm/find-up@4.1.0/node_modules/find-up/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var locatePath = require_locate_path2(); + var pathExists = require_path_exists(); + var stop = Symbol("findUp.stop"); + module2.exports = async (name, options = {}) => { + let directory = path.resolve(options.cwd || ""); + const { root } = path.parse(directory); + const paths = [].concat(name); + const runMatcher = async (locateOptions) => { + if (typeof name !== "function") { + return locatePath(paths, locateOptions); + } + const foundPath = await name(locateOptions.cwd); + if (typeof foundPath === "string") { + return locatePath([foundPath], locateOptions); + } + return foundPath; + }; + while (true) { + const foundPath = await runMatcher({ ...options, cwd: directory }); + if (foundPath === stop) { + return; + } + if (foundPath) { + return path.resolve(directory, foundPath); + } + if (directory === root) { + return; + } + directory = path.dirname(directory); + } + }; + module2.exports.sync = (name, options = {}) => { + let directory = path.resolve(options.cwd || ""); + const { root } = path.parse(directory); + const paths = [].concat(name); + const runMatcher = (locateOptions) => { + if (typeof name !== "function") { + return locatePath.sync(paths, locateOptions); + } + const foundPath = name(locateOptions.cwd); + if (typeof foundPath === "string") { + return locatePath.sync([foundPath], locateOptions); + } + return foundPath; + }; + while (true) { + const foundPath = runMatcher({ ...options, cwd: directory }); + if (foundPath === stop) { + return; + } + if (foundPath) { + return path.resolve(directory, foundPath); + } + if (directory === root) { + return; + } + directory = path.dirname(directory); + } + }; + module2.exports.exists = pathExists; + module2.exports.sync.exists = pathExists.sync; + module2.exports.stop = stop; + } +}); + +// ../../node_modules/.pnpm/pkg-dir@4.2.0/node_modules/pkg-dir/index.js +var require_pkg_dir = __commonJS({ + "../../node_modules/.pnpm/pkg-dir@4.2.0/node_modules/pkg-dir/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var findUp = require_find_up2(); + var pkgDir = async (cwd) => { + const filePath = await findUp("package.json", { cwd }); + return filePath && path.dirname(filePath); + }; + module2.exports = pkgDir; + module2.exports.default = pkgDir; + module2.exports.sync = (cwd) => { + const filePath = findUp.sync("package.json", { cwd }); + return filePath && path.dirname(filePath); + }; + } +}); + +// ../../node_modules/.pnpm/find-yarn-workspace-root2@1.2.16/node_modules/find-yarn-workspace-root2/core.js +var require_core5 = __commonJS({ + "../../node_modules/.pnpm/find-yarn-workspace-root2@1.2.16/node_modules/find-yarn-workspace-root2/core.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readPackageJSON = exports2.extractWorkspaces = exports2.isMatchWorkspaces = exports2.checkWorkspaces = exports2.findWorkspaceRoot = void 0; + var path_1 = __importDefault(require("path")); + var pkg_dir_1 = __importDefault(require_pkg_dir()); + var fs_1 = require("fs"); + var micromatch_1 = __importDefault(require_micromatch()); + function findWorkspaceRoot(initial) { + if (!initial) { + initial = process.cwd(); + } + let _pkg = pkg_dir_1.default.sync(initial); + if (!_pkg) { + return null; + } + initial = path_1.default.normalize(_pkg); + let previous = null; + let current = initial; + do { + const manifest = readPackageJSON(current); + const workspaces = extractWorkspaces(manifest); + let { done, found } = checkWorkspaces(current, initial); + if (done) { + return found; + } + previous = current; + current = path_1.default.dirname(current); + } while (current !== previous); + return null; + } + exports2.findWorkspaceRoot = findWorkspaceRoot; + function checkWorkspaces(current, initial) { + const manifest = readPackageJSON(current); + const workspaces = extractWorkspaces(manifest); + let done = false; + let found; + let relativePath; + if (workspaces) { + done = true; + relativePath = path_1.default.relative(current, initial); + if (relativePath === "" || isMatchWorkspaces(relativePath, workspaces)) { + found = current; + } else { + found = null; + } + } + return { + done, + found, + relativePath + }; + } + exports2.checkWorkspaces = checkWorkspaces; + function isMatchWorkspaces(relativePath, workspaces) { + let ls = micromatch_1.default([relativePath], workspaces); + return ls.length > 0; + } + exports2.isMatchWorkspaces = isMatchWorkspaces; + function extractWorkspaces(manifest) { + const workspaces = (manifest || {}).workspaces; + return workspaces && workspaces.packages || (Array.isArray(workspaces) ? workspaces : null); + } + exports2.extractWorkspaces = extractWorkspaces; + function readPackageJSON(dir) { + const file = path_1.default.join(dir, "package.json"); + if (fs_1.existsSync(file)) { + return JSON.parse(fs_1.readFileSync(file, "utf8")); + } + return null; + } + exports2.readPackageJSON = readPackageJSON; + findWorkspaceRoot.findWorkspaceRoot = findWorkspaceRoot; + findWorkspaceRoot.readPackageJSON = readPackageJSON; + findWorkspaceRoot.extractWorkspaces = extractWorkspaces; + findWorkspaceRoot.isMatchWorkspaces = isMatchWorkspaces; + findWorkspaceRoot.default = findWorkspaceRoot; + exports2.default = findWorkspaceRoot; + } +}); + +// ../../node_modules/.pnpm/find-yarn-workspace-root2@1.2.16/node_modules/find-yarn-workspace-root2/index.js +var require_find_yarn_workspace_root2 = __commonJS({ + "../../node_modules/.pnpm/find-yarn-workspace-root2@1.2.16/node_modules/find-yarn-workspace-root2/index.js"(exports2, module2) { + "use strict"; + var core_1 = require_core5(); + module2.exports = core_1.findWorkspaceRoot; + } +}); + +// ../../node_modules/.pnpm/pify@4.0.1/node_modules/pify/index.js +var require_pify = __commonJS({ + "../../node_modules/.pnpm/pify@4.0.1/node_modules/pify/index.js"(exports2, module2) { + "use strict"; + var processFn = (fn2, options) => function(...args2) { + const P = options.promiseModule; + return new P((resolve, reject) => { + if (options.multiArgs) { + args2.push((...result) => { + if (options.errorFirst) { + if (result[0]) { + reject(result); + } else { + result.shift(); + resolve(result); + } + } else { + resolve(result); + } + }); + } else if (options.errorFirst) { + args2.push((error, result) => { + if (error) { + reject(error); + } else { + resolve(result); + } + }); + } else { + args2.push(resolve); + } + fn2.apply(this, args2); + }); + }; + module2.exports = (input, options) => { + options = Object.assign({ + exclude: [/.+(Sync|Stream)$/], + errorFirst: true, + promiseModule: Promise + }, options); + const objType = typeof input; + if (!(input !== null && (objType === "object" || objType === "function"))) { + throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${input === null ? "null" : objType}\``); + } + const filter = (key) => { + const match = (pattern) => typeof pattern === "string" ? key === pattern : pattern.test(key); + return options.include ? options.include.some(match) : !options.exclude.some(match); + }; + let ret; + if (objType === "function") { + ret = function(...args2) { + return options.excludeMain ? input(...args2) : processFn(input, options).apply(this, args2); + }; + } else { + ret = Object.create(Object.getPrototypeOf(input)); + } + for (const key in input) { + const property = input[key]; + ret[key] = typeof property === "function" && filter(key) ? processFn(property, options) : property; + } + return ret; + }; + } +}); + +// ../../node_modules/.pnpm/strip-bom@3.0.0/node_modules/strip-bom/index.js +var require_strip_bom2 = __commonJS({ + "../../node_modules/.pnpm/strip-bom@3.0.0/node_modules/strip-bom/index.js"(exports2, module2) { + "use strict"; + module2.exports = (x) => { + if (typeof x !== "string") { + throw new TypeError("Expected a string, got " + typeof x); + } + if (x.charCodeAt(0) === 65279) { + return x.slice(1); + } + return x; + }; + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/common.js +var require_common6 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/common.js"(exports2, module2) { + "use strict"; + function isNothing(subject) { + return typeof subject === "undefined" || subject === null; + } + function isObject(subject) { + return typeof subject === "object" && subject !== null; + } + function toArray(sequence) { + if (Array.isArray(sequence)) + return sequence; + else if (isNothing(sequence)) + return []; + return [sequence]; + } + function extend(target, source) { + var index, length, key, sourceKeys; + if (source) { + sourceKeys = Object.keys(source); + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + return target; + } + function repeat(string, count) { + var result = "", cycle; + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + return result; + } + function isNegativeZero(number) { + return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; + } + module2.exports.isNothing = isNothing; + module2.exports.isObject = isObject; + module2.exports.toArray = toArray; + module2.exports.repeat = repeat; + module2.exports.isNegativeZero = isNegativeZero; + module2.exports.extend = extend; + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/exception.js +var require_exception2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/exception.js"(exports2, module2) { + "use strict"; + function YAMLException(reason, mark) { + Error.call(this); + this.name = "YAMLException"; + this.reason = reason; + this.mark = mark; + this.message = (this.reason || "(unknown reason)") + (this.mark ? " " + this.mark.toString() : ""); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + this.stack = new Error().stack || ""; + } + } + YAMLException.prototype = Object.create(Error.prototype); + YAMLException.prototype.constructor = YAMLException; + YAMLException.prototype.toString = function toString(compact) { + var result = this.name + ": "; + result += this.reason || "(unknown reason)"; + if (!compact && this.mark) { + result += " " + this.mark.toString(); + } + return result; + }; + module2.exports = YAMLException; + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/mark.js +var require_mark = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/mark.js"(exports2, module2) { + "use strict"; + var common = require_common6(); + function Mark(name, buffer, position, line, column) { + this.name = name; + this.buffer = buffer; + this.position = position; + this.line = line; + this.column = column; + } + Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { + var head, start, tail, end, snippet; + if (!this.buffer) + return null; + indent = indent || 4; + maxLength = maxLength || 75; + head = ""; + start = this.position; + while (start > 0 && "\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(start - 1)) === -1) { + start -= 1; + if (this.position - start > maxLength / 2 - 1) { + head = " ... "; + start += 5; + break; + } + } + tail = ""; + end = this.position; + while (end < this.buffer.length && "\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(end)) === -1) { + end += 1; + if (end - this.position > maxLength / 2 - 1) { + tail = " ... "; + end -= 5; + break; + } + } + snippet = this.buffer.slice(start, end); + return common.repeat(" ", indent) + head + snippet + tail + "\n" + common.repeat(" ", indent + this.position - start + head.length) + "^"; + }; + Mark.prototype.toString = function toString(compact) { + var snippet, where = ""; + if (this.name) { + where += 'in "' + this.name + '" '; + } + where += "at line " + (this.line + 1) + ", column " + (this.column + 1); + if (!compact) { + snippet = this.getSnippet(); + if (snippet) { + where += ":\n" + snippet; + } + } + return where; + }; + module2.exports = Mark; + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type.js +var require_type3 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type.js"(exports2, module2) { + "use strict"; + var YAMLException = require_exception2(); + var TYPE_CONSTRUCTOR_OPTIONS = [ + "kind", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "defaultStyle", + "styleAliases" + ]; + var YAML_NODE_KINDS = [ + "scalar", + "sequence", + "mapping" + ]; + function compileStyleAliases(map) { + var result = {}; + if (map !== null) { + Object.keys(map).forEach(function(style) { + map[style].forEach(function(alias) { + result[String(alias)] = style; + }); + }); + } + return result; + } + function Type(tag, options) { + options = options || {}; + Object.keys(options).forEach(function(name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + this.tag = tag; + this.kind = options["kind"] || null; + this.resolve = options["resolve"] || function() { + return true; + }; + this.construct = options["construct"] || function(data) { + return data; + }; + this.instanceOf = options["instanceOf"] || null; + this.predicate = options["predicate"] || null; + this.represent = options["represent"] || null; + this.defaultStyle = options["defaultStyle"] || null; + this.styleAliases = compileStyleAliases(options["styleAliases"] || null); + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } + } + module2.exports = Type; + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema.js +var require_schema2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema.js"(exports2, module2) { + "use strict"; + var common = require_common6(); + var YAMLException = require_exception2(); + var Type = require_type3(); + function compileList(schema, name, result) { + var exclude = []; + schema.include.forEach(function(includedSchema) { + result = compileList(includedSchema, name, result); + }); + schema[name].forEach(function(currentType) { + result.forEach(function(previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) { + exclude.push(previousIndex); + } + }); + result.push(currentType); + }); + return result.filter(function(type, index) { + return exclude.indexOf(index) === -1; + }); + } + function compileMap() { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {} + }, index, length; + function collectType(type) { + result[type.kind][type.tag] = result["fallback"][type.tag] = type; + } + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; + } + function Schema(definition) { + this.include = definition.include || []; + this.implicit = definition.implicit || []; + this.explicit = definition.explicit || []; + this.implicit.forEach(function(type) { + if (type.loadKind && type.loadKind !== "scalar") { + throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); + } + }); + this.compiledImplicit = compileList(this, "implicit", []); + this.compiledExplicit = compileList(this, "explicit", []); + this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); + } + Schema.DEFAULT = null; + Schema.create = function createSchema() { + var schemas, types; + switch (arguments.length) { + case 1: + schemas = Schema.DEFAULT; + types = arguments[0]; + break; + case 2: + schemas = arguments[0]; + types = arguments[1]; + break; + default: + throw new YAMLException("Wrong number of arguments for Schema.create function"); + } + schemas = common.toArray(schemas); + types = common.toArray(types); + if (!schemas.every(function(schema) { + return schema instanceof Schema; + })) { + throw new YAMLException("Specified list of super schemas (or a single Schema object) contains a non-Schema object."); + } + if (!types.every(function(type) { + return type instanceof Type; + })) { + throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + return new Schema({ + include: schemas, + explicit: types + }); + }; + module2.exports = Schema; + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/str.js +var require_str2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/str.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + module2.exports = new Type("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(data) { + return data !== null ? data : ""; + } + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/seq.js +var require_seq2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/seq.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + module2.exports = new Type("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(data) { + return data !== null ? data : []; + } + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/map.js +var require_map5 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/map.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + module2.exports = new Type("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(data) { + return data !== null ? data : {}; + } + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +var require_failsafe2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js"(exports2, module2) { + "use strict"; + var Schema = require_schema2(); + module2.exports = new Schema({ + explicit: [ + require_str2(), + require_seq2(), + require_map5() + ] + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/null.js +var require_null2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/null.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + function resolveYamlNull(data) { + if (data === null) + return true; + var max = data.length; + return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); + } + function constructYamlNull() { + return null; + } + function isNull(object) { + return object === null; + } + module2.exports = new Type("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function() { + return "~"; + }, + lowercase: function() { + return "null"; + }, + uppercase: function() { + return "NULL"; + }, + camelcase: function() { + return "Null"; + } + }, + defaultStyle: "lowercase" + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/bool.js +var require_bool2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/bool.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + function resolveYamlBoolean(data) { + if (data === null) + return false; + var max = data.length; + return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE"); + } + function constructYamlBoolean(data) { + return data === "true" || data === "True" || data === "TRUE"; + } + function isBoolean(object) { + return Object.prototype.toString.call(object) === "[object Boolean]"; + } + module2.exports = new Type("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function(object) { + return object ? "true" : "false"; + }, + uppercase: function(object) { + return object ? "TRUE" : "FALSE"; + }, + camelcase: function(object) { + return object ? "True" : "False"; + } + }, + defaultStyle: "lowercase" + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/int.js +var require_int2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/int.js"(exports2, module2) { + "use strict"; + var common = require_common6(); + var Type = require_type3(); + function isHexCode(c) { + return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102; + } + function isOctCode(c) { + return 48 <= c && c <= 55; + } + function isDecCode(c) { + return 48 <= c && c <= 57; + } + function resolveYamlInteger(data) { + if (data === null) + return false; + var max = data.length, index = 0, hasDigits = false, ch; + if (!max) + return false; + ch = data[index]; + if (ch === "-" || ch === "+") { + ch = data[++index]; + } + if (ch === "0") { + if (index + 1 === max) + return true; + ch = data[++index]; + if (ch === "b") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (ch !== "0" && ch !== "1") + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "x") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (!isHexCode(data.charCodeAt(index))) + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (!isOctCode(data.charCodeAt(index))) + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "_") + return false; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (ch === ":") + break; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + if (!hasDigits || ch === "_") + return false; + if (ch !== ":") + return true; + return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); + } + function constructYamlInteger(data) { + var value = data, sign = 1, ch, base, digits = []; + if (value.indexOf("_") !== -1) { + value = value.replace(/_/g, ""); + } + ch = value[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") + sign = -1; + value = value.slice(1); + ch = value[0]; + } + if (value === "0") + return 0; + if (ch === "0") { + if (value[1] === "b") + return sign * parseInt(value.slice(2), 2); + if (value[1] === "x") + return sign * parseInt(value, 16); + return sign * parseInt(value, 8); + } + if (value.indexOf(":") !== -1) { + value.split(":").forEach(function(v) { + digits.unshift(parseInt(v, 10)); + }); + value = 0; + base = 1; + digits.forEach(function(d) { + value += d * base; + base *= 60; + }); + return sign * value; + } + return sign * parseInt(value, 10); + } + function isInteger(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object)); + } + module2.exports = new Type("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function(obj) { + return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); + }, + octal: function(obj) { + return obj >= 0 ? "0" + obj.toString(8) : "-0" + obj.toString(8).slice(1); + }, + decimal: function(obj) { + return obj.toString(10); + }, + hexadecimal: function(obj) { + return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); + } + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] + } + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/float.js +var require_float2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/float.js"(exports2, module2) { + "use strict"; + var common = require_common6(); + var Type = require_type3(); + var YAML_FLOAT_PATTERN = new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); + function resolveYamlFloat(data) { + if (data === null) + return false; + if (!YAML_FLOAT_PATTERN.test(data) || data[data.length - 1] === "_") { + return false; + } + return true; + } + function constructYamlFloat(data) { + var value, sign, base, digits; + value = data.replace(/_/g, "").toLowerCase(); + sign = value[0] === "-" ? -1 : 1; + digits = []; + if ("+-".indexOf(value[0]) >= 0) { + value = value.slice(1); + } + if (value === ".inf") { + return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + } else if (value === ".nan") { + return NaN; + } else if (value.indexOf(":") >= 0) { + value.split(":").forEach(function(v) { + digits.unshift(parseFloat(v, 10)); + }); + value = 0; + base = 1; + digits.forEach(function(d) { + value += d * base; + base *= 60; + }); + return sign * value; + } + return sign * parseFloat(value, 10); + } + var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + function representYamlFloat(object, style) { + var res; + if (isNaN(object)) { + switch (style) { + case "lowercase": + return ".nan"; + case "uppercase": + return ".NAN"; + case "camelcase": + return ".NaN"; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return ".inf"; + case "uppercase": + return ".INF"; + case "camelcase": + return ".Inf"; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return "-.inf"; + case "uppercase": + return "-.INF"; + case "camelcase": + return "-.Inf"; + } + } else if (common.isNegativeZero(object)) { + return "-0.0"; + } + res = object.toString(10); + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; + } + function isFloat(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); + } + module2.exports = new Type("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: "lowercase" + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/json.js +var require_json2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/json.js"(exports2, module2) { + "use strict"; + var Schema = require_schema2(); + module2.exports = new Schema({ + include: [ + require_failsafe2() + ], + implicit: [ + require_null2(), + require_bool2(), + require_int2(), + require_float2() + ] + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/core.js +var require_core6 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/core.js"(exports2, module2) { + "use strict"; + var Schema = require_schema2(); + module2.exports = new Schema({ + include: [ + require_json2() + ] + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +var require_timestamp3 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/timestamp.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + var YAML_DATE_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"); + var YAML_TIMESTAMP_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"); + function resolveYamlTimestamp(data) { + if (data === null) + return false; + if (YAML_DATE_REGEXP.exec(data) !== null) + return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) + return true; + return false; + } + function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; + match = YAML_DATE_REGEXP.exec(data); + if (match === null) + match = YAML_TIMESTAMP_REGEXP.exec(data); + if (match === null) + throw new Error("Date resolve error"); + year = +match[1]; + month = +match[2] - 1; + day = +match[3]; + if (!match[4]) { + return new Date(Date.UTC(year, month, day)); + } + hour = +match[4]; + minute = +match[5]; + second = +match[6]; + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { + fraction += "0"; + } + fraction = +fraction; + } + if (match[9]) { + tz_hour = +match[10]; + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 6e4; + if (match[9] === "-") + delta = -delta; + } + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + if (delta) + date.setTime(date.getTime() - delta); + return date; + } + function representYamlTimestamp(object) { + return object.toISOString(); + } + module2.exports = new Type("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/merge.js +var require_merge5 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/merge.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + function resolveYamlMerge(data) { + return data === "<<" || data === null; + } + module2.exports = new Type("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/binary.js +var require_binary2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/binary.js"(exports2, module2) { + "use strict"; + var NodeBuffer; + try { + _require = require; + NodeBuffer = _require("buffer").Buffer; + } catch (__) { + } + var _require; + var Type = require_type3(); + var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; + function resolveYamlBinary(data) { + if (data === null) + return false; + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + if (code > 64) + continue; + if (code < 0) + return false; + bitlen += 6; + } + return bitlen % 8 === 0; + } + function constructYamlBinary(data) { + var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map = BASE64_MAP, bits = 0, result = []; + for (idx = 0; idx < max; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } + bits = bits << 6 | map.indexOf(input.charAt(idx)); + } + tailbits = max % 4 * 6; + if (tailbits === 0) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } else if (tailbits === 18) { + result.push(bits >> 10 & 255); + result.push(bits >> 2 & 255); + } else if (tailbits === 12) { + result.push(bits >> 4 & 255); + } + if (NodeBuffer) { + return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result); + } + return result; + } + function representYamlBinary(object) { + var result = "", bits = 0, idx, tail, max = object.length, map = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } + bits = (bits << 8) + object[idx]; + } + tail = max % 3; + if (tail === 0) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } else if (tail === 2) { + result += map[bits >> 10 & 63]; + result += map[bits >> 4 & 63]; + result += map[bits << 2 & 63]; + result += map[64]; + } else if (tail === 1) { + result += map[bits >> 2 & 63]; + result += map[bits << 4 & 63]; + result += map[64]; + result += map[64]; + } + return result; + } + function isBinary(object) { + return NodeBuffer && NodeBuffer.isBuffer(object); + } + module2.exports = new Type("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/omap.js +var require_omap2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/omap.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var _toString = Object.prototype.toString; + function resolveYamlOmap(data) { + if (data === null) + return true; + var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data; + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + if (_toString.call(pair) !== "[object Object]") + return false; + for (pairKey in pair) { + if (_hasOwnProperty.call(pair, pairKey)) { + if (!pairHasKey) + pairHasKey = true; + else + return false; + } + } + if (!pairHasKey) + return false; + if (objectKeys.indexOf(pairKey) === -1) + objectKeys.push(pairKey); + else + return false; + } + return true; + } + function constructYamlOmap(data) { + return data !== null ? data : []; + } + module2.exports = new Type("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap, + construct: constructYamlOmap + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/pairs.js +var require_pairs3 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/pairs.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + var _toString = Object.prototype.toString; + function resolveYamlPairs(data) { + if (data === null) + return true; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + if (_toString.call(pair) !== "[object Object]") + return false; + keys = Object.keys(pair); + if (keys.length !== 1) + return false; + result[index] = [keys[0], pair[keys[0]]]; + } + return true; + } + function constructYamlPairs(data) { + if (data === null) + return []; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + keys = Object.keys(pair); + result[index] = [keys[0], pair[keys[0]]]; + } + return result; + } + module2.exports = new Type("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs, + construct: constructYamlPairs + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/set.js +var require_set2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/set.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + function resolveYamlSet(data) { + if (data === null) + return true; + var key, object = data; + for (key in object) { + if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) + return false; + } + } + return true; + } + function constructYamlSet(data) { + return data !== null ? data : {}; + } + module2.exports = new Type("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet, + construct: constructYamlSet + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +var require_default_safe = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js"(exports2, module2) { + "use strict"; + var Schema = require_schema2(); + module2.exports = new Schema({ + include: [ + require_core6() + ], + implicit: [ + require_timestamp3(), + require_merge5() + ], + explicit: [ + require_binary2(), + require_omap2(), + require_pairs3(), + require_set2() + ] + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +var require_undefined = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + function resolveJavascriptUndefined() { + return true; + } + function constructJavascriptUndefined() { + return void 0; + } + function representJavascriptUndefined() { + return ""; + } + function isUndefined(object) { + return typeof object === "undefined"; + } + module2.exports = new Type("tag:yaml.org,2002:js/undefined", { + kind: "scalar", + resolve: resolveJavascriptUndefined, + construct: constructJavascriptUndefined, + predicate: isUndefined, + represent: representJavascriptUndefined + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +var require_regexp = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js"(exports2, module2) { + "use strict"; + var Type = require_type3(); + function resolveJavascriptRegExp(data) { + if (data === null) + return false; + if (data.length === 0) + return false; + var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = ""; + if (regexp[0] === "/") { + if (tail) + modifiers = tail[1]; + if (modifiers.length > 3) + return false; + if (regexp[regexp.length - modifiers.length - 1] !== "/") + return false; + } + return true; + } + function constructJavascriptRegExp(data) { + var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = ""; + if (regexp[0] === "/") { + if (tail) + modifiers = tail[1]; + regexp = regexp.slice(1, regexp.length - modifiers.length - 1); + } + return new RegExp(regexp, modifiers); + } + function representJavascriptRegExp(object) { + var result = "/" + object.source + "/"; + if (object.global) + result += "g"; + if (object.multiline) + result += "m"; + if (object.ignoreCase) + result += "i"; + return result; + } + function isRegExp(object) { + return Object.prototype.toString.call(object) === "[object RegExp]"; + } + module2.exports = new Type("tag:yaml.org,2002:js/regexp", { + kind: "scalar", + resolve: resolveJavascriptRegExp, + construct: constructJavascriptRegExp, + predicate: isRegExp, + represent: representJavascriptRegExp + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/js/function.js +var require_function = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/type/js/function.js"(exports2, module2) { + "use strict"; + var esprima; + try { + _require = require; + esprima = _require("esprima"); + } catch (_) { + if (typeof window !== "undefined") + esprima = window.esprima; + } + var _require; + var Type = require_type3(); + function resolveJavascriptFunction(data) { + if (data === null) + return false; + try { + var source = "(" + data + ")", ast = esprima.parse(source, { range: true }); + if (ast.type !== "Program" || ast.body.length !== 1 || ast.body[0].type !== "ExpressionStatement" || ast.body[0].expression.type !== "ArrowFunctionExpression" && ast.body[0].expression.type !== "FunctionExpression") { + return false; + } + return true; + } catch (err) { + return false; + } + } + function constructJavascriptFunction(data) { + var source = "(" + data + ")", ast = esprima.parse(source, { range: true }), params = [], body; + if (ast.type !== "Program" || ast.body.length !== 1 || ast.body[0].type !== "ExpressionStatement" || ast.body[0].expression.type !== "ArrowFunctionExpression" && ast.body[0].expression.type !== "FunctionExpression") { + throw new Error("Failed to resolve function"); + } + ast.body[0].expression.params.forEach(function(param) { + params.push(param.name); + }); + body = ast.body[0].expression.body.range; + if (ast.body[0].expression.body.type === "BlockStatement") { + return new Function(params, source.slice(body[0] + 1, body[1] - 1)); + } + return new Function(params, "return " + source.slice(body[0], body[1])); + } + function representJavascriptFunction(object) { + return object.toString(); + } + function isFunction(object) { + return Object.prototype.toString.call(object) === "[object Function]"; + } + module2.exports = new Type("tag:yaml.org,2002:js/function", { + kind: "scalar", + resolve: resolveJavascriptFunction, + construct: constructJavascriptFunction, + predicate: isFunction, + represent: representJavascriptFunction + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +var require_default_full = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/schema/default_full.js"(exports2, module2) { + "use strict"; + var Schema = require_schema2(); + module2.exports = Schema.DEFAULT = new Schema({ + include: [ + require_default_safe() + ], + explicit: [ + require_undefined(), + require_regexp(), + require_function() + ] + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/loader.js +var require_loader2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/loader.js"(exports2, module2) { + "use strict"; + var common = require_common6(); + var YAMLException = require_exception2(); + var Mark = require_mark(); + var DEFAULT_SAFE_SCHEMA = require_default_safe(); + var DEFAULT_FULL_SCHEMA = require_default_full(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CONTEXT_FLOW_IN = 1; + var CONTEXT_FLOW_OUT = 2; + var CONTEXT_BLOCK_IN = 3; + var CONTEXT_BLOCK_OUT = 4; + var CHOMPING_CLIP = 1; + var CHOMPING_STRIP = 2; + var CHOMPING_KEEP = 3; + var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; + var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; + var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; + var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + function _class(obj) { + return Object.prototype.toString.call(obj); + } + function is_EOL(c) { + return c === 10 || c === 13; + } + function is_WHITE_SPACE(c) { + return c === 9 || c === 32; + } + function is_WS_OR_EOL(c) { + return c === 9 || c === 32 || c === 10 || c === 13; + } + function is_FLOW_INDICATOR(c) { + return c === 44 || c === 91 || c === 93 || c === 123 || c === 125; + } + function fromHexCode(c) { + var lc; + if (48 <= c && c <= 57) { + return c - 48; + } + lc = c | 32; + if (97 <= lc && lc <= 102) { + return lc - 97 + 10; + } + return -1; + } + function escapedHexLen(c) { + if (c === 120) { + return 2; + } + if (c === 117) { + return 4; + } + if (c === 85) { + return 8; + } + return 0; + } + function fromDecimalCode(c) { + if (48 <= c && c <= 57) { + return c - 48; + } + return -1; + } + function simpleEscapeSequence(c) { + return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\x85" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : ""; + } + function charFromCodepoint(c) { + if (c <= 65535) { + return String.fromCharCode(c); + } + return String.fromCharCode((c - 65536 >> 10) + 55296, (c - 65536 & 1023) + 56320); + } + var simpleEscapeCheck = new Array(256); + var simpleEscapeMap = new Array(256); + for (i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); + } + var i; + function State(input, options) { + this.input = input; + this.filename = options["filename"] || null; + this.schema = options["schema"] || DEFAULT_FULL_SCHEMA; + this.onWarning = options["onWarning"] || null; + this.legacy = options["legacy"] || false; + this.json = options["json"] || false; + this.listener = options["listener"] || null; + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + this.documents = []; + } + function generateError(state, message2) { + return new YAMLException(message2, new Mark(state.filename, state.input, state.position, state.line, state.position - state.lineStart)); + } + function throwError(state, message2) { + throw generateError(state, message2); + } + function throwWarning(state, message2) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message2)); + } + } + var directiveHandlers = { + YAML: function handleYamlDirective(state, name, args2) { + var match, major, minor; + if (state.version !== null) { + throwError(state, "duplication of %YAML directive"); + } + if (args2.length !== 1) { + throwError(state, "YAML directive accepts exactly one argument"); + } + match = /^([0-9]+)\.([0-9]+)$/.exec(args2[0]); + if (match === null) { + throwError(state, "ill-formed argument of the YAML directive"); + } + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + if (major !== 1) { + throwError(state, "unacceptable YAML version of the document"); + } + state.version = args2[0]; + state.checkLineBreaks = minor < 2; + if (minor !== 1 && minor !== 2) { + throwWarning(state, "unsupported YAML version of the document"); + } + }, + TAG: function handleTagDirective(state, name, args2) { + var handle, prefix; + if (args2.length !== 2) { + throwError(state, "TAG directive accepts exactly two arguments"); + } + handle = args2[0]; + prefix = args2[1]; + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, "ill-formed tag handle (first argument) of the TAG directive"); + } + if (_hasOwnProperty.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, "ill-formed tag prefix (second argument) of the TAG directive"); + } + state.tagMap[handle] = prefix; + } + }; + function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + if (start < end) { + _result = state.input.slice(start, end); + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 9 || 32 <= _character && _character <= 1114111)) { + throwError(state, "expected valid JSON character"); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, "the stream contains non-printable characters"); + } + state.result += _result; + } + } + function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + if (!common.isObject(source)) { + throwError(state, "cannot merge mappings; the provided source object is unacceptable"); + } + sourceKeys = Object.keys(source); + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + if (!_hasOwnProperty.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } + } + function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) { + var index, quantity; + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state, "nested arrays are not supported inside keys"); + } + if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") { + keyNode[index] = "[object Object]"; + } + } + } + if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") { + keyNode = "[object Object]"; + } + keyNode = String(keyNode); + if (_result === null) { + _result = {}; + } + if (keyTag === "tag:yaml.org,2002:merge") { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) { + state.line = startLine || state.line; + state.position = startPos || state.position; + throwError(state, "duplicated mapping key"); + } + _result[keyNode] = valueNode; + delete overridableKeys[keyNode]; + } + return _result; + } + function readLineBreak(state) { + var ch; + ch = state.input.charCodeAt(state.position); + if (ch === 10) { + state.position++; + } else if (ch === 13) { + state.position++; + if (state.input.charCodeAt(state.position) === 10) { + state.position++; + } + } else { + throwError(state, "a line break is expected"); + } + state.line += 1; + state.lineStart = state.position; + } + function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (allowComments && ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 10 && ch !== 13 && ch !== 0); + } + if (is_EOL(ch)) { + readLineBreak(state); + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + while (ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, "deficient indentation"); + } + return lineBreaks; + } + function testDocumentSeparator(state) { + var _position = state.position, ch; + ch = state.input.charCodeAt(_position); + if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) { + _position += 3; + ch = state.input.charCodeAt(_position); + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + return false; + } + function writeFoldedLines(state, count) { + if (count === 1) { + state.result += " "; + } else if (count > 1) { + state.result += common.repeat("\n", count - 1); + } + } + function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch; + ch = state.input.charCodeAt(state.position); + if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) { + return false; + } + if (ch === 63 || ch === 45) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + state.kind = "scalar"; + state.result = ""; + captureStart = captureEnd = state.position; + hasPendingContent = false; + while (ch !== 0) { + if (ch === 58) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + } else if (ch === 35) { + preceding = state.input.charCodeAt(state.position - 1); + if (is_WS_OR_EOL(preceding)) { + break; + } + } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + ch = state.input.charCodeAt(++state.position); + } + captureSegment(state, captureStart, captureEnd, false); + if (state.result) { + return true; + } + state.kind = _kind; + state.result = _result; + return false; + } + function readSingleQuotedScalar(state, nodeIndent) { + var ch, captureStart, captureEnd; + ch = state.input.charCodeAt(state.position); + if (ch !== 39) { + return false; + } + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 39) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (ch === 39) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, "unexpected end of the document within a single quoted scalar"); + } else { + state.position++; + captureEnd = state.position; + } + } + throwError(state, "unexpected end of the stream within a single quoted scalar"); + } + function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, captureEnd, hexLength, hexResult, tmp, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 34) { + return false; + } + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 34) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + } else if (ch === 92) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + } else { + throwError(state, "expected hexadecimal character"); + } + } + state.result += charFromCodepoint(hexResult); + state.position++; + } else { + throwError(state, "unknown escape sequence"); + } + captureStart = captureEnd = state.position; + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, "unexpected end of the document within a double quoted scalar"); + } else { + state.position++; + captureEnd = state.position; + } + } + throwError(state, "unexpected end of the stream within a double quoted scalar"); + } + function readFlowCollection(state, nodeIndent) { + var readNext = true, _line, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = {}, keyNode, keyTag, valueNode, ch; + ch = state.input.charCodeAt(state.position); + if (ch === 91) { + terminator = 93; + isMapping = false; + _result = []; + } else if (ch === 123) { + terminator = 125; + isMapping = true; + _result = {}; + } else { + return false; + } + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(++state.position); + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? "mapping" : "sequence"; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, "missed comma between flow collection entries"); + } + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + if (ch === 63) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if ((isExplicitPair || state.line === _line) && ch === 58) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode)); + } else { + _result.push(keyNode); + } + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === 44) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + throwError(state, "unexpected end of the stream within a flow collection"); + } + function readBlockScalar(state, nodeIndent) { + var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch; + ch = state.input.charCodeAt(state.position); + if (ch === 124) { + folding = false; + } else if (ch === 62) { + folding = true; + } else { + return false; + } + state.kind = "scalar"; + state.result = ""; + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + if (ch === 43 || ch === 45) { + if (CHOMPING_CLIP === chomping) { + chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, "repeat of a chomping mode identifier"); + } + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one"); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, "repeat of an indentation width identifier"); + } + } else { + break; + } + } + if (is_WHITE_SPACE(ch)) { + do { + ch = state.input.charCodeAt(++state.position); + } while (is_WHITE_SPACE(ch)); + if (ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (!is_EOL(ch) && ch !== 0); + } + } + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + ch = state.input.charCodeAt(state.position); + while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + if (is_EOL(ch)) { + emptyLines++; + continue; + } + if (state.lineIndent < textIndent) { + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { + state.result += "\n"; + } + } + break; + } + if (folding) { + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat("\n", emptyLines + 1); + } else if (emptyLines === 0) { + if (didReadContent) { + state.result += " "; + } + } else { + state.result += common.repeat("\n", emptyLines); + } + } else { + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + while (!is_EOL(ch) && ch !== 0) { + ch = state.input.charCodeAt(++state.position); + } + captureSegment(state, captureStart, state.position, false); + } + return true; + } + function readBlockSequence(state, nodeIndent) { + var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + if (ch !== 45) { + break; + } + following = state.input.charCodeAt(state.position + 1); + if (!is_WS_OR_EOL(following)) { + break; + } + detected = true; + state.position++; + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { + throwError(state, "bad indentation of a sequence entry"); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "sequence"; + state.result = _result; + return true; + } + return false; + } + function readBlockMapping(state, nodeIndent, flowIndent) { + var following, allowCompact, _line, _pos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = {}, keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + following = state.input.charCodeAt(state.position + 1); + _line = state.line; + _pos = state.position; + if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) { + if (ch === 63) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = true; + allowCompact = true; + } else if (atExplicitKey) { + atExplicitKey = false; + allowCompact = true; + } else { + throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"); + } + state.position += 1; + ch = following; + } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (ch === 58) { + ch = state.input.charCodeAt(++state.position); + if (!is_WS_OR_EOL(ch)) { + throwError(state, "a whitespace character is expected after the key-value separator within a block mapping"); + } + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + } else if (detected) { + throwError(state, "can not read an implicit mapping pair; a colon is missed"); + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } else if (detected) { + throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key"); + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } else { + break; + } + if (state.line === _line || state.lineIndent > nodeIndent) { + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos); + keyTag = keyNode = valueNode = null; + } + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + if (state.lineIndent > nodeIndent && ch !== 0) { + throwError(state, "bad indentation of a mapping entry"); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "mapping"; + state.result = _result; + } + return detected; + } + function readTagProperty(state) { + var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 33) + return false; + if (state.tag !== null) { + throwError(state, "duplication of a tag property"); + } + ch = state.input.charCodeAt(++state.position); + if (ch === 60) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + } else if (ch === 33) { + isNamed = true; + tagHandle = "!!"; + ch = state.input.charCodeAt(++state.position); + } else { + tagHandle = "!"; + } + _position = state.position; + if (isVerbatim) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0 && ch !== 62); + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, "unexpected end of the stream within a verbatim tag"); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + if (ch === 33) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, "named tag handle cannot contain such characters"); + } + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, "tag suffix cannot contain exclamation marks"); + } + } + ch = state.input.charCodeAt(++state.position); + } + tagName = state.input.slice(_position, state.position); + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, "tag suffix cannot contain flow indicator characters"); + } + } + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, "tag name cannot contain such characters: " + tagName); + } + if (isVerbatim) { + state.tag = tagName; + } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + } else if (tagHandle === "!") { + state.tag = "!" + tagName; + } else if (tagHandle === "!!") { + state.tag = "tag:yaml.org,2002:" + tagName; + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + return true; + } + function readAnchorProperty(state) { + var _position, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 38) + return false; + if (state.anchor !== null) { + throwError(state, "duplication of an anchor property"); + } + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position === _position) { + throwError(state, "name of an anchor node must contain at least one character"); + } + state.anchor = state.input.slice(_position, state.position); + return true; + } + function readAlias(state) { + var _position, alias, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 42) + return false; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position === _position) { + throwError(state, "name of an alias node must contain at least one character"); + } + alias = state.input.slice(_position, state.position); + if (!_hasOwnProperty.call(state.anchorMap, alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; + } + function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, type, flowIndent, blockIndent; + if (state.listener !== null) { + state.listener("open", state); + } + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext; + if (allowToSeek) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + blockIndent = state.position - state.lineStart; + if (indentStatus === 1) { + if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + } else if (readAlias(state)) { + hasContent = true; + if (state.tag !== null || state.anchor !== null) { + throwError(state, "alias node should not have any properties"); + } + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + if (state.tag === null) { + state.tag = "?"; + } + } + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + if (state.tag !== null && state.tag !== "!") { + if (state.tag === "?") { + if (state.result !== null && state.kind !== "scalar") { + throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); + } + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + if (type.resolve(state.result)) { + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) { + type = state.typeMap[state.kind || "fallback"][state.tag]; + if (state.result !== null && type.kind !== state.kind) { + throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + if (!type.resolve(state.result)) { + throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag"); + } else { + state.result = type.construct(state.result); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else { + throwError(state, "unknown tag !<" + state.tag + ">"); + } + } + if (state.listener !== null) { + state.listener("close", state); + } + return state.tag !== null || state.anchor !== null || hasContent; + } + function readDocument(state) { + var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = {}; + state.anchorMap = {}; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if (state.lineIndent > 0 || ch !== 37) { + break; + } + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + if (directiveName.length < 1) { + throwError(state, "directive name must not be less than one character in length"); + } + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0 && !is_EOL(ch)); + break; + } + if (is_EOL(ch)) + break; + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveArgs.push(state.input.slice(_position, state.position)); + } + if (ch !== 0) + readLineBreak(state); + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + skipSeparationSpace(state, true, -1); + if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } else if (hasDirectives) { + throwError(state, "directives end mark is expected"); + } + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, "non-ASCII line breaks are interpreted as content"); + } + state.documents.push(state.result); + if (state.position === state.lineStart && testDocumentSeparator(state)) { + if (state.input.charCodeAt(state.position) === 46) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + if (state.position < state.length - 1) { + throwError(state, "end of the stream or a document separator is expected"); + } else { + return; + } + } + function loadDocuments(input, options) { + input = String(input); + options = options || {}; + if (input.length !== 0) { + if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) { + input += "\n"; + } + if (input.charCodeAt(0) === 65279) { + input = input.slice(1); + } + } + var state = new State(input, options); + var nullpos = input.indexOf("\0"); + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, "null byte is not allowed in input"); + } + state.input += "\0"; + while (state.input.charCodeAt(state.position) === 32) { + state.lineIndent += 1; + state.position += 1; + } + while (state.position < state.length - 1) { + readDocument(state); + } + return state.documents; + } + function loadAll(input, iterator, options) { + if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") { + options = iterator; + iterator = null; + } + var documents = loadDocuments(input, options); + if (typeof iterator !== "function") { + return documents; + } + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } + } + function load(input, options) { + var documents = loadDocuments(input, options); + if (documents.length === 0) { + return void 0; + } else if (documents.length === 1) { + return documents[0]; + } + throw new YAMLException("expected a single document in the stream, but found more"); + } + function safeLoadAll(input, iterator, options) { + if (typeof iterator === "object" && iterator !== null && typeof options === "undefined") { + options = iterator; + iterator = null; + } + return loadAll(input, iterator, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } + function safeLoad(input, options) { + return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } + module2.exports.loadAll = loadAll; + module2.exports.load = load; + module2.exports.safeLoadAll = safeLoadAll; + module2.exports.safeLoad = safeLoad; + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/dumper.js +var require_dumper2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml/dumper.js"(exports2, module2) { + "use strict"; + var common = require_common6(); + var YAMLException = require_exception2(); + var DEFAULT_FULL_SCHEMA = require_default_full(); + var DEFAULT_SAFE_SCHEMA = require_default_safe(); + var _toString = Object.prototype.toString; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CHAR_TAB = 9; + var CHAR_LINE_FEED = 10; + var CHAR_CARRIAGE_RETURN = 13; + var CHAR_SPACE = 32; + var CHAR_EXCLAMATION = 33; + var CHAR_DOUBLE_QUOTE = 34; + var CHAR_SHARP = 35; + var CHAR_PERCENT = 37; + var CHAR_AMPERSAND = 38; + var CHAR_SINGLE_QUOTE = 39; + var CHAR_ASTERISK = 42; + var CHAR_COMMA = 44; + var CHAR_MINUS = 45; + var CHAR_COLON = 58; + var CHAR_EQUALS = 61; + var CHAR_GREATER_THAN = 62; + var CHAR_QUESTION = 63; + var CHAR_COMMERCIAL_AT = 64; + var CHAR_LEFT_SQUARE_BRACKET = 91; + var CHAR_RIGHT_SQUARE_BRACKET = 93; + var CHAR_GRAVE_ACCENT = 96; + var CHAR_LEFT_CURLY_BRACKET = 123; + var CHAR_VERTICAL_LINE = 124; + var CHAR_RIGHT_CURLY_BRACKET = 125; + var ESCAPE_SEQUENCES = {}; + ESCAPE_SEQUENCES[0] = "\\0"; + ESCAPE_SEQUENCES[7] = "\\a"; + ESCAPE_SEQUENCES[8] = "\\b"; + ESCAPE_SEQUENCES[9] = "\\t"; + ESCAPE_SEQUENCES[10] = "\\n"; + ESCAPE_SEQUENCES[11] = "\\v"; + ESCAPE_SEQUENCES[12] = "\\f"; + ESCAPE_SEQUENCES[13] = "\\r"; + ESCAPE_SEQUENCES[27] = "\\e"; + ESCAPE_SEQUENCES[34] = '\\"'; + ESCAPE_SEQUENCES[92] = "\\\\"; + ESCAPE_SEQUENCES[133] = "\\N"; + ESCAPE_SEQUENCES[160] = "\\_"; + ESCAPE_SEQUENCES[8232] = "\\L"; + ESCAPE_SEQUENCES[8233] = "\\P"; + var DEPRECATED_BOOLEANS_SYNTAX = [ + "y", + "Y", + "yes", + "Yes", + "YES", + "on", + "On", + "ON", + "n", + "N", + "no", + "No", + "NO", + "off", + "Off", + "OFF" + ]; + function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + if (map === null) + return {}; + result = {}; + keys = Object.keys(map); + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + if (tag.slice(0, 2) === "!!") { + tag = "tag:yaml.org,2002:" + tag.slice(2); + } + type = schema.compiledTypeMap["fallback"][tag]; + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + result[tag] = style; + } + return result; + } + function encodeHex(character) { + var string, handle, length; + string = character.toString(16).toUpperCase(); + if (character <= 255) { + handle = "x"; + length = 2; + } else if (character <= 65535) { + handle = "u"; + length = 4; + } else if (character <= 4294967295) { + handle = "U"; + length = 8; + } else { + throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF"); + } + return "\\" + handle + common.repeat("0", length - string.length) + string; + } + function State(options) { + this.schema = options["schema"] || DEFAULT_FULL_SCHEMA; + this.indent = Math.max(1, options["indent"] || 2); + this.noArrayIndent = options["noArrayIndent"] || false; + this.skipInvalid = options["skipInvalid"] || false; + this.flowLevel = common.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"]; + this.styleMap = compileStyleMap(this.schema, options["styles"] || null); + this.sortKeys = options["sortKeys"] || false; + this.lineWidth = options["lineWidth"] || 80; + this.noRefs = options["noRefs"] || false; + this.noCompatMode = options["noCompatMode"] || false; + this.condenseFlow = options["condenseFlow"] || false; + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + this.tag = null; + this.result = ""; + this.duplicates = []; + this.usedDuplicates = null; + } + function indentString(string, spaces) { + var ind = common.repeat(" ", spaces), position = 0, next = -1, result = "", line, length = string.length; + while (position < length) { + next = string.indexOf("\n", position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + if (line.length && line !== "\n") + result += ind; + result += line; + } + return result; + } + function generateNextLine(state, level) { + return "\n" + common.repeat(" ", state.indent * level); + } + function testImplicitResolving(state, str) { + var index, length, type; + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + if (type.resolve(str)) { + return true; + } + } + return false; + } + function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; + } + function isPrintable(c) { + return 32 <= c && c <= 126 || 161 <= c && c <= 55295 && c !== 8232 && c !== 8233 || 57344 <= c && c <= 65533 && c !== 65279 || 65536 <= c && c <= 1114111; + } + function isNsChar(c) { + return isPrintable(c) && !isWhitespace(c) && c !== 65279 && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED; + } + function isPlainSafe(c, prev) { + return isPrintable(c) && c !== 65279 && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_COLON && (c !== CHAR_SHARP || prev && isNsChar(prev)); + } + function isPlainSafeFirst(c) { + return isPrintable(c) && c !== 65279 && !isWhitespace(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT; + } + function needIndentIndicator(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); + } + var STYLE_PLAIN = 1; + var STYLE_SINGLE = 2; + var STYLE_LITERAL = 3; + var STYLE_FOLDED = 4; + var STYLE_DOUBLE = 5; + function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { + var i; + var char, prev_char; + var hasLineBreak = false; + var hasFoldableLine = false; + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; + var plain = isPlainSafeFirst(string.charCodeAt(0)) && !isWhitespace(string.charCodeAt(string.length - 1)); + if (singleLineOnly) { + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + prev_char = i > 0 ? string.charCodeAt(i - 1) : null; + plain = plain && isPlainSafe(char, prev_char); + } + } else { + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "; + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + prev_char = i > 0 ? string.charCodeAt(i - 1) : null; + plain = plain && isPlainSafe(char, prev_char); + } + hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "); + } + if (!hasLineBreak && !hasFoldableLine) { + return plain && !testAmbiguousType(string) ? STYLE_PLAIN : STYLE_SINGLE; + } + if (indentPerLevel > 9 && needIndentIndicator(string)) { + return STYLE_DOUBLE; + } + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; + } + function writeScalar(state, string, level, iskey) { + state.dump = function() { + if (string.length === 0) { + return "''"; + } + if (!state.noCompatMode && DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) { + return "'" + string + "'"; + } + var indent = state.indent * Math.max(1, level); + var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + var singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel; + function testAmbiguity(string2) { + return testImplicitResolving(state, string2); + } + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) { + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return "|" + blockHeader(string, state.indent) + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return ">" + blockHeader(string, state.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + default: + throw new YAMLException("impossible error: invalid scalar style"); + } + }(); + } + function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ""; + var clip = string[string.length - 1] === "\n"; + var keep = clip && (string[string.length - 2] === "\n" || string === "\n"); + var chomp = keep ? "+" : clip ? "" : "-"; + return indentIndicator + chomp + "\n"; + } + function dropEndingNewline(string) { + return string[string.length - 1] === "\n" ? string.slice(0, -1) : string; + } + function foldString(string, width) { + var lineRe = /(\n+)([^\n]*)/g; + var result = function() { + var nextLF = string.indexOf("\n"); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }(); + var prevMoreIndented = string[0] === "\n" || string[0] === " "; + var moreIndented; + var match; + while (match = lineRe.exec(string)) { + var prefix = match[1], line = match[2]; + moreIndented = line[0] === " "; + result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); + prevMoreIndented = moreIndented; + } + return result; + } + function foldLine(line, width) { + if (line === "" || line[0] === " ") + return line; + var breakRe = / [^ ]/g; + var match; + var start = 0, end, curr = 0, next = 0; + var result = ""; + while (match = breakRe.exec(line)) { + next = match.index; + if (next - start > width) { + end = curr > start ? curr : next; + result += "\n" + line.slice(start, end); + start = end + 1; + } + curr = next; + } + result += "\n"; + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + "\n" + line.slice(curr + 1); + } else { + result += line.slice(start); + } + return result.slice(1); + } + function escapeString(string) { + var result = ""; + var char, nextChar; + var escapeSeq; + for (var i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (char >= 55296 && char <= 56319) { + nextChar = string.charCodeAt(i + 1); + if (nextChar >= 56320 && nextChar <= 57343) { + result += encodeHex((char - 55296) * 1024 + nextChar - 56320 + 65536); + i++; + continue; + } + } + escapeSeq = ESCAPE_SEQUENCES[char]; + result += !escapeSeq && isPrintable(char) ? string[i] : escapeSeq || encodeHex(char); + } + return result; + } + function writeFlowSequence(state, level, object) { + var _result = "", _tag = state.tag, index, length; + for (index = 0, length = object.length; index < length; index += 1) { + if (writeNode(state, level, object[index], false, false)) { + if (index !== 0) + _result += "," + (!state.condenseFlow ? " " : ""); + _result += state.dump; + } + } + state.tag = _tag; + state.dump = "[" + _result + "]"; + } + function writeBlockSequence(state, level, object, compact) { + var _result = "", _tag = state.tag, index, length; + for (index = 0, length = object.length; index < length; index += 1) { + if (writeNode(state, level + 1, object[index], true, true)) { + if (!compact || index !== 0) { + _result += generateNextLine(state, level); + } + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += "-"; + } else { + _result += "- "; + } + _result += state.dump; + } + } + state.tag = _tag; + state.dump = _result || "[]"; + } + function writeFlowMapping(state, level, object) { + var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer; + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ""; + if (index !== 0) + pairBuffer += ", "; + if (state.condenseFlow) + pairBuffer += '"'; + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (!writeNode(state, level, objectKey, false, false)) { + continue; + } + if (state.dump.length > 1024) + pairBuffer += "? "; + pairBuffer += state.dump + (state.condenseFlow ? '"' : "") + ":" + (state.condenseFlow ? "" : " "); + if (!writeNode(state, level, objectValue, false, false)) { + continue; + } + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = "{" + _result + "}"; + } + function writeBlockMapping(state, level, object, compact) { + var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer; + if (state.sortKeys === true) { + objectKeyList.sort(); + } else if (typeof state.sortKeys === "function") { + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + throw new YAMLException("sortKeys must be a boolean or a function"); + } + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ""; + if (!compact || index !== 0) { + pairBuffer += generateNextLine(state, level); + } + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; + } + explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024; + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += "?"; + } else { + pairBuffer += "? "; + } + } + pairBuffer += state.dump; + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; + } + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ":"; + } else { + pairBuffer += ": "; + } + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = _result || "{}"; + } + function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + typeList = explicit ? state.explicitTypes : state.implicitTypes; + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) { + state.tag = explicit ? type.tag : "?"; + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + if (_toString.call(type.represent) === "[object Function]") { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new YAMLException("!<" + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + state.dump = _result; + } + return true; + } + } + return false; + } + function writeNode(state, level, object, block, compact, iskey) { + state.tag = null; + state.dump = object; + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + var type = _toString.call(state.dump); + if (block) { + block = state.flowLevel < 0 || state.flowLevel > level; + } + var objectOrArray = type === "[object Object]" || type === "[object Array]", duplicateIndex, duplicate; + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) { + compact = false; + } + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = "*ref_" + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === "[object Object]") { + if (block && Object.keys(state.dump).length !== 0) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + } + } else if (type === "[object Array]") { + var arrayLevel = state.noArrayIndent && level > 0 ? level - 1 : level; + if (block && state.dump.length !== 0) { + writeBlockSequence(state, arrayLevel, state.dump, compact); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, arrayLevel, state.dump); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + } + } else if (type === "[object String]") { + if (state.tag !== "?") { + writeScalar(state, state.dump, level, iskey); + } + } else { + if (state.skipInvalid) + return false; + throw new YAMLException("unacceptable kind of an object to dump " + type); + } + if (state.tag !== null && state.tag !== "?") { + state.dump = "!<" + state.tag + "> " + state.dump; + } + } + return true; + } + function getDuplicateReferences(object, state) { + var objects = [], duplicatesIndexes = [], index, length; + inspectNode(object, objects, duplicatesIndexes); + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); + } + function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, index, length; + if (object !== null && typeof object === "object") { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } + } + function dump(input, options) { + options = options || {}; + var state = new State(options); + if (!state.noRefs) + getDuplicateReferences(input, state); + if (writeNode(state, 0, input, true, true)) + return state.dump + "\n"; + return ""; + } + function safeDump(input, options) { + return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } + module2.exports.dump = dump; + module2.exports.safeDump = safeDump; + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml.js +var require_js_yaml2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/lib/js-yaml.js"(exports2, module2) { + "use strict"; + var loader = require_loader2(); + var dumper = require_dumper2(); + function deprecated(name) { + return function() { + throw new Error("Function " + name + " is deprecated and cannot be used."); + }; + } + module2.exports.Type = require_type3(); + module2.exports.Schema = require_schema2(); + module2.exports.FAILSAFE_SCHEMA = require_failsafe2(); + module2.exports.JSON_SCHEMA = require_json2(); + module2.exports.CORE_SCHEMA = require_core6(); + module2.exports.DEFAULT_SAFE_SCHEMA = require_default_safe(); + module2.exports.DEFAULT_FULL_SCHEMA = require_default_full(); + module2.exports.load = loader.load; + module2.exports.loadAll = loader.loadAll; + module2.exports.safeLoad = loader.safeLoad; + module2.exports.safeLoadAll = loader.safeLoadAll; + module2.exports.dump = dumper.dump; + module2.exports.safeDump = dumper.safeDump; + module2.exports.YAMLException = require_exception2(); + module2.exports.MINIMAL_SCHEMA = require_failsafe2(); + module2.exports.SAFE_SCHEMA = require_default_safe(); + module2.exports.DEFAULT_SCHEMA = require_default_full(); + module2.exports.scan = deprecated("scan"); + module2.exports.parse = deprecated("parse"); + module2.exports.compose = deprecated("compose"); + module2.exports.addConstructor = deprecated("addConstructor"); + } +}); + +// ../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/index.js +var require_js_yaml3 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@3.14.1/node_modules/js-yaml/index.js"(exports2, module2) { + "use strict"; + var yaml = require_js_yaml2(); + module2.exports = yaml; + } +}); + +// ../../node_modules/.pnpm/load-yaml-file@0.2.0/node_modules/load-yaml-file/index.js +var require_load_yaml_file = __commonJS({ + "../../node_modules/.pnpm/load-yaml-file@0.2.0/node_modules/load-yaml-file/index.js"(exports2, module2) { + "use strict"; + var fs = require_graceful_fs(); + var pify = require_pify(); + var stripBom = require_strip_bom2(); + var yaml = require_js_yaml3(); + var parse = (data) => yaml.safeLoad(stripBom(data)); + module2.exports = (fp) => pify(fs.readFile)(fp, "utf8").then((data) => parse(data)); + module2.exports.sync = (fp) => parse(fs.readFileSync(fp, "utf8")); + } +}); + +// ../../node_modules/.pnpm/which-pm@2.0.0/node_modules/which-pm/index.js +var require_which_pm = __commonJS({ + "../../node_modules/.pnpm/which-pm@2.0.0/node_modules/which-pm/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var pathExists = require_path_exists(); + var loadYamlFile = require_load_yaml_file(); + module2.exports = async function(pkgPath) { + const modulesPath = path.join(pkgPath, "node_modules"); + const exists = await pathExists(path.join(modulesPath, ".yarn-integrity")); + if (exists) + return { name: "yarn" }; + try { + const modules = await loadYamlFile(path.join(modulesPath, ".modules.yaml")); + return toNameAndVersion(modules.packageManager); + } catch (err) { + if (err.code !== "ENOENT") + throw err; + } + const modulesExists = await pathExists(modulesPath); + return modulesExists ? { name: "npm" } : null; + }; + function toNameAndVersion(pkgSpec) { + if (pkgSpec[0] === "@") { + const woPrefix = pkgSpec.substr(1); + const parts2 = woPrefix.split("@"); + return { + name: `@${parts2[0]}`, + version: parts2[1] + }; + } + const parts = pkgSpec.split("@"); + return { + name: parts[0], + version: parts[1] + }; + } + } +}); + +// ../../node_modules/.pnpm/preferred-pm@3.0.3/node_modules/preferred-pm/index.js +var require_preferred_pm = __commonJS({ + "../../node_modules/.pnpm/preferred-pm@3.0.3/node_modules/preferred-pm/index.js"(exports2, module2) { + "use strict"; + var findYarnWorkspaceRoot = require_find_yarn_workspace_root2(); + var findUp = require_find_up(); + var path = require("path"); + var pathExists = require_path_exists(); + var whichPM = require_which_pm(); + module2.exports = async function preferredPM(pkgPath) { + if (typeof pkgPath !== "string") { + throw new TypeError(`pkgPath should be a string, got ${typeof pkgPath}`); + } + if (await pathExists(path.join(pkgPath, "package-lock.json"))) { + return { + name: "npm", + version: ">=5" + }; + } + if (await pathExists(path.join(pkgPath, "yarn.lock"))) { + return { + name: "yarn", + version: "*" + }; + } + if (await pathExists(path.join(pkgPath, "pnpm-lock.yaml"))) { + return { + name: "pnpm", + version: ">=3" + }; + } + if (await pathExists(path.join(pkgPath, "shrinkwrap.yaml"))) { + return { + name: "pnpm", + version: "1 || 2" + }; + } + if (await findUp("pnpm-lock.yaml", { cwd: pkgPath })) { + return { + name: "pnpm", + version: ">=3" + }; + } + try { + if (typeof findYarnWorkspaceRoot(pkgPath) === "string") { + return { + name: "yarn", + version: "*" + }; + } + } catch (err) { + } + const pm = await whichPM(pkgPath); + return pm && { name: pm.name, version: pm.version || "*" }; + }; + } +}); + +// ../prepare-package/lib/index.js +var require_lib39 = __commonJS({ + "../prepare-package/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var read_package_json_1 = require_lib32(); + var rimraf_1 = __importDefault(require_rimraf()); + var execa_1 = __importDefault(require_lib26()); + var preferred_pm_1 = __importDefault(require_preferred_pm()); + async function preparePackage(pkgDir) { + var _a, _b, _c; + const manifest = await read_package_json_1.fromDir(pkgDir); + if (((_a = manifest.scripts) === null || _a === void 0 ? void 0 : _a.prepare) != null && manifest.scripts.prepare !== "") { + const pm = (_c = (_b = await preferred_pm_1.default(pkgDir)) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : "npm"; + await execa_1.default(pm, ["install"], { cwd: pkgDir }); + await rimraf_1.default(path_1.default.join(pkgDir, "node_modules")); + } + } + exports2.default = preparePackage; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/omit.js +var require_omit = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/omit.js"(exports2, module2) { + var _curry2 = require_curry2(); + var omit = /* @__PURE__ */ _curry2(function omit2(names, obj) { + var result = {}; + var index = {}; + var idx = 0; + var len = names.length; + while (idx < len) { + index[names[idx]] = 1; + idx += 1; + } + for (var prop in obj) { + if (!index.hasOwnProperty(prop)) { + result[prop] = obj[prop]; + } + } + return result; + }); + module2.exports = omit; + } +}); + +// ../tarball-fetcher/lib/errorTypes/BadTarballError.js +var require_BadTarballError = __commonJS({ + "../tarball-fetcher/lib/errorTypes/BadTarballError.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var BadTarballError = class extends error_1.default { + constructor(opts) { + const message2 = `Actual size (${opts.receivedSize}) of tarball (${opts.tarballUrl}) did not match the one specified in 'Content-Length' header (${opts.expectedSize})`; + super("BAD_TARBALL_SIZE", message2, { + attempts: opts === null || opts === void 0 ? void 0 : opts.attempts + }); + this.expectedSize = opts.expectedSize; + this.receivedSize = opts.receivedSize; + } + }; + exports2.default = BadTarballError; + } +}); + +// ../tarball-fetcher/lib/errorTypes/index.js +var require_errorTypes = __commonJS({ + "../tarball-fetcher/lib/errorTypes/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BadTarballError = void 0; + var BadTarballError_1 = __importDefault(require_BadTarballError()); + exports2.BadTarballError = BadTarballError_1.default; + } +}); + +// ../tarball-fetcher/lib/createDownloader.js +var require_createDownloader = __commonJS({ + "../tarball-fetcher/lib/createDownloader.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.waitForFilesIndex = exports2.TarballIntegrityError = void 0; + var url_1 = __importDefault(require("url")); + var core_loggers_1 = require_lib12(); + var error_1 = __importStar2(require_lib8()); + var prepare_package_1 = __importDefault(require_lib39()); + var retry = __importStar2(require_retry2()); + var fromPairs_1 = __importDefault(require_fromPairs()); + var omit_1 = __importDefault(require_omit()); + var ssri_1 = __importDefault(require_ssri()); + var errorTypes_1 = require_errorTypes(); + var BIG_TARBALL_SIZE = 1024 * 1024 * 5; + var TarballIntegrityError = class extends error_1.default { + constructor(opts) { + super("TARBALL_INTEGRITY", `Got unexpected checksum for "${opts.url}". Wanted "${opts.expected}". Got "${opts.found}".`, { attempts: opts.attempts }); + this.found = opts.found; + this.expected = opts.expected; + this.algorithm = opts.algorithm; + this.sri = opts.sri; + this.url = opts.url; + } + }; + exports2.TarballIntegrityError = TarballIntegrityError; + exports2.default = (fetchFromRegistry, gotOpts) => { + const retryOpts = { + factor: 10, + maxTimeout: 6e4, + minTimeout: 1e4, + retries: 2, + ...gotOpts.retry + }; + return async function download(url, opts) { + const shouldAuth = opts.auth != null && (opts.auth.alwaysAuth === true || !opts.registry || new url_1.default.URL(url).host === new url_1.default.URL(opts.registry).host); + const op = retry.operation(retryOpts); + return new Promise((resolve, reject) => { + op.attempt(async (attempt) => { + var _a, _b; + try { + resolve(await fetch(attempt)); + } catch (error) { + if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 401 || ((_b = error.response) === null || _b === void 0 ? void 0 : _b.status) === 403) { + reject(error); + } + const timeout = op.retry(error); + if (timeout === false) { + reject(op.mainError()); + return; + } + core_loggers_1.requestRetryLogger.debug({ + attempt, + error, + maxRetries: retryOpts.retries, + method: "GET", + timeout, + url + }); + } + }); + }); + async function fetch(currentAttempt) { + var _a; + try { + const authHeaderValue = shouldAuth ? (_a = opts.auth) === null || _a === void 0 ? void 0 : _a.authHeaderValue : void 0; + const res = await fetchFromRegistry(url, { + authHeaderValue, + retry: { retries: 0 }, + timeout: gotOpts.timeout + }); + if (res.status !== 200) { + throw new error_1.FetchError({ url, authHeaderValue }, res); + } + const contentLength = res.headers.has("content-length") && res.headers.get("content-length"); + const size = typeof contentLength === "string" ? parseInt(contentLength, 10) : null; + if (opts.onStart != null) { + opts.onStart(size, currentAttempt); + } + const onProgress = size != null && size >= BIG_TARBALL_SIZE ? opts.onProgress : void 0; + let downloaded = 0; + res.body.on("data", (chunk) => { + downloaded += chunk.length; + if (onProgress != null) + onProgress(downloaded); + }); + return await new Promise(async (resolve, reject) => { + const stream = res.body.on("error", reject); + try { + const [integrityCheckResult, filesIndex] = await Promise.all([ + opts.integrity ? safeCheckStream(res.body, opts.integrity, url) : true, + opts.cafs.addFilesFromTarball(res.body, opts.manifest), + waitTillClosed({ stream, size, getDownloaded: () => downloaded, url }) + ]); + if (integrityCheckResult !== true) { + throw integrityCheckResult; + } + if (!isGitHostedPkgUrl(url)) { + resolve({ filesIndex }); + return; + } + resolve({ filesIndex: await prepareGitHostedPkg(filesIndex, opts.cafs) }); + } catch (err) { + reject(err); + } + }); + } catch (err) { + err.attempts = currentAttempt; + err.resource = url; + throw err; + } + } + }; + }; + function isGitHostedPkgUrl(url) { + return (url.startsWith("https://codeload.github.com/") || url.startsWith("https://bitbucket.org/") || url.startsWith("https://gitlab.com/")) && url.includes("tar.gz"); + } + async function waitForFilesIndex(filesIndex) { + return fromPairs_1.default(await Promise.all(Object.entries(filesIndex).map(async ([fileName, fileInfo]) => { + const { integrity, checkedAt } = await fileInfo.writeResult; + return [ + fileName, + { + ...omit_1.default(["writeResult"], fileInfo), + checkedAt, + integrity: integrity.toString() + } + ]; + }))); + } + exports2.waitForFilesIndex = waitForFilesIndex; + async function prepareGitHostedPkg(filesIndex, cafs) { + const tempLocation = await cafs.tempDir(); + await cafs.importPackage(tempLocation, { + filesResponse: { + filesIndex: await waitForFilesIndex(filesIndex), + fromStore: false + }, + force: true + }); + await prepare_package_1.default(tempLocation); + const newFilesIndex = await cafs.addFilesFromDir(tempLocation); + return newFilesIndex; + } + async function safeCheckStream(stream, integrity, url) { + try { + await ssri_1.default.checkStream(stream, integrity); + return true; + } catch (err) { + return new TarballIntegrityError({ + algorithm: err["algorithm"], + expected: err["expected"], + found: err["found"], + sri: err["sri"], + url + }); + } + } + async function waitTillClosed(opts) { + return new Promise((resolve, reject) => { + opts.stream.on("end", () => { + const downloaded = opts.getDownloaded(); + if (opts.size !== null && opts.size !== downloaded) { + const err = new errorTypes_1.BadTarballError({ + expectedSize: opts.size, + receivedSize: downloaded, + tarballUrl: opts.url + }); + reject(err); + return; + } + resolve(); + }); + }); + } + } +}); + +// ../tarball-fetcher/lib/index.js +var require_lib40 = __commonJS({ + "../tarball-fetcher/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.waitForFilesIndex = exports2.TarballIntegrityError = exports2.BadTarballError = void 0; + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var graceful_fs_1 = __importDefault(require_lib18()); + var ssri_1 = __importDefault(require_ssri()); + var createDownloader_1 = __importStar2(require_createDownloader()); + Object.defineProperty(exports2, "TarballIntegrityError", { enumerable: true, get: function() { + return createDownloader_1.TarballIntegrityError; + } }); + Object.defineProperty(exports2, "waitForFilesIndex", { enumerable: true, get: function() { + return createDownloader_1.waitForFilesIndex; + } }); + var errorTypes_1 = require_errorTypes(); + Object.defineProperty(exports2, "BadTarballError", { enumerable: true, get: function() { + return errorTypes_1.BadTarballError; + } }); + function default_1(fetchFromRegistry, getCredentials, opts) { + const download = createDownloader_1.default(fetchFromRegistry, { + retry: opts.retry, + timeout: opts.timeout + }); + return { + tarball: fetchFromTarball.bind(null, { + download, + getCredentialsByURI: getCredentials, + offline: opts.offline + }) + }; + } + exports2.default = default_1; + async function fetchFromTarball(ctx, cafs, resolution, opts) { + if (resolution.tarball.startsWith("file:")) { + const tarball = resolvePath(opts.lockfileDir, resolution.tarball.slice(5)); + return fetchFromLocalTarball(cafs, tarball, { + integrity: resolution.integrity, + manifest: opts.manifest + }); + } + if (ctx.offline) { + throw new error_1.default("NO_OFFLINE_TARBALL", `A package is missing from the store but cannot download it in offline mode. The missing package may be downloaded from ${resolution.tarball}.`); + } + const auth = resolution.registry ? ctx.getCredentialsByURI(resolution.registry) : void 0; + return ctx.download(resolution.tarball, { + auth, + cafs, + integrity: resolution.integrity, + manifest: opts.manifest, + onProgress: opts.onProgress, + onStart: opts.onStart, + registry: resolution.registry + }); + } + var isAbsolutePath = /^[/]|^[A-Za-z]:/; + function resolvePath(where, spec) { + if (isAbsolutePath.test(spec)) + return spec; + return path_1.default.resolve(where, spec); + } + async function fetchFromLocalTarball(cafs, tarball, opts) { + try { + const tarballStream = graceful_fs_1.default.createReadStream(tarball); + const [fetchResult] = await Promise.all([ + cafs.addFilesFromTarball(tarballStream, opts.manifest), + opts.integrity && ssri_1.default.checkStream(tarballStream, opts.integrity) + ]); + return { filesIndex: fetchResult }; + } catch (err) { + const error = new createDownloader_1.TarballIntegrityError({ + attempts: 1, + algorithm: err["algorithm"], + expected: err["expected"], + found: err["found"], + sri: err["sri"], + url: tarball + }); + error["resource"] = tarball; + throw error; + } + } + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/fileSystem.js +var require_fileSystem = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/fileSystem.js"(exports2) { + exports2.require = function() { + if (typeof process === "object" && process.versions && process.versions["electron"]) { + try { + const originalFs = require("original-fs"); + if (Object.keys(originalFs).length > 0) { + return originalFs; + } + } catch (e) { + } + } + return require("fs"); + }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/constants.js +var require_constants9 = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/constants.js"(exports2, module2) { + module2.exports = { + LOCHDR: 30, + LOCSIG: 67324752, + LOCVER: 4, + LOCFLG: 6, + LOCHOW: 8, + LOCTIM: 10, + LOCCRC: 14, + LOCSIZ: 18, + LOCLEN: 22, + LOCNAM: 26, + LOCEXT: 28, + EXTSIG: 134695760, + EXTHDR: 16, + EXTCRC: 4, + EXTSIZ: 8, + EXTLEN: 12, + CENHDR: 46, + CENSIG: 33639248, + CENVEM: 4, + CENVER: 6, + CENFLG: 8, + CENHOW: 10, + CENTIM: 12, + CENCRC: 16, + CENSIZ: 20, + CENLEN: 24, + CENNAM: 28, + CENEXT: 30, + CENCOM: 32, + CENDSK: 34, + CENATT: 36, + CENATX: 38, + CENOFF: 42, + ENDHDR: 22, + ENDSIG: 101010256, + ENDSUB: 8, + ENDTOT: 10, + ENDSIZ: 12, + ENDOFF: 16, + ENDCOM: 20, + END64HDR: 20, + END64SIG: 117853008, + END64START: 4, + END64OFF: 8, + END64NUMDISKS: 16, + ZIP64SIG: 101075792, + ZIP64HDR: 56, + ZIP64LEAD: 12, + ZIP64SIZE: 4, + ZIP64VEM: 12, + ZIP64VER: 14, + ZIP64DSK: 16, + ZIP64DSKDIR: 20, + ZIP64SUB: 24, + ZIP64TOT: 32, + ZIP64SIZB: 40, + ZIP64OFF: 48, + ZIP64EXTRA: 56, + STORED: 0, + SHRUNK: 1, + REDUCED1: 2, + REDUCED2: 3, + REDUCED3: 4, + REDUCED4: 5, + IMPLODED: 6, + DEFLATED: 8, + ENHANCED_DEFLATED: 9, + PKWARE: 10, + BZIP2: 12, + LZMA: 14, + IBM_TERSE: 18, + IBM_LZ77: 19, + AES_ENCRYPT: 99, + FLG_ENC: 1, + FLG_COMP1: 2, + FLG_COMP2: 4, + FLG_DESC: 8, + FLG_ENH: 16, + FLG_PATCH: 32, + FLG_STR: 64, + FLG_EFS: 2048, + FLG_MSK: 4096, + FILE: 2, + BUFFER: 1, + NONE: 0, + EF_ID: 0, + EF_SIZE: 2, + ID_ZIP64: 1, + ID_AVINFO: 7, + ID_PFS: 8, + ID_OS2: 9, + ID_NTFS: 10, + ID_OPENVMS: 12, + ID_UNIX: 13, + ID_FORK: 14, + ID_PATCH: 15, + ID_X509_PKCS7: 20, + ID_X509_CERTID_F: 21, + ID_X509_CERTID_C: 22, + ID_STRONGENC: 23, + ID_RECORD_MGT: 24, + ID_X509_PKCS7_RL: 25, + ID_IBM1: 101, + ID_IBM2: 102, + ID_POSZIP: 18064, + EF_ZIP64_OR_32: 4294967295, + EF_ZIP64_OR_16: 65535, + EF_ZIP64_SUNCOMP: 0, + EF_ZIP64_SCOMP: 8, + EF_ZIP64_RHO: 16, + EF_ZIP64_DSN: 24 + }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/utils.js +var require_utils8 = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/utils.js"(exports2, module2) { + var fs = require_fileSystem().require(); + var pth = require("path"); + var Constants = require_constants9(); + var isWin = typeof process === "object" && process.platform === "win32"; + module2.exports = function() { + const crcTable = []; + const PATH_SEPARATOR = pth.sep; + function genCRCTable() { + for (let n = 0; n < 256; n++) { + let c = n; + for (let k = 8; --k >= 0; ) + if ((c & 1) !== 0) { + c = 3988292384 ^ c >>> 1; + } else { + c = c >>> 1; + } + crcTable[n] = c >>> 0; + } + } + function mkdirSync(path) { + var resolvedPath = path.split(PATH_SEPARATOR)[0]; + path.split(PATH_SEPARATOR).forEach(function(name) { + if (!name || name.substr(-1, 1) === ":") + return; + resolvedPath += PATH_SEPARATOR + name; + var stat; + try { + stat = fs.statSync(resolvedPath); + } catch (e) { + fs.mkdirSync(resolvedPath); + } + if (stat && stat.isFile()) + throw Errors.FILE_IN_THE_WAY.replace("%s", resolvedPath); + }); + } + function findSync(dir, pattern, recoursive) { + if (typeof pattern === "boolean") { + recoursive = pattern; + pattern = void 0; + } + var files = []; + fs.readdirSync(dir).forEach(function(file) { + var path = pth.join(dir, file); + if (fs.statSync(path).isDirectory() && recoursive) + files = files.concat(findSync(path, pattern, recoursive)); + if (!pattern || pattern.test(path)) { + files.push(pth.normalize(path) + (fs.statSync(path).isDirectory() ? PATH_SEPARATOR : "")); + } + }); + return files; + } + function readBigUInt64LE(buffer, index) { + var slice = Buffer.from(buffer.slice(index, index + 8)); + slice.swap64(); + return parseInt(`0x${slice.toString("hex")}`); + } + return { + makeDir: function(path) { + mkdirSync(path); + }, + crc32: function(buf) { + if (typeof buf === "string") { + buf = Buffer.from(buf, "utf8"); + } + if (!crcTable.length) + genCRCTable(); + let off = 0; + let len = buf.length; + let crc = ~0; + while (--len >= 0) + crc = crcTable[(crc ^ buf[off++]) & 255] ^ crc >>> 8; + return ~crc >>> 0; + }, + methodToString: function(method) { + switch (method) { + case Constants.STORED: + return "STORED (" + method + ")"; + case Constants.DEFLATED: + return "DEFLATED (" + method + ")"; + default: + return "UNSUPPORTED (" + method + ")"; + } + }, + writeFileTo: function(path, content, overwrite, attr) { + if (fs.existsSync(path)) { + if (!overwrite) + return false; + var stat = fs.statSync(path); + if (stat.isDirectory()) { + return false; + } + } + var folder = pth.dirname(path); + if (!fs.existsSync(folder)) { + mkdirSync(folder); + } + var fd; + try { + fd = fs.openSync(path, "w", 438); + } catch (e) { + fs.chmodSync(path, 438); + fd = fs.openSync(path, "w", 438); + } + if (fd) { + try { + fs.writeSync(fd, content, 0, content.length, 0); + } finally { + fs.closeSync(fd); + } + } + fs.chmodSync(path, attr || 438); + return true; + }, + canonical: function(p) { + if (!p) + return ""; + var safeSuffix = pth.posix.normalize("/" + p.split("\\").join("/")); + return pth.join(".", safeSuffix); + }, + sanitize: function(prefix, name) { + prefix = pth.resolve(pth.normalize(prefix)); + var parts = name.split("/"); + for (var i = 0, l = parts.length; i < l; i++) { + var path = pth.normalize(pth.join(prefix, parts.slice(i, l).join(pth.sep))); + if (path.indexOf(prefix) === 0) { + return path; + } + } + return pth.normalize(pth.join(prefix, pth.basename(name))); + }, + writeFileToAsync: function(path, content, overwrite, attr, callback) { + if (typeof attr === "function") { + callback = attr; + attr = void 0; + } + fs.exists(path, function(exist) { + if (exist && !overwrite) + return callback(false); + fs.stat(path, function(err, stat) { + if (exist && stat.isDirectory()) { + return callback(false); + } + var folder = pth.dirname(path); + fs.exists(folder, function(exists) { + if (!exists) + mkdirSync(folder); + fs.open(path, "w", 438, function(err2, fd) { + if (err2) { + fs.chmod(path, 438, function() { + fs.open(path, "w", 438, function(err3, fd2) { + fs.write(fd2, content, 0, content.length, 0, function() { + fs.close(fd2, function() { + fs.chmod(path, attr || 438, function() { + callback(true); + }); + }); + }); + }); + }); + } else if (fd) { + fs.write(fd, content, 0, content.length, 0, function() { + fs.close(fd, function() { + fs.chmod(path, attr || 438, function() { + callback(true); + }); + }); + }); + } else { + fs.chmod(path, attr || 438, function() { + callback(true); + }); + } + }); + }); + }); + }); + }, + findFiles: function(path) { + return findSync(path, true); + }, + getAttributes: function() { + }, + setAttributes: function() { + }, + toBuffer: function(input) { + if (Buffer.isBuffer(input)) { + return input; + } else if (input instanceof Uint8Array) { + return Buffer.from(input); + } else { + return typeof input === "string" ? Buffer.from(input, "utf8") : Buffer.alloc(0); + } + }, + isWin, + readBigUInt64LE + }; + }(); + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/errors.js +var require_errors2 = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/errors.js"(exports2, module2) { + module2.exports = { + INVALID_LOC: "Invalid LOC header (bad signature)", + INVALID_CEN: "Invalid CEN header (bad signature)", + INVALID_END: "Invalid END header (bad signature)", + NO_DATA: "Nothing to decompress", + BAD_CRC: "CRC32 checksum failed", + FILE_IN_THE_WAY: "There is a file in the way: %s", + UNKNOWN_METHOD: "Invalid/unsupported compression method", + AVAIL_DATA: "inflate::Available inflate data did not terminate", + INVALID_DISTANCE: "inflate::Invalid literal/length or distance code in fixed or dynamic block", + TO_MANY_CODES: "inflate::Dynamic block code description: too many length or distance codes", + INVALID_REPEAT_LEN: "inflate::Dynamic block code description: repeat more than specified lengths", + INVALID_REPEAT_FIRST: "inflate::Dynamic block code description: repeat lengths with no first length", + INCOMPLETE_CODES: "inflate::Dynamic block code description: code lengths codes incomplete", + INVALID_DYN_DISTANCE: "inflate::Dynamic block code description: invalid distance code lengths", + INVALID_CODES_LEN: "inflate::Dynamic block code description: invalid literal/length code lengths", + INVALID_STORE_BLOCK: "inflate::Stored block length did not match one's complement", + INVALID_BLOCK_TYPE: "inflate::Invalid block type (type == 3)", + CANT_EXTRACT_FILE: "Could not extract the file", + CANT_OVERRIDE: "Target file already exists", + NO_ZIP: "No zip file was loaded", + NO_ENTRY: "Entry doesn't exist", + DIRECTORY_CONTENT_ERROR: "A directory cannot have content", + FILE_NOT_FOUND: "File not found: %s", + NOT_IMPLEMENTED: "Not implemented", + INVALID_FILENAME: "Invalid filename", + INVALID_FORMAT: "Invalid or unsupported zip format. No END header found" + }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/fattr.js +var require_fattr = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/fattr.js"(exports2, module2) { + var fs = require_fileSystem().require(); + var pth = require("path"); + fs.existsSync = fs.existsSync || pth.existsSync; + module2.exports = function(path) { + var _path = path || "", _obj = newAttr(), _stat = null; + function newAttr() { + return { + directory: false, + readonly: false, + hidden: false, + executable: false, + mtime: 0, + atime: 0 + }; + } + if (_path && fs.existsSync(_path)) { + _stat = fs.statSync(_path); + _obj.directory = _stat.isDirectory(); + _obj.mtime = _stat.mtime; + _obj.atime = _stat.atime; + _obj.executable = (73 & _stat.mode) !== 0; + _obj.readonly = (128 & _stat.mode) === 0; + _obj.hidden = pth.basename(_path)[0] === "."; + } else { + console.warn("Invalid path: " + _path); + } + return { + get directory() { + return _obj.directory; + }, + get readOnly() { + return _obj.readonly; + }, + get hidden() { + return _obj.hidden; + }, + get mtime() { + return _obj.mtime; + }, + get atime() { + return _obj.atime; + }, + get executable() { + return _obj.executable; + }, + decodeAttributes: function() { + }, + encodeAttributes: function() { + }, + toJSON: function() { + return { + path: _path, + isDirectory: _obj.directory, + isReadOnly: _obj.readonly, + isHidden: _obj.hidden, + isExecutable: _obj.executable, + mTime: _obj.mtime, + aTime: _obj.atime + }; + }, + toString: function() { + return JSON.stringify(this.toJSON(), null, " "); + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/index.js +var require_util7 = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/util/index.js"(exports2, module2) { + module2.exports = require_utils8(); + module2.exports.FileSystem = require_fileSystem(); + module2.exports.Constants = require_constants9(); + module2.exports.Errors = require_errors2(); + module2.exports.FileAttr = require_fattr(); + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/headers/entryHeader.js +var require_entryHeader = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/headers/entryHeader.js"(exports2, module2) { + var Utils = require_util7(); + var Constants = Utils.Constants; + module2.exports = function() { + var _verMade = 20, _version = 10, _flags = 0, _method = 0, _time = 0, _crc = 0, _compressedSize = 0, _size = 0, _fnameLen = 0, _extraLen = 0, _comLen = 0, _diskStart = 0, _inattr = 0, _attr = 0, _offset = 0; + _verMade |= Utils.isWin ? 2560 : 768; + _flags |= Constants.FLG_EFS; + var _dataHeader = {}; + function setTime(val) { + val = new Date(val); + _time = (val.getFullYear() - 1980 & 127) << 25 | val.getMonth() + 1 << 21 | val.getDate() << 16 | val.getHours() << 11 | val.getMinutes() << 5 | val.getSeconds() >> 1; + } + setTime(+new Date()); + return { + get made() { + return _verMade; + }, + set made(val) { + _verMade = val; + }, + get version() { + return _version; + }, + set version(val) { + _version = val; + }, + get flags() { + return _flags; + }, + set flags(val) { + _flags = val; + }, + get method() { + return _method; + }, + set method(val) { + switch (val) { + case Constants.STORED: + this.version = 10; + case Constants.DEFLATED: + default: + this.version = 20; + } + _method = val; + }, + get time() { + return new Date((_time >> 25 & 127) + 1980, (_time >> 21 & 15) - 1, _time >> 16 & 31, _time >> 11 & 31, _time >> 5 & 63, (_time & 31) << 1); + }, + set time(val) { + setTime(val); + }, + get crc() { + return _crc; + }, + set crc(val) { + _crc = Math.max(0, val) >>> 0; + }, + get compressedSize() { + return _compressedSize; + }, + set compressedSize(val) { + _compressedSize = Math.max(0, val) >>> 0; + }, + get size() { + return _size; + }, + set size(val) { + _size = Math.max(0, val) >>> 0; + }, + get fileNameLength() { + return _fnameLen; + }, + set fileNameLength(val) { + _fnameLen = val; + }, + get extraLength() { + return _extraLen; + }, + set extraLength(val) { + _extraLen = val; + }, + get commentLength() { + return _comLen; + }, + set commentLength(val) { + _comLen = val; + }, + get diskNumStart() { + return _diskStart; + }, + set diskNumStart(val) { + _diskStart = Math.max(0, val) >>> 0; + }, + get inAttr() { + return _inattr; + }, + set inAttr(val) { + _inattr = Math.max(0, val) >>> 0; + }, + get attr() { + return _attr; + }, + set attr(val) { + _attr = Math.max(0, val) >>> 0; + }, + get fileAttr() { + return (_attr >>> 0 | 0) >> 16 & 4095; + }, + get offset() { + return _offset; + }, + set offset(val) { + _offset = Math.max(0, val) >>> 0; + }, + get encripted() { + return (_flags & 1) === 1; + }, + get entryHeaderSize() { + return Constants.CENHDR + _fnameLen + _extraLen + _comLen; + }, + get realDataOffset() { + return _offset + Constants.LOCHDR + _dataHeader.fnameLen + _dataHeader.extraLen; + }, + get dataHeader() { + return _dataHeader; + }, + loadDataHeaderFromBinary: function(input) { + var data = input.slice(_offset, _offset + Constants.LOCHDR); + if (data.readUInt32LE(0) !== Constants.LOCSIG) { + throw new Error(Utils.Errors.INVALID_LOC); + } + _dataHeader = { + version: data.readUInt16LE(Constants.LOCVER), + flags: data.readUInt16LE(Constants.LOCFLG), + method: data.readUInt16LE(Constants.LOCHOW), + time: data.readUInt32LE(Constants.LOCTIM), + crc: data.readUInt32LE(Constants.LOCCRC), + compressedSize: data.readUInt32LE(Constants.LOCSIZ), + size: data.readUInt32LE(Constants.LOCLEN), + fnameLen: data.readUInt16LE(Constants.LOCNAM), + extraLen: data.readUInt16LE(Constants.LOCEXT) + }; + }, + loadFromBinary: function(data) { + if (data.length !== Constants.CENHDR || data.readUInt32LE(0) !== Constants.CENSIG) { + throw new Error(Utils.Errors.INVALID_CEN); + } + _verMade = data.readUInt16LE(Constants.CENVEM); + _version = data.readUInt16LE(Constants.CENVER); + _flags = data.readUInt16LE(Constants.CENFLG); + _method = data.readUInt16LE(Constants.CENHOW); + _time = data.readUInt32LE(Constants.CENTIM); + _crc = data.readUInt32LE(Constants.CENCRC); + _compressedSize = data.readUInt32LE(Constants.CENSIZ); + _size = data.readUInt32LE(Constants.CENLEN); + _fnameLen = data.readUInt16LE(Constants.CENNAM); + _extraLen = data.readUInt16LE(Constants.CENEXT); + _comLen = data.readUInt16LE(Constants.CENCOM); + _diskStart = data.readUInt16LE(Constants.CENDSK); + _inattr = data.readUInt16LE(Constants.CENATT); + _attr = data.readUInt32LE(Constants.CENATX); + _offset = data.readUInt32LE(Constants.CENOFF); + }, + dataHeaderToBinary: function() { + var data = Buffer.alloc(Constants.LOCHDR); + data.writeUInt32LE(Constants.LOCSIG, 0); + data.writeUInt16LE(_version, Constants.LOCVER); + data.writeUInt16LE(_flags, Constants.LOCFLG); + data.writeUInt16LE(_method, Constants.LOCHOW); + data.writeUInt32LE(_time, Constants.LOCTIM); + data.writeUInt32LE(_crc, Constants.LOCCRC); + data.writeUInt32LE(_compressedSize, Constants.LOCSIZ); + data.writeUInt32LE(_size, Constants.LOCLEN); + data.writeUInt16LE(_fnameLen, Constants.LOCNAM); + data.writeUInt16LE(_extraLen, Constants.LOCEXT); + return data; + }, + entryHeaderToBinary: function() { + var data = Buffer.alloc(Constants.CENHDR + _fnameLen + _extraLen + _comLen); + data.writeUInt32LE(Constants.CENSIG, 0); + data.writeUInt16LE(_verMade, Constants.CENVEM); + data.writeUInt16LE(_version, Constants.CENVER); + data.writeUInt16LE(_flags, Constants.CENFLG); + data.writeUInt16LE(_method, Constants.CENHOW); + data.writeUInt32LE(_time, Constants.CENTIM); + data.writeUInt32LE(_crc, Constants.CENCRC); + data.writeUInt32LE(_compressedSize, Constants.CENSIZ); + data.writeUInt32LE(_size, Constants.CENLEN); + data.writeUInt16LE(_fnameLen, Constants.CENNAM); + data.writeUInt16LE(_extraLen, Constants.CENEXT); + data.writeUInt16LE(_comLen, Constants.CENCOM); + data.writeUInt16LE(_diskStart, Constants.CENDSK); + data.writeUInt16LE(_inattr, Constants.CENATT); + data.writeUInt32LE(_attr, Constants.CENATX); + data.writeUInt32LE(_offset, Constants.CENOFF); + data.fill(0, Constants.CENHDR); + return data; + }, + toJSON: function() { + const bytes = function(nr) { + return nr + " bytes"; + }; + return { + made: _verMade, + version: _version, + flags: _flags, + method: Utils.methodToString(_method), + time: this.time, + crc: "0x" + _crc.toString(16).toUpperCase(), + compressedSize: bytes(_compressedSize), + size: bytes(_size), + fileNameLength: bytes(_fnameLen), + extraLength: bytes(_extraLen), + commentLength: bytes(_comLen), + diskNumStart: _diskStart, + inAttr: _inattr, + attr: _attr, + offset: _offset, + entryHeaderSize: bytes(Constants.CENHDR + _fnameLen + _extraLen + _comLen) + }; + }, + toString: function() { + return JSON.stringify(this.toJSON(), null, " "); + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/headers/mainHeader.js +var require_mainHeader = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/headers/mainHeader.js"(exports2, module2) { + var Utils = require_util7(); + var Constants = Utils.Constants; + module2.exports = function() { + var _volumeEntries = 0, _totalEntries = 0, _size = 0, _offset = 0, _commentLength = 0; + return { + get diskEntries() { + return _volumeEntries; + }, + set diskEntries(val) { + _volumeEntries = _totalEntries = val; + }, + get totalEntries() { + return _totalEntries; + }, + set totalEntries(val) { + _totalEntries = _volumeEntries = val; + }, + get size() { + return _size; + }, + set size(val) { + _size = val; + }, + get offset() { + return _offset; + }, + set offset(val) { + _offset = val; + }, + get commentLength() { + return _commentLength; + }, + set commentLength(val) { + _commentLength = val; + }, + get mainHeaderSize() { + return Constants.ENDHDR + _commentLength; + }, + loadFromBinary: function(data) { + if ((data.length !== Constants.ENDHDR || data.readUInt32LE(0) !== Constants.ENDSIG) && (data.length < Constants.ZIP64HDR || data.readUInt32LE(0) !== Constants.ZIP64SIG)) { + throw new Error(Utils.Errors.INVALID_END); + } + if (data.readUInt32LE(0) === Constants.ENDSIG) { + _volumeEntries = data.readUInt16LE(Constants.ENDSUB); + _totalEntries = data.readUInt16LE(Constants.ENDTOT); + _size = data.readUInt32LE(Constants.ENDSIZ); + _offset = data.readUInt32LE(Constants.ENDOFF); + _commentLength = data.readUInt16LE(Constants.ENDCOM); + } else { + _volumeEntries = Utils.readBigUInt64LE(data, Constants.ZIP64SUB); + _totalEntries = Utils.readBigUInt64LE(data, Constants.ZIP64TOT); + _size = Utils.readBigUInt64LE(data, Constants.ZIP64SIZ); + _offset = Utils.readBigUInt64LE(data, Constants.ZIP64OFF); + _commentLength = 0; + } + }, + toBinary: function() { + var b = Buffer.alloc(Constants.ENDHDR + _commentLength); + b.writeUInt32LE(Constants.ENDSIG, 0); + b.writeUInt32LE(0, 4); + b.writeUInt16LE(_volumeEntries, Constants.ENDSUB); + b.writeUInt16LE(_totalEntries, Constants.ENDTOT); + b.writeUInt32LE(_size, Constants.ENDSIZ); + b.writeUInt32LE(_offset, Constants.ENDOFF); + b.writeUInt16LE(_commentLength, Constants.ENDCOM); + b.fill(" ", Constants.ENDHDR); + return b; + }, + toJSON: function() { + const offset = function(nr, len) { + let offs = nr.toString(16).toUpperCase(); + while (offs.length < len) + offs = "0" + offs; + return "0x" + offs; + }; + return { + diskEntries: _volumeEntries, + totalEntries: _totalEntries, + size: _size + " bytes", + offset: offset(_offset, 4), + commentLength: _commentLength + }; + }, + toString: function() { + return JSON.stringify(this.toJSON(), null, " "); + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/headers/index.js +var require_headers2 = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/headers/index.js"(exports2) { + exports2.EntryHeader = require_entryHeader(); + exports2.MainHeader = require_mainHeader(); + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/methods/deflater.js +var require_deflater = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/methods/deflater.js"(exports2, module2) { + module2.exports = function(inbuf) { + var zlib = require("zlib"); + var opts = { chunkSize: (parseInt(inbuf.length / 1024) + 1) * 1024 }; + return { + deflate: function() { + return zlib.deflateRawSync(inbuf, opts); + }, + deflateAsync: function(callback) { + var tmp = zlib.createDeflateRaw(opts), parts = [], total = 0; + tmp.on("data", function(data) { + parts.push(data); + total += data.length; + }); + tmp.on("end", function() { + var buf = Buffer.alloc(total), written = 0; + buf.fill(0); + for (var i = 0; i < parts.length; i++) { + var part = parts[i]; + part.copy(buf, written); + written += part.length; + } + callback && callback(buf); + }); + tmp.end(inbuf); + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/methods/inflater.js +var require_inflater = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/methods/inflater.js"(exports2, module2) { + module2.exports = function(inbuf) { + var zlib = require("zlib"); + return { + inflate: function() { + return zlib.inflateRawSync(inbuf); + }, + inflateAsync: function(callback) { + var tmp = zlib.createInflateRaw(), parts = [], total = 0; + tmp.on("data", function(data) { + parts.push(data); + total += data.length; + }); + tmp.on("end", function() { + var buf = Buffer.alloc(total), written = 0; + buf.fill(0); + for (var i = 0; i < parts.length; i++) { + var part = parts[i]; + part.copy(buf, written); + written += part.length; + } + callback && callback(buf); + }); + tmp.end(inbuf); + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/methods/zipcrypto.js +var require_zipcrypto = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/methods/zipcrypto.js"(exports2, module2) { + "use strict"; + var { randomFillSync } = require("crypto"); + var crctable = new Uint32Array(256).map((t, crc) => { + for (let j = 0; j < 8; j++) { + if ((crc & 1) !== 0) { + crc = crc >>> 1 ^ 3988292384; + } else { + crc >>>= 1; + } + } + return crc >>> 0; + }); + var uMul = (a, b) => Math.imul(a, b) >>> 0; + var crc32update = (pCrc32, bval) => { + return crctable[(pCrc32 ^ bval) & 255] ^ pCrc32 >>> 8; + }; + var genSalt = () => { + if (typeof randomFillSync === "function") { + return randomFillSync(Buffer.alloc(12)); + } else { + return genSalt.node(); + } + }; + genSalt.node = () => { + const salt = Buffer.alloc(12); + const len = salt.length; + for (let i = 0; i < len; i++) + salt[i] = Math.random() * 256 & 255; + return salt; + }; + var config = { + genSalt + }; + function Initkeys(pw) { + const pass = Buffer.isBuffer(pw) ? pw : Buffer.from(pw); + this.keys = new Uint32Array([305419896, 591751049, 878082192]); + for (let i = 0; i < pass.length; i++) { + this.updateKeys(pass[i]); + } + } + Initkeys.prototype.updateKeys = function(byteValue) { + const keys = this.keys; + keys[0] = crc32update(keys[0], byteValue); + keys[1] += keys[0] & 255; + keys[1] = uMul(keys[1], 134775813) + 1; + keys[2] = crc32update(keys[2], keys[1] >>> 24); + return byteValue; + }; + Initkeys.prototype.next = function() { + const k = (this.keys[2] | 2) >>> 0; + return uMul(k, k ^ 1) >> 8 & 255; + }; + function make_decrypter(pwd) { + const keys = new Initkeys(pwd); + return function(data) { + const result = Buffer.alloc(data.length); + let pos = 0; + for (let c of data) { + result[pos++] = keys.updateKeys(c ^ keys.next()); + } + return result; + }; + } + function make_encrypter(pwd) { + const keys = new Initkeys(pwd); + return function(data, result, pos = 0) { + if (!result) + result = Buffer.alloc(data.length); + for (let c of data) { + const k = keys.next(); + result[pos++] = c ^ k; + keys.updateKeys(c); + } + return result; + }; + } + function decrypt(data, header, pwd) { + if (!data || !Buffer.isBuffer(data) || data.length < 12) { + return Buffer.alloc(0); + } + const decrypter = make_decrypter(pwd); + const salt = decrypter(data.slice(0, 12)); + if (salt[11] !== header.crc >>> 24) { + throw "ADM-ZIP: Wrong Password"; + } + return decrypter(data.slice(12)); + } + function _salter(data) { + if (Buffer.isBuffer(data) && data.length >= 12) { + config.genSalt = function() { + return data.slice(0, 12); + }; + } else if (data === "node") { + config.genSalt = genSalt.node; + } else { + config.genSalt = genSalt; + } + } + function encrypt(data, header, pwd, oldlike = false) { + if (data == null) + data = Buffer.alloc(0); + if (!Buffer.isBuffer(data)) + data = Buffer.from(data.toString()); + const encrypter = make_encrypter(pwd); + const salt = config.genSalt(); + salt[11] = header.crc >>> 24 & 255; + if (oldlike) + salt[10] = header.crc >>> 16 & 255; + const result = Buffer.alloc(data.length + 12); + encrypter(salt, result); + return encrypter(data, result, 12); + } + module2.exports = { decrypt, encrypt, _salter }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/methods/index.js +var require_methods = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/methods/index.js"(exports2) { + exports2.Deflater = require_deflater(); + exports2.Inflater = require_inflater(); + exports2.ZipCrypto = require_zipcrypto(); + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/zipEntry.js +var require_zipEntry = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/zipEntry.js"(exports2, module2) { + var Utils = require_util7(); + var Headers = require_headers2(); + var Constants = Utils.Constants; + var Methods = require_methods(); + module2.exports = function(input) { + var _entryHeader = new Headers.EntryHeader(), _entryName = Buffer.alloc(0), _comment = Buffer.alloc(0), _isDirectory = false, uncompressedData = null, _extra = Buffer.alloc(0); + function getCompressedDataFromZip() { + if (!input || !Buffer.isBuffer(input)) { + return Buffer.alloc(0); + } + _entryHeader.loadDataHeaderFromBinary(input); + return input.slice(_entryHeader.realDataOffset, _entryHeader.realDataOffset + _entryHeader.compressedSize); + } + function crc32OK(data) { + if ((_entryHeader.flags & 8) !== 8) { + if (Utils.crc32(data) !== _entryHeader.dataHeader.crc) { + return false; + } + } else { + } + return true; + } + function decompress(async, callback, pass) { + if (typeof callback === "undefined" && typeof async === "string") { + pass = async; + async = void 0; + } + if (_isDirectory) { + if (async && callback) { + callback(Buffer.alloc(0), Utils.Errors.DIRECTORY_CONTENT_ERROR); + } + return Buffer.alloc(0); + } + var compressedData = getCompressedDataFromZip(); + if (compressedData.length === 0) { + if (async && callback) + callback(compressedData); + return compressedData; + } + if (_entryHeader.encripted) { + if (typeof pass !== "string" && !Buffer.isBuffer(pass)) { + throw new Error("ADM-ZIP: Incompatible password parameter"); + } + compressedData = Methods.ZipCrypto.decrypt(compressedData, _entryHeader, pass); + } + var data = Buffer.alloc(_entryHeader.size); + switch (_entryHeader.method) { + case Utils.Constants.STORED: + compressedData.copy(data); + if (!crc32OK(data)) { + if (async && callback) + callback(data, Utils.Errors.BAD_CRC); + throw new Error(Utils.Errors.BAD_CRC); + } else { + if (async && callback) + callback(data); + return data; + } + case Utils.Constants.DEFLATED: + var inflater = new Methods.Inflater(compressedData); + if (!async) { + const result = inflater.inflate(data); + result.copy(data, 0); + if (!crc32OK(data)) { + throw new Error(Utils.Errors.BAD_CRC + " " + _entryName.toString()); + } + return data; + } else { + inflater.inflateAsync(function(result) { + result.copy(result, 0); + if (callback) { + if (!crc32OK(result)) { + callback(result, Utils.Errors.BAD_CRC); + } else { + callback(result); + } + } + }); + } + break; + default: + if (async && callback) + callback(Buffer.alloc(0), Utils.Errors.UNKNOWN_METHOD); + throw new Error(Utils.Errors.UNKNOWN_METHOD); + } + } + function compress(async, callback) { + if ((!uncompressedData || !uncompressedData.length) && Buffer.isBuffer(input)) { + if (async && callback) + callback(getCompressedDataFromZip()); + return getCompressedDataFromZip(); + } + if (uncompressedData.length && !_isDirectory) { + var compressedData; + switch (_entryHeader.method) { + case Utils.Constants.STORED: + _entryHeader.compressedSize = _entryHeader.size; + compressedData = Buffer.alloc(uncompressedData.length); + uncompressedData.copy(compressedData); + if (async && callback) + callback(compressedData); + return compressedData; + default: + case Utils.Constants.DEFLATED: + var deflater = new Methods.Deflater(uncompressedData); + if (!async) { + var deflated = deflater.deflate(); + _entryHeader.compressedSize = deflated.length; + return deflated; + } else { + deflater.deflateAsync(function(data) { + compressedData = Buffer.alloc(data.length); + _entryHeader.compressedSize = data.length; + data.copy(compressedData); + callback && callback(compressedData); + }); + } + deflater = null; + break; + } + } else if (async && callback) { + callback(Buffer.alloc(0)); + } else { + return Buffer.alloc(0); + } + } + function readUInt64LE(buffer, offset) { + return (buffer.readUInt32LE(offset + 4) << 4) + buffer.readUInt32LE(offset); + } + function parseExtra(data) { + var offset = 0; + var signature, size, part; + while (offset < data.length) { + signature = data.readUInt16LE(offset); + offset += 2; + size = data.readUInt16LE(offset); + offset += 2; + part = data.slice(offset, offset + size); + offset += size; + if (Constants.ID_ZIP64 === signature) { + parseZip64ExtendedInformation(part); + } + } + } + function parseZip64ExtendedInformation(data) { + var size, compressedSize, offset, diskNumStart; + if (data.length >= Constants.EF_ZIP64_SCOMP) { + size = readUInt64LE(data, Constants.EF_ZIP64_SUNCOMP); + if (_entryHeader.size === Constants.EF_ZIP64_OR_32) { + _entryHeader.size = size; + } + } + if (data.length >= Constants.EF_ZIP64_RHO) { + compressedSize = readUInt64LE(data, Constants.EF_ZIP64_SCOMP); + if (_entryHeader.compressedSize === Constants.EF_ZIP64_OR_32) { + _entryHeader.compressedSize = compressedSize; + } + } + if (data.length >= Constants.EF_ZIP64_DSN) { + offset = readUInt64LE(data, Constants.EF_ZIP64_RHO); + if (_entryHeader.offset === Constants.EF_ZIP64_OR_32) { + _entryHeader.offset = offset; + } + } + if (data.length >= Constants.EF_ZIP64_DSN + 4) { + diskNumStart = data.readUInt32LE(Constants.EF_ZIP64_DSN); + if (_entryHeader.diskNumStart === Constants.EF_ZIP64_OR_16) { + _entryHeader.diskNumStart = diskNumStart; + } + } + } + return { + get entryName() { + return _entryName.toString(); + }, + get rawEntryName() { + return _entryName; + }, + set entryName(val) { + _entryName = Utils.toBuffer(val); + var lastChar = _entryName[_entryName.length - 1]; + _isDirectory = lastChar === 47 || lastChar === 92; + _entryHeader.fileNameLength = _entryName.length; + }, + get extra() { + return _extra; + }, + set extra(val) { + _extra = val; + _entryHeader.extraLength = val.length; + parseExtra(val); + }, + get comment() { + return _comment.toString(); + }, + set comment(val) { + _comment = Utils.toBuffer(val); + _entryHeader.commentLength = _comment.length; + }, + get name() { + var n = _entryName.toString(); + return _isDirectory ? n.substr(n.length - 1).split("/").pop() : n.split("/").pop(); + }, + get isDirectory() { + return _isDirectory; + }, + getCompressedData: function() { + return compress(false, null); + }, + getCompressedDataAsync: function(callback) { + compress(true, callback); + }, + setData: function(value) { + uncompressedData = Utils.toBuffer(value); + if (!_isDirectory && uncompressedData.length) { + _entryHeader.size = uncompressedData.length; + _entryHeader.method = Utils.Constants.DEFLATED; + _entryHeader.crc = Utils.crc32(value); + _entryHeader.changed = true; + } else { + _entryHeader.method = Utils.Constants.STORED; + } + }, + getData: function(pass) { + if (_entryHeader.changed) { + return uncompressedData; + } else { + return decompress(false, null, pass); + } + }, + getDataAsync: function(callback, pass) { + if (_entryHeader.changed) { + callback(uncompressedData); + } else { + decompress(true, callback, pass); + } + }, + set attr(attr) { + _entryHeader.attr = attr; + }, + get attr() { + return _entryHeader.attr; + }, + set header(data) { + _entryHeader.loadFromBinary(data); + }, + get header() { + return _entryHeader; + }, + packHeader: function() { + var header = _entryHeader.entryHeaderToBinary(); + var addpos = Utils.Constants.CENHDR; + _entryName.copy(header, addpos); + addpos += _entryName.length; + if (_entryHeader.extraLength) { + _extra.copy(header, addpos); + addpos += _entryHeader.extraLength; + } + if (_entryHeader.commentLength) { + _comment.copy(header, addpos); + } + return header; + }, + toJSON: function() { + const bytes = function(nr) { + return "<" + (nr && nr.length + " bytes buffer" || "null") + ">"; + }; + return { + entryName: this.entryName, + name: this.name, + comment: this.comment, + isDirectory: this.isDirectory, + header: _entryHeader.toJSON(), + compressedData: bytes(input), + data: bytes(uncompressedData) + }; + }, + toString: function() { + return JSON.stringify(this.toJSON(), null, " "); + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/zipFile.js +var require_zipFile = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/zipFile.js"(exports2, module2) { + var ZipEntry = require_zipEntry(); + var Headers = require_headers2(); + var Utils = require_util7(); + module2.exports = function(inBuffer, options) { + var entryList = [], entryTable = {}, _comment = Buffer.alloc(0), mainHeader = new Headers.MainHeader(), loadedEntries = false; + const opts = Object.assign(Object.create(null), options); + const { noSort } = opts; + if (inBuffer) { + readMainHeader(opts.readEntries); + } else { + loadedEntries = true; + } + function iterateEntries(callback) { + const totalEntries = mainHeader.diskEntries; + let index = mainHeader.offset; + for (let i = 0; i < totalEntries; i++) { + let tmp = index; + const entry = new ZipEntry(inBuffer); + entry.header = inBuffer.slice(tmp, tmp += Utils.Constants.CENHDR); + entry.entryName = inBuffer.slice(tmp, tmp += entry.header.fileNameLength); + index += entry.header.entryHeaderSize; + callback(entry); + } + } + function readEntries() { + loadedEntries = true; + entryTable = {}; + entryList = new Array(mainHeader.diskEntries); + var index = mainHeader.offset; + for (var i = 0; i < entryList.length; i++) { + var tmp = index, entry = new ZipEntry(inBuffer); + entry.header = inBuffer.slice(tmp, tmp += Utils.Constants.CENHDR); + entry.entryName = inBuffer.slice(tmp, tmp += entry.header.fileNameLength); + if (entry.header.extraLength) { + entry.extra = inBuffer.slice(tmp, tmp += entry.header.extraLength); + } + if (entry.header.commentLength) + entry.comment = inBuffer.slice(tmp, tmp + entry.header.commentLength); + index += entry.header.entryHeaderSize; + entryList[i] = entry; + entryTable[entry.entryName] = entry; + } + } + function readMainHeader(readNow) { + var i = inBuffer.length - Utils.Constants.ENDHDR, max = Math.max(0, i - 65535), n = max, endStart = inBuffer.length, endOffset = -1, commentEnd = 0; + for (i; i >= n; i--) { + if (inBuffer[i] !== 80) + continue; + if (inBuffer.readUInt32LE(i) === Utils.Constants.ENDSIG) { + endOffset = i; + commentEnd = i; + endStart = i + Utils.Constants.ENDHDR; + n = i - Utils.Constants.END64HDR; + continue; + } + if (inBuffer.readUInt32LE(i) === Utils.Constants.END64SIG) { + n = max; + continue; + } + if (inBuffer.readUInt32LE(i) === Utils.Constants.ZIP64SIG) { + endOffset = i; + endStart = i + Utils.readBigUInt64LE(inBuffer, i + Utils.Constants.ZIP64SIZE) + Utils.Constants.ZIP64LEAD; + break; + } + } + if (!~endOffset) + throw new Error(Utils.Errors.INVALID_FORMAT); + mainHeader.loadFromBinary(inBuffer.slice(endOffset, endStart)); + if (mainHeader.commentLength) { + _comment = inBuffer.slice(commentEnd + Utils.Constants.ENDHDR); + } + if (readNow) + readEntries(); + } + function sortEntries() { + if (entryList.length > 1 && !noSort) { + entryList.sort((a, b) => a.entryName.toLowerCase().localeCompare(b.entryName.toLowerCase())); + } + } + return { + get entries() { + if (!loadedEntries) { + readEntries(); + } + return entryList; + }, + get comment() { + return _comment.toString(); + }, + set comment(val) { + _comment = Utils.toBuffer(val); + mainHeader.commentLength = _comment.length; + }, + getEntryCount: function() { + if (!loadedEntries) { + return mainHeader.diskEntries; + } + return entryList.length; + }, + forEach: function(callback) { + if (!loadedEntries) { + iterateEntries(callback); + return; + } + entryList.forEach(callback); + }, + getEntry: function(entryName) { + if (!loadedEntries) { + readEntries(); + } + return entryTable[entryName] || null; + }, + setEntry: function(entry) { + if (!loadedEntries) { + readEntries(); + } + entryList.push(entry); + entryTable[entry.entryName] = entry; + mainHeader.totalEntries = entryList.length; + }, + deleteEntry: function(entryName) { + if (!loadedEntries) { + readEntries(); + } + var entry = entryTable[entryName]; + if (entry && entry.isDirectory) { + var _self = this; + this.getEntryChildren(entry).forEach(function(child) { + if (child.entryName !== entryName) { + _self.deleteEntry(child.entryName); + } + }); + } + entryList.splice(entryList.indexOf(entry), 1); + delete entryTable[entryName]; + mainHeader.totalEntries = entryList.length; + }, + getEntryChildren: function(entry) { + if (!loadedEntries) { + readEntries(); + } + if (entry && entry.isDirectory) { + const list = []; + const name = entry.entryName; + const len = name.length; + entryList.forEach(function(zipEntry) { + if (zipEntry.entryName.substr(0, len) === name) { + list.push(zipEntry); + } + }); + return list; + } + return []; + }, + compressToBuffer: function() { + if (!loadedEntries) { + readEntries(); + } + sortEntries(); + const dataBlock = []; + const entryHeaders = []; + let totalSize = 0; + let dindex = 0; + mainHeader.size = 0; + mainHeader.offset = 0; + for (const entry of entryList) { + const compressedData = entry.getCompressedData(); + entry.header.offset = dindex; + const dataHeader = entry.header.dataHeaderToBinary(); + const entryNameLen = entry.rawEntryName.length; + const postHeader = Buffer.alloc(entryNameLen + entry.extra.length); + entry.rawEntryName.copy(postHeader, 0); + postHeader.copy(entry.extra, entryNameLen); + const dataLength = dataHeader.length + postHeader.length + compressedData.length; + dindex += dataLength; + dataBlock.push(dataHeader); + dataBlock.push(postHeader); + dataBlock.push(compressedData); + const entryHeader = entry.packHeader(); + entryHeaders.push(entryHeader); + mainHeader.size += entryHeader.length; + totalSize += dataLength + entryHeader.length; + } + totalSize += mainHeader.mainHeaderSize; + mainHeader.offset = dindex; + dindex = 0; + const outBuffer = Buffer.alloc(totalSize); + for (const content of dataBlock) { + content.copy(outBuffer, dindex); + dindex += content.length; + } + for (const content of entryHeaders) { + content.copy(outBuffer, dindex); + dindex += content.length; + } + const mh = mainHeader.toBinary(); + if (_comment) { + _comment.copy(mh, Utils.Constants.ENDHDR); + } + mh.copy(outBuffer, dindex); + return outBuffer; + }, + toAsyncBuffer: function(onSuccess, onFail, onItemStart, onItemEnd) { + try { + if (!loadedEntries) { + readEntries(); + } + sortEntries(); + const dataBlock = []; + const entryHeaders = []; + let totalSize = 0; + let dindex = 0; + mainHeader.size = 0; + mainHeader.offset = 0; + const compress2Buffer = function(entryLists) { + if (entryLists.length) { + const entry = entryLists.pop(); + const name = entry.entryName + entry.extra.toString(); + if (onItemStart) + onItemStart(name); + entry.getCompressedDataAsync(function(compressedData) { + if (onItemEnd) + onItemEnd(name); + entry.header.offset = dindex; + const dataHeader = entry.header.dataHeaderToBinary(); + const postHeader = Buffer.alloc(name.length, name); + const dataLength = dataHeader.length + postHeader.length + compressedData.length; + dindex += dataLength; + dataBlock.push(dataHeader); + dataBlock.push(postHeader); + dataBlock.push(compressedData); + const entryHeader = entry.packHeader(); + entryHeaders.push(entryHeader); + mainHeader.size += entryHeader.length; + totalSize += dataLength + entryHeader.length; + compress2Buffer(entryLists); + }); + } else { + totalSize += mainHeader.mainHeaderSize; + mainHeader.offset = dindex; + dindex = 0; + const outBuffer = Buffer.alloc(totalSize); + dataBlock.forEach(function(content) { + content.copy(outBuffer, dindex); + dindex += content.length; + }); + entryHeaders.forEach(function(content) { + content.copy(outBuffer, dindex); + dindex += content.length; + }); + const mh = mainHeader.toBinary(); + if (_comment) { + _comment.copy(mh, Utils.Constants.ENDHDR); + } + mh.copy(outBuffer, dindex); + onSuccess(outBuffer); + } + }; + compress2Buffer(entryList); + } catch (e) { + onFail(e); + } + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/adm-zip.js +var require_adm_zip = __commonJS({ + "../../node_modules/.pnpm/adm-zip@0.5.6/node_modules/adm-zip/adm-zip.js"(exports2, module2) { + var Utils = require_util7(); + var pth = require("path"); + var ZipEntry = require_zipEntry(); + var ZipFile = require_zipFile(); + var fs = Utils.FileSystem.require(); + fs.existsSync = fs.existsSync || pth.existsSync; + var defaultOptions = { + noSort: false, + readEntries: false, + method: Utils.Constants.NONE + }; + module2.exports = function(input, options) { + let inBuffer = null; + const opts = Object.assign(Object.create(null), defaultOptions); + if (input && typeof input === "object") { + if (!(input instanceof Uint8Array)) { + Object.assign(opts, input); + input = opts.input ? opts.input : void 0; + if (opts.input) + delete opts.input; + } + if (Buffer.isBuffer(input)) { + inBuffer = input; + opts.method = Utils.Constants.BUFFER; + input = void 0; + } + } + Object.assign(opts, options); + if (input && typeof input === "string") { + if (fs.existsSync(input)) { + opts.method = Utils.Constants.FILE; + opts.filename = input; + inBuffer = fs.readFileSync(input); + } else { + throw new Error(Utils.Errors.INVALID_FILENAME); + } + } + const _zip = new ZipFile(inBuffer, opts); + const { canonical, sanitize } = Utils; + function getEntry(entry) { + if (entry && _zip) { + var item; + if (typeof entry === "string") + item = _zip.getEntry(entry); + if (typeof entry === "object" && typeof entry.entryName !== "undefined" && typeof entry.header !== "undefined") + item = _zip.getEntry(entry.entryName); + if (item) { + return item; + } + } + return null; + } + function fixPath(zipPath) { + const { join, normalize, sep } = pth.posix; + return join(".", normalize(sep + zipPath.split("\\").join(sep) + sep)); + } + return { + readFile: function(entry, pass) { + var item = getEntry(entry); + return item && item.getData(pass) || null; + }, + readFileAsync: function(entry, callback) { + var item = getEntry(entry); + if (item) { + item.getDataAsync(callback); + } else { + callback(null, "getEntry failed for:" + entry); + } + }, + readAsText: function(entry, encoding) { + var item = getEntry(entry); + if (item) { + var data = item.getData(); + if (data && data.length) { + return data.toString(encoding || "utf8"); + } + } + return ""; + }, + readAsTextAsync: function(entry, callback, encoding) { + var item = getEntry(entry); + if (item) { + item.getDataAsync(function(data, err) { + if (err) { + callback(data, err); + return; + } + if (data && data.length) { + callback(data.toString(encoding || "utf8")); + } else { + callback(""); + } + }); + } else { + callback(""); + } + }, + deleteFile: function(entry) { + var item = getEntry(entry); + if (item) { + _zip.deleteEntry(item.entryName); + } + }, + addZipComment: function(comment) { + _zip.comment = comment; + }, + getZipComment: function() { + return _zip.comment || ""; + }, + addZipEntryComment: function(entry, comment) { + var item = getEntry(entry); + if (item) { + item.comment = comment; + } + }, + getZipEntryComment: function(entry) { + var item = getEntry(entry); + if (item) { + return item.comment || ""; + } + return ""; + }, + updateFile: function(entry, content) { + var item = getEntry(entry); + if (item) { + item.setData(content); + } + }, + addLocalFile: function(localPath, zipPath, zipName, comment) { + if (fs.existsSync(localPath)) { + zipPath = zipPath ? fixPath(zipPath) : ""; + var p = localPath.split("\\").join("/").split("/").pop(); + zipPath += zipName ? zipName : p; + const _attr = fs.statSync(localPath); + this.addFile(zipPath, fs.readFileSync(localPath), comment, _attr); + } else { + throw new Error(Utils.Errors.FILE_NOT_FOUND.replace("%s", localPath)); + } + }, + addLocalFolder: function(localPath, zipPath, filter) { + if (filter instanceof RegExp) { + filter = function(rx) { + return function(filename) { + return rx.test(filename); + }; + }(filter); + } else if (typeof filter !== "function") { + filter = function() { + return true; + }; + } + zipPath = zipPath ? fixPath(zipPath) : ""; + localPath = pth.normalize(localPath); + if (fs.existsSync(localPath)) { + const items = Utils.findFiles(localPath); + const self2 = this; + if (items.length) { + items.forEach(function(filepath) { + var p = pth.relative(localPath, filepath).split("\\").join("/"); + if (filter(p)) { + var stats = fs.statSync(filepath); + if (stats.isFile()) { + self2.addFile(zipPath + p, fs.readFileSync(filepath), "", stats); + } else { + self2.addFile(zipPath + p + "/", Buffer.alloc(0), "", stats); + } + } + }); + } + } else { + throw new Error(Utils.Errors.FILE_NOT_FOUND.replace("%s", localPath)); + } + }, + addLocalFolderAsync: function(localPath, callback, zipPath, filter) { + if (filter instanceof RegExp) { + filter = function(rx) { + return function(filename) { + return rx.test(filename); + }; + }(filter); + } else if (typeof filter !== "function") { + filter = function() { + return true; + }; + } + zipPath = zipPath ? fixPath(zipPath) : ""; + localPath = pth.normalize(localPath); + var self2 = this; + fs.open(localPath, "r", function(err) { + if (err && err.code === "ENOENT") { + callback(void 0, Utils.Errors.FILE_NOT_FOUND.replace("%s", localPath)); + } else if (err) { + callback(void 0, err); + } else { + var items = Utils.findFiles(localPath); + var i = -1; + var next = function() { + i += 1; + if (i < items.length) { + var filepath = items[i]; + var p = pth.relative(localPath, filepath).split("\\").join("/"); + p = p.normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^\x20-\x7E]/g, ""); + if (filter(p)) { + fs.stat(filepath, function(er0, stats) { + if (er0) + callback(void 0, er0); + if (stats.isFile()) { + fs.readFile(filepath, function(er1, data) { + if (er1) { + callback(void 0, er1); + } else { + self2.addFile(zipPath + p, data, "", stats); + next(); + } + }); + } else { + self2.addFile(zipPath + p + "/", Buffer.alloc(0), "", stats); + next(); + } + }); + } else { + next(); + } + } else { + callback(true, void 0); + } + }; + next(); + } + }); + }, + addLocalFolderPromise: function(localPath, props) { + return new Promise((resolve, reject) => { + const { filter, zipPath } = Object.assign({}, props); + this.addLocalFolderAsync(localPath, (done, err) => { + if (err) + reject(err); + if (done) + resolve(this); + }, zipPath, filter); + }); + }, + addFile: function(entryName, content, comment, attr) { + let entry = getEntry(entryName); + const update = entry != null; + if (!update) { + entry = new ZipEntry(); + entry.entryName = entryName; + } + entry.comment = comment || ""; + const isStat = typeof attr === "object" && attr instanceof fs.Stats; + if (isStat) { + entry.header.time = attr.mtime; + } + var fileattr = entry.isDirectory ? 16 : 0; + if (!Utils.isWin) { + let unix = entry.isDirectory ? 16384 : 32768; + if (isStat) { + unix |= 4095 & attr.mode; + } else if (typeof attr === "number") { + unix |= 4095 & attr; + } else { + unix |= entry.isDirectory ? 493 : 420; + } + fileattr = (fileattr | unix << 16) >>> 0; + } + entry.attr = fileattr; + entry.setData(content); + if (!update) + _zip.setEntry(entry); + }, + getEntries: function() { + return _zip ? _zip.entries : []; + }, + getEntry: function(name) { + return getEntry(name); + }, + getEntryCount: function() { + return _zip.getEntryCount(); + }, + forEach: function(callback) { + return _zip.forEach(callback); + }, + extractEntryTo: function(entry, targetPath, maintainEntryPath, overwrite, outFileName) { + overwrite = overwrite || false; + maintainEntryPath = typeof maintainEntryPath === "undefined" ? true : maintainEntryPath; + var item = getEntry(entry); + if (!item) { + throw new Error(Utils.Errors.NO_ENTRY); + } + var entryName = canonical(item.entryName); + var target = sanitize(targetPath, outFileName && !item.isDirectory ? outFileName : maintainEntryPath ? entryName : pth.basename(entryName)); + if (item.isDirectory) { + var children = _zip.getEntryChildren(item); + children.forEach(function(child) { + if (child.isDirectory) + return; + var content2 = child.getData(); + if (!content2) { + throw new Error(Utils.Errors.CANT_EXTRACT_FILE); + } + var name = canonical(child.entryName); + var childName = sanitize(targetPath, maintainEntryPath ? name : pth.basename(name)); + var fileAttr2 = child.attr ? (child.attr >>> 0 | 0) >> 16 & 4095 : 0; + Utils.writeFileTo(childName, content2, overwrite, fileAttr2); + }); + return true; + } + var content = item.getData(); + if (!content) + throw new Error(Utils.Errors.CANT_EXTRACT_FILE); + if (fs.existsSync(target) && !overwrite) { + throw new Error(Utils.Errors.CANT_OVERRIDE); + } + var fileAttr = item.attr ? (item.attr >>> 0 | 0) >> 16 & 4095 : 0; + Utils.writeFileTo(target, content, overwrite, fileAttr); + return true; + }, + test: function(pass) { + if (!_zip) { + return false; + } + for (var entry in _zip.entries) { + try { + if (entry.isDirectory) { + continue; + } + var content = _zip.entries[entry].getData(pass); + if (!content) { + return false; + } + } catch (err) { + return false; + } + } + return true; + }, + extractAllTo: function(targetPath, overwrite, pass) { + overwrite = overwrite || false; + if (!_zip) { + throw new Error(Utils.Errors.NO_ZIP); + } + _zip.entries.forEach(function(entry) { + var entryName = sanitize(targetPath, canonical(entry.entryName.toString())); + if (entry.isDirectory) { + Utils.makeDir(entryName); + return; + } + var content = entry.getData(pass); + if (!content) { + throw new Error(Utils.Errors.CANT_EXTRACT_FILE); + } + var fileAttr = entry.attr ? (entry.attr >>> 0 | 0) >> 16 & 4095 : 0; + Utils.writeFileTo(entryName, content, overwrite, fileAttr); + try { + fs.utimesSync(entryName, entry.header.time, entry.header.time); + } catch (err) { + throw new Error(Utils.Errors.CANT_EXTRACT_FILE); + } + }); + }, + extractAllToAsync: function(targetPath, overwrite, callback) { + if (!callback) { + callback = function() { + }; + } + overwrite = overwrite || false; + if (!_zip) { + callback(new Error(Utils.Errors.NO_ZIP)); + return; + } + targetPath = pth.resolve(targetPath); + const getPath = (entry) => sanitize(targetPath, pth.normalize(canonical(entry.entryName.toString()))); + const getError = (msg, file) => new Error(msg + ': "' + file + '"'); + const entries = _zip.entries; + for (const entry of entries.filter((e) => e.isDirectory)) { + const filePath = getPath(entry); + const fileAttr = entry.header.fileAttr; + try { + Utils.makeDir(filePath); + if (fileAttr) + fs.chmodSync(filePath, fileAttr); + fs.utimesSync(filePath, entry.header.time, entry.header.time); + } catch (er) { + callback(getError("Unable to create folder", filePath)); + } + } + for (const entry of entries.filter((e) => !e.isDirectory)) { + const entryName = pth.normalize(canonical(entry.entryName.toString())); + const filePath = sanitize(targetPath, entryName); + entry.getDataAsync(function(content, err_1) { + if (err_1) { + callback(new Error(err_1)); + return; + } + if (!content) { + callback(new Error(Utils.Errors.CANT_EXTRACT_FILE)); + } else { + Utils.writeFileToAsync(filePath, content, overwrite, entry.header.fileAttr, function(succ) { + if (!succ) + callback(getError("Unable to write file", filePath)); + fs.utimes(filePath, entry.header.time, entry.header.time, function(err_2) { + if (err_2) + callback(getError("Unable to set times", filePath)); + }); + }); + } + }); + } + callback(); + }, + writeZip: function(targetFileName, callback) { + if (arguments.length === 1) { + if (typeof targetFileName === "function") { + callback = targetFileName; + targetFileName = ""; + } + } + if (!targetFileName && opts.filename) { + targetFileName = opts.filename; + } + if (!targetFileName) + return; + var zipData = _zip.compressToBuffer(); + if (zipData) { + var ok = Utils.writeFileTo(targetFileName, zipData, true); + if (typeof callback === "function") + callback(!ok ? new Error("failed") : null, ""); + } + }, + writeZipPromise: function(targetFileName, props) { + const { overwrite, perm } = Object.assign({ overwrite: true }, props); + return new Promise((resolve, reject) => { + if (!targetFileName && opts.filename) + targetFileName = opts.filename; + if (!targetFileName) + reject("ADM-ZIP: ZIP File Name Missing"); + this.toBufferPromise().then((zipData) => { + const ret = (done) => done ? resolve(done) : reject("ADM-ZIP: Wasn't able to write zip file"); + Utils.writeFileToAsync(targetFileName, zipData, overwrite, perm, ret); + }, reject); + }); + }, + toBufferPromise: function() { + return new Promise((resolve, reject) => { + _zip.toAsyncBuffer(resolve, reject); + }); + }, + toBuffer: function(onSuccess, onFail, onItemStart, onItemEnd) { + this.valueOf = 2; + if (typeof onSuccess === "function") { + _zip.toAsyncBuffer(onSuccess, onFail, onItemStart, onItemEnd); + return null; + } + return _zip.compressToBuffer(); + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/temp-dir@2.0.0/node_modules/temp-dir/index.js +var require_temp_dir = __commonJS({ + "../../node_modules/.pnpm/temp-dir@2.0.0/node_modules/temp-dir/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var os = require("os"); + var tempDirectorySymbol = Symbol.for("__RESOLVED_TEMP_DIRECTORY__"); + if (!global[tempDirectorySymbol]) { + Object.defineProperty(global, tempDirectorySymbol, { + value: fs.realpathSync(os.tmpdir()) + }); + } + module2.exports = global[tempDirectorySymbol]; + } +}); + +// ../../node_modules/.pnpm/array-union@2.1.0/node_modules/array-union/index.js +var require_array_union = __commonJS({ + "../../node_modules/.pnpm/array-union@2.1.0/node_modules/array-union/index.js"(exports2, module2) { + "use strict"; + module2.exports = (...arguments_) => { + return [...new Set([].concat(...arguments_))]; + }; + } +}); + +// ../../node_modules/.pnpm/path-type@4.0.0/node_modules/path-type/index.js +var require_path_type = __commonJS({ + "../../node_modules/.pnpm/path-type@4.0.0/node_modules/path-type/index.js"(exports2) { + "use strict"; + var { promisify } = require("util"); + var fs = require("fs"); + async function isType(fsStatType, statsMethodName, filePath) { + if (typeof filePath !== "string") { + throw new TypeError(`Expected a string, got ${typeof filePath}`); + } + try { + const stats = await promisify(fs[fsStatType])(filePath); + return stats[statsMethodName](); + } catch (error) { + if (error.code === "ENOENT") { + return false; + } + throw error; + } + } + function isTypeSync(fsStatType, statsMethodName, filePath) { + if (typeof filePath !== "string") { + throw new TypeError(`Expected a string, got ${typeof filePath}`); + } + try { + return fs[fsStatType](filePath)[statsMethodName](); + } catch (error) { + if (error.code === "ENOENT") { + return false; + } + throw error; + } + } + exports2.isFile = isType.bind(null, "stat", "isFile"); + exports2.isDirectory = isType.bind(null, "stat", "isDirectory"); + exports2.isSymlink = isType.bind(null, "lstat", "isSymbolicLink"); + exports2.isFileSync = isTypeSync.bind(null, "statSync", "isFile"); + exports2.isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory"); + exports2.isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink"); + } +}); + +// ../../node_modules/.pnpm/dir-glob@3.0.1/node_modules/dir-glob/index.js +var require_dir_glob = __commonJS({ + "../../node_modules/.pnpm/dir-glob@3.0.1/node_modules/dir-glob/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var pathType = require_path_type(); + var getExtensions = (extensions) => extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]; + var getPath = (filepath, cwd) => { + const pth = filepath[0] === "!" ? filepath.slice(1) : filepath; + return path.isAbsolute(pth) ? pth : path.join(cwd, pth); + }; + var addExtensions = (file, extensions) => { + if (path.extname(file)) { + return `**/${file}`; + } + return `**/${file}.${getExtensions(extensions)}`; + }; + var getGlob = (directory, options) => { + if (options.files && !Array.isArray(options.files)) { + throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof options.files}\``); + } + if (options.extensions && !Array.isArray(options.extensions)) { + throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof options.extensions}\``); + } + if (options.files && options.extensions) { + return options.files.map((x) => path.posix.join(directory, addExtensions(x, options.extensions))); + } + if (options.files) { + return options.files.map((x) => path.posix.join(directory, `**/${x}`)); + } + if (options.extensions) { + return [path.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)]; + } + return [path.posix.join(directory, "**")]; + }; + module2.exports = async (input, options) => { + options = { + cwd: process.cwd(), + ...options + }; + if (typeof options.cwd !== "string") { + throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); + } + const globs = await Promise.all([].concat(input).map(async (x) => { + const isDirectory = await pathType.isDirectory(getPath(x, options.cwd)); + return isDirectory ? getGlob(x, options) : x; + })); + return [].concat.apply([], globs); + }; + module2.exports.sync = (input, options) => { + options = { + cwd: process.cwd(), + ...options + }; + if (typeof options.cwd !== "string") { + throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); + } + const globs = [].concat(input).map((x) => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x); + return [].concat.apply([], globs); + }; + } +}); + +// ../../node_modules/.pnpm/ignore@5.1.8/node_modules/ignore/index.js +var require_ignore = __commonJS({ + "../../node_modules/.pnpm/ignore@5.1.8/node_modules/ignore/index.js"(exports2, module2) { + function makeArray(subject) { + return Array.isArray(subject) ? subject : [subject]; + } + var EMPTY = ""; + var SPACE = " "; + var ESCAPE = "\\"; + var REGEX_TEST_BLANK_LINE = /^\s+$/; + var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; + var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; + var REGEX_SPLITALL_CRLF = /\r?\n/g; + var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; + var SLASH = "/"; + var KEY_IGNORE = typeof Symbol !== "undefined" ? Symbol.for("node-ignore") : "node-ignore"; + var define2 = (object, key, value) => Object.defineProperty(object, key, { value }); + var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; + var sanitizeRange = (range) => range.replace(REGEX_REGEXP_RANGE, (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY); + var cleanRangeBackSlash = (slashes) => { + const { length } = slashes; + return slashes.slice(0, length - length % 2); + }; + var REPLACERS = [ + [ + /\\?\s+$/, + (match) => match.indexOf("\\") === 0 ? SPACE : EMPTY + ], + [ + /\\\s/g, + () => SPACE + ], + [ + /[\\$.|*+(){^]/g, + (match) => `\\${match}` + ], + [ + /(?!\\)\?/g, + () => "[^/]" + ], + [ + /^\//, + () => "^" + ], + [ + /\//g, + () => "\\/" + ], + [ + /^\^*\\\*\\\*\\\//, + () => "^(?:.*\\/)?" + ], + [ + /^(?=[^^])/, + function startingReplacer() { + return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^"; + } + ], + [ + /\\\/\\\*\\\*(?=\\\/|$)/g, + (_, index, str) => index + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+" + ], + [ + /(^|[^\\]+)\\\*(?=.+)/g, + (_, p1) => `${p1}[^\\/]*` + ], + [ + /\\\\\\(?=[$.|*+(){^])/g, + () => ESCAPE + ], + [ + /\\\\/g, + () => ESCAPE + ], + [ + /(\\)?\[([^\]/]*?)(\\*)($|\])/g, + (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]" + ], + [ + /(?:[^*])$/, + (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)` + ], + [ + /(\^|\\\/)?\\\*$/, + (_, p1) => { + const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; + return `${prefix}(?=$|\\/$)`; + } + ] + ]; + var regexCache = Object.create(null); + var makeRegex = (pattern, negative, ignorecase) => { + const r = regexCache[pattern]; + if (r) { + return r; + } + const source = REPLACERS.reduce((prev, current) => prev.replace(current[0], current[1].bind(pattern)), pattern); + return regexCache[pattern] = ignorecase ? new RegExp(source, "i") : new RegExp(source); + }; + var isString = (subject) => typeof subject === "string"; + var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && pattern.indexOf("#") !== 0; + var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF); + var IgnoreRule = class { + constructor(origin, pattern, negative, regex) { + this.origin = origin; + this.pattern = pattern; + this.negative = negative; + this.regex = regex; + } + }; + var createRule = (pattern, ignorecase) => { + const origin = pattern; + let negative = false; + if (pattern.indexOf("!") === 0) { + negative = true; + pattern = pattern.substr(1); + } + pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); + const regex = makeRegex(pattern, negative, ignorecase); + return new IgnoreRule(origin, pattern, negative, regex); + }; + var throwError = (message2, Ctor) => { + throw new Ctor(message2); + }; + var checkPath = (path, originalPath, doThrow) => { + if (!isString(path)) { + return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError); + } + if (!path) { + return doThrow(`path must not be empty`, TypeError); + } + if (checkPath.isNotRelative(path)) { + const r = "`path.relative()`d"; + return doThrow(`path should be a ${r} string, but got "${originalPath}"`, RangeError); + } + return true; + }; + var isNotRelative = (path) => REGEX_TEST_INVALID_PATH.test(path); + checkPath.isNotRelative = isNotRelative; + checkPath.convert = (p) => p; + var Ignore = class { + constructor({ + ignorecase = true + } = {}) { + this._rules = []; + this._ignorecase = ignorecase; + define2(this, KEY_IGNORE, true); + this._initCache(); + } + _initCache() { + this._ignoreCache = Object.create(null); + this._testCache = Object.create(null); + } + _addPattern(pattern) { + if (pattern && pattern[KEY_IGNORE]) { + this._rules = this._rules.concat(pattern._rules); + this._added = true; + return; + } + if (checkPattern(pattern)) { + const rule = createRule(pattern, this._ignorecase); + this._added = true; + this._rules.push(rule); + } + } + add(pattern) { + this._added = false; + makeArray(isString(pattern) ? splitPattern(pattern) : pattern).forEach(this._addPattern, this); + if (this._added) { + this._initCache(); + } + return this; + } + addPattern(pattern) { + return this.add(pattern); + } + _testOne(path, checkUnignored) { + let ignored = false; + let unignored = false; + this._rules.forEach((rule) => { + const { negative } = rule; + if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { + return; + } + const matched = rule.regex.test(path); + if (matched) { + ignored = !negative; + unignored = negative; + } + }); + return { + ignored, + unignored + }; + } + _test(originalPath, cache, checkUnignored, slices) { + const path = originalPath && checkPath.convert(originalPath); + checkPath(path, originalPath, throwError); + return this._t(path, cache, checkUnignored, slices); + } + _t(path, cache, checkUnignored, slices) { + if (path in cache) { + return cache[path]; + } + if (!slices) { + slices = path.split(SLASH); + } + slices.pop(); + if (!slices.length) { + return cache[path] = this._testOne(path, checkUnignored); + } + const parent = this._t(slices.join(SLASH) + SLASH, cache, checkUnignored, slices); + return cache[path] = parent.ignored ? parent : this._testOne(path, checkUnignored); + } + ignores(path) { + return this._test(path, this._ignoreCache, false).ignored; + } + createFilter() { + return (path) => !this.ignores(path); + } + filter(paths) { + return makeArray(paths).filter(this.createFilter()); + } + test(path) { + return this._test(path, this._testCache, true); + } + }; + var factory = (options) => new Ignore(options); + var returnFalse = () => false; + var isPathValid = (path) => checkPath(path && checkPath.convert(path), path, returnFalse); + factory.isPathValid = isPathValid; + factory.default = factory; + module2.exports = factory; + if (typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32")) { + const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/"); + checkPath.convert = makePosix; + const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; + checkPath.isNotRelative = (path) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path) || isNotRelative(path); + } + } +}); + +// ../../node_modules/.pnpm/slash@3.0.0/node_modules/slash/index.js +var require_slash = __commonJS({ + "../../node_modules/.pnpm/slash@3.0.0/node_modules/slash/index.js"(exports2, module2) { + "use strict"; + module2.exports = (path) => { + const isExtendedLengthPath = /^\\\\\?\\/.test(path); + const hasNonAscii = /[^\u0000-\u0080]+/.test(path); + if (isExtendedLengthPath || hasNonAscii) { + return path; + } + return path.replace(/\\/g, "/"); + }; + } +}); + +// ../../node_modules/.pnpm/globby@11.0.4/node_modules/globby/gitignore.js +var require_gitignore = __commonJS({ + "../../node_modules/.pnpm/globby@11.0.4/node_modules/globby/gitignore.js"(exports2, module2) { + "use strict"; + var { promisify } = require("util"); + var fs = require("fs"); + var path = require("path"); + var fastGlob = require_out4(); + var gitIgnore = require_ignore(); + var slash = require_slash(); + var DEFAULT_IGNORE = [ + "**/node_modules/**", + "**/flow-typed/**", + "**/coverage/**", + "**/.git" + ]; + var readFileP = promisify(fs.readFile); + var mapGitIgnorePatternTo = (base) => (ignore) => { + if (ignore.startsWith("!")) { + return "!" + path.posix.join(base, ignore.slice(1)); + } + return path.posix.join(base, ignore); + }; + var parseGitIgnore = (content, options) => { + const base = slash(path.relative(options.cwd, path.dirname(options.fileName))); + return content.split(/\r?\n/).filter(Boolean).filter((line) => !line.startsWith("#")).map(mapGitIgnorePatternTo(base)); + }; + var reduceIgnore = (files) => { + const ignores = gitIgnore(); + for (const file of files) { + ignores.add(parseGitIgnore(file.content, { + cwd: file.cwd, + fileName: file.filePath + })); + } + return ignores; + }; + var ensureAbsolutePathForCwd = (cwd, p) => { + cwd = slash(cwd); + if (path.isAbsolute(p)) { + if (slash(p).startsWith(cwd)) { + return p; + } + throw new Error(`Path ${p} is not in cwd ${cwd}`); + } + return path.join(cwd, p); + }; + var getIsIgnoredPredecate = (ignores, cwd) => { + return (p) => ignores.ignores(slash(path.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p)))); + }; + var getFile = async (file, cwd) => { + const filePath = path.join(cwd, file); + const content = await readFileP(filePath, "utf8"); + return { + cwd, + filePath, + content + }; + }; + var getFileSync = (file, cwd) => { + const filePath = path.join(cwd, file); + const content = fs.readFileSync(filePath, "utf8"); + return { + cwd, + filePath, + content + }; + }; + var normalizeOptions = ({ + ignore = [], + cwd = slash(process.cwd()) + } = {}) => { + return { ignore, cwd }; + }; + module2.exports = async (options) => { + options = normalizeOptions(options); + const paths = await fastGlob("**/.gitignore", { + ignore: DEFAULT_IGNORE.concat(options.ignore), + cwd: options.cwd + }); + const files = await Promise.all(paths.map((file) => getFile(file, options.cwd))); + const ignores = reduceIgnore(files); + return getIsIgnoredPredecate(ignores, options.cwd); + }; + module2.exports.sync = (options) => { + options = normalizeOptions(options); + const paths = fastGlob.sync("**/.gitignore", { + ignore: DEFAULT_IGNORE.concat(options.ignore), + cwd: options.cwd + }); + const files = paths.map((file) => getFileSync(file, options.cwd)); + const ignores = reduceIgnore(files); + return getIsIgnoredPredecate(ignores, options.cwd); + }; + } +}); + +// ../../node_modules/.pnpm/globby@11.0.4/node_modules/globby/stream-utils.js +var require_stream_utils = __commonJS({ + "../../node_modules/.pnpm/globby@11.0.4/node_modules/globby/stream-utils.js"(exports2, module2) { + "use strict"; + var { Transform } = require("stream"); + var ObjectTransform = class extends Transform { + constructor() { + super({ + objectMode: true + }); + } + }; + var FilterStream = class extends ObjectTransform { + constructor(filter) { + super(); + this._filter = filter; + } + _transform(data, encoding, callback) { + if (this._filter(data)) { + this.push(data); + } + callback(); + } + }; + var UniqueStream = class extends ObjectTransform { + constructor() { + super(); + this._pushed = new Set(); + } + _transform(data, encoding, callback) { + if (!this._pushed.has(data)) { + this.push(data); + this._pushed.add(data); + } + callback(); + } + }; + module2.exports = { + FilterStream, + UniqueStream + }; + } +}); + +// ../../node_modules/.pnpm/globby@11.0.4/node_modules/globby/index.js +var require_globby = __commonJS({ + "../../node_modules/.pnpm/globby@11.0.4/node_modules/globby/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var arrayUnion = require_array_union(); + var merge2 = require_merge22(); + var fastGlob = require_out4(); + var dirGlob = require_dir_glob(); + var gitignore = require_gitignore(); + var { FilterStream, UniqueStream } = require_stream_utils(); + var DEFAULT_FILTER = () => false; + var isNegative = (pattern) => pattern[0] === "!"; + var assertPatternsInput = (patterns) => { + if (!patterns.every((pattern) => typeof pattern === "string")) { + throw new TypeError("Patterns must be a string or an array of strings"); + } + }; + var checkCwdOption = (options = {}) => { + if (!options.cwd) { + return; + } + let stat; + try { + stat = fs.statSync(options.cwd); + } catch { + return; + } + if (!stat.isDirectory()) { + throw new Error("The `cwd` option must be a path to a directory"); + } + }; + var getPathString = (p) => p.stats instanceof fs.Stats ? p.path : p; + var generateGlobTasks = (patterns, taskOptions) => { + patterns = arrayUnion([].concat(patterns)); + assertPatternsInput(patterns); + checkCwdOption(taskOptions); + const globTasks = []; + taskOptions = { + ignore: [], + expandDirectories: true, + ...taskOptions + }; + for (const [index, pattern] of patterns.entries()) { + if (isNegative(pattern)) { + continue; + } + const ignore = patterns.slice(index).filter((pattern2) => isNegative(pattern2)).map((pattern2) => pattern2.slice(1)); + const options = { + ...taskOptions, + ignore: taskOptions.ignore.concat(ignore) + }; + globTasks.push({ pattern, options }); + } + return globTasks; + }; + var globDirs = (task, fn2) => { + let options = {}; + if (task.options.cwd) { + options.cwd = task.options.cwd; + } + if (Array.isArray(task.options.expandDirectories)) { + options = { + ...options, + files: task.options.expandDirectories + }; + } else if (typeof task.options.expandDirectories === "object") { + options = { + ...options, + ...task.options.expandDirectories + }; + } + return fn2(task.pattern, options); + }; + var getPattern = (task, fn2) => task.options.expandDirectories ? globDirs(task, fn2) : [task.pattern]; + var getFilterSync = (options) => { + return options && options.gitignore ? gitignore.sync({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; + }; + var globToTask = (task) => (glob) => { + const { options } = task; + if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) { + options.ignore = dirGlob.sync(options.ignore); + } + return { + pattern: glob, + options + }; + }; + module2.exports = async (patterns, options) => { + const globTasks = generateGlobTasks(patterns, options); + const getFilter = async () => { + return options && options.gitignore ? gitignore({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; + }; + const getTasks = async () => { + const tasks2 = await Promise.all(globTasks.map(async (task) => { + const globs = await getPattern(task, dirGlob); + return Promise.all(globs.map(globToTask(task))); + })); + return arrayUnion(...tasks2); + }; + const [filter, tasks] = await Promise.all([getFilter(), getTasks()]); + const paths = await Promise.all(tasks.map((task) => fastGlob(task.pattern, task.options))); + return arrayUnion(...paths).filter((path_) => !filter(getPathString(path_))); + }; + module2.exports.sync = (patterns, options) => { + const globTasks = generateGlobTasks(patterns, options); + const tasks = []; + for (const task of globTasks) { + const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); + tasks.push(...newTask); + } + const filter = getFilterSync(options); + let matches = []; + for (const task of tasks) { + matches = arrayUnion(matches, fastGlob.sync(task.pattern, task.options)); + } + return matches.filter((path_) => !filter(path_)); + }; + module2.exports.stream = (patterns, options) => { + const globTasks = generateGlobTasks(patterns, options); + const tasks = []; + for (const task of globTasks) { + const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); + tasks.push(...newTask); + } + const filter = getFilterSync(options); + const filterStream = new FilterStream((p) => !filter(p)); + const uniqueStream = new UniqueStream(); + return merge2(tasks.map((task) => fastGlob.stream(task.pattern, task.options))).pipe(filterStream).pipe(uniqueStream); + }; + module2.exports.generateGlobTasks = generateGlobTasks; + module2.exports.hasMagic = (patterns, options) => [].concat(patterns).some((pattern) => fastGlob.isDynamicPattern(pattern, options)); + module2.exports.gitignore = gitignore; + } +}); + +// ../../node_modules/.pnpm/is-path-cwd@2.2.0/node_modules/is-path-cwd/index.js +var require_is_path_cwd = __commonJS({ + "../../node_modules/.pnpm/is-path-cwd@2.2.0/node_modules/is-path-cwd/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + module2.exports = (path_) => { + let cwd = process.cwd(); + path_ = path.resolve(path_); + if (process.platform === "win32") { + cwd = cwd.toLowerCase(); + path_ = path_.toLowerCase(); + } + return path_ === cwd; + }; + } +}); + +// ../../node_modules/.pnpm/is-path-inside@3.0.3/node_modules/is-path-inside/index.js +var require_is_path_inside = __commonJS({ + "../../node_modules/.pnpm/is-path-inside@3.0.3/node_modules/is-path-inside/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + module2.exports = (childPath, parentPath) => { + const relation = path.relative(parentPath, childPath); + return Boolean(relation && relation !== ".." && !relation.startsWith(`..${path.sep}`) && relation !== path.resolve(childPath)); + }; + } +}); + +// ../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js +var require_old = __commonJS({ + "../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js"(exports2) { + var pathModule = require("path"); + var isWindows = process.platform === "win32"; + var fs = require("fs"); + var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); + function rethrow() { + var callback; + if (DEBUG) { + var backtrace = new Error(); + callback = debugCallback; + } else + callback = missingCallback; + return callback; + function debugCallback(err) { + if (err) { + backtrace.message = err.message; + err = backtrace; + missingCallback(err); + } + } + function missingCallback(err) { + if (err) { + if (process.throwDeprecation) + throw err; + else if (!process.noDeprecation) { + var msg = "fs: missing callback " + (err.stack || err.message); + if (process.traceDeprecation) + console.trace(msg); + else + console.error(msg); + } + } + } + } + function maybeCallback(cb) { + return typeof cb === "function" ? cb : rethrow(); + } + var normalize = pathModule.normalize; + if (isWindows) { + nextPartRe = /(.*?)(?:[\/\\]+|$)/g; + } else { + nextPartRe = /(.*?)(?:[\/]+|$)/g; + } + var nextPartRe; + if (isWindows) { + splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; + } else { + splitRootRe = /^[\/]*/; + } + var splitRootRe; + exports2.realpathSync = function realpathSync(p, cache) { + p = pathModule.resolve(p); + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return cache[p]; + } + var original = p, seenLinks = {}, knownHard = {}; + var pos; + var current; + var base; + var previous; + start(); + function start() { + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ""; + if (isWindows && !knownHard[base]) { + fs.lstatSync(base); + knownHard[base] = true; + } + } + while (pos < p.length) { + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + if (knownHard[base] || cache && cache[base] === base) { + continue; + } + var resolvedLink; + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + resolvedLink = cache[base]; + } else { + var stat = fs.lstatSync(base); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) + cache[base] = base; + continue; + } + var linkTarget = null; + if (!isWindows) { + var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + linkTarget = seenLinks[id]; + } + } + if (linkTarget === null) { + fs.statSync(base); + linkTarget = fs.readlinkSync(base); + } + resolvedLink = pathModule.resolve(previous, linkTarget); + if (cache) + cache[base] = resolvedLink; + if (!isWindows) + seenLinks[id] = linkTarget; + } + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + if (cache) + cache[original] = p; + return p; + }; + exports2.realpath = function realpath(p, cache, cb) { + if (typeof cb !== "function") { + cb = maybeCallback(cache); + cache = null; + } + p = pathModule.resolve(p); + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return process.nextTick(cb.bind(null, null, cache[p])); + } + var original = p, seenLinks = {}, knownHard = {}; + var pos; + var current; + var base; + var previous; + start(); + function start() { + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ""; + if (isWindows && !knownHard[base]) { + fs.lstat(base, function(err) { + if (err) + return cb(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); + } + } + function LOOP() { + if (pos >= p.length) { + if (cache) + cache[original] = p; + return cb(null, p); + } + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + if (knownHard[base] || cache && cache[base] === base) { + return process.nextTick(LOOP); + } + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + return gotResolvedLink(cache[base]); + } + return fs.lstat(base, gotStat); + } + function gotStat(err, stat) { + if (err) + return cb(err); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) + cache[base] = base; + return process.nextTick(LOOP); + } + if (!isWindows) { + var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + return gotTarget(null, seenLinks[id], base); + } + } + fs.stat(base, function(err2) { + if (err2) + return cb(err2); + fs.readlink(base, function(err3, target) { + if (!isWindows) + seenLinks[id] = target; + gotTarget(err3, target); + }); + }); + } + function gotTarget(err, target, base2) { + if (err) + return cb(err); + var resolvedLink = pathModule.resolve(previous, target); + if (cache) + cache[base2] = resolvedLink; + gotResolvedLink(resolvedLink); + } + function gotResolvedLink(resolvedLink) { + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + }; + } +}); + +// ../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js +var require_fs5 = __commonJS({ + "../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js"(exports2, module2) { + module2.exports = realpath; + realpath.realpath = realpath; + realpath.sync = realpathSync; + realpath.realpathSync = realpathSync; + realpath.monkeypatch = monkeypatch; + realpath.unmonkeypatch = unmonkeypatch; + var fs = require("fs"); + var origRealpath = fs.realpath; + var origRealpathSync = fs.realpathSync; + var version = process.version; + var ok = /^v[0-5]\./.test(version); + var old = require_old(); + function newError(er) { + return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG"); + } + function realpath(p, cache, cb) { + if (ok) { + return origRealpath(p, cache, cb); + } + if (typeof cache === "function") { + cb = cache; + cache = null; + } + origRealpath(p, cache, function(er, result) { + if (newError(er)) { + old.realpath(p, cache, cb); + } else { + cb(er, result); + } + }); + } + function realpathSync(p, cache) { + if (ok) { + return origRealpathSync(p, cache); + } + try { + return origRealpathSync(p, cache); + } catch (er) { + if (newError(er)) { + return old.realpathSync(p, cache); + } else { + throw er; + } + } + } + function monkeypatch() { + fs.realpath = realpath; + fs.realpathSync = realpathSync; + } + function unmonkeypatch() { + fs.realpath = origRealpath; + fs.realpathSync = origRealpathSync; + } + } +}); + +// ../../node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/index.js +var require_concat_map = __commonJS({ + "../../node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/index.js"(exports2, module2) { + module2.exports = function(xs, fn2) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn2(xs[i], i); + if (isArray(x)) + res.push.apply(res, x); + else + res.push(x); + } + return res; + }; + var isArray = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + } +}); + +// ../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js +var require_balanced_match = __commonJS({ + "../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js"(exports2, module2) { + "use strict"; + module2.exports = balanced; + function balanced(a, b, str) { + if (a instanceof RegExp) + a = maybeMatch(a, str); + if (b instanceof RegExp) + b = maybeMatch(b, str); + var r = range(a, b, str); + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; + } + function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; + } + balanced.range = range; + function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + if (ai >= 0 && bi > 0) { + if (a === b) { + return [ai, bi]; + } + begs = []; + left = str.length; + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [begs.pop(), bi]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + bi = str.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length) { + result = [left, right]; + } + } + return result; + } + } +}); + +// ../../node_modules/.pnpm/brace-expansion@1.1.11/node_modules/brace-expansion/index.js +var require_brace_expansion = __commonJS({ + "../../node_modules/.pnpm/brace-expansion@1.1.11/node_modules/brace-expansion/index.js"(exports2, module2) { + var concatMap = require_concat_map(); + var balanced = require_balanced_match(); + module2.exports = expandTop; + var escSlash = "\0SLASH" + Math.random() + "\0"; + var escOpen = "\0OPEN" + Math.random() + "\0"; + var escClose = "\0CLOSE" + Math.random() + "\0"; + var escComma = "\0COMMA" + Math.random() + "\0"; + var escPeriod = "\0PERIOD" + Math.random() + "\0"; + function numeric(str) { + return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); + } + function escapeBraces(str) { + return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); + } + function unescapeBraces(str) { + return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); + } + function parseCommaParts(str) { + if (!str) + return [""]; + var parts = []; + var m = balanced("{", "}", str); + if (!m) + return str.split(","); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(","); + p[p.length - 1] += "{" + body + "}"; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; + } + function expandTop(str) { + if (!str) + return []; + if (str.substr(0, 2) === "{}") { + str = "\\{\\}" + str.substr(2); + } + return expand(escapeBraces(str), true).map(unescapeBraces); + } + function embrace(str) { + return "{" + str + "}"; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + function lte(i, y) { + return i <= y; + } + function gte(i, y) { + return i >= y; + } + function expand(str, isTop) { + var expansions = []; + var m = balanced("{", "}", str); + if (!m || /\$$/.test(m.pre)) + return [str]; + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,.*\}/)) { + str = m.pre + "{" + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length ? expand(m.post, false) : [""]; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + var pre = m.pre; + var post = m.post.length ? expand(m.post, false) : [""]; + var N; + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + N = []; + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") + c = ""; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) + c = "-" + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { + return expand(el, false); + }); + } + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + return expansions; + } + } +}); + +// ../../node_modules/.pnpm/minimatch@3.0.4/node_modules/minimatch/minimatch.js +var require_minimatch = __commonJS({ + "../../node_modules/.pnpm/minimatch@3.0.4/node_modules/minimatch/minimatch.js"(exports2, module2) { + module2.exports = minimatch; + minimatch.Minimatch = Minimatch; + var path = { sep: "/" }; + try { + path = require("path"); + } catch (er) { + } + var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var expand = require_brace_expansion(); + var plTypes = { + "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, + "?": { open: "(?:", close: ")?" }, + "+": { open: "(?:", close: ")+" }, + "*": { open: "(?:", close: ")*" }, + "@": { open: "(?:", close: ")" } + }; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials = charSet("().*{}+?[]^$\\!"); + function charSet(s) { + return s.split("").reduce(function(set, c) { + set[c] = true; + return set; + }, {}); + } + var slashSplit = /\/+/; + minimatch.filter = filter; + function filter(pattern, options) { + options = options || {}; + return function(p, i, list) { + return minimatch(p, pattern, options); + }; + } + function ext(a, b) { + a = a || {}; + b = b || {}; + var t = {}; + Object.keys(b).forEach(function(k) { + t[k] = b[k]; + }); + Object.keys(a).forEach(function(k) { + t[k] = a[k]; + }); + return t; + } + minimatch.defaults = function(def) { + if (!def || !Object.keys(def).length) + return minimatch; + var orig = minimatch; + var m = function minimatch2(p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)); + }; + m.Minimatch = function Minimatch2(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + return m; + }; + Minimatch.defaults = function(def) { + if (!def || !Object.keys(def).length) + return Minimatch; + return minimatch.defaults(def).Minimatch; + }; + function minimatch(p, pattern, options) { + if (typeof pattern !== "string") { + throw new TypeError("glob pattern string required"); + } + if (!options) + options = {}; + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } + if (pattern.trim() === "") + return p === ""; + return new Minimatch(pattern, options).match(p); + } + function Minimatch(pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options); + } + if (typeof pattern !== "string") { + throw new TypeError("glob pattern string required"); + } + if (!options) + options = {}; + pattern = pattern.trim(); + if (path.sep !== "/") { + pattern = pattern.split(path.sep).join("/"); + } + this.options = options; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.make(); + } + Minimatch.prototype.debug = function() { + }; + Minimatch.prototype.make = make; + function make() { + if (this._made) + return; + var pattern = this.pattern; + var options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + var set = this.globSet = this.braceExpand(); + if (options.debug) + this.debug = console.error; + this.debug(this.pattern, set); + set = this.globParts = set.map(function(s) { + return s.split(slashSplit); + }); + this.debug(this.pattern, set); + set = set.map(function(s, si, set2) { + return s.map(this.parse, this); + }, this); + this.debug(this.pattern, set); + set = set.filter(function(s) { + return s.indexOf(false) === -1; + }); + this.debug(this.pattern, set); + this.set = set; + } + Minimatch.prototype.parseNegate = parseNegate; + function parseNegate() { + var pattern = this.pattern; + var negate = false; + var options = this.options; + var negateOffset = 0; + if (options.nonegate) + return; + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { + negate = !negate; + negateOffset++; + } + if (negateOffset) + this.pattern = pattern.substr(negateOffset); + this.negate = negate; + } + minimatch.braceExpand = function(pattern, options) { + return braceExpand(pattern, options); + }; + Minimatch.prototype.braceExpand = braceExpand; + function braceExpand(pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options; + } else { + options = {}; + } + } + pattern = typeof pattern === "undefined" ? this.pattern : pattern; + if (typeof pattern === "undefined") { + throw new TypeError("undefined pattern"); + } + if (options.nobrace || !pattern.match(/\{.*\}/)) { + return [pattern]; + } + return expand(pattern); + } + Minimatch.prototype.parse = parse; + var SUBPARSE = {}; + function parse(pattern, isSub) { + if (pattern.length > 1024 * 64) { + throw new TypeError("pattern is too long"); + } + var options = this.options; + if (!options.noglobstar && pattern === "**") + return GLOBSTAR; + if (pattern === "") + return ""; + var re = ""; + var hasMagic = !!options.nocase; + var escaping = false; + var patternListStack = []; + var negativeLists = []; + var stateChar; + var inClass = false; + var reClassStart = -1; + var classStart = -1; + var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + var self2 = this; + function clearStateChar() { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; + } + self2.debug("clearStateChar %j %j", stateChar, re); + stateChar = false; + } + } + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + this.debug("%s %s %s %j", pattern, i, re, c); + if (escaping && reSpecials[c]) { + re += "\\" + c; + escaping = false; + continue; + } + switch (c) { + case "/": + return false; + case "\\": + clearStateChar(); + escaping = true; + continue; + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); + if (inClass) { + this.debug(" in class"); + if (c === "!" && i === classStart + 1) + c = "^"; + re += c; + continue; + } + self2.debug("call clearStateChar %j", stateChar); + clearStateChar(); + stateChar = c; + if (options.noext) + clearStateChar(); + continue; + case "(": + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }); + re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; + this.debug("plType %j %j", stateChar, re); + stateChar = false; + continue; + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + clearStateChar(); + hasMagic = true; + var pl = patternListStack.pop(); + re += pl.close; + if (pl.type === "!") { + negativeLists.push(pl); + } + pl.reEnd = re.length; + continue; + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + clearStateChar(); + re += "|"; + continue; + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + escaping = false; + continue; + } + if (inClass) { + var cs = pattern.substring(classStart + 1, i); + try { + RegExp("[" + cs + "]"); + } catch (er) { + var sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; + hasMagic = hasMagic || sp[1]; + inClass = false; + continue; + } + } + hasMagic = true; + inClass = false; + re += c; + continue; + default: + clearStateChar(); + if (escaping) { + escaping = false; + } else if (reSpecials[c] && !(c === "^" && inClass)) { + re += "\\"; + } + re += c; + } + } + if (inClass) { + cs = pattern.substr(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length); + this.debug("setting tail", re, pl); + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { + if (!$2) { + $2 = "\\"; + } + return $1 + $1 + $2 + "|"; + }); + this.debug("tail=%j\n %s", tail, tail, pl, re); + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) { + re += "\\\\"; + } + var addPatternStart = false; + switch (re.charAt(0)) { + case ".": + case "[": + case "(": + addPatternStart = true; + } + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n]; + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); + nlLast += nlAfter; + var openParensBefore = nlBefore.split("(").length - 1; + var cleanAfter = nlAfter; + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); + } + nlAfter = cleanAfter; + var dollar = ""; + if (nlAfter === "" && isSub !== SUBPARSE) { + dollar = "$"; + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; + re = newRe; + } + if (re !== "" && hasMagic) { + re = "(?=.)" + re; + } + if (addPatternStart) { + re = patternStart + re; + } + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + if (!hasMagic) { + return globUnescape(pattern); + } + var flags = options.nocase ? "i" : ""; + try { + var regExp = new RegExp("^" + re + "$", flags); + } catch (er) { + return new RegExp("$."); + } + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + minimatch.makeRe = function(pattern, options) { + return new Minimatch(pattern, options || {}).makeRe(); + }; + Minimatch.prototype.makeRe = makeRe; + function makeRe() { + if (this.regexp || this.regexp === false) + return this.regexp; + var set = this.set; + if (!set.length) { + this.regexp = false; + return this.regexp; + } + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + var flags = options.nocase ? "i" : ""; + var re = set.map(function(pattern) { + return pattern.map(function(p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) + re = "^(?!" + re + ").*$"; + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + return this.regexp; + } + minimatch.match = function(list, pattern, options) { + options = options || {}; + var mm = new Minimatch(pattern, options); + list = list.filter(function(f) { + return mm.match(f); + }); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; + }; + Minimatch.prototype.match = match; + function match(f, partial) { + this.debug("match", f, this.pattern); + if (this.comment) + return false; + if (this.empty) + return f === ""; + if (f === "/" && partial) + return true; + var options = this.options; + if (path.sep !== "/") { + f = f.split(path.sep).join("/"); + } + f = f.split(slashSplit); + this.debug(this.pattern, "split", f); + var set = this.set; + this.debug(this.pattern, "set", set); + var filename; + var i; + for (i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) + break; + } + for (i = 0; i < set.length; i++) { + var pattern = set[i]; + var file = f; + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + var hit = this.matchOne(file, pattern, partial); + if (hit) { + if (options.flipNegate) + return true; + return !this.negate; + } + } + if (options.flipNegate) + return false; + return this.negate; + } + Minimatch.prototype.matchOne = function(file, pattern, partial) { + var options = this.options; + this.debug("matchOne", { "this": this, file, pattern }); + this.debug("matchOne", file.length, pattern.length); + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug("matchOne loop"); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); + if (p === false) + return false; + if (p === GLOBSTAR) { + this.debug("GLOBSTAR", [pattern, p, f]); + var fr = fi; + var pr = pi + 1; + if (pr === pl) { + this.debug("** at the end"); + for (; fi < fl; fi++) { + if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") + return false; + } + return true; + } + while (fr < fl) { + var swallowee = file[fr]; + this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug("globstar found match!", fr, fl, swallowee); + return true; + } else { + if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { + this.debug("dot detected!", file, fr, pattern, pr); + break; + } + this.debug("globstar swallow a segment, and continue"); + fr++; + } + } + if (partial) { + this.debug("\n>>> no match, partial?", file, fr, pattern, pr); + if (fr === fl) + return true; + } + return false; + } + var hit; + if (typeof p === "string") { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase(); + } else { + hit = f === p; + } + this.debug("string match", p, f, hit); + } else { + hit = f.match(p); + this.debug("pattern match", p, f, hit); + } + if (!hit) + return false; + } + if (fi === fl && pi === pl) { + return true; + } else if (fi === fl) { + return partial; + } else if (pi === pl) { + var emptyFileEnd = fi === fl - 1 && file[fi] === ""; + return emptyFileEnd; + } + throw new Error("wtf?"); + }; + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); + } + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } + } +}); + +// ../../node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js +var require_path_is_absolute = __commonJS({ + "../../node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js"(exports2, module2) { + "use strict"; + function posix(path) { + return path.charAt(0) === "/"; + } + function win32(path) { + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ""; + var isUnc = Boolean(device && device.charAt(1) !== ":"); + return Boolean(result[2] || isUnc); + } + module2.exports = process.platform === "win32" ? win32 : posix; + module2.exports.posix = posix; + module2.exports.win32 = win32; + } +}); + +// ../../node_modules/.pnpm/glob@7.2.0/node_modules/glob/common.js +var require_common7 = __commonJS({ + "../../node_modules/.pnpm/glob@7.2.0/node_modules/glob/common.js"(exports2) { + exports2.setopts = setopts; + exports2.ownProp = ownProp; + exports2.makeAbs = makeAbs; + exports2.finish = finish; + exports2.mark = mark; + exports2.isIgnored = isIgnored; + exports2.childrenIgnored = childrenIgnored; + function ownProp(obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field); + } + var fs = require("fs"); + var path = require("path"); + var minimatch = require_minimatch(); + var isAbsolute = require_path_is_absolute(); + var Minimatch = minimatch.Minimatch; + function alphasort(a, b) { + return a.localeCompare(b, "en"); + } + function setupIgnores(self2, options) { + self2.ignore = options.ignore || []; + if (!Array.isArray(self2.ignore)) + self2.ignore = [self2.ignore]; + if (self2.ignore.length) { + self2.ignore = self2.ignore.map(ignoreMap); + } + } + function ignoreMap(pattern) { + var gmatcher = null; + if (pattern.slice(-3) === "/**") { + var gpattern = pattern.replace(/(\/\*\*)+$/, ""); + gmatcher = new Minimatch(gpattern, { dot: true }); + } + return { + matcher: new Minimatch(pattern, { dot: true }), + gmatcher + }; + } + function setopts(self2, pattern, options) { + if (!options) + options = {}; + if (options.matchBase && pattern.indexOf("/") === -1) { + if (options.noglobstar) { + throw new Error("base matching requires globstar"); + } + pattern = "**/" + pattern; + } + self2.silent = !!options.silent; + self2.pattern = pattern; + self2.strict = options.strict !== false; + self2.realpath = !!options.realpath; + self2.realpathCache = options.realpathCache || Object.create(null); + self2.follow = !!options.follow; + self2.dot = !!options.dot; + self2.mark = !!options.mark; + self2.nodir = !!options.nodir; + if (self2.nodir) + self2.mark = true; + self2.sync = !!options.sync; + self2.nounique = !!options.nounique; + self2.nonull = !!options.nonull; + self2.nosort = !!options.nosort; + self2.nocase = !!options.nocase; + self2.stat = !!options.stat; + self2.noprocess = !!options.noprocess; + self2.absolute = !!options.absolute; + self2.fs = options.fs || fs; + self2.maxLength = options.maxLength || Infinity; + self2.cache = options.cache || Object.create(null); + self2.statCache = options.statCache || Object.create(null); + self2.symlinks = options.symlinks || Object.create(null); + setupIgnores(self2, options); + self2.changedCwd = false; + var cwd = process.cwd(); + if (!ownProp(options, "cwd")) + self2.cwd = cwd; + else { + self2.cwd = path.resolve(options.cwd); + self2.changedCwd = self2.cwd !== cwd; + } + self2.root = options.root || path.resolve(self2.cwd, "/"); + self2.root = path.resolve(self2.root); + if (process.platform === "win32") + self2.root = self2.root.replace(/\\/g, "/"); + self2.cwdAbs = isAbsolute(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd); + if (process.platform === "win32") + self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/"); + self2.nomount = !!options.nomount; + options.nonegate = true; + options.nocomment = true; + self2.minimatch = new Minimatch(pattern, options); + self2.options = self2.minimatch.options; + } + function finish(self2) { + var nou = self2.nounique; + var all = nou ? [] : Object.create(null); + for (var i = 0, l = self2.matches.length; i < l; i++) { + var matches = self2.matches[i]; + if (!matches || Object.keys(matches).length === 0) { + if (self2.nonull) { + var literal = self2.minimatch.globSet[i]; + if (nou) + all.push(literal); + else + all[literal] = true; + } + } else { + var m = Object.keys(matches); + if (nou) + all.push.apply(all, m); + else + m.forEach(function(m2) { + all[m2] = true; + }); + } + } + if (!nou) + all = Object.keys(all); + if (!self2.nosort) + all = all.sort(alphasort); + if (self2.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self2._mark(all[i]); + } + if (self2.nodir) { + all = all.filter(function(e) { + var notDir = !/\/$/.test(e); + var c = self2.cache[e] || self2.cache[makeAbs(self2, e)]; + if (notDir && c) + notDir = c !== "DIR" && !Array.isArray(c); + return notDir; + }); + } + } + if (self2.ignore.length) + all = all.filter(function(m2) { + return !isIgnored(self2, m2); + }); + self2.found = all; + } + function mark(self2, p) { + var abs = makeAbs(self2, p); + var c = self2.cache[abs]; + var m = p; + if (c) { + var isDir = c === "DIR" || Array.isArray(c); + var slash = p.slice(-1) === "/"; + if (isDir && !slash) + m += "/"; + else if (!isDir && slash) + m = m.slice(0, -1); + if (m !== p) { + var mabs = makeAbs(self2, m); + self2.statCache[mabs] = self2.statCache[abs]; + self2.cache[mabs] = self2.cache[abs]; + } + } + return m; + } + function makeAbs(self2, f) { + var abs = f; + if (f.charAt(0) === "/") { + abs = path.join(self2.root, f); + } else if (isAbsolute(f) || f === "") { + abs = f; + } else if (self2.changedCwd) { + abs = path.resolve(self2.cwd, f); + } else { + abs = path.resolve(f); + } + if (process.platform === "win32") + abs = abs.replace(/\\/g, "/"); + return abs; + } + function isIgnored(self2, path2) { + if (!self2.ignore.length) + return false; + return self2.ignore.some(function(item) { + return item.matcher.match(path2) || !!(item.gmatcher && item.gmatcher.match(path2)); + }); + } + function childrenIgnored(self2, path2) { + if (!self2.ignore.length) + return false; + return self2.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path2)); + }); + } + } +}); + +// ../../node_modules/.pnpm/glob@7.2.0/node_modules/glob/sync.js +var require_sync7 = __commonJS({ + "../../node_modules/.pnpm/glob@7.2.0/node_modules/glob/sync.js"(exports2, module2) { + module2.exports = globSync; + globSync.GlobSync = GlobSync; + var rp = require_fs5(); + var minimatch = require_minimatch(); + var Minimatch = minimatch.Minimatch; + var Glob = require_glob().Glob; + var util = require("util"); + var path = require("path"); + var assert = require("assert"); + var isAbsolute = require_path_is_absolute(); + var common = require_common7(); + var setopts = common.setopts; + var ownProp = common.ownProp; + var childrenIgnored = common.childrenIgnored; + var isIgnored = common.isIgnored; + function globSync(pattern, options) { + if (typeof options === "function" || arguments.length === 3) + throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); + return new GlobSync(pattern, options).found; + } + function GlobSync(pattern, options) { + if (!pattern) + throw new Error("must provide pattern"); + if (typeof options === "function" || arguments.length === 3) + throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options); + setopts(this, pattern, options); + if (this.noprocess) + return this; + var n = this.minimatch.set.length; + this.matches = new Array(n); + for (var i = 0; i < n; i++) { + this._process(this.minimatch.set[i], i, false); + } + this._finish(); + } + GlobSync.prototype._finish = function() { + assert(this instanceof GlobSync); + if (this.realpath) { + var self2 = this; + this.matches.forEach(function(matchset, index) { + var set = self2.matches[index] = Object.create(null); + for (var p in matchset) { + try { + p = self2._makeAbs(p); + var real = rp.realpathSync(p, self2.realpathCache); + set[real] = true; + } catch (er) { + if (er.syscall === "stat") + set[self2._makeAbs(p)] = true; + else + throw er; + } + } + }); + } + common.finish(this); + }; + GlobSync.prototype._process = function(pattern, index, inGlobStar) { + assert(this instanceof GlobSync); + var n = 0; + while (typeof pattern[n] === "string") { + n++; + } + var prefix; + switch (n) { + case pattern.length: + this._processSimple(pattern.join("/"), index); + return; + case 0: + prefix = null; + break; + default: + prefix = pattern.slice(0, n).join("/"); + break; + } + var remain = pattern.slice(n); + var read; + if (prefix === null) + read = "."; + else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { + if (!prefix || !isAbsolute(prefix)) + prefix = "/" + prefix; + read = prefix; + } else + read = prefix; + var abs = this._makeAbs(read); + if (childrenIgnored(this, read)) + return; + var isGlobStar = remain[0] === minimatch.GLOBSTAR; + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar); + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar); + }; + GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar); + if (!entries) + return; + var pn = remain[0]; + var negate = !!this.minimatch.negate; + var rawGlob = pn._glob; + var dotOk = this.dot || rawGlob.charAt(0) === "."; + var matchedEntries = []; + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (e.charAt(0) !== "." || dotOk) { + var m; + if (negate && !prefix) { + m = !e.match(pn); + } else { + m = e.match(pn); + } + if (m) + matchedEntries.push(e); + } + } + var len = matchedEntries.length; + if (len === 0) + return; + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + if (prefix) { + if (prefix.slice(-1) !== "/") + e = prefix + "/" + e; + else + e = prefix + e; + } + if (e.charAt(0) === "/" && !this.nomount) { + e = path.join(this.root, e); + } + this._emitMatch(index, e); + } + return; + } + remain.shift(); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + var newPattern; + if (prefix) + newPattern = [prefix, e]; + else + newPattern = [e]; + this._process(newPattern.concat(remain), index, inGlobStar); + } + }; + GlobSync.prototype._emitMatch = function(index, e) { + if (isIgnored(this, e)) + return; + var abs = this._makeAbs(e); + if (this.mark) + e = this._mark(e); + if (this.absolute) { + e = abs; + } + if (this.matches[index][e]) + return; + if (this.nodir) { + var c = this.cache[abs]; + if (c === "DIR" || Array.isArray(c)) + return; + } + this.matches[index][e] = true; + if (this.stat) + this._stat(e); + }; + GlobSync.prototype._readdirInGlobStar = function(abs) { + if (this.follow) + return this._readdir(abs, false); + var entries; + var lstat; + var stat; + try { + lstat = this.fs.lstatSync(abs); + } catch (er) { + if (er.code === "ENOENT") { + return null; + } + } + var isSym = lstat && lstat.isSymbolicLink(); + this.symlinks[abs] = isSym; + if (!isSym && lstat && !lstat.isDirectory()) + this.cache[abs] = "FILE"; + else + entries = this._readdir(abs, false); + return entries; + }; + GlobSync.prototype._readdir = function(abs, inGlobStar) { + var entries; + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs); + if (ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (!c || c === "FILE") + return null; + if (Array.isArray(c)) + return c; + } + try { + return this._readdirEntries(abs, this.fs.readdirSync(abs)); + } catch (er) { + this._readdirError(abs, er); + return null; + } + }; + GlobSync.prototype._readdirEntries = function(abs, entries) { + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (abs === "/") + e = abs + e; + else + e = abs + "/" + e; + this.cache[e] = true; + } + } + this.cache[abs] = entries; + return entries; + }; + GlobSync.prototype._readdirError = function(f, er) { + switch (er.code) { + case "ENOTSUP": + case "ENOTDIR": + var abs = this._makeAbs(f); + this.cache[abs] = "FILE"; + if (abs === this.cwdAbs) { + var error = new Error(er.code + " invalid cwd " + this.cwd); + error.path = this.cwd; + error.code = er.code; + throw error; + } + break; + case "ENOENT": + case "ELOOP": + case "ENAMETOOLONG": + case "UNKNOWN": + this.cache[this._makeAbs(f)] = false; + break; + default: + this.cache[this._makeAbs(f)] = false; + if (this.strict) + throw er; + if (!this.silent) + console.error("glob error", er); + break; + } + }; + GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar); + if (!entries) + return; + var remainWithoutGlobStar = remain.slice(1); + var gspref = prefix ? [prefix] : []; + var noGlobStar = gspref.concat(remainWithoutGlobStar); + this._process(noGlobStar, index, false); + var len = entries.length; + var isSym = this.symlinks[abs]; + if (isSym && inGlobStar) + return; + for (var i = 0; i < len; i++) { + var e = entries[i]; + if (e.charAt(0) === "." && !this.dot) + continue; + var instead = gspref.concat(entries[i], remainWithoutGlobStar); + this._process(instead, index, true); + var below = gspref.concat(entries[i], remain); + this._process(below, index, true); + } + }; + GlobSync.prototype._processSimple = function(prefix, index) { + var exists = this._stat(prefix); + if (!this.matches[index]) + this.matches[index] = Object.create(null); + if (!exists) + return; + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix); + if (prefix.charAt(0) === "/") { + prefix = path.join(this.root, prefix); + } else { + prefix = path.resolve(this.root, prefix); + if (trail) + prefix += "/"; + } + } + if (process.platform === "win32") + prefix = prefix.replace(/\\/g, "/"); + this._emitMatch(index, prefix); + }; + GlobSync.prototype._stat = function(f) { + var abs = this._makeAbs(f); + var needDir = f.slice(-1) === "/"; + if (f.length > this.maxLength) + return false; + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (Array.isArray(c)) + c = "DIR"; + if (!needDir || c === "DIR") + return c; + if (needDir && c === "FILE") + return false; + } + var exists; + var stat = this.statCache[abs]; + if (!stat) { + var lstat; + try { + lstat = this.fs.lstatSync(abs); + } catch (er) { + if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { + this.statCache[abs] = false; + return false; + } + } + if (lstat && lstat.isSymbolicLink()) { + try { + stat = this.fs.statSync(abs); + } catch (er) { + stat = lstat; + } + } else { + stat = lstat; + } + } + this.statCache[abs] = stat; + var c = true; + if (stat) + c = stat.isDirectory() ? "DIR" : "FILE"; + this.cache[abs] = this.cache[abs] || c; + if (needDir && c === "FILE") + return false; + return c; + }; + GlobSync.prototype._mark = function(p) { + return common.mark(this, p); + }; + GlobSync.prototype._makeAbs = function(f) { + return common.makeAbs(this, f); + }; + } +}); + +// ../../node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js +var require_inflight = __commonJS({ + "../../node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js"(exports2, module2) { + var wrappy = require_wrappy(); + var reqs = Object.create(null); + var once = require_once(); + module2.exports = wrappy(inflight); + function inflight(key, cb) { + if (reqs[key]) { + reqs[key].push(cb); + return null; + } else { + reqs[key] = [cb]; + return makeres(key); + } + } + function makeres(key) { + return once(function RES() { + var cbs = reqs[key]; + var len = cbs.length; + var args2 = slice(arguments); + try { + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args2); + } + } finally { + if (cbs.length > len) { + cbs.splice(0, len); + process.nextTick(function() { + RES.apply(null, args2); + }); + } else { + delete reqs[key]; + } + } + }); + } + function slice(args2) { + var length = args2.length; + var array = []; + for (var i = 0; i < length; i++) + array[i] = args2[i]; + return array; + } + } +}); + +// ../../node_modules/.pnpm/glob@7.2.0/node_modules/glob/glob.js +var require_glob = __commonJS({ + "../../node_modules/.pnpm/glob@7.2.0/node_modules/glob/glob.js"(exports2, module2) { + module2.exports = glob; + var rp = require_fs5(); + var minimatch = require_minimatch(); + var Minimatch = minimatch.Minimatch; + var inherits = require_inherits(); + var EE = require("events").EventEmitter; + var path = require("path"); + var assert = require("assert"); + var isAbsolute = require_path_is_absolute(); + var globSync = require_sync7(); + var common = require_common7(); + var setopts = common.setopts; + var ownProp = common.ownProp; + var inflight = require_inflight(); + var util = require("util"); + var childrenIgnored = common.childrenIgnored; + var isIgnored = common.isIgnored; + var once = require_once(); + function glob(pattern, options, cb) { + if (typeof options === "function") + cb = options, options = {}; + if (!options) + options = {}; + if (options.sync) { + if (cb) + throw new TypeError("callback provided to sync glob"); + return globSync(pattern, options); + } + return new Glob(pattern, options, cb); + } + glob.sync = globSync; + var GlobSync = glob.GlobSync = globSync.GlobSync; + glob.glob = glob; + function extend(origin, add) { + if (add === null || typeof add !== "object") { + return origin; + } + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; + } + glob.hasMagic = function(pattern, options_) { + var options = extend({}, options_); + options.noprocess = true; + var g = new Glob(pattern, options); + var set = g.minimatch.set; + if (!pattern) + return false; + if (set.length > 1) + return true; + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== "string") + return true; + } + return false; + }; + glob.Glob = Glob; + inherits(Glob, EE); + function Glob(pattern, options, cb) { + if (typeof options === "function") { + cb = options; + options = null; + } + if (options && options.sync) { + if (cb) + throw new TypeError("callback provided to sync glob"); + return new GlobSync(pattern, options); + } + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb); + setopts(this, pattern, options); + this._didRealPath = false; + var n = this.minimatch.set.length; + this.matches = new Array(n); + if (typeof cb === "function") { + cb = once(cb); + this.on("error", cb); + this.on("end", function(matches) { + cb(null, matches); + }); + } + var self2 = this; + this._processing = 0; + this._emitQueue = []; + this._processQueue = []; + this.paused = false; + if (this.noprocess) + return this; + if (n === 0) + return done(); + var sync = true; + for (var i = 0; i < n; i++) { + this._process(this.minimatch.set[i], i, false, done); + } + sync = false; + function done() { + --self2._processing; + if (self2._processing <= 0) { + if (sync) { + process.nextTick(function() { + self2._finish(); + }); + } else { + self2._finish(); + } + } + } + } + Glob.prototype._finish = function() { + assert(this instanceof Glob); + if (this.aborted) + return; + if (this.realpath && !this._didRealpath) + return this._realpath(); + common.finish(this); + this.emit("end", this.found); + }; + Glob.prototype._realpath = function() { + if (this._didRealpath) + return; + this._didRealpath = true; + var n = this.matches.length; + if (n === 0) + return this._finish(); + var self2 = this; + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next); + function next() { + if (--n === 0) + self2._finish(); + } + }; + Glob.prototype._realpathSet = function(index, cb) { + var matchset = this.matches[index]; + if (!matchset) + return cb(); + var found = Object.keys(matchset); + var self2 = this; + var n = found.length; + if (n === 0) + return cb(); + var set = this.matches[index] = Object.create(null); + found.forEach(function(p, i) { + p = self2._makeAbs(p); + rp.realpath(p, self2.realpathCache, function(er, real) { + if (!er) + set[real] = true; + else if (er.syscall === "stat") + set[p] = true; + else + self2.emit("error", er); + if (--n === 0) { + self2.matches[index] = set; + cb(); + } + }); + }); + }; + Glob.prototype._mark = function(p) { + return common.mark(this, p); + }; + Glob.prototype._makeAbs = function(f) { + return common.makeAbs(this, f); + }; + Glob.prototype.abort = function() { + this.aborted = true; + this.emit("abort"); + }; + Glob.prototype.pause = function() { + if (!this.paused) { + this.paused = true; + this.emit("pause"); + } + }; + Glob.prototype.resume = function() { + if (this.paused) { + this.emit("resume"); + this.paused = false; + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0); + this._emitQueue.length = 0; + for (var i = 0; i < eq.length; i++) { + var e = eq[i]; + this._emitMatch(e[0], e[1]); + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0); + this._processQueue.length = 0; + for (var i = 0; i < pq.length; i++) { + var p = pq[i]; + this._processing--; + this._process(p[0], p[1], p[2], p[3]); + } + } + } + }; + Glob.prototype._process = function(pattern, index, inGlobStar, cb) { + assert(this instanceof Glob); + assert(typeof cb === "function"); + if (this.aborted) + return; + this._processing++; + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]); + return; + } + var n = 0; + while (typeof pattern[n] === "string") { + n++; + } + var prefix; + switch (n) { + case pattern.length: + this._processSimple(pattern.join("/"), index, cb); + return; + case 0: + prefix = null; + break; + default: + prefix = pattern.slice(0, n).join("/"); + break; + } + var remain = pattern.slice(n); + var read; + if (prefix === null) + read = "."; + else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { + if (!prefix || !isAbsolute(prefix)) + prefix = "/" + prefix; + read = prefix; + } else + read = prefix; + var abs = this._makeAbs(read); + if (childrenIgnored(this, read)) + return cb(); + var isGlobStar = remain[0] === minimatch.GLOBSTAR; + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb); + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); + }; + Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) { + var self2 = this; + this._readdir(abs, inGlobStar, function(er, entries) { + return self2._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb); + }); + }; + Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { + if (!entries) + return cb(); + var pn = remain[0]; + var negate = !!this.minimatch.negate; + var rawGlob = pn._glob; + var dotOk = this.dot || rawGlob.charAt(0) === "."; + var matchedEntries = []; + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (e.charAt(0) !== "." || dotOk) { + var m; + if (negate && !prefix) { + m = !e.match(pn); + } else { + m = e.match(pn); + } + if (m) + matchedEntries.push(e); + } + } + var len = matchedEntries.length; + if (len === 0) + return cb(); + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + if (prefix) { + if (prefix !== "/") + e = prefix + "/" + e; + else + e = prefix + e; + } + if (e.charAt(0) === "/" && !this.nomount) { + e = path.join(this.root, e); + } + this._emitMatch(index, e); + } + return cb(); + } + remain.shift(); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + var newPattern; + if (prefix) { + if (prefix !== "/") + e = prefix + "/" + e; + else + e = prefix + e; + } + this._process([e].concat(remain), index, inGlobStar, cb); + } + cb(); + }; + Glob.prototype._emitMatch = function(index, e) { + if (this.aborted) + return; + if (isIgnored(this, e)) + return; + if (this.paused) { + this._emitQueue.push([index, e]); + return; + } + var abs = isAbsolute(e) ? e : this._makeAbs(e); + if (this.mark) + e = this._mark(e); + if (this.absolute) + e = abs; + if (this.matches[index][e]) + return; + if (this.nodir) { + var c = this.cache[abs]; + if (c === "DIR" || Array.isArray(c)) + return; + } + this.matches[index][e] = true; + var st = this.statCache[abs]; + if (st) + this.emit("stat", e, st); + this.emit("match", e); + }; + Glob.prototype._readdirInGlobStar = function(abs, cb) { + if (this.aborted) + return; + if (this.follow) + return this._readdir(abs, false, cb); + var lstatkey = "lstat\0" + abs; + var self2 = this; + var lstatcb = inflight(lstatkey, lstatcb_); + if (lstatcb) + self2.fs.lstat(abs, lstatcb); + function lstatcb_(er, lstat) { + if (er && er.code === "ENOENT") + return cb(); + var isSym = lstat && lstat.isSymbolicLink(); + self2.symlinks[abs] = isSym; + if (!isSym && lstat && !lstat.isDirectory()) { + self2.cache[abs] = "FILE"; + cb(); + } else + self2._readdir(abs, false, cb); + } + }; + Glob.prototype._readdir = function(abs, inGlobStar, cb) { + if (this.aborted) + return; + cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb); + if (!cb) + return; + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb); + if (ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (!c || c === "FILE") + return cb(); + if (Array.isArray(c)) + return cb(null, c); + } + var self2 = this; + self2.fs.readdir(abs, readdirCb(this, abs, cb)); + }; + function readdirCb(self2, abs, cb) { + return function(er, entries) { + if (er) + self2._readdirError(abs, er, cb); + else + self2._readdirEntries(abs, entries, cb); + }; + } + Glob.prototype._readdirEntries = function(abs, entries, cb) { + if (this.aborted) + return; + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (abs === "/") + e = abs + e; + else + e = abs + "/" + e; + this.cache[e] = true; + } + } + this.cache[abs] = entries; + return cb(null, entries); + }; + Glob.prototype._readdirError = function(f, er, cb) { + if (this.aborted) + return; + switch (er.code) { + case "ENOTSUP": + case "ENOTDIR": + var abs = this._makeAbs(f); + this.cache[abs] = "FILE"; + if (abs === this.cwdAbs) { + var error = new Error(er.code + " invalid cwd " + this.cwd); + error.path = this.cwd; + error.code = er.code; + this.emit("error", error); + this.abort(); + } + break; + case "ENOENT": + case "ELOOP": + case "ENAMETOOLONG": + case "UNKNOWN": + this.cache[this._makeAbs(f)] = false; + break; + default: + this.cache[this._makeAbs(f)] = false; + if (this.strict) { + this.emit("error", er); + this.abort(); + } + if (!this.silent) + console.error("glob error", er); + break; + } + return cb(); + }; + Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) { + var self2 = this; + this._readdir(abs, inGlobStar, function(er, entries) { + self2._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); + }); + }; + Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { + if (!entries) + return cb(); + var remainWithoutGlobStar = remain.slice(1); + var gspref = prefix ? [prefix] : []; + var noGlobStar = gspref.concat(remainWithoutGlobStar); + this._process(noGlobStar, index, false, cb); + var isSym = this.symlinks[abs]; + var len = entries.length; + if (isSym && inGlobStar) + return cb(); + for (var i = 0; i < len; i++) { + var e = entries[i]; + if (e.charAt(0) === "." && !this.dot) + continue; + var instead = gspref.concat(entries[i], remainWithoutGlobStar); + this._process(instead, index, true, cb); + var below = gspref.concat(entries[i], remain); + this._process(below, index, true, cb); + } + cb(); + }; + Glob.prototype._processSimple = function(prefix, index, cb) { + var self2 = this; + this._stat(prefix, function(er, exists) { + self2._processSimple2(prefix, index, er, exists, cb); + }); + }; + Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) { + if (!this.matches[index]) + this.matches[index] = Object.create(null); + if (!exists) + return cb(); + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix); + if (prefix.charAt(0) === "/") { + prefix = path.join(this.root, prefix); + } else { + prefix = path.resolve(this.root, prefix); + if (trail) + prefix += "/"; + } + } + if (process.platform === "win32") + prefix = prefix.replace(/\\/g, "/"); + this._emitMatch(index, prefix); + cb(); + }; + Glob.prototype._stat = function(f, cb) { + var abs = this._makeAbs(f); + var needDir = f.slice(-1) === "/"; + if (f.length > this.maxLength) + return cb(); + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (Array.isArray(c)) + c = "DIR"; + if (!needDir || c === "DIR") + return cb(null, c); + if (needDir && c === "FILE") + return cb(); + } + var exists; + var stat = this.statCache[abs]; + if (stat !== void 0) { + if (stat === false) + return cb(null, stat); + else { + var type = stat.isDirectory() ? "DIR" : "FILE"; + if (needDir && type === "FILE") + return cb(); + else + return cb(null, type, stat); + } + } + var self2 = this; + var statcb = inflight("stat\0" + abs, lstatcb_); + if (statcb) + self2.fs.lstat(abs, statcb); + function lstatcb_(er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + return self2.fs.stat(abs, function(er2, stat2) { + if (er2) + self2._stat2(f, abs, null, lstat, cb); + else + self2._stat2(f, abs, er2, stat2, cb); + }); + } else { + self2._stat2(f, abs, er, lstat, cb); + } + } + }; + Glob.prototype._stat2 = function(f, abs, er, stat, cb) { + if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { + this.statCache[abs] = false; + return cb(); + } + var needDir = f.slice(-1) === "/"; + this.statCache[abs] = stat; + if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) + return cb(null, false, stat); + var c = true; + if (stat) + c = stat.isDirectory() ? "DIR" : "FILE"; + this.cache[abs] = this.cache[abs] || c; + if (needDir && c === "FILE") + return cb(); + return cb(null, c, stat); + }; + } +}); + +// ../../node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/rimraf.js +var require_rimraf2 = __commonJS({ + "../../node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/rimraf.js"(exports2, module2) { + var assert = require("assert"); + var path = require("path"); + var fs = require("fs"); + var glob = void 0; + try { + glob = require_glob(); + } catch (_err) { + } + var defaultGlobOpts = { + nosort: true, + silent: true + }; + var timeout = 0; + var isWindows = process.platform === "win32"; + var defaults = (options) => { + const methods = [ + "unlink", + "chmod", + "stat", + "lstat", + "rmdir", + "readdir" + ]; + methods.forEach((m) => { + options[m] = options[m] || fs[m]; + m = m + "Sync"; + options[m] = options[m] || fs[m]; + }); + options.maxBusyTries = options.maxBusyTries || 3; + options.emfileWait = options.emfileWait || 1e3; + if (options.glob === false) { + options.disableGlob = true; + } + if (options.disableGlob !== true && glob === void 0) { + throw Error("glob dependency not found, set `options.disableGlob = true` if intentional"); + } + options.disableGlob = options.disableGlob || false; + options.glob = options.glob || defaultGlobOpts; + }; + var rimraf = (p, options, cb) => { + if (typeof options === "function") { + cb = options; + options = {}; + } + assert(p, "rimraf: missing path"); + assert.equal(typeof p, "string", "rimraf: path should be a string"); + assert.equal(typeof cb, "function", "rimraf: callback function required"); + assert(options, "rimraf: invalid options argument provided"); + assert.equal(typeof options, "object", "rimraf: options should be object"); + defaults(options); + let busyTries = 0; + let errState = null; + let n = 0; + const next = (er) => { + errState = errState || er; + if (--n === 0) + cb(errState); + }; + const afterGlob = (er, results) => { + if (er) + return cb(er); + n = results.length; + if (n === 0) + return cb(); + results.forEach((p2) => { + const CB = (er2) => { + if (er2) { + if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) { + busyTries++; + return setTimeout(() => rimraf_(p2, options, CB), busyTries * 100); + } + if (er2.code === "EMFILE" && timeout < options.emfileWait) { + return setTimeout(() => rimraf_(p2, options, CB), timeout++); + } + if (er2.code === "ENOENT") + er2 = null; + } + timeout = 0; + next(er2); + }; + rimraf_(p2, options, CB); + }); + }; + if (options.disableGlob || !glob.hasMagic(p)) + return afterGlob(null, [p]); + options.lstat(p, (er, stat) => { + if (!er) + return afterGlob(null, [p]); + glob(p, options.glob, afterGlob); + }); + }; + var rimraf_ = (p, options, cb) => { + assert(p); + assert(options); + assert(typeof cb === "function"); + options.lstat(p, (er, st) => { + if (er && er.code === "ENOENT") + return cb(null); + if (er && er.code === "EPERM" && isWindows) + fixWinEPERM(p, options, er, cb); + if (st && st.isDirectory()) + return rmdir(p, options, er, cb); + options.unlink(p, (er2) => { + if (er2) { + if (er2.code === "ENOENT") + return cb(null); + if (er2.code === "EPERM") + return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb); + if (er2.code === "EISDIR") + return rmdir(p, options, er2, cb); + } + return cb(er2); + }); + }); + }; + var fixWinEPERM = (p, options, er, cb) => { + assert(p); + assert(options); + assert(typeof cb === "function"); + options.chmod(p, 438, (er2) => { + if (er2) + cb(er2.code === "ENOENT" ? null : er); + else + options.stat(p, (er3, stats) => { + if (er3) + cb(er3.code === "ENOENT" ? null : er); + else if (stats.isDirectory()) + rmdir(p, options, er, cb); + else + options.unlink(p, cb); + }); + }); + }; + var fixWinEPERMSync = (p, options, er) => { + assert(p); + assert(options); + try { + options.chmodSync(p, 438); + } catch (er2) { + if (er2.code === "ENOENT") + return; + else + throw er; + } + let stats; + try { + stats = options.statSync(p); + } catch (er3) { + if (er3.code === "ENOENT") + return; + else + throw er; + } + if (stats.isDirectory()) + rmdirSync(p, options, er); + else + options.unlinkSync(p); + }; + var rmdir = (p, options, originalEr, cb) => { + assert(p); + assert(options); + assert(typeof cb === "function"); + options.rmdir(p, (er) => { + if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) + rmkids(p, options, cb); + else if (er && er.code === "ENOTDIR") + cb(originalEr); + else + cb(er); + }); + }; + var rmkids = (p, options, cb) => { + assert(p); + assert(options); + assert(typeof cb === "function"); + options.readdir(p, (er, files) => { + if (er) + return cb(er); + let n = files.length; + if (n === 0) + return options.rmdir(p, cb); + let errState; + files.forEach((f) => { + rimraf(path.join(p, f), options, (er2) => { + if (errState) + return; + if (er2) + return cb(errState = er2); + if (--n === 0) + options.rmdir(p, cb); + }); + }); + }); + }; + var rimrafSync = (p, options) => { + options = options || {}; + defaults(options); + assert(p, "rimraf: missing path"); + assert.equal(typeof p, "string", "rimraf: path should be a string"); + assert(options, "rimraf: missing options"); + assert.equal(typeof options, "object", "rimraf: options should be object"); + let results; + if (options.disableGlob || !glob.hasMagic(p)) { + results = [p]; + } else { + try { + options.lstatSync(p); + results = [p]; + } catch (er) { + results = glob.sync(p, options.glob); + } + } + if (!results.length) + return; + for (let i = 0; i < results.length; i++) { + const p2 = results[i]; + let st; + try { + st = options.lstatSync(p2); + } catch (er) { + if (er.code === "ENOENT") + return; + if (er.code === "EPERM" && isWindows) + fixWinEPERMSync(p2, options, er); + } + try { + if (st && st.isDirectory()) + rmdirSync(p2, options, null); + else + options.unlinkSync(p2); + } catch (er) { + if (er.code === "ENOENT") + return; + if (er.code === "EPERM") + return isWindows ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er); + if (er.code !== "EISDIR") + throw er; + rmdirSync(p2, options, er); + } + } + }; + var rmdirSync = (p, options, originalEr) => { + assert(p); + assert(options); + try { + options.rmdirSync(p); + } catch (er) { + if (er.code === "ENOENT") + return; + if (er.code === "ENOTDIR") + throw originalEr; + if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") + rmkidsSync(p, options); + } + }; + var rmkidsSync = (p, options) => { + assert(p); + assert(options); + options.readdirSync(p).forEach((f) => rimrafSync(path.join(p, f), options)); + const retries = isWindows ? 100 : 1; + let i = 0; + do { + let threw = true; + try { + const ret = options.rmdirSync(p, options); + threw = false; + return ret; + } finally { + if (++i < retries && threw) + continue; + } + } while (true); + }; + module2.exports = rimraf; + rimraf.sync = rimrafSync; + } +}); + +// ../../node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js +var require_indent_string = __commonJS({ + "../../node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js"(exports2, module2) { + "use strict"; + module2.exports = (string, count = 1, options) => { + options = { + indent: " ", + includeEmptyLines: false, + ...options + }; + if (typeof string !== "string") { + throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof string}\``); + } + if (typeof count !== "number") { + throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof count}\``); + } + if (typeof options.indent !== "string") { + throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\``); + } + if (count === 0) { + return string; + } + const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; + return string.replace(regex, options.indent.repeat(count)); + }; + } +}); + +// ../../node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/index.js +var require_clean_stack = __commonJS({ + "../../node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/index.js"(exports2, module2) { + "use strict"; + var os = require("os"); + var extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; + var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; + var homeDir = typeof os.homedir === "undefined" ? "" : os.homedir(); + module2.exports = (stack2, options) => { + options = Object.assign({ pretty: false }, options); + return stack2.replace(/\\/g, "/").split("\n").filter((line) => { + const pathMatches = line.match(extractPathRegex); + if (pathMatches === null || !pathMatches[1]) { + return true; + } + const match = pathMatches[1]; + if (match.includes(".app/Contents/Resources/electron.asar") || match.includes(".app/Contents/Resources/default_app.asar")) { + return false; + } + return !pathRegex.test(match); + }).filter((line) => line.trim() !== "").map((line) => { + if (options.pretty) { + return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, "~"))); + } + return line; + }).join("\n"); + }; + } +}); + +// ../../node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/index.js +var require_aggregate_error = __commonJS({ + "../../node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/index.js"(exports2, module2) { + "use strict"; + var indentString = require_indent_string(); + var cleanStack = require_clean_stack(); + var cleanInternalStack = (stack2) => stack2.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ""); + var AggregateError2 = class extends Error { + constructor(errors) { + if (!Array.isArray(errors)) { + throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); + } + errors = [...errors].map((error) => { + if (error instanceof Error) { + return error; + } + if (error !== null && typeof error === "object") { + return Object.assign(new Error(error.message), error); + } + return new Error(error); + }); + let message2 = errors.map((error) => { + return typeof error.stack === "string" ? cleanInternalStack(cleanStack(error.stack)) : String(error); + }).join("\n"); + message2 = "\n" + indentString(message2, 4); + super(message2); + this.name = "AggregateError"; + Object.defineProperty(this, "_errors", { value: errors }); + } + *[Symbol.iterator]() { + for (const error of this._errors) { + yield error; + } + } + }; + module2.exports = AggregateError2; + } +}); + +// ../../node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/index.js +var require_p_map2 = __commonJS({ + "../../node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/index.js"(exports2, module2) { + "use strict"; + var AggregateError2 = require_aggregate_error(); + module2.exports = async (iterable, mapper, { + concurrency = Infinity, + stopOnError = true + } = {}) => { + return new Promise((resolve, reject) => { + if (typeof mapper !== "function") { + throw new TypeError("Mapper function is required"); + } + if (!((Number.isSafeInteger(concurrency) || concurrency === Infinity) && concurrency >= 1)) { + throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); + } + const result = []; + const errors = []; + const iterator = iterable[Symbol.iterator](); + let isRejected = false; + let isIterableDone = false; + let resolvingCount = 0; + let currentIndex = 0; + const next = () => { + if (isRejected) { + return; + } + const nextItem = iterator.next(); + const index = currentIndex; + currentIndex++; + if (nextItem.done) { + isIterableDone = true; + if (resolvingCount === 0) { + if (!stopOnError && errors.length !== 0) { + reject(new AggregateError2(errors)); + } else { + resolve(result); + } + } + return; + } + resolvingCount++; + (async () => { + try { + const element = await nextItem.value; + result[index] = await mapper(element, index); + resolvingCount--; + next(); + } catch (error) { + if (stopOnError) { + isRejected = true; + reject(error); + } else { + errors.push(error); + resolvingCount--; + next(); + } + } + })(); + }; + for (let i = 0; i < concurrency; i++) { + next(); + if (isIterableDone) { + break; + } + } + }); + }; + } +}); + +// ../../node_modules/.pnpm/del@6.0.0/node_modules/del/index.js +var require_del = __commonJS({ + "../../node_modules/.pnpm/del@6.0.0/node_modules/del/index.js"(exports2, module2) { + "use strict"; + var { promisify } = require("util"); + var path = require("path"); + var globby = require_globby(); + var isGlob = require_is_glob(); + var slash = require_slash(); + var gracefulFs = require_graceful_fs(); + var isPathCwd = require_is_path_cwd(); + var isPathInside = require_is_path_inside(); + var rimraf = require_rimraf2(); + var pMap = require_p_map2(); + var rimrafP = promisify(rimraf); + var rimrafOptions = { + glob: false, + unlink: gracefulFs.unlink, + unlinkSync: gracefulFs.unlinkSync, + chmod: gracefulFs.chmod, + chmodSync: gracefulFs.chmodSync, + stat: gracefulFs.stat, + statSync: gracefulFs.statSync, + lstat: gracefulFs.lstat, + lstatSync: gracefulFs.lstatSync, + rmdir: gracefulFs.rmdir, + rmdirSync: gracefulFs.rmdirSync, + readdir: gracefulFs.readdir, + readdirSync: gracefulFs.readdirSync + }; + function safeCheck(file, cwd) { + if (isPathCwd(file)) { + throw new Error("Cannot delete the current working directory. Can be overridden with the `force` option."); + } + if (!isPathInside(file, cwd)) { + throw new Error("Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option."); + } + } + function normalizePatterns(patterns) { + patterns = Array.isArray(patterns) ? patterns : [patterns]; + patterns = patterns.map((pattern) => { + if (process.platform === "win32" && isGlob(pattern) === false) { + return slash(pattern); + } + return pattern; + }); + return patterns; + } + module2.exports = async (patterns, { force, dryRun, cwd = process.cwd(), ...options } = {}) => { + options = { + expandDirectories: false, + onlyFiles: false, + followSymbolicLinks: false, + cwd, + ...options + }; + patterns = normalizePatterns(patterns); + const files = (await globby(patterns, options)).sort((a, b) => b.localeCompare(a)); + const mapper = async (file) => { + file = path.resolve(cwd, file); + if (!force) { + safeCheck(file, cwd); + } + if (!dryRun) { + await rimrafP(file, rimrafOptions); + } + return file; + }; + const removedFiles = await pMap(files, mapper, options); + removedFiles.sort((a, b) => a.localeCompare(b)); + return removedFiles; + }; + module2.exports.sync = (patterns, { force, dryRun, cwd = process.cwd(), ...options } = {}) => { + options = { + expandDirectories: false, + onlyFiles: false, + followSymbolicLinks: false, + cwd, + ...options + }; + patterns = normalizePatterns(patterns); + const files = globby.sync(patterns, options).sort((a, b) => b.localeCompare(a)); + const removedFiles = files.map((file) => { + file = path.resolve(cwd, file); + if (!force) { + safeCheck(file, cwd); + } + if (!dryRun) { + rimraf.sync(file, rimrafOptions); + } + return file; + }); + removedFiles.sort((a, b) => a.localeCompare(b)); + return removedFiles; + }; + } +}); + +// ../../node_modules/.pnpm/tempy@1.0.1/node_modules/tempy/index.js +var require_tempy = __commonJS({ + "../../node_modules/.pnpm/tempy@1.0.1/node_modules/tempy/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var path = require("path"); + var uniqueString = require_unique_string(); + var tempDir = require_temp_dir(); + var isStream = require_is_stream(); + var del = require_del(); + var stream = require("stream"); + var { promisify } = require("util"); + var pipeline = promisify(stream.pipeline); + var { writeFile } = fs.promises; + var getPath = (prefix = "") => path.join(tempDir, prefix + uniqueString()); + var writeStream = async (filePath, data) => pipeline(data, fs.createWriteStream(filePath)); + var createTask = (tempyFunction, { extraArguments = 0 } = {}) => async (...arguments_) => { + const [callback, options] = arguments_.slice(extraArguments); + const result = await tempyFunction(...arguments_.slice(0, extraArguments), options); + try { + return await callback(result); + } finally { + await del(result, { force: true }); + } + }; + module2.exports.file = (options) => { + options = { + ...options + }; + if (options.name) { + if (options.extension !== void 0 && options.extension !== null) { + throw new Error("The `name` and `extension` options are mutually exclusive"); + } + return path.join(module2.exports.directory(), options.name); + } + return getPath() + (options.extension === void 0 || options.extension === null ? "" : "." + options.extension.replace(/^\./, "")); + }; + module2.exports.file.task = createTask(module2.exports.file); + module2.exports.directory = ({ prefix = "" } = {}) => { + const directory = getPath(prefix); + fs.mkdirSync(directory); + return directory; + }; + module2.exports.directory.task = createTask(module2.exports.directory); + module2.exports.write = async (data, options) => { + const filename = module2.exports.file(options); + const write = isStream(data) ? writeStream : writeFile; + await write(filename, data); + return filename; + }; + module2.exports.write.task = createTask(module2.exports.write, { extraArguments: 1 }); + module2.exports.writeSync = (data, options) => { + const filename = module2.exports.file(options); + fs.writeFileSync(filename, data); + return filename; + }; + Object.defineProperty(module2.exports, "root", { + get() { + return tempDir; + } + }); + } +}); + +// ../plugin-commands-env/lib/node.js +var require_node4 = __commonJS({ + "../plugin-commands-env/lib/node.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getNodeDir = exports2.getNodeBinDir = void 0; + var fs_1 = __importDefault(require("fs")); + var path_1 = __importDefault(require("path")); + var fetch_1 = __importStar2(require_lib29()); + var package_store_1 = require_lib37(); + var store_path_1 = __importDefault(require_lib38()); + var tarball_fetcher_1 = __importStar2(require_lib40()); + var adm_zip_1 = __importDefault(require_adm_zip()); + var rename_overwrite_1 = __importDefault(require_rename_overwrite()); + var tempy_1 = __importDefault(require_tempy()); + var load_json_file_1 = __importDefault(require_load_json_file()); + var write_json_file_1 = __importDefault(require_write_json_file()); + async function getNodeBinDir(opts) { + const nodeDir = await getNodeDir(opts); + return process.platform === "win32" ? nodeDir : path_1.default.join(nodeDir, "bin"); + } + exports2.getNodeBinDir = getNodeBinDir; + async function getNodeDir(opts) { + var _a, _b; + const nodesDir = path_1.default.join(opts.pnpmHomeDir, "nodejs"); + let wantedNodeVersion = (_a = opts.useNodeVersion) !== null && _a !== void 0 ? _a : (_b = await readNodeVersionsManifest(nodesDir)) === null || _b === void 0 ? void 0 : _b.default; + await fs_1.default.promises.mkdir(nodesDir, { recursive: true }); + if (wantedNodeVersion == null) { + const response = await fetch_1.default("https://registry.npmjs.org/node"); + wantedNodeVersion = (await response.json())["dist-tags"].lts; + if (wantedNodeVersion == null) { + throw new Error("Could not resolve LTS version of Node.js"); + } + await write_json_file_1.default(path_1.default.join(nodesDir, "versions.json"), { + default: wantedNodeVersion + }); + } + const versionDir = path_1.default.join(nodesDir, wantedNodeVersion); + if (!fs_1.default.existsSync(versionDir)) { + await installNode(wantedNodeVersion, versionDir, opts); + } + return versionDir; + } + exports2.getNodeDir = getNodeDir; + async function installNode(wantedNodeVersion, versionDir, opts) { + await fs_1.default.promises.mkdir(versionDir, { recursive: true }); + const { tarball, pkgName } = getNodeJSTarball(wantedNodeVersion); + const fetchFromRegistry = fetch_1.createFetchFromRegistry(opts); + if (tarball.endsWith(".zip")) { + await downloadAndUnpackZip(fetchFromRegistry, tarball, versionDir, pkgName); + return; + } + const getCredentials = () => ({ authHeaderValue: void 0, alwaysAuth: void 0 }); + const fetch = tarball_fetcher_1.default(fetchFromRegistry, getCredentials, { + retry: { + maxTimeout: opts.fetchRetryMaxtimeout, + minTimeout: opts.fetchRetryMintimeout, + retries: opts.fetchRetries, + factor: opts.fetchRetryFactor + }, + timeout: opts.fetchTimeout + }); + const storeDir = await store_path_1.default(process.cwd(), opts.storeDir); + const cafsDir = path_1.default.join(storeDir, "files"); + const cafs = package_store_1.createCafsStore(cafsDir); + const { filesIndex } = await fetch.tarball(cafs, { tarball }, { + lockfileDir: process.cwd() + }); + await cafs.importPackage(versionDir, { + filesResponse: { + filesIndex: await tarball_fetcher_1.waitForFilesIndex(filesIndex), + fromStore: false + }, + force: true + }); + } + async function downloadAndUnpackZip(fetchFromRegistry, zipUrl, targetDir, pkgName) { + const response = await fetchFromRegistry(zipUrl); + const tmp = path_1.default.join(tempy_1.default.directory(), "pnpm.zip"); + const dest = fs_1.default.createWriteStream(tmp); + await new Promise((resolve, reject) => { + response.body.pipe(dest).on("error", reject).on("close", resolve); + }); + const zip = new adm_zip_1.default(tmp); + const nodeDir = path_1.default.dirname(targetDir); + zip.extractAllTo(nodeDir, true); + await rename_overwrite_1.default(path_1.default.join(nodeDir, pkgName), targetDir); + await fs_1.default.promises.unlink(tmp); + } + function getNodeJSTarball(nodeVersion) { + const platform = process.platform === "win32" ? "win" : process.platform; + const arch = platform === "win" && process.arch === "ia32" ? "x86" : process.arch; + const extension = platform === "win" ? "zip" : "tar.gz"; + const pkgName = `node-v${nodeVersion}-${platform}-${arch}`; + return { + pkgName, + tarball: `https://nodejs.org/download/release/v${nodeVersion}/${pkgName}.${extension}` + }; + } + async function readNodeVersionsManifest(nodesDir) { + try { + return await load_json_file_1.default(path_1.default.join(nodesDir, "versions.json")); + } catch (err) { + if (err.code === "ENOENT") { + return {}; + } + throw err; + } + } + } +}); + +// ../plugin-commands-env/lib/env.js +var require_env = __commonJS({ + "../plugin-commands-env/lib/env.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var error_1 = __importDefault(require_lib8()); + var fetch_1 = __importDefault(require_lib29()); + var cmd_shim_1 = __importDefault(require_cmd_shim()); + var render_help_1 = __importDefault(require_lib30()); + var semver_1 = __importDefault(require_semver2()); + var version_selector_type_1 = __importDefault(require_version_selector_type()); + var node_1 = require_node4(); + function rcOptionsTypes() { + return {}; + } + exports2.rcOptionsTypes = rcOptionsTypes; + function cliOptionsTypes() { + return { + global: Boolean + }; + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["env"]; + function help() { + return render_help_1.default({ + description: "Install and use the specified version of Node.js. The npm CLI bundled with the given Node.js version gets installed as well.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "Installs Node.js globally", + name: "--global", + shortAlias: "-g" + } + ] + } + ], + url: cli_utils_1.docsUrl("env"), + usages: [ + "pnpm env use --global ", + "pnpm env use --global 16", + "pnpm env use --global lts", + "pnpm env use --global argon" + ] + }); + } + exports2.help = help; + async function handler(opts, params) { + if (params.length === 0) { + throw new error_1.default("ENV_NO_SUBCOMMAND", "Please specify the subcommand"); + } + switch (params[0]) { + case "use": { + if (!opts.global) { + throw new error_1.default("NOT_IMPLEMENTED_YET", '"pnpm env use " can only be used with the "--global" option currently'); + } + const nodeVersion = await resolveNodeVersion(params[1]); + if (!nodeVersion) { + throw new error_1.default("COULD_NOT_RESOLVE_NODEJS", `Couldn't find Node.js version matching ${params[1]}`); + } + const nodeDir = await node_1.getNodeDir({ + ...opts, + useNodeVersion: nodeVersion + }); + const src = path_1.default.join(nodeDir, process.platform === "win32" ? "node.exe" : "bin/node"); + const dest = path_1.default.join(opts.bin, "node"); + const cmdShimOpts = { createPwshFile: false }; + await cmd_shim_1.default(src, dest, cmdShimOpts); + try { + let npmDir = nodeDir; + if (process.platform !== "win32") { + npmDir = path_1.default.join(npmDir, "lib"); + } + npmDir = path_1.default.join(npmDir, "node_modules/npm/bin"); + await cmd_shim_1.default(path_1.default.join(npmDir, "npm-cli.js"), path_1.default.join(opts.bin, "npm"), cmdShimOpts); + await cmd_shim_1.default(path_1.default.join(npmDir, "npx-cli.js"), path_1.default.join(opts.bin, "npx"), cmdShimOpts); + } catch (err) { + } + return `Node.js ${nodeVersion} is activated + ${dest} -> ${src}`; + } + default: { + throw new error_1.default("ENV_UNKNOWN_SUBCOMMAND", "This subcommand is not known"); + } + } + } + exports2.handler = handler; + async function resolveNodeVersion(rawVersionSelector) { + const response = await fetch_1.default("https://nodejs.org/download/release/index.json"); + const allVersions = await response.json(); + const { versions, versionSelector } = filterVersions(allVersions, rawVersionSelector); + const pickedVersion = semver_1.default.maxSatisfying(versions.map(({ version }) => version), versionSelector); + if (!pickedVersion) + return null; + return pickedVersion.substring(1); + } + function filterVersions(versions, versionSelector) { + if (versionSelector === "lts") { + return { + versions: versions.filter(({ lts }) => lts !== false), + versionSelector: "*" + }; + } + const vst = version_selector_type_1.default(versionSelector); + if ((vst === null || vst === void 0 ? void 0 : vst.type) === "tag") { + const wantedLtsVersion = vst.normalized.toLowerCase(); + return { + versions: versions.filter(({ lts }) => typeof lts === "string" && lts.toLowerCase() === wantedLtsVersion), + versionSelector: "*" + }; + } + return { versions, versionSelector }; + } + } +}); + +// ../plugin-commands-env/lib/index.js +var require_lib41 = __commonJS({ + "../plugin-commands-env/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.node = exports2.env = void 0; + var env = __importStar2(require_env()); + exports2.env = env; + var node = __importStar2(require_node4()); + exports2.node = node; + } +}); + +// ../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry_operation.js +var require_retry_operation2 = __commonJS({ + "../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry_operation.js"(exports2, module2) { + function RetryOperation(timeouts, options) { + if (typeof options === "boolean") { + options = { forever: options }; + } + this._originalTimeouts = JSON.parse(JSON.stringify(timeouts)); + this._timeouts = timeouts; + this._options = options || {}; + this._maxRetryTime = options && options.maxRetryTime || Infinity; + this._fn = null; + this._errors = []; + this._attempts = 1; + this._operationTimeout = null; + this._operationTimeoutCb = null; + this._timeout = null; + this._operationStart = null; + if (this._options.forever) { + this._cachedTimeouts = this._timeouts.slice(0); + } + } + module2.exports = RetryOperation; + RetryOperation.prototype.reset = function() { + this._attempts = 1; + this._timeouts = this._originalTimeouts; + }; + RetryOperation.prototype.stop = function() { + if (this._timeout) { + clearTimeout(this._timeout); + } + this._timeouts = []; + this._cachedTimeouts = null; + }; + RetryOperation.prototype.retry = function(err) { + if (this._timeout) { + clearTimeout(this._timeout); + } + if (!err) { + return false; + } + var currentTime = new Date().getTime(); + if (err && currentTime - this._operationStart >= this._maxRetryTime) { + this._errors.unshift(new Error("RetryOperation timeout occurred")); + return false; + } + this._errors.push(err); + var timeout = this._timeouts.shift(); + if (timeout === void 0) { + if (this._cachedTimeouts) { + this._errors.splice(this._errors.length - 1, this._errors.length); + this._timeouts = this._cachedTimeouts.slice(0); + timeout = this._timeouts.shift(); + } else { + return false; + } + } + var self2 = this; + var timer = setTimeout(function() { + self2._attempts++; + if (self2._operationTimeoutCb) { + self2._timeout = setTimeout(function() { + self2._operationTimeoutCb(self2._attempts); + }, self2._operationTimeout); + if (self2._options.unref) { + self2._timeout.unref(); + } + } + self2._fn(self2._attempts); + }, timeout); + if (this._options.unref) { + timer.unref(); + } + return true; + }; + RetryOperation.prototype.attempt = function(fn2, timeoutOps) { + this._fn = fn2; + if (timeoutOps) { + if (timeoutOps.timeout) { + this._operationTimeout = timeoutOps.timeout; + } + if (timeoutOps.cb) { + this._operationTimeoutCb = timeoutOps.cb; + } + } + var self2 = this; + if (this._operationTimeoutCb) { + this._timeout = setTimeout(function() { + self2._operationTimeoutCb(); + }, self2._operationTimeout); + } + this._operationStart = new Date().getTime(); + this._fn(this._attempts); + }; + RetryOperation.prototype.try = function(fn2) { + console.log("Using RetryOperation.try() is deprecated"); + this.attempt(fn2); + }; + RetryOperation.prototype.start = function(fn2) { + console.log("Using RetryOperation.start() is deprecated"); + this.attempt(fn2); + }; + RetryOperation.prototype.start = RetryOperation.prototype.try; + RetryOperation.prototype.errors = function() { + return this._errors; + }; + RetryOperation.prototype.attempts = function() { + return this._attempts; + }; + RetryOperation.prototype.mainError = function() { + if (this._errors.length === 0) { + return null; + } + var counts = {}; + var mainError = null; + var mainErrorCount = 0; + for (var i = 0; i < this._errors.length; i++) { + var error = this._errors[i]; + var message2 = error.message; + var count = (counts[message2] || 0) + 1; + counts[message2] = count; + if (count >= mainErrorCount) { + mainError = error; + mainErrorCount = count; + } + } + return mainError; + }; + } +}); + +// ../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry.js +var require_retry3 = __commonJS({ + "../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry.js"(exports2) { + var RetryOperation = require_retry_operation2(); + exports2.operation = function(options) { + var timeouts = exports2.timeouts(options); + return new RetryOperation(timeouts, { + forever: options && options.forever, + unref: options && options.unref, + maxRetryTime: options && options.maxRetryTime + }); + }; + exports2.timeouts = function(options) { + if (options instanceof Array) { + return [].concat(options); + } + var opts = { + retries: 10, + factor: 2, + minTimeout: 1 * 1e3, + maxTimeout: Infinity, + randomize: false + }; + for (var key in options) { + opts[key] = options[key]; + } + if (opts.minTimeout > opts.maxTimeout) { + throw new Error("minTimeout is greater than maxTimeout"); + } + var timeouts = []; + for (var i = 0; i < opts.retries; i++) { + timeouts.push(this.createTimeout(i, opts)); + } + if (options && options.forever && !timeouts.length) { + timeouts.push(this.createTimeout(i, opts)); + } + timeouts.sort(function(a, b) { + return a - b; + }); + return timeouts; + }; + exports2.createTimeout = function(attempt, opts) { + var random = opts.randomize ? Math.random() + 1 : 1; + var timeout = Math.round(random * opts.minTimeout * Math.pow(opts.factor, attempt)); + timeout = Math.min(timeout, opts.maxTimeout); + return timeout; + }; + exports2.wrap = function(obj, options, methods) { + if (options instanceof Array) { + methods = options; + options = null; + } + if (!methods) { + methods = []; + for (var key in obj) { + if (typeof obj[key] === "function") { + methods.push(key); + } + } + } + for (var i = 0; i < methods.length; i++) { + var method = methods[i]; + var original = obj[method]; + obj[method] = function retryWrapper(original2) { + var op = exports2.operation(options); + var args2 = Array.prototype.slice.call(arguments, 1); + var callback = args2.pop(); + args2.push(function(err) { + if (op.retry(err)) { + return; + } + if (err) { + arguments[0] = op.mainError(); + } + callback.apply(this, arguments); + }); + op.attempt(function() { + original2.apply(obj, args2); + }); + }.bind(obj, original); + obj[method].options = options; + } + }; + } +}); + +// ../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/index.js +var require_retry4 = __commonJS({ + "../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/index.js"(exports2, module2) { + module2.exports = require_retry3(); + } +}); + +// ../../node_modules/.pnpm/graceful-git@3.1.2/node_modules/graceful-git/index.js +var require_graceful_git = __commonJS({ + "../../node_modules/.pnpm/graceful-git@3.1.2/node_modules/graceful-git/index.js"(exports2, module2) { + "use strict"; + var execa = require_lib26().default; + var retry = require_retry4(); + var RETRY_OPTIONS = { + retries: 3, + minTimeout: 1 * 1e3, + maxTimeout: 10 * 1e3, + randomize: true + }; + module2.exports = gracefulGit; + module2.exports.noRetry = noRetry; + async function gracefulGit(args2, opts) { + opts = opts || {}; + const operation = retry.operation(Object.assign({}, RETRY_OPTIONS, opts)); + return new Promise((resolve, reject) => { + operation.attempt((currentAttempt) => { + noRetry(args2, opts).then(resolve).catch((err) => { + if (operation.retry(err)) { + return; + } + reject(operation.mainError()); + }); + }); + }); + } + async function noRetry(args2, opts) { + opts = opts || {}; + return execa("git", args2, { cwd: opts.cwd || process.cwd() }); + } + } +}); + +// ../git-resolver/lib/parsePref.js +var require_parsePref = __commonJS({ + "../git-resolver/lib/parsePref.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var url_1 = __importStar2(require("url")); + var fetch_1 = __importDefault(require_lib29()); + var graceful_git_1 = __importDefault(require_graceful_git()); + var hosted_git_info_1 = __importDefault(require_hosted_git_info()); + var gitProtocols = new Set([ + "git", + "git+http", + "git+https", + "git+rsync", + "git+ftp", + "git+file", + "git+ssh", + "ssh" + ]); + async function parsePref(pref) { + var _a; + const hosted = hosted_git_info_1.default.fromUrl(pref); + if (hosted != null) { + return fromHostedGit(hosted); + } + const colonsPos = pref.indexOf(":"); + if (colonsPos === -1) + return null; + const protocol = pref.substr(0, colonsPos); + if (protocol && gitProtocols.has(protocol.toLocaleLowerCase())) { + const urlparse = new url_1.URL(pref); + if (!urlparse || !urlparse.protocol) + return null; + const match = urlparse.protocol === "git+ssh:" && matchGitScp(pref); + if (match) { + return { + ...match, + normalizedPref: pref + }; + } + const committish = ((_a = urlparse.hash) === null || _a === void 0 ? void 0 : _a.length) > 1 ? decodeURIComponent(urlparse.hash.slice(1)) : null; + return { + fetchSpec: urlToFetchSpec(urlparse), + normalizedPref: pref, + ...setGitCommittish(committish) + }; + } + return null; + } + exports2.default = parsePref; + function urlToFetchSpec(urlparse) { + urlparse.hash = ""; + const fetchSpec = url_1.default.format(urlparse); + if (fetchSpec.startsWith("git+")) { + return fetchSpec.substr(4); + } + return fetchSpec; + } + async function fromHostedGit(hosted) { + let fetchSpec = null; + const gitUrl = hosted.git({ noCommittish: true }); + if (gitUrl && await accessRepository(gitUrl)) { + fetchSpec = gitUrl; + } + if (!fetchSpec) { + const httpsUrl = hosted.https({ noGitPlus: true, noCommittish: true }); + if (httpsUrl) { + if (hosted.auth && await accessRepository(httpsUrl)) { + return { + fetchSpec: httpsUrl, + hosted: { + ...hosted, + _fill: hosted._fill, + tarball: void 0 + }, + normalizedPref: `git+${httpsUrl}`, + ...setGitCommittish(hosted.committish) + }; + } else { + try { + const response = await fetch_1.default(httpsUrl.substr(0, httpsUrl.length - 4), { method: "HEAD", follow: 0 }); + if (response.ok) { + fetchSpec = httpsUrl; + } + } catch (e) { + } + } + } + } + if (!fetchSpec) { + fetchSpec = hosted.sshurl({ noCommittish: true }); + } + return { + fetchSpec, + hosted: { + ...hosted, + _fill: hosted._fill, + tarball: hosted.tarball + }, + normalizedPref: hosted.shortcut(), + ...setGitCommittish(hosted.committish) + }; + } + async function accessRepository(repository) { + try { + await graceful_git_1.default(["ls-remote", "--exit-code", repository, "HEAD"], { retries: 0 }); + return true; + } catch (err) { + return false; + } + } + function setGitCommittish(committish) { + if (committish !== null && committish.length >= 7 && committish.slice(0, 7) === "semver:") { + return { + gitCommittish: null, + gitRange: committish.slice(7) + }; + } + return { gitCommittish: committish }; + } + function matchGitScp(spec) { + const matched = spec.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i); + return matched != null && matched[1].match(/:[0-9]+\/?.*$/i) == null && { + fetchSpec: matched[1], + gitCommittish: matched[2] + }; + } + } +}); + +// ../git-resolver/lib/index.js +var require_lib42 = __commonJS({ + "../git-resolver/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var graceful_git_1 = __importDefault(require_graceful_git()); + var semver_1 = __importDefault(require_semver2()); + var parsePref_1 = __importDefault(require_parsePref()); + function default_1(opts) { + return async function resolveGit(wantedDependency) { + var _a; + const parsedSpec = await parsePref_1.default(wantedDependency.pref); + if (parsedSpec == null) + return null; + const pref = parsedSpec.gitCommittish == null || parsedSpec.gitCommittish === "" ? "HEAD" : parsedSpec.gitCommittish; + const commit = await resolveRef(parsedSpec.fetchSpec, pref, parsedSpec.gitRange); + let resolution; + if (parsedSpec.hosted != null && !isSsh(parsedSpec.fetchSpec)) { + const hosted = parsedSpec.hosted; + hosted.committish = commit; + const tarball = (_a = hosted.tarball) === null || _a === void 0 ? void 0 : _a.call(hosted); + if (tarball) { + resolution = { tarball }; + } + } + if (resolution == null) { + resolution = { + commit, + repo: parsedSpec.fetchSpec, + type: "git" + }; + } + return { + id: parsedSpec.fetchSpec.replace(/^.*:\/\/(git@)?/, "").replace(/:/g, "+").replace(/\.git$/, "") + "/" + commit, + normalizedPref: parsedSpec.normalizedPref, + resolution, + resolvedVia: "git-repository" + }; + }; + } + exports2.default = default_1; + function resolveVTags(vTags, range) { + return semver_1.default.maxSatisfying(vTags, range, true); + } + async function getRepoRefs(repo, ref) { + const gitArgs = [repo]; + if (ref !== "HEAD") { + gitArgs.unshift("--refs"); + } + if (ref) { + gitArgs.push(ref); + } + const result = await graceful_git_1.default(["ls-remote", ...gitArgs], { retries: 1 }); + const refs = result.stdout.split("\n").reduce((obj, line) => { + const [commit, refName] = line.split(" "); + obj[refName] = commit; + return obj; + }, {}); + return refs; + } + async function resolveRef(repo, ref, range) { + if (ref.match(/^[0-9a-f]{7,40}$/) != null) { + return ref; + } + const refs = await getRepoRefs(repo, range ? null : ref); + return resolveRefFromRefs(refs, repo, ref, range); + } + function resolveRefFromRefs(refs, repo, ref, range) { + if (!range) { + const commitId = refs[ref] || refs[`refs/tags/${ref}^{}`] || refs[`refs/tags/${ref}`] || refs[`refs/heads/${ref}`]; + if (!commitId) { + throw new Error(`Could not resolve ${ref} to a commit of ${repo}.`); + } + return commitId; + } else { + const vTags = Object.keys(refs).filter((key) => /^refs\/tags\/v?(\d+\.\d+\.\d+(?:[-+].+)?)(\^{})?$/.test(key)).map((key) => { + return key.replace(/^refs\/tags\//, "").replace(/\^{}$/, ""); + }).filter((key) => semver_1.default.valid(key, true)); + const refVTag = resolveVTags(vTags, range); + const commitId = refVTag && (refs[`refs/tags/${refVTag}^{}`] || refs[`refs/tags/${refVTag}`]); + if (!commitId) { + throw new Error(`Could not resolve ${range} to a commit of ${repo}. Available versions are: ${vTags.join(", ")}`); + } + return commitId; + } + } + function isSsh(gitSpec) { + return gitSpec.substr(0, 10) === "git+ssh://" || gitSpec.substr(0, 4) === "git@"; + } + } +}); + +// ../local-resolver/lib/parsePref.js +var require_parsePref2 = __commonJS({ + "../local-resolver/lib/parsePref.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var os_1 = __importDefault(require("os")); + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var normalize_path_1 = __importDefault(require_normalize_path()); + var isWindows = process.platform === "win32" || global["FAKE_WINDOWS"]; + var isFilespec = isWindows ? /^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/ : /^(?:[.]|~[/]|[/]|[a-zA-Z]:)/; + var isFilename = /[.](?:tgz|tar.gz|tar)$/i; + var isAbsolutePath = /^[/]|^[A-Za-z]:/; + function parsePref(pref, projectDir, lockfileDir) { + if (pref.startsWith("link:") || pref.startsWith("workspace:")) { + return fromLocal(pref, projectDir, lockfileDir, "directory"); + } + if (pref.endsWith(".tgz") || pref.endsWith(".tar.gz") || pref.endsWith(".tar") || pref.includes(path_1.default.sep) || pref.startsWith("file:") || isFilespec.test(pref)) { + const type = isFilename.test(pref) ? "file" : "directory"; + return fromLocal(pref, projectDir, lockfileDir, type); + } + if (pref.startsWith("path:")) { + const err = new error_1.default("PATH_IS_UNSUPPORTED_PROTOCOL", "Local dependencies via `path:` protocol are not supported. Use the `link:` protocol for folder dependencies and `file:` for local tarballs"); + err["pref"] = pref; + err["protocol"] = "path:"; + throw err; + } + return null; + } + exports2.default = parsePref; + function fromLocal(pref, projectDir, lockfileDir, type) { + const spec = pref.replace(/\\/g, "/").replace(/^(file|link|workspace):[/]*([A-Za-z]:)/, "$2").replace(/^(file|link|workspace):(?:[/]*([~./]))?/, "$2"); + const protocol = type === "directory" ? "link:" : "file:"; + let fetchSpec; + let normalizedPref; + if (/^~[/]/.test(spec)) { + fetchSpec = resolvePath(os_1.default.homedir(), spec.slice(2)); + normalizedPref = `${protocol}${spec}`; + } else { + fetchSpec = resolvePath(projectDir, spec); + if (isAbsolute(spec)) { + normalizedPref = `${protocol}${spec}`; + } else { + normalizedPref = `${protocol}${path_1.default.relative(projectDir, fetchSpec)}`; + } + } + const dependencyPath = normalize_path_1.default(path_1.default.relative(projectDir, fetchSpec)); + const id = type === "directory" || projectDir === lockfileDir ? `${protocol}${dependencyPath}` : `${protocol}${normalize_path_1.default(path_1.default.relative(lockfileDir, fetchSpec))}`; + return { + dependencyPath, + fetchSpec, + id, + normalizedPref, + type + }; + } + function resolvePath(where, spec) { + if (isAbsolutePath.test(spec)) + return spec; + return path_1.default.resolve(where, spec); + } + function isAbsolute(dir) { + if (dir[0] === "/") + return true; + if (/^[A-Za-z]:/.test(dir)) + return true; + return false; + } + } +}); + +// ../local-resolver/lib/index.js +var require_lib43 = __commonJS({ + "../local-resolver/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var graceful_fs_1 = __importDefault(require_lib18()); + var read_project_manifest_1 = require_lib19(); + var ssri_1 = __importDefault(require_ssri()); + var parsePref_1 = __importDefault(require_parsePref2()); + async function resolveLocal(wantedDependency, opts) { + var _a; + const spec = parsePref_1.default(wantedDependency.pref, opts.projectDir, (_a = opts.lockfileDir) !== null && _a !== void 0 ? _a : opts.projectDir); + if (spec == null) + return null; + if (spec.type === "file") { + return { + id: spec.id, + normalizedPref: spec.normalizedPref, + resolution: { + integrity: await getFileIntegrity(spec.fetchSpec), + tarball: spec.id + }, + resolvedVia: "local-filesystem" + }; + } + let localDependencyManifest; + try { + localDependencyManifest = await read_project_manifest_1.readProjectManifestOnly(spec.fetchSpec); + } catch (internalErr) { + if (!fs_1.existsSync(spec.fetchSpec)) { + throw new error_1.default("LINKED_PKG_DIR_NOT_FOUND", `Could not install from "${spec.fetchSpec}" as it does not exist.`); + } + switch (internalErr.code) { + case "ENOTDIR": { + throw new error_1.default("NOT_PACKAGE_DIRECTORY", `Could not install from "${spec.fetchSpec}" as it is not a directory.`); + } + case "ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND": + case "ENOENT": { + localDependencyManifest = { + name: path_1.default.basename(spec.fetchSpec), + version: "0.0.0" + }; + break; + } + default: { + throw internalErr; + } + } + } + return { + id: spec.id, + manifest: localDependencyManifest, + normalizedPref: spec.normalizedPref, + resolution: { + directory: spec.dependencyPath, + type: "directory" + }, + resolvedVia: "local-filesystem" + }; + } + exports2.default = resolveLocal; + async function getFileIntegrity(filename) { + return (await ssri_1.default.fromStream(graceful_fs_1.default.createReadStream(filename))).toString(); + } + } +}); + +// ../../node_modules/.pnpm/p-memoize@4.0.2/node_modules/p-memoize/index.js +var require_p_memoize = __commonJS({ + "../../node_modules/.pnpm/p-memoize@4.0.2/node_modules/p-memoize/index.js"(exports2, module2) { + "use strict"; + var mimicFn = require_mimic_fn2(); + var mapAgeCleaner = require_dist7(); + var cacheStore = new WeakMap(); + var pMemoize = (fn2, { cachePromiseRejection = false, ...options } = {}) => { + const { maxAge, cacheKey } = options; + const cache = options.cache || new Map(); + if (Number.isSafeInteger(maxAge)) { + mapAgeCleaner(cache); + } else if (typeof maxAge !== "undefined") { + throw new TypeError("maxAge is not a safe integer."); + } + const memoized = async function(...arguments_) { + const key = cacheKey ? cacheKey(arguments_) : arguments_[0]; + const cacheItem = cache.get(key); + if (cacheItem) { + return cacheItem.data; + } + const result = fn2.apply(this, arguments_); + let resultError; + try { + return await Promise.resolve(result); + } catch (error) { + resultError = error; + throw error; + } finally { + cache.set(key, { + data: result, + maxAge: maxAge ? Date.now() + maxAge : Number.POSITIVE_INFINITY + }); + if (!cachePromiseRejection && resultError) { + cache.delete(key); + } + } + }; + mimicFn(memoized, fn2); + cacheStore.set(memoized, cache); + return memoized; + }; + module2.exports = pMemoize; + module2.exports.clear = (memoized) => { + if (!cacheStore.has(memoized)) { + throw new Error("Can't clear a function that was not memoized!"); + } + const cache = cacheStore.get(memoized); + if (typeof cache.clear !== "function") { + throw new TypeError("The cache Map can't be cleared!"); + } + cache.clear(); + }; + } +}); + +// ../npm-resolver/lib/toRaw.js +var require_toRaw = __commonJS({ + "../npm-resolver/lib/toRaw.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function toRaw(spec) { + return `${spec.name}@${spec.fetchSpec}`; + } + exports2.default = toRaw; + } +}); + +// ../npm-resolver/lib/pickPackageFromMeta.js +var require_pickPackageFromMeta = __commonJS({ + "../npm-resolver/lib/pickPackageFromMeta.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var semver_1 = __importDefault(require_semver2()); + function default_1(spec, preferredVersionSelectors, meta) { + try { + let version; + switch (spec.type) { + case "version": + version = spec.fetchSpec; + break; + case "tag": + version = meta["dist-tags"][spec.fetchSpec]; + break; + case "range": + version = pickVersionByVersionRange(meta, spec.fetchSpec, preferredVersionSelectors); + break; + } + const manifest = meta.versions[version]; + if (manifest && meta["name"]) { + manifest.name = meta["name"]; + } + return manifest; + } catch (err) { + throw new error_1.default("MALFORMED_METADATA", `Received malformed metadata for "${spec.name}"`, { hint: "This might mean that the package was unpublished from the registry" }); + } + } + exports2.default = default_1; + function pickVersionByVersionRange(meta, versionRange, preferredVerSels) { + let versions; + const latest = meta["dist-tags"].latest; + const preferredVerSelsArr = Object.entries(preferredVerSels !== null && preferredVerSels !== void 0 ? preferredVerSels : {}); + if (preferredVerSelsArr.length > 0) { + const preferredVersions = []; + for (const [preferredSelector, preferredSelectorType] of preferredVerSelsArr) { + if (preferredSelector === versionRange) + continue; + switch (preferredSelectorType) { + case "tag": { + preferredVersions.push(meta["dist-tags"][preferredSelector]); + break; + } + case "range": { + versions = Object.keys(meta.versions); + for (const version of versions) { + if (semver_1.default.satisfies(version, preferredSelector, true)) { + preferredVersions.push(version); + } + } + break; + } + case "version": { + if (meta.versions[preferredSelector]) { + preferredVersions.push(preferredSelector); + } + break; + } + } + } + if (preferredVersions.includes(latest) && semver_1.default.satisfies(latest, versionRange, true)) { + return latest; + } + const preferredVersion = semver_1.default.maxSatisfying(preferredVersions, versionRange, true); + if (preferredVersion) { + return preferredVersion; + } + } + if (versionRange === "*" || semver_1.default.satisfies(latest, versionRange, true)) { + return latest; + } + versions = versions !== null && versions !== void 0 ? versions : Object.keys(meta.versions); + const maxVersion = semver_1.default.maxSatisfying(versions, versionRange, true); + if (maxVersion && meta.versions[maxVersion].deprecated && versions.length > 1) { + const nonDeprecatedVersions = versions.map((version) => meta.versions[version]).filter((versionMeta) => !versionMeta.deprecated).map((versionMeta) => versionMeta.version); + const maxNonDeprecatedVersion = semver_1.default.maxSatisfying(nonDeprecatedVersions, versionRange, true); + if (maxNonDeprecatedVersion) + return maxNonDeprecatedVersion; + } + return maxVersion; + } + } +}); + +// ../npm-resolver/lib/pickPackage.js +var require_pickPackage = __commonJS({ + "../npm-resolver/lib/pickPackage.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var crypto_1 = __importDefault(require("crypto")); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var logger_1 = __importDefault(require_lib6()); + var graceful_fs_1 = __importDefault(require_lib18()); + var encode_registry_1 = __importDefault(require_encode_registry()); + var load_json_file_1 = __importDefault(require_load_json_file()); + var p_limit_1 = __importDefault(require_p_limit()); + var path_temp_1 = __importDefault(require_path_temp()); + var rename_overwrite_1 = __importDefault(require_rename_overwrite()); + var toRaw_1 = __importDefault(require_toRaw()); + var pickPackageFromMeta_1 = __importDefault(require_pickPackageFromMeta()); + var metafileOperationLimits = {}; + exports2.default = async (ctx, spec, opts) => { + var _a; + opts = opts || {}; + validatePackageName(spec.name); + const cachedMeta = ctx.metaCache.get(spec.name); + if (cachedMeta != null) { + return { + meta: cachedMeta, + pickedPackage: pickPackageFromMeta_1.default(spec, opts.preferredVersionSelectors, cachedMeta) + }; + } + const registryName = encode_registry_1.default(opts.registry); + const pkgMirror = path_1.default.join(ctx.cacheDir, ctx.metaDir, registryName, `${encodePkgName(spec.name)}.json`); + const limit = metafileOperationLimits[pkgMirror] = metafileOperationLimits[pkgMirror] || p_limit_1.default(1); + let metaCachedInStore; + if (ctx.offline === true || ctx.preferOffline) { + metaCachedInStore = await limit(async () => loadMeta(pkgMirror)); + if (ctx.offline) { + if (metaCachedInStore != null) + return { + meta: metaCachedInStore, + pickedPackage: pickPackageFromMeta_1.default(spec, opts.preferredVersionSelectors, metaCachedInStore) + }; + throw new error_1.default("NO_OFFLINE_META", `Failed to resolve ${toRaw_1.default(spec)} in package mirror ${pkgMirror}`); + } + if (metaCachedInStore != null) { + const pickedPackage = pickPackageFromMeta_1.default(spec, opts.preferredVersionSelectors, metaCachedInStore); + if (pickedPackage) { + return { + meta: metaCachedInStore, + pickedPackage + }; + } + } + } + if (spec.type === "version") { + metaCachedInStore = metaCachedInStore !== null && metaCachedInStore !== void 0 ? metaCachedInStore : await limit(async () => loadMeta(pkgMirror)); + if (((_a = metaCachedInStore === null || metaCachedInStore === void 0 ? void 0 : metaCachedInStore.versions) === null || _a === void 0 ? void 0 : _a[spec.fetchSpec]) != null) { + return { + meta: metaCachedInStore, + pickedPackage: metaCachedInStore.versions[spec.fetchSpec] + }; + } + } + try { + const meta = await ctx.fetch(spec.name, opts.registry, opts.authHeaderValue); + meta.cachedAt = Date.now(); + ctx.metaCache.set(spec.name, meta); + if (!opts.dryRun) { + limit(async () => { + try { + await saveMeta(pkgMirror, meta); + } catch (err) { + } + }); + } + return { + meta, + pickedPackage: pickPackageFromMeta_1.default(spec, opts.preferredVersionSelectors, meta) + }; + } catch (err) { + const meta = await loadMeta(pkgMirror); + if (meta == null) + throw err; + logger_1.default.error(err, err); + logger_1.default.debug({ message: `Using cached meta from ${pkgMirror}` }); + return { + meta, + pickedPackage: pickPackageFromMeta_1.default(spec, opts.preferredVersionSelectors, meta) + }; + } + }; + function encodePkgName(pkgName) { + if (pkgName !== pkgName.toLowerCase()) { + return `${pkgName}_${crypto_1.default.createHash("md5").update(pkgName).digest("hex")}`; + } + return pkgName; + } + async function loadMeta(pkgMirror) { + try { + return await load_json_file_1.default(pkgMirror); + } catch (err) { + return null; + } + } + var createdDirs = new Set(); + async function saveMeta(pkgMirror, meta) { + const dir = path_1.default.dirname(pkgMirror); + if (!createdDirs.has(dir)) { + await fs_1.promises.mkdir(dir, { recursive: true }); + createdDirs.add(dir); + } + const temp = path_temp_1.default(dir); + await graceful_fs_1.default.writeFile(temp, JSON.stringify(meta)); + await rename_overwrite_1.default(temp, pkgMirror); + } + function validatePackageName(pkgName) { + if (pkgName.includes("/") && pkgName[0] !== "@") { + throw new error_1.default("INVALID_PACKAGE_NAME", `Package name ${pkgName} is invalid, it should have a @scope`); + } + } + } +}); + +// ../../node_modules/.pnpm/parse-npm-tarball-url@3.0.0/node_modules/parse-npm-tarball-url/lib/index.js +var require_lib44 = __commonJS({ + "../../node_modules/.pnpm/parse-npm-tarball-url@3.0.0/node_modules/parse-npm-tarball-url/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var url_1 = require("url"); + var assert = require("assert"); + var semver_1 = require_semver3(); + function parseNpmTarballUrl(url) { + assert(url, "url is required"); + assert(typeof url === "string", "url should be a string"); + const { path, host } = url_1.parse(url); + if (!path || !host) + return null; + const pkg = parsePath(path); + if (!pkg) + return null; + return { + host, + name: pkg.name, + version: pkg.version + }; + } + exports2.default = parseNpmTarballUrl; + function parsePath(path) { + const parts = path.split("/-/"); + if (parts.length !== 2) + return null; + const name = parts[0] && decodeURIComponent(parts[0].substr(1)); + if (!name) + return null; + const pathWithNoExtension = parts[1].replace(/\.tgz$/, ""); + const scopelessNameLength = name.length - (name.indexOf("/") + 1); + const version = pathWithNoExtension.substr(scopelessNameLength + 1); + if (!semver_1.valid(version, true)) + return null; + return { name, version }; + } + } +}); + +// ../npm-resolver/lib/parsePref.js +var require_parsePref3 = __commonJS({ + "../npm-resolver/lib/parsePref.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var parse_npm_tarball_url_1 = __importDefault(require_lib44()); + var version_selector_type_1 = __importDefault(require_version_selector_type()); + function parsePref(pref, alias, defaultTag, registry) { + let name = alias; + if (pref.startsWith("npm:")) { + pref = pref.substr(4); + const index = pref.lastIndexOf("@"); + if (index < 1) { + name = pref; + pref = defaultTag; + } else { + name = pref.substr(0, index); + pref = pref.substr(index + 1); + } + } + if (name) { + const selector = version_selector_type_1.default(pref); + if (selector != null) { + return { + fetchSpec: selector.normalized, + name, + type: selector.type + }; + } + } + if (pref.startsWith(registry)) { + const pkg = parse_npm_tarball_url_1.default(pref); + if (pkg != null) { + return { + fetchSpec: pkg.version, + name: pkg.name, + normalizedPref: pref, + type: "version" + }; + } + } + return null; + } + exports2.default = parsePref; + } +}); + +// ../npm-resolver/lib/fetch.js +var require_fetch2 = __commonJS({ + "../npm-resolver/lib/fetch.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RegistryResponseError = void 0; + var url_1 = __importDefault(require("url")); + var core_loggers_1 = require_lib12(); + var error_1 = __importStar2(require_lib8()); + var retry = __importStar2(require_retry2()); + var semverRegex = /(.*)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/; + var RegistryResponseError = class extends error_1.FetchError { + constructor(request, response, pkgName) { + let hint; + if (response.status === 404) { + hint = `${pkgName} is not in the npm registry, or you have no permission to fetch it.`; + const matched = pkgName.match(semverRegex); + if (matched != null) { + hint += ` Did you mean ${matched[1]}?`; + } + } + super(request, response, hint); + this.pkgName = pkgName; + } + }; + exports2.RegistryResponseError = RegistryResponseError; + async function fromRegistry(fetch, fetchOpts, pkgName, registry, authHeaderValue) { + const uri = toUri(pkgName, registry); + const op = retry.operation(fetchOpts.retry); + return new Promise((resolve, reject) => op.attempt(async (attempt) => { + let response; + try { + response = await fetch(uri, { + authHeaderValue, + compress: true, + retry: fetchOpts.retry, + timeout: fetchOpts.timeout + }); + } catch (error) { + reject(new error_1.default("META_FETCH_FAIL", `GET ${uri}: ${error.message}`, { attempts: attempt })); + return; + } + if (response.status > 400) { + const request = { + authHeaderValue, + url: uri + }; + reject(new RegistryResponseError(request, response, pkgName)); + return; + } + try { + resolve(await response.json()); + } catch (error) { + const timeout = op.retry(new error_1.default("BROKEN_METADATA_JSON", error.message)); + if (timeout === false) { + reject(op.mainError()); + return; + } + core_loggers_1.requestRetryLogger.debug({ + attempt, + error, + maxRetries: fetchOpts.retry.retries, + method: "GET", + timeout, + url: uri + }); + } + })); + } + exports2.default = fromRegistry; + function toUri(pkgName, registry) { + let encodedName; + if (pkgName[0] === "@") { + encodedName = `@${encodeURIComponent(pkgName.substr(1))}`; + } else { + encodedName = encodeURIComponent(pkgName); + } + return new url_1.default.URL(encodedName, registry).toString(); + } + } +}); + +// ../npm-resolver/lib/createNpmPkgId.js +var require_createNpmPkgId = __commonJS({ + "../npm-resolver/lib/createNpmPkgId.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var encode_registry_1 = __importDefault(require_encode_registry()); + function createPkgId(registry, pkgName, pkgVersion) { + const escapedRegistryHost = encode_registry_1.default(registry); + return `${escapedRegistryHost}/${pkgName}/${pkgVersion}`; + } + exports2.default = createPkgId; + } +}); + +// ../npm-resolver/lib/index.js +var require_lib45 = __commonJS({ + "../npm-resolver/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RegistryResponseError = exports2.NoMatchingVersionError = void 0; + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var resolve_workspace_range_1 = __importDefault(require_lib24()); + var lru_cache_1 = __importDefault(require_lru_cache()); + var normalize_path_1 = __importDefault(require_normalize_path()); + var p_memoize_1 = __importDefault(require_p_memoize()); + var semver_1 = __importDefault(require_semver2()); + var ssri_1 = __importDefault(require_ssri()); + var pickPackage_1 = __importDefault(require_pickPackage()); + var parsePref_1 = __importDefault(require_parsePref3()); + var fetch_1 = __importStar2(require_fetch2()); + Object.defineProperty(exports2, "RegistryResponseError", { enumerable: true, get: function() { + return fetch_1.RegistryResponseError; + } }); + var createNpmPkgId_1 = __importDefault(require_createNpmPkgId()); + var NoMatchingVersionError = class extends error_1.default { + constructor(opts) { + var _a; + const dep = opts.wantedDependency.alias ? `${opts.wantedDependency.alias}@${(_a = opts.wantedDependency.pref) !== null && _a !== void 0 ? _a : ""}` : opts.wantedDependency.pref; + super("NO_MATCHING_VERSION", `No matching version found for ${dep}`); + this.packageMeta = opts.packageMeta; + } + }; + exports2.NoMatchingVersionError = NoMatchingVersionError; + var META_DIR = "metadata"; + var FULL_META_DIR = "metadata-full"; + function createResolver(fetchFromRegistry, getCredentials, opts) { + var _a, _b; + if (typeof opts.cacheDir !== "string") { + throw new TypeError("`opts.cacheDir` is required and needs to be a string"); + } + const fetchOpts = { + retry: (_a = opts.retry) !== null && _a !== void 0 ? _a : {}, + timeout: (_b = opts.timeout) !== null && _b !== void 0 ? _b : 6e4 + }; + const fetch = p_memoize_1.default(fetch_1.default.bind(null, fetchFromRegistry, fetchOpts), { + cacheKey: (...args2) => JSON.stringify(args2), + maxAge: 1e3 * 20 + }); + const getAuthHeaderValueByURI = (registry) => getCredentials(registry).authHeaderValue; + const metaCache = new lru_cache_1.default({ + max: 1e4, + maxAge: 120 * 1e3 + }); + return resolveNpm.bind(null, { + getAuthHeaderValueByURI, + pickPackage: pickPackage_1.default.bind(null, { + fetch, + metaCache, + metaDir: opts.fullMetadata ? FULL_META_DIR : META_DIR, + offline: opts.offline, + preferOffline: opts.preferOffline, + cacheDir: opts.cacheDir + }) + }); + } + exports2.default = createResolver; + async function resolveNpm(ctx, wantedDependency, opts) { + var _a, _b, _c; + const defaultTag = (_a = opts.defaultTag) !== null && _a !== void 0 ? _a : "latest"; + if ((_b = wantedDependency.pref) === null || _b === void 0 ? void 0 : _b.startsWith("workspace:")) { + if (wantedDependency.pref.startsWith("workspace:.")) + return null; + const resolvedFromWorkspace = tryResolveFromWorkspace(wantedDependency, { + defaultTag, + projectDir: opts.projectDir, + registry: opts.registry, + workspacePackages: opts.workspacePackages + }); + if (resolvedFromWorkspace != null) { + return resolvedFromWorkspace; + } + } + const workspacePackages = opts.alwaysTryWorkspacePackages !== false ? opts.workspacePackages : void 0; + const spec = wantedDependency.pref ? parsePref_1.default(wantedDependency.pref, wantedDependency.alias, defaultTag, opts.registry) : defaultTagForAlias(wantedDependency.alias, defaultTag); + if (spec == null) + return null; + const authHeaderValue = ctx.getAuthHeaderValueByURI(opts.registry); + let pickResult; + try { + pickResult = await ctx.pickPackage(spec, { + authHeaderValue, + dryRun: opts.dryRun === true, + preferredVersionSelectors: (_c = opts.preferredVersions) === null || _c === void 0 ? void 0 : _c[spec.name], + registry: opts.registry + }); + } catch (err) { + if (workspacePackages != null && opts.projectDir) { + const resolvedFromLocal = tryResolveFromWorkspacePackages(workspacePackages, spec, opts.projectDir); + if (resolvedFromLocal != null) + return resolvedFromLocal; + } + throw err; + } + const pickedPackage = pickResult.pickedPackage; + const meta = pickResult.meta; + if (pickedPackage == null) { + if (workspacePackages != null && opts.projectDir) { + const resolvedFromLocal = tryResolveFromWorkspacePackages(workspacePackages, spec, opts.projectDir); + if (resolvedFromLocal != null) + return resolvedFromLocal; + } + throw new NoMatchingVersionError({ wantedDependency, packageMeta: meta }); + } + if ((workspacePackages === null || workspacePackages === void 0 ? void 0 : workspacePackages[pickedPackage.name]) != null && opts.projectDir) { + if (workspacePackages[pickedPackage.name][pickedPackage.version]) { + return { + ...resolveFromLocalPackage(workspacePackages[pickedPackage.name][pickedPackage.version], spec.normalizedPref, opts.projectDir), + latest: meta["dist-tags"].latest + }; + } + const localVersion = pickMatchingLocalVersionOrNull(workspacePackages[pickedPackage.name], spec); + if (localVersion && (semver_1.default.gt(localVersion, pickedPackage.version) || opts.preferWorkspacePackages)) { + return { + ...resolveFromLocalPackage(workspacePackages[pickedPackage.name][localVersion], spec.normalizedPref, opts.projectDir), + latest: meta["dist-tags"].latest + }; + } + } + const id = createNpmPkgId_1.default(pickedPackage.dist.tarball, pickedPackage.name, pickedPackage.version); + const resolution = { + integrity: getIntegrity(pickedPackage.dist), + registry: opts.registry, + tarball: pickedPackage.dist.tarball + }; + return { + id, + latest: meta["dist-tags"].latest, + manifest: pickedPackage, + normalizedPref: spec.normalizedPref, + resolution, + resolvedVia: "npm-registry" + }; + } + function workspacePrefToNpm(workspacePref) { + const prefParts = /^workspace:([^@]+@)?(.*)$/.exec(workspacePref); + if (prefParts == null) { + throw new Error(`Invalid workspace spec: ${workspacePref}`); + } + const [workspacePkgAlias, workspaceVersion] = prefParts.slice(1); + const pkgAliasPart = workspacePkgAlias != null && workspacePkgAlias ? `npm:${workspacePkgAlias}` : ""; + const versionPart = workspaceVersion === "^" || workspaceVersion === "~" ? "*" : workspaceVersion; + return `${pkgAliasPart}${versionPart}`; + } + function tryResolveFromWorkspace(wantedDependency, opts) { + var _a, _b; + if (!((_a = wantedDependency.pref) === null || _a === void 0 ? void 0 : _a.startsWith("workspace:"))) { + return null; + } + const pref = workspacePrefToNpm(wantedDependency.pref); + const spec = parsePref_1.default(pref, wantedDependency.alias, opts.defaultTag, opts.registry); + if (spec == null) + throw new Error(`Invalid workspace: spec (${wantedDependency.pref})`); + if (opts.workspacePackages == null) { + throw new Error("Cannot resolve package from workspace because opts.workspacePackages is not defined"); + } + if (!opts.projectDir) { + throw new Error("Cannot resolve package from workspace because opts.projectDir is not defined"); + } + const resolvedFromLocal = tryResolveFromWorkspacePackages(opts.workspacePackages, spec, opts.projectDir); + if (resolvedFromLocal == null) { + throw new error_1.default("NO_MATCHING_VERSION_INSIDE_WORKSPACE", `In ${path_1.default.relative(process.cwd(), opts.projectDir)}: No matching version found for ${(_b = wantedDependency.alias) !== null && _b !== void 0 ? _b : ""}@${pref} inside the workspace`); + } + return resolvedFromLocal; + } + function tryResolveFromWorkspacePackages(workspacePackages, spec, projectDir) { + if (!workspacePackages[spec.name]) + return null; + const localVersion = pickMatchingLocalVersionOrNull(workspacePackages[spec.name], spec); + if (!localVersion) + return null; + return resolveFromLocalPackage(workspacePackages[spec.name][localVersion], spec.normalizedPref, projectDir); + } + function pickMatchingLocalVersionOrNull(versions, spec) { + const localVersions = Object.keys(versions); + switch (spec.type) { + case "tag": + return semver_1.default.maxSatisfying(localVersions, "*"); + case "version": + return versions[spec.fetchSpec] ? spec.fetchSpec : null; + case "range": + return resolve_workspace_range_1.default(spec.fetchSpec, localVersions); + default: + return null; + } + } + function resolveFromLocalPackage(localPackage, normalizedPref, projectDir) { + return { + id: `link:${normalize_path_1.default(path_1.default.relative(projectDir, localPackage.dir))}`, + manifest: localPackage.manifest, + normalizedPref, + resolution: { + directory: localPackage.dir, + type: "directory" + }, + resolvedVia: "local-filesystem" + }; + } + function defaultTagForAlias(alias, defaultTag) { + return { + fetchSpec: defaultTag, + name: alias, + type: "tag" + }; + } + function getIntegrity(dist) { + if (dist.integrity) { + return dist.integrity; + } + if (!dist.shasum) { + return void 0; + } + const integrity = ssri_1.default.fromHex(dist.shasum, "sha1"); + if (!integrity) { + throw new error_1.default("INVALID_TARBALL_INTEGRITY", `Tarball "${dist.tarball}" has invalid shasum specified in its metadata: ${dist.shasum}`); + } + return integrity.toString(); + } + } +}); + +// ../tarball-resolver/lib/index.js +var require_lib46 = __commonJS({ + "../tarball-resolver/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + async function resolveTarball(wantedDependency) { + if (!wantedDependency.pref.startsWith("http:") && !wantedDependency.pref.startsWith("https:")) { + return null; + } + if (isRepository(wantedDependency.pref)) + return null; + return { + id: `@${wantedDependency.pref.replace(/^.*:\/\/(git@)?/, "").replace(":", "+")}`, + normalizedPref: wantedDependency.pref, + resolution: { + tarball: wantedDependency.pref + }, + resolvedVia: "url" + }; + } + exports2.default = resolveTarball; + var GIT_HOSTERS = new Set([ + "github.com", + "gitlab.com", + "bitbucket.org" + ]); + function isRepository(pref) { + if (pref.endsWith("/")) { + pref = pref.substr(0, pref.length - 1); + } + const parts = pref.split("/"); + return parts.length === 5 && GIT_HOSTERS.has(parts[2]); + } + } +}); + +// ../default-resolver/lib/index.js +var require_lib47 = __commonJS({ + "../default-resolver/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var git_resolver_1 = __importDefault(require_lib42()); + var local_resolver_1 = __importDefault(require_lib43()); + var npm_resolver_1 = __importDefault(require_lib45()); + var tarball_resolver_1 = __importDefault(require_lib46()); + function createResolver(fetchFromRegistry, getCredentials, pnpmOpts) { + const resolveFromNpm = npm_resolver_1.default(fetchFromRegistry, getCredentials, pnpmOpts); + const resolveFromGit = git_resolver_1.default(pnpmOpts); + return async (wantedDependency, opts) => { + var _a, _b, _c, _d; + const resolution = (_a = await resolveFromNpm(wantedDependency, opts)) !== null && _a !== void 0 ? _a : wantedDependency.pref && ((_c = (_b = await tarball_resolver_1.default(wantedDependency)) !== null && _b !== void 0 ? _b : await resolveFromGit(wantedDependency)) !== null && _c !== void 0 ? _c : await local_resolver_1.default(wantedDependency, opts)); + if (!resolution) { + throw new error_1.default("SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER", `${wantedDependency.alias ? wantedDependency.alias + "@" : ""}${(_d = wantedDependency.pref) !== null && _d !== void 0 ? _d : ""} isn't supported by any available resolver.`); + } + return resolution; + }; + } + exports2.default = createResolver; + } +}); + +// ../git-fetcher/lib/index.js +var require_lib48 = __commonJS({ + "../git-fetcher/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var prepare_package_1 = __importDefault(require_lib39()); + var rimraf_1 = __importDefault(require_rimraf()); + var execa_1 = __importDefault(require_lib26()); + exports2.default = () => { + return { + git: async function fetchFromGit(cafs, resolution, opts) { + const tempLocation = await cafs.tempDir(); + await execGit(["clone", resolution.repo, tempLocation]); + await execGit(["checkout", resolution.commit], { cwd: tempLocation }); + await prepare_package_1.default(tempLocation); + await rimraf_1.default(path_1.default.join(tempLocation, ".git")); + const filesIndex = await cafs.addFilesFromDir(tempLocation, opts.manifest); + return { filesIndex }; + } + }; + }; + function prefixGitArgs() { + return process.platform === "win32" ? ["-c", "core.longpaths=true"] : []; + } + function execGit(args2, opts) { + const fullArgs = prefixGitArgs().concat(args2 || []); + return execa_1.default("git", fullArgs, opts); + } + } +}); + +// ../../node_modules/.pnpm/nerf-dart@1.0.0/node_modules/nerf-dart/index.js +var require_nerf_dart = __commonJS({ + "../../node_modules/.pnpm/nerf-dart@1.0.0/node_modules/nerf-dart/index.js"(exports2, module2) { + var url = require("url"); + module2.exports = toNerfDart; + function toNerfDart(uri) { + var parsed = url.parse(uri); + delete parsed.protocol; + delete parsed.auth; + delete parsed.query; + delete parsed.search; + delete parsed.hash; + return url.resolve(url.format(parsed), "."); + } + } +}); + +// ../../node_modules/.pnpm/credentials-by-uri@2.0.0/node_modules/credentials-by-uri/index.js +var require_credentials_by_uri = __commonJS({ + "../../node_modules/.pnpm/credentials-by-uri@2.0.0/node_modules/credentials-by-uri/index.js"(exports2, module2) { + "use strict"; + var assert = require("assert"); + var toNerfDart = require_nerf_dart(); + module2.exports = function getCredentialsByURI(config, uri) { + assert(uri && typeof uri === "string", "registry URL is required"); + const nerfed = toNerfDart(uri); + const defnerf = toNerfDart(config.registry); + const creds = getScopedCredentials(nerfed, `${nerfed}:`, config); + if (nerfed !== defnerf) + return creds; + return { + ...getScopedCredentials(nerfed, "", config), + ...creds + }; + }; + function getScopedCredentials(nerfed, scope, config) { + const c = {}; + if (config[`${scope}always-auth`] !== void 0) { + const val = config[`${scope}always-auth`]; + c.alwaysAuth = val === "false" ? false : !!val; + } + if (config[`${scope}_authToken`]) { + c.authHeaderValue = `Bearer ${config[`${scope}_authToken`]}`; + return c; + } + if (config[`${scope}_auth`]) { + c.authHeaderValue = `Basic ${config[`${scope}_auth`]}`; + return c; + } + let username, password; + if (config[`${scope}username`]) { + username = config[`${scope}username`]; + } + if (config[`${scope}_password`]) { + if (scope === "") { + password = config[`${scope}_password`]; + } else { + password = Buffer.from(config[`${scope}_password`], "base64").toString("utf8"); + } + } + if (username && password) { + c.authHeaderValue = `Basic ${Buffer.from(`${username}:${password}`).toString("base64")}`; + } + return c; + } + } +}); + +// ../client/lib/index.js +var require_lib49 = __commonJS({ + "../client/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createResolver = void 0; + var default_resolver_1 = __importDefault(require_lib47()); + var fetch_1 = require_lib29(); + var git_fetcher_1 = __importDefault(require_lib48()); + var tarball_fetcher_1 = __importDefault(require_lib40()); + var credentials_by_uri_1 = __importDefault(require_credentials_by_uri()); + var mem_1 = __importDefault(require_dist8()); + function default_1(opts) { + const fetchFromRegistry = fetch_1.createFetchFromRegistry(opts); + const getCredentials = mem_1.default((registry) => credentials_by_uri_1.default(opts.authConfig, registry)); + return { + fetchers: createFetchers(fetchFromRegistry, getCredentials, opts), + resolve: default_resolver_1.default(fetchFromRegistry, getCredentials, opts) + }; + } + exports2.default = default_1; + function createResolver(opts) { + const fetchFromRegistry = fetch_1.createFetchFromRegistry(opts); + const getCredentials = mem_1.default((registry) => credentials_by_uri_1.default(opts.authConfig, registry)); + return default_resolver_1.default(fetchFromRegistry, getCredentials, opts); + } + exports2.createResolver = createResolver; + function createFetchers(fetchFromRegistry, getCredentials, opts) { + return { + ...tarball_fetcher_1.default(fetchFromRegistry, getCredentials, opts), + ...git_fetcher_1.default() + }; + } + } +}); + +// ../pick-registry-for-package/lib/index.js +var require_lib50 = __commonJS({ + "../pick-registry-for-package/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = (registries, packageName, pref) => { + var _a; + const scope = getScope(packageName, pref); + return (_a = scope && registries[scope]) !== null && _a !== void 0 ? _a : registries.default; + }; + function getScope(pkgName, pref) { + if (pref === null || pref === void 0 ? void 0 : pref.startsWith("npm:")) { + pref = pref.substr(4); + if (pref[0] === "@") { + return pref.substr(0, pref.indexOf("/")); + } + } + if (pkgName[0] === "@") { + return pkgName.substr(0, pkgName.indexOf("/")); + } + return null; + } + } +}); + +// lib/checkForUpdates.js +var require_checkForUpdates = __commonJS({ + "lib/checkForUpdates.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var cli_meta_1 = __importDefault(require_lib4()); + var client_1 = require_lib49(); + var pick_registry_for_package_1 = __importDefault(require_lib50()); + var core_loggers_1 = require_lib12(); + var load_json_file_1 = __importDefault(require_load_json_file()); + var write_json_file_1 = __importDefault(require_write_json_file()); + var UPDATE_CHECK_FREQUENCY = 24 * 60 * 60 * 1e3; + async function default_1(config) { + var _a, _b; + const stateFile = path_1.default.join(config.stateDir, "pnpm-state.json"); + let state; + try { + state = await load_json_file_1.default(stateFile); + } catch (err) { + } + if ((state === null || state === void 0 ? void 0 : state.lastUpdateCheck) && Date.now() - new Date(state.lastUpdateCheck).valueOf() < UPDATE_CHECK_FREQUENCY) + return; + const resolve = client_1.createResolver({ + ...config, + authConfig: config.rawConfig, + retry: { + retries: 0 + } + }); + const resolution = await resolve({ alias: cli_meta_1.default.name, pref: "latest" }, { + lockfileDir: (_a = config.lockfileDir) !== null && _a !== void 0 ? _a : config.dir, + preferredVersions: {}, + projectDir: config.dir, + registry: pick_registry_for_package_1.default(config.registries, cli_meta_1.default.name, "latest") + }); + if ((_b = resolution === null || resolution === void 0 ? void 0 : resolution.manifest) === null || _b === void 0 ? void 0 : _b.version) { + core_loggers_1.updateCheckLogger.debug({ + currentVersion: cli_meta_1.default.version, + latestVersion: resolution === null || resolution === void 0 ? void 0 : resolution.manifest.version + }); + } + await write_json_file_1.default(stateFile, { + ...state, + lastUpdateCheck: new Date().toUTCString() + }); + } + exports2.default = default_1; + } +}); + +// ../lockfile-utils/lib/nameVerFromPkgSnapshot.js +var require_nameVerFromPkgSnapshot = __commonJS({ + "../lockfile-utils/lib/nameVerFromPkgSnapshot.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var dp = __importStar2(require_lib33()); + exports2.default = (depPath, pkgSnapshot) => { + if (!pkgSnapshot.name) { + const pkgInfo = dp.parse(depPath); + return { + name: pkgInfo.name, + peersSuffix: pkgInfo.peersSuffix, + version: pkgInfo.version + }; + } + return { + name: pkgSnapshot.name, + peersSuffix: void 0, + version: pkgSnapshot.version + }; + }; + } +}); + +// ../lockfile-utils/lib/packageIdFromSnapshot.js +var require_packageIdFromSnapshot = __commonJS({ + "../lockfile-utils/lib/packageIdFromSnapshot.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var dp = __importStar2(require_lib33()); + exports2.default = (depPath, pkgSnapshot, registries) => { + var _a; + if (pkgSnapshot.id) + return pkgSnapshot.id; + return (_a = dp.tryGetPackageId(registries, depPath)) !== null && _a !== void 0 ? _a : depPath; + }; + } +}); + +// ../lockfile-utils/lib/packageIsIndependent.js +var require_packageIsIndependent = __commonJS({ + "../lockfile-utils/lib/packageIsIndependent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = ({ dependencies, optionalDependencies }) => { + return dependencies === void 0 && optionalDependencies === void 0; + }; + } +}); + +// ../../node_modules/.pnpm/normalize-registry-url@1.0.0/node_modules/normalize-registry-url/index.js +var require_normalize_registry_url = __commonJS({ + "../../node_modules/.pnpm/normalize-registry-url@1.0.0/node_modules/normalize-registry-url/index.js"(exports2, module2) { + "use strict"; + module2.exports = function(registry) { + if (typeof registry !== "string") { + throw new TypeError("`registry` should be a string"); + } + if (registry[registry.length - 1] === "/") + return registry; + return `${registry}/`; + }; + } +}); + +// ../../node_modules/.pnpm/get-npm-tarball-url@2.0.2/node_modules/get-npm-tarball-url/lib/index.js +var require_lib51 = __commonJS({ + "../../node_modules/.pnpm/get-npm-tarball-url@2.0.2/node_modules/get-npm-tarball-url/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var normalizeRegistry = require_normalize_registry_url(); + function default_1(pkgName, pkgVersion, opts) { + const registry = normalizeRegistry(opts && opts.registry || "https://registry.npmjs.org/"); + const scopelessName = getScopelessName(pkgName); + return `${registry}${pkgName}/-/${scopelessName}-${removeBuildMetadataFromVersion(pkgVersion)}.tgz`; + } + exports2.default = default_1; + function removeBuildMetadataFromVersion(version) { + const plusPos = version.indexOf("+"); + if (plusPos === -1) + return version; + return version.substring(0, plusPos); + } + function getScopelessName(name) { + if (name[0] !== "@") { + return name; + } + return name.split("/")[1]; + } + } +}); + +// ../lockfile-utils/lib/pkgSnapshotToResolution.js +var require_pkgSnapshotToResolution = __commonJS({ + "../lockfile-utils/lib/pkgSnapshotToResolution.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var url_1 = __importDefault(require("url")); + var dp = __importStar2(require_lib33()); + var get_npm_tarball_url_1 = __importDefault(require_lib51()); + var nameVerFromPkgSnapshot_1 = __importDefault(require_nameVerFromPkgSnapshot()); + exports2.default = (depPath, pkgSnapshot, registries) => { + var _a; + if (pkgSnapshot.resolution["type"] || ((_a = pkgSnapshot.resolution["tarball"]) === null || _a === void 0 ? void 0 : _a.startsWith("file:"))) { + return pkgSnapshot.resolution; + } + const { name } = nameVerFromPkgSnapshot_1.default(depPath, pkgSnapshot); + const registry = pkgSnapshot.resolution["registry"] || name[0] === "@" && registries[name.split("/")[0]] || registries.default; + let tarball; + if (!pkgSnapshot.resolution["tarball"]) { + tarball = getTarball(registry); + } else { + tarball = new url_1.default.URL(pkgSnapshot.resolution["tarball"], registry).toString(); + } + return { + ...pkgSnapshot.resolution, + registry, + tarball + }; + function getTarball(registry2) { + const { name: name2, version } = dp.parse(depPath); + if (!name2 || !version) { + throw new Error(`Couldn't get tarball URL from dependency path ${depPath}`); + } + return get_npm_tarball_url_1.default(name2, version, { registry: registry2 }); + } + }; + } +}); + +// ../lockfile-utils/lib/satisfiesPackageManifest.js +var require_satisfiesPackageManifest = __commonJS({ + "../lockfile-utils/lib/satisfiesPackageManifest.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var types_1 = require_lib14(); + var equals_1 = __importDefault(require_equals2()); + exports2.default = (lockfile, pkg, importerId) => { + var _a, _b; + const importer = lockfile.importers[importerId]; + if (!importer) + return false; + if (!equals_1.default({ ...pkg.devDependencies, ...pkg.dependencies, ...pkg.optionalDependencies }, importer.specifiers)) { + return false; + } + for (const depField of types_1.DEPENDENCIES_FIELDS) { + const importerDeps = (_a = importer[depField]) !== null && _a !== void 0 ? _a : {}; + const pkgDeps = (_b = pkg[depField]) !== null && _b !== void 0 ? _b : {}; + let pkgDepNames; + switch (depField) { + case "optionalDependencies": + pkgDepNames = Object.keys(pkgDeps); + break; + case "devDependencies": + pkgDepNames = Object.keys(pkgDeps).filter((depName) => (pkg.optionalDependencies == null || !pkg.optionalDependencies[depName]) && (pkg.dependencies == null || !pkg.dependencies[depName])); + break; + case "dependencies": + pkgDepNames = Object.keys(pkgDeps).filter((depName) => pkg.optionalDependencies == null || !pkg.optionalDependencies[depName]); + break; + default: + throw new Error(`Unknown dependency type "${depField}"`); + } + if (pkgDepNames.length !== Object.keys(importerDeps).length && pkgDepNames.length !== countOfNonLinkedDeps(importerDeps)) { + return false; + } + for (const depName of pkgDepNames) { + if (!importerDeps[depName] || importer.specifiers[depName] !== pkgDeps[depName]) + return false; + } + } + return true; + }; + function countOfNonLinkedDeps(lockfileDeps) { + return Object.values(lockfileDeps).filter((ref) => !ref.includes("link:") && !ref.includes("file:")).length; + } + } +}); + +// ../lockfile-types/lib/index.js +var require_lib52 = __commonJS({ + "../lockfile-types/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../lockfile-utils/lib/index.js +var require_lib53 = __commonJS({ + "../lockfile-utils/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getPkgShortId = exports2.satisfiesPackageManifest = exports2.pkgSnapshotToResolution = exports2.packageIsIndependent = exports2.packageIdFromSnapshot = exports2.nameVerFromPkgSnapshot = void 0; + var dependency_path_1 = require_lib33(); + var nameVerFromPkgSnapshot_1 = __importDefault(require_nameVerFromPkgSnapshot()); + exports2.nameVerFromPkgSnapshot = nameVerFromPkgSnapshot_1.default; + var packageIdFromSnapshot_1 = __importDefault(require_packageIdFromSnapshot()); + exports2.packageIdFromSnapshot = packageIdFromSnapshot_1.default; + var packageIsIndependent_1 = __importDefault(require_packageIsIndependent()); + exports2.packageIsIndependent = packageIsIndependent_1.default; + var pkgSnapshotToResolution_1 = __importDefault(require_pkgSnapshotToResolution()); + exports2.pkgSnapshotToResolution = pkgSnapshotToResolution_1.default; + var satisfiesPackageManifest_1 = __importDefault(require_satisfiesPackageManifest()); + exports2.satisfiesPackageManifest = satisfiesPackageManifest_1.default; + __exportStar(require_lib52(), exports2); + exports2.getPkgShortId = dependency_path_1.refToRelative; + } +}); + +// ../lockfile-walker/lib/index.js +var require_lib54 = __commonJS({ + "../lockfile-walker/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.lockfileWalkerGroupImporterSteps = void 0; + var dp = __importStar2(require_lib33()); + function lockfileWalkerGroupImporterSteps(lockfile, importerIds, opts) { + const walked = new Set((opts === null || opts === void 0 ? void 0 : opts.skipped) != null ? Array.from(opts === null || opts === void 0 ? void 0 : opts.skipped) : []); + return importerIds.map((importerId) => { + var _a, _b, _c, _d; + const projectSnapshot = lockfile.importers[importerId]; + const entryNodes = Object.entries({ + ...((_a = opts === null || opts === void 0 ? void 0 : opts.include) === null || _a === void 0 ? void 0 : _a.devDependencies) === false ? {} : projectSnapshot.devDependencies, + ...((_b = opts === null || opts === void 0 ? void 0 : opts.include) === null || _b === void 0 ? void 0 : _b.dependencies) === false ? {} : projectSnapshot.dependencies, + ...((_c = opts === null || opts === void 0 ? void 0 : opts.include) === null || _c === void 0 ? void 0 : _c.optionalDependencies) === false ? {} : projectSnapshot.optionalDependencies + }).map(([pkgName, reference]) => dp.refToRelative(reference, pkgName)).filter((nodeId) => nodeId !== null); + return { + importerId, + step: step({ + includeOptionalDependencies: ((_d = opts === null || opts === void 0 ? void 0 : opts.include) === null || _d === void 0 ? void 0 : _d.optionalDependencies) !== false, + lockfile, + walked + }, entryNodes) + }; + }); + } + exports2.lockfileWalkerGroupImporterSteps = lockfileWalkerGroupImporterSteps; + function lockfileWalker(lockfile, importerIds, opts) { + var _a; + const walked = new Set((opts === null || opts === void 0 ? void 0 : opts.skipped) != null ? Array.from(opts === null || opts === void 0 ? void 0 : opts.skipped) : []); + const entryNodes = []; + const directDeps = []; + importerIds.forEach((importerId) => { + var _a2, _b, _c; + const projectSnapshot = lockfile.importers[importerId]; + Object.entries({ + ...((_a2 = opts === null || opts === void 0 ? void 0 : opts.include) === null || _a2 === void 0 ? void 0 : _a2.devDependencies) === false ? {} : projectSnapshot.devDependencies, + ...((_b = opts === null || opts === void 0 ? void 0 : opts.include) === null || _b === void 0 ? void 0 : _b.dependencies) === false ? {} : projectSnapshot.dependencies, + ...((_c = opts === null || opts === void 0 ? void 0 : opts.include) === null || _c === void 0 ? void 0 : _c.optionalDependencies) === false ? {} : projectSnapshot.optionalDependencies + }).forEach(([pkgName, reference]) => { + const depPath = dp.refToRelative(reference, pkgName); + if (depPath === null) + return; + entryNodes.push(depPath); + directDeps.push({ alias: pkgName, depPath }); + }); + }); + return { + directDeps, + step: step({ + includeOptionalDependencies: ((_a = opts === null || opts === void 0 ? void 0 : opts.include) === null || _a === void 0 ? void 0 : _a.optionalDependencies) !== false, + lockfile, + walked + }, entryNodes) + }; + } + exports2.default = lockfileWalker; + function step(ctx, nextDepPaths) { + var _a; + const result = { + dependencies: [], + links: [], + missing: [] + }; + for (const depPath of nextDepPaths) { + if (ctx.walked.has(depPath)) + continue; + ctx.walked.add(depPath); + const pkgSnapshot = (_a = ctx.lockfile.packages) === null || _a === void 0 ? void 0 : _a[depPath]; + if (pkgSnapshot == null) { + if (depPath.startsWith("link:")) { + result.links.push(depPath); + continue; + } + result.missing.push(depPath); + continue; + } + result.dependencies.push({ + depPath, + next: () => step(ctx, next({ includeOptionalDependencies: ctx.includeOptionalDependencies }, pkgSnapshot)), + pkgSnapshot + }); + } + return result; + } + function next(opts, nextPkg) { + return Object.entries({ + ...nextPkg.dependencies, + ...opts.includeOptionalDependencies ? nextPkg.optionalDependencies : {} + }).map(([pkgName, reference]) => dp.refToRelative(reference, pkgName)).filter((nodeId) => nodeId !== null); + } + } +}); + +// ../audit/lib/lockfileToAuditTree.js +var require_lockfileToAuditTree = __commonJS({ + "../audit/lib/lockfileToAuditTree.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var lockfile_utils_1 = require_lib53(); + var lockfile_walker_1 = require_lib54(); + function lockfileToAuditTree(lockfile, opts) { + const importerWalkers = lockfile_walker_1.lockfileWalkerGroupImporterSteps(lockfile, Object.keys(lockfile.importers), { include: opts === null || opts === void 0 ? void 0 : opts.include }); + const dependencies = {}; + importerWalkers.forEach((importerWalker) => { + const importerDeps = lockfileToAuditNode(importerWalker.step); + const depName = importerWalker.importerId.replace(/\//g, "__"); + dependencies[depName] = { + dependencies: importerDeps, + requires: toRequires(importerDeps), + version: "0.0.0" + }; + }); + const auditTree = { + name: void 0, + version: void 0, + dependencies, + dev: false, + install: [], + integrity: void 0, + metadata: {}, + remove: [], + requires: toRequires(dependencies) + }; + return auditTree; + } + exports2.default = lockfileToAuditTree; + function lockfileToAuditNode(step) { + const dependencies = {}; + for (const { depPath, pkgSnapshot, next } of step.dependencies) { + const { name, version } = lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot); + const subdeps = lockfileToAuditNode(next()); + const dep = { + dev: pkgSnapshot.dev === true, + integrity: pkgSnapshot.resolution["integrity"], + version + }; + if (Object.keys(subdeps).length > 0) { + dep.dependencies = subdeps; + dep.requires = toRequires(subdeps); + } + dependencies[name] = dep; + } + return dependencies; + } + function toRequires(auditNodesByDepName) { + const requires = {}; + for (const subdepName of Object.keys(auditNodesByDepName)) { + requires[subdepName] = auditNodesByDepName[subdepName].version; + } + return requires; + } + } +}); + +// ../audit/lib/types.js +var require_types4 = __commonJS({ + "../audit/lib/types.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../audit/lib/index.js +var require_lib55 = __commonJS({ + "../audit/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var fetch_1 = __importDefault(require_lib29()); + var lockfileToAuditTree_1 = __importDefault(require_lockfileToAuditTree()); + __exportStar(require_types4(), exports2); + async function audit(lockfile, opts) { + const auditTree = lockfileToAuditTree_1.default(lockfile, { include: opts.include }); + const registry = opts.registry.endsWith("/") ? opts.registry : `${opts.registry}/`; + const auditUrl = `${registry}-/npm/v1/security/audits`; + const res = await fetch_1.default(auditUrl, { + body: JSON.stringify(auditTree), + headers: { "Content-Type": "application/json" }, + method: "post", + retry: opts.retry, + timeout: opts.timeout + }); + if (res.status !== 200) { + throw new error_1.default("AUDIT_BAD_RESPONSE", `The audit endpoint (at ${auditUrl}) responded with ${res.status}: ${await res.text()}`); + } + return res.json(); + } + exports2.default = audit; + } +}); + +// ../lockfile-file/lib/existsWantedLockfile.js +var require_existsWantedLockfile = __commonJS({ + "../lockfile-file/lib/existsWantedLockfile.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = __importDefault(require("fs")); + var path_1 = __importDefault(require("path")); + var constants_1 = require_lib7(); + exports2.default = async (pkgPath) => new Promise((resolve, reject) => { + fs_1.default.access(path_1.default.join(pkgPath, constants_1.WANTED_LOCKFILE), (err) => { + if (err == null) { + resolve(true); + return; + } + if (err.code === "ENOENT") { + resolve(false); + return; + } + reject(err); + }); + }); + } +}); + +// ../lockfile-file/lib/getLockfileImporterId.js +var require_getLockfileImporterId = __commonJS({ + "../lockfile-file/lib/getLockfileImporterId.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var normalize_path_1 = __importDefault(require_normalize_path()); + exports2.default = (lockfileDir, prefix) => normalize_path_1.default(path_1.default.relative(lockfileDir, prefix)) || "."; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/empty.js +var require_empty2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/empty.js"(exports2, module2) { + var _curry1 = require_curry1(); + var _isArguments = require_isArguments(); + var _isArray = require_isArray(); + var _isObject = require_isObject(); + var _isString = require_isString(); + var empty = /* @__PURE__ */ _curry1(function empty2(x) { + return x != null && typeof x["fantasy-land/empty"] === "function" ? x["fantasy-land/empty"]() : x != null && x.constructor != null && typeof x.constructor["fantasy-land/empty"] === "function" ? x.constructor["fantasy-land/empty"]() : x != null && typeof x.empty === "function" ? x.empty() : x != null && x.constructor != null && typeof x.constructor.empty === "function" ? x.constructor.empty() : _isArray(x) ? [] : _isString(x) ? "" : _isObject(x) ? {} : _isArguments(x) ? function() { + return arguments; + }() : void 0; + }); + module2.exports = empty; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/isEmpty.js +var require_isEmpty2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/isEmpty.js"(exports2, module2) { + var _curry1 = require_curry1(); + var empty = require_empty2(); + var equals = require_equals2(); + var isEmpty = /* @__PURE__ */ _curry1(function isEmpty2(x) { + return x != null && equals(x, empty(x)); + }); + module2.exports = isEmpty; + } +}); + +// ../lockfile-file/lib/logger.js +var require_logger2 = __commonJS({ + "../lockfile-file/lib/logger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var logger_1 = __importDefault(require_lib6()); + exports2.default = logger_1.default("lockfile"); + } +}); + +// ../lockfile-file/lib/sortLockfileKeys.js +var require_sortLockfileKeys = __commonJS({ + "../lockfile-file/lib/sortLockfileKeys.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sortLockfileKeys = void 0; + var sort_keys_1 = __importDefault(require_sort_keys()); + var ORDERED_KEYS = { + resolution: 1, + id: 2, + name: 3, + version: 4, + engines: 5, + cpu: 6, + os: 7, + deprecated: 8, + hasBin: 9, + prepare: 10, + requiresBuild: 11, + bundleDependencies: 12, + peerDependencies: 13, + peerDependenciesMeta: 14, + dependencies: 15, + optionalDependencies: 16, + transitivePeerDependencies: 17, + dev: 18, + optional: 19 + }; + var ROOT_KEYS_ORDER = { + lockfileVersion: 1, + neverBuiltDependencies: 2, + overrides: 3, + packageExtensionsChecksum: 4, + specifiers: 10, + dependencies: 11, + optionalDependencies: 12, + devDependencies: 13, + importers: 14, + packages: 15 + }; + function compareWithPriority(priority, left, right) { + const leftPriority = priority[left]; + const rightPriority = priority[right]; + if (leftPriority && rightPriority) + return leftPriority - rightPriority; + if (leftPriority) + return -1; + if (rightPriority) + return 1; + return left.localeCompare(right); + } + function sortLockfileKeys(lockfile) { + const compareRootKeys = compareWithPriority.bind(null, ROOT_KEYS_ORDER); + if (lockfile.importers != null) { + lockfile.importers = sort_keys_1.default(lockfile.importers); + for (const importerId of Object.keys(lockfile.importers)) { + lockfile.importers[importerId] = sort_keys_1.default(lockfile.importers[importerId], { + compare: compareRootKeys, + deep: true + }); + } + } + if (lockfile.packages != null) { + lockfile.packages = sort_keys_1.default(lockfile.packages); + for (const pkgId of Object.keys(lockfile.packages)) { + lockfile.packages[pkgId] = sort_keys_1.default(lockfile.packages[pkgId], { + compare: compareWithPriority.bind(null, ORDERED_KEYS), + deep: true + }); + } + } + for (const key of ["specifiers", "dependencies", "devDependencies", "optionalDependencies"]) { + if (!lockfile[key]) + continue; + lockfile[key] = sort_keys_1.default(lockfile[key]); + } + return sort_keys_1.default(lockfile, { compare: compareRootKeys }); + } + exports2.sortLockfileKeys = sortLockfileKeys; + } +}); + +// ../lockfile-file/lib/write.js +var require_write = __commonJS({ + "../lockfile-file/lib/write.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.normalizeLockfile = exports2.writeCurrentLockfile = exports2.writeWantedLockfile = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var types_1 = require_lib14(); + var constants_1 = require_lib7(); + var rimraf_1 = __importDefault(require_rimraf()); + var js_yaml_1 = __importDefault(require_js_yaml()); + var equals_1 = __importDefault(require_equals2()); + var isEmpty_1 = __importDefault(require_isEmpty2()); + var write_file_atomic_1 = __importDefault(require_write_file_atomic()); + var logger_1 = __importDefault(require_logger2()); + var sortLockfileKeys_1 = require_sortLockfileKeys(); + async function writeFileAtomic(filename, data) { + return new Promise((resolve, reject) => write_file_atomic_1.default(filename, data, {}, (err) => err != null ? reject(err) : resolve())); + } + var LOCKFILE_YAML_FORMAT = { + blankLines: true, + lineWidth: 1e3, + noCompatMode: true, + noRefs: true, + sortKeys: false + }; + async function writeWantedLockfile(pkgPath, wantedLockfile, opts) { + return writeLockfile(constants_1.WANTED_LOCKFILE, pkgPath, wantedLockfile, opts); + } + exports2.writeWantedLockfile = writeWantedLockfile; + async function writeCurrentLockfile(virtualStoreDir, currentLockfile, opts) { + await fs_1.promises.mkdir(virtualStoreDir, { recursive: true }); + return writeLockfile("lock.yaml", virtualStoreDir, currentLockfile, opts); + } + exports2.writeCurrentLockfile = writeCurrentLockfile; + async function writeLockfile(lockfileFilename, pkgPath, wantedLockfile, opts) { + const lockfilePath = path_1.default.join(pkgPath, lockfileFilename); + if (isEmptyLockfile(wantedLockfile)) { + return rimraf_1.default(lockfilePath); + } + const yamlDoc = yamlStringify(wantedLockfile, (opts === null || opts === void 0 ? void 0 : opts.forceSharedFormat) === true); + return writeFileAtomic(lockfilePath, yamlDoc); + } + function yamlStringify(lockfile, forceSharedFormat) { + let normalizedLockfile = normalizeLockfile(lockfile, forceSharedFormat); + normalizedLockfile = sortLockfileKeys_1.sortLockfileKeys(normalizedLockfile); + return js_yaml_1.default.dump(normalizedLockfile, LOCKFILE_YAML_FORMAT); + } + function isEmptyLockfile(lockfile) { + return Object.values(lockfile.importers).every((importer) => { + var _a, _b; + return isEmpty_1.default((_a = importer.specifiers) !== null && _a !== void 0 ? _a : {}) && isEmpty_1.default((_b = importer.dependencies) !== null && _b !== void 0 ? _b : {}); + }); + } + function normalizeLockfile(lockfile, forceSharedFormat) { + let lockfileToSave; + if (!forceSharedFormat && equals_1.default(Object.keys(lockfile.importers), ["."])) { + lockfileToSave = { + ...lockfile, + ...lockfile.importers["."] + }; + delete lockfileToSave.importers; + for (const depType of types_1.DEPENDENCIES_FIELDS) { + if (isEmpty_1.default(lockfileToSave[depType])) { + delete lockfileToSave[depType]; + } + } + if (isEmpty_1.default(lockfileToSave.packages) || lockfileToSave.packages == null) { + delete lockfileToSave.packages; + } + } else { + lockfileToSave = { + ...lockfile, + importers: Object.keys(lockfile.importers).reduce((acc, alias) => { + var _a, _b; + const importer = lockfile.importers[alias]; + const normalizedImporter = { + specifiers: (_a = importer.specifiers) !== null && _a !== void 0 ? _a : {} + }; + for (const depType of types_1.DEPENDENCIES_FIELDS) { + if (!isEmpty_1.default((_b = importer[depType]) !== null && _b !== void 0 ? _b : {})) { + normalizedImporter[depType] = importer[depType]; + } + } + acc[alias] = normalizedImporter; + return acc; + }, {}) + }; + if (isEmpty_1.default(lockfileToSave.packages) || lockfileToSave.packages == null) { + delete lockfileToSave.packages; + } + } + if (lockfileToSave.overrides != null && isEmpty_1.default(lockfileToSave.overrides)) { + delete lockfileToSave.overrides; + } + if (lockfileToSave.neverBuiltDependencies != null) { + if (isEmpty_1.default(lockfileToSave.neverBuiltDependencies)) { + delete lockfileToSave.neverBuiltDependencies; + } else { + lockfileToSave.neverBuiltDependencies = lockfileToSave.neverBuiltDependencies.sort(); + } + } + if (!lockfileToSave.packageExtensionsChecksum) { + delete lockfileToSave.packageExtensionsChecksum; + } + return lockfileToSave; + } + exports2.normalizeLockfile = normalizeLockfile; + async function writeLockfiles(opts) { + const wantedLockfilePath = path_1.default.join(opts.wantedLockfileDir, constants_1.WANTED_LOCKFILE); + const currentLockfilePath = path_1.default.join(opts.currentLockfileDir, "lock.yaml"); + if (isEmptyLockfile(opts.wantedLockfile)) { + await Promise.all([ + rimraf_1.default(wantedLockfilePath), + rimraf_1.default(currentLockfilePath) + ]); + return; + } + const forceSharedFormat = (opts === null || opts === void 0 ? void 0 : opts.forceSharedFormat) === true; + const yamlDoc = yamlStringify(opts.wantedLockfile, forceSharedFormat); + if (opts.wantedLockfile === opts.currentLockfile) { + await Promise.all([ + writeFileAtomic(wantedLockfilePath, yamlDoc), + (async () => { + await fs_1.promises.mkdir(path_1.default.dirname(currentLockfilePath), { recursive: true }); + await writeFileAtomic(currentLockfilePath, yamlDoc); + })() + ]); + return; + } + logger_1.default.debug({ + message: `\`${constants_1.WANTED_LOCKFILE}\` differs from \`${path_1.default.relative(opts.wantedLockfileDir, currentLockfilePath)}\``, + prefix: opts.wantedLockfileDir + }); + const currentYamlDoc = yamlStringify(opts.currentLockfile, forceSharedFormat); + await Promise.all([ + writeFileAtomic(wantedLockfilePath, yamlDoc), + (async () => { + await fs_1.promises.mkdir(path_1.default.dirname(currentLockfilePath), { recursive: true }); + await writeFileAtomic(currentLockfilePath, currentYamlDoc); + })() + ]); + } + exports2.default = writeLockfiles; + } +}); + +// ../../node_modules/.pnpm/comver-to-semver@1.0.0/node_modules/comver-to-semver/index.js +var require_comver_to_semver = __commonJS({ + "../../node_modules/.pnpm/comver-to-semver@1.0.0/node_modules/comver-to-semver/index.js"(exports2, module2) { + "use strict"; + module2.exports = function comverToSemver(comver) { + if (!comver.includes(".")) + return `${comver}.0.0`; + return `${comver}.0`; + }; + } +}); + +// ../lockfile-file/lib/errors/LockfileBreakingChangeError.js +var require_LockfileBreakingChangeError = __commonJS({ + "../lockfile-file/lib/errors/LockfileBreakingChangeError.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var LockfileBreakingChangeError = class extends error_1.default { + constructor(filename) { + super("LOCKFILE_BREAKING_CHANGE", `Lockfile ${filename} not compatible with current pnpm`); + this.filename = filename; + } + }; + exports2.default = LockfileBreakingChangeError; + } +}); + +// ../lockfile-file/lib/errors/index.js +var require_errors3 = __commonJS({ + "../lockfile-file/lib/errors/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LockfileBreakingChangeError = void 0; + var LockfileBreakingChangeError_1 = __importDefault(require_LockfileBreakingChangeError()); + exports2.LockfileBreakingChangeError = LockfileBreakingChangeError_1.default; + } +}); + +// ../merge-lockfile-changes/lib/index.js +var require_lib56 = __commonJS({ + "../merge-lockfile-changes/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var comver_to_semver_1 = __importDefault(require_comver_to_semver()); + var semver_1 = __importDefault(require_semver2()); + function mergeLockfileChanges(ours, theirs) { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; + const newLockfile = { + importers: {}, + lockfileVersion: semver_1.default.gt(comver_to_semver_1.default(theirs.lockfileVersion.toString()), comver_to_semver_1.default(ours.lockfileVersion.toString())) ? theirs.lockfileVersion : ours.lockfileVersion + }; + for (const importerId of Array.from(new Set([...Object.keys(ours.importers), ...Object.keys(theirs.importers)]))) { + newLockfile.importers[importerId] = { + specifiers: {} + }; + for (const key of ["dependencies", "devDependencies", "optionalDependencies"]) { + newLockfile.importers[importerId][key] = mergeDict((_b = (_a = ours.importers[importerId]) === null || _a === void 0 ? void 0 : _a[key]) !== null && _b !== void 0 ? _b : {}, (_d = (_c = theirs.importers[importerId]) === null || _c === void 0 ? void 0 : _c[key]) !== null && _d !== void 0 ? _d : {}, mergeVersions); + if (Object.keys(newLockfile.importers[importerId][key]).length === 0) { + delete newLockfile.importers[importerId][key]; + } + } + newLockfile.importers[importerId].specifiers = mergeDict((_f = (_e = ours.importers[importerId]) === null || _e === void 0 ? void 0 : _e.specifiers) !== null && _f !== void 0 ? _f : {}, (_h = (_g = theirs.importers[importerId]) === null || _g === void 0 ? void 0 : _g.specifiers) !== null && _h !== void 0 ? _h : {}, takeChangedValue); + } + const packages = {}; + for (const depPath of Array.from(new Set([...Object.keys((_j = ours.packages) !== null && _j !== void 0 ? _j : {}), ...Object.keys((_k = theirs.packages) !== null && _k !== void 0 ? _k : {})]))) { + const ourPkg = (_l = ours.packages) === null || _l === void 0 ? void 0 : _l[depPath]; + const theirPkg = (_m = theirs.packages) === null || _m === void 0 ? void 0 : _m[depPath]; + const pkg = { + ...ourPkg, + ...theirPkg + }; + for (const key of ["dependencies", "optionalDependencies"]) { + pkg[key] = mergeDict((_o = ourPkg === null || ourPkg === void 0 ? void 0 : ourPkg[key]) !== null && _o !== void 0 ? _o : {}, (_p = theirPkg === null || theirPkg === void 0 ? void 0 : theirPkg[key]) !== null && _p !== void 0 ? _p : {}, mergeVersions); + if (Object.keys(pkg[key]).length === 0) { + delete pkg[key]; + } + } + packages[depPath] = pkg; + } + newLockfile.packages = packages; + return newLockfile; + } + exports2.default = mergeLockfileChanges; + function mergeDict(ourDict, theirDict, valueMerger) { + const newDict = {}; + for (const key of Object.keys(ourDict).concat(Object.keys(theirDict))) { + const changedValue = valueMerger(ourDict[key], theirDict[key]); + if (changedValue) { + newDict[key] = changedValue; + } + } + return newDict; + } + function takeChangedValue(ourValue, theirValue) { + if (ourValue === theirValue || theirValue == null) + return ourValue; + return theirValue; + } + function mergeVersions(ourValue, theirValue) { + if (ourValue === theirValue || !theirValue) + return ourValue; + if (!ourValue) + return theirValue; + const [ourVersion] = ourValue.split("_"); + const [theirVersion] = theirValue.split("_"); + if (semver_1.default.gt(ourVersion, theirVersion)) { + return ourValue; + } + return theirValue; + } + } +}); + +// ../lockfile-file/lib/gitMergeFile.js +var require_gitMergeFile = __commonJS({ + "../lockfile-file/lib/gitMergeFile.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isDiff = exports2.autofixMergeConflicts = void 0; + var merge_lockfile_changes_1 = __importDefault(require_lib56()); + var js_yaml_1 = __importDefault(require_js_yaml()); + var MERGE_CONFLICT_PARENT = "|||||||"; + var MERGE_CONFLICT_END = ">>>>>>>"; + var MERGE_CONFLICT_THEIRS = "======="; + var MERGE_CONFLICT_OURS = "<<<<<<<"; + function autofixMergeConflicts(fileContent) { + const { ours, theirs } = parseMergeFile(fileContent); + return merge_lockfile_changes_1.default(js_yaml_1.default.load(ours), js_yaml_1.default.load(theirs)); + } + exports2.autofixMergeConflicts = autofixMergeConflicts; + function parseMergeFile(fileContent) { + const lines = fileContent.split(/[\n\r]+/g); + let state = "top"; + const ours = []; + const theirs = []; + while (lines.length > 0) { + const line = lines.shift(); + if (line.startsWith(MERGE_CONFLICT_PARENT)) { + state = "parent"; + continue; + } + if (line.startsWith(MERGE_CONFLICT_OURS)) { + state = "ours"; + continue; + } + if (line === MERGE_CONFLICT_THEIRS) { + state = "theirs"; + continue; + } + if (line.startsWith(MERGE_CONFLICT_END)) { + state = "top"; + continue; + } + if (state === "top" || state === "ours") + ours.push(line); + if (state === "top" || state === "theirs") + theirs.push(line); + } + return { ours: ours.join("\n"), theirs: theirs.join("\n") }; + } + function isDiff(fileContent) { + return fileContent.includes(MERGE_CONFLICT_OURS) && fileContent.includes(MERGE_CONFLICT_THEIRS) && fileContent.includes(MERGE_CONFLICT_END); + } + exports2.isDiff = isDiff; + } +}); + +// ../lockfile-file/lib/read.js +var require_read = __commonJS({ + "../lockfile-file/lib/read.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createLockfileObject = exports2.readWantedLockfile = exports2.readWantedLockfileAndAutofixConflicts = exports2.readCurrentLockfile = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var constants_1 = require_lib7(); + var error_1 = __importDefault(require_lib8()); + var types_1 = require_lib14(); + var comver_to_semver_1 = __importDefault(require_comver_to_semver()); + var js_yaml_1 = __importDefault(require_js_yaml()); + var semver_1 = __importDefault(require_semver2()); + var strip_bom_1 = __importDefault(require_strip_bom()); + var errors_1 = require_errors3(); + var gitMergeFile_1 = require_gitMergeFile(); + var logger_1 = __importDefault(require_logger2()); + async function readCurrentLockfile(virtualStoreDir, opts) { + const lockfilePath = path_1.default.join(virtualStoreDir, "lock.yaml"); + return (await _read(lockfilePath, virtualStoreDir, opts)).lockfile; + } + exports2.readCurrentLockfile = readCurrentLockfile; + async function readWantedLockfileAndAutofixConflicts(pkgPath, opts) { + const lockfilePath = path_1.default.join(pkgPath, constants_1.WANTED_LOCKFILE); + return _read(lockfilePath, pkgPath, { ...opts, autofixMergeConflicts: true }); + } + exports2.readWantedLockfileAndAutofixConflicts = readWantedLockfileAndAutofixConflicts; + async function readWantedLockfile(pkgPath, opts) { + const lockfilePath = path_1.default.join(pkgPath, constants_1.WANTED_LOCKFILE); + return (await _read(lockfilePath, pkgPath, opts)).lockfile; + } + exports2.readWantedLockfile = readWantedLockfile; + async function _read(lockfilePath, prefix, opts) { + var _a; + let lockfileRawContent; + try { + lockfileRawContent = strip_bom_1.default(await fs_1.promises.readFile(lockfilePath, "utf8")); + } catch (err) { + if (err.code !== "ENOENT") { + throw err; + } + return { + lockfile: null, + hadConflicts: false + }; + } + let lockfile; + let hadConflicts; + try { + lockfile = js_yaml_1.default.load(lockfileRawContent); + hadConflicts = false; + } catch (err) { + if (!opts.autofixMergeConflicts || !gitMergeFile_1.isDiff(lockfileRawContent)) { + throw new error_1.default("BROKEN_LOCKFILE", `The lockfile at "${lockfilePath}" is broken: ${err.message}`); + } + hadConflicts = true; + lockfile = gitMergeFile_1.autofixMergeConflicts(lockfileRawContent); + logger_1.default.info({ + message: `Merge conflict detected in ${constants_1.WANTED_LOCKFILE} and successfully merged`, + prefix: path_1.default.dirname(lockfilePath) + }); + } + if (typeof (lockfile === null || lockfile === void 0 ? void 0 : lockfile["specifiers"]) !== "undefined") { + lockfile.importers = { + ".": { + specifiers: lockfile["specifiers"] + } + }; + delete lockfile.specifiers; + for (const depType of types_1.DEPENDENCIES_FIELDS) { + if (lockfile[depType] != null) { + lockfile.importers["."][depType] = lockfile[depType]; + delete lockfile[depType]; + } + } + } + if (lockfile) { + const lockfileSemver = comver_to_semver_1.default(((_a = lockfile.lockfileVersion) !== null && _a !== void 0 ? _a : 0).toString()); + if (typeof opts.wantedVersion !== "number" || semver_1.default.major(lockfileSemver) === semver_1.default.major(comver_to_semver_1.default(opts.wantedVersion.toString()))) { + if (typeof opts.wantedVersion === "number" && semver_1.default.gt(lockfileSemver, comver_to_semver_1.default(opts.wantedVersion.toString()))) { + logger_1.default.warn({ + message: `Your ${constants_1.WANTED_LOCKFILE} was generated by a newer version of pnpm. It is a compatible version but it might get downgraded to version ${opts.wantedVersion}`, + prefix + }); + } + return { lockfile, hadConflicts }; + } + } + if (opts.ignoreIncompatible) { + logger_1.default.warn({ + message: `Ignoring not compatible lockfile at ${lockfilePath}`, + prefix + }); + return { lockfile: null, hadConflicts: false }; + } + throw new errors_1.LockfileBreakingChangeError(lockfilePath); + } + function createLockfileObject(importerIds, opts) { + const importers = importerIds.reduce((acc, importerId) => { + acc[importerId] = { + dependencies: {}, + specifiers: {} + }; + return acc; + }, {}); + return { + importers, + lockfileVersion: opts.lockfileVersion || constants_1.LOCKFILE_VERSION + }; + } + exports2.createLockfileObject = createLockfileObject; + } +}); + +// ../lockfile-file/lib/index.js +var require_lib57 = __commonJS({ + "../lockfile-file/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.writeWantedLockfile = exports2.writeCurrentLockfile = exports2.writeLockfiles = exports2.getLockfileImporterId = exports2.existsWantedLockfile = void 0; + var existsWantedLockfile_1 = __importDefault(require_existsWantedLockfile()); + exports2.existsWantedLockfile = existsWantedLockfile_1.default; + var getLockfileImporterId_1 = __importDefault(require_getLockfileImporterId()); + exports2.getLockfileImporterId = getLockfileImporterId_1.default; + var write_1 = __importStar2(require_write()); + exports2.writeLockfiles = write_1.default; + Object.defineProperty(exports2, "writeCurrentLockfile", { enumerable: true, get: function() { + return write_1.writeCurrentLockfile; + } }); + Object.defineProperty(exports2, "writeWantedLockfile", { enumerable: true, get: function() { + return write_1.writeWantedLockfile; + } }); + __exportStar(require_lib52(), exports2); + __exportStar(require_read(), exports2); + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseValues.js +var require_baseValues = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseValues.js"(exports2, module2) { + var arrayMap = require_arrayMap(); + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } + module2.exports = baseValues; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/values.js +var require_values = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/values.js"(exports2, module2) { + var baseValues = require_baseValues(); + var keys = require_keys2(); + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + module2.exports = values; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFindIndex.js +var require_baseFindIndex = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFindIndex.js"(exports2, module2) { + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, index = fromIndex + (fromRight ? 1 : -1); + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + module2.exports = baseFindIndex; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNaN.js +var require_baseIsNaN = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNaN.js"(exports2, module2) { + function baseIsNaN(value) { + return value !== value; + } + module2.exports = baseIsNaN; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_strictIndexOf.js +var require_strictIndexOf = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_strictIndexOf.js"(exports2, module2) { + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, length = array.length; + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + module2.exports = strictIndexOf; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIndexOf.js +var require_baseIndexOf = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIndexOf.js"(exports2, module2) { + var baseFindIndex = require_baseFindIndex(); + var baseIsNaN = require_baseIsNaN(); + var strictIndexOf = require_strictIndexOf(); + function baseIndexOf(array, value, fromIndex) { + return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); + } + module2.exports = baseIndexOf; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_charsEndIndex.js +var require_charsEndIndex = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_charsEndIndex.js"(exports2, module2) { + var baseIndexOf = require_baseIndexOf(); + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) { + } + return index; + } + module2.exports = charsEndIndex; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/trimEnd.js +var require_trimEnd = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/trimEnd.js"(exports2, module2) { + var baseToString = require_baseToString(); + var castSlice = require_castSlice(); + var charsEndIndex = require_charsEndIndex(); + var stringToArray = require_stringToArray(); + var toString = require_toString(); + var trimmedEndIndex = require_trimmedEndIndex(); + function trimEnd(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === void 0)) { + return string.slice(0, trimmedEndIndex(string) + 1); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; + return castSlice(strSymbols, 0, end).join(""); + } + module2.exports = trimEnd; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/alignString.js +var require_alignString2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/alignString.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _isNumber2 = _interopRequireDefault(require_isNumber()); + var _isString2 = _interopRequireDefault(require_isString2()); + var _stringWidth = _interopRequireDefault(require_string_width()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var alignments = ["left", "right", "center"]; + var alignLeft = (subject, width) => { + return subject + " ".repeat(width); + }; + var alignRight = (subject, width) => { + return " ".repeat(width) + subject; + }; + var alignCenter = (subject, width) => { + let halfWidth; + halfWidth = width / 2; + if (width % 2 === 0) { + return " ".repeat(halfWidth) + subject + " ".repeat(halfWidth); + } else { + halfWidth = Math.floor(halfWidth); + return " ".repeat(halfWidth) + subject + " ".repeat(halfWidth + 1); + } + }; + var alignString = (subject, containerWidth, alignment) => { + if (!(0, _isString2.default)(subject)) { + throw new TypeError("Subject parameter value must be a string."); + } + if (!(0, _isNumber2.default)(containerWidth)) { + throw new TypeError("Container width parameter value must be a number."); + } + const subjectWidth = (0, _stringWidth.default)(subject); + if (subjectWidth > containerWidth) { + throw new Error("Subject parameter value width cannot be greater than the container width."); + } + if (!(0, _isString2.default)(alignment)) { + throw new TypeError("Alignment parameter value must be a string."); + } + if (!alignments.includes(alignment)) { + throw new Error("Alignment parameter value must be a known alignment parameter value (left, right, center)."); + } + if (subjectWidth === 0) { + return " ".repeat(containerWidth); + } + const availableWidth = containerWidth - subjectWidth; + if (alignment === "left") { + return alignLeft(subject, availableWidth); + } + if (alignment === "right") { + return alignRight(subject, availableWidth); + } + return alignCenter(subject, availableWidth); + }; + var _default = alignString; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/alignTableData.js +var require_alignTableData2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/alignTableData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _stringWidth = _interopRequireDefault(require_string_width()); + var _alignString = _interopRequireDefault(require_alignString2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var alignTableData = (rows, config) => { + return rows.map((cells) => { + return cells.map((value, index1) => { + const column = config.columns[index1]; + if ((0, _stringWidth.default)(value) === column.width) { + return value; + } else { + return (0, _alignString.default)(value, column.width, column.alignment); + } + }); + }); + }; + var _default = alignTableData; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/grapheme-splitter@1.0.4/node_modules/grapheme-splitter/index.js +var require_grapheme_splitter = __commonJS({ + "../../node_modules/.pnpm/grapheme-splitter@1.0.4/node_modules/grapheme-splitter/index.js"(exports2, module2) { + function GraphemeSplitter() { + var CR = 0, LF = 1, Control = 2, Extend = 3, Regional_Indicator = 4, SpacingMark = 5, L = 6, V = 7, T = 8, LV = 9, LVT = 10, Other = 11, Prepend = 12, E_Base = 13, E_Modifier = 14, ZWJ = 15, Glue_After_Zwj = 16, E_Base_GAZ = 17; + var NotBreak = 0, BreakStart = 1, Break = 2, BreakLastRegional = 3, BreakPenultimateRegional = 4; + function isSurrogate(str, pos) { + return 55296 <= str.charCodeAt(pos) && str.charCodeAt(pos) <= 56319 && 56320 <= str.charCodeAt(pos + 1) && str.charCodeAt(pos + 1) <= 57343; + } + function codePointAt(str, idx) { + if (idx === void 0) { + idx = 0; + } + var code = str.charCodeAt(idx); + if (55296 <= code && code <= 56319 && idx < str.length - 1) { + var hi = code; + var low = str.charCodeAt(idx + 1); + if (56320 <= low && low <= 57343) { + return (hi - 55296) * 1024 + (low - 56320) + 65536; + } + return hi; + } + if (56320 <= code && code <= 57343 && idx >= 1) { + var hi = str.charCodeAt(idx - 1); + var low = code; + if (55296 <= hi && hi <= 56319) { + return (hi - 55296) * 1024 + (low - 56320) + 65536; + } + return low; + } + return code; + } + function shouldBreak(start, mid, end) { + var all = [start].concat(mid).concat([end]); + var previous = all[all.length - 2]; + var next = end; + var eModifierIndex = all.lastIndexOf(E_Modifier); + if (eModifierIndex > 1 && all.slice(1, eModifierIndex).every(function(c) { + return c == Extend; + }) && [Extend, E_Base, E_Base_GAZ].indexOf(start) == -1) { + return Break; + } + var rIIndex = all.lastIndexOf(Regional_Indicator); + if (rIIndex > 0 && all.slice(1, rIIndex).every(function(c) { + return c == Regional_Indicator; + }) && [Prepend, Regional_Indicator].indexOf(previous) == -1) { + if (all.filter(function(c) { + return c == Regional_Indicator; + }).length % 2 == 1) { + return BreakLastRegional; + } else { + return BreakPenultimateRegional; + } + } + if (previous == CR && next == LF) { + return NotBreak; + } else if (previous == Control || previous == CR || previous == LF) { + if (next == E_Modifier && mid.every(function(c) { + return c == Extend; + })) { + return Break; + } else { + return BreakStart; + } + } else if (next == Control || next == CR || next == LF) { + return BreakStart; + } else if (previous == L && (next == L || next == V || next == LV || next == LVT)) { + return NotBreak; + } else if ((previous == LV || previous == V) && (next == V || next == T)) { + return NotBreak; + } else if ((previous == LVT || previous == T) && next == T) { + return NotBreak; + } else if (next == Extend || next == ZWJ) { + return NotBreak; + } else if (next == SpacingMark) { + return NotBreak; + } else if (previous == Prepend) { + return NotBreak; + } + var previousNonExtendIndex = all.indexOf(Extend) != -1 ? all.lastIndexOf(Extend) - 1 : all.length - 2; + if ([E_Base, E_Base_GAZ].indexOf(all[previousNonExtendIndex]) != -1 && all.slice(previousNonExtendIndex + 1, -1).every(function(c) { + return c == Extend; + }) && next == E_Modifier) { + return NotBreak; + } + if (previous == ZWJ && [Glue_After_Zwj, E_Base_GAZ].indexOf(next) != -1) { + return NotBreak; + } + if (mid.indexOf(Regional_Indicator) != -1) { + return Break; + } + if (previous == Regional_Indicator && next == Regional_Indicator) { + return NotBreak; + } + return BreakStart; + } + this.nextBreak = function(string, index) { + if (index === void 0) { + index = 0; + } + if (index < 0) { + return 0; + } + if (index >= string.length - 1) { + return string.length; + } + var prev = getGraphemeBreakProperty(codePointAt(string, index)); + var mid = []; + for (var i = index + 1; i < string.length; i++) { + if (isSurrogate(string, i - 1)) { + continue; + } + var next = getGraphemeBreakProperty(codePointAt(string, i)); + if (shouldBreak(prev, mid, next)) { + return i; + } + mid.push(next); + } + return string.length; + }; + this.splitGraphemes = function(str) { + var res = []; + var index = 0; + var brk; + while ((brk = this.nextBreak(str, index)) < str.length) { + res.push(str.slice(index, brk)); + index = brk; + } + if (index < str.length) { + res.push(str.slice(index)); + } + return res; + }; + this.iterateGraphemes = function(str) { + var index = 0; + var res = { + next: function() { + var value; + var brk; + if ((brk = this.nextBreak(str, index)) < str.length) { + value = str.slice(index, brk); + index = brk; + return { value, done: false }; + } + if (index < str.length) { + value = str.slice(index); + index = str.length; + return { value, done: false }; + } + return { value: void 0, done: true }; + }.bind(this) + }; + if (typeof Symbol !== "undefined" && Symbol.iterator) { + res[Symbol.iterator] = function() { + return res; + }; + } + return res; + }; + this.countGraphemes = function(str) { + var count = 0; + var index = 0; + var brk; + while ((brk = this.nextBreak(str, index)) < str.length) { + index = brk; + count++; + } + if (index < str.length) { + count++; + } + return count; + }; + function getGraphemeBreakProperty(code) { + if (1536 <= code && code <= 1541 || code == 1757 || code == 1807 || code == 2274 || code == 3406 || code == 69821 || 70082 <= code && code <= 70083 || code == 72250 || 72326 <= code && code <= 72329 || code == 73030) { + return Prepend; + } + if (code == 13) { + return CR; + } + if (code == 10) { + return LF; + } + if (0 <= code && code <= 9 || 11 <= code && code <= 12 || 14 <= code && code <= 31 || 127 <= code && code <= 159 || code == 173 || code == 1564 || code == 6158 || code == 8203 || 8206 <= code && code <= 8207 || code == 8232 || code == 8233 || 8234 <= code && code <= 8238 || 8288 <= code && code <= 8292 || code == 8293 || 8294 <= code && code <= 8303 || 55296 <= code && code <= 57343 || code == 65279 || 65520 <= code && code <= 65528 || 65529 <= code && code <= 65531 || 113824 <= code && code <= 113827 || 119155 <= code && code <= 119162 || code == 917504 || code == 917505 || 917506 <= code && code <= 917535 || 917632 <= code && code <= 917759 || 918e3 <= code && code <= 921599) { + return Control; + } + if (768 <= code && code <= 879 || 1155 <= code && code <= 1159 || 1160 <= code && code <= 1161 || 1425 <= code && code <= 1469 || code == 1471 || 1473 <= code && code <= 1474 || 1476 <= code && code <= 1477 || code == 1479 || 1552 <= code && code <= 1562 || 1611 <= code && code <= 1631 || code == 1648 || 1750 <= code && code <= 1756 || 1759 <= code && code <= 1764 || 1767 <= code && code <= 1768 || 1770 <= code && code <= 1773 || code == 1809 || 1840 <= code && code <= 1866 || 1958 <= code && code <= 1968 || 2027 <= code && code <= 2035 || 2070 <= code && code <= 2073 || 2075 <= code && code <= 2083 || 2085 <= code && code <= 2087 || 2089 <= code && code <= 2093 || 2137 <= code && code <= 2139 || 2260 <= code && code <= 2273 || 2275 <= code && code <= 2306 || code == 2362 || code == 2364 || 2369 <= code && code <= 2376 || code == 2381 || 2385 <= code && code <= 2391 || 2402 <= code && code <= 2403 || code == 2433 || code == 2492 || code == 2494 || 2497 <= code && code <= 2500 || code == 2509 || code == 2519 || 2530 <= code && code <= 2531 || 2561 <= code && code <= 2562 || code == 2620 || 2625 <= code && code <= 2626 || 2631 <= code && code <= 2632 || 2635 <= code && code <= 2637 || code == 2641 || 2672 <= code && code <= 2673 || code == 2677 || 2689 <= code && code <= 2690 || code == 2748 || 2753 <= code && code <= 2757 || 2759 <= code && code <= 2760 || code == 2765 || 2786 <= code && code <= 2787 || 2810 <= code && code <= 2815 || code == 2817 || code == 2876 || code == 2878 || code == 2879 || 2881 <= code && code <= 2884 || code == 2893 || code == 2902 || code == 2903 || 2914 <= code && code <= 2915 || code == 2946 || code == 3006 || code == 3008 || code == 3021 || code == 3031 || code == 3072 || 3134 <= code && code <= 3136 || 3142 <= code && code <= 3144 || 3146 <= code && code <= 3149 || 3157 <= code && code <= 3158 || 3170 <= code && code <= 3171 || code == 3201 || code == 3260 || code == 3263 || code == 3266 || code == 3270 || 3276 <= code && code <= 3277 || 3285 <= code && code <= 3286 || 3298 <= code && code <= 3299 || 3328 <= code && code <= 3329 || 3387 <= code && code <= 3388 || code == 3390 || 3393 <= code && code <= 3396 || code == 3405 || code == 3415 || 3426 <= code && code <= 3427 || code == 3530 || code == 3535 || 3538 <= code && code <= 3540 || code == 3542 || code == 3551 || code == 3633 || 3636 <= code && code <= 3642 || 3655 <= code && code <= 3662 || code == 3761 || 3764 <= code && code <= 3769 || 3771 <= code && code <= 3772 || 3784 <= code && code <= 3789 || 3864 <= code && code <= 3865 || code == 3893 || code == 3895 || code == 3897 || 3953 <= code && code <= 3966 || 3968 <= code && code <= 3972 || 3974 <= code && code <= 3975 || 3981 <= code && code <= 3991 || 3993 <= code && code <= 4028 || code == 4038 || 4141 <= code && code <= 4144 || 4146 <= code && code <= 4151 || 4153 <= code && code <= 4154 || 4157 <= code && code <= 4158 || 4184 <= code && code <= 4185 || 4190 <= code && code <= 4192 || 4209 <= code && code <= 4212 || code == 4226 || 4229 <= code && code <= 4230 || code == 4237 || code == 4253 || 4957 <= code && code <= 4959 || 5906 <= code && code <= 5908 || 5938 <= code && code <= 5940 || 5970 <= code && code <= 5971 || 6002 <= code && code <= 6003 || 6068 <= code && code <= 6069 || 6071 <= code && code <= 6077 || code == 6086 || 6089 <= code && code <= 6099 || code == 6109 || 6155 <= code && code <= 6157 || 6277 <= code && code <= 6278 || code == 6313 || 6432 <= code && code <= 6434 || 6439 <= code && code <= 6440 || code == 6450 || 6457 <= code && code <= 6459 || 6679 <= code && code <= 6680 || code == 6683 || code == 6742 || 6744 <= code && code <= 6750 || code == 6752 || code == 6754 || 6757 <= code && code <= 6764 || 6771 <= code && code <= 6780 || code == 6783 || 6832 <= code && code <= 6845 || code == 6846 || 6912 <= code && code <= 6915 || code == 6964 || 6966 <= code && code <= 6970 || code == 6972 || code == 6978 || 7019 <= code && code <= 7027 || 7040 <= code && code <= 7041 || 7074 <= code && code <= 7077 || 7080 <= code && code <= 7081 || 7083 <= code && code <= 7085 || code == 7142 || 7144 <= code && code <= 7145 || code == 7149 || 7151 <= code && code <= 7153 || 7212 <= code && code <= 7219 || 7222 <= code && code <= 7223 || 7376 <= code && code <= 7378 || 7380 <= code && code <= 7392 || 7394 <= code && code <= 7400 || code == 7405 || code == 7412 || 7416 <= code && code <= 7417 || 7616 <= code && code <= 7673 || 7675 <= code && code <= 7679 || code == 8204 || 8400 <= code && code <= 8412 || 8413 <= code && code <= 8416 || code == 8417 || 8418 <= code && code <= 8420 || 8421 <= code && code <= 8432 || 11503 <= code && code <= 11505 || code == 11647 || 11744 <= code && code <= 11775 || 12330 <= code && code <= 12333 || 12334 <= code && code <= 12335 || 12441 <= code && code <= 12442 || code == 42607 || 42608 <= code && code <= 42610 || 42612 <= code && code <= 42621 || 42654 <= code && code <= 42655 || 42736 <= code && code <= 42737 || code == 43010 || code == 43014 || code == 43019 || 43045 <= code && code <= 43046 || 43204 <= code && code <= 43205 || 43232 <= code && code <= 43249 || 43302 <= code && code <= 43309 || 43335 <= code && code <= 43345 || 43392 <= code && code <= 43394 || code == 43443 || 43446 <= code && code <= 43449 || code == 43452 || code == 43493 || 43561 <= code && code <= 43566 || 43569 <= code && code <= 43570 || 43573 <= code && code <= 43574 || code == 43587 || code == 43596 || code == 43644 || code == 43696 || 43698 <= code && code <= 43700 || 43703 <= code && code <= 43704 || 43710 <= code && code <= 43711 || code == 43713 || 43756 <= code && code <= 43757 || code == 43766 || code == 44005 || code == 44008 || code == 44013 || code == 64286 || 65024 <= code && code <= 65039 || 65056 <= code && code <= 65071 || 65438 <= code && code <= 65439 || code == 66045 || code == 66272 || 66422 <= code && code <= 66426 || 68097 <= code && code <= 68099 || 68101 <= code && code <= 68102 || 68108 <= code && code <= 68111 || 68152 <= code && code <= 68154 || code == 68159 || 68325 <= code && code <= 68326 || code == 69633 || 69688 <= code && code <= 69702 || 69759 <= code && code <= 69761 || 69811 <= code && code <= 69814 || 69817 <= code && code <= 69818 || 69888 <= code && code <= 69890 || 69927 <= code && code <= 69931 || 69933 <= code && code <= 69940 || code == 70003 || 70016 <= code && code <= 70017 || 70070 <= code && code <= 70078 || 70090 <= code && code <= 70092 || 70191 <= code && code <= 70193 || code == 70196 || 70198 <= code && code <= 70199 || code == 70206 || code == 70367 || 70371 <= code && code <= 70378 || 70400 <= code && code <= 70401 || code == 70460 || code == 70462 || code == 70464 || code == 70487 || 70502 <= code && code <= 70508 || 70512 <= code && code <= 70516 || 70712 <= code && code <= 70719 || 70722 <= code && code <= 70724 || code == 70726 || code == 70832 || 70835 <= code && code <= 70840 || code == 70842 || code == 70845 || 70847 <= code && code <= 70848 || 70850 <= code && code <= 70851 || code == 71087 || 71090 <= code && code <= 71093 || 71100 <= code && code <= 71101 || 71103 <= code && code <= 71104 || 71132 <= code && code <= 71133 || 71219 <= code && code <= 71226 || code == 71229 || 71231 <= code && code <= 71232 || code == 71339 || code == 71341 || 71344 <= code && code <= 71349 || code == 71351 || 71453 <= code && code <= 71455 || 71458 <= code && code <= 71461 || 71463 <= code && code <= 71467 || 72193 <= code && code <= 72198 || 72201 <= code && code <= 72202 || 72243 <= code && code <= 72248 || 72251 <= code && code <= 72254 || code == 72263 || 72273 <= code && code <= 72278 || 72281 <= code && code <= 72283 || 72330 <= code && code <= 72342 || 72344 <= code && code <= 72345 || 72752 <= code && code <= 72758 || 72760 <= code && code <= 72765 || code == 72767 || 72850 <= code && code <= 72871 || 72874 <= code && code <= 72880 || 72882 <= code && code <= 72883 || 72885 <= code && code <= 72886 || 73009 <= code && code <= 73014 || code == 73018 || 73020 <= code && code <= 73021 || 73023 <= code && code <= 73029 || code == 73031 || 92912 <= code && code <= 92916 || 92976 <= code && code <= 92982 || 94095 <= code && code <= 94098 || 113821 <= code && code <= 113822 || code == 119141 || 119143 <= code && code <= 119145 || 119150 <= code && code <= 119154 || 119163 <= code && code <= 119170 || 119173 <= code && code <= 119179 || 119210 <= code && code <= 119213 || 119362 <= code && code <= 119364 || 121344 <= code && code <= 121398 || 121403 <= code && code <= 121452 || code == 121461 || code == 121476 || 121499 <= code && code <= 121503 || 121505 <= code && code <= 121519 || 122880 <= code && code <= 122886 || 122888 <= code && code <= 122904 || 122907 <= code && code <= 122913 || 122915 <= code && code <= 122916 || 122918 <= code && code <= 122922 || 125136 <= code && code <= 125142 || 125252 <= code && code <= 125258 || 917536 <= code && code <= 917631 || 917760 <= code && code <= 917999) { + return Extend; + } + if (127462 <= code && code <= 127487) { + return Regional_Indicator; + } + if (code == 2307 || code == 2363 || 2366 <= code && code <= 2368 || 2377 <= code && code <= 2380 || 2382 <= code && code <= 2383 || 2434 <= code && code <= 2435 || 2495 <= code && code <= 2496 || 2503 <= code && code <= 2504 || 2507 <= code && code <= 2508 || code == 2563 || 2622 <= code && code <= 2624 || code == 2691 || 2750 <= code && code <= 2752 || code == 2761 || 2763 <= code && code <= 2764 || 2818 <= code && code <= 2819 || code == 2880 || 2887 <= code && code <= 2888 || 2891 <= code && code <= 2892 || code == 3007 || 3009 <= code && code <= 3010 || 3014 <= code && code <= 3016 || 3018 <= code && code <= 3020 || 3073 <= code && code <= 3075 || 3137 <= code && code <= 3140 || 3202 <= code && code <= 3203 || code == 3262 || 3264 <= code && code <= 3265 || 3267 <= code && code <= 3268 || 3271 <= code && code <= 3272 || 3274 <= code && code <= 3275 || 3330 <= code && code <= 3331 || 3391 <= code && code <= 3392 || 3398 <= code && code <= 3400 || 3402 <= code && code <= 3404 || 3458 <= code && code <= 3459 || 3536 <= code && code <= 3537 || 3544 <= code && code <= 3550 || 3570 <= code && code <= 3571 || code == 3635 || code == 3763 || 3902 <= code && code <= 3903 || code == 3967 || code == 4145 || 4155 <= code && code <= 4156 || 4182 <= code && code <= 4183 || code == 4228 || code == 6070 || 6078 <= code && code <= 6085 || 6087 <= code && code <= 6088 || 6435 <= code && code <= 6438 || 6441 <= code && code <= 6443 || 6448 <= code && code <= 6449 || 6451 <= code && code <= 6456 || 6681 <= code && code <= 6682 || code == 6741 || code == 6743 || 6765 <= code && code <= 6770 || code == 6916 || code == 6965 || code == 6971 || 6973 <= code && code <= 6977 || 6979 <= code && code <= 6980 || code == 7042 || code == 7073 || 7078 <= code && code <= 7079 || code == 7082 || code == 7143 || 7146 <= code && code <= 7148 || code == 7150 || 7154 <= code && code <= 7155 || 7204 <= code && code <= 7211 || 7220 <= code && code <= 7221 || code == 7393 || 7410 <= code && code <= 7411 || code == 7415 || 43043 <= code && code <= 43044 || code == 43047 || 43136 <= code && code <= 43137 || 43188 <= code && code <= 43203 || 43346 <= code && code <= 43347 || code == 43395 || 43444 <= code && code <= 43445 || 43450 <= code && code <= 43451 || 43453 <= code && code <= 43456 || 43567 <= code && code <= 43568 || 43571 <= code && code <= 43572 || code == 43597 || code == 43755 || 43758 <= code && code <= 43759 || code == 43765 || 44003 <= code && code <= 44004 || 44006 <= code && code <= 44007 || 44009 <= code && code <= 44010 || code == 44012 || code == 69632 || code == 69634 || code == 69762 || 69808 <= code && code <= 69810 || 69815 <= code && code <= 69816 || code == 69932 || code == 70018 || 70067 <= code && code <= 70069 || 70079 <= code && code <= 70080 || 70188 <= code && code <= 70190 || 70194 <= code && code <= 70195 || code == 70197 || 70368 <= code && code <= 70370 || 70402 <= code && code <= 70403 || code == 70463 || 70465 <= code && code <= 70468 || 70471 <= code && code <= 70472 || 70475 <= code && code <= 70477 || 70498 <= code && code <= 70499 || 70709 <= code && code <= 70711 || 70720 <= code && code <= 70721 || code == 70725 || 70833 <= code && code <= 70834 || code == 70841 || 70843 <= code && code <= 70844 || code == 70846 || code == 70849 || 71088 <= code && code <= 71089 || 71096 <= code && code <= 71099 || code == 71102 || 71216 <= code && code <= 71218 || 71227 <= code && code <= 71228 || code == 71230 || code == 71340 || 71342 <= code && code <= 71343 || code == 71350 || 71456 <= code && code <= 71457 || code == 71462 || 72199 <= code && code <= 72200 || code == 72249 || 72279 <= code && code <= 72280 || code == 72343 || code == 72751 || code == 72766 || code == 72873 || code == 72881 || code == 72884 || 94033 <= code && code <= 94078 || code == 119142 || code == 119149) { + return SpacingMark; + } + if (4352 <= code && code <= 4447 || 43360 <= code && code <= 43388) { + return L; + } + if (4448 <= code && code <= 4519 || 55216 <= code && code <= 55238) { + return V; + } + if (4520 <= code && code <= 4607 || 55243 <= code && code <= 55291) { + return T; + } + if (code == 44032 || code == 44060 || code == 44088 || code == 44116 || code == 44144 || code == 44172 || code == 44200 || code == 44228 || code == 44256 || code == 44284 || code == 44312 || code == 44340 || code == 44368 || code == 44396 || code == 44424 || code == 44452 || code == 44480 || code == 44508 || code == 44536 || code == 44564 || code == 44592 || code == 44620 || code == 44648 || code == 44676 || code == 44704 || code == 44732 || code == 44760 || code == 44788 || code == 44816 || code == 44844 || code == 44872 || code == 44900 || code == 44928 || code == 44956 || code == 44984 || code == 45012 || code == 45040 || code == 45068 || code == 45096 || code == 45124 || code == 45152 || code == 45180 || code == 45208 || code == 45236 || code == 45264 || code == 45292 || code == 45320 || code == 45348 || code == 45376 || code == 45404 || code == 45432 || code == 45460 || code == 45488 || code == 45516 || code == 45544 || code == 45572 || code == 45600 || code == 45628 || code == 45656 || code == 45684 || code == 45712 || code == 45740 || code == 45768 || code == 45796 || code == 45824 || code == 45852 || code == 45880 || code == 45908 || code == 45936 || code == 45964 || code == 45992 || code == 46020 || code == 46048 || code == 46076 || code == 46104 || code == 46132 || code == 46160 || code == 46188 || code == 46216 || code == 46244 || code == 46272 || code == 46300 || code == 46328 || code == 46356 || code == 46384 || code == 46412 || code == 46440 || code == 46468 || code == 46496 || code == 46524 || code == 46552 || code == 46580 || code == 46608 || code == 46636 || code == 46664 || code == 46692 || code == 46720 || code == 46748 || code == 46776 || code == 46804 || code == 46832 || code == 46860 || code == 46888 || code == 46916 || code == 46944 || code == 46972 || code == 47e3 || code == 47028 || code == 47056 || code == 47084 || code == 47112 || code == 47140 || code == 47168 || code == 47196 || code == 47224 || code == 47252 || code == 47280 || code == 47308 || code == 47336 || code == 47364 || code == 47392 || code == 47420 || code == 47448 || code == 47476 || code == 47504 || code == 47532 || code == 47560 || code == 47588 || code == 47616 || code == 47644 || code == 47672 || code == 47700 || code == 47728 || code == 47756 || code == 47784 || code == 47812 || code == 47840 || code == 47868 || code == 47896 || code == 47924 || code == 47952 || code == 47980 || code == 48008 || code == 48036 || code == 48064 || code == 48092 || code == 48120 || code == 48148 || code == 48176 || code == 48204 || code == 48232 || code == 48260 || code == 48288 || code == 48316 || code == 48344 || code == 48372 || code == 48400 || code == 48428 || code == 48456 || code == 48484 || code == 48512 || code == 48540 || code == 48568 || code == 48596 || code == 48624 || code == 48652 || code == 48680 || code == 48708 || code == 48736 || code == 48764 || code == 48792 || code == 48820 || code == 48848 || code == 48876 || code == 48904 || code == 48932 || code == 48960 || code == 48988 || code == 49016 || code == 49044 || code == 49072 || code == 49100 || code == 49128 || code == 49156 || code == 49184 || code == 49212 || code == 49240 || code == 49268 || code == 49296 || code == 49324 || code == 49352 || code == 49380 || code == 49408 || code == 49436 || code == 49464 || code == 49492 || code == 49520 || code == 49548 || code == 49576 || code == 49604 || code == 49632 || code == 49660 || code == 49688 || code == 49716 || code == 49744 || code == 49772 || code == 49800 || code == 49828 || code == 49856 || code == 49884 || code == 49912 || code == 49940 || code == 49968 || code == 49996 || code == 50024 || code == 50052 || code == 50080 || code == 50108 || code == 50136 || code == 50164 || code == 50192 || code == 50220 || code == 50248 || code == 50276 || code == 50304 || code == 50332 || code == 50360 || code == 50388 || code == 50416 || code == 50444 || code == 50472 || code == 50500 || code == 50528 || code == 50556 || code == 50584 || code == 50612 || code == 50640 || code == 50668 || code == 50696 || code == 50724 || code == 50752 || code == 50780 || code == 50808 || code == 50836 || code == 50864 || code == 50892 || code == 50920 || code == 50948 || code == 50976 || code == 51004 || code == 51032 || code == 51060 || code == 51088 || code == 51116 || code == 51144 || code == 51172 || code == 51200 || code == 51228 || code == 51256 || code == 51284 || code == 51312 || code == 51340 || code == 51368 || code == 51396 || code == 51424 || code == 51452 || code == 51480 || code == 51508 || code == 51536 || code == 51564 || code == 51592 || code == 51620 || code == 51648 || code == 51676 || code == 51704 || code == 51732 || code == 51760 || code == 51788 || code == 51816 || code == 51844 || code == 51872 || code == 51900 || code == 51928 || code == 51956 || code == 51984 || code == 52012 || code == 52040 || code == 52068 || code == 52096 || code == 52124 || code == 52152 || code == 52180 || code == 52208 || code == 52236 || code == 52264 || code == 52292 || code == 52320 || code == 52348 || code == 52376 || code == 52404 || code == 52432 || code == 52460 || code == 52488 || code == 52516 || code == 52544 || code == 52572 || code == 52600 || code == 52628 || code == 52656 || code == 52684 || code == 52712 || code == 52740 || code == 52768 || code == 52796 || code == 52824 || code == 52852 || code == 52880 || code == 52908 || code == 52936 || code == 52964 || code == 52992 || code == 53020 || code == 53048 || code == 53076 || code == 53104 || code == 53132 || code == 53160 || code == 53188 || code == 53216 || code == 53244 || code == 53272 || code == 53300 || code == 53328 || code == 53356 || code == 53384 || code == 53412 || code == 53440 || code == 53468 || code == 53496 || code == 53524 || code == 53552 || code == 53580 || code == 53608 || code == 53636 || code == 53664 || code == 53692 || code == 53720 || code == 53748 || code == 53776 || code == 53804 || code == 53832 || code == 53860 || code == 53888 || code == 53916 || code == 53944 || code == 53972 || code == 54e3 || code == 54028 || code == 54056 || code == 54084 || code == 54112 || code == 54140 || code == 54168 || code == 54196 || code == 54224 || code == 54252 || code == 54280 || code == 54308 || code == 54336 || code == 54364 || code == 54392 || code == 54420 || code == 54448 || code == 54476 || code == 54504 || code == 54532 || code == 54560 || code == 54588 || code == 54616 || code == 54644 || code == 54672 || code == 54700 || code == 54728 || code == 54756 || code == 54784 || code == 54812 || code == 54840 || code == 54868 || code == 54896 || code == 54924 || code == 54952 || code == 54980 || code == 55008 || code == 55036 || code == 55064 || code == 55092 || code == 55120 || code == 55148 || code == 55176) { + return LV; + } + if (44033 <= code && code <= 44059 || 44061 <= code && code <= 44087 || 44089 <= code && code <= 44115 || 44117 <= code && code <= 44143 || 44145 <= code && code <= 44171 || 44173 <= code && code <= 44199 || 44201 <= code && code <= 44227 || 44229 <= code && code <= 44255 || 44257 <= code && code <= 44283 || 44285 <= code && code <= 44311 || 44313 <= code && code <= 44339 || 44341 <= code && code <= 44367 || 44369 <= code && code <= 44395 || 44397 <= code && code <= 44423 || 44425 <= code && code <= 44451 || 44453 <= code && code <= 44479 || 44481 <= code && code <= 44507 || 44509 <= code && code <= 44535 || 44537 <= code && code <= 44563 || 44565 <= code && code <= 44591 || 44593 <= code && code <= 44619 || 44621 <= code && code <= 44647 || 44649 <= code && code <= 44675 || 44677 <= code && code <= 44703 || 44705 <= code && code <= 44731 || 44733 <= code && code <= 44759 || 44761 <= code && code <= 44787 || 44789 <= code && code <= 44815 || 44817 <= code && code <= 44843 || 44845 <= code && code <= 44871 || 44873 <= code && code <= 44899 || 44901 <= code && code <= 44927 || 44929 <= code && code <= 44955 || 44957 <= code && code <= 44983 || 44985 <= code && code <= 45011 || 45013 <= code && code <= 45039 || 45041 <= code && code <= 45067 || 45069 <= code && code <= 45095 || 45097 <= code && code <= 45123 || 45125 <= code && code <= 45151 || 45153 <= code && code <= 45179 || 45181 <= code && code <= 45207 || 45209 <= code && code <= 45235 || 45237 <= code && code <= 45263 || 45265 <= code && code <= 45291 || 45293 <= code && code <= 45319 || 45321 <= code && code <= 45347 || 45349 <= code && code <= 45375 || 45377 <= code && code <= 45403 || 45405 <= code && code <= 45431 || 45433 <= code && code <= 45459 || 45461 <= code && code <= 45487 || 45489 <= code && code <= 45515 || 45517 <= code && code <= 45543 || 45545 <= code && code <= 45571 || 45573 <= code && code <= 45599 || 45601 <= code && code <= 45627 || 45629 <= code && code <= 45655 || 45657 <= code && code <= 45683 || 45685 <= code && code <= 45711 || 45713 <= code && code <= 45739 || 45741 <= code && code <= 45767 || 45769 <= code && code <= 45795 || 45797 <= code && code <= 45823 || 45825 <= code && code <= 45851 || 45853 <= code && code <= 45879 || 45881 <= code && code <= 45907 || 45909 <= code && code <= 45935 || 45937 <= code && code <= 45963 || 45965 <= code && code <= 45991 || 45993 <= code && code <= 46019 || 46021 <= code && code <= 46047 || 46049 <= code && code <= 46075 || 46077 <= code && code <= 46103 || 46105 <= code && code <= 46131 || 46133 <= code && code <= 46159 || 46161 <= code && code <= 46187 || 46189 <= code && code <= 46215 || 46217 <= code && code <= 46243 || 46245 <= code && code <= 46271 || 46273 <= code && code <= 46299 || 46301 <= code && code <= 46327 || 46329 <= code && code <= 46355 || 46357 <= code && code <= 46383 || 46385 <= code && code <= 46411 || 46413 <= code && code <= 46439 || 46441 <= code && code <= 46467 || 46469 <= code && code <= 46495 || 46497 <= code && code <= 46523 || 46525 <= code && code <= 46551 || 46553 <= code && code <= 46579 || 46581 <= code && code <= 46607 || 46609 <= code && code <= 46635 || 46637 <= code && code <= 46663 || 46665 <= code && code <= 46691 || 46693 <= code && code <= 46719 || 46721 <= code && code <= 46747 || 46749 <= code && code <= 46775 || 46777 <= code && code <= 46803 || 46805 <= code && code <= 46831 || 46833 <= code && code <= 46859 || 46861 <= code && code <= 46887 || 46889 <= code && code <= 46915 || 46917 <= code && code <= 46943 || 46945 <= code && code <= 46971 || 46973 <= code && code <= 46999 || 47001 <= code && code <= 47027 || 47029 <= code && code <= 47055 || 47057 <= code && code <= 47083 || 47085 <= code && code <= 47111 || 47113 <= code && code <= 47139 || 47141 <= code && code <= 47167 || 47169 <= code && code <= 47195 || 47197 <= code && code <= 47223 || 47225 <= code && code <= 47251 || 47253 <= code && code <= 47279 || 47281 <= code && code <= 47307 || 47309 <= code && code <= 47335 || 47337 <= code && code <= 47363 || 47365 <= code && code <= 47391 || 47393 <= code && code <= 47419 || 47421 <= code && code <= 47447 || 47449 <= code && code <= 47475 || 47477 <= code && code <= 47503 || 47505 <= code && code <= 47531 || 47533 <= code && code <= 47559 || 47561 <= code && code <= 47587 || 47589 <= code && code <= 47615 || 47617 <= code && code <= 47643 || 47645 <= code && code <= 47671 || 47673 <= code && code <= 47699 || 47701 <= code && code <= 47727 || 47729 <= code && code <= 47755 || 47757 <= code && code <= 47783 || 47785 <= code && code <= 47811 || 47813 <= code && code <= 47839 || 47841 <= code && code <= 47867 || 47869 <= code && code <= 47895 || 47897 <= code && code <= 47923 || 47925 <= code && code <= 47951 || 47953 <= code && code <= 47979 || 47981 <= code && code <= 48007 || 48009 <= code && code <= 48035 || 48037 <= code && code <= 48063 || 48065 <= code && code <= 48091 || 48093 <= code && code <= 48119 || 48121 <= code && code <= 48147 || 48149 <= code && code <= 48175 || 48177 <= code && code <= 48203 || 48205 <= code && code <= 48231 || 48233 <= code && code <= 48259 || 48261 <= code && code <= 48287 || 48289 <= code && code <= 48315 || 48317 <= code && code <= 48343 || 48345 <= code && code <= 48371 || 48373 <= code && code <= 48399 || 48401 <= code && code <= 48427 || 48429 <= code && code <= 48455 || 48457 <= code && code <= 48483 || 48485 <= code && code <= 48511 || 48513 <= code && code <= 48539 || 48541 <= code && code <= 48567 || 48569 <= code && code <= 48595 || 48597 <= code && code <= 48623 || 48625 <= code && code <= 48651 || 48653 <= code && code <= 48679 || 48681 <= code && code <= 48707 || 48709 <= code && code <= 48735 || 48737 <= code && code <= 48763 || 48765 <= code && code <= 48791 || 48793 <= code && code <= 48819 || 48821 <= code && code <= 48847 || 48849 <= code && code <= 48875 || 48877 <= code && code <= 48903 || 48905 <= code && code <= 48931 || 48933 <= code && code <= 48959 || 48961 <= code && code <= 48987 || 48989 <= code && code <= 49015 || 49017 <= code && code <= 49043 || 49045 <= code && code <= 49071 || 49073 <= code && code <= 49099 || 49101 <= code && code <= 49127 || 49129 <= code && code <= 49155 || 49157 <= code && code <= 49183 || 49185 <= code && code <= 49211 || 49213 <= code && code <= 49239 || 49241 <= code && code <= 49267 || 49269 <= code && code <= 49295 || 49297 <= code && code <= 49323 || 49325 <= code && code <= 49351 || 49353 <= code && code <= 49379 || 49381 <= code && code <= 49407 || 49409 <= code && code <= 49435 || 49437 <= code && code <= 49463 || 49465 <= code && code <= 49491 || 49493 <= code && code <= 49519 || 49521 <= code && code <= 49547 || 49549 <= code && code <= 49575 || 49577 <= code && code <= 49603 || 49605 <= code && code <= 49631 || 49633 <= code && code <= 49659 || 49661 <= code && code <= 49687 || 49689 <= code && code <= 49715 || 49717 <= code && code <= 49743 || 49745 <= code && code <= 49771 || 49773 <= code && code <= 49799 || 49801 <= code && code <= 49827 || 49829 <= code && code <= 49855 || 49857 <= code && code <= 49883 || 49885 <= code && code <= 49911 || 49913 <= code && code <= 49939 || 49941 <= code && code <= 49967 || 49969 <= code && code <= 49995 || 49997 <= code && code <= 50023 || 50025 <= code && code <= 50051 || 50053 <= code && code <= 50079 || 50081 <= code && code <= 50107 || 50109 <= code && code <= 50135 || 50137 <= code && code <= 50163 || 50165 <= code && code <= 50191 || 50193 <= code && code <= 50219 || 50221 <= code && code <= 50247 || 50249 <= code && code <= 50275 || 50277 <= code && code <= 50303 || 50305 <= code && code <= 50331 || 50333 <= code && code <= 50359 || 50361 <= code && code <= 50387 || 50389 <= code && code <= 50415 || 50417 <= code && code <= 50443 || 50445 <= code && code <= 50471 || 50473 <= code && code <= 50499 || 50501 <= code && code <= 50527 || 50529 <= code && code <= 50555 || 50557 <= code && code <= 50583 || 50585 <= code && code <= 50611 || 50613 <= code && code <= 50639 || 50641 <= code && code <= 50667 || 50669 <= code && code <= 50695 || 50697 <= code && code <= 50723 || 50725 <= code && code <= 50751 || 50753 <= code && code <= 50779 || 50781 <= code && code <= 50807 || 50809 <= code && code <= 50835 || 50837 <= code && code <= 50863 || 50865 <= code && code <= 50891 || 50893 <= code && code <= 50919 || 50921 <= code && code <= 50947 || 50949 <= code && code <= 50975 || 50977 <= code && code <= 51003 || 51005 <= code && code <= 51031 || 51033 <= code && code <= 51059 || 51061 <= code && code <= 51087 || 51089 <= code && code <= 51115 || 51117 <= code && code <= 51143 || 51145 <= code && code <= 51171 || 51173 <= code && code <= 51199 || 51201 <= code && code <= 51227 || 51229 <= code && code <= 51255 || 51257 <= code && code <= 51283 || 51285 <= code && code <= 51311 || 51313 <= code && code <= 51339 || 51341 <= code && code <= 51367 || 51369 <= code && code <= 51395 || 51397 <= code && code <= 51423 || 51425 <= code && code <= 51451 || 51453 <= code && code <= 51479 || 51481 <= code && code <= 51507 || 51509 <= code && code <= 51535 || 51537 <= code && code <= 51563 || 51565 <= code && code <= 51591 || 51593 <= code && code <= 51619 || 51621 <= code && code <= 51647 || 51649 <= code && code <= 51675 || 51677 <= code && code <= 51703 || 51705 <= code && code <= 51731 || 51733 <= code && code <= 51759 || 51761 <= code && code <= 51787 || 51789 <= code && code <= 51815 || 51817 <= code && code <= 51843 || 51845 <= code && code <= 51871 || 51873 <= code && code <= 51899 || 51901 <= code && code <= 51927 || 51929 <= code && code <= 51955 || 51957 <= code && code <= 51983 || 51985 <= code && code <= 52011 || 52013 <= code && code <= 52039 || 52041 <= code && code <= 52067 || 52069 <= code && code <= 52095 || 52097 <= code && code <= 52123 || 52125 <= code && code <= 52151 || 52153 <= code && code <= 52179 || 52181 <= code && code <= 52207 || 52209 <= code && code <= 52235 || 52237 <= code && code <= 52263 || 52265 <= code && code <= 52291 || 52293 <= code && code <= 52319 || 52321 <= code && code <= 52347 || 52349 <= code && code <= 52375 || 52377 <= code && code <= 52403 || 52405 <= code && code <= 52431 || 52433 <= code && code <= 52459 || 52461 <= code && code <= 52487 || 52489 <= code && code <= 52515 || 52517 <= code && code <= 52543 || 52545 <= code && code <= 52571 || 52573 <= code && code <= 52599 || 52601 <= code && code <= 52627 || 52629 <= code && code <= 52655 || 52657 <= code && code <= 52683 || 52685 <= code && code <= 52711 || 52713 <= code && code <= 52739 || 52741 <= code && code <= 52767 || 52769 <= code && code <= 52795 || 52797 <= code && code <= 52823 || 52825 <= code && code <= 52851 || 52853 <= code && code <= 52879 || 52881 <= code && code <= 52907 || 52909 <= code && code <= 52935 || 52937 <= code && code <= 52963 || 52965 <= code && code <= 52991 || 52993 <= code && code <= 53019 || 53021 <= code && code <= 53047 || 53049 <= code && code <= 53075 || 53077 <= code && code <= 53103 || 53105 <= code && code <= 53131 || 53133 <= code && code <= 53159 || 53161 <= code && code <= 53187 || 53189 <= code && code <= 53215 || 53217 <= code && code <= 53243 || 53245 <= code && code <= 53271 || 53273 <= code && code <= 53299 || 53301 <= code && code <= 53327 || 53329 <= code && code <= 53355 || 53357 <= code && code <= 53383 || 53385 <= code && code <= 53411 || 53413 <= code && code <= 53439 || 53441 <= code && code <= 53467 || 53469 <= code && code <= 53495 || 53497 <= code && code <= 53523 || 53525 <= code && code <= 53551 || 53553 <= code && code <= 53579 || 53581 <= code && code <= 53607 || 53609 <= code && code <= 53635 || 53637 <= code && code <= 53663 || 53665 <= code && code <= 53691 || 53693 <= code && code <= 53719 || 53721 <= code && code <= 53747 || 53749 <= code && code <= 53775 || 53777 <= code && code <= 53803 || 53805 <= code && code <= 53831 || 53833 <= code && code <= 53859 || 53861 <= code && code <= 53887 || 53889 <= code && code <= 53915 || 53917 <= code && code <= 53943 || 53945 <= code && code <= 53971 || 53973 <= code && code <= 53999 || 54001 <= code && code <= 54027 || 54029 <= code && code <= 54055 || 54057 <= code && code <= 54083 || 54085 <= code && code <= 54111 || 54113 <= code && code <= 54139 || 54141 <= code && code <= 54167 || 54169 <= code && code <= 54195 || 54197 <= code && code <= 54223 || 54225 <= code && code <= 54251 || 54253 <= code && code <= 54279 || 54281 <= code && code <= 54307 || 54309 <= code && code <= 54335 || 54337 <= code && code <= 54363 || 54365 <= code && code <= 54391 || 54393 <= code && code <= 54419 || 54421 <= code && code <= 54447 || 54449 <= code && code <= 54475 || 54477 <= code && code <= 54503 || 54505 <= code && code <= 54531 || 54533 <= code && code <= 54559 || 54561 <= code && code <= 54587 || 54589 <= code && code <= 54615 || 54617 <= code && code <= 54643 || 54645 <= code && code <= 54671 || 54673 <= code && code <= 54699 || 54701 <= code && code <= 54727 || 54729 <= code && code <= 54755 || 54757 <= code && code <= 54783 || 54785 <= code && code <= 54811 || 54813 <= code && code <= 54839 || 54841 <= code && code <= 54867 || 54869 <= code && code <= 54895 || 54897 <= code && code <= 54923 || 54925 <= code && code <= 54951 || 54953 <= code && code <= 54979 || 54981 <= code && code <= 55007 || 55009 <= code && code <= 55035 || 55037 <= code && code <= 55063 || 55065 <= code && code <= 55091 || 55093 <= code && code <= 55119 || 55121 <= code && code <= 55147 || 55149 <= code && code <= 55175 || 55177 <= code && code <= 55203) { + return LVT; + } + if (code == 9757 || code == 9977 || 9994 <= code && code <= 9997 || code == 127877 || 127938 <= code && code <= 127940 || code == 127943 || 127946 <= code && code <= 127948 || 128066 <= code && code <= 128067 || 128070 <= code && code <= 128080 || code == 128110 || 128112 <= code && code <= 128120 || code == 128124 || 128129 <= code && code <= 128131 || 128133 <= code && code <= 128135 || code == 128170 || 128372 <= code && code <= 128373 || code == 128378 || code == 128400 || 128405 <= code && code <= 128406 || 128581 <= code && code <= 128583 || 128587 <= code && code <= 128591 || code == 128675 || 128692 <= code && code <= 128694 || code == 128704 || code == 128716 || 129304 <= code && code <= 129308 || 129310 <= code && code <= 129311 || code == 129318 || 129328 <= code && code <= 129337 || 129341 <= code && code <= 129342 || 129489 <= code && code <= 129501) { + return E_Base; + } + if (127995 <= code && code <= 127999) { + return E_Modifier; + } + if (code == 8205) { + return ZWJ; + } + if (code == 9792 || code == 9794 || 9877 <= code && code <= 9878 || code == 9992 || code == 10084 || code == 127752 || code == 127806 || code == 127859 || code == 127891 || code == 127908 || code == 127912 || code == 127979 || code == 127981 || code == 128139 || 128187 <= code && code <= 128188 || code == 128295 || code == 128300 || code == 128488 || code == 128640 || code == 128658) { + return Glue_After_Zwj; + } + if (128102 <= code && code <= 128105) { + return E_Base_GAZ; + } + return Other; + } + return this; + } + if (typeof module2 != "undefined" && module2.exports) { + module2.exports = GraphemeSplitter; + } + } +}); + +// ../../node_modules/.pnpm/@arcanis+slice-ansi@1.0.2/node_modules/@arcanis/slice-ansi/index.js +var require_slice_ansi2 = __commonJS({ + "../../node_modules/.pnpm/@arcanis+slice-ansi@1.0.2/node_modules/@arcanis/slice-ansi/index.js"(exports2, module2) { + var GraphemeSplitter = require_grapheme_splitter(); + var ANSI_SEQUENCE = /^(.*?)(\x1b\[[^m]+m|\x1b\]8;;.*?(\x1b\\|\u0007))/; + var splitter = new GraphemeSplitter(); + module2.exports = (orig, at = 0, until = orig.length) => { + if (at < 0 || until < 0) + throw new RangeError(`Negative indices aren't supported by this implementation`); + const length = until - at; + let output = ``; + let skipped = 0; + let visible = 0; + while (orig.length > 0) { + const lookup = orig.match(ANSI_SEQUENCE) || [orig, orig, void 0]; + let graphemes = splitter.splitGraphemes(lookup[1]); + const skipping = Math.min(at - skipped, graphemes.length); + graphemes = graphemes.slice(skipping); + const displaying = Math.min(length - visible, graphemes.length); + output += graphemes.slice(0, displaying).join(``); + skipped += skipping; + visible += displaying; + if (typeof lookup[2] !== `undefined`) + output += lookup[2]; + orig = orig.slice(lookup[0].length); + } + return output; + }; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/wrapString.js +var require_wrapString2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/wrapString.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _sliceAnsi = _interopRequireDefault(require_slice_ansi2()); + var _stringWidth = _interopRequireDefault(require_string_width()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var wrapString = (subject, size) => { + let subjectSlice; + subjectSlice = subject; + const chunks = []; + do { + chunks.push((0, _sliceAnsi.default)(subjectSlice, 0, size)); + subjectSlice = (0, _sliceAnsi.default)(subjectSlice, size).trim(); + } while ((0, _stringWidth.default)(subjectSlice)); + return chunks; + }; + var _default = wrapString; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/wrapWord.js +var require_wrapWord2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/wrapWord.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _sliceAnsi = _interopRequireDefault(require_slice_ansi2()); + var _stringWidth = _interopRequireDefault(require_string_width()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var wrapWord = (input, size) => { + let subject; + subject = input; + const chunks = []; + const re = new RegExp("(^.{1," + size + "}(\\s+|$))|(^.{1," + (size - 1) + "}(\\\\|/|_|\\.|,|;|-))"); + do { + let chunk; + chunk = subject.match(re); + if (chunk) { + chunk = chunk[0]; + subject = (0, _sliceAnsi.default)(subject, (0, _stringWidth.default)(chunk)); + chunk = chunk.trim(); + } else { + chunk = (0, _sliceAnsi.default)(subject, 0, size); + subject = (0, _sliceAnsi.default)(subject, size); + } + chunks.push(chunk); + } while ((0, _stringWidth.default)(subject)); + return chunks; + }; + var _default = wrapWord; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/wrapCell.js +var require_wrapCell2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/wrapCell.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _wrapString = _interopRequireDefault(require_wrapString2()); + var _wrapWord = _interopRequireDefault(require_wrapWord2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var wrapCell = (cellValue, columnWidth, useWrapWord) => { + const cellLines = cellValue.split("\n"); + for (let lineNr = 0; lineNr < cellLines.length; ) { + let lineChunks; + if (useWrapWord) { + lineChunks = (0, _wrapWord.default)(cellLines[lineNr], columnWidth); + } else { + lineChunks = (0, _wrapString.default)(cellLines[lineNr], columnWidth); + } + cellLines.splice(lineNr, 1, ...lineChunks); + lineNr += lineChunks.length; + } + return cellLines; + }; + var _default = wrapCell; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/calculateCellHeight.js +var require_calculateCellHeight2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/calculateCellHeight.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _isString2 = _interopRequireDefault(require_isString2()); + var _wrapCell = _interopRequireDefault(require_wrapCell2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var calculateCellHeight = (value, columnWidth, useWrapWord = false) => { + if (!(0, _isString2.default)(value)) { + throw new TypeError("Value must be a string."); + } + if (!Number.isInteger(columnWidth)) { + throw new TypeError("Column width must be an integer."); + } + if (columnWidth < 1) { + throw new Error("Column width must be greater than 0."); + } + return (0, _wrapCell.default)(value, columnWidth, useWrapWord).length; + }; + var _default = calculateCellHeight; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/calculateRowHeightIndex.js +var require_calculateRowHeightIndex2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/calculateRowHeightIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _max2 = _interopRequireDefault(require_max3()); + var _isBoolean2 = _interopRequireDefault(require_isBoolean()); + var _isNumber2 = _interopRequireDefault(require_isNumber()); + var _calculateCellHeight = _interopRequireDefault(require_calculateCellHeight2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var calculateRowHeightIndex = (rows, config) => { + const tableWidth = rows[0].length; + const rowSpanIndex = []; + rows.forEach((cells) => { + const cellHeightIndex = new Array(tableWidth).fill(1); + cells.forEach((value, index1) => { + if (!(0, _isNumber2.default)(config.columns[index1].width)) { + throw new TypeError("column[index].width must be a number."); + } + if (!(0, _isBoolean2.default)(config.columns[index1].wrapWord)) { + throw new TypeError("column[index].wrapWord must be a boolean."); + } + cellHeightIndex[index1] = (0, _calculateCellHeight.default)(value, config.columns[index1].width, config.columns[index1].wrapWord); + }); + rowSpanIndex.push((0, _max2.default)(cellHeightIndex)); + }); + return rowSpanIndex; + }; + var _default = calculateRowHeightIndex; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/drawBorder.js +var require_drawBorder2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/drawBorder.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.drawBorderTop = exports2.drawBorderJoin = exports2.drawBorderBottom = exports2.drawBorder = void 0; + var drawBorder = (columnSizeIndex, parts) => { + const columns = columnSizeIndex.map((size) => { + return parts.body.repeat(size); + }).join(parts.join); + return parts.left + columns + parts.right + "\n"; + }; + exports2.drawBorder = drawBorder; + var drawBorderTop = (columnSizeIndex, parts) => { + const border = drawBorder(columnSizeIndex, { + body: parts.topBody, + join: parts.topJoin, + left: parts.topLeft, + right: parts.topRight + }); + if (border === "\n") { + return ""; + } + return border; + }; + exports2.drawBorderTop = drawBorderTop; + var drawBorderJoin = (columnSizeIndex, parts) => { + return drawBorder(columnSizeIndex, { + body: parts.joinBody, + join: parts.joinJoin, + left: parts.joinLeft, + right: parts.joinRight + }); + }; + exports2.drawBorderJoin = drawBorderJoin; + var drawBorderBottom = (columnSizeIndex, parts) => { + return drawBorder(columnSizeIndex, { + body: parts.bottomBody, + join: parts.bottomJoin, + left: parts.bottomLeft, + right: parts.bottomRight + }); + }; + exports2.drawBorderBottom = drawBorderBottom; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/drawRow.js +var require_drawRow2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/drawRow.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var drawRow = (columns, border) => { + return border.bodyLeft + columns.join(border.bodyJoin) + border.bodyRight + "\n"; + }; + var _default = drawRow; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/getBorderCharacters.js +var require_getBorderCharacters2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/getBorderCharacters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var getBorderCharacters = (name) => { + if (name === "honeywell") { + return { + topBody: "\u2550", + topJoin: "\u2564", + topLeft: "\u2554", + topRight: "\u2557", + bottomBody: "\u2550", + bottomJoin: "\u2567", + bottomLeft: "\u255A", + bottomRight: "\u255D", + bodyLeft: "\u2551", + bodyRight: "\u2551", + bodyJoin: "\u2502", + joinBody: "\u2500", + joinLeft: "\u255F", + joinRight: "\u2562", + joinJoin: "\u253C" + }; + } + if (name === "norc") { + return { + topBody: "\u2500", + topJoin: "\u252C", + topLeft: "\u250C", + topRight: "\u2510", + bottomBody: "\u2500", + bottomJoin: "\u2534", + bottomLeft: "\u2514", + bottomRight: "\u2518", + bodyLeft: "\u2502", + bodyRight: "\u2502", + bodyJoin: "\u2502", + joinBody: "\u2500", + joinLeft: "\u251C", + joinRight: "\u2524", + joinJoin: "\u253C" + }; + } + if (name === "ramac") { + return { + topBody: "-", + topJoin: "+", + topLeft: "+", + topRight: "+", + bottomBody: "-", + bottomJoin: "+", + bottomLeft: "+", + bottomRight: "+", + bodyLeft: "|", + bodyRight: "|", + bodyJoin: "|", + joinBody: "-", + joinLeft: "|", + joinRight: "|", + joinJoin: "|" + }; + } + if (name === "void") { + return { + topBody: "", + topJoin: "", + topLeft: "", + topRight: "", + bottomBody: "", + bottomJoin: "", + bottomLeft: "", + bottomRight: "", + bodyLeft: "", + bodyRight: "", + bodyJoin: "", + joinBody: "", + joinLeft: "", + joinRight: "", + joinJoin: "" + }; + } + throw new Error('Unknown border template "' + name + '".'); + }; + var _default = getBorderCharacters; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/validateConfig.js +var require_validateConfig2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/validateConfig.js"(exports2, module2) { + "use strict"; + var equal = require_equal(); + var validate = function() { + var pattern0 = new RegExp("^[0-9]+$"); + var refVal = []; + var refVal1 = function() { + var pattern02 = new RegExp("^[0-9]+$"); + return function validate2(data, dataPath, parentData, parentDataProperty, rootData) { + "use strict"; + var vErrors = null; + var errors = 0; + if (rootData === void 0) + rootData = data; + if (data && typeof data === "object" && !Array.isArray(data)) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !validate2.schema.properties.hasOwnProperty(key0); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: "additionalProperties", + dataPath: (dataPath || "") + "", + schemaPath: "#/additionalProperties", + params: { + additionalProperty: "" + key0 + "" + }, + message: "should NOT have additional properties" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + } + if (data.topBody !== void 0) { + var errs_1 = errors; + if (!refVal2(data.topBody, (dataPath || "") + ".topBody", data, "topBody", rootData)) { + if (vErrors === null) + vErrors = refVal2.errors; + else + vErrors = vErrors.concat(refVal2.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topJoin !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.topJoin, (dataPath || "") + ".topJoin", data, "topJoin", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topLeft !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.topLeft, (dataPath || "") + ".topLeft", data, "topLeft", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topRight !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.topRight, (dataPath || "") + ".topRight", data, "topRight", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomBody !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bottomBody, (dataPath || "") + ".bottomBody", data, "bottomBody", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomJoin !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bottomJoin, (dataPath || "") + ".bottomJoin", data, "bottomJoin", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomLeft !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bottomLeft, (dataPath || "") + ".bottomLeft", data, "bottomLeft", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomRight !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bottomRight, (dataPath || "") + ".bottomRight", data, "bottomRight", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyLeft !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bodyLeft, (dataPath || "") + ".bodyLeft", data, "bodyLeft", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyRight !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bodyRight, (dataPath || "") + ".bodyRight", data, "bodyRight", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyJoin !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.bodyJoin, (dataPath || "") + ".bodyJoin", data, "bodyJoin", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinBody !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.joinBody, (dataPath || "") + ".joinBody", data, "joinBody", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinLeft !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.joinLeft, (dataPath || "") + ".joinLeft", data, "joinLeft", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinRight !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.joinRight, (dataPath || "") + ".joinRight", data, "joinRight", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinJoin !== void 0) { + var errs_1 = errors; + if (!refVal[2](data.joinJoin, (dataPath || "") + ".joinJoin", data, "joinJoin", rootData)) { + if (vErrors === null) + vErrors = refVal[2].errors; + else + vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: "type", + dataPath: (dataPath || "") + "", + schemaPath: "#/type", + params: { + type: "object" + }, + message: "should be object" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + validate2.errors = vErrors; + return errors === 0; + }; + }(); + refVal1.schema = { + "type": "object", + "properties": { + "topBody": { + "$ref": "#/definitions/border" + }, + "topJoin": { + "$ref": "#/definitions/border" + }, + "topLeft": { + "$ref": "#/definitions/border" + }, + "topRight": { + "$ref": "#/definitions/border" + }, + "bottomBody": { + "$ref": "#/definitions/border" + }, + "bottomJoin": { + "$ref": "#/definitions/border" + }, + "bottomLeft": { + "$ref": "#/definitions/border" + }, + "bottomRight": { + "$ref": "#/definitions/border" + }, + "bodyLeft": { + "$ref": "#/definitions/border" + }, + "bodyRight": { + "$ref": "#/definitions/border" + }, + "bodyJoin": { + "$ref": "#/definitions/border" + }, + "joinBody": { + "$ref": "#/definitions/border" + }, + "joinLeft": { + "$ref": "#/definitions/border" + }, + "joinRight": { + "$ref": "#/definitions/border" + }, + "joinJoin": { + "$ref": "#/definitions/border" + } + }, + "additionalProperties": false + }; + refVal1.errors = null; + refVal[1] = refVal1; + var refVal2 = function() { + var pattern02 = new RegExp("^[0-9]+$"); + return function validate2(data, dataPath, parentData, parentDataProperty, rootData) { + "use strict"; + var vErrors = null; + var errors = 0; + if (rootData === void 0) + rootData = data; + if (typeof data !== "string") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + "", + schemaPath: "#/type", + params: { + type: "string" + }, + message: "should be string" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + validate2.errors = vErrors; + return errors === 0; + }; + }(); + refVal2.schema = { + "type": "string" + }; + refVal2.errors = null; + refVal[2] = refVal2; + var refVal3 = function() { + var pattern02 = new RegExp("^[0-9]+$"); + return function validate2(data, dataPath, parentData, parentDataProperty, rootData) { + "use strict"; + var vErrors = null; + var errors = 0; + if (rootData === void 0) + rootData = data; + if (data && typeof data === "object" && !Array.isArray(data)) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !pattern02.test(key0); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: "additionalProperties", + dataPath: (dataPath || "") + "", + schemaPath: "#/additionalProperties", + params: { + additionalProperty: "" + key0 + "" + }, + message: "should NOT have additional properties" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + } + for (var key0 in data) { + if (pattern02.test(key0)) { + var errs_1 = errors; + if (!refVal4(data[key0], (dataPath || "") + "['" + key0 + "']", data, key0, rootData)) { + if (vErrors === null) + vErrors = refVal4.errors; + else + vErrors = vErrors.concat(refVal4.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + } + } else { + var err = { + keyword: "type", + dataPath: (dataPath || "") + "", + schemaPath: "#/type", + params: { + type: "object" + }, + message: "should be object" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + validate2.errors = vErrors; + return errors === 0; + }; + }(); + refVal3.schema = { + "type": "object", + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/column" + } + }, + "additionalProperties": false + }; + refVal3.errors = null; + refVal[3] = refVal3; + var refVal4 = function() { + var pattern02 = new RegExp("^[0-9]+$"); + return function validate2(data, dataPath, parentData, parentDataProperty, rootData) { + "use strict"; + var vErrors = null; + var errors = 0; + if (rootData === void 0) + rootData = data; + if (data && typeof data === "object" && !Array.isArray(data)) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(key0 == "alignment" || key0 == "width" || key0 == "wrapWord" || key0 == "truncate" || key0 == "paddingLeft" || key0 == "paddingRight"); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: "additionalProperties", + dataPath: (dataPath || "") + "", + schemaPath: "#/additionalProperties", + params: { + additionalProperty: "" + key0 + "" + }, + message: "should NOT have additional properties" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + } + var data1 = data.alignment; + if (data1 !== void 0) { + var errs_1 = errors; + if (typeof data1 !== "string") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".alignment", + schemaPath: "#/properties/alignment/type", + params: { + type: "string" + }, + message: "should be string" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var schema1 = validate2.schema.properties.alignment.enum; + var valid1; + valid1 = false; + for (var i1 = 0; i1 < schema1.length; i1++) + if (equal(data1, schema1[i1])) { + valid1 = true; + break; + } + if (!valid1) { + var err = { + keyword: "enum", + dataPath: (dataPath || "") + ".alignment", + schemaPath: "#/properties/alignment/enum", + params: { + allowedValues: schema1 + }, + message: "should be equal to one of the allowed values" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.width !== void 0) { + var errs_1 = errors; + if (typeof data.width !== "number") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".width", + schemaPath: "#/properties/width/type", + params: { + type: "number" + }, + message: "should be number" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.wrapWord !== void 0) { + var errs_1 = errors; + if (typeof data.wrapWord !== "boolean") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".wrapWord", + schemaPath: "#/properties/wrapWord/type", + params: { + type: "boolean" + }, + message: "should be boolean" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.truncate !== void 0) { + var errs_1 = errors; + if (typeof data.truncate !== "number") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".truncate", + schemaPath: "#/properties/truncate/type", + params: { + type: "number" + }, + message: "should be number" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.paddingLeft !== void 0) { + var errs_1 = errors; + if (typeof data.paddingLeft !== "number") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".paddingLeft", + schemaPath: "#/properties/paddingLeft/type", + params: { + type: "number" + }, + message: "should be number" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.paddingRight !== void 0) { + var errs_1 = errors; + if (typeof data.paddingRight !== "number") { + var err = { + keyword: "type", + dataPath: (dataPath || "") + ".paddingRight", + schemaPath: "#/properties/paddingRight/type", + params: { + type: "number" + }, + message: "should be number" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: "type", + dataPath: (dataPath || "") + "", + schemaPath: "#/type", + params: { + type: "object" + }, + message: "should be object" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + validate2.errors = vErrors; + return errors === 0; + }; + }(); + refVal4.schema = { + "type": "object", + "properties": { + "alignment": { + "type": "string", + "enum": ["left", "right", "center"] + }, + "width": { + "type": "number" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "number" + }, + "paddingLeft": { + "type": "number" + }, + "paddingRight": { + "type": "number" + } + }, + "additionalProperties": false + }; + refVal4.errors = null; + refVal[4] = refVal4; + return function validate2(data, dataPath, parentData, parentDataProperty, rootData) { + "use strict"; + var vErrors = null; + var errors = 0; + if (rootData === void 0) + rootData = data; + if (data && typeof data === "object" && !Array.isArray(data)) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(key0 == "border" || key0 == "columns" || key0 == "columnDefault" || key0 == "drawHorizontalLine"); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: "additionalProperties", + dataPath: (dataPath || "") + "", + schemaPath: "#/additionalProperties", + params: { + additionalProperty: "" + key0 + "" + }, + message: "should NOT have additional properties" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + } + if (data.border !== void 0) { + var errs_1 = errors; + if (!refVal1(data.border, (dataPath || "") + ".border", data, "border", rootData)) { + if (vErrors === null) + vErrors = refVal1.errors; + else + vErrors = vErrors.concat(refVal1.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.columns !== void 0) { + var errs_1 = errors; + if (!refVal3(data.columns, (dataPath || "") + ".columns", data, "columns", rootData)) { + if (vErrors === null) + vErrors = refVal3.errors; + else + vErrors = vErrors.concat(refVal3.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.columnDefault !== void 0) { + var errs_1 = errors; + if (!refVal[4](data.columnDefault, (dataPath || "") + ".columnDefault", data, "columnDefault", rootData)) { + if (vErrors === null) + vErrors = refVal[4].errors; + else + vErrors = vErrors.concat(refVal[4].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.drawHorizontalLine !== void 0) { + var errs_1 = errors; + var errs__1 = errors; + var valid1; + valid1 = typeof data.drawHorizontalLine == "function"; + if (!valid1) { + if (errs__1 == errors) { + var err = { + keyword: "typeof", + dataPath: (dataPath || "") + ".drawHorizontalLine", + schemaPath: "#/properties/drawHorizontalLine/typeof", + params: { + keyword: "typeof" + }, + message: 'should pass "typeof" keyword validation' + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } else { + for (var i1 = errs__1; i1 < errors; i1++) { + var ruleErr1 = vErrors[i1]; + if (ruleErr1.dataPath === void 0) + ruleErr1.dataPath = (dataPath || "") + ".drawHorizontalLine"; + if (ruleErr1.schemaPath === void 0) { + ruleErr1.schemaPath = "#/properties/drawHorizontalLine/typeof"; + } + } + } + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: "type", + dataPath: (dataPath || "") + "", + schemaPath: "#/type", + params: { + type: "object" + }, + message: "should be object" + }; + if (vErrors === null) + vErrors = [err]; + else + vErrors.push(err); + errors++; + } + validate2.errors = vErrors; + return errors === 0; + }; + }(); + validate.schema = { + "$id": "config.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "border": { + "$ref": "#/definitions/borders" + }, + "columns": { + "$ref": "#/definitions/columns" + }, + "columnDefault": { + "$ref": "#/definitions/column" + }, + "drawHorizontalLine": { + "typeof": "function" + } + }, + "additionalProperties": false, + "definitions": { + "columns": { + "type": "object", + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/column" + } + }, + "additionalProperties": false + }, + "column": { + "type": "object", + "properties": { + "alignment": { + "type": "string", + "enum": ["left", "right", "center"] + }, + "width": { + "type": "number" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "number" + }, + "paddingLeft": { + "type": "number" + }, + "paddingRight": { + "type": "number" + } + }, + "additionalProperties": false + }, + "borders": { + "type": "object", + "properties": { + "topBody": { + "$ref": "#/definitions/border" + }, + "topJoin": { + "$ref": "#/definitions/border" + }, + "topLeft": { + "$ref": "#/definitions/border" + }, + "topRight": { + "$ref": "#/definitions/border" + }, + "bottomBody": { + "$ref": "#/definitions/border" + }, + "bottomJoin": { + "$ref": "#/definitions/border" + }, + "bottomLeft": { + "$ref": "#/definitions/border" + }, + "bottomRight": { + "$ref": "#/definitions/border" + }, + "bodyLeft": { + "$ref": "#/definitions/border" + }, + "bodyRight": { + "$ref": "#/definitions/border" + }, + "bodyJoin": { + "$ref": "#/definitions/border" + }, + "joinBody": { + "$ref": "#/definitions/border" + }, + "joinLeft": { + "$ref": "#/definitions/border" + }, + "joinRight": { + "$ref": "#/definitions/border" + }, + "joinJoin": { + "$ref": "#/definitions/border" + } + }, + "additionalProperties": false + }, + "border": { + "type": "string" + } + } + }; + validate.errors = null; + module2.exports = validate; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/makeStreamConfig.js +var require_makeStreamConfig2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/makeStreamConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _cloneDeep2 = _interopRequireDefault(require_cloneDeep()); + var _isUndefined2 = _interopRequireDefault(require_isUndefined()); + var _times2 = _interopRequireDefault(require_times2()); + var _getBorderCharacters = _interopRequireDefault(require_getBorderCharacters2()); + var _validateConfig = _interopRequireDefault(require_validateConfig2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var makeBorder = (border = {}) => { + return Object.assign({}, (0, _getBorderCharacters.default)("honeywell"), border); + }; + var makeColumns = (columnCount, columns = {}, columnDefault = {}) => { + (0, _times2.default)(columnCount, (index) => { + if ((0, _isUndefined2.default)(columns[index])) { + columns[index] = {}; + } + columns[index] = Object.assign({ + alignment: "left", + paddingLeft: 1, + paddingRight: 1, + truncate: Infinity, + wrapWord: false + }, columnDefault, columns[index]); + }); + return columns; + }; + var makeStreamConfig = (userConfig = {}) => { + (0, _validateConfig.default)("streamConfig.json", userConfig); + const config = (0, _cloneDeep2.default)(userConfig); + if (!config.columnDefault || !config.columnDefault.width) { + throw new Error("Must provide config.columnDefault.width when creating a stream."); + } + if (!config.columnCount) { + throw new Error("Must provide config.columnCount."); + } + config.border = makeBorder(config.border); + config.columns = makeColumns(config.columnCount, config.columns, config.columnDefault); + return config; + }; + var _default = makeStreamConfig; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/mapDataUsingRowHeightIndex.js +var require_mapDataUsingRowHeightIndex2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/mapDataUsingRowHeightIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _flatten2 = _interopRequireDefault(require_flatten()); + var _times2 = _interopRequireDefault(require_times2()); + var _wrapCell = _interopRequireDefault(require_wrapCell2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var mapDataUsingRowHeightIndex = (unmappedRows, rowHeightIndex, config) => { + const tableWidth = unmappedRows[0].length; + const mappedRows = unmappedRows.map((cells, index0) => { + const rowHeight = (0, _times2.default)(rowHeightIndex[index0], () => { + return new Array(tableWidth).fill(""); + }); + cells.forEach((value, index1) => { + const cellLines = (0, _wrapCell.default)(value, config.columns[index1].width, config.columns[index1].wrapWord); + cellLines.forEach((cellLine, index2) => { + rowHeight[index2][index1] = cellLine; + }); + }); + return rowHeight; + }); + return (0, _flatten2.default)(mappedRows); + }; + var _default = mapDataUsingRowHeightIndex; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/padTableData.js +var require_padTableData2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/padTableData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var padTableData = (rows, config) => { + return rows.map((cells) => { + return cells.map((value, index1) => { + const column = config.columns[index1]; + return " ".repeat(column.paddingLeft) + value + " ".repeat(column.paddingRight); + }); + }); + }; + var _default = padTableData; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/stringifyTableData.js +var require_stringifyTableData2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/stringifyTableData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var stringifyTableData = (rows) => { + return rows.map((cells) => { + return cells.map(String); + }); + }; + var _default = stringifyTableData; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/truncateTableData.js +var require_truncateTableData2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/truncateTableData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _truncate2 = _interopRequireDefault(require_truncate()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var truncateTableData = (rows, config) => { + return rows.map((cells) => { + return cells.map((content, index) => { + return (0, _truncate2.default)(content, { + length: config.columns[index].truncate + }); + }); + }); + }; + var _default = truncateTableData; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/createStream.js +var require_createStream2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/createStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _mapValues2 = _interopRequireDefault(require_mapValues()); + var _values2 = _interopRequireDefault(require_values()); + var _trimEnd2 = _interopRequireDefault(require_trimEnd()); + var _alignTableData = _interopRequireDefault(require_alignTableData2()); + var _calculateRowHeightIndex = _interopRequireDefault(require_calculateRowHeightIndex2()); + var _drawBorder = require_drawBorder2(); + var _drawRow = _interopRequireDefault(require_drawRow2()); + var _makeStreamConfig = _interopRequireDefault(require_makeStreamConfig2()); + var _mapDataUsingRowHeightIndex = _interopRequireDefault(require_mapDataUsingRowHeightIndex2()); + var _padTableData = _interopRequireDefault(require_padTableData2()); + var _stringifyTableData = _interopRequireDefault(require_stringifyTableData2()); + var _truncateTableData = _interopRequireDefault(require_truncateTableData2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var prepareData = (data, config) => { + let rows; + rows = (0, _stringifyTableData.default)(data); + rows = (0, _truncateTableData.default)(data, config); + const rowHeightIndex = (0, _calculateRowHeightIndex.default)(rows, config); + rows = (0, _mapDataUsingRowHeightIndex.default)(rows, rowHeightIndex, config); + rows = (0, _alignTableData.default)(rows, config); + rows = (0, _padTableData.default)(rows, config); + return rows; + }; + var create = (row, columnWidthIndex, config) => { + const rows = prepareData([row], config); + const body = rows.map((literalRow) => { + return (0, _drawRow.default)(literalRow, config.border); + }).join(""); + let output; + output = ""; + output += (0, _drawBorder.drawBorderTop)(columnWidthIndex, config.border); + output += body; + output += (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border); + output = (0, _trimEnd2.default)(output); + process.stdout.write(output); + }; + var append = (row, columnWidthIndex, config) => { + const rows = prepareData([row], config); + const body = rows.map((literalRow) => { + return (0, _drawRow.default)(literalRow, config.border); + }).join(""); + let output = ""; + const bottom = (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border); + if (bottom !== "\n") { + output = "\r"; + } + output += (0, _drawBorder.drawBorderJoin)(columnWidthIndex, config.border); + output += body; + output += bottom; + output = (0, _trimEnd2.default)(output); + process.stdout.write(output); + }; + var createStream = (userConfig = {}) => { + const config = (0, _makeStreamConfig.default)(userConfig); + const columnWidthIndex = (0, _values2.default)((0, _mapValues2.default)(config.columns, (column) => { + return column.width + column.paddingLeft + column.paddingRight; + })); + let empty; + empty = true; + return { + write: (row) => { + if (row.length !== config.columnCount) { + throw new Error("Row cell count does not match the config.columnCount."); + } + if (empty) { + empty = false; + return create(row, columnWidthIndex, config); + } else { + return append(row, columnWidthIndex, config); + } + } + }; + }; + var _default = createStream; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/calculateCellWidthIndex.js +var require_calculateCellWidthIndex2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/calculateCellWidthIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _stringWidth = _interopRequireDefault(require_string_width()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var calculateCellWidthIndex = (cells) => { + return cells.map((value) => { + return Math.max(...value.split("\n").map((line) => { + return (0, _stringWidth.default)(line); + })); + }); + }; + var _default = calculateCellWidthIndex; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/drawTable.js +var require_drawTable2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/drawTable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _drawBorder = require_drawBorder2(); + var _drawRow = _interopRequireDefault(require_drawRow2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var drawTable = (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine, singleLine) => { + let output; + let realRowIndex; + let rowHeight; + const rowCount = rows.length; + realRowIndex = 0; + output = ""; + if (drawHorizontalLine(realRowIndex, rowCount)) { + output += (0, _drawBorder.drawBorderTop)(columnSizeIndex, border); + } + rows.forEach((row, index0) => { + output += (0, _drawRow.default)(row, border); + if (!rowHeight) { + rowHeight = rowSpanIndex[realRowIndex]; + realRowIndex++; + } + rowHeight--; + if (!singleLine && rowHeight === 0 && index0 !== rowCount - 1 && drawHorizontalLine(realRowIndex, rowCount)) { + output += (0, _drawBorder.drawBorderJoin)(columnSizeIndex, border); + } + }); + if (drawHorizontalLine(realRowIndex, rowCount)) { + output += (0, _drawBorder.drawBorderBottom)(columnSizeIndex, border); + } + return output; + }; + var _default = drawTable; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/calculateMaximumColumnWidthIndex.js +var require_calculateMaximumColumnWidthIndex2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/calculateMaximumColumnWidthIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _calculateCellWidthIndex = _interopRequireDefault(require_calculateCellWidthIndex2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var calculateMaximumColumnWidthIndex = (rows) => { + if (!rows[0]) { + throw new Error("Dataset must have at least one row."); + } + const columns = new Array(rows[0].length).fill(0); + rows.forEach((row) => { + const columnWidthIndex = (0, _calculateCellWidthIndex.default)(row); + columnWidthIndex.forEach((valueWidth, index0) => { + if (columns[index0] < valueWidth) { + columns[index0] = valueWidth; + } + }); + }); + return columns; + }; + var _default = calculateMaximumColumnWidthIndex; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/makeConfig.js +var require_makeConfig2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/makeConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _cloneDeep2 = _interopRequireDefault(require_cloneDeep()); + var _isUndefined2 = _interopRequireDefault(require_isUndefined()); + var _times2 = _interopRequireDefault(require_times2()); + var _calculateMaximumColumnWidthIndex = _interopRequireDefault(require_calculateMaximumColumnWidthIndex2()); + var _getBorderCharacters = _interopRequireDefault(require_getBorderCharacters2()); + var _validateConfig = _interopRequireDefault(require_validateConfig2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var makeBorder = (border = {}) => { + return Object.assign({}, (0, _getBorderCharacters.default)("honeywell"), border); + }; + var makeColumns = (rows, columns = {}, columnDefault = {}) => { + const maximumColumnWidthIndex = (0, _calculateMaximumColumnWidthIndex.default)(rows); + (0, _times2.default)(rows[0].length, (index) => { + if ((0, _isUndefined2.default)(columns[index])) { + columns[index] = {}; + } + columns[index] = Object.assign({ + alignment: "left", + paddingLeft: 1, + paddingRight: 1, + truncate: Infinity, + width: maximumColumnWidthIndex[index], + wrapWord: false + }, columnDefault, columns[index]); + }); + return columns; + }; + var makeConfig = (rows, userConfig = {}) => { + (0, _validateConfig.default)("config.json", userConfig); + const config = (0, _cloneDeep2.default)(userConfig); + config.border = makeBorder(config.border); + config.columns = makeColumns(rows, config.columns, config.columnDefault); + if (!config.drawHorizontalLine) { + config.drawHorizontalLine = () => { + return true; + }; + } + if (config.singleLine === void 0) { + config.singleLine = false; + } + return config; + }; + var _default = makeConfig; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/validateTableData.js +var require_validateTableData2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/validateTableData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + function _createForOfIteratorHelper(o, allowArrayLike) { + var it; + if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { + if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { + if (it) + o = it; + var i = 0; + var F = function F2() { + }; + return { s: F, n: function n() { + if (i >= o.length) + return { done: true }; + return { done: false, value: o[i++] }; + }, e: function e(_e) { + throw _e; + }, f: F }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + var normalCompletion = true, didErr = false, err; + return { s: function s() { + it = o[Symbol.iterator](); + }, n: function n() { + var step = it.next(); + normalCompletion = step.done; + return step; + }, e: function e(_e2) { + didErr = true; + err = _e2; + }, f: function f() { + try { + if (!normalCompletion && it.return != null) + it.return(); + } finally { + if (didErr) + throw err; + } + } }; + } + function _unsupportedIterableToArray(o, minLen) { + if (!o) + return; + if (typeof o === "string") + return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) + n = o.constructor.name; + if (n === "Map" || n === "Set") + return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return _arrayLikeToArray(o, minLen); + } + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) + len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) + arr2[i] = arr[i]; + return arr2; + } + var validateTableData = (rows) => { + if (!Array.isArray(rows)) { + throw new TypeError("Table data must be an array."); + } + if (rows.length === 0) { + throw new Error("Table must define at least one row."); + } + if (rows[0].length === 0) { + throw new Error("Table must define at least one column."); + } + const columnNumber = rows[0].length; + var _iterator = _createForOfIteratorHelper(rows), _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done; ) { + const cells = _step.value; + if (!Array.isArray(cells)) { + throw new TypeError("Table row data must be an array."); + } + if (cells.length !== columnNumber) { + throw new Error("Table must have a consistent number of cells."); + } + var _iterator2 = _createForOfIteratorHelper(cells), _step2; + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) { + const cell = _step2.value; + if (/[\u0001-\u0006\u0008\u0009\u000B-\u001A]/.test(cell)) { + throw new Error("Table data must not contain control characters."); + } + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + }; + var _default = validateTableData; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/table.js +var require_table2 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/table.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _alignTableData = _interopRequireDefault(require_alignTableData2()); + var _calculateCellWidthIndex = _interopRequireDefault(require_calculateCellWidthIndex2()); + var _calculateRowHeightIndex = _interopRequireDefault(require_calculateRowHeightIndex2()); + var _drawTable = _interopRequireDefault(require_drawTable2()); + var _makeConfig = _interopRequireDefault(require_makeConfig2()); + var _mapDataUsingRowHeightIndex = _interopRequireDefault(require_mapDataUsingRowHeightIndex2()); + var _padTableData = _interopRequireDefault(require_padTableData2()); + var _stringifyTableData = _interopRequireDefault(require_stringifyTableData2()); + var _truncateTableData = _interopRequireDefault(require_truncateTableData2()); + var _validateTableData = _interopRequireDefault(require_validateTableData2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var table = (data, userConfig = {}) => { + let rows; + (0, _validateTableData.default)(data); + rows = (0, _stringifyTableData.default)(data); + const config = (0, _makeConfig.default)(rows, userConfig); + rows = (0, _truncateTableData.default)(data, config); + const rowHeightIndex = (0, _calculateRowHeightIndex.default)(rows, config); + rows = (0, _mapDataUsingRowHeightIndex.default)(rows, rowHeightIndex, config); + rows = (0, _alignTableData.default)(rows, config); + rows = (0, _padTableData.default)(rows, config); + const cellWidthIndex = (0, _calculateCellWidthIndex.default)(rows[0]); + return (0, _drawTable.default)(rows, config.border, cellWidthIndex, rowHeightIndex, config.drawHorizontalLine, config.singleLine); + }; + var _default = table; + exports2.default = _default; + } +}); + +// ../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/index.js +var require_dist10 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+table@1.0.0/node_modules/@zkochan/table/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + Object.defineProperty(exports2, "createStream", { + enumerable: true, + get: function get() { + return _createStream.default; + } + }); + Object.defineProperty(exports2, "getBorderCharacters", { + enumerable: true, + get: function get() { + return _getBorderCharacters.default; + } + }); + Object.defineProperty(exports2, "table", { + enumerable: true, + get: function get() { + return _table.default; + } + }); + var _createStream = _interopRequireDefault(require_createStream2()); + var _getBorderCharacters = _interopRequireDefault(require_getBorderCharacters2()); + var _table = _interopRequireDefault(require_table2()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + } +}); + +// ../plugin-commands-audit/lib/fix.js +var require_fix = __commonJS({ + "../plugin-commands-audit/lib/fix.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var read_project_manifest_1 = __importDefault(require_lib19()); + var fromPairs_1 = __importDefault(require_fromPairs()); + async function fix(dir, auditReport) { + var _a; + const { manifest, writeProjectManifest } = await read_project_manifest_1.default(dir); + const vulnOverrides = createOverrides(Object.values(auditReport.advisories)); + if (Object.values(vulnOverrides).length === 0) + return vulnOverrides; + await writeProjectManifest({ + ...manifest, + pnpm: { + ...manifest.pnpm, + overrides: { + ...(_a = manifest.pnpm) === null || _a === void 0 ? void 0 : _a.overrides, + ...vulnOverrides + } + } + }); + return vulnOverrides; + } + exports2.default = fix; + function createOverrides(advisories) { + return fromPairs_1.default(advisories.filter(({ vulnerable_versions }) => vulnerable_versions !== ">=0.0.0").map((advisory) => [ + `${advisory.module_name}@${advisory.vulnerable_versions}`, + advisory.patched_versions + ])); + } + } +}); + +// ../plugin-commands-audit/lib/audit.js +var require_audit2 = __commonJS({ + "../plugin-commands-audit/lib/audit.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.shorthands = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var audit_1 = __importDefault(require_lib55()); + var cli_utils_1 = require_lib20(); + var config_1 = require_lib10(); + var constants_1 = require_lib7(); + var error_1 = __importDefault(require_lib8()); + var lockfile_file_1 = require_lib57(); + var table_1 = require_dist10(); + var chalk_1 = __importDefault(require_source()); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + var fix_1 = __importDefault(require_fix()); + var AUDIT_LEVEL_NUMBER = { + low: 0, + moderate: 1, + high: 2, + critical: 3 + }; + var AUDIT_COLOR = { + low: chalk_1.default.bold, + moderate: chalk_1.default.bold.yellow, + high: chalk_1.default.bold.red, + critical: chalk_1.default.bold.red + }; + exports2.rcOptionsTypes = cliOptionsTypes; + function cliOptionsTypes() { + return { + ...pick_1.default([ + "dev", + "json", + "only", + "optional", + "production", + "registry" + ], config_1.types), + "audit-level": ["low", "moderate", "high", "critical"], + fix: Boolean, + "ignore-registry-errors": Boolean + }; + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.shorthands = { + D: "--dev", + P: "--production" + }; + exports2.commandNames = ["audit"]; + function help() { + return render_help_1.default({ + description: "Checks for known security issues with the installed packages.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "Add overrides to the package.json file in order to force non-vulnerable versions of the dependencies", + name: "--fix" + }, + { + description: "Output audit report in JSON format", + name: "--json" + }, + { + description: "Only print advisories with severity greater than or equal to one of the following: low|moderate|high|critical. Default: low", + name: "--audit-level " + }, + { + description: 'Only audit "devDependencies"', + name: "--dev", + shortAlias: "-D" + }, + { + description: 'Only audit "dependencies" and "optionalDependencies"', + name: "--prod", + shortAlias: "-P" + }, + { + description: `Don't audit "optionalDependencies"`, + name: "--no-optional" + }, + { + description: "Use exit code 0 if the registry responds with an error. Useful when audit checks are used in CI. A build should fail because the registry has issues.", + name: "--ignore-registry-errors" + } + ] + } + ], + url: cli_utils_1.docsUrl("audit"), + usages: ["pnpm audit [options]"] + }); + } + exports2.help = help; + async function handler(opts) { + var _a, _b; + const lockfile = await lockfile_file_1.readWantedLockfile((_a = opts.lockfileDir) !== null && _a !== void 0 ? _a : opts.dir, { ignoreIncompatible: true }); + if (lockfile == null) { + throw new error_1.default("AUDIT_NO_LOCKFILE", `No ${constants_1.WANTED_LOCKFILE} found: Cannot audit a project without a lockfile`); + } + const include = { + dependencies: opts.production !== false, + devDependencies: opts.dev !== false, + optionalDependencies: opts.optional !== false + }; + let auditReport; + try { + auditReport = await audit_1.default(lockfile, { + include, + registry: opts.registries.default, + retry: { + factor: opts.fetchRetryFactor, + maxTimeout: opts.fetchRetryMaxtimeout, + minTimeout: opts.fetchRetryMintimeout, + retries: opts.fetchRetries + }, + timeout: opts.fetchTimeout + }); + } catch (err) { + if (opts.ignoreRegistryErrors) { + return { + exitCode: 0, + output: err.message + }; + } + } + if (opts.fix) { + const newOverrides = await fix_1.default(opts.dir, auditReport); + if (Object.values(newOverrides).length === 0) { + return { + exitCode: 0, + output: "No fixes were made" + }; + } + return { + exitCode: 0, + output: `${Object.values(newOverrides).length} overrides were added to package.json to fix vulnerabilities. +Run "pnpm install" to apply the fixes. + +The added overrides: +${JSON.stringify(newOverrides, null, 2)}` + }; + } + const vulnerabilities = auditReport.metadata.vulnerabilities; + const totalVulnerabilityCount = Object.values(vulnerabilities).reduce((sum, vulnerabilitiesCount) => sum + vulnerabilitiesCount, 0); + if (opts.json) { + return { + exitCode: totalVulnerabilityCount > 0 ? 1 : 0, + output: JSON.stringify(auditReport, null, 2) + }; + } + let output = ""; + const auditLevel = AUDIT_LEVEL_NUMBER[(_b = opts.auditLevel) !== null && _b !== void 0 ? _b : "low"]; + const advisories = Object.values(auditReport.advisories).filter(({ severity }) => AUDIT_LEVEL_NUMBER[severity] >= auditLevel).sort((a1, a2) => AUDIT_LEVEL_NUMBER[a2.severity] - AUDIT_LEVEL_NUMBER[a1.severity]); + for (const advisory of advisories) { + output += table_1.table([ + [AUDIT_COLOR[advisory.severity](advisory.severity), chalk_1.default.bold(advisory.title)], + ["Package", advisory.module_name], + ["Vulnerable versions", advisory.vulnerable_versions], + ["Patched versions", advisory.patched_versions], + ["More info", advisory.url] + ], cli_utils_1.TABLE_OPTIONS); + } + return { + exitCode: output ? 1 : 0, + output: `${output}${reportSummary(auditReport.metadata.vulnerabilities, totalVulnerabilityCount)}` + }; + } + exports2.handler = handler; + function reportSummary(vulnerabilities, totalVulnerabilityCount) { + if (totalVulnerabilityCount === 0) + return "No known vulnerabilities found\n"; + return `${chalk_1.default.red(totalVulnerabilityCount)} vulnerabilities found +Severity: ${Object.entries(vulnerabilities).filter(([auditLevel, vulnerabilitiesCount]) => vulnerabilitiesCount > 0).map(([auditLevel, vulnerabilitiesCount]) => AUDIT_COLOR[auditLevel](`${vulnerabilitiesCount} ${auditLevel}`)).join(" | ")}`; + } + } +}); + +// ../plugin-commands-audit/lib/index.js +var require_lib58 = __commonJS({ + "../plugin-commands-audit/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.audit = void 0; + var audit = __importStar2(require_audit2()); + exports2.audit = audit; + } +}); + +// ../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/lib/rng.js +var require_rng = __commonJS({ + "../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/lib/rng.js"(exports2, module2) { + var crypto = require("crypto"); + module2.exports = function nodeRNG() { + return crypto.randomBytes(16); + }; + } +}); + +// ../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/lib/bytesToUuid.js +var require_bytesToUuid = __commonJS({ + "../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/lib/bytesToUuid.js"(exports2, module2) { + var byteToHex = []; + for (i = 0; i < 256; ++i) { + byteToHex[i] = (i + 256).toString(16).substr(1); + } + var i; + function bytesToUuid(buf, offset) { + var i2 = offset || 0; + var bth = byteToHex; + return [ + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + "-", + bth[buf[i2++]], + bth[buf[i2++]], + "-", + bth[buf[i2++]], + bth[buf[i2++]], + "-", + bth[buf[i2++]], + bth[buf[i2++]], + "-", + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]], + bth[buf[i2++]] + ].join(""); + } + module2.exports = bytesToUuid; + } +}); + +// ../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/v1.js +var require_v1 = __commonJS({ + "../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/v1.js"(exports2, module2) { + var rng = require_rng(); + var bytesToUuid = require_bytesToUuid(); + var _nodeId; + var _clockseq; + var _lastMSecs = 0; + var _lastNSecs = 0; + function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + options = options || {}; + var node = options.node || _nodeId; + var clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq; + if (node == null || clockseq == null) { + var seedBytes = rng(); + if (node == null) { + node = _nodeId = [ + seedBytes[0] | 1, + seedBytes[1], + seedBytes[2], + seedBytes[3], + seedBytes[4], + seedBytes[5] + ]; + } + if (clockseq == null) { + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383; + } + } + var msecs = options.msecs !== void 0 ? options.msecs : new Date().getTime(); + var nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1; + var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4; + if (dt < 0 && options.clockseq === void 0) { + clockseq = clockseq + 1 & 16383; + } + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) { + nsecs = 0; + } + if (nsecs >= 1e4) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + msecs += 122192928e5; + var tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; + b[i++] = tl >>> 24 & 255; + b[i++] = tl >>> 16 & 255; + b[i++] = tl >>> 8 & 255; + b[i++] = tl & 255; + var tmh = msecs / 4294967296 * 1e4 & 268435455; + b[i++] = tmh >>> 8 & 255; + b[i++] = tmh & 255; + b[i++] = tmh >>> 24 & 15 | 16; + b[i++] = tmh >>> 16 & 255; + b[i++] = clockseq >>> 8 | 128; + b[i++] = clockseq & 255; + for (var n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + return buf ? buf : bytesToUuid(b); + } + module2.exports = v1; + } +}); + +// ../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/v4.js +var require_v4 = __commonJS({ + "../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/v4.js"(exports2, module2) { + var rng = require_rng(); + var bytesToUuid = require_bytesToUuid(); + function v4(options, buf, offset) { + var i = buf && offset || 0; + if (typeof options == "string") { + buf = options === "binary" ? new Array(16) : null; + options = null; + } + options = options || {}; + var rnds = options.random || (options.rng || rng)(); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + return buf || bytesToUuid(rnds); + } + module2.exports = v4; + } +}); + +// ../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/index.js +var require_uuid = __commonJS({ + "../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/index.js"(exports2, module2) { + var v1 = require_v1(); + var v4 = require_v4(); + var uuid = v4; + uuid.v1 = v1; + uuid.v4 = v4; + module2.exports = uuid; + } +}); + +// ../server/lib/connectStoreController.js +var require_connectStoreController = __commonJS({ + "../server/lib/connectStoreController.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fetch_1 = __importDefault(require_lib29()); + var p_limit_1 = __importDefault(require_p_limit()); + var promise_share_1 = __importDefault(require_promise_share()); + var uuid_1 = __importDefault(require_uuid()); + async function default_1(initOpts) { + var _a; + const remotePrefix = initOpts.remotePrefix; + const limitedFetch = limitFetch.bind(null, p_limit_1.default((_a = initOpts.concurrency) !== null && _a !== void 0 ? _a : 100)); + return new Promise((resolve, reject) => { + resolve({ + close: async () => { + }, + fetchPackage: fetchPackage.bind(null, remotePrefix, limitedFetch), + importPackage: async (to, opts) => { + return limitedFetch(`${remotePrefix}/importPackage`, { + opts, + to + }); + }, + prune: async () => { + await limitedFetch(`${remotePrefix}/prune`, {}); + }, + requestPackage: requestPackage.bind(null, remotePrefix, limitedFetch), + stop: async () => { + await limitedFetch(`${remotePrefix}/stop`, {}); + }, + upload: async (builtPkgLocation, opts) => { + await limitedFetch(`${remotePrefix}/upload`, { + builtPkgLocation, + opts + }); + } + }); + }); + } + exports2.default = default_1; + function limitFetch(limit, url, body) { + return limit(async () => { + if (url.startsWith("http://unix:")) { + url = url.replace("http://unix:", "unix:"); + } + const response = await fetch_1.default(url, { + body: JSON.stringify(body), + headers: { "Content-Type": "application/json" }, + method: "POST", + retry: { + retries: 100 + } + }); + if (!response.ok) { + throw await response.json(); + } + const json = await response.json(); + if (json.error) { + throw json.error; + } + return json; + }); + } + async function requestPackage(remotePrefix, limitedFetch, wantedDependency, options) { + const msgId = uuid_1.default.v4(); + return limitedFetch(`${remotePrefix}/requestPackage`, { + msgId, + options, + wantedDependency + }).then((packageResponseBody) => { + const fetchingBundledManifest = !packageResponseBody["fetchingBundledManifestInProgress"] ? void 0 : limitedFetch(`${remotePrefix}/rawManifestResponse`, { + msgId + }); + delete packageResponseBody["fetchingBundledManifestInProgress"]; + if (options.skipFetch) { + return { + body: packageResponseBody, + bundledManifest: fetchingBundledManifest && promise_share_1.default(fetchingBundledManifest) + }; + } + const fetchingFiles = limitedFetch(`${remotePrefix}/packageFilesResponse`, { + msgId + }); + return { + body: packageResponseBody, + bundledManifest: fetchingBundledManifest && promise_share_1.default(fetchingBundledManifest), + files: promise_share_1.default(fetchingFiles), + finishing: promise_share_1.default(Promise.all([fetchingBundledManifest, fetchingFiles]).then(() => void 0)) + }; + }); + } + function fetchPackage(remotePrefix, limitedFetch, options) { + const msgId = uuid_1.default.v4(); + return limitedFetch(`${remotePrefix}/fetchPackage`, { + msgId, + options + }).then((fetchResponseBody) => { + const fetchingBundledManifest = options.fetchRawManifest ? limitedFetch(`${remotePrefix}/rawManifestResponse`, { msgId }) : void 0; + const fetchingFiles = limitedFetch(`${remotePrefix}/packageFilesResponse`, { + msgId + }); + return { + bundledManifest: fetchingBundledManifest && promise_share_1.default(fetchingBundledManifest), + files: promise_share_1.default(fetchingFiles), + filesIndexFile: fetchResponseBody.filesIndexFile, + finishing: promise_share_1.default(Promise.all([fetchingBundledManifest, fetchingFiles]).then(() => void 0)), + inStoreLocation: fetchResponseBody.inStoreLocation + }; + }); + } + } +}); + +// ../server/lib/lock.js +var require_lock = __commonJS({ + "../server/lib/lock.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function lock() { + const locks = {}; + return async (key, fn2) => { + if (locks[key] != null) + return locks[key]; + locks[key] = fn2(); + fn2().then(() => delete locks[key], () => delete locks[key]); + return locks[key]; + }; + } + exports2.default = lock; + } +}); + +// ../server/lib/createServer.js +var require_createServer = __commonJS({ + "../server/lib/createServer.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var http_1 = __importDefault(require("http")); + var logger_1 = require_lib6(); + var lock_1 = __importDefault(require_lock()); + function default_1(store, opts) { + const rawManifestPromises = {}; + const filesPromises = {}; + const lock = lock_1.default(); + const server = http_1.default.createServer(async (req, res) => { + var _a; + if (req.method !== "POST") { + res.statusCode = 405; + const responseError = { error: `Only POST is allowed, received ${(_a = req.method) !== null && _a !== void 0 ? _a : "unknown"}` }; + res.setHeader("Allow", "POST"); + res.end(JSON.stringify(responseError)); + return; + } + const bodyPromise = new Promise((resolve, reject) => { + let body = ""; + req.on("data", (data) => { + body += data; + }); + req.on("end", async () => { + try { + if (body.length > 0) { + body = JSON.parse(body); + } else { + body = {}; + } + resolve(body); + } catch (e) { + reject(e); + } + }); + }); + try { + let body; + switch (req.url) { + case "/requestPackage": { + try { + body = await bodyPromise; + const pkgResponse = await store.requestPackage(body.wantedDependency, body.options); + if (pkgResponse["bundledManifest"]) { + rawManifestPromises[body.msgId] = pkgResponse["bundledManifest"]; + pkgResponse.body["fetchingBundledManifestInProgress"] = true; + } + if (pkgResponse["files"]) { + filesPromises[body.msgId] = pkgResponse["files"]; + } + res.end(JSON.stringify(pkgResponse.body)); + } catch (err) { + res.end(JSON.stringify({ + error: { + message: err.message, + ...JSON.parse(JSON.stringify(err)) + } + })); + } + break; + } + case "/fetchPackage": { + try { + body = await bodyPromise; + const pkgResponse = store.fetchPackage(body.options); + if (pkgResponse["bundledManifest"]) { + rawManifestPromises[body.msgId] = pkgResponse["bundledManifest"]; + } + if (pkgResponse["files"]) { + filesPromises[body.msgId] = pkgResponse["files"]; + } + res.end(JSON.stringify({ filesIndexFile: pkgResponse.filesIndexFile })); + } catch (err) { + res.end(JSON.stringify({ + error: { + message: err.message, + ...JSON.parse(JSON.stringify(err)) + } + })); + } + break; + } + case "/packageFilesResponse": { + body = await bodyPromise; + const filesResponse = await filesPromises[body.msgId](); + delete filesPromises[body.msgId]; + res.end(JSON.stringify(filesResponse)); + break; + } + case "/rawManifestResponse": { + body = await bodyPromise; + const manifestResponse = await rawManifestPromises[body.msgId](); + delete rawManifestPromises[body.msgId]; + res.end(JSON.stringify(manifestResponse)); + break; + } + case "/prune": + res.statusCode = 403; + res.end(); + break; + case "/importPackage": { + const importPackageBody = await bodyPromise; + await store.importPackage(importPackageBody.to, importPackageBody.opts); + res.end(JSON.stringify("OK")); + break; + } + case "/upload": { + if (opts.ignoreUploadRequests) { + res.statusCode = 403; + res.end(); + break; + } + const uploadBody = await bodyPromise; + await lock(uploadBody.builtPkgLocation, async () => store.upload(uploadBody.builtPkgLocation, uploadBody.opts)); + res.end(JSON.stringify("OK")); + break; + } + case "/stop": + if (opts.ignoreStopRequests) { + res.statusCode = 403; + res.end(); + break; + } + logger_1.globalInfo("Got request to stop the server"); + await close(); + res.end(JSON.stringify("OK")); + logger_1.globalInfo("Server stopped"); + break; + default: { + res.statusCode = 404; + const error = { error: `${req.url} does not match any route` }; + res.end(JSON.stringify(error)); + } + } + } catch (e) { + res.statusCode = 503; + const jsonErr = JSON.parse(JSON.stringify(e)); + jsonErr.message = e.message; + res.end(JSON.stringify(jsonErr)); + } + }); + let listener; + if (opts.path) { + listener = server.listen(opts.path); + } else { + listener = server.listen(opts.port, opts.hostname); + } + return { close }; + async function close() { + listener.close(); + return store.close(); + } + } + exports2.default = default_1; + } +}); + +// ../server/lib/index.js +var require_lib59 = __commonJS({ + "../server/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.connectStoreController = exports2.createServer = void 0; + var connectStoreController_1 = __importDefault(require_connectStoreController()); + exports2.connectStoreController = connectStoreController_1.default; + var createServer_1 = __importDefault(require_createServer()); + exports2.createServer = createServer_1.default; + } +}); + +// ../../node_modules/.pnpm/delay@5.0.0/node_modules/delay/index.js +var require_delay2 = __commonJS({ + "../../node_modules/.pnpm/delay@5.0.0/node_modules/delay/index.js"(exports2, module2) { + "use strict"; + var randomInteger = (minimum, maximum) => Math.floor(Math.random() * (maximum - minimum + 1) + minimum); + var createAbortError = () => { + const error = new Error("Delay aborted"); + error.name = "AbortError"; + return error; + }; + var createDelay = ({ clearTimeout: defaultClear, setTimeout: set, willResolve }) => (ms, { value, signal } = {}) => { + if (signal && signal.aborted) { + return Promise.reject(createAbortError()); + } + let timeoutId; + let settle; + let rejectFn; + const clear = defaultClear || clearTimeout; + const signalListener = () => { + clear(timeoutId); + rejectFn(createAbortError()); + }; + const cleanup = () => { + if (signal) { + signal.removeEventListener("abort", signalListener); + } + }; + const delayPromise = new Promise((resolve, reject) => { + settle = () => { + cleanup(); + if (willResolve) { + resolve(value); + } else { + reject(value); + } + }; + rejectFn = reject; + timeoutId = (set || setTimeout)(settle, ms); + }); + if (signal) { + signal.addEventListener("abort", signalListener, { once: true }); + } + delayPromise.clear = () => { + clear(timeoutId); + timeoutId = null; + settle(); + }; + return delayPromise; + }; + var createWithTimers = (clearAndSet) => { + const delay2 = createDelay({ ...clearAndSet, willResolve: true }); + delay2.reject = createDelay({ ...clearAndSet, willResolve: false }); + delay2.range = (minimum, maximum, options) => delay2(randomInteger(minimum, maximum), options); + return delay2; + }; + var delay = createWithTimers(); + delay.createWithTimers = createWithTimers; + module2.exports = delay; + module2.exports.default = delay; + } +}); + +// ../store-connection-manager/lib/createNewStoreController.js +var require_createNewStoreController = __commonJS({ + "../store-connection-manager/lib/createNewStoreController.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var client_1 = __importDefault(require_lib49()); + var package_store_1 = __importDefault(require_lib37()); + var cli_meta_1 = __importDefault(require_lib4()); + exports2.default = async (opts) => { + var _a; + const { resolve, fetchers } = client_1.default({ + authConfig: opts.rawConfig, + ca: opts.ca, + cacheDir: opts.cacheDir, + cert: opts.cert, + fullMetadata: false, + httpProxy: opts.httpProxy, + httpsProxy: opts.httpsProxy, + key: opts.key, + localAddress: opts.localAddress, + noProxy: opts.noProxy, + offline: opts.offline, + preferOffline: opts.preferOffline, + retry: { + factor: opts.fetchRetryFactor, + maxTimeout: opts.fetchRetryMaxtimeout, + minTimeout: opts.fetchRetryMintimeout, + retries: opts.fetchRetries + }, + strictSsl: (_a = opts.strictSsl) !== null && _a !== void 0 ? _a : true, + timeout: opts.fetchTimeout, + userAgent: opts.userAgent, + maxSockets: opts.networkConcurrency != null ? opts.networkConcurrency * 3 : void 0 + }); + await fs_1.promises.mkdir(opts.storeDir, { recursive: true }); + return { + ctrl: await package_store_1.default(resolve, fetchers, { + engineStrict: opts.engineStrict, + force: opts.force, + nodeVersion: opts.nodeVersion, + pnpmVersion: cli_meta_1.default.version, + ignoreFile: opts.ignoreFile, + networkConcurrency: opts.networkConcurrency, + packageImportMethod: opts.packageImportMethod, + storeDir: opts.storeDir, + verifyStoreIntegrity: typeof opts.verifyStoreIntegrity === "boolean" ? opts.verifyStoreIntegrity : true + }), + dir: opts.storeDir + }; + }; + } +}); + +// ../../node_modules/.pnpm/proc-output@1.0.8/node_modules/proc-output/lib/index.js +var require_lib60 = __commonJS({ + "../../node_modules/.pnpm/proc-output@1.0.8/node_modules/proc-output/lib/index.js"(exports2, module2) { + "use strict"; + module2.exports = function procOutput(proc, cb) { + var stdout = "", stderr = ""; + proc.on("error", function(err) { + cb(err); + }); + proc.stdout.on("data", function(chunk) { + return stdout += chunk; + }); + proc.stderr.on("data", function(chunk) { + return stderr += chunk; + }); + proc.on("close", function(code) { + return cb(null, stdout, stderr, code); + }); + return proc; + }; + } +}); + +// ../../node_modules/.pnpm/spawno@2.1.1/node_modules/spawno/lib/index.js +var require_lib61 = __commonJS({ + "../../node_modules/.pnpm/spawno@2.1.1/node_modules/spawno/lib/index.js"(exports2, module2) { + "use strict"; + var spawn = require("child_process").spawn; + var procOutput = require_lib60(); + module2.exports = function spawno(command, args2, options, cb) { + if (typeof args2 === "function") { + cb = args2; + args2 = []; + options = {}; + } + if (typeof options === "function") { + cb = options; + if (!Array.isArray(args2)) { + options = args2; + args2 = []; + } else { + options = {}; + } + } + options = options || {}; + if (options.input !== false) { + options.input = options.input || ""; + } + var showOutput = options.output, inputData = options.input; + delete options.output; + delete options.input; + var proc = spawn(command, args2, options); + if (showOutput) { + proc.stdout.pipe(process.stdout); + proc.stderr.pipe(process.stderr); + } + if (inputData !== false) { + proc.stdin && proc.stdin.end(inputData); + } + if (cb) { + procOutput(proc, cb); + } + return proc; + }; + module2.exports.promise = function(command, args2, options) { + return new Promise(function(resolve, reject) { + module2.exports(command, args2, options, function(err, stdout, stderr, code) { + if (err) { + return reject(err); + } + resolve({ + code, + stdout, + stderr + }); + }); + }); + }; + } +}); + +// ../../node_modules/.pnpm/@zkochan+diable@1.0.2/node_modules/@zkochan/diable/lib/index.js +var require_lib62 = __commonJS({ + "../../node_modules/.pnpm/@zkochan+diable@1.0.2/node_modules/@zkochan/diable/lib/index.js"(exports2, module2) { + "use strict"; + var spawn = require_lib61(); + function Diable(opts) { + if (Diable.isDaemon()) { + return false; + } + opts = opts || {}; + const args2 = [].concat(process.argv); + args2.shift(); + const script = args2.shift(), env = opts.env || process.env; + Diable.daemonize(script, args2, opts); + return process.exit(); + } + Diable.isDaemon = function() { + return !!process.env.__is_daemon; + }; + Diable.daemonize = function(script, args2, opts) { + opts = opts || {}; + const stdout = opts.stdout || "ignore", stderr = opts.stderr || "ignore", env = opts.env || process.env, cwd = opts.cwd || process.cwd(); + env.__is_daemon = true; + const spawnOptions = { + stdio: ["inherit", stdout, stderr], + env, + cwd, + detached: true, + input: false + }; + const cmd = opts.command || process.execPath; + delete opts.command; + const child = spawn(cmd, [script].concat(args2).filter(Boolean), spawnOptions); + child.unref(); + return child; + }; + module2.exports = Diable; + } +}); + +// ../store-connection-manager/lib/runServerInBackground.js +var require_runServerInBackground = __commonJS({ + "../store-connection-manager/lib/runServerInBackground.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var diable_1 = __importDefault(require_lib62()); + exports2.default = (storePath) => { + if (require.main == null) { + throw new error_1.default("CANNOT_START_SERVER", "pnpm server cannot be started when pnpm is streamed to Node.js"); + } + return diable_1.default.daemonize(require.main.filename, ["server", "start", "--store-dir", storePath], { stdio: "inherit" }); + }; + } +}); + +// ../store-connection-manager/lib/serverConnectionInfoDir.js +var require_serverConnectionInfoDir = __commonJS({ + "../store-connection-manager/lib/serverConnectionInfoDir.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + exports2.default = (storePath) => path_1.default.join(storePath, "server"); + } +}); + +// ../store-connection-manager/lib/index.js +var require_lib63 = __commonJS({ + "../store-connection-manager/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tryLoadServerJson = exports2.createOrConnectStoreController = exports2.createOrConnectStoreControllerCached = exports2.serverConnectionInfoDir = exports2.createNewStoreController = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var cli_meta_1 = __importDefault(require_lib4()); + var error_1 = __importDefault(require_lib8()); + var logger_1 = __importDefault(require_lib6()); + var server_1 = require_lib59(); + var store_path_1 = __importDefault(require_lib38()); + var delay_1 = __importDefault(require_delay2()); + var createNewStoreController_1 = __importDefault(require_createNewStoreController()); + exports2.createNewStoreController = createNewStoreController_1.default; + var runServerInBackground_1 = __importDefault(require_runServerInBackground()); + var serverConnectionInfoDir_1 = __importDefault(require_serverConnectionInfoDir()); + exports2.serverConnectionInfoDir = serverConnectionInfoDir_1.default; + async function createOrConnectStoreControllerCached(storeControllerCache, opts) { + const storeDir = await store_path_1.default(opts.dir, opts.storeDir); + if (!storeControllerCache.has(storeDir)) { + storeControllerCache.set(storeDir, createOrConnectStoreController(opts)); + } + return await storeControllerCache.get(storeDir); + } + exports2.createOrConnectStoreControllerCached = createOrConnectStoreControllerCached; + async function createOrConnectStoreController(opts) { + const storeDir = await store_path_1.default(opts.dir, opts.storeDir); + const connectionInfoDir = serverConnectionInfoDir_1.default(storeDir); + const serverJsonPath = path_1.default.join(connectionInfoDir, "server.json"); + let serverJson = await tryLoadServerJson({ serverJsonPath, shouldRetryOnNoent: false }); + if (serverJson !== null) { + if (serverJson.pnpmVersion !== cli_meta_1.default.version) { + logger_1.default.warn({ + message: `The store server runs on pnpm v${serverJson.pnpmVersion}. It is recommended to connect with the same version (current is v${cli_meta_1.default.version})`, + prefix: opts.dir + }); + } + logger_1.default.info({ + message: "A store server is running. All store manipulations are delegated to it.", + prefix: opts.dir + }); + return { + ctrl: await server_1.connectStoreController(serverJson.connectionOptions), + dir: storeDir + }; + } + if (opts.useRunningStoreServer) { + throw new error_1.default("NO_STORE_SERVER", "No store server is running."); + } + if (opts.useStoreServer) { + runServerInBackground_1.default(storeDir); + serverJson = await tryLoadServerJson({ serverJsonPath, shouldRetryOnNoent: true }); + logger_1.default.info({ + message: "A store server has been started. To stop it, use `pnpm server stop`", + prefix: opts.dir + }); + return { + ctrl: await server_1.connectStoreController(serverJson.connectionOptions), + dir: storeDir + }; + } + return createNewStoreController_1.default(Object.assign(opts, { + storeDir + })); + } + exports2.createOrConnectStoreController = createOrConnectStoreController; + async function tryLoadServerJson(options) { + let beforeFirstAttempt = true; + const startHRTime = process.hrtime(); + while (true) { + if (!beforeFirstAttempt) { + const elapsedHRTime = process.hrtime(startHRTime); + if (elapsedHRTime[0] >= 10) { + try { + await fs_1.promises.unlink(options.serverJsonPath); + } catch (error) { + if (error.code !== "ENOENT") { + throw error; + } + } + return null; + } + await delay_1.default(200); + } + beforeFirstAttempt = false; + let serverJsonStr; + try { + serverJsonStr = await fs_1.promises.readFile(options.serverJsonPath, "utf8"); + } catch (error) { + if (error.code !== "ENOENT") { + throw error; + } + if (!options.shouldRetryOnNoent) { + return null; + } + continue; + } + let serverJson; + try { + serverJson = JSON.parse(serverJsonStr); + } catch (error) { + continue; + } + if (serverJson === null) { + throw new Error("server.json was modified by a third party"); + } + return serverJson; + } + } + exports2.tryLoadServerJson = tryLoadServerJson; + } +}); + +// ../modules-yaml/lib/index.js +var require_lib64 = __commonJS({ + "../modules-yaml/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.write = exports2.read = void 0; + var path_1 = __importDefault(require("path")); + var read_yaml_file_1 = __importDefault(require_read_yaml_file()); + var is_windows_1 = __importDefault(require_is_windows()); + var write_yaml_file_1 = __importDefault(require_write_yaml_file()); + var MODULES_FILENAME = ".modules.yaml"; + async function read(modulesDir) { + const modulesYamlPath = path_1.default.join(modulesDir, MODULES_FILENAME); + let modules; + try { + modules = await read_yaml_file_1.default(modulesYamlPath); + } catch (err) { + if (err.code !== "ENOENT") { + throw err; + } + return null; + } + if (!modules.virtualStoreDir) { + modules.virtualStoreDir = path_1.default.join(modulesDir, ".pnpm"); + } else if (!path_1.default.isAbsolute(modules.virtualStoreDir)) { + modules.virtualStoreDir = path_1.default.join(modulesDir, modules.virtualStoreDir); + } + switch (modules.shamefullyHoist) { + case true: + if (modules.publicHoistPattern == null) { + modules.publicHoistPattern = ["*"]; + } + if (modules.hoistedAliases != null && !modules.hoistedDependencies) { + modules.hoistedDependencies = {}; + for (const depPath of Object.keys(modules.hoistedAliases)) { + modules.hoistedDependencies[depPath] = {}; + for (const alias of modules.hoistedAliases[depPath]) { + modules.hoistedDependencies[depPath][alias] = "public"; + } + } + } + break; + case false: + if (modules.publicHoistPattern == null) { + modules.publicHoistPattern = []; + } + if (modules.hoistedAliases != null && !modules.hoistedDependencies) { + modules.hoistedDependencies = {}; + for (const depPath of Object.keys(modules.hoistedAliases)) { + modules.hoistedDependencies[depPath] = {}; + for (const alias of modules.hoistedAliases[depPath]) { + modules.hoistedDependencies[depPath][alias] = "private"; + } + } + } + break; + } + if (!modules.prunedAt) { + modules.prunedAt = new Date().toUTCString(); + } + return modules; + } + exports2.read = read; + var YAML_OPTS = { + noCompatMode: true, + noRefs: true, + sortKeys: true + }; + async function write(modulesDir, modules) { + const modulesYamlPath = path_1.default.join(modulesDir, MODULES_FILENAME); + const saveModules = { ...modules }; + if (saveModules.skipped) + saveModules.skipped.sort(); + if (saveModules.hoistPattern == null || saveModules.hoistPattern === "") { + delete saveModules.hoistPattern; + } + if (saveModules.publicHoistPattern == null) { + delete saveModules.publicHoistPattern; + } + if (saveModules.hoistedAliases == null || saveModules.hoistPattern == null && saveModules.publicHoistPattern == null) { + delete saveModules.hoistedAliases; + } + if (!is_windows_1.default()) { + saveModules.virtualStoreDir = path_1.default.relative(modulesDir, saveModules.virtualStoreDir); + } + return write_yaml_file_1.default(modulesYamlPath, saveModules, YAML_OPTS); + } + exports2.write = write; + } +}); + +// ../normalize-registries/lib/index.js +var require_lib65 = __commonJS({ + "../normalize-registries/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_REGISTRIES = void 0; + var normalize_registry_url_1 = __importDefault(require_normalize_registry_url()); + exports2.DEFAULT_REGISTRIES = { + default: "https://registry.npmjs.org/" + }; + function normalizeRegistries(registries) { + if (registries == null) + return exports2.DEFAULT_REGISTRIES; + const normalizeRegistries2 = {}; + for (const scope of Object.keys(registries)) { + normalizeRegistries2[scope] = normalize_registry_url_1.default(registries[scope]); + } + return { + ...exports2.DEFAULT_REGISTRIES, + ...normalizeRegistries2 + }; + } + exports2.default = normalizeRegistries; + } +}); + +// ../read-projects-context/lib/index.js +var require_lib66 = __commonJS({ + "../read-projects-context/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var lockfile_file_1 = require_lib57(); + var modules_yaml_1 = require_lib64(); + var normalize_registries_1 = __importDefault(require_lib65()); + var realpath_missing_1 = __importDefault(require_realpath_missing()); + async function default_1(projects, opts) { + var _a, _b, _c, _d, _e; + const relativeModulesDir = (_a = opts.modulesDir) !== null && _a !== void 0 ? _a : "node_modules"; + const rootModulesDir = await realpath_missing_1.default(path_1.default.join(opts.lockfileDir, relativeModulesDir)); + const modules = await modules_yaml_1.read(rootModulesDir); + return { + currentHoistPattern: modules === null || modules === void 0 ? void 0 : modules.hoistPattern, + currentPublicHoistPattern: modules === null || modules === void 0 ? void 0 : modules.publicHoistPattern, + hoist: modules == null ? void 0 : Boolean(modules.hoistPattern), + hoistedDependencies: (_b = modules === null || modules === void 0 ? void 0 : modules.hoistedDependencies) !== null && _b !== void 0 ? _b : {}, + include: (_c = modules === null || modules === void 0 ? void 0 : modules.included) !== null && _c !== void 0 ? _c : { dependencies: true, devDependencies: true, optionalDependencies: true }, + modules, + pendingBuilds: (_d = modules === null || modules === void 0 ? void 0 : modules.pendingBuilds) !== null && _d !== void 0 ? _d : [], + projects: await Promise.all(projects.map(async (project) => { + var _a2, _b2; + const modulesDir = await realpath_missing_1.default(path_1.default.join(project.rootDir, (_a2 = project.modulesDir) !== null && _a2 !== void 0 ? _a2 : relativeModulesDir)); + const importerId = lockfile_file_1.getLockfileImporterId(opts.lockfileDir, project.rootDir); + return { + ...project, + binsDir: (_b2 = project.binsDir) !== null && _b2 !== void 0 ? _b2 : path_1.default.join(project.rootDir, relativeModulesDir, ".bin"), + id: importerId, + modulesDir + }; + })), + registries: (modules === null || modules === void 0 ? void 0 : modules.registries) != null ? normalize_registries_1.default(modules.registries) : void 0, + rootModulesDir, + skipped: new Set((_e = modules === null || modules === void 0 ? void 0 : modules.skipped) !== null && _e !== void 0 ? _e : []) + }; + } + exports2.default = default_1; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_cloneRegExp.js +var require_cloneRegExp2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_cloneRegExp.js"(exports2, module2) { + function _cloneRegExp(pattern) { + return new RegExp(pattern.source, (pattern.global ? "g" : "") + (pattern.ignoreCase ? "i" : "") + (pattern.multiline ? "m" : "") + (pattern.sticky ? "y" : "") + (pattern.unicode ? "u" : "")); + } + module2.exports = _cloneRegExp; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_clone.js +var require_clone2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_clone.js"(exports2, module2) { + var _cloneRegExp = require_cloneRegExp2(); + var type = require_type(); + function _clone(value, refFrom, refTo, deep) { + var copy = function copy2(copiedValue) { + var len = refFrom.length; + var idx = 0; + while (idx < len) { + if (value === refFrom[idx]) { + return refTo[idx]; + } + idx += 1; + } + refFrom[idx + 1] = value; + refTo[idx + 1] = copiedValue; + for (var key in value) { + copiedValue[key] = deep ? _clone(value[key], refFrom, refTo, true) : value[key]; + } + return copiedValue; + }; + switch (type(value)) { + case "Object": + return copy({}); + case "Array": + return copy([]); + case "Date": + return new Date(value.valueOf()); + case "RegExp": + return _cloneRegExp(value); + default: + return value; + } + } + module2.exports = _clone; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/clone.js +var require_clone3 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/clone.js"(exports2, module2) { + var _clone = require_clone2(); + var _curry1 = require_curry1(); + var clone = /* @__PURE__ */ _curry1(function clone2(value) { + return value != null && typeof value.clone === "function" ? value.clone() : _clone(value, [], [], true); + }); + module2.exports = clone; + } +}); + +// ../get-context/lib/checkCompatibility/BreakingChangeError.js +var require_BreakingChangeError = __commonJS({ + "../get-context/lib/checkCompatibility/BreakingChangeError.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var BreakingChangeError = class extends error_1.default { + constructor(opts) { + super(opts.code, opts.message); + this.relatedIssue = opts.relatedIssue; + this.relatedPR = opts.relatedPR; + this.additionalInformation = opts.additionalInformation; + } + }; + exports2.default = BreakingChangeError; + } +}); + +// ../get-context/lib/checkCompatibility/ModulesBreakingChangeError.js +var require_ModulesBreakingChangeError = __commonJS({ + "../get-context/lib/checkCompatibility/ModulesBreakingChangeError.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var BreakingChangeError_1 = __importDefault(require_BreakingChangeError()); + var ModulesBreakingChangeError = class extends BreakingChangeError_1.default { + constructor(opts) { + super({ + additionalInformation: opts.additionalInformation, + code: "MODULES_BREAKING_CHANGE", + message: `The node_modules structure at "${opts.modulesPath}" is not compatible with the current pnpm version. Run "pnpm install --force" to recreate node_modules.`, + relatedIssue: opts.relatedIssue, + relatedPR: opts.relatedPR + }); + this.modulesPath = opts.modulesPath; + } + }; + exports2.default = ModulesBreakingChangeError; + } +}); + +// ../get-context/lib/checkCompatibility/UnexpectedStoreError.js +var require_UnexpectedStoreError = __commonJS({ + "../get-context/lib/checkCompatibility/UnexpectedStoreError.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var UnexpectedStoreError = class extends error_1.default { + constructor(opts) { + super("UNEXPECTED_STORE", "Unexpected store location"); + this.expectedStorePath = opts.expectedStorePath; + this.actualStorePath = opts.actualStorePath; + this.modulesDir = opts.modulesDir; + } + }; + exports2.default = UnexpectedStoreError; + } +}); + +// ../get-context/lib/checkCompatibility/UnexpectedVirtualStoreDirError.js +var require_UnexpectedVirtualStoreDirError = __commonJS({ + "../get-context/lib/checkCompatibility/UnexpectedVirtualStoreDirError.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var UnexpectedVirtualStoreDirError = class extends error_1.default { + constructor(opts) { + super("UNEXPECTED_VIRTUAL_STORE", "Unexpected virtual store location"); + this.expected = opts.expected; + this.actual = opts.actual; + this.modulesDir = opts.modulesDir; + } + }; + exports2.default = UnexpectedVirtualStoreDirError; + } +}); + +// ../get-context/lib/checkCompatibility/index.js +var require_checkCompatibility = __commonJS({ + "../get-context/lib/checkCompatibility/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var constants_1 = require_lib7(); + var ModulesBreakingChangeError_1 = __importDefault(require_ModulesBreakingChangeError()); + var UnexpectedStoreError_1 = __importDefault(require_UnexpectedStoreError()); + var UnexpectedVirtualStoreDirError_1 = __importDefault(require_UnexpectedVirtualStoreDirError()); + function checkCompatibility(modules, opts) { + if (!modules.layoutVersion || modules.layoutVersion !== constants_1.LAYOUT_VERSION) { + throw new ModulesBreakingChangeError_1.default({ + modulesPath: opts.modulesDir + }); + } + if (!modules.storeDir || path_1.default.relative(modules.storeDir, opts.storeDir) !== "") { + throw new UnexpectedStoreError_1.default({ + actualStorePath: opts.storeDir, + expectedStorePath: modules.storeDir, + modulesDir: opts.modulesDir + }); + } + if (modules.virtualStoreDir && path_1.default.relative(modules.virtualStoreDir, opts.virtualStoreDir) !== "") { + throw new UnexpectedVirtualStoreDirError_1.default({ + actual: opts.virtualStoreDir, + expected: modules.virtualStoreDir, + modulesDir: opts.modulesDir + }); + } + } + exports2.default = checkCompatibility; + } +}); + +// ../../node_modules/.pnpm/ci-info@3.2.0/node_modules/ci-info/vendors.json +var require_vendors = __commonJS({ + "../../node_modules/.pnpm/ci-info@3.2.0/node_modules/ci-info/vendors.json"(exports2, module2) { + module2.exports = [ + { + name: "AppVeyor", + constant: "APPVEYOR", + env: "APPVEYOR", + pr: "APPVEYOR_PULL_REQUEST_NUMBER" + }, + { + name: "Azure Pipelines", + constant: "AZURE_PIPELINES", + env: "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI", + pr: "SYSTEM_PULLREQUEST_PULLREQUESTID" + }, + { + name: "Appcircle", + constant: "APPCIRCLE", + env: "AC_APPCIRCLE" + }, + { + name: "Bamboo", + constant: "BAMBOO", + env: "bamboo_planKey" + }, + { + name: "Bitbucket Pipelines", + constant: "BITBUCKET", + env: "BITBUCKET_COMMIT", + pr: "BITBUCKET_PR_ID" + }, + { + name: "Bitrise", + constant: "BITRISE", + env: "BITRISE_IO", + pr: "BITRISE_PULL_REQUEST" + }, + { + name: "Buddy", + constant: "BUDDY", + env: "BUDDY_WORKSPACE_ID", + pr: "BUDDY_EXECUTION_PULL_REQUEST_ID" + }, + { + name: "Buildkite", + constant: "BUILDKITE", + env: "BUILDKITE", + pr: { env: "BUILDKITE_PULL_REQUEST", ne: "false" } + }, + { + name: "CircleCI", + constant: "CIRCLE", + env: "CIRCLECI", + pr: "CIRCLE_PULL_REQUEST" + }, + { + name: "Cirrus CI", + constant: "CIRRUS", + env: "CIRRUS_CI", + pr: "CIRRUS_PR" + }, + { + name: "AWS CodeBuild", + constant: "CODEBUILD", + env: "CODEBUILD_BUILD_ARN" + }, + { + name: "Codefresh", + constant: "CODEFRESH", + env: "CF_BUILD_ID", + pr: { any: ["CF_PULL_REQUEST_NUMBER", "CF_PULL_REQUEST_ID"] } + }, + { + name: "Codeship", + constant: "CODESHIP", + env: { CI_NAME: "codeship" } + }, + { + name: "Drone", + constant: "DRONE", + env: "DRONE", + pr: { DRONE_BUILD_EVENT: "pull_request" } + }, + { + name: "dsari", + constant: "DSARI", + env: "DSARI" + }, + { + name: "GitHub Actions", + constant: "GITHUB_ACTIONS", + env: "GITHUB_ACTIONS", + pr: { GITHUB_EVENT_NAME: "pull_request" } + }, + { + name: "GitLab CI", + constant: "GITLAB", + env: "GITLAB_CI", + pr: "CI_MERGE_REQUEST_ID" + }, + { + name: "GoCD", + constant: "GOCD", + env: "GO_PIPELINE_LABEL" + }, + { + name: "LayerCI", + constant: "LAYERCI", + env: "LAYERCI", + pr: "LAYERCI_PULL_REQUEST" + }, + { + name: "Hudson", + constant: "HUDSON", + env: "HUDSON_URL" + }, + { + name: "Jenkins", + constant: "JENKINS", + env: ["JENKINS_URL", "BUILD_ID"], + pr: { any: ["ghprbPullId", "CHANGE_ID"] } + }, + { + name: "Magnum CI", + constant: "MAGNUM", + env: "MAGNUM" + }, + { + name: "Netlify CI", + constant: "NETLIFY", + env: "NETLIFY", + pr: { env: "PULL_REQUEST", ne: "false" } + }, + { + name: "Nevercode", + constant: "NEVERCODE", + env: "NEVERCODE", + pr: { env: "NEVERCODE_PULL_REQUEST", ne: "false" } + }, + { + name: "Render", + constant: "RENDER", + env: "RENDER", + pr: { IS_PULL_REQUEST: "true" } + }, + { + name: "Sail CI", + constant: "SAIL", + env: "SAILCI", + pr: "SAIL_PULL_REQUEST_NUMBER" + }, + { + name: "Semaphore", + constant: "SEMAPHORE", + env: "SEMAPHORE", + pr: "PULL_REQUEST_NUMBER" + }, + { + name: "Screwdriver", + constant: "SCREWDRIVER", + env: "SCREWDRIVER", + pr: { env: "SD_PULL_REQUEST", ne: "false" } + }, + { + name: "Shippable", + constant: "SHIPPABLE", + env: "SHIPPABLE", + pr: { IS_PULL_REQUEST: "true" } + }, + { + name: "Solano CI", + constant: "SOLANO", + env: "TDDIUM", + pr: "TDDIUM_PR_ID" + }, + { + name: "Strider CD", + constant: "STRIDER", + env: "STRIDER" + }, + { + name: "TaskCluster", + constant: "TASKCLUSTER", + env: ["TASK_ID", "RUN_ID"] + }, + { + name: "TeamCity", + constant: "TEAMCITY", + env: "TEAMCITY_VERSION" + }, + { + name: "Travis CI", + constant: "TRAVIS", + env: "TRAVIS", + pr: { env: "TRAVIS_PULL_REQUEST", ne: "false" } + }, + { + name: "Vercel", + constant: "VERCEL", + env: "NOW_BUILDER" + }, + { + name: "Visual Studio App Center", + constant: "APPCENTER", + env: "APPCENTER_BUILD_ID" + } + ]; + } +}); + +// ../../node_modules/.pnpm/ci-info@3.2.0/node_modules/ci-info/index.js +var require_ci_info = __commonJS({ + "../../node_modules/.pnpm/ci-info@3.2.0/node_modules/ci-info/index.js"(exports2) { + "use strict"; + var vendors = require_vendors(); + var env = process.env; + Object.defineProperty(exports2, "_vendors", { + value: vendors.map(function(v) { + return v.constant; + }) + }); + exports2.name = null; + exports2.isPR = null; + vendors.forEach(function(vendor) { + const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env]; + const isCI = envs.every(function(obj) { + return checkEnv(obj); + }); + exports2[vendor.constant] = isCI; + if (isCI) { + exports2.name = vendor.name; + switch (typeof vendor.pr) { + case "string": + exports2.isPR = !!env[vendor.pr]; + break; + case "object": + if ("env" in vendor.pr) { + exports2.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne; + } else if ("any" in vendor.pr) { + exports2.isPR = vendor.pr.any.some(function(key) { + return !!env[key]; + }); + } else { + exports2.isPR = checkEnv(vendor.pr); + } + break; + default: + exports2.isPR = null; + } + } + }); + exports2.isCI = !!(env.CI || env.CONTINUOUS_INTEGRATION || env.BUILD_NUMBER || env.RUN_ID || exports2.name || false); + function checkEnv(obj) { + if (typeof obj === "string") + return !!env[obj]; + return Object.keys(obj).every(function(k) { + return env[k] === obj[k]; + }); + } + } +}); + +// ../../node_modules/.pnpm/is-ci@3.0.0/node_modules/is-ci/index.js +var require_is_ci = __commonJS({ + "../../node_modules/.pnpm/is-ci@3.0.0/node_modules/is-ci/index.js"(exports2, module2) { + "use strict"; + module2.exports = require_ci_info().isCI; + } +}); + +// ../get-context/lib/readLockfiles.js +var require_readLockfiles = __commonJS({ + "../get-context/lib/readLockfiles.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var constants_1 = require_lib7(); + var lockfile_file_1 = require_lib57(); + var logger_1 = __importDefault(require_lib6()); + var is_ci_1 = __importDefault(require_is_ci()); + var clone_1 = __importDefault(require_clone3()); + var equals_1 = __importDefault(require_equals2()); + async function default_1(opts) { + var _a, _b, _c; + const lockfileOpts = { + ignoreIncompatible: opts.force || is_ci_1.default, + wantedVersion: constants_1.LOCKFILE_VERSION + }; + const fileReads = []; + let lockfileHadConflicts = false; + if (opts.useLockfile) { + if (!opts.frozenLockfile) { + fileReads.push((async () => { + try { + const { lockfile, hadConflicts } = await lockfile_file_1.readWantedLockfileAndAutofixConflicts(opts.lockfileDir, lockfileOpts); + lockfileHadConflicts = hadConflicts; + return lockfile; + } catch (err) { + logger_1.default.warn({ + message: `Ignoring broken lockfile at ${opts.lockfileDir}: ${err.message}`, + prefix: opts.lockfileDir + }); + return void 0; + } + })()); + } else { + fileReads.push(lockfile_file_1.readWantedLockfile(opts.lockfileDir, lockfileOpts)); + } + } else { + if (await lockfile_file_1.existsWantedLockfile(opts.lockfileDir)) { + logger_1.default.warn({ + message: `A ${constants_1.WANTED_LOCKFILE} file exists. The current configuration prohibits to read or write a lockfile`, + prefix: opts.lockfileDir + }); + } + fileReads.push(Promise.resolve(void 0)); + } + fileReads.push((async () => { + try { + return await lockfile_file_1.readCurrentLockfile(opts.virtualStoreDir, lockfileOpts); + } catch (err) { + logger_1.default.warn({ + message: `Ignoring broken lockfile at ${opts.virtualStoreDir}: ${err.message}`, + prefix: opts.lockfileDir + }); + return void 0; + } + })()); + const files = await Promise.all(fileReads); + const sopts = { lockfileVersion: constants_1.LOCKFILE_VERSION }; + const importerIds = opts.projects.map((importer) => importer.id); + const currentLockfile = (_a = files[1]) !== null && _a !== void 0 ? _a : lockfile_file_1.createLockfileObject(importerIds, sopts); + for (const importerId of importerIds) { + if (!currentLockfile.importers[importerId]) { + currentLockfile.importers[importerId] = { + specifiers: {} + }; + } + } + const wantedLockfile = (_c = (_b = files[0]) !== null && _b !== void 0 ? _b : currentLockfile && clone_1.default(currentLockfile)) !== null && _c !== void 0 ? _c : lockfile_file_1.createLockfileObject(importerIds, sopts); + for (const importerId of importerIds) { + if (!wantedLockfile.importers[importerId]) { + wantedLockfile.importers[importerId] = { + specifiers: {} + }; + } + } + return { + currentLockfile, + currentLockfileIsUpToDate: equals_1.default(currentLockfile, wantedLockfile), + existsCurrentLockfile: files[1] != null, + existsWantedLockfile: files[0] != null, + wantedLockfile, + lockfileHadConflicts + }; + } + exports2.default = default_1; + } +}); + +// ../get-context/lib/index.js +var require_lib67 = __commonJS({ + "../get-context/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getContextForSingleImporter = exports2.UnexpectedVirtualStoreDirError = exports2.UnexpectedStoreError = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var core_loggers_1 = require_lib12(); + var error_1 = __importDefault(require_lib8()); + var logger_1 = __importDefault(require_lib6()); + var read_projects_context_1 = __importDefault(require_lib66()); + var types_1 = require_lib14(); + var rimraf_1 = __importDefault(require_rimraf()); + var path_absolute_1 = __importDefault(require_path_absolute()); + var clone_1 = __importDefault(require_clone3()); + var equals_1 = __importDefault(require_equals2()); + var checkCompatibility_1 = __importDefault(require_checkCompatibility()); + var UnexpectedStoreError_1 = __importDefault(require_UnexpectedStoreError()); + exports2.UnexpectedStoreError = UnexpectedStoreError_1.default; + var UnexpectedVirtualStoreDirError_1 = __importDefault(require_UnexpectedVirtualStoreDirError()); + exports2.UnexpectedVirtualStoreDirError = UnexpectedVirtualStoreDirError_1.default; + var readLockfiles_1 = __importDefault(require_readLockfiles()); + async function getContext(projects, opts) { + var _a, _b, _c, _d, _e, _f, _g; + const modulesDir = (_a = opts.modulesDir) !== null && _a !== void 0 ? _a : "node_modules"; + let importersContext = await read_projects_context_1.default(projects, { lockfileDir: opts.lockfileDir, modulesDir }); + const virtualStoreDir = path_absolute_1.default((_b = opts.virtualStoreDir) !== null && _b !== void 0 ? _b : path_1.default.join(modulesDir, ".pnpm"), opts.lockfileDir); + if (importersContext.modules != null) { + const { purged } = await validateModules(importersContext.modules, importersContext.projects, { + currentHoistPattern: importersContext.currentHoistPattern, + currentPublicHoistPattern: importersContext.currentPublicHoistPattern, + forceNewModules: opts.forceNewModules === true, + include: opts.include, + lockfileDir: opts.lockfileDir, + modulesDir, + registries: opts.registries, + storeDir: opts.storeDir, + virtualStoreDir, + forceHoistPattern: opts.forceHoistPattern, + hoistPattern: opts.hoistPattern, + forcePublicHoistPattern: opts.forcePublicHoistPattern, + publicHoistPattern: opts.publicHoistPattern + }); + if (purged) { + importersContext = await read_projects_context_1.default(projects, { + lockfileDir: opts.lockfileDir, + modulesDir + }); + } + } + await fs_1.promises.mkdir(opts.storeDir, { recursive: true }); + projects.forEach((project) => { + core_loggers_1.packageManifestLogger.debug({ + initial: project.manifest, + prefix: project.rootDir + }); + }); + if (((_c = opts.hooks) === null || _c === void 0 ? void 0 : _c.readPackage) != null) { + for (const project of importersContext.projects) { + project.originalManifest = project.manifest; + project.manifest = opts.hooks.readPackage(clone_1.default(project.manifest), project.rootDir); + } + } + const extraBinPaths = [ + ...opts.extraBinPaths || [] + ]; + const hoistedModulesDir = path_1.default.join(virtualStoreDir, "node_modules"); + if ((_d = opts.hoistPattern) === null || _d === void 0 ? void 0 : _d.length) { + extraBinPaths.unshift(path_1.default.join(hoistedModulesDir, ".bin")); + } + const ctx = { + extraBinPaths, + hoistedDependencies: importersContext.hoistedDependencies, + hoistedModulesDir, + hoistPattern: (_e = importersContext.currentHoistPattern) !== null && _e !== void 0 ? _e : opts.hoistPattern, + include: (_f = opts.include) !== null && _f !== void 0 ? _f : importersContext.include, + lockfileDir: opts.lockfileDir, + modulesFile: importersContext.modules, + pendingBuilds: importersContext.pendingBuilds, + projects: importersContext.projects, + publicHoistPattern: (_g = importersContext.currentPublicHoistPattern) !== null && _g !== void 0 ? _g : opts.publicHoistPattern, + registries: { + ...opts.registries, + ...importersContext.registries + }, + rootModulesDir: importersContext.rootModulesDir, + skipped: importersContext.skipped, + storeDir: opts.storeDir, + virtualStoreDir, + ...await readLockfiles_1.default({ + force: opts.force, + forceSharedLockfile: opts.forceSharedLockfile, + frozenLockfile: opts.frozenLockfile === true, + lockfileDir: opts.lockfileDir, + projects: importersContext.projects, + registry: opts.registries.default, + useLockfile: opts.useLockfile, + virtualStoreDir + }) + }; + core_loggers_1.contextLogger.debug({ + currentLockfileExists: ctx.existsCurrentLockfile, + storeDir: opts.storeDir, + virtualStoreDir + }); + return ctx; + } + exports2.default = getContext; + async function validateModules(modules, projects, opts) { + const rootProject = projects.find(({ id }) => id === "."); + if (opts.forcePublicHoistPattern && !equals_1.default(modules.publicHoistPattern, opts.publicHoistPattern || void 0)) { + if (opts.forceNewModules && rootProject != null) { + await purgeModulesDirsOfImporter(opts.virtualStoreDir, rootProject); + return { purged: true }; + } + throw new error_1.default("PUBLIC_HOIST_PATTERN_DIFF", 'This modules directory was created using a different public-hoist-pattern value. Run "pnpm install" to recreate the modules directory.'); + } + let purged = false; + if (opts.forceHoistPattern && rootProject != null) { + try { + if (!equals_1.default(opts.currentHoistPattern, opts.hoistPattern || void 0)) { + throw new error_1.default("HOIST_PATTERN_DIFF", 'This modules directory was created using a different hoist-pattern value. Run "pnpm install" to recreate the modules directory.'); + } + } catch (err) { + if (!opts.forceNewModules) + throw err; + await purgeModulesDirsOfImporter(opts.virtualStoreDir, rootProject); + purged = true; + } + } + await Promise.all(projects.map(async (project) => { + try { + checkCompatibility_1.default(modules, { + modulesDir: project.modulesDir, + storeDir: opts.storeDir, + virtualStoreDir: opts.virtualStoreDir + }); + if (opts.lockfileDir !== project.rootDir && opts.include != null && modules.included) { + for (const depsField of types_1.DEPENDENCIES_FIELDS) { + if (opts.include[depsField] !== modules.included[depsField]) { + throw new error_1.default("INCLUDED_DEPS_CONFLICT", `modules directory (at "${opts.lockfileDir}") was installed with ${stringifyIncludedDeps(modules.included)}. Current install wants ${stringifyIncludedDeps(opts.include)}.`); + } + } + } + } catch (err) { + if (!opts.forceNewModules) + throw err; + await purgeModulesDirsOfImporter(opts.virtualStoreDir, project); + purged = true; + } + })); + if (modules.registries != null && !equals_1.default(opts.registries, modules.registries)) { + if (opts.forceNewModules) { + await Promise.all(projects.map(purgeModulesDirsOfImporter.bind(null, opts.virtualStoreDir))); + return { purged: true }; + } + throw new error_1.default("REGISTRIES_MISMATCH", `This modules directory was created using the following registries configuration: ${JSON.stringify(modules.registries)}. The current configuration is ${JSON.stringify(opts.registries)}. To recreate the modules directory using the new settings, run "pnpm install".`); + } + if (purged && rootProject == null) { + await purgeModulesDirsOfImporter(opts.virtualStoreDir, { + modulesDir: path_1.default.join(opts.lockfileDir, opts.modulesDir), + rootDir: opts.lockfileDir + }); + } + return { purged }; + } + async function purgeModulesDirsOfImporter(virtualStoreDir, importer) { + logger_1.default.info({ + message: `Recreating ${importer.modulesDir}`, + prefix: importer.rootDir + }); + try { + await removeContentsOfDir(importer.modulesDir, virtualStoreDir); + } catch (err) { + if (err.code !== "ENOENT") + throw err; + } + } + async function removeContentsOfDir(dir, virtualStoreDir) { + const items = await fs_1.promises.readdir(dir); + for (const item of items) { + if (item.startsWith(".") && item !== ".bin" && item !== ".modules.yaml" && !dirsAreEqual(path_1.default.join(dir, item), virtualStoreDir)) { + continue; + } + await rimraf_1.default(path_1.default.join(dir, item)); + } + } + function dirsAreEqual(dir1, dir2) { + return path_1.default.relative(dir1, dir2) === ""; + } + function stringifyIncludedDeps(included) { + return types_1.DEPENDENCIES_FIELDS.filter((depsField) => included[depsField]).join(", "); + } + async function getContextForSingleImporter(manifest, opts, alreadyPurged = false) { + var _a, _b, _c, _d, _e, _f, _g; + const { currentHoistPattern, currentPublicHoistPattern, hoistedDependencies, projects, include, modules, pendingBuilds, registries, skipped, rootModulesDir } = await read_projects_context_1.default([ + { + rootDir: opts.dir + } + ], { + lockfileDir: opts.lockfileDir, + modulesDir: opts.modulesDir + }); + const storeDir = opts.storeDir; + const importer = projects[0]; + const modulesDir = importer.modulesDir; + const importerId = importer.id; + const virtualStoreDir = path_absolute_1.default((_a = opts.virtualStoreDir) !== null && _a !== void 0 ? _a : "node_modules/.pnpm", opts.lockfileDir); + if (modules != null && !alreadyPurged) { + const { purged } = await validateModules(modules, projects, { + currentHoistPattern, + currentPublicHoistPattern, + forceNewModules: opts.forceNewModules === true, + include: opts.include, + lockfileDir: opts.lockfileDir, + modulesDir: (_b = opts.modulesDir) !== null && _b !== void 0 ? _b : "node_modules", + registries: opts.registries, + storeDir: opts.storeDir, + virtualStoreDir, + forceHoistPattern: opts.forceHoistPattern, + hoistPattern: opts.hoistPattern, + forcePublicHoistPattern: opts.forcePublicHoistPattern, + publicHoistPattern: opts.publicHoistPattern + }); + if (purged) { + return getContextForSingleImporter(manifest, opts, true); + } + } + await fs_1.promises.mkdir(storeDir, { recursive: true }); + const extraBinPaths = [ + ...opts.extraBinPaths || [] + ]; + const hoistedModulesDir = path_1.default.join(virtualStoreDir, "node_modules"); + if ((_c = opts.hoistPattern) === null || _c === void 0 ? void 0 : _c.length) { + extraBinPaths.unshift(path_1.default.join(hoistedModulesDir, ".bin")); + } + const ctx = { + extraBinPaths, + hoistedDependencies, + hoistedModulesDir, + hoistPattern: currentHoistPattern !== null && currentHoistPattern !== void 0 ? currentHoistPattern : opts.hoistPattern, + importerId, + include: (_d = opts.include) !== null && _d !== void 0 ? _d : include, + lockfileDir: opts.lockfileDir, + manifest: (_g = (_f = (_e = opts.hooks) === null || _e === void 0 ? void 0 : _e.readPackage) === null || _f === void 0 ? void 0 : _f.call(_e, manifest)) !== null && _g !== void 0 ? _g : manifest, + modulesDir, + modulesFile: modules, + pendingBuilds, + prefix: opts.dir, + publicHoistPattern: currentPublicHoistPattern !== null && currentPublicHoistPattern !== void 0 ? currentPublicHoistPattern : opts.publicHoistPattern, + registries: { + ...opts.registries, + ...registries + }, + rootModulesDir, + skipped, + storeDir, + virtualStoreDir, + ...await readLockfiles_1.default({ + force: opts.force, + forceSharedLockfile: opts.forceSharedLockfile, + frozenLockfile: false, + lockfileDir: opts.lockfileDir, + projects: [{ id: importerId, rootDir: opts.dir }], + registry: opts.registries.default, + useLockfile: opts.useLockfile, + virtualStoreDir + }) + }; + core_loggers_1.packageManifestLogger.debug({ + initial: manifest, + prefix: opts.dir + }); + core_loggers_1.contextLogger.debug({ + currentLockfileExists: ctx.existsCurrentLockfile, + storeDir: opts.storeDir, + virtualStoreDir + }); + return ctx; + } + exports2.getContextForSingleImporter = getContextForSingleImporter; + } +}); + +// ../package-bins/lib/index.js +var require_lib68 = __commonJS({ + "../package-bins/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var fast_glob_1 = __importDefault(require_out4()); + var is_subdir_1 = __importDefault(require_is_subdir()); + async function binify(manifest, pkgPath) { + var _a; + if (manifest.bin) { + return commandsFromBin(manifest.bin, manifest.name, pkgPath); + } + if ((_a = manifest.directories) === null || _a === void 0 ? void 0 : _a.bin) { + const binDir = path_1.default.join(pkgPath, manifest.directories.bin); + const files = await findFiles(binDir); + return files.map((file) => ({ + name: path_1.default.basename(file), + path: path_1.default.join(binDir, file) + })); + } + return []; + } + exports2.default = binify; + async function findFiles(dir) { + try { + return await fast_glob_1.default("**", { + cwd: dir, + onlyFiles: true, + followSymbolicLinks: false + }); + } catch (err) { + if (err.code !== "ENOENT") { + throw err; + } + return []; + } + } + function commandsFromBin(bin, pkgName, pkgPath) { + if (typeof bin === "string") { + return [ + { + name: pkgName.startsWith("@") ? pkgName.substr(pkgName.indexOf("/") + 1) : pkgName, + path: path_1.default.join(pkgPath, bin) + } + ]; + } + return Object.keys(bin).filter((commandName) => encodeURIComponent(commandName) === commandName || commandName === "$").map((commandName) => ({ + name: commandName, + path: path_1.default.join(pkgPath, bin[commandName]) + })).filter((cmd) => is_subdir_1.default(pkgPath, cmd.path)); + } + } +}); + +// ../read-modules-dir/lib/index.js +var require_lib69 = __commonJS({ + "../read-modules-dir/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var util_1 = __importDefault(require("util")); + var graceful_fs_1 = __importDefault(require_graceful_fs()); + var readdir = util_1.default.promisify(graceful_fs_1.default.readdir); + async function readModulesDir(modulesDir) { + try { + return await _readModulesDir(modulesDir); + } catch (err) { + if (err["code"] === "ENOENT") + return null; + throw err; + } + } + exports2.default = readModulesDir; + async function _readModulesDir(modulesDir, scope) { + let pkgNames = []; + const parentDir = scope ? path_1.default.join(modulesDir, scope) : modulesDir; + for (const dir of await readdir(parentDir, { withFileTypes: true })) { + if (dir.isFile() || dir.name[0] === ".") + continue; + if (!scope && dir.name[0] === "@") { + pkgNames = [ + ...pkgNames, + ...await _readModulesDir(modulesDir, dir.name) + ]; + continue; + } + const pkgName = scope ? `${scope}/${dir.name}` : dir.name; + pkgNames.push(pkgName); + } + return pkgNames; + } + } +}); + +// ../../node_modules/.pnpm/p-settle@4.1.1/node_modules/p-settle/index.js +var require_p_settle = __commonJS({ + "../../node_modules/.pnpm/p-settle@4.1.1/node_modules/p-settle/index.js"(exports2, module2) { + "use strict"; + var pReflect = require_p_reflect(); + var pLimit = require_p_limit2(); + module2.exports = async (array, options = {}) => { + const { concurrency = Infinity } = options; + const limit = pLimit(concurrency); + return Promise.all(array.map((element) => { + if (element && typeof element.then === "function") { + return pReflect(element); + } + if (typeof element === "function") { + return pReflect(limit(() => element())); + } + return pReflect(Promise.resolve(element)); + })); + }; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_concat.js +var require_concat3 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_concat.js"(exports2, module2) { + function _concat(set1, set2) { + set1 = set1 || []; + set2 = set2 || []; + var idx; + var len1 = set1.length; + var len2 = set2.length; + var result = []; + idx = 0; + while (idx < len1) { + result[result.length] = set1[idx]; + idx += 1; + } + idx = 0; + while (idx < len2) { + result[result.length] = set2[idx]; + idx += 1; + } + return result; + } + module2.exports = _concat; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_pipe.js +var require_pipe2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_pipe.js"(exports2, module2) { + function _pipe(f, g) { + return function() { + return g.call(this, f.apply(this, arguments)); + }; + } + module2.exports = _pipe; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_checkForMethod.js +var require_checkForMethod = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_checkForMethod.js"(exports2, module2) { + var _isArray = require_isArray(); + function _checkForMethod(methodname, fn2) { + return function() { + var length = arguments.length; + if (length === 0) { + return fn2(); + } + var obj = arguments[length - 1]; + return _isArray(obj) || typeof obj[methodname] !== "function" ? fn2.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1)); + }; + } + module2.exports = _checkForMethod; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/slice.js +var require_slice = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/slice.js"(exports2, module2) { + var _checkForMethod = require_checkForMethod(); + var _curry3 = require_curry3(); + var slice = /* @__PURE__ */ _curry3(/* @__PURE__ */ _checkForMethod("slice", function slice2(fromIndex, toIndex, list) { + return Array.prototype.slice.call(list, fromIndex, toIndex); + })); + module2.exports = slice; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/tail.js +var require_tail = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/tail.js"(exports2, module2) { + var _checkForMethod = require_checkForMethod(); + var _curry1 = require_curry1(); + var slice = require_slice(); + var tail = /* @__PURE__ */ _curry1(/* @__PURE__ */ _checkForMethod("tail", /* @__PURE__ */ slice(1, Infinity))); + module2.exports = tail; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/pipe.js +var require_pipe3 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/pipe.js"(exports2, module2) { + var _arity = require_arity(); + var _pipe = require_pipe2(); + var reduce = require_reduce3(); + var tail = require_tail(); + function pipe() { + if (arguments.length === 0) { + throw new Error("pipe requires at least one argument"); + } + return _arity(arguments[0].length, reduce(_pipe, arguments[0], tail(arguments))); + } + module2.exports = pipe; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/reverse.js +var require_reverse = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/reverse.js"(exports2, module2) { + var _curry1 = require_curry1(); + var _isString = require_isString(); + var reverse = /* @__PURE__ */ _curry1(function reverse2(list) { + return _isString(list) ? list.split("").reverse().join("") : Array.prototype.slice.call(list, 0).reverse(); + }); + module2.exports = reverse; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/compose.js +var require_compose = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/compose.js"(exports2, module2) { + var pipe = require_pipe3(); + var reverse = require_reverse(); + function compose() { + if (arguments.length === 0) { + throw new Error("compose requires at least one argument"); + } + return pipe.apply(this, reverse(arguments)); + } + module2.exports = compose; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_identity.js +var require_identity3 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_identity.js"(exports2, module2) { + function _identity(x) { + return x; + } + module2.exports = _identity; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/identity.js +var require_identity4 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/identity.js"(exports2, module2) { + var _curry1 = require_curry1(); + var _identity = require_identity3(); + var identity = /* @__PURE__ */ _curry1(_identity); + module2.exports = identity; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/uniqBy.js +var require_uniqBy = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/uniqBy.js"(exports2, module2) { + var _Set = require_Set(); + var _curry2 = require_curry2(); + var uniqBy = /* @__PURE__ */ _curry2(function uniqBy2(fn2, list) { + var set = new _Set(); + var result = []; + var idx = 0; + var appliedItem, item; + while (idx < list.length) { + item = list[idx]; + appliedItem = fn2(item); + if (set.add(appliedItem)) { + result.push(item); + } + idx += 1; + } + return result; + }); + module2.exports = uniqBy; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/uniq.js +var require_uniq = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/uniq.js"(exports2, module2) { + var identity = require_identity4(); + var uniqBy = require_uniqBy(); + var uniq = /* @__PURE__ */ uniqBy(identity); + module2.exports = uniq; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/union.js +var require_union = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/union.js"(exports2, module2) { + var _concat = require_concat3(); + var _curry2 = require_curry2(); + var compose = require_compose(); + var uniq = require_uniq(); + var union = /* @__PURE__ */ _curry2(/* @__PURE__ */ compose(uniq, _concat)); + module2.exports = union; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_makeFlat.js +var require_makeFlat = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_makeFlat.js"(exports2, module2) { + var _isArrayLike = require_isArrayLike2(); + function _makeFlat(recursive) { + return function flatt(list) { + var value, jlen, j; + var result = []; + var idx = 0; + var ilen = list.length; + while (idx < ilen) { + if (_isArrayLike(list[idx])) { + value = recursive ? flatt(list[idx]) : list[idx]; + j = 0; + jlen = value.length; + while (j < jlen) { + result[result.length] = value[j]; + j += 1; + } + } else { + result[result.length] = list[idx]; + } + idx += 1; + } + return result; + }; + } + module2.exports = _makeFlat; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_forceReduced.js +var require_forceReduced = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_forceReduced.js"(exports2, module2) { + function _forceReduced(x) { + return { + "@@transducer/value": x, + "@@transducer/reduced": true + }; + } + module2.exports = _forceReduced; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_flatCat.js +var require_flatCat = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_flatCat.js"(exports2, module2) { + var _forceReduced = require_forceReduced(); + var _isArrayLike = require_isArrayLike2(); + var _reduce = require_reduce2(); + var _xfBase = require_xfBase(); + var preservingReduced = function(xf) { + return { + "@@transducer/init": _xfBase.init, + "@@transducer/result": function(result) { + return xf["@@transducer/result"](result); + }, + "@@transducer/step": function(result, input) { + var ret = xf["@@transducer/step"](result, input); + return ret["@@transducer/reduced"] ? _forceReduced(ret) : ret; + } + }; + }; + var _flatCat = function _xcat(xf) { + var rxf = preservingReduced(xf); + return { + "@@transducer/init": _xfBase.init, + "@@transducer/result": function(result) { + return rxf["@@transducer/result"](result); + }, + "@@transducer/step": function(result, input) { + return !_isArrayLike(input) ? _reduce(rxf, result, [input]) : _reduce(rxf, result, input); + } + }; + }; + module2.exports = _flatCat; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xchain.js +var require_xchain = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xchain.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _flatCat = require_flatCat(); + var map = require_map4(); + var _xchain = /* @__PURE__ */ _curry2(function _xchain2(f, xf) { + return map(f, _flatCat(xf)); + }); + module2.exports = _xchain; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/chain.js +var require_chain = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/chain.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _dispatchable = require_dispatchable(); + var _makeFlat = require_makeFlat(); + var _xchain = require_xchain(); + var map = require_map4(); + var chain = /* @__PURE__ */ _curry2(/* @__PURE__ */ _dispatchable(["fantasy-land/chain", "chain"], _xchain, function chain2(fn2, monad) { + if (typeof monad === "function") { + return function(x) { + return fn2(monad(x))(x); + }; + } + return _makeFlat(false)(map(fn2, monad)); + })); + module2.exports = chain; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/unnest.js +var require_unnest = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/unnest.js"(exports2, module2) { + var _identity = require_identity3(); + var chain = require_chain(); + var unnest = /* @__PURE__ */ chain(_identity); + module2.exports = unnest; + } +}); + +// ../link-bins/lib/index.js +var require_lib70 = __commonJS({ + "../link-bins/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.linkBinsOfPackages = void 0; + var fs_1 = require("fs"); + var module_1 = __importDefault(require("module")); + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var manifest_utils_1 = require_lib15(); + var package_bins_1 = __importDefault(require_lib68()); + var read_modules_dir_1 = __importDefault(require_lib69()); + var read_package_json_1 = require_lib32(); + var read_project_manifest_1 = require_lib19(); + var cmd_shim_1 = __importDefault(require_cmd_shim()); + var is_subdir_1 = __importDefault(require_is_subdir()); + var is_windows_1 = __importDefault(require_is_windows()); + var normalize_path_1 = __importDefault(require_normalize_path()); + var p_settle_1 = __importDefault(require_p_settle()); + var fromPairs_1 = __importDefault(require_fromPairs()); + var isEmpty_1 = __importDefault(require_isEmpty2()); + var union_1 = __importDefault(require_union()); + var unnest_1 = __importDefault(require_unnest()); + var partition_1 = __importDefault(require_partition4()); + var IS_WINDOWS = is_windows_1.default(); + var EXECUTABLE_SHEBANG_SUPPORTED = !IS_WINDOWS; + var POWER_SHELL_IS_SUPPORTED = IS_WINDOWS; + exports2.default = async (modulesDir, binsDir, opts) => { + const allDeps = await read_modules_dir_1.default(modulesDir); + if (allDeps === null) + return []; + const pkgBinOpts = { + allowExoticManifests: false, + ...opts + }; + const directDependencies = opts.projectManifest == null ? void 0 : new Set(Object.keys(manifest_utils_1.getAllDependenciesFromManifest(opts.projectManifest))); + const allCmds = unnest_1.default((await Promise.all(allDeps.map((alias) => { + var _a; + return { + depDir: path_1.default.resolve(modulesDir, alias), + isDirectDependency: directDependencies === null || directDependencies === void 0 ? void 0 : directDependencies.has(alias), + nodeExecPath: (_a = opts.nodeExecPathByAlias) === null || _a === void 0 ? void 0 : _a[alias] + }; + }).filter(({ depDir }) => !is_subdir_1.default(depDir, binsDir)).map(async ({ depDir, isDirectDependency, nodeExecPath }) => { + const target = normalize_path_1.default(depDir); + const cmds = await getPackageBins(pkgBinOpts, target, nodeExecPath); + return cmds.map((cmd) => ({ ...cmd, isDirectDependency })); + }))).filter((cmds) => cmds.length)); + const cmdsToLink = directDependencies != null ? preferDirectCmds(allCmds) : allCmds; + return linkBins(cmdsToLink, binsDir, opts); + }; + function preferDirectCmds(allCmds) { + const [directCmds, hoistedCmds] = partition_1.default((cmd) => cmd.isDirectDependency === true, allCmds); + const usedDirectCmds = new Set(directCmds.map((directCmd) => directCmd.name)); + return [ + ...directCmds, + ...hoistedCmds.filter(({ name }) => !usedDirectCmds.has(name)) + ]; + } + async function linkBinsOfPackages(pkgs, binsTarget, opts) { + if (pkgs.length === 0) + return []; + const allCmds = unnest_1.default((await Promise.all(pkgs.map(async (pkg) => getPackageBinsFromManifest(pkg.manifest, pkg.location, pkg.nodeExecPath)))).filter((cmds) => cmds.length)); + return linkBins(allCmds, binsTarget, opts); + } + exports2.linkBinsOfPackages = linkBinsOfPackages; + async function linkBins(allCmds, binsDir, opts) { + if (allCmds.length === 0) + return []; + await fs_1.promises.mkdir(binsDir, { recursive: true }); + const [cmdsWithOwnName, cmdsWithOtherNames] = partition_1.default(({ ownName }) => ownName, allCmds); + const results1 = await p_settle_1.default(cmdsWithOwnName.map(async (cmd) => linkBin(cmd, binsDir, opts))); + const usedNames = fromPairs_1.default(cmdsWithOwnName.map((cmd) => [cmd.name, cmd.name])); + const results2 = await p_settle_1.default(cmdsWithOtherNames.map(async (cmd) => { + if (usedNames[cmd.name]) { + opts.warn(`Cannot link binary '${cmd.name}' of '${cmd.pkgName}' to '${binsDir}': binary of '${usedNames[cmd.name]}' is already linked`, "BINARIES_CONFLICT"); + return Promise.resolve(void 0); + } + usedNames[cmd.name] = cmd.pkgName; + return linkBin(cmd, binsDir, opts); + })); + for (const result of [...results1, ...results2]) { + if (result.isRejected) { + throw result.reason; + } + } + return allCmds.map((cmd) => cmd.pkgName); + } + async function isFromModules(filename) { + const real = await fs_1.promises.realpath(filename); + return normalize_path_1.default(real).includes("/node_modules/"); + } + async function getPackageBins(opts, target, nodeExecPath) { + const manifest = opts.allowExoticManifests ? await read_project_manifest_1.safeReadProjectManifestOnly(target) : await safeReadPkgJson(target); + if (manifest == null) { + return []; + } + if (isEmpty_1.default(manifest.bin) && !await isFromModules(target)) { + opts.warn(`Package in ${target} must have a non-empty bin field to get bin linked.`, "EMPTY_BIN"); + } + if (typeof manifest.bin === "string" && !manifest.name) { + throw new error_1.default("INVALID_PACKAGE_NAME", `Package in ${target} must have a name to get bin linked.`); + } + return getPackageBinsFromManifest(manifest, target, nodeExecPath); + } + async function getPackageBinsFromManifest(manifest, pkgDir, nodeExecPath) { + const cmds = await package_bins_1.default(manifest, pkgDir); + return cmds.map((cmd) => ({ + ...cmd, + ownName: cmd.name === manifest.name, + pkgName: manifest.name, + makePowerShellShim: POWER_SHELL_IS_SUPPORTED && manifest.name !== "pnpm", + nodeExecPath + })); + } + async function linkBin(cmd, binsDir, opts) { + const externalBinPath = path_1.default.join(binsDir, cmd.name); + if (EXECUTABLE_SHEBANG_SUPPORTED) { + await fs_1.promises.chmod(cmd.path, 493); + } + let nodePath; + if ((opts === null || opts === void 0 ? void 0 : opts.extendNodePath) !== false) { + nodePath = await getBinNodePaths(cmd.path); + const binsParentDir = path_1.default.dirname(binsDir); + if (path_1.default.relative(cmd.path, binsParentDir) !== "") { + nodePath = union_1.default(nodePath, await getBinNodePaths(binsParentDir)); + } + } + return cmd_shim_1.default(cmd.path, externalBinPath, { + createPwshFile: cmd.makePowerShellShim, + nodePath, + nodeExecPath: cmd.nodeExecPath + }); + } + async function getBinNodePaths(target) { + const targetDir = path_1.default.dirname(target); + const targetRealPath = await fs_1.promises.realpath(targetDir); + return union_1.default(module_1.default["_nodeModulePaths"](targetRealPath), module_1.default["_nodeModulePaths"](targetDir)); + } + async function safeReadPkgJson(pkgDir) { + try { + return await read_package_json_1.fromDir(pkgDir); + } catch (err) { + if (err.code === "ENOENT") { + return null; + } + throw err; + } + } + } +}); + +// ../filter-lockfile/lib/filterImporter.js +var require_filterImporter = __commonJS({ + "../filter-lockfile/lib/filterImporter.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function filterImporter(importer, include) { + var _a, _b, _c; + return { + dependencies: !include.dependencies ? {} : (_a = importer.dependencies) !== null && _a !== void 0 ? _a : {}, + devDependencies: !include.devDependencies ? {} : (_b = importer.devDependencies) !== null && _b !== void 0 ? _b : {}, + optionalDependencies: !include.optionalDependencies ? {} : (_c = importer.optionalDependencies) !== null && _c !== void 0 ? _c : {}, + specifiers: importer.specifiers + }; + } + exports2.default = filterImporter; + } +}); + +// ../filter-lockfile/lib/filterLockfile.js +var require_filterLockfile = __commonJS({ + "../filter-lockfile/lib/filterLockfile.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fromPairs_1 = __importDefault(require_fromPairs()); + var filterImporter_1 = __importDefault(require_filterImporter()); + function filterLockfile(lockfile, opts) { + var _a; + let pairs = Object.entries((_a = lockfile.packages) !== null && _a !== void 0 ? _a : {}).filter(([depPath, pkg]) => !opts.skipped.has(depPath)); + if (!opts.include.dependencies) { + pairs = pairs.filter(([depPath, pkg]) => pkg.dev !== false || pkg.optional); + } + if (!opts.include.devDependencies) { + pairs = pairs.filter(([depPath, pkg]) => pkg.dev !== true); + } + if (!opts.include.optionalDependencies) { + pairs = pairs.filter(([depPath, pkg]) => !pkg.optional); + } + return { + ...lockfile, + importers: Object.keys(lockfile.importers).reduce((acc, importerId) => { + acc[importerId] = filterImporter_1.default(lockfile.importers[importerId], opts.include); + return acc; + }, {}), + packages: fromPairs_1.default(pairs) + }; + } + exports2.default = filterLockfile; + } +}); + +// ../filter-lockfile/lib/LockfileMissingDependencyError.js +var require_LockfileMissingDependencyError = __commonJS({ + "../filter-lockfile/lib/LockfileMissingDependencyError.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var constants_1 = require_lib7(); + var error_1 = __importDefault(require_lib8()); + var LockfileMissingDependencyError = class extends error_1.default { + constructor(depPath) { + const message2 = `Broken lockfile: no entry for '${depPath}' in ${constants_1.WANTED_LOCKFILE}`; + super("LOCKFILE_MISSING_DEPENDENCY", message2, { + hint: "This issue is probably caused by a badly resolved merge conflict.\nTo fix the lockfile, run 'pnpm install --no-frozen-lockfile'." + }); + } + }; + exports2.default = LockfileMissingDependencyError; + } +}); + +// ../filter-lockfile/lib/filterLockfileByImporters.js +var require_filterLockfileByImporters = __commonJS({ + "../filter-lockfile/lib/filterLockfileByImporters.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var constants_1 = require_lib7(); + var lockfile_walker_1 = __importDefault(require_lib54()); + var logger_1 = __importDefault(require_lib6()); + var filterImporter_1 = __importDefault(require_filterImporter()); + var LockfileMissingDependencyError_1 = __importDefault(require_LockfileMissingDependencyError()); + var logger = logger_1.default("lockfile"); + function filterByImporters(lockfile, importerIds, opts) { + const packages = {}; + if (lockfile.packages != null) { + pkgAllDeps(lockfile_walker_1.default(lockfile, importerIds, { include: opts.include, skipped: opts.skipped }).step, packages, { + failOnMissingDependencies: opts.failOnMissingDependencies + }); + } + const importers = importerIds.reduce((acc, importerId) => { + acc[importerId] = filterImporter_1.default(lockfile.importers[importerId], opts.include); + return acc; + }, { ...lockfile.importers }); + return { + ...lockfile, + importers, + packages + }; + } + exports2.default = filterByImporters; + function pkgAllDeps(step, pickedPackages, opts) { + for (const { pkgSnapshot, depPath, next } of step.dependencies) { + pickedPackages[depPath] = pkgSnapshot; + pkgAllDeps(next(), pickedPackages, opts); + } + for (const depPath of step.missing) { + if (opts.failOnMissingDependencies) { + throw new LockfileMissingDependencyError_1.default(depPath); + } + logger.debug(`No entry for "${depPath}" in ${constants_1.WANTED_LOCKFILE}`); + } + } + } +}); + +// ../filter-lockfile/lib/filterLockfileByImportersAndEngine.js +var require_filterLockfileByImportersAndEngine = __commonJS({ + "../filter-lockfile/lib/filterLockfileByImportersAndEngine.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var constants_1 = require_lib7(); + var lockfile_utils_1 = require_lib53(); + var logger_1 = __importDefault(require_lib6()); + var package_is_installable_1 = __importDefault(require_lib13()); + var dp = __importStar2(require_lib33()); + var unnest_1 = __importDefault(require_unnest()); + var filterImporter_1 = __importDefault(require_filterImporter()); + var LockfileMissingDependencyError_1 = __importDefault(require_LockfileMissingDependencyError()); + var logger = logger_1.default("lockfile"); + function filterByImportersAndEngine(lockfile, importerIds, opts) { + const importerDeps = importerIds.map((importerId) => lockfile.importers[importerId]).map((importer) => ({ + ...opts.include.dependencies ? importer.dependencies : {}, + ...opts.include.devDependencies ? importer.devDependencies : {}, + ...opts.include.optionalDependencies ? importer.optionalDependencies : {} + })).map(Object.entries); + const directDepPaths = unnest_1.default(importerDeps).map(([pkgName, ref]) => dp.refToRelative(ref, pkgName)).filter((nodeId) => nodeId !== null); + const packages = lockfile.packages != null ? pickPkgsWithAllDeps(lockfile.packages, directDepPaths, { + currentEngine: opts.currentEngine, + engineStrict: opts.engineStrict, + failOnMissingDependencies: opts.failOnMissingDependencies, + include: opts.include, + includeIncompatiblePackages: opts.includeIncompatiblePackages === true, + lockfileDir: opts.lockfileDir, + skipped: opts.skipped + }) : {}; + const importers = importerIds.reduce((acc, importerId) => { + var _a; + acc[importerId] = filterImporter_1.default(lockfile.importers[importerId], opts.include); + if (acc[importerId].optionalDependencies != null) { + for (const depName of Object.keys((_a = acc[importerId].optionalDependencies) !== null && _a !== void 0 ? _a : {})) { + const depPath = dp.refToRelative(acc[importerId].optionalDependencies[depName], depName); + if (depPath && !packages[depPath]) { + delete acc[importerId].optionalDependencies[depName]; + } + } + } + return acc; + }, { ...lockfile.importers }); + return { + ...lockfile, + importers, + packages + }; + } + exports2.default = filterByImportersAndEngine; + function pickPkgsWithAllDeps(pkgSnapshots, depPaths, opts) { + const pickedPackages = {}; + pkgAllDeps({ pkgSnapshots, pickedPackages }, depPaths, true, opts); + return pickedPackages; + } + function pkgAllDeps(ctx, depPaths, parentIsInstallable, opts) { + var _a; + for (const depPath of depPaths) { + if (ctx.pickedPackages[depPath]) + continue; + const pkgSnapshot = ctx.pkgSnapshots[depPath]; + if (!pkgSnapshot && !depPath.startsWith("link:")) { + if (opts.failOnMissingDependencies) { + throw new LockfileMissingDependencyError_1.default(depPath); + } + logger.debug(`No entry for "${depPath}" in ${constants_1.WANTED_LOCKFILE}`); + continue; + } + let installable; + if (!parentIsInstallable) { + installable = false; + if (!ctx.pickedPackages[depPath] && pkgSnapshot.optional === true) { + opts.skipped.add(depPath); + } + } else { + const pkg = { + ...lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot), + cpu: pkgSnapshot.cpu, + engines: pkgSnapshot.engines, + os: pkgSnapshot.os + }; + installable = opts.includeIncompatiblePackages || package_is_installable_1.default((_a = pkgSnapshot.id) !== null && _a !== void 0 ? _a : depPath, pkg, { + engineStrict: opts.engineStrict, + lockfileDir: opts.lockfileDir, + nodeVersion: opts.currentEngine.nodeVersion, + optional: pkgSnapshot.optional === true, + pnpmVersion: opts.currentEngine.pnpmVersion + }) !== false; + if (!installable) { + if (!ctx.pickedPackages[depPath] && pkgSnapshot.optional === true) { + opts.skipped.add(depPath); + } + } else { + opts.skipped.delete(depPath); + } + } + ctx.pickedPackages[depPath] = pkgSnapshot; + const nextRelDepPaths = Object.entries({ + ...pkgSnapshot.dependencies, + ...opts.include.optionalDependencies ? pkgSnapshot.optionalDependencies : {} + }).map(([pkgName, ref]) => { + var _a2; + if ((_a2 = pkgSnapshot.peerDependencies) === null || _a2 === void 0 ? void 0 : _a2[pkgName]) + return null; + return dp.refToRelative(ref, pkgName); + }).filter((nodeId) => nodeId !== null); + pkgAllDeps(ctx, nextRelDepPaths, installable, opts); + } + } + } +}); + +// ../filter-lockfile/lib/index.js +var require_lib71 = __commonJS({ + "../filter-lockfile/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.filterLockfileByImportersAndEngine = exports2.filterLockfileByImporters = void 0; + var filterLockfile_1 = __importDefault(require_filterLockfile()); + var filterLockfileByImporters_1 = __importDefault(require_filterLockfileByImporters()); + exports2.filterLockfileByImporters = filterLockfileByImporters_1.default; + var filterLockfileByImportersAndEngine_1 = __importDefault(require_filterLockfileByImportersAndEngine()); + exports2.filterLockfileByImportersAndEngine = filterLockfileByImportersAndEngine_1.default; + exports2.default = filterLockfile_1.default; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/mergeAll.js +var require_mergeAll2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/mergeAll.js"(exports2, module2) { + var _objectAssign = require_objectAssign(); + var _curry1 = require_curry1(); + var mergeAll = /* @__PURE__ */ _curry1(function mergeAll2(list) { + return _objectAssign.apply(null, [{}].concat(list)); + }); + module2.exports = mergeAll; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/pickAll.js +var require_pickAll = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/pickAll.js"(exports2, module2) { + var _curry2 = require_curry2(); + var pickAll = /* @__PURE__ */ _curry2(function pickAll2(names, obj) { + var result = {}; + var idx = 0; + var len = names.length; + while (idx < len) { + var name = names[idx]; + result[name] = obj[name]; + idx += 1; + } + return result; + }); + module2.exports = pickAll; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/props.js +var require_props = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/props.js"(exports2, module2) { + var _curry2 = require_curry2(); + var path = require_path3(); + var props = /* @__PURE__ */ _curry2(function props2(ps, obj) { + return ps.map(function(p) { + return path([p], obj); + }); + }); + module2.exports = props; + } +}); + +// ../remove-bins/lib/removeBins.js +var require_removeBins = __commonJS({ + "../remove-bins/lib/removeBins.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.removeBinsOfDependency = exports2.removeBin = void 0; + var path_1 = __importDefault(require("path")); + var core_loggers_1 = require_lib12(); + var package_bins_1 = __importDefault(require_lib68()); + var read_package_json_1 = require_lib32(); + var rimraf_1 = __importDefault(require_rimraf()); + var cmd_extension_1 = __importDefault(require_cmd_extension()); + var is_windows_1 = __importDefault(require_is_windows()); + async function removeOnWin(cmd) { + core_loggers_1.removalLogger.debug(cmd); + await Promise.all([ + rimraf_1.default(cmd), + rimraf_1.default(`${cmd}.ps1`), + rimraf_1.default(`${cmd}${cmd_extension_1.default}`) + ]); + } + async function removeOnNonWin(p) { + core_loggers_1.removalLogger.debug(p); + return rimraf_1.default(p); + } + exports2.removeBin = is_windows_1.default() ? removeOnWin : removeOnNonWin; + async function removeBinsOfDependency(dependencyDir, opts) { + const uninstalledPkgJson = await read_package_json_1.safeReadPackageFromDir(dependencyDir); + if (!uninstalledPkgJson) + return; + const cmds = await package_bins_1.default(uninstalledPkgJson, dependencyDir); + if (!opts.dryRun) { + await Promise.all(cmds.map((cmd) => path_1.default.join(opts.binsDir, cmd.name)).map(exports2.removeBin)); + } + return uninstalledPkgJson; + } + exports2.removeBinsOfDependency = removeBinsOfDependency; + } +}); + +// ../remove-bins/lib/index.js +var require_lib72 = __commonJS({ + "../remove-bins/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.removeBinsOfDependency = exports2.removeBin = void 0; + var removeBins_1 = require_removeBins(); + Object.defineProperty(exports2, "removeBin", { enumerable: true, get: function() { + return removeBins_1.removeBin; + } }); + Object.defineProperty(exports2, "removeBinsOfDependency", { enumerable: true, get: function() { + return removeBins_1.removeBinsOfDependency; + } }); + } +}); + +// ../modules-cleaner/lib/removeDirectDependency.js +var require_removeDirectDependency = __commonJS({ + "../modules-cleaner/lib/removeDirectDependency.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var core_loggers_1 = require_lib12(); + var remove_bins_1 = require_lib72(); + async function removeDirectDependency(dependency, opts) { + const dependencyDir = path_1.default.join(opts.modulesDir, dependency.name); + const results = await Promise.all([ + remove_bins_1.removeBinsOfDependency(dependencyDir, opts), + !opts.dryRun && remove_bins_1.removeBin(dependencyDir) + ]); + const uninstalledPkg = results[0]; + if (!opts.muteLogs) { + core_loggers_1.rootLogger.debug({ + prefix: opts.rootDir, + removed: { + dependencyType: dependency.dependenciesField === "devDependencies" && "dev" || dependency.dependenciesField === "optionalDependencies" && "optional" || dependency.dependenciesField === "dependencies" && "prod" || void 0, + name: dependency.name, + version: uninstalledPkg === null || uninstalledPkg === void 0 ? void 0 : uninstalledPkg.version + } + }); + } + } + exports2.default = removeDirectDependency; + } +}); + +// ../modules-cleaner/lib/prune.js +var require_prune2 = __commonJS({ + "../modules-cleaner/lib/prune.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var core_loggers_1 = require_lib12(); + var filter_lockfile_1 = __importStar2(require_lib71()); + var lockfile_utils_1 = require_lib53(); + var logger_1 = __importDefault(require_lib6()); + var read_modules_dir_1 = __importDefault(require_lib69()); + var types_1 = require_lib14(); + var dependency_path_1 = require_lib33(); + var rimraf_1 = __importDefault(require_rimraf()); + var difference_1 = __importDefault(require_difference()); + var equals_1 = __importDefault(require_equals2()); + var mergeAll_1 = __importDefault(require_mergeAll2()); + var pickAll_1 = __importDefault(require_pickAll()); + var props_1 = __importDefault(require_props()); + var removeDirectDependency_1 = __importDefault(require_removeDirectDependency()); + async function prune(importers, opts) { + var _a, _b, _c; + const wantedLockfile = filter_lockfile_1.default(opts.wantedLockfile, { + include: opts.include, + skipped: opts.skipped + }); + await Promise.all(importers.map(async ({ binsDir, id, modulesDir, pruneDirectDependencies, removePackages, rootDir }) => { + var _a2; + const currentImporter = opts.currentLockfile.importers[id] || {}; + const currentPkgs = Object.entries(mergeDependencies(currentImporter)); + const wantedPkgs = Object.entries(mergeDependencies(wantedLockfile.importers[id])); + const allCurrentPackages = new Set(pruneDirectDependencies === true || (removePackages === null || removePackages === void 0 ? void 0 : removePackages.length) ? (_a2 = await read_modules_dir_1.default(modulesDir)) !== null && _a2 !== void 0 ? _a2 : [] : []); + const depsToRemove = new Set([ + ...(removePackages !== null && removePackages !== void 0 ? removePackages : []).filter((removePackage) => allCurrentPackages.has(removePackage)), + ...difference_1.default(currentPkgs, wantedPkgs).map(([depName]) => depName) + ]); + if (pruneDirectDependencies) { + if (allCurrentPackages.size > 0) { + const newPkgsSet = new Set(wantedPkgs.map(([depName]) => depName)); + for (const currentPackage of Array.from(allCurrentPackages)) { + if (!newPkgsSet.has(currentPackage)) { + depsToRemove.add(currentPackage); + } + } + } + } + return Promise.all(Array.from(depsToRemove).map(async (depName) => { + var _a3, _b2, _c2; + return removeDirectDependency_1.default({ + dependenciesField: ((_a3 = currentImporter.devDependencies) === null || _a3 === void 0 ? void 0 : _a3[depName]) != null && "devDependencies" || ((_b2 = currentImporter.optionalDependencies) === null || _b2 === void 0 ? void 0 : _b2[depName]) != null && "optionalDependencies" || ((_c2 = currentImporter.dependencies) === null || _c2 === void 0 ? void 0 : _c2[depName]) != null && "dependencies" || void 0, + name: depName + }, { + binsDir, + dryRun: opts.dryRun, + modulesDir, + rootDir + }); + })); + })); + const selectedImporterIds = importers.map((importer) => importer.id).sort(); + const currentPkgIdsByDepPaths = equals_1.default(selectedImporterIds, Object.keys(opts.wantedLockfile.importers)) ? getPkgsDepPaths(opts.registries, (_a = opts.currentLockfile.packages) !== null && _a !== void 0 ? _a : {}, opts.skipped) : getPkgsDepPathsOwnedOnlyByImporters(selectedImporterIds, opts.registries, opts.currentLockfile, opts.include, opts.skipped); + const wantedPkgIdsByDepPaths = getPkgsDepPaths(opts.registries, (_b = wantedLockfile.packages) !== null && _b !== void 0 ? _b : {}, opts.skipped); + const oldDepPaths = Object.keys(currentPkgIdsByDepPaths); + const newDepPaths = Object.keys(wantedPkgIdsByDepPaths); + const orphanDepPaths = difference_1.default(oldDepPaths, newDepPaths); + const orphanPkgIds = new Set(props_1.default(orphanDepPaths, currentPkgIdsByDepPaths)); + core_loggers_1.statsLogger.debug({ + prefix: opts.lockfileDir, + removed: orphanPkgIds.size + }); + if (!opts.dryRun) { + if (orphanDepPaths.length > 0 && opts.currentLockfile.packages != null && (opts.hoistedModulesDir != null || opts.publicHoistedModulesDir != null)) { + const prefix = path_1.default.join(opts.virtualStoreDir, "../.."); + await Promise.all(orphanDepPaths.map(async (orphanDepPath) => { + if (opts.hoistedDependencies[orphanDepPath]) { + await Promise.all(Object.entries(opts.hoistedDependencies[orphanDepPath]).map(([alias, hoistType]) => { + const modulesDir = hoistType === "public" ? opts.publicHoistedModulesDir : opts.hoistedModulesDir; + if (!modulesDir) + return void 0; + return removeDirectDependency_1.default({ + name: alias + }, { + binsDir: path_1.default.join(modulesDir, ".bin"), + modulesDir, + muteLogs: true, + rootDir: prefix + }); + })); + } + delete opts.hoistedDependencies[orphanDepPath]; + })); + } + if (opts.pruneVirtualStore !== false) { + const _tryRemovePkg = tryRemovePkg.bind(null, opts.lockfileDir, opts.virtualStoreDir); + await Promise.all(orphanDepPaths.map((orphanDepPath) => dependency_path_1.depPathToFilename(orphanDepPath, opts.lockfileDir)).map(async (orphanDepPath) => _tryRemovePkg(orphanDepPath))); + const neededPkgs = new Set(); + for (const depPath of Object.keys((_c = opts.wantedLockfile.packages) !== null && _c !== void 0 ? _c : {})) { + if (opts.skipped.has(depPath)) + continue; + neededPkgs.add(dependency_path_1.depPathToFilename(depPath, opts.lockfileDir)); + } + const availablePkgs = await readVirtualStoreDir(opts.virtualStoreDir, opts.lockfileDir); + await Promise.all(availablePkgs.filter((availablePkg) => !neededPkgs.has(availablePkg)).map(async (orphanDepPath) => _tryRemovePkg(orphanDepPath))); + } + } + return new Set(orphanDepPaths); + } + exports2.default = prune; + async function readVirtualStoreDir(virtualStoreDir, lockfileDir) { + try { + return await fs_1.promises.readdir(virtualStoreDir); + } catch (err) { + if (err.code !== "ENOENT") { + logger_1.default.warn({ + error: err, + message: `Failed to read virtualStoreDir at "${virtualStoreDir}"`, + prefix: lockfileDir + }); + } + return []; + } + } + async function tryRemovePkg(lockfileDir, virtualStoreDir, pkgDir) { + const pathToRemove = path_1.default.join(virtualStoreDir, pkgDir); + core_loggers_1.removalLogger.debug(pathToRemove); + try { + await rimraf_1.default(pathToRemove); + } catch (err) { + logger_1.default.warn({ + error: err, + message: `Failed to remove "${pathToRemove}"`, + prefix: lockfileDir + }); + } + } + function mergeDependencies(projectSnapshot) { + return mergeAll_1.default(types_1.DEPENDENCIES_FIELDS.map((depType) => { + var _a; + return (_a = projectSnapshot[depType]) !== null && _a !== void 0 ? _a : {}; + })); + } + function getPkgsDepPaths(registries, packages, skipped) { + const pkgIdsByDepPath = {}; + for (const depPath of Object.keys(packages)) { + if (skipped.has(depPath)) + continue; + pkgIdsByDepPath[depPath] = lockfile_utils_1.packageIdFromSnapshot(depPath, packages[depPath], registries); + } + return pkgIdsByDepPath; + } + function getPkgsDepPathsOwnedOnlyByImporters(importerIds, registries, lockfile, include, skipped) { + const selected = filter_lockfile_1.filterLockfileByImporters(lockfile, importerIds, { + failOnMissingDependencies: false, + include, + skipped + }); + const other = filter_lockfile_1.filterLockfileByImporters(lockfile, difference_1.default(Object.keys(lockfile.importers), importerIds), { + failOnMissingDependencies: false, + include, + skipped + }); + const packagesOfSelectedOnly = pickAll_1.default(difference_1.default(Object.keys(selected.packages), Object.keys(other.packages)), selected.packages); + return getPkgsDepPaths(registries, packagesOfSelectedOnly, skipped); + } + } +}); + +// ../modules-cleaner/lib/index.js +var require_lib73 = __commonJS({ + "../modules-cleaner/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prune = void 0; + var prune_1 = __importDefault(require_prune2()); + exports2.prune = prune_1.default; + } +}); + +// ../prune-lockfile/lib/index.js +var require_lib74 = __commonJS({ + "../prune-lockfile/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pruneLockfile = exports2.pruneSharedLockfile = void 0; + var constants_1 = require_lib7(); + var dependency_path_1 = require_lib33(); + var difference_1 = __importDefault(require_difference()); + var isEmpty_1 = __importDefault(require_isEmpty2()); + var omit_1 = __importDefault(require_omit()); + var unnest_1 = __importDefault(require_unnest()); + __exportStar(require_lib52(), exports2); + function pruneSharedLockfile(lockfile, opts) { + var _a; + const copiedPackages = lockfile.packages == null ? {} : copyPackageSnapshots(lockfile.packages, { + devDepPaths: unnest_1.default(Object.values(lockfile.importers).map((deps) => { + var _a2; + return resolvedDepsToDepPaths((_a2 = deps.devDependencies) !== null && _a2 !== void 0 ? _a2 : {}); + })), + optionalDepPaths: unnest_1.default(Object.values(lockfile.importers).map((deps) => { + var _a2; + return resolvedDepsToDepPaths((_a2 = deps.optionalDependencies) !== null && _a2 !== void 0 ? _a2 : {}); + })), + prodDepPaths: unnest_1.default(Object.values(lockfile.importers).map((deps) => { + var _a2; + return resolvedDepsToDepPaths((_a2 = deps.dependencies) !== null && _a2 !== void 0 ? _a2 : {}); + })), + warn: (_a = opts === null || opts === void 0 ? void 0 : opts.warn) !== null && _a !== void 0 ? _a : (msg) => void 0 + }); + const prunnedLockfile = { + ...lockfile, + packages: copiedPackages + }; + if (isEmpty_1.default(prunnedLockfile.packages)) { + delete prunnedLockfile.packages; + } + return prunnedLockfile; + } + exports2.pruneSharedLockfile = pruneSharedLockfile; + function pruneLockfile(lockfile, pkg, importerId, opts) { + var _a, _b, _c, _d; + const packages = {}; + const importer = lockfile.importers[importerId]; + const lockfileSpecs = (_a = importer.specifiers) !== null && _a !== void 0 ? _a : {}; + const optionalDependencies = Object.keys((_b = pkg.optionalDependencies) !== null && _b !== void 0 ? _b : {}); + const dependencies = difference_1.default(Object.keys((_c = pkg.dependencies) !== null && _c !== void 0 ? _c : {}), optionalDependencies); + const devDependencies = difference_1.default(difference_1.default(Object.keys((_d = pkg.devDependencies) !== null && _d !== void 0 ? _d : {}), optionalDependencies), dependencies); + const allDeps = [ + ...optionalDependencies, + ...devDependencies, + ...dependencies + ]; + const specifiers = {}; + const lockfileDependencies = {}; + const lockfileOptionalDependencies = {}; + const lockfileDevDependencies = {}; + Object.keys(lockfileSpecs).forEach((depName) => { + var _a2, _b2, _c2; + if (!allDeps.includes(depName)) + return; + specifiers[depName] = lockfileSpecs[depName]; + if ((_a2 = importer.dependencies) === null || _a2 === void 0 ? void 0 : _a2[depName]) { + lockfileDependencies[depName] = importer.dependencies[depName]; + } else if ((_b2 = importer.optionalDependencies) === null || _b2 === void 0 ? void 0 : _b2[depName]) { + lockfileOptionalDependencies[depName] = importer.optionalDependencies[depName]; + } else if ((_c2 = importer.devDependencies) === null || _c2 === void 0 ? void 0 : _c2[depName]) { + lockfileDevDependencies[depName] = importer.devDependencies[depName]; + } + }); + if (importer.dependencies != null) { + for (const dep of Object.keys(importer.dependencies)) { + if (!lockfileDependencies[dep] && importer.dependencies[dep].startsWith("link:") && !(lockfileSpecs[dep] && !allDeps[dep])) { + lockfileDependencies[dep] = importer.dependencies[dep]; + } + } + } + const updatedImporter = { + specifiers + }; + const prunnedLockfile = { + importers: { + ...lockfile.importers, + [importerId]: updatedImporter + }, + lockfileVersion: lockfile.lockfileVersion || constants_1.LOCKFILE_VERSION, + packages: lockfile.packages + }; + if (!isEmpty_1.default(packages)) { + prunnedLockfile.packages = packages; + } + if (!isEmpty_1.default(lockfileDependencies)) { + updatedImporter.dependencies = lockfileDependencies; + } + if (!isEmpty_1.default(lockfileOptionalDependencies)) { + updatedImporter.optionalDependencies = lockfileOptionalDependencies; + } + if (!isEmpty_1.default(lockfileDevDependencies)) { + updatedImporter.devDependencies = lockfileDevDependencies; + } + return pruneSharedLockfile(prunnedLockfile, opts); + } + exports2.pruneLockfile = pruneLockfile; + function copyPackageSnapshots(originalPackages, opts) { + const copiedSnapshots = {}; + const ctx = { + copiedSnapshots, + nonOptional: new Set(), + notProdOnly: new Set(), + originalPackages, + walked: new Set(), + warn: opts.warn + }; + copyDependencySubGraph(ctx, opts.devDepPaths, { + dev: true, + optional: false + }); + copyDependencySubGraph(ctx, opts.optionalDepPaths, { + dev: false, + optional: true + }); + copyDependencySubGraph(ctx, opts.prodDepPaths, { + dev: false, + optional: false + }); + return copiedSnapshots; + } + function resolvedDepsToDepPaths(deps) { + return Object.entries(deps).map(([alias, ref]) => dependency_path_1.refToRelative(ref, alias)).filter((depPath) => depPath !== null); + } + function copyDependencySubGraph(ctx, depPaths, opts) { + var _a, _b, _c, _d; + for (const depPath of depPaths) { + const key = `${depPath}:${opts.optional.toString()}:${opts.dev.toString()}`; + if (ctx.walked.has(key)) + continue; + ctx.walked.add(key); + if (!ctx.originalPackages[depPath]) { + if (depPath.startsWith("link:") || depPath.startsWith("file:") && !depPath.endsWith(".tar.gz")) + continue; + ctx.warn(`Cannot find resolution of ${depPath} in lockfile`); + continue; + } + const depLockfile = ctx.originalPackages[depPath]; + ctx.copiedSnapshots[depPath] = depLockfile; + if (opts.optional && !ctx.nonOptional.has(depPath)) { + depLockfile.optional = true; + } else { + ctx.nonOptional.add(depPath); + delete depLockfile.optional; + } + if (opts.dev) { + ctx.notProdOnly.add(depPath); + depLockfile.dev = true; + } else if (depLockfile.dev === true) { + delete depLockfile.dev; + } else if (depLockfile.dev === void 0 && !ctx.notProdOnly.has(depPath)) { + depLockfile.dev = false; + } + const newDependencies = resolvedDepsToDepPaths(omit_1.default((_b = Object.keys((_a = depLockfile.peerDependencies) !== null && _a !== void 0 ? _a : {})) !== null && _b !== void 0 ? _b : [], (_c = depLockfile.dependencies) !== null && _c !== void 0 ? _c : {})); + copyDependencySubGraph(ctx, newDependencies, opts); + const newOptionalDependencies = resolvedDepsToDepPaths((_d = depLockfile.optionalDependencies) !== null && _d !== void 0 ? _d : {}); + copyDependencySubGraph(ctx, newOptionalDependencies, { dev: opts.dev, optional: true }); + } + } + } +}); + +// ../../node_modules/.pnpm/symlink-dir@5.0.1/node_modules/symlink-dir/dist/index.js +var require_dist11 = __commonJS({ + "../../node_modules/.pnpm/symlink-dir@5.0.1/node_modules/symlink-dir/dist/index.js"(exports2, module2) { + "use strict"; + var betterPathResolve = require_better_path_resolve(); + var fs_1 = require("fs"); + var path = require("path"); + var renameOverwrite = require_rename_overwrite(); + var IS_WINDOWS = process.platform === "win32" || /^(msys|cygwin)$/.test(process.env.OSTYPE); + var symlinkType = IS_WINDOWS ? "junction" : "dir"; + var resolveSrc = IS_WINDOWS ? resolveSrcOnWin : resolveSrcOnNonWin; + function resolveSrcOnWin(src, dest) { + return `${src}\\`; + } + function resolveSrcOnNonWin(src, dest) { + return path.relative(path.dirname(dest), src); + } + function symlinkDir(src, dest) { + dest = betterPathResolve(dest); + src = betterPathResolve(src); + if (src === dest) + throw new Error(`Symlink path is the same as the target path (${src})`); + src = resolveSrc(src, dest); + return forceSymlink(src, dest); + } + async function forceSymlink(src, dest) { + try { + await fs_1.promises.symlink(src, dest, symlinkType); + return { reused: false }; + } catch (err) { + switch (err.code) { + case "ENOENT": + try { + await fs_1.promises.mkdir(path.dirname(dest), { recursive: true }); + } catch (mkdirError) { + mkdirError.message = `Error while trying to symlink "${src}" to "${dest}". The error happened while trying to create the parent directory for the symlink target. Details: ${mkdirError}`; + throw mkdirError; + } + await forceSymlink(src, dest); + return { reused: false }; + case "EEXIST": + case "EISDIR": + break; + default: + throw err; + } + } + let linkString; + try { + linkString = await fs_1.promises.readlink(dest); + } catch (err) { + const parentDir = path.dirname(dest); + const ignore = `.ignored_${path.basename(dest)}`; + await renameOverwrite(dest, path.join(parentDir, ignore)); + return { + ...await forceSymlink(src, dest), + warn: `Symlink wanted name was occupied by directory or file. Old entity moved: "${parentDir}${path.sep}{${path.basename(dest)} => ${ignore}}".` + }; + } + if (src === linkString) { + return { reused: true }; + } + await fs_1.promises.unlink(dest); + return await forceSymlink(src, dest); + } + symlinkDir["default"] = symlinkDir; + module2.exports = symlinkDir; + } +}); + +// ../symlink-dependency/lib/symlinkDirectRootDependency.js +var require_symlinkDirectRootDependency = __commonJS({ + "../symlink-dependency/lib/symlinkDirectRootDependency.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var core_loggers_1 = require_lib12(); + var symlink_dir_1 = __importDefault(require_dist11()); + var DEP_TYPE_BY_DEPS_FIELD_NAME = { + dependencies: "prod", + devDependencies: "dev", + optionalDependencies: "optional" + }; + async function symlinkDirectRootDependency(dependencyLocation, destModulesDir, importAs, opts) { + let destModulesDirReal; + try { + destModulesDirReal = await fs_1.promises.realpath(destModulesDir); + } catch (err) { + if (err.code === "ENOENT") { + await fs_1.promises.mkdir(destModulesDir, { recursive: true }); + destModulesDirReal = await fs_1.promises.realpath(destModulesDir); + } else { + throw err; + } + } + const dependencyRealocation = await fs_1.promises.realpath(dependencyLocation); + const dest = path_1.default.join(destModulesDirReal, importAs); + const { reused } = await symlink_dir_1.default(dependencyRealocation, dest); + if (reused) + return; + core_loggers_1.rootLogger.debug({ + added: { + dependencyType: opts.fromDependenciesField && DEP_TYPE_BY_DEPS_FIELD_NAME[opts.fromDependenciesField], + linkedFrom: dependencyRealocation, + name: importAs, + realName: opts.linkedPackage.name, + version: opts.linkedPackage.version + }, + prefix: opts.prefix + }); + } + exports2.default = symlinkDirectRootDependency; + } +}); + +// ../symlink-dependency/lib/index.js +var require_lib75 = __commonJS({ + "../symlink-dependency/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.symlinkDirectRootDependency = void 0; + var path_1 = __importDefault(require("path")); + var core_loggers_1 = require_lib12(); + var symlink_dir_1 = __importDefault(require_dist11()); + var symlinkDirectRootDependency_1 = __importDefault(require_symlinkDirectRootDependency()); + exports2.symlinkDirectRootDependency = symlinkDirectRootDependency_1.default; + async function symlinkDependency(dependencyRealLocation, destModulesDir, importAs) { + const link = path_1.default.join(destModulesDir, importAs); + core_loggers_1.linkLogger.debug({ target: dependencyRealLocation, link }); + return symlink_dir_1.default(dependencyRealLocation, link); + } + exports2.default = symlinkDependency; + } +}); + +// ../supi/lib/link/options.js +var require_options2 = __commonJS({ + "../supi/lib/link/options.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.extendOptions = void 0; + var path_1 = __importDefault(require("path")); + var normalize_registries_1 = __importStar2(require_lib65()); + async function extendOptions(opts) { + if (opts) { + for (const key in opts) { + if (opts[key] === void 0) { + delete opts[key]; + } + } + } + const defaultOpts = await defaults(opts); + const extendedOpts = { ...defaultOpts, ...opts, storeDir: defaultOpts.storeDir }; + extendedOpts.registries = normalize_registries_1.default(extendedOpts.registries); + return extendedOpts; + } + exports2.extendOptions = extendOptions; + async function defaults(opts) { + var _a, _b; + const dir = (_a = opts.dir) !== null && _a !== void 0 ? _a : process.cwd(); + return { + binsDir: path_1.default.join(dir, "node_modules", ".bin"), + dir, + force: false, + forceSharedLockfile: false, + hoistPattern: void 0, + lockfileDir: (_b = opts.lockfileDir) !== null && _b !== void 0 ? _b : dir, + registries: normalize_registries_1.DEFAULT_REGISTRIES, + storeController: opts.storeController, + storeDir: opts.storeDir, + useLockfile: true + }; + } + } +}); + +// ../supi/lib/link/index.js +var require_link = __commonJS({ + "../supi/lib/link/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.linkToGlobal = exports2.linkFromGlobal = void 0; + var path_1 = __importDefault(require("path")); + var core_loggers_1 = require_lib12(); + var error_1 = __importDefault(require_lib8()); + var get_context_1 = require_lib67(); + var link_bins_1 = require_lib70(); + var lockfile_file_1 = require_lib57(); + var logger_1 = __importStar2(require_lib6()); + var manifest_utils_1 = require_lib15(); + var modules_cleaner_1 = require_lib73(); + var prune_lockfile_1 = require_lib74(); + var read_project_manifest_1 = __importDefault(require_lib19()); + var symlink_dependency_1 = require_lib75(); + var types_1 = require_lib14(); + var normalize_path_1 = __importDefault(require_normalize_path()); + var path_absolute_1 = __importDefault(require_path_absolute()); + var clone_1 = __importDefault(require_clone3()); + var options_1 = require_options2(); + async function link(linkFromPkgs, destModules, maybeOpts) { + var _a, _b, _c; + const reporter = maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.reporter; + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.on("data", reporter); + } + const opts = await options_1.extendOptions(maybeOpts); + const ctx = await get_context_1.getContextForSingleImporter(opts.manifest, { + ...opts, + extraBinPaths: [] + }, true); + const importerId = lockfile_file_1.getLockfileImporterId(ctx.lockfileDir, opts.dir); + const currentLockfile = clone_1.default(ctx.currentLockfile); + const linkedPkgs = []; + const specsToUpsert = []; + for (const linkFrom of linkFromPkgs) { + let linkFromPath; + let linkFromAlias; + if (typeof linkFrom === "string") { + linkFromPath = linkFrom; + } else { + linkFromPath = linkFrom.path; + linkFromAlias = linkFrom.alias; + } + const { manifest } = await read_project_manifest_1.default(linkFromPath); + if (typeof linkFrom === "string" && manifest.name === void 0) { + throw new error_1.default("INVALID_PACKAGE_NAME", `Package in ${linkFromPath} must have a name field to be linked`); + } + specsToUpsert.push({ + alias: manifest.name, + pref: manifest_utils_1.getPref(manifest.name, manifest.name, manifest.version, { + pinnedVersion: opts.pinnedVersion + }), + saveType: (_a = opts.targetDependenciesField) !== null && _a !== void 0 ? _a : ctx.manifest && manifest_utils_1.guessDependencyType(manifest.name, ctx.manifest) + }); + const packagePath = normalize_path_1.default(path_1.default.relative(opts.dir, linkFromPath)); + const addLinkOpts = { + linkedPkgName: linkFromAlias !== null && linkFromAlias !== void 0 ? linkFromAlias : manifest.name, + manifest: ctx.manifest, + packagePath + }; + addLinkToLockfile(ctx.currentLockfile.importers[importerId], addLinkOpts); + addLinkToLockfile(ctx.wantedLockfile.importers[importerId], addLinkOpts); + linkedPkgs.push({ + alias: linkFromAlias !== null && linkFromAlias !== void 0 ? linkFromAlias : manifest.name, + manifest, + path: linkFromPath + }); + } + const updatedCurrentLockfile = prune_lockfile_1.pruneSharedLockfile(ctx.currentLockfile); + const warn = (message2) => logger_1.default.warn({ message: message2, prefix: opts.dir }); + const updatedWantedLockfile = prune_lockfile_1.pruneSharedLockfile(ctx.wantedLockfile, { warn }); + await modules_cleaner_1.prune([ + { + binsDir: opts.binsDir, + id: importerId, + modulesDir: ctx.modulesDir, + rootDir: opts.dir + } + ], { + currentLockfile, + hoistedDependencies: ctx.hoistedDependencies, + hoistedModulesDir: opts.hoistPattern != null ? ctx.hoistedModulesDir : void 0, + include: ctx.include, + lockfileDir: opts.lockfileDir, + publicHoistedModulesDir: opts.publicHoistPattern != null ? ctx.rootModulesDir : void 0, + registries: ctx.registries, + skipped: ctx.skipped, + storeController: opts.storeController, + virtualStoreDir: ctx.virtualStoreDir, + wantedLockfile: updatedCurrentLockfile + }); + for (const { alias, manifest, path } of linkedPkgs) { + const stu = specsToUpsert.find((s) => s.alias === manifest.name); + await symlink_dependency_1.symlinkDirectRootDependency(path, destModules, alias, { + fromDependenciesField: (_b = stu === null || stu === void 0 ? void 0 : stu.saveType) !== null && _b !== void 0 ? _b : opts.targetDependenciesField, + linkedPackage: manifest, + prefix: opts.dir + }); + } + const linkToBin = (_c = maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.linkToBin) !== null && _c !== void 0 ? _c : path_1.default.join(destModules, ".bin"); + await link_bins_1.linkBinsOfPackages(linkedPkgs.map((p) => ({ manifest: p.manifest, location: p.path })), linkToBin, { + warn: (message2) => logger_1.default.info({ message: message2, prefix: opts.dir }) + }); + let newPkg; + if (opts.targetDependenciesField) { + newPkg = await manifest_utils_1.updateProjectManifestObject(opts.dir, opts.manifest, specsToUpsert); + for (const { alias } of specsToUpsert) { + updatedWantedLockfile.importers[importerId].specifiers[alias] = manifest_utils_1.getSpecFromPackageManifest(newPkg, alias); + } + } else { + newPkg = opts.manifest; + } + const lockfileOpts = { forceSharedFormat: opts.forceSharedLockfile }; + if (opts.useLockfile) { + await lockfile_file_1.writeLockfiles({ + currentLockfile: updatedCurrentLockfile, + currentLockfileDir: ctx.virtualStoreDir, + wantedLockfile: updatedWantedLockfile, + wantedLockfileDir: ctx.lockfileDir, + ...lockfileOpts + }); + } else { + await lockfile_file_1.writeCurrentLockfile(ctx.virtualStoreDir, updatedCurrentLockfile, lockfileOpts); + } + core_loggers_1.summaryLogger.debug({ prefix: opts.dir }); + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.removeListener("data", reporter); + } + return newPkg; + } + exports2.default = link; + function addLinkToLockfile(projectSnapshot, opts) { + var _a, _b, _c; + const id = `link:${opts.packagePath}`; + let addedTo; + for (const depType of types_1.DEPENDENCIES_FIELDS) { + if (!addedTo && ((_b = (_a = opts.manifest) === null || _a === void 0 ? void 0 : _a[depType]) === null || _b === void 0 ? void 0 : _b[opts.linkedPkgName])) { + addedTo = depType; + projectSnapshot[depType] = (_c = projectSnapshot[depType]) !== null && _c !== void 0 ? _c : {}; + projectSnapshot[depType][opts.linkedPkgName] = id; + } else if (projectSnapshot[depType] != null) { + delete projectSnapshot[depType][opts.linkedPkgName]; + } + } + if (opts.manifest == null) + return; + const availableSpec = manifest_utils_1.getSpecFromPackageManifest(opts.manifest, opts.linkedPkgName); + if (availableSpec) { + projectSnapshot.specifiers[opts.linkedPkgName] = availableSpec; + } else { + delete projectSnapshot.specifiers[opts.linkedPkgName]; + } + } + async function linkFromGlobal(pkgNames, linkTo, maybeOpts) { + const reporter = maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.reporter; + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.on("data", reporter); + } + const opts = await options_1.extendOptions(maybeOpts); + const globalPkgPath = path_absolute_1.default(maybeOpts.globalDir); + const linkFromPkgs = pkgNames.map((pkgName) => path_1.default.join(globalPkgPath, "node_modules", pkgName)); + const newManifest = await link(linkFromPkgs, path_1.default.join(linkTo, "node_modules"), opts); + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.removeListener("data", reporter); + } + return newManifest; + } + exports2.linkFromGlobal = linkFromGlobal; + async function linkToGlobal(linkFrom, maybeOpts) { + var _a; + const reporter = maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.reporter; + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.on("data", reporter); + } + maybeOpts.lockfileDir = (_a = maybeOpts.lockfileDir) !== null && _a !== void 0 ? _a : maybeOpts.globalDir; + const opts = await options_1.extendOptions(maybeOpts); + const globalPkgPath = path_absolute_1.default(maybeOpts.globalDir); + const newManifest = await link([linkFrom], path_1.default.join(globalPkgPath, "node_modules"), { + ...opts, + dir: maybeOpts.globalDir, + linkToBin: maybeOpts.globalBin + }); + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.removeListener("data", reporter); + } + return newManifest; + } + exports2.linkToGlobal = linkToGlobal; + } +}); + +// ../../node_modules/.pnpm/@zkochan+npm-lifecycle@5.1.2/node_modules/@zkochan/npm-lifecycle/lib/spawn.js +var require_spawn = __commonJS({ + "../../node_modules/.pnpm/@zkochan+npm-lifecycle@5.1.2/node_modules/@zkochan/npm-lifecycle/lib/spawn.js"(exports2, module2) { + "use strict"; + module2.exports = spawn; + var _spawn = require("child_process").spawn; + var EventEmitter = require("events").EventEmitter; + var progressEnabled; + var running = 0; + function startRunning(log2) { + if (progressEnabled == null) + progressEnabled = log2.progressEnabled; + if (progressEnabled) + log2.disableProgress(); + ++running; + } + function stopRunning(log2) { + --running; + if (progressEnabled && running === 0) + log2.enableProgress(); + } + function willCmdOutput(stdio) { + if (stdio === "inherit") + return true; + if (!Array.isArray(stdio)) + return false; + for (let fh = 1; fh <= 2; ++fh) { + if (stdio[fh] === "inherit") + return true; + if (stdio[fh] === 1 || stdio[fh] === 2) + return true; + } + return false; + } + function spawn(cmd, args2, options, log2) { + const cmdWillOutput = willCmdOutput(options && options.stdio); + if (cmdWillOutput) + startRunning(log2); + const raw = _spawn(cmd, args2, options); + const cooked = new EventEmitter(); + raw.on("error", function(er) { + if (cmdWillOutput) + stopRunning(log2); + er.file = cmd; + cooked.emit("error", er); + }).on("close", function(code, signal) { + if (cmdWillOutput) + stopRunning(log2); + if (code === 127) { + const er = new Error("spawn ENOENT"); + er.code = "ENOENT"; + er.errno = "ENOENT"; + er.syscall = "spawn"; + er.file = cmd; + cooked.emit("error", er); + } else { + cooked.emit("close", code, signal); + } + }); + cooked.stdin = raw.stdin; + cooked.stdout = raw.stdout; + cooked.stderr = raw.stderr; + cooked.kill = function(sig) { + return raw.kill(sig); + }; + return cooked; + } + } +}); + +// ../../node_modules/.pnpm/tslib@1.14.1/node_modules/tslib/tslib.js +var require_tslib = __commonJS({ + "../../node_modules/.pnpm/tslib@1.14.1/node_modules/tslib/tslib.js"(exports2, module2) { + var __extends; + var __assign; + var __rest; + var __decorate; + var __param; + var __metadata; + var __awaiter; + var __generator; + var __exportStar; + var __values; + var __read; + var __spread; + var __spreadArrays; + var __await; + var __asyncGenerator; + var __asyncDelegator; + var __asyncValues; + var __makeTemplateObject; + var __importStar2; + var __importDefault; + var __classPrivateFieldGet; + var __classPrivateFieldSet; + var __createBinding2; + (function(factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function(exports3) { + factory(createExporter(root, createExporter(exports3))); + }); + } else if (typeof module2 === "object" && typeof module2.exports === "object") { + factory(createExporter(root, createExporter(module2.exports))); + } else { + factory(createExporter(root)); + } + function createExporter(exports3, previous) { + if (exports3 !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports3, "__esModule", { value: true }); + } else { + exports3.__esModule = true; + } + } + return function(id, v) { + return exports3[id] = previous ? previous(id, v) : v; + }; + } + })(function(exporter) { + var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) { + d.__proto__ = b; + } || function(d, b) { + for (var p in b) + if (b.hasOwnProperty(p)) + d[p] = b[p]; + }; + __extends = function(d, b) { + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + __rest = function(s, e) { + var t = {}; + for (var p in s) + if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + __decorate = function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") + r = Reflect.decorate(decorators, target, key, desc); + else + for (var i = decorators.length - 1; i >= 0; i--) + if (d = decorators[i]) + r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + __param = function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + __metadata = function(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") + return Reflect.metadata(metadataKey, metadataValue); + }; + __awaiter = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + __generator = function(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) + throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) + throw new TypeError("Generator is already executing."); + while (_) + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) + return t; + if (y = 0, t) + op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + __createBinding2 = function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }; + __exportStar = function(m, exports3) { + for (var p in m) + if (p !== "default" && !exports3.hasOwnProperty(p)) + exports3[p] = m[p]; + }; + __values = function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) + return m.call(o); + if (o && typeof o.length === "number") + return { + next: function() { + if (o && i >= o.length) + o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + __read = function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) + return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) + ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) + m.call(i); + } finally { + if (e) + throw e.error; + } + } + return ar; + }; + __spread = function() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + __spreadArrays = function() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) + s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + __await = function(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + __asyncGenerator = function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) + i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) + resume(q[0][0], q[0][1]); + } + }; + __asyncDelegator = function(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function(e) { + throw e; + }), verb("return"), i[Symbol.iterator] = function() { + return this; + }, i; + function verb(n, f) { + i[n] = o[n] ? function(v) { + return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; + } : f; + } + }; + __asyncValues = function(o) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve({ value: v2, done: d }); + }, reject); + } + }; + __makeTemplateObject = function(cooked, raw) { + if (Object.defineProperty) { + Object.defineProperty(cooked, "raw", { value: raw }); + } else { + cooked.raw = raw; + } + return cooked; + }; + __importStar2 = function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) + result[k] = mod[k]; + } + result["default"] = mod; + return result; + }; + __importDefault = function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + __classPrivateFieldGet = function(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); + }; + __classPrivateFieldSet = function(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; + }; + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding2); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar2); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + }); + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/constants.js +var require_constants10 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.S_IFLNK = exports2.S_IFREG = exports2.S_IFDIR = exports2.S_IFMT = void 0; + exports2.S_IFMT = 61440; + exports2.S_IFDIR = 16384; + exports2.S_IFREG = 32768; + exports2.S_IFLNK = 40960; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/statUtils.js +var require_statUtils = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/statUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.areStatsEqual = exports2.convertToBigIntStats = exports2.clearStats = exports2.makeEmptyStats = exports2.makeDefaultStats = exports2.BigIntStatsEntry = exports2.StatEntry = exports2.DirEntry = void 0; + var tslib_1 = require_tslib(); + var nodeUtils = (0, tslib_1.__importStar)(require("util")); + var constants_1 = require_constants10(); + var DirEntry = class { + constructor() { + this.name = ``; + this.mode = 0; + } + isBlockDevice() { + return false; + } + isCharacterDevice() { + return false; + } + isDirectory() { + return (this.mode & constants_1.S_IFMT) === constants_1.S_IFDIR; + } + isFIFO() { + return false; + } + isFile() { + return (this.mode & constants_1.S_IFMT) === constants_1.S_IFREG; + } + isSocket() { + return false; + } + isSymbolicLink() { + return (this.mode & constants_1.S_IFMT) === constants_1.S_IFLNK; + } + }; + exports2.DirEntry = DirEntry; + var StatEntry = class { + constructor() { + this.uid = 0; + this.gid = 0; + this.size = 0; + this.blksize = 0; + this.atimeMs = 0; + this.mtimeMs = 0; + this.ctimeMs = 0; + this.birthtimeMs = 0; + this.atime = new Date(0); + this.mtime = new Date(0); + this.ctime = new Date(0); + this.birthtime = new Date(0); + this.dev = 0; + this.ino = 0; + this.mode = constants_1.S_IFREG | 420; + this.nlink = 1; + this.rdev = 0; + this.blocks = 1; + } + isBlockDevice() { + return false; + } + isCharacterDevice() { + return false; + } + isDirectory() { + return (this.mode & constants_1.S_IFMT) === constants_1.S_IFDIR; + } + isFIFO() { + return false; + } + isFile() { + return (this.mode & constants_1.S_IFMT) === constants_1.S_IFREG; + } + isSocket() { + return false; + } + isSymbolicLink() { + return (this.mode & constants_1.S_IFMT) === constants_1.S_IFLNK; + } + }; + exports2.StatEntry = StatEntry; + var BigIntStatsEntry = class { + constructor() { + this.uid = BigInt(0); + this.gid = BigInt(0); + this.size = BigInt(0); + this.blksize = BigInt(0); + this.atimeMs = BigInt(0); + this.mtimeMs = BigInt(0); + this.ctimeMs = BigInt(0); + this.birthtimeMs = BigInt(0); + this.atimeNs = BigInt(0); + this.mtimeNs = BigInt(0); + this.ctimeNs = BigInt(0); + this.birthtimeNs = BigInt(0); + this.atime = new Date(0); + this.mtime = new Date(0); + this.ctime = new Date(0); + this.birthtime = new Date(0); + this.dev = BigInt(0); + this.ino = BigInt(0); + this.mode = BigInt(constants_1.S_IFREG | 420); + this.nlink = BigInt(1); + this.rdev = BigInt(0); + this.blocks = BigInt(1); + } + isBlockDevice() { + return false; + } + isCharacterDevice() { + return false; + } + isDirectory() { + return (this.mode & BigInt(constants_1.S_IFMT)) === BigInt(constants_1.S_IFDIR); + } + isFIFO() { + return false; + } + isFile() { + return (this.mode & BigInt(constants_1.S_IFMT)) === BigInt(constants_1.S_IFREG); + } + isSocket() { + return false; + } + isSymbolicLink() { + return (this.mode & BigInt(constants_1.S_IFMT)) === BigInt(constants_1.S_IFLNK); + } + }; + exports2.BigIntStatsEntry = BigIntStatsEntry; + function makeDefaultStats() { + return new StatEntry(); + } + exports2.makeDefaultStats = makeDefaultStats; + function makeEmptyStats() { + return clearStats(makeDefaultStats()); + } + exports2.makeEmptyStats = makeEmptyStats; + function clearStats(stats) { + for (const key in stats) { + if (Object.prototype.hasOwnProperty.call(stats, key)) { + const element = stats[key]; + if (typeof element === `number`) { + stats[key] = 0; + } else if (typeof element === `bigint`) { + stats[key] = BigInt(0); + } else if (nodeUtils.types.isDate(element)) { + stats[key] = new Date(0); + } + } + } + return stats; + } + exports2.clearStats = clearStats; + function convertToBigIntStats(stats) { + const bigintStats = new BigIntStatsEntry(); + for (const key in stats) { + if (Object.prototype.hasOwnProperty.call(stats, key)) { + const element = stats[key]; + if (typeof element === `number`) { + bigintStats[key] = BigInt(element); + } else if (nodeUtils.types.isDate(element)) { + bigintStats[key] = new Date(element); + } + } + } + bigintStats.atimeNs = bigintStats.atimeMs * BigInt(1e6); + bigintStats.mtimeNs = bigintStats.mtimeMs * BigInt(1e6); + bigintStats.ctimeNs = bigintStats.ctimeMs * BigInt(1e6); + bigintStats.birthtimeNs = bigintStats.birthtimeMs * BigInt(1e6); + return bigintStats; + } + exports2.convertToBigIntStats = convertToBigIntStats; + function areStatsEqual(a, b) { + if (a.atimeMs !== b.atimeMs) + return false; + if (a.birthtimeMs !== b.birthtimeMs) + return false; + if (a.blksize !== b.blksize) + return false; + if (a.blocks !== b.blocks) + return false; + if (a.ctimeMs !== b.ctimeMs) + return false; + if (a.dev !== b.dev) + return false; + if (a.gid !== b.gid) + return false; + if (a.ino !== b.ino) + return false; + if (a.isBlockDevice() !== b.isBlockDevice()) + return false; + if (a.isCharacterDevice() !== b.isCharacterDevice()) + return false; + if (a.isDirectory() !== b.isDirectory()) + return false; + if (a.isFIFO() !== b.isFIFO()) + return false; + if (a.isFile() !== b.isFile()) + return false; + if (a.isSocket() !== b.isSocket()) + return false; + if (a.isSymbolicLink() !== b.isSymbolicLink()) + return false; + if (a.mode !== b.mode) + return false; + if (a.mtimeMs !== b.mtimeMs) + return false; + if (a.nlink !== b.nlink) + return false; + if (a.rdev !== b.rdev) + return false; + if (a.size !== b.size) + return false; + if (a.uid !== b.uid) + return false; + const aN = a; + const bN = b; + if (aN.atimeNs !== bN.atimeNs) + return false; + if (aN.mtimeNs !== bN.mtimeNs) + return false; + if (aN.ctimeNs !== bN.ctimeNs) + return false; + if (aN.birthtimeNs !== bN.birthtimeNs) + return false; + return true; + } + exports2.areStatsEqual = areStatsEqual; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/path.js +var require_path4 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/path.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toFilename = exports2.convertPath = exports2.ppath = exports2.npath = exports2.Filename = exports2.PortablePath = void 0; + var tslib_1 = require_tslib(); + var path_1 = (0, tslib_1.__importDefault)(require("path")); + var PathType; + (function(PathType2) { + PathType2[PathType2["File"] = 0] = "File"; + PathType2[PathType2["Portable"] = 1] = "Portable"; + PathType2[PathType2["Native"] = 2] = "Native"; + })(PathType || (PathType = {})); + exports2.PortablePath = { + root: `/`, + dot: `.` + }; + exports2.Filename = { + nodeModules: `node_modules`, + manifest: `package.json`, + lockfile: `yarn.lock`, + virtual: `__virtual__`, + pnpJs: `.pnp.js`, + pnpCjs: `.pnp.cjs`, + rc: `.yarnrc.yml` + }; + exports2.npath = Object.create(path_1.default); + exports2.ppath = Object.create(path_1.default.posix); + exports2.npath.cwd = () => process.cwd(); + exports2.ppath.cwd = () => toPortablePath(process.cwd()); + exports2.ppath.resolve = (...segments) => { + if (segments.length > 0 && exports2.ppath.isAbsolute(segments[0])) { + return path_1.default.posix.resolve(...segments); + } else { + return path_1.default.posix.resolve(exports2.ppath.cwd(), ...segments); + } + }; + var contains = function(pathUtils, from, to) { + from = pathUtils.normalize(from); + to = pathUtils.normalize(to); + if (from === to) + return `.`; + if (!from.endsWith(pathUtils.sep)) + from = from + pathUtils.sep; + if (to.startsWith(from)) { + return to.slice(from.length); + } else { + return null; + } + }; + exports2.npath.fromPortablePath = fromPortablePath; + exports2.npath.toPortablePath = toPortablePath; + exports2.npath.contains = (from, to) => contains(exports2.npath, from, to); + exports2.ppath.contains = (from, to) => contains(exports2.ppath, from, to); + var WINDOWS_PATH_REGEXP = /^([a-zA-Z]:.*)$/; + var UNC_WINDOWS_PATH_REGEXP = /^\\\\(\.\\)?(.*)$/; + var PORTABLE_PATH_REGEXP = /^\/([a-zA-Z]:.*)$/; + var UNC_PORTABLE_PATH_REGEXP = /^\/unc\/(\.dot\/)?(.*)$/; + function fromPortablePath(p) { + if (process.platform !== `win32`) + return p; + if (p.match(PORTABLE_PATH_REGEXP)) + p = p.replace(PORTABLE_PATH_REGEXP, `$1`); + else if (p.match(UNC_PORTABLE_PATH_REGEXP)) + p = p.replace(UNC_PORTABLE_PATH_REGEXP, (match, p1, p2) => `\\\\${p1 ? `.\\` : ``}${p2}`); + else + return p; + return p.replace(/\//g, `\\`); + } + function toPortablePath(p) { + if (process.platform !== `win32`) + return p; + if (p.match(WINDOWS_PATH_REGEXP)) + p = p.replace(WINDOWS_PATH_REGEXP, `/$1`); + else if (p.match(UNC_WINDOWS_PATH_REGEXP)) + p = p.replace(UNC_WINDOWS_PATH_REGEXP, (match, p1, p2) => `/unc/${p1 ? `.dot/` : ``}${p2}`); + return p.replace(/\\/g, `/`); + } + function convertPath(targetPathUtils, sourcePath) { + return targetPathUtils === exports2.npath ? fromPortablePath(sourcePath) : toPortablePath(sourcePath); + } + exports2.convertPath = convertPath; + function toFilename(filename) { + if (exports2.npath.parse(filename).dir !== `` || exports2.ppath.parse(filename).dir !== ``) + throw new Error(`Invalid filename: "${filename}"`); + return filename; + } + exports2.toFilename = toFilename; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/algorithms/copyPromise.js +var require_copyPromise = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/algorithms/copyPromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.copyPromise = exports2.LinkStrategy = void 0; + var tslib_1 = require_tslib(); + var fs_1 = (0, tslib_1.__importDefault)(require("fs")); + var path_1 = require_path4(); + var defaultTime = new Date(315532800 * 1e3); + var LinkStrategy; + (function(LinkStrategy2) { + LinkStrategy2["Allow"] = "allow"; + LinkStrategy2["ReadOnly"] = "readOnly"; + })(LinkStrategy = exports2.LinkStrategy || (exports2.LinkStrategy = {})); + async function copyPromise(destinationFs, destination, sourceFs, source, opts) { + const normalizedDestination = destinationFs.pathUtils.normalize(destination); + const normalizedSource = sourceFs.pathUtils.normalize(source); + const prelayout = []; + const postlayout = []; + await destinationFs.mkdirPromise(destinationFs.pathUtils.dirname(destination), { recursive: true }); + const updateTime = typeof destinationFs.lutimesPromise === `function` ? destinationFs.lutimesPromise.bind(destinationFs) : destinationFs.utimesPromise.bind(destinationFs); + await copyImpl(prelayout, postlayout, updateTime, destinationFs, normalizedDestination, sourceFs, normalizedSource, opts); + for (const operation of prelayout) + await operation(); + await Promise.all(postlayout.map((operation) => { + return operation(); + })); + } + exports2.copyPromise = copyPromise; + async function copyImpl(prelayout, postlayout, updateTime, destinationFs, destination, sourceFs, source, opts) { + var _a, _b; + const destinationStat = await maybeLStat(destinationFs, destination); + const sourceStat = await sourceFs.lstatPromise(source); + const referenceTime = opts.stableTime ? { mtime: defaultTime, atime: defaultTime } : sourceStat; + let updated; + switch (true) { + case sourceStat.isDirectory(): + { + updated = await copyFolder(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts); + } + break; + case sourceStat.isFile(): + { + updated = await copyFile(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts); + } + break; + case sourceStat.isSymbolicLink(): + { + updated = await copySymlink(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts); + } + break; + default: + { + throw new Error(`Unsupported file type (${sourceStat.mode})`); + } + break; + } + if (updated || ((_a = destinationStat === null || destinationStat === void 0 ? void 0 : destinationStat.mtime) === null || _a === void 0 ? void 0 : _a.getTime()) !== referenceTime.mtime.getTime() || ((_b = destinationStat === null || destinationStat === void 0 ? void 0 : destinationStat.atime) === null || _b === void 0 ? void 0 : _b.getTime()) !== referenceTime.atime.getTime()) { + postlayout.push(() => updateTime(destination, referenceTime.atime, referenceTime.mtime)); + updated = true; + } + if (destinationStat === null || (destinationStat.mode & 511) !== (sourceStat.mode & 511)) { + postlayout.push(() => destinationFs.chmodPromise(destination, sourceStat.mode & 511)); + updated = true; + } + return updated; + } + async function maybeLStat(baseFs, p) { + try { + return await baseFs.lstatPromise(p); + } catch (e) { + return null; + } + } + async function copyFolder(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts) { + if (destinationStat !== null && !destinationStat.isDirectory()) { + if (opts.overwrite) { + prelayout.push(async () => destinationFs.removePromise(destination)); + destinationStat = null; + } else { + return false; + } + } + let updated = false; + if (destinationStat === null) { + prelayout.push(async () => destinationFs.mkdirPromise(destination, { mode: sourceStat.mode })); + updated = true; + } + const entries = await sourceFs.readdirPromise(source); + if (opts.stableSort) { + for (const entry of entries.sort()) { + if (await copyImpl(prelayout, postlayout, updateTime, destinationFs, destinationFs.pathUtils.join(destination, entry), sourceFs, sourceFs.pathUtils.join(source, entry), opts)) { + updated = true; + } + } + } else { + const entriesUpdateStatus = await Promise.all(entries.map(async (entry) => { + await copyImpl(prelayout, postlayout, updateTime, destinationFs, destinationFs.pathUtils.join(destination, entry), sourceFs, sourceFs.pathUtils.join(source, entry), opts); + })); + if (entriesUpdateStatus.some((status) => status)) { + updated = true; + } + } + return updated; + } + var isCloneSupportedCache = new WeakMap(); + function makeLinkOperation(opFs, destination, source, sourceStat, linkStrategy) { + return async () => { + await opFs.linkPromise(source, destination); + if (linkStrategy === LinkStrategy.ReadOnly) { + sourceStat.mode &= ~146; + await opFs.chmodPromise(destination, sourceStat.mode); + } + }; + } + function makeCloneLinkOperation(opFs, destination, source, sourceStat, linkStrategy) { + const isCloneSupported = isCloneSupportedCache.get(opFs); + if (typeof isCloneSupported === `undefined`) { + return async () => { + try { + await opFs.copyFilePromise(source, destination, fs_1.default.constants.COPYFILE_FICLONE_FORCE); + isCloneSupportedCache.set(opFs, true); + } catch (err) { + if (err.code === `ENOSYS` || err.code === `ENOTSUP`) { + isCloneSupportedCache.set(opFs, false); + await makeLinkOperation(opFs, destination, source, sourceStat, linkStrategy)(); + } else { + throw err; + } + } + }; + } else { + if (isCloneSupported) { + return async () => opFs.copyFilePromise(source, destination, fs_1.default.constants.COPYFILE_FICLONE_FORCE); + } else { + return makeLinkOperation(opFs, destination, source, sourceStat, linkStrategy); + } + } + } + async function copyFile(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts) { + var _a; + if (destinationStat !== null) { + if (opts.overwrite) { + prelayout.push(async () => destinationFs.removePromise(destination)); + destinationStat = null; + } else { + return false; + } + } + const linkStrategy = (_a = opts.linkStrategy) !== null && _a !== void 0 ? _a : null; + const op = destinationFs === sourceFs ? linkStrategy !== null ? makeCloneLinkOperation(destinationFs, destination, source, sourceStat, linkStrategy) : async () => destinationFs.copyFilePromise(source, destination, fs_1.default.constants.COPYFILE_FICLONE) : linkStrategy !== null ? makeLinkOperation(destinationFs, destination, source, sourceStat, linkStrategy) : async () => destinationFs.writeFilePromise(destination, await sourceFs.readFilePromise(source)); + prelayout.push(async () => op()); + return true; + } + async function copySymlink(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts) { + if (destinationStat !== null) { + if (opts.overwrite) { + prelayout.push(async () => destinationFs.removePromise(destination)); + destinationStat = null; + } else { + return false; + } + } + prelayout.push(async () => { + await destinationFs.symlinkPromise((0, path_1.convertPath)(destinationFs.pathUtils, await sourceFs.readlinkPromise(source)), destination); + }); + return true; + } + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/errors.js +var require_errors4 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/errors.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LibzipError = exports2.ERR_DIR_CLOSED = exports2.EOPNOTSUPP = exports2.ENOTEMPTY = exports2.EROFS = exports2.EEXIST = exports2.EISDIR = exports2.ENOTDIR = exports2.ENOENT = exports2.EBADF = exports2.EINVAL = exports2.ENOSYS = exports2.EBUSY = void 0; + function makeError(code, message2) { + return Object.assign(new Error(`${code}: ${message2}`), { code }); + } + function EBUSY(message2) { + return makeError(`EBUSY`, message2); + } + exports2.EBUSY = EBUSY; + function ENOSYS(message2, reason) { + return makeError(`ENOSYS`, `${message2}, ${reason}`); + } + exports2.ENOSYS = ENOSYS; + function EINVAL(reason) { + return makeError(`EINVAL`, `invalid argument, ${reason}`); + } + exports2.EINVAL = EINVAL; + function EBADF(reason) { + return makeError(`EBADF`, `bad file descriptor, ${reason}`); + } + exports2.EBADF = EBADF; + function ENOENT(reason) { + return makeError(`ENOENT`, `no such file or directory, ${reason}`); + } + exports2.ENOENT = ENOENT; + function ENOTDIR(reason) { + return makeError(`ENOTDIR`, `not a directory, ${reason}`); + } + exports2.ENOTDIR = ENOTDIR; + function EISDIR(reason) { + return makeError(`EISDIR`, `illegal operation on a directory, ${reason}`); + } + exports2.EISDIR = EISDIR; + function EEXIST(reason) { + return makeError(`EEXIST`, `file already exists, ${reason}`); + } + exports2.EEXIST = EEXIST; + function EROFS(reason) { + return makeError(`EROFS`, `read-only filesystem, ${reason}`); + } + exports2.EROFS = EROFS; + function ENOTEMPTY(reason) { + return makeError(`ENOTEMPTY`, `directory not empty, ${reason}`); + } + exports2.ENOTEMPTY = ENOTEMPTY; + function EOPNOTSUPP(reason) { + return makeError(`EOPNOTSUPP`, `operation not supported, ${reason}`); + } + exports2.EOPNOTSUPP = EOPNOTSUPP; + function ERR_DIR_CLOSED() { + return makeError(`ERR_DIR_CLOSED`, `Directory handle was closed`); + } + exports2.ERR_DIR_CLOSED = ERR_DIR_CLOSED; + var LibzipError = class extends Error { + constructor(message2, code) { + super(message2); + this.name = `Libzip Error`; + this.code = code; + } + }; + exports2.LibzipError = LibzipError; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/algorithms/opendir.js +var require_opendir = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/algorithms/opendir.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.opendir = exports2.CustomDir = void 0; + var tslib_1 = require_tslib(); + var errors = (0, tslib_1.__importStar)(require_errors4()); + var CustomDir = class { + constructor(path, nextDirent, opts = {}) { + this.path = path; + this.nextDirent = nextDirent; + this.opts = opts; + this.closed = false; + } + throwIfClosed() { + if (this.closed) { + throw errors.ERR_DIR_CLOSED(); + } + } + async *[Symbol.asyncIterator]() { + try { + let dirent; + while ((dirent = await this.read()) !== null) { + yield dirent; + } + } finally { + await this.close(); + } + } + read(cb) { + const dirent = this.readSync(); + if (typeof cb !== `undefined`) + return cb(null, dirent); + return Promise.resolve(dirent); + } + readSync() { + this.throwIfClosed(); + return this.nextDirent(); + } + close(cb) { + this.closeSync(); + if (typeof cb !== `undefined`) + return cb(null); + return Promise.resolve(); + } + closeSync() { + var _a, _b; + this.throwIfClosed(); + (_b = (_a = this.opts).onClose) === null || _b === void 0 ? void 0 : _b.call(_a); + this.closed = true; + } + }; + exports2.CustomDir = CustomDir; + function opendir(fakeFs, path, entries, opts) { + const nextDirent = () => { + const filename = entries.shift(); + if (typeof filename === `undefined`) + return null; + return Object.assign(fakeFs.statSync(fakeFs.pathUtils.join(path, filename)), { + name: filename + }); + }; + return new CustomDir(path, nextDirent, opts); + } + exports2.opendir = opendir; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/FakeFS.js +var require_FakeFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/FakeFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.normalizeLineEndings = exports2.BasePortableFakeFS = exports2.FakeFS = void 0; + var os_1 = require("os"); + var copyPromise_1 = require_copyPromise(); + var path_1 = require_path4(); + var FakeFS = class { + constructor(pathUtils) { + this.pathUtils = pathUtils; + } + async *genTraversePromise(init, { stableSort = false } = {}) { + const stack2 = [init]; + while (stack2.length > 0) { + const p = stack2.shift(); + const entry = await this.lstatPromise(p); + if (entry.isDirectory()) { + const entries = await this.readdirPromise(p); + if (stableSort) { + for (const entry2 of entries.sort()) { + stack2.push(this.pathUtils.join(p, entry2)); + } + } else { + throw new Error(`Not supported`); + } + } else { + yield p; + } + } + } + async removePromise(p, { recursive = true, maxRetries = 5 } = {}) { + let stat; + try { + stat = await this.lstatPromise(p); + } catch (error) { + if (error.code === `ENOENT`) { + return; + } else { + throw error; + } + } + if (stat.isDirectory()) { + if (recursive) { + const entries = await this.readdirPromise(p); + await Promise.all(entries.map((entry) => { + return this.removePromise(this.pathUtils.resolve(p, entry)); + })); + } + let t = 0; + do { + try { + await this.rmdirPromise(p); + break; + } catch (error) { + if (error.code === `EBUSY` || error.code === `ENOTEMPTY`) { + if (maxRetries === 0) { + break; + } else { + await new Promise((resolve) => setTimeout(resolve, t * 100)); + continue; + } + } else { + throw error; + } + } + } while (t++ < maxRetries); + } else { + await this.unlinkPromise(p); + } + } + removeSync(p, { recursive = true } = {}) { + let stat; + try { + stat = this.lstatSync(p); + } catch (error) { + if (error.code === `ENOENT`) { + return; + } else { + throw error; + } + } + if (stat.isDirectory()) { + if (recursive) + for (const entry of this.readdirSync(p)) + this.removeSync(this.pathUtils.resolve(p, entry)); + this.rmdirSync(p); + } else { + this.unlinkSync(p); + } + } + async mkdirpPromise(p, { chmod, utimes } = {}) { + p = this.resolve(p); + if (p === this.pathUtils.dirname(p)) + return; + const parts = p.split(this.pathUtils.sep); + for (let u = 2; u <= parts.length; ++u) { + const subPath = parts.slice(0, u).join(this.pathUtils.sep); + if (!this.existsSync(subPath)) { + try { + await this.mkdirPromise(subPath); + } catch (error) { + if (error.code === `EEXIST`) { + continue; + } else { + throw error; + } + } + if (chmod != null) + await this.chmodPromise(subPath, chmod); + if (utimes != null) { + await this.utimesPromise(subPath, utimes[0], utimes[1]); + } else { + const parentStat = await this.statPromise(this.pathUtils.dirname(subPath)); + await this.utimesPromise(subPath, parentStat.atime, parentStat.mtime); + } + } + } + } + mkdirpSync(p, { chmod, utimes } = {}) { + p = this.resolve(p); + if (p === this.pathUtils.dirname(p)) + return; + const parts = p.split(this.pathUtils.sep); + for (let u = 2; u <= parts.length; ++u) { + const subPath = parts.slice(0, u).join(this.pathUtils.sep); + if (!this.existsSync(subPath)) { + try { + this.mkdirSync(subPath); + } catch (error) { + if (error.code === `EEXIST`) { + continue; + } else { + throw error; + } + } + if (chmod != null) + this.chmodSync(subPath, chmod); + if (utimes != null) { + this.utimesSync(subPath, utimes[0], utimes[1]); + } else { + const parentStat = this.statSync(this.pathUtils.dirname(subPath)); + this.utimesSync(subPath, parentStat.atime, parentStat.mtime); + } + } + } + } + async copyPromise(destination, source, { baseFs = this, overwrite = true, stableSort = false, stableTime = false, linkStrategy = null } = {}) { + return await (0, copyPromise_1.copyPromise)(this, destination, baseFs, source, { overwrite, stableSort, stableTime, linkStrategy }); + } + copySync(destination, source, { baseFs = this, overwrite = true } = {}) { + const stat = baseFs.lstatSync(source); + const exists = this.existsSync(destination); + if (stat.isDirectory()) { + this.mkdirpSync(destination); + const directoryListing = baseFs.readdirSync(source); + for (const entry of directoryListing) { + this.copySync(this.pathUtils.join(destination, entry), baseFs.pathUtils.join(source, entry), { baseFs, overwrite }); + } + } else if (stat.isFile()) { + if (!exists || overwrite) { + if (exists) + this.removeSync(destination); + const content = baseFs.readFileSync(source); + this.writeFileSync(destination, content); + } + } else if (stat.isSymbolicLink()) { + if (!exists || overwrite) { + if (exists) + this.removeSync(destination); + const target = baseFs.readlinkSync(source); + this.symlinkSync((0, path_1.convertPath)(this.pathUtils, target), destination); + } + } else { + throw new Error(`Unsupported file type (file: ${source}, mode: 0o${stat.mode.toString(8).padStart(6, `0`)})`); + } + const mode = stat.mode & 511; + this.chmodSync(destination, mode); + } + async changeFilePromise(p, content, opts = {}) { + if (Buffer.isBuffer(content)) { + return this.changeFileBufferPromise(p, content); + } else { + return this.changeFileTextPromise(p, content, opts); + } + } + async changeFileBufferPromise(p, content) { + let current = Buffer.alloc(0); + try { + current = await this.readFilePromise(p); + } catch (error) { + } + if (Buffer.compare(current, content) === 0) + return; + await this.writeFilePromise(p, content); + } + async changeFileTextPromise(p, content, { automaticNewlines } = {}) { + let current = ``; + try { + current = await this.readFilePromise(p, `utf8`); + } catch (error) { + } + const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; + if (current === normalizedContent) + return; + await this.writeFilePromise(p, normalizedContent); + } + changeFileSync(p, content, opts = {}) { + if (Buffer.isBuffer(content)) { + return this.changeFileBufferSync(p, content); + } else { + return this.changeFileTextSync(p, content, opts); + } + } + changeFileBufferSync(p, content) { + let current = Buffer.alloc(0); + try { + current = this.readFileSync(p); + } catch (error) { + } + if (Buffer.compare(current, content) === 0) + return; + this.writeFileSync(p, content); + } + changeFileTextSync(p, content, { automaticNewlines = false } = {}) { + let current = ``; + try { + current = this.readFileSync(p, `utf8`); + } catch (error) { + } + const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; + if (current === normalizedContent) + return; + this.writeFileSync(p, normalizedContent); + } + async movePromise(fromP, toP) { + try { + await this.renamePromise(fromP, toP); + } catch (error) { + if (error.code === `EXDEV`) { + await this.copyPromise(toP, fromP); + await this.removePromise(fromP); + } else { + throw error; + } + } + } + moveSync(fromP, toP) { + try { + this.renameSync(fromP, toP); + } catch (error) { + if (error.code === `EXDEV`) { + this.copySync(toP, fromP); + this.removeSync(fromP); + } else { + throw error; + } + } + } + async lockPromise(affectedPath, callback) { + const lockPath = `${affectedPath}.flock`; + const interval = 1e3 / 60; + const startTime = Date.now(); + let fd = null; + const isAlive = async () => { + let pid; + try { + [pid] = await this.readJsonPromise(lockPath); + } catch (error) { + return Date.now() - startTime < 500; + } + try { + process.kill(pid, 0); + return true; + } catch (error) { + return false; + } + }; + while (fd === null) { + try { + fd = await this.openPromise(lockPath, `wx`); + } catch (error) { + if (error.code === `EEXIST`) { + if (!await isAlive()) { + try { + await this.unlinkPromise(lockPath); + continue; + } catch (error2) { + } + } + if (Date.now() - startTime < 60 * 1e3) { + await new Promise((resolve) => setTimeout(resolve, interval)); + } else { + throw new Error(`Couldn't acquire a lock in a reasonable time (via ${lockPath})`); + } + } else { + throw error; + } + } + } + await this.writePromise(fd, JSON.stringify([process.pid])); + try { + return await callback(); + } finally { + try { + await this.closePromise(fd); + await this.unlinkPromise(lockPath); + } catch (error) { + } + } + } + async readJsonPromise(p) { + const content = await this.readFilePromise(p, `utf8`); + try { + return JSON.parse(content); + } catch (error) { + error.message += ` (in ${p})`; + throw error; + } + } + readJsonSync(p) { + const content = this.readFileSync(p, `utf8`); + try { + return JSON.parse(content); + } catch (error) { + error.message += ` (in ${p})`; + throw error; + } + } + async writeJsonPromise(p, data) { + return await this.writeFilePromise(p, `${JSON.stringify(data, null, 2)} +`); + } + writeJsonSync(p, data) { + return this.writeFileSync(p, `${JSON.stringify(data, null, 2)} +`); + } + async preserveTimePromise(p, cb) { + const stat = await this.lstatPromise(p); + const result = await cb(); + if (typeof result !== `undefined`) + p = result; + if (this.lutimesPromise) { + await this.lutimesPromise(p, stat.atime, stat.mtime); + } else if (!stat.isSymbolicLink()) { + await this.utimesPromise(p, stat.atime, stat.mtime); + } + } + async preserveTimeSync(p, cb) { + const stat = this.lstatSync(p); + const result = cb(); + if (typeof result !== `undefined`) + p = result; + if (this.lutimesSync) { + this.lutimesSync(p, stat.atime, stat.mtime); + } else if (!stat.isSymbolicLink()) { + this.utimesSync(p, stat.atime, stat.mtime); + } + } + }; + exports2.FakeFS = FakeFS; + FakeFS.DEFAULT_TIME = 315532800; + var BasePortableFakeFS = class extends FakeFS { + constructor() { + super(path_1.ppath); + } + }; + exports2.BasePortableFakeFS = BasePortableFakeFS; + function getEndOfLine(content) { + const matches = content.match(/\r?\n/g); + if (matches === null) + return os_1.EOL; + const crlf = matches.filter((nl) => nl === `\r +`).length; + const lf = matches.length - crlf; + return crlf > lf ? `\r +` : ` +`; + } + function normalizeLineEndings(originalContent, newContent) { + return newContent.replace(/\r?\n/g, getEndOfLine(originalContent)); + } + exports2.normalizeLineEndings = normalizeLineEndings; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/NodeFS.js +var require_NodeFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/NodeFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NodeFS = void 0; + var tslib_1 = require_tslib(); + var fs_1 = (0, tslib_1.__importDefault)(require("fs")); + var FakeFS_1 = require_FakeFS(); + var errors_1 = require_errors4(); + var path_1 = require_path4(); + var NodeFS = class extends FakeFS_1.BasePortableFakeFS { + constructor(realFs = fs_1.default) { + super(); + this.realFs = realFs; + if (typeof this.realFs.lutimes !== `undefined`) { + this.lutimesPromise = this.lutimesPromiseImpl; + this.lutimesSync = this.lutimesSyncImpl; + } + } + getExtractHint() { + return false; + } + getRealPath() { + return path_1.PortablePath.root; + } + resolve(p) { + return path_1.ppath.resolve(p); + } + async openPromise(p, flags, mode) { + return await new Promise((resolve, reject) => { + this.realFs.open(path_1.npath.fromPortablePath(p), flags, mode, this.makeCallback(resolve, reject)); + }); + } + openSync(p, flags, mode) { + return this.realFs.openSync(path_1.npath.fromPortablePath(p), flags, mode); + } + async opendirPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (typeof opts !== `undefined`) { + this.realFs.opendir(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.opendir(path_1.npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + } + }).then((dir) => { + return Object.defineProperty(dir, `path`, { value: p, configurable: true, writable: true }); + }); + } + opendirSync(p, opts) { + const dir = typeof opts !== `undefined` ? this.realFs.opendirSync(path_1.npath.fromPortablePath(p), opts) : this.realFs.opendirSync(path_1.npath.fromPortablePath(p)); + return Object.defineProperty(dir, `path`, { value: p, configurable: true, writable: true }); + } + async readPromise(fd, buffer, offset = 0, length = 0, position = -1) { + return await new Promise((resolve, reject) => { + this.realFs.read(fd, buffer, offset, length, position, (error, bytesRead) => { + if (error) { + reject(error); + } else { + resolve(bytesRead); + } + }); + }); + } + readSync(fd, buffer, offset, length, position) { + return this.realFs.readSync(fd, buffer, offset, length, position); + } + async writePromise(fd, buffer, offset, length, position) { + return await new Promise((resolve, reject) => { + if (typeof buffer === `string`) { + return this.realFs.write(fd, buffer, offset, this.makeCallback(resolve, reject)); + } else { + return this.realFs.write(fd, buffer, offset, length, position, this.makeCallback(resolve, reject)); + } + }); + } + writeSync(fd, buffer, offset, length, position) { + if (typeof buffer === `string`) { + return this.realFs.writeSync(fd, buffer, offset); + } else { + return this.realFs.writeSync(fd, buffer, offset, length, position); + } + } + async closePromise(fd) { + await new Promise((resolve, reject) => { + this.realFs.close(fd, this.makeCallback(resolve, reject)); + }); + } + closeSync(fd) { + this.realFs.closeSync(fd); + } + createReadStream(p, opts) { + const realPath = p !== null ? path_1.npath.fromPortablePath(p) : p; + return this.realFs.createReadStream(realPath, opts); + } + createWriteStream(p, opts) { + const realPath = p !== null ? path_1.npath.fromPortablePath(p) : p; + return this.realFs.createWriteStream(realPath, opts); + } + async realpathPromise(p) { + return await new Promise((resolve, reject) => { + this.realFs.realpath(path_1.npath.fromPortablePath(p), {}, this.makeCallback(resolve, reject)); + }).then((path) => { + return path_1.npath.toPortablePath(path); + }); + } + realpathSync(p) { + return path_1.npath.toPortablePath(this.realFs.realpathSync(path_1.npath.fromPortablePath(p), {})); + } + async existsPromise(p) { + return await new Promise((resolve) => { + this.realFs.exists(path_1.npath.fromPortablePath(p), resolve); + }); + } + accessSync(p, mode) { + return this.realFs.accessSync(path_1.npath.fromPortablePath(p), mode); + } + async accessPromise(p, mode) { + return await new Promise((resolve, reject) => { + this.realFs.access(path_1.npath.fromPortablePath(p), mode, this.makeCallback(resolve, reject)); + }); + } + existsSync(p) { + return this.realFs.existsSync(path_1.npath.fromPortablePath(p)); + } + async statPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (opts) { + this.realFs.stat(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.stat(path_1.npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + } + }); + } + statSync(p, opts) { + if (opts) { + return this.realFs.statSync(path_1.npath.fromPortablePath(p), opts); + } else { + return this.realFs.statSync(path_1.npath.fromPortablePath(p)); + } + } + async fstatPromise(fd, opts) { + return await new Promise((resolve, reject) => { + if (opts) { + this.realFs.fstat(fd, opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.fstat(fd, this.makeCallback(resolve, reject)); + } + }); + } + fstatSync(fd, opts) { + if (opts) { + return this.realFs.fstatSync(fd, opts); + } else { + return this.realFs.fstatSync(fd); + } + } + async lstatPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (opts) { + this.realFs.lstat(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.lstat(path_1.npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + } + }); + } + lstatSync(p, opts) { + if (opts) { + return this.realFs.lstatSync(path_1.npath.fromPortablePath(p), opts); + } else { + return this.realFs.lstatSync(path_1.npath.fromPortablePath(p)); + } + } + async chmodPromise(p, mask) { + return await new Promise((resolve, reject) => { + this.realFs.chmod(path_1.npath.fromPortablePath(p), mask, this.makeCallback(resolve, reject)); + }); + } + chmodSync(p, mask) { + return this.realFs.chmodSync(path_1.npath.fromPortablePath(p), mask); + } + async chownPromise(p, uid, gid) { + return await new Promise((resolve, reject) => { + this.realFs.chown(path_1.npath.fromPortablePath(p), uid, gid, this.makeCallback(resolve, reject)); + }); + } + chownSync(p, uid, gid) { + return this.realFs.chownSync(path_1.npath.fromPortablePath(p), uid, gid); + } + async renamePromise(oldP, newP) { + return await new Promise((resolve, reject) => { + this.realFs.rename(path_1.npath.fromPortablePath(oldP), path_1.npath.fromPortablePath(newP), this.makeCallback(resolve, reject)); + }); + } + renameSync(oldP, newP) { + return this.realFs.renameSync(path_1.npath.fromPortablePath(oldP), path_1.npath.fromPortablePath(newP)); + } + async copyFilePromise(sourceP, destP, flags = 0) { + return await new Promise((resolve, reject) => { + this.realFs.copyFile(path_1.npath.fromPortablePath(sourceP), path_1.npath.fromPortablePath(destP), flags, this.makeCallback(resolve, reject)); + }); + } + copyFileSync(sourceP, destP, flags = 0) { + return this.realFs.copyFileSync(path_1.npath.fromPortablePath(sourceP), path_1.npath.fromPortablePath(destP), flags); + } + async appendFilePromise(p, content, opts) { + return await new Promise((resolve, reject) => { + const fsNativePath = typeof p === `string` ? path_1.npath.fromPortablePath(p) : p; + if (opts) { + this.realFs.appendFile(fsNativePath, content, opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.appendFile(fsNativePath, content, this.makeCallback(resolve, reject)); + } + }); + } + appendFileSync(p, content, opts) { + const fsNativePath = typeof p === `string` ? path_1.npath.fromPortablePath(p) : p; + if (opts) { + this.realFs.appendFileSync(fsNativePath, content, opts); + } else { + this.realFs.appendFileSync(fsNativePath, content); + } + } + async writeFilePromise(p, content, opts) { + return await new Promise((resolve, reject) => { + const fsNativePath = typeof p === `string` ? path_1.npath.fromPortablePath(p) : p; + if (opts) { + this.realFs.writeFile(fsNativePath, content, opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.writeFile(fsNativePath, content, this.makeCallback(resolve, reject)); + } + }); + } + writeFileSync(p, content, opts) { + const fsNativePath = typeof p === `string` ? path_1.npath.fromPortablePath(p) : p; + if (opts) { + this.realFs.writeFileSync(fsNativePath, content, opts); + } else { + this.realFs.writeFileSync(fsNativePath, content); + } + } + async unlinkPromise(p) { + return await new Promise((resolve, reject) => { + this.realFs.unlink(path_1.npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + }); + } + unlinkSync(p) { + return this.realFs.unlinkSync(path_1.npath.fromPortablePath(p)); + } + async utimesPromise(p, atime, mtime) { + return await new Promise((resolve, reject) => { + this.realFs.utimes(path_1.npath.fromPortablePath(p), atime, mtime, this.makeCallback(resolve, reject)); + }); + } + utimesSync(p, atime, mtime) { + this.realFs.utimesSync(path_1.npath.fromPortablePath(p), atime, mtime); + } + async lutimesPromiseImpl(p, atime, mtime) { + const lutimes = this.realFs.lutimes; + if (typeof lutimes === `undefined`) + throw (0, errors_1.ENOSYS)(`unavailable Node binding`, `lutimes '${p}'`); + return await new Promise((resolve, reject) => { + lutimes.call(this.realFs, path_1.npath.fromPortablePath(p), atime, mtime, this.makeCallback(resolve, reject)); + }); + } + lutimesSyncImpl(p, atime, mtime) { + const lutimesSync = this.realFs.lutimesSync; + if (typeof lutimesSync === `undefined`) + throw (0, errors_1.ENOSYS)(`unavailable Node binding`, `lutimes '${p}'`); + lutimesSync.call(this.realFs, path_1.npath.fromPortablePath(p), atime, mtime); + } + async mkdirPromise(p, opts) { + return await new Promise((resolve, reject) => { + this.realFs.mkdir(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + }); + } + mkdirSync(p, opts) { + return this.realFs.mkdirSync(path_1.npath.fromPortablePath(p), opts); + } + async rmdirPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (opts) { + this.realFs.rmdir(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.rmdir(path_1.npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + } + }); + } + rmdirSync(p, opts) { + return this.realFs.rmdirSync(path_1.npath.fromPortablePath(p), opts); + } + async linkPromise(existingP, newP) { + return await new Promise((resolve, reject) => { + this.realFs.link(path_1.npath.fromPortablePath(existingP), path_1.npath.fromPortablePath(newP), this.makeCallback(resolve, reject)); + }); + } + linkSync(existingP, newP) { + return this.realFs.linkSync(path_1.npath.fromPortablePath(existingP), path_1.npath.fromPortablePath(newP)); + } + async symlinkPromise(target, p, type) { + return await new Promise((resolve, reject) => { + this.realFs.symlink(path_1.npath.fromPortablePath(target.replace(/\/+$/, ``)), path_1.npath.fromPortablePath(p), type, this.makeCallback(resolve, reject)); + }); + } + symlinkSync(target, p, type) { + return this.realFs.symlinkSync(path_1.npath.fromPortablePath(target.replace(/\/+$/, ``)), path_1.npath.fromPortablePath(p), type); + } + async readFilePromise(p, encoding) { + return await new Promise((resolve, reject) => { + const fsNativePath = typeof p === `string` ? path_1.npath.fromPortablePath(p) : p; + this.realFs.readFile(fsNativePath, encoding, this.makeCallback(resolve, reject)); + }); + } + readFileSync(p, encoding) { + const fsNativePath = typeof p === `string` ? path_1.npath.fromPortablePath(p) : p; + return this.realFs.readFileSync(fsNativePath, encoding); + } + async readdirPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (opts === null || opts === void 0 ? void 0 : opts.withFileTypes) { + this.realFs.readdir(path_1.npath.fromPortablePath(p), { withFileTypes: true }, this.makeCallback(resolve, reject)); + } else { + this.realFs.readdir(path_1.npath.fromPortablePath(p), this.makeCallback((value) => resolve(value), reject)); + } + }); + } + readdirSync(p, opts) { + if (opts === null || opts === void 0 ? void 0 : opts.withFileTypes) { + return this.realFs.readdirSync(path_1.npath.fromPortablePath(p), { withFileTypes: true }); + } else { + return this.realFs.readdirSync(path_1.npath.fromPortablePath(p)); + } + } + async readlinkPromise(p) { + return await new Promise((resolve, reject) => { + this.realFs.readlink(path_1.npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + }).then((path) => { + return path_1.npath.toPortablePath(path); + }); + } + readlinkSync(p) { + return path_1.npath.toPortablePath(this.realFs.readlinkSync(path_1.npath.fromPortablePath(p))); + } + async truncatePromise(p, len) { + return await new Promise((resolve, reject) => { + this.realFs.truncate(path_1.npath.fromPortablePath(p), len, this.makeCallback(resolve, reject)); + }); + } + truncateSync(p, len) { + return this.realFs.truncateSync(path_1.npath.fromPortablePath(p), len); + } + watch(p, a, b) { + return this.realFs.watch(path_1.npath.fromPortablePath(p), a, b); + } + watchFile(p, a, b) { + return this.realFs.watchFile(path_1.npath.fromPortablePath(p), a, b); + } + unwatchFile(p, cb) { + return this.realFs.unwatchFile(path_1.npath.fromPortablePath(p), cb); + } + makeCallback(resolve, reject) { + return (err, result) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }; + } + }; + exports2.NodeFS = NodeFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/algorithms/watchFile/CustomStatWatcher.js +var require_CustomStatWatcher = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/algorithms/watchFile/CustomStatWatcher.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CustomStatWatcher = exports2.assertStatus = exports2.Status = exports2.Event = void 0; + var tslib_1 = require_tslib(); + var events_1 = require("events"); + var statUtils = (0, tslib_1.__importStar)(require_statUtils()); + var Event; + (function(Event2) { + Event2["Change"] = "change"; + Event2["Stop"] = "stop"; + })(Event = exports2.Event || (exports2.Event = {})); + var Status; + (function(Status2) { + Status2["Ready"] = "ready"; + Status2["Running"] = "running"; + Status2["Stopped"] = "stopped"; + })(Status = exports2.Status || (exports2.Status = {})); + function assertStatus(current, expected) { + if (current !== expected) { + throw new Error(`Invalid StatWatcher status: expected '${expected}', got '${current}'`); + } + } + exports2.assertStatus = assertStatus; + var CustomStatWatcher = class extends events_1.EventEmitter { + constructor(fakeFs, path, { bigint = false } = {}) { + super(); + this.status = Status.Ready; + this.changeListeners = new Map(); + this.startTimeout = null; + this.fakeFs = fakeFs; + this.path = path; + this.bigint = bigint; + this.lastStats = this.stat(); + } + static create(fakeFs, path, opts) { + const statWatcher = new CustomStatWatcher(fakeFs, path, opts); + statWatcher.start(); + return statWatcher; + } + start() { + assertStatus(this.status, Status.Ready); + this.status = Status.Running; + this.startTimeout = setTimeout(() => { + this.startTimeout = null; + if (!this.fakeFs.existsSync(this.path)) { + this.emit(Event.Change, this.lastStats, this.lastStats); + } + }, 3); + } + stop() { + assertStatus(this.status, Status.Running); + this.status = Status.Stopped; + if (this.startTimeout !== null) { + clearTimeout(this.startTimeout); + this.startTimeout = null; + } + this.emit(Event.Stop); + } + stat() { + try { + return this.fakeFs.statSync(this.path, { bigint: this.bigint }); + } catch (error) { + if (error.code === `ENOENT`) { + const statInstance = this.bigint ? new statUtils.BigIntStatsEntry() : new statUtils.StatEntry(); + return statUtils.clearStats(statInstance); + } else { + throw error; + } + } + } + makeInterval(opts) { + const interval = setInterval(() => { + const currentStats = this.stat(); + const previousStats = this.lastStats; + if (statUtils.areStatsEqual(currentStats, previousStats)) + return; + this.lastStats = currentStats; + this.emit(Event.Change, currentStats, previousStats); + }, opts.interval); + return opts.persistent ? interval : interval.unref(); + } + registerChangeListener(listener, opts) { + this.addListener(Event.Change, listener); + this.changeListeners.set(listener, this.makeInterval(opts)); + } + unregisterChangeListener(listener) { + this.removeListener(Event.Change, listener); + const interval = this.changeListeners.get(listener); + if (typeof interval !== `undefined`) + clearInterval(interval); + this.changeListeners.delete(listener); + } + unregisterAllChangeListeners() { + for (const listener of this.changeListeners.keys()) { + this.unregisterChangeListener(listener); + } + } + hasChangeListeners() { + return this.changeListeners.size > 0; + } + ref() { + for (const interval of this.changeListeners.values()) + interval.ref(); + return this; + } + unref() { + for (const interval of this.changeListeners.values()) + interval.unref(); + return this; + } + }; + exports2.CustomStatWatcher = CustomStatWatcher; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/algorithms/watchFile.js +var require_watchFile = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/algorithms/watchFile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.unwatchAllFiles = exports2.unwatchFile = exports2.watchFile = void 0; + var CustomStatWatcher_1 = require_CustomStatWatcher(); + var statWatchersByFakeFS = new WeakMap(); + function watchFile(fakeFs, path, a, b) { + let bigint; + let persistent; + let interval; + let listener; + switch (typeof a) { + case `function`: + { + bigint = false; + persistent = true; + interval = 5007; + listener = a; + } + break; + default: + { + ({ + bigint = false, + persistent = true, + interval = 5007 + } = a); + listener = b; + } + break; + } + let statWatchers = statWatchersByFakeFS.get(fakeFs); + if (typeof statWatchers === `undefined`) + statWatchersByFakeFS.set(fakeFs, statWatchers = new Map()); + let statWatcher = statWatchers.get(path); + if (typeof statWatcher === `undefined`) { + statWatcher = CustomStatWatcher_1.CustomStatWatcher.create(fakeFs, path, { bigint }); + statWatchers.set(path, statWatcher); + } + statWatcher.registerChangeListener(listener, { persistent, interval }); + return statWatcher; + } + exports2.watchFile = watchFile; + function unwatchFile(fakeFs, path, cb) { + const statWatchers = statWatchersByFakeFS.get(fakeFs); + if (typeof statWatchers === `undefined`) + return; + const statWatcher = statWatchers.get(path); + if (typeof statWatcher === `undefined`) + return; + if (typeof cb === `undefined`) + statWatcher.unregisterAllChangeListeners(); + else + statWatcher.unregisterChangeListener(cb); + if (!statWatcher.hasChangeListeners()) { + statWatcher.stop(); + statWatchers.delete(path); + } + } + exports2.unwatchFile = unwatchFile; + function unwatchAllFiles(fakeFs) { + const statWatchers = statWatchersByFakeFS.get(fakeFs); + if (typeof statWatchers === `undefined`) + return; + for (const path of statWatchers.keys()) { + unwatchFile(fakeFs, path); + } + } + exports2.unwatchAllFiles = unwatchAllFiles; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/ZipFS.js +var require_ZipFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/ZipFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ZipFS = exports2.DEFAULT_COMPRESSION_LEVEL = void 0; + var tslib_1 = require_tslib(); + var fs_1 = require("fs"); + var stream_1 = require("stream"); + var util_1 = require("util"); + var zlib_1 = (0, tslib_1.__importDefault)(require("zlib")); + var FakeFS_1 = require_FakeFS(); + var NodeFS_1 = require_NodeFS(); + var opendir_1 = require_opendir(); + var watchFile_1 = require_watchFile(); + var constants_1 = require_constants10(); + var errors = (0, tslib_1.__importStar)(require_errors4()); + var path_1 = require_path4(); + var statUtils = (0, tslib_1.__importStar)(require_statUtils()); + exports2.DEFAULT_COMPRESSION_LEVEL = `mixed`; + function toUnixTimestamp(time) { + if (typeof time === `string` && String(+time) === time) + return +time; + if (Number.isFinite(time)) { + if (time < 0) { + return Date.now() / 1e3; + } else { + return time; + } + } + if ((0, util_1.isDate)(time)) + return time.getTime() / 1e3; + throw new Error(`Invalid time`); + } + var ZipFS = class extends FakeFS_1.BasePortableFakeFS { + constructor(source, opts) { + super(); + this.lzSource = null; + this.listings = new Map(); + this.entries = new Map(); + this.fileSources = new Map(); + this.fds = new Map(); + this.nextFd = 0; + this.ready = false; + this.readOnly = false; + this.libzip = opts.libzip; + const pathOptions = opts; + this.level = typeof pathOptions.level !== `undefined` ? pathOptions.level : exports2.DEFAULT_COMPRESSION_LEVEL; + if (source === null) { + source = Buffer.from([ + 80, + 75, + 5, + 6, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + } + if (typeof source === `string`) { + const { baseFs = new NodeFS_1.NodeFS() } = pathOptions; + this.baseFs = baseFs; + this.path = source; + } else { + this.path = null; + this.baseFs = null; + } + if (opts.stats) { + this.stats = opts.stats; + } else { + if (typeof source === `string`) { + try { + this.stats = this.baseFs.statSync(source); + } catch (error) { + if (error.code === `ENOENT` && pathOptions.create) { + this.stats = statUtils.makeDefaultStats(); + } else { + throw error; + } + } + } else { + this.stats = statUtils.makeDefaultStats(); + } + } + const errPtr = this.libzip.malloc(4); + try { + let flags = 0; + if (typeof source === `string` && pathOptions.create) + flags |= this.libzip.ZIP_CREATE | this.libzip.ZIP_TRUNCATE; + if (opts.readOnly) { + flags |= this.libzip.ZIP_RDONLY; + this.readOnly = true; + } + if (typeof source === `string`) { + this.zip = this.libzip.open(path_1.npath.fromPortablePath(source), flags, errPtr); + } else { + const lzSource = this.allocateUnattachedSource(source); + try { + this.zip = this.libzip.openFromSource(lzSource, flags, errPtr); + this.lzSource = lzSource; + } catch (error) { + this.libzip.source.free(lzSource); + throw error; + } + } + if (this.zip === 0) { + const error = this.libzip.struct.errorS(); + this.libzip.error.initWithCode(error, this.libzip.getValue(errPtr, `i32`)); + throw this.makeLibzipError(error); + } + } finally { + this.libzip.free(errPtr); + } + this.listings.set(path_1.PortablePath.root, new Set()); + const entryCount = this.libzip.getNumEntries(this.zip, 0); + for (let t = 0; t < entryCount; ++t) { + const raw = this.libzip.getName(this.zip, t, 0); + if (path_1.ppath.isAbsolute(raw)) + continue; + const p = path_1.ppath.resolve(path_1.PortablePath.root, raw); + this.registerEntry(p, t); + if (raw.endsWith(`/`)) { + this.registerListing(p); + } + } + this.symlinkCount = this.libzip.ext.countSymlinks(this.zip); + if (this.symlinkCount === -1) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + this.ready = true; + } + makeLibzipError(error) { + const errorCode = this.libzip.struct.errorCodeZip(error); + const strerror = this.libzip.error.strerror(error); + const libzipError = new errors.LibzipError(strerror, this.libzip.errors[errorCode]); + if (errorCode === this.libzip.errors.ZIP_ER_CHANGED) + throw new Error(`Assertion failed: Unexpected libzip error: ${libzipError.message}`); + return libzipError; + } + getExtractHint(hints) { + for (const fileName of this.entries.keys()) { + const ext = this.pathUtils.extname(fileName); + if (hints.relevantExtensions.has(ext)) { + return true; + } + } + return false; + } + getAllFiles() { + return Array.from(this.entries.keys()); + } + getRealPath() { + if (!this.path) + throw new Error(`ZipFS don't have real paths when loaded from a buffer`); + return this.path; + } + getBufferAndClose() { + this.prepareClose(); + if (!this.lzSource) + throw new Error(`ZipFS was not created from a Buffer`); + try { + this.libzip.source.keep(this.lzSource); + if (this.libzip.close(this.zip) === -1) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + if (this.libzip.source.open(this.lzSource) === -1) + throw this.makeLibzipError(this.libzip.source.error(this.lzSource)); + if (this.libzip.source.seek(this.lzSource, 0, 0, this.libzip.SEEK_END) === -1) + throw this.makeLibzipError(this.libzip.source.error(this.lzSource)); + const size = this.libzip.source.tell(this.lzSource); + if (size === -1) + throw this.makeLibzipError(this.libzip.source.error(this.lzSource)); + if (this.libzip.source.seek(this.lzSource, 0, 0, this.libzip.SEEK_SET) === -1) + throw this.makeLibzipError(this.libzip.source.error(this.lzSource)); + const buffer = this.libzip.malloc(size); + if (!buffer) + throw new Error(`Couldn't allocate enough memory`); + try { + const rc = this.libzip.source.read(this.lzSource, buffer, size); + if (rc === -1) + throw this.makeLibzipError(this.libzip.source.error(this.lzSource)); + else if (rc < size) + throw new Error(`Incomplete read`); + else if (rc > size) + throw new Error(`Overread`); + const memory = this.libzip.HEAPU8.subarray(buffer, buffer + size); + return Buffer.from(memory); + } finally { + this.libzip.free(buffer); + } + } finally { + this.libzip.source.close(this.lzSource); + this.libzip.source.free(this.lzSource); + this.ready = false; + } + } + prepareClose() { + if (!this.ready) + throw errors.EBUSY(`archive closed, close`); + (0, watchFile_1.unwatchAllFiles)(this); + } + saveAndClose() { + if (!this.path || !this.baseFs) + throw new Error(`ZipFS cannot be saved and must be discarded when loaded from a buffer`); + this.prepareClose(); + if (this.readOnly) { + this.discardAndClose(); + return; + } + const previousMod = this.baseFs.existsSync(this.path) ? this.baseFs.statSync(this.path).mode & 511 : null; + const rc = this.libzip.close(this.zip); + if (rc === -1) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + if (previousMod === null) + this.baseFs.chmodSync(this.path, this.stats.mode); + else if (previousMod !== (this.baseFs.statSync(this.path).mode & 511)) + this.baseFs.chmodSync(this.path, previousMod); + this.ready = false; + } + discardAndClose() { + this.prepareClose(); + this.libzip.discard(this.zip); + this.ready = false; + } + resolve(p) { + return path_1.ppath.resolve(path_1.PortablePath.root, p); + } + async openPromise(p, flags, mode) { + return this.openSync(p, flags, mode); + } + openSync(p, flags, mode) { + const fd = this.nextFd++; + this.fds.set(fd, { cursor: 0, p }); + return fd; + } + hasOpenFileHandles() { + return !!this.fds.size; + } + async opendirPromise(p, opts) { + return this.opendirSync(p, opts); + } + opendirSync(p, opts = {}) { + const resolvedP = this.resolveFilename(`opendir '${p}'`, p); + if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) + throw errors.ENOENT(`opendir '${p}'`); + const directoryListing = this.listings.get(resolvedP); + if (!directoryListing) + throw errors.ENOTDIR(`opendir '${p}'`); + const entries = [...directoryListing]; + const fd = this.openSync(resolvedP, `r`); + const onClose = () => { + this.closeSync(fd); + }; + return (0, opendir_1.opendir)(this, resolvedP, entries, { onClose }); + } + async readPromise(fd, buffer, offset, length, position) { + return this.readSync(fd, buffer, offset, length, position); + } + readSync(fd, buffer, offset = 0, length = 0, position = -1) { + const entry = this.fds.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`read`); + let realPosition; + if (position === -1 || position === null) + realPosition = entry.cursor; + else + realPosition = position; + const source = this.readFileSync(entry.p); + source.copy(buffer, offset, realPosition, realPosition + length); + const bytesRead = Math.max(0, Math.min(source.length - realPosition, length)); + if (position === -1 || position === null) + entry.cursor += bytesRead; + return bytesRead; + } + async writePromise(fd, buffer, offset, length, position) { + if (typeof buffer === `string`) { + return this.writeSync(fd, buffer, position); + } else { + return this.writeSync(fd, buffer, offset, length, position); + } + } + writeSync(fd, buffer, offset, length, position) { + const entry = this.fds.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`read`); + throw new Error(`Unimplemented`); + } + async closePromise(fd) { + return this.closeSync(fd); + } + closeSync(fd) { + const entry = this.fds.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`read`); + this.fds.delete(fd); + } + createReadStream(p, { encoding } = {}) { + if (p === null) + throw new Error(`Unimplemented`); + const fd = this.openSync(p, `r`); + const stream = Object.assign(new stream_1.PassThrough({ + emitClose: true, + autoDestroy: true, + destroy: (error, callback) => { + clearImmediate(immediate); + this.closeSync(fd); + callback(error); + } + }), { + close() { + stream.destroy(); + }, + bytesRead: 0, + path: p + }); + const immediate = setImmediate(async () => { + try { + const data = await this.readFilePromise(p, encoding); + stream.bytesRead = data.length; + stream.end(data); + } catch (error) { + stream.destroy(error); + } + }); + return stream; + } + createWriteStream(p, { encoding } = {}) { + if (this.readOnly) + throw errors.EROFS(`open '${p}'`); + if (p === null) + throw new Error(`Unimplemented`); + const chunks = []; + const fd = this.openSync(p, `w`); + const stream = Object.assign(new stream_1.PassThrough({ + autoDestroy: true, + emitClose: true, + destroy: (error, callback) => { + try { + if (error) { + callback(error); + } else { + this.writeFileSync(p, Buffer.concat(chunks), encoding); + callback(null); + } + } catch (err) { + callback(err); + } finally { + this.closeSync(fd); + } + } + }), { + bytesWritten: 0, + path: p, + close() { + stream.destroy(); + } + }); + stream.on(`data`, (chunk) => { + const chunkBuffer = Buffer.from(chunk); + stream.bytesWritten += chunkBuffer.length; + chunks.push(chunkBuffer); + }); + return stream; + } + async realpathPromise(p) { + return this.realpathSync(p); + } + realpathSync(p) { + const resolvedP = this.resolveFilename(`lstat '${p}'`, p); + if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) + throw errors.ENOENT(`lstat '${p}'`); + return resolvedP; + } + async existsPromise(p) { + return this.existsSync(p); + } + existsSync(p) { + if (!this.ready) + throw errors.EBUSY(`archive closed, existsSync '${p}'`); + if (this.symlinkCount === 0) { + const resolvedP2 = path_1.ppath.resolve(path_1.PortablePath.root, p); + return this.entries.has(resolvedP2) || this.listings.has(resolvedP2); + } + let resolvedP; + try { + resolvedP = this.resolveFilename(`stat '${p}'`, p); + } catch (error) { + return false; + } + return this.entries.has(resolvedP) || this.listings.has(resolvedP); + } + async accessPromise(p, mode) { + return this.accessSync(p, mode); + } + accessSync(p, mode = fs_1.constants.F_OK) { + const resolvedP = this.resolveFilename(`access '${p}'`, p); + if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) + throw errors.ENOENT(`access '${p}'`); + if (this.readOnly && mode & fs_1.constants.W_OK) { + throw errors.EROFS(`access '${p}'`); + } + } + async statPromise(p, opts) { + return this.statSync(p, opts); + } + statSync(p, opts) { + const resolvedP = this.resolveFilename(`stat '${p}'`, p); + if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) + throw errors.ENOENT(`stat '${p}'`); + if (p[p.length - 1] === `/` && !this.listings.has(resolvedP)) + throw errors.ENOTDIR(`stat '${p}'`); + return this.statImpl(`stat '${p}'`, resolvedP, opts); + } + async fstatPromise(fd, opts) { + return this.fstatSync(fd, opts); + } + fstatSync(fd, opts) { + const entry = this.fds.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`fstatSync`); + const { p } = entry; + const resolvedP = this.resolveFilename(`stat '${p}'`, p); + if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) + throw errors.ENOENT(`stat '${p}'`); + if (p[p.length - 1] === `/` && !this.listings.has(resolvedP)) + throw errors.ENOTDIR(`stat '${p}'`); + return this.statImpl(`fstat '${p}'`, resolvedP, opts); + } + async lstatPromise(p, opts) { + return this.lstatSync(p, opts); + } + lstatSync(p, opts) { + const resolvedP = this.resolveFilename(`lstat '${p}'`, p, false); + if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) + throw errors.ENOENT(`lstat '${p}'`); + if (p[p.length - 1] === `/` && !this.listings.has(resolvedP)) + throw errors.ENOTDIR(`lstat '${p}'`); + return this.statImpl(`lstat '${p}'`, resolvedP, opts); + } + statImpl(reason, p, opts = {}) { + const entry = this.entries.get(p); + if (typeof entry !== `undefined`) { + const stat = this.libzip.struct.statS(); + const rc = this.libzip.statIndex(this.zip, entry, 0, 0, stat); + if (rc === -1) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + const uid = this.stats.uid; + const gid = this.stats.gid; + const size = this.libzip.struct.statSize(stat) >>> 0; + const blksize = 512; + const blocks = Math.ceil(size / blksize); + const mtimeMs = (this.libzip.struct.statMtime(stat) >>> 0) * 1e3; + const atimeMs = mtimeMs; + const birthtimeMs = mtimeMs; + const ctimeMs = mtimeMs; + const atime = new Date(atimeMs); + const birthtime = new Date(birthtimeMs); + const ctime = new Date(ctimeMs); + const mtime = new Date(mtimeMs); + const type = this.listings.has(p) ? constants_1.S_IFDIR : this.isSymbolicLink(entry) ? constants_1.S_IFLNK : constants_1.S_IFREG; + const defaultMode = type === constants_1.S_IFDIR ? 493 : 420; + const mode = type | this.getUnixMode(entry, defaultMode) & 511; + const crc = this.libzip.struct.statCrc(stat); + const statInstance = Object.assign(new statUtils.StatEntry(), { uid, gid, size, blksize, blocks, atime, birthtime, ctime, mtime, atimeMs, birthtimeMs, ctimeMs, mtimeMs, mode, crc }); + return opts.bigint === true ? statUtils.convertToBigIntStats(statInstance) : statInstance; + } + if (this.listings.has(p)) { + const uid = this.stats.uid; + const gid = this.stats.gid; + const size = 0; + const blksize = 512; + const blocks = 0; + const atimeMs = this.stats.mtimeMs; + const birthtimeMs = this.stats.mtimeMs; + const ctimeMs = this.stats.mtimeMs; + const mtimeMs = this.stats.mtimeMs; + const atime = new Date(atimeMs); + const birthtime = new Date(birthtimeMs); + const ctime = new Date(ctimeMs); + const mtime = new Date(mtimeMs); + const mode = constants_1.S_IFDIR | 493; + const crc = 0; + const statInstance = Object.assign(new statUtils.StatEntry(), { uid, gid, size, blksize, blocks, atime, birthtime, ctime, mtime, atimeMs, birthtimeMs, ctimeMs, mtimeMs, mode, crc }); + return opts.bigint === true ? statUtils.convertToBigIntStats(statInstance) : statInstance; + } + throw new Error(`Unreachable`); + } + getUnixMode(index, defaultMode) { + const rc = this.libzip.file.getExternalAttributes(this.zip, index, 0, 0, this.libzip.uint08S, this.libzip.uint32S); + if (rc === -1) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + const opsys = this.libzip.getValue(this.libzip.uint08S, `i8`) >>> 0; + if (opsys !== this.libzip.ZIP_OPSYS_UNIX) + return defaultMode; + return this.libzip.getValue(this.libzip.uint32S, `i32`) >>> 16; + } + registerListing(p) { + let listing = this.listings.get(p); + if (listing) + return listing; + const parentListing = this.registerListing(path_1.ppath.dirname(p)); + listing = new Set(); + parentListing.add(path_1.ppath.basename(p)); + this.listings.set(p, listing); + return listing; + } + registerEntry(p, index) { + const parentListing = this.registerListing(path_1.ppath.dirname(p)); + parentListing.add(path_1.ppath.basename(p)); + this.entries.set(p, index); + } + unregisterListing(p) { + this.listings.delete(p); + const parentListing = this.listings.get(path_1.ppath.dirname(p)); + parentListing === null || parentListing === void 0 ? void 0 : parentListing.delete(path_1.ppath.basename(p)); + } + unregisterEntry(p) { + this.unregisterListing(p); + const entry = this.entries.get(p); + this.entries.delete(p); + if (typeof entry === `undefined`) + return; + this.fileSources.delete(entry); + if (this.isSymbolicLink(entry)) { + this.symlinkCount--; + } + } + deleteEntry(p, index) { + this.unregisterEntry(p); + const rc = this.libzip.delete(this.zip, index); + if (rc === -1) { + throw this.makeLibzipError(this.libzip.getError(this.zip)); + } + } + resolveFilename(reason, p, resolveLastComponent = true) { + if (!this.ready) + throw errors.EBUSY(`archive closed, ${reason}`); + let resolvedP = path_1.ppath.resolve(path_1.PortablePath.root, p); + if (resolvedP === `/`) + return path_1.PortablePath.root; + const fileIndex = this.entries.get(resolvedP); + if (resolveLastComponent && fileIndex !== void 0) { + if (this.symlinkCount !== 0 && this.isSymbolicLink(fileIndex)) { + const target = this.getFileSource(fileIndex).toString(); + return this.resolveFilename(reason, path_1.ppath.resolve(path_1.ppath.dirname(resolvedP), target), true); + } else { + return resolvedP; + } + } + while (true) { + const parentP = this.resolveFilename(reason, path_1.ppath.dirname(resolvedP), true); + const isDir = this.listings.has(parentP); + const doesExist = this.entries.has(parentP); + if (!isDir && !doesExist) + throw errors.ENOENT(reason); + if (!isDir) + throw errors.ENOTDIR(reason); + resolvedP = path_1.ppath.resolve(parentP, path_1.ppath.basename(resolvedP)); + if (!resolveLastComponent || this.symlinkCount === 0) + break; + const index = this.libzip.name.locate(this.zip, resolvedP.slice(1)); + if (index === -1) + break; + if (this.isSymbolicLink(index)) { + const target = this.getFileSource(index).toString(); + resolvedP = path_1.ppath.resolve(path_1.ppath.dirname(resolvedP), target); + } else { + break; + } + } + return resolvedP; + } + allocateBuffer(content) { + if (!Buffer.isBuffer(content)) + content = Buffer.from(content); + const buffer = this.libzip.malloc(content.byteLength); + if (!buffer) + throw new Error(`Couldn't allocate enough memory`); + const heap = new Uint8Array(this.libzip.HEAPU8.buffer, buffer, content.byteLength); + heap.set(content); + return { buffer, byteLength: content.byteLength }; + } + allocateUnattachedSource(content) { + const error = this.libzip.struct.errorS(); + const { buffer, byteLength } = this.allocateBuffer(content); + const source = this.libzip.source.fromUnattachedBuffer(buffer, byteLength, 0, true, error); + if (source === 0) { + this.libzip.free(error); + throw this.makeLibzipError(error); + } + return source; + } + allocateSource(content) { + const { buffer, byteLength } = this.allocateBuffer(content); + const source = this.libzip.source.fromBuffer(this.zip, buffer, byteLength, 0, true); + if (source === 0) { + this.libzip.free(buffer); + throw this.makeLibzipError(this.libzip.getError(this.zip)); + } + return source; + } + setFileSource(p, content) { + const buffer = Buffer.isBuffer(content) ? content : Buffer.from(content); + const target = path_1.ppath.relative(path_1.PortablePath.root, p); + const lzSource = this.allocateSource(content); + try { + const newIndex = this.libzip.file.add(this.zip, target, lzSource, this.libzip.ZIP_FL_OVERWRITE); + if (newIndex === -1) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + if (this.level !== `mixed`) { + let method; + if (this.level === 0) + method = this.libzip.ZIP_CM_STORE; + else + method = this.libzip.ZIP_CM_DEFLATE; + const rc = this.libzip.file.setCompression(this.zip, newIndex, 0, method, this.level); + if (rc === -1) { + throw this.makeLibzipError(this.libzip.getError(this.zip)); + } + } + this.fileSources.set(newIndex, buffer); + return newIndex; + } catch (error) { + this.libzip.source.free(lzSource); + throw error; + } + } + isSymbolicLink(index) { + if (this.symlinkCount === 0) + return false; + const attrs = this.libzip.file.getExternalAttributes(this.zip, index, 0, 0, this.libzip.uint08S, this.libzip.uint32S); + if (attrs === -1) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + const opsys = this.libzip.getValue(this.libzip.uint08S, `i8`) >>> 0; + if (opsys !== this.libzip.ZIP_OPSYS_UNIX) + return false; + const attributes = this.libzip.getValue(this.libzip.uint32S, `i32`) >>> 16; + return (attributes & constants_1.S_IFMT) === constants_1.S_IFLNK; + } + getFileSource(index, opts = { asyncDecompress: false }) { + const cachedFileSource = this.fileSources.get(index); + if (typeof cachedFileSource !== `undefined`) + return cachedFileSource; + const stat = this.libzip.struct.statS(); + const rc = this.libzip.statIndex(this.zip, index, 0, 0, stat); + if (rc === -1) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + const size = this.libzip.struct.statCompSize(stat); + const compressionMethod = this.libzip.struct.statCompMethod(stat); + const buffer = this.libzip.malloc(size); + try { + const file = this.libzip.fopenIndex(this.zip, index, 0, this.libzip.ZIP_FL_COMPRESSED); + if (file === 0) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + try { + const rc2 = this.libzip.fread(file, buffer, size, 0); + if (rc2 === -1) + throw this.makeLibzipError(this.libzip.file.getError(file)); + else if (rc2 < size) + throw new Error(`Incomplete read`); + else if (rc2 > size) + throw new Error(`Overread`); + const memory = this.libzip.HEAPU8.subarray(buffer, buffer + size); + const data = Buffer.from(memory); + if (compressionMethod === 0) { + this.fileSources.set(index, data); + return data; + } else if (opts.asyncDecompress) { + return new Promise((resolve, reject) => { + zlib_1.default.inflateRaw(data, (error, result) => { + if (error) { + reject(error); + } else { + this.fileSources.set(index, result); + resolve(result); + } + }); + }); + } else { + const decompressedData = zlib_1.default.inflateRawSync(data); + this.fileSources.set(index, decompressedData); + return decompressedData; + } + } finally { + this.libzip.fclose(file); + } + } finally { + this.libzip.free(buffer); + } + } + async chmodPromise(p, mask) { + return this.chmodSync(p, mask); + } + chmodSync(p, mask) { + if (this.readOnly) + throw errors.EROFS(`chmod '${p}'`); + mask &= 493; + const resolvedP = this.resolveFilename(`chmod '${p}'`, p, false); + const entry = this.entries.get(resolvedP); + if (typeof entry === `undefined`) + throw new Error(`Assertion failed: The entry should have been registered (${resolvedP})`); + const oldMod = this.getUnixMode(entry, constants_1.S_IFREG | 0); + const newMod = oldMod & ~511 | mask; + const rc = this.libzip.file.setExternalAttributes(this.zip, entry, 0, 0, this.libzip.ZIP_OPSYS_UNIX, newMod << 16); + if (rc === -1) { + throw this.makeLibzipError(this.libzip.getError(this.zip)); + } + } + async chownPromise(p, uid, gid) { + return this.chownSync(p, uid, gid); + } + chownSync(p, uid, gid) { + throw new Error(`Unimplemented`); + } + async renamePromise(oldP, newP) { + return this.renameSync(oldP, newP); + } + renameSync(oldP, newP) { + throw new Error(`Unimplemented`); + } + async copyFilePromise(sourceP, destP, flags) { + const { indexSource, indexDest, resolvedDestP } = this.prepareCopyFile(sourceP, destP, flags); + const source = await this.getFileSource(indexSource, { asyncDecompress: true }); + const newIndex = this.setFileSource(resolvedDestP, source); + if (newIndex !== indexDest) { + this.registerEntry(resolvedDestP, newIndex); + } + } + copyFileSync(sourceP, destP, flags = 0) { + const { indexSource, indexDest, resolvedDestP } = this.prepareCopyFile(sourceP, destP, flags); + const source = this.getFileSource(indexSource); + const newIndex = this.setFileSource(resolvedDestP, source); + if (newIndex !== indexDest) { + this.registerEntry(resolvedDestP, newIndex); + } + } + prepareCopyFile(sourceP, destP, flags = 0) { + if (this.readOnly) + throw errors.EROFS(`copyfile '${sourceP} -> '${destP}'`); + if ((flags & fs_1.constants.COPYFILE_FICLONE_FORCE) !== 0) + throw errors.ENOSYS(`unsupported clone operation`, `copyfile '${sourceP}' -> ${destP}'`); + const resolvedSourceP = this.resolveFilename(`copyfile '${sourceP} -> ${destP}'`, sourceP); + const indexSource = this.entries.get(resolvedSourceP); + if (typeof indexSource === `undefined`) + throw errors.EINVAL(`copyfile '${sourceP}' -> '${destP}'`); + const resolvedDestP = this.resolveFilename(`copyfile '${sourceP}' -> ${destP}'`, destP); + const indexDest = this.entries.get(resolvedDestP); + if ((flags & (fs_1.constants.COPYFILE_EXCL | fs_1.constants.COPYFILE_FICLONE_FORCE)) !== 0 && typeof indexDest !== `undefined`) + throw errors.EEXIST(`copyfile '${sourceP}' -> '${destP}'`); + return { + indexSource, + resolvedDestP, + indexDest + }; + } + async appendFilePromise(p, content, opts) { + if (this.readOnly) + throw errors.EROFS(`open '${p}'`); + if (typeof opts === `undefined`) + opts = { flag: `a` }; + else if (typeof opts === `string`) + opts = { flag: `a`, encoding: opts }; + else if (typeof opts.flag === `undefined`) + opts = { flag: `a`, ...opts }; + return this.writeFilePromise(p, content, opts); + } + appendFileSync(p, content, opts = {}) { + if (this.readOnly) + throw errors.EROFS(`open '${p}'`); + if (typeof opts === `undefined`) + opts = { flag: `a` }; + else if (typeof opts === `string`) + opts = { flag: `a`, encoding: opts }; + else if (typeof opts.flag === `undefined`) + opts = { flag: `a`, ...opts }; + return this.writeFileSync(p, content, opts); + } + async writeFilePromise(p, content, opts) { + const { encoding, index, resolvedP } = this.prepareWriteFile(p, opts); + if (index !== void 0 && typeof opts === `object` && opts.flag && opts.flag.includes(`a`)) + content = Buffer.concat([await this.getFileSource(index, { asyncDecompress: true }), Buffer.from(content)]); + if (encoding !== null) + content = content.toString(encoding); + const newIndex = this.setFileSource(resolvedP, content); + if (newIndex !== index) { + this.registerEntry(resolvedP, newIndex); + } + } + writeFileSync(p, content, opts) { + const { encoding, index, resolvedP } = this.prepareWriteFile(p, opts); + if (index !== void 0 && typeof opts === `object` && opts.flag && opts.flag.includes(`a`)) + content = Buffer.concat([this.getFileSource(index), Buffer.from(content)]); + if (encoding !== null) + content = content.toString(encoding); + const newIndex = this.setFileSource(resolvedP, content); + if (newIndex !== index) { + this.registerEntry(resolvedP, newIndex); + } + } + prepareWriteFile(p, opts) { + if (typeof p !== `string`) + throw errors.EBADF(`read`); + if (this.readOnly) + throw errors.EROFS(`open '${p}'`); + const resolvedP = this.resolveFilename(`open '${p}'`, p); + if (this.listings.has(resolvedP)) + throw errors.EISDIR(`open '${p}'`); + let encoding = null; + if (typeof opts === `string`) + encoding = opts; + else if (typeof opts === `object` && opts.encoding) + encoding = opts.encoding; + const index = this.entries.get(resolvedP); + return { + encoding, + resolvedP, + index + }; + } + async unlinkPromise(p) { + return this.unlinkSync(p); + } + unlinkSync(p) { + if (this.readOnly) + throw errors.EROFS(`unlink '${p}'`); + const resolvedP = this.resolveFilename(`unlink '${p}'`, p); + if (this.listings.has(resolvedP)) + throw errors.EISDIR(`unlink '${p}'`); + const index = this.entries.get(resolvedP); + if (typeof index === `undefined`) + throw errors.EINVAL(`unlink '${p}'`); + this.deleteEntry(resolvedP, index); + } + async utimesPromise(p, atime, mtime) { + return this.utimesSync(p, atime, mtime); + } + utimesSync(p, atime, mtime) { + if (this.readOnly) + throw errors.EROFS(`utimes '${p}'`); + const resolvedP = this.resolveFilename(`utimes '${p}'`, p); + this.utimesImpl(resolvedP, mtime); + } + async lutimesPromise(p, atime, mtime) { + return this.lutimesSync(p, atime, mtime); + } + lutimesSync(p, atime, mtime) { + if (this.readOnly) + throw errors.EROFS(`lutimes '${p}'`); + const resolvedP = this.resolveFilename(`utimes '${p}'`, p, false); + this.utimesImpl(resolvedP, mtime); + } + utimesImpl(resolvedP, mtime) { + if (this.listings.has(resolvedP)) { + if (!this.entries.has(resolvedP)) + this.hydrateDirectory(resolvedP); + } + const entry = this.entries.get(resolvedP); + if (entry === void 0) + throw new Error(`Unreachable`); + const rc = this.libzip.file.setMtime(this.zip, entry, 0, toUnixTimestamp(mtime), 0); + if (rc === -1) { + throw this.makeLibzipError(this.libzip.getError(this.zip)); + } + } + async mkdirPromise(p, opts) { + return this.mkdirSync(p, opts); + } + mkdirSync(p, { mode = 493, recursive = false } = {}) { + if (recursive) { + this.mkdirpSync(p, { chmod: mode }); + return; + } + if (this.readOnly) + throw errors.EROFS(`mkdir '${p}'`); + const resolvedP = this.resolveFilename(`mkdir '${p}'`, p); + if (this.entries.has(resolvedP) || this.listings.has(resolvedP)) + throw errors.EEXIST(`mkdir '${p}'`); + this.hydrateDirectory(resolvedP); + this.chmodSync(resolvedP, mode); + } + async rmdirPromise(p, opts) { + return this.rmdirSync(p, opts); + } + rmdirSync(p, { recursive = false } = {}) { + if (this.readOnly) + throw errors.EROFS(`rmdir '${p}'`); + if (recursive) { + this.removeSync(p); + return; + } + const resolvedP = this.resolveFilename(`rmdir '${p}'`, p); + const directoryListing = this.listings.get(resolvedP); + if (!directoryListing) + throw errors.ENOTDIR(`rmdir '${p}'`); + if (directoryListing.size > 0) + throw errors.ENOTEMPTY(`rmdir '${p}'`); + const index = this.entries.get(resolvedP); + if (typeof index === `undefined`) + throw errors.EINVAL(`rmdir '${p}'`); + this.deleteEntry(p, index); + } + hydrateDirectory(resolvedP) { + const index = this.libzip.dir.add(this.zip, path_1.ppath.relative(path_1.PortablePath.root, resolvedP)); + if (index === -1) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + this.registerListing(resolvedP); + this.registerEntry(resolvedP, index); + return index; + } + async linkPromise(existingP, newP) { + return this.linkSync(existingP, newP); + } + linkSync(existingP, newP) { + throw errors.EOPNOTSUPP(`link '${existingP}' -> '${newP}'`); + } + async symlinkPromise(target, p) { + return this.symlinkSync(target, p); + } + symlinkSync(target, p) { + if (this.readOnly) + throw errors.EROFS(`symlink '${target}' -> '${p}'`); + const resolvedP = this.resolveFilename(`symlink '${target}' -> '${p}'`, p); + if (this.listings.has(resolvedP)) + throw errors.EISDIR(`symlink '${target}' -> '${p}'`); + if (this.entries.has(resolvedP)) + throw errors.EEXIST(`symlink '${target}' -> '${p}'`); + const index = this.setFileSource(resolvedP, target); + this.registerEntry(resolvedP, index); + const rc = this.libzip.file.setExternalAttributes(this.zip, index, 0, 0, this.libzip.ZIP_OPSYS_UNIX, (constants_1.S_IFLNK | 511) << 16); + if (rc === -1) + throw this.makeLibzipError(this.libzip.getError(this.zip)); + this.symlinkCount += 1; + } + async readFilePromise(p, encoding) { + if (typeof encoding === `object`) + encoding = encoding ? encoding.encoding : void 0; + const data = await this.readFileBuffer(p, { asyncDecompress: true }); + return encoding ? data.toString(encoding) : data; + } + readFileSync(p, encoding) { + if (typeof encoding === `object`) + encoding = encoding ? encoding.encoding : void 0; + const data = this.readFileBuffer(p); + return encoding ? data.toString(encoding) : data; + } + readFileBuffer(p, opts = { asyncDecompress: false }) { + const resolvedP = this.resolveFilename(`open '${p}'`, p); + if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) + throw errors.ENOENT(`open '${p}'`); + if (p[p.length - 1] === `/` && !this.listings.has(resolvedP)) + throw errors.ENOTDIR(`open '${p}'`); + if (this.listings.has(resolvedP)) + throw errors.EISDIR(`read`); + const entry = this.entries.get(resolvedP); + if (entry === void 0) + throw new Error(`Unreachable`); + return this.getFileSource(entry, opts); + } + async readdirPromise(p, opts) { + return this.readdirSync(p, opts); + } + readdirSync(p, opts) { + const resolvedP = this.resolveFilename(`scandir '${p}'`, p); + if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) + throw errors.ENOENT(`scandir '${p}'`); + const directoryListing = this.listings.get(resolvedP); + if (!directoryListing) + throw errors.ENOTDIR(`scandir '${p}'`); + const entries = [...directoryListing]; + if (!(opts === null || opts === void 0 ? void 0 : opts.withFileTypes)) + return entries; + return entries.map((name) => { + return Object.assign(this.statImpl(`lstat`, path_1.ppath.join(p, name)), { + name + }); + }); + } + async readlinkPromise(p) { + const entry = this.prepareReadlink(p); + return (await this.getFileSource(entry, { asyncDecompress: true })).toString(); + } + readlinkSync(p) { + const entry = this.prepareReadlink(p); + return this.getFileSource(entry).toString(); + } + prepareReadlink(p) { + const resolvedP = this.resolveFilename(`readlink '${p}'`, p, false); + if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) + throw errors.ENOENT(`readlink '${p}'`); + if (p[p.length - 1] === `/` && !this.listings.has(resolvedP)) + throw errors.ENOTDIR(`open '${p}'`); + if (this.listings.has(resolvedP)) + throw errors.EINVAL(`readlink '${p}'`); + const entry = this.entries.get(resolvedP); + if (entry === void 0) + throw new Error(`Unreachable`); + if (!this.isSymbolicLink(entry)) + throw errors.EINVAL(`readlink '${p}'`); + return entry; + } + async truncatePromise(p, len = 0) { + const resolvedP = this.resolveFilename(`open '${p}'`, p); + const index = this.entries.get(resolvedP); + if (typeof index === `undefined`) + throw errors.EINVAL(`open '${p}'`); + const source = await this.getFileSource(index, { asyncDecompress: true }); + const truncated = Buffer.alloc(len, 0); + source.copy(truncated); + return await this.writeFilePromise(p, truncated); + } + truncateSync(p, len = 0) { + const resolvedP = this.resolveFilename(`open '${p}'`, p); + const index = this.entries.get(resolvedP); + if (typeof index === `undefined`) + throw errors.EINVAL(`open '${p}'`); + const source = this.getFileSource(index); + const truncated = Buffer.alloc(len, 0); + source.copy(truncated); + return this.writeFileSync(p, truncated); + } + watch(p, a, b) { + let persistent; + switch (typeof a) { + case `function`: + case `string`: + case `undefined`: + { + persistent = true; + } + break; + default: + { + ({ persistent = true } = a); + } + break; + } + if (!persistent) + return { on: () => { + }, close: () => { + } }; + const interval = setInterval(() => { + }, 24 * 60 * 60 * 1e3); + return { on: () => { + }, close: () => { + clearInterval(interval); + } }; + } + watchFile(p, a, b) { + const resolvedP = this.resolveFilename(`open '${p}'`, p); + return (0, watchFile_1.watchFile)(this, resolvedP, a, b); + } + unwatchFile(p, cb) { + const resolvedP = this.resolveFilename(`open '${p}'`, p); + return (0, watchFile_1.unwatchFile)(this, resolvedP, cb); + } + }; + exports2.ZipFS = ZipFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/ProxiedFS.js +var require_ProxiedFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/ProxiedFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ProxiedFS = void 0; + var FakeFS_1 = require_FakeFS(); + var ProxiedFS = class extends FakeFS_1.FakeFS { + getExtractHint(hints) { + return this.baseFs.getExtractHint(hints); + } + resolve(path) { + return this.mapFromBase(this.baseFs.resolve(this.mapToBase(path))); + } + getRealPath() { + return this.mapFromBase(this.baseFs.getRealPath()); + } + async openPromise(p, flags, mode) { + return this.baseFs.openPromise(this.mapToBase(p), flags, mode); + } + openSync(p, flags, mode) { + return this.baseFs.openSync(this.mapToBase(p), flags, mode); + } + async opendirPromise(p, opts) { + return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(p), opts), { path: p }); + } + opendirSync(p, opts) { + return Object.assign(this.baseFs.opendirSync(this.mapToBase(p), opts), { path: p }); + } + async readPromise(fd, buffer, offset, length, position) { + return await this.baseFs.readPromise(fd, buffer, offset, length, position); + } + readSync(fd, buffer, offset, length, position) { + return this.baseFs.readSync(fd, buffer, offset, length, position); + } + async writePromise(fd, buffer, offset, length, position) { + if (typeof buffer === `string`) { + return await this.baseFs.writePromise(fd, buffer, offset); + } else { + return await this.baseFs.writePromise(fd, buffer, offset, length, position); + } + } + writeSync(fd, buffer, offset, length, position) { + if (typeof buffer === `string`) { + return this.baseFs.writeSync(fd, buffer, offset); + } else { + return this.baseFs.writeSync(fd, buffer, offset, length, position); + } + } + async closePromise(fd) { + return this.baseFs.closePromise(fd); + } + closeSync(fd) { + this.baseFs.closeSync(fd); + } + createReadStream(p, opts) { + return this.baseFs.createReadStream(p !== null ? this.mapToBase(p) : p, opts); + } + createWriteStream(p, opts) { + return this.baseFs.createWriteStream(p !== null ? this.mapToBase(p) : p, opts); + } + async realpathPromise(p) { + return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(p))); + } + realpathSync(p) { + return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(p))); + } + async existsPromise(p) { + return this.baseFs.existsPromise(this.mapToBase(p)); + } + existsSync(p) { + return this.baseFs.existsSync(this.mapToBase(p)); + } + accessSync(p, mode) { + return this.baseFs.accessSync(this.mapToBase(p), mode); + } + async accessPromise(p, mode) { + return this.baseFs.accessPromise(this.mapToBase(p), mode); + } + async statPromise(p, opts) { + return this.baseFs.statPromise(this.mapToBase(p), opts); + } + statSync(p, opts) { + return this.baseFs.statSync(this.mapToBase(p), opts); + } + async fstatPromise(fd, opts) { + return this.baseFs.fstatPromise(fd, opts); + } + fstatSync(fd, opts) { + return this.baseFs.fstatSync(fd, opts); + } + async lstatPromise(p, opts) { + return this.baseFs.lstatPromise(this.mapToBase(p), opts); + } + lstatSync(p, opts) { + return this.baseFs.lstatSync(this.mapToBase(p), opts); + } + async chmodPromise(p, mask) { + return this.baseFs.chmodPromise(this.mapToBase(p), mask); + } + chmodSync(p, mask) { + return this.baseFs.chmodSync(this.mapToBase(p), mask); + } + async chownPromise(p, uid, gid) { + return this.baseFs.chownPromise(this.mapToBase(p), uid, gid); + } + chownSync(p, uid, gid) { + return this.baseFs.chownSync(this.mapToBase(p), uid, gid); + } + async renamePromise(oldP, newP) { + return this.baseFs.renamePromise(this.mapToBase(oldP), this.mapToBase(newP)); + } + renameSync(oldP, newP) { + return this.baseFs.renameSync(this.mapToBase(oldP), this.mapToBase(newP)); + } + async copyFilePromise(sourceP, destP, flags = 0) { + return this.baseFs.copyFilePromise(this.mapToBase(sourceP), this.mapToBase(destP), flags); + } + copyFileSync(sourceP, destP, flags = 0) { + return this.baseFs.copyFileSync(this.mapToBase(sourceP), this.mapToBase(destP), flags); + } + async appendFilePromise(p, content, opts) { + return this.baseFs.appendFilePromise(this.fsMapToBase(p), content, opts); + } + appendFileSync(p, content, opts) { + return this.baseFs.appendFileSync(this.fsMapToBase(p), content, opts); + } + async writeFilePromise(p, content, opts) { + return this.baseFs.writeFilePromise(this.fsMapToBase(p), content, opts); + } + writeFileSync(p, content, opts) { + return this.baseFs.writeFileSync(this.fsMapToBase(p), content, opts); + } + async unlinkPromise(p) { + return this.baseFs.unlinkPromise(this.mapToBase(p)); + } + unlinkSync(p) { + return this.baseFs.unlinkSync(this.mapToBase(p)); + } + async utimesPromise(p, atime, mtime) { + return this.baseFs.utimesPromise(this.mapToBase(p), atime, mtime); + } + utimesSync(p, atime, mtime) { + return this.baseFs.utimesSync(this.mapToBase(p), atime, mtime); + } + async mkdirPromise(p, opts) { + return this.baseFs.mkdirPromise(this.mapToBase(p), opts); + } + mkdirSync(p, opts) { + return this.baseFs.mkdirSync(this.mapToBase(p), opts); + } + async rmdirPromise(p, opts) { + return this.baseFs.rmdirPromise(this.mapToBase(p), opts); + } + rmdirSync(p, opts) { + return this.baseFs.rmdirSync(this.mapToBase(p), opts); + } + async linkPromise(existingP, newP) { + return this.baseFs.linkPromise(this.mapToBase(existingP), this.mapToBase(newP)); + } + linkSync(existingP, newP) { + return this.baseFs.linkSync(this.mapToBase(existingP), this.mapToBase(newP)); + } + async symlinkPromise(target, p, type) { + const mappedP = this.mapToBase(p); + if (this.pathUtils.isAbsolute(target)) + return this.baseFs.symlinkPromise(this.mapToBase(target), mappedP, type); + const mappedAbsoluteTarget = this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(p), target)); + const mappedTarget = this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(mappedP), mappedAbsoluteTarget); + return this.baseFs.symlinkPromise(mappedTarget, mappedP, type); + } + symlinkSync(target, p, type) { + const mappedP = this.mapToBase(p); + if (this.pathUtils.isAbsolute(target)) + return this.baseFs.symlinkSync(this.mapToBase(target), mappedP, type); + const mappedAbsoluteTarget = this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(p), target)); + const mappedTarget = this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(mappedP), mappedAbsoluteTarget); + return this.baseFs.symlinkSync(mappedTarget, mappedP, type); + } + async readFilePromise(p, encoding) { + if (encoding === `utf8`) { + return this.baseFs.readFilePromise(this.fsMapToBase(p), encoding); + } else { + return this.baseFs.readFilePromise(this.fsMapToBase(p), encoding); + } + } + readFileSync(p, encoding) { + if (encoding === `utf8`) { + return this.baseFs.readFileSync(this.fsMapToBase(p), encoding); + } else { + return this.baseFs.readFileSync(this.fsMapToBase(p), encoding); + } + } + async readdirPromise(p, opts) { + return this.baseFs.readdirPromise(this.mapToBase(p), opts); + } + readdirSync(p, opts) { + return this.baseFs.readdirSync(this.mapToBase(p), opts); + } + async readlinkPromise(p) { + return this.mapFromBase(await this.baseFs.readlinkPromise(this.mapToBase(p))); + } + readlinkSync(p) { + return this.mapFromBase(this.baseFs.readlinkSync(this.mapToBase(p))); + } + async truncatePromise(p, len) { + return this.baseFs.truncatePromise(this.mapToBase(p), len); + } + truncateSync(p, len) { + return this.baseFs.truncateSync(this.mapToBase(p), len); + } + watch(p, a, b) { + return this.baseFs.watch(this.mapToBase(p), a, b); + } + watchFile(p, a, b) { + return this.baseFs.watchFile(this.mapToBase(p), a, b); + } + unwatchFile(p, cb) { + return this.baseFs.unwatchFile(this.mapToBase(p), cb); + } + fsMapToBase(p) { + if (typeof p === `number`) { + return p; + } else { + return this.mapToBase(p); + } + } + }; + exports2.ProxiedFS = ProxiedFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/AliasFS.js +var require_AliasFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/AliasFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AliasFS = void 0; + var ProxiedFS_1 = require_ProxiedFS(); + var AliasFS = class extends ProxiedFS_1.ProxiedFS { + constructor(target, { baseFs, pathUtils }) { + super(pathUtils); + this.target = target; + this.baseFs = baseFs; + } + getRealPath() { + return this.target; + } + getBaseFs() { + return this.baseFs; + } + mapFromBase(p) { + return p; + } + mapToBase(p) { + return p; + } + }; + exports2.AliasFS = AliasFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/CwdFS.js +var require_CwdFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/CwdFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CwdFS = void 0; + var NodeFS_1 = require_NodeFS(); + var ProxiedFS_1 = require_ProxiedFS(); + var path_1 = require_path4(); + var CwdFS = class extends ProxiedFS_1.ProxiedFS { + constructor(target, { baseFs = new NodeFS_1.NodeFS() } = {}) { + super(path_1.ppath); + this.target = this.pathUtils.normalize(target); + this.baseFs = baseFs; + } + getRealPath() { + return this.pathUtils.resolve(this.baseFs.getRealPath(), this.target); + } + resolve(p) { + if (this.pathUtils.isAbsolute(p)) { + return path_1.ppath.normalize(p); + } else { + return this.baseFs.resolve(path_1.ppath.join(this.target, p)); + } + } + mapFromBase(path) { + return path; + } + mapToBase(path) { + if (this.pathUtils.isAbsolute(path)) { + return path; + } else { + return this.pathUtils.join(this.target, path); + } + } + }; + exports2.CwdFS = CwdFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/JailFS.js +var require_JailFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/JailFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.JailFS = void 0; + var NodeFS_1 = require_NodeFS(); + var ProxiedFS_1 = require_ProxiedFS(); + var path_1 = require_path4(); + var JAIL_ROOT = path_1.PortablePath.root; + var JailFS = class extends ProxiedFS_1.ProxiedFS { + constructor(target, { baseFs = new NodeFS_1.NodeFS() } = {}) { + super(path_1.ppath); + this.target = this.pathUtils.resolve(path_1.PortablePath.root, target); + this.baseFs = baseFs; + } + getRealPath() { + return this.pathUtils.resolve(this.baseFs.getRealPath(), this.pathUtils.relative(path_1.PortablePath.root, this.target)); + } + getTarget() { + return this.target; + } + getBaseFs() { + return this.baseFs; + } + mapToBase(p) { + const normalized = this.pathUtils.normalize(p); + if (this.pathUtils.isAbsolute(p)) + return this.pathUtils.resolve(this.target, this.pathUtils.relative(JAIL_ROOT, p)); + if (normalized.match(/^\.\.\/?/)) + throw new Error(`Resolving this path (${p}) would escape the jail`); + return this.pathUtils.resolve(this.target, p); + } + mapFromBase(p) { + return this.pathUtils.resolve(JAIL_ROOT, this.pathUtils.relative(this.target, p)); + } + }; + exports2.JailFS = JailFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/LazyFS.js +var require_LazyFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/LazyFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LazyFS = void 0; + var ProxiedFS_1 = require_ProxiedFS(); + var LazyFS = class extends ProxiedFS_1.ProxiedFS { + constructor(factory, pathUtils) { + super(pathUtils); + this.instance = null; + this.factory = factory; + } + get baseFs() { + if (!this.instance) + this.instance = this.factory(); + return this.instance; + } + set baseFs(value) { + this.instance = value; + } + mapFromBase(p) { + return p; + } + mapToBase(p) { + return p; + } + }; + exports2.LazyFS = LazyFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/NoFS.js +var require_NoFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/NoFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NoFS = void 0; + var FakeFS_1 = require_FakeFS(); + var path_1 = require_path4(); + var makeError = () => Object.assign(new Error(`ENOSYS: unsupported filesystem access`), { code: `ENOSYS` }); + var NoFS = class extends FakeFS_1.FakeFS { + constructor() { + super(path_1.ppath); + } + getExtractHint() { + throw makeError(); + } + getRealPath() { + throw makeError(); + } + resolve() { + throw makeError(); + } + async openPromise() { + throw makeError(); + } + openSync() { + throw makeError(); + } + async opendirPromise() { + throw makeError(); + } + opendirSync() { + throw makeError(); + } + async readPromise() { + throw makeError(); + } + readSync() { + throw makeError(); + } + async writePromise() { + throw makeError(); + } + writeSync() { + throw makeError(); + } + async closePromise() { + throw makeError(); + } + closeSync() { + throw makeError(); + } + createWriteStream() { + throw makeError(); + } + createReadStream() { + throw makeError(); + } + async realpathPromise() { + throw makeError(); + } + realpathSync() { + throw makeError(); + } + async readdirPromise() { + throw makeError(); + } + readdirSync() { + throw makeError(); + } + async existsPromise(p) { + throw makeError(); + } + existsSync(p) { + throw makeError(); + } + async accessPromise() { + throw makeError(); + } + accessSync() { + throw makeError(); + } + async statPromise() { + throw makeError(); + } + statSync() { + throw makeError(); + } + async fstatPromise(fd) { + throw makeError(); + } + fstatSync(fd) { + throw makeError(); + } + async lstatPromise(p) { + throw makeError(); + } + lstatSync(p) { + throw makeError(); + } + async chmodPromise() { + throw makeError(); + } + chmodSync() { + throw makeError(); + } + async chownPromise() { + throw makeError(); + } + chownSync() { + throw makeError(); + } + async mkdirPromise() { + throw makeError(); + } + mkdirSync() { + throw makeError(); + } + async rmdirPromise() { + throw makeError(); + } + rmdirSync() { + throw makeError(); + } + async linkPromise() { + throw makeError(); + } + linkSync() { + throw makeError(); + } + async symlinkPromise() { + throw makeError(); + } + symlinkSync() { + throw makeError(); + } + async renamePromise() { + throw makeError(); + } + renameSync() { + throw makeError(); + } + async copyFilePromise() { + throw makeError(); + } + copyFileSync() { + throw makeError(); + } + async appendFilePromise() { + throw makeError(); + } + appendFileSync() { + throw makeError(); + } + async writeFilePromise() { + throw makeError(); + } + writeFileSync() { + throw makeError(); + } + async unlinkPromise() { + throw makeError(); + } + unlinkSync() { + throw makeError(); + } + async utimesPromise() { + throw makeError(); + } + utimesSync() { + throw makeError(); + } + async readFilePromise() { + throw makeError(); + } + readFileSync() { + throw makeError(); + } + async readlinkPromise() { + throw makeError(); + } + readlinkSync() { + throw makeError(); + } + async truncatePromise() { + throw makeError(); + } + truncateSync() { + throw makeError(); + } + watch() { + throw makeError(); + } + watchFile() { + throw makeError(); + } + unwatchFile() { + throw makeError(); + } + }; + exports2.NoFS = NoFS; + NoFS.instance = new NoFS(); + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/PosixFS.js +var require_PosixFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/PosixFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PosixFS = void 0; + var ProxiedFS_1 = require_ProxiedFS(); + var path_1 = require_path4(); + var PosixFS = class extends ProxiedFS_1.ProxiedFS { + constructor(baseFs) { + super(path_1.npath); + this.baseFs = baseFs; + } + mapFromBase(path) { + return path_1.npath.fromPortablePath(path); + } + mapToBase(path) { + return path_1.npath.toPortablePath(path); + } + }; + exports2.PosixFS = PosixFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/VirtualFS.js +var require_VirtualFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/VirtualFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.VirtualFS = void 0; + var NodeFS_1 = require_NodeFS(); + var ProxiedFS_1 = require_ProxiedFS(); + var path_1 = require_path4(); + var NUMBER_REGEXP = /^[0-9]+$/; + var VIRTUAL_REGEXP = /^(\/(?:[^/]+\/)*?(?:\$\$virtual|__virtual__))((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/; + var VALID_COMPONENT = /^([^/]+-)?[a-f0-9]+$/; + var VirtualFS = class extends ProxiedFS_1.ProxiedFS { + constructor({ baseFs = new NodeFS_1.NodeFS() } = {}) { + super(path_1.ppath); + this.baseFs = baseFs; + } + static makeVirtualPath(base, component, to) { + if (path_1.ppath.basename(base) !== `__virtual__`) + throw new Error(`Assertion failed: Virtual folders must be named "__virtual__"`); + if (!path_1.ppath.basename(component).match(VALID_COMPONENT)) + throw new Error(`Assertion failed: Virtual components must be ended by an hexadecimal hash`); + const target = path_1.ppath.relative(path_1.ppath.dirname(base), to); + const segments = target.split(`/`); + let depth = 0; + while (depth < segments.length && segments[depth] === `..`) + depth += 1; + const finalSegments = segments.slice(depth); + const fullVirtualPath = path_1.ppath.join(base, component, String(depth), ...finalSegments); + return fullVirtualPath; + } + static resolveVirtual(p) { + const match = p.match(VIRTUAL_REGEXP); + if (!match || !match[3] && match[5]) + return p; + const target = path_1.ppath.dirname(match[1]); + if (!match[3] || !match[4]) + return target; + const isnum = NUMBER_REGEXP.test(match[4]); + if (!isnum) + return p; + const depth = Number(match[4]); + const backstep = `../`.repeat(depth); + const subpath = match[5] || `.`; + return VirtualFS.resolveVirtual(path_1.ppath.join(target, backstep, subpath)); + } + getExtractHint(hints) { + return this.baseFs.getExtractHint(hints); + } + getRealPath() { + return this.baseFs.getRealPath(); + } + realpathSync(p) { + const match = p.match(VIRTUAL_REGEXP); + if (!match) + return this.baseFs.realpathSync(p); + if (!match[5]) + return p; + const realpath = this.baseFs.realpathSync(this.mapToBase(p)); + return VirtualFS.makeVirtualPath(match[1], match[3], realpath); + } + async realpathPromise(p) { + const match = p.match(VIRTUAL_REGEXP); + if (!match) + return await this.baseFs.realpathPromise(p); + if (!match[5]) + return p; + const realpath = await this.baseFs.realpathPromise(this.mapToBase(p)); + return VirtualFS.makeVirtualPath(match[1], match[3], realpath); + } + mapToBase(p) { + if (this.pathUtils.isAbsolute(p)) + return VirtualFS.resolveVirtual(p); + const resolvedRoot = VirtualFS.resolveVirtual(this.baseFs.resolve(path_1.PortablePath.dot)); + const resolvedP = VirtualFS.resolveVirtual(this.baseFs.resolve(p)); + return path_1.ppath.relative(resolvedRoot, resolvedP) || path_1.PortablePath.dot; + } + mapFromBase(p) { + return p; + } + }; + exports2.VirtualFS = VirtualFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/ZipOpenFS.js +var require_ZipOpenFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/ZipOpenFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ZipOpenFS = exports2.getArchivePart = void 0; + var tslib_1 = require_tslib(); + var fs_1 = require("fs"); + var FakeFS_1 = require_FakeFS(); + var NodeFS_1 = require_NodeFS(); + var ZipFS_1 = require_ZipFS(); + var watchFile_1 = require_watchFile(); + var errors = (0, tslib_1.__importStar)(require_errors4()); + var path_1 = require_path4(); + var ZIP_FD = 2147483648; + var DOT_ZIP = `.zip`; + var getArchivePart = (path) => { + let idx = path.indexOf(DOT_ZIP); + if (idx <= 0) + return null; + let nextCharIdx = idx; + while (idx >= 0) { + nextCharIdx = idx + DOT_ZIP.length; + if (path[nextCharIdx] === path_1.ppath.sep) + break; + if (path[idx - 1] === path_1.ppath.sep) + return null; + idx = path.indexOf(DOT_ZIP, nextCharIdx); + } + if (path.length > nextCharIdx && path[nextCharIdx] !== path_1.ppath.sep) + return null; + return path.slice(0, nextCharIdx); + }; + exports2.getArchivePart = getArchivePart; + var ZipOpenFS = class extends FakeFS_1.BasePortableFakeFS { + constructor({ libzip, baseFs = new NodeFS_1.NodeFS(), filter = null, maxOpenFiles = Infinity, readOnlyArchives = false, useCache = true, maxAge = 5e3 }) { + super(); + this.fdMap = new Map(); + this.nextFd = 3; + this.isZip = new Set(); + this.notZip = new Set(); + this.realPaths = new Map(); + this.limitOpenFilesTimeout = null; + this.libzipFactory = typeof libzip !== `function` ? () => libzip : libzip; + this.baseFs = baseFs; + this.zipInstances = useCache ? new Map() : null; + this.filter = filter; + this.maxOpenFiles = maxOpenFiles; + this.readOnlyArchives = readOnlyArchives; + this.maxAge = maxAge; + } + static async openPromise(fn2, opts) { + const zipOpenFs = new ZipOpenFS(opts); + try { + return await fn2(zipOpenFs); + } finally { + zipOpenFs.saveAndClose(); + } + } + get libzip() { + if (typeof this.libzipInstance === `undefined`) + this.libzipInstance = this.libzipFactory(); + return this.libzipInstance; + } + getExtractHint(hints) { + return this.baseFs.getExtractHint(hints); + } + getRealPath() { + return this.baseFs.getRealPath(); + } + saveAndClose() { + (0, watchFile_1.unwatchAllFiles)(this); + if (this.zipInstances) { + for (const [path, { zipFs }] of this.zipInstances.entries()) { + zipFs.saveAndClose(); + this.zipInstances.delete(path); + } + } + } + discardAndClose() { + (0, watchFile_1.unwatchAllFiles)(this); + if (this.zipInstances) { + for (const [path, { zipFs }] of this.zipInstances.entries()) { + zipFs.discardAndClose(); + this.zipInstances.delete(path); + } + } + } + resolve(p) { + return this.baseFs.resolve(p); + } + remapFd(zipFs, fd) { + const remappedFd = this.nextFd++ | ZIP_FD; + this.fdMap.set(remappedFd, [zipFs, fd]); + return remappedFd; + } + async openPromise(p, flags, mode) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.openPromise(p, flags, mode); + }, async (zipFs, { subPath }) => { + return this.remapFd(zipFs, await zipFs.openPromise(subPath, flags, mode)); + }); + } + openSync(p, flags, mode) { + return this.makeCallSync(p, () => { + return this.baseFs.openSync(p, flags, mode); + }, (zipFs, { subPath }) => { + return this.remapFd(zipFs, zipFs.openSync(subPath, flags, mode)); + }); + } + async opendirPromise(p, opts) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.opendirPromise(p, opts); + }, async (zipFs, { subPath }) => { + return await zipFs.opendirPromise(subPath, opts); + }, { + requireSubpath: false + }); + } + opendirSync(p, opts) { + return this.makeCallSync(p, () => { + return this.baseFs.opendirSync(p, opts); + }, (zipFs, { subPath }) => { + return zipFs.opendirSync(subPath, opts); + }, { + requireSubpath: false + }); + } + async readPromise(fd, buffer, offset, length, position) { + if ((fd & ZIP_FD) === 0) + return await this.baseFs.readPromise(fd, buffer, offset, length, position); + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`read`); + const [zipFs, realFd] = entry; + return await zipFs.readPromise(realFd, buffer, offset, length, position); + } + readSync(fd, buffer, offset, length, position) { + if ((fd & ZIP_FD) === 0) + return this.baseFs.readSync(fd, buffer, offset, length, position); + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`readSync`); + const [zipFs, realFd] = entry; + return zipFs.readSync(realFd, buffer, offset, length, position); + } + async writePromise(fd, buffer, offset, length, position) { + if ((fd & ZIP_FD) === 0) { + if (typeof buffer === `string`) { + return await this.baseFs.writePromise(fd, buffer, offset); + } else { + return await this.baseFs.writePromise(fd, buffer, offset, length, position); + } + } + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`write`); + const [zipFs, realFd] = entry; + if (typeof buffer === `string`) { + return await zipFs.writePromise(realFd, buffer, offset); + } else { + return await zipFs.writePromise(realFd, buffer, offset, length, position); + } + } + writeSync(fd, buffer, offset, length, position) { + if ((fd & ZIP_FD) === 0) { + if (typeof buffer === `string`) { + return this.baseFs.writeSync(fd, buffer, offset); + } else { + return this.baseFs.writeSync(fd, buffer, offset, length, position); + } + } + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`writeSync`); + const [zipFs, realFd] = entry; + if (typeof buffer === `string`) { + return zipFs.writeSync(realFd, buffer, offset); + } else { + return zipFs.writeSync(realFd, buffer, offset, length, position); + } + } + async closePromise(fd) { + if ((fd & ZIP_FD) === 0) + return await this.baseFs.closePromise(fd); + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`close`); + this.fdMap.delete(fd); + const [zipFs, realFd] = entry; + return await zipFs.closePromise(realFd); + } + closeSync(fd) { + if ((fd & ZIP_FD) === 0) + return this.baseFs.closeSync(fd); + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`closeSync`); + this.fdMap.delete(fd); + const [zipFs, realFd] = entry; + return zipFs.closeSync(realFd); + } + createReadStream(p, opts) { + if (p === null) + return this.baseFs.createReadStream(p, opts); + return this.makeCallSync(p, () => { + return this.baseFs.createReadStream(p, opts); + }, (zipFs, { subPath }) => { + return zipFs.createReadStream(subPath, opts); + }); + } + createWriteStream(p, opts) { + if (p === null) + return this.baseFs.createWriteStream(p, opts); + return this.makeCallSync(p, () => { + return this.baseFs.createWriteStream(p, opts); + }, (zipFs, { subPath }) => { + return zipFs.createWriteStream(subPath, opts); + }); + } + async realpathPromise(p) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.realpathPromise(p); + }, async (zipFs, { archivePath, subPath }) => { + let realArchivePath = this.realPaths.get(archivePath); + if (typeof realArchivePath === `undefined`) { + realArchivePath = await this.baseFs.realpathPromise(archivePath); + this.realPaths.set(archivePath, realArchivePath); + } + return this.pathUtils.join(realArchivePath, this.pathUtils.relative(path_1.PortablePath.root, await zipFs.realpathPromise(subPath))); + }); + } + realpathSync(p) { + return this.makeCallSync(p, () => { + return this.baseFs.realpathSync(p); + }, (zipFs, { archivePath, subPath }) => { + let realArchivePath = this.realPaths.get(archivePath); + if (typeof realArchivePath === `undefined`) { + realArchivePath = this.baseFs.realpathSync(archivePath); + this.realPaths.set(archivePath, realArchivePath); + } + return this.pathUtils.join(realArchivePath, this.pathUtils.relative(path_1.PortablePath.root, zipFs.realpathSync(subPath))); + }); + } + async existsPromise(p) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.existsPromise(p); + }, async (zipFs, { subPath }) => { + return await zipFs.existsPromise(subPath); + }); + } + existsSync(p) { + return this.makeCallSync(p, () => { + return this.baseFs.existsSync(p); + }, (zipFs, { subPath }) => { + return zipFs.existsSync(subPath); + }); + } + async accessPromise(p, mode) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.accessPromise(p, mode); + }, async (zipFs, { subPath }) => { + return await zipFs.accessPromise(subPath, mode); + }); + } + accessSync(p, mode) { + return this.makeCallSync(p, () => { + return this.baseFs.accessSync(p, mode); + }, (zipFs, { subPath }) => { + return zipFs.accessSync(subPath, mode); + }); + } + async statPromise(p, opts) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.statPromise(p, opts); + }, async (zipFs, { subPath }) => { + return await zipFs.statPromise(subPath, opts); + }); + } + statSync(p, opts) { + return this.makeCallSync(p, () => { + return this.baseFs.statSync(p, opts); + }, (zipFs, { subPath }) => { + return zipFs.statSync(subPath, opts); + }); + } + async fstatPromise(fd, opts) { + if ((fd & ZIP_FD) === 0) + return this.baseFs.fstatPromise(fd, opts); + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`fstat`); + const [zipFs, realFd] = entry; + return zipFs.fstatPromise(realFd, opts); + } + fstatSync(fd, opts) { + if ((fd & ZIP_FD) === 0) + return this.baseFs.fstatSync(fd, opts); + const entry = this.fdMap.get(fd); + if (typeof entry === `undefined`) + throw errors.EBADF(`fstatSync`); + const [zipFs, realFd] = entry; + return zipFs.fstatSync(realFd, opts); + } + async lstatPromise(p, opts) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.lstatPromise(p, opts); + }, async (zipFs, { subPath }) => { + return await zipFs.lstatPromise(subPath, opts); + }); + } + lstatSync(p, opts) { + return this.makeCallSync(p, () => { + return this.baseFs.lstatSync(p, opts); + }, (zipFs, { subPath }) => { + return zipFs.lstatSync(subPath, opts); + }); + } + async chmodPromise(p, mask) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.chmodPromise(p, mask); + }, async (zipFs, { subPath }) => { + return await zipFs.chmodPromise(subPath, mask); + }); + } + chmodSync(p, mask) { + return this.makeCallSync(p, () => { + return this.baseFs.chmodSync(p, mask); + }, (zipFs, { subPath }) => { + return zipFs.chmodSync(subPath, mask); + }); + } + async chownPromise(p, uid, gid) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.chownPromise(p, uid, gid); + }, async (zipFs, { subPath }) => { + return await zipFs.chownPromise(subPath, uid, gid); + }); + } + chownSync(p, uid, gid) { + return this.makeCallSync(p, () => { + return this.baseFs.chownSync(p, uid, gid); + }, (zipFs, { subPath }) => { + return zipFs.chownSync(subPath, uid, gid); + }); + } + async renamePromise(oldP, newP) { + return await this.makeCallPromise(oldP, async () => { + return await this.makeCallPromise(newP, async () => { + return await this.baseFs.renamePromise(oldP, newP); + }, async () => { + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); + }); + }, async (zipFsO, { subPath: subPathO }) => { + return await this.makeCallPromise(newP, async () => { + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); + }, async (zipFsN, { subPath: subPathN }) => { + if (zipFsO !== zipFsN) { + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); + } else { + return await zipFsO.renamePromise(subPathO, subPathN); + } + }); + }); + } + renameSync(oldP, newP) { + return this.makeCallSync(oldP, () => { + return this.makeCallSync(newP, () => { + return this.baseFs.renameSync(oldP, newP); + }, async () => { + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); + }); + }, (zipFsO, { subPath: subPathO }) => { + return this.makeCallSync(newP, () => { + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); + }, (zipFsN, { subPath: subPathN }) => { + if (zipFsO !== zipFsN) { + throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); + } else { + return zipFsO.renameSync(subPathO, subPathN); + } + }); + }); + } + async copyFilePromise(sourceP, destP, flags = 0) { + const fallback = async (sourceFs, sourceP2, destFs, destP2) => { + if ((flags & fs_1.constants.COPYFILE_FICLONE_FORCE) !== 0) + throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${sourceP2}' -> ${destP2}'`), { code: `EXDEV` }); + if (flags & fs_1.constants.COPYFILE_EXCL && await this.existsPromise(sourceP2)) + throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${sourceP2}' -> '${destP2}'`), { code: `EEXIST` }); + let content; + try { + content = await sourceFs.readFilePromise(sourceP2); + } catch (error) { + throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${sourceP2}' -> '${destP2}'`), { code: `EINVAL` }); + } + await destFs.writeFilePromise(destP2, content); + }; + return await this.makeCallPromise(sourceP, async () => { + return await this.makeCallPromise(destP, async () => { + return await this.baseFs.copyFilePromise(sourceP, destP, flags); + }, async (zipFsD, { subPath: subPathD }) => { + return await fallback(this.baseFs, sourceP, zipFsD, subPathD); + }); + }, async (zipFsS, { subPath: subPathS }) => { + return await this.makeCallPromise(destP, async () => { + return await fallback(zipFsS, subPathS, this.baseFs, destP); + }, async (zipFsD, { subPath: subPathD }) => { + if (zipFsS !== zipFsD) { + return await fallback(zipFsS, subPathS, zipFsD, subPathD); + } else { + return await zipFsS.copyFilePromise(subPathS, subPathD, flags); + } + }); + }); + } + copyFileSync(sourceP, destP, flags = 0) { + const fallback = (sourceFs, sourceP2, destFs, destP2) => { + if ((flags & fs_1.constants.COPYFILE_FICLONE_FORCE) !== 0) + throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${sourceP2}' -> ${destP2}'`), { code: `EXDEV` }); + if (flags & fs_1.constants.COPYFILE_EXCL && this.existsSync(sourceP2)) + throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${sourceP2}' -> '${destP2}'`), { code: `EEXIST` }); + let content; + try { + content = sourceFs.readFileSync(sourceP2); + } catch (error) { + throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${sourceP2}' -> '${destP2}'`), { code: `EINVAL` }); + } + destFs.writeFileSync(destP2, content); + }; + return this.makeCallSync(sourceP, () => { + return this.makeCallSync(destP, () => { + return this.baseFs.copyFileSync(sourceP, destP, flags); + }, (zipFsD, { subPath: subPathD }) => { + return fallback(this.baseFs, sourceP, zipFsD, subPathD); + }); + }, (zipFsS, { subPath: subPathS }) => { + return this.makeCallSync(destP, () => { + return fallback(zipFsS, subPathS, this.baseFs, destP); + }, (zipFsD, { subPath: subPathD }) => { + if (zipFsS !== zipFsD) { + return fallback(zipFsS, subPathS, zipFsD, subPathD); + } else { + return zipFsS.copyFileSync(subPathS, subPathD, flags); + } + }); + }); + } + async appendFilePromise(p, content, opts) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.appendFilePromise(p, content, opts); + }, async (zipFs, { subPath }) => { + return await zipFs.appendFilePromise(subPath, content, opts); + }); + } + appendFileSync(p, content, opts) { + return this.makeCallSync(p, () => { + return this.baseFs.appendFileSync(p, content, opts); + }, (zipFs, { subPath }) => { + return zipFs.appendFileSync(subPath, content, opts); + }); + } + async writeFilePromise(p, content, opts) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.writeFilePromise(p, content, opts); + }, async (zipFs, { subPath }) => { + return await zipFs.writeFilePromise(subPath, content, opts); + }); + } + writeFileSync(p, content, opts) { + return this.makeCallSync(p, () => { + return this.baseFs.writeFileSync(p, content, opts); + }, (zipFs, { subPath }) => { + return zipFs.writeFileSync(subPath, content, opts); + }); + } + async unlinkPromise(p) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.unlinkPromise(p); + }, async (zipFs, { subPath }) => { + return await zipFs.unlinkPromise(subPath); + }); + } + unlinkSync(p) { + return this.makeCallSync(p, () => { + return this.baseFs.unlinkSync(p); + }, (zipFs, { subPath }) => { + return zipFs.unlinkSync(subPath); + }); + } + async utimesPromise(p, atime, mtime) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.utimesPromise(p, atime, mtime); + }, async (zipFs, { subPath }) => { + return await zipFs.utimesPromise(subPath, atime, mtime); + }); + } + utimesSync(p, atime, mtime) { + return this.makeCallSync(p, () => { + return this.baseFs.utimesSync(p, atime, mtime); + }, (zipFs, { subPath }) => { + return zipFs.utimesSync(subPath, atime, mtime); + }); + } + async mkdirPromise(p, opts) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.mkdirPromise(p, opts); + }, async (zipFs, { subPath }) => { + return await zipFs.mkdirPromise(subPath, opts); + }); + } + mkdirSync(p, opts) { + return this.makeCallSync(p, () => { + return this.baseFs.mkdirSync(p, opts); + }, (zipFs, { subPath }) => { + return zipFs.mkdirSync(subPath, opts); + }); + } + async rmdirPromise(p, opts) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.rmdirPromise(p, opts); + }, async (zipFs, { subPath }) => { + return await zipFs.rmdirPromise(subPath, opts); + }); + } + rmdirSync(p, opts) { + return this.makeCallSync(p, () => { + return this.baseFs.rmdirSync(p, opts); + }, (zipFs, { subPath }) => { + return zipFs.rmdirSync(subPath, opts); + }); + } + async linkPromise(existingP, newP) { + return await this.makeCallPromise(newP, async () => { + return await this.baseFs.linkPromise(existingP, newP); + }, async (zipFs, { subPath }) => { + return await zipFs.linkPromise(existingP, subPath); + }); + } + linkSync(existingP, newP) { + return this.makeCallSync(newP, () => { + return this.baseFs.linkSync(existingP, newP); + }, (zipFs, { subPath }) => { + return zipFs.linkSync(existingP, subPath); + }); + } + async symlinkPromise(target, p, type) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.symlinkPromise(target, p, type); + }, async (zipFs, { subPath }) => { + return await zipFs.symlinkPromise(target, subPath); + }); + } + symlinkSync(target, p, type) { + return this.makeCallSync(p, () => { + return this.baseFs.symlinkSync(target, p, type); + }, (zipFs, { subPath }) => { + return zipFs.symlinkSync(target, subPath); + }); + } + async readFilePromise(p, encoding) { + return this.makeCallPromise(p, async () => { + switch (encoding) { + case `utf8`: + return await this.baseFs.readFilePromise(p, encoding); + default: + return await this.baseFs.readFilePromise(p, encoding); + } + }, async (zipFs, { subPath }) => { + return await zipFs.readFilePromise(subPath, encoding); + }); + } + readFileSync(p, encoding) { + return this.makeCallSync(p, () => { + switch (encoding) { + case `utf8`: + return this.baseFs.readFileSync(p, encoding); + default: + return this.baseFs.readFileSync(p, encoding); + } + }, (zipFs, { subPath }) => { + return zipFs.readFileSync(subPath, encoding); + }); + } + async readdirPromise(p, opts) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.readdirPromise(p, opts); + }, async (zipFs, { subPath }) => { + return await zipFs.readdirPromise(subPath, opts); + }, { + requireSubpath: false + }); + } + readdirSync(p, opts) { + return this.makeCallSync(p, () => { + return this.baseFs.readdirSync(p, opts); + }, (zipFs, { subPath }) => { + return zipFs.readdirSync(subPath, opts); + }, { + requireSubpath: false + }); + } + async readlinkPromise(p) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.readlinkPromise(p); + }, async (zipFs, { subPath }) => { + return await zipFs.readlinkPromise(subPath); + }); + } + readlinkSync(p) { + return this.makeCallSync(p, () => { + return this.baseFs.readlinkSync(p); + }, (zipFs, { subPath }) => { + return zipFs.readlinkSync(subPath); + }); + } + async truncatePromise(p, len) { + return await this.makeCallPromise(p, async () => { + return await this.baseFs.truncatePromise(p, len); + }, async (zipFs, { subPath }) => { + return await zipFs.truncatePromise(subPath, len); + }); + } + truncateSync(p, len) { + return this.makeCallSync(p, () => { + return this.baseFs.truncateSync(p, len); + }, (zipFs, { subPath }) => { + return zipFs.truncateSync(subPath, len); + }); + } + watch(p, a, b) { + return this.makeCallSync(p, () => { + return this.baseFs.watch(p, a, b); + }, (zipFs, { subPath }) => { + return zipFs.watch(subPath, a, b); + }); + } + watchFile(p, a, b) { + return this.makeCallSync(p, () => { + return this.baseFs.watchFile(p, a, b); + }, () => { + return (0, watchFile_1.watchFile)(this, p, a, b); + }); + } + unwatchFile(p, cb) { + return this.makeCallSync(p, () => { + return this.baseFs.unwatchFile(p, cb); + }, () => { + return (0, watchFile_1.unwatchFile)(this, p, cb); + }); + } + async makeCallPromise(p, discard, accept, { requireSubpath = true } = {}) { + if (typeof p !== `string`) + return await discard(); + const normalizedP = this.resolve(p); + const zipInfo = this.findZip(normalizedP); + if (!zipInfo) + return await discard(); + if (requireSubpath && zipInfo.subPath === `/`) + return await discard(); + return await this.getZipPromise(zipInfo.archivePath, async (zipFs) => await accept(zipFs, zipInfo)); + } + makeCallSync(p, discard, accept, { requireSubpath = true } = {}) { + if (typeof p !== `string`) + return discard(); + const normalizedP = this.resolve(p); + const zipInfo = this.findZip(normalizedP); + if (!zipInfo) + return discard(); + if (requireSubpath && zipInfo.subPath === `/`) + return discard(); + return this.getZipSync(zipInfo.archivePath, (zipFs) => accept(zipFs, zipInfo)); + } + findZip(p) { + if (this.filter && !this.filter.test(p)) + return null; + let filePath = ``; + while (true) { + const archivePart = (0, exports2.getArchivePart)(p.substr(filePath.length)); + if (!archivePart) + return null; + filePath = this.pathUtils.join(filePath, archivePart); + if (this.isZip.has(filePath) === false) { + if (this.notZip.has(filePath)) + continue; + try { + if (!this.baseFs.lstatSync(filePath).isFile()) { + this.notZip.add(filePath); + continue; + } + } catch (_a) { + return null; + } + this.isZip.add(filePath); + } + return { + archivePath: filePath, + subPath: this.pathUtils.join(path_1.PortablePath.root, p.substr(filePath.length)) + }; + } + } + limitOpenFiles(max) { + if (this.zipInstances === null) + return; + const now = Date.now(); + let nextExpiresAt = now + this.maxAge; + let closeCount = max === null ? 0 : this.zipInstances.size - max; + for (const [path, { zipFs, expiresAt, refCount }] of this.zipInstances.entries()) { + if (refCount !== 0 || zipFs.hasOpenFileHandles()) { + continue; + } else if (now >= expiresAt) { + zipFs.saveAndClose(); + this.zipInstances.delete(path); + closeCount -= 1; + continue; + } else if (max === null || closeCount <= 0) { + nextExpiresAt = expiresAt; + break; + } + zipFs.saveAndClose(); + this.zipInstances.delete(path); + closeCount -= 1; + } + if (this.limitOpenFilesTimeout === null && (max === null && this.zipInstances.size > 0 || max !== null)) { + this.limitOpenFilesTimeout = setTimeout(() => { + this.limitOpenFilesTimeout = null; + this.limitOpenFiles(null); + }, nextExpiresAt - now).unref(); + } + } + async getZipPromise(p, accept) { + const getZipOptions = async () => ({ + baseFs: this.baseFs, + libzip: this.libzip, + readOnly: this.readOnlyArchives, + stats: await this.baseFs.statPromise(p) + }); + if (this.zipInstances) { + let cachedZipFs = this.zipInstances.get(p); + if (!cachedZipFs) { + const zipOptions = await getZipOptions(); + cachedZipFs = this.zipInstances.get(p); + if (!cachedZipFs) { + cachedZipFs = { + zipFs: new ZipFS_1.ZipFS(p, zipOptions), + expiresAt: 0, + refCount: 0 + }; + } + } + this.zipInstances.delete(p); + this.limitOpenFiles(this.maxOpenFiles - 1); + this.zipInstances.set(p, cachedZipFs); + cachedZipFs.expiresAt = Date.now() + this.maxAge; + cachedZipFs.refCount += 1; + try { + return await accept(cachedZipFs.zipFs); + } finally { + cachedZipFs.refCount -= 1; + } + } else { + const zipFs = new ZipFS_1.ZipFS(p, await getZipOptions()); + try { + return await accept(zipFs); + } finally { + zipFs.saveAndClose(); + } + } + } + getZipSync(p, accept) { + const getZipOptions = () => ({ + baseFs: this.baseFs, + libzip: this.libzip, + readOnly: this.readOnlyArchives, + stats: this.baseFs.statSync(p) + }); + if (this.zipInstances) { + let cachedZipFs = this.zipInstances.get(p); + if (!cachedZipFs) { + cachedZipFs = { + zipFs: new ZipFS_1.ZipFS(p, getZipOptions()), + expiresAt: 0, + refCount: 0 + }; + } + this.zipInstances.delete(p); + this.limitOpenFiles(this.maxOpenFiles - 1); + this.zipInstances.set(p, cachedZipFs); + cachedZipFs.expiresAt = Date.now() + this.maxAge; + return accept(cachedZipFs.zipFs); + } else { + const zipFs = new ZipFS_1.ZipFS(p, getZipOptions()); + try { + return accept(zipFs); + } finally { + zipFs.saveAndClose(); + } + } + } + }; + exports2.ZipOpenFS = ZipOpenFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/URLFS.js +var require_URLFS = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/URLFS.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.URLFS = void 0; + var url_1 = require("url"); + var ProxiedFS_1 = require_ProxiedFS(); + var path_1 = require_path4(); + var URLFS = class extends ProxiedFS_1.ProxiedFS { + constructor(baseFs) { + super(path_1.npath); + this.baseFs = baseFs; + } + mapFromBase(path) { + return path; + } + mapToBase(path) { + if (path instanceof url_1.URL) + return (0, url_1.fileURLToPath)(path); + return path; + } + }; + exports2.URLFS = URLFS; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/patchFs.js +var require_patchFs = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/patchFs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.extendFs = exports2.patchFs = void 0; + var util_1 = require("util"); + var URLFS_1 = require_URLFS(); + var SYNC_IMPLEMENTATIONS = new Set([ + `accessSync`, + `appendFileSync`, + `createReadStream`, + `chmodSync`, + `chownSync`, + `closeSync`, + `copyFileSync`, + `linkSync`, + `lstatSync`, + `fstatSync`, + `lutimesSync`, + `mkdirSync`, + `openSync`, + `opendirSync`, + `readSync`, + `readlinkSync`, + `readFileSync`, + `readdirSync`, + `readlinkSync`, + `realpathSync`, + `renameSync`, + `rmdirSync`, + `statSync`, + `symlinkSync`, + `truncateSync`, + `unlinkSync`, + `unwatchFile`, + `utimesSync`, + `watch`, + `watchFile`, + `writeFileSync`, + `writeSync` + ]); + var ASYNC_IMPLEMENTATIONS = new Set([ + `accessPromise`, + `appendFilePromise`, + `chmodPromise`, + `chownPromise`, + `closePromise`, + `copyFilePromise`, + `linkPromise`, + `fstatPromise`, + `lstatPromise`, + `lutimesPromise`, + `mkdirPromise`, + `openPromise`, + `opendirPromise`, + `readdirPromise`, + `realpathPromise`, + `readFilePromise`, + `readdirPromise`, + `readlinkPromise`, + `renamePromise`, + `rmdirPromise`, + `statPromise`, + `symlinkPromise`, + `truncatePromise`, + `unlinkPromise`, + `utimesPromise`, + `writeFilePromise`, + `writeSync` + ]); + var FILEHANDLE_IMPLEMENTATIONS = new Set([ + `appendFilePromise`, + `chmodPromise`, + `chownPromise`, + `closePromise`, + `readPromise`, + `readFilePromise`, + `statPromise`, + `truncatePromise`, + `utimesPromise`, + `writePromise`, + `writeFilePromise` + ]); + function patchFs(patchedFs, fakeFs) { + fakeFs = new URLFS_1.URLFS(fakeFs); + const setupFn = (target, name, replacement) => { + const orig = target[name]; + target[name] = replacement; + if (typeof (orig === null || orig === void 0 ? void 0 : orig[util_1.promisify.custom]) !== `undefined`) { + replacement[util_1.promisify.custom] = orig[util_1.promisify.custom]; + } + }; + { + setupFn(patchedFs, `exists`, (p, ...args2) => { + const hasCallback = typeof args2[args2.length - 1] === `function`; + const callback = hasCallback ? args2.pop() : () => { + }; + process.nextTick(() => { + fakeFs.existsPromise(p).then((exists) => { + callback(exists); + }, () => { + callback(false); + }); + }); + }); + setupFn(patchedFs, `read`, (p, buffer, ...args2) => { + const hasCallback = typeof args2[args2.length - 1] === `function`; + const callback = hasCallback ? args2.pop() : () => { + }; + process.nextTick(() => { + fakeFs.readPromise(p, buffer, ...args2).then((bytesRead) => { + callback(null, bytesRead, buffer); + }, (error) => { + callback(error, 0, buffer); + }); + }); + }); + for (const fnName of ASYNC_IMPLEMENTATIONS) { + const origName = fnName.replace(/Promise$/, ``); + if (typeof patchedFs[origName] === `undefined`) + continue; + const fakeImpl = fakeFs[fnName]; + if (typeof fakeImpl === `undefined`) + continue; + const wrapper = (...args2) => { + const hasCallback = typeof args2[args2.length - 1] === `function`; + const callback = hasCallback ? args2.pop() : () => { + }; + process.nextTick(() => { + fakeImpl.apply(fakeFs, args2).then((result) => { + callback(null, result); + }, (error) => { + callback(error); + }); + }); + }; + setupFn(patchedFs, origName, wrapper); + } + patchedFs.realpath.native = patchedFs.realpath; + } + { + setupFn(patchedFs, `existsSync`, (p) => { + try { + return fakeFs.existsSync(p); + } catch (error) { + return false; + } + }); + for (const fnName of SYNC_IMPLEMENTATIONS) { + const origName = fnName; + if (typeof patchedFs[origName] === `undefined`) + continue; + const fakeImpl = fakeFs[fnName]; + if (typeof fakeImpl === `undefined`) + continue; + setupFn(patchedFs, origName, fakeImpl.bind(fakeFs)); + } + patchedFs.realpathSync.native = patchedFs.realpathSync; + } + { + const origEmitWarning = process.emitWarning; + process.emitWarning = () => { + }; + let patchedFsPromises; + try { + patchedFsPromises = patchedFs.promises; + } finally { + process.emitWarning = origEmitWarning; + } + if (typeof patchedFsPromises !== `undefined`) { + for (const fnName of ASYNC_IMPLEMENTATIONS) { + const origName = fnName.replace(/Promise$/, ``); + if (typeof patchedFsPromises[origName] === `undefined`) + continue; + const fakeImpl = fakeFs[fnName]; + if (typeof fakeImpl === `undefined`) + continue; + if (fnName === `open`) + continue; + setupFn(patchedFsPromises, origName, fakeImpl.bind(fakeFs)); + } + class FileHandle { + constructor(fd) { + this.fd = fd; + } + } + for (const fnName of FILEHANDLE_IMPLEMENTATIONS) { + const origName = fnName.replace(/Promise$/, ``); + const fakeImpl = fakeFs[fnName]; + if (typeof fakeImpl === `undefined`) + continue; + setupFn(FileHandle.prototype, origName, function(...args2) { + return fakeImpl.call(fakeFs, this.fd, ...args2); + }); + } + setupFn(patchedFsPromises, `open`, async (...args2) => { + const fd = await fakeFs.openPromise(...args2); + return new FileHandle(fd); + }); + } + } + { + patchedFs.read[util_1.promisify.custom] = async (p, buffer, ...args2) => { + const res = fakeFs.readPromise(p, buffer, ...args2); + return { bytesRead: await res, buffer }; + }; + } + } + exports2.patchFs = patchFs; + function extendFs(realFs, fakeFs) { + const patchedFs = Object.create(realFs); + patchFs(patchedFs, fakeFs); + return patchedFs; + } + exports2.extendFs = extendFs; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/xfs.js +var require_xfs = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/xfs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.xfs = void 0; + var tslib_1 = require_tslib(); + var os_1 = (0, tslib_1.__importDefault)(require("os")); + var NodeFS_1 = require_NodeFS(); + var path_1 = require_path4(); + function getTempName(prefix) { + const tmpdir = path_1.npath.toPortablePath(os_1.default.tmpdir()); + const hash = Math.ceil(Math.random() * 4294967296).toString(16).padStart(8, `0`); + return path_1.ppath.join(tmpdir, `${prefix}${hash}`); + } + var tmpdirs = new Set(); + var cleanExitRegistered = false; + function registerCleanExit() { + if (cleanExitRegistered) + return; + cleanExitRegistered = true; + process.once(`exit`, () => { + exports2.xfs.rmtempSync(); + }); + } + exports2.xfs = Object.assign(new NodeFS_1.NodeFS(), { + detachTemp(p) { + tmpdirs.delete(p); + }, + mktempSync(cb) { + registerCleanExit(); + while (true) { + const p = getTempName(`xfs-`); + try { + this.mkdirSync(p); + } catch (error) { + if (error.code === `EEXIST`) { + continue; + } else { + throw error; + } + } + const realP = this.realpathSync(p); + tmpdirs.add(realP); + if (typeof cb !== `undefined`) { + try { + return cb(realP); + } finally { + if (tmpdirs.has(realP)) { + tmpdirs.delete(realP); + try { + this.removeSync(realP); + } catch (_a) { + } + } + } + } else { + return realP; + } + } + }, + async mktempPromise(cb) { + registerCleanExit(); + while (true) { + const p = getTempName(`xfs-`); + try { + await this.mkdirPromise(p); + } catch (error) { + if (error.code === `EEXIST`) { + continue; + } else { + throw error; + } + } + const realP = await this.realpathPromise(p); + tmpdirs.add(realP); + if (typeof cb !== `undefined`) { + try { + return await cb(realP); + } finally { + if (tmpdirs.has(realP)) { + tmpdirs.delete(realP); + try { + await this.removePromise(realP); + } catch (_a) { + } + } + } + } else { + return realP; + } + } + }, + async rmtempPromise() { + await Promise.all(Array.from(tmpdirs.values()).map(async (p) => { + try { + await exports2.xfs.removePromise(p, { maxRetries: 0 }); + tmpdirs.delete(p); + } catch (_a) { + } + })); + }, + rmtempSync() { + for (const p of tmpdirs) { + try { + exports2.xfs.removeSync(p); + tmpdirs.delete(p); + } catch (_a) { + } + } + } + }); + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/index.js +var require_lib76 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+fslib@2.5.2/node_modules/@yarnpkg/fslib/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.xfs = exports2.extendFs = exports2.patchFs = exports2.ZipOpenFS = exports2.ZipFS = exports2.VirtualFS = exports2.ProxiedFS = exports2.PosixFS = exports2.NodeFS = exports2.NoFS = exports2.LazyFS = exports2.JailFS = exports2.CwdFS = exports2.FakeFS = exports2.AliasFS = exports2.toFilename = exports2.ppath = exports2.npath = exports2.Filename = exports2.PortablePath = exports2.DEFAULT_COMPRESSION_LEVEL = exports2.normalizeLineEndings = exports2.statUtils = exports2.opendir = exports2.LinkStrategy = void 0; + var tslib_1 = require_tslib(); + var statUtils = (0, tslib_1.__importStar)(require_statUtils()); + exports2.statUtils = statUtils; + var copyPromise_1 = require_copyPromise(); + Object.defineProperty(exports2, "LinkStrategy", { enumerable: true, get: function() { + return copyPromise_1.LinkStrategy; + } }); + var opendir_1 = require_opendir(); + Object.defineProperty(exports2, "opendir", { enumerable: true, get: function() { + return opendir_1.opendir; + } }); + var FakeFS_1 = require_FakeFS(); + Object.defineProperty(exports2, "normalizeLineEndings", { enumerable: true, get: function() { + return FakeFS_1.normalizeLineEndings; + } }); + var ZipFS_1 = require_ZipFS(); + Object.defineProperty(exports2, "DEFAULT_COMPRESSION_LEVEL", { enumerable: true, get: function() { + return ZipFS_1.DEFAULT_COMPRESSION_LEVEL; + } }); + var path_1 = require_path4(); + Object.defineProperty(exports2, "PortablePath", { enumerable: true, get: function() { + return path_1.PortablePath; + } }); + Object.defineProperty(exports2, "Filename", { enumerable: true, get: function() { + return path_1.Filename; + } }); + var path_2 = require_path4(); + Object.defineProperty(exports2, "npath", { enumerable: true, get: function() { + return path_2.npath; + } }); + Object.defineProperty(exports2, "ppath", { enumerable: true, get: function() { + return path_2.ppath; + } }); + Object.defineProperty(exports2, "toFilename", { enumerable: true, get: function() { + return path_2.toFilename; + } }); + var AliasFS_1 = require_AliasFS(); + Object.defineProperty(exports2, "AliasFS", { enumerable: true, get: function() { + return AliasFS_1.AliasFS; + } }); + var FakeFS_2 = require_FakeFS(); + Object.defineProperty(exports2, "FakeFS", { enumerable: true, get: function() { + return FakeFS_2.FakeFS; + } }); + var CwdFS_1 = require_CwdFS(); + Object.defineProperty(exports2, "CwdFS", { enumerable: true, get: function() { + return CwdFS_1.CwdFS; + } }); + var JailFS_1 = require_JailFS(); + Object.defineProperty(exports2, "JailFS", { enumerable: true, get: function() { + return JailFS_1.JailFS; + } }); + var LazyFS_1 = require_LazyFS(); + Object.defineProperty(exports2, "LazyFS", { enumerable: true, get: function() { + return LazyFS_1.LazyFS; + } }); + var NoFS_1 = require_NoFS(); + Object.defineProperty(exports2, "NoFS", { enumerable: true, get: function() { + return NoFS_1.NoFS; + } }); + var NodeFS_1 = require_NodeFS(); + Object.defineProperty(exports2, "NodeFS", { enumerable: true, get: function() { + return NodeFS_1.NodeFS; + } }); + var PosixFS_1 = require_PosixFS(); + Object.defineProperty(exports2, "PosixFS", { enumerable: true, get: function() { + return PosixFS_1.PosixFS; + } }); + var ProxiedFS_1 = require_ProxiedFS(); + Object.defineProperty(exports2, "ProxiedFS", { enumerable: true, get: function() { + return ProxiedFS_1.ProxiedFS; + } }); + var VirtualFS_1 = require_VirtualFS(); + Object.defineProperty(exports2, "VirtualFS", { enumerable: true, get: function() { + return VirtualFS_1.VirtualFS; + } }); + var ZipFS_2 = require_ZipFS(); + Object.defineProperty(exports2, "ZipFS", { enumerable: true, get: function() { + return ZipFS_2.ZipFS; + } }); + var ZipOpenFS_1 = require_ZipOpenFS(); + Object.defineProperty(exports2, "ZipOpenFS", { enumerable: true, get: function() { + return ZipOpenFS_1.ZipOpenFS; + } }); + var patchFs_1 = require_patchFs(); + Object.defineProperty(exports2, "patchFs", { enumerable: true, get: function() { + return patchFs_1.patchFs; + } }); + Object.defineProperty(exports2, "extendFs", { enumerable: true, get: function() { + return patchFs_1.extendFs; + } }); + var xfs_1 = require_xfs(); + Object.defineProperty(exports2, "xfs", { enumerable: true, get: function() { + return xfs_1.xfs; + } }); + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/grammars/shell.js +var require_shell = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/grammars/shell.js"(exports2, module2) { + "use strict"; + function peg$subclass(child, parent) { + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + } + function peg$SyntaxError(message2, expected, found, location) { + this.message = message2; + this.expected = expected; + this.found = found; + this.location = location; + this.name = "SyntaxError"; + if (typeof Error.captureStackTrace === "function") { + Error.captureStackTrace(this, peg$SyntaxError); + } + } + peg$subclass(peg$SyntaxError, Error); + peg$SyntaxError.buildMessage = function(expected, found) { + var DESCRIBE_EXPECTATION_FNS = { + literal: function(expectation) { + return '"' + literalEscape(expectation.text) + '"'; + }, + "class": function(expectation) { + var escapedParts = "", i; + for (i = 0; i < expectation.parts.length; i++) { + escapedParts += expectation.parts[i] instanceof Array ? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1]) : classEscape(expectation.parts[i]); + } + return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]"; + }, + any: function(expectation) { + return "any character"; + }, + end: function(expectation) { + return "end of input"; + }, + other: function(expectation) { + return expectation.description; + } + }; + function hex(ch) { + return ch.charCodeAt(0).toString(16).toUpperCase(); + } + function literalEscape(s) { + return s.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) { + return "\\x0" + hex(ch); + }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { + return "\\x" + hex(ch); + }); + } + function classEscape(s) { + return s.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) { + return "\\x0" + hex(ch); + }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { + return "\\x" + hex(ch); + }); + } + function describeExpectation(expectation) { + return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); + } + function describeExpected(expected2) { + var descriptions = new Array(expected2.length), i, j; + for (i = 0; i < expected2.length; i++) { + descriptions[i] = describeExpectation(expected2[i]); + } + descriptions.sort(); + if (descriptions.length > 0) { + for (i = 1, j = 1; i < descriptions.length; i++) { + if (descriptions[i - 1] !== descriptions[i]) { + descriptions[j] = descriptions[i]; + j++; + } + } + descriptions.length = j; + } + switch (descriptions.length) { + case 1: + return descriptions[0]; + case 2: + return descriptions[0] + " or " + descriptions[1]; + default: + return descriptions.slice(0, -1).join(", ") + ", or " + descriptions[descriptions.length - 1]; + } + } + function describeFound(found2) { + return found2 ? '"' + literalEscape(found2) + '"' : "end of input"; + } + return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; + }; + function peg$parse(input, options) { + options = options !== void 0 ? options : {}; + var peg$FAILED = {}, peg$startRuleFunctions = { Start: peg$parseStart }, peg$startRuleFunction = peg$parseStart, peg$c0 = function(line) { + return line ? line : []; + }, peg$c1 = function(command, type, then) { + return [command].concat(then || []); + }, peg$c2 = function(command, type) { + return [command]; + }, peg$c3 = function(then) { + return then; + }, peg$c4 = ";", peg$c5 = peg$literalExpectation(";", false), peg$c6 = function(chain, then) { + return then ? { chain, then } : { chain }; + }, peg$c7 = function(type, then) { + return { type, line: then }; + }, peg$c8 = "&&", peg$c9 = peg$literalExpectation("&&", false), peg$c10 = "||", peg$c11 = peg$literalExpectation("||", false), peg$c12 = function(main, then) { + return then ? { ...main, then } : main; + }, peg$c13 = function(type, then) { + return { type, chain: then }; + }, peg$c14 = "|&", peg$c15 = peg$literalExpectation("|&", false), peg$c16 = "|", peg$c17 = peg$literalExpectation("|", false), peg$c18 = "=", peg$c19 = peg$literalExpectation("=", false), peg$c20 = function(name, arg) { + return { name, args: [arg] }; + }, peg$c21 = function(name) { + return { name, args: [] }; + }, peg$c22 = "(", peg$c23 = peg$literalExpectation("(", false), peg$c24 = ")", peg$c25 = peg$literalExpectation(")", false), peg$c26 = function(subshell, args2) { + return { type: `subshell`, subshell, args: args2 }; + }, peg$c27 = "{", peg$c28 = peg$literalExpectation("{", false), peg$c29 = "}", peg$c30 = peg$literalExpectation("}", false), peg$c31 = function(group, args2) { + return { type: `group`, group, args: args2 }; + }, peg$c32 = function(envs, args2) { + return { type: `command`, args: args2, envs }; + }, peg$c33 = function(envs) { + return { type: `envs`, envs }; + }, peg$c34 = function(args2) { + return args2; + }, peg$c35 = function(arg) { + return arg; + }, peg$c36 = function(redirect, arg) { + return { type: `redirection`, subtype: redirect, args: [arg] }; + }, peg$c37 = ">>", peg$c38 = peg$literalExpectation(">>", false), peg$c39 = ">&", peg$c40 = peg$literalExpectation(">&", false), peg$c41 = ">", peg$c42 = peg$literalExpectation(">", false), peg$c43 = "<<<", peg$c44 = peg$literalExpectation("<<<", false), peg$c45 = "<&", peg$c46 = peg$literalExpectation("<&", false), peg$c47 = "<", peg$c48 = peg$literalExpectation("<", false), peg$c49 = function(segments) { + return { type: `argument`, segments: [].concat(...segments) }; + }, peg$c50 = function(string) { + return string; + }, peg$c51 = "'", peg$c52 = peg$literalExpectation("'", false), peg$c53 = function(text2) { + return [{ type: `text`, text: text2 }]; + }, peg$c54 = '"', peg$c55 = peg$literalExpectation('"', false), peg$c56 = function(segments) { + return segments; + }, peg$c57 = function(arithmetic) { + return { type: `arithmetic`, arithmetic, quoted: true }; + }, peg$c58 = function(shell) { + return { type: `shell`, shell, quoted: true }; + }, peg$c59 = function(variable) { + return { type: `variable`, ...variable, quoted: true }; + }, peg$c60 = function(text2) { + return { type: `text`, text: text2 }; + }, peg$c61 = function(arithmetic) { + return { type: `arithmetic`, arithmetic, quoted: false }; + }, peg$c62 = function(shell) { + return { type: `shell`, shell, quoted: false }; + }, peg$c63 = function(variable) { + return { type: `variable`, ...variable, quoted: false }; + }, peg$c64 = function(pattern) { + return { type: `glob`, pattern }; + }, peg$c65 = "\\", peg$c66 = peg$literalExpectation("\\", false), peg$c67 = peg$anyExpectation(), peg$c68 = function(c) { + return c; + }, peg$c69 = /^[^']/, peg$c70 = peg$classExpectation(["'"], true, false), peg$c71 = function(chars) { + return chars.join(``); + }, peg$c72 = /^[^$"]/, peg$c73 = peg$classExpectation(["$", '"'], true, false), peg$c74 = "-", peg$c75 = peg$literalExpectation("-", false), peg$c76 = "+", peg$c77 = peg$literalExpectation("+", false), peg$c78 = /^[0-9]/, peg$c79 = peg$classExpectation([["0", "9"]], false, false), peg$c80 = ".", peg$c81 = peg$literalExpectation(".", false), peg$c82 = function(sign, left, right) { + return { type: `number`, value: (sign === "-" ? -1 : 1) * parseFloat(left.join(``) + `.` + right.join(``)) }; + }, peg$c83 = function(sign, value) { + return { type: `number`, value: (sign === "-" ? -1 : 1) * parseInt(value.join(``)) }; + }, peg$c84 = function(variable) { + return { type: `variable`, ...variable }; + }, peg$c85 = function(name) { + return { type: `variable`, name }; + }, peg$c86 = function(value) { + return value; + }, peg$c87 = "*", peg$c88 = peg$literalExpectation("*", false), peg$c89 = function(left, right) { + return { type: `multiplication`, left, right }; + }, peg$c90 = "/", peg$c91 = peg$literalExpectation("/", false), peg$c92 = function(left, right) { + return { type: `division`, left, right }; + }, peg$c93 = function(left, right) { + return { type: `addition`, left, right }; + }, peg$c94 = function(left, right) { + return { type: `subtraction`, left, right }; + }, peg$c95 = "$((", peg$c96 = peg$literalExpectation("$((", false), peg$c97 = "))", peg$c98 = peg$literalExpectation("))", false), peg$c99 = function(arithmetic) { + return arithmetic; + }, peg$c100 = "$(", peg$c101 = peg$literalExpectation("$(", false), peg$c102 = function(command) { + return command; + }, peg$c103 = "${", peg$c104 = peg$literalExpectation("${", false), peg$c105 = ":-", peg$c106 = peg$literalExpectation(":-", false), peg$c107 = function(name, arg) { + return { name, defaultValue: arg }; + }, peg$c108 = ":-}", peg$c109 = peg$literalExpectation(":-}", false), peg$c110 = function(name) { + return { name, defaultValue: [] }; + }, peg$c111 = function(name) { + return { name }; + }, peg$c112 = "$", peg$c113 = peg$literalExpectation("$", false), peg$c114 = function(pattern) { + return options.isGlobPattern(pattern); + }, peg$c115 = function(pattern) { + return pattern; + }, peg$c116 = /^[a-zA-Z0-9_]/, peg$c117 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_"], false, false), peg$c118 = function() { + return text(); + }, peg$c119 = /^[$@*?#a-zA-Z0-9_\-]/, peg$c120 = peg$classExpectation(["$", "@", "*", "?", "#", ["a", "z"], ["A", "Z"], ["0", "9"], "_", "-"], false, false), peg$c121 = /^[(){}<>$|&; \t"']/, peg$c122 = peg$classExpectation(["(", ")", "{", "}", "<", ">", "$", "|", "&", ";", " ", " ", '"', "'"], false, false), peg$c123 = /^[<>&; \t"']/, peg$c124 = peg$classExpectation(["<", ">", "&", ";", " ", " ", '"', "'"], false, false), peg$c125 = /^[ \t]/, peg$c126 = peg$classExpectation([" ", " "], false, false), peg$currPos = 0, peg$savedPos = 0, peg$posDetailsCache = [{ line: 1, column: 1 }], peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, peg$result; + if ("startRule" in options) { + if (!(options.startRule in peg$startRuleFunctions)) { + throw new Error(`Can't start parsing from rule "` + options.startRule + '".'); + } + peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; + } + function text() { + return input.substring(peg$savedPos, peg$currPos); + } + function location() { + return peg$computeLocation(peg$savedPos, peg$currPos); + } + function expected(description, location2) { + location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos); + throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location2); + } + function error(message2, location2) { + location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos); + throw peg$buildSimpleError(message2, location2); + } + function peg$literalExpectation(text2, ignoreCase) { + return { type: "literal", text: text2, ignoreCase }; + } + function peg$classExpectation(parts, inverted, ignoreCase) { + return { type: "class", parts, inverted, ignoreCase }; + } + function peg$anyExpectation() { + return { type: "any" }; + } + function peg$endExpectation() { + return { type: "end" }; + } + function peg$otherExpectation(description) { + return { type: "other", description }; + } + function peg$computePosDetails(pos) { + var details = peg$posDetailsCache[pos], p; + if (details) { + return details; + } else { + p = pos - 1; + while (!peg$posDetailsCache[p]) { + p--; + } + details = peg$posDetailsCache[p]; + details = { + line: details.line, + column: details.column + }; + while (p < pos) { + if (input.charCodeAt(p) === 10) { + details.line++; + details.column = 1; + } else { + details.column++; + } + p++; + } + peg$posDetailsCache[pos] = details; + return details; + } + } + function peg$computeLocation(startPos, endPos) { + var startPosDetails = peg$computePosDetails(startPos), endPosDetails = peg$computePosDetails(endPos); + return { + start: { + offset: startPos, + line: startPosDetails.line, + column: startPosDetails.column + }, + end: { + offset: endPos, + line: endPosDetails.line, + column: endPosDetails.column + } + }; + } + function peg$fail(expected2) { + if (peg$currPos < peg$maxFailPos) { + return; + } + if (peg$currPos > peg$maxFailPos) { + peg$maxFailPos = peg$currPos; + peg$maxFailExpected = []; + } + peg$maxFailExpected.push(expected2); + } + function peg$buildSimpleError(message2, location2) { + return new peg$SyntaxError(message2, null, null, location2); + } + function peg$buildStructuredError(expected2, found, location2) { + return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected2, found), expected2, found, location2); + } + function peg$parseStart() { + var s0, s1; + s0 = peg$currPos; + s1 = peg$parseShellLine(); + if (s1 === peg$FAILED) { + s1 = null; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c0(s1); + } + s0 = s1; + return s0; + } + function peg$parseShellLine() { + var s0, s1, s2, s3, s4; + s0 = peg$currPos; + s1 = peg$parseCommandLine(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseS(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseS(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseShellLineType(); + if (s3 !== peg$FAILED) { + s4 = peg$parseShellLineThen(); + if (s4 === peg$FAILED) { + s4 = null; + } + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c1(s1, s3, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseCommandLine(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseS(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseS(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseShellLineType(); + if (s3 === peg$FAILED) { + s3 = null; + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c2(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + return s0; + } + function peg$parseShellLineThen() { + var s0, s1, s2, s3, s4; + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + s2 = peg$parseShellLine(); + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseS(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseS(); + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c3(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseShellLineType() { + var s0; + if (input.charCodeAt(peg$currPos) === 59) { + s0 = peg$c4; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c5); + } + } + return s0; + } + function peg$parseCommandLine() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = peg$parseCommandChain(); + if (s1 !== peg$FAILED) { + s2 = peg$parseCommandLineThen(); + if (s2 === peg$FAILED) { + s2 = null; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c6(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseCommandLineThen() { + var s0, s1, s2, s3, s4, s5, s6; + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + s2 = peg$parseCommandLineType(); + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseS(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseS(); + } + if (s3 !== peg$FAILED) { + s4 = peg$parseCommandLine(); + if (s4 !== peg$FAILED) { + s5 = []; + s6 = peg$parseS(); + while (s6 !== peg$FAILED) { + s5.push(s6); + s6 = peg$parseS(); + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c7(s2, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseCommandLineType() { + var s0; + if (input.substr(peg$currPos, 2) === peg$c8) { + s0 = peg$c8; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c9); + } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c10) { + s0 = peg$c10; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c11); + } + } + } + return s0; + } + function peg$parseCommandChain() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = peg$parseCommand(); + if (s1 !== peg$FAILED) { + s2 = peg$parseCommandChainThen(); + if (s2 === peg$FAILED) { + s2 = null; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c12(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseCommandChainThen() { + var s0, s1, s2, s3, s4, s5, s6; + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + s2 = peg$parseCommandChainType(); + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseS(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseS(); + } + if (s3 !== peg$FAILED) { + s4 = peg$parseCommandChain(); + if (s4 !== peg$FAILED) { + s5 = []; + s6 = peg$parseS(); + while (s6 !== peg$FAILED) { + s5.push(s6); + s6 = peg$parseS(); + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c13(s2, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseCommandChainType() { + var s0; + if (input.substr(peg$currPos, 2) === peg$c14) { + s0 = peg$c14; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c15); + } + } + if (s0 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 124) { + s0 = peg$c16; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c17); + } + } + } + return s0; + } + function peg$parseVariableAssignment() { + var s0, s1, s2, s3, s4, s5; + s0 = peg$currPos; + s1 = peg$parseEnvVariable(); + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 61) { + s2 = peg$c18; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c19); + } + } + if (s2 !== peg$FAILED) { + s3 = peg$parseStrictValueArgument(); + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parseS(); + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parseS(); + } + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c20(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseEnvVariable(); + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 61) { + s2 = peg$c18; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c19); + } + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseS(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseS(); + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c21(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + return s0; + } + function peg$parseCommand() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10; + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 40) { + s2 = peg$c22; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c23); + } + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseS(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseS(); + } + if (s3 !== peg$FAILED) { + s4 = peg$parseShellLine(); + if (s4 !== peg$FAILED) { + s5 = []; + s6 = peg$parseS(); + while (s6 !== peg$FAILED) { + s5.push(s6); + s6 = peg$parseS(); + } + if (s5 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 41) { + s6 = peg$c24; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c25); + } + } + if (s6 !== peg$FAILED) { + s7 = []; + s8 = peg$parseS(); + while (s8 !== peg$FAILED) { + s7.push(s8); + s8 = peg$parseS(); + } + if (s7 !== peg$FAILED) { + s8 = []; + s9 = peg$parseRedirectArgument(); + while (s9 !== peg$FAILED) { + s8.push(s9); + s9 = peg$parseRedirectArgument(); + } + if (s8 !== peg$FAILED) { + s9 = []; + s10 = peg$parseS(); + while (s10 !== peg$FAILED) { + s9.push(s10); + s10 = peg$parseS(); + } + if (s9 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c26(s4, s8); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 123) { + s2 = peg$c27; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c28); + } + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseS(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseS(); + } + if (s3 !== peg$FAILED) { + s4 = peg$parseShellLine(); + if (s4 !== peg$FAILED) { + s5 = []; + s6 = peg$parseS(); + while (s6 !== peg$FAILED) { + s5.push(s6); + s6 = peg$parseS(); + } + if (s5 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s6 = peg$c29; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c30); + } + } + if (s6 !== peg$FAILED) { + s7 = []; + s8 = peg$parseS(); + while (s8 !== peg$FAILED) { + s7.push(s8); + s8 = peg$parseS(); + } + if (s7 !== peg$FAILED) { + s8 = []; + s9 = peg$parseRedirectArgument(); + while (s9 !== peg$FAILED) { + s8.push(s9); + s9 = peg$parseRedirectArgument(); + } + if (s8 !== peg$FAILED) { + s9 = []; + s10 = peg$parseS(); + while (s10 !== peg$FAILED) { + s9.push(s10); + s10 = peg$parseS(); + } + if (s9 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c31(s4, s8); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseVariableAssignment(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseVariableAssignment(); + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseS(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseS(); + } + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parseArgument(); + if (s5 !== peg$FAILED) { + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parseArgument(); + } + } else { + s4 = peg$FAILED; + } + if (s4 !== peg$FAILED) { + s5 = []; + s6 = peg$parseS(); + while (s6 !== peg$FAILED) { + s5.push(s6); + s6 = peg$parseS(); + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c32(s2, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseVariableAssignment(); + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseVariableAssignment(); + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseS(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseS(); + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c33(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + } + return s0; + } + function peg$parseCommandString() { + var s0, s1, s2, s3, s4; + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseValueArgument(); + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseValueArgument(); + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseS(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseS(); + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c34(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseArgument() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + s2 = peg$parseRedirectArgument(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c35(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + s2 = peg$parseValueArgument(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c35(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + return s0; + } + function peg$parseRedirectArgument() { + var s0, s1, s2, s3; + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + s2 = peg$parseRedirectType(); + if (s2 !== peg$FAILED) { + s3 = peg$parseValueArgument(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c36(s2, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseRedirectType() { + var s0; + if (input.substr(peg$currPos, 2) === peg$c37) { + s0 = peg$c37; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c38); + } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c39) { + s0 = peg$c39; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c40); + } + } + if (s0 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 62) { + s0 = peg$c41; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c42); + } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 3) === peg$c43) { + s0 = peg$c43; + peg$currPos += 3; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c44); + } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c45) { + s0 = peg$c45; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c46); + } + } + if (s0 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 60) { + s0 = peg$c47; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c48); + } + } + } + } + } + } + } + return s0; + } + function peg$parseValueArgument() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + s2 = peg$parseS(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseS(); + } + if (s1 !== peg$FAILED) { + s2 = peg$parseStrictValueArgument(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c35(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseStrictValueArgument() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + s2 = peg$parseArgumentSegment(); + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseArgumentSegment(); + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c49(s1); + } + s0 = s1; + return s0; + } + function peg$parseArgumentSegment() { + var s0, s1; + s0 = peg$currPos; + s1 = peg$parseSglQuoteString(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c50(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseDblQuoteString(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c50(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsePlainString(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c50(s1); + } + s0 = s1; + } + } + return s0; + } + function peg$parseSglQuoteString() { + var s0, s1, s2, s3; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 39) { + s1 = peg$c51; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c52); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseSglQuoteStringText(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 39) { + s3 = peg$c51; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c52); + } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c53(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseDblQuoteString() { + var s0, s1, s2, s3; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 34) { + s1 = peg$c54; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c55); + } + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseDblQuoteStringSegment(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseDblQuoteStringSegment(); + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 34) { + s3 = peg$c54; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c55); + } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c56(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parsePlainString() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + s2 = peg$parsePlainStringSegment(); + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parsePlainStringSegment(); + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c56(s1); + } + s0 = s1; + return s0; + } + function peg$parseDblQuoteStringSegment() { + var s0, s1; + s0 = peg$currPos; + s1 = peg$parseArithmetic(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c57(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseSubshell(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c58(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseVariable(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c59(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseDblQuoteStringText(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c60(s1); + } + s0 = s1; + } + } + } + return s0; + } + function peg$parsePlainStringSegment() { + var s0, s1; + s0 = peg$currPos; + s1 = peg$parseArithmetic(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c61(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseSubshell(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c62(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseVariable(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c63(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseGlob(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c64(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsePlainStringText(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c60(s1); + } + s0 = s1; + } + } + } + } + return s0; + } + function peg$parseSglQuoteStringText() { + var s0, s1, s2, s3, s4; + s0 = peg$currPos; + s1 = []; + s2 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s3 = peg$c65; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c66); + } + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c67); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c68(s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 === peg$FAILED) { + if (peg$c69.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c70); + } + } + } + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s3 = peg$c65; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c66); + } + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c67); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c68(s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 === peg$FAILED) { + if (peg$c69.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c70); + } + } + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c71(s1); + } + s0 = s1; + return s0; + } + function peg$parseDblQuoteStringText() { + var s0, s1, s2, s3, s4; + s0 = peg$currPos; + s1 = []; + s2 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s3 = peg$c65; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c66); + } + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c67); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c68(s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 === peg$FAILED) { + if (peg$c72.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c73); + } + } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s3 = peg$c65; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c66); + } + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c67); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c68(s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 === peg$FAILED) { + if (peg$c72.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c73); + } + } + } + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c71(s1); + } + s0 = s1; + return s0; + } + function peg$parsePlainStringText() { + var s0, s1, s2, s3, s4; + s0 = peg$currPos; + s1 = []; + s2 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s3 = peg$c65; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c66); + } + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c67); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c68(s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 === peg$FAILED) { + s2 = peg$currPos; + s3 = peg$currPos; + peg$silentFails++; + s4 = peg$parseSpecialShellChars(); + peg$silentFails--; + if (s4 === peg$FAILED) { + s3 = void 0; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c67); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c68(s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s3 = peg$c65; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c66); + } + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c67); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c68(s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 === peg$FAILED) { + s2 = peg$currPos; + s3 = peg$currPos; + peg$silentFails++; + s4 = peg$parseSpecialShellChars(); + peg$silentFails--; + if (s4 === peg$FAILED) { + s3 = void 0; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c67); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c68(s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c71(s1); + } + s0 = s1; + return s0; + } + function peg$parseArithmeticPrimary() { + var s0, s1, s2, s3, s4, s5; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 45) { + s1 = peg$c74; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c75); + } + } + if (s1 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 43) { + s1 = peg$c76; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c77); + } + } + } + if (s1 === peg$FAILED) { + s1 = null; + } + if (s1 !== peg$FAILED) { + s2 = []; + if (peg$c78.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c79); + } + } + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + if (peg$c78.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c79); + } + } + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 46) { + s3 = peg$c80; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c81); + } + } + if (s3 !== peg$FAILED) { + s4 = []; + if (peg$c78.test(input.charAt(peg$currPos))) { + s5 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c79); + } + } + if (s5 !== peg$FAILED) { + while (s5 !== peg$FAILED) { + s4.push(s5); + if (peg$c78.test(input.charAt(peg$currPos))) { + s5 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c79); + } + } + } + } else { + s4 = peg$FAILED; + } + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c82(s1, s2, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 45) { + s1 = peg$c74; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c75); + } + } + if (s1 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 43) { + s1 = peg$c76; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c77); + } + } + } + if (s1 === peg$FAILED) { + s1 = null; + } + if (s1 !== peg$FAILED) { + s2 = []; + if (peg$c78.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c79); + } + } + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + if (peg$c78.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c79); + } + } + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c83(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseVariable(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c84(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseIdentifier(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c85(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 40) { + s1 = peg$c22; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c23); + } + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseS(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseS(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseArithmeticExpression(); + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parseS(); + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parseS(); + } + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 41) { + s5 = peg$c24; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c25); + } + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c86(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + } + } + return s0; + } + function peg$parseArithmeticTimesExpression() { + var s0, s1, s2, s3, s4, s5; + s0 = peg$currPos; + s1 = peg$parseArithmeticPrimary(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseS(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseS(); + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 42) { + s3 = peg$c87; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c88); + } + } + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parseS(); + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parseS(); + } + if (s4 !== peg$FAILED) { + s5 = peg$parseArithmeticTimesExpression(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c89(s1, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseArithmeticPrimary(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseS(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseS(); + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 47) { + s3 = peg$c90; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c91); + } + } + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parseS(); + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parseS(); + } + if (s4 !== peg$FAILED) { + s5 = peg$parseArithmeticTimesExpression(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c92(s1, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$parseArithmeticPrimary(); + } + } + return s0; + } + function peg$parseArithmeticExpression() { + var s0, s1, s2, s3, s4, s5; + s0 = peg$currPos; + s1 = peg$parseArithmeticTimesExpression(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseS(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseS(); + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 43) { + s3 = peg$c76; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c77); + } + } + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parseS(); + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parseS(); + } + if (s4 !== peg$FAILED) { + s5 = peg$parseArithmeticExpression(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c93(s1, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseArithmeticTimesExpression(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseS(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseS(); + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 45) { + s3 = peg$c74; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c75); + } + } + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parseS(); + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parseS(); + } + if (s4 !== peg$FAILED) { + s5 = peg$parseArithmeticExpression(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c94(s1, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$parseArithmeticTimesExpression(); + } + } + return s0; + } + function peg$parseArithmetic() { + var s0, s1, s2, s3, s4, s5; + s0 = peg$currPos; + if (input.substr(peg$currPos, 3) === peg$c95) { + s1 = peg$c95; + peg$currPos += 3; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c96); + } + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseS(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseS(); + } + if (s2 !== peg$FAILED) { + s3 = peg$parseArithmeticExpression(); + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parseS(); + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parseS(); + } + if (s4 !== peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c97) { + s5 = peg$c97; + peg$currPos += 2; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c98); + } + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c99(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseSubshell() { + var s0, s1, s2, s3; + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c100) { + s1 = peg$c100; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c101); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseShellLine(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 41) { + s3 = peg$c24; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c25); + } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c102(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseVariable() { + var s0, s1, s2, s3, s4, s5; + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c103) { + s1 = peg$c103; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c104); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseIdentifier(); + if (s2 !== peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c105) { + s3 = peg$c105; + peg$currPos += 2; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c106); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseCommandString(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s5 = peg$c29; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c30); + } + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c107(s2, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c103) { + s1 = peg$c103; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c104); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseIdentifier(); + if (s2 !== peg$FAILED) { + if (input.substr(peg$currPos, 3) === peg$c108) { + s3 = peg$c108; + peg$currPos += 3; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c109); + } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c110(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c103) { + s1 = peg$c103; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c104); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseIdentifier(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s3 = peg$c29; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c30); + } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c111(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 36) { + s1 = peg$c112; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c113); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseIdentifier(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c111(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + } + return s0; + } + function peg$parseGlob() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = peg$parseGlobText(); + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c114(s1); + if (s2) { + s2 = void 0; + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c115(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseGlobText() { + var s0, s1, s2, s3, s4; + s0 = peg$currPos; + s1 = []; + s2 = peg$currPos; + s3 = peg$currPos; + peg$silentFails++; + s4 = peg$parseGlobSpecialShellChars(); + peg$silentFails--; + if (s4 === peg$FAILED) { + s3 = void 0; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c67); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c68(s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$currPos; + s3 = peg$currPos; + peg$silentFails++; + s4 = peg$parseGlobSpecialShellChars(); + peg$silentFails--; + if (s4 === peg$FAILED) { + s3 = void 0; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + if (input.length > peg$currPos) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c67); + } + } + if (s4 !== peg$FAILED) { + peg$savedPos = s2; + s3 = peg$c68(s4); + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c71(s1); + } + s0 = s1; + return s0; + } + function peg$parseEnvVariable() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + if (peg$c116.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c117); + } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + if (peg$c116.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c117); + } + } + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c118(); + } + s0 = s1; + return s0; + } + function peg$parseIdentifier() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + if (peg$c119.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c120); + } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + if (peg$c119.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c120); + } + } + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c118(); + } + s0 = s1; + return s0; + } + function peg$parseSpecialShellChars() { + var s0; + if (peg$c121.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c122); + } + } + return s0; + } + function peg$parseGlobSpecialShellChars() { + var s0; + if (peg$c123.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c124); + } + } + return s0; + } + function peg$parseS() { + var s0, s1; + s0 = []; + if (peg$c125.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c126); + } + } + if (s1 !== peg$FAILED) { + while (s1 !== peg$FAILED) { + s0.push(s1); + if (peg$c125.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c126); + } + } + } + } else { + s0 = peg$FAILED; + } + return s0; + } + peg$result = peg$startRuleFunction(); + if (peg$result !== peg$FAILED && peg$currPos === input.length) { + return peg$result; + } else { + if (peg$result !== peg$FAILED && peg$currPos < input.length) { + peg$fail(peg$endExpectation()); + } + throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)); + } + } + module2.exports = { + SyntaxError: peg$SyntaxError, + parse: peg$parse + }; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/shell.js +var require_shell2 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/shell.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.parseShell = void 0; + var shell_1 = require_shell(); + function parseShell(source, options = { isGlobPattern: () => false }) { + try { + return shell_1.parse(source, options); + } catch (error) { + if (error.location) + error.message = error.message.replace(/(\.)?$/, ` (line ${error.location.start.line}, column ${error.location.start.column})$1`); + throw error; + } + } + exports2.parseShell = parseShell; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/grammars/resolution.js +var require_resolution = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/grammars/resolution.js"(exports2, module2) { + "use strict"; + function peg$subclass(child, parent) { + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + } + function peg$SyntaxError(message2, expected, found, location) { + this.message = message2; + this.expected = expected; + this.found = found; + this.location = location; + this.name = "SyntaxError"; + if (typeof Error.captureStackTrace === "function") { + Error.captureStackTrace(this, peg$SyntaxError); + } + } + peg$subclass(peg$SyntaxError, Error); + peg$SyntaxError.buildMessage = function(expected, found) { + var DESCRIBE_EXPECTATION_FNS = { + literal: function(expectation) { + return `"${literalEscape(expectation.text)}"`; + }, + "class": function(expectation) { + var escapedParts = "", i; + for (i = 0; i < expectation.parts.length; i++) + escapedParts += expectation.parts[i] instanceof Array ? `${classEscape(expectation.parts[i][0])}-${classEscape(expectation.parts[i][1])}` : classEscape(expectation.parts[i]); + return `[${expectation.inverted ? "^" : ""}${escapedParts}]`; + }, + any: function(expectation) { + return "any character"; + }, + end: function(expectation) { + return "end of input"; + }, + other: function(expectation) { + return expectation.description; + } + }; + function hex(ch) { + return ch.charCodeAt(0).toString(16).toUpperCase(); + } + function literalEscape(s) { + return s.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) { + return `\\x0${hex(ch)}`; + }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { + return `\\x${hex(ch)}`; + }); + } + function classEscape(s) { + return s.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) { + return `\\x0${hex(ch)}`; + }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { + return `\\x${hex(ch)}`; + }); + } + function describeExpectation(expectation) { + return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); + } + function describeExpected(expected2) { + var descriptions = new Array(expected2.length), i, j; + for (i = 0; i < expected2.length; i++) + descriptions[i] = describeExpectation(expected2[i]); + descriptions.sort(); + if (descriptions.length > 0) { + for (i = 1, j = 1; i < descriptions.length; i++) { + if (descriptions[i - 1] !== descriptions[i]) { + descriptions[j] = descriptions[i]; + j++; + } + } + descriptions.length = j; + } + switch (descriptions.length) { + case 1: + return descriptions[0]; + case 2: + return `${descriptions[0]} or ${descriptions[1]}`; + default: + return `${descriptions.slice(0, -1).join(", ")}, or ${descriptions[descriptions.length - 1]}`; + } + } + function describeFound(found2) { + return found2 ? `"${literalEscape(found2)}"` : "end of input"; + } + return `Expected ${describeExpected(expected)} but ${describeFound(found)} found.`; + }; + function peg$parse(input, options) { + options = options !== void 0 ? options : {}; + var peg$FAILED = {}, peg$startRuleFunctions = { resolution: peg$parseresolution }, peg$startRuleFunction = peg$parseresolution, peg$c0 = "/", peg$c1 = peg$literalExpectation("/", false), peg$c2 = function(from, descriptor) { + return { from, descriptor }; + }, peg$c3 = function(descriptor) { + return { descriptor }; + }, peg$c4 = "@", peg$c5 = peg$literalExpectation("@", false), peg$c6 = function(fullName, description) { + return { fullName, description }; + }, peg$c7 = function(fullName) { + return { fullName }; + }, peg$c8 = function() { + return text(); + }, peg$c9 = /^[^\/@]/, peg$c10 = peg$classExpectation(["/", "@"], true, false), peg$c11 = /^[^\/]/, peg$c12 = peg$classExpectation(["/"], true, false), peg$currPos = 0, peg$savedPos = 0, peg$posDetailsCache = [{ line: 1, column: 1 }], peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, peg$result; + if ("startRule" in options) { + if (!(options.startRule in peg$startRuleFunctions)) + throw new Error(`Can't start parsing from rule "${options.startRule}".`); + peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; + } + function text() { + return input.substring(peg$savedPos, peg$currPos); + } + function location() { + return peg$computeLocation(peg$savedPos, peg$currPos); + } + function expected(description, location2) { + location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos); + throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location2); + } + function error(message2, location2) { + location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos); + throw peg$buildSimpleError(message2, location2); + } + function peg$literalExpectation(text2, ignoreCase) { + return { type: "literal", text: text2, ignoreCase }; + } + function peg$classExpectation(parts, inverted, ignoreCase) { + return { type: "class", parts, inverted, ignoreCase }; + } + function peg$anyExpectation() { + return { type: "any" }; + } + function peg$endExpectation() { + return { type: "end" }; + } + function peg$otherExpectation(description) { + return { type: "other", description }; + } + function peg$computePosDetails(pos) { + var details = peg$posDetailsCache[pos], p; + if (details) { + return details; + } else { + p = pos - 1; + while (!peg$posDetailsCache[p]) + p--; + details = peg$posDetailsCache[p]; + details = { + line: details.line, + column: details.column + }; + while (p < pos) { + if (input.charCodeAt(p) === 10) { + details.line++; + details.column = 1; + } else { + details.column++; + } + p++; + } + peg$posDetailsCache[pos] = details; + return details; + } + } + function peg$computeLocation(startPos, endPos) { + var startPosDetails = peg$computePosDetails(startPos), endPosDetails = peg$computePosDetails(endPos); + return { + start: { + offset: startPos, + line: startPosDetails.line, + column: startPosDetails.column + }, + end: { + offset: endPos, + line: endPosDetails.line, + column: endPosDetails.column + } + }; + } + function peg$fail(expected2) { + if (peg$currPos < peg$maxFailPos) + return; + if (peg$currPos > peg$maxFailPos) { + peg$maxFailPos = peg$currPos; + peg$maxFailExpected = []; + } + peg$maxFailExpected.push(expected2); + } + function peg$buildSimpleError(message2, location2) { + return new peg$SyntaxError(message2, null, null, location2); + } + function peg$buildStructuredError(expected2, found, location2) { + return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected2, found), expected2, found, location2); + } + function peg$parseresolution() { + var s0, s1, s2, s3; + s0 = peg$currPos; + s1 = peg$parsespecifier(); + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 47) { + s2 = peg$c0; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c1); + } + } + if (s2 !== peg$FAILED) { + s3 = peg$parsespecifier(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c2(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsespecifier(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c3(s1); + } + s0 = s1; + } + return s0; + } + function peg$parsespecifier() { + var s0, s1, s2, s3; + s0 = peg$currPos; + s1 = peg$parsefullName(); + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 64) { + s2 = peg$c4; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c5); + } + } + if (s2 !== peg$FAILED) { + s3 = peg$parsedescription(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c6(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsefullName(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c7(s1); + } + s0 = s1; + } + return s0; + } + function peg$parsefullName() { + var s0, s1, s2, s3, s4; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 64) { + s1 = peg$c4; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c5); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseident(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 47) { + s3 = peg$c0; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c1); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseident(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c8(); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseident(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c8(); + } + s0 = s1; + } + return s0; + } + function peg$parseident() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + if (peg$c9.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c10); + } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + if (peg$c9.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c10); + } + } + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c8(); + } + s0 = s1; + return s0; + } + function peg$parsedescription() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + if (peg$c11.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c12); + } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + if (peg$c11.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c12); + } + } + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c8(); + } + s0 = s1; + return s0; + } + peg$result = peg$startRuleFunction(); + if (peg$result !== peg$FAILED && peg$currPos === input.length) { + return peg$result; + } else { + if (peg$result !== peg$FAILED && peg$currPos < input.length) + peg$fail(peg$endExpectation()); + throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)); + } + } + module2.exports = { + SyntaxError: peg$SyntaxError, + parse: peg$parse + }; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/resolution.js +var require_resolution2 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/resolution.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.stringifyResolution = exports2.parseResolution = void 0; + var resolution_1 = require_resolution(); + function parseResolution(source) { + const legacyResolution = source.match(/^\*{1,2}\/(.*)/); + if (legacyResolution) + throw new Error(`The override for '${source}' includes a glob pattern. Glob patterns have been removed since their behaviours don't match what you'd expect. Set the override to '${legacyResolution[1]}' instead.`); + try { + return resolution_1.parse(source); + } catch (error) { + if (error.location) + error.message = error.message.replace(/(\.)?$/, ` (line ${error.location.start.line}, column ${error.location.start.column})$1`); + throw error; + } + } + exports2.parseResolution = parseResolution; + function stringifyResolution(resolution) { + let str = ``; + if (resolution.from) { + str += resolution.from.fullName; + if (resolution.from.description) + str += `@${resolution.from.description}`; + str += `/`; + } + str += resolution.descriptor.fullName; + if (resolution.descriptor.description) + str += `@${resolution.descriptor.description}`; + return str; + } + exports2.stringifyResolution = stringifyResolution; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/grammars/syml.js +var require_syml = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/grammars/syml.js"(exports2, module2) { + "use strict"; + function peg$subclass(child, parent) { + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + } + function peg$SyntaxError(message2, expected, found, location) { + this.message = message2; + this.expected = expected; + this.found = found; + this.location = location; + this.name = "SyntaxError"; + if (typeof Error.captureStackTrace === "function") { + Error.captureStackTrace(this, peg$SyntaxError); + } + } + peg$subclass(peg$SyntaxError, Error); + peg$SyntaxError.buildMessage = function(expected, found) { + var DESCRIBE_EXPECTATION_FNS = { + literal: function(expectation) { + return `"${literalEscape(expectation.text)}"`; + }, + "class": function(expectation) { + var escapedParts = "", i; + for (i = 0; i < expectation.parts.length; i++) + escapedParts += expectation.parts[i] instanceof Array ? `${classEscape(expectation.parts[i][0])}-${classEscape(expectation.parts[i][1])}` : classEscape(expectation.parts[i]); + return `[${expectation.inverted ? "^" : ""}${escapedParts}]`; + }, + any: function(expectation) { + return "any character"; + }, + end: function(expectation) { + return "end of input"; + }, + other: function(expectation) { + return expectation.description; + } + }; + function hex(ch) { + return ch.charCodeAt(0).toString(16).toUpperCase(); + } + function literalEscape(s) { + return s.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) { + return `\\x0${hex(ch)}`; + }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { + return `\\x${hex(ch)}`; + }); + } + function classEscape(s) { + return s.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) { + return `\\x0${hex(ch)}`; + }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { + return `\\x${hex(ch)}`; + }); + } + function describeExpectation(expectation) { + return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); + } + function describeExpected(expected2) { + var descriptions = new Array(expected2.length), i, j; + for (i = 0; i < expected2.length; i++) + descriptions[i] = describeExpectation(expected2[i]); + descriptions.sort(); + if (descriptions.length > 0) { + for (i = 1, j = 1; i < descriptions.length; i++) { + if (descriptions[i - 1] !== descriptions[i]) { + descriptions[j] = descriptions[i]; + j++; + } + } + descriptions.length = j; + } + switch (descriptions.length) { + case 1: + return descriptions[0]; + case 2: + return `${descriptions[0]} or ${descriptions[1]}`; + default: + return `${descriptions.slice(0, -1).join(", ")}, or ${descriptions[descriptions.length - 1]}`; + } + } + function describeFound(found2) { + return found2 ? `"${literalEscape(found2)}"` : "end of input"; + } + return `Expected ${describeExpected(expected)} but ${describeFound(found)} found.`; + }; + function peg$parse(input, options) { + options = options !== void 0 ? options : {}; + var peg$FAILED = {}, peg$startRuleFunctions = { Start: peg$parseStart }, peg$startRuleFunction = peg$parseStart, peg$c0 = function(statements) { + return [].concat(...statements); + }, peg$c1 = "-", peg$c2 = peg$literalExpectation("-", false), peg$c3 = function(value) { + return value; + }, peg$c4 = function(statements) { + return Object.assign({}, ...statements); + }, peg$c5 = "#", peg$c6 = peg$literalExpectation("#", false), peg$c7 = peg$anyExpectation(), peg$c8 = function() { + return {}; + }, peg$c9 = ":", peg$c10 = peg$literalExpectation(":", false), peg$c11 = function(property, value) { + return { [property]: value }; + }, peg$c12 = ",", peg$c13 = peg$literalExpectation(",", false), peg$c14 = function(property, other) { + return other; + }, peg$c15 = function(property, others, value) { + return Object.assign({}, ...[property].concat(others).map((property2) => ({ [property2]: value }))); + }, peg$c16 = function(statements) { + return statements; + }, peg$c17 = function(expression) { + return expression; + }, peg$c18 = peg$otherExpectation("correct indentation"), peg$c19 = " ", peg$c20 = peg$literalExpectation(" ", false), peg$c21 = function(spaces) { + return spaces.length === indentLevel * INDENT_STEP; + }, peg$c22 = function(spaces) { + return spaces.length === (indentLevel + 1) * INDENT_STEP; + }, peg$c23 = function() { + indentLevel++; + return true; + }, peg$c24 = function() { + indentLevel--; + return true; + }, peg$c25 = function() { + return text(); + }, peg$c26 = peg$otherExpectation("pseudostring"), peg$c27 = /^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/, peg$c28 = peg$classExpectation(["\r", "\n", " ", " ", "?", ":", ",", "]", "[", "{", "}", "#", "&", "*", "!", "|", ">", "'", '"', "%", "@", "`", "-"], true, false), peg$c29 = /^[^\r\n\t ,\][{}:#"']/, peg$c30 = peg$classExpectation(["\r", "\n", " ", " ", ",", "]", "[", "{", "}", ":", "#", '"', "'"], true, false), peg$c31 = function() { + return text().replace(/^ *| *$/g, ""); + }, peg$c32 = "--", peg$c33 = peg$literalExpectation("--", false), peg$c34 = /^[a-zA-Z\/0-9]/, peg$c35 = peg$classExpectation([["a", "z"], ["A", "Z"], "/", ["0", "9"]], false, false), peg$c36 = /^[^\r\n\t :,]/, peg$c37 = peg$classExpectation(["\r", "\n", " ", " ", ":", ","], true, false), peg$c38 = "null", peg$c39 = peg$literalExpectation("null", false), peg$c40 = function() { + return null; + }, peg$c41 = "true", peg$c42 = peg$literalExpectation("true", false), peg$c43 = function() { + return true; + }, peg$c44 = "false", peg$c45 = peg$literalExpectation("false", false), peg$c46 = function() { + return false; + }, peg$c47 = peg$otherExpectation("string"), peg$c48 = '"', peg$c49 = peg$literalExpectation('"', false), peg$c50 = function() { + return ""; + }, peg$c51 = function(chars) { + return chars; + }, peg$c52 = function(chars) { + return chars.join(``); + }, peg$c53 = /^[^"\\\0-\x1F\x7F]/, peg$c54 = peg$classExpectation(['"', "\\", ["\0", ""], "\x7F"], true, false), peg$c55 = '\\"', peg$c56 = peg$literalExpectation('\\"', false), peg$c57 = function() { + return `"`; + }, peg$c58 = "\\\\", peg$c59 = peg$literalExpectation("\\\\", false), peg$c60 = function() { + return `\\`; + }, peg$c61 = "\\/", peg$c62 = peg$literalExpectation("\\/", false), peg$c63 = function() { + return `/`; + }, peg$c64 = "\\b", peg$c65 = peg$literalExpectation("\\b", false), peg$c66 = function() { + return `\b`; + }, peg$c67 = "\\f", peg$c68 = peg$literalExpectation("\\f", false), peg$c69 = function() { + return `\f`; + }, peg$c70 = "\\n", peg$c71 = peg$literalExpectation("\\n", false), peg$c72 = function() { + return ` +`; + }, peg$c73 = "\\r", peg$c74 = peg$literalExpectation("\\r", false), peg$c75 = function() { + return `\r`; + }, peg$c76 = "\\t", peg$c77 = peg$literalExpectation("\\t", false), peg$c78 = function() { + return ` `; + }, peg$c79 = "\\u", peg$c80 = peg$literalExpectation("\\u", false), peg$c81 = function(h1, h2, h3, h4) { + return String.fromCharCode(parseInt(`0x${h1}${h2}${h3}${h4}`)); + }, peg$c82 = /^[0-9a-fA-F]/, peg$c83 = peg$classExpectation([["0", "9"], ["a", "f"], ["A", "F"]], false, false), peg$c84 = peg$otherExpectation("blank space"), peg$c85 = /^[ \t]/, peg$c86 = peg$classExpectation([" ", " "], false, false), peg$c87 = peg$otherExpectation("white space"), peg$c88 = /^[ \t\n\r]/, peg$c89 = peg$classExpectation([" ", " ", "\n", "\r"], false, false), peg$c90 = "\r\n", peg$c91 = peg$literalExpectation("\r\n", false), peg$c92 = "\n", peg$c93 = peg$literalExpectation("\n", false), peg$c94 = "\r", peg$c95 = peg$literalExpectation("\r", false), peg$currPos = 0, peg$savedPos = 0, peg$posDetailsCache = [{ line: 1, column: 1 }], peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, peg$result; + if ("startRule" in options) { + if (!(options.startRule in peg$startRuleFunctions)) + throw new Error(`Can't start parsing from rule "${options.startRule}".`); + peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; + } + function text() { + return input.substring(peg$savedPos, peg$currPos); + } + function location() { + return peg$computeLocation(peg$savedPos, peg$currPos); + } + function expected(description, location2) { + location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos); + throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location2); + } + function error(message2, location2) { + location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos); + throw peg$buildSimpleError(message2, location2); + } + function peg$literalExpectation(text2, ignoreCase) { + return { type: "literal", text: text2, ignoreCase }; + } + function peg$classExpectation(parts, inverted, ignoreCase) { + return { type: "class", parts, inverted, ignoreCase }; + } + function peg$anyExpectation() { + return { type: "any" }; + } + function peg$endExpectation() { + return { type: "end" }; + } + function peg$otherExpectation(description) { + return { type: "other", description }; + } + function peg$computePosDetails(pos) { + var details = peg$posDetailsCache[pos], p; + if (details) { + return details; + } else { + p = pos - 1; + while (!peg$posDetailsCache[p]) + p--; + details = peg$posDetailsCache[p]; + details = { + line: details.line, + column: details.column + }; + while (p < pos) { + if (input.charCodeAt(p) === 10) { + details.line++; + details.column = 1; + } else { + details.column++; + } + p++; + } + peg$posDetailsCache[pos] = details; + return details; + } + } + function peg$computeLocation(startPos, endPos) { + var startPosDetails = peg$computePosDetails(startPos), endPosDetails = peg$computePosDetails(endPos); + return { + start: { + offset: startPos, + line: startPosDetails.line, + column: startPosDetails.column + }, + end: { + offset: endPos, + line: endPosDetails.line, + column: endPosDetails.column + } + }; + } + function peg$fail(expected2) { + if (peg$currPos < peg$maxFailPos) + return; + if (peg$currPos > peg$maxFailPos) { + peg$maxFailPos = peg$currPos; + peg$maxFailExpected = []; + } + peg$maxFailExpected.push(expected2); + } + function peg$buildSimpleError(message2, location2) { + return new peg$SyntaxError(message2, null, null, location2); + } + function peg$buildStructuredError(expected2, found, location2) { + return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected2, found), expected2, found, location2); + } + function peg$parseStart() { + var s0; + s0 = peg$parsePropertyStatements(); + return s0; + } + function peg$parseItemStatements() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + s2 = peg$parseItemStatement(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseItemStatement(); + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c0(s1); + } + s0 = s1; + return s0; + } + function peg$parseItemStatement() { + var s0, s1, s2, s3, s4; + s0 = peg$currPos; + s1 = peg$parseSamedent(); + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 45) { + s2 = peg$c1; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c2); + } + } + if (s2 !== peg$FAILED) { + s3 = peg$parseB(); + if (s3 !== peg$FAILED) { + s4 = peg$parseExpression(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c3(s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parsePropertyStatements() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + s2 = peg$parsePropertyStatement(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parsePropertyStatement(); + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c4(s1); + } + s0 = s1; + return s0; + } + function peg$parsePropertyStatement() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8; + s0 = peg$currPos; + s1 = peg$parseB(); + if (s1 === peg$FAILED) + s1 = null; + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 35) { + s3 = peg$c5; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c6); + } + } + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$currPos; + s6 = peg$currPos; + peg$silentFails++; + s7 = peg$parseEOL(); + peg$silentFails--; + if (s7 === peg$FAILED) { + s6 = void 0; + } else { + peg$currPos = s6; + s6 = peg$FAILED; + } + if (s6 !== peg$FAILED) { + if (input.length > peg$currPos) { + s7 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c7); + } + } + if (s7 !== peg$FAILED) { + s6 = [s6, s7]; + s5 = s6; + } else { + peg$currPos = s5; + s5 = peg$FAILED; + } + } else { + peg$currPos = s5; + s5 = peg$FAILED; + } + if (s5 !== peg$FAILED) { + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$currPos; + s6 = peg$currPos; + peg$silentFails++; + s7 = peg$parseEOL(); + peg$silentFails--; + if (s7 === peg$FAILED) { + s6 = void 0; + } else { + peg$currPos = s6; + s6 = peg$FAILED; + } + if (s6 !== peg$FAILED) { + if (input.length > peg$currPos) { + s7 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c7); + } + } + if (s7 !== peg$FAILED) { + s6 = [s6, s7]; + s5 = s6; + } else { + peg$currPos = s5; + s5 = peg$FAILED; + } + } else { + peg$currPos = s5; + s5 = peg$FAILED; + } + } + } else { + s4 = peg$FAILED; + } + if (s4 !== peg$FAILED) { + s3 = [s3, s4]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 === peg$FAILED) + s2 = null; + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$parseEOL_ANY(); + if (s4 !== peg$FAILED) { + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseEOL_ANY(); + } + } else { + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c8(); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseSamedent(); + if (s1 !== peg$FAILED) { + s2 = peg$parseName(); + if (s2 !== peg$FAILED) { + s3 = peg$parseB(); + if (s3 === peg$FAILED) + s3 = null; + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 58) { + s4 = peg$c9; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c10); + } + } + if (s4 !== peg$FAILED) { + s5 = peg$parseB(); + if (s5 === peg$FAILED) + s5 = null; + if (s5 !== peg$FAILED) { + s6 = peg$parseExpression(); + if (s6 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c11(s2, s6); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseSamedent(); + if (s1 !== peg$FAILED) { + s2 = peg$parseLegacyName(); + if (s2 !== peg$FAILED) { + s3 = peg$parseB(); + if (s3 === peg$FAILED) + s3 = null; + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 58) { + s4 = peg$c9; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c10); + } + } + if (s4 !== peg$FAILED) { + s5 = peg$parseB(); + if (s5 === peg$FAILED) + s5 = null; + if (s5 !== peg$FAILED) { + s6 = peg$parseExpression(); + if (s6 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c11(s2, s6); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseSamedent(); + if (s1 !== peg$FAILED) { + s2 = peg$parseLegacyName(); + if (s2 !== peg$FAILED) { + s3 = peg$parseB(); + if (s3 !== peg$FAILED) { + s4 = peg$parseLegacyLiteral(); + if (s4 !== peg$FAILED) { + s5 = []; + s6 = peg$parseEOL_ANY(); + if (s6 !== peg$FAILED) { + while (s6 !== peg$FAILED) { + s5.push(s6); + s6 = peg$parseEOL_ANY(); + } + } else { + s5 = peg$FAILED; + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c11(s2, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseSamedent(); + if (s1 !== peg$FAILED) { + s2 = peg$parseLegacyName(); + if (s2 !== peg$FAILED) { + s3 = []; + s4 = peg$currPos; + s5 = peg$parseB(); + if (s5 === peg$FAILED) + s5 = null; + if (s5 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s6 = peg$c12; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c13); + } + } + if (s6 !== peg$FAILED) { + s7 = peg$parseB(); + if (s7 === peg$FAILED) + s7 = null; + if (s7 !== peg$FAILED) { + s8 = peg$parseLegacyName(); + if (s8 !== peg$FAILED) { + peg$savedPos = s4; + s5 = peg$c14(s2, s8); + s4 = s5; + } else { + peg$currPos = s4; + s4 = peg$FAILED; + } + } else { + peg$currPos = s4; + s4 = peg$FAILED; + } + } else { + peg$currPos = s4; + s4 = peg$FAILED; + } + } else { + peg$currPos = s4; + s4 = peg$FAILED; + } + if (s4 !== peg$FAILED) { + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$currPos; + s5 = peg$parseB(); + if (s5 === peg$FAILED) + s5 = null; + if (s5 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 44) { + s6 = peg$c12; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c13); + } + } + if (s6 !== peg$FAILED) { + s7 = peg$parseB(); + if (s7 === peg$FAILED) + s7 = null; + if (s7 !== peg$FAILED) { + s8 = peg$parseLegacyName(); + if (s8 !== peg$FAILED) { + peg$savedPos = s4; + s5 = peg$c14(s2, s8); + s4 = s5; + } else { + peg$currPos = s4; + s4 = peg$FAILED; + } + } else { + peg$currPos = s4; + s4 = peg$FAILED; + } + } else { + peg$currPos = s4; + s4 = peg$FAILED; + } + } else { + peg$currPos = s4; + s4 = peg$FAILED; + } + } + } else { + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + s4 = peg$parseB(); + if (s4 === peg$FAILED) + s4 = null; + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 58) { + s5 = peg$c9; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c10); + } + } + if (s5 !== peg$FAILED) { + s6 = peg$parseB(); + if (s6 === peg$FAILED) + s6 = null; + if (s6 !== peg$FAILED) { + s7 = peg$parseExpression(); + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c15(s2, s3, s7); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + } + } + return s0; + } + function peg$parseExpression() { + var s0, s1, s2, s3, s4, s5, s6; + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$currPos; + s3 = peg$parseEOL(); + if (s3 !== peg$FAILED) { + s4 = peg$parseExtradent(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 45) { + s5 = peg$c1; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c2); + } + } + if (s5 !== peg$FAILED) { + s6 = peg$parseB(); + if (s6 !== peg$FAILED) { + s3 = [s3, s4, s5, s6]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + peg$silentFails--; + if (s2 !== peg$FAILED) { + peg$currPos = s1; + s1 = void 0; + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s2 = peg$parseEOL_ANY(); + if (s2 !== peg$FAILED) { + s3 = peg$parseIndent(); + if (s3 !== peg$FAILED) { + s4 = peg$parseItemStatements(); + if (s4 !== peg$FAILED) { + s5 = peg$parseDedent(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c16(s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseEOL(); + if (s1 !== peg$FAILED) { + s2 = peg$parseIndent(); + if (s2 !== peg$FAILED) { + s3 = peg$parsePropertyStatements(); + if (s3 !== peg$FAILED) { + s4 = peg$parseDedent(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c16(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseLiteral(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseEOL_ANY(); + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseEOL_ANY(); + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c17(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + return s0; + } + function peg$parseSamedent() { + var s0, s1, s2; + peg$silentFails++; + s0 = peg$currPos; + s1 = []; + if (input.charCodeAt(peg$currPos) === 32) { + s2 = peg$c19; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c20); + } + } + while (s2 !== peg$FAILED) { + s1.push(s2); + if (input.charCodeAt(peg$currPos) === 32) { + s2 = peg$c19; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c20); + } + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c21(s1); + if (s2) + s2 = void 0; + else + s2 = peg$FAILED; + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c18); + } + } + return s0; + } + function peg$parseExtradent() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + if (input.charCodeAt(peg$currPos) === 32) { + s2 = peg$c19; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c20); + } + } + while (s2 !== peg$FAILED) { + s1.push(s2); + if (input.charCodeAt(peg$currPos) === 32) { + s2 = peg$c19; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c20); + } + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = peg$currPos; + s2 = peg$c22(s1); + if (s2) + s2 = void 0; + else + s2 = peg$FAILED; + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseIndent() { + var s0; + peg$savedPos = peg$currPos; + s0 = peg$c23(); + if (s0) + s0 = void 0; + else + s0 = peg$FAILED; + return s0; + } + function peg$parseDedent() { + var s0; + peg$savedPos = peg$currPos; + s0 = peg$c24(); + if (s0) + s0 = void 0; + else + s0 = peg$FAILED; + return s0; + } + function peg$parseName() { + var s0; + s0 = peg$parsestring(); + if (s0 === peg$FAILED) + s0 = peg$parsepseudostring(); + return s0; + } + function peg$parseLegacyName() { + var s0, s1, s2; + s0 = peg$parsestring(); + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = []; + s2 = peg$parsepseudostringLegacy(); + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parsepseudostringLegacy(); + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c25(); + } + s0 = s1; + } + return s0; + } + function peg$parseLiteral() { + var s0; + s0 = peg$parsenull(); + if (s0 === peg$FAILED) { + s0 = peg$parseboolean(); + if (s0 === peg$FAILED) { + s0 = peg$parsestring(); + if (s0 === peg$FAILED) { + s0 = peg$parsepseudostring(); + } + } + } + return s0; + } + function peg$parseLegacyLiteral() { + var s0; + s0 = peg$parsenull(); + if (s0 === peg$FAILED) { + s0 = peg$parsestring(); + if (s0 === peg$FAILED) { + s0 = peg$parsepseudostringLegacy(); + } + } + return s0; + } + function peg$parsepseudostring() { + var s0, s1, s2, s3, s4, s5; + peg$silentFails++; + s0 = peg$currPos; + if (peg$c27.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c28); + } + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parseB(); + if (s4 === peg$FAILED) + s4 = null; + if (s4 !== peg$FAILED) { + if (peg$c29.test(input.charAt(peg$currPos))) { + s5 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c30); + } + } + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parseB(); + if (s4 === peg$FAILED) + s4 = null; + if (s4 !== peg$FAILED) { + if (peg$c29.test(input.charAt(peg$currPos))) { + s5 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c30); + } + } + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c31(); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c26); + } + } + return s0; + } + function peg$parsepseudostringLegacy() { + var s0, s1, s2, s3, s4; + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c32) { + s1 = peg$c32; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c33); + } + } + if (s1 === peg$FAILED) + s1 = null; + if (s1 !== peg$FAILED) { + if (peg$c34.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c35); + } + } + if (s2 !== peg$FAILED) { + s3 = []; + if (peg$c36.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c37); + } + } + while (s4 !== peg$FAILED) { + s3.push(s4); + if (peg$c36.test(input.charAt(peg$currPos))) { + s4 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c37); + } + } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c31(); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parsenull() { + var s0, s1; + s0 = peg$currPos; + if (input.substr(peg$currPos, 4) === peg$c38) { + s1 = peg$c38; + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c39); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c40(); + } + s0 = s1; + return s0; + } + function peg$parseboolean() { + var s0, s1; + s0 = peg$currPos; + if (input.substr(peg$currPos, 4) === peg$c41) { + s1 = peg$c41; + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c42); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c43(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 5) === peg$c44) { + s1 = peg$c44; + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c45); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c46(); + } + s0 = s1; + } + return s0; + } + function peg$parsestring() { + var s0, s1, s2, s3; + peg$silentFails++; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 34) { + s1 = peg$c48; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c49); + } + } + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 34) { + s2 = peg$c48; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c49); + } + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c50(); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 34) { + s1 = peg$c48; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c49); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parsechars(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 34) { + s3 = peg$c48; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c49); + } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c51(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c47); + } + } + return s0; + } + function peg$parsechars() { + var s0, s1, s2; + s0 = peg$currPos; + s1 = []; + s2 = peg$parsechar(); + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parsechar(); + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c52(s1); + } + s0 = s1; + return s0; + } + function peg$parsechar() { + var s0, s1, s2, s3, s4, s5; + if (peg$c53.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c54); + } + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c55) { + s1 = peg$c55; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c56); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c57(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c58) { + s1 = peg$c58; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c59); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c60(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c61) { + s1 = peg$c61; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c62); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c63(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c64) { + s1 = peg$c64; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c65); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c66(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c67) { + s1 = peg$c67; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c68); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c69(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c70) { + s1 = peg$c70; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c71); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c72(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c73) { + s1 = peg$c73; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c74); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c75(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c76) { + s1 = peg$c76; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c77); + } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c78(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c79) { + s1 = peg$c79; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c80); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parsehexDigit(); + if (s2 !== peg$FAILED) { + s3 = peg$parsehexDigit(); + if (s3 !== peg$FAILED) { + s4 = peg$parsehexDigit(); + if (s4 !== peg$FAILED) { + s5 = peg$parsehexDigit(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c81(s2, s3, s4, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + } + } + } + } + } + } + } + return s0; + } + function peg$parsehexDigit() { + var s0; + if (peg$c82.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c83); + } + } + return s0; + } + function peg$parseB() { + var s0, s1; + peg$silentFails++; + s0 = []; + if (peg$c85.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c86); + } + } + if (s1 !== peg$FAILED) { + while (s1 !== peg$FAILED) { + s0.push(s1); + if (peg$c85.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c86); + } + } + } + } else { + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c84); + } + } + return s0; + } + function peg$parseS() { + var s0, s1; + peg$silentFails++; + s0 = []; + if (peg$c88.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c89); + } + } + if (s1 !== peg$FAILED) { + while (s1 !== peg$FAILED) { + s0.push(s1); + if (peg$c88.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c89); + } + } + } + } else { + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c87); + } + } + return s0; + } + function peg$parseEOL_ANY() { + var s0, s1, s2, s3, s4, s5; + s0 = peg$currPos; + s1 = peg$parseEOL(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parseB(); + if (s4 === peg$FAILED) + s4 = null; + if (s4 !== peg$FAILED) { + s5 = peg$parseEOL(); + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parseB(); + if (s4 === peg$FAILED) + s4 = null; + if (s4 !== peg$FAILED) { + s5 = peg$parseEOL(); + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + return s0; + } + function peg$parseEOL() { + var s0; + if (input.substr(peg$currPos, 2) === peg$c90) { + s0 = peg$c90; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c91); + } + } + if (s0 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 10) { + s0 = peg$c92; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c93); + } + } + if (s0 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 13) { + s0 = peg$c94; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c95); + } + } + } + } + return s0; + } + const INDENT_STEP = 2; + let indentLevel = 0; + peg$result = peg$startRuleFunction(); + if (peg$result !== peg$FAILED && peg$currPos === input.length) { + return peg$result; + } else { + if (peg$result !== peg$FAILED && peg$currPos < input.length) + peg$fail(peg$endExpectation()); + throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)); + } + } + module2.exports = { + SyntaxError: peg$SyntaxError, + parse: peg$parse + }; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/syml.js +var require_syml2 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/syml.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.parseSyml = exports2.stringifySyml = exports2.PreserveOrdering = void 0; + var js_yaml_1 = require_js_yaml3(); + var syml_1 = require_syml(); + var simpleStringPattern = /^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/; + var specialObjectKeys = [`__metadata`, `version`, `resolution`, `dependencies`, `peerDependencies`, `dependenciesMeta`, `peerDependenciesMeta`, `binaries`]; + var PreserveOrdering = class { + constructor(data) { + this.data = data; + } + }; + exports2.PreserveOrdering = PreserveOrdering; + function stringifyString(value) { + if (value.match(simpleStringPattern)) { + return value; + } else { + return JSON.stringify(value); + } + } + function isRemovableField(value) { + if (typeof value === `undefined`) + return true; + if (typeof value === `object` && value !== null) + return Object.keys(value).every((key) => isRemovableField(value[key])); + return false; + } + function stringifyValue(value, indentLevel, newLineIfObject) { + if (value === null) + return `null +`; + if (typeof value === `number` || typeof value === `boolean`) + return `${value.toString()} +`; + if (typeof value === `string`) + return `${stringifyString(value)} +`; + if (Array.isArray(value)) { + if (value.length === 0) + return `[] +`; + const indent = ` `.repeat(indentLevel); + const serialized = value.map((sub) => { + return `${indent}- ${stringifyValue(sub, indentLevel + 1, false)}`; + }).join(``); + return ` +${serialized}`; + } + if (typeof value === `object` && value) { + let data; + let sort; + if (value instanceof PreserveOrdering) { + data = value.data; + sort = false; + } else { + data = value; + sort = true; + } + const indent = ` `.repeat(indentLevel); + const keys = Object.keys(data); + if (sort) { + keys.sort((a, b) => { + const aIndex = specialObjectKeys.indexOf(a); + const bIndex = specialObjectKeys.indexOf(b); + if (aIndex === -1 && bIndex === -1) + return a < b ? -1 : a > b ? 1 : 0; + if (aIndex !== -1 && bIndex === -1) + return -1; + if (aIndex === -1 && bIndex !== -1) + return 1; + return aIndex - bIndex; + }); + } + const fields = keys.filter((key) => { + return !isRemovableField(data[key]); + }).map((key, index) => { + const value2 = data[key]; + const stringifiedKey = stringifyString(key); + const stringifiedValue = stringifyValue(value2, indentLevel + 1, true); + const recordIndentation = index > 0 || newLineIfObject ? indent : ``; + if (stringifiedValue.startsWith(` +`)) { + return `${recordIndentation}${stringifiedKey}:${stringifiedValue}`; + } else { + return `${recordIndentation}${stringifiedKey}: ${stringifiedValue}`; + } + }).join(indentLevel === 0 ? ` +` : ``) || ` +`; + if (!newLineIfObject) { + return `${fields}`; + } else { + return ` +${fields}`; + } + } + throw new Error(`Unsupported value type (${value})`); + } + function stringifySyml(value) { + try { + const stringified = stringifyValue(value, 0, false); + return stringified !== ` +` ? stringified : ``; + } catch (error) { + if (error.location) + error.message = error.message.replace(/(\.)?$/, ` (line ${error.location.start.line}, column ${error.location.start.column})$1`); + throw error; + } + } + exports2.stringifySyml = stringifySyml; + stringifySyml.PreserveOrdering = PreserveOrdering; + function parseViaPeg(source) { + if (!source.endsWith(` +`)) + source += ` +`; + return syml_1.parse(source); + } + var LEGACY_REGEXP = /^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i; + function parseViaJsYaml(source) { + if (LEGACY_REGEXP.test(source)) + return parseViaPeg(source); + const value = js_yaml_1.safeLoad(source, { + schema: js_yaml_1.FAILSAFE_SCHEMA + }); + if (value === void 0 || value === null) + return {}; + if (typeof value !== `object`) + throw new Error(`Expected an indexed object, got a ${typeof value} instead. Does your file follow Yaml's rules?`); + if (Array.isArray(value)) + throw new Error(`Expected an indexed object, got an array instead. Does your file follow Yaml's rules?`); + return value; + } + function parseSyml(source) { + return parseViaJsYaml(source); + } + exports2.parseSyml = parseSyml; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/index.js +var require_lib77 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+parsers@2.3.0/node_modules/@yarnpkg/parsers/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.stringifySyml = exports2.parseSyml = exports2.stringifyResolution = exports2.parseResolution = exports2.parseShell = void 0; + var shell_1 = require_shell2(); + Object.defineProperty(exports2, "parseShell", { enumerable: true, get: function() { + return shell_1.parseShell; + } }); + var resolution_1 = require_resolution2(); + Object.defineProperty(exports2, "parseResolution", { enumerable: true, get: function() { + return resolution_1.parseResolution; + } }); + Object.defineProperty(exports2, "stringifyResolution", { enumerable: true, get: function() { + return resolution_1.stringifyResolution; + } }); + var syml_1 = require_syml2(); + Object.defineProperty(exports2, "parseSyml", { enumerable: true, get: function() { + return syml_1.parseSyml; + } }); + Object.defineProperty(exports2, "stringifySyml", { enumerable: true, get: function() { + return syml_1.stringifySyml; + } }); + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+shell@2.4.1/node_modules/@yarnpkg/shell/lib/errors.js +var require_errors5 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+shell@2.4.1/node_modules/@yarnpkg/shell/lib/errors.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ShellError = void 0; + var ShellError = class extends Error { + constructor(message2) { + super(message2); + this.name = `ShellError`; + } + }; + exports2.ShellError = ShellError; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+shell@2.4.1/node_modules/@yarnpkg/shell/lib/globUtils.js +var require_globUtils = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+shell@2.4.1/node_modules/@yarnpkg/shell/lib/globUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isBraceExpansion = exports2.match = exports2.isGlobPattern = exports2.fastGlobOptions = exports2.micromatchOptions = void 0; + var tslib_1 = require_tslib(); + var fslib_1 = require_lib76(); + var fast_glob_1 = tslib_1.__importDefault(require_out4()); + var fs_1 = tslib_1.__importDefault(require("fs")); + var micromatch_1 = tslib_1.__importDefault(require_micromatch()); + exports2.micromatchOptions = { + strictBrackets: true + }; + exports2.fastGlobOptions = { + onlyDirectories: false, + onlyFiles: false + }; + function isGlobPattern(pattern) { + if (!micromatch_1.default.scan(pattern, exports2.micromatchOptions).isGlob) + return false; + try { + micromatch_1.default.parse(pattern, exports2.micromatchOptions); + } catch (_a) { + return false; + } + return true; + } + exports2.isGlobPattern = isGlobPattern; + function match(pattern, { cwd, baseFs }) { + return fast_glob_1.default(pattern, { + ...exports2.fastGlobOptions, + cwd: fslib_1.npath.fromPortablePath(cwd), + fs: fslib_1.extendFs(fs_1.default, new fslib_1.PosixFS(baseFs)) + }); + } + exports2.match = match; + function isBraceExpansion(pattern) { + return micromatch_1.default.scan(pattern, exports2.micromatchOptions).isBrace; + } + exports2.isBraceExpansion = isBraceExpansion; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+shell@2.4.1/node_modules/@yarnpkg/shell/lib/pipe.js +var require_pipe4 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+shell@2.4.1/node_modules/@yarnpkg/shell/lib/pipe.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.start = exports2.Handle = exports2.ProtectedStream = exports2.makeBuiltin = exports2.makeProcess = exports2.Pipe = void 0; + var tslib_1 = require_tslib(); + var cross_spawn_1 = tslib_1.__importDefault(require_cross_spawn()); + var stream_1 = require("stream"); + var Pipe; + (function(Pipe2) { + Pipe2[Pipe2["STDIN"] = 0] = "STDIN"; + Pipe2[Pipe2["STDOUT"] = 1] = "STDOUT"; + Pipe2[Pipe2["STDERR"] = 2] = "STDERR"; + })(Pipe = exports2.Pipe || (exports2.Pipe = {})); + function sigintHandler() { + } + var sigintRefCount = 0; + function makeProcess(name, args2, opts, spawnOpts) { + return (stdio) => { + const stdin = stdio[0] instanceof stream_1.Transform ? `pipe` : stdio[0]; + const stdout = stdio[1] instanceof stream_1.Transform ? `pipe` : stdio[1]; + const stderr = stdio[2] instanceof stream_1.Transform ? `pipe` : stdio[2]; + const child = cross_spawn_1.default(name, args2, { ...spawnOpts, stdio: [ + stdin, + stdout, + stderr + ] }); + if (sigintRefCount++ === 0) + process.on(`SIGINT`, sigintHandler); + if (stdio[0] instanceof stream_1.Transform) + stdio[0].pipe(child.stdin); + if (stdio[1] instanceof stream_1.Transform) + child.stdout.pipe(stdio[1], { end: false }); + if (stdio[2] instanceof stream_1.Transform) + child.stderr.pipe(stdio[2], { end: false }); + return { + stdin: child.stdin, + promise: new Promise((resolve) => { + child.on(`error`, (error) => { + if (--sigintRefCount === 0) + process.off(`SIGINT`, sigintHandler); + switch (error.code) { + case `ENOENT`: + { + stdio[2].write(`command not found: ${name} +`); + resolve(127); + } + break; + case `EACCES`: + { + stdio[2].write(`permission denied: ${name} +`); + resolve(128); + } + break; + default: + { + stdio[2].write(`uncaught error: ${error.message} +`); + resolve(1); + } + break; + } + }); + child.on(`exit`, (code) => { + if (--sigintRefCount === 0) + process.off(`SIGINT`, sigintHandler); + if (code !== null) { + resolve(code); + } else { + resolve(129); + } + }); + }) + }; + }; + } + exports2.makeProcess = makeProcess; + function makeBuiltin(builtin) { + return (stdio) => { + const stdin = stdio[0] === `pipe` ? new stream_1.PassThrough() : stdio[0]; + return { + stdin, + promise: Promise.resolve().then(() => builtin({ + stdin, + stdout: stdio[1], + stderr: stdio[2] + })) + }; + }; + } + exports2.makeBuiltin = makeBuiltin; + var ProtectedStream = class { + constructor(stream) { + this.stream = stream; + } + close() { + } + get() { + return this.stream; + } + }; + exports2.ProtectedStream = ProtectedStream; + var PipeStream = class { + constructor() { + this.stream = null; + } + close() { + if (this.stream === null) { + throw new Error(`Assertion failed: No stream attached`); + } else { + this.stream.end(); + } + } + attach(stream) { + this.stream = stream; + } + get() { + if (this.stream === null) { + throw new Error(`Assertion failed: No stream attached`); + } else { + return this.stream; + } + } + }; + var Handle = class { + constructor(ancestor, implementation) { + this.stdin = null; + this.stdout = null; + this.stderr = null; + this.pipe = null; + this.ancestor = ancestor; + this.implementation = implementation; + } + static start(implementation, { stdin, stdout, stderr }) { + const chain = new Handle(null, implementation); + chain.stdin = stdin; + chain.stdout = stdout; + chain.stderr = stderr; + return chain; + } + pipeTo(implementation, source = Pipe.STDOUT) { + const next = new Handle(this, implementation); + const pipe = new PipeStream(); + next.pipe = pipe; + next.stdout = this.stdout; + next.stderr = this.stderr; + if ((source & Pipe.STDOUT) === Pipe.STDOUT) + this.stdout = pipe; + else if (this.ancestor !== null) + this.stderr = this.ancestor.stdout; + if ((source & Pipe.STDERR) === Pipe.STDERR) + this.stderr = pipe; + else if (this.ancestor !== null) + this.stderr = this.ancestor.stderr; + return next; + } + async exec() { + const stdio = [ + `ignore`, + `ignore`, + `ignore` + ]; + if (this.pipe) { + stdio[0] = `pipe`; + } else { + if (this.stdin === null) { + throw new Error(`Assertion failed: No input stream registered`); + } else { + stdio[0] = this.stdin.get(); + } + } + let stdoutLock; + if (this.stdout === null) { + throw new Error(`Assertion failed: No output stream registered`); + } else { + stdoutLock = this.stdout; + stdio[1] = stdoutLock.get(); + } + let stderrLock; + if (this.stderr === null) { + throw new Error(`Assertion failed: No error stream registered`); + } else { + stderrLock = this.stderr; + stdio[2] = stderrLock.get(); + } + const child = this.implementation(stdio); + if (this.pipe) + this.pipe.attach(child.stdin); + return await child.promise.then((code) => { + stdoutLock.close(); + stderrLock.close(); + return code; + }); + } + async run() { + const promises = []; + for (let handle = this; handle; handle = handle.ancestor) + promises.push(handle.exec()); + const exitCodes = await Promise.all(promises); + return exitCodes[0]; + } + }; + exports2.Handle = Handle; + function start(p, opts) { + return Handle.start(p, opts); + } + exports2.start = start; + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+shell@2.4.1/node_modules/@yarnpkg/shell/lib/index.js +var require_lib78 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+shell@2.4.1/node_modules/@yarnpkg/shell/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.execute = exports2.ShellError = exports2.globUtils = void 0; + var tslib_1 = require_tslib(); + var fslib_1 = require_lib76(); + var parsers_1 = require_lib77(); + var os_1 = require("os"); + var stream_1 = require("stream"); + var errors_1 = require_errors5(); + Object.defineProperty(exports2, "ShellError", { enumerable: true, get: function() { + return errors_1.ShellError; + } }); + var globUtils = tslib_1.__importStar(require_globUtils()); + exports2.globUtils = globUtils; + var pipe_1 = require_pipe4(); + var pipe_2 = require_pipe4(); + var StreamType; + (function(StreamType2) { + StreamType2[StreamType2["Readable"] = 1] = "Readable"; + StreamType2[StreamType2["Writable"] = 2] = "Writable"; + })(StreamType || (StreamType = {})); + function getFileDescriptorStream(fd, type, state) { + const stream = new stream_1.PassThrough({ autoDestroy: true }); + switch (fd) { + case pipe_2.Pipe.STDIN: + { + if ((type & StreamType.Readable) === StreamType.Readable) + state.stdin.pipe(stream, { end: false }); + if ((type & StreamType.Writable) === StreamType.Writable && state.stdin instanceof stream_1.Writable) { + stream.pipe(state.stdin, { end: false }); + } + } + break; + case pipe_2.Pipe.STDOUT: + { + if ((type & StreamType.Readable) === StreamType.Readable) + state.stdout.pipe(stream, { end: false }); + if ((type & StreamType.Writable) === StreamType.Writable) { + stream.pipe(state.stdout, { end: false }); + } + } + break; + case pipe_2.Pipe.STDERR: + { + if ((type & StreamType.Readable) === StreamType.Readable) + state.stderr.pipe(stream, { end: false }); + if ((type & StreamType.Writable) === StreamType.Writable) { + stream.pipe(state.stderr, { end: false }); + } + } + break; + default: { + throw new errors_1.ShellError(`Bad file descriptor: "${fd}"`); + } + } + return stream; + } + function cloneState(state, mergeWith = {}) { + const newState = { ...state, ...mergeWith }; + newState.environment = { ...state.environment, ...mergeWith.environment }; + newState.variables = { ...state.variables, ...mergeWith.variables }; + return newState; + } + var BUILTINS = new Map([ + [`cd`, async ([target = os_1.homedir(), ...rest], opts, state) => { + const resolvedTarget = fslib_1.ppath.resolve(state.cwd, fslib_1.npath.toPortablePath(target)); + const stat = await opts.baseFs.statPromise(resolvedTarget); + if (!stat.isDirectory()) { + state.stderr.write(`cd: not a directory +`); + return 1; + } else { + state.cwd = resolvedTarget; + return 0; + } + }], + [`pwd`, async (args2, opts, state) => { + state.stdout.write(`${fslib_1.npath.fromPortablePath(state.cwd)} +`); + return 0; + }], + [`:`, async (args2, opts, state) => { + return 0; + }], + [`true`, async (args2, opts, state) => { + return 0; + }], + [`false`, async (args2, opts, state) => { + return 1; + }], + [`exit`, async ([code, ...rest], opts, state) => { + return state.exitCode = parseInt(code !== null && code !== void 0 ? code : state.variables[`?`], 10); + }], + [`echo`, async (args2, opts, state) => { + state.stdout.write(`${args2.join(` `)} +`); + return 0; + }], + [`__ysh_run_procedure`, async (args2, opts, state) => { + const procedure = state.procedures[args2[0]]; + const exitCode = await pipe_2.start(procedure, { + stdin: new pipe_2.ProtectedStream(state.stdin), + stdout: new pipe_2.ProtectedStream(state.stdout), + stderr: new pipe_2.ProtectedStream(state.stderr) + }).run(); + return exitCode; + }], + [`__ysh_set_redirects`, async (args2, opts, state) => { + let stdin = state.stdin; + let stdout = state.stdout; + const stderr = state.stderr; + const inputs = []; + const outputs = []; + let t = 0; + while (args2[t] !== `--`) { + const type = args2[t++]; + const count = Number(args2[t++]); + const last = t + count; + for (let u = t; u < last; ++t, ++u) { + switch (type) { + case `<`: + { + inputs.push(() => { + return opts.baseFs.createReadStream(fslib_1.ppath.resolve(state.cwd, fslib_1.npath.toPortablePath(args2[u]))); + }); + } + break; + case `<<<`: + { + inputs.push(() => { + const input = new stream_1.PassThrough(); + process.nextTick(() => { + input.write(`${args2[u]} +`); + input.end(); + }); + return input; + }); + } + break; + case `<&`: + { + inputs.push(() => getFileDescriptorStream(Number(args2[u]), StreamType.Readable, state)); + } + break; + case `>`: + case `>>`: + { + const outputPath = fslib_1.ppath.resolve(state.cwd, fslib_1.npath.toPortablePath(args2[u])); + if (outputPath === `/dev/null`) { + outputs.push(new stream_1.Writable({ + autoDestroy: true, + emitClose: true, + write(chunk, encoding, callback) { + setImmediate(callback); + } + })); + } else { + outputs.push(opts.baseFs.createWriteStream(outputPath, type === `>>` ? { flags: `a` } : void 0)); + } + } + break; + case `>&`: + { + outputs.push(getFileDescriptorStream(Number(args2[u]), StreamType.Writable, state)); + } + break; + default: { + throw new Error(`Assertion failed: Unsupported redirection type: "${type}"`); + } + } + } + } + if (inputs.length > 0) { + const pipe = new stream_1.PassThrough(); + stdin = pipe; + const bindInput = (n) => { + if (n === inputs.length) { + pipe.end(); + } else { + const input = inputs[n](); + input.pipe(pipe, { end: false }); + input.on(`end`, () => { + bindInput(n + 1); + }); + } + }; + bindInput(0); + } + if (outputs.length > 0) { + const pipe = new stream_1.PassThrough(); + stdout = pipe; + for (const output of outputs) { + pipe.pipe(output); + } + } + const exitCode = await pipe_2.start(makeCommandAction(args2.slice(t + 1), opts, state), { + stdin: new pipe_2.ProtectedStream(stdin), + stdout: new pipe_2.ProtectedStream(stdout), + stderr: new pipe_2.ProtectedStream(stderr) + }).run(); + await Promise.all(outputs.map((output) => { + return new Promise((resolve) => { + output.on(`close`, () => { + resolve(); + }); + output.end(); + }); + })); + return exitCode; + }] + ]); + async function executeBufferedSubshell(ast, opts, state) { + const chunks = []; + const stdout = new stream_1.PassThrough(); + stdout.on(`data`, (chunk) => chunks.push(chunk)); + await executeShellLine(ast, opts, cloneState(state, { stdout })); + return Buffer.concat(chunks).toString().replace(/[\r\n]+$/, ``); + } + async function applyEnvVariables(environmentSegments, opts, state) { + const envPromises = environmentSegments.map(async (envSegment) => { + const interpolatedArgs = await interpolateArguments(envSegment.args, opts, state); + return { + name: envSegment.name, + value: interpolatedArgs.join(` `) + }; + }); + const interpolatedEnvs = await Promise.all(envPromises); + return interpolatedEnvs.reduce((envs, env) => { + envs[env.name] = env.value; + return envs; + }, {}); + } + function split(raw) { + return raw.match(/[^ \r\n\t]+/g) || []; + } + async function evaluateVariable(segment, opts, state, push, pushAndClose = push) { + switch (segment.name) { + case `$`: + { + push(String(process.pid)); + } + break; + case `#`: + { + push(String(opts.args.length)); + } + break; + case `@`: + { + if (segment.quoted) { + for (const raw of opts.args) { + pushAndClose(raw); + } + } else { + for (const raw of opts.args) { + const parts = split(raw); + for (let t = 0; t < parts.length - 1; ++t) + pushAndClose(parts[t]); + push(parts[parts.length - 1]); + } + } + } + break; + case `*`: + { + const raw = opts.args.join(` `); + if (segment.quoted) { + push(raw); + } else { + for (const part of split(raw)) { + pushAndClose(part); + } + } + } + break; + case `PPID`: + { + push(String(process.ppid)); + } + break; + case `RANDOM`: + { + push(String(Math.floor(Math.random() * 32768))); + } + break; + default: + { + const argIndex = parseInt(segment.name, 10); + if (Number.isFinite(argIndex)) { + if (argIndex >= 0 && argIndex < opts.args.length) { + push(opts.args[argIndex]); + } else if (segment.defaultValue) { + push((await interpolateArguments(segment.defaultValue, opts, state)).join(` `)); + } else { + throw new errors_1.ShellError(`Unbound argument #${argIndex}`); + } + } else { + if (Object.prototype.hasOwnProperty.call(state.variables, segment.name)) { + push(state.variables[segment.name]); + } else if (Object.prototype.hasOwnProperty.call(state.environment, segment.name)) { + push(state.environment[segment.name]); + } else if (segment.defaultValue) { + push((await interpolateArguments(segment.defaultValue, opts, state)).join(` `)); + } else { + throw new errors_1.ShellError(`Unbound variable "${segment.name}"`); + } + } + } + break; + } + } + var operators = { + addition: (left, right) => left + right, + subtraction: (left, right) => left - right, + multiplication: (left, right) => left * right, + division: (left, right) => Math.trunc(left / right) + }; + async function evaluateArithmetic(arithmetic, opts, state) { + if (arithmetic.type === `number`) { + if (!Number.isInteger(arithmetic.value)) { + throw new Error(`Invalid number: "${arithmetic.value}", only integers are allowed`); + } else { + return arithmetic.value; + } + } else if (arithmetic.type === `variable`) { + const parts = []; + await evaluateVariable({ ...arithmetic, quoted: true }, opts, state, (result) => parts.push(result)); + const number = Number(parts.join(` `)); + if (Number.isNaN(number)) { + return evaluateArithmetic({ type: `variable`, name: parts.join(` `) }, opts, state); + } else { + return evaluateArithmetic({ type: `number`, value: number }, opts, state); + } + } else { + return operators[arithmetic.type](await evaluateArithmetic(arithmetic.left, opts, state), await evaluateArithmetic(arithmetic.right, opts, state)); + } + } + async function interpolateArguments(commandArgs, opts, state) { + const redirections = new Map(); + const interpolated = []; + let interpolatedSegments = []; + const push = (segment) => { + interpolatedSegments.push(segment); + }; + const close = () => { + if (interpolatedSegments.length > 0) + interpolated.push(interpolatedSegments.join(``)); + interpolatedSegments = []; + }; + const pushAndClose = (segment) => { + push(segment); + close(); + }; + const redirect = (type, target) => { + let targets = redirections.get(type); + if (typeof targets === `undefined`) + redirections.set(type, targets = []); + targets.push(target); + }; + for (const commandArg of commandArgs) { + let isGlob = false; + switch (commandArg.type) { + case `redirection`: + { + const interpolatedArgs = await interpolateArguments(commandArg.args, opts, state); + for (const interpolatedArg of interpolatedArgs) { + redirect(commandArg.subtype, interpolatedArg); + } + } + break; + case `argument`: + { + for (const segment of commandArg.segments) { + switch (segment.type) { + case `text`: + { + push(segment.text); + } + break; + case `glob`: + { + push(segment.pattern); + isGlob = true; + } + break; + case `shell`: + { + const raw = await executeBufferedSubshell(segment.shell, opts, state); + if (segment.quoted) { + push(raw); + } else { + const parts = split(raw); + for (let t = 0; t < parts.length - 1; ++t) + pushAndClose(parts[t]); + push(parts[parts.length - 1]); + } + } + break; + case `variable`: + { + await evaluateVariable(segment, opts, state, push, pushAndClose); + } + break; + case `arithmetic`: + { + push(String(await evaluateArithmetic(segment.arithmetic, opts, state))); + } + break; + } + } + } + break; + } + close(); + if (isGlob) { + const pattern = interpolated.pop(); + if (typeof pattern === `undefined`) + throw new Error(`Assertion failed: Expected a glob pattern to have been set`); + const matches = await opts.glob.match(pattern, { cwd: state.cwd, baseFs: opts.baseFs }); + if (matches.length === 0) { + const braceExpansionNotice = globUtils.isBraceExpansion(pattern) ? `. Note: Brace expansion of arbitrary strings isn't currently supported. For more details, please read this issue: https://github.com/yarnpkg/berry/issues/22` : ``; + throw new errors_1.ShellError(`No matches found: "${pattern}"${braceExpansionNotice}`); + } + for (const match of matches.sort()) { + pushAndClose(match); + } + } + } + if (redirections.size > 0) { + const redirectionArgs = []; + for (const [subtype, targets] of redirections.entries()) + redirectionArgs.splice(redirectionArgs.length, 0, subtype, String(targets.length), ...targets); + interpolated.splice(0, 0, `__ysh_set_redirects`, ...redirectionArgs, `--`); + } + return interpolated; + } + function makeCommandAction(args2, opts, state) { + if (!opts.builtins.has(args2[0])) + args2 = [`command`, ...args2]; + const nativeCwd = fslib_1.npath.fromPortablePath(state.cwd); + let env = state.environment; + if (typeof env.PWD !== `undefined`) + env = { ...env, PWD: nativeCwd }; + const [name, ...rest] = args2; + if (name === `command`) { + return pipe_1.makeProcess(rest[0], rest.slice(1), opts, { + cwd: nativeCwd, + env + }); + } + const builtin = opts.builtins.get(name); + if (typeof builtin === `undefined`) + throw new Error(`Assertion failed: A builtin should exist for "${name}"`); + return pipe_1.makeBuiltin(async ({ stdin, stdout, stderr }) => { + state.stdin = stdin; + state.stdout = stdout; + state.stderr = stderr; + return await builtin(rest, opts, state); + }); + } + function makeSubshellAction(ast, opts, state) { + return (stdio) => { + const stdin = new stream_1.PassThrough(); + const promise = executeShellLine(ast, opts, cloneState(state, { stdin })); + return { stdin, promise }; + }; + } + function makeGroupAction(ast, opts, state) { + return (stdio) => { + const stdin = new stream_1.PassThrough(); + const promise = executeShellLine(ast, opts, state); + return { stdin, promise }; + }; + } + function makeActionFromProcedure(procedure, args2, opts, activeState) { + if (args2.length === 0) { + return procedure; + } else { + let key; + do { + key = String(Math.random()); + } while (Object.prototype.hasOwnProperty.call(activeState.procedures, key)); + activeState.procedures = { ...activeState.procedures }; + activeState.procedures[key] = procedure; + return makeCommandAction([...args2, `__ysh_run_procedure`, key], opts, activeState); + } + } + async function executeCommandChain(node, opts, state) { + let current = node; + let pipeType = null; + let execution = null; + while (current) { + const activeState = current.then ? { ...state } : state; + let action; + switch (current.type) { + case `command`: + { + const args2 = await interpolateArguments(current.args, opts, state); + const environment = await applyEnvVariables(current.envs, opts, state); + action = current.envs.length ? makeCommandAction(args2, opts, cloneState(activeState, { environment })) : makeCommandAction(args2, opts, activeState); + } + break; + case `subshell`: + { + const args2 = await interpolateArguments(current.args, opts, state); + const procedure = makeSubshellAction(current.subshell, opts, activeState); + action = makeActionFromProcedure(procedure, args2, opts, activeState); + } + break; + case `group`: + { + const args2 = await interpolateArguments(current.args, opts, state); + const procedure = makeGroupAction(current.group, opts, activeState); + action = makeActionFromProcedure(procedure, args2, opts, activeState); + } + break; + case `envs`: + { + const environment = await applyEnvVariables(current.envs, opts, state); + activeState.environment = { ...activeState.environment, ...environment }; + action = makeCommandAction([`true`], opts, activeState); + } + break; + } + if (typeof action === `undefined`) + throw new Error(`Assertion failed: An action should have been generated`); + if (pipeType === null) { + execution = pipe_2.start(action, { + stdin: new pipe_2.ProtectedStream(activeState.stdin), + stdout: new pipe_2.ProtectedStream(activeState.stdout), + stderr: new pipe_2.ProtectedStream(activeState.stderr) + }); + } else { + if (execution === null) + throw new Error(`Assertion failed: The execution pipeline should have been setup`); + switch (pipeType) { + case `|`: + { + execution = execution.pipeTo(action, pipe_2.Pipe.STDOUT); + } + break; + case `|&`: + { + execution = execution.pipeTo(action, pipe_2.Pipe.STDOUT | pipe_2.Pipe.STDERR); + } + break; + } + } + if (current.then) { + pipeType = current.then.type; + current = current.then.chain; + } else { + current = null; + } + } + if (execution === null) + throw new Error(`Assertion failed: The execution pipeline should have been setup`); + return await execution.run(); + } + async function executeCommandLine(node, opts, state) { + let code; + const setCode = (newCode) => { + code = newCode; + state.variables[`?`] = String(newCode); + }; + const executeChain = async (chain) => { + try { + return await executeCommandChain(chain, opts, state); + } catch (error) { + if (!(error instanceof errors_1.ShellError)) + throw error; + state.stderr.write(`${error.message} +`); + return 1; + } + }; + setCode(await executeChain(node.chain)); + while (node.then) { + if (state.exitCode !== null) + return state.exitCode; + switch (node.then.type) { + case `&&`: + { + if (code === 0) { + setCode(await executeChain(node.then.line.chain)); + } + } + break; + case `||`: + { + if (code !== 0) { + setCode(await executeChain(node.then.line.chain)); + } + } + break; + default: + { + throw new Error(`Assertion failed: Unsupported command type: "${node.then.type}"`); + } + break; + } + node = node.then.line; + } + return code; + } + async function executeShellLine(node, opts, state) { + let rightMostExitCode = 0; + for (const command of node) { + rightMostExitCode = await executeCommandLine(command, opts, state); + if (state.exitCode !== null) + return state.exitCode; + state.variables[`?`] = String(rightMostExitCode); + } + return rightMostExitCode; + } + function locateArgsVariableInSegment(segment) { + switch (segment.type) { + case `variable`: + { + return segment.name === `@` || segment.name === `#` || segment.name === `*` || Number.isFinite(parseInt(segment.name, 10)) || `defaultValue` in segment && !!segment.defaultValue && segment.defaultValue.some((arg) => locateArgsVariableInArgument(arg)); + } + break; + case `arithmetic`: + { + return locateArgsVariableInArithmetic(segment.arithmetic); + } + break; + case `shell`: + { + return locateArgsVariable(segment.shell); + } + break; + default: + { + return false; + } + break; + } + } + function locateArgsVariableInArgument(arg) { + switch (arg.type) { + case `redirection`: + { + return arg.args.some((arg2) => locateArgsVariableInArgument(arg2)); + } + break; + case `argument`: + { + return arg.segments.some((segment) => locateArgsVariableInSegment(segment)); + } + break; + default: + throw new Error(`Assertion failed: Unsupported argument type: "${arg.type}"`); + } + } + function locateArgsVariableInArithmetic(arg) { + switch (arg.type) { + case `variable`: + { + return locateArgsVariableInSegment(arg); + } + break; + case `number`: + { + return false; + } + break; + default: + return locateArgsVariableInArithmetic(arg.left) || locateArgsVariableInArithmetic(arg.right); + } + } + function locateArgsVariable(node) { + return node.some((command) => { + while (command) { + let chain = command.chain; + while (chain) { + let hasArgs; + switch (chain.type) { + case `subshell`: + { + hasArgs = locateArgsVariable(chain.subshell); + } + break; + case `command`: + { + hasArgs = chain.envs.some((env) => env.args.some((arg) => { + return locateArgsVariableInArgument(arg); + })) || chain.args.some((arg) => { + return locateArgsVariableInArgument(arg); + }); + } + break; + } + if (hasArgs) + return true; + if (!chain.then) + break; + chain = chain.then.chain; + } + if (!command.then) + break; + command = command.then.line; + } + return false; + }); + } + async function execute(command, args2 = [], { baseFs = new fslib_1.NodeFS(), builtins = {}, cwd = fslib_1.npath.toPortablePath(process.cwd()), env = process.env, stdin = process.stdin, stdout = process.stdout, stderr = process.stderr, variables = {}, glob = globUtils } = {}) { + const normalizedEnv = {}; + for (const [key, value] of Object.entries(env)) + if (typeof value !== `undefined`) + normalizedEnv[key] = value; + const normalizedBuiltins = new Map(BUILTINS); + for (const [key, builtin] of Object.entries(builtins)) + normalizedBuiltins.set(key, builtin); + if (stdin === null) { + stdin = new stream_1.PassThrough(); + stdin.end(); + } + const ast = parsers_1.parseShell(command, glob); + if (!locateArgsVariable(ast) && ast.length > 0 && args2.length > 0) { + let command2 = ast[ast.length - 1]; + while (command2.then) + command2 = command2.then.line; + let chain = command2.chain; + while (chain.then) + chain = chain.then.chain; + if (chain.type === `command`) { + chain.args = chain.args.concat(args2.map((arg) => { + return { + type: `argument`, + segments: [{ + type: `text`, + text: arg + }] + }; + })); + } + } + return await executeShellLine(ast, { + args: args2, + baseFs, + builtins: normalizedBuiltins, + initialStdin: stdin, + initialStdout: stdout, + initialStderr: stderr, + glob + }, { + cwd, + environment: normalizedEnv, + exitCode: null, + procedures: {}, + stdin, + stdout, + stderr, + variables: Object.assign({}, variables, { + [`?`]: 0 + }) + }); + } + exports2.execute = execute; + } +}); + +// ../../node_modules/.pnpm/slide@1.1.6/node_modules/slide/lib/async-map.js +var require_async_map = __commonJS({ + "../../node_modules/.pnpm/slide@1.1.6/node_modules/slide/lib/async-map.js"(exports2, module2) { + module2.exports = asyncMap; + function asyncMap() { + var steps = Array.prototype.slice.call(arguments), list = steps.shift() || [], cb_ = steps.pop(); + if (typeof cb_ !== "function") + throw new Error("No callback provided to asyncMap"); + if (!list) + return cb_(null, []); + if (!Array.isArray(list)) + list = [list]; + var n = steps.length, data = [], errState = null, l = list.length, a = l * n; + if (!a) + return cb_(null, []); + function cb(er) { + if (er && !errState) + errState = er; + var argLen = arguments.length; + for (var i = 1; i < argLen; i++) + if (arguments[i] !== void 0) { + data[i - 1] = (data[i - 1] || []).concat(arguments[i]); + } + if (list.length > l) { + var newList = list.slice(l); + a += (list.length - l) * n; + l = list.length; + process.nextTick(function() { + newList.forEach(function(ar) { + steps.forEach(function(fn2) { + fn2(ar, cb); + }); + }); + }); + } + if (--a === 0) + cb_.apply(null, [errState].concat(data)); + } + list.forEach(function(ar) { + steps.forEach(function(fn2) { + fn2(ar, cb); + }); + }); + } + } +}); + +// ../../node_modules/.pnpm/slide@1.1.6/node_modules/slide/lib/bind-actor.js +var require_bind_actor = __commonJS({ + "../../node_modules/.pnpm/slide@1.1.6/node_modules/slide/lib/bind-actor.js"(exports2, module2) { + module2.exports = bindActor; + function bindActor() { + var args2 = Array.prototype.slice.call(arguments), obj = null, fn2; + if (typeof args2[0] === "object") { + obj = args2.shift(); + fn2 = args2.shift(); + if (typeof fn2 === "string") + fn2 = obj[fn2]; + } else + fn2 = args2.shift(); + return function(cb) { + fn2.apply(obj, args2.concat(cb)); + }; + } + } +}); + +// ../../node_modules/.pnpm/slide@1.1.6/node_modules/slide/lib/chain.js +var require_chain2 = __commonJS({ + "../../node_modules/.pnpm/slide@1.1.6/node_modules/slide/lib/chain.js"(exports2, module2) { + module2.exports = chain; + var bindActor = require_bind_actor(); + chain.first = {}; + chain.last = {}; + function chain(things, cb) { + var res = []; + (function LOOP(i, len) { + if (i >= len) + return cb(null, res); + if (Array.isArray(things[i])) + things[i] = bindActor.apply(null, things[i].map(function(i2) { + return i2 === chain.first ? res[0] : i2 === chain.last ? res[res.length - 1] : i2; + })); + if (!things[i]) + return LOOP(i + 1, len); + things[i](function(er, data) { + if (er) + return cb(er, res); + if (data !== void 0) + res = res.concat(data); + LOOP(i + 1, len); + }); + })(0, things.length); + } + } +}); + +// ../../node_modules/.pnpm/slide@1.1.6/node_modules/slide/lib/slide.js +var require_slide = __commonJS({ + "../../node_modules/.pnpm/slide@1.1.6/node_modules/slide/lib/slide.js"(exports2) { + exports2.asyncMap = require_async_map(); + exports2.bindActor = require_bind_actor(); + exports2.chain = require_chain2(); + } +}); + +// ../../node_modules/.pnpm/uid-number@0.0.6/node_modules/uid-number/uid-number.js +var require_uid_number = __commonJS({ + "../../node_modules/.pnpm/uid-number@0.0.6/node_modules/uid-number/uid-number.js"(exports2, module2) { + module2.exports = uidNumber; + var child_process = require("child_process"); + var path = require("path"); + var uidSupport = process.getuid && process.setuid; + var uidCache = {}; + var gidCache = {}; + function uidNumber(uid, gid, cb) { + if (!uidSupport) + return cb(); + if (typeof cb !== "function") + cb = gid, gid = null; + if (typeof cb !== "function") + cb = uid, uid = null; + if (gid == null) + gid = process.getgid(); + if (uid == null) + uid = process.getuid(); + if (!isNaN(gid)) + gid = gidCache[gid] = +gid; + if (!isNaN(uid)) + uid = uidCache[uid] = +uid; + if (uidCache.hasOwnProperty(uid)) + uid = uidCache[uid]; + if (gidCache.hasOwnProperty(gid)) + gid = gidCache[gid]; + if (typeof gid === "number" && typeof uid === "number") { + return process.nextTick(cb.bind(null, null, uid, gid)); + } + var getter = require.resolve("./get-uid-gid.js"); + child_process.execFile(process.execPath, [getter, uid, gid], function(code, out, stderr) { + if (code) { + var er = new Error("could not get uid/gid\n" + stderr); + er.code = code; + return cb(er); + } + try { + out = JSON.parse(out + ""); + } catch (ex) { + return cb(ex); + } + if (out.error) { + var er = new Error(out.error); + er.errno = out.errno; + return cb(er); + } + if (isNaN(out.uid) || isNaN(out.gid)) + return cb(new Error("Could not get uid/gid: " + JSON.stringify(out))); + cb(null, uidCache[uid] = +out.uid, gidCache[gid] = +out.gid); + }); + } + } +}); + +// ../../node_modules/.pnpm/umask@1.1.0/node_modules/umask/index.js +var require_umask = __commonJS({ + "../../node_modules/.pnpm/umask@1.1.0/node_modules/umask/index.js"(exports2) { + "use strict"; + var util = require("util"); + function toString(val) { + val = val.toString(8); + while (val.length < 4) { + val = "0" + val; + } + return val; + } + var defaultUmask = 18; + var defaultUmaskString = toString(defaultUmask); + function validate(data, k, val) { + if (typeof val === "number" && !isNaN(val)) { + data[k] = val; + return true; + } + if (typeof val === "string") { + if (val.charAt(0) !== "0") { + return false; + } + data[k] = parseInt(val, 8); + return true; + } + return false; + } + function convert_fromString(val, cb) { + if (typeof val === "string") { + if (val.charAt(0) === "0" && /^[0-7]+$/.test(val)) { + val = parseInt(val, 8); + } else if (val.charAt(0) !== "0" && /^[0-9]+$/.test(val)) { + val = parseInt(val, 10); + } else { + return cb(new Error(util.format("Expected octal string, got %j, defaulting to %j", val, defaultUmaskString)), defaultUmask); + } + } else if (typeof val !== "number") { + return cb(new Error(util.format("Expected number or octal string, got %j, defaulting to %j", val, defaultUmaskString)), defaultUmask); + } + val = Math.floor(val); + if (val < 0 || val > 511) { + return cb(new Error(util.format("Must be in range 0..511 (0000..0777), got %j", val)), defaultUmask); + } + cb(null, val); + } + function fromString(val, cb) { + convert_fromString(val, cb || function(err, result) { + val = result; + }); + return val; + } + exports2.toString = toString; + exports2.fromString = fromString; + exports2.validate = validate; + } +}); + +// ../../node_modules/.pnpm/byline@5.0.0/node_modules/byline/lib/byline.js +var require_byline = __commonJS({ + "../../node_modules/.pnpm/byline@5.0.0/node_modules/byline/lib/byline.js"(exports2, module2) { + var stream = require("stream"); + var util = require("util"); + var timers = require("timers"); + module2.exports = function(readStream, options) { + return module2.exports.createStream(readStream, options); + }; + module2.exports.createStream = function(readStream, options) { + if (readStream) { + return createLineStream(readStream, options); + } else { + return new LineStream(options); + } + }; + module2.exports.createLineStream = function(readStream) { + console.log("WARNING: byline#createLineStream is deprecated and will be removed soon"); + return createLineStream(readStream); + }; + function createLineStream(readStream, options) { + if (!readStream) { + throw new Error("expected readStream"); + } + if (!readStream.readable) { + throw new Error("readStream must be readable"); + } + var ls = new LineStream(options); + readStream.pipe(ls); + return ls; + } + module2.exports.LineStream = LineStream; + function LineStream(options) { + stream.Transform.call(this, options); + options = options || {}; + this._readableState.objectMode = true; + this._lineBuffer = []; + this._keepEmptyLines = options.keepEmptyLines || false; + this._lastChunkEndedWithCR = false; + var self2 = this; + this.on("pipe", function(src) { + if (!self2.encoding) { + if (src instanceof stream.Readable) { + self2.encoding = src._readableState.encoding; + } + } + }); + } + util.inherits(LineStream, stream.Transform); + LineStream.prototype._transform = function(chunk, encoding, done) { + encoding = encoding || "utf8"; + if (Buffer.isBuffer(chunk)) { + if (encoding == "buffer") { + chunk = chunk.toString(); + encoding = "utf8"; + } else { + chunk = chunk.toString(encoding); + } + } + this._chunkEncoding = encoding; + var lines = chunk.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/g); + if (this._lastChunkEndedWithCR && chunk[0] == "\n") { + lines.shift(); + } + if (this._lineBuffer.length > 0) { + this._lineBuffer[this._lineBuffer.length - 1] += lines[0]; + lines.shift(); + } + this._lastChunkEndedWithCR = chunk[chunk.length - 1] == "\r"; + this._lineBuffer = this._lineBuffer.concat(lines); + this._pushBuffer(encoding, 1, done); + }; + LineStream.prototype._pushBuffer = function(encoding, keep, done) { + while (this._lineBuffer.length > keep) { + var line = this._lineBuffer.shift(); + if (this._keepEmptyLines || line.length > 0) { + if (!this.push(this._reencode(line, encoding))) { + var self2 = this; + timers.setImmediate(function() { + self2._pushBuffer(encoding, keep, done); + }); + return; + } + } + } + done(); + }; + LineStream.prototype._flush = function(done) { + this._pushBuffer(this._chunkEncoding, 0, done); + }; + LineStream.prototype._reencode = function(line, chunkEncoding) { + if (this.encoding && this.encoding != chunkEncoding) { + return new Buffer(line, chunkEncoding).toString(this.encoding); + } else if (this.encoding) { + return line; + } else { + return new Buffer(line, chunkEncoding); + } + }; + } +}); + +// ../../node_modules/.pnpm/resolve-from@5.0.0/node_modules/resolve-from/index.js +var require_resolve_from = __commonJS({ + "../../node_modules/.pnpm/resolve-from@5.0.0/node_modules/resolve-from/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var Module = require("module"); + var fs = require("fs"); + var resolveFrom = (fromDirectory, moduleId, silent) => { + if (typeof fromDirectory !== "string") { + throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof fromDirectory}\``); + } + if (typeof moduleId !== "string") { + throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof moduleId}\``); + } + try { + fromDirectory = fs.realpathSync(fromDirectory); + } catch (error) { + if (error.code === "ENOENT") { + fromDirectory = path.resolve(fromDirectory); + } else if (silent) { + return; + } else { + throw error; + } + } + const fromFile = path.join(fromDirectory, "noop.js"); + const resolveFileName = () => Module._resolveFilename(moduleId, { + id: fromFile, + filename: fromFile, + paths: Module._nodeModulePaths(fromDirectory) + }); + if (silent) { + try { + return resolveFileName(); + } catch (error) { + return; + } + } + return resolveFileName(); + }; + module2.exports = (fromDirectory, moduleId) => resolveFrom(fromDirectory, moduleId); + module2.exports.silent = (fromDirectory, moduleId) => resolveFrom(fromDirectory, moduleId, true); + } +}); + +// ../../node_modules/.pnpm/@zkochan+npm-lifecycle@5.1.2/node_modules/@zkochan/npm-lifecycle/index.js +var require_npm_lifecycle = __commonJS({ + "../../node_modules/.pnpm/@zkochan+npm-lifecycle@5.1.2/node_modules/@zkochan/npm-lifecycle/index.js"(exports2, module2) { + "use strict"; + exports2 = module2.exports = lifecycle; + exports2.makeEnv = makeEnv; + exports2._incorrectWorkingDirectory = _incorrectWorkingDirectory; + var spawn = require_spawn(); + var { execute } = require_lib78(); + var path = require("path"); + var Stream = require("stream").Stream; + var fs = require("fs"); + var chain = require_slide().chain; + var uidNumber = require_uid_number(); + var umask = require_umask(); + var which = require_which(); + var byline = require_byline(); + var resolveFrom = require_resolve_from(); + var { PassThrough } = require("stream"); + var DEFAULT_NODE_GYP_PATH; + try { + DEFAULT_NODE_GYP_PATH = resolveFrom(__dirname, "node-gyp/bin/node-gyp"); + } catch (err) { + } + var hookStatCache = new Map(); + var PATH = "PATH"; + if (process.platform === "win32") { + PATH = "Path"; + Object.keys(process.env).forEach((e) => { + if (e.match(/^PATH$/i)) { + PATH = e; + } + }); + } + function logid(pkg, stage) { + return `${pkg._id}~${stage}:`; + } + function hookStat(dir, stage, cb) { + const hook = path.join(dir, ".hooks", stage); + const cachedStatError = hookStatCache.get(hook); + if (cachedStatError === void 0) { + return fs.stat(hook, (statError) => { + hookStatCache.set(hook, statError); + cb(statError); + }); + } + return setImmediate(() => cb(cachedStatError)); + } + function lifecycle(pkg, stage, wd, opts) { + return new Promise((resolve, reject) => { + while (pkg && pkg._data) + pkg = pkg._data; + if (!pkg) + return reject(new Error("Invalid package data")); + opts.log.info("lifecycle", logid(pkg, stage), pkg._id); + if (!pkg.scripts) + pkg.scripts = {}; + if (stage === "prepublish" && opts.ignorePrepublish) { + opts.log.info("lifecycle", logid(pkg, stage), "ignored because ignore-prepublish is set to true", pkg._id); + delete pkg.scripts.prepublish; + } + hookStat(opts.dir, stage, (statError) => { + if (!pkg.scripts[stage] && statError) + return resolve(); + validWd(wd || path.resolve(opts.dir, pkg.name), (er, wd2) => { + if (er) + return reject(er); + if ((wd2.indexOf(opts.dir) !== 0 || _incorrectWorkingDirectory(wd2, pkg)) && !opts.unsafePerm && pkg.scripts[stage]) { + opts.log.warn(`"${stage}" script of "${pkg._id}" inside "${wd2}" is skipped as the working directory seems suspicious. To run this lifecycle script anyway, use "--unsafe-perm".`); + return resolve(); + } + const env = makeEnv(pkg, opts); + env.npm_lifecycle_event = stage; + env.npm_node_execpath = env.NODE = env.NODE || process.execPath; + if (process.pkg != null) { + env.npm_execpath = process.execPath; + } else { + env.npm_execpath = require.main ? require.main.filename : process.cwd(); + } + env.INIT_CWD = process.cwd(); + env.npm_config_node_gyp = env.npm_config_node_gyp || DEFAULT_NODE_GYP_PATH; + if (opts.extraEnv) { + for (const [key, value] of Object.entries(opts.extraEnv)) { + env[key] = value; + } + } + if (!opts.unsafePerm) + env.TMPDIR = wd2; + lifecycle_(pkg, stage, wd2, opts, env, (er2) => { + if (er2) + return reject(er2); + return resolve(); + }); + }); + }); + }); + } + function _incorrectWorkingDirectory(wd, pkg) { + return wd.lastIndexOf(pkg.name) !== wd.length - pkg.name.length; + } + function lifecycle_(pkg, stage, wd, opts, env, cb) { + const pathArr = [...opts.extraBinPaths || []]; + const p = wd.split(/[\\/]node_modules[\\/]/); + let acc = path.resolve(p.shift()); + p.forEach((pp) => { + pathArr.unshift(path.join(acc, "node_modules", ".bin")); + acc = path.join(acc, "node_modules", pp); + }); + pathArr.unshift(path.join(acc, "node_modules", ".bin")); + pathArr.unshift(path.join(__dirname, "node-gyp-bin")); + if (shouldPrependCurrentNodeDirToPATH(opts)) { + pathArr.push(path.dirname(process.execPath)); + } + if (env[PATH]) + pathArr.push(env[PATH]); + env[PATH] = pathArr.join(process.platform === "win32" ? ";" : ":"); + let packageLifecycle = pkg.scripts && pkg.scripts.hasOwnProperty(stage); + if (opts.ignoreScripts) { + opts.log.info("lifecycle", logid(pkg, stage), "ignored because ignore-scripts is set to true", pkg._id); + packageLifecycle = false; + } else if (packageLifecycle) { + env.npm_lifecycle_script = pkg.scripts[stage]; + } else { + opts.log.silly("lifecycle", logid(pkg, stage), `no script for ${stage}, continuing`); + } + function done(er) { + if (er) { + if (opts.force) { + opts.log.info("lifecycle", logid(pkg, stage), "forced, continuing", er); + er = null; + } else if (opts.failOk) { + opts.log.warn("lifecycle", logid(pkg, stage), "continuing anyway", er.message); + er = null; + } + } + cb(er); + } + chain([ + packageLifecycle && [runPackageLifecycle, pkg, stage, env, wd, opts], + [runHookLifecycle, pkg, stage, env, wd, opts] + ], done); + } + function shouldPrependCurrentNodeDirToPATH(opts) { + const cfgsetting = opts.scriptsPrependNodePath; + if (cfgsetting === false) + return false; + if (cfgsetting === true) + return true; + let isDifferentNodeInPath; + const isWindows = process.platform === "win32"; + let foundExecPath; + try { + foundExecPath = which.sync(path.basename(process.execPath), { pathExt: isWindows ? ";" : ":" }); + isDifferentNodeInPath = fs.realpathSync(process.execPath).toUpperCase() !== fs.realpathSync(foundExecPath).toUpperCase(); + } catch (e) { + isDifferentNodeInPath = true; + } + if (cfgsetting === "warn-only") { + if (isDifferentNodeInPath && !shouldPrependCurrentNodeDirToPATH.hasWarned) { + if (foundExecPath) { + opts.log.warn("lifecycle", "The node binary used for scripts is", foundExecPath, "but npm is using", process.execPath, "itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with."); + } else { + opts.log.warn("lifecycle", "npm is using", process.execPath, "but there is no node binary in the current PATH. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with."); + } + shouldPrependCurrentNodeDirToPATH.hasWarned = true; + } + return false; + } + return isDifferentNodeInPath; + } + function validWd(d, cb) { + fs.stat(d, (er, st) => { + if (er || !st.isDirectory()) { + const p = path.dirname(d); + if (p === d) { + return cb(new Error("Could not find suitable wd")); + } + return validWd(p, cb); + } + return cb(null, d); + }); + } + function runPackageLifecycle(pkg, stage, env, wd, opts, cb) { + const cmd = env.npm_lifecycle_script; + const note = ` +> ${pkg._id} ${stage} ${wd} +> ${cmd} +`; + runCmd(note, cmd, pkg, env, stage, wd, opts, cb); + } + var running = false; + var queue = []; + function dequeue() { + running = false; + if (queue.length) { + const r = queue.shift(); + runCmd.apply(null, r); + } + } + function runCmd(note, cmd, pkg, env, stage, wd, opts, cb) { + if (opts.runConcurrently !== true) { + if (running) { + queue.push([note, cmd, pkg, env, stage, wd, opts, cb]); + return; + } + running = true; + } + opts.log.pause(); + let unsafe = opts.unsafePerm; + const user = unsafe ? null : opts.user; + const group = unsafe ? null : opts.group; + if (opts.log.level !== "silent") { + opts.log.clearProgress(); + console.log(note); + opts.log.showProgress(); + } + opts.log.verbose("lifecycle", logid(pkg, stage), "unsafe-perm in lifecycle", unsafe); + if (process.platform === "win32") { + unsafe = true; + } + if (unsafe) { + runCmd_(cmd, pkg, env, wd, opts, stage, unsafe, 0, 0, cb); + } else { + uidNumber(user, group, (er, uid, gid) => { + runCmd_(cmd, pkg, env, wd, opts, stage, unsafe, uid, gid, cb); + }); + } + } + function runCmd_(cmd, pkg, env, wd, opts, stage, unsafe, uid, gid, cb_) { + function cb(er) { + cb_.apply(null, arguments); + opts.log.resume(); + process.nextTick(dequeue); + } + const conf = { + cwd: wd, + env, + stdio: opts.stdio || [0, 1, 2] + }; + if (!unsafe) { + conf.uid = uid ^ 0; + conf.gid = gid ^ 0; + } + let sh = "sh"; + let shFlag = "-c"; + const customShell = opts.scriptShell; + if (customShell) { + sh = customShell; + } else if (process.platform === "win32") { + sh = process.env.comspec || "cmd"; + shFlag = "/d /s /c"; + conf.windowsVerbatimArguments = true; + } + opts.log.verbose("lifecycle", logid(pkg, stage), "PATH:", env[PATH]); + opts.log.verbose("lifecycle", logid(pkg, stage), "CWD:", wd); + opts.log.silly("lifecycle", logid(pkg, stage), "Args:", [shFlag, cmd]); + if (opts.shellEmulator) { + const execOpts = { cwd: wd, env }; + if (opts.stdio === "pipe") { + const stdout = new PassThrough(); + const stderr = new PassThrough(); + byline(stdout).on("data", (data) => { + opts.log.verbose("lifecycle", logid(pkg, stage), "stdout", data.toString()); + }); + byline(stderr).on("data", (data) => { + opts.log.verbose("lifecycle", logid(pkg, stage), "stderr", data.toString()); + }); + execOpts.stdout = stdout; + execOpts.stderr = stderr; + } + execute(cmd, [], execOpts).then((code) => { + opts.log.silly("lifecycle", logid(pkg, stage), "Returned: code:", code); + if (code) { + var er = new Error(`Exit status ${code}`); + er.errno = code; + } + procError(er); + }).catch((err) => procError(err)); + return; + } + const proc = spawn(sh, [shFlag, cmd], conf, opts.log); + proc.on("error", procError); + proc.on("close", (code, signal) => { + opts.log.silly("lifecycle", logid(pkg, stage), "Returned: code:", code, " signal:", signal); + if (signal) { + process.kill(process.pid, signal); + } else if (code) { + var er = new Error(`Exit status ${code}`); + er.errno = code; + } + procError(er); + }); + byline(proc.stdout).on("data", (data) => { + opts.log.verbose("lifecycle", logid(pkg, stage), "stdout", data.toString()); + }); + byline(proc.stderr).on("data", (data) => { + opts.log.verbose("lifecycle", logid(pkg, stage), "stderr", data.toString()); + }); + process.once("SIGTERM", procKill); + process.once("SIGINT", procInterupt); + process.on("exit", procKill); + function procError(er) { + if (er) { + opts.log.info("lifecycle", logid(pkg, stage), `Failed to exec ${stage} script`); + er.message = `${pkg._id} ${stage}: \`${cmd}\` +${er.message}`; + if (er.code !== "EPERM") { + er.code = "ELIFECYCLE"; + } + fs.stat(opts.dir, (statError, d) => { + if (statError && statError.code === "ENOENT" && opts.dir.split(path.sep).slice(-1)[0] === "node_modules") { + opts.log.warn("", "Local package.json exists, but node_modules missing, did you mean to install?"); + } + }); + er.pkgid = pkg._id; + er.stage = stage; + er.script = cmd; + er.pkgname = pkg.name; + } + process.removeListener("SIGTERM", procKill); + process.removeListener("SIGTERM", procInterupt); + process.removeListener("SIGINT", procKill); + return cb(er); + } + let called = false; + function procKill() { + if (called) + return; + called = true; + proc.kill(); + } + function procInterupt() { + proc.kill("SIGINT"); + proc.on("exit", () => { + process.exit(); + }); + process.once("SIGINT", procKill); + } + } + function runHookLifecycle(pkg, stage, env, wd, opts, cb) { + hookStat(opts.dir, stage, (er) => { + if (er) + return cb(); + const cmd = path.join(opts.dir, ".hooks", stage); + const note = ` +> ${pkg._id} ${stage} ${wd} +> ${cmd}`; + runCmd(note, cmd, pkg, env, stage, wd, opts, cb); + }); + } + function makeEnv(data, opts, prefix, env) { + prefix = prefix || "npm_package_"; + if (!env) { + env = {}; + for (var i in process.env) { + if (!i.match(/^npm_/) && (!i.match(/^PATH$/i) || i === PATH)) { + env[i] = process.env[i]; + } + } + if (opts.production) + env.NODE_ENV = "production"; + } else if (!data.hasOwnProperty("_lifecycleEnv")) { + Object.defineProperty(data, "_lifecycleEnv", { + value: env, + enumerable: false + }); + } + if (opts.nodeOptions) + env.NODE_OPTIONS = opts.nodeOptions; + for (i in data) { + if (i.charAt(0) !== "_") { + const envKey = (prefix + i).replace(/[^a-zA-Z0-9_]/g, "_"); + if (i === "readme") { + continue; + } + if (data[i] && typeof data[i] === "object") { + try { + JSON.stringify(data[i]); + makeEnv(data[i], opts, `${envKey}_`, env); + } catch (ex) { + const d = data[i]; + makeEnv({ name: d.name, version: d.version, path: d.path }, opts, `${envKey}_`, env); + } + } else { + env[envKey] = String(data[i]); + env[envKey] = env[envKey].includes("\n") ? JSON.stringify(env[envKey]) : env[envKey]; + } + } + } + if (prefix !== "npm_package_") + return env; + prefix = "npm_config_"; + const pkgConfig = {}; + const pkgVerConfig = {}; + const namePref = `${data.name}:`; + const verPref = `${data.name}@${data.version}:`; + Object.keys(opts.config).forEach((i2) => { + if (i2.charAt(0) === "_" && i2.indexOf(`_${namePref}`) !== 0 || i2.match(/:_/)) { + return; + } + let value = opts.config[i2]; + if (value instanceof Stream || Array.isArray(value)) + return; + if (i2.match(/umask/)) + value = umask.toString(value); + if (!value) + value = ""; + else if (typeof value === "number") + value = `${value}`; + else if (typeof value !== "string") + value = JSON.stringify(value); + value = value.includes("\n") ? JSON.stringify(value) : value; + i2 = i2.replace(/^_+/, ""); + let k; + if (i2.indexOf(namePref) === 0) { + k = i2.substr(namePref.length).replace(/[^a-zA-Z0-9_]/g, "_"); + pkgConfig[k] = value; + } else if (i2.indexOf(verPref) === 0) { + k = i2.substr(verPref.length).replace(/[^a-zA-Z0-9_]/g, "_"); + pkgVerConfig[k] = value; + } + const envKey = (prefix + i2).replace(/[^a-zA-Z0-9_]/g, "_"); + env[envKey] = value; + }); + prefix = "npm_package_config_"; + [pkgConfig, pkgVerConfig].forEach((conf) => { + for (const i2 in conf) { + const envKey = prefix + i2; + env[envKey] = conf[i2]; + } + }); + return env; + } + } +}); + +// ../lifecycle/lib/runLifecycleHook.js +var require_runLifecycleHook = __commonJS({ + "../lifecycle/lib/runLifecycleHook.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var core_loggers_1 = require_lib12(); + var logger_1 = require_lib6(); + var npm_lifecycle_1 = __importDefault(require_npm_lifecycle()); + function noop() { + } + async function runLifecycleHook(stage, manifest, opts) { + var _a, _b, _c, _d, _e; + const optional = opts.optional === true; + const m = { _id: getId(manifest), ...manifest }; + m.scripts = { ...m.scripts }; + if (stage === "start" && !m.scripts.start) { + m.scripts.start = "node server.js"; + } + if (((_a = opts.args) === null || _a === void 0 ? void 0 : _a.length) && ((_b = m.scripts) === null || _b === void 0 ? void 0 : _b[stage])) { + m.scripts[stage] = `${m.scripts[stage]} ${opts.args.map((arg) => `"${arg}"`).join(" ")}`; + } + if (m.scripts[stage] === "npx only-allow pnpm") + return; + if (opts.stdio !== "inherit") { + core_loggers_1.lifecycleLogger.debug({ + depPath: opts.depPath, + optional, + script: m.scripts[stage], + stage, + wd: opts.pkgRoot + }); + } + const logLevel = opts.stdio !== "inherit" || opts.silent ? "silent" : void 0; + await npm_lifecycle_1.default(m, stage, opts.pkgRoot, { + config: opts.rawConfig, + dir: opts.rootModulesDir, + extraBinPaths: (_c = opts.extraBinPaths) !== null && _c !== void 0 ? _c : [], + extraEnv: { + ...opts.extraEnv, + INIT_CWD: (_d = opts.initCwd) !== null && _d !== void 0 ? _d : process.cwd(), + PNPM_SCRIPT_SRC_DIR: opts.pkgRoot + }, + log: { + clearProgress: noop, + info: noop, + level: logLevel, + pause: noop, + resume: noop, + showProgress: noop, + silly: npmLog, + verbose: npmLog, + warn: (...msg) => logger_1.globalWarn(msg.join(" ")) + }, + runConcurrently: true, + scriptShell: opts.scriptShell, + shellEmulator: opts.shellEmulator, + stdio: (_e = opts.stdio) !== null && _e !== void 0 ? _e : "pipe", + unsafePerm: opts.unsafePerm + }); + function npmLog(prefix, logid, stdtype, line) { + switch (stdtype) { + case "stdout": + case "stderr": + core_loggers_1.lifecycleLogger.debug({ + depPath: opts.depPath, + line: line.toString(), + stage, + stdio: stdtype, + wd: opts.pkgRoot + }); + return; + case "Returned: code:": { + if (opts.stdio === "inherit") { + return; + } + const code = arguments[3]; + core_loggers_1.lifecycleLogger.debug({ + depPath: opts.depPath, + exitCode: code, + optional, + stage, + wd: opts.pkgRoot + }); + } + } + } + } + exports2.default = runLifecycleHook; + function getId(manifest) { + var _a, _b; + return `${(_a = manifest.name) !== null && _a !== void 0 ? _a : ""}@${(_b = manifest.version) !== null && _b !== void 0 ? _b : ""}`; + } + } +}); + +// ../../node_modules/.pnpm/run-groups@3.0.1/node_modules/run-groups/lib/index.js +var require_lib79 = __commonJS({ + "../../node_modules/.pnpm/run-groups@3.0.1/node_modules/run-groups/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var pLimit = require_p_limit(); + exports2.default = async (concurrency, groups) => { + const limitRun = pLimit(concurrency); + for (const tasks of groups) { + await Promise.all(tasks.map((task) => limitRun(task))); + } + }; + } +}); + +// ../lifecycle/lib/runLifecycleHooksConcurrently.js +var require_runLifecycleHooksConcurrently = __commonJS({ + "../lifecycle/lib/runLifecycleHooksConcurrently.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var run_groups_1 = __importDefault(require_lib79()); + var runLifecycleHook_1 = __importDefault(require_runLifecycleHook()); + async function runLifecycleHooksConcurrently(stages, importers, childConcurrency, opts) { + const importersByBuildIndex = new Map(); + for (const importer of importers) { + if (!importersByBuildIndex.has(importer.buildIndex)) { + importersByBuildIndex.set(importer.buildIndex, [importer]); + } else { + importersByBuildIndex.get(importer.buildIndex).push(importer); + } + } + const sortedBuildIndexes = Array.from(importersByBuildIndex.keys()).sort(); + const groups = sortedBuildIndexes.map((buildIndex) => { + const importers2 = importersByBuildIndex.get(buildIndex); + return importers2.map(({ manifest, modulesDir, rootDir }) => async () => { + const runLifecycleHookOpts = { + ...opts, + depPath: rootDir, + pkgRoot: rootDir, + rootModulesDir: modulesDir + }; + for (const stage of stages) { + if (manifest.scripts == null || !manifest.scripts[stage]) + continue; + await runLifecycleHook_1.default(stage, manifest, runLifecycleHookOpts); + } + }); + }); + await run_groups_1.default(childConcurrency, groups); + } + exports2.default = runLifecycleHooksConcurrently; + } +}); + +// ../lifecycle/lib/index.js +var require_lib80 = __commonJS({ + "../lifecycle/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runPostinstallHooks = exports2.runLifecycleHooksConcurrently = exports2.makeNodeRequireOption = void 0; + var path_1 = __importDefault(require("path")); + var read_package_json_1 = require_lib32(); + var path_exists_1 = __importDefault(require_path_exists()); + var runLifecycleHook_1 = __importDefault(require_runLifecycleHook()); + var runLifecycleHooksConcurrently_1 = __importDefault(require_runLifecycleHooksConcurrently()); + exports2.runLifecycleHooksConcurrently = runLifecycleHooksConcurrently_1.default; + function makeNodeRequireOption(modulePath) { + let { NODE_OPTIONS } = process.env; + NODE_OPTIONS = `${NODE_OPTIONS !== null && NODE_OPTIONS !== void 0 ? NODE_OPTIONS : ""} --require=${modulePath}`.trim(); + return { NODE_OPTIONS }; + } + exports2.makeNodeRequireOption = makeNodeRequireOption; + exports2.default = runLifecycleHook_1.default; + async function runPostinstallHooks(opts) { + const pkg = await read_package_json_1.fromDir(opts.pkgRoot); + if (pkg.scripts == null) { + pkg.scripts = {}; + } + if (!pkg.scripts.install) { + await checkBindingGyp(opts.pkgRoot, pkg.scripts); + } + if (pkg.scripts.preinstall) { + await runLifecycleHook_1.default("preinstall", pkg, opts); + } + if (pkg.scripts.install) { + await runLifecycleHook_1.default("install", pkg, opts); + } + if (pkg.scripts.postinstall) { + await runLifecycleHook_1.default("postinstall", pkg, opts); + } + return pkg.scripts.preinstall != null || pkg.scripts.install != null || pkg.scripts.postinstall != null; + } + exports2.runPostinstallHooks = runPostinstallHooks; + async function checkBindingGyp(root, scripts) { + if (await path_exists_1.default(path_1.default.join(root, "binding.gyp"))) { + scripts["install"] = "node-gyp rebuild"; + } + } + } +}); + +// ../../node_modules/.pnpm/array-flatten@2.1.2/node_modules/array-flatten/array-flatten.js +var require_array_flatten = __commonJS({ + "../../node_modules/.pnpm/array-flatten@2.1.2/node_modules/array-flatten/array-flatten.js"(exports2, module2) { + "use strict"; + module2.exports = flatten; + module2.exports.from = flattenFrom; + module2.exports.depth = flattenDepth; + module2.exports.fromDepth = flattenFromDepth; + function flatten(array) { + if (!Array.isArray(array)) { + throw new TypeError("Expected value to be an array"); + } + return flattenFrom(array); + } + function flattenFrom(array) { + return flattenDown(array, []); + } + function flattenDepth(array, depth) { + if (!Array.isArray(array)) { + throw new TypeError("Expected value to be an array"); + } + return flattenFromDepth(array, depth); + } + function flattenFromDepth(array, depth) { + if (typeof depth !== "number") { + throw new TypeError("Expected the depth to be a number"); + } + return flattenDownDepth(array, [], depth); + } + function flattenDown(array, result) { + for (var i = 0; i < array.length; i++) { + var value = array[i]; + if (Array.isArray(value)) { + flattenDown(value, result); + } else { + result.push(value); + } + } + return result; + } + function flattenDownDepth(array, result, depth) { + depth--; + for (var i = 0; i < array.length; i++) { + var value = array[i]; + if (depth > -1 && Array.isArray(value)) { + flattenDownDepth(value, result, depth); + } else { + result.push(value); + } + } + return result; + } + } +}); + +// ../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js +var require_isArguments3 = __commonJS({ + "../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js"(exports2, module2) { + "use strict"; + var toStr = Object.prototype.toString; + module2.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === "[object Arguments]"; + if (!isArgs) { + isArgs = str !== "[object Array]" && value !== null && typeof value === "object" && typeof value.length === "number" && value.length >= 0 && toStr.call(value.callee) === "[object Function]"; + } + return isArgs; + }; + } +}); + +// ../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js +var require_implementation2 = __commonJS({ + "../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js"(exports2, module2) { + "use strict"; + var keysShim; + if (!Object.keys) { + has = Object.prototype.hasOwnProperty; + toStr = Object.prototype.toString; + isArgs = require_isArguments3(); + isEnumerable = Object.prototype.propertyIsEnumerable; + hasDontEnumBug = !isEnumerable.call({ toString: null }, "toString"); + hasProtoEnumBug = isEnumerable.call(function() { + }, "prototype"); + dontEnums = [ + "toString", + "toLocaleString", + "valueOf", + "hasOwnProperty", + "isPrototypeOf", + "propertyIsEnumerable", + "constructor" + ]; + equalsConstructorPrototype = function(o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $onmozfullscreenchange: true, + $onmozfullscreenerror: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true + }; + hasAutomationEqualityBug = function() { + if (typeof window === "undefined") { + return false; + } + for (var k in window) { + try { + if (!excludedKeys["$" + k] && has.call(window, k) && window[k] !== null && typeof window[k] === "object") { + try { + equalsConstructorPrototype(window[k]); + } catch (e) { + return true; + } + } + } catch (e) { + return true; + } + } + return false; + }(); + equalsConstructorPrototypeIfNotBuggy = function(o) { + if (typeof window === "undefined" || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o); + } + try { + return equalsConstructorPrototype(o); + } catch (e) { + return false; + } + }; + keysShim = function keys(object) { + var isObject = object !== null && typeof object === "object"; + var isFunction = toStr.call(object) === "[object Function]"; + var isArguments = isArgs(object); + var isString = isObject && toStr.call(object) === "[object String]"; + var theKeys = []; + if (!isObject && !isFunction && !isArguments) { + throw new TypeError("Object.keys called on a non-object"); + } + var skipProto = hasProtoEnumBug && isFunction; + if (isString && object.length > 0 && !has.call(object, 0)) { + for (var i = 0; i < object.length; ++i) { + theKeys.push(String(i)); + } + } + if (isArguments && object.length > 0) { + for (var j = 0; j < object.length; ++j) { + theKeys.push(String(j)); + } + } else { + for (var name in object) { + if (!(skipProto && name === "prototype") && has.call(object, name)) { + theKeys.push(String(name)); + } + } + } + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + for (var k = 0; k < dontEnums.length; ++k) { + if (!(skipConstructor && dontEnums[k] === "constructor") && has.call(object, dontEnums[k])) { + theKeys.push(dontEnums[k]); + } + } + } + return theKeys; + }; + } + var has; + var toStr; + var isArgs; + var isEnumerable; + var hasDontEnumBug; + var hasProtoEnumBug; + var dontEnums; + var equalsConstructorPrototype; + var excludedKeys; + var hasAutomationEqualityBug; + var equalsConstructorPrototypeIfNotBuggy; + module2.exports = keysShim; + } +}); + +// ../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js +var require_object_keys = __commonJS({ + "../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js"(exports2, module2) { + "use strict"; + var slice = Array.prototype.slice; + var isArgs = require_isArguments3(); + var origKeys = Object.keys; + var keysShim = origKeys ? function keys(o) { + return origKeys(o); + } : require_implementation2(); + var originalKeys = Object.keys; + keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = function() { + var args2 = Object.keys(arguments); + return args2 && args2.length === arguments.length; + }(1, 2); + if (!keysWorksWithArguments) { + Object.keys = function keys(object) { + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } + return originalKeys(object); + }; + } + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; + }; + module2.exports = keysShim; + } +}); + +// ../../node_modules/.pnpm/define-properties@1.1.3/node_modules/define-properties/index.js +var require_define_properties = __commonJS({ + "../../node_modules/.pnpm/define-properties@1.1.3/node_modules/define-properties/index.js"(exports2, module2) { + "use strict"; + var keys = require_object_keys(); + var hasSymbols = typeof Symbol === "function" && typeof Symbol("foo") === "symbol"; + var toStr = Object.prototype.toString; + var concat = Array.prototype.concat; + var origDefineProperty = Object.defineProperty; + var isFunction = function(fn2) { + return typeof fn2 === "function" && toStr.call(fn2) === "[object Function]"; + }; + var arePropertyDescriptorsSupported = function() { + var obj = {}; + try { + origDefineProperty(obj, "x", { enumerable: false, value: obj }); + for (var _ in obj) { + return false; + } + return obj.x === obj; + } catch (e) { + return false; + } + }; + var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported(); + var defineProperty = function(object, name, value, predicate) { + if (name in object && (!isFunction(predicate) || !predicate())) { + return; + } + if (supportsDescriptors) { + origDefineProperty(object, name, { + configurable: true, + enumerable: false, + value, + writable: true + }); + } else { + object[name] = value; + } + }; + var defineProperties = function(object, map) { + var predicates = arguments.length > 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = concat.call(props, Object.getOwnPropertySymbols(map)); + } + for (var i = 0; i < props.length; i += 1) { + defineProperty(object, props[i], map[props[i]], predicates[props[i]]); + } + }; + defineProperties.supportsDescriptors = !!supportsDescriptors; + module2.exports = defineProperties; + } +}); + +// ../../node_modules/.pnpm/has-symbols@1.0.2/node_modules/has-symbols/shams.js +var require_shams = __commonJS({ + "../../node_modules/.pnpm/has-symbols@1.0.2/node_modules/has-symbols/shams.js"(exports2, module2) { + "use strict"; + module2.exports = function hasSymbols() { + if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") { + return false; + } + if (typeof Symbol.iterator === "symbol") { + return true; + } + var obj = {}; + var sym = Symbol("test"); + var symObj = Object(sym); + if (typeof sym === "string") { + return false; + } + if (Object.prototype.toString.call(sym) !== "[object Symbol]") { + return false; + } + if (Object.prototype.toString.call(symObj) !== "[object Symbol]") { + return false; + } + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { + return false; + } + if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) { + return false; + } + if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) { + return false; + } + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { + return false; + } + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { + return false; + } + if (typeof Object.getOwnPropertyDescriptor === "function") { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { + return false; + } + } + return true; + }; + } +}); + +// ../../node_modules/.pnpm/has-symbols@1.0.2/node_modules/has-symbols/index.js +var require_has_symbols = __commonJS({ + "../../node_modules/.pnpm/has-symbols@1.0.2/node_modules/has-symbols/index.js"(exports2, module2) { + "use strict"; + var origSymbol = typeof Symbol !== "undefined" && Symbol; + var hasSymbolSham = require_shams(); + module2.exports = function hasNativeSymbols() { + if (typeof origSymbol !== "function") { + return false; + } + if (typeof Symbol !== "function") { + return false; + } + if (typeof origSymbol("foo") !== "symbol") { + return false; + } + if (typeof Symbol("bar") !== "symbol") { + return false; + } + return hasSymbolSham(); + }; + } +}); + +// ../../node_modules/.pnpm/get-intrinsic@1.1.1/node_modules/get-intrinsic/index.js +var require_get_intrinsic = __commonJS({ + "../../node_modules/.pnpm/get-intrinsic@1.1.1/node_modules/get-intrinsic/index.js"(exports2, module2) { + "use strict"; + var undefined2; + var $SyntaxError = SyntaxError; + var $Function = Function; + var $TypeError = TypeError; + var getEvalledConstructor = function(expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")(); + } catch (e) { + } + }; + var $gOPD = Object.getOwnPropertyDescriptor; + if ($gOPD) { + try { + $gOPD({}, ""); + } catch (e) { + $gOPD = null; + } + } + var throwTypeError = function() { + throw new $TypeError(); + }; + var ThrowTypeError = $gOPD ? function() { + try { + arguments.callee; + return throwTypeError; + } catch (calleeThrows) { + try { + return $gOPD(arguments, "callee").get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }() : throwTypeError; + var hasSymbols = require_has_symbols()(); + var getProto = Object.getPrototypeOf || function(x) { + return x.__proto__; + }; + var needsEval = {}; + var TypedArray = typeof Uint8Array === "undefined" ? undefined2 : getProto(Uint8Array); + var INTRINSICS = { + "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError, + "%Array%": Array, + "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer, + "%ArrayIteratorPrototype%": hasSymbols ? getProto([][Symbol.iterator]()) : undefined2, + "%AsyncFromSyncIteratorPrototype%": undefined2, + "%AsyncFunction%": needsEval, + "%AsyncGenerator%": needsEval, + "%AsyncGeneratorFunction%": needsEval, + "%AsyncIteratorPrototype%": needsEval, + "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics, + "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt, + "%Boolean%": Boolean, + "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView, + "%Date%": Date, + "%decodeURI%": decodeURI, + "%decodeURIComponent%": decodeURIComponent, + "%encodeURI%": encodeURI, + "%encodeURIComponent%": encodeURIComponent, + "%Error%": Error, + "%eval%": eval, + "%EvalError%": EvalError, + "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array, + "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array, + "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry, + "%Function%": $Function, + "%GeneratorFunction%": needsEval, + "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array, + "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array, + "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array, + "%isFinite%": isFinite, + "%isNaN%": isNaN, + "%IteratorPrototype%": hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined2, + "%JSON%": typeof JSON === "object" ? JSON : undefined2, + "%Map%": typeof Map === "undefined" ? undefined2 : Map, + "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols ? undefined2 : getProto(new Map()[Symbol.iterator]()), + "%Math%": Math, + "%Number%": Number, + "%Object%": Object, + "%parseFloat%": parseFloat, + "%parseInt%": parseInt, + "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise, + "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy, + "%RangeError%": RangeError, + "%ReferenceError%": ReferenceError, + "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect, + "%RegExp%": RegExp, + "%Set%": typeof Set === "undefined" ? undefined2 : Set, + "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols ? undefined2 : getProto(new Set()[Symbol.iterator]()), + "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer, + "%String%": String, + "%StringIteratorPrototype%": hasSymbols ? getProto(""[Symbol.iterator]()) : undefined2, + "%Symbol%": hasSymbols ? Symbol : undefined2, + "%SyntaxError%": $SyntaxError, + "%ThrowTypeError%": ThrowTypeError, + "%TypedArray%": TypedArray, + "%TypeError%": $TypeError, + "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array, + "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray, + "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array, + "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array, + "%URIError%": URIError, + "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap, + "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef, + "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet + }; + var doEval = function doEval2(name) { + var value; + if (name === "%AsyncFunction%") { + value = getEvalledConstructor("async function () {}"); + } else if (name === "%GeneratorFunction%") { + value = getEvalledConstructor("function* () {}"); + } else if (name === "%AsyncGeneratorFunction%") { + value = getEvalledConstructor("async function* () {}"); + } else if (name === "%AsyncGenerator%") { + var fn2 = doEval2("%AsyncGeneratorFunction%"); + if (fn2) { + value = fn2.prototype; + } + } else if (name === "%AsyncIteratorPrototype%") { + var gen = doEval2("%AsyncGenerator%"); + if (gen) { + value = getProto(gen.prototype); + } + } + INTRINSICS[name] = value; + return value; + }; + var LEGACY_ALIASES = { + "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], + "%ArrayPrototype%": ["Array", "prototype"], + "%ArrayProto_entries%": ["Array", "prototype", "entries"], + "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], + "%ArrayProto_keys%": ["Array", "prototype", "keys"], + "%ArrayProto_values%": ["Array", "prototype", "values"], + "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], + "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], + "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], + "%BooleanPrototype%": ["Boolean", "prototype"], + "%DataViewPrototype%": ["DataView", "prototype"], + "%DatePrototype%": ["Date", "prototype"], + "%ErrorPrototype%": ["Error", "prototype"], + "%EvalErrorPrototype%": ["EvalError", "prototype"], + "%Float32ArrayPrototype%": ["Float32Array", "prototype"], + "%Float64ArrayPrototype%": ["Float64Array", "prototype"], + "%FunctionPrototype%": ["Function", "prototype"], + "%Generator%": ["GeneratorFunction", "prototype"], + "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], + "%Int8ArrayPrototype%": ["Int8Array", "prototype"], + "%Int16ArrayPrototype%": ["Int16Array", "prototype"], + "%Int32ArrayPrototype%": ["Int32Array", "prototype"], + "%JSONParse%": ["JSON", "parse"], + "%JSONStringify%": ["JSON", "stringify"], + "%MapPrototype%": ["Map", "prototype"], + "%NumberPrototype%": ["Number", "prototype"], + "%ObjectPrototype%": ["Object", "prototype"], + "%ObjProto_toString%": ["Object", "prototype", "toString"], + "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], + "%PromisePrototype%": ["Promise", "prototype"], + "%PromiseProto_then%": ["Promise", "prototype", "then"], + "%Promise_all%": ["Promise", "all"], + "%Promise_reject%": ["Promise", "reject"], + "%Promise_resolve%": ["Promise", "resolve"], + "%RangeErrorPrototype%": ["RangeError", "prototype"], + "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], + "%RegExpPrototype%": ["RegExp", "prototype"], + "%SetPrototype%": ["Set", "prototype"], + "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], + "%StringPrototype%": ["String", "prototype"], + "%SymbolPrototype%": ["Symbol", "prototype"], + "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], + "%TypedArrayPrototype%": ["TypedArray", "prototype"], + "%TypeErrorPrototype%": ["TypeError", "prototype"], + "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], + "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], + "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], + "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], + "%URIErrorPrototype%": ["URIError", "prototype"], + "%WeakMapPrototype%": ["WeakMap", "prototype"], + "%WeakSetPrototype%": ["WeakSet", "prototype"] + }; + var bind = require_function_bind(); + var hasOwn = require_src5(); + var $concat = bind.call(Function.call, Array.prototype.concat); + var $spliceApply = bind.call(Function.apply, Array.prototype.splice); + var $replace = bind.call(Function.call, String.prototype.replace); + var $strSlice = bind.call(Function.call, String.prototype.slice); + var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; + var reEscapeChar = /\\(\\)?/g; + var stringToPath = function stringToPath2(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === "%" && last !== "%") { + throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`"); + } else if (last === "%" && first !== "%") { + throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`"); + } + var result = []; + $replace(string, rePropName, function(match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match; + }); + return result; + }; + var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = "%" + alias[0] + "%"; + } + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === "undefined" && !allowMissing) { + throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!"); + } + return { + alias, + name: intrinsicName, + value + }; + } + throw new $SyntaxError("intrinsic " + name + " does not exist!"); + }; + module2.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== "string" || name.length === 0) { + throw new $TypeError("intrinsic name must be a non-empty string"); + } + if (arguments.length > 1 && typeof allowMissing !== "boolean") { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ""; + var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) { + throw new $SyntaxError("property names with quotes must have matching quotes"); + } + if (part === "constructor" || !isOwn) { + skipFurtherCaching = true; + } + intrinsicBaseName += "." + part; + intrinsicRealName = "%" + intrinsicBaseName + "%"; + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available."); + } + return void 0; + } + if ($gOPD && i + 1 >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + if (isOwn && "get" in desc && !("originalValue" in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/CheckObjectCoercible.js +var require_CheckObjectCoercible = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/CheckObjectCoercible.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $TypeError = GetIntrinsic("%TypeError%"); + module2.exports = function CheckObjectCoercible(value, optMessage) { + if (value == null) { + throw new $TypeError(optMessage || "Cannot call method on " + value); + } + return value; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/RequireObjectCoercible.js +var require_RequireObjectCoercible = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/RequireObjectCoercible.js"(exports2, module2) { + "use strict"; + module2.exports = require_CheckObjectCoercible(); + } +}); + +// ../../node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js +var require_call_bind = __commonJS({ + "../../node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js"(exports2, module2) { + "use strict"; + var bind = require_function_bind(); + var GetIntrinsic = require_get_intrinsic(); + var $apply = GetIntrinsic("%Function.prototype.apply%"); + var $call = GetIntrinsic("%Function.prototype.call%"); + var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind.call($call, $apply); + var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true); + var $defineProperty = GetIntrinsic("%Object.defineProperty%", true); + var $max = GetIntrinsic("%Math.max%"); + if ($defineProperty) { + try { + $defineProperty({}, "a", { value: 1 }); + } catch (e) { + $defineProperty = null; + } + } + module2.exports = function callBind(originalFunction) { + var func = $reflectApply(bind, $call, arguments); + if ($gOPD && $defineProperty) { + var desc = $gOPD(func, "length"); + if (desc.configurable) { + $defineProperty(func, "length", { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }); + } + } + return func; + }; + var applyBind = function applyBind2() { + return $reflectApply(bind, $apply, arguments); + }; + if ($defineProperty) { + $defineProperty(module2.exports, "apply", { value: applyBind }); + } else { + module2.exports.apply = applyBind; + } + } +}); + +// ../../node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js +var require_callBound = __commonJS({ + "../../node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var callBind = require_call_bind(); + var $indexOf = callBind(GetIntrinsic("String.prototype.indexOf")); + module2.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) { + return callBind(intrinsic); + } + return intrinsic; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/abs.js +var require_abs = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/abs.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $abs = GetIntrinsic("%Math.abs%"); + module2.exports = function abs(x) { + return $abs(x); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/floor.js +var require_floor = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/floor.js"(exports2, module2) { + "use strict"; + var $floor = Math.floor; + module2.exports = function floor(x) { + return $floor(x); + }; + } +}); + +// ../../node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js +var require_isPrimitive = __commonJS({ + "../../node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/helpers/isPrimitive.js"(exports2, module2) { + "use strict"; + module2.exports = function isPrimitive(value) { + return value === null || typeof value !== "function" && typeof value !== "object"; + }; + } +}); + +// ../../node_modules/.pnpm/is-callable@1.2.4/node_modules/is-callable/index.js +var require_is_callable = __commonJS({ + "../../node_modules/.pnpm/is-callable@1.2.4/node_modules/is-callable/index.js"(exports2, module2) { + "use strict"; + var fnToStr = Function.prototype.toString; + var reflectApply = typeof Reflect === "object" && Reflect !== null && Reflect.apply; + var badArrayLike; + var isCallableMarker; + if (typeof reflectApply === "function" && typeof Object.defineProperty === "function") { + try { + badArrayLike = Object.defineProperty({}, "length", { + get: function() { + throw isCallableMarker; + } + }); + isCallableMarker = {}; + reflectApply(function() { + throw 42; + }, null, badArrayLike); + } catch (_) { + if (_ !== isCallableMarker) { + reflectApply = null; + } + } + } else { + reflectApply = null; + } + var constructorRegex = /^\s*class\b/; + var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e) { + return false; + } + }; + var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { + return false; + } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } + }; + var toStr = Object.prototype.toString; + var fnClass = "[object Function]"; + var genClass = "[object GeneratorFunction]"; + var hasToStringTag = typeof Symbol === "function" && !!Symbol.toStringTag; + var documentDotAll = typeof document === "object" && typeof document.all === "undefined" && document.all !== void 0 ? document.all : {}; + module2.exports = reflectApply ? function isCallable(value) { + if (value === documentDotAll) { + return true; + } + if (!value) { + return false; + } + if (typeof value !== "function" && typeof value !== "object") { + return false; + } + if (typeof value === "function" && !value.prototype) { + return true; + } + try { + reflectApply(value, null, badArrayLike); + } catch (e) { + if (e !== isCallableMarker) { + return false; + } + } + return !isES6ClassFn(value); + } : function isCallable(value) { + if (value === documentDotAll) { + return true; + } + if (!value) { + return false; + } + if (typeof value !== "function" && typeof value !== "object") { + return false; + } + if (typeof value === "function" && !value.prototype) { + return true; + } + if (hasToStringTag) { + return tryFunctionObject(value); + } + if (isES6ClassFn(value)) { + return false; + } + var strClass = toStr.call(value); + return strClass === fnClass || strClass === genClass; + }; + } +}); + +// ../../node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es5.js +var require_es5 = __commonJS({ + "../../node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es5.js"(exports2, module2) { + "use strict"; + var toStr = Object.prototype.toString; + var isPrimitive = require_isPrimitive(); + var isCallable = require_is_callable(); + var ES5internalSlots = { + "[[DefaultValue]]": function(O) { + var actualHint; + if (arguments.length > 1) { + actualHint = arguments[1]; + } else { + actualHint = toStr.call(O) === "[object Date]" ? String : Number; + } + if (actualHint === String || actualHint === Number) { + var methods = actualHint === String ? ["toString", "valueOf"] : ["valueOf", "toString"]; + var value, i; + for (i = 0; i < methods.length; ++i) { + if (isCallable(O[methods[i]])) { + value = O[methods[i]](); + if (isPrimitive(value)) { + return value; + } + } + } + throw new TypeError("No default value"); + } + throw new TypeError("invalid [[DefaultValue]] hint supplied"); + } + }; + module2.exports = function ToPrimitive(input) { + if (isPrimitive(input)) { + return input; + } + if (arguments.length > 1) { + return ES5internalSlots["[[DefaultValue]]"](input, arguments[1]); + } + return ES5internalSlots["[[DefaultValue]]"](input); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/ToPrimitive.js +var require_ToPrimitive = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/ToPrimitive.js"(exports2, module2) { + "use strict"; + module2.exports = require_es5(); + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/ToNumber.js +var require_ToNumber = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/ToNumber.js"(exports2, module2) { + "use strict"; + var ToPrimitive = require_ToPrimitive(); + module2.exports = function ToNumber(value) { + var prim = ToPrimitive(value, Number); + if (typeof prim !== "string") { + return +prim; + } + var trimmed = prim.replace(/^[ \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u0085]+|[ \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u0085]+$/g, ""); + if (/^0[ob]|^[+-]0x/.test(trimmed)) { + return NaN; + } + return +trimmed; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/isNaN.js +var require_isNaN = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/isNaN.js"(exports2, module2) { + "use strict"; + module2.exports = Number.isNaN || function isNaN2(a) { + return a !== a; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/isFinite.js +var require_isFinite = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/isFinite.js"(exports2, module2) { + "use strict"; + var $isNaN = Number.isNaN || function(a) { + return a !== a; + }; + module2.exports = Number.isFinite || function(x) { + return typeof x === "number" && !$isNaN(x) && x !== Infinity && x !== -Infinity; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/sign.js +var require_sign = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/sign.js"(exports2, module2) { + "use strict"; + module2.exports = function sign(number) { + return number >= 0 ? 1 : -1; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/ToInteger.js +var require_ToInteger = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/5/ToInteger.js"(exports2, module2) { + "use strict"; + var abs = require_abs(); + var floor = require_floor(); + var ToNumber = require_ToNumber(); + var $isNaN = require_isNaN(); + var $isFinite = require_isFinite(); + var $sign = require_sign(); + module2.exports = function ToInteger(value) { + var number = ToNumber(value); + if ($isNaN(number)) { + return 0; + } + if (number === 0 || !$isFinite(number)) { + return number; + } + return $sign(number) * floor(abs(number)); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/regexTester.js +var require_regexTester = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/regexTester.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $test = GetIntrinsic("RegExp.prototype.test"); + var callBind = require_call_bind(); + module2.exports = function regexTester(regex) { + return callBind($test, regex); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/isPrimitive.js +var require_isPrimitive2 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/isPrimitive.js"(exports2, module2) { + "use strict"; + module2.exports = function isPrimitive(value) { + return value === null || typeof value !== "function" && typeof value !== "object"; + }; + } +}); + +// ../../node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js +var require_shams2 = __commonJS({ + "../../node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js"(exports2, module2) { + "use strict"; + var hasSymbols = require_shams(); + module2.exports = function hasToStringTagShams() { + return hasSymbols() && !!Symbol.toStringTag; + }; + } +}); + +// ../../node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js +var require_is_date_object = __commonJS({ + "../../node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js"(exports2, module2) { + "use strict"; + var getDay = Date.prototype.getDay; + var tryDateObject = function tryDateGetDayCall(value) { + try { + getDay.call(value); + return true; + } catch (e) { + return false; + } + }; + var toStr = Object.prototype.toString; + var dateClass = "[object Date]"; + var hasToStringTag = require_shams2()(); + module2.exports = function isDateObject(value) { + if (typeof value !== "object" || value === null) { + return false; + } + return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass; + }; + } +}); + +// ../../node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js +var require_is_symbol = __commonJS({ + "../../node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js"(exports2, module2) { + "use strict"; + var toStr = Object.prototype.toString; + var hasSymbols = require_has_symbols()(); + if (hasSymbols) { + symToStr = Symbol.prototype.toString; + symStringRegex = /^Symbol\(.*\)$/; + isSymbolObject = function isRealSymbolObject(value) { + if (typeof value.valueOf() !== "symbol") { + return false; + } + return symStringRegex.test(symToStr.call(value)); + }; + module2.exports = function isSymbol(value) { + if (typeof value === "symbol") { + return true; + } + if (toStr.call(value) !== "[object Symbol]") { + return false; + } + try { + return isSymbolObject(value); + } catch (e) { + return false; + } + }; + } else { + module2.exports = function isSymbol(value) { + return false; + }; + } + var symToStr; + var symStringRegex; + var isSymbolObject; + } +}); + +// ../../node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js +var require_es2015 = __commonJS({ + "../../node_modules/.pnpm/es-to-primitive@1.2.1/node_modules/es-to-primitive/es2015.js"(exports2, module2) { + "use strict"; + var hasSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "symbol"; + var isPrimitive = require_isPrimitive(); + var isCallable = require_is_callable(); + var isDate = require_is_date_object(); + var isSymbol = require_is_symbol(); + var ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) { + if (typeof O === "undefined" || O === null) { + throw new TypeError("Cannot call method on " + O); + } + if (typeof hint !== "string" || hint !== "number" && hint !== "string") { + throw new TypeError('hint must be "string" or "number"'); + } + var methodNames = hint === "string" ? ["toString", "valueOf"] : ["valueOf", "toString"]; + var method, result, i; + for (i = 0; i < methodNames.length; ++i) { + method = O[methodNames[i]]; + if (isCallable(method)) { + result = method.call(O); + if (isPrimitive(result)) { + return result; + } + } + } + throw new TypeError("No default value"); + }; + var GetMethod = function GetMethod2(O, P) { + var func = O[P]; + if (func !== null && typeof func !== "undefined") { + if (!isCallable(func)) { + throw new TypeError(func + " returned for property " + P + " of object " + O + " is not a function"); + } + return func; + } + return void 0; + }; + module2.exports = function ToPrimitive(input) { + if (isPrimitive(input)) { + return input; + } + var hint = "default"; + if (arguments.length > 1) { + if (arguments[1] === String) { + hint = "string"; + } else if (arguments[1] === Number) { + hint = "number"; + } + } + var exoticToPrim; + if (hasSymbols) { + if (Symbol.toPrimitive) { + exoticToPrim = GetMethod(input, Symbol.toPrimitive); + } else if (isSymbol(input)) { + exoticToPrim = Symbol.prototype.valueOf; + } + } + if (typeof exoticToPrim !== "undefined") { + var result = exoticToPrim.call(input, hint); + if (isPrimitive(result)) { + return result; + } + throw new TypeError("unable to convert exotic object to primitive"); + } + if (hint === "default" && (isDate(input) || isSymbol(input))) { + hint = "string"; + } + return ordinaryToPrimitive(input, hint === "default" ? "number" : hint); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/ToPrimitive.js +var require_ToPrimitive2 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/ToPrimitive.js"(exports2, module2) { + "use strict"; + var toPrimitive = require_es2015(); + module2.exports = function ToPrimitive(input) { + if (arguments.length > 1) { + return toPrimitive(input, arguments[1]); + } + return toPrimitive(input); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/ToNumber.js +var require_ToNumber2 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/ToNumber.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $TypeError = GetIntrinsic("%TypeError%"); + var $Number = GetIntrinsic("%Number%"); + var $RegExp = GetIntrinsic("%RegExp%"); + var $parseInteger = GetIntrinsic("%parseInt%"); + var callBound = require_callBound(); + var regexTester = require_regexTester(); + var isPrimitive = require_isPrimitive2(); + var $strSlice = callBound("String.prototype.slice"); + var isBinary = regexTester(/^0b[01]+$/i); + var isOctal = regexTester(/^0o[0-7]+$/i); + var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i); + var nonWS = ["\x85", "\u200B", "\uFFFE"].join(""); + var nonWSregex = new $RegExp("[" + nonWS + "]", "g"); + var hasNonWS = regexTester(nonWSregex); + var ws = [ + " \n\v\f\r \xA0\u1680\u180E\u2000\u2001\u2002\u2003", + "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028", + "\u2029\uFEFF" + ].join(""); + var trimRegex = new RegExp("(^[" + ws + "]+)|([" + ws + "]+$)", "g"); + var $replace = callBound("String.prototype.replace"); + var $trim = function(value) { + return $replace(value, trimRegex, ""); + }; + var ToPrimitive = require_ToPrimitive2(); + module2.exports = function ToNumber(argument) { + var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (typeof value === "symbol") { + throw new $TypeError("Cannot convert a Symbol value to a number"); + } + if (typeof value === "bigint") { + throw new $TypeError("Conversion from 'BigInt' to 'number' is not allowed."); + } + if (typeof value === "string") { + if (isBinary(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 2)); + } else if (isOctal(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 8)); + } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { + return NaN; + } + var trimmed = $trim(value); + if (trimmed !== value) { + return ToNumber(trimmed); + } + } + return $Number(value); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/ToInteger.js +var require_ToInteger2 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/ToInteger.js"(exports2, module2) { + "use strict"; + var ES5ToInteger = require_ToInteger(); + var ToNumber = require_ToNumber2(); + module2.exports = function ToInteger(value) { + var number = ToNumber(value); + if (number !== 0) { + number = ES5ToInteger(number); + } + return number === 0 ? 0 : number; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/maxSafeInteger.js +var require_maxSafeInteger = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/helpers/maxSafeInteger.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $Math = GetIntrinsic("%Math%"); + var $Number = GetIntrinsic("%Number%"); + module2.exports = $Number.MAX_SAFE_INTEGER || $Math.pow(2, 53) - 1; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/ToLength.js +var require_ToLength = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/ToLength.js"(exports2, module2) { + "use strict"; + var MAX_SAFE_INTEGER = require_maxSafeInteger(); + var ToInteger = require_ToInteger2(); + module2.exports = function ToLength(argument) { + var len = ToInteger(argument); + if (len <= 0) { + return 0; + } + if (len > MAX_SAFE_INTEGER) { + return MAX_SAFE_INTEGER; + } + return len; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/ToObject.js +var require_ToObject = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/ToObject.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $Object = GetIntrinsic("%Object%"); + var RequireObjectCoercible = require_RequireObjectCoercible(); + module2.exports = function ToObject(value) { + RequireObjectCoercible(value); + return $Object(value); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/SameValueZero.js +var require_SameValueZero = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.18.6/node_modules/es-abstract/2020/SameValueZero.js"(exports2, module2) { + "use strict"; + var $isNaN = require_isNaN(); + module2.exports = function SameValueZero(x, y) { + return x === y || $isNaN(x) && $isNaN(y); + }; + } +}); + +// ../../node_modules/.pnpm/is-string@1.0.7/node_modules/is-string/index.js +var require_is_string = __commonJS({ + "../../node_modules/.pnpm/is-string@1.0.7/node_modules/is-string/index.js"(exports2, module2) { + "use strict"; + var strValue = String.prototype.valueOf; + var tryStringObject = function tryStringObject2(value) { + try { + strValue.call(value); + return true; + } catch (e) { + return false; + } + }; + var toStr = Object.prototype.toString; + var strClass = "[object String]"; + var hasToStringTag = require_shams2()(); + module2.exports = function isString(value) { + if (typeof value === "string") { + return true; + } + if (typeof value !== "object") { + return false; + } + return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass; + }; + } +}); + +// ../../node_modules/.pnpm/array-includes@3.1.3/node_modules/array-includes/implementation.js +var require_implementation3 = __commonJS({ + "../../node_modules/.pnpm/array-includes@3.1.3/node_modules/array-includes/implementation.js"(exports2, module2) { + "use strict"; + var ToInteger = require_ToInteger2(); + var ToLength = require_ToLength(); + var ToObject = require_ToObject(); + var SameValueZero = require_SameValueZero(); + var $isNaN = require_isNaN(); + var $isFinite = require_isFinite(); + var GetIntrinsic = require_get_intrinsic(); + var callBound = require_callBound(); + var isString = require_is_string(); + var $charAt = callBound("String.prototype.charAt"); + var $indexOf = GetIntrinsic("%Array.prototype.indexOf%"); + module2.exports = function includes(searchElement) { + var fromIndex = arguments.length > 1 ? ToInteger(arguments[1]) : 0; + if ($indexOf && !$isNaN(searchElement) && $isFinite(fromIndex) && typeof searchElement !== "undefined") { + return $indexOf.apply(this, arguments) > -1; + } + var O = ToObject(this); + var length = ToLength(O.length); + if (length === 0) { + return false; + } + var k = fromIndex >= 0 ? fromIndex : Math.max(0, length + fromIndex); + while (k < length) { + if (SameValueZero(searchElement, isString(O) ? $charAt(O, k) : O[k])) { + return true; + } + k += 1; + } + return false; + }; + } +}); + +// ../../node_modules/.pnpm/array-includes@3.1.3/node_modules/array-includes/polyfill.js +var require_polyfill = __commonJS({ + "../../node_modules/.pnpm/array-includes@3.1.3/node_modules/array-includes/polyfill.js"(exports2, module2) { + "use strict"; + var implementation = require_implementation3(); + module2.exports = function getPolyfill() { + return Array.prototype.includes || implementation; + }; + } +}); + +// ../../node_modules/.pnpm/array-includes@3.1.3/node_modules/array-includes/shim.js +var require_shim = __commonJS({ + "../../node_modules/.pnpm/array-includes@3.1.3/node_modules/array-includes/shim.js"(exports2, module2) { + "use strict"; + var define2 = require_define_properties(); + var getPolyfill = require_polyfill(); + module2.exports = function shimArrayPrototypeIncludes() { + var polyfill = getPolyfill(); + define2(Array.prototype, { includes: polyfill }, { includes: function() { + return Array.prototype.includes !== polyfill; + } }); + return polyfill; + }; + } +}); + +// ../../node_modules/.pnpm/array-includes@3.1.3/node_modules/array-includes/index.js +var require_array_includes = __commonJS({ + "../../node_modules/.pnpm/array-includes@3.1.3/node_modules/array-includes/index.js"(exports2, module2) { + "use strict"; + var define2 = require_define_properties(); + var RequireObjectCoercible = require_RequireObjectCoercible(); + var callBind = require_call_bind(); + var callBound = require_callBound(); + var implementation = require_implementation3(); + var getPolyfill = require_polyfill(); + var polyfill = callBind.apply(getPolyfill()); + var shim = require_shim(); + var $slice = callBound("Array.prototype.slice"); + var boundShim = function includes(array, searchElement) { + RequireObjectCoercible(array); + return polyfill(array, $slice(arguments, 1)); + }; + define2(boundShim, { + getPolyfill, + implementation, + shim + }); + module2.exports = boundShim; + } +}); + +// ../../node_modules/.pnpm/graph-sequencer@2.0.0/node_modules/graph-sequencer/index.js +var require_graph_sequencer = __commonJS({ + "../../node_modules/.pnpm/graph-sequencer@2.0.0/node_modules/graph-sequencer/index.js"(exports2, module2) { + "use strict"; + var assert = require("assert"); + var arrayFlatten = require_array_flatten(); + var arrayIncludes = require_array_includes(); + function getCycles(currDepsMap, visited) { + let items = Array.from(currDepsMap.keys()); + let cycles = []; + function visit(item, cycle) { + let visitedDeps = visited.get(item); + if (!visitedDeps) { + visitedDeps = []; + visited.set(item, visitedDeps); + } + let deps = currDepsMap.get(item); + if (typeof deps === "undefined") + return; + for (let dep of deps) { + if (cycle[0] === dep) { + cycles.push(cycle); + } + if (!arrayIncludes(visitedDeps, dep)) { + visitedDeps.push(dep); + visit(dep, cycle.concat(dep)); + } + } + } + for (let item of items) { + visit(item, [item]); + } + return cycles; + } + function graphSequencer(opts) { + let graph = opts.graph; + let groups = opts.groups; + let graphItems = Array.from(graph.keys()); + assert.deepStrictEqual(graphItems.sort(), arrayFlatten(groups).sort(), "items in graph must be the same as items in groups"); + let chunks = []; + let cycles = []; + let safe = true; + let queue = graphItems; + let chunked = new Set(); + let visited = new Map(); + while (queue.length) { + let nextQueue = []; + let chunk = []; + let currDepsMap = new Map(); + for (let i = 0; i < queue.length; i++) { + let item = queue[i]; + let deps = graph.get(item); + if (typeof deps === "undefined") + continue; + let itemGroup = groups.findIndex((group) => arrayIncludes(group, item)); + let currDeps = deps.filter((dep) => { + let depGroup = groups.findIndex((group) => arrayIncludes(group, dep)); + if (depGroup > itemGroup) { + return false; + } else { + return !chunked.has(dep); + } + }); + currDepsMap.set(item, currDeps); + if (currDeps.length) { + nextQueue.push(item); + } else { + chunk.push(item); + } + } + if (!chunk.length) { + cycles = cycles.concat(getCycles(currDepsMap, visited)); + let sorted = queue.sort((a, b) => { + let aDeps = currDepsMap.get(a) || []; + let bDeps = currDepsMap.get(b) || []; + return aDeps.length - bDeps.length; + }); + chunk.push(sorted[0]); + nextQueue = sorted.slice(1); + safe = false; + } + for (let item of chunk) { + chunked.add(item); + } + chunks.push(chunk.sort()); + queue = nextQueue; + } + return { safe, chunks, cycles }; + } + module2.exports = graphSequencer; + } +}); + +// ../build-modules/lib/index.js +var require_lib81 = __commonJS({ + "../build-modules/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.linkBinsOfDependencies = void 0; + var path_1 = __importDefault(require("path")); + var constants_1 = require_lib7(); + var core_loggers_1 = require_lib12(); + var lifecycle_1 = require_lib80(); + var link_bins_1 = __importStar2(require_lib70()); + var logger_1 = __importDefault(require_lib6()); + var read_package_json_1 = require_lib32(); + var run_groups_1 = __importDefault(require_lib79()); + var graph_sequencer_1 = __importDefault(require_graph_sequencer()); + var filter_1 = __importDefault(require_filter3()); + exports2.default = async (depGraph, rootDepPaths, opts) => { + var _a; + const warn = (message2) => logger_1.default.warn({ message: message2, prefix: opts.lockfileDir }); + const nodesToBuild = new Set(); + getSubgraphToBuild(depGraph, rootDepPaths, nodesToBuild, new Set()); + const onlyFromBuildGraph = filter_1.default((depPath) => nodesToBuild.has(depPath)); + const nodesToBuildArray = Array.from(nodesToBuild); + const graph = new Map(nodesToBuildArray.map((depPath) => [depPath, onlyFromBuildGraph(Object.values(depGraph[depPath].children))])); + const graphSequencerResult = graph_sequencer_1.default({ + graph, + groups: [nodesToBuildArray] + }); + const chunks = graphSequencerResult.chunks; + const buildDepOpts = { ...opts, warn }; + const groups = chunks.map((chunk) => { + chunk = chunk.filter((depPath) => depGraph[depPath].requiresBuild && !depGraph[depPath].isBuilt); + if (opts.depsToBuild != null) { + chunk = chunk.filter((depPath) => opts.depsToBuild.has(depPath)); + } + return chunk.map((depPath) => async () => buildDependency(depPath, depGraph, buildDepOpts)); + }); + await run_groups_1.default((_a = opts.childConcurrency) !== null && _a !== void 0 ? _a : 4, groups); + }; + async function buildDependency(depPath, depGraph, opts) { + const depNode = depGraph[depPath]; + try { + await linkBinsOfDependencies(depNode, depGraph, opts); + const hasSideEffects = await lifecycle_1.runPostinstallHooks({ + depPath, + extraBinPaths: opts.extraBinPaths, + extraEnv: opts.extraEnv, + initCwd: opts.lockfileDir, + optional: depNode.optional, + pkgRoot: depNode.dir, + rawConfig: opts.rawConfig, + rootModulesDir: opts.rootModulesDir, + scriptShell: opts.scriptShell, + shellEmulator: opts.shellEmulator, + unsafePerm: opts.unsafePerm || false + }); + if (hasSideEffects && opts.sideEffectsCacheWrite) { + try { + await opts.storeController.upload(depNode.dir, { + engine: constants_1.ENGINE_NAME, + filesIndexFile: depNode.filesIndexFile + }); + } catch (err) { + if (err.statusCode === 403) { + logger_1.default.warn({ + message: `The store server disabled upload requests, could not upload ${depNode.dir}`, + prefix: opts.lockfileDir + }); + } else { + logger_1.default.warn({ + error: err, + message: `An error occurred while uploading ${depNode.dir}`, + prefix: opts.lockfileDir + }); + } + } + } + } catch (err) { + if (depNode.optional) { + const pkg = await read_package_json_1.fromDir(path_1.default.join(depNode.dir)); + core_loggers_1.skippedOptionalDependencyLogger.debug({ + details: err.toString(), + package: { + id: depNode.dir, + name: pkg.name, + version: pkg.version + }, + prefix: opts.lockfileDir, + reason: "build_failure" + }); + return; + } + throw err; + } + } + function getSubgraphToBuild(graph, entryNodes, nodesToBuild, walked) { + let currentShouldBeBuilt = false; + for (const depPath of entryNodes) { + if (!graph[depPath]) + continue; + if (nodesToBuild.has(depPath)) { + currentShouldBeBuilt = true; + } + if (walked.has(depPath)) + continue; + walked.add(depPath); + const childShouldBeBuilt = getSubgraphToBuild(graph, Object.values(graph[depPath].children), nodesToBuild, walked) || graph[depPath].requiresBuild; + if (childShouldBeBuilt) { + nodesToBuild.add(depPath); + currentShouldBeBuilt = true; + } + } + return currentShouldBeBuilt; + } + async function linkBinsOfDependencies(depNode, depGraph, opts) { + const childrenToLink = opts.optional ? depNode.children : Object.keys(depNode.children).reduce((nonOptionalChildren, childAlias) => { + if (!depNode.optionalDependencies.has(childAlias)) { + nonOptionalChildren[childAlias] = depNode.children[childAlias]; + } + return nonOptionalChildren; + }, {}); + const binPath = path_1.default.join(depNode.dir, "node_modules/.bin"); + const pkgNodes = [ + ...Object.entries(childrenToLink).map(([alias, childDepPath]) => ({ alias, dep: depGraph[childDepPath] })).filter(({ alias, dep }) => { + if (!dep) { + logger_1.default.debug({ message: `Failed to link bins of "${alias}" to "${binPath}". This is probably not an issue.` }); + return false; + } + return dep.hasBin && dep.installable !== false; + }).map(({ dep }) => dep), + depNode + ]; + const pkgs = await Promise.all(pkgNodes.map(async (dep) => { + var _a, _b; + return { + location: dep.dir, + manifest: (_b = await ((_a = dep.fetchingBundledManifest) === null || _a === void 0 ? void 0 : _a.call(dep))) !== null && _b !== void 0 ? _b : await read_package_json_1.fromDir(dep.dir) + }; + })); + await link_bins_1.linkBinsOfPackages(pkgs, binPath, { extendNodePath: opts.extendNodePath, warn: opts.warn }); + if (depNode.hasBundledDependencies) { + const bundledModules = path_1.default.join(depNode.dir, "node_modules"); + await link_bins_1.default(bundledModules, binPath, { extendNodePath: opts.extendNodePath, warn: opts.warn }); + } + } + exports2.linkBinsOfDependencies = linkBinsOfDependencies; + } +}); + +// ../hoist/lib/index.js +var require_lib82 = __commonJS({ + "../hoist/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var constants_1 = require_lib7(); + var link_bins_1 = __importDefault(require_lib70()); + var lockfile_utils_1 = require_lib53(); + var lockfile_walker_1 = __importDefault(require_lib54()); + var logger_1 = __importDefault(require_lib6()); + var matcher_1 = __importDefault(require_lib23()); + var symlink_dependency_1 = __importDefault(require_lib75()); + var dp = __importStar2(require_lib33()); + var hoistLogger = logger_1.default("hoist"); + async function hoistByLockfile(opts) { + var _a, _b; + if (opts.lockfile.packages == null) + return {}; + const { directDeps, step } = lockfile_walker_1.default(opts.lockfile, Object.keys(opts.lockfile.importers)); + const deps = [ + { + children: directDeps.reduce((acc, { alias, depPath }) => { + if (!acc[alias]) { + acc[alias] = depPath; + } + return acc; + }, {}), + depPath: "", + depth: -1 + }, + ...await getDependencies(step, 0) + ]; + const getAliasHoistType = createGetAliasHoistType(opts.publicHoistPattern, opts.privateHoistPattern); + const hoistedDependencies = await hoistGraph(deps, (_b = (_a = opts.lockfile.importers["."]) === null || _a === void 0 ? void 0 : _a.specifiers) !== null && _b !== void 0 ? _b : {}, { + getAliasHoistType + }); + await symlinkHoistedDependencies(hoistedDependencies, { + lockfile: opts.lockfile, + lockfileDir: opts.lockfileDir, + privateHoistedModulesDir: opts.privateHoistedModulesDir, + publicHoistedModulesDir: opts.publicHoistedModulesDir, + virtualStoreDir: opts.virtualStoreDir + }); + await linkAllBins(opts.privateHoistedModulesDir, { extendNodePath: opts.extendNodePath }); + return hoistedDependencies; + } + exports2.default = hoistByLockfile; + function createGetAliasHoistType(publicHoistPattern, privateHoistPattern) { + const publicMatcher = matcher_1.default(publicHoistPattern); + const privateMatcher = matcher_1.default(privateHoistPattern); + return (alias) => { + if (publicMatcher(alias)) + return "public"; + if (privateMatcher(alias)) + return "private"; + return false; + }; + } + async function linkAllBins(modulesDir, opts) { + const bin = path_1.default.join(modulesDir, ".bin"); + const warn = (message2, code) => { + if (code === "BINARIES_CONFLICT") + return; + logger_1.default.info({ message: message2, prefix: path_1.default.join(modulesDir, "../..") }); + }; + try { + await link_bins_1.default(modulesDir, bin, { allowExoticManifests: true, extendNodePath: opts.extendNodePath, warn }); + } catch (err) { + } + } + async function getDependencies(step, depth) { + const deps = []; + const nextSteps = []; + for (const { pkgSnapshot, depPath, next } of step.dependencies) { + const allDeps = { + ...pkgSnapshot.dependencies, + ...pkgSnapshot.optionalDependencies + }; + deps.push({ + children: Object.entries(allDeps).reduce((children, [alias, ref]) => { + children[alias] = dp.refToRelative(ref, alias); + return children; + }, {}), + depPath, + depth + }); + nextSteps.push(next()); + } + for (const depPath of step.missing) { + logger_1.default.debug({ message: `No entry for "${depPath}" in ${constants_1.WANTED_LOCKFILE}` }); + } + return (await Promise.all(nextSteps.map(async (nextStep) => getDependencies(nextStep, depth + 1)))).reduce((acc, deps2) => [...acc, ...deps2], deps); + } + async function hoistGraph(depNodes, currentSpecifiers, opts) { + const hoistedAliases = new Set(Object.keys(currentSpecifiers)); + const hoistedDependencies = {}; + depNodes.sort((a, b) => { + const depthDiff = a.depth - b.depth; + return depthDiff === 0 ? a.depPath.localeCompare(b.depPath) : depthDiff; + }).forEach((depNode) => { + for (const [childAlias, childPath] of Object.entries(depNode.children)) { + const hoist = opts.getAliasHoistType(childAlias); + if (!hoist) + continue; + const childAliasNormalized = childAlias.toLowerCase(); + if (hoistedAliases.has(childAliasNormalized)) { + continue; + } + hoistedAliases.add(childAliasNormalized); + if (!hoistedDependencies[childPath]) { + hoistedDependencies[childPath] = {}; + } + hoistedDependencies[childPath][childAlias] = hoist; + } + }); + return hoistedDependencies; + } + async function symlinkHoistedDependencies(hoistedDependencies, opts) { + await Promise.all(Object.entries(hoistedDependencies).map(async ([depPath, pkgAliases]) => { + const pkgSnapshot = opts.lockfile.packages[depPath]; + if (!pkgSnapshot) { + hoistLogger.debug({ hoistFailedFor: depPath }); + return; + } + const pkgName = lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot).name; + const modules = path_1.default.join(opts.virtualStoreDir, dp.depPathToFilename(depPath, opts.lockfileDir), "node_modules"); + const depLocation = path_1.default.join(modules, pkgName); + await Promise.all(Object.entries(pkgAliases).map(async ([pkgAlias, hoistType]) => { + const targetDir = hoistType === "public" ? opts.publicHoistedModulesDir : opts.privateHoistedModulesDir; + await symlink_dependency_1.default(depLocation, targetDir, pkgAlias); + })); + })); + } + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+pnp@2.3.2/node_modules/@yarnpkg/pnp/lib/index.js +var require_lib83 = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+pnp@2.3.2/node_modules/@yarnpkg/pnp/lib/index.js"(exports2, module2) { + module2.exports = (() => { + var __webpack_modules__ = { + 862: (__unused_webpack_module, __webpack_exports__, __webpack_require__2) => { + "use strict"; + __webpack_require__2.r(__webpack_exports__); + __webpack_require__2.d(__webpack_exports__, { + "LinkType": () => LinkType, + "generateInlinedScript": () => generateInlinedScript, + "generateSplitScript": () => generateSplitScript, + "hydratePnpFile": () => hydratePnpFile, + "hydratePnpSource": () => hydratePnpSource, + "makeRuntimeApi": () => makeRuntimeApi + }); + var LinkType; + (function(LinkType2) { + LinkType2["HARD"] = "HARD"; + LinkType2["SOFT"] = "SOFT"; + })(LinkType || (LinkType = {})); + var PrettyJsonState; + (function(PrettyJsonState2) { + PrettyJsonState2["DEFAULT"] = "DEFAULT"; + PrettyJsonState2["TOP_LEVEL"] = "TOP_LEVEL"; + PrettyJsonState2["FALLBACK_EXCLUSION_LIST"] = "FALLBACK_EXCLUSION_LIST"; + PrettyJsonState2["FALLBACK_EXCLUSION_ENTRIES"] = "FALLBACK_EXCLUSION_ENTRIES"; + PrettyJsonState2["FALLBACK_EXCLUSION_DATA"] = "FALLBACK_EXCLUSION_DATA"; + PrettyJsonState2["PACKAGE_REGISTRY_DATA"] = "PACKAGE_REGISTRY_DATA"; + PrettyJsonState2["PACKAGE_REGISTRY_ENTRIES"] = "PACKAGE_REGISTRY_ENTRIES"; + PrettyJsonState2["PACKAGE_STORE_DATA"] = "PACKAGE_STORE_DATA"; + PrettyJsonState2["PACKAGE_STORE_ENTRIES"] = "PACKAGE_STORE_ENTRIES"; + PrettyJsonState2["PACKAGE_INFORMATION_DATA"] = "PACKAGE_INFORMATION_DATA"; + PrettyJsonState2["PACKAGE_DEPENDENCIES"] = "PACKAGE_DEPENDENCIES"; + PrettyJsonState2["PACKAGE_DEPENDENCY"] = "PACKAGE_DEPENDENCY"; + })(PrettyJsonState || (PrettyJsonState = {})); + const prettyJsonMachine = { + [PrettyJsonState.DEFAULT]: { + collapsed: false, + next: { + [`*`]: PrettyJsonState.DEFAULT + } + }, + [PrettyJsonState.TOP_LEVEL]: { + collapsed: false, + next: { + [`fallbackExclusionList`]: PrettyJsonState.FALLBACK_EXCLUSION_LIST, + [`packageRegistryData`]: PrettyJsonState.PACKAGE_REGISTRY_DATA, + [`*`]: PrettyJsonState.DEFAULT + } + }, + [PrettyJsonState.FALLBACK_EXCLUSION_LIST]: { + collapsed: false, + next: { + [`*`]: PrettyJsonState.FALLBACK_EXCLUSION_ENTRIES + } + }, + [PrettyJsonState.FALLBACK_EXCLUSION_ENTRIES]: { + collapsed: true, + next: { + [`*`]: PrettyJsonState.FALLBACK_EXCLUSION_DATA + } + }, + [PrettyJsonState.FALLBACK_EXCLUSION_DATA]: { + collapsed: true, + next: { + [`*`]: PrettyJsonState.DEFAULT + } + }, + [PrettyJsonState.PACKAGE_REGISTRY_DATA]: { + collapsed: false, + next: { + [`*`]: PrettyJsonState.PACKAGE_REGISTRY_ENTRIES + } + }, + [PrettyJsonState.PACKAGE_REGISTRY_ENTRIES]: { + collapsed: true, + next: { + [`*`]: PrettyJsonState.PACKAGE_STORE_DATA + } + }, + [PrettyJsonState.PACKAGE_STORE_DATA]: { + collapsed: false, + next: { + [`*`]: PrettyJsonState.PACKAGE_STORE_ENTRIES + } + }, + [PrettyJsonState.PACKAGE_STORE_ENTRIES]: { + collapsed: true, + next: { + [`*`]: PrettyJsonState.PACKAGE_INFORMATION_DATA + } + }, + [PrettyJsonState.PACKAGE_INFORMATION_DATA]: { + collapsed: false, + next: { + [`packageDependencies`]: PrettyJsonState.PACKAGE_DEPENDENCIES, + [`*`]: PrettyJsonState.DEFAULT + } + }, + [PrettyJsonState.PACKAGE_DEPENDENCIES]: { + collapsed: false, + next: { + [`*`]: PrettyJsonState.PACKAGE_DEPENDENCY + } + }, + [PrettyJsonState.PACKAGE_DEPENDENCY]: { + collapsed: true, + next: { + [`*`]: PrettyJsonState.DEFAULT + } + } + }; + function generateCollapsedArray(data, state, indent) { + let result = ``; + result += `[`; + for (let t = 0, T = data.length; t < T; ++t) { + result += generateNext(String(t), data[t], state, indent).replace(/^ +/g, ``); + if (t + 1 < T) { + result += `, `; + } + } + result += `]`; + return result; + } + function generateExpandedArray(data, state, indent) { + const nextIndent = `${indent} `; + let result = ``; + result += indent; + result += `[ +`; + for (let t = 0, T = data.length; t < T; ++t) { + result += nextIndent + generateNext(String(t), data[t], state, nextIndent).replace(/^ +/, ``); + if (t + 1 < T) + result += `,`; + result += ` +`; + } + result += indent; + result += `]`; + return result; + } + function generateCollapsedObject(data, state, indent) { + const keys = Object.keys(data); + let result = ``; + result += `{`; + for (let t = 0, T = keys.length; t < T; ++t) { + const key = keys[t]; + const value = data[key]; + if (typeof value === `undefined`) + continue; + result += JSON.stringify(key); + result += `: `; + result += generateNext(key, value, state, indent).replace(/^ +/g, ``); + if (t + 1 < T) { + result += `, `; + } + } + result += `}`; + return result; + } + function generateExpandedObject(data, state, indent) { + const keys = Object.keys(data); + const nextIndent = `${indent} `; + let result = ``; + result += indent; + result += `{ +`; + for (let t = 0, T = keys.length; t < T; ++t) { + const key = keys[t]; + const value = data[key]; + if (typeof value === `undefined`) + continue; + result += nextIndent; + result += JSON.stringify(key); + result += `: `; + result += generateNext(key, value, state, nextIndent).replace(/^ +/g, ``); + if (t + 1 < T) + result += `,`; + result += ` +`; + } + result += indent; + result += `}`; + return result; + } + function generateNext(key, data, state, indent) { + const { + next + } = prettyJsonMachine[state]; + const nextState = next[key] || next[`*`]; + return generate(data, nextState, indent); + } + function generate(data, state, indent) { + const { + collapsed + } = prettyJsonMachine[state]; + if (Array.isArray(data)) { + if (collapsed) { + return generateCollapsedArray(data, state, indent); + } else { + return generateExpandedArray(data, state, indent); + } + } + if (typeof data === `object` && data !== null) { + if (collapsed) { + return generateCollapsedObject(data, state, indent); + } else { + return generateExpandedObject(data, state, indent); + } + } + return JSON.stringify(data); + } + function generatePrettyJson(data) { + return generate(data, PrettyJsonState.TOP_LEVEL, ``); + } + function sortMap(values, mappers) { + const asArray = Array.from(values); + if (!Array.isArray(mappers)) + mappers = [mappers]; + const stringified = []; + for (const mapper of mappers) + stringified.push(asArray.map((value) => mapper(value))); + const indices = asArray.map((_, index) => index); + indices.sort((a, b) => { + for (const layer of stringified) { + const comparison = layer[a] < layer[b] ? -1 : layer[a] > layer[b] ? 1 : 0; + if (comparison !== 0) { + return comparison; + } + } + return 0; + }); + return indices.map((index) => { + return asArray[index]; + }); + } + function generateFallbackExclusionList(settings) { + const fallbackExclusionList = new Map(); + const sortedData = sortMap(settings.fallbackExclusionList || [], [({ + name, + reference + }) => name, ({ + name, + reference + }) => reference]); + for (const { + name, + reference + } of sortedData) { + let references = fallbackExclusionList.get(name); + if (typeof references === `undefined`) + fallbackExclusionList.set(name, references = new Set()); + references.add(reference); + } + return Array.from(fallbackExclusionList).map(([name, references]) => { + return [name, Array.from(references)]; + }); + } + function generateFallbackPoolData(settings) { + return sortMap(settings.fallbackPool || [], ([name]) => name); + } + function generatePackageRegistryData(settings) { + const packageRegistryData = []; + for (const [packageName, packageStore] of sortMap(settings.packageRegistry, ([packageName2]) => packageName2 === null ? `0` : `1${packageName2}`)) { + const packageStoreData = []; + packageRegistryData.push([packageName, packageStoreData]); + for (const [packageReference, { + packageLocation, + packageDependencies, + packagePeers, + linkType, + discardFromLookup + }] of sortMap(packageStore, ([packageReference2]) => packageReference2 === null ? `0` : `1${packageReference2}`)) { + const normalizedDependencies = []; + if (packageName !== null && packageReference !== null && !packageDependencies.has(packageName)) + normalizedDependencies.push([packageName, packageReference]); + for (const [dependencyName, dependencyReference] of sortMap(packageDependencies.entries(), ([dependencyName2]) => dependencyName2)) + normalizedDependencies.push([dependencyName, dependencyReference]); + const normalizedPeers = packagePeers && packagePeers.size > 0 ? Array.from(packagePeers) : void 0; + const normalizedDiscardFromLookup = discardFromLookup ? discardFromLookup : void 0; + packageStoreData.push([packageReference, { + packageLocation, + packageDependencies: normalizedDependencies, + packagePeers: normalizedPeers, + linkType, + discardFromLookup: normalizedDiscardFromLookup + }]); + } + } + return packageRegistryData; + } + function generateLocationBlacklistData(settings) { + return sortMap(settings.blacklistedLocations || [], (location) => location); + } + function generateSerializedState(settings) { + return { + __info: [`This file is automatically generated. Do not touch it, or risk`, `your modifications being lost. We also recommend you not to read`, `it either without using the @yarnpkg/pnp package, as the data layout`, `is entirely unspecified and WILL change from a version to another.`], + dependencyTreeRoots: settings.dependencyTreeRoots, + enableTopLevelFallback: settings.enableTopLevelFallback || false, + ignorePatternData: settings.ignorePattern || null, + fallbackExclusionList: generateFallbackExclusionList(settings), + fallbackPool: generateFallbackPoolData(settings), + locationBlacklistData: generateLocationBlacklistData(settings), + packageRegistryData: generatePackageRegistryData(settings) + }; + } + var hook = __webpack_require__2(650); + var hook_default = /* @__PURE__ */ __webpack_require__2.n(hook); + function generateLoader(shebang, loader) { + return [shebang ? `${shebang} +` : ``, `/* eslint-disable */ + +`, `try { +`, ` Object.freeze({}).detectStrictMode = true; +`, `} catch (error) { +`, ` throw new Error(\`The whole PnP file got strict-mode-ified, which is known to break (Emscripten libraries aren't strict mode). This usually happens when the file goes through Babel.\`); +`, `} +`, ` +`, `var __non_webpack_module__ = module; +`, ` +`, `function $$SETUP_STATE(hydrateRuntimeState, basePath) { +`, loader.replace(/^/gm, ` `), `} +`, ` +`, hook_default()()].join(``); + } + function generateJsonString(data) { + return JSON.stringify(data, null, 2); + } + function generateInlinedSetup(data) { + return [`return hydrateRuntimeState(${generatePrettyJson(data)}, {basePath: basePath || __dirname}); +`].join(``); + } + function generateSplitSetup(dataLocation) { + return [`var path = require('path'); +`, `var dataLocation = path.resolve(__dirname, ${JSON.stringify(dataLocation)}); +`, `return hydrateRuntimeState(require(dataLocation), {basePath: basePath || path.dirname(dataLocation)}); +`].join(``); + } + function generateInlinedScript(settings) { + const data = generateSerializedState(settings); + const setup = generateInlinedSetup(data); + const loaderFile = generateLoader(settings.shebang, setup); + return loaderFile; + } + function generateSplitScript(settings) { + const data = generateSerializedState(settings); + const setup = generateSplitSetup(settings.dataLocation); + const loaderFile = generateLoader(settings.shebang, setup); + return { + dataFile: generateJsonString(data), + loaderFile + }; + } + const external_fs_namespaceObject = require("fs"); + ; + var external_fs_default = /* @__PURE__ */ __webpack_require__2.n(external_fs_namespaceObject); + const external_path_namespaceObject = require("path"); + ; + var external_path_default = /* @__PURE__ */ __webpack_require__2.n(external_path_namespaceObject); + const external_util_namespaceObject = require("util"); + ; + var PathType; + (function(PathType2) { + PathType2[PathType2["File"] = 0] = "File"; + PathType2[PathType2["Portable"] = 1] = "Portable"; + PathType2[PathType2["Native"] = 2] = "Native"; + })(PathType || (PathType = {})); + const PortablePath = { + root: `/`, + dot: `.` + }; + const Filename = { + nodeModules: `node_modules`, + manifest: `package.json`, + lockfile: `yarn.lock`, + pnpJs: `.pnp.js`, + rc: `.yarnrc.yml` + }; + const npath = Object.create(external_path_default()); + const ppath = Object.create(external_path_default().posix); + npath.cwd = () => process.cwd(); + ppath.cwd = () => toPortablePath(process.cwd()); + ppath.resolve = (...segments) => { + if (segments.length > 0 && ppath.isAbsolute(segments[0])) { + return external_path_default().posix.resolve(...segments); + } else { + return external_path_default().posix.resolve(ppath.cwd(), ...segments); + } + }; + const contains = function(pathUtils, from, to) { + from = pathUtils.normalize(from); + to = pathUtils.normalize(to); + if (from === to) + return `.`; + if (!from.endsWith(pathUtils.sep)) + from = from + pathUtils.sep; + if (to.startsWith(from)) { + return to.slice(from.length); + } else { + return null; + } + }; + npath.fromPortablePath = fromPortablePath; + npath.toPortablePath = toPortablePath; + npath.contains = (from, to) => contains(npath, from, to); + ppath.contains = (from, to) => contains(ppath, from, to); + const WINDOWS_PATH_REGEXP = /^([a-zA-Z]:.*)$/; + const UNC_WINDOWS_PATH_REGEXP = /^\\\\(\.\\)?(.*)$/; + const PORTABLE_PATH_REGEXP = /^\/([a-zA-Z]:.*)$/; + const UNC_PORTABLE_PATH_REGEXP = /^\/unc\/(\.dot\/)?(.*)$/; + function fromPortablePath(p) { + if (process.platform !== `win32`) + return p; + if (p.match(PORTABLE_PATH_REGEXP)) + p = p.replace(PORTABLE_PATH_REGEXP, `$1`); + else if (p.match(UNC_PORTABLE_PATH_REGEXP)) + p = p.replace(UNC_PORTABLE_PATH_REGEXP, (match, p1, p2) => `\\\\${p1 ? `.\\` : ``}${p2}`); + else + return p; + return p.replace(/\//g, `\\`); + } + function toPortablePath(p) { + if (process.platform !== `win32`) + return p; + if (p.match(WINDOWS_PATH_REGEXP)) + p = p.replace(WINDOWS_PATH_REGEXP, `/$1`); + else if (p.match(UNC_WINDOWS_PATH_REGEXP)) + p = p.replace(UNC_WINDOWS_PATH_REGEXP, (match, p1, p2) => `/unc/${p1 ? `.dot/` : ``}${p2}`); + return p.replace(/\\/g, `/`); + } + function convertPath(targetPathUtils, sourcePath) { + return targetPathUtils === npath ? fromPortablePath(sourcePath) : toPortablePath(sourcePath); + } + function toFilename(filename) { + if (npath.parse(filename).dir !== `` || ppath.parse(filename).dir !== ``) + throw new Error(`Invalid filename: "${filename}"`); + return filename; + } + function hydrateRuntimeState(data, { + basePath: basePath2 + }) { + const portablePath = npath.toPortablePath(basePath2); + const absolutePortablePath = ppath.resolve(portablePath); + const ignorePattern = data.ignorePatternData !== null ? new RegExp(data.ignorePatternData) : null; + const packageRegistry = new Map(data.packageRegistryData.map(([packageName, packageStoreData]) => { + return [packageName, new Map(packageStoreData.map(([packageReference, packageInformationData]) => { + return [packageReference, { + packageLocation: ppath.join(absolutePortablePath, packageInformationData.packageLocation), + packageDependencies: new Map(packageInformationData.packageDependencies), + packagePeers: new Set(packageInformationData.packagePeers), + linkType: packageInformationData.linkType, + discardFromLookup: packageInformationData.discardFromLookup || false + }]; + }))]; + })); + const packageLocatorsByLocations = new Map(); + const packageLocationLengths = new Set(); + for (const [packageName, storeData] of data.packageRegistryData) { + for (const [packageReference, packageInformationData] of storeData) { + if (packageName === null !== (packageReference === null)) + throw new Error(`Assertion failed: The name and reference should be null, or neither should`); + if (packageInformationData.discardFromLookup) + continue; + const packageLocator = { + name: packageName, + reference: packageReference + }; + packageLocatorsByLocations.set(packageInformationData.packageLocation, packageLocator); + packageLocationLengths.add(packageInformationData.packageLocation.length); + } + } + for (const location of data.locationBlacklistData) + packageLocatorsByLocations.set(location, null); + const fallbackExclusionList = new Map(data.fallbackExclusionList.map(([packageName, packageReferences]) => { + return [packageName, new Set(packageReferences)]; + })); + const fallbackPool = new Map(data.fallbackPool); + const dependencyTreeRoots = data.dependencyTreeRoots; + const enableTopLevelFallback = data.enableTopLevelFallback; + return { + basePath: portablePath, + dependencyTreeRoots, + enableTopLevelFallback, + fallbackExclusionList, + fallbackPool, + ignorePattern, + packageLocationLengths: [...packageLocationLengths].sort((a, b) => b - a), + packageLocatorsByLocations, + packageRegistry + }; + } + const external_os_namespaceObject = require("os"); + ; + const defaultTime = new Date(315532800 * 1e3); + async function copyPromise(destinationFs, destination, sourceFs, source, opts) { + const normalizedDestination = destinationFs.pathUtils.normalize(destination); + const normalizedSource = sourceFs.pathUtils.normalize(source); + const prelayout = []; + const postlayout = []; + await destinationFs.mkdirPromise(destinationFs.pathUtils.dirname(destination), { + recursive: true + }); + const updateTime = typeof destinationFs.lutimesPromise === `function` ? destinationFs.lutimesPromise.bind(destinationFs) : destinationFs.utimesPromise.bind(destinationFs); + await copyImpl(prelayout, postlayout, updateTime, destinationFs, normalizedDestination, sourceFs, normalizedSource, opts); + for (const operation of prelayout) + await operation(); + await Promise.all(postlayout.map((operation) => { + return operation(); + })); + } + async function copyImpl(prelayout, postlayout, updateTime, destinationFs, destination, sourceFs, source, opts) { + var _a, _b; + const destinationStat = await maybeLStat(destinationFs, destination); + const sourceStat = await sourceFs.lstatPromise(source); + const referenceTime = opts.stableTime ? { + mtime: defaultTime, + atime: defaultTime + } : sourceStat; + let updated; + switch (true) { + case sourceStat.isDirectory(): + { + updated = await copyFolder(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts); + } + break; + case sourceStat.isFile(): + { + updated = await copyFile(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts); + } + break; + case sourceStat.isSymbolicLink(): + { + updated = await copySymlink(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts); + } + break; + default: + { + throw new Error(`Unsupported file type (${sourceStat.mode})`); + } + break; + } + if (updated || ((_a = destinationStat === null || destinationStat === void 0 ? void 0 : destinationStat.mtime) === null || _a === void 0 ? void 0 : _a.getTime()) !== referenceTime.mtime.getTime() || ((_b = destinationStat === null || destinationStat === void 0 ? void 0 : destinationStat.atime) === null || _b === void 0 ? void 0 : _b.getTime()) !== referenceTime.atime.getTime()) { + postlayout.push(() => updateTime(destination, referenceTime.atime, referenceTime.mtime)); + updated = true; + } + if (destinationStat === null || (destinationStat.mode & 511) !== (sourceStat.mode & 511)) { + postlayout.push(() => destinationFs.chmodPromise(destination, sourceStat.mode & 511)); + updated = true; + } + return updated; + } + async function maybeLStat(baseFs, p) { + try { + return await baseFs.lstatPromise(p); + } catch (e) { + return null; + } + } + async function copyFolder(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts) { + if (destinationStat !== null && !destinationStat.isDirectory()) { + if (opts.overwrite) { + prelayout.push(async () => destinationFs.removePromise(destination)); + destinationStat = null; + } else { + return false; + } + } + let updated = false; + if (destinationStat === null) { + prelayout.push(async () => destinationFs.mkdirPromise(destination, { + mode: sourceStat.mode + })); + updated = true; + } + const entries = await sourceFs.readdirPromise(source); + if (opts.stableSort) { + for (const entry of entries.sort()) { + if (await copyImpl(prelayout, postlayout, updateTime, destinationFs, destinationFs.pathUtils.join(destination, entry), sourceFs, sourceFs.pathUtils.join(source, entry), opts)) { + updated = true; + } + } + } else { + const entriesUpdateStatus = await Promise.all(entries.map(async (entry) => { + await copyImpl(prelayout, postlayout, updateTime, destinationFs, destinationFs.pathUtils.join(destination, entry), sourceFs, sourceFs.pathUtils.join(source, entry), opts); + })); + if (entriesUpdateStatus.some((status) => status)) { + updated = true; + } + } + return updated; + } + async function copyFile(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts) { + if (destinationStat !== null) { + if (opts.overwrite) { + prelayout.push(async () => destinationFs.removePromise(destination)); + destinationStat = null; + } else { + return false; + } + } + const op = destinationFs === sourceFs ? async () => destinationFs.copyFilePromise(source, destination, external_fs_default().constants.COPYFILE_FICLONE) : async () => destinationFs.writeFilePromise(destination, await sourceFs.readFilePromise(source)); + prelayout.push(async () => op()); + return true; + } + async function copySymlink(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts) { + if (destinationStat !== null) { + if (opts.overwrite) { + prelayout.push(async () => destinationFs.removePromise(destination)); + destinationStat = null; + } else { + return false; + } + } + prelayout.push(async () => { + await destinationFs.symlinkPromise(convertPath(destinationFs.pathUtils, await sourceFs.readlinkPromise(source)), destination); + }); + return true; + } + class FakeFS { + constructor(pathUtils) { + this.pathUtils = pathUtils; + } + async *genTraversePromise(init, { + stableSort = false + } = {}) { + const stack2 = [init]; + while (stack2.length > 0) { + const p = stack2.shift(); + const entry = await this.lstatPromise(p); + if (entry.isDirectory()) { + const entries = await this.readdirPromise(p); + if (stableSort) { + for (const entry2 of entries.sort()) { + stack2.push(this.pathUtils.join(p, entry2)); + } + } else { + throw new Error(`Not supported`); + } + } else { + yield p; + } + } + } + async removePromise(p, { + recursive = true, + maxRetries = 5 + } = {}) { + let stat; + try { + stat = await this.lstatPromise(p); + } catch (error) { + if (error.code === `ENOENT`) { + return; + } else { + throw error; + } + } + if (stat.isDirectory()) { + if (recursive) + for (const entry of await this.readdirPromise(p)) + await this.removePromise(this.pathUtils.resolve(p, entry)); + let t = 0; + do { + try { + await this.rmdirPromise(p); + break; + } catch (error) { + if (error.code === `EBUSY` || error.code === `ENOTEMPTY`) { + if (maxRetries === 0) { + break; + } else { + await new Promise((resolve) => setTimeout(resolve, t * 100)); + continue; + } + } else { + throw error; + } + } + } while (t++ < maxRetries); + } else { + await this.unlinkPromise(p); + } + } + removeSync(p, { + recursive = true + } = {}) { + let stat; + try { + stat = this.lstatSync(p); + } catch (error) { + if (error.code === `ENOENT`) { + return; + } else { + throw error; + } + } + if (stat.isDirectory()) { + if (recursive) + for (const entry of this.readdirSync(p)) + this.removeSync(this.pathUtils.resolve(p, entry)); + this.rmdirSync(p); + } else { + this.unlinkSync(p); + } + } + async mkdirpPromise(p, { + chmod, + utimes + } = {}) { + p = this.resolve(p); + if (p === this.pathUtils.dirname(p)) + return; + const parts = p.split(this.pathUtils.sep); + for (let u = 2; u <= parts.length; ++u) { + const subPath = parts.slice(0, u).join(this.pathUtils.sep); + if (!this.existsSync(subPath)) { + try { + await this.mkdirPromise(subPath); + } catch (error) { + if (error.code === `EEXIST`) { + continue; + } else { + throw error; + } + } + if (chmod != null) + await this.chmodPromise(subPath, chmod); + if (utimes != null) { + await this.utimesPromise(subPath, utimes[0], utimes[1]); + } else { + const parentStat = await this.statPromise(this.pathUtils.dirname(subPath)); + await this.utimesPromise(subPath, parentStat.atime, parentStat.mtime); + } + } + } + } + mkdirpSync(p, { + chmod, + utimes + } = {}) { + p = this.resolve(p); + if (p === this.pathUtils.dirname(p)) + return; + const parts = p.split(this.pathUtils.sep); + for (let u = 2; u <= parts.length; ++u) { + const subPath = parts.slice(0, u).join(this.pathUtils.sep); + if (!this.existsSync(subPath)) { + try { + this.mkdirSync(subPath); + } catch (error) { + if (error.code === `EEXIST`) { + continue; + } else { + throw error; + } + } + if (chmod != null) + this.chmodSync(subPath, chmod); + if (utimes != null) { + this.utimesSync(subPath, utimes[0], utimes[1]); + } else { + const parentStat = this.statSync(this.pathUtils.dirname(subPath)); + this.utimesSync(subPath, parentStat.atime, parentStat.mtime); + } + } + } + } + async copyPromise(destination, source, { + baseFs = this, + overwrite = true, + stableSort = false, + stableTime = false + } = {}) { + return await copyPromise(this, destination, baseFs, source, { + overwrite, + stableSort, + stableTime + }); + } + copySync(destination, source, { + baseFs = this, + overwrite = true + } = {}) { + const stat = baseFs.lstatSync(source); + const exists = this.existsSync(destination); + if (stat.isDirectory()) { + this.mkdirpSync(destination); + const directoryListing = baseFs.readdirSync(source); + for (const entry of directoryListing) { + this.copySync(this.pathUtils.join(destination, entry), baseFs.pathUtils.join(source, entry), { + baseFs, + overwrite + }); + } + } else if (stat.isFile()) { + if (!exists || overwrite) { + if (exists) + this.removeSync(destination); + const content = baseFs.readFileSync(source); + this.writeFileSync(destination, content); + } + } else if (stat.isSymbolicLink()) { + if (!exists || overwrite) { + if (exists) + this.removeSync(destination); + const target = baseFs.readlinkSync(source); + this.symlinkSync(convertPath(this.pathUtils, target), destination); + } + } else { + throw new Error(`Unsupported file type (file: ${source}, mode: 0o${stat.mode.toString(8).padStart(6, `0`)})`); + } + const mode = stat.mode & 511; + this.chmodSync(destination, mode); + } + async changeFilePromise(p, content, opts = {}) { + if (Buffer.isBuffer(content)) { + return this.changeFileBufferPromise(p, content); + } else { + return this.changeFileTextPromise(p, content, opts); + } + } + async changeFileBufferPromise(p, content) { + let current = Buffer.alloc(0); + try { + current = await this.readFilePromise(p); + } catch (error) { + } + if (Buffer.compare(current, content) === 0) + return; + await this.writeFilePromise(p, content); + } + async changeFileTextPromise(p, content, { + automaticNewlines + } = {}) { + let current = ``; + try { + current = await this.readFilePromise(p, `utf8`); + } catch (error) { + } + const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; + if (current === normalizedContent) + return; + await this.writeFilePromise(p, normalizedContent); + } + changeFileSync(p, content, opts = {}) { + if (Buffer.isBuffer(content)) { + return this.changeFileBufferSync(p, content); + } else { + return this.changeFileTextSync(p, content, opts); + } + } + changeFileBufferSync(p, content) { + let current = Buffer.alloc(0); + try { + current = this.readFileSync(p); + } catch (error) { + } + if (Buffer.compare(current, content) === 0) + return; + this.writeFileSync(p, content); + } + changeFileTextSync(p, content, { + automaticNewlines = false + } = {}) { + let current = ``; + try { + current = this.readFileSync(p, `utf8`); + } catch (error) { + } + const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; + if (current === normalizedContent) + return; + this.writeFileSync(p, normalizedContent); + } + async movePromise(fromP, toP) { + try { + await this.renamePromise(fromP, toP); + } catch (error) { + if (error.code === `EXDEV`) { + await this.copyPromise(toP, fromP); + await this.removePromise(fromP); + } else { + throw error; + } + } + } + moveSync(fromP, toP) { + try { + this.renameSync(fromP, toP); + } catch (error) { + if (error.code === `EXDEV`) { + this.copySync(toP, fromP); + this.removeSync(fromP); + } else { + throw error; + } + } + } + async lockPromise(affectedPath, callback) { + const lockPath = `${affectedPath}.flock`; + const interval = 1e3 / 60; + const startTime = Date.now(); + let fd = null; + const isAlive = async () => { + let pid; + try { + [pid] = await this.readJsonPromise(lockPath); + } catch (error) { + return Date.now() - startTime < 500; + } + try { + process.kill(pid, 0); + return true; + } catch (error) { + return false; + } + }; + while (fd === null) { + try { + fd = await this.openPromise(lockPath, `wx`); + } catch (error) { + if (error.code === `EEXIST`) { + if (!await isAlive()) { + try { + await this.unlinkPromise(lockPath); + continue; + } catch (error2) { + } + } + if (Date.now() - startTime < 60 * 1e3) { + await new Promise((resolve) => setTimeout(resolve, interval)); + } else { + throw new Error(`Couldn't acquire a lock in a reasonable time (via ${lockPath})`); + } + } else { + throw error; + } + } + } + await this.writePromise(fd, JSON.stringify([process.pid])); + try { + return await callback(); + } finally { + try { + await this.closePromise(fd); + await this.unlinkPromise(lockPath); + } catch (error) { + } + } + } + async readJsonPromise(p) { + const content = await this.readFilePromise(p, `utf8`); + try { + return JSON.parse(content); + } catch (error) { + error.message += ` (in ${p})`; + throw error; + } + } + readJsonSync(p) { + const content = this.readFileSync(p, `utf8`); + try { + return JSON.parse(content); + } catch (error) { + error.message += ` (in ${p})`; + throw error; + } + } + async writeJsonPromise(p, data) { + return await this.writeFilePromise(p, `${JSON.stringify(data, null, 2)} +`); + } + writeJsonSync(p, data) { + return this.writeFileSync(p, `${JSON.stringify(data, null, 2)} +`); + } + async preserveTimePromise(p, cb) { + const stat = await this.lstatPromise(p); + const result = await cb(); + if (typeof result !== `undefined`) + p = result; + if (this.lutimesPromise) { + await this.lutimesPromise(p, stat.atime, stat.mtime); + } else if (!stat.isSymbolicLink()) { + await this.utimesPromise(p, stat.atime, stat.mtime); + } + } + async preserveTimeSync(p, cb) { + const stat = this.lstatSync(p); + const result = cb(); + if (typeof result !== `undefined`) + p = result; + if (this.lutimesSync) { + this.lutimesSync(p, stat.atime, stat.mtime); + } else if (!stat.isSymbolicLink()) { + this.utimesSync(p, stat.atime, stat.mtime); + } + } + } + FakeFS.DEFAULT_TIME = 315532800; + class BasePortableFakeFS extends FakeFS { + constructor() { + super(ppath); + } + } + function getEndOfLine(content) { + const matches = content.match(/\r?\n/g); + if (matches === null) + return external_os_namespaceObject.EOL; + const crlf = matches.filter((nl) => nl === `\r +`).length; + const lf = matches.length - crlf; + return crlf > lf ? `\r +` : ` +`; + } + function normalizeLineEndings(originalContent, newContent) { + return newContent.replace(/\r?\n/g, getEndOfLine(originalContent)); + } + function makeError(code, message2) { + return Object.assign(new Error(`${code}: ${message2}`), { + code + }); + } + function EBUSY(message2) { + return makeError(`EBUSY`, message2); + } + function ENOSYS(message2, reason) { + return makeError(`ENOSYS`, `${message2}, ${reason}`); + } + function EINVAL(reason) { + return makeError(`EINVAL`, `invalid argument, ${reason}`); + } + function EBADF(reason) { + return makeError(`EBADF`, `bad file descriptor, ${reason}`); + } + function ENOENT(reason) { + return makeError(`ENOENT`, `no such file or directory, ${reason}`); + } + function ENOTDIR(reason) { + return makeError(`ENOTDIR`, `not a directory, ${reason}`); + } + function EISDIR(reason) { + return makeError(`EISDIR`, `illegal operation on a directory, ${reason}`); + } + function EEXIST(reason) { + return makeError(`EEXIST`, `file already exists, ${reason}`); + } + function EROFS(reason) { + return makeError(`EROFS`, `read-only filesystem, ${reason}`); + } + function ENOTEMPTY(reason) { + return makeError(`ENOTEMPTY`, `directory not empty, ${reason}`); + } + function EOPNOTSUPP(reason) { + return makeError(`EOPNOTSUPP`, `operation not supported, ${reason}`); + } + function ERR_DIR_CLOSED() { + return makeError(`ERR_DIR_CLOSED`, `Directory handle was closed`); + } + class LibzipError extends Error { + constructor(message2, code) { + super(message2); + this.name = `Libzip Error`; + this.code = code; + } + } + class NodeFS extends BasePortableFakeFS { + constructor(realFs = external_fs_default()) { + super(); + this.realFs = realFs; + if (typeof this.realFs.lutimes !== `undefined`) { + this.lutimesPromise = this.lutimesPromiseImpl; + this.lutimesSync = this.lutimesSyncImpl; + } + } + getExtractHint() { + return false; + } + getRealPath() { + return PortablePath.root; + } + resolve(p) { + return ppath.resolve(p); + } + async openPromise(p, flags, mode) { + return await new Promise((resolve, reject) => { + this.realFs.open(npath.fromPortablePath(p), flags, mode, this.makeCallback(resolve, reject)); + }); + } + openSync(p, flags, mode) { + return this.realFs.openSync(npath.fromPortablePath(p), flags, mode); + } + async opendirPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (typeof opts !== `undefined`) { + this.realFs.opendir(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.opendir(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + } + }).then((dir) => { + return Object.defineProperty(dir, `path`, { + value: p, + configurable: true, + writable: true + }); + }); + } + opendirSync(p, opts) { + const dir = typeof opts !== `undefined` ? this.realFs.opendirSync(npath.fromPortablePath(p), opts) : this.realFs.opendirSync(npath.fromPortablePath(p)); + return Object.defineProperty(dir, `path`, { + value: p, + configurable: true, + writable: true + }); + } + async readPromise(fd, buffer, offset = 0, length = 0, position = -1) { + return await new Promise((resolve, reject) => { + this.realFs.read(fd, buffer, offset, length, position, (error, bytesRead) => { + if (error) { + reject(error); + } else { + resolve(bytesRead); + } + }); + }); + } + readSync(fd, buffer, offset, length, position) { + return this.realFs.readSync(fd, buffer, offset, length, position); + } + async writePromise(fd, buffer, offset, length, position) { + return await new Promise((resolve, reject) => { + if (typeof buffer === `string`) { + return this.realFs.write(fd, buffer, offset, this.makeCallback(resolve, reject)); + } else { + return this.realFs.write(fd, buffer, offset, length, position, this.makeCallback(resolve, reject)); + } + }); + } + writeSync(fd, buffer, offset, length, position) { + if (typeof buffer === `string`) { + return this.realFs.writeSync(fd, buffer, offset); + } else { + return this.realFs.writeSync(fd, buffer, offset, length, position); + } + } + async closePromise(fd) { + await new Promise((resolve, reject) => { + this.realFs.close(fd, this.makeCallback(resolve, reject)); + }); + } + closeSync(fd) { + this.realFs.closeSync(fd); + } + createReadStream(p, opts) { + const realPath = p !== null ? npath.fromPortablePath(p) : p; + return this.realFs.createReadStream(realPath, opts); + } + createWriteStream(p, opts) { + const realPath = p !== null ? npath.fromPortablePath(p) : p; + return this.realFs.createWriteStream(realPath, opts); + } + async realpathPromise(p) { + return await new Promise((resolve, reject) => { + this.realFs.realpath(npath.fromPortablePath(p), {}, this.makeCallback(resolve, reject)); + }).then((path) => { + return npath.toPortablePath(path); + }); + } + realpathSync(p) { + return npath.toPortablePath(this.realFs.realpathSync(npath.fromPortablePath(p), {})); + } + async existsPromise(p) { + return await new Promise((resolve) => { + this.realFs.exists(npath.fromPortablePath(p), resolve); + }); + } + accessSync(p, mode) { + return this.realFs.accessSync(npath.fromPortablePath(p), mode); + } + async accessPromise(p, mode) { + return await new Promise((resolve, reject) => { + this.realFs.access(npath.fromPortablePath(p), mode, this.makeCallback(resolve, reject)); + }); + } + existsSync(p) { + return this.realFs.existsSync(npath.fromPortablePath(p)); + } + async statPromise(p) { + return await new Promise((resolve, reject) => { + this.realFs.stat(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + }); + } + statSync(p) { + return this.realFs.statSync(npath.fromPortablePath(p)); + } + async lstatPromise(p) { + return await new Promise((resolve, reject) => { + this.realFs.lstat(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + }); + } + lstatSync(p) { + return this.realFs.lstatSync(npath.fromPortablePath(p)); + } + async chmodPromise(p, mask) { + return await new Promise((resolve, reject) => { + this.realFs.chmod(npath.fromPortablePath(p), mask, this.makeCallback(resolve, reject)); + }); + } + chmodSync(p, mask) { + return this.realFs.chmodSync(npath.fromPortablePath(p), mask); + } + async chownPromise(p, uid, gid) { + return await new Promise((resolve, reject) => { + this.realFs.chown(npath.fromPortablePath(p), uid, gid, this.makeCallback(resolve, reject)); + }); + } + chownSync(p, uid, gid) { + return this.realFs.chownSync(npath.fromPortablePath(p), uid, gid); + } + async renamePromise(oldP, newP) { + return await new Promise((resolve, reject) => { + this.realFs.rename(npath.fromPortablePath(oldP), npath.fromPortablePath(newP), this.makeCallback(resolve, reject)); + }); + } + renameSync(oldP, newP) { + return this.realFs.renameSync(npath.fromPortablePath(oldP), npath.fromPortablePath(newP)); + } + async copyFilePromise(sourceP, destP, flags = 0) { + return await new Promise((resolve, reject) => { + this.realFs.copyFile(npath.fromPortablePath(sourceP), npath.fromPortablePath(destP), flags, this.makeCallback(resolve, reject)); + }); + } + copyFileSync(sourceP, destP, flags = 0) { + return this.realFs.copyFileSync(npath.fromPortablePath(sourceP), npath.fromPortablePath(destP), flags); + } + async appendFilePromise(p, content, opts) { + return await new Promise((resolve, reject) => { + const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p; + if (opts) { + this.realFs.appendFile(fsNativePath, content, opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.appendFile(fsNativePath, content, this.makeCallback(resolve, reject)); + } + }); + } + appendFileSync(p, content, opts) { + const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p; + if (opts) { + this.realFs.appendFileSync(fsNativePath, content, opts); + } else { + this.realFs.appendFileSync(fsNativePath, content); + } + } + async writeFilePromise(p, content, opts) { + return await new Promise((resolve, reject) => { + const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p; + if (opts) { + this.realFs.writeFile(fsNativePath, content, opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.writeFile(fsNativePath, content, this.makeCallback(resolve, reject)); + } + }); + } + writeFileSync(p, content, opts) { + const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p; + if (opts) { + this.realFs.writeFileSync(fsNativePath, content, opts); + } else { + this.realFs.writeFileSync(fsNativePath, content); + } + } + async unlinkPromise(p) { + return await new Promise((resolve, reject) => { + this.realFs.unlink(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + }); + } + unlinkSync(p) { + return this.realFs.unlinkSync(npath.fromPortablePath(p)); + } + async utimesPromise(p, atime, mtime) { + return await new Promise((resolve, reject) => { + this.realFs.utimes(npath.fromPortablePath(p), atime, mtime, this.makeCallback(resolve, reject)); + }); + } + utimesSync(p, atime, mtime) { + this.realFs.utimesSync(npath.fromPortablePath(p), atime, mtime); + } + async lutimesPromiseImpl(p, atime, mtime) { + const lutimes = this.realFs.lutimes; + if (typeof lutimes === `undefined`) + throw ENOSYS(`unavailable Node binding`, `lutimes '${p}'`); + return await new Promise((resolve, reject) => { + lutimes.call(this.realFs, npath.fromPortablePath(p), atime, mtime, this.makeCallback(resolve, reject)); + }); + } + lutimesSyncImpl(p, atime, mtime) { + const lutimesSync = this.realFs.lutimesSync; + if (typeof lutimesSync === `undefined`) + throw ENOSYS(`unavailable Node binding`, `lutimes '${p}'`); + lutimesSync.call(this.realFs, npath.fromPortablePath(p), atime, mtime); + } + async mkdirPromise(p, opts) { + return await new Promise((resolve, reject) => { + this.realFs.mkdir(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + }); + } + mkdirSync(p, opts) { + return this.realFs.mkdirSync(npath.fromPortablePath(p), opts); + } + async rmdirPromise(p, opts) { + return await new Promise((resolve, reject) => { + if (opts) { + this.realFs.rmdir(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); + } else { + this.realFs.rmdir(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + } + }); + } + rmdirSync(p, opts) { + return this.realFs.rmdirSync(npath.fromPortablePath(p), opts); + } + async linkPromise(existingP, newP) { + return await new Promise((resolve, reject) => { + this.realFs.link(npath.fromPortablePath(existingP), npath.fromPortablePath(newP), this.makeCallback(resolve, reject)); + }); + } + linkSync(existingP, newP) { + return this.realFs.linkSync(npath.fromPortablePath(existingP), npath.fromPortablePath(newP)); + } + async symlinkPromise(target, p, type) { + const symlinkType = type || (target.endsWith(`/`) ? `dir` : `file`); + return await new Promise((resolve, reject) => { + this.realFs.symlink(npath.fromPortablePath(target.replace(/\/+$/, ``)), npath.fromPortablePath(p), symlinkType, this.makeCallback(resolve, reject)); + }); + } + symlinkSync(target, p, type) { + const symlinkType = type || (target.endsWith(`/`) ? `dir` : `file`); + return this.realFs.symlinkSync(npath.fromPortablePath(target.replace(/\/+$/, ``)), npath.fromPortablePath(p), symlinkType); + } + async readFilePromise(p, encoding) { + return await new Promise((resolve, reject) => { + const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p; + this.realFs.readFile(fsNativePath, encoding, this.makeCallback(resolve, reject)); + }); + } + readFileSync(p, encoding) { + const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p; + return this.realFs.readFileSync(fsNativePath, encoding); + } + async readdirPromise(p, { + withFileTypes + } = {}) { + return await new Promise((resolve, reject) => { + if (withFileTypes) { + this.realFs.readdir(npath.fromPortablePath(p), { + withFileTypes: true + }, this.makeCallback(resolve, reject)); + } else { + this.realFs.readdir(npath.fromPortablePath(p), this.makeCallback((value) => resolve(value), reject)); + } + }); + } + readdirSync(p, { + withFileTypes + } = {}) { + if (withFileTypes) { + return this.realFs.readdirSync(npath.fromPortablePath(p), { + withFileTypes: true + }); + } else { + return this.realFs.readdirSync(npath.fromPortablePath(p)); + } + } + async readlinkPromise(p) { + return await new Promise((resolve, reject) => { + this.realFs.readlink(npath.fromPortablePath(p), this.makeCallback(resolve, reject)); + }).then((path) => { + return npath.toPortablePath(path); + }); + } + readlinkSync(p) { + return npath.toPortablePath(this.realFs.readlinkSync(npath.fromPortablePath(p))); + } + async truncatePromise(p, len) { + return await new Promise((resolve, reject) => { + this.realFs.truncate(npath.fromPortablePath(p), len, this.makeCallback(resolve, reject)); + }); + } + truncateSync(p, len) { + return this.realFs.truncateSync(npath.fromPortablePath(p), len); + } + watch(p, a, b) { + return this.realFs.watch(npath.fromPortablePath(p), a, b); + } + watchFile(p, a, b) { + return this.realFs.watchFile(npath.fromPortablePath(p), a, b); + } + unwatchFile(p, cb) { + return this.realFs.unwatchFile(npath.fromPortablePath(p), cb); + } + makeCallback(resolve, reject) { + return (err, result) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }; + } + } + class ProxiedFS extends FakeFS { + getExtractHint(hints) { + return this.baseFs.getExtractHint(hints); + } + resolve(path) { + return this.mapFromBase(this.baseFs.resolve(this.mapToBase(path))); + } + getRealPath() { + return this.mapFromBase(this.baseFs.getRealPath()); + } + async openPromise(p, flags, mode) { + return this.baseFs.openPromise(this.mapToBase(p), flags, mode); + } + openSync(p, flags, mode) { + return this.baseFs.openSync(this.mapToBase(p), flags, mode); + } + async opendirPromise(p, opts) { + return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(p), opts), { + path: p + }); + } + opendirSync(p, opts) { + return Object.assign(this.baseFs.opendirSync(this.mapToBase(p), opts), { + path: p + }); + } + async readPromise(fd, buffer, offset, length, position) { + return await this.baseFs.readPromise(fd, buffer, offset, length, position); + } + readSync(fd, buffer, offset, length, position) { + return this.baseFs.readSync(fd, buffer, offset, length, position); + } + async writePromise(fd, buffer, offset, length, position) { + if (typeof buffer === `string`) { + return await this.baseFs.writePromise(fd, buffer, offset); + } else { + return await this.baseFs.writePromise(fd, buffer, offset, length, position); + } + } + writeSync(fd, buffer, offset, length, position) { + if (typeof buffer === `string`) { + return this.baseFs.writeSync(fd, buffer, offset); + } else { + return this.baseFs.writeSync(fd, buffer, offset, length, position); + } + } + async closePromise(fd) { + return this.baseFs.closePromise(fd); + } + closeSync(fd) { + this.baseFs.closeSync(fd); + } + createReadStream(p, opts) { + return this.baseFs.createReadStream(p !== null ? this.mapToBase(p) : p, opts); + } + createWriteStream(p, opts) { + return this.baseFs.createWriteStream(p !== null ? this.mapToBase(p) : p, opts); + } + async realpathPromise(p) { + return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(p))); + } + realpathSync(p) { + return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(p))); + } + async existsPromise(p) { + return this.baseFs.existsPromise(this.mapToBase(p)); + } + existsSync(p) { + return this.baseFs.existsSync(this.mapToBase(p)); + } + accessSync(p, mode) { + return this.baseFs.accessSync(this.mapToBase(p), mode); + } + async accessPromise(p, mode) { + return this.baseFs.accessPromise(this.mapToBase(p), mode); + } + async statPromise(p) { + return this.baseFs.statPromise(this.mapToBase(p)); + } + statSync(p) { + return this.baseFs.statSync(this.mapToBase(p)); + } + async lstatPromise(p) { + return this.baseFs.lstatPromise(this.mapToBase(p)); + } + lstatSync(p) { + return this.baseFs.lstatSync(this.mapToBase(p)); + } + async chmodPromise(p, mask) { + return this.baseFs.chmodPromise(this.mapToBase(p), mask); + } + chmodSync(p, mask) { + return this.baseFs.chmodSync(this.mapToBase(p), mask); + } + async chownPromise(p, uid, gid) { + return this.baseFs.chownPromise(this.mapToBase(p), uid, gid); + } + chownSync(p, uid, gid) { + return this.baseFs.chownSync(this.mapToBase(p), uid, gid); + } + async renamePromise(oldP, newP) { + return this.baseFs.renamePromise(this.mapToBase(oldP), this.mapToBase(newP)); + } + renameSync(oldP, newP) { + return this.baseFs.renameSync(this.mapToBase(oldP), this.mapToBase(newP)); + } + async copyFilePromise(sourceP, destP, flags = 0) { + return this.baseFs.copyFilePromise(this.mapToBase(sourceP), this.mapToBase(destP), flags); + } + copyFileSync(sourceP, destP, flags = 0) { + return this.baseFs.copyFileSync(this.mapToBase(sourceP), this.mapToBase(destP), flags); + } + async appendFilePromise(p, content, opts) { + return this.baseFs.appendFilePromise(this.fsMapToBase(p), content, opts); + } + appendFileSync(p, content, opts) { + return this.baseFs.appendFileSync(this.fsMapToBase(p), content, opts); + } + async writeFilePromise(p, content, opts) { + return this.baseFs.writeFilePromise(this.fsMapToBase(p), content, opts); + } + writeFileSync(p, content, opts) { + return this.baseFs.writeFileSync(this.fsMapToBase(p), content, opts); + } + async unlinkPromise(p) { + return this.baseFs.unlinkPromise(this.mapToBase(p)); + } + unlinkSync(p) { + return this.baseFs.unlinkSync(this.mapToBase(p)); + } + async utimesPromise(p, atime, mtime) { + return this.baseFs.utimesPromise(this.mapToBase(p), atime, mtime); + } + utimesSync(p, atime, mtime) { + return this.baseFs.utimesSync(this.mapToBase(p), atime, mtime); + } + async mkdirPromise(p, opts) { + return this.baseFs.mkdirPromise(this.mapToBase(p), opts); + } + mkdirSync(p, opts) { + return this.baseFs.mkdirSync(this.mapToBase(p), opts); + } + async rmdirPromise(p, opts) { + return this.baseFs.rmdirPromise(this.mapToBase(p), opts); + } + rmdirSync(p, opts) { + return this.baseFs.rmdirSync(this.mapToBase(p), opts); + } + async linkPromise(existingP, newP) { + return this.baseFs.linkPromise(this.mapToBase(existingP), this.mapToBase(newP)); + } + linkSync(existingP, newP) { + return this.baseFs.linkSync(this.mapToBase(existingP), this.mapToBase(newP)); + } + async symlinkPromise(target, p, type) { + return this.baseFs.symlinkPromise(this.mapToBase(target), this.mapToBase(p), type); + } + symlinkSync(target, p, type) { + return this.baseFs.symlinkSync(this.mapToBase(target), this.mapToBase(p), type); + } + async readFilePromise(p, encoding) { + if (encoding === `utf8`) { + return this.baseFs.readFilePromise(this.fsMapToBase(p), encoding); + } else { + return this.baseFs.readFilePromise(this.fsMapToBase(p), encoding); + } + } + readFileSync(p, encoding) { + if (encoding === `utf8`) { + return this.baseFs.readFileSync(this.fsMapToBase(p), encoding); + } else { + return this.baseFs.readFileSync(this.fsMapToBase(p), encoding); + } + } + async readdirPromise(p, { + withFileTypes + } = {}) { + return this.baseFs.readdirPromise(this.mapToBase(p), { + withFileTypes + }); + } + readdirSync(p, { + withFileTypes + } = {}) { + return this.baseFs.readdirSync(this.mapToBase(p), { + withFileTypes + }); + } + async readlinkPromise(p) { + return this.mapFromBase(await this.baseFs.readlinkPromise(this.mapToBase(p))); + } + readlinkSync(p) { + return this.mapFromBase(this.baseFs.readlinkSync(this.mapToBase(p))); + } + async truncatePromise(p, len) { + return this.baseFs.truncatePromise(this.mapToBase(p), len); + } + truncateSync(p, len) { + return this.baseFs.truncateSync(this.mapToBase(p), len); + } + watch(p, a, b) { + return this.baseFs.watch(this.mapToBase(p), a, b); + } + watchFile(p, a, b) { + return this.baseFs.watchFile(this.mapToBase(p), a, b); + } + unwatchFile(p, cb) { + return this.baseFs.unwatchFile(this.mapToBase(p), cb); + } + fsMapToBase(p) { + if (typeof p === `number`) { + return p; + } else { + return this.mapToBase(p); + } + } + } + const NUMBER_REGEXP = /^[0-9]+$/; + const VIRTUAL_REGEXP = /^(\/(?:[^/]+\/)*?\$\$virtual)((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/; + const VALID_COMPONENT = /^([^/]+-)?[a-f0-9]+$/; + class VirtualFS extends ProxiedFS { + constructor({ + baseFs = new NodeFS() + } = {}) { + super(ppath); + this.baseFs = baseFs; + } + static makeVirtualPath(base, component, to) { + if (ppath.basename(base) !== `$$virtual`) + throw new Error(`Assertion failed: Virtual folders must be named "$$virtual"`); + if (!ppath.basename(component).match(VALID_COMPONENT)) + throw new Error(`Assertion failed: Virtual components must be ended by an hexadecimal hash`); + const target = ppath.relative(ppath.dirname(base), to); + const segments = target.split(`/`); + let depth = 0; + while (depth < segments.length && segments[depth] === `..`) + depth += 1; + const finalSegments = segments.slice(depth); + const fullVirtualPath = ppath.join(base, component, String(depth), ...finalSegments); + return fullVirtualPath; + } + static resolveVirtual(p) { + const match = p.match(VIRTUAL_REGEXP); + if (!match || !match[3] && match[5]) + return p; + const target = ppath.dirname(match[1]); + if (!match[3] || !match[4]) + return target; + const isnum = NUMBER_REGEXP.test(match[4]); + if (!isnum) + return p; + const depth = Number(match[4]); + const backstep = `../`.repeat(depth); + const subpath = match[5] || `.`; + return VirtualFS.resolveVirtual(ppath.join(target, backstep, subpath)); + } + getExtractHint(hints) { + return this.baseFs.getExtractHint(hints); + } + getRealPath() { + return this.baseFs.getRealPath(); + } + realpathSync(p) { + const match = p.match(VIRTUAL_REGEXP); + if (!match) + return this.baseFs.realpathSync(p); + if (!match[5]) + return p; + const realpath = this.baseFs.realpathSync(this.mapToBase(p)); + return VirtualFS.makeVirtualPath(match[1], match[3], realpath); + } + async realpathPromise(p) { + const match = p.match(VIRTUAL_REGEXP); + if (!match) + return await this.baseFs.realpathPromise(p); + if (!match[5]) + return p; + const realpath = await this.baseFs.realpathPromise(this.mapToBase(p)); + return VirtualFS.makeVirtualPath(match[1], match[3], realpath); + } + mapToBase(p) { + return VirtualFS.resolveVirtual(p); + } + mapFromBase(p) { + return p; + } + } + const external_module_namespaceObject = require("module"); + ; + var ErrorCode; + (function(ErrorCode2) { + ErrorCode2["API_ERROR"] = "API_ERROR"; + ErrorCode2["BLACKLISTED"] = "BLACKLISTED"; + ErrorCode2["BUILTIN_NODE_RESOLUTION_FAILED"] = "BUILTIN_NODE_RESOLUTION_FAILED"; + ErrorCode2["MISSING_DEPENDENCY"] = "MISSING_DEPENDENCY"; + ErrorCode2["MISSING_PEER_DEPENDENCY"] = "MISSING_PEER_DEPENDENCY"; + ErrorCode2["QUALIFIED_PATH_RESOLUTION_FAILED"] = "QUALIFIED_PATH_RESOLUTION_FAILED"; + ErrorCode2["INTERNAL"] = "INTERNAL"; + ErrorCode2["UNDECLARED_DEPENDENCY"] = "UNDECLARED_DEPENDENCY"; + ErrorCode2["UNSUPPORTED"] = "UNSUPPORTED"; + })(ErrorCode || (ErrorCode = {})); + const MODULE_NOT_FOUND_ERRORS = new Set([ErrorCode.BLACKLISTED, ErrorCode.BUILTIN_NODE_RESOLUTION_FAILED, ErrorCode.MISSING_DEPENDENCY, ErrorCode.MISSING_PEER_DEPENDENCY, ErrorCode.QUALIFIED_PATH_RESOLUTION_FAILED, ErrorCode.UNDECLARED_DEPENDENCY]); + function internalTools_makeError(pnpCode, message2, data = {}) { + const code = MODULE_NOT_FOUND_ERRORS.has(pnpCode) ? `MODULE_NOT_FOUND` : pnpCode; + const propertySpec = { + configurable: true, + writable: true, + enumerable: false + }; + return Object.defineProperties(new Error(message2), { + code: { + ...propertySpec, + value: code + }, + pnpCode: { + ...propertySpec, + value: pnpCode + }, + data: { + ...propertySpec, + value: data + } + }); + } + function getIssuerModule(parent) { + let issuer = parent; + while (issuer && (issuer.id === `[eval]` || issuer.id === `` || !issuer.filename)) + issuer = issuer.parent; + return issuer || null; + } + function getPathForDisplay(p) { + return npath.normalize(npath.fromPortablePath(p)); + } + function makeApi(runtimeState, opts) { + const alwaysWarnOnFallback = Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK) > 0; + const debugLevel = Number(process.env.PNP_DEBUG_LEVEL); + const builtinModules = new Set(external_module_namespaceObject.Module.builtinModules || Object.keys(process.binding(`natives`))); + const pathRegExp = /^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:@[^/]+\/)?[^/]+)\/*(.*|)$/; + const isStrictRegExp = /^(\/|\.{1,2}(\/|$))/; + const isDirRegExp = /\/$/; + const topLevelLocator = { + name: null, + reference: null + }; + const fallbackLocators = []; + const emittedWarnings = new Set(); + if (runtimeState.enableTopLevelFallback === true) + fallbackLocators.push(topLevelLocator); + if (opts.compatibilityMode !== false) { + for (const name of [`react-scripts`, `gatsby`]) { + const packageStore = runtimeState.packageRegistry.get(name); + if (packageStore) { + for (const reference of packageStore.keys()) { + if (reference === null) { + throw new Error(`Assertion failed: This reference shouldn't be null`); + } else { + fallbackLocators.push({ + name, + reference + }); + } + } + } + } + } + const { + ignorePattern, + packageRegistry, + packageLocatorsByLocations, + packageLocationLengths + } = runtimeState; + function makeLogEntry(name, args2) { + return { + fn: name, + args: args2, + error: null, + result: null + }; + } + function maybeLog(name, fn2) { + if (opts.allowDebug === false) + return fn2; + if (Number.isFinite(debugLevel)) { + if (debugLevel >= 2) { + return (...args2) => { + const logEntry = makeLogEntry(name, args2); + try { + return logEntry.result = fn2(...args2); + } catch (error) { + throw logEntry.error = error; + } finally { + console.trace(logEntry); + } + }; + } else if (debugLevel >= 1) { + return (...args2) => { + try { + return fn2(...args2); + } catch (error) { + const logEntry = makeLogEntry(name, args2); + logEntry.error = error; + console.trace(logEntry); + throw error; + } + }; + } + } + return fn2; + } + function getPackageInformationSafe(packageLocator) { + const packageInformation = getPackageInformation(packageLocator); + if (!packageInformation) { + throw internalTools_makeError(ErrorCode.INTERNAL, `Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)`); + } + return packageInformation; + } + function isDependencyTreeRoot(packageLocator) { + if (packageLocator.name === null) + return true; + for (const dependencyTreeRoot of runtimeState.dependencyTreeRoots) + if (dependencyTreeRoot.name === packageLocator.name && dependencyTreeRoot.reference === packageLocator.reference) + return true; + return false; + } + function applyNodeExtensionResolution(unqualifiedPath, candidates, { + extensions + }) { + let stat; + try { + candidates.push(unqualifiedPath); + stat = opts.fakeFs.statSync(unqualifiedPath); + } catch (error) { + } + if (stat && !stat.isDirectory()) + return opts.fakeFs.realpathSync(unqualifiedPath); + if (stat && stat.isDirectory()) { + let pkgJson; + try { + pkgJson = JSON.parse(opts.fakeFs.readFileSync(ppath.join(unqualifiedPath, `package.json`), `utf8`)); + } catch (error) { + } + let nextUnqualifiedPath; + if (pkgJson && pkgJson.main) + nextUnqualifiedPath = ppath.resolve(unqualifiedPath, pkgJson.main); + if (nextUnqualifiedPath && nextUnqualifiedPath !== unqualifiedPath) { + const resolution = applyNodeExtensionResolution(nextUnqualifiedPath, candidates, { + extensions + }); + if (resolution !== null) { + return resolution; + } + } + } + for (let i = 0, length = extensions.length; i < length; i++) { + const candidateFile = `${unqualifiedPath}${extensions[i]}`; + candidates.push(candidateFile); + if (opts.fakeFs.existsSync(candidateFile)) { + return candidateFile; + } + } + if (stat && stat.isDirectory()) { + for (let i = 0, length = extensions.length; i < length; i++) { + const candidateFile = ppath.format({ + dir: unqualifiedPath, + name: `index`, + ext: extensions[i] + }); + candidates.push(candidateFile); + if (opts.fakeFs.existsSync(candidateFile)) { + return candidateFile; + } + } + } + return null; + } + function makeFakeModule(path) { + const fakeModule = new external_module_namespaceObject.Module(path, null); + fakeModule.filename = path; + fakeModule.paths = external_module_namespaceObject.Module._nodeModulePaths(path); + return fakeModule; + } + function normalizePath(p) { + return npath.toPortablePath(p); + } + function callNativeResolution(request, issuer) { + if (issuer.endsWith(`/`)) + issuer = ppath.join(issuer, `internal.js`); + return external_module_namespaceObject.Module._resolveFilename(npath.fromPortablePath(request), makeFakeModule(npath.fromPortablePath(issuer)), false, { + plugnplay: false + }); + } + function isPathIgnored(path) { + if (ignorePattern === null) + return false; + const subPath = ppath.contains(runtimeState.basePath, path); + if (subPath === null) + return false; + if (ignorePattern.test(subPath.replace(/\/$/, ``))) { + return true; + } else { + return false; + } + } + const VERSIONS = { + std: 3, + resolveVirtual: 1, + getAllLocators: 1 + }; + const topLevel = topLevelLocator; + function getPackageInformation({ + name, + reference + }) { + const packageInformationStore = packageRegistry.get(name); + if (!packageInformationStore) + return null; + const packageInformation = packageInformationStore.get(reference); + if (!packageInformation) + return null; + return packageInformation; + } + function findPackageDependents({ + name, + reference + }) { + const dependents = []; + for (const [dependentName, packageInformationStore] of packageRegistry) { + if (dependentName === null) + continue; + for (const [dependentReference, packageInformation] of packageInformationStore) { + if (dependentReference === null) + continue; + const dependencyReference = packageInformation.packageDependencies.get(name); + if (dependencyReference !== reference) + continue; + if (dependentName === name && dependentReference === reference) + continue; + dependents.push({ + name: dependentName, + reference: dependentReference + }); + } + } + return dependents; + } + function findBrokenPeerDependencies(dependency, initialPackage) { + const brokenPackages = new Map(); + const alreadyVisited = new Set(); + const traversal = (currentPackage) => { + const identifier = JSON.stringify(currentPackage.name); + if (alreadyVisited.has(identifier)) + return; + alreadyVisited.add(identifier); + const dependents = findPackageDependents(currentPackage); + for (const dependent of dependents) { + const dependentInformation = getPackageInformationSafe(dependent); + if (dependentInformation.packagePeers.has(dependency)) { + traversal(dependent); + } else { + let brokenSet = brokenPackages.get(dependent.name); + if (typeof brokenSet === `undefined`) + brokenPackages.set(dependent.name, brokenSet = new Set()); + brokenSet.add(dependent.reference); + } + } + }; + traversal(initialPackage); + const brokenList = []; + for (const name of [...brokenPackages.keys()].sort()) + for (const reference of [...brokenPackages.get(name)].sort()) + brokenList.push({ + name, + reference + }); + return brokenList; + } + function findPackageLocator(location) { + if (isPathIgnored(location)) + return null; + let relativeLocation = normalizePath(ppath.relative(runtimeState.basePath, location)); + if (!relativeLocation.match(isStrictRegExp)) + relativeLocation = `./${relativeLocation}`; + if (location.match(isDirRegExp) && !relativeLocation.endsWith(`/`)) + relativeLocation = `${relativeLocation}/`; + let from = 0; + while (from < packageLocationLengths.length && packageLocationLengths[from] > relativeLocation.length) + from += 1; + for (let t = from; t < packageLocationLengths.length; ++t) { + const locator = packageLocatorsByLocations.get(relativeLocation.substr(0, packageLocationLengths[t])); + if (typeof locator === `undefined`) + continue; + if (locator === null) { + const locationForDisplay = getPathForDisplay(location); + throw internalTools_makeError(ErrorCode.BLACKLISTED, `A forbidden path has been used in the package resolution process - this is usually caused by one of your tools calling 'fs.realpath' on the return value of 'require.resolve'. Since we need to use symlinks to simultaneously provide valid filesystem paths and disambiguate peer dependencies, they must be passed untransformed to 'require'. + +Forbidden path: ${locationForDisplay}`, { + location: locationForDisplay + }); + } + return locator; + } + return null; + } + function resolveToUnqualified(request, issuer, { + considerBuiltins = true + } = {}) { + if (request === `pnpapi`) + return npath.toPortablePath(opts.pnpapiResolution); + if (considerBuiltins && builtinModules.has(request)) + return null; + const requestForDisplay = getPathForDisplay(request); + const issuerForDisplay = issuer && getPathForDisplay(issuer); + if (issuer && isPathIgnored(issuer)) { + if (!ppath.isAbsolute(request) || findPackageLocator(request) === null) { + const result = callNativeResolution(request, issuer); + if (result === false) { + throw internalTools_makeError(ErrorCode.BUILTIN_NODE_RESOLUTION_FAILED, `The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer was explicitely ignored by the regexp) + +Require request: "${requestForDisplay}" +Required by: ${issuerForDisplay} +`, { + request: requestForDisplay, + issuer: issuerForDisplay + }); + } + return npath.toPortablePath(result); + } + } + let unqualifiedPath; + const dependencyNameMatch = request.match(pathRegExp); + if (!dependencyNameMatch) { + if (ppath.isAbsolute(request)) { + unqualifiedPath = ppath.normalize(request); + } else { + if (!issuer) { + throw internalTools_makeError(ErrorCode.API_ERROR, `The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute`, { + request: requestForDisplay, + issuer: issuerForDisplay + }); + } + const absoluteIssuer = ppath.resolve(issuer); + if (issuer.match(isDirRegExp)) { + unqualifiedPath = ppath.normalize(ppath.join(absoluteIssuer, request)); + } else { + unqualifiedPath = ppath.normalize(ppath.join(ppath.dirname(absoluteIssuer), request)); + } + } + findPackageLocator(unqualifiedPath); + } else { + if (!issuer) { + throw internalTools_makeError(ErrorCode.API_ERROR, `The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute`, { + request: requestForDisplay, + issuer: issuerForDisplay + }); + } + const [, dependencyName, subPath] = dependencyNameMatch; + const issuerLocator = findPackageLocator(issuer); + if (!issuerLocator) { + const result = callNativeResolution(request, issuer); + if (result === false) { + throw internalTools_makeError(ErrorCode.BUILTIN_NODE_RESOLUTION_FAILED, `The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree). + +Require path: "${requestForDisplay}" +Required by: ${issuerForDisplay} +`, { + request: requestForDisplay, + issuer: issuerForDisplay + }); + } + return npath.toPortablePath(result); + } + const issuerInformation = getPackageInformationSafe(issuerLocator); + let dependencyReference = issuerInformation.packageDependencies.get(dependencyName); + let fallbackReference = null; + if (dependencyReference == null) { + if (issuerLocator.name !== null) { + const exclusionEntry = runtimeState.fallbackExclusionList.get(issuerLocator.name); + const canUseFallbacks = !exclusionEntry || !exclusionEntry.has(issuerLocator.reference); + if (canUseFallbacks) { + for (let t = 0, T = fallbackLocators.length; t < T; ++t) { + const fallbackInformation = getPackageInformationSafe(fallbackLocators[t]); + const reference = fallbackInformation.packageDependencies.get(dependencyName); + if (reference == null) + continue; + if (alwaysWarnOnFallback) + fallbackReference = reference; + else + dependencyReference = reference; + break; + } + if (runtimeState.enableTopLevelFallback) { + if (dependencyReference == null && fallbackReference === null) { + const reference = runtimeState.fallbackPool.get(dependencyName); + if (reference != null) { + fallbackReference = reference; + } + } + } + } + } + } + let error = null; + if (dependencyReference === null) { + if (isDependencyTreeRoot(issuerLocator)) { + error = internalTools_makeError(ErrorCode.MISSING_PEER_DEPENDENCY, `Your application tried to access ${dependencyName} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed. + +Required package: ${dependencyName} (via "${requestForDisplay}") +Required by: ${issuerForDisplay} +`, { + request: requestForDisplay, + issuer: issuerForDisplay, + dependencyName + }); + } else { + const brokenAncestors = findBrokenPeerDependencies(dependencyName, issuerLocator); + if (brokenAncestors.every((ancestor) => isDependencyTreeRoot(ancestor))) { + error = internalTools_makeError(ErrorCode.MISSING_PEER_DEPENDENCY, `${issuerLocator.name} tried to access ${dependencyName} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound. + +Required package: ${dependencyName} (via "${requestForDisplay}") +Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDisplay}) +${brokenAncestors.map((ancestorLocator) => `Ancestor breaking the chain: ${ancestorLocator.name}@${ancestorLocator.reference} +`).join(``)} +`, { + request: requestForDisplay, + issuer: issuerForDisplay, + issuerLocator: Object.assign({}, issuerLocator), + dependencyName, + brokenAncestors + }); + } else { + error = internalTools_makeError(ErrorCode.MISSING_PEER_DEPENDENCY, `${issuerLocator.name} tried to access ${dependencyName} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound. + +Required package: ${dependencyName} (via "${requestForDisplay}") +Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDisplay}) +${brokenAncestors.map((ancestorLocator) => `Ancestor breaking the chain: ${ancestorLocator.name}@${ancestorLocator.reference} +`).join(``)} +`, { + request: requestForDisplay, + issuer: issuerForDisplay, + issuerLocator: Object.assign({}, issuerLocator), + dependencyName, + brokenAncestors + }); + } + } + } else if (dependencyReference === void 0) { + if (!considerBuiltins && builtinModules.has(request)) { + if (isDependencyTreeRoot(issuerLocator)) { + error = internalTools_makeError(ErrorCode.UNDECLARED_DEPENDENCY, `Your application tried to access ${dependencyName}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${dependencyName} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound. + +Required package: ${dependencyName} (via "${requestForDisplay}") +Required by: ${issuerForDisplay} +`, { + request: requestForDisplay, + issuer: issuerForDisplay, + dependencyName + }); + } else { + error = internalTools_makeError(ErrorCode.UNDECLARED_DEPENDENCY, `${issuerLocator.name} tried to access ${dependencyName}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${dependencyName} isn't otherwise declared in ${issuerLocator.name}'s dependencies, this makes the require call ambiguous and unsound. + +Required package: ${dependencyName} (via "${requestForDisplay}") +Required by: ${issuerForDisplay} +`, { + request: requestForDisplay, + issuer: issuerForDisplay, + issuerLocator: Object.assign({}, issuerLocator), + dependencyName + }); + } + } else { + if (isDependencyTreeRoot(issuerLocator)) { + error = internalTools_makeError(ErrorCode.UNDECLARED_DEPENDENCY, `Your application tried to access ${dependencyName}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound. + +Required package: ${dependencyName} (via "${requestForDisplay}") +Required by: ${issuerForDisplay} +`, { + request: requestForDisplay, + issuer: issuerForDisplay, + dependencyName + }); + } else { + error = internalTools_makeError(ErrorCode.UNDECLARED_DEPENDENCY, `${issuerLocator.name} tried to access ${dependencyName}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound. + +Required package: ${dependencyName} (via "${requestForDisplay}") +Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDisplay}) +`, { + request: requestForDisplay, + issuer: issuerForDisplay, + issuerLocator: Object.assign({}, issuerLocator), + dependencyName + }); + } + } + } + if (dependencyReference == null) { + if (fallbackReference === null || error === null) + throw error || new Error(`Assertion failed: Expected an error to have been set`); + dependencyReference = fallbackReference; + const message2 = error.message.replace(/\n.*/g, ``); + error.message = message2; + if (!emittedWarnings.has(message2)) { + emittedWarnings.add(message2); + process.emitWarning(error); + } + } + const dependencyLocator = Array.isArray(dependencyReference) ? { + name: dependencyReference[0], + reference: dependencyReference[1] + } : { + name: dependencyName, + reference: dependencyReference + }; + const dependencyInformation = getPackageInformationSafe(dependencyLocator); + if (!dependencyInformation.packageLocation) { + throw internalTools_makeError(ErrorCode.MISSING_DEPENDENCY, `A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod. + +Required package: ${dependencyLocator.name}@${dependencyLocator.reference} (via "${requestForDisplay}") +Required by: ${issuerLocator.name}@${issuerLocator.reference} (via ${issuerForDisplay}) +`, { + request: requestForDisplay, + issuer: issuerForDisplay, + dependencyLocator: Object.assign({}, dependencyLocator) + }); + } + const dependencyLocation = dependencyInformation.packageLocation; + if (subPath) { + unqualifiedPath = ppath.join(dependencyLocation, subPath); + } else { + unqualifiedPath = dependencyLocation; + } + } + return ppath.normalize(unqualifiedPath); + } + function resolveUnqualified(unqualifiedPath, { + extensions = Object.keys(external_module_namespaceObject.Module._extensions) + } = {}) { + const candidates = []; + const qualifiedPath = applyNodeExtensionResolution(unqualifiedPath, candidates, { + extensions + }); + if (qualifiedPath) { + return ppath.normalize(qualifiedPath); + } else { + const unqualifiedPathForDisplay = getPathForDisplay(unqualifiedPath); + throw internalTools_makeError(ErrorCode.QUALIFIED_PATH_RESOLUTION_FAILED, `Qualified path resolution failed - none of the candidates can be found on the disk. + +Source path: ${unqualifiedPathForDisplay} +${candidates.map((candidate) => `Rejected candidate: ${getPathForDisplay(candidate)} +`).join(``)}`, { + unqualifiedPath: unqualifiedPathForDisplay + }); + } + } + function resolveRequest(request, issuer, { + considerBuiltins, + extensions + } = {}) { + const unqualifiedPath = resolveToUnqualified(request, issuer, { + considerBuiltins + }); + if (unqualifiedPath === null) + return null; + try { + return resolveUnqualified(unqualifiedPath, { + extensions + }); + } catch (resolutionError) { + if (resolutionError.pnpCode === `QUALIFIED_PATH_RESOLUTION_FAILED`) + Object.assign(resolutionError.data, { + request: getPathForDisplay(request), + issuer: issuer && getPathForDisplay(issuer) + }); + throw resolutionError; + } + } + function resolveVirtual(request) { + const normalized = ppath.normalize(request); + const resolved = VirtualFS.resolveVirtual(normalized); + return resolved !== normalized ? resolved : null; + } + return { + VERSIONS, + topLevel, + getLocator: (name, referencish) => { + if (Array.isArray(referencish)) { + return { + name: referencish[0], + reference: referencish[1] + }; + } else { + return { + name, + reference: referencish + }; + } + }, + getDependencyTreeRoots: () => { + return [...runtimeState.dependencyTreeRoots]; + }, + getAllLocators() { + const locators = []; + for (const [name, entry] of packageRegistry) + for (const reference of entry.keys()) + if (name !== null && reference !== null) + locators.push({ + name, + reference + }); + return locators; + }, + getPackageInformation: (locator) => { + const info = getPackageInformation(locator); + if (info === null) + return null; + const packageLocation = npath.fromPortablePath(info.packageLocation); + const nativeInfo = { + ...info, + packageLocation + }; + return nativeInfo; + }, + findPackageLocator: (path) => { + return findPackageLocator(npath.toPortablePath(path)); + }, + resolveToUnqualified: maybeLog(`resolveToUnqualified`, (request, issuer, opts2) => { + const portableIssuer = issuer !== null ? npath.toPortablePath(issuer) : null; + const resolution = resolveToUnqualified(npath.toPortablePath(request), portableIssuer, opts2); + if (resolution === null) + return null; + return npath.fromPortablePath(resolution); + }), + resolveUnqualified: maybeLog(`resolveUnqualified`, (unqualifiedPath, opts2) => { + return npath.fromPortablePath(resolveUnqualified(npath.toPortablePath(unqualifiedPath), opts2)); + }), + resolveRequest: maybeLog(`resolveRequest`, (request, issuer, opts2) => { + const portableIssuer = issuer !== null ? npath.toPortablePath(issuer) : null; + const resolution = resolveRequest(npath.toPortablePath(request), portableIssuer, opts2); + if (resolution === null) + return null; + return npath.fromPortablePath(resolution); + }), + resolveVirtual: maybeLog(`resolveVirtual`, (path) => { + const result = resolveVirtual(npath.toPortablePath(path)); + if (result !== null) { + return npath.fromPortablePath(result); + } else { + return null; + } + }) + }; + } + const readFileP = (0, external_util_namespaceObject.promisify)(external_fs_namespaceObject.readFile); + async function hydratePnpFile(location, { + fakeFs, + pnpapiResolution + }) { + const source = await readFileP(location, `utf8`); + return hydratePnpSource(source, { + basePath: (0, external_path_namespaceObject.dirname)(location), + fakeFs, + pnpapiResolution + }); + } + function hydratePnpSource(source, { + basePath: basePath2, + fakeFs, + pnpapiResolution + }) { + const data = JSON.parse(source); + const runtimeState = hydrateRuntimeState(data, { + basePath: basePath2 + }); + return makeApi(runtimeState, { + compatibilityMode: true, + fakeFs, + pnpapiResolution + }); + } + const makeRuntimeApi = (settings, basePath2, fakeFs) => { + const data = generateSerializedState(settings); + const state = hydrateRuntimeState(data, { + basePath: basePath2 + }); + const pnpapiResolution = npath.join(basePath2, `.pnp.js`); + return makeApi(state, { + fakeFs, + pnpapiResolution + }); + }; + }, + 650: (module3, __unused_webpack_exports, __webpack_require__2) => { + let hook; + module3.exports = () => { + if (typeof hook === `undefined`) + hook = __webpack_require__2(761).brotliDecompressSync(Buffer.from("W4VmWMM2BubfuhOQtPrf2v23OidkIrLQsV6vuo6ON5J6yagfMdrY7lWBqNRd9a47LpsBgqCqmpd0iExCZ1KAzk71/+8domYYLado6QgLVcDZGShUGZeMQlqNVNopK7ifA0nn9MKZyFF65wTuzVq9y8KLJIXtKHLGSuK1rAktpPEa3o/D+bTWy0Lum8P5dbi+afFDC2tbv6C+vb8PfoBYODmqfft9Hf5Pe0ggAgnkcyCScddvJcAQUaLFtBxiDzlFX6Xu3f20V3zi9/KX9v3n56uXPdxdESLXXGIvbEJOH2X8Th4liNWx9UwsCsmzw1aZ510Tdb5Rj+J7MJ8y4+/0oG7C5N5U/e6+nCb6u2syhiiXVOk32T1VbmmOnkICBEwLGCIzQ4HSPv1vU+s8vpwklpeRcMyX3CZhQ0hpXNKalPCFW0gBPcDD7EDWf21mpzNkxFiDnHpaxMPpp+2Fb0z5U8DCOE7xbpaa//u8NH5Zl8StbCqWBFeISIAGQJVrsNMLfOS+6WPU487yt6HHvVyqxkCGr9rxWKj5mb72aqpVcNinJQUMBonXOVfO3ff9fGydsqWp75+uSrpgOe34S2n6rY3EkbmxyDG4JPxoICAtZfP8L7kEnGpRcJiK7IrwPCabx4MHO4eKx/eTtA0Q4INF6w2rfFzV6uoWdLNp/e/zQ9s80fgiyQayGUyu1EbdOJV0LmX3p9qP6wXd/TIC/1lwJelIZmsp/rZYUk38z63G5Xvw7dummA0Go0VwYLs5GsIE/AD7Yf7W8eCBquyuHN9MJmn6ZRoK1BsfCbWLiKgVF1+m/efnuW234z4lWU4CSaniecD+KO8qKwbSjr1LjR81tj8eOkhlfTy+WQYYFGxASroh5mLUXxVrJYvaq/HHw/sYfzZRjlU9DQwC5EbGiXyTlXVDtDGWUDwofvwP59Pnx+7u49XU5n2emTsXhgA64E3EvxTrkKDBFhUtPGU2++PxO8t2fC0LEHuTzHaEZNJqi+WnICMb389Zli3hnEpdFg6ZtdTpSzwwO+DAMYS/NbQ/XoGUnXoEW12ZkX5IfFBvSTJfos/EWRVFnv9PNS1bh9RePIHCn43YkDqJK81QPoSd4ffvm5aSJ3dWxvlQSWJ9lrGrbr27/Kb7TDca2AFA8IzhOnJn1pqqeq+xvxuYOQCG2kNyJlhjZZyJdJREihIXKk1WSmX2e/s37pQhjCgxbs/Vfe0coZkJeFKrT/8UkL0B4CVkAeWaGWe0ZYbWf97303pT0HRTxpkkkiISZPMbY5Owa5uzhvVMiSgUMQOAgNQku3+bcc2W8Wftvc+97716hSkUQIoEexzlnMukVEmi/OtnMpHC6KEoQ1mXTaj/m1rSaZq5d76a+NIaQAEsmpEs36Z1QkOlP/4vUXvvdvc2vaLKEo1kZ8c6p5UKaACrhAaQYFi6Yf7eVP+t/sy9uyQFkQ4gFYZy/DH2DnRIsShdi+ecu1e8YWFhF+TX7hK0FwDlB4DSNwA+jgnwPazoAPIl6YeQKjomgZBm4ot0iKlMqQu5+607u/O4c/mLzqWr3lXtonbfurf/fW9p1fb97x7uAYAZRGZSpVDdI/Xa3QGCKrNka71YFd679x2j///+tw5XlQh3DzPAI8KKEQjYkEDArKje++4BvO8IMN2DAMsjCGYGQGYNwGLWgKxqM2YLmcgcxapRcjnTy1lss0Zq23evdkIxc6RYSf1vOpbqyDmE8+0FwlRLnUTiEIb/GtyUgCqbJaZMnSoZTEvmDL9CSqjDUeUqnCzPf9yn+v+5k1ltE9tA3wQoxssOHKGghXxpC0LBAltBtPBSe5swB1i7DYxBub83F2EoxiF03obaFB5bsh0Kc1bzrIwh3LQFCHQJIft/5CJOSAK0iCZowEvBt1E6se+QClLxyQDb/P6zGf+p4F3PzaDCAkTKwIoZSUwHunbpXlxNMWf/zySGe2fKzMwV7SAKgg0s2GpiS2JLsSU2hF26mHr3yxBu1v/vXtvs726Ps7eLFkKQEPAgwYpoQimiQYN4BXwmQ8sJtGRi4JvqJhOIEwjkbtY/rpP199/CClNIYbApTjXqCNN2WnKIGmUPa42wSoQ9jPAOe3hI+9ecvrylsbdHMMEED79ocIIGDTco4QgabtDgnVaQN7MkVf57pnDAhQoXIpigwoUh5hDBEBFUqBBBHCpcDGT9/93z0K/7HuDMzIMgOBAEQRAEQRAEF4IgOLBnrQMbmvl/3eIffPefkNv2BIIlFYgKllQgEAgEAoFAnEBcMsRlQVRUVNRvLp4Hn71PVT+xIiLQiIiIiBERESlERISylBVLiUjpFIYyYiiHNu3/0+fVV+2Rf8gGmIx5Oqweg87ORHPWoCK7ErY0QUikWCgWsCCIpSbaKRaQpO/ufT7JheKaKwOv5/+/KO15Qt3RkRCyzMSKsEuNtuxSK6gaK0YX5977m8Tq6Vkg8WFgFXHmNHyNkNthOPkkpeW3tyfaXr3W/Nhgzz10+7keQmIsRg6Nou1V9G2ouQrSXvz7RuQRM+xkIu5hKxFQDMCnijKYAOB5O1MvmlNyXfsYOqP676qcmPtHtcuoDuGsJDHT4rILl0OMh4Zj3fay5erEe+MJIAy9Y/jQEoCMkOML38mHoY0XTN2PnLn+l9AMOgbfm/WChFjb43o/INsWlyw5TyXJGo0jkzBVQhHpGQWQZe3PQzCf6OWq/mVwdbA6RGmy4IFePesVn5f250+VPdv2wODMfQYJsAZvRPbpDZCkhOhUNSmnVXaZszIeZNX51IJ9Ol16VNEUgkNtPXZqIfxDs1/MGXprB/9PAnj/JMnlUIzwIJyX8qe8LKT/bYffcwJHBscc2utF+e5/57jWSqHVooqW/YjHiFl4XEUJ9s98myoPWIzhQzVTOQ4kLey5KUDYV2MQ1cY4+7d9Cf+Bjv1hF1vvbJWYwy5BvlGKS9DkREkpgx8xST5PU4ikNC5wLB7cOmcGp+bpTrwJ73OkrOWEWGV/hSRJkwh87Z7aHxsaQMuNwvYREDvirh/o6xQ/MKgiU6hXgP2Sc1p6PQTcPPbG9kYfexMBckCiE8YsNTtM+02OimepUlRaPoVsFrSaU5Yd8oVSc0oD9/mSJJ30VeAbYu6fPRizwyyv9iWtAOH6fYetXKdOw73xEh4YJx5Xj7NZdnoNcknKz6B9i2bFto9LVeHtpL4aQBlkNaFQdMjwE/8v1Yr7beThYGvLiZC1769LxOjL0M4UhQIqHajDClFvQdp+wycLk0s6nzBWe3esZZ9hKyGKe5Ib2RI4XcGMnY+N3AKRpDW4dMcuQIm7bt/iJ7Hei2XIrGpFTj1nSVJjTSKeshvOEJV3PyKGVS2rxDCkrrr9QlilCBTyjsKyOhLZJEHH/43MSNIK/76cE+J1GpGrWksmgU1Y0zQShuPd6n2xtG5LBWlRW1xSP0VKlr9TkjFlvUpkTwAMwKfOnKWEGmYB9sjl06lKyNWDom5mkSN8ba+PY37qy1izbKkD/j1fmTLDzYfDN++/b4/PIV//LfryKYWIt/Tin5RpX2t+YFhbfnyyty8EWhXyY2vcfvoD2p9L9pAvbTGNcxsOlKNz/WLlfxU4n1ZKGsakG7dMjpCOY7N55I+jxutb+2jg6/h+JH3z0vnKHzf9o+t9hPrwAO1YpcActX78v14SNmwMb3FfJNbWvrLdzjQxjujYFjj0h1K6v9bH0JX36+g2yUAsD8kBbSxrwb4R5UP25WJf5bhjzAU/xW3ty6FuN/yfjiQAxG9w9up/rSjCsHZdqO9ogNUk9Rg739V0ncE2mB167H9FiyzIP1UEHIzsCZZRf4hrME2lgK0TVIrZjgSrZOJLegE2O/oEtdEO3UPPdbKqZXD4JwDEtQWScWmNgbbHGaqkBYljkIY1sAQzpHTpWK2zpZtLbg1Y11SHxM+0uVGqd9jOez6W45/k1HFwCUYm2LjHI4z/GJEs7M+OOW7rfmk7jWpaJRyn25rmgMfSJyMd9gXOengtpUtG3p44XehGvj3kHe5pHLW1grUtJHk+vznHp13/p0bqbiiRsZmTOprJNCxF7ClPs1mKjyxc+GNRgsW5NnTKNhdBsMS+w9TYO1wGImfKvoZPoMJNsWP5aAQrLUhxtod5bAsvxXSwMeZFjxIHf1fORSeMPxvOxpKgmtI1y4gKxCwt3B25pu94u+I7k8oXzyzmgKwAOcMSiK58m0YylrR6zVGOL7+BKLEcc1BMICUvQbGZj4JSrXnuKfQd5vNUiHUqMrdDhbaFntQVLBY8NU26PPoJ5pGHYZWGbI1EM2PL6ILZKDl9vPQz2X9OBkSEUcYOrNQBtRYijGVSkk6TRx+CkqYzT3eNkqQ5hFg8Mnu5nzUg5zo53n04Jy/Z9eqGUETJk8e9W8jPWknj/CrUWdOwlNyYI8aoxNuF5xsMDVWvLvqJSx3ETwMWBf++Z7npjTCwjtqJ0mWXB7Li6tDclg2/rfqKfycZIKl8KeiRB6blfTGj/KEs1lRKNTl7tqnyYHLc/lonojXr1bRKR3gqOdSU/7dF4J5/afUU+qlkdPZD5vb/T4mabuc5qnQxDu7+WLjQLoRYPTwo3FZQsqjxsrYaGZAzrBdkAtMZrN+UJQaQUW1HZDwsSaoXyrLuyelQv4nNBpgTcDuHLYTrmO4mpnCs4EcZVy8rGg9gdklu0ebi35f+L6qMlY6QGkpbH/Xe9ZpoC1k2k9Up5VamhCmJ8CwTvStCK2xfpadQlX98NrTrp0BGxI+vF5Zeb+CT2PW0Rv2Jt3X8ZKEo7RVi9VyiPfbYWQdMbd69FFx+fbSnK53UrFsNYomC9m1hmXIrqh9KLPK5o5ib57j9MK5TZfhq8jvNNgjlFtIwWlAoyGHkdDm1xVxBXwuqYAJJ9cHWMDN/k/s5UJIh7GjiLnAktTimKNw1aFdnDZUMz914oN7/PxEMy6umhrpujJcj6Ee5WWLc+5LVZNADEFnu+1uyZ4hllPvKek27k5QnC4T0PThr1742tJO1ceahcXcOKXmCxi4CAlN85CLncdMUCbJaRWJf/ITIttifhyGCpxLI9MSYkmjj5poU4UYUE2U+yxs5+ixzOpC02+8ggSRggUlqbHRHr5/G8hquDdvlcDizInUfhPRDgiKst0IKDE4kAVpop0W9ZjVzy8sXcPovaqGKUShVYVwT0KFipjART2vEhGHjbVVC94uIKciKJ1dTDCX+q4JotaAMWTrNtuRiaSBNPFcazlx5HCMDycTHrq2yzDBV+6HzlyWfz1Ozp4n5qJ2j2YZD4CVHK5/euOjmf8SipVYMFEyI379ZETelNf1CqZBI6410/YHWIxJsZq5AzaHEvaUP85zyxB7WPNjfKrxe2K+KOyIEpc6xFPoOL2DYqNfhLatlNe5q94MPTV7oj8YdNxHB4CgEEezyh3BM1kNyyDJv2qyMRC3v2ja7zhvqjmRVJx//f+v8T4EgRvgIZnD/oa6t9gbswIf1J2iNdtsZaO/MX1I/EdCvKfbdE0U69QwshO80slrAeSSr/ISCIgLuh9o58qSjNqX9D3bMguzPknHn5Fw8ELBiDUWE9n2/auRjQeTVubna1JVxS7FZDqEOwZ4DUV3iXky26Nw7+xU8Y61m+ZySuCOxjJlsRAIrERYTI4QhK/yEGN2VKtBXYRbJTkvSK0rwvXnYcT0tk+3C39ANXwhrp4UKoP7Jaa1WMKRdK1nLMiyBNp89NvzR7pb1EtiNGSFuzsMRG/sXlnKltEBSub32/TvWhz2yUxWdMRCLJXrWYSuHMBsC08S/hbf9uK3+E1f1vpwbqS8CEJduz+hKZyFvR0u00YAKB8xp4VKxIllmzHXmYXcP6Pya1eC2VBdLdxXlB9ot4s4LUjh2Gq9Xan6QjLwLsITV98peRxPBe4fZFhvPdV5GbCl/YLOGMkSHqyme2e+vuxj3XassqCypW3B9TyzrvMkt0uC2ZRrHzPmVx04AmjFgJHmSB5jmqhn1zQCh+HEdM7dR4a6Pqojf/YE7JY0ZpXUpVCrsPZluAWlJcJYsJqHniYMk/nBH7jzNsw1N+3zGUA4myFfQXcgN/nHGGwNYCuAYLwbKRd7d8rIqqvdfMUBdCQWKaxvqqyVyNz1ESg7EB1IVUQ6F0jBU53L+soeWsWSNhEk/S6+v6nj6rMXETB4uffJRMy6CuUI8ms7WkZhL5YDnzpy7gGmm0yJ0ihhgzCdwMTEgHKjY58ub2jyBqgcWyBDtzT1a0Kq54eVyz7Mto103NgLn9ShJiXEFonvmBf3o1hG4X2YAYsQNBHfgvf5+dJLeGBubmAdZSK6pAYe6ikIL/ijhEDEcQIJB8JJKSMZn4Xw2UpgvGvzmxYFg21zOchCaOBzwFpO+iSI7+mqWU7OQw8+6e2xhH7rxKYB5TI0QFGjUSpAK5iZzkSBbk1iM2Eag5jRytvX65NviR6NF2hFCfmhrNgvzCX5+cLqguF9bmFigr/yCxSYCg+V7C3Crx3w2mnblE5t2fSvN7a+tbvi6DYxVk6g/C/r3mGTDv1lhYugGGmrjDDgteUKWx2ojGGU3/hLtheHcIDc0Fm+bqs8g03oXtL8ZjWIO0ZGSBs8olWMzcO8CkAPl2Wdi/L5coM3t/go14CLwv/0qZ6TLkE3g8AgSdFI9kBcGC29Q8BbBtvR7C6brqalTy4T7Nw0iT/95OsG1vH+9523stLye1ahJ5i6BSiX3grDHyjjPS2Id/AGX+i2eFlJM/EitK7QaGYovCg4N++hyDIoGCOjaUJsDf6XN2hbEjrC88vaZl1IiVLlqohvtq6K18M6YiskllOFwA5rWG7ZtNIfNf+/PCiDzOjd4h1EdQbN8cveHQ8adr6aax0mfabY9MYgyDuus3fJxgnjnF7p6/XxKwkFiN8THE1wgZdfUyAvoydjWq8ELUHaJwei87FMSh4BIjcnYh9BtwaNzW24kD2PA4gWqx95VH3VCpnKxbs7FeFq+4cRjVFovhlFYd8GsQJfAZB/UZYg/fU+CobAOcDhrYQS9XDyhdd88YI1uG8Rz26wcL50Eu/f+dGzNYLZ9VLxru45es+CfjmXih1ECnVq/900JLJj3GdRwxVP8dn7rgvWoBOXGb/KSWXOP/Nj4jjN7c45br/q9O0zrY2kFg/UMc+aXb3LrCYQkuwjlU2o3H8wz6r7O9z+7w6IDCDUqPzLzVGwh0P0UTsLg0VqLyj0RwNC8wph3F/dQAKPeM9XoBd52ZBd82+sW3o/kdxYDsJdYP3BXtoTkle0iAzV8riQTkUymeUbowNm/cYvckH/PwEOP7Dr18CYHkn1oiRwILsf4RFrC4ZEgHAyo6GnH+gddJFxDIR8l9Z2sGUEUU3RQ2UR2dYccNhiJycflZXCGreabJAka9eg2sjb9iQrY3DXg5tO0HN7DItWqhMxyOH+V8Q3WSxnddMG3qa8xOR9YXAAuHdib+ZBFPqrF2BlcUaBvCWiIj6Cw3UnX/L5P5a0Rj1j8e3dufotL0buKCGvlYz3d4AmRzrFwjpaAwlm7lU9d6B0HhYd+NFjycC8b5MVU3Nz9AfHbShibHDE9MZGVjRZlcao5HxJhMHIriHcabV7IfsLaEVWFFUN7rvr+PEfcjgMMXQv3BLrXS/2kO3w5Qwt4zCFxX+g1J+s49ht1l2VofLebe2D3OAX5w55iyG0v9s6zmlHTts4YMA6X8COkPsaI/a98PENtk68rAw+ZIbVHOvBTPAitwv+nq855mf1bnKuN3aSoSbSr/7MZzvH5gaJKmCrZdeROYaR3qX/0f/Hat/LhX4WwDGHV2jfqiiVqjswil3YZkUP5EOt6yRkkp6WTw8fTDXDC1Zj6fIb0bKNSLRj1KSj+SsN5P+f/D7GMAwg1h7LLtimpIsP0QTJ1raePPj5binPYxg7xrdJ24FmzGKPOO7GlMI8GcJ24bNxL2IX92o3RwEvq5+ZDTCRBrjar1b/NauEvnOXfn/oZ75S+mvBRjBmU2jzlAj+k/BbCHRTGPJA8jldtJxHr2RQnZ/8Byo7jQxTfgR0kVpvjs9zhtu3WYSj8NjcVu2jnVG/AZa6MvPSw25E/mJ5yj2ZpXw3rpg6+32BmjTrQ91P5G4Eu3/+ZP3f7UyEuBsJW2sv7//2kPJP6Kem/QlO6dwAD9je6divfu1Hyc9GGW7o0As3+Cag4YGefgsTROaIbteMq5VLBVnctR9tgF5Z8nqq5R/XXkPhWzjTjHyj257X9XsC77Un0IYGPn2Qnb1N0AnTXax6R9RXlYDPegTDbXhzt7Rg2sXt5y23hHG9XvDx6Zzsussq5ZuLPeai2queckiXW3JkVUUXZ+f6wT7I2YKV6sSXUlvio30C6/xK7GZKrziOlfxSueAf1lITFE2CV7TzTdpyt4vpbcwy5+DSFhM5SrCr2D6T8lI6iZts5ErZ4Er6V62Z6Ru3SRCvxdfBvlWdSvyWy8M9egAh91CvznZH5/I4I+DAX47htxDsCWDwBNL/c+zCmwWrg35obKXaiKSQiJI5jT+JC0VwKF0nBenuEHFIJSfwoNOqSuep7+3Nv/lbZ6P0EceUkGH1gMTykKkOWL8PgJ9Sg/OCNRiaN/yDxWpCTSTZgAtNGYfcD+DFUDo17a54/9Nqq/9vIIlpl+30UQg2ndWnQQneGEYMJd1m6RGpGYrO52OZ7FDNa9mlbkAef/jRXVsFvFyBnSfcjTqvsLK4OUZUNjEHOKd1AZL/Rmetv7tUeP4PIIj6oc9Qj7E/Ro4v7h/mgD/s4pbFke/E+aXeREdg5gNArlhbeH0Tzg0fDoMXx3CFSygMZyOg7gnh/W3k1O8CBw3kEmVs1xA5HRTTBeMtOd2FdedsRxppNXXWTVP7aCzRZznIRiu4CLvPiyHQsFSwp2e0wBzHZ1lVG1jRdIoc6xCwCwQRspnyk63lsiXsuHrJSK/ySGsf5baxVo4p+orzG6GYWGiYk7bKVT4X9qbmRgIIBqfGmPbqDpLwrIF1bjWOffrCrX47lt7YTlm2vN1yocxDdRY3Dgsq5mWMofThHimEoyvOJEPF1SCcN9yMOUFmWpuVpHMgDeQCBcAqQ5ngXqeOEvYzJfRCvXqJ/avdX+SUCA1kjCVsZN42TjouVmF07Sv6NemBeszR4UGlTC3ijyaJ1M3AYbuCk5EWVlCwpdFA5W92acB3WMpLm7HWYM+rIwB0j/Zj1SzUkTfvGOYM8NWMft86f5TVlNV+6UCN0kfYCbRryRJgBLs8En0ws1y+Cus1AxKMS0PDkgw9FpmHQFxPDxUBiFhFSA9jT6xaaFkHZNuV1O0c9nSI1/xnB1eipNGIOGjljJaRXH9XlOfKDjnoYrcuxx41B2MG0GEaq3Dx/TO239qCPI+izcLpzvaaM1Q984OWmOtYwrUBWT+9OCd8mQyaKuK8kcENfjjjMRCB2NygLjA30Eb8M5v18Q4TQQY2LjFwRnG1EZPmda0wskxFRhXzi9a8D4Y+QKUZm4ItQGIsg3jSRL+Pe/6Xzpxf3/kfs/e2qZpSW/5eAD/9TYsWQkZ8BwPUxyERRTEg5xFrCr1/fpePx2qHs/yUrMzxTglUALMzANyXnAFBXeYfUwyyG/Assot8rvFktnH1JVidGsBJWBo7mSmxlbAa+do7NcSbzky71XKzHupl7lFvO/KvVVJcMwQ9E+M5CDTSWqlFldTX6Z5CFc2TgFCKI0wWY86ctlBQdT2n5+ru5igi99tPOb5ym3HXTVNv2UnCwG98Py4nWUBW6LG5lXCCbRDzzkQ7qxmF3EINSUGkNE3sd4AEw2T7N43QP5hskM7HzQZeRweEhkB8ZAr6TEQKdxhBQLw/BtHVUfz5wjQoHpIWRbFW4tujbzdDC+WyGmIJsF8hcOPiGxVeaq5pBJF7CZClIsj7c4YIuW/935VwCTxRghFtEJ4a77McbmG6acuoUnwhY1o4dH5E4DJujr1tOHUHcuFqX89uthMVGoqE8XpsLr1Ym/3MohGOW79yhz83/egW92PD+gywk4IwLCjGzwgJ4WAVG+GYSfnxl65fpvMDNolNi869ZxyqBPasqmYjZGqoX8qnoL0/il6movMux5fQkPXLjeyVjGzPvHgwPFOLfTfs/Js5wVnnb19EMHLyVwDj5GU8V31iRg7YZAOo2tAdAOKxpimoXAnQc4EQFeg/1nDL9QDFnGkLeR27G7XmLT+3UNeWea0vp9/pe1ff/dgzdbYzlHplivn1vbuQTk0urP2eXotFVixp9dLfVH+u7ID80ctXPlNMZZExej54DvoZCAjsHKqhQnZIrxNqT110T49F8wTGbxEBWZlCIcHMZ5c2BZTFXCmKpktNUoty+GvPykHaCWtSAXAzNalNCVGqdp9FZBgEr5pysySQ4fzsLJqcF1aZL8sU5sDMumje9dgpwsJjqeZ6rD3AO8b4eQDYgzlnpaMgTzT3E6QQjVQafR+sDY3MGAMjqQNhDkGL+BbhtpYFXS6EDEX2jVgSUhhmMsuMDEGckZA2JR9gDST20olD6W2qU1G+pqkRSm/obDGTyWg5HWUDKmdl4vMPg3jMApwMnmzNy9WJmwmrxuRIbSKP2RS+05KElaK2Oh2E2AmFjPNOWjR+c/eN6W5svDuCC5DrQeFvCD/FmOLxyz5t58ngLghRHCvc/UUAsigtTMGdEGpYW79ZGAUP71NK2iHFyjGWe6x+IAMEJ07E9wp34GgUQBRBBM1+bEG/rtJqVOWG4CUOGp2+ppfD85J9VrNO8zljBETA5oNyOe+2WE6drcfiduMHQaMBvTczzUmEkD+iMyHXn4vkO1ciADQDcsQAnXibs20EDlgPgDNUosuNx1VDEeHWtczNnAxgMYd10mXdmRPNLlDUzNyOLYb3jTIjaJHUL4YQrJ2Rh3ZS1xt5ge53TMEgAqAGTszAneHGqR7n9LceHVDQi2sjWmPui1m1jM3grPLc37/034v0Gu9VEKCevozs63baUE2I5cNqUZooJBYsC5WK7z0yQZcpt75mpZhQl5d0hsoq1EVhsiwkGAOiQ3/aS01ZiTFyABKMxWx567SIzdwAMkNUOMoME3hb7p9bnupnRyyZ+OhdApENG57m6D2gRAeAtDSVYy0Pc9ooTRkKps4iQFkakDDvtojLFjKWOFlip7dJayix3btOOjBvJ2/MA3PxCJ8Qy5DK7yNRSciWaHQp0QjwjZkeCTLZZJgBXbJdQCRZxARQWSF/X79IEWFwUuEdPXRiBS18P7zMDJCZIXZuGJVr6BhCm7bVsyBwy1T9LqDwcqATxXVr4b45ocIdW7Hnfc/l+sidiL1qMI4/x4DHwUJB2SNrDCRm/PY7jgiY4Cu2Y28CupBFtR5DzdhN1gSfPdMwK09Xws0YWSLsBcpOwLup3aesb9kBF1obzH91L25xTIPVD9Tqza8IIKHUgUq4GgKgGPAu7iVoJo44GzObiq06MZWbhoivwAGDI/YutmTQATt6/yAoAAAXrxdVsPOp5c1gbxdOTEmN3U7beyqzs8T2rptsnAlJG2kd5oMzoj52QAb63TonT4z5A3YtccZEIGcxIAHaYFLCvdSdlDjo6NBRqtqGVjZI3MCo2Xp4zYmWTuGpVICJk4g/ckLEeiGlgUbBf4WXQwNeRdrUb7GmqcN72rO0DflBmaGNiuFP8xvjJhnye9r3bePTw/9Rst4sw4y0oyNGLbzxiZnLSwvvO+fZ/yU6o0jW1VQQvnfIauL4GcXy8QPGPcWRzZfVTfVCIJ77iaaEOJOxirSwKYkICC4TFMuSrdc3dBK5Ci7u7/69n6jzgyysCW1gQTCNJlV54kWI32HGgZhe1ku6RNkvOMuaFW9NG7O5S91Px7QlhYN/KhKzZc2ggL0AL7bk352gVLC6iiDJhqj58DWkckO5ZEduJJCiELE0eMEYnJiMjcZWyJLkA/prI+zVCJA4P1Tk/HJTkvwb47TEYrW+/l8YaKopDdch4pMWdzMMojibSB2WVoB64WwucXVkSgJoH2YaTvvIx1HXfHd9Hjvsz85DcWAVBFIsyxkQJgfsgHBJHqyJf4JnEyts2LwLgKwp/IZFmDEGc0psSSkubTdawSzb0YdVvoa7k5liXhUqgrmXaMX46rEY7K3F+cbLLc1jPUjEHAc01GYkhEH+5GNsMdSD0eubjKXBsBgDc2LBFYuq9HmrmH8g0HLDRhxZKkapaC8ke4F8UOU95XBsUvyWURtGk9WQGuiYt5RZzSbkhZljmglTF0G6bfzbQ+Hyd2uyc/BHmnNnuXKIiIMc46nmy4Tkap3pqWkm96MqFrP2O5ecTh2DwkfL8STZ273kG5g2SOWg24hysGyxOhA13Q/H52s7XGwUzbMCkY0DD5qwMatg8KLDhwWDbPvzGp2KvemZoJjj7nf/dbSXHVYsdA5gx2SY+h1/Z+XyyWxqwOWd+9iSAf790biQtUCeUxJnhhp12KVzcZAfy7VqH5yIArfcA7BoIHdmkGgIpo03biXtP9n/NSejteizFmXnPt06vD+zsbdR/uxf9dfkkq71/TEd1Fd7J7hPipUL43oE7iyHWnbMbRruLJWd/n1FDLTTxtD8h7dtaA8MovkToU5PtjnnkAXKPYcFM2oTPV77rVcwEDTjaicZI4Rwz7xKeM1c3yzbN4CNye0HxQ4Y+qO28WsRMWPgIpw1yTguyAQcRZrtdOGsLMaZ8Nk8k65ELaaF4sYyUIxE1oIEmJSGKzHvUCvQ2DVRAe0H62YnJixnL/Ua8EdoG1/eWWAKHsJrAZVNKJCmlsk4iQtH+B6Ro9xOAnaK06L1mmQFp94qzaS0CmM1jv8dAGDR2IL2ZD2SaxKztG41cavp1gmtQb5bqyaM3w62lydD+F2/OyhbzAMt0rUEnI9mZOCVw8n36Nqi0EZHviB8PUgy4knq5l0mtv5r7vK+44H2Dcr/y1vIipo6cZLxldNei3bs10pMwF/QU85Eg3hEvhxNRok8blnPf9lehIrQAXqEc4bB3lkCD3XqL5vAWLIWs/Hta9Dj/VhVfFiGr45nTELSU7C3/qJTSBxaExX1NFLjlCNRIxk0BZjJqu2+44hzOPtGgc4AwRDadKHHUv1qeQ7hVFv6V93UdFAyuSGArOZqnsMxHx+wFaNYQcaFiAV+uWIN+4PoR/l7Iiyd4lfhw1xhFrIsT95uqsYZZEP5UtR9e2xSVOx8dulm4idZLOwMFrzoWiyO+I6bknOrmmhXFFswTMqvEX4gPX5E/YcZRrJe1OWaP0wK4FkhglveA+zJBEk3uEbFUvS73mDiy+UKuiiTQltw69dxBWRH0iCHwAEGVj6W5W92zRG/hNMTdS8i2Vm1/rZZUgUYrHiW6P8mZEagE/UkNOoFKUGQCjUdIVOQXV4ngCcIhvmwqIQ4URV5WEUKCedfZ/xTzDKgEweQBA6CIceUHXkxWE2em0USIV42N9euNB2sYDTOfErZBuXBfgvvSUt476XLrTbuZ50DIox14N5fPYdR5lzKl+4Vi4BEQHavRMwNJLvtASdQF4r3K2flfPQ+DYeYzSS1yhq+wd5WHXp6BkqoLVnMhBFjeZoKCAih8bvR6SbCw9KXXNAXbZnyYA+4Rs50aMU1hAQ4GRc2LKFW03cQCOZebUc53kOVxIVVngp8T5ijuU2aAxwiM/OTbvorPW55XykpCYqqSLduALba9xzyj+Zh2kxssNQllfy8sPB3/Sm+H7anuJ2LOIqjFOh+3ObPbAI1qCnvXKFg4sJJ9pgfGj3yDiHVOovAp/SQda8jFL/zwvNKROUYKR97hsQc33wGKFSgLT8iwUCwyrLrO5tSlEeKZp10VJ8Ln0SExkvGf4Jr0mi8LVSzMPnW2xUl76qGCyVif3seHYm/ZXjIwFQGkwKnrQ7M/XXExTHxpis3YlDy/2/0YkirXhdSMamfvjVs083w6cHcwdMontKjdySoBMkEYl2nNVULhcHmKGP959/PKSHsVmBKigNxHEkI3IceJIXW6Xs1JIKt+OmhEa7r7FXOoL5dMnMkpJgyVaWPCcHziFKKl5YXaYH0EK8ggmboPo2IVpfr+wrvo9J6aA8dO1CguwfI5XOymrXDer4OV+nspjb0XVJLw93Ajg0/ZqPR8LC7mTmS/8rk37v3as3EmJwPIpH1ngsLID1U9FsGYbUphUF+k4+Y8ZhuO2YE7hyLJYdxvmQfQyjGFa+Ro9dzAmncIYUioAqSQtcEPIqBXBVaNq0vqV6nS5fTKvYTQZd/VM2eM2iS6ccCVMqNvsaf+kdah3d+ZwEwo0yscC/qh0FGvxddfx+PANq5NcO9Ab7WQ9tdKiOt6BGENENyyzc49UfLrDPlCMsHGRW8zzRXBrSGR2yGwMozEvNkjdGIr1wzlgD0vL82dxi6+gsVpt6HYelL8spCpY0lFubGpk3rUYJXUGFUmG33/Ig8sqtrLFk3V9mzgsUak3JYbPx6WxiTjfAEre9KA5hdIpuAzKNGuJMMP73AIorNw0Iza2h9LfJ5zEWYdtFzzoXcGo3lJyEXxahevdwBZst7ER+HYUpX5bs8ThS8D4mVDg7CdmQB7eP8zMt99eYLHx7sGWYnmaZFXuYofCWFQjgwd60bl9KH65fTYiPWzKkR1W1r+4C26soBW1FgASFkD1AWdgtBhL/dhGlKp1hmF1A4FNPg18CCG6Toij0cO9/20u2zyMYS8kruPjzBSBcpoPIFpQlmqx2jHfo+aGDFa7j0CVebXN/CyvEWvcNA/20T0BP3xiHE9uajnJno88C0wMt+aiOSZYPCIHr05zL/ZI+eMvqzyIM7OQPiOt0yen9P/RlI8InugAk8GKIQaVytwiVAgQBYa1xz+K79uiTg8Ald/xGzkUzq9/1oLxT4roohMMkeVDrUNFYqzX6TeAbR+hTm73F0H1ZGG1zggLVH9gGpEB5UmUjyD/1QeS+5qFkBtcIi6gS4hKI9LetgXU2OLkrqS7i87WHsDmzh1LsFLs0UrtyiCtL10PxOyMWusXuhvdGaGWUHfzXz3ZcX+56qI+ZlLzEGfMcUDj1w/kebJ27mHP36Om2rwE0vBXQkGoCr+1XP08fG0jwB1x7vcTPQAkoENfnYXXB4fkknsxa23ZE65TX+f9PWHwE9WXNUVsw2mbcvTDhX3AKKwGgLITqNwUZd0qwdZnppfYEIY2IaTsRw7gOi3PIOd6fFnaOEhw5Uwv3wm1rTOQ9lw6MY8MgxD1HmCoW4clFYbZMKwoWXl7qnBe8iVYKkPCh/5W+mrMpJrevw1jQNj/lTumN1FQVb7cKgAxbx6S+bpvH2/JARQR8zc/wUDtUV+S92hrihFBBT3v8Y26DWYh9YpJSr3JzC0idU2CoqL0BulZjBNsX0xGxxyYt9VRZihoQ9E2NZKXL3kErt/Bw8QA9NM7Wc4d9WIafmaz0TVF2y4YnjwCacVCQdqPs5ZVA1+XA8cq0lDBruEeihvZntLz6vEX59kWU/efTR15W68E8g/hb1/1hxGfV5EIV4jEOmAn0vL5NDbpOQ18sUX5ML7IBauvNqCNxTRmFA2GMrqTUQ8v8yFYOncxLRMxTgeT82CzVcvswBmkVAYo6vSzFBKeCcV/mXhy+bdzC7PcI5tnBKcM+RGCf7vtKoDoLq4LQN8yhfG+YRvbBh14S1Da+w0f3fEsLz/g3r8lyvYHe3ecx09k1iYH2pAyqAauVua39aKRSZuQGNVNaYrtPDfql2ipAx6xILApr7OpcqYPVITV1U/Vy7+XbXC93jYLea6qxRxxRqNg7wE43hbCErhzlp7XIwXSw6NRUPM64wLEB6DFccpidjGQOZRLna6E+viLKTTzbI8szurQqQjKeJS5AsAsXt/7Omeo3y0TUs+AS8kGqs1EogZhop7KXGcbSMvORBxYyE4ZVjiDpfdLcfSwyxEU/TWJ9PoZeURVCXdnYjr+4sW7ntpYPyzBSF5+gvLDXGj7rHLxU3rz5qRgv0kApNb1v92GR4rhPh3XSKRpAmEpgwBEJqUNYKSrowYNrAJkhIqexF5ET9HrLGQ4xsQAFFqeD4BLI9yA5P8mVRG/hK5arZ8151tF7bP1hK/YGceJGIYXv/PsHW+vRYwIOKUw/fqPpjteln6AJfpWcAM7bJlNKkW7IjDsGeBnaeuLuthE/qPKiUq2VIpC6Ubzj/1w2JJw037aqgbslLf7Gd4Nvah9K4c0d1QnSMCueMrCh/Ole2J1F67X6k60RrswKt81D+579/YXVDXUUNQmlYJLdoyvosaf5mm8W0GOn31DfdLIKC/+iTZkADA+B5g72XwGWQextd4ywF20K1hfD8FC0l2A5j+I00tDTfLqm+UtMPm7j6NlbuP4CWIHUlEMNdppy7FEQaMAosayNn6Nll06y9Y28gXYp5x1W7qv2OEk6Du9tnMDRxctKD9iS9WtJl4xEmQozO7I7uXoVmQFSxOcAWGzSE9Q8yzYouhpr2fibm1HhHSr15TWxUV7OpyT2/EgV4iscC3fXxgb/baaX/IdcbnIFsx1UipwKO4rw8QGRNJ1tB01dzMptJCJNsM0IVLi4ufq3BJM2O0jijv55RqQrCZREZdW9+QP7/LeUzCiPN3wqyX9xTxL6KX22v0SyuQcyR83a91YpRdqFyM0tBIiXxTXIBwK0WdhxrzdszcwWH/LzL0VxzFVuXk/VBNQI7WJWXem+Yw6j0h2ywEu5RoVBuBA4ede6wZLCUsgLqfWGB1zSFiDyXRtOfnSpal8iQquvVlEO13NGLeUCW7FePcUcJYFEaJ8w94idDHw01U02s469Hirschh9F08FCdKQFHdCSTOyzQyXpAiGGUxVw86z3NnLk43orZF0Fzxw0zRDnqyxxcYT1i17Zf/+tpE7+lJC50AmTnO9Ds5qh9s04/KlZqaHEx/bpJQe3Lou4a41tuOdZSyOt9wDzGEg0Vur+InPmB3IQebDIz7llzmbG/fFbrk4jGB5mBF0p/NoqRzryiyBt444Q5mL+x7zkefBGmvKtmMYqFAMNngNLIkcGYC5et9XlMa5vqqdZakXnWnJ4PksNSHL8uzKBR9wIIlNEKzmq5ExsNjP0nUso0A7FU5s4+gJJmG+RTXGH8T+6HxrR4w70XdF5P0XNWJvtTpeT5+WiPcSkJI+JEq/KZ5HXmLRRN2QFPB8q8FewBezdIqqmPGpMDMHX6Jss+F5209AFmfdzoNoFKx3CnmvOpo8P5IPFhqfDy4ZGfQbtzGgk/m1w8mt8VojGwe2RXXO49TLNJLhthzkh0GHdYXLkBPMK433Y5pLPqpNct1bKZQjE+upPQ4KU1nHz3NUWZCUari03L1MJw7l1lVorlQM/aFeJtgAEaV9GcoO9p/V4EsBiVEaQBxNBNa/zsiUkctH0rKocREPr1HIUoDjE5FZBCs27rHh5/rvJ93+8n18lqKJQIn0C1lID6Y9+ChDf7wFEs9KptngHEI+G6ifQBexRQmNvR4e1qx1vbzLGL3Uwg7lgpMRTpP1K6ZOqwu40u0Ob64yAX6uqeeYIT87B0AYA6a8WlFwUnaG0MF5wZPUtZu9iVJXKzZcmyhq451GPD34qnHcsfoiHKECYb/HwGOdu5GECKPD9ktL9cQI9i/QatRyDrbBSgB/EolXzMMNnuEnRx1QtHz6E4QkuZfPc8BDW4YjrwHfqOg4dfenIlRnpjnJmn6UQHlkT/saPDjykC8Al9Q4IILZTY6j4Xbr5hK8EoK+vNzto2Nzgx06Wch/U5RrYPfFvOiv6nk245WRbyaItCYB1NSQg3zWdgd23s+YNNLO7ips+fq8NX6LPOfrK4Va6OcIlgCk87N9WhQyfZj51h/v8KpMO19vAP6h20BTPxsEgBxMQXc7VfM40I84EllUt7DKQ4757AEaMaXPz2ujr29Y0aDbquQ7vPEyxPcu4SO4ZcWOZ4WcnHAezSQPFa142+zVm6vtvEEx7aexd9KXZf3uaf/IhL4wxHyH11sJlx+RqdfJTLTQ7VRYRPwhIZHvD+yMOgGcnf88kfOA2jgNN43G+4Zjl/W5egXnDDjib/fsxTapzNUpbg7RstIlbS279UAQVHg7xrzI6mMqpD9x8IxUN6Vr1/UUNhHDMVGHtPHkBe5ifemTZbPTlftXnSvqqK8Dz0MyYbJBDQTCzW1ryELCJHMwwTdxj7GNRnYWCGU54akwz1xPHNj+R2oPod7V/0yeA0eYQ7mmfyk7wVTB/CGzJ7POfh/ZvwIC7zJ34cYFiLXnnXv03PQ7aVzcgdti0MuPZYQMhotN9Q9uqv29CeiEkat6fcKRmDvdGWDTM0Zs/DSXSCbtSlv2yffiVFTnwsgMQwpBbZ8iRUKFVR/BHExDtCn+szBfZmblqWU51wmK3LQafRo/m0XuzTCp/2YQ32s/1wMMwWAtpDKvkA958oCA7T/wRMi53fqZfklKaFcYVFJXM9iQnL29LSnCbSv9klmIcaLc22QeIA7oGs2DGT93xj/FhxOlKCBDftX3AjZiacN0d4kWXtXXb31+sDk+62adFPTxTn+m6SbTLwu5qNx6TrEzhR1prLPFsXS1k7nieg8Go+v0oA+xVyEnw+vHBWk1ygOXmB+HgUmpfLDHeYFGfFyXc2J+fPkt308Ppf/pFlksp/bJepkx2kl0XSyA2i6jdg8F7RmbtSZqhthV/O+xfGXbpH7lH3g+LH1+6j2Ok0yn6PznpKUkpkg6bgMpq3BOUd+VvHTbjDrO8yeyJ++4pzsIURRtRLAEKmNQi5dvA5O/TJTYKrWYwQZwHkM24erpZ5MiG1Hj8nGFb4U0VCjXpgxmjqeqZSCzD5AYMwnvjRNAlf/3DtGhSUxLTyvhy/uFa2vcrihn6iHBkF9xFq3PxofP6ie7fOQeJQrv0GH9p070Ww76cYkczi8h9O12C4qu/O+n/XLb5zNKJV7PvRjyUnu1opp/mbmL2575GAS0Mrg75wq933SbejxbZ2bErvRUw92yGOIB7bPOV03ZFRnPHVL/Rcc/vunQ5o6OZngn7/s8WhlzGNTBlievj+dJAC2MImK/cxHvE2Ft2WEiij3LzI64mKJclywnlmxqFpp/FtvvROnyOMNW4w6KPb0ubyjXmCXTkuNMqMlWA8R3RDmTBmfm8ZTgFG83xBullGHEkFcvFcumVCB3OTLKjCHDPbvQDIFVU835N3Zy2r+fazq+LhdI4RS/QWyJK8rJtvGnaEO+VLa1qwPWeNi8yFsxUYimO8LkfRiE9kZle9zTB5TC9YAmM46WQwuACsNpOxP3/NDLq/kV6ip8oKClQcqVhk1gSItbmBupqoijPiLyaCLdVOUICGZvcX1ZMt5wqkx9K9lKmLLmzVairAhcF1Ui+m7rlTTTGGXjUAiLKNaLinGmlYUGuKmgxmIuca7IKC3bglHwI78Sj1e0Y1f5A11p0kiqphBGVODZiiCTpLS4YkmmiL4larjdNmooFxp3BAPNVvLDFkyzfYDY54a2WKDZvQsSg2ulDtBqb8dsE7JHMO2+o78pJXbcAfdVZi9s5KC3g9ZamolQcIkCtAfW0Pm4SCVxzlmrf4GqT+u3D9Fg8WPH51U0utK7zrD+Z7817phDtg34njpmB8KMGTO9P8vyMMLKMTq/7Ze6dvfSkvvv5thmXXAGHrj4dKuVICMsAjXkFGKE5H66Eucp7CZUVNhZp7uaDindSzA5LXuQVnDXtFv3Ib0Hz70SUXMuVwkffg4J4gjurXzTvyXZKeWkx3EIZlIncTcfkywjEUy+K5zV9D1deU1ZOJ+Yrr0mbtMg6Lm92QxS85G9c8pXrsDpH/ayvyu/PXe411VzSxsiQWALhf5ioNHuM5Fh1XdgXc7mGOKzPjKYi7pca3sKvfIS+3i8A784xK3J5i9zN4MozezPO9O2b4Hkos8cbpPwuLzI/ID2Hywdn5vI3G+vJ2HF2WrYwGV2FLdB54Ujpt8fX3msV6OdlfOWOp4Ei4Pu91g/u/FzQUFwpWy519lz4d98jL2mXY/CUt3gUoHdFqh9Vxz1UdpbRdXLc7GXdbNPJchXl/zHx1u5/E5gUz3f+fC4OfszRarvNozmPwD4xNPHnJN3TsCEwbfhIYiGObmJy4Nca7OXXZ3VB3aIqeQVL7Ix18zy6XnhvOKMazSTG60p2i47iGeCqzgOkCziMGDiswvpKvDSdW8wlLf+Sa9u5R63AtBYPj3hSKLbHIPKw1xG66xN+088U+no9jDhslq7fmEfqUHhyO7aSZMhLs2AB3YXNFhQgYVorXuLcGvnYh37OB8zDTXRo8V1tdVybeutA1inpR/ExU8OwY1WogTwjHn/gWPwkPnoD39oXvXeUDvkF6PVBr+rNDvtZN8sfe+Cqf4BgWKRgjsP4AsWH/iNZLw9/ndEJrIJH7bHINGhSqWvNBC0ZzG5PN9YdTsC5N4mXELP6Fo/GTvBvnttB8zyBZIsFEHAWQOP58jaJym48P/cQDwWgYaTMZUtE/c3IfgNX9K13HOptZQyDheQhZOPVgmjmZoC+2jD/QArEpHl6Nb113/zYyNl9ZrzOuardToezdEahpOg2jV3rHmzVI0vlQFbHRZqgrvvs1fx3//Yz8vw3JIqYALNX+WN6jz2dDVnu+648p+/91uUNkPB6bSZLJBJLkOGDJ4YWts8klmUsTOQI3cg46x0FE5oNx1pHzwRNyIs+r+RlK93GOHcN0vAKJhahCSTpoh5ch83sHoBHhjlr9SGe84tjRNhPiqK2msFFOh39y2wLGeELm27yGJBpGFPLpYFVeJ6k2wq1rMC1GEwOX49dW4ewL73Lp37/xhsHur0ogmPW/ZOTSRS35Ifss4r2SL9cPrRNlL6Avqdzn30Sxsp/dKJQer6xkyVptS7Xa1TsnE5zgkNCIHGXlcqtuHrKrO+PLW/imdm0xIfb9aUVuKp0Ns9izFgeGLJ0mAlOS5pwLMesfhoePcxVzmFt7syCCanWYMdvUmp3IgmtiuS7jxIgbNzuaQf7TeRaZs+KcNwWPohnvgO8paH7Rjpv3CC02GaleNHa0z31CPVbJHEu/hilmcgLpqw+oqBA32D25NKxYheq/AsgYJPf8EsKijcGFjy/CylroVKy/UkCrkmFmSTw3C7UPVRIz+aM++4Zszj+2P2PVZ6D5NdkCGxBcQLUrJ+hOnu8HoSTNWUs88AsnCv0nTHSB56k7Syer9DzOhAu9m9TtIuVsd1YVoFbuObuyRivFOCTHq5IWjq+pZLkmL9ussPFNXkAbymBnrGleLFI7CbLqt/LJj4PjdA1X8vMFphonHNbdy/7QGO+MgVR5UXTDIo8slsQ4SVbcA1ysHwcOwznQGc/bodIzg/dllNsYHoYIFpPec9GOYLyAlLNEyQapk9V0DowWC9BlS4rPvmx9xywr3qUz66a99TZ76x/m04oh9bWJRt2lqMklS1tFYV8X+T89djO0wtLowIPpXsDuPi8IEJf4iSPq8VI7G0avBc9G0r1pjh4zNwC1JjJXc2msd0yxwDQe8Vxr7TsUl+KlPpwnvh88mSTM33Qt9ZImX+ldL14bUcMZcLHWxLUhUDWmwinWi0n5hBDOsWLQehjcmy+eT8JPWMRsoafZK5RJy0lpD6w6eWUZ1xEiWOZvQF0zAiclKsjaAIxQ4T+fz++qgIb+d/asZjN3B7fby1l+xhhN8FVnHl8iVt5kzpjUxZ97RTiou2Y3Dnk6nBjlQO/Jbq7DO59mm4s8eeZZNfL8AHviIGYz1q/exDxzhwY1pVnZT1z+jfX+8eRNeYfGuxfioZ+PxfPYGLbD0LC6bx+Xw43FmBb3GDSYlWCOnWXGhqPQEi18D6jLlE4Tk0t/rsBDX1L77egO5/EdEVnbZLXQW2+BJDLqdbG+7q1jxM3zuEhgXVXqvBMmAq9suQ5bgef9KAYE0yimTTOtZ38HZGCPbPFppT8hyCl7IE5shOTLn2cY61GrAvw84rFfDix7E1B0v7yiTqSLjaJnj/Str6Tsy1wuboeAuVGmkAm5bDTvlMChtV212U5/InMGu5Mu418zKd0wJGkYXZwu+CRPxYsvdSpg3+MA8wHJud4h+JPMfm0Gh72x/sEJhCmy32XfPwbudntINuNSb++oO5qA/18rwvF/7ZrKhoQ5xobmCSl6PKMCyOvsiVIQQF9pEnz9DDB/vIz6Czsg//trKxYIQR+RBXQYLCCamY9nW3Z8Ob+l/Wc8JHiaPM636qJreb7f3CDBXH1JHlcgaXxlofIAdTnEA733b/wom4ikVwAtTvr1Oa0SwDUOcFHco5WHosa9tBJdROM41psFBbTJWXHydw7iqoJhjDpxjq6JAcf52kd6FJCfw6YryYApjaY20fyBphyK5TOF104SBgOvafb86rtPonQmjNcW0ITLFSbLSViYxhHnRcb10m1YivSnTcF9Xx8LAm0rf1F7Fdm1cgTOcGMSnCFpcbkG7HWptvi5LF6Xh+FqAcmQnBhOAECrSN5sXbXWoUdPp+M9uFY7Hz32bV4pnTPMMhiCwQe83zPk2Bg7CXueZOGfmB7EtQ4VDgu9itp1zF5pER8EF4t2nELrjvnpwnF+vp4dzQHwScSjEsgni4IuDj7OVeEv/uurCMRpnbusf9sQkz7/KPYfGnwvYtEO1cDP/l+LGIUHOpdrlAGyk8FPMpbacNueQs8Mc2qGmrfJQdhbSef/quenMSp9vRztt4HhVTa2znKjyZ28vr+WcK8m72eO5UR7Qapykf69smGOCP7o1aNbDQ/0B2uLAsVTSuw3E1rs44NXI5wjUXKQpQwlyX4oa+dBEGPah4UR10jCDRWyKwkCRqbZD/1RxD36tfeUZWLghD2Dg/ZDBPU0E3z8xGW2rZ7zc2M68rc+5zxmnKiHXUaMtUt42JbC4Zvv60Wnh3gX+zLvezRbcVZqqFg+kI1fksGBWe8Ufk34/E5hcyTaVpAeBKgKLE7zdSgXGrdAkYDv6zAhQP3Ml/Udx1OVT1m0mOjccBowlFcJ4kLN+ef3bIodwc9I1zJFta1tUtfheSgoUtv19bS3zbgfNqwubo+HeEuO6bRZDYOXfARg8cO57/GhucsCN6IR4y1E+iPT4uj52D3zmdoGjNq98+QpWcNJ4cLPkM0G0koy6Lu/Ty0onLy3kKBAEIK4zAED5S6P/3u3qqXg8Y+qBKy/sNRkXAVl851IuJLCv3M7nis8bCAQdR4ODm+KYrJNvsz//jki0jQS1Pak7/6TA22Kp0eXeQFvQNjDj+s8Dwqhdt8UQN5M64axNprVM6sCh4sHvp+bXJ/bcy8dNy+XGBRej0jJXc7FdYeQ49eDNyPjkNymOwUFLFLSbzPpLLwFUSRxBNdX2teA2wsnYH4Wt2k0nBEROdvz8wF3StiFubjvp1/RZFNXp0J9GlrEiLJuS+GFfAq+Tg6YBFtH+oblPRTgO9sSPzH+UvmQFZrmEkTw456ftzm3TTUp/50TveD9J66BtYtxwDnOhsDG2XDRt/X59Q8daqgJS4MM+7z/LVIScwDP5YoMzb0Ajyu2GuVyMPtQaa5dCNqmUbRqryIbKnoeUob7RfiaAosIX+6qFFKgnyu1wnQtEa+/dQadAssYjgRW/XxI5rJUkIAmnXol6mX7lOoO1AZpYhB/LIbpxqjCPWZ+E5RySPhcSv4KknAYO5MMv8yQ/qgKQyXJyY+RJwhmAFS1zwLlly0hY5RwJqHlEAddmF42QXZUBIT6kUO8KRGgd0aAWoz8GfYF9wf1/pv3/j+S9/9RvP9mvL/v0nuoDCnxKZIEzgwUZLuuyP1SrYl4ZQsCvTTqrqeHSrnFwCRJAy8AQlpxm+2XOCfklTqI9NOr7+WtSx4YWFTHdCBMgb7m9LKAy4IOCW32bDvq1nen7/Xsvfi7r9mu/M8fgDMt3KWJtEB23ed3W9xQ6msv/R+o37y3TO3i7/ELohbAIwsafGCRgxiT7nm4bXwN2A+OUzPLg/rdQHhDdK2lFl8U/IeKH/S+bK4PoYU6CklZlIMHAgWgHfXBCS2Xnuqoi++oS+AZVvFyqUObuAgyfoAGLI3gI7ni/dYWn+wfKD8vHHWWiN9Tfl9ezBc76JcfOVUEIdMkT/jAZ6RV9mFX9zuzjU219XxUcPevjpJ2Pkfm/Pgp1f3ceY4DDwl/6fluUps3ZNuvStI//f9Nzh5aTsqT2ML2BpHPqrkWQjAo8NoohJA+en/rWxDIe/vuVx/JPVDklyEKZpaGdQPRGgS97PyRvMsaDA2eurWoY3aiICENRF9m+VA5M5+RsZ02cHHVJP5dzHPyGK3d88qH8pWM1+Jf2j+8dqlfoAQK0LF2K+a5sU5uvs71dqs+1Byaq9Psq1sp5PJUQ7l5QjplKDd+STD6JRaI6mGxUqca0tvcuNuZNU2MW3CejmR+KzKr8wi0WUd87YZ+I6HRV+OInAyZAebkd3QdOtbc48c/K6xQNK+XZmqqIOqNAEeoNGBleAjEV4cAa2gIJAeGQE4P9e+NMVQ9KtxDdAGUtHXbSDYlDBzeMOC3w/o9MoZKtM/GGPmCcAYa1OWbfPhl3yRnVgWQ0nPev23CUG2gxMeoQcYpmQlvKWdtqs1E/BEQWGH1/KdJEgbxiQBwysCWchaQiLgBEFABfRd84xpxV9ZdLoYUeZPqjtH4qeXqBTtVAVrUrHoAXHKm9fdAM7SaC1zM0QZOGsC6Y5nzV/8uNaNKcEo14Hknc+sUIX+6md3j39FCad/BMrsA4yhn3p8CXX2WniAcfuwl6CWRpmDs1YRQ3+ElJha+s7p+NTlL9KX/YW4ULbEghnoYa4+Ms6kNRnfsU/uKnCt9X3cE55Qu1rX0sNj3YuPyTO9v0TJ1Q459agxmZotd3899sMaPnKECMRGMuHNAkPCDQM9BfT/voYXaoD5HsiBZABl330O2X8aUirOgMwUlm9kFtT+NINC7F1BQ9qUbVPf4S4h3jyTInx8gsi5PAHS9MAfTQNI98aetJMLZ73trBhJav7D6IufxPTuX4l932ggGHU7+DaLUb8HENUHDay5Bkx9kYq/Vt5cDj7jyvX/i8cLeRjNvIDa+v4snrjGEhEGWxYrFUa0KdcfBRYuo84b1luMeyk3kDQ9du23FY2VMpGzwTCKtmrZcdTIl9Trwonx+C3H+4ssLjopM8zaFIKkxGXku4/vZw/00bnVif7bPwPMkOx67yQ2vdlDCkL0/keFDmOot08Jd0v+Bz46eNdp/Urs1EvE7sURPHKpwM+42IZC6EQCZY8GVfT+OwZ4JcDcut2ZBct0lyLqxyB0heCZK/PzylfVX2tiDXgkK2PF35wL4PSu/XmnMRfID4uRvqPF4YnxRfgML/BAc6Knv6dBT6rX4jiKh2MQnLdDUvUNRhxpjkWeuYM93+W6XGi/yfajjPXkCY7NP+hYxxEOz/21lvJcJIOFWvus6qmSzLZ2aMppHOig4BSVpcUyj8Vc+lj4tu1U2yMYpJHPxEPZAixY2JI/sYvts1HdbVgLds9j1vlI1ssyaZlGGwSZMu1Tt6D6orcq3IOlXUsjoGJXEIYl1j3NHCQsuzgWI2rmpcBIg9eiOn+anzAOlLO6ge+1uiD7sVHLjssoD4vkrSZ/uWeCDhokY58tQ9hoo43LV1tw5lsVyTQrt59v1BW2jtW278ARsdwdVobn/umZWq+K9OPMb1HE+Eu7UfnQL+DWcr4Q5AKP+IUfHNrCwkynW2X/HUzrG5e9diyQnAHI1Nc8dDqDnHhaSzelndq4RvBsMFfXnzdR7brqeCl4/aAVOLf1UPz55wFr2UJNyzd957MKKaIq01vSeynH4m3v4J4oInFOypIzE/rNDrwPMDCvi5njOf13yrSnjo5q81+WG63SxS1f8bF6pMOz4Wg4B5937PYSZw9cajEO2aGbN+J5nWPSmp/FlxoD1C/Mxgf8gXv80Vj3orXV/epD2lcNcLNUavqUlPBZ9IrvylWpKQCynTID73sWJTFy+mkdNdobHmA8R1dmUfLSB+JaJcGohqKsFmVPwgiy/fh+UQCt4nM/ykvioFJ9qHOrX65xPRndnM0WN+9w1tOlGOs9xHRtXL/XTOP2f0rnMT3H6hb0xQeWq1gwTFu8Jy/WhFelxXmpWFjEzozIwhPtQABtNZI+Lw9ufWa3Vdqi9o3gs5tslZZ8/irbH5eOFFITos6/+vXfO7fjLsrK98bL3FM+FR37cH0smkwINpLa4G0WGhnsJovJc3H0oIjCRuUgxRM1BEdlqHyDb4bKYzn55yYQQIrMjedBkb1Ig19ltczwwxKhI6orLPyKcRaFF5orhrymIekDjiUBXUP+oQ9Iuq8hMIT/e+usGkdCOsVJptsBEZrr4PAnRkSjgMBYvj5po45HQRs/SVr5BaVUMEdsZdZSy16SIXFf+TCFRlKh8Y+oOlIKW1YWWd+kkq4KgUyL1hV2SsNmTCug6+SsbmiUIciG+aES7DDcWCe0U+uOkqTwHRfwQtDgLfYpLLqCfYf0jT7nfH0gTkdRG88NcGXhWOUTsVwExNlCR0s/8MgxtaFHZZuSIVedgIjOF3C9X+BoZHHg2OnidARvCo0IBwSu9ccDxGJk7Z8Vktn0FILoiEWVGuqdAzON7qFNh/UEwLrst8xfibYGnhm6AG9n5cOpFvwDg/mGS46LDfu4BTweMFw7QElFaxeXCn9FBhvejeDQNLetR5BxCxqZ6iC5lvv2xQIHYvQElgQDy8+aw8DYOKIZSUT44+cEE7KzqXNJ2tMW5C1DWwcAqTs5ksekHqDPI1qHRAo5qVTVXc9cklIEloSikhq3sWiRbljrPAwelMKcc534vWVzt1YhTDdI9l9mwDVYjm2/iJUJS1hrVTJ2sunGDabvsJcQ1HpptZ6nx+PGdYY2nPwUkUQ4lS8Tjnvk0C0S8xoG7MBPya1ybM6ZbLR04cN7/3VXjc+lGhLA2lLWotLp13mGI/uQkFfNjP1nM2PNqzuQ5hSdTATKxqOq2TuKn0CjjKQxlPkWwUOUhcw8R2ZOHyRZ28RRnW4E4CBtgxYLqdHsA/nR9HdqIeDnWSN/TeKCot5MJhK6IqhpsAEJJztvaZk41w4FMeFUgG8PP/VJgJhyC/K3jFHPSVXODb0JBbS42KXoUvKVruBwU342CkjT5Ki9BEN+jicJraVDz6/0WdM1ST3TIsQGDVLwRDgu18aHUKVQl52BOwzLOSwHd0g1xxU9ZdWXrSxcV7mXzhwKHIpILzw8AAUyLQpEMzqWBKHCiQhYrqeW5i1r4HVJzu9nH5L23SZtDUXt7rlaIHa8wokBYgE6va8UCD2XjxV4dycKSBvxx9ju6hCfX6Xw/Hx1r9+XmV7aiurpK+lneOYIAv/nyE7LARbYFYUNzzYLBcB/UfbDxdjikKv1hda90Z5rhNDgsz4zVMNpAihRR+mPN9LZO8rbWEtZ2WUxiTRuKCpyBSlkefGngGmLne5EqEKblgny0MMf+apsCWHq5JKkaJuR0UdEs9amW5qg+EYop5A8FWq8DuLWXKhTyONXB73d3yTqKpQihkSxAYi2XlflhHAssNzUo5k9bLy1CPnWzuoCPeVWViHVAVaqbM2iq5hkulP4SOlw7cRmcCx3B8nxoi6kwqHboZ3RZC9BCalIuUMJ7ljC3rlO83MEGb3Quy2i9nQnUz8FxxCrYGKJN2SB/RYZl8NlBDGOLwDiIcU7L/cih8awPsSnCgi5SwhW9oo3dGBGo9elbC63cYOu1cp940k9mRelCSfR8Xk50E9X4JjktXiV02yBox9zx9gaYKB5xPDe7VeyfGkXdMFeRIghsHAJMJTLcJMQairSB29luj7tk4DBQCfsjh5XwmB4DvxyLQ28VyF1tmBXOofV3ZPKBdXhk3ljPxgI6w4FGfOdf40Y1gWqkhTdYX+WhG9H1NrFrt0/rGHR/Sf1tzMl3+ZyvrjwuDsIk6Hv2Lla3GpTPUJSvlv/CGyj0N/plXV2WcRUMX9rqiwItpMtCoDf1ycL1I+dJ1HBnBy/s53JOHf/7Y2yKOdm6ob+LT39wike6atNW2nJJ4U95iYmhr64zgvCHUgXDaW3M/U9x6Ygfmm1zgCfR0tNoPpg6318LguZt38DjTmnfEdKTSseGLKQMH+bufSEqYcdPCwISQwaymURRWLz/1CB8Os/xx9ZI3H+UShFOAHU2N3Dw98QBoO6b8xz6KK5S3U1qgDsImQxfxx0CDgg4cMfh7ThQ4MAch9XwCAlogs+WU3JGdNC0KIU/8otcwEJ2JDtHDlkCEHBIBN6jIYAdBb4OPKkEyxOyz1qs7PvzejfoVacxnCenRdXm1TuV4EbhSfATRQYQ4KKg2+lhKxDvUOS3JrJuq1WPK/W2TDqW8RghQds6N0fEwr8M4QherJfRjM+wdoTFw24/uf1CkEHdDiAlfvdGlXuBalOUYBIX2+T99G7CZK9J9fn4Ccnr2+Ivs7tdDZB8odP5jnY5+e67lIEtceTt7zYKs0/Lv9DQzvtwnxTDSGzjkag9rn6brPgNq+SKXnkVBFmPU0XuF3Gd37rlXDkhHKCedFAQcVUJO0JYShyPB+trl2+yAg1OwGQmH839qC9u/jAWcJfPtIM/585v4dq/W7nQ9e4DfbyVWtO8BLsUUJNY8RPUNY3ZmyzvVpOo7LGreHto1vk2z9T5i8d2qsEKuLo9SHBn8X1IyDa4CIyxrvCaW3I8k286jzq+LP4QG9O3rExzztxQqC0bRTcOfxyJ91PmnB+bFRvHToAWCupEbExWHzDtrYfwawHL354oZsg6BixnUJPk0QYC3Eq5VfSafVCJKbntH4bOeVDYr4PaMeFusiRj+NpZ4pWlRbEJNcfM3g1gvlMtrD/C019fX2F1NJBAW9urec+HDjGN+AwxTqqYmMdjt7JE2Lh3celZlvvMzXwijYfNBjsztw4QudHKSY7evZK8k1uXs0pHcChoKDHyI70JYc7vSvai+OFQ7w0Y4YP7YAUILieIUjZqWebfWCbU93ESuh/DIZ1e5/HqzGI15AawU7pSsxploeUqG4aVUZLnYjP39Ed41YhTiP5saqfNPOfD6hacLsyOY1Nj2FEfCwG/QJsAwjl7p/6kkoUMOp5D6ovZoBMUiFMNQSAiWs2IdwgJuleaVc0u8jyfuhLim9C5p4l3gC0AMRld/3UwRLQFkOeG9z87Dr9uhe6XMKwaEONC+fzB8bD9UewdnSMCJJIscZYKubRc6AR8TbgScEBOb7DmhVwJrosMYv4KQ4PlLGN1RCY4L46b0q/4nsiOX9gNroYVuLi1wgQNyVt3L6AcXNYp4foXGFfCXUlMSiDq6eDqYpNt9Lrh+aStDThaxKRa+HsAtWwHNDk/sCTi6ebWfFeGn/wf/2MwqnZXJWZtwi99Pboe5VNpP18P/fHNYbl+EbDHWt/qcfh0KNeX7e9+syrZXL72v35z632qtyHGSjo6GQX/USx4VSzxx1dP+4dh8yWOl0/max/1vhjqQX95cLctrpq4VSwSlxXT/C2+anvhX5gtedSmNMWD6Hj+erHMlCfIx+6VwVjwxGrDCag+6BHq2kaCVMINn/NFSt4ufDE4eSMCHCpE2IMRMJJrNRJU1wHpUptBdTM7/IofbWCVvyKXeN83skaKfMjysA92z6493NdNZlqSIJhUTyx9FKyQAG9fnkSukKZs5rgPY99MgUPjI7Y21WwqSvK1+cByLlXjW4bthKT6CsM6uSNRL1n0fbgTzibAIHCpo4wO5/T44OrN/h79+7P5eKuR4ld2OJhj+EQGNddJa7JNJZhiwLB8RS+guQ6ApOrhFPUtA65v5RrWExh6FLcDBDq7uf7kCCY9E/8Rkp+bLH9ZBTZjPoKU9P259We7WCWhVJGs+v51yNAbAo2m29o1RAlZt+QTD+FizI6rw5eMHM71Ncj4ZJ2oRuzww4CZ53mPBPX9nn3uQ4RSNBAqfoVlstsUOAq0017udNjyx27/+GulZjDiTrvRLRMYzqe0ziNLwGHzzGsW50bJW58BUqpr33l3COWrm2gPsnpvZ6QKB2kXjLQgDjbxXpe8/yfb/hY3Jmd0S9JtyJNgpbYXn607OgveGOz8SpdUNnwu3ZnsusCnq7JfeLsh2OeR7QJkuwDZ5pYv7iYH7icR9iT03ijincMxPp6ql6EkA0rvt3qAMdIpHqtodXloR7j0HovG8yIIRwBkmN7Z0X8OcbBkjPs2+tkoQFVcO0cuw16ewX8uMnbkjJyOQitUTYI+bkdUcQS3Snx/HVCpEOZ7iaK+j1Wmdix+rJ+eqXXd8C/GcHfenzppRRof7OkihAB8Epv0wOlpuG4o1XGkkgL7vhCnYMIO+2QqEVzvBosHqKc1AYygVCto8NtbUO6NvK6G//cFH94G9l1rJGG/4yC/zPcMnfvlMOemQBCOPCa02LTwu5OPv56/uI4qK/6uKptMVXlgo4AS1NY9WVqc6LorDs/Fp1POQVsBUSae55j4dwCKtCLF0P9IgEceH0TIun1cs7nTuX1AyVZnDDdQMN4iE8PguN+p5KE5Yrw00Ud++VE297NjDMUr6oLJfD4enGmT7yoXZrj1KIxSdXIqRqaYPEisvDIoe3MYq+reKfI2UzCvUToIjK9UIca1nd6iupSfudwcIRzAqHS8keKTYNptcciLqgoZNaTCqhtqBKVRos6/2S+qCr+ynMAC3eqaoOzBB/fAHXzlIQDbSNeWttmwiThGYg9gGcyZ33bFACIDucd2d3HFDHZ8xUtCkY9xEMHLmPCopyCGaaD/BEwwwm29aM/ScXDyGMueBTKTu59t/HAsG1Mw6hQZfX1U+5nMH7VTMnb/HumN275tp7t9oRkYfHAl2oFffXswYTluFSLYq5TylsidcIDw9j0TeoEmO6F1/wreJ/01NlN2CuVRfKiNdqbEejklX5T6XuODRR8KFWdpu/KheGBHoYHQC2ENa3FXyrrsctNb5fSamyW0cYdS5c1zFcyeqO1EcDXQ/KB16YoZFUPSWOiAzHnrfV6Jnxa3NTXb4pN+pqckZpGc8S5c2Kabp+nYBwxqlx7EMpUbgzjvhr0RDhtzG7Q7kqQxoMfBS2GCtQFgESsg8jz6nT0sihZkOXtHOzFz/4mu/aVJrWSx7su+vLHAne+JmPseLcYtsMyLTyH4oV+raRkJzzeo1DV2XYAWQTmGxn+vVe6zaAFH27x3iiMkpLyUUCgRIlPK6sL7b22OXJDx+ttWhImlSiP/LLn0Pw2+RPVamuKEn+Nbra+jNas8UnaxWdS2M28xwQQt5Uf2p1aZcHD9a2Yktqs7+3bHUTK5RfO4rhC4p3Zz6YBuzclDrDWupxr46NrqQ+LLYh+vBNvElG1Iom1WFqNpk7JIpdrVXOpHPShmBlDC6FhiEJMzNn6RtgyaqRUlwBuioASg+mvNCzx74OMgapEn6WdBGDR1zYaMIGsd8toJOYcYbAATjOiGqFNH4QbL4wHVh2f6QnJfkDA+/C/HjnirE5F1n0JqbEZqqLHVBp5gi9ZgvNWGP/cDdATxBltux8+jKQKRR11CmpuoBoLUOW9bQBbaDjlaRHTO0w0mUBFC/itMHcGUjoKgilkOESFW9nIZWgXEN5Y1eJjqgsYSR3bVOFgjQWkJjgOayFegG3qxExMVCCQhpek+2Pe+IFXqFqQrM7WriDBBMVEELezNH5jxHA2ud0Qe/TJMV6hFo3SL5L4UwzURHw5SVeTV7CM4Wy8RtsFSvWNu5NrDxPQYZZ6m87moxCq3Y77WtJ9Tdm4eULQtc2tdqS70s+i4HocinhaWSx8s0d+Z0fQKgA5hj3raomfDEeNoxsZlgf46FC5cyCbBFDzrSRj3kh4urMxXzm1pAwj4PJgYrWoZJKygDtZXNACYZA+dzL2v8/NcEO9FEEco5qbZ0RgnDmYO3Xzm7zovX6IDB3pCFzC9A5uDtoaec+PjoezhsGZVxl0IKhWE4MEYOuastAAo0h14dkijuYkmOak3kpBfgNFuih3aLfjoPtQJS/amEXIczHfqAlCePXzQ5GOoXuHZG8ZucHl7MhOvAKkhG2bMXgt9dbI2cOJdDwe2HQqIPcfuDJxpJmQZlFkpPlnS/91jkRC/Qo20RhGxVLODhPCI/TkZmXBjux8CqHDUadTP3XTWZ725nk1oQXpRsEPmpTWOp30tO0TqEKEpDSwqUuPuw7U89dPlJ0RgLBLH3IsYB1XIobH2wPkL9nErX9ePQFZ9xcBQfGrxVcQh2V1LfMliI8baEkKrt8f5JsTCGpT6w6+X2Aah9QD4wMkLwsPNkQgp0riV8b0PQmdjfWFby0k5F/Evl+RUM6Q6OQWhN6DYBzZcgdEQ4AxWZaphG79O7geQJ24JlcEj94UMp1EnqJbCmHlU6tNwiRY6UTnjTBG3HoZqx4ZBnOIKUCTpwpZA5Hy4ojXs6AzFA/a/WrTCQ5QAZ26IOkROlEEF63aBBjGDZxO9wt7Wy8qG2d54NWCDyNbpyA5UWhvXXTmaWMwVIpZZKBjFkF7LnsDBqNxJyghxjXFz7nPNm26SiJhOLe/GkjIp/hs8W3Mke1+jlS53QRTItz7KjrMfWOGxPWpCLVnY5rFtQWPEG7HRdBPKY0hJ8pssdiOeRPnuXDP6lS8hKkwS07Ry7yoC8aoJTnj+X/Sqc5OmY6TbXFGc09Amyao4nhS1y1u5mC6CN1uhFaVvEg+BjzcSWZzPaAfHCqdUsESFjXNNvKG9DEzN2Q4H1hsEyWBwpLPXh8/uKtZiJx4o12CFBYudRa4Dit2lgkpLSuZDLdimXOzgCo36I2CJiH032cpSRNE48zxba3i5LXNad/utWJ//axS8RA0e+In/3Q8UffjLKS4Nj/led6gn3b6QL91xw4FNxa6hoDqsfPi5dSXE6c0C1Gj+0B3bpVw4feqtO8cMBUPYgyZHcTlSwu8/iEgMHx+L1+NJFbMd4IVyC5v+juEiCpl476Oml3HH90WHixXyrm5ODKJ8DR+pfbMUwm3cuQed9QsVGG5ZLGIl9A+aHJZktaxyRMTdYTN1DVegiy22CKk5txSRE7y54Bx5/YN169ies5cDcEHGnql9d9fde+GROLV8bA/A7ZR4zGP3YJULETQtCbINI5DKCZFvVKFj//GWR2okCiFxwA2DpskTfkCqRum9GRrBmTot0EJogYnz/s0DCPo7mmZ2UNvPvBfP1axW90sN2bhE8AvkIzCDDAl8fce2FS/hIPRv6e3dJ8pGQXQtyYhkBz/FfdwEyoRqxc8Gcxv2PYw6LE3bT7FRrE44hVoOpmXp4woD3xOSLuXpDs6isGFA3d5Yn4Eh2VYp1XdIqWdv9qFcUKzUy6GIxAb+Li+mALdA235rcqW63n+AqWCxODuGUu9IKRILUEdMG9ylWw0f18LEJnsB7DChPvoKeXN4Q/+0JvQhaaOF/NhkcAxuHMpdYRMCvoyZbnucQYrBwSLVA3sa+x4eSLP3eaft+JHE1M23yQ8UnHRRjjjrYqHCdPkUhbU0T4HW16AyQ7sGVmn7qEyZyP6mojZJUeFuIKFwT3W9GzDtjqI4kLg4toAMuCVy3j1vkLLi8uBQ0koNisMbudEAJIyTufE15r/vKLFvbrn52QSTKo9fWvjhOgLHhvjg+wB5GfBXAPKjOjsvRUed3VOPRm4ZqtJUKq86LTW0moaFg6KGrUQIG2mPvaOutX/KsRyLeIfIULNjNgt9LCIlMHlwBPoza61zF1iCu/mD1cmP4LZ4kezPVLmfjrsm6Y1gZUj2BCZAgduoRHxcqlHtNruv57NQpBIaAjduLIBzu30dqMIcTattKY7ZB4Qpszv6n0OCmim75jGVr6gSBoWo47EqU06JEyKvcbezaC+EmQngo/cbEia/yqUJaxb93aGEB9RVroxsAZ6XoXYdEXRghDXYhfF54BBWguz1KF1SeSToPY9sQF50uWhtXvDAYsWONCphCCamU6LrMyxAsDj0oAU9786zrCQQsIxkC2xb43zgtmHgG4/14kAUp5SqGD67BLDDltK/+u7NUMXxWNFeyH1As5IEnFe5HQrwxhlrLWm5iMkc9dXRLUJlGWFuxDwed6xuHlmdCU2aukybrHCsgigRHV0rx7puaw3tfTZs62esH+yU7Qj97cS9Kks/w8bL4s0JMyW23TNqb+ncoXMq4TbBm5a3sTT4acOlPhLkV0hdsgFWkM6EDBURjmQ5XwtMlvZW7okTE3raE90eqBwFGOjqzXccip0n4wsBOs5Ivtxr8fwZUzJNwIH/VcXqTtRcPRfiflgD6MoaxboB8Y0uoxf7qdBYYBk+FnCweGiF2QuLpaE6yKOQOWyNtXsKOcmD47WPFmKDDstJdLLUiGBE9f4nkl1VhwZL0vmFIcwMOAwsGB5vuiHUf6W95T0zgcg8W2o03JQxH4Ww2JVkA9enNeratQ3uW8bPBBI9PpixJq1/Mz9RoJwItlMf3WtswaakaYGJo6S0ZPHK61gjFKtEQo8X7INo1sj/yG0U2VA//8BPuyPTuzem6k2VbVkVlcGFsBmKQtpJ9UiKnytF6Kwv4HgEhE4wNJgPRU8ZCne2prqhft3z3yQbd6OoADyZNUXTf9Va61wcFWEmNxi9bxIP778XjgEXcwbz9iGKgjDfkC9G5pium+CarOmpbu5neEpzm3CFfBtyQRMohksHo1bsCwHSZvkeTxB2CW1B55yBrav0BHp5wSxYiAQH1NVeJfx4k6KQ6nu/sxzuRyze8KxFKcXOrBz57L6/0BRirWcah7QxV1a9h+9cmL8hFmRcSRQDswvYADOKodBbymnh2z/d3PCzN2rFcxc1uSRidRpHd4oI9hsL3YpWDbJFEgZbIXe1rTgqMHbNNJDaYBQkdV/hHekBGZElwrcGBu7Vi2A3KBxqZNFgT2XEa++lgyQmM2plQioOsbF47+mxt1LsdDKNtkcMr03Rhaxka2siu4SD4hVhcwdLdFPuRRaHqHtb/C5n3ONC9r5V7EE5+gG+Za0zpO260iQErqPq5NyqEbeekwds4X1LE6L/fV10Poer8T+Hr9UyhsBAmAs5THx8dz2J0x2kGlqDO7tsvTf4sMn/7ScFvDiFJ4CZq4tFKdflT7b4w/kJtlxqsNMrJG7byMZ2QisURpNX017WgKz1Syecggdyo683nDmKlfGEBY7sBAjerR0DSN6ETzpQdS3jmkYOuHfewuMS+8Skmcky+QuZErP+AXyF6HSVdzQu0EN7RpLZNjrb1kyJgpOwkjaZqbCesWocS8VEoGQXvhLSYkO4LohI04o76gIcx2x+eShjLy3/H/LPTUnB2GvTl5saXWEyJ83QLRRdaZwf1U1oCiHB9LvI8W11zZ8zAXAHOKYrBvBKwDUOxcvSorsQJsp9FyPU9wwYlfVuo2sxq855eziSovCeNKY5uvCFMzWk02zrhyIlFaXm14nUX3278hWWnoJKwMuMTY5XLGlvr2Ju0CC+ZEz7dBZ12mfNAtFRg+2L5uYMo7x1Irb2DqcQ/zbCh0/h8+dFVmyo4Sk2NmsNj6wXjQoqTRSmxcbFi+7YwkNgNVq5fzkgA6v0NPzsZDM1hcItKa7cyC9LdfuJYx3VyvdIvhEvdsAnQ2Tk7FJzcwQqy8w+A4giu3CREou4SmqojNRmT00qmoT7vxAYwUM8gKeO9divnP+qZl6FHstKZlOMdFlOQRdBIgYmkoCTV4k5iX7CoD5dD3fqQhxpzT9/s3k+7WrL+TPxKyZ5fs2m47bELFGNJci7lAKao3lts5pBCpP11kVCrT3j+OWY8c96R7nsEZoQAZKeigoz5dNxyF4dNKrveZI1VpcyiITr9XrlfibGz0Gtx/jMLp6LJBnrW9jzlzfP44XVZeDaKLfazB0LvTL/G7sYA62vgql4nAFUd0/v5XwUJw5i5/ZIReA06xYMm+ZtSo8/yJXUY5wSCkytCHJ8yGYVVPTB8hOe3WOvAAiDD22AeZtBkGktR87Vy4woo66khcLA0bfkYxm41X/UD5LCsdLJPLK8VJn71VnDIvj6aK2hx/HouiE0OWkc/iu9pbHUeJC0U2G76aCu1VqGenRCzW20/VC7Xeel4xc7uwqdnOGmQrQpoqeL1cqd+KcnN6XVqTnN6fvWj7GhS27uaJufIEN7jc7OfNgqFMKRIxvPoL9+j8DBZtt6Eb+CNEP8Hbcc3YAS9JErNhTzxZEo8nIl+bxIk6guW8fMXIv7AGidajtNdWzlDvqeGv9h+U/FwA08NGCJajM8iTIVoKy1zmqS6vOyRhhvFJZc5IFpd0BIIhiAvIjRnSvO1eju7F4XTTTsHQ/Pw8kvAvbabQFqN4hPidWDhNxlTyW4LyrxC49mzsuLKkxAz0tk4uDC8n6b7IpDdqpeWaZUR9at8sDKExUVqY6SGoVSjV/TgjmbKhFKr9kqrXmNnkrooHf+fFFMAKDSxlYDLL/sC0uUHKbexQFZpM3E/Ez9Yn11gmusiACEVZw40gOjoZrz2BTOQtQSOcbUSMaDoh3q//O9FKoRqEfpWJdXf5wGABcwy4DmqrzhjqsubqSDIhY5AU6OLiQxh1AO7yLpFLhbJz8zZb6FHF0jUrloXo5+aQW+4QFuaqX0qEshzYsYqWKL2nVs8/Hbs+fds3812ZcAgBSh9fOVB7PhMvdPGVDWFrkIjMA365hRyHkI7vjJiFhLBHOLA9gP2n1wJxGpNuTnZo9aRi+Ey2N5WB4xfejTNG827l8/KwON8W+PTDUi4TmxZlqxUVUett4p/po3UY7NU9rDO03SHuYFyyJ9KLDxZpOmjO0Ysdi/giB+PQgMHfKTJcUCGnRNk11Fou9rEeyRjRizi7cznSodVIpem0FJfrpyb6+CgLST8ADxfcm861Vn4Aw5rrI5v2E1XoyE8y4Utf19ynDUWOWo5LwTem+pGwZtJFKW1HQylyPoK+cwL7FZ3Og3qOkU46MPvefUMT7yYJdCxQQWw5HGAUUxK45HnF4+CReXFQ+uDQa8uXt/CLBmbPNHi6P2GtjukPeyFPGeERToplEgVF7qEtqRGvwaxUbGZ21leP6cE0hASzsVZiUmSxJ/9mxebPcE1r2j/rgYCm/pyrKYse6xwAJVSOg9VzT3UfDgjZKsAPMwtgS2BXxQbEvRsFopRDCV+qSjqUKSUt9iIRxR1FudiMIJ9xkKM71YqRpqPADqGbAApVpUyIPnCMQhFZx90MRVmkO3/U9lweehXKnegRfmjlf1zumxg+7z/jiaADI61y3A42I/Hx6+V6L4lPvynmn78JqKPGjOz4cvZG8ChWjcALFA3fXGUQsb3nBzIc07R1IMMvI5/7OcJ48yeOVtAjFSZTLIV820Wt6IpsMu7SafKmo64hMUZKSnBwJZcf8wTeWJgPlNgSCdVa9qmFoHPoLp4Cghotu6kjwNopbZGcIXHwaa09jAAqPp0fUucOA5udEKSIHubxpHLPIcuv3r/HMNEoq3f7kZzhBiRBdMnzCUjwtOIstu1hfWJYRfzKiazbdkDHkqnaWbhtNkS+8dfozb1JsfmBF6TiAghM7F+QLEI+M2FNDFIIOyMRMP+rFQRp0+jbPAWgePUxSRuaR6sjQpuSYSYYTUrkXnBnNiLr9GKBwyfblmChry36cGnaw8BTzZcQ3jS4Wgpu+PHT7pHX/BLSSZYAyBBol7dVVNY4iGFRgtH1nq8vhE7ERJHKkHxSNQCTxIxMMnT0cuRfSrKjIQxJo4wsL4j6wF0/RZmRk8+rhVpC812TAx/Qvp4Tq2I9wk9EntRloVsTzVmliaOiLSUUXI8ISMMT9heStlkmyINfgZSg2vmoVISv0I3UJfo0xzY8q+SnVNGXWUrQlezdXwOPoa9xPTlkdWDoGk1NjMrBknAl3XDwTQn0c+Ds46kgA1MEKm8HhRXGdSK74j5Xn7hysBLSEiJetTlia5il6iodzAekhjWZEoEbS58veVcsPrCTbNyFpkiMNtVBJcamIbq19DCXAdXz7MaXulc4umSgKtsoEpki+nWZErHUok7M5BvPEJnkwW70ruIoTR/nwYUgoRNbTL0su6NM0Fl1iAu6n+kPHYMbBo7RGq2D3Ac3mPxXTCGrjuVyEWVEuilS20laS7CzzzmWQIrYKQDRmZn6DAJBETA9RzdX7YNEIs9QXzTLcweDKhsmxeTRVsIVoNINqyOgumSVVhJMqUrzYBeJ2c9rbdvKqRmk7RVNGjbjZcV1qhejw1E1Q7DGThlaRVjYhIXstacj9zJJzwgYzMiCGkhAjCoAsnbnQTluvXaVQ3GfUggbTdAysSEkai/NAKrWaSvHihXrvnqTmNaATD2CI9eJA1ebHQ8OT75CPb+P/Wj6gFwIWWLiohOHvGHQXCcC0OynbvFtpBbt5HpGA2MKEBDTW254s7cDO0QEJ0x/ZmelWm0cxhjapPf5ko5CSE5kWk5G1CnQ7L5LSnpODIVP+60hioqse09UQ7I7cOFCmiZtUZwO8Vw2OK3loNTQ3S4rkq7th7SZ3N+ZOsqI4eGfVs5aXa9wxKn11SAMHK4lPiDm6aj1tHTfMxj1MjfmKeKHwhiEaDqUIZwRFziWZbkSRc3NMqC1k7c41+HEyjqy35tNV/ZlG0mZt3CJFVm9rVtQrpFiXeZDHBJ6uRYoLF6l2Psx5vR+68cOGIHj/2lI6ef2Al+5Fs5fNNUrEm3i7ZdnSI3Ih9ssICu9aE4oBYVkAVLavlZzdJ9p3cidK2uCloTSUENDRw16lRNthR0qRdSc3N9JuiD24ruXAeddv5aQR51rGtS+mXrLytboba7cEGXa7AqXAuGhYNqu+YsqO0udXx6+9hSyN8oBZ7vbR66l2Wjz9373iG/ikYR0sJhw5APw9TgerD5yq7ePEkg1uUdJV2j6zZtTM7fIE6Lhk7OQUmlQ5Ju3mqh8PECHFu9Ai77nJKbd789yWWJV+q/kdLAKEJ2saJr+4AVwFxthEDuyKeWbq2+Sc0npYLsOnBA0Y+imoiC8cnb9SnhAEudjTNnb3KpaHAuME0gdeckaPCzr1qyRZSUxsvwYvgZoIsSkGLbNCmAh5omJUmMPEUrtHEo1zznzAsw5t1p1IAob3B/USMRZHAMVSaoSvfWgHb5YRMYcsTsrKXK/QeIJZj6SEa5x/8vfnRKo5ms8uimML534e9qPEtStDkR0cG/Qj+lgTB5kbhPS/hoB96o9VxTRv0cKMHgO3bjV1qOUsven1NM4BE9CCLIgkqDly5DqJUTBMigNp/xJ65HeS+5r0JQj41plMEbfoz+kh8mieAsxlILhlMxSMtXA1VSbzA7xr+XLQy25CUJGhSfInlot+y3QBR6ZqOKXb7oMlTxUO73xmp4XH8ZgOsYGwxmJ381AbgfENeKlqA2mXhozgcz7t8bSzRZVndwEGDZBB2nBcYQXC59YxvIMRt9aHrmOq6McFeDDBOGJNnXG/MN1mfDHGJ+2GvfwPrJXwnipetyxKFBjUiKWmUeUPO9Eb4vUpsy74fCHoGa88L62WTrPkkeBg7oyCu3bUeF+dgVzaIsTZs6kOs/JzA/tIeI3Td86jugZ9Rpk9AQrybo2GrzOYB/dgglhc9Aoq7UP4H70qd/42fubAez1TuzTe6pC1PUXGWChDNi5Bg23KWL1N6e2uBYp/bHqjHZScu2gkRPov/2ANFVLd9aGVO9isJnWiSbTjIIrv6GrZhsc/KxqudRFCV1UyygMM1pAOgiArogCVYyeejDDL8+XSw03Gy3goAuhRT6yJ24PiHBhIBqbnIumiVpjZeohQgZiOwoy8V9JBD7rLYcxTnMKQLhtt6OqMGa2rnb2JMtZreuxw9odQW8TjrBBLd2nJhR+w22uMWjTIXPOtkl2DGyrIHrRDGwSt7NjwSev1/mUpU7h0oNHlRG7R/GapM+4Yq3yV1TqP+YrSVwusE1XKv7UtAgv2dLCAPlE6d8h91oE59YtWOBgAQpaJuYMyQ/iW26rxArRkOOWvob6Kbug7qc2XtT6Ym852Luq5pv+3vJCp2AUXTgRCcYPqz8wKhaXzxTgyQtjV4pSjiTcspoBpeZCefFse0DxJySZZNsdgkCIHklDlooSv5CrS80XHKNhd+V+flAL8VVLJ9RRnf6hokZa52DrdmGzZIKM2TOpI8V20q3DyvgjIlm6TMpqo2BkHUiNOO1rSEQs60o1XBNpskAV51Ve75y8HS2Qlis48qK4QtYYWqArdqBV0nPuFSaxbAvs2mKao382w+wt+BAbhccrZWocrCKMGBFZRyoryQ1tjjA1EAVfHtlOkW7bMIKAStUbw0tXI7SEzRQ7UyUD+wH2mftakwusfl/GztC1ZEhmHgpo3wmMcYoeiBQbjfk6BdpGlhfawyBSMUxhgO2Wk6DnGGvGTx57vedijQZnSsoS6FH2ppLoY5zr2hgap7Zw/T63k0TC11z+RFPYmFnJIieHQSMvz1osyRnDsYkNWsbYNCv1jXVXBRfmuumD3kNm55lRYZF82yPvCbZ51PaXbwDuNYi2rS/h8EWOpBgCj0Wmwford9Ni2bevHqVNrScL/XMyUTA/Ku0f+Q0URXHhGHZsh4BPw0gDPcUU51x08DcygEI/OYb32eKgVBYWmhs/9+I5H9MgEj8q/bQh0IX6n80ja8NH9oTlW4/LAGYdRp22JU+NXSGSbpBxONMMiOBOCmjKotftcr6JzWz0pd4/hxP8CxcmlAeO4Yl2kV1FvXQh8DfbDSswLUA0++QUAwnXnYDJEJS0mwRyfP6oALQp7L8go84AqY/lLk3AnK9xAme+97PvzqAYx4uN9tgDSr29StBkHr6YcxNIZLBva38Qzirjd5POuykvJ58ovjWDhyIkjrxgCIa+hmMpDXvT8iYZtu8vfXeexcxQ9x0cXJJJrwWb0x20hfYmUnygtvyTLIWu85y+Hdxl3xn1VkvY+Gxj5om5POZ0i/MW44LGJgepWstbEIXamWXQJYG+/YWbF+ZV56YZrQRI9n6aPn8bSbrerxhTuhCSPwVb82Mxl7E1ib3i9Ng0CYn1MwAlPmL/nZZCvmZJUN9IoQYpkx+SeCJWYgblkayc5043raGZ7RvACa5lM8l+eqvGxSxWncix+rLLQKoEn9IHdwnpcNHcS+uGBpAPHO6GgQWsUMEsYUl/KWRbWQOPevU2PjGDDGJsbwJQ6pk7STYX+NUgQDq3Xv6gBru+2YJpWmogEE7MiGmPVpPNsZwvyDd0Es5TRx3dDrqv9uxTKEpjMIdXicpUekywYCjDEBsNXrk50Dce0NANkNYqAOBV2rF7UM91RbAL9HMPQTs8HIHBng5/GcV/AZUmlC9W6rHaJ6T866l2EiZ4I6mfepi8Ap9s7OZodQUcZ2UNDaEHy2f8UWgb/VU7zQ3NulTRr9rgEhGQ6mTfT7S64wxhvKefmEbWTBDHnHY6+8Wqnyq4kAvVkSIokM23KzSPfxWw+vaOqXfxOlS6iKR3PU1NOpLE0vEZKdQUjNzXWojBXqvRzfG2AcSLMNvLKO2vOmM0+szghHs/oy9CAMk6d1K4S1DW7DTXXyoVo1AoZugkgYd8z95k/M565zNO6iJrgydnKsNSIbhxiH00fHIiOju/h4Iv+ul9sBw5Y5f4o1Ydm+baYSWxOaTRK9RrpLsxRch0bB5j3Zc0WLNaFxcfPvXIN0+NnzKYGFQbamyh11uTLoXwYWIpI1XE0y0GXgleMJjpTsZvbkaGbQA8msPJhzwcfoJsVS+AGmwvcGaQ4HTmXw7fDCvtKMFE86nu/bssmlD/IYVop5R6eXYvT99A5nn2OaqSXF43yRlXDpnrmPpi61m3SooogjirwEZilmvceWbrRA9Jz3CPJVsdz3kvErVm0A+twtzDTlf4fSXALbgm/ZkB5OvPoaaMtQa+wgI+8/BJrFXTvETxiuHEecywryxFUjjT93bOIf5reVLPd/J/ObWF1gieARGBvxknmWV5lTS0Y32JsAT9nMbGkqF+mnH0Bx81XpDZAyMZRsEwMfCOZeyKzAz8A2GHtu17714iS86ymSmJ+vNONaQlOb+23HS4paIER0DzbwMi12HmUhMTajUqY/mr6OQjd/EBBvjbB5+hpVNMQKo8RCKIQWfJ8owr08cm162yOHEDgDNhm2A8LBLrUayCvb78ck0TDwzERx5Mi4yh51YNd0pNFh8Jvd/+sJoaYK+bkq55Wf7A2KTadsTQOcM+bgxrF4gWyzfmkiI++Pq1qXeFsDwOZruY47zlJkjKgoXTH88NFO5nNHYVxO7cvMsoUd2fBdrofV+Xhdvrd9Texg0U/P3xGLqPcTGIdZ/+8RERd1ap6j1C6wyeFmRMywo9+/aPnbnC7/h2/FjHzIKdBwEsPh4tqO7bfNrQ0kmv+jXvp/dd9X7rx+d61LvvhEU8z2zlVnVSxexrIAwiUTmCyRP75yAiy4Uq7QCJksoSC3RVKRvHPCu4AubDsAKL5e6Np382fPYYURPqj2K/+fuGXDDjqrlRUAXHl8Fd79KaUxTE4+V/v0BRC62+BdrWklJ1SmbUO0epMkEt856mOk//EMOjfCp1ayXwbYwdOtnxLvacN/zgKgrlAzHXUmVipiiJkLoMmVX5a7A+0V6InINZFe3deigKFJh++AA8bvrJ0bEc4KOX37sHyBppdx31p+sKrWBuySbvwvlyhM0fWzsH99k8ZIJ/qzwlgRSMddsw710N81XMHDxBHDaUiQEqQy4aHPeUozPw9crCp0gTyFSfxbuYXu/XOlaMMhxs18kH0bDDSTuiM1VFE3YuEC51iIBAa8j9ROIx2b3DpUtYuSqI3/7Wyp1SLVUNRkj+X4o4XIyCN6coibsz0zMDcKzhE3awaO6doxD7YAttLzhGZoKzlp0+JE69ryts13w5bIMW9vtS9u2nvW+9XuAlmXdW9Cud/bNoBL4fdZrKjNFPaCRfc8pP1OF/Dndx1GI16Dwq67JFZMaiZEp9VyP0a+D50mnJ4kXrxSbRjfDkcIU5R4mPnkSDIjD593chXG4pczzyaCqAYdvi2/l3dkzoFOilmAHE5fJ1ut8ON4FVjBnMgZvwuSfLACcFUCpnzfg1tTT1tCKfrR11zh+FwnAV2szg4/anXd2fX3swtCnuiQ0A7yd+X1cXxLpKlZa7fh+/OMd8W3BMC6cd8E/iuTTtjeM36S3te7RPxWSajiZGeqPt8pFi+/JtQxXzJsaR2UJ4rJ8+jQMB4rqEsYdt4jZiGWLr3AT2bL0R9KhK54XnOKMX4sNSRiXasduV8wc6/DfbfhEkFMG91RjBD7P4xU3a6Iiaij4VBnPt7Ban24JlInnS6Fvfg03t3OJBtK5mYxqki0CgEI5laXxYDXEMANLt+mZEQB9dmW95uDFjxzk8psPJ34yZgMKj1zszJ+1s56RtYNHzSsNhYkaJWUrT/Zq20s0QESh2bNe6eOYZnw831waDcStBxham2bwCwdTbk2nKNpgTGSxa25abhENOKtbDc7Pycqzp0ft324ZNqBaOA6eQFsrZRnw7gepWozWzoeFmBnGuTRcb4sDRTuKqvWVx3iIhMm7J2hFlcmseV+iyZwvNDoaA4bMDPwwgWjfosI1TmCrfKhLItL6d+SvnnquKHGCz4XFT+7UZJQX6ADzBquLmdx9VC+IsiccvuSL42tj/lL6XtuAJIhJhN2OT9J50AAq7/6QI+3+cC2bgZu+TbOdfDVOHnQp+5sobErukmthBxcbB3IvGYCDii9/pgG3ETs4pB5RBRPZB0sA/UDcQXZ14ilHYrqNjSNioMdZDTDG11Mv4wQ/zfleoU4BplYSXv4iwtexkKtcoZzfOcXMU8TuuTjgelNaFSDGEU+dWtugsCcpM/3U7QfKW3OuxeqfkkpHChAYHW4I6tftcDXzTHXHW8j22MR2s0UfsiDw5riba6fwmy3MxLqq6v+bo7wIPHCD7Jor/Tu56gVceMkkmGFIEeEfuazINyODPPaoiG8alkQwVVxsbB8vZydMl+s18pIC1xJ2NHdnzagpYXfJvtE4tsp3cyQB8rD2FeVr0ECT21VDdi9jaiYrj+UzktQGd/LM1vTxO8y9493EVWt5cOa2xVdNhiO3mLjuTRuj8GOAyOmfTBR8mOGeHg1oyAvc5wcC2Z8BVu4g5jDxLKh495g/tKzamn+Zh5wdkFX98c8Vx9PMYXc5Z6DUZ5BJH+Rm6bcSaGUYDwQl9cuhM19g3OcmGSqi9awOfYcfZVd3R9GrDbGxNCgHtfFFY7pnO4jwDT3K37zNxlAXB4lmN8lYzZS894UzVqXBZ6zkQcLNEfIQQLqTUafbttduWzCNd0O9FV5PWtEO6VCTUvIDVa1jtoa9/XYturLog7m9/tmEA8To19MBRAHrArUjlcucHH5ZkASw0Zzq7MoOUltOvS4P9W0T3O0bRjU8+Tkl4sDtccJw8jitZkDc23DaYroEcKp2mPlD4y5VcpVcewklv93PPVlZbrZWDMfOX93sqXW+UNuDTc5qXDk7+enBYZBNWwZLy23goVL29Yjdi58ND87Y4CPvg+62DRDlPL3jOXP/OcRlVEN6KuytrjpHogFhYsLBRoCbDmPOuLb1sfmWKiak97ien/b5klB5ZenJiRtsq+oKrmlcywTfVqLuOHQUnlOk4LiYcQIfLp6TwBEEV9x/ETlD/OeKSGwVKNGi2kMH66iusmgwdpwAFbqbKqn+LNNM61jX4h0pB34Tps0NAn10CyU/Cxf+9n/X0TfAG8ogezZJERsrrg93s4hRPXj5vJcepIUFF8dgJNOu9sFz+5RgTDmnLKlxO6LHFQ4v9vq83SqV5SshfirBezccqVoPTEJqK6RS/mdYuNE7j72PbCpKeg54GnLArCdB3d8eOFva2WDBUPwmDAHv+3p48UrbRXZaULMcSDPUz7z9OjsXeyYglAwXXz9H7myN9fTsmnxFWnDdNhG0unaMHkrvuOlE++0DRvjZ2nGINgeYfz6ro0QwgIRWShntGkSduTEF14s3bIKSS8271fLHBWCEZyTGiMS5hN5F8B1P/jTPv7uc9XmHJkS27UaaFrfRKUE7jKaEqfVJoKYyFfq3ypmZQRtf/yTOzIPPDG+q3vEpXih0PIcgEplCURc+/7K5ZCJYp1kxBQK9+ahUedLvXr1hIPHoZ5uqGLRSx/Y2U3jJwZdHx3geCYATFdqzNVZ34JF4GP5TThu+MLpV4Uvucs8mQUBqdnhFuqE0zmATGLGJHhMbVd10velrxwdwyegbMmJMXhRMV+XeWFDW6RoFmBmXf4ShGURcDV/iYouPNftUo4hlKUjm59LBczxYs+82VokOycXbsYcNwWPVirIZWowvXRwoTB+AacKOD4gTrGghwiSwuofkdg3AzPouyxo8isQdeSs72eB0VUTkd9iDVzz4piPW5LDTAzeSMDAVBy2gvGh/BvUc+XmcY3GWJSZJSyW2dKsuQhlbBj7LBQ+qQ+oMU9MxgqTZZSxDYN94WKYq3aOmGD2DnJxUmuJxFhiVTJunTITX2nBX5SZ/ktM+/fjuHKet7mfz0bMxGMTwyJYk0I0v3NQu8zHQzqpB4Nli7lgop9rsvgMvSu8cZIouhi7SBpdqh75INtCenAhjQZM0WVA6XxiXJNRomHzgu4k8X1jO0INtRnislcBrr6dFQiT+0q4BRtgTs9JPAhAorCokmX6zZIkF4q5/g1nr8cjue12JXx5Kb5h6BCLJy3n6IzvCw+yYqFWUiJM3NmSGEtLr76rg59NzJZ+YrIXfPaPHr75hrqrApIxg8HfpVMKSCns5ehieL6n8OjWfjbv7sFxEHAmHC3Iclk32VzuhGoddtP+obywTxkXfWGTYXHVCf6dHnaJK5/1Ke/1sAltx3mwhR+ovFCFemkDwdCgBCD9l0VOvwibvXiZTxiLvm/H1bhO0LFZQegr33VB8dtPMIIS9/ZgeFIa6jaVcVXOpNY+yo8pakhP2ZT2ptnE2UKBaR8zkVygK00T+eSi6RlJ2xYlTPybHY85fQxyBykJXbT4o3qhEW+xKlfkLmobrGYlixnpO+pFA3mDzwBXTL+elqWPMWb4VInuL9izxUPE+IiSdmXx9yVlc/lm9QcsSZ/b++jPvp1pWN/92y8n4PyYFe13Odd5TJzk+N8kN/N/B7/Ywe1ab6/Ntx9R+j83WpPHHMNgwYwweYqu0z+a56NlNykXze54kfC+58F0EkRG4TApF4ZNb9r6hhCd9R9lDvk1avwibe/f4rHLm7n2cUeJuYUq3UlgzK4ewy5wuks/s/jnBe2nrJtprik27ygu1YqL+Gn6TCmMewDhb9mj2OEXymbZk71iV+RK7EMW0HYWdvWAiTrXAuXlV/LzLWB1ue1nWeBwBUo9x83ph+R9qdoujoDdIOVh9th+1u9fAdcjkyr1YsD12LS817GQU2TeHXOdpnYDc/QwQu6ld/GzbtzZQcK5rd8ec32X6XazCkpMBo30f82xlQR+DAaDblwRadrn2z5yiHsOFN01XoOMIVKjF+NmW38oHgUFOau13uUF16ghMDnrNNb2H5rtU0EW5892H7XOtP6AcB42bhcUY5GL7gUF9OKFFfKs/mF9bsu9Sel54QGUXDXo86ap3mPeOKkpLNASVybfgOU/pC6v+e6Vnv7YT8dGhtX6WYWO+wmVd2L2Gk2cxeo0tW8paa0f7ABLg1ObvjMIjJxJ/Nmql2npcdhOGYbg8s6wiuw7ffClNlO7OkyxBZxNMmph+SXVfWLKp3L7/oYIxMXT75aOQ9BhBQOiXf/XbI+FBGNXW/jEuPaRgxUSh+2JGsu3lv9pdV0QcYsIIoH9ClqLi/+KlqNdYKobybACMS9ZKMuWV2bqYMlh81c5uqmAFtzCyeJV7gbwPm+wxc50FnFYJPrRCyqHMjzrIt2xwOQJEkt56kexTcypLCu4uRB1lubLOYmuMvWPOvGOKn4Jooy0IfZLtbLMbC2TsvjawWNIIOxzJXUxrBnUlDgWDan7d9a9FZNNr2Q0tGywBGKWCFpnUdZFeDgpY2hkHzL0ONWBERhxkW7KG43UjwVLILnFZjzHu9ybt5s5ANbgPaqiQYp0WInz5J8EjXVa2jw5k5YBm5u4xz5aw5bKiJYM51frhqaAeiFINJAaQyLKZ0fBkpxZo0ulid4Ir6I/CRWS4a0+OqRtPFW/uhNXrpHTJ+0EfzC/Mr2gPM8MLppHCjDgJXDi3VyY85ssT95jx8PqMT0rxqfXlKvT/QuBrgud4SHb6v/5gWpeghKxJXBnB/5oCmM8OSqJLufJGEtYSu15ctY3Q4iJ9EgqeAQQz2kh1Dp3J1+/r57GGbTy8PyeaoRxtyHfQUDNgNT9KAM4nPq2I7r7mXgVdp9q6iCeLcpnZ7qFjcrkXmY8guZNHi9qyl2fc0yZ+LgdcHhs3oHnTs5z9mh1BDjcUKL44ON8NjQHr74bUuzg1BtubB3givRqASP9z9ibFz0I+AYq6I9lBL0Gff01fgL5FXtF/Lrkqo5zFRgvTEQd/vo7Xje5lDUMJZOUtXaWi2NXgsGPjAFgyknaC44y3CDUu3B0skHVKjYwai8Vac2B1ScfKWYJR3buJcqP9s+h6g2gxDF43orKRPu/2X0j6uz4MZP/G8hBPECGttSdZ0lJBr/z8RFlQgFdKB0CCE6jmuEqCTePzz47YkkmDoT+osRH5G6BUx9Q9zFK5VdViYq31eBkbAstibePXYR6E6fkZDGPLfn4VzhTM+beJ6Wq7kXnQSxG8q4wDNSPQpku7V5SG/mLbQtFCqv/22ud8E/iv5BVyE1YPB+zblF8XURN7CtWfubzKKVFvi8gsB+4BlDK16xytdiWMo/maYMWuNiQeXarnMrRPA/iLTa6vysPgjU+wtpkQu8rbUB+rElvAq9PhF8ko6iRMFgYqFDHTbqp4L2NipI4VT1y5KEpHbH0iTPAbBaU3TuWUzhdRqMKRnwsomMxJF7m3/c/qE5d1O9XqfVcIjw8AFBM3mGOxSItNGNsd4oPyX1UEQSISegSNBPDjIvtF9Q9CRtCfZacnyDEW7ThWg7f0slfBi+rB4y7UEGu9BhJCx101NzxX/l9PHHZTSMmSmYzhe9hRpHPrqkKMc7q+siFnCYxbJu4gVFzFakyQdOQVRRy+/hjA3tawUAoUMjYYEqw8zvtEKsQUsx6el083tJeL0VmtAZBDvvifRa46gbe0kjxLMBihfeZkn4dPT5rT4MSUSyOU8qjoKHMR6WyWcB51o41ZctR0eYVMNv14eqpWa2rBXf+yYDvfgzqyR2JbWSVoT2pjwPDiEfk8SLBmNEaoFVRZiLec8gyCt78aHrep592Yd7ofrwtTcR7VGieTA+O6SpAeJLav3VVaZFeorEGNlSUfR37Y6Vdpzsl90jgALLMKyy9VkFu/rMIEsG8RceC+vhLkiYQDnIUezsT1uPBQ+5uejoizGSNw4CeW/iLiJl1hkaT1G2ONDTis8Lly4MZepwy/PtmMGpiKnOOl9+rs3f99t4slt/hclTed17KEAXjJgd/Jy6JLCRmuytgC/1vC7ihkfM6NXq99v6xEk2ObA7UfBMO/wiKqQvIYtZZTtmDc4sB/4iSLmQ7DyveXNoytn2lSPIrhztV0Lnd4BEQ21H5b2N3iwzlEKMJ0+Np7u8PKefCm/3r0bvoOIDTWTyK+evKtDAMQiEx+GyB3XeWbM5EGVX+3Fmwo8KkWgC/G82TYGBWbI3cnrxIW/RLVRcEtNkg1Q7brGL6nHknT69Pvj7c5F66AlK7wDV0YDap1XGbQllmCvqKi8isgmM/lvrwM2ubSET6Ffa8mCEvnIIjX62Z94umkvlvepEqUNJUKje7U+B/IkyjiUQRj3FR6hmsroUyoFsjz/WeDQw7kwk7UTzarFo8YKTdrJ4oqKCDSTkr2cKhuBgxf90VlHy2CGFpz0/in5ZbGiHR+aeMJtsfiUIRTlRU1z6OvimiJgvQR2PA7UCg6bRhysPwZplfjvK1FfYV6OFFFhUTW8S+Se1Tj/yJLs65KUFfT7g/c1Wp8oCCUvVj5VhRJCNWBSh1U8cUdr3Y/65QFTKVecjKF1QWWVnxPRw+icC0uC8n91KG1chp6QPLq42T7LBtayHjaMcNqo9d9rm1NFVssICPpnb9vQNi8E5dWTdWD+MG4FPoLVX6+b+wXQuTUyZDZudF4Nbx/+5XsBYvrfX3jN7gKiHjcfaf+Clm7TTrrW8QH/4ZLoj4CGd42PXRTuC2ps3H+8Z2D0FlrLCYYMjUfIvb+hpogb6iXLzjwWA3YvAZN97fNvqsKMltwAYejt8IE1AaKnWqh404zp+/v6c8AzdUVxReDr3RN6Jfcw1YHfRLvMXXjAdAlYnHusU0NR/y2SCk44DNSiEbBHdaoK8on8ST39oS/po7mk+AvuEzacj2+z80xn9tFxj9sGgCxDt1r+bIxUtAY9IFJarMgHAE9CNh48RiypyPSwOoqHM07c+ukwKKgUEOYf8XizJZFixGbraAhNWpmBm8A9p70CKgLWbB4m/k//2myWOsaPAMnrz/vndFHRwn05BMAs2dL9GAGOXXt5IKtC9QcC+8k98cE9qWTZlifwZOdwGwpHr8iFzK0jHmUWSMUd2XM4mmKcV2776nxGXA1n2TwF1jljizVOjtToJLWjI6hm/v1M1PTo28hWkQWxGqh8aOBKrFKk8osu6Oe19weT6zDdE4yuGPnQnXN03QmgBhwJKFh3d+9KxoDr2AE+n47kc0sMixnwjqntuntc/4WkDIWSH0w4iDgRhhHQVHHQUOFKAcBXkZNYjZp9cVlCxGKTti10koa7ULvxRwyAvaAoXfEYpyXCbbH2pUDzPG0WUjBcrb8LSrYD2pPkMzDqt7jz5IhtajC6oN+olW6ySHwM3x/h07a175ZinmftH8uYHku4BmvyS7rRs/rkA/dHGlN7GYs4fBt8dghozWX/yXHWuuTo+HoF1VZjzZ6JdIPR7c/y3Ex1fmb5yx0a3gTtOYP7GcXWnAnA96ldVsE45t5MbDgyu01U45s2tR10XnSB5yck/Xvi6xz1DZ86686ifUxtT68lWBGkZh71LrKs6SqvNuixlxB8VA5YXkNFnc9wEHtG/XNJCX99pZC0XXNTZ+M4aKMkEtVkFWeduiAFuFyXvp63B/Z6gfv3nJz3W8DEoHxf3Rt1pHzUwnPm7AoNrpemJePh6Cn3w9dN36xicWfBs65RYC+WckReOu/+eI24FGlKjg62NOVy8uvDVYKtKhnP0JrSSRBLA1fkFl3k46sMT3BYp8ovChV1wzgXf7GaQxTDxgP/0xqgGzHqcvYQn2H47Q7t9DGQHLn0cNAFJozC3lOXxjPN6cH5byvDW7KXPF/hXEHX5TtGzOD0907Cvl3hZGeDMxqW/OfFcOFwzYq97S8MUZec2XpOv4Ky+PtTxLAoK4wPXlEoDC6KVwIAomorKaON0HwaLLKC1id3ifD3rCzNnhypaqBbazVwFAPdRqFzrfABVlGsWJzUhehUkWF2afFJYpH8ogBkxQEUEyLSM5GIdd8otUCktyEGVn89Xd2eEKp2aa1nKanx7yo/mIVD7NkVUCpg6scew9WkSPdMAabnuwQ8yOMJ7HiyMTxEzj9TWIwpEALDpm09Iq2GaybbBd+v/oFBwtziIcd0FaKzM09abrc86dJyto8GRyQdeSk+c01UsGwHD0lhN03kt4YowGS6CpdkzuBYMUPATMImkDyi0n/YMGR04i1m7JqawIkRwM4Cq6ik0j0AW8EByR8qVTLDC0DosQU/guRAiCKi6PDssJYqxO462zjiJHguEODV4sEhYhuauF5MlpDHGMzChz68SdujnEmbc0cwZDAxoEUgVNKdZWaCxFm6rcNCUaIPeQmnPSbrFBsAAM+O8WNChE55QZOQBTkGLlcoADkESFJWFwGIx2IZXuQ3KA0362OPYPHEPjLDCA347BaFNCEE4BgEcRSEAE1GGRsTQjAyymIgokTw6CRue1XXsb1zD0jMnPXbwlJ4TksGIM6AMsslNW0D+L9XLIpRTzWrCxHjVecm8MOcmzui25vGJZOJrAa46k5u/R0rNMQqP85EAb9Uu0rEiD0HTcENniNuRyRpx6moEvi7TN/hMtE6teaArWuVyxmDqaKW8apcG1WLlhnhy7yFuO1GQ/oGXDqhN2DZcWaGf+FS3vmaljZ/whyJ36P2i5p47CbspEg8zwhs6OrfpLdPbSqtuisz+t+gM661v1z+jstVX/hM7eWuWb09ORcup4Ox6h7PZ3gQuC278FbHX2t1XfobOxVf+Izr5alS9Oly3VILzdtNRT4V2OVL3wXh6pJ8L77IjvPe/LIwWO982RfOp43x3JJ473hyN1Ibw/Hamz8H48Uo/C++sR6t3zW0Bpr4KKoOPz0da/+A9PdfHFV3aj1i1fnfuhWDAO7lsXkbFzJ1uUjOoy+Q2f5j7y/JVL5LtJcmZzYYDPjfPicpid5zVoeR6fIqEaX7iBpcUykoxF65zDR+IFpsbNnGdDJA3EbNzMOd86HH5OTJE0EPUC04W7Gpbo07mRiDRLHPjBWABs25+iNhEcw72bgIV02y9ReYlSsxqQanwLCkeS0PWpQYcgqB0K4zKPuFIu4BmFiUwtOkBRnqPA4cr8P3hGmRLDUcoJUqZmEJZQVbeIon4/JlItAvsIO+xOpTvCitqhaST1bJzP3xHoZzoyh8K2c8f159LGCAH1SmAWPxoTGZDAHuDewGdHdXGGc0xQVEHdnqfEcHJgOllVv1+YiSE391DymEY2SoZZLcuzidn3RQZFQ5w7R+QvogQlAjNFkAoZHBZbgR1Jko6eaAmFulVgkJZ0jiKOaEVIv81QCR6J0BhgcQ79CyyDoraoLqkRVs0C+/C/7JwLW4H0bAaikG9wKCSg7q4HpDzU0E6HEdrf49GANWWTipZq2XNsQCj7y4kGukFie0Re2HhQksu4nnZQiGPaMTM4noxe48yA3XbyWkeLMJAGUpREgL+hRK3HNJRD6TOskx0icgYsdaV41y06Q9BrRLjH3iSE1mcqbNk7IGw0wAc0AVXw1hYJl9yGTtpC73J0P3yioPL0qB/gpFs1UrvtDtEKGDh6smL141mo+3WyjF33kaFFVuKCEGpFivyyBdtasKc/pNXWdlgpInwAdy+nArk0FI3z+6/I3fcCKc4PW+DoETBBkTLiUdWIODmjh+Bq5/uye23tO8I56s/y1k6WKg8cG2xb3I1Y5s4PIc2m29KzDn1gIszcqcC5MftIDO/DgJgxoXDMddnjsLAzyBwh22Swkn0FvzvjxCDupWI5tYhAjY2KQX/2tbHOyUK5OpFlhZm2JUgtSNT9N8kTmlID7GHDLSrCpaPnas7WE0f2yOGoRxrTLyp/B6Y13gmUj4dxhFU+0qUlUWyQW2zAPkkeprWWUgOaKR/eJ+4kIWVipMjZF5bCBN4XLIO5529nnGUWMjBVOUdA4hmSYQf3Ylh/NROCs+TwriifsgJM46mFFXBsEDwtgUG2wrR4iI7w6h3NK8+NR8DlG9fotKUD7cXnKjjXvBWMOYgKjsBrFjUlpDsP+g6PBQasHDrSXSq/81xE46MIanPIAhREJm2OpNSATkwngB1uZuCzr43imEAcKcc/n7NPa+jBtF+i5kn0qCgFNhzxklezFinv5uBZW5eYLu6W269RmWYXH8m9Wtp/tl/PP4+K3Y+M0sTNvcdHjMlRlPbauqPnlyjMihKYSL/enI7zeOGE701GIRiDmmWI/SkngsiDoCTcv18ilJQGu91PERbIjCJDCijkJGyFmJdKazM3jbZNb5GqxkEIRkU+0r2ntlJkajSd5AaP871qS2MwcIYS7iknE7iuPmIa2cJ8xiloMRM69Vr3PL170RTuyMwj6HPaNUgsj5QsI5JJXNWxxVoQZ3m/rL+IpMKo+ZCBIooouQWbQYCaJNbAYW+aUNPYzuMm4WCman+vK6BSr3i4NrCSLlFjAYGxLhsIGVYHZEbKMGzj4C9N9XaSH4qiJM5dAXwc6qjDQpyOQPNKgfSlMuCrRhvlncq2r+RawsFStSV+j+m1clMM+VomHKnY3bNvF39N41sEvBtxZUdpC3dEwKBz71RaI6QnFUFsK85Faa/LzoHDi8hC1EcA7oJFt048RIGuCH6YNC6TE6P5wlIckBV33D8i9aE1yg4pgYmEE7D6NHBcLlfVph2Qah/elcCQsdvd7rSkm5uHRdt3MimfMGAYQUH5sJJeXohGwV5yX78fE5jGNAT5jcr2fXOEhRgYufXUjYAiPuxl24je0vMdKVum4rtiT7aO/5Q9HtT2Ck/y6nQniKRbikVk1PaEK1nkIyL4pcA9GKEdor+V3nGdoV2J4SIinxNWXUaqSAsytJoYw4deZy8+Es84no/RuLD6aAQPJk34kpATDNcqdEqLQbEpOGGtp9oEFsSpdtGZtC+2Xpyi4n90vT+qbPV4HBOqvpLfiIpWjCgmzz7Eci4RBnb/kXF/8e8PIci4WtopD/sLROhgRgYWD/7L+rYzatYIBLATVrRSDD9uZOLxbRXjwoVzkdkxyWHE/hx1dqSs1U3aiw17DSnsg2vHxOVDGCTKXc+brKRiOJHh7VKRJYqsHsn49vmbGXkDqLdycxDCzWRLwO/UNqFVhTgPYPyFh6sGAdHv/U0dKWGxJ/B0sbzWMhzyxgLQJWUSUR6Ud9jf2f4k4ahN6GyL2Qyk6spn5EdAQWQfpzftqLI/ageGCaRUsxt4GnHmxJiVxyLccmrjvfLtfhkQVcppP9CgA+B1ln17hHMSH23N7SSDbbORW15QrxyNK8EsXqr5+OPEY4FAZdGwXUW2LeTL8kLfnkrC/KAAa+AJoNCZbL30NAJ1JHncC2ZO7t5tI8B5nBnBXTnjpmawh2I6+7diwWNGahCdTTgR+BcEfKduklSMDDMjoI8YM9rRx0Scq3HE4K5iEmgnSSYVrq4X7slRXspZKPF6HSvE8QIstUcTt8iA9FyFq+sj3umKsNAWKhOdDn7Z7szspKaSx8MYJ2guXChOdsCdB5IVVsfE6glRztAe+uQaiw+ZMYwNtw+Yau1EE0COeiFl4k8bTEMg8xXxohrZeuLbzTX5Kfiu3lHahEdHcebVH5jDdj6WBPJSUpxPmcVAVWkl4g9ho+wjevQIAUvd+HKXs+K3kgcO/cOeaTlQsBcDB863wS9dgtjo0rykEGgPrDUHCm1U/qGYpnhYYx0M7PcF9+bfJ58tZ4U/KV7ts8OcCB5BBswEEUK8vK3pZvvx63Z/Gu1q+FqSD9MBcSx4T3nJcf1l5DK5DAqK8hL1Z3r7sc1aM5Tje1IQAPLoh38GoifdT5oeXSRrzYS1oFlFOtZ62B4QA0BEBktyTCB117/qHKoMZJhpXTe4jdRmqxwdX/nMV8/XtFpVYS+VCLRYRHBji40fsjRghTXVPYtF0Re1lB4/OIKeajQrQb8ZuCvr4Sv982HlnoIcea5C+ICiN307kVh5vcHBS0t+dh7xTzzA2NBpPtKExgLcrr7Q7LcpbT216kFsH152FRmQGCpMONga0pxVVyI6ZG0ByRvntCtCFA+XfcBivPDXtwmapITRqhc53POQdZqienBh7Mmo3O31nKfZ5qVbkI4O8szLZk5YgLUjz8lfuKCSHGG9t4VfOKtCxp+0Amk5+OJS3s0+12WDuUUH5hCMJMHLIm8HIibjnwWOs9JmIoBjN47SE7TqT08a0ASlO6Y8CO6xekw8jovxPWGu5X9VeOv3pV+yPU9KJs5dYghuDNwaC5Kqt5fGpZFxeby0TyLpqsHShOd4+9op0dhvwl1MNLPivfh4ALk87UPlqduQP1K+JStZFjjXAA0A1LcpTZVEKI8SwSRc3X8ONAeKIhY/SGsclNxWppPRPtaxu5Iecyr3vv3JdL8Ut0jt8AFyF4IyF+S+rOEPnRO7E/OUuKgptI4rqsENtBLgDfBJTrmRaLUtIv0jQVWioMWmJZiIUH4upBHtxQ5xAstXKNp23XWkcfQ67NwkinNR0Yy9v5MO0ac0+Fh0fjTbfrsr5TYlOiq5DabIDXdU4as82WKxvDX/SHiaMko5fU+a29o0/wV4pvOhn67EvKioLUBg0aN5ya4gxVSDXlK2gKg7zhqUpcXa1a2wYQQA7FF9BoO5MmPyoJLb60PFHUj5J90eq5gzEHVRnD/0DqHRV5TtIM2ZYb+brFzmbdymER9lCA0gmB5a8VT/rbrJXy9o+gZo9X20ipK2AZZ8eUXotZp6qqACqy489h1WpsOxEAUZDe/ZQK6Wg2kAs/NUhE23FlIoqNCcWiyrVoUVHzBDV4wyTKUIz26bLRpTz+NAmEUBwUEvGyJEhkFyYUz5w1Fk5LzfiSI7gigK+SNry9dR86ATyiLC7EUa7mHsxX4bX3WEe9ZnC6YCLpG9ZgWQP3RFpkIWaenKmbeiDWZDx+dCObNmh7Eq33+vR/ZxbGTA9AJTYSYU7lCeFCedzmfdYFHXJKenFQNMvadVVZWvBBM0RVTS1osyCcYmCARpyRqBBOaUbuC3nyI8CkInwiB1TYnt0gryKkMg/Pfo2nJ9udEO0WKngygjEV1XYsTLVsixamGFX4HQdOuKoIQ6uUflo0y0U/y9N2VbP7Tth0dLvmgPp5cIDduPu/w9sWWszhFBDHPXthlHir41wQQA7Kvr0OUGiWfUWSMhxH9Enz5c30z+cEaXXqqprFLFJSUKQ6ICpAzNFNxEj4NFjh71LUwL7cTggV5XHbZELeuGLbe2dqpXs6vwnOf/lbkixkIq8QmVXEeSQfeBrQTt1EtZpQgh/mecMYqsC7h84vYTRPRErKLQ8gvBaLitIAdNQJIEum8aSJAkoCHcpMwXvMcs0snATaw2fCxJtLKlgg3OB0ekWA2m2CtMt3h+Pqw5UBphUqQF4tgBikOKSCVOchL2FcGV54pgrV/u8UhVbrWNOTSsYZYI7n51zZd7jDJD4ZpTMDsdrEW5SOOZ+TRADSCgMEBV4D4AaO5dIrcblQmwPhVQycDWtbQ4HCplLbJ2y3eiFRSs2v8ofwizXyzzf0Z+iLQ+uHSkjwkMx2QkCSiIXv10Wu77/JtgvJIXIi/8bdOUKFn/TR/2A8DKRZE8Wg+CDTxch9eK4mpa89IXUC3e3/2KQJtrRbmBgJi6ERFW1QUIht2yjwwQfBgvSPcocPEx2glEFH4XSemkPiiDwuDIfH1aoVaTxYuK+D0U5CtqxJq0AdVAgiBRU0dtWLEWwoDU3BMEtRDKjyD5Pbo+RgikFGdbioLMBsXGqLFsRwUqiQZ23aAaHDJzMqXQjzcesNrXYLW+4GlPRXOp5/D9DnJ9V9YlVPn75ZdQm1iUOHLbbwYf/0/DAe+BIOFwBWkDuTNoSiK+DVPeJsCtmULEbm6U2uk/02IZNI+zRbGCeYuVG1x2C101sewvgLwBcA25Vrstl02z2sBvfPZsXKn1VI1/drg8PGy9WAfoNIBCnRJx9BQqn4EMDpNICgJbFAkW6adciK59EXUDiZftRtN3kJbOuBOmivwv1aq1RVWxye/stm/F2kYkTcbIpF/TxU6TW4nVZ3Ws6B8gRoRCchqWKLlRyREtN2eIJx120WTtijb57nOUEcOZ0pi6bT7AsgMGDSQS/JetFLx2UC34e+UvrLD4hJlAsnn7ExElubW9sNyEKWEt1XHgWuKGIs9BL/mji0SahsSxStg/J1SPxoT78BdYrB0iZtj6ZGBgZFhDU5KjHjClVQQTi5GKpvDm5LXQGxBV2ANZQNX+ZRay0foBK/vpbtnG7NC1xrmb4x00VgrE1ZVijoxR1pC2qjH6zrUqGYhEZjm2HlCw4a5CyCNRyBMncjfOcw2DAF/MiZ20yE2KTrBiYIEV3GOE2Oy9kS600BWDRTCVobHwo1QLicufEXLb1kiBeLq4nEalYg07nFmUWinsKlMArk4MZ0hidynRhf56MCMFYlNjhFOgeOma3pxy2cwPsoj3metJGAoMLlTFD9h8/6l5pVKg/Z/aJyCSScvzZtEtT8CV1+0iKlLrzYZZtaq5secbVdpdgUzsWWquXM9JmqufzJ4Zgq2WEoSBWvsh7IJgAcXGsFYzgcbXAT+sluiSa6YT+spIOrImQ8QFZmMw7BhMukhOennltVk7AAT1fZ6FBu0en86YANxTW/cZ2Mdkb9T7GhaqTbjPdFqYVYRwZHRgsIdRSQdBI6nAEjXX7C/Qh+ooy6+1ciA6SslXZ/tfE3AC3bGjJG2egdpgskEY1fIRCu3KV4+U+erwFNkvES4T6JRe4dOLPKj0yZEPmJkhOFYSmCNvP4dpqcTX946lboueTGFxBbH/q9/4CvyV7GMfEWtwXD+XpkewE8JLWbH1XhEL0fjGb1EfZAAVrXipocSlkkkFWNkQayLFFVavG/dbBkHM2VCiV9CReAvIRtOnIlJ0APMxa1jEZLcooVte35QEwh4VWf1WUeKMuHURqqvdUnx2ay6Nb87h9tDOTsMwuL6GVrGHI2HgHpwl9ZekDqRbEee6xRxDLdLeFDTCBFNpQbhFYvHpMzW1us5HdnKizGs7WDPxWcneedEgdMGErcorlt15nyFwfMqJdyjEP5bmeM2CPBZn7Y4g4Hlk3Pt7Vs3wavQA6PXmc6QmHr3OF4s9tAFEhl2lHWPFBhYzCRkWXRU0ebjSlmPFeHt0B5AeVtJtyxhzhBYB9FBMx5FxtHICirLJQg1oiZnzSvXp9+T5jl2EDhqwjHFmbLFGfJl7yJIdP4XKZl4f7gIPwGsrUa8/CwEOo13Mq27De/akJzdWvAi2F8KyxSUPbyopC/loKqXEtFMygtD6x6MO7HVPlARFmtsVy8wG5ZoQQT4jk5z+lQ3kv8sAZWOIm/+ZjpoarlDSxX4cbygv//O4nTyfFHbNX2U8+sS3ArNv7B6YaqK3/v2XNXaMJOhsh4XjjOIZo+FLrUO3g3hjoS3iBSAdyq1MoN6eJz6ftW1q4rqDbXTVZj7wrVZQ9O1uCoLQ+ukX09PJ+pKhKFjziA+5p/n+IK4yB8aCgxcPT7xVTlVCLEmJ5BjEjgYQ6qBOaiyZj/aawKBVhAex4A50MnOJWmueaDuxDFUuR6X11A63HiYVUWRruMie/NswbIO1zRCFTiwEr2tSlUS78YE3v5TvrAsnM8p3W5QRYb0tp81STOuCqh+Q+8Ts2p5H1DZV1aQhCjvSNuQawbmQgouUhRyD7yL6uBWazLwPPIVI8630mCPNH1xhDDhCGSGIQqkbC3bnU/1YQ+abnH8+XfkVEgKfnvmd6lkSX3Y9tXH9VGsmUFg6FELO8yLcljZGUMC1n6X/QTMysS0KNcooYfVXknrW9x7bK6QLA9Dco71hGp07E5gP69gGag3nRWmsphwty3Ds6yNGVuMTey/jCABfpP1tNB5glQ0zHTK4KedroqVLWhClve466pLGSO+eYzL9t+vtJEFADU1XnWVXqmL3T7oIBYaZQAWpu0JTW07n8iNmh19KK7jR3E/FjGVgnuryQa/xrHT1tIK+bhMVAm3hvMbBPV4q8m3ST5Nqgj3th3E8eNns7WR23dCejXPBDw7qEkLX1jzkteNV7kNHxRe/4kveFIfRWkKwI7CPI5N+0UOlbF6qb4D/iHtWlJOaaFYgyPmamrKYG66y6BNtqTVnQxfY1H8Liyd8nl4pbjeYRZ5KxGZSp0z9uaZHNw9xp8OOXiR2xXJ9LhKCh7rHejhrAuhgBRcaaN20z/Y6VCrOGuQImup+Q3hEYRZyKxFloYcXAksxdi34OeTNtXPUvMKYRRGRiag4lJMR8qPuKJOVg3Y3eD3cLM4en06HvoHvcv41scZbNU5DWEUMntQjmIbukBEVhNGiGYYHEKHXpYs82J2wR4bGbfgGmHTVYGAp7it720E5Da1XtmIuMQtnnKkEEJKpll+9+l9axJIwaW5pqDIVozEq/iL9XYn9m9AprtfzAWQjo0y8My8AfWjS/wGI2jH2MxzyEFDwcj8meI2vCqklFXONdP+nPAkeK9ZJsU4sZ5HcumM1TwtzGJebv1J234m+bzrh3ZKZADtO0i5szOHvIeRRESosxRSZ3r0+4WuQyV80mKCMUnI3G7XshLnh4QY9r4iFzG3l8oFa8a+Yi+rjvjmnl5mSkDdNdSamnO5ww/FVmBsWmk3X2x+Di1GilHO9UWSoGOlhXt0J9VeIsXcfyNveK/T8FpyZsskpkdBD2Ln3Bl8j1E2Mo/W/Q9CBWPs26lXD2WUwYvK0oA3HCqEYO3ix8Fw9PcDnFdMn+upJwEb1lfPG3OHQ+c6YwdZOXB5SxGpRzXTL9r9D0MCuAvybeHUl3Ic8jGqZmlFbN+uWuj7O93RG0ElqLTTDFSc7u+BxN3q+lbX2T3Ee5PIQfgJceLha7+ODJ/xOlUL+9J0P7wkwj+vqROyecJSAhC4uK7wGTxqupNcyfW9NqzNsd6lLeCGg+QEDTXKiTApCteeh/pCnaQta9/DcMtoDnzBqtG3fUmCWhBE27o0ERf4WxstA+DIlKZB+FlJTR3NxrYoNe9bHAo10bkSOio45KEJaa+lwJ/gGcqfSSXJLJ7nmbyEzLl9IZYzrWSdIde9W5FU7DL8KXxRMX0gX0+IWw9YIirIY0+4tc+JPDCgKWr/yUEqS0CA1IUBaNvXkOdl3FOGiSB/js3kgsaWK6hv8AkOTBLYwWiLFKAJVUD/FEUc2VrVzb4ikn1/erOmvUXM70hBBvzf+bH3UY3CCA2eMUQh0omyK9chw5dJpFwXVk8XTRYUhhFxY/JbXLqXBfP008SIxUd5jJbdEA8uEr4N9Ir5yfRnlHU8qviZ89DKSpbwKqp2q6PtB0Ah00j14NWMo3bwM+00uLTGePwTs9qS0zIbJXBHklNl86QYGj3Cogr7yv0PD/c01P4B7EE3ifjtOCY4h+xMR/8Xq+Ab2SkHD9jUQxXBrpXfoH4N4hrAphsRz/Dg5biXccbBRkVNSmkb79myReqT3ZrJ1q2q52BzhIt24LrQnlVgbFpx4o2gv+xzL1sV9wHjmnZLbpguCKkSeP2IkPHU9FLRqv53nGAotJzptadw5ke5512nDoOjQ+gP21ixHAyeRlMtCAjYXQtqSMX1lwWpavU8vH4peQJXgRPP9FgXL5zowobK2WJqTmM9fdes/HsAECNdw52FE4IdsSlUJ9KjpS543Ys6odA+R8EWIq9SkhBFITWZCEmlXYsFF9in/pujGNFeZIqQV3dqYklawWC4Jc16fqFvj/ouVzgY68LdoTIwSPPxyUZwwC/sZZ6wgoCopEB08yS/SWgmYiGi/B4MGmHT34pVXvvNZqWiW9OhC9bGnbQyVIP9hJu4CILIIEpSr4mpU94Wa8BT+zT7VCpieCqOth8pSdlfoKm66cokh5t2b7WIjVdUHCTvw9TCsfHkU5/Cu8hD8xWQiJb1KWGqDQMAWL2Oc/YSUL2MGLEQoY/cIDULBOCUP2Z1uIznRk72lGi8hDTXgtG3PEiP2ss6tHIZQk6atUopkqc+pktcl4+dq0aXGoFY2b1bQo5gOXHmOapFG2jckusRArdqBxqmUcvxYHIMiPEkbg5MaijndNw/yMAmr63kilm/e0HiZOS9SbdXUJzhnbjW1/GR5HbLIObwiPjiyVG79xXdS7ZLiIZmQ5rcPUdtIQpshxD56XgNpcUTPb6V7OSbz3+A8IKT4ykpv/7XgrE58hkL+AYvt9aZiQExlHClX2rpF6CrEcqPYm+PM/Lnz0G/v2I6zaT6xG+hzittm2Z/X6gueLTscyYeoZE1SLJISpCgK62RHyMykJDNbWjLA1z1ZQrl6QCZLlogd9N+HHsmUfvJby5tpGewz+wQCOCVKIQKxwMJM1Am+qoWwvd1E2X42VuQik8v7RshE+PKcjy9pS1nLrQsTvIgTpzX7WicMKX2OEwtSSkjo54iEiEaftUtnlcq1MjgzKaTzMiTpp4MhWmjoO0UvQHsrZ3Yr5AVyyQLRSUEYtCOIjSPvKvMxUUQjkjYeIac3cUFbge74L/UjCgkYcJSob5MA1W82TaI1vuyYWmpiV7IKGVlYS3YMYaFmWT1odujNT9hBJJg8rTbBckwuGdGrDEtUmWVX8hW0K5KmskLCzac9mfsqVfN/2rYERZb/pBd6JEjUEDCsTTgxIl79aSbA7AmdP7P5/8/NRxbWw68JYMB+b2YgCNT42fQwghgOL5a4eT83bCBTSTGLkxk/U3SzC2OXT/MerJT5VO2NtHIy7Mb3kerlHEr1ts5uAic2uZvOsjQGG2sddi7/S7KuLH9cTNSe8FUaOFzxNWgh7cAG0rzZf97+gTs30z5GRwDanFa/tJDMxSVu8UQJY5Gu0coGMHlDtjnliE6SwO5VOKBznKFS5WXcx95XZbodS+BPYYNfIYHNntD1Uue457SwuS8pPGqlsqI9SUU7P7dRg7j3rnsH08ASSrVIMWC2sF+xPV/ORQPCcRxT1RWRGHCb+KGDPfJDadJejq1CzAzo3sg9lJEPNSZeGJEOQxGrlZvTUxJWZ6l3sO3Cgm1KzJY6QDwE6pgsCdoXCD8K68H73ySSY/zIfUjUMLmmDgI4ZWNlIK3PUKi5UAOg4e2QM5CSQbO6MFnimlGCXBABrKRHWGafGhm+mbl5TNEzLpDoJcDzDE2fv1rE9M6FLEf9LEU8v1ZhVj7KkDJNc3l2/xf+I8cxR1VUqvFNJkKztk7gVi+g3lfmyTsFkUKNfUJpzexT2AALsEMf1zlQu3WpyO8PogK0UePbnjStJ+uV/XVEsKCpqHoFVUmZgpWb1b/THYWmD29j0ZwMN2ClrwXHC0YdzsIlQB09R4GSBeiEQAGR7voQw31EYzhYSG7Mh0Dwu1d/MG5uqBUlYfA8aY5g+pJpPcM3FWKRDXKMqYpOSorCPToEruRbsXnKOAsP0CGdJwVAmBVH5jxKNG2TpBLcuUiJh982uNwFlCDmLvnIuryH6+MUnRbmgxtxp9qWVXkhzHxw+W5mDoIVHRNToqLCHG30d9FYIigAEUGo0AXhWlZq2AEjKgq4WJu8oSN81bLiIxCSmxMwZrHhDbFEQ7paj6Cy6SMdFzOGzA0qsXn4SMZGI0lVlaP982hYi9Qkbk0Id7JQHD2hNbY3voQfiyPK/VvClf6M0NDHxPoJdHS9MUtuOI57DPOq/tmRj/mazmUbkISGZ09ly74Zc1F3ZeoAb7gUAsKDOB5xWkJyxgRoc72XXYsmFWv+9SiN9Nx0ka2KTpulqdFaDS41ixxfc0y6715Vc+Ll5CfdqcREBttY/bBBjvVE/jYKwfbJNLJVX3HSCpCpzUdXbt0gkFmca2O/B7Pq08IJ1tZiG8V5Az47yQhPLVJYuavxEmaaNgiEqUssZ8rHYrcbk4vkMV3ZNAE/G66US0CG2KlSvCnMjZDySwVYKoEHxeVJOSgQVUvwKN2pb539snqQqLJHWVEzoSEelP3Ip/MYJNk2Uh/XfzqdXYLiWJOtyvnY4Tmi+efxck9cdedPtHggLqJPOqppYHPnuenBmi5Vf90llseiuufAEB+ty1Dw30eoiiRb9MsS0ErJApnTyp2mx1MQuWz5H122dvJgEj59s+rxoZFuYTQh/ZaYL0/uqZRi110KkS0c3S4ImXzOHP2fey2wX4z2K+aCGkjl9aBKSynnwirXA7lRNFVDwQBv38AeUQ1P1dF16HpS0NbP/kDbFIU8AXUb/z7y/pigBb065az2LJElHZE9L4dKX8DPBmjsebdg7YuweZb4KrF0RoCwZAx0npWqSeW4XHqjWZ9GyFDRy5wuchUEnNnM0qI1hcBRv3EoMrHoLI4GYBp8ZbdedTbKFcME8JhUJcqx1KAuRp8bus40yntgb8UtO9KCyhBs5BXlCzuSqRTpoMMy83LClIiV6JGRxn5HxJCRvQRYMQslDqH5zwVvAJyEQSsF1J8dcY4ZknJkZIvSeOwV80hWTuf53jztCPY6E+2gXCAbNZYTsXXMKA9IKV1Tn5UsuuYvCTJYUz8mR44cThVYpjrjJ31D8dFxLYGq+G8dpBwpfCz3gmMc4W9Y6YzMqNfgkISr5zyQ01gKD+n44ED/6Y3Yj9vw+L6TPmSjltLO6EkR84rjMFypb3Bl9iQSo+IFC+OVP6te6bUcovoNoa67stITS36EHEg4UQCWsy1iBJr05xzRy0LGYDDNLh2JR04sWmLh9oYtmU7+eDlmCbDb6DtTC/O0RZzq4cSdkOwLJ660NFfXOoSsKoQ8YMS2Z9t3ovzUXCMrK7ZjnNDp6A7TcNFCd2tuOAra/OSvi2aBYpzo/SdSA5Jgyr5vGuG10JrSecI5K/vi+hBbNSye+iQa4Jf2PHr1sS8rPYwGkUJLwbuSux9TpZGOUk91HaObXVO/ve4eKFZua+0q13Pbd9cXLx6CoDTKQ1d5x2TjrAI6PbEMQKf5fiqdNu3+7h8+siKfdYBk8xX34D+Y3/a5L+o3HqO8Xd8F9dvIdipmEW7o4mJXGlv5BgDHLau0AnK3wPFKt9OrtPw7e7qpQgPc/ShA2bWsyXwnw8LtYboAAPdC/fZmX1Y3ZG9Kw3G9LDv0TPviDKtopBd+/2Dvz4IwcqAy14uhMqXROZC+Yrkhq64ZqmRNJOVTdZyNNHOVZPruCC8/EdmqhY2nv6i9XJsE01Hfr30MQqN7plQLOFDqLHF5BPDH1pvnPOn6qi7JOV/hpm6Fqts+2ulsivO6Tr9IG2KNcDa3Gcl6NEbueH1OTlRvEgn52JxlyqS8VSPhycaSjZNt6XSxDoxeXVr33PAHcShnBqPcn7HdfmimFWR2Aah9MnOzTPg7NNpjIImu6yUJCZIUa1/TLpbXYkoKQ1cptZnTolK6qGEIL/YUwNZasyKNo3JU1nMyQ0TW0oSySE0aNRiHSGPOc5YURaUqjU53pmTmAP8LEs2iy/gwrdvEz9rhPhfZ1GEQ3HmW46xLZvXnwNCpna/ay9Q1XXZV3t0d40i2nk2c7PHafthsoMNYSQNe/o7P8wExBMEvpnzAOozQP/ii4C+aNIR28TkinAkMd/pW+8Q2LH4t8qHhoG+0/MPgAS1a1AsGu4lOZlDt3+KfwOfZ67E5J1Ca4rwmx8lL58WpHQK3pr4y8zXmR4tDR56N6kMAIu3VxSVrkrKkTA2NG4tz+6RVolaus0Ka0qEUx6NGc5iq49F6suJU8Bg4/s2d4sbxTnU+IRANwoFl08NhDQ5qKPSbKvDeKQAUjYQ8CFCSEJeFdSrIkU6W44/e0AIfxdsU8uZP9JQ9u4jLWS1lIcULzAK0uEeJ0iC0ja1yl4G4dBeUyPWMn12Nj3ViGTXLKMdjwtFYaqzcEv45our13377tbmLn4dwd+yTvgEjqFS/v9EABFrqNI2aN4zjiWd2PgZa85p9HyPhGB08PvvO0fqkRe5BxourOgtEQCfqqoiUSbyyCosUEli6AtPDrGC48/EWWY3bRCYLJyuW/o6FVNM0j8drStksuMmhG0GONKP6cYKJ9xaety1BAIQa5DBNRfpG2f1MgoYyMMx/cEr6MYNiZvvXS8iCbZoSPXhGHi8BU42y6ZtUo+CIhkiXFl6nPe+6iB0BOJ9AjNMaTQd5QczpOIm/aJ6LZlU90XgGBcmgP9GlJdJMon78UxmVjI7bnhGcF2TEZZU8yn+0mRLJHkvg14rDHYxLIH8jGWGAIGkfrsyXPKHkpFF4UV7b9OiVy5FIC7BHoCf1nk4sUdi7KoXgb2iREVizF1mVPkpXsxy3wXp0z90GdCBvxXy5ZZz4uXNHeN+yFvZW+ioFibAMwSti7dedMSZmTl03kUUEDcmbNNT+2jsHHrfuVtV61a5YZwPNF502GQ9Uzj0nzeVYTn14uKocUS6vTZ8xkAPPr+9y+uzNmuO7jdE3nz/iHZO1T7U+lK1qJ/dybalaXkxvRPcZEbjX/+3c2t4JHDA+vT7OLZqvKB+uTsdpXyb8KKLl1S9+GkqweZmt/+74G/yGgHb6ZO0l4XP2v5Pjw6kaN7l6Fkzzcu8J4egk+n+LQ9SBw4YCGHX3BsQzinvIjZE0bRbNGQhVK4o8eQj+ybKFUczu6sr7B0hvQhMXFYUu/YDJEITOZHSesnQBhxR6t88/E8hiffqGfiQAW/Tww6HrId2ZekTuCPJ0DgJLoQrNUhqpvces+czp9RXiBKiiy46krIeoMcNGtisQWVn5PMAzCR25m41EcFFIUVRoAfrqxwOL0byWjJ7+Q6bL6g3pIv8n8oWPktKwnt0bQZWrLH9R0lud0ILMRsh6KmawK51KRU7cWPf6wM+MbKqcCXCEqdZ2ynlVD58XSH6SlPB7k+lcZ4p46OTkklVhcwBbFua+59+JBjpyizJz7s4vRRh/fQheqmT5CH+PUjkXzm+7c2l5mfC+s9T77q+okJVNpYEV57mh1iB/9nlmd6XjGMpOtNYM5CkWRaV9av22Xhcv8CvOGCq0zOwY+Ilwe6aBSDIJvDegPFOI8FzsnNei1MAXnyqGiLskG2tCnhpXLTek2A1Msjlh2c4wGvLlmlQAq5aQ1vtR5001u2/JiIPWoTGf4A5LhPuurztXrta8MkbSWlmpid+0Uvk7ON23JbbMTor2FUn9K7bvulO0mBiVuiD3mRn44uIlSCSMHDqHhSl9v5V2sxRPKqYp2L+D5/JPzAixb5+q1T3OshFSw1gXyk/SJplQtO3Xid9I60De2ND8bO70GBwqB8oSJn/T+17W3+vymKCxlSu+ZEygtUiX9v4/PxtYd34CD57BRd/sL9xCmjeev0A50yrgVcEz2NYTW09L2CuxACoc7YeXs3+gAzOz3Jlxp41pgohCuhBJ2cXCFORYzxQf7NyPg26gY1Js2fi0x+4Ib5PsOL2S/wAqhlGn0HaNY1adtbFboo+KD69smL2e2Z27xBWfd5Jy8UdviEVjjXvTYUF+sKMfHZ5b8G5613XY0G1oEpUP24GesXV3+Gv+x3CwSG+d5nexUhJVE7BpxdnjAiCrUoWnHYUlda3na5b2rjcbh1MV0WPpGir1ngKp7GHWNhqzOqCQqB0txVt/IGG6J0P9unLoHX94ykKGbsiJW1DraBdESTgzZh9cH7h4uKR95DAiqIsjXzJ93z6C/WzVoNChBd2I2YnrRTMLhvIo3so0V2Ij4QcFwCPtRFKzOBOI+VylXS7PgZMabUd6g4oFUhBRGAbPniKkWdVpDHeafe0pN3JlmUyDI4hqVBYTMZJB6I8IydEPC/CwL8ZPuTOIFKTnzJQTQb0WWxSDEA4R3Yi6OMANmjgZyzbKx6lPSEM3JGuCiVYtkvK6Lot1J/RUpFL3A2Nv/sIBklN8P4Ji/UJE62n3hF36uX4iZK5xgfaTov8LnW1+y3IAJFZuTnoLxIcHQVhR06+IZm4v6zqiqtyXNczDUEhiGUQKOR4I4KeT/kYT7YSgLpBsGIRWV4qnY+2YIbK5UVFIvq88u2v3Z8XBTKliZKWKenL4iU7RylLp5shq/KCWxi44n4kZpoJOoooglRqV4UDDnsDTSDHAyF/UZaZBdSt9O8LJ6Ya0UPizEQIUwea7wHZ+Os0ysaSPasOYVTVVIwsdiL2s1grXAEgbY/TKERPgg9AFhor9r1AYqbws6oO+6TjHv6KdQSFN6VlZDvqZlg5/EXbmLLzZaJjDMRnEWYVzeFyfTyqOUIq3wDjWnYxzhGPHigPmFJLOWbo5L3hUdw9wntMBT+76ywYT69NB7jWe0zm+BdjrKkcT1d62fG4iYEx0KkC3BSSPuc/2qazqSMjwixWZ0FzC+rVEghOcmw2eP2S3O7/El3SNdMmFjhLVYvzELqSE7zhLjbsg9BHN4YvYi8AtcsUhB457oxagALurrZfk+OJeMkVkH1Uh0UwrQB3Cs9j4/zrS76M4WID3wQec3/PtZIxqUWMgOxsKGyMKfAbbLnybOtQLgXY6WvOeckDpgOIAiV3VQaKzlnQXrQO9ew43gN38oH2OK9eFkklRitvedEZre2gkBCEM+tmJo5T1q3i6HYl+VnF90+6X94pXYDpb6z7yTYqoIAlzvxNoFXqJR+8RuSzQzKxXxCcPAusT+gO7uLeNU46280RgypANGoPkDjcVtW7P4LobZxYxMq2LEPiWCamvvJfjvRx932unqqMUQQUcVGRi2Rodg8z4yBU6qUvYi7UKgxhXFMoJJtrxcGNQm8M4Io08GL7p736Q0s1R7xi6yS9+mpz79d/rUvAAKuGWRBvedDhQFZ7+tPPzjs4A7iYUPaOTFyb6BODJFew63S8PBTYg2iMKUlWdeEwHIY1L/GSU5obEvRyi9wXUiuarv+gpz0bUPj+EDMK9ve92fQvZRsKPlp9u+7z1fGYR2wQROo4RpOZx1s0RSN8YjsrVm6u/1YLjbIPzIiBlo2/2s2UCBeGgvE6JFzEusx37MVIAvpR5dH6Sy4tM4UBEGsL5P7vjPMI8l/STH/OHSgKWfbh/QELWUTvBwqxW80WQa9iyd0RQWC0qQD2P/lk7RaiVO4E1sX0aO9huu0MSKOjSxgi2DQfAYtPZ4atNgKe2a7dxJkB92pnEkXWMPowHzhnsWZMnBTMOL3/VLvsCRC6eU2PN2YCQjArh83NqeFtTushP5auOcf8YpEPqFTLWGxUGX1KccropZ6ynnhIdzMV0HiM/AocQSTOro3tkGyITmMKMsnhOeTkrk+d8s06AoyWL7SoPsCIiE91NxIIeGMfnn6KhF5AeX/XSYcgW1NoSa3wr3b3LiSqzjCrwSADMoneAnFSlF1jsiD9hUzczhldqsyWrKJ8s8KBxeTo5tJ3liV+ljgpwbJrA4/bWGuqRqM0bJpajKcqdODY6spxggvXVaVGKHiMu7wE2CHrPcdn9IeypeJiyVgTd9Kc4xgRmwgRf88Z3QrzegR66aaGGlfM2tsj/r0GLIWq0ze+nKPMXulHSGHr5GJlZ0SBYQzjMw+nNqO5TReQ8/+YDZfVAhqpaE6nW0UVavaaRcqKiqg8Tdr1xciLgYWwOCrfSUQJUjV1aee5Qj2rPprU9BmIZsjkacc4RR9q8YmzByKQWUaIbzIBIdX4iD6slYjG25ax/iB6QorYeRZVHNVC1OAeQZBWTJrMyrrbBGIL+GsgCwCkkud176qxc1HkUZcw4VDBm0f9j/6H8XtBCIg4XYWpKffLJw2Mcw41xBZD4hV3iPIi4fe719T2SWFtGBxU1qLQ6FcRwajZDgbJPGBXdeNW8YvEgsjxpUZ8xp+8BLhbpThzLPydTd4tntJ+EvSC0pcATc2RzDiIkrThq2vp0x0jfCcxdTisMAIGCl8NIvkhVMNfv/yVlnnGP4JOHbFj2+g0/z1G8h6TACpyinIUOxLbIkTs9V7VWBB0yTRkPEG6KakVg4mMi786bWl6c4aPAwbIaFK0oHms2lPFQFw6lY/6W9mw73kmlUSJZjCtjSySxvFeZS9bVm5dcSZ29qmpWCiBPVxAybpKJQAyOxqm8PGm7KnQsWLj1nKhWVB0gsM2wqF3CMcsrokDmoXCiFc/iPq7brUOqFLb7doHpW3/b+izW0OlFpRsje/q5cYOetW5O876U3+65UnA//kKHuw8yTy2wdECTs4OKJb66FiLNKjKQBR3xcv0DrYXoYFekztiWpPA9ozhS62wjjgMagZozbbSuPAFRTQynNSS4dVd7/MfZjL4+bL0qttVp3IqbNrVsafOtTVrk1VYsPGdgR/TxYqQrc95Q1WFZXANVVtu9ApbcuVhMiySx7qpXdOS5nJ1CHzmS1n8Yuo7YFpF9WEX0jlvCex+TZjEkRRjoAKd/76fT8dCKSx8nG+aQYgPpC6P+qTFDtIC2JX09JN4F5LwUEl8Uo5/7+GYhOsAkELkR9VOfJ9AADeqXAPTrjfHUI2c11eDmjy4++MOT/wr7SLGFofPLDVSHzOlvu57bsTHPhz2SDQrVvnZVhxOMriIjh3IKZkpbJA69fuj4DIsbH+zNRuSWYQgao7E21h/s/aMdpuWVJbDgRURPq0HLu0EeTCUOnIfoRJtUkdM81h+WEeKSjaq4T3qFw2kk5WyqX2ZvwEhPW59sLZtypaiL1g0FpGCNsOOe33Eg+knyHeALlUSkn74m8fOghKTEppNuzIRGDzezCoKzp9XtYp1M2kQy4+KHPVROSdgIj7RzjbyLsNYeg+cWrhG7lgDRn8xfyqkbKe+5boZxHMOgoBjs3dWPOlPrzyihC7OAKDL1kpTPUG4qNgnQ+l0/AlbBgwgUvWZ+ry4EDdWEUu0t/yhki1GlynGWCX/X2TxIK+YG3piJesTFGAWN0W8nEzJfiLJTJVH3FoydYHDsrrVRuLQiR49rweCI2LWesPKZRNDKBPlMJHBBVpspwREGCfsVpsP3F9i8mq/nEhlc6CwwDLxQvJoq3khGbL64Q/w6zhGeF7C6wCaARtMLxDnAA9kGGBZcI6yOiLpIhtZtWwieEW0AF89K3aaIrkrxojaNLcKeA9BDeS89nVJQxAjx2HEaQ9UpV07cDMACmrCVxbBJlbI40oxsSNlcAp25hUUcG0jYgYGeVnm82giiATWfZAcqeD+pBAjb7B4CXh4ySpqwT1ogtfp6YPEImYcbNu0QC/9F4w3risYxOOfhhkGwuiT+GlVVbmiYOwfBBJnJF8A2cERUBRyNIE9GlBsobjfsshUuPWvmPAKJW7WJgCK3PSSTWnRT+2QPeClns/qaXprSkP6kmpYf4akC8y6QCHUpCxYO1O1iOwArW4gl+8V60waGW/j17AJ+m+yxmIIa8pSbEILq7HdwLS9tJZ8b0pMw/PGW0IvJ4UlziTHhUITHoGfHNwGFAIu+QakCihG0EqzaKj628kq374DtEJt3JN8DuHnq/A0s/zYiXwSO3lvwPLZjNvXqOS6cr+lBwagpuNI7PgbX1Gjjl3oeSHJn7P0s5H8UqSKGbj5Cjszgi3ECBiES0ISKylEonMBwHBBC3cOWB8QKpYmVfxBq9SJADt5WwMhxD88VaM0P2jyQh+Y3b46N7clfHYkxoZNzpLN8lYf4BOcq0keD73KIKr7rhTK5R2y0wGe8sqggGrXuFF+Ispu6tAPcODtKIZPz7xy7CnkoS5RX3sAnOedv00BQ1RjRwzdP3k9nBN9gAJSsljpVCkApUFIYdlAQPZSWjrCuUq+2sR+pizWHuf63qEeFUJK5I8FaIJwXaHrgIn8rSrLqwKlxse0eNsd+S9y4WAZjrba2SqC5/ZiP+8BiPjZQRWkKTdoKZXfQz7jls87p9iblnVWc4MnA6hSP+thxBi1gZSROPZuv4DuvqBkFK8CqZPa6eK9LR4Gecg3uWnxdiXzRC7IEjVwzz5XGFjOjyEWqH6+eCRlO9x1ctMfVl/i/34i40uVOmPYpERridOvJQ5wXeYRqKONTNUGLUEl+RlkyZJqJv9whcwGEAdFHEKz2ldi3WCl9aaST6uuHp3bhgwPn1YxcD49w8+WGuSd+sOVxs8Di8BOWdYDxTavJ6so0zF4uxxueScee9JUJAe3qCdT6CJNpvGDyuvL0HpMOsHQlWcfl5ySLjD8DdT3Qc3fa1jTMpprmiSBdTvdCb3vwnU70fuVJZMym6kvn++vETjNQtgfC2HG7QMqgVbePOnajAVbCyFUkPFol5oaJO8+GeDH+Feo9IArLIbnOlXhKkBPW9td8M4Vnz4FrRDuMKskdwUjig8ZZHM5jBW1TdTVbD6U+4MXY9Pcd2rj2sALxc9e6S7H5Ua/BBJAnAzQEf6csuTB+cY3ptRSq/QrAA+MIrcVLJUqf5mbCJyrIJH/QPODltErvXnsDdeDUHXz+8JTuQLGXpSEyL/6B1zB8vVfsGLyYkLqSJGXz1GkThZecX5NU2MRbs76Szfd8utJ/TlmTU0tEXzNURUwKbsdd72hs/Oh5WQwDM4tpz+WqP/7BDcM1ZxPmtFu3OxGsnFZVD0cK9hrPHAZnhgte3rZYvDG+E4gbdnTaMP9OSMwhdkkP4Hq3G7Kuxte1YEflaOkUd4y1+EH+g69Pmas88ZeTFs2nKPiGAWRB7ahH9ED7U22sYvzxlROaGNknAg/SF4BEvotHo2SPxqR3SiNX1Djgr1z6+Zf+b5hUG0iIJJitEuzKHvMTG+UzXc4MXv2yLJRJmS7vAWZxl9w+09MsYy6QWCdXdtc/9lWQknf2YV+t0XxqjMwy6c+GHS87K7JkxHQmln3s/kRF6oKZ2GpyjvzwbVbLrVJTJoKW6sOPea+Q2prSDWvA8vwYs1G55CQPvl3g8WdP6qbOUufB8D8B1DcNdgDFcLj6zj1//7k7QpX2XHkcfXDftc3XKRtD3hNxEUMq3e4I5lrQfR8SP7X/P/lBj377c3bP7JdrN9WJ28zJ3ZXH0iGI9RvxwSPfz49cl/giWliyLPJkIvYiUKDzkoEuef6KLhZCBwsXJNJvvE5tWEq8Yi/sIg/DIuFWv2z7xDQrmBR8/u9Ja+Im5eeol11ZL2XMTx6IiitcNMuXMNlkF3TBPXiQ/vRWZ3JeZuI47dFLpToxvVOPa9QIB7v8NGXXEs+qLnfIBiu6yLqQDKJtJHRUrYOC8dZnZKIoNn06SWrRMhzI7lO0o/bMIfc39RsyqmCiUoBHbqJzmpcAH+8CCam/+z5r4VQ/NSdQk78sCDIyTMYufCnFUHZvFDU5efkGczFaltp9wwz7iZ7fphmYX2b9Ra1bn7XvOfFZSDwVk2FoxyuKPtKdkpC4oCAyYXwyqp2VEU3k7L5X6/L7PHyeTKStN0PxMiAHw8SbbCyyUEbeGWXn/K2gYOLEOeEK7QsrI08NCiV29nQjiG2/Xlg6hjxHFTQHHE3TUUNiE1t854mp+4bC2MylnnQdUMBxVsmFZ2H7erSVpbEO8IIL5fHqpCa9iyTCpCrBzMIgMTPINXdPEwH9KAk00XE/F7jtt+Aa2bJ4VBEmTbkkgRn2jJUpm1oG7VIsNGwWlFrQzeUGkCdvYbfS7ju7T6GKTP7/wJyOTZvvDs33Wo1HXrRzuz3d42oH1jDdzDM++RaFkJNLnV+bpDFWO3Mv1jlPX40OcchM4nMnRgcT3QHSbpXXcuwmtceqybrzxV4EOt5Kb+nOdgDIGY0EWeRgha86gazP08mMDVn0kQjum8MjOFArDdKK+bDU+YINoaX7CfAy69neJ1VBTeTyj4753zHHrZnxwNpnb9P3TQ6vnXSy0mi/68aaaRTq4J6yBiuvmxkNvolllKNxSeQBbF8uBbqhMBOdpbwqWbEoJJyfrkWas0IfUHAajdB8gogzx4q83g30Hm/QV6ClmFqD9fg3WtkjByuvUReSZzI3ipGtQg6lijRp8igwbPFHmZKrdRfqreelVyzjce8azdli7QBNpb4IkWcUqx1Q7mNlFbyQrjzcpx7Rw1wpVkEgSS1BQ5fN/jvsS2GPswLIoVKZCf6GluQWv00uU/M2QokMFB/KkXHxxCtLujZXtcO7H7AxPXwI/KCxDsWtLbtJMiDl7IgGPGL+O41qt/o/yhELKN5nASZeDTllPMZB7PycsREs8QnxhnGVjiOOjWhkO9L1aOvWCLOpz46cH+nYxQAJYDkhQX4OO8fArZjHwGXUcVgLDF5lRzpAbJUjR9b9QLULu8/vC9TWqy5/j5D1eWZ5PGsVEfz/rCpFrhrfiqTssF9e27EBfM1lwX6gK8P2NVhNyCZ8aMOo3GgqSvP++PWcBiwVfHB+BP5sQZcf05HvhxFu2XOtMyCezsl0xvqAxoiejsU4j2T8op8xi18dyEzQf+jovJ5xl5tNZZgFUvj7pl28/DwEvO3Z9qe5bMUEAECL3/YuMAKujG/vi3bdvIuyYR/Pz6KBgTl/ax55TQ65bihtoUdNF35skF2ETs4aJmN3V0o6Wtu2NHhPzGJ+xL1ITDoUendFO7ASuCxvg4XCkniu153OiEKp0PBYKE00g3bKvQ7FMM+vVceMRkkriOFY6uROrkNLSeGW866QOLbIKLJ9YBoxMX6WD7cxE9V8hdclgd540FRPqqV0eLWSwm+UAkgdrawcW1VK8GZXHLqKcvSoXUbtpJ//L7Aotq+sRU42el6d0QuLxc+oH4loSlohgZlL2b7NMhmLkBEB2B2XkT2siB9Xso5MQcb1G79xUpBdmyhXJI7+iiuWcRoG22Ot31GiVjMskLUInOmZ3JHZL5AJm899z43qUw7BRV0QAdkBuvIGQvNoTOmZyVjlIdvpFoVxZu2mSaZc0SBj5GGOed04hglVqcIBHpcXvok4PHKbZGrLUUn9Ay4xHUJdEGAYxxQ9DV2CsiP2EZVUUp99reRKh1RAt0gOtHiQCoh2ch0YdGB3dDZ6+to+EppDuDDH1BRRg/swPWKFD9qGPHE6N5JnvMDnz8hFAtiCyW88CZpkvDkrvK/NxQBD1vYIe9aSNeggAfcLW8UaM6suOpXT0K52ipFJyRSGkbckMUMldI6D9oipXleucJVI9xrWDa8AzyLSpND+TfzrLGfkT1XmrTso/UqyARcgaZOpsYKVqbLMoIDSXDQwjnaReT0XmzotTiuttUz2eOm//8trrcXycBdcYiu7mNSimWHL4TXf0YxZtwQlg0FINXnmUcc7PbLTeE9RZfaucJ8Jh9nf3SWhZejIMI+u6bE2/WgBCJ0IVB+Ui/fkQsv7lQoXrng5Oy1WNqUZEsFokg3dfr4FgP8IqqBSM44mwhArPdb8QHOOsYi9Np87cFY4xYx8tyAXPJiC0i4EqGq8Ymwi6rAOtu/bJ24cr6C//LTJ7CjKHgNMQV3gtnttUoXfMJOTtiAUK3OQIyLkAHznhToICG9FL2bJe/2GWPPsEG48gKpQewJgjAEtx7HhQo0foKUCI76nq/M9GoqSkxDhW51G9sfplZ6g5QqP5F6d4I7zRf17zQ+qUEc9IH6XQYBGSullc/xQ8Er+cXDX02KhVWcD0gGyjLSwvL8vpzFZ/LqtrPU6808S6AfknS57l0RplSVKsBLEte+tN6sQKn7LMR2E4f0mZzwwR797wSek5+yws346jif/l19nfI1ErOuxIzmsCBqr9HvMnumhwzBNDYmOI1Or8qQI5Kk/pVVyQ2GZGXKsTM7Onithswv7chThkfWqj4Uk8mIUtRsgKz5N5KB+elVvOnf4bbjDfHxSy+IvIQxqJAK3HB09uE0M4jGms1xRGs71i7Ba7DZWBIqgnW/3a7Xo7recKIVJZnAjU7dniechtGyK1VPscJA2pgkYvPK0PvOBscFl4vhD8jsmSM0YMYIe9Q1QlDArb+y/SdJcTAT0cgqxxGmERF+ymQTL3L/NVCt+g7TjXB7NJfrl+c3wim/eEmGM6F3YiUOe5XzKsucA0ab8fnrW5pWD49i11jNrRWiSIB8955Mlw2ZhBKAAU06nLcNCDEnSzqwU/9yNaAk0H+qzG/2XIj1oOD0CJ+VsfgQTIjK1Uv7lNhZc92PR0g9vXwFzX9GX0voDzX9PXSpJ4sshjXgoeEM32k2xC5IRAo7Qt21i2YNWjERtUUPbowwJQP60vJEMLLNamVNhOCME5bAXpmZtRpo2YYmfNc24UezQ9Bc9bRD0tJCJQ5AbDVeZKsors2V7gIsYsM1aQkw+B7D3D68JScvAik+l97rnK2XZmWoqjmU3N/ohR9QGW9mtVF45pjyxYi71QXXO5oJYzx9e/4So1llP/Pii356VAq6mT2e8Gzt3ZcIo2qO5pJr0ilk8WbbgqWfgB+6aVEqK46fXq8bPTHDX8YRmWcBSNyQv6/W2Hqi/usm6rvQ7DKIqsjTVdZ9BpgbHEqn7OoSR2TEhXFd1z3j8NR04naiWN4NsxZy4UAW57ntjdR0n/bod3sstIK4113HbmfFaLQ9wuGRwcST+UIyfGe+f0MnyqSv8hdzC9FPMPvuITw9Slw/X3WdNe7agl14tJmoZlr5p0RP3M0RxdVr86+AqkFjT/obqG1gjhLlaeZJy1etqDsMDZoP0+WK9i2FnJcOtFwS8qWBZghmv0IZTik3mgvmDqqBwmR1CvpSWrZsMG46kx5LZ2PmAps8kqG1vOQ/vmB9Izo2adUtT6fH4aCY8jJIpF+k03xT0iuku/UGa40xLUtwLDO3gydzGd64Bc/yo1YICpUEOVrbCrP9whvR31L3pdT9OwD+w4r+6bNgG+Ui+CMkx4Bsa1yvqEA0U2aCGT9NQdtZrsLqROz9fx5A95HUFQahrKNR4zjw7gx5+43iA36nN8Vf/A2FfD+Vx1LPqhVO4aeIZj8/OQbF1KruTHtbmOFQXR2+RTrtK89AQrkGMD8LIXWQi/JwlwGdi2xZueVyfl5CZi4FM9q+53nuqSKjrHsfY7c59YvBFTpjdcbJ4Qqte5fi0B0U/d5GvJNAM2lw2iy4Lhtrxlhy4iub8mhqZXufzT1Hyr9x5vZUdMMean+zw2Zg1i0DeGSLZCy80RWW9H9j9CouVq/RWep6oFFCeLWs7VKYrNttEqTbcQpPbrp5Hz/aQpsWZHPz0K6CSSiHvfoTtvrdczuoFjZrzgGrecsqY/0RD9KmcPPMLjqSLSZK3aPF3CEB5o7MnuK0vtPloU1gJf/hkwa5e0MC8WKRwh5STacBL1Hf3rOhjq9x9TdHRpgbtViitfOwOn8+78m81siRRdxx/m35bsgaKu1LIgs3fDZfGlKwyXMDxfsUe6RRF8+rJv5g1FnU7kBuEGOGkB1kqIDVvRSROaWBtwK3v4U6fLHMrbHn9DHn/FFdwMrtldIxdPEr3EGULY9yGrDVMNoYDbZvFvjhyrCutMzKLPE/xbWeOeW6nt0lf93ON3Qg6MKpzo/hmfUrvzLFQveEV2PWppBzBgGV+uylC5zQ0rHOGnX17T5rIsOtUBJRZvBha4fTblEVUMmb3Ao93pz8nwDhZugKqVLV3q3+ivPeWigHHrxZ+u2RqA4ia6qG4y3wcg5giFnT5/+Hb9ZTS5b6EmYSTaz8knhgfZSYaGq5QNftmB7qDuNhcKeBpQel9GSNww5J35LDNbzD4bAZ0jK5ybHycy2RQlZWrkJp5ydswJqeIB+tMIPdTt6Fho5tXPGM4i1QK1eyZOY7AGtCLFHDZfGSSb4HE38MTXeKXeOEhfY6oUsY9KGf3ZwbBf0nxo4vINEiJPyFSvmi1VDRmT43iTRCLYfULEw1gyyegVqOdEMhcK52pokT3KCZwv2tjBHyW+Fh9o3Ql0lcC/84CImQKIcsKy2XaoIEOk38AU4Xuehl8USMlK9XSmDA4nu51LK2djbnIQu84v8OF1VIpukNa61QvIBb7rRVey/50ueLFwxejR60Rm2rDfE5E5mZ8XKYHJSV/R/JHtPR3KpP6/8r2rrq/OuJrzSMRldZ07ovbnm0nx2s3CWjpS04C03riVP/dzKTTLN0mavDS0cQ4JTA1nzGL98f7w66ETnB+M8sg3xdKJ8b/K0fTIleHVhPs5w6ykhsmVR5hgFm54sq8kOUpC6zK1aWanxm2P7Pp508hkJaBE+5FFHc24LeU/Jx7WRBu9PwpH0/fDkiOZa73s9QgCwd43ALbYVX/sau7bW7LaPFTpzZvMWXHt5BWWyATv0BwZ7uJKgnm1ZJjO5eQRqL+hLD13gBxfCDjSBuFAWE81uSPlVyAyix2xBviV3PIcQ/0h5Y5gaKVUCnq62OcAR1H/lmBkPVcA4aT49u5/Td/xKHd+kppsM2NSBNbYuRT27U/79Y35FUKpcRPldEp8nhDVZukBTSIsf5G2NYu5LS+BuAp2Zz0Z8oAbwe//xV87oXTlr+S01NuhDknXVMX0CnZpyvfWmbH77ayRDH6MDlze7A8DQJedIw/M9AuxQvW3xZqSyiMHCM3DIs+gkLPBPM3QZ/BZeVJcNpKkKGa0Wy0U4uX6hrafrpvQMx+hYMdxzDpFCYvGy9Q8gR8mzSLEHevtBq+KuUx/o7XI9mUZfOPnesBW5kpwJJHVhM5Yqbop6/k9KzhSe08gPD9MqZekgQOWccDCjdyzsLUj+zuc5SYeSj4Mgyv3GBhCIPcFsm9DZmi1TItqqg3TifsQd0P2YPc3cOuoM/gtNJpJvc5VP9MnyEcmdSoB5rbVMrKp9Iprrqqwx2NJeoKG+PYCFXT9coMoZxIxPh+RN++bRJ4U8926DZACEtACif3CoheiZ4hQ0q+F2RazkW8P/3JB6m3MiJEPT6wwntjBd4MWE9x5Xa5zoOUzJ7DSaEnz3goeSYQ52RUZJG9yY+j8fJf9PGobiT/OEq068hvu7FXlBBpIeIPc3M3jhLkuzmANtgRfdfOSfoOQZRILKfdqA4e97mOehWrE+/IFZ3Jjuvl3G1zkXa0xFQu45dfCl7xe/5y12+7+8DAiXln1J8RWPc+lE84vEJov8N/J/kATHhUp/k8DpQNPS9FyoAhAYVPigR2nS5sxuVhaHB6piTiOaTh1e9jAZ73SsZCO8SzqGIVGpXNvT5EdwzKcf/J5cT884UkqfPZtcj/yiDd7k8hToBJidUs2WPJWCBXn+5k7dB7wuJL8M2j1F/J3Oqj9V8iUKmCvomWTUlAJThtuj9dXUqSKg3vRy8AB5PgatWgDfYAgXj3VFpeaTtLKwDXORg8wZW6Cza74p3tjbtvtwJIX+lsegIGV8g8rkboHx342Pqgn1v/mtWz6FEJ7y+NgoO+C7ikRPhs1I/yV+Y2UAVY8e9NkXOQd0pieNs2Io42p23B9sJlv+CPDGxzwMXtVGY2mcP2z2zDHf/nMRdwUBxKcj7kOJ8rNeautlBKq8/JMGCpJ92GcljPzCX3SIPBLRXSZKlpdMWyQWnOdB9SoF3czNV0HTCphBzSihM+ZIO7GFGcPS+yLjE98nxFtIB1NH9RtSy6CPOL1p/3+2NONjamL49LuFlEzRSHyCm3fBGDh4+Z9uDGrqBSXLZS61B2QpXmZwwUfM+Q9P1Ux2f5adlQxU5by3Yed8t31r4FH91mWdphO0jOVtTC+642VClHd3uxo1Sx0Ms11Jl66CnrXjODmk3nMxlEVFoaqxbKKpmrkncf1OVu3knaCwX79P/sujHsAxzel94PDK8vrROcH7boFa6dL1rvBFYdFzcH/KhaHPmOmLAXT9uZ3RzqizyVIqTevz/+CR4sdT0rhjL93BDKWLflPV+EEeTZenD9BDN4tT5t1UEI3p7lC5pJEPM04dCOlSjx8durFau6qhKlIXvg3KubSkURv+X2Rnkh2j2vEfY0Ac/ank6zrvyYCTJT0XMoo+6AdGXPP23yW08IBtHmedaQFHsPBKx5OTGOGbcfEGnx5Grfe3+/FRFF/MczA0KYz+Yjm0gzazqnST6zsJlf6yFLUs1gSQsrfME35+FpF4asyMeh79bF+gwZMqv7WXgt1aNkfa/BDCbqNu2R5qJ3BKJ0JF4aVz6fmlJqmO6M5tWFd96YAjZsi9YpNIv8WJU6LHYOWPMlY5I3QWdCJ8p0/caZ1yXVqf0xnBDKbO9mBDmv7zdBiqFYVfOVlVJabR9R2ap3PzEXzFcW4lgCnV6otP7IOkJ8tdyfYVt15DNEi2w26QK1UNJkxhQNRPOtii5l3u3p7dkaoRvNbTZcjM+53em0qYSK5uY3ZorZNYs8FSovvOeEt1mWv37fosOajRovaTtfm8gWlB2uG5hIp6mVFiYakd7TbBTyAlVKGCs5VVP87cL2czyE7Loci72pIjqc6osiCvmzoBBrKEaiC2liEESKR7tNDZx8hjFTboJpaz9SjHVrl6S4q5OHnMRxtPIYehWe1qLpdjhb80gxlnqqNWfGtHcM2FITfcgApVozcVTVoyGhVrOxmCKACYfWYByGJXfr/w8k6xCy1slUCq6ZCCMWed5iWojb5zwT55ee6c5SnTEOWZCZ545DSfSKQ0PBA50ji1gKMwy2R5zynghUkAuvkbc6hJU0KPscmgy+Q4InnJF2HA2oXiy9YaJBQzms/nLZcWj3u5VdTIi3r9lbxeX2P37ERfFa2lipy0+Nzdfy6SAWVr0MJsNs8zO1ecioZy7OHqbSfsc/JjRXTaAqzkkh5k/H2MA150QJEneQ7dbMimfB3JhfrD4ZS9aSu/Pukr6bqFXyDiyZERF3bGvpuL+rDWgmcXnEPlZTD33pAikvKWTaPMeVqj3fbnVYvmLz0/VZwQTv3zDdS/fGdiZ1/LjeZhJbc0DRnmPPEg0799pKcW+oGm9+aRnMwCO4C/4w1p7f+lSsfJmLzY3g48i5fZNr0NhZ6pa8RUutjJg30CXd3Z6jwkc63AUoY2Wl+HkLYixb9jyD2xGlppM2py02H6eNRV5oizfn8ly1mKZ134m8HIJzub4Cz0jiQi5HNXEFS58Zblr/CKb5a0rP5dY3Mzijy9Wm5PY+btRs5UWDgoyZCtGppslVuFCOTB8j0hRC0iS/Z8F5gpfLOUAqe116CP8EW9GquD4ZN2J8RbDCnTILoAp82kI5qGu8eCJBkw7cODY5pR7p4CvCSwPE+vuzB6eL0gFBsyt8yCUOLrqE7bAEakfz5hVAuSPHNah96U6b2c0slSSsNXCgz9TnTJzBxRcApZFGSGbESUnpVkbAwaJuGDs6xlLBkml5lWTRRNCcFexDPubQvKpxOF+Q/zvjDSCONCTuW7GYGnOCCdlrCfoinY8KoovLi3mXMlY/E+5FRFHJMbSiMLfY/RExrGz/M3bJqdCuni4V9YyONXsaYeLxWpFcz/fahMmzUuLD14HWUmerH5k8rlB2DX6Jhxz+c8NTzFw2LJRObdWuRnDR3I5I8n7ozHPnkWymGkevg8ujU5eCkUsDvFr5bhJhpeQ4AwtftkQgggxf2QbgqneMrjmwV6cNYzaosKxOMavuuX0rT24zDcoWPyVWd9QBU55bSG/j0hgVIDGASj4GuF5Zy1gq84xcBmAzvBpB4j3wIFAg3wGKljeHgj41VweMtJl0/W64Mz4ega0YnUvyra2T8Q7F5CmUEbfVXcaHJpGVnI5Efjc3ONzxx3ZoQfHiwZifR3CAxD+wDdEtIqomYUCQcGykXaLkBPUCtKTELFWnhtFF0IeX+58x3T0wbHFrkNcpfao5nZ87ouR68ij0G0Ee53V+Mi0ue4/EF8Y8yBrxFKA6397SQv2HIc663wngGAs4RAvzbK9JmzgrIDymx7RlvzOu0XD9MD8Vm9ahk5PXhWI2HPEJ4fcUNA2gVRHXbVcy7AWPJAvTXJzhPFx2wZbzp0fVuJVqh9PIMagz+d80JfpLcwLS4xqqUm5FLEdSS5HNbFB6DU5rhNYpo2X9ZBKmiKFr67EOwjGbtB66yU96yi7PCkmq+QC+dB61V457DTjdtFOTjyfL8RufjSFDqpPWYqGeh9D9PPZf/Bt/TLMsLR1w2NWIz8kpy+ywvdvi3GiDHHUKCuUHGceY4mR5yMgnuLSfUyyia2WUh9SK0fiWmlHFmdQNnXA04h0uuttJx2DeIHJKt7nbiePACQTkm+B2gUOkSPXowiBsLDiFOzKYtm6ZjfPysMpdvg2th3SfggLhBrHmncsCy91HrY9u2ZQ7aosS4K51wa9bM38T6J1KVWg//N/sKvfEdFTpF+1SBRVgiSmYmXmAYN3x4NHPysXxD+2k4XX2bDeh+4o2HDs7tFWaYcmwNGRVetySbv13uli4TBbcR+m9VIy/tBQnZiooV1z930Ugqc6nM9ay+Oq3y/DqRse2quyJ+VLayPMjL0P1UZPMvThF9vP5Mp2Qqv5juKAEW67xepI1CPPNcukAPx1h0vr13iULc+RWdCI6XOeFMepyvyKOyBWtiKG1LZwhuZUQbTurMBTO/q5uTUmBpRVShciM2lyixI0KfqvvA1RD0VcgW4Wyyq843+TNgO/5bHHg0y4842anxTJfIxao/kzs9EEY38XMaQXIJyL3gKdY+fIGz3RunHZApIcZN+JOp/i1p+GBWWHkgRpyLtKhZx335zU0SpI/tbV/N67JUxMhdM/SrvSSVtSbZKu0feHin5D2s6lVdY0EFGwUntyY/JMsDShfbpy0sAzQr7CIksjSizuda2nYDgIoh6R7KWfs4sS0tzG0ftIwA6QtKg/dUVOXYKMorC4o69ZnbKOOptaSThfgCM8d7ZD6o/9YOPjqecflSiguqu/iRvoHpEmua2KZCLGGO3fb1G0JqQKSAIy4QADghMTg+ARkgOIxW2AY9fRyBKYoFh9BhJqlCFUlCcwCnhwYUayT+iNty4nSugbgokTrkNB6ujUK9RQqQzorBLXsr3l49s2qel00PyFy+0M+23EF87bsfEGwlm1nuSgs8ExjTTekMTXnJKh17HriD6zUNzFdBN9l0noEXcvlZ937vVynigyQDGX/NLwmnLOsn3l/1+BrBRICwbRJLPMePpj6W87Aqcl2FwpDIaydqw+rBd4/XFNjKfbt9Vjcxb3RNFWgKvSzp0Xy4i/v8nO66zpqhSQfZlX0qOpqVXnka8AmOazssCw2yFpo2WO6E1vi+SfxOYHiEu2XZqyoCTtb+3FZy9kxAT/BqSnS1pIXyYpnzraWiCNL3H8S92Sy01wiOiN5nDFGjpMscfdJvP/XpZ/o7BSHuUXiokVYJnF4icsncUvIjizRlnRx3KysimOWOH8S12RMQlezwq6xHca4Y2L5I1FjtkXwwm7TFUvcjeYwdxrRNN6i20XzAd1ZmZHFKeGBzHj2h2rnurlmeTDdQ8dLyPKpNHsZcxJO5PKwSdKipsWMUnJsVLlRS1Hb/dCtQg2zuLxik1vB6npVChoIGnjnMK8LH+xhYbUX5sx8gkHovrUkqRgqgn7CIMA+9caeEl6xPLSsYewqwOMNa3uAzqmuXCrbOeTuCfZ68mW+p+x3Y9eJyGWYypXoZAFYegPZJPrl8hXz4nmzIucUf5NkhoROf2e4QFx7KSrnnhjwswhFu4t1tmwdYfaHbabLMXBhOnrqzlXUqlyOVabk1XHOz8nR9yWGl+VCIYOpXJWqYPLdmL6wpIlP/OFW94KjbZ/jlN9cS3oK9/yHp5LF3ib6m//FsyNdUByBcUb/pPKExVNYOn8p6tTuMImdl2GgOrORWBpzLY8qUUUvyeQRRVskVBZYjJSofPTcXApJmyziMiUxnAWMi7MXde+5CeD5sN5zAt/fkbWslnC8xC3tMEz/1BhZ4v6TuCeXtZHF0PYOJvOobAI+ES4d+U3CY01WnP7aUnNb73DcaLpfqs+tWq4bB0i0OQ/qw8aUhDX0LuauMk9pC24juhzN6GvMdwkt6vxvk3Nl2w//LJp7WYdz0dq4dJdEzWcrvHHA9MsiAiDVdvVSTRw3W6yzZs+1Eup2kvyOylLsjwXwMl3Q0av523Fh4Pb8nNMIp2K0lbkTjZbF4SUun8QtASs4se6AaRrGVO+jLb47X6QXS5iPHuDDe1Tjv2i6oTUKP4dxFzvf0GjYmfPf8RwkrgmYOYy6qEXsBVS42yeL7bEwbPErKl9sNC5Cra8I/QyLINkljk/iGJWQ5KytbqQHjH++AiQ/8DyuS70RYE/gZQ+ENKlLDmq7S1EEP5wNek07ROjhDv+FDogvAzpziPTCkSJwmVpi8Ul5su5FHtBQEcAaAg4BEQHueOgEf8GL04DKhbPwgUkpAzKX4HAjynNbQYxHgYCYLVwxWDYHCJcguChTqegagHgYGp7Uk4sTDQXpOXzvBvhXRuRKLW6mnSWBcjFZVbIaNp4WHJA6YaGU0WN1l6pUzZrEn4/bCzQN0yeFh8ShsVb2SuPnEcTY83zmQYkcaKK14BXiHCAy/sfBvRRKAt18WSrM6AVNWUfFrIFmtYHW8LRD2FQNzTJO0Mgn5hPh5BKBNSTypHgkU3PM+zOY7ewgY5t/dV+tlyJe3Rde9orCInV14BfJYQmVZyUQ3QU/VBKkVQZkLeUwZ1mnwLtiuQCpmd8B3AJC+EkOIKIqBiRqLLQijdGN0hKVT6I6hwgWjeaYOOg1XOiT9khMPdbQDfVknFEipEkQlB9WEBPCygZIynNHgrKbJFHTMStYOcAfQEkC81EWxWP8EWOMqPQCkiUIuMBWmpeU22E5Jg+9J4bR7iP+fAPN83jsvvCiEwbjjzCRQIvqnvaigRNqg7yGZzAzUfFYczA/Ix29M1ekuUgoc46F36OVUB1gD0xPnnCCispEeyYZ51s0G9jvSinbSaQxJnm5c2byZSXnXJeHhGwCtzI/AmS+XKkdNWKHblcVRK9l4u0okmiWDNPGi9+8qlstazP4j3D+A9UP2CRlGwmDn7XiQY17unwK/9XZS1Vd/CqbUMmU7sI/8KBZM36ExlzGnIlO4Y9XuOuqxbR3lnCwsi5/eBsxaTH72BU+pyLAfMSZ4YniGd2VUQIZ6xGKxnl1sJn/+sxs4W15sY0INDLvMnZ7xUjyt4fv2yu2FA9moc/CFQgnkYZESO4hMcRz4sQsRg5UkKfmX/HnyhIumOOH+pbq96T4HaX5GBkY00/nMrW2NTNUZRYXneO0aEYBmvHZYea42kxkCoQZYOuvxyHqJXOtRnoT1xkufBuYQHm7xBXtdd2NmsBSGF88PIwDwMzPWKsBE5oCYV/O/j8oURlPB1uY3D0OFaYxJcLXcqwa7YTEdobPM7tpTgsrzkbZg+DVjI2gQVqVxQYY5BgABKSajw1eyoWjILwArpWXluWv0qmYUGktZOzXTTKi5e2O6W3vhuqCrwzB88U89N0WR3ZJTpTTV1tKSC5fskDKPetWwCTSO/HTi9arrd8opRI6p7BznUs8nDBTumSi+Hlnnk1c5XeaalQSSqgMHUzm3VfjY45JCAelzBVyrWdrO9sol3x5TA9laqpbNbcWuUo61pn7Jicry5sFZu2tNnuu5iwNPeKyehOw+CPhxuweNWzkzDsr2UvF9KBvFApNwyQj9YFlP+WtXOS63pd2Qp9br3p5gBFaNomS6r8GDf8+Vl4v1iFXhW3/GFCGNg7vspJ00KCSdFY4AOxznQ9pQzg8+Ve2jPqn6IK7JdGF7mjVlC6XgOepa+d0TQ3F8uNiCfgPNr8/oqh/158vimHabxMNBUQEEqVk2iA4qa21WXYmfPlEn6xDXZamD7IoXerj4CZ/NqLB2QakGRxAJFEaJ9FFsb7Biwira+cH6zJ5f0H8M78shAxfoMDZyi8Nc2cIcGwMAf2Tzn5y4dmvlKN6JlJneS+KFM/5O3licDW5ziyiRulDe+YX3XoKWSKisu57Sb4J6/lcp5YXwc8/RVhtMBMwvAyKm+ONdxZofZc+6dTHie1EjDRkIvrRnkleeFGu1UBjwCIsXnR4P1nK7D90tdmRHEIT8Nps7U2OKQbzARRwOIIYcytb4tenwHGzdgyCbvUV3fweeYFruHqh15t2WRArKN53WpIS3p9PPPR8/Tj9XH4UG1aewLX5nA3s0/22+kd8eQ2Zbuc0NTdvcLOqJjncUfACis2EizQbYvmRsaoJxEF57XOmL9Q8faGdnIgaQn4hwf9DDAmG55/OHFmCfaNYpKAZpXTLleKxVj3rZ0FpqeVkbLGjvY2rmQItjUCqREztVAf/sJdhIYrP0HrNA9kiPjOydfOH0CqjXEBk34yrwuKPgp8JmX5/bDEHCgoaZedieevqdH7WliWDwBxNg8UoWpjVD9/466cpuoGTotGUL0LygUyKKW9letRGJWfap6KUKdny/KpSvXX3cOrLLeyvW8duKYlidc42sB9ZKYnx1qavSdz261Ovh3FUlmc5k52tEN78wPjEnMva4H1q3G+bkYlK4ylWgcTsLUAdzHXqb8pzCf0egaVP8SR/vvkNeO8S2733Zio6w3+ouS6zWGWX+BriE7oQ6hB4XKT9uomd6D2XYYZUl7XUx3zgtpLREyp7K4oIHVfM48DKiS5lFbJ7zdlpa0oex5KoX1sQ4djCdDZRmG20AmUaREfZ1+GdfX8QqR5rg4ZQr+kVNPWjgMgU7u1mXAHoGzwt26/ZKFQgqNmUvOKceoev6iTIqaP6QpEaQjZNy7MrPkcVwUwDYV+qG+ZbjzKi7VzouJ1UaD/msffSJAfawzKScqvKVkKXohHw/7k9iqMWzIXuWogwEdFQRbHrYKxt6ImJNSRypyAqv69q3a7EVdXk43dq/5WlkZp048nnQ1sbhcefzX71ZwJr0IA39L54MzhG7IRp+ar5slWs4h+wRbiaWPoBYtWoAx0FEJuqhbIJ3B0ozxPLyAnomq36ldXvdydxX7zzvKDF/jDFW0Hn1PSahQlt09beTxvatl7PWq/Qo391m4wJ2do4+8KzxeA7f2Q5AglEqbR6Q01fz80J5zDgtZLl95TuSmy/MvOmJ0RO5VU1RJdylVjIQgqalFvJCFqMDlfSubvA/ue4CFkKJYwIx06p1OObO7aVvZfI8qf5/HNaX7td00orX8RBAeqp7zkk5N8wCSneBsfd8FuiGLH0/2tOqNSmkkaTEOwvgJTiWytEwKBs+OiiuLWazREO/N7IehUWerwr8Mr82/JyT0q1imumFVzMS0IOMtU+IGjwcgF8EXnoCkJJl17BxTtG2raejJkpmBFPgR2H5AokyeBrER9WZL4advQHbfOAb1T9TrNucB3nkNSPxiTPr9fhODafwTc4WytA6SETxSb/5ZvreIOA8E9fg71EEr3Wkv3YNCX3voTnhEJsPYGiPhzBX6/83IpURX8sij4/C7CObdlcqVB7mtviJSP4fw5mRyHtBSDjGWjgIQKGm2pyvK77v9joeMyfXi0p7kVbuMD2GRbu2KBQHhJ2IuDGhGzuFYgKfJwVtE8mvaiHyWS60PRuGCf3BMwoI0PPGVRHITc61b10aNSxp9sseEdgDJHrZ/p9K2gJ7FOU+c6ICiVVxhcAqWJxgIIfkUaouqAolOrKSU0OxqK5XiQ92/2I2o89pALWiKUbRLc+majhtjFvkjUqPj7VcNLkDA0OftSc6o4R09JN+wS0Eg947JpprQDU3ZBNCxMdlenUWsr13lsDz5PhajGhuoFNzjXi+mFc3Ssd1BM9w93aqXVevuZqMWOQ6Wb0TiW9AJYdJHdHFKmnJQKvosj1jrg6wlq4pVRk0jrDKz0xUxKMYtak9joT1VwHbOLiU0C5lS5jMDeb5BtM40HZ5E+aSAke0qobU32sFbFuUh2EWMycadgDqtCCwN2OumBIevtyH9JcBFOo/PWFSwilvt+PF+SRJYK8TNXbS/3z61NeUZUTyPiYu4nHhyrOH1H+hJunv+OW8YecBbb8RmaJT9m4rkPQTnyKbZ/ulCipgi58SG88wBTl66q/1Ktv8eCu5UBi5xWkrZ4uwHDQgzwRyaNLaZi/m/cHKxeL7YCd/mUiAfecP+ZkEaaNAhFNXF0bVgDcTSXkJ0z6TtFUnLv4Jf9FYJZ8f9S/urYB7uUakIRnN4vFunTiRPvQMGX4lsrsAQTQHLzDErl5Rr+OU8OvvMIOXcXayl0yEPlcKqUs7KzNqxGk05PJ/dXyrdYdTmC/RpfiOh/LiQQy2fuIex6tIxUw38zPdBt3Bs8h5oKpg/NzLA12sv5hnQ5a5v+mLfWoII0BMgOccUCW/Rc+w1rWkIsFrZ28CGKyU4vwWBvnuy2bvJ9AblCmdLR7aeo7iBUR+cbcHVnU6V4XAfkrWMWO05e4Sf4xPOfwcZXuBoNvwaTF0VHdFemiPo5G+7b62cituvT9fOvGx6mhM1R6CawnSQTeHBoJ0/llO2Y0MIUMWU2Uhvt0OV2M1j8T8CpOgoanvY8u9+HINvo90J84sfCfDlrSPkuBrb7plGWLht05X+xZFnnmAWTj2xQqe3fhb+6B9PvjHuvwkuDrEhdmNpy66i/SI6CQifpB8ziSMhRh2nw2wj5i73C/TLFqjMDWSDk8igINTiUSCt7b7JBoT0kPv+pH+5qWWc4apvC0tyj+UkQqIxACQFkrql3k7yGUT8E3hxQ5GUoGc1Nhoq5KuDl5ez1/D/ccf6UrPK3KjXzs08cg0zgsupfR72L735NMy4v+H+bATXxpuazY848d41KxEmE0PVi757cCDFmn95VJNraLBROqXcB1saGtCJYEo+tt6a3v/XZnE93hCevOpfTNbfpsb3/exr8nGo7iQLD0eLYTStWMEZCyOFKSBpLszOSaRfejmm5LSsvGRPW1PRXeHyo5Zn/KeB3IeHnsvf7+twhpZxvu38lcYWoKC1GgCswtSDbz4+gk7w3DPZb3TxB974oGYPN0fr2vUuXH5D0ZAe24tkEMvfC9sT4SOCszPXyJNe7kjvhefMKM/REKYLsV5H6OWHpgQJFfI+yu1gfXC4LA9MPmJ1h8JwCrjgn1GPzrAlDk/+UnggKOY2P4vHWix9ih1iWWtwALShn5ymWLABy216S6miIH8u5D7B9tSWbmpVwQnOex7/h7pfT6nKEeQqp4fbJjUDPzK6mmtNLk898PtbXuv5k2mD9Roo6znYHBpzQ/RcVc401HSkO3gQS7G7t5u+QKp6wfYtOlQ4p9rAisXbZgUmDAtwFL2RhzOxB6LiOGPw4h+XxwSvy1UMeXbJLucM9G+4/uhCPCwwff7UPuIaOBc+Cww2uyqKKzq0+ARfGLOET9+eByvhRmhx720kqHCWPJbUpm0C1yq6fnP8nXQD3D0v60n1vWN2+bsKunfbsfv2zLgVQRqop7QopZoO5Lm8iiP15uwLYWGGqzpuSonQx62Kb56iedkBZejRZYihWxM4/qd5cUC8h5W1JvFGxlN6aAGecoxAjKVi5yoECgZ36tL51G0dd2EYOlJcX7PUyIenv3uc6sLDPl4DClhDtT4ebJ8uB8lShnf0zVt9WJrJLtYRXNdzsGb+0crvhMWokcdynXGCA2TuM5Ijt8iSTbCRnNwkl2/lyY/muaNqxLuHYnHZSIV9NQLtfvqM+MJ+ga0Kq9nVznCAuwxeec5H4L/pV93o/hXq6u10+ff8KlUAvFR+xCE9IcIcWCA5sKmbZqnD30bocA16jsiTK2cvcjUY5XKoWur9oN/LjChhLK8vBXuOW+9Eke+kD9LYbgozyoufv8O+rQaY0GZGIYJhEgceJhers2EyKNM7miNi8SwmGbsGG7fXxR7g65zKLpblo4p089Y8LdAmG14wtAjrVc9UWPO2NfeKT4rYjyTnt3Wczo/pG9xbJFr1vUKMO2iFq4WYrw2LSnN3b3l1WbleKWYhg2zk9oBsNdwivSjQgl+duMx7rrOzlV++dik8yE6n/oRSlo92tY/e2RHFawmTHJENRoDn83Clxnl2G1s30opilbf8AOV6UuqTVnHY+hiVoOUDpv/dYZLbHlJEQJBm4/rvJfLkAfWka89HLUlNJGmd+boHUCzw7WVUtMvbtKHrw3t2vu1VEqzuWh4nv85Q5EKJaSWvGCanliNO2USX4P1jS9Tem4CaMBH+p6gvvTn0qmKiRja5PZ0MbJxgmrr7U9Idiac0hPN2+WD1AYSfLV+dpOkUouRP+3tgeFlOatJTT0xb1dF8olb858GClilfoSxttqZzNIUaDxsC1hoRzslY9F0JoRwlEayRsvjc5AgII3nUJW3aJ8ZWdbP60mOXvcLtMoEY+cG8Qa8vPUOaXKg8S/sRT69XFMSGQrHdN0pJpwmbR0dwhbyicvZss3XShRBgsjAAmmzRU4UNzEUFd/J66hIswMCI1fDQGi/jNn4fW/UxFOk4TeTIO3wWOBdh3jP3MgTegCablR4rGPEc6MSN9ZoTNre3he2YSsF2vtH8hlFtugS08b2ztPNBx8VacJNKHq2woKKGhP7Od6hASttw98ha+2elFnVg06p7jc0U/2F7tsAAqBnTv6sTZHqhOZRvJpPZ19gNRNRw5YecUzmt7m033qzZaBcXNLHB7U+uZ3Hrjsirg1N5Jf1DxynJw7penf7nP9H5D5Wy4NOtEp+hssWd+tR6GFk+S+C9soQSewKOOBHNJQ8UqgHBSS5DkwMP25khrXkENglF8RKvef+RjDOP4w6bAKSt6ZJ6V/RWVVz5Nd5StgGwSo/9d3zDZeTHPWw6Pnn/fccqo4V/LqrquuuAZge1l9PVE6j3Zdzi735SJRsKevEcexFoDkmfss4Zie/C5v+5JfZdezBz9LH0dyBeL01GnTG3aVfSKCZlih+U1lS5cU/ckt1PMnLIf4OmRVOtF5F8BB5HtWNjwOgl9TxrFGg3I6qfxdBPJPpz5GragbaXOlLVNkstTpaJog61o4dxSyl/CcwHg4pMPpOzIkNCknbSRUz9f/+Gng6bf6TFiX9YYJX1j5vP7zfI6Stu408WBE/NVrdD3k5nz7DG03dVd4itGJk+fYXoenPG2CehIZJ0dKNScjB3ZMMFeV952JOPEQLD8M++ghv/w3InYpS0zhZC6n28saBtYsRtEtR7vK+06V/+BSf2YhWXuY44BVnFNzVMiyREAEfPQbRmxKK89EdaTj97X7ojgDGBKoyXVY41atKhrUqVGLBhS35IyjmWrOkcqAo98R5+sFqLTwqAUvGKT4sgpd7Ka6AKpIv65pd+CQPCnauiO7MMkS3F3kZ3v1plrArCo7S5OS+pBT9qzgkbMU99A0wFIJ0z3zEwadsGKFl2wPLRQbK6XQ3Mro8PH1Fr6fHVqn/jNppnJJnj/2voqUkRlb7QxPYDBXjDCtRyirg7xWvdS/SZ39b2aWXbuRYniFd7GxgwgjhgJswqbYjaxsFK/jgpAVEC1xsIgV9lrFvOphjVcpWk/J1RMdNSqyknstQAh2uC51xhi4AbNTm2RA9ThWolwWrz2XC49X7Ctx2EksFdn3DfCA6fBewtvL0i4wZsk+bEdhesDJpNOzx5arcXDXXyMcAKZ35s5C+a0muZ500+hw6zM0gA9IXsNwXv0e6LmIFEYShYZD4tG2GP0P0pdrnw9APz2tcD2TVvNv84Em/hLZm1JXsFQ4isRnCJeHndi3amV3dow1Me5qDkmkLv1ANKbsnn36F+IN8DTt98x9m6ngm6wU8oGbbhactGx93pAz2/6WiPuVDjCUfnssB5NR5GZfzxpDOH1GUqSU3KglcWXVGXwVKK/aL9m+XdHTs6gQtT0lS9C+qpXioaNOHJX77sQnbU4pkIoIWq7OoqYGVjWZLKnIRN0RNN/NZKTDLtPsHb8VBzJ8uXvX17qu90+GPdBUsU0txWRepx7+nLlA0gqLXq97FJU2hwSdvFU9gBqSYMvwSzdeZ6XS2M1hTf5nEoC0ihZBkbiLNvUVvraIKkm/Dk/kVheE57RxMCaN2fO0Lyl2FXcNhGcZC10sriORxugZt63UutRDCLaekah0CENSTFWi+HKFpgE16jNWtI+TWNtxkIJUOhEFgXi1bSRaHTYqw6sbFT0KCjfnnvE+XpCd36TAXdOX2vKLiV/4VQch8pIxH2iRIkhQ0vu2OXvH0otc086p+C1e2QO+69FU4urSu+LcXDmrsGmWQ9wS5H0bf3+189xTBqOYTkxQImsb4frwDwjzx6QELZScuZ7b7C1ceqMUJDanvaQnJasgz11AVDbrmtAs8XttPmWncApjHIxWBa9ymtU+u1matPQzri461sPEfF/UgZs9BshW5og9H7hnumuY4YRHVwuC7dXQBwgN4EL38cqiBaN+oCNKTS8nl7zbmSguFxP6MA6c9K6EfwSaOZeVq6WJ4dkUTU7IiMmBH5KCKH1l00EZ3BugdlBfhKXNsHGFRtfYp4Sz6sMq+gZ8Cp4rt9wq2KxtusYktSSPuXAKvENzH/ImoTqzqVSFk6yLtQQS+u5vIArY2pnZARcl1lJYD38cDbshbSx3rOWZREN87ph0rNIUgZkQDxH5+0T8fUw3GtTaTqikVfwr9OwazrwNKwangr2GDCr/pdLfT4OM88Ix+odOwNh0WK6pR/3S0GzQARKsw+213BWUmfwtHbqmKv1pyW5pDIem9eoMCvZ6l1wR3vJHBLcYUGCEYx+wpcGXxmPugNySc4uoBLGL7IYdCwL5OB8WYqQMjuYLdWXPpdSdcywJggSxTxgtd/JVZfef+MyNYxb8YBdqgrxzckxVCK+qpib7U1UGr3TfseHkChlRcRZ8bJ6aw61Eipm1fL0H0E7YSIyy8QW/Qv2owW81muGHMuzPOcwIy/DIgoQ4ynGH7+AJr9553QPg62OaTc6G2jdKoWvOMAgG1t/tDFB6DCpNaxtcEHzi/Lha5EK+u0yyH05t2j/o0r1t8SNrsKHTRA4pA55LC6kfCaW+/NjHIjRRXCh/s5xb1NAgxW5ie0n3kMdppazR4AB4kMWrqydlvV6WHQOF82Ly0DadnvMAw8BJRETly5gQdm3bEYuv1d7YkhPMMDOe1GCn7d34KQ95RKh2YbkPkB7hVEBPyo6xGProwSs7kkv2VrTtpzi6uhEyO1qzxsfuZ7tyKrVVPf3OhNFQ0zYOJS7AdpvDmOMjz3ZfpQ8dQpifDG8sr3qd+cE+4BL9zcuSf/lWy7pL4UlR3QoszxjLo1HbiaE1E3pq5V9v5O0UqOfeq5+GlTfWXBarsKO4D4DMNBnbse0iQuWQdiFMIQB1g7ZOj2unJVGE3I+tVLCHY/mKHcAUxXDYJA1oGDpDm0WjkhNM7HB7nvaMYYShK1r6hAV6Hhg4XsFA16gCcDI4thLA2xb/ThhP7V0i2OJj6kUQjiBUbqhYeoEORESDS8rMSFARdKhxfi5Fiy052ZIcQcmDQh9v4AasuU3wASjgCWNahem1RVB5prLqGRDZvhaOC46knnHqhOmXaZpNsaVjhoi0Jl5CDvo2IDT1kbaDo85+4Gn4BmtIywHBcfhU8tu27q2rl3/klhsRw8WlJReSAjRL0cUHbE7JO7Hscg/IrMBUm7vN8OFa+emoevcSsXHit6BXfX0YLq6wF5k7bts6DVeOrfYaT34/XSzvV47BXoRdcUAzZ2t1F7qYksR+MXLIrfugkh8+gpUS59u0VOfHdnbM5A5QuOA+hUP7f6gFh04kl7UQKxvBtVXY4TPyB0wWVDV1/kI+7UQb8PJ52ARACYSxvI3xpmnXK++7qxnCLkePAa3z6UWc93Ul31d90hnS1fWAcLvyBQXeJPpsJ9wz9roM1S88jo+K+GiGzs0mOfWvEoSKjMkLATbREV5Qd33NTK1Y8LmsSxaRIT6mPQlSwxW/zUX+ZHKSmc1kvMUjA2OndIdGi+HkKK69rL+MgpDgCh47Q+YVtgcZReWMzys+1LGYanX5YcjIM7B3LL/Q7tDUKE8pg554qvvUUX15yzLk5HcWDXL36l4GFnIOQ5GrqEy/s3BNX4Het4sVA5H0pFIbmJe6foBwBWhpz5M2sexc/lkNiFGHjQEU8grGFdh3CJvSIRhKPE92ES6suMmnqscyukVFTRRBtB+dtmje9x8x1y2WVylqcOVfnel8A80S82v5LNrtBJYmR2jNQ3DA6v8WUzFYYRReUiSNtQLT43ESdXdeHmweO16Wd/88C/Pb9l6SEeI3Fnf6ld+H3+kSQ0NjN7jWQPWNH2DirHfxplaOslAt2JALFn7TfBMtbyb6G+c8TqO7XT3tJ8ofypaeP7obuwYW/MZecU/b6x3INy24LHX8BkJkUpHerydwBQOrQnqKLqx9772m7b3RE6xaY8nmKe054HgMGPZsHrF5AovlvqA1ilMMxN5khBjDjw4PSPIf9oiDmKhcB8nL2WVR4k1Fg4CXV+12LKF9QHRiHSBC0QRL4SsOC65Gq9cj9RjyIyGIOqhp5hPNQjMNpFTOL9788qQAykSKCF+OxvfXCTdt/45bHBjmJD47j5dodE64LFTNZD+5nlPJJDaoWauCn8XA9g4DJg7Bg5CarGCfHty/r+hVJtSMs/illuiZubfcKEyLIP7Ts0QzNG0bZSQeNPsujYz7F8DzBHefE2FaVxTu7dVBfd+49B3BvWonV+zGU8rHNOzkKi4rV4I9lwmZggXA/TmWRA9WmPgxcFIxTTVSe0xfuwx9Fe/ny01mbymfTImuMBVfZCDVb9gNhA53ZiYhzvlRq2JT0Rn7Wvg9wsTetrJKnCfPvwqd3uU10aCubaoJOAJOmoTjp43ox62szBBN31tq9472Ze0218FqFdQVtdx7RH51R/oiq1qoxm1lddYo8a6TVAKJ0qpDtoTe5RaP/2ZMyUh/7zEWuVMgIWLyvggmImgfgBhJBCficm3J/ggTkE36hyzEkrlMtyjZWA6cmor1GecvgLYTEjj1Bk1qO2kxyqOUptHZlZU+EYpZSt9FSXkaExfFNAc0MkBLcox46/CFBqCL0paFvFea1EAubW+5f5E01LXZW2OTeHalLfnEFroIFzb3bQWrtmRVfDEHTLJUWHgmp+9IIUntsIxWbA4KuVheCafYHsFD2C9qrdFVRctZs7lrKkafgwwv9rvxcXa1ILYuSY2A32ZgkK13LlLpvUc2yEJHHPbwPB9q7y+IoH9nPToZavptj5dzVHcJVmAJ8Kwktaqi4lQ8Nhh4iQLfJAraS5S6Jnz+g8wd9cAfAeXLNKJr88XgqxH0OLuoTtcgHmNjTcF2YU4wacHpCsRStswgRq7IMAAdmFAUvC5T55Ega7HR2vdYZzuisY59sw8uDwTWj++OtG1uODhEdVYYqOirWAUebtXHzFd9xNv/1aQxes/XL5VTVG9Azg79HGWewZBjCO9c2vjB703eJp1dMGJKb4H1h6LSEsL91RXQ2O5ikibAEqFxoj9iOjrKMkYgOXX/C2R4QEeX4ISbNCDa6E4RLq968JQoAvdyBdlJ/U+RgGW97rtrJENwpRL7ZwZ6/fPuY7HOkJ0204MlFGBG7QgDTMtzFMQ1nKBMXHY+t2jLCWuAoJyAdAQA6lvVfmAmkM3Qc7BEoPPtG4CPHCt3nMhnKNJCi3OJsJjujzXm9bukoBV7Nj9SGn6avpkHSNFAel5Ttio17A2YuVRMAWvSKRWnJxwyedswR/AO6fqsg9QeZgh7YzQm8saxYbW5/j+tLMU1sMjhCloBleoppj+vggJdgXPYub4/4GiNNxxheswP7mtJRvYv1FqVP/nBhr8h0KSUezCtPtk+ZL1yziTDIh9/xro1Sc44f2wC4aeXvNInILxToMi++a04yX6nF1SiYnMIWIZlTzQxmaT1jl60shE6qArgL+JcUcr33B/4zuBTCiKIHZc7lyrsIeDUg0Xtrq0E9nFTTPp5Tzta7AWwo/pPaxEPR+CNyM/e7O9bys2qjSDS0z8HW8q/EdEpKjgtuoyseS3ere7HP5KgldeGCV+MePKqUiiwLe0HtYNtz0X4iPUiYbn7EcRx29+hZ91SzrS77nFOtmIiTdVZ7p+3b49f6OO2+72b6k9tnh5AZ+Chm7qtx0kzJgjjk3BwqhJpMsG8CmAvOCxtUwrMep6MiUNOI5S9XRTTVu2p+UTMMC273e47meC+AS4ow3sHvbyq3biNx9bL7N4RavYSM1sQMpC1SsFudy6NOI1p4jiF6aVxh2BxDkfmXhXwFdcFgmmoDIHWXN6+7p7a6p9MjwjFk+DejyLqYzsVMAIF02hGS8jsjBlN6b3H0/XpNQVF7IG9ErDs/c2G7pggXzqhmTbKHOgwazrq90fLLFY4HIVwn6n/32Z6jdqAvTBxml0Z/CWQ23h4y9OqfWJdI4wgHdUOT0xgRLOqabyaT0xKj/OhImK0NlTwcYh4+al5TMxCCtcVWoqDtWjjVj8fmc24xEDThPIBFXN3jrNL4gjRthRLFhMsiLMWUYxdlmjisBvmZQJjs3/zyWNH6WNf7Y3PJiKZqKzHNOLyuX1J0z5TfJlWF27/3OCHdSoGBB4H9VVkaG/QVBxjiWi7Fg6phZoQnR20x378jYM7GuQZi27bSZlnyxisTTGWG4k/zRIxFbDqDVMvA6s8e/qTpEpkKNgvuc9xUHMnNczgMq0L0D9CWzLfy9kWxEovxPBEjIMDv5rfJsc1s+i/PgxYt8ICjqgyjsQLAw5EhbTmULi4JUwCW+mOJvHDAIEZsOZ17Z89d78YawZWmXmFE7uLZ0quny0m7SHPemQk7BiAWbaerp4JlK6p+weD7qwphFWPgzMQU1Di2LtuEhYhhHRjZiZS9XHxsy7T6MdCCobw4khyAT/Vb6hA6DCaMbfFxHEjwBdbqxT2QmJgfb3enFWLROS3+GIsLVoifHzxKlew2VKX5ddpCT3F7xTQ2Nd0KYleKRXTQy8Qcno45OyW9mby+L3yN9ac2Ry1TfpJagb1iXxNYBfhLhWpQCbKDrarGpnFdh3PE2J1q7TLpieJPKVqljB0LWhBPo8DdLMq9JK9Xp2FX1FYEr/9Rd5PxcczMMITRV3ztCFsp3y+AqnuXfbViOjYb5TRwiH8yifbvppWH+zhUbaNmidcpRaYL+XXjj0z2UjN+SUgkciPQ3Dx3b3cTDUGvrKYTr/9dMdoR6RQfQN3Dqk61k/o+PVTeEl5VsCNG806FhKht6p8cyj2n2eRo807U9+fZ07cPCb725KNUGldVDl7NdY3WYPVkKvqcOC6TMYkn5c9xiHkluQ6H44gc0/IFqS0VvewXOPkNJJQLOWN28uzequmMdyw/Jl71ojbx/bPWXjYxpPLdxP1E2zjHqVAbkvgJ7LxOpqFL93p6SDnXyYskKBHjNiZMYjzGtEq0PClzolfFqcUmJ2g9jbvmGq/les6lBe75MTibwLGDrHtw2kyYniS7CCDWaKnPaVKyzjsLiWE9FDOEsBrUYTRLI0W182TCBhtOoa3B5gwBCa6L/n3BdOCbPThr2T6P+VG9maSI94uTuV4hMM+wv4cBp5FB10SFRr+Nbb6tkiH7jicxOLzQ10oF04V/RuXl7cR+gmrMR2hhCtyZw/NMTfhC1ZEONwmkLNLDQClwj1dY1rpoJB4jqd9ZLGdU6R01ltxjrSsYyOH74yzkxch6xFnYRwGgKeLP17YsR1M/7US6zfee5psMJmmF0d3lRpOGLUgv2EE+mfEdK7RnkjBMev7XhP3keyLlj+zF8ubinuayYmsAbTv3ZmJ1HfwZFIkQfunCGJYRYRpaqxAPwmfsgqlelWk7+9TEVREUAvMMicbiHR8Xl1pBEJ9tTKzBbPhj41gvoHy3sy09U4RqEdZvGx8rbtM1BDPV+VJqsxOdRJeqYJVyTf14rOp7FUe7HyG0MlmUSwPZiqdBy9w3gqjGdipjUbDAUfOCFd2hd33xGYaWkibkByTxGl+OnEfuf5jM05n4cc48ttEEjVlDLh6QjiCEhw/RB9rJkrvcDcOEMtO6TOEF59rD1jgDDxttsQAg/Mj5mVu/oAm4/xixU8Wd7EzMxL30Yorhs5ZOgjIKDGe924q7ri2hjbE6h0I+kbIx6JAvUxcRVIT4pL3PLJF/u5s7CDcBWMXokHRIA6gDvF5AYeEir/B6Bsen/UwLnuytNFiKj8zYTuU4prqZrOLMtMv2whxAamlVSi4wDoJpSdjQ/Ys9shVL1T1mNcxa6Gs66rBhBNLMu/EwnF0sNl4ER8Wx99IqwlMPFs34NgXZyqR4lb/RnlXxfLRY5lep9RPnpdf1HEeRAXx+X7quJFjkIyljdYVEIknTQzuogj6JYAw9TabuF9++JL+A20gGmkJ28DviSPNUhS/s7sDrGykgV8PPx3UhmTmCl/HK1wWSfDHMWEihbECgm3zx+to1W3jzca4houHgTLAwRTaFdH76HaN4hYaRUEIHdA0vdpB8mKadYsokqaDJex9Uj3to+TPdUA0Z8qS6+bmw+hKhYW72A45s4EcHuzNXmZIJ0I6Uw3baSi1dDVKsH4IFaOTPybccV3mjUhwBZr3twwiiXKnikUnf45H/BAuTruSLwc14Gb8WXBj6IxH/MCT0DD56Eazmqp5PhJ+WyLlOryIrGnyrIm1EUsSEwsyQaQXu51U09TkaYo764bja488uqgexlhQgru1WXOqXBDSg0oBtbxQ2VAfGLqyvfIkQ+tWB5ojGMwhT/pAr4kVB6HL/b6Pr831LHfWwAqAWkfnkBHGqA2PvLhT88QHmEV70cOLHM/zgv/gSKdQnRiRxPelePov6dZwkd9Ptz756fVea+M6LmJlImmEeLzlZZcTaC0n4/TrhNzCOSkqX1uBA88klb424ly/Pe3vW07ovuE3MIIuP/u9ErpALD7j5Mo1YrlVpGNOostTJoFP68ZC/E4Q3Ep78QtHw2LE8tEi5qSVjGrAVk2zs8mT32KP7/QN1zdDuvc2h7IsLdqTLfPhGuwNdPxpFH6Q/XYNGweUcvmVcrqvOrrFMYlW8lh+h5YQjCC84boirLu7RwfiPKyAPP1q0OxIBadxDs6NpbelfYukw1grpR6Vf/HAxA37AzrLv7yw9Edot5tNIPGmguR+VBkNqenm6/kx74OR7ICz8a+sabrBs6NE07BFZ2CGwprZ9F9QpgIZmd5qW8RR5teocGmfDAHfhFZHU8RlDT9JJf2HK36lE/UdxOS2ryG3EGVXXH4nO9Kwo4+I3f+d7pzCMWiKxH4LbiHf/hSLn7Vvgnk3iochzxZU0bnWl98XdCKoGbHOPAvLB17dnaTo4YO7QycKhmwmT0166ENgMjdMxwC8z6xvwiFVd9h7CXlPNxmCfe5v6GWulC/iOMjhtlNB/Psp+eWct+xYSK590gF2JTru9H1doINYA+sWeNOrPiUidK8raJtF2R1Lfh82DrlmUOpxG78Gj6836Jof8dkSWPXfx7BTtThHzaw6l9GvBfTtvfZC0t5+T5Dy3yS/Iq34YetDEhSfQ8rp9NDRo95FEMdOfprmKmsiT1hrSec4gvUD/FcTUWp1O+lGSVwVR4xkR9orYgalYFqHmmGlVFkZxLGp5heaIznBZknJGmPa6QdclHUha4MkmkOKJOjoAW2RgFzfcpuZnyhTfLPsbZMyUsBs7c3RqYj/qGvdg1qnVyXJp/gqZoMaKC6rUBZeziq3+QTyR3g8F1zGMh6/SWs06pvqz8yy/5vbFn99c0yag0yXju3JiYuSHCjGFl3/Q9uBDWh4XG63HXhDf9ZopGWQjT+agUmiRyPSqvS0tkwjvi5x/BIw91hk/mEXel17RVOoQOm7OIjv63XHanG55wY63irN3WGx1DiR6/b22F1ksurwIu9GYJ5N4bSHUzn1QpG8K7NKkPZPAC3qZB0SD44eW1VzMVuUnAWemXf3K93bifx2/5z8ptGIg378QXuML8hIphYomkuEhvaZvcaxEzUoBA8vxHDe0KqW5wjDhOItStfArsx8PWqbP+76XOJMcJ8tDX8a5IlgDoJhEDRQuKOi20Ghnjx/fLGJ7V49vKnmzheHkW3qzuFIbLsU1gmClQKUCx+jHQ2h4/nDtP+tYPDQjGNgtAsiICW9FSivHtU076I0FBkEqF2smCiYBrAj3Tof4gd8JvPmBxHZieWWNxew1OazQdAKu7EJC4fmHLWdr1PEMaCWi4Bh8vca3+kp0QleCXlc9kP0gt6G6NqN+7vV3y+dK/AFPEf9R8xbMLYivBeUuqGzaTlFeOY9ynOEN0L8dV8K9InLoU1+09AzqH7N+yFuTffNE0uJAccxBTToy/QzvkKFPS+F/Czk3AmyCYW1PVtF85M0OR6Xc8y2DUrtXNmExW3utvk/Uej5aok9nL0ULuiJg84fJzRCcZJMSIq3yk163OAftUEoKoE/Wg6XKPFPlVF8o5p8taff3rzfYzrv0+gMv1yGjB4CbpTKS7TF7Yo4ngKoafwemaOiP8Gx1FCT7Qsxv9n1BKE99oy9uI8Bk7tt3aonmzA9d1D4zOxpbVe12PwqeDybZvd6tkTpycfoKx9ZSK7i6wZaQpPYqZ3Lut1OfNhMEx2AAak+vezx1W0eeLbm1lx8dibZqPBgqj6Z2GHRooo2VaZ7vA5budOjNZY+1JexPp4n2d11RzrbXtcjd40JTetxo9sFDyNLFujjdjCT8ikuGbbtBsYKirVFIuqDhUWKBGzammJkT5l4Ell021mAXU3wneY7je0bTywKD/cofCC1u20C73sud92zfk/bx5xu+qyzYL4z8zGQUckfxSWqaL3qV6/D2JyTfNKNHZhWx2+q2opzxtMH93eD4xSKhiDzLmoTpcdXNA4SZ5eeH92YkimlYnMHi0dQPlzRmcJFon9FnG08HLa+1m6H1mbkR0TgLiJPP7c+tI7vvhSuSJH4y4dp3FaTy/bsy5oJKICHmVQLgD09JqtyIfwNC/dcJqqR5H8hKcUXyauoMpLvp3379cs/U42aAEq1a8aEEMjYZoqj58c/pW4/Xw1SJHImmjJoTduQ3Eq7nQnWXX31tsuvK/ivTqYYxLqgBsV4noebTofsmmKdavswmx3wph9m+N4y6LJRuNnsfW1KPagl+pkUa0w4YFPDCdLalHLLpDXApttKhaQzr3O3aZGEzuJaG1yS1XmreMrLhdIXY5P6xkh+qkuSbrqEURGiQddVn3Ltr2xacvkIYiN4JCXO5YZ+4zPvwQOyzUbM2fjw5gT/VbigrSA5E92W/+6FRAb6Jr7p4mJqBqNiqY8yJFnf4BrU0qE2oXsNLjKoRGPtPePo3hNzwIFsnxjNmIq4EN+iQbGisUUCIjWn/0eMuovSsxE8LJMbpgiz8TQP0ncE26ZV3i7WxGdsAxvv2iLXjDsJbdtjmpb1XB8pWFbLiuZNfFMg3EVR1LoVZ3no0723qPNrFBeasvNaGyWKBh6ewJWtdDUmaOtaNTg6WDg7ezzmWccZSW9eAsxU98XIoge/R46nbdgoAvba6c7H06uQmSBd/69zT6Pl4jb6yyXCw995C0u0iK0F9rYTqfj4RnGO9EZPKxr7jY9HiS5O5SJJlu1FLX8ijP0BXVTnpVGK7pU4Fu+ng4HvXs8tMMV09oFNMoy2chtlKDAmGZcJ3q4hXyNxfvybqVnUEsqolNqMQRXalP0OKk/220sV/Z/1JIbGrCZsFnkG3oVtRgJUnCt2y/Mp1Km23rBum/KnjgWLQsNq42zWCV6mpKySebL9gKEdRrY2jzxO3gbIIHytnWArdTFvvMxtDUq65ER+qai9v6MiCKHXq0cZBZK/eCIwghdHVvTMClzn0uaeajKoixTBW9ofRqFwBIqJkWw5JAW61rXHnPJUDfYEazieNcuwoP6W/vWgIC31gBSY4LSPkklXwCuOa+gHL+VwlreiG7DGWxjqZftBK8iRLdgWBausldJ5wHX17xGgSRogWoYqastWxG/kkG+eOZqSBMVDCHBmhM4Owvj4lljAr4SsKqb2y9tHFettSMEjF72skE4VHsCVAum8WSpy9w7p6Q57vNYemnkJPPTihDKIgYYxL8Pbos7wNnLOZoRdZPZCnR2syDaAwh53ZhGyExvOdn5cs5tu8W9AaQaxU00WUIkEvq+CpxWK3cDMdtFgrC6pdW9FSGH7P3LTXz4jt2bCrxLcxgp/FSy0bOZ1tZl2hCpQrXIn3Fb1TdU3GCBRgDhRX/uQP5NZBOx3sPb1CBkLSG4nlYos6XstZBbHAK8muD7oPtHLOGNZfI6N+PNr6Nusj7NwEER1/0O1L2R8lLPV84lv/75IegvW7ZikJwPBDX7+XyMroavlEGM4ji0N8CRyCIQNLiuwvjXZpz9LoON/mZ4444m9qM8tUz+wnvmUOjKItlOKbNJjcUv+2WmWidHQ6NQ+8Gj04RkWNRgE911GLUv3If9q3JMZj9gUEIWaWra6jrPdiCvKRWIWKbBh6rDgN2PP27TPAbG6fTNecHSzk/a5ebP+IhBr0jkYoe3ltlrv2q1bqndghTicyT/YrzGKZbhsS2ps5D8Z1ttRbh0sB8S7pwsq6p/G3b2BjPK7F7OFEbRhNF3xKuuS0wWzff7DSj7SxWCn0ciwCRQsO59vp8n5MgYhtdh9s771Ukl+N/PJP5dhfNHNW9StH+Us3Kb3vqOlsECApw/P8OgSfWoYI1XJc9TxPRursZQKEF98vAiCAxH9MaX9Pt+tdSkNN59LnLUd3no32yYLlHhJG1LG2fqRWhdpfpaqmZ3IKJCPyjm8sVnJ98dSM2dABD965KytETZa1/eyijfrIiA71FyFuHo69I1fu93ph+6OCtpL/18SnFLNq+g81MbgyYrl1c83EcV6vsyO/2AoKF8r88hYH9v6kKD7ko1cjWi/wgdYXSRC5t8D7/MWvgHW+/311Nai/T8dTtXxLujluwWGPXL2KyKZzcLmp4IlpjGtP8smD1gfYHgz+5oD2Lr5kbLGumSrSb5S7ERHKVpz2yDw5gGA1tjCN5F46nWmyjXCSNoI7GzovnEMF8UYceJg5/AuOyA2V6saQtbpaerJLuoZP0fb243G72EPSrdcd3JUfzATyQ6+dFkbmoixsxXadmHCNzzpE3SOr3IBBH8rJNQnJjbLqfFj7+BP69JNEzcKUUIQm1Gdy3PztMPwvIYfms0ldvUsUMGCLuC1K3ynKvPnB6XnTQob5nldA06/q3yoFnufi8Y2wP5twlcfy/+ID+on9YkOC/2iy1axu2t0xSCOEySLjeX1zo7+pLR0qk2g6RVECsuJ+mspJuo4i6y/zZ6iNMi4MfMxQJBzTv9gQeb6xNX3DWroGDYP/itUQc0FG/u1IiZsQmbeVRbhYx38fMVrxdemwjLgyEtlYq3B1oA3j8o/9GEEvhQLEQY2Avg43Lj1+yAjIGPiaT2Ojtz0RRHfAuoeJGXPmIF73Doc7Vw/XVfSmgBs+fKw8vl5GaOIVOHcYkWQIckZkkbng07bsmOyqG5A3PLdAiK9NwNJS6bt/y5r2QF9ocTBAwf2/O0oqLg2Dq4BfYsOJIoT7Nma+vSzdc7BqYfX5IfbUdNRqaIHjWqObhXKyeJkDVXiWUze1+SQCJurfq1D0LwpDD5v2sIbg/WvgE4boM75AvPVFMMqr4QB6kN0r3Vkv/pZ9HcIAhFjs06NdoIwEieqcUvo9fXV0rlCQSXwj6I3upa6i+bFnOthZze7tYU3q7qg4ADi12cibnu60phYpKLObOqWzRrMuvXFAChyqi5/Y90SeOcA+ksS7zDze4FqEEpsmQDzcv53ogFZv4IygjiJr01wj7h4+qkVusEvdtbzZcXIZRrLoU4yVw9KDriVKYtRXPuOTt9wEGJ4FXIlx+AzIetT2v6lGy8xp3TRr2VwMw2JjS0JxgY+oslA8Y4KzWCjOJFnztwuZxN4fCmTOTq2aZ1uWoqFtVuvGWt6jUgx5dMqzKli6rG5HlHpm8JlHWdQp0cAbJOxcRlUhGHigKkHF8XR0nypwJKprMOTDM5xM/LL82cpxE2Zkm+HELgcs52mk3JCRw8q+FXynzWFnUUR5Xw0WnDRTXLm7KSFSbEmst9ulI96/IMN8x5TlG+8GndHxYHQDof22ZblTsFuDrYdjnlE7Jb0J8W6PfbGjXIVOr/i/EPxH2wFhH+j2yM2IEE7E8nNPCvHm+8jhWXWiMCvu7CrPRXyyadyGbImN45C7Jkd3jS5xZ9qxr8PR/cFsLLPtOxvn5aHTwh+lXZiBRpsbDVaz6P88xVSVCLs4EtNBqE07Ft72M4IKS7VTwnrv9mArjFPoCq7C4M2fASZ88UiIp5BDq4RZtcnlihtLg2WvPbGVgU5hnFuCnUqvQ6doGC48mHmIETxo+PAQH06wDL4bzXWh+4O0bafgrOyvsmb6IZOWDh/5HpGe5McX6N+vDeYre1T8FAS4CayAzA/qO5fAS85ccxWIt16wwbfa1FDn3hJ7hmgRL9dEhuCjvTC9TZDrZhVL70EU6nssJNeizPAfuIp8IiHRE/hgHzLlrmkaYldwbAz9tIrJ4dXuXqT4E24gCg32qBz06soK8dI/uWGAFGWZTIgVv24GT4orMTC2g4ErYMJm4DzfIv3haA+Om9i76GWwlgUvXg2Z13NMOUrWcu9VgakNV20H1AZL5BXOKq5dUpCQByVZcRWWAVqAeRAeqyrmMHp9snjaubrlf1Yw/tWIkt/lmiKWBUd0RZEXZmyraRIC5FlVfxUpMNf2aI6l7yIroBzz4BIICpKbCYSiCpyBlHymDJtvK7GKOKxCGeZcLsImMrlZYaXMbNYk6bd+vM9S23uIY1QVCD1bZPXNsVgX0IBdAl6XKHL3qIGpowcI9W+ZkuuQHZMN6dSeZdwefjtpE4AoHWtkpko0szwOODoRbz12tGSG8d3NYnD4uDu42Arr2SBIxcbKrR0EndUEsXSFUsUNz0NKjn3FWpaJVzlMNLEoFZ/DuSEQ6UxuG6rd8OkKOw2x4KTOqsugI++4kox5gwRZpQavW1LO4/hc9RK/7YKLYL7eeRqvSGwlcwFcwkjB7MEJXWikvsajSesKHT/f9smplS8y6NYgpg/6/EV/fsop0UM6w01Y2YRm5xFPXt3m6VO1AQX/3qfS3WfjghYldvGTEgk8939qmRTBQJiW5YUPeGkUjRXTStydit2oG0VIdrZ9c139z9LeY6+fY3QGNxPXyK6T321Uk6c+2WjBkExgaiHRimaADDQO4F4wHQNLEXSw/eB+tfIS4ADIua14YpkKed1d0llMIHZY7j52mkYyMN9oAAKvTnNWpmITQCGzgX+OZYIqXH+NJJQWHsYGtmPSqDKrnHdsQYI8XWc9TMUN2K92L2eiHMITdwA45rmGp6QGXCbFBPA61JNDXkjuM3UoyetnuyilQ3i07yCau+QF2Nu7maOTf0s3PYXzZC2Ftk95OwP1S3F0hAWl20/M/SFZud6mS6M6Gz7sUGOJBSD7BxCwCIiZPStK9U/t+mthRrFo7fXrYVOgdMQ34zMIxJzz2SMhn1SnV/MER4p5X0TJfMQLsnOkLV0qTBm295fdJPFcXpJcUlNhBQmkvHA4IxOm8rdMA2dVewgjpQjW772MTGUYW9jWZKr75u8GXBiWQhYgSVXO54JSIuaMw+HNU9g537hVQ81K3G3mAEdK1Sqw4/16h/uX3t90qH1OQmi5pAKP25ikM6HaZtnoLH+bzq0Lev8MUFDOdJh7BwmWfjf2IoF7Z6DhvZ5Za0c8Hf3tMmOKbHftYufhyEJLbUvIaOe5nZjD37U/Kk4zUX1CNP1Qw5hEKVWbTHAPBldJKg1S/6Rb4IHwhsh7SLpUM1WyR5rbBNW29bwNHfMiK+0XkhhxUsYJzF3zHIE9zj9+GMAjRtjVeo5ouMr3ZaJGgGkDYXbHttLuAV11+/hv9k8JfE7TzJWizERo6WX8a3byEfvK6jBJInJw3nXToOMR0J9tel+S6Oxj6R/O+jaxYwPAHfNIjYv4DrSeulqIR8r1uMRj8jzt/gaOqPQr6ZC7RAUbTrblVvZH7AKQmaH4G9Ledw4RyLdfHtS0lDpYpd/JSLU2O/J3ddJ/+0qzgwcF8/TxVaUWS/wZNf5irRsNmHe1H/O6HJ/CuvdxyMsCqfnpR6nbXpPd7pmIIcCk6Rs0C5qaKpx0aphkMsJ/JM2jYF2u6Kk8zBdZS7QU4sKpIPaUPz2/XCIHxHztA7QfSom5KeZKpd+VYxxifjFP/iBO3hIk9/UUAuudPBTeXyFOM0MC6eC2e1sieYTCSgwuSZQ6CiKULmAzmYaIKtkeMcGsShQ+sn11e8RFm2cNgcYK9UyU3LmHmjl9lN7ijafjKpeosEu5MAU8AHW2eDK/v9PLLgJeZIAY8WgObcwHDXtuCJ/Y2It/kMGBVCFleUmrLN0iAxk6ZQkFIGW5etVR4GpUR2fqiBqnZHt9k1aF0XEszs4FKe57BJ0cxdOaRWlEXnEPM1BoecdLZ+B7LFtRXtSGyVnprJFIDXWefR5gFJBPOhFHmK9PCukUBO1vij8WujVZsO4mhqDForiYHeQUGCloPRZtRgGQuRupcEJaZRcHq53jM/qZYxZzQ/bwMznIHtMZKFrDI/IO0SVlsCP93PJLkpZqK2CSspPmuizL5hoJAz/QUkdvQcO8JIeUJ2lcFXJv1orbjRZOI9FQfU/+RiOjVNY0daJa0mNX5637m40pxO1QErzfKIG9pzy1d/WQXbTi4kLQXoZpSvOfOukZXJaDen5cLMwAgX271WysUQS56vaWYsrA87wja7D2ckB+WWxa0/UtwDfzS6l8vk23Di2DD1ORUHZSUB1P821ZkeTtM3cxmfKH8eU2gRraHXMrd9xHTORZgswiA/HrtJzkq5BnqZC7YVrQLWx3mIR4yZtt+17k+cEb/U41K8by58EPDeKAsf2xf7u6YmMUMYOC36OYyCAtM5a8+mXK/6/8pBhTxD2YWS8mzLJi0UAkVgEAGEZKWt0ibdI85qOGuhgY8n+q+RnvCsNqWOTMJeOOnw5tpD5SDjBF6ml8EX9h5twah1hSTL0MJkvWXDSQpd6DiTLYTyGang3hMwdDFREOWL08cgTyJf7NLVBjdM5hAtIJp69MNcof0yCKqIiK7YYNHK7EGIXafdCdS1WbBF3qYVMbU3roNvld2aJkwZQQfOVhMVz9I8jPEALSdaec53Lm9iwAIrAFMwKnvPIo4czscuYi6Zl6MDHU8/+rIwh2nW2qn97B/WN4xlMBQW6E6W7w2PhIXfxfi62bIbnFuOxNUXrUwpbZefpsUdfDSQOzzsZYXYFSYBIbhTG3YhHa1w+PXn9GoRtHR752WtQV5Ig+qPMdgEgPKA2Cr6UMsmG6pTNsepcalg9n3m/gtNiacaw/E0OWKBNfwwFy3rP7wE4joErxoGydpyUEABdIgbPOueHVJB46wOIUAtZeEFx3DLkcBrGeXS7yGMQ/h4AMcbBdZ31lTqDBM/Vry/UHEyyY1arnAyyl5vL1y0ODzXGLLhlnL4HPmjE9/NA5ooYW+Jru59fe1rOszt6vF+fJEGWIKihQIT6unUzJ+LfR15QXRJkUCac0R4WsJEFxb/ZKpqv/vNKTvekJoShj8s/tkD8t3lSqX6/ISBqAXL394jlf2AAPYKbbYw9CF+wF1Y2G556wvBMd7WHpNYVQqiT31f0hZn3HfjU+pEzLBUqL5E8xtu2renZQ73aZQRMKO6Ww+SY+Ni2KKOtuVOLJonFlFQwr2F93FydZR+NDrGB4IB+dgbzdGSpP8w3PiUSy8fAagXgXvNhzjFBquNYr6FHgMFNwSvRXOJAHPuZjqY05n0NGT5l0hDDNpE7MSUCEXYftKAWdbq0hWseJ96qyhwaAgAK4ptrfd46gcvEs+A8Z1UZzBO4v444YqcQjDmnhOdZSuGqq1ShSq8ypaD+BHQbU9QDy84l9bHEI7h3faCN0RUOKIQrOhtdQjb84PThJHQKQz3AMzIbSZOHLA3fIBhaoDyhu+7XNhLZAsgbwjJ/KYa3zbXUvIZldcL8r2ekOe5jygfMP/kuPM7vUjdgolXO++MdBoUntVXjcRtoE7iykU2GQ564iCd60KiCKGk0ZZmv1geBZuWc3juZk923UMaHhPucZaJz/hbzhzK9HSMMUFWp93S5PgZPWW956ZFrMWe7TgefqbpIAR3iSYajy9OIQE7kW/fEfrgxPzA7zkpUr6l66BBixU10H7BXO3FE+dSzO4T2VIlLaiyl0YROzmk92i5OgQtzpUPNfPybzGIywKAWzoZcsoN0ZMxcZqAagMlzWcp2Z8E9WzG+ZfbhK02w3S5wS1cN7KusDw/ehmAlMNc4h3r2aX2PpmWpXtbh7mv+9+NcravmbFHirnlV/ry8WPTuNseQBM9xglvBu4G/0pPBr9b26JIvYg4AGZ1BR13pHWAy2c3NjJ+DgnadOJ/N2E3sOCcF/rHngSLSGAUiK1QgnCZBelu5MiCgcikwP6WFcxIalAvx+emml4qjBY9Yg/QF2az7c+pvh8y/PkVuf8xO4bgCJoGQcvJesZ0bo/NHJu7405Zxf9i50u1KCv6djHOYZ9YOZ1W7cPe2MsNZ3EoY0BeZPHJomA4kWHILel6BcUo2DjPhNFH91jY/izNdLTqQANVBKoHB1dO8QhfMOT/85ydQcZaqvKEhCKkLBcZO6n8kiLfPp5GYi0Uff034sglgRg4UzmHEW4xPgTPD1oyGbBC5kh/J73ulGG2aTWnK2DFNr9bsnXXY4yjHOc66NS1K7+0+u7+A0/ezNYu05uRVSXf3+mdmM5mJfVlqfCNAx460+rJB87I6XPxLxjxPUpQ6ZLF8uBRC0xO1AiYS64QStswjFt+rj0atJwWbBzoni26seQnkdCB0UJuRj9OBeEzAeteW6SEPTxrmFECpxktC9yT9vj1gu5s7huI/q4EM3TXoUierDLzVNVYvyYfSP5y6UYhL3dhD+LTHxfn4orp74chjlLYQJq4U8iUf/s5MlPwmGcWG9odA3DETn5npmhZHdZ2iH6H08hcU3Mntc0oweU57/vopV2EnxRr+w/r2GZ0gYf65QQ7ljETaU7rxs2x17zVUSlOrpStxbe60rry5x9UCGeqhbVWpN0tnoxKjWfKxyXYl6OlCSpZXxeHNek6qm+07DJ1cxLRZgv0otepUJ/VR+GxiaoD5AkmTgGrLkdSnioFLNxCQLnCaJRukajG2RcWSSS+jh6SGVIou2n27X0MQlTDVEWl/qMMPQbgXbSfP3/Op+CKMlhX1R2o0OYXSu12pvRy8fwNop9iC1hTV8bnOd3AO50+j7WjTGWfsr5/WUNMeyYErKht2XAzgljOXauINfu4XM9afCKgpXC8SEVZwa5qOdaZYXGTH/orFUqBCOHMEHVojIMUemRHVagwm7YunH9M+btMxORbzNDtZkcieKvHdql1JzYc/Q+u0T7pRuajh1CTTWt8EAhO5ZHNtiVpJFNN214ha9bjtJFwcgO4mEXu555TetIkzSVnUj5xRq6lR8tq7Z/KUKFeDn6m5vHQNjCpjOpzW0DpD9XAGc+f6MQWM2pKiN0O5JEf8GbTILY7oc+IRf9OyIo/rU7hTiYmrguRWmwcWhoHZEZZrxgfsSCyZliQDPJfO+Cz16ZIL17f86L+FNczOvh7R2+bdxhUG+FqT8jK3lVM5qV7/F9AApf36LLJ95T7+pMf+G9LO0Ke/J/Yj8/GUWrHMID+in0Q6mH4D8td/6dUS2/Q7Qgmc/j6Qct8/w+RXRAVPnzFmtz9m4pta3BPIdrQa/j1gO4TDOEZ/fAmpnthvXa8SNfKovbR0xziQ6s2whA5lOk8hsT6v47GDVL65gIDHci+ae4EdEu0JE1h9p+FSDlAkyOU5vzZ9TaIyM++7ZMlLmzVDIlB0KZ3IPvSYj/SES9DYL2MdE0/pa9XzE5F9DzwPWbXWww2GJQdnzg0Fcucv5E36i16mgDBWa5SWfysEnoDU/+NKF7iYOrQnO/RRwRl5/zhe5qb1a0KGzrEsga6L4zldfRH2GmNJeWcYtR/a/gOm3vQpZtP2LA8zv934pNf93qxeBnFSpWCBlGG00KBqGqn09xXGLUq6bZ3Hd49Wg1MPwPOU06HSoljsy0vHytFdhUGnQecZ5237WrltuyLI7le1EIqpvvrlqPudwEqkvbspe1X3RDN8T3SfZ6ePOVnL2qU87MsSC3GE3rgl6VJMjNRMr+wZFGpYVsbaUkjsnvW+5WDPc9loe995GZgOs+SO3nvBNNtYKV0Xbm9+G5Kmv3pX5J2hnj/c22Kf0/0SpTJvESB3ffaJl6SiEKPhmv5zKoTh0eIIXBDbsUXFFwJ0ciCJpdEa+zAysEpWah5lSEqRDG5P4f7wSCDfk7n8Wjgbvo2VeskiEvEmyMH79InyRQd4+edxe18/mG3zJjUPeB8T6xdz/79kfL5YI/jJ5JZjclauyrZlM35/NLq7asTllMRyNFap4DuznKGRFXyIRKzMmMuZ1uiQnueOa5SFyiRWZ5ZejGBCo6VQZnuruijPmXhYj10op1Ze/xYgs+/s9wZqREZWmWLIpc+yHmMnhdexxMO+LKWd4BAuLwnI6NUfTv0AwChOjVH17Q2gNXibla2m3P2KvO9SqCgHQCxLMNrLrEEaLMIEQ3pbnWYKlux8nOCR2GyuOwjfPqqJ5kMa5+zS5Wo/VZA45r52KH/Ljl6Tvh+Zz4WHFUPP1TtAzN370eOuSQ7vzxTOWdLdJPWqqhhmh9O2H/4K/P/EHdAK2Sz3GdLhLoU74cQRlbsPjj6j1dqKXWZD8XOmpocber0cEzwQ6fxuHHKBNr6V/gbkfkUaQfl7amc5i+l+QWXmisc2akp5jv5gJHTxsmkqgW/J+afy4eIF9mdtZZE3ISD+Rd2/jdm2Ih+nS19v6KJpPKdhi1BC4GRv7wj35S/orHo07qeyWwx44cVJF3hCjfCXVtww3Nz+X7HMvqFssul71mAX3Kf8EoKSozv4qWuJQgh3umgBUJu3vmmLhmQvrk/Tz5kg9x6XJrTWfCmXu9H1uCldVKTQls7VS4nFyaK+jBGE9EPcvfaNnxvTVckx2WINk9Meb/8tNvtyRXeccVrbT6yVo2tpJmvRXT+07YxHGIbmu/MCqBR+T47hP+eIb2htH5LXPHfinlkpHr5d7E+RoxBwy3z7fu5I8L4uxeeu9D+G6FjzT4lfxQcMRoqlHqhPVdLwnVv83k0JEMkx91XPcVXd65pN6YeLmIkydKewo8ytT5mllOwunxblFkrJJTLjk5w5/y9Y5TjTjzcU1HF+RZrDgopgrAFFj0qf0IqZc1tK0/hyyjRmMal8iNuPO+6z+/rcQmMgEO6sNBF13JIoij0uTzW7HYIm/Uto12I5RBCYnm/rtqOxZOqbTK/bIxDTlZaRZ5406NP/A9Xxw7lohdi+JOB7pw8NJajBoL7pA6OLOHgDDqVqJqeYXCH77n9/VCO8r6sHV5EfzuaTVfBj5k+JX7UeLvUA6QhaQdCZW9ifWoaehW5z2wHK/04Gnv/jnjK38BjD/DVauR+L1fdE/Xk04cNbfW4m/T3eGDbRalCSiEuYOm52YIUSocY3rwpLtmsiGRcRQJrQte9Ltkl77NG/Ik8rS3FkwAHPZdkuhW4jOoknxRhR40HVAYruUm1NFiu6ihDF9MvurHkYU3JOdBR4BSMKdPLm3/6kDLCP1cOOsYhITTqODFKce0BYImsGyS2nmRsHXUtyqLjdhgZYWgBTgtuzWw177qKcGjrGviQIRkuXHURP27hjO7PBXqtoQH/IzcesyXkfd7qBj5DTsU6Frho4bDJOV7y41at9JqHLuKzc+1u0N/ti6K774R+NvtbPWmsUpDvx4+/rgLzYW/G03Nbpr0K6HhiOymeBLu9t1059behi1g7Hd39FXyBaVVe8ybrrO0sOEio/4q3sQ11+gDllsrje0ViPr05+TaB9cwo1VIILYX4btEac+2jGcAvQqx8psCX35/5dfJp0XZPWMlgPGFBj5Uwx4+YOEF2TrMIMQCWQugHbUe+Vm4gPtrYPNbxDxsRnRkcL2dfLwOnhUvbbEbBx3V2lUCJVDaMf2pyiZEnEJmWOBK5RsEqJyjxPlLPKcBc34wcizWT8x72En0sdVMO+Vkzd7Ovn9bqSINDAxSC0wF1hHcBK9xym68m6wmZPEi9PHj4YsSbA5lXOvP0PeFvAdgR12qsijosZ0MpWPE1zoDRhY05K/hm1SFEI8W8yyg7s6DuYDz1Da7ns67BTe0bfTVRCuYg2k5K7TPBlX/cXWgGwJvqBPEAG11qtm17v1vxHN5dq3UQy1Dr4Wh+x0+BlCxxIay6MwNkdJ9+fJVrLA4mdFO73mVVjCkIXNE2s9wGINQJO6XHW2D+21wRRWvd3T3chys3xzlqKNiiTszXquydR9rtiNOccEoeEiKK4Bxuv6/0i3hxLT2GJe2wVZahIgnxqfMWnO4LgObpV1AkGboap5Vcg9VgFWpbsTbYhOeQo99iSYp+EFSkNwj9qeANv2rBx4lwstoiUrBPL8AphNbxgmXJq7mLt9Y+2gSZLM7EPhlDkhh0kYVUYh7xVu4dyQ13v23WLtW/BF2Q0xWMjKKUIgvO0np7vHu9Ypal5E/X/MN8pPj+77CYxYxdTOKAITukF2WZP2I6YV4NU06p2RTAWVKq6Eh9tDLLYU6pPVas51Y7uFR8LvfyFp4WjHbaY1kGC+4s9gjD7bWePdnoYNEew/OKFald6mz+nIH/k2Q6VnYzicG+nZde6mL5e+p0DC3Rh8pwwPq2vjRUR3btQiRfgF5g2zK1QOIaZ+nk4WfnNck8tXSP4JmoCgGBTtQTzqtV8weNPdqjUqhIsA+mqsgO3/mQ0s8sgHJOdbLsOssNO0e2dGyQxxYFuWlxCiwZsY5d1pTrS0ueqS5dLWDFPbmEmv/YssbznzE3Sf6fT9CaRYTjTz2ANcicPuW46luDkyKmNdF5JZ0gxWBY9nNMPjHKA+GGKV1TWKao1Futodp+FGy7lFyuHHzXzQBX9OkeNO2cMkbSOhSvgcHbi8eXPQj60COSYfnmilWrud2dn/i4RJtJqr6n8BSwrVX4MZzzl/hswjUtBApAQoyV+HATwnwsU/5wL8Or8HK+dIENxCL/bJGNndmVQQAqw4xh77hZxPUdy/S1X3HCwrS+8blxXp1+/mxC8OeLUBONzwkxHKCLZokhZWXZ8+BVypS53yFwpMt1ylDXlQBO4/HH/PeAdkB1ISZ2L3MZhYb98VASRGOSgFhBPBE3FBxebqTMPMoB5Tv1+EMXulFECx8py2bltnzO3bNCgCBTRilAl26lvhKU1d/p9nsZMWS4QOAM4XgzqGs/cErKIGy3qn+8xoOjtnJpmRRkuPc5lz4bVcjlM2A8YVJEXI6jycrRgVEHcDsczzv/5ABn2Zad8p5oWF8NM6KhMWqvauVy4CPipSwtUJYH+0ysATRtOO3OPGqVd3BuqB2fRLyg72339uvMHXK7pwJ4QKgMMy3DesDdN25lbS3fixNzevHKbxjKY62rZF9w69oo+Fcwv6uWNdYrmMDxkU+dm5dxHeZJI7U2tPIurXT+7r9T54fy4SpEXP2hcelvKYo95xQIB18GaBwNdR84pCCYaNPviuopRRCH9Im1+Jb25BexKqnDVXbK1r9sYMnlXlPE1XYY3hvNwopMveSpxsxB8ZMTq0oAHFcUoWJD/EVV8UCA86fieLUzxXJhe/y5PPenb7APLDdSTbshTQQWiCAOU94lwIB+6Es4FpsVLmOUyNQhCjkNnWYQAhxcA+APocQXwwSQEOEuNc51lwc1ag3i0mYgSVLZdAsNb2yCqMyPihm1jNYXxxWtC8+5RYmYPvyDlh3cQtQDvOSK8RBp12doh8j0W6xrTNmOLi6B3gYzg0ZEgHMg3mb6ugno94Z2P45kv0isx6fNLv28q6AYNuSN+8oviPOdmTT1sTLYIsZ2MxNjGHz8EyfMT08MwA+j95ra9P20U7fRoRIS0DMqqAvm0EBkOrI/kpXdJAnrncL/SfK5+QPQfUN6lgSZFvzi1B/Bg9D/xpzXVj2NGRpfBYHV/XXvCNBtqH3bQRO8wNEVV/MCebSVO1IOYUJ0ImapD7AH38srWgCu0QFdyJWUz6PAmPdoW9NxaDfZ6DRuipxSzo4qFn1Mf6dI8UfeOFElQCp6QlxFZr+P21+mXyIytffACiiLG2yNdmCw7O2nZ/xrTVkFDiJ6tHJMqYQ0NUJYAubN5KuMayul2nU2tDoLLKGeI5myohBXd3zhxVJEdkPxccO/xShBeqyrYFrf8Ii4NnJJznMjL6ZB9aQTfLTaMKOh9ullcTpKYi2THvqTLpvg+NkAt3vwGaErS/UIo4PKDErrCseLX39he73AtrFA60OOyIou3MkMy3V8n7mTf0CoV3dsGCA/lSEfR0OUMukwWTzquy1zXH+KynRT9pr49yqcllJsHwLirywQrRJMMDTtv6OFIztRgYmIhMelu5fc/7TNVVcx20VIqtccC8JKIVJGrgNWdrcOYkIss2z1QxaRnGNXb+6UkjvWr1KKrSHo2Szy6rGokp2V5I23qvj02fyZB8F2LHqizYaJ7Aq1zdV6Mbcfb4Xbh3+1syras2j9DmvcYJ5ycz5qDZ1ZQEEPdjaCWQxH/0GmExwxjgLX3ePn/X3n/abQTD+22aKK25LUGGfpWF2XIbVyBxBGjW9q98tCFZlU9+MqV8c0fwdIp774rrl8x21Aru6EOtYK+cOpZTCaqkZsqMfaL5iwHAVorSeYBudA7NQFi/o7Mamp2JreSnM7EdkA1svTaH+WEMwNWtLFP+hxJbdp5WAsxwiwBp/QrobKvB5M5S+T0VYPs9tvPbQCbuvlgmXQHBdx3zGDlB02uGwDoO6ZblH09DRq0EHCvsOw91IrmRSUkMlt2GGxhoV8R/ahfpfE4GJ57SLHnvGiVtDLJdiFWjPZZYLDtN9gZTVbE6Vrfpm6dGGL7Y154mn0TE+qs7GJs5galRl33m3+SUAZoODy5rhiybnmeezecqgvaHphIO34a62N3F5oqw/9ncuvvAhbb7bVkO+RK7Re67KrPktzBBeLuf229eHTyqujQOA0rcupUgpWfM4Jj2r+6CGNCu/lJC6Mqtat/amLq6VsVlYkZTsg3lbTlc36f2wjLor/Jlrb6gaq+xnrVxtdkyDCL1QM8QmE7GX6hG7eFXqlFBrUi3NFIo36VBI/jwGVIOsEvACCLrAW5wm6GmEC6um0dL90RQpkmoI6A0fQh9pB36UvEBVgO/CXv8tL4NQkZPEwyTOwyc9QVIHo4Bg7e/DiaCqYPgzc67UoK/EGjwVG9eEvGPxRotdMqgLt/dgVxY25w+rNzy/C8v9os+rYMDUHyzWzbKXOuPjC+1rGRH5hv6DRkceUEjxIUA7Zo3jdDLO/GkQcshM+nGxb6vHIkEyfJ4dyQczVZyNDdTNERxQ9/sA4smwGLAGeGsBPEwE8jznKb+Czy0W7DZjAh9TzL2u7s713uZPhEuClYxeFunEN51KxmzaaV8u9c0UZule1JAAAYG69J6koifp3gTvqT2dQcZSGTedAKM+TabM4rOcye5hL+cVIl+euLMDaSQGODpjvj/jWFiLBM0kC2HGy5B9apV70ox8bVl/oOyW3ncYfK9IMhkdfxh7H9l6iAy+Pl+xL66RideWXl/qWdWXP+e5qG1+/OVT4HrkwXTG57uJ+1jqjWRlnP2sF5iAhfsApMnD3dAevHQai8mCW0zoC6KpOqZRj347R6TFM4L93YR9uCrVSPUh1QOHMYKo79ta6lEctL5uQ3CxIUapx0CsxOtoDXVQqC4+XEYWJpiZVX37tAApRlPfGZb6b+y3ne7QexviQOTL8I/v1m5TJ5uKyNghKD7jLwX6uwxqNb0gfDSyxPLoi9LvbuRkMIaXhdUhdJMd4CbaMDlPxfrIy0zFJzChwfNJEoLek4mZ1M+4xRBhh8WIDu0gRgNeFT2Xr1kcuea+BpvUsBAswVukFx9yMC0bBrYaFlu2WRcWZ+ENPme3D4tftNFs3OWHw/HGji7pikY7bXLNITfIZS2w6viN42NnLwB12y2H5g6eLZfB/lddeYs0elhZJgc3vycnMZFKlFgO1H1PCFs5vmoXXqseC8bvtnzIPeTYbXeL8d3TKuX05t0fdLC2kWRbsir4mOnNHN9PrC7kSO3LLyG7/UrOb6jSGBmsgk9BczEBLpO4ZL9oFfhVEcVXkEi5gG6UVPNJ0c1GUucndPGNC3+Ck3Tb9Ui3Y0QipiFAdpCJc6bxX+XM8nw0LuYE14rOxRq7lgljdKTXRTWQuTiFLpGvPX02RJOVVPSVGip39aAPx9zel1X1SCDNl2jOs5MQbwGDKvp2oRRUm+CLIbiw1LgwDp4YmOdpWDSzXtRJL9uUGAJIVdHlw1qeVPee6VpT3YeM6IiC+tyPtmoTRsmRlM/jDNrH0jphFyBRWltv/w1ElgGCDsQ5Q+X+OOTNJOCXknHIpnnPax2m1YSxmJRMMVDVmIx6Dxmjfb6HMyFktjWoH81JcVnxmmQLjh+6WD31Bi+YOdxIHzRiFHUL0UqjWsgCSC9klHrxzAUrMqqm+uD4U3rR+qEReMVggi8JRUXdwr3XM69hJzi89Hc1NPxVaBzr910K5OUeOSuWTV3E6xA+5A1J9obfGXg2Axufi5ZJdLjgvEe/PZaauV6qi59X0eYvv3xnzf5zjpW614c69jTcdKx8b5RC7ZQAO3fBhjDvpsutNRsNsE8i71JD3c76s4dlXTA2csrfz0pU0k1rfn2BTEN8bdrGjWjH7wBINzZ0ujx5zyFUVTfuMWKapyfQm5e/LcHbfl1+7ITGs/74ohpC4I1mBIOK/1A+swHHzk7BtfCmIU4NGYY5jjqC/hYBlPSqCBPW4aCLU8UesB9EqhaL6i2k0iZszYfrEeTV27fmpdkIuneHl/qo/3sCJIOtTtHAT1pe3NE2bKw+XtFiD0lWavoLH8uqYo1+UdzDRhgEROUrfnsUkbxbmYOG+l7dWkcDQoqHInph6Zm0axcZMuajUAz24r2rhgSVnGSOtkuyQJr2v6IMrbhTlYSi3TL9+GCxrTPTBC3zUNhMksveKw+0OhskPCHhg9NOcEgjmvM/lk6TQBXaDuKsLWFWyqX47Rtb+IyM6HYunTPhPt12mizBcNahparGkyd7nb4ftmpSP4ZjTkGXCmvo5iMVUskh0eT95ScGYzms1kPmIOxZpyLFf1amGFApvhEL8kFTlvUx+0w6OpLvOIRC04A/KyV8Njy05sDMfLiPk/DB0QU5adePnT+M2uVhJif41c2mB2sFZFRsK3bnRjXDSuXrejvCPkncTQtC+o1go0nWC276Z2w3W3AKsoc/PzNzhqkDsZ4eMVJy/4TKtJu0CZFgDRIpNPBWj3iun26XVeAFoyYHNoOuNlLAT0RLE3hNRq6w197W8msNLhkb+YuJJD8gk+wWO3Ms0ybSgiP4beJaJnMUt4SSJ7d/zbMLyKdvChl4qq00gwdk3nDi+qGyVy09EcrlnS90/lUHmstA/fZWOt8I3xs5s2SvhxytDEvVo9o9qAPCNcQsoKn3uJqEN5Slqsd09DP70/MmQdiIOV2bqUQm+udAM1Or5alp6NwczRDa16QwMYQTRT1ZNQ79xOsezjn9N9VYKW0s6Ay1NxzjXAJ7y4bUTZT9H7Tj3O9je5tC/gHd52vpBrOCTRtg+QGzNwANivZ4aW117Zj/vfITBi5rZ8KH8Q1uqT3sQl96R17W7KBef7Sv9/zJQ77qruJljRviGKzrAzJdf7lh9VOWiPKZ7BcS0g2Rz0ZS4nFTP3wB6Yw0deiar+YaxuzXb+o+R+3myCpK8KIUcPq03hs7rSu3M5wx49viNuAKLzZqbHQlPlNa1PEu+S/13TQDzrmDsXZQ0Ko2CaEjnnaTMnnApDUhMBymsjkX8mFrndt16Y4sJjyZhlm/DxbuESnrT3QRNMRdHqoBoNXfbzM+VzPjmeydKvO7DwqVITucPsE0N5IbIH0WHeNgv1LNICibB7pLNwMRQ6IVNxcvsvrHRw0lMK1v5pUUfJ/Bap4Kp6MxWGPNjiUyKXZY2dyyvom4jbWNjEHWPMdA5QMXHyMiW+cVIdpZ0Mud+//lzmVgyndjl0GGMDIhGz34HKhB4uteZmrpSf4Zcb+8C0+HlRRARBgvhVQdY+NhNwqM7KOM1D5nVJxdX3xIzZqCV7ZZafsfOn1LC7YVg2NQiQviadSkLZPU3fH9lJ1VJ/djxeP+1OJhs5SDRA3hDVK8eJLJD7hOhmUykcaZk2ikCb5h68xDPIkXon78sobJYLt34gh3zA7z66rAIbIY1dt9Q1x17W+22fPmCNYe9i2IUnvnqcyaNwMhOlQ5+5rgxrfAdXyDue4xasmvBqdxqvP93YyO5WmLICkssGWVFm/9hKnqDLaaV5upsk3DDTWjpVyh0P8tSzZjXnmFTp5b6z77XRcW20lWXGF8LHdbGGLFIcXmdpU5YhDfWjKobKhoUHApD5yep1Krz4eByW1yhGVIeMb7RlhAplQTE49oINo8ie6n/lXibBlgOeJxn03mTuMYMCoZnfYig2NEoT2tuPHQ/p6/Lc1baVVlXrQ4oqM1Kh1rjlRZW/gsAusqmTgYz2tLEFFsg4aU8aWzBZYPm2GiaYaKujn0LG2aRDfiZRYJ6ONKi8j7cGA7hWF/AqVIjjYfhyiqYde9/WLNyzQ3KDjUZpQik1LNd6gGTSl2Gyoc4EMhSeUePzBg7Kd/jgckVY7OIR0DISoNB3Jj6UTc0NzTctnvLvBb4py2cD99imXkg5j2T9LLmabYD5fhhq4x+IG4dlZGUrvA/64UpkLldL/d76PJ8oEAeQ6jS2oJ0/QaeutbUDSNmVwSAExkRCgZqTz8ac6SF7FHGSYkrG5HH58iQXb8lR+SnT2G7hvZfhSdW4K2RE2VIzJw80fug3nxfiDPnxXjakfKpnbhaeENDNA44aX8ZLnvYpaRMFcM/lPULxI0odcTSboNjgNkbQO9ZtzCRDZauLng61oB8Y9lwkKVo5cbQR4I3s0sKF367bLdN4FwJmDglz3JD0CqIBHCC+oXe78lsXVw81Zr1wtq1LhJZoszYV5k3aM+bJxRzc0E1rdnPi7LqW/nZS8TQDkAGMuEAA4IRL8T/n5E+BoWp+giYzv74xAufNAuYFkLAsAAvAFnl1jazmyDR+JmG0hXByxyM1vN5+3skJLzfYCHWsuT/XDnV5aTsXU+WL3ZfG/kOzPcWKL6O5FzucK5Bazih8AaL2BMEPjlz8CNty4hSG6GZZY1M1UAswjT4mm3kYluJajGtuv4/bgp3wdALc06uu8pJrvo6VUzmS4vCj99enQbNukO8EqVZStdJKmCcOenOAqdCHtZMh0vfvupQnXk+AaUUMsekRnFmT61zbLOmxhMC8TVE46awREkxL5DMa/V5+qZGPNTigNpZGu3LD8vB54+GO7geunod66htu8V0qnexpT8/SAHkrdnqd63u6g8mOcdyix7tLfVDwSpluhzFO1vNzQrT9gg1eDrb6M6b0Ld8WyuHUm4dPvDdiU7TI4FnFzM7vDvtoQQUyvu/PbLgH0yCpwRXQdEnIlNg0otETInZMNEjrO5a9f+sR3DRnPrC8CKiuJW3DCF7kn3hLxPi5m5ATQmxpRVjhrV2C7UOmh+QdkydwDpHwa8fqgeaKMG3w516/eo+UvjIKT1qVAt/uuDfw/Y4vlt8cpz+3pgIqJtwvnYsdzhXL5ei1ePQZYHzZli9HtcYJSuMBxe++QmpmIdU5oJo9X7huwFTowHdlaZ0tSIWZp5so8ucN7VIpm5H8Zrjv7mRI6/t3/fkB1+XR2dIuvA5T0HbawjEYbOhF7oPad5SdfVW/6p38uFn+Cv2CjUlV3nhX+v1vdvX/h4ZvCY/4jV0rnCRhukka7fWwbDPvv07ln6TSeFrb7pX9xn+k08wBdoRJFVMCn3Boty36Qg5FHAEMnttiSw8HJfXaCmK8YRyG6fdPWLuWKKfdShDD4Olt5ZcZrpRZGOXJP8o3tfGnXS8obje++piMGJ76odfZfellzzrnWVN2cZTUFOfizCvGuVAnpi+lEPWw2C7WZOIsCkB8N1aFCw/OFXcZHTkqZN7erDv8lpV7QSaN8mnQZ6uhI7NecG/YJwBIavlxZU/DTfjquugaeDZVCiYgqa6+UWgzdNFOXP0DR+YExhPYn7jpBOqJm37g+HgCqxO3/sCF6gTenKCtXF8d9VieLqTKxi1nOGZVTzjakukTY2fmVstlt6S6MIjrf2uLy4eDQBragzFOb2IGdHJMqk9aSX2DtR1ykBxt942pJ/yltWNfTzVwSUt63Id0lBvC8iHLthzlXS49H/d9Rb8Yk4rT1L/OxJs7+i8rxRdrMBpIokGdjGLNfuH8sPV565El68yNUW8IsNaZjgckWFwci3S4X3g6tuiQCyJRcnokZtw/11vsrhYIyz3SC580EBMowp1LEpS/wV63R50qkJQc0cnsRyLEKZcp4DnoRJiyvMcszW9ljtjm1TnuCWtvS4GV0rB9N8j/CARBLCIVhEUjxqY7N+TbAyfU9WijeG35JmNEsVDem98r+m+RphZeQZH4/LtFpdNJPfNK7xnUHZWsH3ZtIo73YJoxRCykhw7vakes3gtm28V8xhTjQsyYjcQPR9BsBIuEUpkSxCz1KG5siH3eafIQQJWjPuVsDBLZa6yWVUNzXvKoMXW6Ui7ofiZjL1yl4QPF6EdrUOVYvW8KzrusCiNfRvCsOzMIBNatGCPhXD0j2duRLU0iiPK1YdFgg8iJgcbtXWUtLuyaFlGRXF4SjVD+kQLyY+ZHJM6FlV4wGnkB2aBSGLT9EMIknZqhAOLCcuvZQL9WYC9wHeiLRopIUlhvsSb9bg8zzXzVq60cj6cBsxzZxhzC04M090Wv2G2R3UJ5hLVlOO+KfNcoi8/jo7WxAsTjy+/Zsc8IF+NsWazQ2itx5QhKe77DcnGw4aoBk7LJtapHJ5FlRBGZ6viOJXPyeaX0yE9ihNwEjQSwQOBNEZTmP1TyiRaiM2NieSkFO6AKZWFLTokQg/0ZKHiAt+wjiBoC/J1YQ1iww7rp0vdk7OsH5GBgGRT6hpDfw+XT497cVfuMgthuiGWTvlrfKJb5n4qhC88QgcnovN9q1jVlxN7alqnl8RMFYFOQ044K8kX9lTeqMZZoX8N6iEeGd2mTlod/KI3zoCrtzli3f7xXyHVAsh2MLa1XQ9EElVv5t8+T1cRKUucaebPva4tpErCFfBalAYTbQRlEnu4vrNkGhcWgfbVXcBLk9rhtnsBzKWvLXjltc3jMfXK12ZG5CEBNwWB7ojTAcKZZ2sC5IuMOimQuWYEDYtU1TVO+qp/BRIDia2PvBKlp4cN8xkoQhCDIWT8AMaG8on9MvOJ658w59riUkyAdgzBswwgWxeOTUvHPshUQMLewP+R6bkfogOfokMnjCF2uGVzrFzJ0cLySKuhM1eyFxfzcuhL8MvT2+zn/H/+/nEMGuD+cPzym786afFA9u5J4X8aE5dwz5RpGMww6wldIR3JTHibQckDcUn9MKaqA0VXJfy3urJNX+BFWiFH9QDes1AVQehPcB05WOfaNZ/l4jige7yzT2V/aAqjF7bGHGH8EizDhNE4zFffcIhlyCvmnMXw79Bs4xtBsPrNevDwT5Ss3+S8RgV6t0Ec5C9oQdew1vhUGY5z2CsuuwMOFs+T3ixL+/a005gs+rmQQi8MgA14swF9o6JGJbAQRGga4l6GIBu7ChExfs5ivXmSdlUesnkq2VR86amRTJwF97J20QlDzsVFixJ9xY0JVZKHqCdlO4VCBYERG0voLqbnMmbdUAqo4dXYcWhMwoKeFyNjtmsP421RkxMoi+U3JzgfqvTp8Aw1OcB5gips5Uwixr+betsHlPA1kPQ8PfAAK4s6BHLz4/iuZiLuGfraNfqQxcjNDWb/EkqKmkFvJpjX5KLcyQKULIGqIk4uXQPnEGrIEJ5gPde7hZk3ysZFUzL/R8mNW4xEGGNyhn+9YWITCphQWUINacT9FgZlQVLmAynm1zJYsOklRw7AOFvdi+Vfnb3aVhxqEhvsB8BsuQHINFdXEAnrmpgiLtWq8gGbcCd1HXsOQp4TSJorQ82gixIhKlepGV/xSzHQK7k3HGEPybOrhWTkmBbQ4QyfBL4EWKrKljSftyt8B2oWuoLpYOgqCrfmjdTeoBlnpzPU/V23QC0JumGgoA4DgtrK4tnGvIU4q8ixHQO7ZSbFPTghsVbDrFOuHDf+O9M+3IJtQPFIaS6vSneUFUWKzi/I2aVrzGGxSbzVWYKXJefo3tQZmW5fhdHOvAWXuhb0UOEPmnwWzaS3z1KszWcuaLgmHtdlYiVRPRwSsDFQgkhvVQ4nI6vY+1TtlEnnylIeHKF1OsUZcK4jW77kdA3QqzsaAmGWrLmsBoyIrCbsTzH5r6QMLz6Twh3PPTqIuKxe8I+YBe78huGCYvxVN7Dg2JjOPLtpVKMNgYI03B9PRObPMkoWbOrurZ0i5CbZM9ChfqhXNQ6FXY8NOWH4pxeKK+iJkKb/2lR7o5/b40xV6c+TjQEi7yMObkivGJoprjEqpVMlARFRwZ3P8yasCCe4YYmOeOhidNYZJjfqgkBqpyn8EoXKbM2HJ32BLUYDwqi3DMhA845aGZOFYcjaDb0UkrRYoRgGYhZPjsCasJ2y1Z8Ga5CWPsXhqOIpNbhN9hoOGWMEzEh/xHm+UOxf7zsxkRppU49eNP0zkNkHylAFFMQorQrOiLD2lGHSIvZG6ZSLqakwJ1F9wkukI/0hk4wVVxDjMNpNMi5QByxeqm5+B4wICGnFQeX4kHUaLHkU2naBm/m7IL5qRihgUAUsMZIYlEshgWDIKpAeuBMJW6DiipcbAF1ECKwYzpfmEsJs53+IINIP5n+Tki/w7FHHVtQ1DRezTKeXIZnLoPQX1597JcSKh+dfcPUi8V0vm76hpcFyktoY9TbAlAMpLp+T4zhVmJ8fEC+eQo0835rUDLs6Qw1/XMJl04+QAZDwqocsUE1baL2/GWZoYavxTNsCIighuPVxp3jcJ0hP5Zc0DMl5ABozCU81Sli6XkXN11ZLXbugRRVdDpiDIuW9zjxWH6/zQ3Qg2LLWUlHkEfkfwOJZpmIGtrYHbBdviU7m61u7Th30DRy//9i0+/dhA1DVtR2zbKT+tC54+6QYeDttUlOt48yq0Ftb24DGwawjdl32jxbPiyT4/B44G9jpmA65JtLXQsa8OvO3UqU+w/adR6EgF2gNFGCfk7qPcQcRHTNS7rsBlb7m2nTn61n3j+jmK5eDJKtHrWs4xHYMDZzhY1NZTksaU+kWwEOq9JCdpVX+K/ddc6NZ/myesRTjlG//p+28eZzMQoOWdP1MQswEHq7uMgY0w0rsQNROIqnkwziA9bwvhoCeOCK15xLm1h+uR4GWNugxE/PSGQ4jW9spE/HALnpT5/FCT9/ckACHh7AbS9wl8XH2FASMDzxEp+4bw/mZQq6sFDGKCXR0/Fe8XHINQFJ6jCoOlAO3VWAGwktJjItO0QHgzVZx1bhPbUp//NeKhtmskcbbCMUiZohaBibWugrNh1j3mJ2Y8LZ3KtOLLsu0hnuKoJiXNetuU2gN0GgnMZiuUOYR5uti2Qb+7ITM3Fs+GvCsSLOxmGwdjBcBBc5YoqNG0pHjNOjxBdsCQx2U/15Qer1+jGu54bcGuivZFBgtKEO81MMYu4vmvdKmqLmdsuxrHY/cUOntiw+yaV+OCHeVzxGOchhKoWHY1bEaxA0Yz1v3a95Al+BXuzQcBE6R1Xf8IG0XH/Kc+ol0arpGsvCWGgx20E0bupKPIft7CYUC8+IulKBkgbI/lDw/0DKW7pHPOc3eqdgDIDNw35C99i5FhNmMtHzWYwbNZExlCPB10d3MSn5/ba4Irm1aMx/bdK+Sst9uDMpCNFsbF1Jg/h+RjpfyonmFiQ21TUkom+0VxCoHI/KICCHr/sOCepOROJWYOwYDrbYnZvt43rNTcMzt89CidXb7eHhnGl2kqx/8dqtczbwCFauW6NRWOS29cBwR/6n58KPwjmC39WdhFzySKvKeDbF6WfpS/F/hePQE5TKJRN2M7zdj6mvx0F08eFCM7d4ZNI4jNsBsVTniNIfwvB+bTq21DiOIkUQi9/wZwKNZnXl2JCKBW4h/VO53ghh4WB/3NQRmX+SaeFQ6DTlZPimEwFPHx7/vKh+JY9CdjKeOWp17ngC6Dw/STBKGaRfbjvZpQUo7QEpzo43h7AvziZpy36F8PYLOdvSjE8chpe9C1ACFGODhrei/mYphb3bE6G1X6GP2hJy1U4eLMC47OZlnsAGkL0hPoDLH4flceO4XWrafVN1mIJSY3qUJy/S2q+GxP/U3MpQQprn9ReAuABPQ/4oZs53GePOfOTZ4vdSdh8fajuVWBEkD5NtxrFejjy/RmrAFNoI61gv+RMZXMu1a1Efq8ejDSZ597RYm2+9XLKASAjpvNwop7i5saMuP7nzfMsSbaiBTMcJ1OaEcIuQEUQSJiUfSatyUbu6xIs5elEj5bGR20tEiMPU6GiIJTP2HS9MGYnBA6sZ26tbNnMLuKAtTNZg4kznoclt4naiePyRNWUZHNPAjxN6STzJOlzFkePChGo+77LcBHeU33vaWrpVMxefAKnzD9Iuey4xJ5XQY1fIbNUsiy+O2rdsVgDY9EbbF2zM+2hWgmqutBZoa+RLbwgDPPullGUgi6q5BMFsfqHTm9anEzUWhbZu8giODqVlnwseqRY+4dWMfDvmxL6XzrmRWyBvII1dED/behiyK8EIrFeJ7QtRz+2+6B9LdZsRyitHLtsdYNZkInXzYL8w8BKTH/Zk2UwITWBSTpitKrIZVMYmiOXqvxjcxC6V3+9akMUyuQsvr7Bss/60UiEvr67ZkUMUPsRdX8K8ztrcuDLAhdgByzWQPwDHNQ6U1PioER8pC2Pk6yNabSAPETIq7vVBJV4vgbZvfitCk88Fi6rqLudI+WYOZF9PNsNJIteQ4PdyeVUPe/UY9uG/alJVl0P9A1gyrRt+LNbDCEkNT8fXp0lHlYMXf0cJ03a3NiSjj8uX/xd9GVZbx3NDVbsoyT2gQufp2ZTbRl9VY8EYlVwxqX3/JjG2pWNYfnPjfgPFW3p37lS5Z/P6dJ9yBjH9/y3b4cBUidYZXd03ZC1M8r6f2G2cgy1N7oLPSS7H0+DrFh+rFAJnOl9kaPXgcLU3KOThc0uv6LfhGIDqcsA0tw3PBcRhQ85FlY3Zt91uEImgS4c3lVcvI/9B9Y5HNlUiuU0+i3hFdqpicZaBMRDjtcPIScNe2X3ZIyOTe4xV4D810wl+a7F4x4r0eAdUV+aCpNi1SIeHdjuwNKe7p9zbGJuT0qChVY01TsydZSMM4zz5Cd0ia/JkPImlIx4aHYwn1UJElr23P7khipbC92I3vuQ5KyeZTj2JTZ15GreJA9fDl4mD1zphyyonz435Fudj81sjiu/EDn5YWncZmfLMVatE84g4MwD3Yi2Da16yla8f5ouUPCIqMmbo3Xe2YR3vyz/RNPh1OTz/tAfKJ57KuEQYX/i83JpczSNfpjDv8nQIsxD5Q3oqnIQnpzogfoSMtjGhN0PhPtI+BH82sGRHbC6bnAkPKYPR/4se+9awFj/iquxZFY0SEKxxLvkbImtFwRcPM4I9+kr4jqIb95xgKrfw3S1OYFUZtaKHzQ1E88VGAbifcL+ldwr8NimFY9zsNkYxcQB2NrztgkqVhwvhS9NhCJ83cJBg3kRBJBwZwbgtnHzDandSSSltgbRrakdFQGwjxwCF9YZRGlCBo7z5zADDyqa7e4XNlRmLtP1V10gygEkr2+al8JKri4cpPFYjcbDXzCWG/VPx/ey6q6VDvbVyuOP7+9EJjwvOIYnc5CV3i+8tLxuiPew6P67Z7AgQBU4Fmc/8sSPwPkm0AYYeLM0IkQQrYIMXMFmB7bmC42ce22KY8vd/k95mHi2VWmXLSq09ZgVwlhMdj5p5mamNi0cYRCX12vg+OvyyErZ27xDWZI0pQjqS/pcXyvhTlwZabbMHIS2Hvtv3XQKc2x+risMuuYdotssqE/+H2Zx3LHqxEmOVs1siFhdeWV34ZwYww16uh4F2TS1YV3xKoa2Ed/OIWw1/njK0MBwTQWbSMt1Ncvl0K5yi7mZutRoXBLApemwl6u2q7L/1rQPzd9QCphPYjJb/wTn76qIlqQymRarPY64MoC2rsSrwHN4OGN/W9hDoBUZrYs0HWQBspyhn8tLuPbTr1KgEpcPMyBw0ss8Uyz+WMsOvGqN8Sq9XUH+Uv4r6b+LKO3LaqQ59bxAYRrTLdEHd0AKngbz3FM13iWozhcojPCsD0XBdVYNiUTuUbDWrTZoLfP6Oek70UxsJBc/iaax5HY4vK10GcT/Yn9ulW8EIdrIj5z099iZXBZvhO3yD2GMpsemJ3qjBDwkB2gNytHoz1p2gnYdOL2g+FH0e0kdohndbUw7HH9PH3tABIxxBfC7zXK+3S4Aj97OTUorKOzCJbRpUvdLpqfaRmohN/ZFTMwG1lifVnHC4EPJWFxsArVffTChiFLDX9jv24V3VzC4QpzHsyi3r6zMnoWTEsX8TYld2n7lc0mNu8QcXa8Erf/jaK+u7q4XWCtev/c9PzkrOnqRqrbvEWXjwArfberyvudIMuItpwcLKJt5AFXDdAiy/aZn1pLmNXbh17cpmXqWBKjbPXSFBhyzOXK+o/gAJtjdgTCQKNQnFmg+NLtlD98gmdOBgd9Qq0GTiZAOynh9OPod2/Gu8k29SoEyt6e4QfnKit9WiKnidG+eHH1waFGNu1SWropgmVSr81r6bQsiEj7iWkxAPEU7pHq6PUfUAX6APgvwK0pVNNbTIo75ItjbufrkuZbaHAFjZe/extRiLkBfihBHkWh0wZiLME1ojDkBixyCX4lCpfaAE0F3IuBBS0ErUA6MdBZC3VRAYZUE2/jBgUIAAIAe+tTXnHuERbzra1Z+F+8KlSDz6OgIl88Lfr+7i6x70CVqC4JFrmvLpcO6StBcg+6W8FHYwJM/Rh5lbH0Ob95GCoPFVHGTWfO3vidxtlMdK2LAPshGI4L5Y2zg6AXJdVxTza071XblZMTQl36mXTdAxrB7ln60IvFfgNnSc7azCadQ3WPHVj9apqsdswIARI9UoIYNA/uMO905sexlwVjThb8gxPxYTGL83LKA/O/Msy4OpgEJjRdMLfFxKYHcK52n3Pm6kWfDJB/B4b8iTGHBQrFNl/mReSj7kY8D+IlBGPibiPK8cemLaQDMK07rUJ5f7hO4XVQ9poj2Lw3nMZ0ChsCH+L8kmoN+pGUVP5Rri+1yfbC7eNDZ7pnjlO+CDvLOZM/DbQ2m2DGd5dEb+EC8NlkI64DtUF7GKHpKos2EOAwdr816th2CX9JJB+toO7DJ6eWR6oKbCzZEy2Ke4aobc7+iSFFot+wHXUhITu95OoI+VM7SjPWAg/GEpKzY2BNqHBt2L2cVKfPFPqiZTIMJ9LGf21aRhr8AQC37TGgVpAHRMlw1AIoz0W77FrSGozHiR2hApT5JG3mfnaNqwP+ad67UidVJ6S3DTIbJyv4o+wYfww92naMFF9CVOGEzjYInPoyDkcSksL8qpqHS0haYv4xKixl+Ay47d+QODoSyVcOq7L2zqF7C0wVsZ2baeMgkN6fxZ1XZ67vjKJYGJln/40vBrYn/HRqb8mPMlxtd0lrpejlOasYESobHofYfcufw8jjW+4gSzStBEdRFq6iIJca894w2pFich14Pg/y3vJ0cmYrrHyTHDuNZYjo6IeUYyMLSM7OMzudV9neAXgxO4SNWXUuzi/sZYqA9VXPOEkSlkMSqEhH1iHxy0LnUb3a7lL4HMK3HnXSNhVVJBSV8a3lJbsHoPdnn2cuO1+2hvRsNz0svDmxBCvIPInwdVjS82YBVt6L+D2NUq+b7fdufLp/DTRRo3mpS7CGKG88vPtc5OUmnNJRExtGgEXuosZc9LGq2ckdQrabxQqC/ullG9IjfT6HQ87IKiJ5LlWPiZrsY9bMrXQ2P3e0lW2mwv4Ti8DCmUUVP3wYsRk2cHRd4rK0SyNF0mIvhFcvC1oV8z7j8QTAe83JNfLcAXRaknPpAVV3Pxq1V0Mv9e9mQBMe01XnbUmydwlVqGSlGae0T9aAYOoPKR0fnXFlcJ4iO8vwDjBtMENE8UeeqLIUbbFIjy/LoHlc69kN3oqEKSVqVJx4xw/K1StPNO9xLTulCxX3CIkSHYX4x6IbNCAIaiui6qJx8CdVmagB2GD/784R7dl3zVCtPyCy/uQc0Tw5Ynjy+PfGGB09MKWHXp/X6SBbLSkcTkLacuTOW+srgCO9tm9+XqIpMVrQm+kghmEYxvGFXErUzux1PvignTXCIxViqEQRaYXX6MVT1n86DSla9aJ0t7v6GzjulLYMwyejw4+J60yws8FJW1Y7OXB1zmuZHgltv7BdbBjkOwnjeO+wAN8DFCajRFYzoXnCdGIvTtIGZqJvQs+57PuzNQ5hFG/fI7fB2obkYG7w7M+UoVXjXkwBQxGyb0VEdMuJCav6F6f5n+A8Hj3M8TjibNvwMq6u2h2c5ZfOO6vhp9zw3fDnO+qWRmcGmUMgTGb13xzy+mjK8p3FoLCgJ41uiAaN7SJzzshUeHA/1dQYebAvan4rok8cqyqJVfX7++h/sKrN/x76JZuh/A0ESjvxhA1onBJcILkmWQ9A7m3fAHkkTUxd5noIswGafj301NIp880YzLc9UkmAeWx2a1wgn3N4IxaaF4YiPbnX6xvttoTd8iKXMNe4Hu4Bs1MLa1xFZzLrSshm46V1Aqs+/wN3ODbLrmjRqYru6gxdZsZcOwobj2+TVHkDG5kZTFVPVvmROQPhER/3qeYC9YPLwTJZayEIl6m0umub9teKP7ERStvAVtXQC+IBSE8Mb0a+j0uyXRV6lWhDH+JGqb7PpUTijp4HUCdLReVTSHqG0vQWj7U1KoCuvw9arzDxsfLlu554gALy+aZ0Gpw/FzIDejFuA+gzrSEPeUhXLNS/14qieROupPkPbUub7qs3mEt6fW9ZO67omp9+yD0gEIkQgz9UyHnVjHqU3ql2tpB+thFEFBHq2FwLCe8Q680DZk08QSKfrBvENyLPLFP7pYTsFIneTB6oUwxpwGy+QnePGXUfxm4VZtJH30isZpC0q6NF/0yV6K39MgT9+1W9+bnAcDxnhMgfed86U9bLHe2lQruora1gPKO2w5N5P3/PEuCwzb3k1jzxaWFqsUbMgBCdLq1NE6+tj9l8bnPPeUicR924Wsu76618fKZJ2jr+H55vmjAAKiMmBgy3b/IxdSZV0FK8/eCcQreFkP2Dz+2WqkCLlyX9thB6GJJO11xMqZqrL45MCwZ3nQfyFjo++LcnszXrxmu1aH+Ovs9zpdC4sgskshXSUnkMOeeb7OWp0EgCi+9abhLomSHGoD54ogoj9kNUQ6YCrAlJSMG7cn2IH1WTcGsPJrTCzAhAaorUDqZbvyqw2AdENZxJIlCDE0bvQDbeTsA2Uw81cuw9l9CPGjKnhr3+vx6J85lCOV9FJeeAJkDjxWwVYnMKVUHWQGWaPfUpF5enedxC5VboScKlQf027a446gO1ti/5PTlJ+uHsGz8nGsufADS5mfcBvutS4FgF8PJ8p7Cb8EMG0r1SrpprOiLDPS1/KJpJ0XxGn5wTzLOrd28mjFIpb/Ftw8bWD/Q8n2EYhuHL7WnEC1YcPspxiTm/hXPq/TkO6Zg/k1WCyH8iLHANq/9vl6czcXzQloQDI7WHjAstH2EaTU8xzQ7KgkO5Xm1f+aucUp6rTv6GMmGJg/uofELkUzr0ent7+IyG9LMVWLiBhH6tSd0FdwjeX2DdzGaD3rCxoFoITBzQoWrrxh0gDP4+20oI7/MvHGAOwrZwwX4uoe1xzzoYKg0Zzg6bOO7Tu04f1DzszHSkVeI94YaL96Cj0LDWHfr1knGFf7DCXdUqe/NiwKio+QuPUx1eM+lMUiWYTlnnSWHjX+WE5ZSbTaYJQoPSBuTGl+uxhWbfVy9M5Pi+7LODa88UVKc4c5p5FIfbdx+HqsCHH5WVQk1NVINot5z1V0RdcaJDuDI/tR4AxEOpiGNgWol0u9ZcqJEnXx5U7NsYobpR7Z2vR9/fo4VcIC9JwpLAdbDXK1cyOIPvo0QWLujFxfT7P3NacEcUUIzgPt2OPQllloj4ACbSESPhIdUXXpkyM6vYWTHu2GOrVgxGS4ZNvYoj17vfHh1AnXNfa9jLzNfichKQZDpcaQcZyQVTyxFiVlVUweV104nNhIeYDR9GTk4+3YHZhQrdmenN0N5fOHzm6IQz47Fb/yIWIriUoBb5sN5xl+DnLjppXxEviYzS9EiqIeI9l4AhHvjGIhrCO56gew8BRvrj9kRlFLNI+6j0dI3tPtYNCp/uFLyKLyX7kXVgAudbTb0oW7H8K1yJjpRkKLHQAevABcL6k0gWZAMuOpbmjdIbHyxqD6q/KldrYHPSEPweR7qXvDp70jm8CoijK7ZbhXD4v8ZsjuoSurUZN4TydxQEldaM/QNjYkxQ9K9pm57YsjLH2CT3hF9mCunn3j4vio7lqsOBH6WVli7R0fvrAmHeHQboaSszBLHAoMmVE3a8ITmZ/994N5v5CYKhTDUVBxxJUcW94pWxDTlS1WF7+RfT+LkPaiysrjltdqwa99G62y+u+k1A7Z1v9bMFl6NGiIV8w0EQ6Xd3/zGo83J0y1Gze4hrKk+Zy+kuT/L6dcAfYF2zPZS8mLqWbiwiBlN97CW/+idgYF4T31K/tqq3UpUAeGINscRH7fqlvC7lf+oZuEsgOYYuI74Es58m/cfAY044DQFLrsNUlVUmWKEypZO8rCEpK1L06WAJBir3ogl9Y8Dcfh0l0WqbuH3gD06yBrK0dSSXZjMwId12PN+8vZb7fR8OT8sob5eAUy2yc2c7lsqKm/itqRxDeBUE8CRiQau7hoIMYsl2utasciSJDpJt4ayKlN09YIU4pCsQ7nz+/M8V8nCAP2lo9QjDsSPZRTkrMoaa8GpyJCCbd1Yl/FT26lbsRtbRLB43kPS95G4YhmHYMSU/rKMadbuI+3TVeEQ027j5yqTfOvsi3DKrkvw66E1Wm5PhAdPhm0kKFiY7EB72EpH2z0DrGhMTJ4G7OnxHB+i5kWC9WrDXF9Be7jNYEiWQ+UVKnpNVWJ1A649ZcE+DUGKFEyCrwcZJR1KKmTCozFnof9me5t151UUXxd6obxFvpW87OP0PDWI4+ZgGLOAoIwa+GLvZtE2qGPdRt8XS8bQYAg1Xu6coUONNtG35gbhMNBIVE7FgJtNpF9BkTAN5YcZLReuZLhroeL50JIdGcHh6+EWR2TGD5LHf0z+52vQuVMFQUVKzepGpTX1HGcxXShEEblhASLDrxdMaOmK9POKBRSEzR/ZlnyYkNTtoRGSA5dv+lkUBIEg8z57qs4gEKr7/FOXdSvN/LQafiFO6iykskDnY/aHn7sk1vzSU+VHlcsTG+j5u62schtRRkkOeA9I2VY/sRLYHioypqZKDpQmMeB75fWhe3zFPIe183sRgnP6TW5nKTrP0NTw2qvbnNKgb3/HUPVRwMnxjkAgeZDg1xpvA4rsE8YPSRJqABy4Tpg/pLOJnwMzMTOqnQslypUO/aig8jsDx7EZWsfD0DhQVD73lYh7ix2Mr/v1liWu4g4UvA8Kupab9Qs+W0hFYRP5FBAgcx6rQbO/PIAND68RtOGVgjCm3dojPb5FpSoaki4fRU4+sDLvzASJPayGK6i51hgPD9yma1c98MF/QctSjO4h0hCsKYYQN0TyTvQLpZbyU8iSJmWcJcWZ+6+go296PqH+jKkKrRWfgX3bKN7ZS1c0doOFNiaRF41EzVHHE5Rk8w9Sot0Ypm7VvNd4lbnmrPeJZHdf6qwCBKEWnmchkTCekm1z1fp54HSyY+vT1esZ76jbscnMSBVnLi2KdHU7Gk9RzpDRela0bve6QjBgCe//pdWqwzzlNOA34J9fU+m+B284XWlqyzFNoKqjacm/P5rZCanEmsiYsnB55IjAikdjE9aNa/sW2ptzSEEJVJFnAamUo/YuY6zr55cdp39Wy1XupgFotC0iuW3kgbrKE75Tbq44WCK/7ThQ5fmBf6zpnx99MyiKjseS4O/1/bnaVYKaTN448oHdEeoXOBJrkMrfqGycvKl4C9HcYsmWn2rWiiPcUrygSf6GZi1mGT49vDobz6qUNENZCyy7q4UoCAGu71VG5vfklYAkiCI/Q9CDE38UpBV+k9kpgJIeDdmRyi7NYQGEivgl3nBWHfzQ4usFf++wD/s4Y29jEOltRKnqObm4Mko9C0W9FlC45V5QLoJv4rQsTDuH+0ziOOlYZdsSnymdGpe9C7vGk53xwmt83T5/3uq7iHLjAehgv8TcvNEoSnt6CxJYYwzAMUz7FM16YlXhfyoUSwSKoIMXsRivgmhABPE9euDxk3vEqjurdgJnxKq+1hySNeg7PXu8idVcVpjuVc7+IK+eFk0rbo9j6f8Wi0uo4i7Z7BsvwiVb+TpseHCS23xaFn6ttlErX8thwB8SblhbzITJi4SOGlJszwf9w3zuNSfvnpRitkblsBUcsi2vqXMQKxQC+6z1+4NKK2dbIyO3hbubRAgzaN0l/flFztOs/7vB6klumiMIvjJqJ+RO3a4fDhPjcEZQYYx19HCQcCElCpOQ+dIbZ/3K2fa1ReunIyH8Nd6l4zSaN8jZ/euyCTnjOnaOfHEmtIRRiK2cXknYQXZ4vOzByXjhZAnUcRdKBo83S2yaDdO5BPZPgsFYdBvMmxlJTxz88bqqJuilky69NUiOLeT3taXuIm0pfjE9mwUTnHtROkUti10bBg9hqxwj4wa7xKT3SWGGKQhsyzFNunOZ8+rYaSoScfu/9BuqTUkt6KZdUiHSw2psmRYF34EuheUxiYu2h+28Wxch+cP18553A6PhoMpbVABXuCdE5BEDmSkQLlJ8ztUeV4p5rc5mswHLwbzxGiWeL5otgyce/GjDha3MF52QbwL2M8zlP047lcnpBk2PRf0V5wBV4i6t0hd6DpZWzOum8M3G6DBMdFOUGLX4ExCcSeocP+ejrsVcI1nxcdpMWwpB5x8veC637BgcFPpcquj9+rrbhj7IZjyGGLqzuYGGOmUcLUE1rtlmO9T+Xz9VAyTXcpaKQPO/yw+Om0D5dD7UYS03tyh46QCNqHCfsmFJHmvPpm0+HhINkIKGZCn13I5grEU116R0/fpX03e/kDbgVeg9mcyhkCJ9ZT2iyO6AYhhi64NPgF5wSmYLSdIvlbJOBhAbdZw53wnt3tj9L7vMJ790py8prgyL8/RDtjMLBmy/k7U4TUBVne2AflS5Gpkagt4jqgvW5wctVeD2nzHwKJ+5jyHrJ/eYLee8azX3NfoqbF+vmxhp6DBIVDBnUq5tT1cF3tbdInhraQ0r2p87htuAPl6eGNjODtFWHZfb0xyKVyDpsLOAR6C16d8lLUJHCvjcfIv2dBy1EjpcRwMd/QZKFjtBU2562B9tygA3qguY2JtMbny8SIB4ocnlpnpMsirkd6qKVwon7BD70VkiJZFGLyzhn0SNRBYKh26exzUDwIk6/7WaMhs19zJf65TceH/IDf1DanH5pC0lMREPj6kIQkM91vp/i5p1zFJ0vgz7nZNINSWkTtY92deGk6JK6Xf8cDAIjfddK8e07143WP/zMcGrWdJ0MwhZozK5mgI7FqtDjfJPmVHWkkAQbFkdNznTrreEexJEY+jyftYSLiL7HyVyAyTAMw7BDbgTCZ04ap32w/yDu8TouXYKuGI7b3A40Ox61giSLAhUa6dX7TSh7T5uzvuuhzevRVQ9I1XyI1eJN8UM7J4yij3iGU9nuAyHy7aTKtZ9laJLxJLJfcpaF2GBe1LRXEqUHs7ndo9d7vvm5Pl0pGocomEtPAQsCiFJwxq9E2HJe16tUiBHV53YcsMVlS1V9u179D1k1jy7GgBzRl4ZwuW+r4K7gniO3ocnpA0YDbkTXpXBrRj6HzHmPJ/PtiUIJQlFpyZL6WYjuS0vnaOjHRoFVZxQa0rmfW6aMvPBOPJM/yS+eeXXRis4DdVwUVoAmDiL74uk4+7onHZnYZtss7j/xmsy48AzU2dJnIBtZICYL2zsE6WhJTygWaJkzZ2m8yHsSSQuPNm6VLWBI9I+/wTCjCP+ikt9r16F1G1AbccFwsBDsISadadOZOzZEjJ5VEhi1sbnygdW7R9e7PqBqB8PvXlVJ6YgejI6j3apUxLdqwr9BL3kOVpgLrUBSntbwvqL/FF1p/D3D6J8MljKSu29G0q1gZxC1oXgbBUbcqVrSffKgQ66U13yIxOXq8QXNsNGsL1Y7WQ/Jik0hmnEUWNUJogodKjtDXjKOp/WhHpD/FwydeaDjiM5sU1/UiwP5D94k/exgCKki9RtXYyeWZt5bNjgVeeRvUGndnPoD2eCtrqzdyjUTDByDsx+XEgN06UM5lDP4ifigWRqK1dtmJgz25ngG90Tv85Qt6iRcbJ6l3HfoxG4BcxYRJWGeUASSJk1tdsEnXwJdEk1/irjB6b+YYc54rb7HOfMYI5sIPjGMtyjGG2DXlaycd4a2i9a+KB7+TYv1/WxVQJ9TBGeYfFsTKivIMvNylWHBRn67lqHzCaGsstttKSFg63bLlZ4YgsWgyBJsQIhu79fmqDTaRwFBvhXaYCiem35TvXD58GYEBpZEDZT5//O7Tdgw2WjjfqvTF93INz8DsGEOVn9PoeoMzL7xK3erZDTFW6KmUlgSFES3Q8er1PxpH+cq+oF77J96izcg/uuxgZmV0GdAJAwb0nuGPmfs8yke6SQDr8CwJPXtwf5CaFPOwjeEmEJA4sx4sDlmWNU740u63iQC9rpAooBudTzEPGdLOJ7/GDJMDgrUG51ll6yzVYV24lWiLcI8UY8pCX9ImBxPAXOI2bUGNO6nJ5P3MjhZg5RsVd/24SIxt0evMkQ4HBDMbbUKQnCGyhKDooruJvj0qOHZXFWefQvduKpCnu6IpnX195F/Q9CcuRQ8jU56il9UL+p/ezvIDNnP1C0GaOPSV8+8o+rj+r0x5lypZME3XaJ7kUYX/MZ4Rlu4z/k16vEtcjHTdWSCN4OcZlPPP3w+XTQMwzAM+0wLymB+kDeqdI+DzGV9wR43RzyeWeuK6L+ZyLemezGga2GUOWJxxIvxjTlDBkSOgqimz63YyTVn4f5QoW7mI1e+6r5AV75YlbDQKn2UvrP7maRHstEgJ0UTTLsKTB2NT+M9KOTCtLbs76tCaItLINrYo7wZ1s9LXF2uaQmwhPGTrZsF+aWaZTU3dvm0QPYP0C6ObhsMEfQQF0gBErdlYuIvnf9x9vwJJGkDa4QV2PJcCOfGByH3ZrwCi3rujqfMuCXArALUC3bJGVFDnwywoWzMXH38NHlKq9pGqM0dpHEXgbbUCkqspPGYVnjwK9vOcaA5r9+xMnUUumzwMy0oU4T9TKNGFWX4h/JWWuLGKMup638nJILiV5ZR7saEisot6JGpXTuQIs6/nXQi3sjeUAlKNaCLsBgr+R47nevPdUgw4Crlbdl7ld+bQ0QX3E7vVgJvnvGix0zzb/Fht6OUkiBQaCPCviFpQxSim2Z5DEvucFfmpDQWkQLs2gd9/H2sKmZC7MFG7Q+bW8ajjU425beP+kFvduKqOZnI6B5eNgmFRGm06Agk4irK8ASyaQwuw8Pt7wzzpA2W3rNwQEWtE/oGl8IlfPN4dNKJGoA904sKse2nU7N+F+Q4AId7Z1Vtroh2HUX52Y7d0JJiSeACFHMzycD47YZrvXv0iflB3lg8WuR1dxTghaHWiFQJdcD/DJ7jjuftbFwuwTvxrQ4LRl5OwwNfN4/5mdhuS3Bgh1vz2Zn2vv2ZRkxjcdeQf9k8BZW6DK7lMd90yG4zIbXMAdAtIYFT9Qo6Fms4TD386tk616Dg0/LQRAVpLNSO6qQ+/H1XT2NICNypDVJoWolwg+gLGtI71Tlkbl8Gjs4yfJvAP2N3SXuyh/Kljpflzpt9tEX5DVtgcp7BeSyyk2yOAGW8ZdD2VEi7p7Jr+YYkIBheMXK1hHQr8L4t4xVqHB4/P/o/+ZQWtxyMS6ix7mfA8i2gOFO9WlG5yr3y+wuOXBqIlAe2/ZhG9jcarqfSPQ6ck9cvOnQnp6/2qrFTtPZEMSJusOFBR9xagCm8OJO/DKg4sBdAYbFWNNcrvqQdnH9eWj6BP/0S6a37D8WI2fnB0wtnzWKYiYWE/WPn2i1cSSonR9OXygoT1xlJfyZWliodFzEE2LDEgy9ygZySMFBv0IbSlGBFLPGbBMeKuVW6s2hNc63Vlja+tRHuBWTkXsnfrbmqvkfAIWzf+XbRTCVCsvb2rhMuHMbZeP40u9jN+moC4YBWX9vItuxEPOexUNAcxLbzfA7cfO8V9yfT95eHcTzAa5GiyiPa0yFheNFFl+lL6IkAFoCJdKVSYeR/1e0eLVscf8NrhexEYloQwzAMc+nvnGaL+imHd2bg1SNaHP51RfHKmMFgMZcFdhURpFk0zQmAlpNok5oF2z6iBu8ARk17glZ8Xf5mkrxsFLBjPAPdaNg7IahU4Gw/VpQ0+Rjt/BLVWcaK4lColX9ZuMf0o7tCIvrAcIKXLJlcJR3gohLq30Pa83bcwcmr/GXMt/9Y0h9tzvXnfOaazJjMHfDtOgJvzSthSlkKjaeVnCaZDJUQgem+3UN0Vv7GYgP7ICipF8l171howteteyP9o4Fd66lV/YpLZ3B7N4+lXUPjTR81zKl26Gglndc/I/FRDQmEqZDFPuNJ8nrFVhMcAQZFygxCU7M81OPa4lk9Or1uYnvWYsPNK6cc0mUyCr0u8iPb8W2Nfc+UjDk5nyhutci8h7dPfILeeomjIZYUBRX63EYj0Fgs+X2U9aClklGHyRPqf0S9nDi+rJUTtgivkOM9DJo2OFj4FMh4hPRFzu/D7OeJ6HDdcFigJDOfsmByfrALntIlqNEqNqTmJYMOqd4F3+Cbk67CbWPNOsD9eQpuEzI/xv5C5Wd9vd6yfd2EhwKvpO+dGqpHnALPXDDqSwkd+QXPjZ433vBs71ZlmP1AM5sW/4Iza05NXCWLXVxuaVJngYXc5Y8+6Nj5MnHR1WHtL/b1LTYe59gdZXdVqVRDrapjWAmSjpnVbcDf811wevZniJdi5cIscNjgIZVhZ33igSylxBXNR1Tl0y8Ep1lIBausC+QSh4tpbY3Na22VzSVGbSDkxCc5y+kBsU4I7VjSwNaf9LilqnnATQe4ZnQqQmFbJaRZopE4pqh1Ksc99AU342nYBd0Q+0grm24xOo5Y4X8LXoVIPa71qIDy50dHytZxXE/8nJySFdMEQlCK2o8qcVYDmjGshJQcpeSfgv7yZkhm1H96BERSlq2YwJLIdOcU+5TdeUoYIjqNGrzw56/b+HczeKKXJDigjMWeJ5izqW0fsPFNKgQZs8ZJjxjpVEYswbjs9xMk8M22OsHVQHn6LampDGYQvgWBGx8v4leY9N+SmtCvoC7wAAjyAng0HgSSL/eur+5yRuB7dJM2/l6D7maSIdWMlWyikTkFNcES0HIFguCZN/nBpd+4o44ePqXkgt6fEceCZ1pCVBIDoh+Y2w3Tzvzg5OYX33h8j6kiEsE/IkDzGtXoG/pEkiuKpJQOkAS+1FHEVvfV+tMp6Pjt9XxpWcuZelC+Rp5pKpfpjWXSy91GIF+uvskTK1DnChMnyu8a/mxiwcSkZKXfCi7MIKbzaG4MwmFYEUSElLbZbJ/r+3TvjXZfAJGjyjkeS+kShq9RzwcjKZHCJQ+2Zw89mY/DSZQ38sDiPGS5cWhDXTK/VU0ZnqR+xTr5yzAMofbHlHrppE7GlHBJp5jN+H1xqgbK5HDppk7HZHMZoRbOOHoCpegJsz7coWZNO3iSr6RKO3BCraxOe3QRpXo0BKLyAidm8Aq3zDJnuCc3PuBMofyDpyQ4YSIpk+AblsYj3qiVK/zIHG7wE9ZZIATUxBOUjUpF6AjIjDAQsiRCwa3JmhIalS1lYofsKFt2WVrKnpXJIzazVnnGTmmRIy7SZulxDQ8m7zhjo/KJG9lCX7gJj1kyaaAz+SFVnlQuqDteoEvqgZcsU+qCg8Fx2jHh3wd15BJv1A2X2X9Sj/zF/6eecI0PpIZv9W+ULTf4C9aRs+wvWU/5Zb4jjwzZvZJ31lt9pC6YZn/FOlCo+6QY+M5ovMp8q5syD3xmd80sPDi8DnRRpsImh9C4CttnAOVq/HmCV0DSrxxujRX4mDekOW/J5Y1Qly3xM/zfwHsKOUyN+0XJwSi3pZja96czqGdoFXTp8AkX5eaUhsNbmS0N1n2r3y2N1gl1AzGY39ndMsUPee25bjhRv/HH/KeuCk6T7mSre777l3Y7P+GalwcXLd7C680jMf4F1Xb+GxleDt/um5zXAQAAotvcVpSyEOtow1iKiW5zCpSyQCPaNBBwmwJqLgcjTYyytfeK019NfAoBO4mQjRBlOwGbA4boXtsjicIyeN+gDYHf+Hd5JX4GtaORnlqOF7M0gdJuI5/Yy6ivomo8bvg3VrydZNwnX4velhMUUxFDn3wD41vR9WAVP4D/mitcv/Rg3X8AqrmBsB2Aaz4B33MD19sebesd/LsQCI6sQbSpxNpKcldL/s+9Lms/m30Oc2fDp5DHxedHTp5PDy2W/8VW3iY3/pPlqX0jAE9TTXJMt/9TqlubXblp7spjG96ruy9P9GMoFsLvvH+oNr839tVx+L0wPlYn/Iuqw4FfWsVTvblBTwfOMtp5Oi6MeolO74+f0CCz9eYd0bOK4c9Mt+HkugigjwA6Q3CtETgMw7kb9ar/MWz46emyKyDxDRAUaguAKSAkA+oTnzn8zDGfKXvSQktkqSZcI8O4BMYC4i0Zs3G48QEiVYbxyzd8qVnSeeRzUwfrcBftQpznzZMXU5Lbai3j21U9jy8OydyNy33aWMXeSTmvtkiu3B1trtJI8eZdNc+aJXfu+dyFvXWsvF6YzCvMk3/+kdyztWWc+VbPf6EyBNKogmOdCjYNKthUquDUk+rNCqr30UX1b+DMkgcPfO7Si3WUjheaeZl58uoPye0sLeOXT/X8x4DCcr8KX9sqPO1N8QZzi+TG5Cnpf8ot2jNkMmZJnMot9LQ5ZCzxeSWf+3FVJz+erGOBL465hXBhnHfj4q+LefLXxmqeI7lHJ2Xy6MEyrtUWuWsv6nl3Rxe148UuqTXSvIzLvXtXJe/+WMU9a5a7t1TOu+fjt0+L5Le99TxzTHNrrxemydqvFP8V5rn/tqp5/0gcvJklB2vLeXM+d+5bnZybWH9B8il/HUgWC0QZo91hSZSrorPikwm6oDF4JkmjUv9i6liW5mVpfx7557ft19eueZa8JkEZWXdYEs1V0brjkwm5oNF7IEljqY70ueWRjVeE1zQfFmq7fMHFrR5qZoE7ZqHIMkvKd//DZzoxGKuQvksvTT1gWje9jZZXwIx1ffXd5jOmbGDzrS73jfeCFb9kSai4gkXMPFwYP03DJuLoZmJD6bImcsF5C3NCVVCes9fw6VyW4HLzWNut+lb3tq+9d95w96k9kfA9YZmZN/8Gf+kEka/VAP8eJHvpjqN8X9iXiW/zBRvZ770qHMSHf+ll8iYV+bc6wxdFfd9wwjgxUSUMuKWpbpZgw+3Y2R1bxfsmFueYY0cg6Hh316KAwgkcmhP+fRiqfPVQ/LJoQBGlgg6GGQxwpoIpQblFOlzmACfmmV/MiGa5pUp02XnmiZz9HxAFACCAInMWjiibvBGcyBYsObmslI/6vLJTDWxVQsG3gR+mx49tow39HaDHKyck0KoTUgCtBA0OTSKE6ndCkUn86qzF++iFeQWn5BNckbGSwuxPU4cYTnlABpyxhUZS6KCCWgUCcOKrWwC7BcZ/W4njo54lQfXZ6/iYWBWELTHW/9JaJHGt0s1GpgNi0XoVYLNFHZ8Du75n765qxP6h5+/P5VuY9mvVKx76T7nIEJRW2x3d61Lz8EXduvpFkQjx2UO8Y4BK6jThMqTeWfTB9IbQ29NQTLd7hsfqPebPugkGxEH/vyq+x98s2xizOYynpIM1KZ5DffSGELSExLazuMfp0xh6v6MrBvVVJ6emZ+lfV3QI1G8hfwEZ90fPlr463KJJr2uCWvU46umSWLbZCPsnDafORsxmEcdfcbmnLPXtamX0Qf43fXREf2e1n+kku3AmC/Z+jg2qKazU860oEjZ1BSG2i+XDWS4mMMfnR8Macxo+F/w7ngls34SQxG05x/4YnL69y2wO9cacLwi+7lwByaQq66ioB8gSFb96tGwMzpojuq+f8cfChoQe5R+teiKHL5XIuX/7bRBNIz+s+FKX8SNxqTNSg57RMlbJA4ahCtn/hG37IOGP7c2ERQwpDXqL1uNBfkaMCeoGecK8dhvUJ4gzOGdUILHDiGhTVsmK0aAOeHKrK+a9e1HvEK+wRVNYvCKVQu/RPiGscAqoO8izKceIeoFIhnNr0rrZkTpDn6JdcC+nDmNEXUIeDT2hvkHCDtvExMKOlBF9a2rqj2zJd8L4Rl0Z0ql57RaoV0NcxLlH6UgsDId2ySq5w9ijPhryoBx496gvRvwAW2OKS9iRaoD+ifYF4Q84zVH3hhzU7FiingyRlpWOKdUpI3UL/QLtB3eSpxhvqGbIPqNXqGEkvMI2CotTpJygP6O943G6uIJxBnVryFNWvbtQn424Cc5T1AdD4k8YK7RzxOQDY4OaV55cvGLu3Y06KvEBmzOxOEOqgH5EG4ww4ySoVZHnaHasUM+KSA/nrSnVqx2pe+iXaEVnyClgfKAuFHmM6DPUSUn4HbZvYRFI2aDvTJQelnyPGL9Q14p0g1q7JepNEdfg/ImaFImPGCXaVadLNown1KLIw8DG+y3qqxJfYNtLXMqMVAX6F9o/I3yH0xL1oMhhUI4e9bgjkjjoH29KddyROkH/QTuZIXnE+IOqHdm36B7VMwlXsL0Ji2SkHKE/or2afSquYFyjbnbkqTX3bqE+ZeJGOF+gkpH4D4wF2k2nS24w7lGHLALz3v2o90x8B9vKFBafkaqD/o721whHONWou4w8T8yOM9RLRmSK87No3WaknqKfQ/vdmXIaMf6jLjPyOEFfo75lEn7DdqZiASlBV5PGYzblNMXIqCtIF8yOc9QrxIHzEQWJMECbrKySW4wW9RHyEMx711BfIN5g25jCElakMugD2qiEDqeIuoccgtkxoJ4gohz0zx9J9TwjtUIv0L7VneQCo0c1yL5HD6gBCStsH8LiIGWG3qG9qcfp1xWMKeoW8tSr3p2ozxCX4XyJ+gCJO4yEdqZWyQlji5o7h5sn5r17UEcjPmIrTWFxGaki+gvahxIKJ4daDXluzI416tkQGeC8M2mtGakH6Fdov1bu5ZQwPlEXhjw26HPUyUj4A7ZfJhZRpGyh35kVHuQnYVygrg3pCvParVFvhrgWzl+oyZD4CqNCu15ZJfcYz6jFkIfCgfc/qK9G/ATbk8Slykg1Qf+H9l8JP+G0Qj0Ycul9yFgHWMNremxxlm7KwCxCRsovQ166Kf+w0lBD/lJTqm7K87LCDJSYutTq/CdJGdFypoLyKsi3bsqFmtMyWfkq91TW/OXLgZfn3apO6Ka88qVTjeWHMWfJkjlfDvyqTpf7bso77zmlZCifwrx1U274spKEueFt87iR8U9WRvQ9os1jNvyksrHVETTkMH2lWlBoTUqIWHEgZY6RRqDP0aEjHdDYHg01sTUCKSBIDOryaHJH5YDG95gQR/L4Rcp5rK89MMhxgJEqciTCp9lcMVB5Ve1fQG4E89+pUzCkHuKD8La+QaOnJk8tNsnT7WsxfoBz70l7LRlsMXLL+GNNi+EEHn4NxHBreh3Z8iV5IDDV7AGszQpABfQlAEjLLSSnHlyJjbd5oeRMPbYzcKyNH5D/gfRzr2S8DpAi/WAcqxduQDmHuwCixS5+3aZfDARTCdqxrW3s6PLQtOLfKLUrgR5F8D5n92bMLwOSjp0UTqRRD1sAkDFGfPKXxkrk7lsyXntI/ju49rE6OjEv9yEcf9w16hR/oSsPv62BOuKv5tfu28/DwypFo0EXl8cmf+cxfWes3zlI/4Zr+jdg/Rc8vf7eoau/F8ifhldnbfUGlSU9xoHsdQ/JoyNc0eFigYgLXf4f+fV23DbRKPNpKW0U/G0w7zi8FOWmewz6vIm+RbG5fax/d4dt33SIeF4H1kD1QU73ug7zuoi4f0/L+5/ji5ht+I92RZQP6+x4OudkGjcds8/y9XtJt49Ylk16NqIxFvIi23TOH7cv0T2GbOXzyBY5jc6AkCUSNoKKCYMH85zXFM++x5xC8BFeDtaKxTNjIy7YtcvvLpzlVEh0WUwOgwp0LL4yayLH4dMiJBAW6E88p6mw3t0pOoRvTqGcvkVvozezvrn87TuSRWIoosK2feagcdUBci9Rn8Wrl+OzDKhciGukY4np9U2cxi26Fl9fO37GDmscWsadjPo0izrK8+jn2B64QhL2s5NXe3SOyoffPqk/W9RcHh1roo70wh5naJGVGKy2fOknrct0Pe46n2LHoNE7NStZ9i2nsOZnOs5Fh3phhO4iynLlUqHfWIO8PqqhzCN0wLMiLISdXEIfmB3dTjpwbA430MHerRklJdAxFTGM+Jrt5KYOkrKUGNGMbyAGG9IZ19L7F2ogQi5gOuO60zKr0ZvqVmvCJZ4+WIuEIGwY+nGfNMWgfxU61J3RRx+skVAJakl5MJuxRGLIe6/qzX9uhzmC9NtrMWT6b0kzaGmTDXuqGUr/w+epWFCLXpAKWsH4RrOmvfzT18jaq4SPcLRew6uo1wM9fEh9suu8WsSbUdGXx21akIvIyrnz8SwFH+hIGs1xURGIo+rN54xZdr1LhlqWbumHAGuscbttFikV61FKgrDaEMLhAw0096CqjQTKAfBsrnQylmRBtayBq/mvM+XbPKjXvcv0NAnL0qF+J9pdpUWlNUbCjE5cqTUUliSYv2yRlP0UUGYaTge08ZwR1wR1kbGLa0DdiXfPkiEZt2lR24uS3rRHrizzQ7ec2kSjifh3U57D2tihY0hIudA7O8uMsvbDxFA8Vck2NaT7zq3odlNOl4/I1JOyskYIy4DM8/RuAsHhqnhNTEEYm9rDwFnuTttHW0TbVsY0lZIs0H8CSDvtat/0ES5wJEVU07oQ0k2oVd+WPpcNCEpYuZxa4tD1BnLQR8paqrYHYVHGazvrChhXIGmPvwSVjg5dMkDmfAVGltboqqxK1Js0TBH5wEXCXnra6Lv1Az6fi5YFxcYIGKQNJ2hy0EHZzy4sUXtZokmP/7bHRmHvFs6PKwSf73R8l1KzmUhsxqYMVZiSHsGydg1xOt/u3WgKSNJ2zuLdf3y72QTV+qXtUq3ZWKbevlU6Pi5G+yumh9bJ63ouTsXAbITa6HB2UPqCfM73B4CncI9c5Fqx6U/rrTf4Lv5BXUfIR4Vh+0JKqJ5hSJZAosoOe/qpS2scXCpv3yIo4+drvh11ILVjtjLUpZyQAHxWWoGkCWVCUxZtogNEDHmgTxcjSc0ANXNA8qr/VoNAfKaMBxvWEmh+/ZK38xkDY1FyqKdqUk3fvohNvdXfvePXkunGBc3sBZqmzT4uWSGubWhf37bHwhLpFESsvCzFtBFwaiKkFOjcYAxLFUh3OZbH8IYg1hUSxU5GRh5S44xQvkafw0FL/GEhYp6iJC/4Zfbpm+nwYaNf+6sPZYdptCJ0n+tF3+D4gH8ldwX8QNP6IWL4HUe23yQNVSQHD7tqZ3Ubxw5s/yTumCOD1S5b7pQng3ew1OK9HNVoT6tNOuT1ry7w/wpllJgD1o1bZKxSD0BeFgACpBh+u/af4E170qKY/Nj3PkKOnMWxGo4ts+L5GLpbgh6L1diVIeKwBlKrdNk1h415gGRtdjwYlKSzr5n5UPk+bPbLNiCa5oCkVR11lmoiyw+kxo2J6DKPOlpwrAgdO1m3lSbQRJLDe0ct2KJ17TCVsGz0Ygi0tNthrDrNU9boNP4Yi6OCggeqWxn4rpviUXCAQvRuzhIQdkci0EhxdxfAPJrw5uDaxNZOjL9H4oZTlWJGNAMWYRANMNhT8BYqVxWformrdOTs1AnTbAYpTKyGVhQ4ztx2YwTHGYBSsUZCE9ZAZS36iMNMSwZahpg9ixkxhni9yZXlvUmPn2573UilzO8Utlt56fiulbUNUQwofFxLFMiVNQ5rFIlU67UvbD1tiIiJ1QgbTWXIAdxnJBR5BP7odbTV3OO4+YlsDFrytnpERg7ilxbX3Yg44ZIg5kiWOGx/l2ysTCxCwngOTXYTWPHFF5jrKPProH6nMSWceGCK/saNkWXZHGtORPos/nzCYuXlju+PYdosYLSHmZUEIJ0q8guV0UY9pc2p6i47AxZ61ZmmKI+BSREhlLsrMJcCb30LiARaPp5X24hXg4Bdp6iMMOwNGJB0kfEKvwoWhoDDY5EGSLcGaQt9ZFBjwiZqtWGJefIYYGAMOFu87JEEAQr+Yl10NbQoj1gSElcGX8M1CcgJVSxZC99WauP779Hna/1bE2A6hvjfg2a+UAjAOkPXrHyjiluLF7zDQ6dMYjX44aC4FBIsl0uerCJr3WUkw7GAespxQEl0+pFps/HMyRXA/OfHTv914to2Z0Fl+rdpUlxJ71SlSgHGaYobRjcHMIzuKrIORIGIfOWK+FcMappvpPaMfKVQDSYd57GA8VHEhr7F5M/uCWKMDsGGBi1qW5LOUKjMvJHpkinY6fSeXnFT7cBkW6QboFs4L05BuWHHkGx5dDDK8SZIybYAxM/diGxD9hD5bRSZwoi9y3hlIBq9I538M3XChBysNmkfYlT28kA7dNET/qEA4rBY2E1hT75dPNrdAN/JIt9aTAc91dSC5aPnRpxSPNp17BZ2W/ATSsnXTL1HQIlqq4OCE5RaVf7j6X9/vtXN3+G/fwZYDXCRJ+ZTdWsiButW24fE09HJLOi19m3FBVurN1vf/cff4BJ+jsGuPWO4Sk1uPlcjp1ia5aY4wgoQxe1EwTE6T6+ELQCTi5ZsWarj57jxAkmzoa+27bDSdyGbCTiXsK4Go7tZvERz9e2Vh3NxaJYzV/lutKqGOmOac7WG8l4nIOnVyFFUuPyZt0WbXFjd4kC6YuSuHv79S6vOrUV5Gnk7FglJnIY0wkhlzoYiU5HFtgT60dVxlDVeVWnbvduSaXfrp7v0W6MUhM01LPcGETs1iKj89374kHsY1e+3z79gRg7L+uVIf8iBaw3+9umPWaSr/O+731hSPLh5w9wiuu4Oi3s31tm55q5J4IODBKHmfOU8mvd3fVpsDJ6tmg+PkT8Vxv9DGyx0hCJJOu1GWwL6aX9dJY8jOigNhNCv/HI0w6FCW3JukEO1+uzz5tPsBRFM83+yKK1ccODdOOl3fZ21reL+KYQqLjB2Bi6FL8z26dLsYPm+MLN3EwGxplxDEtcxA0EMdcLK9nCDlXKLa4bnlqFRx+vPX9Xf8/t1FF5cRLhuOXUbFrQA90lw8rbgy6k1LSgiS93esgDhQ7e9KQQkOxaHBKNseP+dQOr3rin4THVdrsel8jKr7ugeUiu1WW9iH0yxU6qqPChXjzb+7mC2vzw8PtiA9lJNBeFJir4inLiCmBaXDyOYkyrLTfCjFL4iSJVtnEPh43Xx8qD7w7SO298QHzPvVG1VNuTNfz/1qbbcMkH1qBXLzbEfQLzSzbGDL8m+TUkADSWkhxRQte7RbMnjkaM2CKv1rsyaeKFjiwMtt18xMRxn6xTZcTbc7E4Q2nTQ3sQ38zyZ09B1dkCkafCFbYy5Sjl5ViNlAcKcxUiA7KxRF14Qh0G6r4MuvZkoWmJ9ZLtTbIXYPVPV2N1ARtEIOuZAuGWvGWBsG3eIf220Lqe6yrFVDkmtBGSJWnG15rgu8t5CokJTs0x6uVStH0rRihx2lHwhpwMQXytNBKc7FGRzGBEzN22zU2y0jbnmTUYedEaBs5rgETJCv+HCFAa7T9Sh2eiiJLHDCzfZ0WyAMG2cmgGbiyHqrKlOqLc+FG6fzL4n48DvheFUgvKIzkYHVkd4BpAWjgcH6jbdG1SbeeIn3LZKM73JCbqCLdOieZggJHe25ktOf6/cr8gf7cJCUJql318mSQggOzm6xbou7by/irvzPf4MPvtWFNs0IAa31CNDLaqtFGVVJKObS/kUIvWLbOTUN8oQ0omYKq9cLG0w28V0fygj6j0/i74nRilD4RYcqgIoVZmOd1s3P6Vxx7UPU1vyNCsAcJrk12BxBrbqg6d0GMelBVkWdkJ9ix72j8BrafJs5L3iEkbFm12YKPq5cYEqJtp9FS8aFK/7j6Rsq+NtqbZpSHTM+/0konixYOOhdLBKzWmhKvP3i4lEr1wrT+MSDeASkMLyXoTXirzmAZ9i6rV4DuMpqHrliBYbfZWAJWVLG6ZGF8+E1alOvuCPEldEQseUnuKUi+ZnauMORVGlLtVKL2BQkWdKiobF1kNeu9xH8UIQH6kBYtLyCBZNLAx+aHq/dXktwftYK8/gisIQMU6bti8jJvzpM0+vELgwf1ULidqKdw6iaxS2Ht1YVb6xdQtnQ7tUXDifDzR6sSkRUfiswK4JJU6NoQKxefKaBCv69JeX48xHR6K8kZivVdwGRubUNq0IURsXDfpJKdutT370ZIdSR/qz0Ss+ifPK0afpMvFX4HgS49KRk+HkyqcOS65AAWuPoIHmTjF6s1K72glNiHCaNdftj8Po1UGDgrp4J7NmCU8AlkS/ES+4mOV85nhG5cpDbeQaQCCuNNIYs4FFhoSsvaW6bgck+HedVXUvKK53ZzcU8IRnWOi1mh01LyXYTvmUdtcNhLjhA0QIq2q1auW2DqUiMf7KaHNM26Rc2Utih5DS9+jxVp0ERs0w6hiGjNgZImckdLbJBXq4B36FSNDdCOtaOJ9MtQDxw9N+KXFf4eGqUp2kOdNH0UNlfkxaWR5YLCJw4qI+OCwrj9XtqFUEpYDUlRj4yChW93hkBSNmUWXFq93x8/vM9KIJnVQuGr8IiPcJCsyhOQ8x5hjctnOo27/OLg3DcLIR7YXcMe6r54k24r6R9+PxfNyzVuz59zb9q5YNA0j6F+lax4tCm5h9e2Npp/leo/Wp+/R8WUgIt68OJmTS9+6DUSCy+ra4Y2bpjChMxj4Og7Mr1KZobj9j4gUb9FdXwXw+2wJJh8lxF1ZRSTCGW/PmRhHbGOchx879vFcg4tJ6Zg5UsTYK0R30JUv3PckPnkk5EcHLlUrrANWt9IUEz4BsSaIP5+EFQZqkg3Vzt4jBZUU17luxjNFGQzz66rSa0PPbw7uveW87ApzlPtXlUlSJ2OuKPrzWhzDqgPOBpvsIV5d6qOwgZt5Zv7+yHCu/18KpJm0HV6HgOoS/fFlJA1IZMA3j1CHY0liMjKQM9BHDB0VpwyAyE0COcj4/QiM+3SB/17xAvy/78owrmBuPFL7gt60VjwPc4pyD8LmVIllCFuVYTNUx4i4rHQtwaBHcvHRq7DYqJHHZ/Co3X+yhWp5Zkx18D3Nwla15q9V17oA6Cl8zfEFJobLzp+gW+eFrbC9232+j18HHCMEDRxM/W18r/TN4Qm0aHcri8vtGoMr0Ldh3cFiB7/ZuqFpk3MZ24r2xRjxL8lK/xXSbT5VcvdY4PbGEovDW0jpGgeO8jyjT+8WXRfIuX77ufMn4hxerFJqkUxoxesvhY04UAgy0gh2LX5f9aCuBXbVIyKxYSb7gGmEfnmD613P/a7OKESMLkLfD2Y4RJWLEf488Y6uRMeq/oZMxZFaC/O8cMkaUiBFtvlLMqaLoe3L/0MgtgFBMqRMuf8BZPznZPdfSjEoxQ9HwME+ZFvAc6cFY2Ij/UDiTxA9YgRAteo0xqlSMYrZJhjfSKLt+VmojvZBFtPJZhAxVqh7KP1XSiNZ0nhsgqfiw+QIZh/NS3tLRgHeNKOjRB+NzQ9dasswOrfnL2XO7zaNLbZTYkZi8XSN0YY1LQicZlOZKcP27vKrWmnprkh6FqCBOQEg7eWARhLQwuYDAevvR5LD0QRPBoJHC32nMZrpewxIxKxCm7zHye//V8CDaPhEAGgBS9hazJjc54uo6HQIyQKDMAwYdfs7aO54tGXKAJ3mDgGwH4qm8+7kf0pVrx86mfORThm5oQoJmUlzrMgllFLxax8G+wZGBKWXFGhdpmb0gv0LKZsx9trZ/lWz7VYoPKoVK0NNmZuhsm4L70O16myS3ipSCQhSIxBISiMfzKXAR8IpC23EaJ+/9zV0ZlfZYMW2n9SA7rDwovMJzreoaf8cg1t6q2BQUspnk4+kuXy9Tt93Zjgzlf4vIMuZKvESDw2qZJoFNV7804p4qed54/cjYPrJEQu3qJO+TcPLXUMgo8DmABbnHyzb3gUJ5fYFXYZe4FCtmv837rbk3s74z1Nq8d2U1oJx6XqOh+kb6etO8UQs4GmiKoV0SFM6OzdGvhT9d2qZlhaPJSRMhN1xoqHjebItXnLGxivPaZ9vOZUU4MrSN1+U4tLMMwfl9Nsg9l2M/ayrVKZwOPOO4gffU9W5xlTrDySS7g+IYC9K+ElYLaEWKT0LBCO3XZ+Xp90mY2+jiKl4rvGu8EUD/RJPhZOyAtghBP51bAIq/OSoK84/Wz94yMxAxnT/O0DVsxvSgowyqjI4Tp4KxHrTGwDh7vdOysI9dfcQGps1g5s9p8QMrvXWTz2kHaUY1BvKF6eU4IKJypQnoV8ic0HkksdjToQczuR1Ud5MRv2nrs5f9UPVIGfup9a6U21160cxKYdaHn8/tYKEIA/MkVDUPL+TocZoy42KIPWQMUQxkwNPogFSaEyRTy8Yn8fEVzyUBkrkZFzq23EQZWhnPntgReu9hdvCh5S4PWOAmsXZWdaw1Upz9LrIJl7HqRF/d5YUqt29QsnigAAXqnBgujRw0INtmxTnWg5p4tUAxSyUHkWCLqTEHHK5J7ngUAGMHiEd27T966CGTCC8YPMQVLuSAKgX96pyx7oCTRIt5BXV0BcXXhCAXk2/PLX+jB5Ug62xdnVG+fD0K5tDjlhNoKrkS4GI0flyblZocr8VHty0dTM31OQF5xOL3nALUbVDJYviHH3NdnHiqVX8RydObxFlFnUubEymtys6op4MUyGKeyfWUqYcRdYMdeiTj2tAEarLTczriVQ13QaK/9+mNZ+gpaVEd1xgED2FUcz6VGD6ks1dVInh3JHe0nMMR8NgSBpLuZ9sezdcm7GPyd6RpMdXil6YaWfpcA6uLnNYd0MK2IvBCx70N1nHPdFRcasHFTdc8cToUqRNPC7/eQ54QN9c/KS07+IV4xckOfQNYEdRCk7Bc5nOSQ7n/IRTAZUIl9gqDn8L1F+PZUUi8Ro1sZBWiFmE8pKqAdtwrgGOPWSyZc3pNt6dafYdDYlQx+Yo7YmGNokbtRk01Xw3SOoEaGaiZc01I1n1GNurWMIYL445Qz8eHXsHbMjpcglVLoS13knroh7Rhgan5Ym4OHWcExKVixeQysHZGZUHJDyeOOpjeHhVIPiRBkagPS6WaahCbLRmzKuG4BtHzYfs4hl1y+hS2HdtZU99l/CKqSyMReyWDnlv0WC1FIIOQ6mskMEw4Ek4NqjwEVVisB255P48JoRlHo0yywL55FYGLbr2NcbUUeyQQlbQrJ0iYo1DYy48L5CeBZTpiyp20ka/2xt9autPxoZhvSqkqwdQ3q0C1zYTiP0JGMOFNOYE7oYFG9TGZEymaCSSTAHCRvQkm1EIJunLQ9uRzG8z7LVZk98yU2RjS5RFpHMjWJoH+nqppHM7HSHzIs6rffQ0aAWRamvQKJTwIyfgj+gKuRXVXDROnT8ymBS+4OovCb/2FWW5ImV8uhug51UZVCDulXun4gH6sPt0QxdlUBTs5tXXY30w1I5bir4p2fpgtGbkge+t6YIpZctr+OXzs7+Psm17JXALR0gfJ5PTvYkHExQWAfGcVygfeEzfNjaoxfUSVJSA2CWdN78TSKoZFKSQyVybk919kmjY8lTpL7PouyAVxbhf5AEyFzF59RIuvjM8cMInjwsP06orgH0z2fEkj+iWwADHpiOGxnI1vfWzCAKZnGjY2RTybEpoDLwQx+mBh1ue6LamA0bDj9xgTPpRVIyJCRmspnQlGFmlU85nUeJUEZBHf4DM7qLVbt3Ghio9cNS1aMLqn/Vi7nfrBZ/amkrpUWgkAz1hPSVdvs04d2ZVZlWJhdIYnKvHWJSWmgs/N0nhKK1XgBVMIfEKaLW4XKdd+CayXaeXFSLV/6Xr1pR05KeOeXn9RHd/m2dS3NlaWqbmdDgZXn2VVESJKRlGrmRFj0QQqGSHLzpP5dE1bP1RH4YW+fe+oy/qhjFpBT5YRsLBVYNriU0qWjLTxMVcukgRV5iKM76lUZK4xr0xpBgfQjdipseonMQJetQeMBbYdme7bRWgf/Y+YAclextSwU8wI8g7Xoh3qJuAULE3S2vdCDSIV73yuo9eYXL+RPrHQitizkJOtEJuDx2bdB9MTJCWvS7f0k+uZtFmEzOs0Q0rJEz09Q343kxlLPKEzDQ4ToAGhoK1k2o7mQPpn63llzDdBQxepomjW1FBLaV1I7wcJObhV64UlAIUBmu0qrDMrWg1JxSnOo2NNETuAyoBLOvBjK3MT8kbl8T0Z0xSlMyCJtNpmeJY9tEThRfwLtQFoQt4tWYmH9ReS6HEwi7qoqjPo45WCVmUZs5jZkpU2nlRyw6fSVjZi/BQAS7pCpRaJ/0S35w03WqAqQu6hRDcpmrNdVFQWwmlpthi9KUF/dfVL0QRlkNhOl0khq+BKLA47oDph+UQ9iUYrkkHzV19qgOBJN9CMTQ34qFisyK6mw1B/9NpA8DRilEFqDrU/dUHKI2JibEkzjUberUdTNXwS7Uf+12RgIu+2BJyw1pq85Ij/cTeKMGcs+s75uoja28y/smDNaI890idqPhrLVYc3SayVSQ0fb4XF+3oxBCrveHqMgE1KjNr8jIkG85WdkxO5r5zwWjdf50ly2AirJOFkSWoWJu6nYMt0jeEM9sEK7GuivQBaHt1NNMinRg8LkX5fPe0ymckxyF7iH/w5oHfkfPJIrOkrdPi2SCZkWPLRj8BDqpHpftwCuiQjP/7wYK8R3V/wH+Xq54BLL5XUQ64DmB7E9/aaPyqFziKY18ldZ16euorZnq7V4qmtsKpg4nwh6res9iLKwzCYCd+0ypgQxF/7eZHHjpPbYfg+h+595WTZGQSHe5oqHr9Fx8Osxq/fcbXI4Yb+DUeZYyozDeDhFpwZ5r+hZ023n+1M7+mEJQPhYNcHS4dRfcz0NubOJHIhdukAA0TkNAzEcYDkh3hd1MX71rkXeKr8gcFt1/Fd0KGGg5DnApLNlQNJ+iqwA5FV1aofiEoLsOy2ZMjW1PUkv614pM6c46hNfGZW5fe9A6tItNABnO0WwrgT3NOGHc9MC+zuV9DB4yJ7+2Xev/Ym1VOE4BmtsA1t5Dz/j0IpeVCcPrmGnhd8o9B1PQzhAcImNbdC/aHecfssnerYUl3Jwvn8F2SA330DUSDcQDaLo62CN8YlXhhpuOnASLY1VlNk9DTHHdmzalyzHcc3/sQPNYKCkoRQ5ciXbiqYcHCZ3sUQT6FDcZtKG6EXi4cBgkahvL3WodkgQJU+CAEfCjZrUbkqbnDjebitXJyA+5wPbZrfNuZuHi1gu4uDpy2nVjNkKddaGR15JBNS/ckNuqOTAziSUNCTdajmpmNwdL3ku11jokEY4keq15w2iMWNAuKESYFIIq/C75ia1MGvDjdJr9Y3Wb06Hal4RX6H7dsm9qkPKo53KO5A4zaO6GPIi/oumndggrwGXCEBTQzlj5CPqDlX4H/RMDtY6dnnscF43I4SeVH4NwUCWpR4Toeh8UObuTrhsnvVzYeK5YxWBFIv7QoQTZPRG0fT7PFp5/SuomDxNbNxm9H5ulX9EDkUCV79Dx9w4YDHF9mygWoW1OS+sV/P+dDadcP/PjipJE/0x9xx14vYKo9tLmK4SeX8VV0ZM3zE3OxiKxW3/E8IrMh72/r7XhfKPj7n8w0TB5xpvWjZ4dfD7RdiEZoAz/+kjJ12nyOpKA/Pd2Lc1Xe2HhF/aQiPo3j+q2Dc0feri5dXUw4pTnsYcL6uEbjuZDy/pjgFBwr9xBbks/z6eEPsvDtSd2kkfNxDOtcxvGDKK7k7kJ+g//zKY7571uY1hEe0Zo00vbtYS317M7IVVruZSaanQBZmeHjOJynjD9CdUnTQy6KysnUUvD5zR3Q9SGdu132+j2fkCZwvTOOHvsubHnVpL2O3QREcHEf3Tw+YwA4ls4HEx3qfPH/Vw3l+FrhesZrVFxv4C5GNLssdxektni9t+SCTFgM6sIGHqM5cZxp//lyHr/9Dt6MHJL1BoieSoeAW2gKEaepfo4fdHtVu8wvVgUdU8nUDq6AfKOzLWe8x/tItU25sTdMZn07GBqRUf3fKqRnQPnY7gU79WN7NnDogRvEMruRz5OnklNjC76GdXQpnHX8FyTpnj3+V1FMxov1GAnupq+zXOZZ8O8q2uRGFi/GKB/SyB/SSz6EcAvQgzIRiKId4SwCy2bpO2IJaj3z9HWhsxWU/EJyv+L6zagFgrg/ZCaCbGWO1vWOVGFlCcQLA5CZQ0Mr2G8eNnqzz3NgKnJecuRlLQG+QM3X0YQTWzjxhuFMk9kvl/LVSEnRAOeDowwDMijlguBNxmFKOlwrT5KCznTp9IZiA9sU8+Ih2UDfRMgD7a+NU97Wg4U7C3W+GS0dNTAFU6T6qDWzbagWkYU8h4AD5R7iBupeYUcYu4/AH6HN4IOWjSM2P3dgnFZ94hgG3W8z/up7jvudLsbnU6tbbG+icyJ1fwgNfU5lynGLrvQFrBGXog7IdcOwXAz+M7MO7wSUKyNn4G80XHqsDKJ8OIQoHiMHxPEEUDoloBnCrDqB9XzriKCRa1h3xX3jp55GOPWYMWm3Z9DSauiEW2+VG00SlXlizJIerNSSZUSXisHa9IJ2fjp4OnjLOYgkYhdyU/AvBS1QHe87R5VnvGDAjKcTObASYkx78Gnlp10/nKLubOKSI0dOYF4YcP+xoIZwxoDdU9+MFOwnRRFOgbeTEskiVzm7D1Yx5tdh4lVhWkkNBL6sGOyd33G7y+fF9bcM0qDg8bFBNnhxkYxsn4y2cHhHE3UmS8LxNK/W/E4evghIqBVAouaaCE2wfagAJTfYSffOn8YQMPZVwd0Jl29TE7TlFEMYTpkrGe4MQzxraYgj8+6NpdeiotZcdg3ExUQZzg6jskpk/OEOmfXfU3CBfq0d4yRsNTxUxcxaKpNt3U4lQFGehSqEfKbzwQ/Dda3JhhcCnC2WnUb2b07OLAEoddc3umkHVHKNcfOoDQqZxtF2qHsv4766OXY7iOJyfmeWFzcjE6xVv3i9moU9o2TmIdJH1+WxK9mwHBwiI2x1i9LkF1YcpvyDGZ07G8waDCMf3PqwKEmQEbCxLi5JTWM9rExWX8bCjqAHzB+wQDspb50A1xPI5VhqZCtnpxSllsjGBMFA+jobbXkc883cTufPHvFihRsKWjr5GzEl5rFBsUhyjqb2jN2BY7bpgS5zlVgNPVMrAWINZpscN7gd4QeHg53XAZbJ9kcVvS3saLwlArHWtF3Lw8ijv+2bPZtJf1bviBUksvL/EC5novdAMYnvIxyj55YmLkbzEgw66Lu9BQX3Ow7Ex9wvBZphQFXg8Dwlv9R++GnZTo7Y5Tm6Z0K4U9kEmtJ9f8q+ECHhZVvMU24DMDfvvtGCMLhx4PoYG4gUtrAFB78/PM9Jymd0SnhewPk9yNCB8wQ4B1oXNjcd2NC+H93tiF3kl1/aFiUoSo3MxlcO+41TQKGrwByX4D3h5ICm25DScPIxLZbe4toOc7gktrL516mI29IIU2gXloo4SEV/m12HYwrD1lWnPoXSSbhQzK39QGCYgMNyyItvFGT6O/OWRw77lP6jgcyASXjknY+1wMdyXly/Rhu2W0AjsCvmq/uAzYO4HfxeP4P2iYtzQLlnDhemnioxomaayiiNXNlK3FLsgAiHiOJxHjF5cIhEWOhHo4hLy1AFqTwHx4ajCOL4Ivy0rB2uRq08z0yq3FN5gZ8Hc2ETd7xaSRdFzdri+WmwZKmSr4weink4nutyrmGbbU44P6v+IKrGNuDdh8YTtHdcVpXfr3F1wG+OexHJo6yyObWzqGC23dv5AxhmfxUZU2gN2aXedaxlzXzqZPcf7XsD6FZsre69ytMEsmoOQ4ofuM+Wgggji1Aa3sscZaeCpVvtz7N7Jsx1iMRkK+0OMhIcJLrepfFg0h8G89JmFPN3BnZYDZure3ptLRc8u95tb50awiAlRv09+LDqXXqrGERFSSQJAHkkFNMBpD78cG1Pgtxa8Bxgpr1ghioy7qFt+Dxit/UhP6HWmK9VL+4NIyfl6+DO8wPpzmhvJbYZOAJY3nBS00Z8BtJkyJlWrNJPtlb/Vp/vyJ4WeIbOZQad3IORtlx6aAPgLbavDrvCz3NIppetTGjVBCwTko2FVEQnlugEd7o9dHEwdLorpbtAp47Kp/ioIsASIfl1Vd4pjscRH7a+6HCHK9kXd93skLLykx+XioCSzytKiBqMAwS/QBwROaE6Pa/AK204HRjyxJBVuJguS8HtgVn/IT03Tu4AvxGV9L447/NgJWiCVEf9+nCqameyFn/AbVU2ZE6Pn8Dm/fZS10eNfpOP0x+/RNeqnQzvgMsaRruVSqPVDRu5oEkIJtaadprmharOwO63pj9q0hJVt0B131AIeJdpNMb+gUyy+Ri2mESRiI7Yk/5OCbzT91mbGG+2fMjZZparWsyKkAS9HWdYlCiQ7HvCExiwL48b79UCU14cz+m4Q9TWrL2Z37gBARgtDiwxN3gA8OAcl58kC4oiNRTdZJgUol0rdDHBJzxS4OXIA7JpRlzDlcSTwqlRHm8x3z02K2DLXFUax3rEI/PqLtjDisZCZurwEj0mxvXLAdGgy6lW9qVG/Aku+dWVMYOM/1ujILba9bEuipjgQz+AYu/VlSxYPTikF63JCMuhIR6ikC96mxKoubtF9f1AYxPOTsSoLe+5BY1bqotm9j3AQ3bY/GiWL5mkEsLYrdB87C5qvnqPT0dwob7ougbuyPlYrOKrotAsW6oiC6FHpch0wH6dX1wk2UaKyAzGCO7Jk7PyV1qFe/faioaLMuFGYKVGGLqAnehQCsbDpOnVfcuLtcyPUnfdQLIRL0MzCBjD4MY8/79txSaB5kiOXXy7olpG85rM4M1HMyQDqjqDNFwuy0szbi6YVwNS0L5Si3WQ2tNHSb8CLsi1U8GscEPi10iIT6EJTgyTDDKowc3QK7TtM4QxFcOfCCssyjpsmtbCHIDCeVU1HMrtGRqPDG5AjbjpwyyWpjulFZzCVzdiJrRbNYzOMsw8yTFA+9cupLq2yV+6+68s0ChdRFA28z6PGOcEIKLVxsc6NFIxyPbD+BF3LBp+eXR1Lu/TfAE8OlT/wtiMgg8ht9O79H9GQgMS6S+7gs7DkJwF/11CmdnaMivEbvbeOOraNLZCfKQfphBxjmdJL6dQSGFI5gQjSvhy5kARhW81nWOQbNOJ+C2iwIexQSewiV8fqTYKR7VQnj+APwkcvDP5TF0W+e0+62VQRdAxRobwFsB76yrenz9DTkrPBGugdJLbe7dsEySXv1YxhCb8hmaa2iFZhB1DdHrgeLR8KKQFzbVy6PGTfY2iI/5Rkab2rgVT500oEwGVGMvx6cHbVu9+uxexX9pPuX0nYtvJMVHGZEDPT3TpW9shqtwCBEQYdsRQhbYUN/OaNHRcAjhBa3NG6ubKe6cTDg2JNbu/GmyOCxa6CFKweWXglsml5QQr5KMFhYl8vHKqKYKOZF0Bn7si4OQP60xLWpX7fHc/SHfuT8TLIaHnY5AuLdGx3N9H3kEmaHMAtrG5UootHpjhX7J4bmw6TCZ9ZeEe4OQUbfG0/9R8rBNvBFofGXkq6fKmMPTSWjwcD39c4d8b1gcx1xlzEb27ReGn0MD2YVr3I9GjHi3E0SqAptyroaN0pWihZKtN3FgBqr6TGZ3FhxkmQtyrh5vZxl+vZSBXC+DSar2Wcymi6KCHi0lik2KVCh3gWeWTXebDlU0F+uQ47Gk4VwpRuLRhQnYhgPbiSEQ96g3BEqVduMB77rcNB9TONSNwQx7ct8Jia0ldDK5b4yZZ4+SyMinH0mz8iI/JwkESknXGIZY78cdjiGrCBOxoxlLafJK6LPyePW61TwyHUrePRau++mds92JyFsmjuzNWeSDeTEGH7OkzYZqC+PathdxzEbJR40C7vSeZHyx1Qz54f68P8XM/MjzMLw+PDL/I2oRNWazOOoZdyMZzhaOxwzjCnovX47zJGDlkJwUpdayvYFlSqFtAt5dKs05Cdt9ro+tdl+puLK6HxZJ/db64OEMmSh0Lv0sCYcvFE8Pkce3VgSq5qq/fE9lE4k8Fcb8MASqYE8j6rrcFH63M3Hebk2HDOBbdmbVCAIe7RBXtWm/6GoarNlixPi4la1MtPCvxwm1K7JyKZb4eqUSfjvoW2cP8W5UouEXgkVHOlnWfjGayPTbOmtbdzlHzgJHP4UeI2luejw8Z5M45017wj0o4+vheDcR+FV6kMF1MFrtbobNBKzCxHpECo3Nz6NbgcciVbrfzSvs2gbUPrvdhTuXPY2daRRx/wf4zlUFLrdEyv4dRncmsKUhpfmy2hGYxXHfMBa9w3Z1Yz8eLY7QhH+RIQAOglSiUE3lplw639qmNyGfwk1e8aAL1FoQ9WVSlqrnL+tppLtsVcCCoRGTTUQMefnVdjx4AZTmft5nAKdMGMjro/RREQcrll2zQdMnIOM1rJ+4qT/+VN643t8OIuYLBsWmrx71rgB/CyKBo2xH7xuS8GE+ekylTB38w1ByT7Y0LnkB1yLky9NIq8swWCg5P1SJDWl4dU3vYcMgtzvSjFp2ixEQYLqA4iUQUVcKD/2P6Hrph1ANzw5jgNCIHDUrs7hUtkm1SWlxWJRWjZgWVw+NMy1osw8chUgQaruIfpTeB2BNmBVjGIIGeQNPnZOKvzWn7cTPCwsDvorQd4VZTbcwnYo+2Ig2DUcHa/LE98lNcWpOa+5urGZMdVTUKzRdB8IPsqL6OBxgjQu8YNvpPh/nscNlWs661cJ65POFM4dzRCH0nGOsE+8Zcip2Y5qHLB7Fm2A89ULg0nd7Z4ilPNIFfZgsbfUounfCiug7nHXe6i85QipmFZP+aQOfQRYGOtPy2IxF2XL08+w7OIWsfwh6nxJszi6nFJIffGMpKxKtscX+qpERwqqzPD7YnQEbEZg/iYEhc0ZSRAaXBAR9F6npBqTv66LIhz7AgOabjA8ycejRqluWAw9xc1MHzxFwLQlMDkWH0UF6y1ZFOgp62GBa5koZpTVtkgwQ3Lrg0r9VxQy9vkM669QJMatLS2NmSqj5P3njAUD5up06eNAN+ED6lp2Q9cMX+es1Qsp9jDO9x53gOTFo6CpFqRs45Ggs2bWvJAgMfFb9lwczd3wO0Hp+jywobEghFf+mXhMV74T7Tb0qJrqTRqSkdX7s12fAuHmwUzRbIYcvJTeHvJ37jHtCL1WsOA32kVj9eBJA+I6je5c6NjdNB+cNFBdiJFYRtTp2unp9Yf8HYjIu+/SIfRQkTjSDbAfpZd6ZL2JLIBPwCoDj/CweYMgKZ8mGf2CIj0cIwhRP2rjqefhx5KNRCum/BZ751XJ/vHGk0m5SD1rJ108hf2UC4+e8GpHkNtomc/YAPr0TUePRwxTPAddvQCoZdZ8nzVi27SwBHo5ki6ZU1ZG+l8dyM22Q+xomLCeBZzb2KbuoXjg60PdEfs4o9HOsieYpCGWt/tXltX6at9RR/mXasnkPbLseTbuWet+vWiRLCForOIdgL2MM8Eji+kYiGGR0hxLoQxUJoaxpaOrqKIniZOnK+Ax/wV2FQSoWYgTs8bleEmzo2HRUfV/SHrSM2owgfIFO90cVOJPRZOrLWKwwlclG4rqDMW0UYXmsy8M1ypwObQJg5usKyNae93v4qQzgZgS+5d3uWeetkfVs2tE866wXPS7TRRAwYx8kZdFpfk0doj+/lJr+jFbK9MoAiEScOjcYziwRGgO55sIT0bmCWJuhCGPIJ0SN/ocOdGsW5DKPer7oumSXJ4JPR+3VN7lIEMvjg6forTSHgdnbn1FmG0YpFV093458yX+NeE/BhxGcupBeqabZt4jIUiJEGaWBcFT7SoE0lrQnwFgy6NjHyR7m2ox5naHLzTojR7ggqxr4HR8jiQEyr0YudEEySxEI7eVup3Cvl3kj8h5ER00NI3n3TU7BQccy9PsNnSA2g47FTjjVue8s1bfzj9+Cm4h4ihtYGfOiPtcknGXGofRhB4/iMN20kioK6gMFIxkL1QPn3rjvoMMAABF3bXbwzNGc++BYyrPptyiplD88tddNwGei+amCf/Kbvlb8NUMM63ZHf1JvwIpcCVT+MS22V0hh2QbQ9BvOAe+qR542aDAZ97af57y8tm9FDiLxrfcjYBmUvIjBUoxOcP3rOKhf5JT9hUSf2ZlngMXBrN6tl2GqzZH1yYNjWdnuLxdcC36kmPUX9B9L/Nl9a7Y3lfwWRAecggZUaiv3yJqfWERh1PHxFb9+v7beIZz6ifV9vfirKV0T4Q/J7vVBDBqawfJnrblmWjCAhLR7Ux0yeA0nknHZUghZEXqSSWX6srp6du/ZnIUSZliQNft7Xdv1TNPdgUTdItL0cEsY6RHwqArL2GgmgXH+p2j5gGC+8zfyOtBf81ggtBGg03h5WRvLD4orjplCEC0baAP4+f4UPDqbEFGJW9cvufecfwZ/epFNrUzPKIydBRITWVNYvjw5lmkiniQMG9IplxfB1TKSIosUHw1zBsEE9ogu3b077iZGX5BGTQ5jfGpruob3T5AgGltL+4qF57tfg+w8MGNPaa4EWSJDTWCXLFocjXV3uFGcjoaJ6fB7uA5H8UuUJh7kdYnZeJW3muMw/MMGK0lApqw5WuaJLnToHVuCVvPMHzdMhmUNUcpyHhaX/mxq+4cGuHSl5rykzhkZ5yE+AvoVroTMcjdlckom+JH6eyoGrSm2fe8HojTeTHds3u1GGTpVKXcYUM+SxLWiIhqSDxGOUHEuCDRQv8IccilkgxISLI30NRyRSNvwrUyLgNMXyG29+y30lIUDqwlwO9/7PVyTFgQkKBWXtJF3rBKzRujfIYA5CMnWqSRvOnHyj0DS92QfF0Y2Z2qi9P7GGBSNXXHKMadfr6UuQuYcb0jZzjbW9gprXA+VL0/4u8I+zrjfuu8R3DbCPfKhizAMboJirc2Jxqgvtb8qbAiu8fXVnpxq92n1PiA5KOUHHUAYjfJlTQbLjVW8iHjhy4UcMnscUlh7hV531/yHxu4miCYIbd5pUrj5OI+8zIHOXID+/86Hpy+I3wBqn26G0ZRzC9fnRyrYjpPcJQdpTUUHdcK16OcIOY8Nde6gFmd06KLW0tAv7OZeyDa8WCQkqA8qEHcJS1BfY7Hm5XH4iVii1Mk8XJyZ0Gd5SA9qNoGrRctqugagstTPiZIvheHIzxSqsG30ky5sZx67ng1qoI3ao/yWqOu5hdAcu8nt2ddauL8mHl6TSc5W14OJ3ixJhtBxsNWxtSM4pR+zdSjuJMT5FUn8c5Z4bt6MR4XV7Dc4FOwcnajyYeozVYpLYUd/ohuD1Nii38owAMtP09Tpz+Xecnki1o95Eu43Yqqi1PZctzVSVzhYlX2rCivnVcOM9XvcXGDg3ix8jcv/sx6iZzR9uRMipzlI5VbLGFnr+PaEUXNczODRmzf/swdOk/DbBY8oCTYfD2mRldW9ZJjIZ4gCpJ5xAngiDSGYU3P0FJMbYKYFOjYEw+QyDrh4ed/P9SEAU8zZh0ST3McaSrKUULm2riYXqPhhAXpQU9XgyfRfdnu2a4mjyl8GfvOlG4wSZGxgOc09PqhMrgbznT4AYBMM7JgJNrhZOKc+/K4L5Y27NdSBkORzUHx6BpE/A1yWwQA3ZiAIKkb/WUXeJSiYicAAUr12Kt/T10C0oScmVbzazKE6NQ7MLB/qLkeiMMb3J84Lkh/TvS5By742SdEBt50qxjnHFtMrnMtTTGDG0MRN0gfvM/qJuxPsMkKyBKhurdKjwvXjWRLWDZqWILDNP+kds6QggTVn/CN+HJ3D5KxPrfnoLgU+Tf2i3l4MVswqjCjY2WIZZJl8I8gS4s33a6VRt50+FLxcre2Kz4x9rzPA8b6BewoAN7q/X8XQ7bwmjaQqkw3UX8Ftx6ZO+3FYayNPlKxJcSOLJHPDVM1o9mNVoqzCKtQOeUFm8JDhyABsgJoALYIvZCnaA/v6v1C496/HdjVpkxaF+PjJW+DyoJliuD2YzGhzRgRah407F0dFbMclPlyQDZNSBjNNa4h09dCkwVK1T33C5r+n4B3Oa6jw7Yvp+iZbWeECua4RMaQnUhQiPqcmwGgBkD6D7OOGV+of/cJzXIH+JBhVFi23HnocSCEwfm5AzqGG/bud10rmD+gQ1oswzw3vdMP1c2QTDdsgswXKGJMjK3feX5et/PFBuBLiTTDq4/xl9Z7XkWXxrHbTSDtOc97jfW+7vT5mu/AcjYi6p9QSCY1aq4eEu7clGWFjfJiVar/EizOFguhxGEKOPLX0sYYbundhIno6Jh+ueFYzP6Xj7nx8rJuMwgLzxhhmsWEb3G2AhKWYVnHCJJLwurBTAWCFD3hbTd92ZCqzE5IbC5xI5MDJ3MNdQOClOgFHeuUHteHgwUojx+8Qr6hkbt+TJAWEEsyZ1Xt9uF5SSGVy1kwCIam4mNhahPwYpt3DWchZWjeVTQtL3HujYNfT3tifn/iCpSjXDYy9Hh+CWiYIQSpQWl4uBO1y8/L6E16Rv81zeWwmK20JJ5hGEoAXDmPM6Gyu6FyWDyvJx1zKwhxJJJk0AWH7UDE5Sx1O6nAeXjiT3YV8EWJTIwyDxPuJEnp8xA15+EVMCSl6H5OI+o3SEYf61HWrN/FbxxunfLGm+gjU0GN3LMHCWDvoFDj5rfs+BhuIqhhR3f5EzkCt6ckS0WkLCAG67z51dzdXVXTx/VzMfFibYHw/SoeI0pG+uhY5IYqUtINP280BBY5lRjFa846/tvsfpby8SLHPjSdhE8uMJ4Qz86oiBS7Z9CTG7TC+UrrqWyt1qQ5wL0dXGznwXUpl8/uDqYIIrsq98cFE8mtEGEmmFcVP2BpsxcCJqzy8P0npppG5x1dV6sY4fGAGQU8aTo9C+3n1zOrdhOqiKTe8C6rPrJgLp1rxj4ngas10Ss3s+FjBAksvaNoykCFu7dAhAfoiNA3AhHdARID1mMAOGIf5rG+sKGnFUXF8K2eQWsTvigfMrFtfxEFdqpf5JXXb5XN/hBWnUAYwefOgXZRjgUtUQTYaE3lhGhfO3qD2rf++C8+rMmRq5KqzF9AMjNiOt4zCuAmGrX8hU7W5GX2QhKqzXqCnmpZJ99fwGCxYOEnjF3PrxsxqNtPt0Vm3hkvvO9u6T8SaTsp/m8kBMGUWKx2fcRTTAJW9qgfg8X3Nqx+prv+srP1/fTD4vwxibeZYBnd3xQK1OvPH4wq0OY4+9vD/yWIuQkwnlnGdF+Ht1CJvpF/YMcgJj670ONup0uixjDq8VFI7i8pNb4gD6d3uk35ta0bVhMmV0OSXzsh5DCzCSU+HUIYc7IrLOgikSmPiVcmh7GhsT32271l7mh7gexaETxnaxik2PxzKtesoB7pu64z6PRoZkxvnGvP1UetljnpsYyC2TyqALp/QXbce5WcgsLZOwqSgbyNqwuVVidgLeZM3EENr1wGV8bOejvFkdPJWy2q4tKHqhq+6OBdPAr5C7SiY7CuucRxTWXx93+AnerJwY0xjGgJ+lkZzY18mZgY9oghqytdXOrzbw+hCyydd3GomQWQ3hPFD3WBH/vEiGfBGmEwYjykU4001JzyJdOQUP6oKkgz+1lxAIHJbwLr0RmunEyLG9oLVzldD3K29aBC7WO9LLa0CewGYud7hB9wDhjQuFTHx8hp8j+FZuLr5RvGgDsw+5itMZjQyy/HIlsP0SKMEtwEmi7x//COajPUIX9LUa/bvqt5shf+dPLVzGL24GEdXnQjoPB4r9VG2Z+uDXRVDpv/LQ7BYwmuWCFj3Y3G+W83SqrO2cISNixRSS8L8SAea2+faHhufLBZeLat0g8NCqc1M9iZpJbo5keVvEq8KwErwC9iizLta6Z2MVFptptu5lbf1mAWiq2z48FqR2ZHJ4SlXL/V2ocRqHK6OG6SS2eHT789umn6jbc/OZOz17yAl0eKqe8sHajr9LFTAVGMbcEOY3Mwmy139a//GAYyhu2P3QXh2WfbKOX0WOJ1PYNzteVelHM2BGRF/1FCsMefbSAIykQVPUsM1jrqz45IuLH9JdiweG/2mNn/EVMWR8qcUEhTw4P6OzAzuB28OT6imDyd9ZnfC7tkkf3OY00a8n+fY996DK1Mchi5nMfwQYTnW5G8i6SyZtO6ArSb3RMQo4ATo/WWgc5jis75Ej4M+kAs/amIv3E7+IKALyH79F1p0hO8lgCu3k2b11Zvkc9Sa0DdTKWBPcbqUNMn9Fa9SCsVOjGk0lKG7f1r5qLHCTnNpAeysu7nfuS2xQeRjyoHOviXOMJHXTIRfLQjacfvBFrrYCgUo9R7rD22Nx+HwGczu3XnIjNV+sP30W34h3PQs60uJ5pZo/VfwRiqwKB7MPBPC9q8OEnPn1RG4liLj3ewsxeK8SdllpOyFHgm+g6/mxw3/y20X8F57Y8Lrscuwm+Hyjz0xWhz49SFn+oBrlqADVBAg5ytFyHkTQeT3IYHPAwlE4QD/Ljvn5uAs5ljhVn7GF2oDHXSGbA5sgD8nDXHcuxZhfZpqSaowpeGHVTqcXuk2PROHK77D9WPx08nde2QhKK6aqOu5DZqUNRS3GHDTLlZN1IBy3jmWa3DkR1MxDawSGKISia/gKlRwh8+W3uT9Kypnx1nfHIsq3DjHucrzA2/I+3GA3t6nhFbsL3fISCfPdxnbBGOHnFsZE8erZHKWtLWkATqsfjilhMIjjPjvpgyVXUFJIXgA7OjJ05EphG9urkfrn0SGqw+RB9xm9xO+trmkcBdIL3M480GXk1czxs78L7SPJXJofSqe9z4d2HRopuMR2R85p86M3NS29oOPhuhvhlZuurJtS9oupdJeIJeCAga+UeYBc8GfeLnpQbuGizgU3V7XGR2sZ0PUsjDNnbNRhwPxb+anLYuIgCy+McELYGMSRA7zbfdeTTv+4ecAxnnalcMI4nrV8W5ZH7Wdmawe6CvhQ7QUHwQauwegcpkWkz6Pb07ZH7uE9dGhtAyIdnbBBjdmLxO2BpvPQSaq0UP4RhkyqnUu2xyXx5Rb4NOitrdfiZJWPc4/OIjt/8OZIyYP71Epg9c7NotIYe6eag2xNBO4Hvq0ADH9FkBDkEbMDQZnD9iNZ7YCOwUl57AZFl9KiwphgBBo4yMZ+7L1iJYkyeO0TIAYviSEgZmc8ujaGJS0aa8cvaayG22vHc9c6rHoKUdPBNUYgO+8At1bsYhBt701pAmEHEJeMXdYJXHmH+FrLJPxqyxF3VPn4QcLRPmQjYv2VJmyfofySvrA5WnrCduDzqdnp6On+VpRSt/CE4a1Fsy4aLDhR95ViWkEvYXTIytjdNvn0674MFbuz34Jwq7nsHK+/RP7bnQGyLZS68Wz3Obz7jVnVtZ+AuyBOMjP87x6KG7FIMIpmGL9jjBa76rRW3oZdq4G470oNhrR6WzlvuzjL/b7vsTBqbSyNuauamI8u/K4WnuKft21b42WcVydDNtPkyqlnWsAP5P6NcosadTy/gLOfOOEe2Pwgsh68CHdcZ0AV6c8l5UaBpuuAMIMAOQ1TCAP3aTrgFzuo9xJX4k+bb732AX2obn8BDlvWMC2TER5JyPsKKimw4enubxxsPY/vgn7cFR6GrkqaH6ZHhP5IsvbSECveFdOHOVOLKnl/CI/qdJqHdmHMsOZGyXkcrcitk6dG2xYnjRyU4QHeu9CC8sWw3hvvg8TLjZMwxBiM9osQ9p8s9rKJyeKg6f533BHdSDmtx3FWNTrFe8JPkU31I08AX9aTVSTwfcRk8Z9ZkTb74Iwbm/BO5UT53ty+MieKv/IZ/2IlRavdr4Pire0M4MU9p4y6bKI5h6vDwrf/rhTbCy3PPwef6Y93oeZeDsCvCOGvXksQwDNfKH9Rd4FfXEfDXMoDX/uqTf6wQF2tvoAeJpVT56xo1RlIozwZCol5ql+sgGdx6fPyMmio/BQnR3YsWPNuIjDt7hw1/JNEYx6umuPfxaL/3WKzLrX9FM7TXhsBB/SjfvSzvN7DtatXtoCBUvrBeWN13HMMVU+GDV8bpTDdr8E5Fy6KPUu7LRkVdI+ifUZAPxm1BPIFF4KZrG8EW5EM8qWnQEB9YwydMF7DsJRdsz62dxSaca9tv25v+GUa305qLxkgpF3z+7DaGz1UiOK++8XSXklNnKhuEi2DSbvXqsxFk30LbsIIbJOtY+bPTb1zTUmzu4IO02c0cxCsMb6UIx0zBnxLzXFK90sMrD6eGrmIopLk2B28WesdIwV+ZyGe3xpzejG/kdLPap3jQ1QaKVbZ5pR8M+OkXGFDZFtOPzxe0wda+lEZdRhq13pPcaz3iIhfPzfhx+R9I+ocMgta1EtVrlxAF+hpZ49+ni0WzI9ExfdHGTVUWb+3TOjbvJ8du//sShI1d9pdqsOqAcE94fMrysmnr8UcNujOX+0URsw8B7gVPeSP0vw5vyDzYIyxgmecxyh8bgl5fOTf4qlgoxTk4QChPjyP2p+T+2EgqCDtp5JuYvpb6lcZ489aPGkeMQRxSVgLpC6/yzeu9oV4+pcCzjD6OryATN6xF/a0oMRG11eZRds7q+bCVxllDpeOUP9tHtsBLofWJEsjiLaK3vjy/8TGZkdGSPwZHOkC1L59n0YIeDRCajlecM3yc50VI1D7mU5/3Zicb/3rrAiPzziOlzYufTjQppBObr/7Oy8pb8p2yBKeP62e+9+pL28vd5ZybPjaRa9M/7vIbz+RabNIdoioZbGhFFmWzIFANvJuwW20/dL+wpBCRv0KFZhbLcP72w01vQfulGv3lN1KBi7r+9mNi7+AsIk8TVa+236oDsWxn9p6Ca7NMjNUHHHtfPg76bH3KTzUXEpzQ/M1p2fxYhiLb7bKdi+I/jxBeI6+XXsOv7g3uKS+XcztQPecRY0mehfMf5rTFsft5RXRwE4cKC18damcPV57QEAeAodCEERWYlk36P9nsWa0Ot+h5318evufb1R8/a3sM9wGxSv31VpwQtQqh4jwyGX+8b1cPPXRKH6bEzRyjLpRCH2dcEQ4hY25dXkUoHEglayW0lcQ9qyften6KO+MSHGIEepPX+zlaGml098XD87XJ6tDAugertf5OLe28kl6MlXaFKNtZnWHBNnbXsxzMiJE/qbGa3Hp2a1PKcHUdfDWW0nr7E3l1Y6lD+eWLTx5tzSfJ6BOc6lTYv7+jfOY/xYmSMDQ3ouBRKNmI0n+ofy9J1b1ecgx9WOk+RwevMIcphi4TFmMNz5MKHebmuPKJvdCg3Qvqb+rlo+dHFq9132bm+lj+r7Ktx9B95ofLMDaWBy2zZhze1k73dupO7N/AEgUV+D3yk8+aJZOLvJouwwrt2pkRdrYSPdTTN8ttkCqemzwQoIVG/+mfDp4JF3EvwyRibA0QtQcaaIG9d3Cu2C5zZCHdNzVMFRt8dJaZTPYuHHf6z0lpyx30SGAyZP2RwghdTSgOaoCuUI8mZ1IA+liI7bbNjT8KU3EFR0ElL1GQ8uRaT/8i/svFZHY+FVaeyuEMZ/99sY0f/kwPraCKep5oD2sA0Z6Ir3AiOESvTnZdJJM6YaCq/jc0j/Kriij/hyjq0heYpYe1/DNndjmXp3/rGMVmPFPlAnNzvSl+5RI3zy9ZWf9RtgyJ1p69omWzVB8qEyey5q9dCMcTuTG/nOm4vVD44mkvNWgrof3IOW++1Rn0paAZSGDD6YLeq2DA7hBcv98BQOaq6ySxTR6F50llWvvRasaUB9/Lg08+2mEzKTmmpZI5TlwXqTcd+t5Lsbq8+e9nhRI7m3t9MEX8Mps3aMiapidRAZudA2em17RSKahGzzX1OPROSU/Lpy/4gdh15WTL5CnI6nG7j2ftrp8cHVp6zeHXIHcNgd0uXfkfWCeGbT/qxRyW5CCsylaYDSthdWB6gO/Yl3Ip9OkfTwFR94p5P3ii6MjygLPgHaiimWX1Foyxl58WtonynRfDOlmxF9G26ie/ZZkU6QmgtyW/24BCH7Ady3nGvLL4/+vMyoVv42723pqn24bNqcec4OA8J6XjWMtV4H5gT9Mz/qYbUpXtDfkvm6J/RIahFwx/7cNqR5YSem2Xmm1m/XKGvcT868tz3y+a5KMw3OHt4i9IQqziRmdb5vH97RXTQ4GdRWDAv2YHJUcOnQ/HCWBelBNBDVkMvUux+w8FwiIRhg5evkPcJ3cOeAKApoQIDAQfZE81NfPPUbY/yy2tC8PRj/tvioU93W3CH2/QTntcZXFX7V7M3s4R+sFv0Ptg+HyZpHwI6+cwlczkcPnpFnY8jNVpB7n8mWsqNmBYnMQfkxd9wW8Jv9e8kAnNSwPtVQavhpWDr8Rbtr52ZdvQvUBK3fXjG8iac9PR395NPgVveXzWUL2ZMG2sCtpdCTWtiC9Yrx9G/unOetnqpRa6PsOvSa1GW86Q5rJtsMiZPVh+BYEt4ytpchOcQdCDslyi7XHoYPpEjrKHpX2dmfbFVbuI34RP/2WGa5HUbjiT0o1tKSOfCtEkxP1d642U5Em9+GPvqhh72/K8rVg276SRFmOM+sWVcwxheVzZ6X86DC7hHssXp6UdKlpI3u55Sdn10uK1rp+kwhqxn4tE1joDXP9gL6gjzz503xMj0KFRJ8g/SctT1JJ3p7Tvz3N7VLOnYWDPulMHeSfAHLlBnan41M3zbt5gELqWaMGoCQSJkQbo04nfXVHs9XfkjUM+T3/JRxiC3XC6f2voK3PSDEfy+ehjTN260jf99hVOwog9Odt4eqD+7roWPl6ahva7Z7B+TSkAGC1X2W/05Pa8TUMb5PBHz/hfzNB2V77j39koRcz+BMcwsOi6W4hIt89bjOMP/j89Y2r/kzcvw83wZ+BnPodw6wTfUeSYA75HAJ+33kIKsdZWz8r0GSSzNUczmQFM/pmzOmysfQedWJKidzJsbH+R2U/LjlcZo8MI/Ituxzacsn2CTt8RDk4v2EUsbRvrFIDU1ABsDiBOYj7hPnA9/lvsRyCIHtrEfbJJthn9i/6m87+wqpvcX9H+xrH/lvx1xyonXav9qJZ/QiJx+CPNP5n/dbnZ/Yj9bCanIW2j2u31cz8GwCvs8pLFk4n1sI/Fet+GgMVQSqb6ZFAn16sETSs3wsmqeYs+vFf9nb09nf0IT9DRrUQHAM8F4eRbnfSBxztXr/wVW2flUfLUzE3CmLwGqfklA20a3lJ/f+YFdNhP2JM8vAtihUsv3715QZ/yvoTL9AlHyq+ueHR8DJQRl2Oo2ApgZUmaAN0y5hNnascYJoC4OhcIrDkInSHYJl6ZQINKF5iXGIGhMMcBmlNprMF/c+IohdhrF1RHN3n70yPfsjR9ZIAtl7CZBkXrqzMgWDNVb2yNC87Zd/41pY0uCJcT0P+jInAGnUPrH4MtY1I9kUZmPLgPu0MflsywnT8/Ks6cyfKRFfItjZPgwyfz+on3+O/t/bneJ9Kpfe9t0g9mxsgFIgFhW9JhsT7a/mJAIHwVR+jw+/xtzKNJ1aUnF62hOnFOKK3URy7vq78O44TQ8roaOlCmG4U6dKIOAt2/XNxZ9DopJsStrvFB/+ZhVGLycRRE5OTWlC+62lKNaPOC/bYgrlmjErOa3n67COVKgOnuIVwMljT3mwx1f7wtGQYpN/lxSVy10Jj+H1jVpPwHMEK7EVo/q6wDYKRtEQFbO/zPfe2CKMmKqumGadmO6/lBGMVJmuVFWdVN2/XDOM3Luu3Hed3P+/31vFIYPbL67Xk4nVgo10l6N4CsF3G4Xn92b3a5hc9XuAXAvXFvd7lD2c3PEVWj0fT3vv+gQKj+lHCGvDg9/vCRBh12ibJJ8u3EsacGWkoDzJJvdobmeG+1A88ESIyCxIf3zYf37YfnHTJ+nrRyJW0Pl/p4Wd1kBXe1qM4NaZcSZdK3BJzbD1YmbvmtNnIeVSsKwBMIHu3C+Si1JYX+aD29jRZVYQHFE5vy2ptztib+Mr17I7eQkJ/arYTWAz1uSWZm9v0D5wmppQ5Xf1jtRLPZQ5WF1aXOwSxDip4/jYdsEqjosDY8Xs1OonTtfDXMwyuJkaF1m8uU1c84fPTtrIIpSu5lH7Vd7T7TI2uxBnfjyUQt6JzTxa3vGsAleGi0rhfJnIwcF/th3lsIiNm7nZlxOgUw0BJNNl9D0ZW4dTKWiX5eHx3Yz5i9HL+DZ5SszxjxkuTH/epW7dk/xp2TQQcZMS4zTMMvMPnLzCy0Exuz8a/K4J+F5hHVw8Tk3vrHZ0j1RPXWT2girwtyusZITeDc7iNSXeFl9pSAwm9wVEtVIFZnSKkss/6M1/4ToPsyTjs1PsN2WistG5Qba123r2X1VnsZCV2VXC4PCYpHNJ7L68HSbWCWUIUIx8R4VW9cdmwBbDr2ZDlu7yIhhHaqqaU6MHod00x7reE+SsHktdOAnwGHdP1jCv99lk8AHm3W8HNhVRv2m8rp79ckF4cECs5XWu18aP3aUvGoVAxtDqsuiySl28iOTWc6DzAjGDh2vIUWnETdphw7mVEQJxHBwe7pYTgrYKVOIzd29upS4b5Wn+dDGOXWuIW0mXARZ/VFPkJTApCQAIxe6iSosyGo66t9EkGigjMWlu+0V78Qi7Q5WL3X3uwCELoMbH44h7ct7QEH6o/5gGpZYs1IYF7j0y8cQ69goSo+h33eBSdJu6mLGXfJloiXJwQa16+w4eA5q3jhxkHBTwUJsL69/W704vj/1wMD9OvowtTe3Vny6XjgPqeE1E5V8UVHMwyxCc5I9L7muwJ1GrnWt+1BT1yCMxLPf48C+WEmSMPV/MHDQQYYo24jWy14gLusSFKnkWv8J7v9Qv6pLIF4gMyAWEYwwo0q7wQwS+IZCYnSc9oYHvguwB/gzaYNk/eplwAkJAADdU5uCG109m1KNCmj6mVHcAvpyVrS6cr2ow6sl6TUiSn7TYyIlJls4ClFYcpM1l/O3HwCdGJA39824SMC1c8HwtrpXhJe6TSMDcx5+lV2/qWWQE45pZXKJ5FYPj5jFkSzASNe/F7/w0+AeQ1tBAtCnT3wQZdharHanVBNWFO3RBw4BHhiwEknsf9JMoIyAicrStdPaKDLNK00R72lSnCmKvo//33hx9SC82Id4pdFgrLbNOwGr8L/UwG91EG27WJUNe2imWmcUH/364ZpBOkki37Tuw1nhi8TVswA4zHp/izkgSyZBCO0npos7YVKqPXmtL9eil0z2Qs6F3SUi0qeVA1BwF3WMYEArXBcifRceOQOQL8DoOJxa5qvAF5BVcMI3XTSADtvP5d2DklvCUy9kKHcvRZPl8JT3oDuhhuC3jL9F0idMXck445HvUzrWXW+82jxbx/Jf2dbGMER+Jqx/eDy9F/kcT8zELB94yIbIMlPuaLAOS5jRCD2MJV1DeRT1pODmQYngLITOmXo7L+DEKPYfIs6Z7IIMkW486iabX+rv9GxZuGXmEUgxHTpgOywZXCqJrHs1+0vPo11i36bDgsGW5H9up1CukAGKpPryZ/5Y5T5/7AJRrmgCTc6TRDAjnzdWywWSLcXC06iHjkxJZQ4472sack7YZjRi6teVB2BrdqPJsyAbT+wsTN+t+q1uFbG7aoVq6oRGMSEf84YEduai5VdaeJYKD7DNjndyvF1P6XYRwVQdxWh3XQbBu/3bgmbLKRowGY6TA2Z3XV4e9YQI4JT/8a0gaDFzcPDznLmFjsQ/60xt3JdqLZWaTOpSeq/7FTNKDKci2BesogYcoi35plHnHs7oWR6OfqHjUnWLJRKsowLuwILs0OILHP54l4On6kc8R4qWJ6bFJT1QCIz8r1Y5hkDJIEdBgvbWNyG6ZO6XWf6+4tkwenW46CILMt1q6//DJt7xNG0Z2CIAq5A+e35U8oW4t+31uhEUsvJgsPvl8aCT48qpoFAtTaS2Nk83LSLe181Uo16fC/HNO+zYDIGvDhH9Op+j2NkPvmsn+gzKwGVf1D8yxZfKjISx4Ko8Z6fGwSNeh6beH7towyMRQKY9kAGHb/F2iR2VNkUy2EQoKiOyzOHgWBjz/VXz8ffyn2LBsw97BTAQ4/NEK4kzJ36BaEENtCuKz2Bqt0OMqfREgD3Ovyji9oXuo+74bvgJOz57Xf33jvM34kfbIlxkV9xilAyyabhpF3gwizObhiDzPMjn9q2YJd43ros+vk4bacK", "base64")).toString(); + return hook; + }; + }, + 761: (module3) => { + "use strict"; + module3.exports = require("zlib"); + ; + } + }; + var __webpack_module_cache__ = {}; + function __webpack_require__(moduleId) { + if (__webpack_module_cache__[moduleId]) { + return __webpack_module_cache__[moduleId].exports; + } + var module3 = __webpack_module_cache__[moduleId] = { + exports: {} + }; + __webpack_modules__[moduleId](module3, module3.exports, __webpack_require__); + return module3.exports; + } + (() => { + __webpack_require__.n = (module3) => { + var getter = module3 && module3.__esModule ? () => module3["default"] : () => module3; + __webpack_require__.d(getter, { a: getter }); + return getter; + }; + })(); + (() => { + __webpack_require__.d = (exports3, definition) => { + for (var key in definition) { + if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports3, key)) { + Object.defineProperty(exports3, key, { enumerable: true, get: definition[key] }); + } + } + }; + })(); + (() => { + __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop); + })(); + (() => { + __webpack_require__.r = (exports3) => { + if (typeof Symbol !== "undefined" && Symbol.toStringTag) { + Object.defineProperty(exports3, Symbol.toStringTag, { value: "Module" }); + } + Object.defineProperty(exports3, "__esModule", { value: true }); + }; + })(); + return __webpack_require__(862); + })(); + } +}); + +// ../lockfile-to-pnp/lib/index.js +var require_lib84 = __commonJS({ + "../lockfile-to-pnp/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.lockfileToPackageRegistry = exports2.writePnpFile = exports2.lockfileToPnp = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var config_1 = __importDefault(require_lib10()); + var lockfile_file_1 = require_lib57(); + var lockfile_utils_1 = require_lib53(); + var read_project_manifest_1 = __importDefault(require_lib19()); + var dependency_path_1 = require_lib33(); + var pnp_1 = require_lib83(); + var normalize_path_1 = __importDefault(require_normalize_path()); + async function lockfileToPnp(lockfileDir) { + const lockfile = await lockfile_file_1.readWantedLockfile(lockfileDir, { ignoreIncompatible: true }); + if (lockfile == null) + throw new Error("Cannot generate a .pnp.cjs without a lockfile"); + const importerNames = {}; + await Promise.all(Object.keys(lockfile.importers).map(async (importerId) => { + const importerDirectory = path_1.default.join(lockfileDir, importerId); + const { manifest } = await read_project_manifest_1.default(importerDirectory); + importerNames[importerId] = manifest.name; + })); + const { config: { registries, virtualStoreDir } } = await config_1.default({ + cliOptions: {}, + packageManager: { name: "pnpm", version: "*" } + }); + await writePnpFile(lockfile, { + importerNames, + lockfileDir, + registries, + virtualStoreDir: virtualStoreDir !== null && virtualStoreDir !== void 0 ? virtualStoreDir : path_1.default.join(lockfileDir, "node_modules/.pnpm") + }); + } + exports2.lockfileToPnp = lockfileToPnp; + async function writePnpFile(lockfile, opts) { + const packageRegistry = lockfileToPackageRegistry(lockfile, opts); + const loaderFile = pnp_1.generateInlinedScript({ + blacklistedLocations: void 0, + dependencyTreeRoots: [], + ignorePattern: void 0, + packageRegistry, + shebang: void 0 + }); + await fs_1.promises.writeFile(path_1.default.join(opts.lockfileDir, ".pnp.cjs"), loaderFile, "utf8"); + } + exports2.writePnpFile = writePnpFile; + function lockfileToPackageRegistry(lockfile, opts) { + var _a; + const packageRegistry = new Map(); + for (const importerId of Object.keys(lockfile.importers)) { + const importer = lockfile.importers[importerId]; + if (importerId === ".") { + const packageStore = new Map([ + [ + null, + { + packageDependencies: new Map([ + ...importer.dependencies != null ? toPackageDependenciesMap(lockfile, importer.dependencies) : [], + ...importer.optionalDependencies != null ? toPackageDependenciesMap(lockfile, importer.optionalDependencies) : [], + ...importer.devDependencies != null ? toPackageDependenciesMap(lockfile, importer.devDependencies) : [] + ]), + packageLocation: "./" + } + ] + ]); + packageRegistry.set(null, packageStore); + } else { + const name = opts.importerNames[importerId]; + const packageStore = new Map([ + [ + importerId, + { + packageDependencies: new Map([ + [name, importerId], + ...importer.dependencies != null ? toPackageDependenciesMap(lockfile, importer.dependencies, importerId) : [], + ...importer.optionalDependencies != null ? toPackageDependenciesMap(lockfile, importer.optionalDependencies, importerId) : [], + ...importer.devDependencies != null ? toPackageDependenciesMap(lockfile, importer.devDependencies, importerId) : [] + ]), + packageLocation: `./${importerId}` + } + ] + ]); + packageRegistry.set(name, packageStore); + } + } + for (const [relDepPath, pkgSnapshot] of Object.entries((_a = lockfile.packages) !== null && _a !== void 0 ? _a : {})) { + const { name, version, peersSuffix } = lockfile_utils_1.nameVerFromPkgSnapshot(relDepPath, pkgSnapshot); + const pnpVersion = toPnPVersion(version, peersSuffix); + let packageStore = packageRegistry.get(name); + if (!packageStore) { + packageStore = new Map(); + packageRegistry.set(name, packageStore); + } + let packageLocation = normalize_path_1.default(path_1.default.relative(opts.lockfileDir, path_1.default.join(opts.virtualStoreDir, dependency_path_1.depPathToFilename(relDepPath, opts.lockfileDir), "node_modules", name))); + if (!packageLocation.startsWith("../")) { + packageLocation = `./${packageLocation}`; + } + packageStore.set(pnpVersion, { + packageDependencies: new Map([ + [name, pnpVersion], + ...pkgSnapshot.dependencies != null ? toPackageDependenciesMap(lockfile, pkgSnapshot.dependencies) : [], + ...pkgSnapshot.optionalDependencies != null ? toPackageDependenciesMap(lockfile, pkgSnapshot.optionalDependencies) : [] + ]), + packageLocation + }); + } + return packageRegistry; + } + exports2.lockfileToPackageRegistry = lockfileToPackageRegistry; + function toPackageDependenciesMap(lockfile, deps, importerId) { + return Object.entries(deps).map(([depAlias, ref]) => { + if (importerId && ref.startsWith("link:")) { + return [depAlias, path_1.default.join(importerId, ref.substr(5))]; + } + const relDepPath = dependency_path_1.refToRelative(ref, depAlias); + if (!relDepPath) + return [depAlias, ref]; + const { name, version, peersSuffix } = lockfile_utils_1.nameVerFromPkgSnapshot(relDepPath, lockfile.packages[relDepPath]); + const pnpVersion = toPnPVersion(version, peersSuffix); + if (depAlias === name) { + return [depAlias, pnpVersion]; + } + return [depAlias, [name, pnpVersion]]; + }); + } + function toPnPVersion(version, peersSuffix) { + return peersSuffix ? `virtual:${version}_${peersSuffix}#${version}` : version; + } + } +}); + +// ../headless/lib/index.js +var require_lib85 = __commonJS({ + "../headless/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var build_modules_1 = __importDefault(require_lib81()); + var constants_1 = require_lib7(); + var core_loggers_1 = require_lib12(); + var error_1 = __importDefault(require_lib8()); + var filter_lockfile_1 = require_lib71(); + var hoist_1 = __importDefault(require_lib82()); + var lifecycle_1 = require_lib80(); + var link_bins_1 = __importStar2(require_lib70()); + var lockfile_file_1 = require_lib57(); + var lockfile_to_pnp_1 = require_lib84(); + var lockfile_utils_1 = require_lib53(); + var logger_1 = __importStar2(require_lib6()); + var modules_cleaner_1 = require_lib73(); + var modules_yaml_1 = require_lib64(); + var package_is_installable_1 = __importDefault(require_lib13()); + var read_package_json_1 = require_lib32(); + var read_project_manifest_1 = require_lib19(); + var symlink_dependency_1 = __importStar2(require_lib75()); + var dp = __importStar2(require_lib33()); + var p_limit_1 = __importDefault(require_p_limit()); + var path_absolute_1 = __importDefault(require_path_absolute()); + var path_exists_1 = __importDefault(require_path_exists()); + var equals_1 = __importDefault(require_equals2()); + var fromPairs_1 = __importDefault(require_fromPairs()); + var omit_1 = __importDefault(require_omit()); + var props_1 = __importDefault(require_props()); + var realpath_missing_1 = __importDefault(require_realpath_missing()); + var brokenModulesLogger = logger_1.default("_broken_node_modules"); + exports2.default = async (opts) => { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; + const reporter = opts.reporter; + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.on("data", reporter); + } + const lockfileDir = opts.lockfileDir; + const wantedLockfile = (_a = opts.wantedLockfile) !== null && _a !== void 0 ? _a : await lockfile_file_1.readWantedLockfile(lockfileDir, { ignoreIncompatible: false }); + if (wantedLockfile == null) { + throw new Error(`Headless installation requires a ${constants_1.WANTED_LOCKFILE} file`); + } + const relativeModulesDir = (_b = opts.modulesDir) !== null && _b !== void 0 ? _b : "node_modules"; + const rootModulesDir = await realpath_missing_1.default(path_1.default.join(lockfileDir, relativeModulesDir)); + const virtualStoreDir = path_absolute_1.default((_c = opts.virtualStoreDir) !== null && _c !== void 0 ? _c : path_1.default.join(relativeModulesDir, ".pnpm"), lockfileDir); + const currentLockfile = (_d = opts.currentLockfile) !== null && _d !== void 0 ? _d : await lockfile_file_1.readCurrentLockfile(virtualStoreDir, { ignoreIncompatible: false }); + const hoistedModulesDir = path_1.default.join(virtualStoreDir, "node_modules"); + const publicHoistedModulesDir = rootModulesDir; + if (!opts.ignorePackageManifest) { + for (const { id, manifest, rootDir } of opts.projects) { + if (!lockfile_utils_1.satisfiesPackageManifest(wantedLockfile, manifest, id)) { + throw new error_1.default("OUTDATED_LOCKFILE", `Cannot install with "frozen-lockfile" because ${constants_1.WANTED_LOCKFILE} is not up-to-date with ` + path_1.default.relative(lockfileDir, path_1.default.join(rootDir, "package.json"))); + } + } + } + const scriptsOpts = { + optional: false, + extraBinPaths: opts.extraBinPaths, + rawConfig: opts.rawConfig, + scriptShell: opts.scriptShell, + shellEmulator: opts.shellEmulator, + stdio: (_e = opts.ownLifecycleHooksStdio) !== null && _e !== void 0 ? _e : "inherit", + unsafePerm: opts.unsafePerm || false + }; + const skipped = opts.skipped || new Set(); + if (currentLockfile != null && !opts.ignorePackageManifest) { + await modules_cleaner_1.prune(opts.projects, { + currentLockfile, + dryRun: false, + hoistedDependencies: opts.hoistedDependencies, + hoistedModulesDir: opts.hoistPattern == null ? void 0 : hoistedModulesDir, + include: opts.include, + lockfileDir, + pruneStore: opts.pruneStore, + pruneVirtualStore: opts.pruneVirtualStore, + publicHoistedModulesDir: opts.publicHoistPattern == null ? void 0 : publicHoistedModulesDir, + registries: opts.registries, + skipped, + storeController: opts.storeController, + virtualStoreDir, + wantedLockfile + }); + } else { + core_loggers_1.statsLogger.debug({ + prefix: lockfileDir, + removed: 0 + }); + } + core_loggers_1.stageLogger.debug({ + prefix: lockfileDir, + stage: "importing_started" + }); + const filterOpts = { + include: opts.include, + registries: opts.registries, + skipped + }; + const importerIds = opts.ignorePackageManifest ? Object.keys(wantedLockfile.importers) : opts.projects.map(({ id }) => id); + const filteredLockfile = filter_lockfile_1.filterLockfileByImportersAndEngine(wantedLockfile, importerIds, { + ...filterOpts, + currentEngine: opts.currentEngine, + engineStrict: opts.engineStrict, + failOnMissingDependencies: true, + includeIncompatiblePackages: opts.force, + lockfileDir + }); + const { directDependenciesByImporterId, graph } = await lockfileToDepGraph(filteredLockfile, opts.force ? null : currentLockfile, { + ...opts, + importerIds, + lockfileDir, + skipped, + virtualStoreDir, + nodeVersion: opts.currentEngine.nodeVersion, + pnpmVersion: opts.currentEngine.pnpmVersion + }); + if (opts.enablePnp) { + const importerNames = fromPairs_1.default(opts.projects.map(({ manifest, id }) => { + var _a2; + return [id, (_a2 = manifest.name) !== null && _a2 !== void 0 ? _a2 : id]; + })); + await lockfile_to_pnp_1.writePnpFile(filteredLockfile, { + importerNames, + lockfileDir, + virtualStoreDir, + registries: opts.registries + }); + } + const depNodes = Object.values(graph); + core_loggers_1.statsLogger.debug({ + added: depNodes.length, + prefix: lockfileDir + }); + function warn(message2) { + logger_1.default.info({ + message: message2, + prefix: lockfileDir + }); + } + if (opts.enableModulesDir !== false) { + await Promise.all(depNodes.map(async (depNode) => fs_1.promises.mkdir(depNode.modules, { recursive: true }))); + await Promise.all([ + opts.symlink === false ? Promise.resolve() : linkAllModules(depNodes, { + lockfileDir, + optional: opts.include.optionalDependencies + }), + linkAllPkgs(opts.storeController, depNodes, { + force: opts.force, + lockfileDir: opts.lockfileDir, + targetEngine: opts.sideEffectsCacheRead && constants_1.ENGINE_NAME || void 0 + }) + ]); + core_loggers_1.stageLogger.debug({ + prefix: lockfileDir, + stage: "importing_done" + }); + let newHoistedDependencies; + if (opts.ignorePackageManifest !== true && (opts.hoistPattern != null || opts.publicHoistPattern != null)) { + const hoistLockfile = { + ...filteredLockfile, + packages: omit_1.default(Array.from(skipped), filteredLockfile.packages) + }; + newHoistedDependencies = await hoist_1.default({ + extendNodePath: opts.extendNodePath, + lockfile: hoistLockfile, + lockfileDir, + privateHoistedModulesDir: hoistedModulesDir, + privateHoistPattern: (_f = opts.hoistPattern) !== null && _f !== void 0 ? _f : [], + publicHoistedModulesDir, + publicHoistPattern: (_g = opts.publicHoistPattern) !== null && _g !== void 0 ? _g : [], + virtualStoreDir + }); + } else { + newHoistedDependencies = {}; + } + if (opts.ignoreScripts) { + for (const { id, manifest } of opts.projects) { + if (opts.ignoreScripts && (manifest === null || manifest === void 0 ? void 0 : manifest.scripts) != null && ((_l = (_k = (_j = (_h = manifest.scripts.preinstall) !== null && _h !== void 0 ? _h : manifest.scripts.prepublish) !== null && _j !== void 0 ? _j : manifest.scripts.install) !== null && _k !== void 0 ? _k : manifest.scripts.postinstall) !== null && _l !== void 0 ? _l : manifest.scripts.prepare)) { + opts.pendingBuilds.push(id); + } + } + opts.pendingBuilds = opts.pendingBuilds.concat(depNodes.filter(({ requiresBuild }) => requiresBuild).map(({ depPath }) => depPath)); + } else { + const directNodes = new Set(); + for (const id of importerIds) { + Object.values(directDependenciesByImporterId[id]).filter((loc) => graph[loc]).forEach((loc) => { + directNodes.add(loc); + }); + } + const extraBinPaths = [...(_m = opts.extraBinPaths) !== null && _m !== void 0 ? _m : []]; + if (opts.hoistPattern != null) { + extraBinPaths.unshift(path_1.default.join(virtualStoreDir, "node_modules/.bin")); + } + let extraEnv; + if (opts.enablePnp) { + extraEnv = lifecycle_1.makeNodeRequireOption(path_1.default.join(opts.lockfileDir, ".pnp.cjs")); + } + await build_modules_1.default(graph, Array.from(directNodes), { + childConcurrency: opts.childConcurrency, + extraBinPaths, + extendNodePath: opts.extendNodePath, + extraEnv, + lockfileDir, + optional: opts.include.optionalDependencies, + rawConfig: opts.rawConfig, + rootModulesDir: virtualStoreDir, + scriptShell: opts.scriptShell, + shellEmulator: opts.shellEmulator, + sideEffectsCacheWrite: opts.sideEffectsCacheWrite, + storeController: opts.storeController, + unsafePerm: opts.unsafePerm, + userAgent: opts.userAgent + }); + } + await modules_yaml_1.write(rootModulesDir, { + hoistedDependencies: newHoistedDependencies, + hoistPattern: opts.hoistPattern, + included: opts.include, + layoutVersion: constants_1.LAYOUT_VERSION, + packageManager: `${opts.packageManager.name}@${opts.packageManager.version}`, + pendingBuilds: opts.pendingBuilds, + publicHoistPattern: opts.publicHoistPattern, + prunedAt: opts.pruneVirtualStore === true || opts.prunedAt == null ? new Date().toUTCString() : opts.prunedAt, + registries: opts.registries, + skipped: Array.from(skipped), + storeDir: opts.storeDir, + virtualStoreDir + }); + await linkAllBins(graph, { extendNodePath: opts.extendNodePath, optional: opts.include.optionalDependencies, warn }); + if (currentLockfile != null && !equals_1.default(importerIds.sort(), Object.keys(filteredLockfile.importers).sort())) { + Object.assign(filteredLockfile.packages, currentLockfile.packages); + } + await lockfile_file_1.writeCurrentLockfile(virtualStoreDir, filteredLockfile); + if (!opts.ignorePackageManifest) { + await Promise.all(opts.projects.map(async ({ rootDir, id, manifest, modulesDir }) => { + if (opts.symlink !== false) { + await linkRootPackages(filteredLockfile, { + importerId: id, + importerModulesDir: modulesDir, + lockfileDir, + projectDir: rootDir, + projects: opts.projects, + registries: opts.registries, + rootDependencies: directDependenciesByImporterId[id] + }); + } + core_loggers_1.packageManifestLogger.debug({ + prefix: rootDir, + updated: manifest + }); + })); + await Promise.all(opts.projects.map(async (project) => { + var _a2; + if (((_a2 = opts.publicHoistPattern) === null || _a2 === void 0 ? void 0 : _a2.length) && path_1.default.relative(opts.lockfileDir, project.rootDir) === "") { + await linkBinsOfImporter(project, { extendNodePath: opts.extendNodePath }); + } else { + const directPkgDirs = Object.values(directDependenciesByImporterId[project.id]); + await link_bins_1.linkBinsOfPackages((await Promise.all(directPkgDirs.map(async (dir) => ({ + location: dir, + manifest: await read_project_manifest_1.safeReadProjectManifestOnly(dir) + })))).filter(({ manifest }) => manifest != null), project.binsDir, { warn: (message2) => logger_1.default.info({ message: message2, prefix: project.rootDir }) }); + } + })); + } + } + await Promise.all(depNodes.map(({ finishing }) => finishing)); + core_loggers_1.summaryLogger.debug({ prefix: lockfileDir }); + await opts.storeController.close(); + if (!opts.ignoreScripts && !opts.ignorePackageManifest) { + await lifecycle_1.runLifecycleHooksConcurrently(["preinstall", "install", "postinstall", "prepublish", "prepare"], opts.projects, (_o = opts.childConcurrency) !== null && _o !== void 0 ? _o : 5, scriptsOpts); + } + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.removeListener("data", reporter); + } + }; + async function linkBinsOfImporter({ manifest, modulesDir, binsDir, rootDir }, opts) { + const warn = (message2) => logger_1.default.info({ message: message2, prefix: rootDir }); + return link_bins_1.default(modulesDir, binsDir, { + allowExoticManifests: true, + extendNodePath: opts.extendNodePath, + projectManifest: manifest, + warn + }); + } + async function linkRootPackages(lockfile, opts) { + const importerManifestsByImporterId = {}; + for (const { id, manifest } of opts.projects) { + importerManifestsByImporterId[id] = manifest; + } + const projectSnapshot = lockfile.importers[opts.importerId]; + const allDeps = { + ...projectSnapshot.devDependencies, + ...projectSnapshot.dependencies, + ...projectSnapshot.optionalDependencies + }; + return Promise.all(Object.keys(allDeps).map(async (alias) => { + var _a, _b, _c, _d, _e, _f, _g; + if (allDeps[alias].startsWith("link:")) { + const isDev2 = Boolean((_a = projectSnapshot.devDependencies) === null || _a === void 0 ? void 0 : _a[alias]); + const isOptional2 = Boolean((_b = projectSnapshot.optionalDependencies) === null || _b === void 0 ? void 0 : _b[alias]); + const packageDir = path_1.default.join(opts.projectDir, allDeps[alias].substr(5)); + const linkedPackage = await (async () => { + const importerId = lockfile_file_1.getLockfileImporterId(opts.lockfileDir, packageDir); + if (importerManifestsByImporterId[importerId]) { + return importerManifestsByImporterId[importerId]; + } + try { + return await read_project_manifest_1.readProjectManifestOnly(packageDir); + } catch (err) { + if (err["code"] !== "ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND") + throw err; + return { name: alias, version: "0.0.0" }; + } + })(); + await symlink_dependency_1.symlinkDirectRootDependency(packageDir, opts.importerModulesDir, alias, { + fromDependenciesField: isDev2 && "devDependencies" || isOptional2 && "optionalDependencies" || "dependencies", + linkedPackage, + prefix: opts.projectDir + }); + return; + } + const dir = opts.rootDependencies[alias]; + if (!dir) { + return; + } + if ((await symlink_dependency_1.default(dir, opts.importerModulesDir, alias)).reused) { + return; + } + const isDev = Boolean((_c = projectSnapshot.devDependencies) === null || _c === void 0 ? void 0 : _c[alias]); + const isOptional = Boolean((_d = projectSnapshot.optionalDependencies) === null || _d === void 0 ? void 0 : _d[alias]); + const depPath = dp.refToRelative(allDeps[alias], alias); + if (depPath === null) + return; + const pkgSnapshot = (_e = lockfile.packages) === null || _e === void 0 ? void 0 : _e[depPath]; + if (pkgSnapshot == null) + return; + const pkgId = (_g = (_f = pkgSnapshot.id) !== null && _f !== void 0 ? _f : dp.refToAbsolute(allDeps[alias], alias, opts.registries)) !== null && _g !== void 0 ? _g : void 0; + const pkgInfo = lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot); + core_loggers_1.rootLogger.debug({ + added: { + dependencyType: isDev && "dev" || isOptional && "optional" || "prod", + id: pkgId, + name: alias, + realName: pkgInfo.name, + version: pkgInfo.version + }, + prefix: opts.projectDir + }); + })); + } + async function lockfileToDepGraph(lockfile, currentLockfile, opts) { + var _a; + const currentPackages = (_a = currentLockfile === null || currentLockfile === void 0 ? void 0 : currentLockfile.packages) !== null && _a !== void 0 ? _a : {}; + const graph = {}; + const directDependenciesByImporterId = {}; + if (lockfile.packages != null) { + const pkgSnapshotByLocation = {}; + await Promise.all(Object.keys(lockfile.packages).map(async (depPath) => { + var _a2; + if (opts.skipped.has(depPath)) + return; + const pkgSnapshot = lockfile.packages[depPath]; + const { name: pkgName, version: pkgVersion } = lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot); + const modules = path_1.default.join(opts.virtualStoreDir, dp.depPathToFilename(depPath, opts.lockfileDir), "node_modules"); + const packageId = lockfile_utils_1.packageIdFromSnapshot(depPath, pkgSnapshot, opts.registries); + const pkg = { + name: pkgName, + version: pkgVersion, + engines: pkgSnapshot.engines, + cpu: pkgSnapshot.cpu, + os: pkgSnapshot.os + }; + if (!opts.force && package_is_installable_1.default(packageId, pkg, { + engineStrict: opts.engineStrict, + lockfileDir: opts.lockfileDir, + nodeVersion: opts.nodeVersion, + optional: pkgSnapshot.optional === true, + pnpmVersion: opts.pnpmVersion + }) === false) { + opts.skipped.add(depPath); + return; + } + const dir = path_1.default.join(modules, pkgName); + if (currentPackages[depPath] && equals_1.default(currentPackages[depPath].dependencies, lockfile.packages[depPath].dependencies) && equals_1.default(currentPackages[depPath].optionalDependencies, lockfile.packages[depPath].optionalDependencies)) { + if (await path_exists_1.default(dir)) { + return; + } + brokenModulesLogger.debug({ + missing: dir + }); + } + const resolution = lockfile_utils_1.pkgSnapshotToResolution(depPath, pkgSnapshot, opts.registries); + core_loggers_1.progressLogger.debug({ + packageId, + requester: opts.lockfileDir, + status: "resolved" + }); + let fetchResponse; + try { + fetchResponse = opts.storeController.fetchPackage({ + force: false, + lockfileDir: opts.lockfileDir, + pkg: { + name: pkgName, + version: pkgVersion, + id: packageId, + resolution + } + }); + if (fetchResponse instanceof Promise) + fetchResponse = await fetchResponse; + } catch (err) { + if (pkgSnapshot.optional) + return; + throw err; + } + fetchResponse.files().then(({ fromStore }) => { + core_loggers_1.progressLogger.debug({ + packageId, + requester: opts.lockfileDir, + status: fromStore ? "found_in_store" : "fetched" + }); + }).catch(() => { + }); + graph[dir] = { + children: {}, + depPath, + dir, + fetchingFiles: fetchResponse.files, + filesIndexFile: fetchResponse.filesIndexFile, + finishing: fetchResponse.finishing, + hasBin: pkgSnapshot.hasBin === true, + hasBundledDependencies: pkgSnapshot.bundledDependencies != null, + modules, + name: pkgName, + optional: !!pkgSnapshot.optional, + optionalDependencies: new Set(Object.keys((_a2 = pkgSnapshot.optionalDependencies) !== null && _a2 !== void 0 ? _a2 : {})), + prepare: pkgSnapshot.prepare === true, + requiresBuild: pkgSnapshot.requiresBuild === true + }; + pkgSnapshotByLocation[dir] = pkgSnapshot; + })); + const ctx = { + force: opts.force, + graph, + lockfileDir: opts.lockfileDir, + pkgSnapshotsByDepPaths: lockfile.packages, + registries: opts.registries, + sideEffectsCacheRead: opts.sideEffectsCacheRead, + skipped: opts.skipped, + storeController: opts.storeController, + storeDir: opts.storeDir, + virtualStoreDir: opts.virtualStoreDir + }; + for (const dir of Object.keys(graph)) { + const pkgSnapshot = pkgSnapshotByLocation[dir]; + const allDeps = { + ...pkgSnapshot.dependencies, + ...opts.include.optionalDependencies ? pkgSnapshot.optionalDependencies : {} + }; + const peerDeps = pkgSnapshot.peerDependencies ? new Set(Object.keys(pkgSnapshot.peerDependencies)) : null; + graph[dir].children = await getChildrenPaths(ctx, allDeps, peerDeps, "."); + } + for (const importerId of opts.importerIds) { + const projectSnapshot = lockfile.importers[importerId]; + const rootDeps = { + ...opts.include.devDependencies ? projectSnapshot.devDependencies : {}, + ...opts.include.dependencies ? projectSnapshot.dependencies : {}, + ...opts.include.optionalDependencies ? projectSnapshot.optionalDependencies : {} + }; + directDependenciesByImporterId[importerId] = await getChildrenPaths(ctx, rootDeps, null, importerId); + } + } + return { graph, directDependenciesByImporterId }; + } + async function getChildrenPaths(ctx, allDeps, peerDeps, importerId) { + const children = {}; + for (const alias of Object.keys(allDeps)) { + const childDepPath = dp.refToAbsolute(allDeps[alias], alias, ctx.registries); + if (childDepPath === null) { + children[alias] = path_1.default.resolve(ctx.lockfileDir, importerId, allDeps[alias].substr(5)); + continue; + } + const childRelDepPath = dp.refToRelative(allDeps[alias], alias); + const childPkgSnapshot = ctx.pkgSnapshotsByDepPaths[childRelDepPath]; + if (ctx.graph[childRelDepPath]) { + children[alias] = ctx.graph[childRelDepPath].dir; + } else if (childPkgSnapshot) { + if (ctx.skipped.has(childRelDepPath)) + continue; + const pkgName = lockfile_utils_1.nameVerFromPkgSnapshot(childRelDepPath, childPkgSnapshot).name; + children[alias] = path_1.default.join(ctx.virtualStoreDir, dp.depPathToFilename(childRelDepPath, ctx.lockfileDir), "node_modules", pkgName); + } else if (allDeps[alias].indexOf("file:") === 0) { + children[alias] = path_1.default.resolve(ctx.lockfileDir, allDeps[alias].substr(5)); + } else if (!ctx.skipped.has(childRelDepPath) && (peerDeps == null || !peerDeps.has(alias))) { + throw new Error(`${childRelDepPath} not found in ${constants_1.WANTED_LOCKFILE}`); + } + } + return children; + } + var limitLinking = p_limit_1.default(16); + async function linkAllPkgs(storeController, depNodes, opts) { + return Promise.all(depNodes.map(async (depNode) => { + let filesResponse; + try { + filesResponse = await depNode.fetchingFiles(); + } catch (err) { + if (depNode.optional) + return; + throw err; + } + const { importMethod, isBuilt } = await storeController.importPackage(depNode.dir, { + filesResponse, + force: opts.force, + targetEngine: opts.targetEngine + }); + if (importMethod) { + core_loggers_1.progressLogger.debug({ + method: importMethod, + requester: opts.lockfileDir, + status: "imported", + to: depNode.dir + }); + } + depNode.isBuilt = isBuilt; + })); + } + async function linkAllBins(depGraph, opts) { + return Promise.all(Object.values(depGraph).map(async (depNode) => limitLinking(async () => { + const childrenToLink = opts.optional ? depNode.children : Object.keys(depNode.children).reduce((nonOptionalChildren, childAlias) => { + if (!depNode.optionalDependencies.has(childAlias)) { + nonOptionalChildren[childAlias] = depNode.children[childAlias]; + } + return nonOptionalChildren; + }, {}); + const binPath = path_1.default.join(depNode.dir, "node_modules/.bin"); + const pkgSnapshots = props_1.default(Object.values(childrenToLink), depGraph); + if (pkgSnapshots.includes(void 0)) { + await link_bins_1.default(depNode.modules, binPath, { extendNodePath: opts.extendNodePath, warn: opts.warn }); + } else { + const pkgs = await Promise.all(pkgSnapshots.filter(({ hasBin }) => hasBin).map(async ({ dir }) => ({ + location: dir, + manifest: await read_package_json_1.fromDir(dir) + }))); + await link_bins_1.linkBinsOfPackages(pkgs, binPath, { extendNodePath: opts.extendNodePath, warn: opts.warn }); + } + if (depNode.hasBundledDependencies) { + const bundledModules = path_1.default.join(depNode.dir, "node_modules"); + await link_bins_1.default(bundledModules, binPath, { extendNodePath: opts.extendNodePath, warn: opts.warn }); + } + }))); + } + async function linkAllModules(depNodes, opts) { + await Promise.all(depNodes.map(async (depNode) => { + const childrenToLink = opts.optional ? depNode.children : Object.keys(depNode.children).reduce((nonOptionalChildren, childAlias) => { + if (!depNode.optionalDependencies.has(childAlias)) { + nonOptionalChildren[childAlias] = depNode.children[childAlias]; + } + return nonOptionalChildren; + }, {}); + await Promise.all(Object.keys(childrenToLink).map(async (alias) => { + if (alias === depNode.name) { + logger_1.default.warn({ + message: `Cannot link dependency with name ${alias} to ${depNode.modules}. Dependency's name should differ from the parent's name.`, + prefix: opts.lockfileDir + }); + return; + } + await limitLinking(async () => symlink_dependency_1.default(childrenToLink[alias], depNode.modules, alias)); + })); + })); + } + } +}); + +// ../resolve-dependencies/lib/depPathToRef.js +var require_depPathToRef = __commonJS({ + "../resolve-dependencies/lib/depPathToRef.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var dependency_path_1 = require_lib33(); + var encode_registry_1 = __importDefault(require_encode_registry()); + function depPathToRef(depPath, opts) { + if (opts.resolution.type) + return depPath; + const registryName = encode_registry_1.default(dependency_path_1.getRegistryByPackageName(opts.registries, opts.realName)); + if (depPath.startsWith(`${registryName}/`)) { + depPath = depPath.replace(`${registryName}/`, "/"); + } + if (depPath[0] === "/" && opts.alias === opts.realName) { + const ref = depPath.replace(`/${opts.realName}/`, ""); + if (!ref.includes("/")) + return ref; + } + return depPath; + } + exports2.default = depPathToRef; + } +}); + +// ../resolve-dependencies/lib/nodeIdUtils.js +var require_nodeIdUtils = __commonJS({ + "../resolve-dependencies/lib/nodeIdUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.splitNodeId = exports2.createNodeId = exports2.nodeIdContainsSequence = void 0; + function nodeIdContainsSequence(nodeId, pkgId1, pkgId2) { + const pkgIds = splitNodeId(nodeId); + pkgIds.pop(); + const pkg1Index = pkgIds.indexOf(pkgId1); + if (pkg1Index === -1) + return false; + const pkg2Index = pkgIds.indexOf(pkgId2); + return pkg2Index > -1 && pkg1Index < pkg2Index; + } + exports2.nodeIdContainsSequence = nodeIdContainsSequence; + function createNodeId(parentNodeId, pkgId) { + return `${parentNodeId}${pkgId}>`; + } + exports2.createNodeId = createNodeId; + function splitNodeId(nodeId) { + return nodeId.substr(1, nodeId.length - 2).split(">"); + } + exports2.splitNodeId = splitNodeId; + } +}); + +// ../../node_modules/.pnpm/replace-string@3.1.0/node_modules/replace-string/index.js +var require_replace_string = __commonJS({ + "../../node_modules/.pnpm/replace-string@3.1.0/node_modules/replace-string/index.js"(exports2, module2) { + "use strict"; + module2.exports = (string, needle, replacement, options = {}) => { + if (typeof string !== "string") { + throw new TypeError(`Expected input to be a string, got ${typeof string}`); + } + if (!(typeof needle === "string" && needle.length > 0) || !(typeof replacement === "string" || typeof replacement === "function")) { + return string; + } + let result = ""; + let matchCount = 0; + let prevIndex = options.fromIndex > 0 ? options.fromIndex : 0; + if (prevIndex > string.length) { + return string; + } + while (true) { + const index = options.caseInsensitive ? string.toLowerCase().indexOf(needle.toLowerCase(), prevIndex) : string.indexOf(needle, prevIndex); + if (index === -1) { + break; + } + matchCount++; + const replaceStr = typeof replacement === "string" ? replacement : replacement(string.slice(index, index + needle.length), matchCount, string, index); + const beginSlice = matchCount === 1 ? 0 : prevIndex; + result += string.slice(beginSlice, index) + replaceStr; + prevIndex = index + needle.length; + } + if (matchCount === 0) { + return string; + } + return result + string.slice(prevIndex); + }; + } +}); + +// ../resolve-dependencies/lib/encodePkgId.js +var require_encodePkgId = __commonJS({ + "../resolve-dependencies/lib/encodePkgId.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var replace_string_1 = __importDefault(require_replace_string()); + function encodePkgId(pkgId) { + return replace_string_1.default(replace_string_1.default(pkgId, "%", "%25"), ">", "%3E"); + } + exports2.default = encodePkgId; + } +}); + +// ../resolve-dependencies/lib/getNonDevWantedDependencies.js +var require_getNonDevWantedDependencies = __commonJS({ + "../resolve-dependencies/lib/getNonDevWantedDependencies.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function getNonDevWantedDependencies(pkg) { + var _a, _b; + const bd = (_a = pkg.bundleDependencies) !== null && _a !== void 0 ? _a : pkg.bundleDependencies; + const bundledDeps = new Set(Array.isArray(bd) ? bd : []); + bundledDeps.add(pkg.name); + const filterDeps = getNotBundledDeps.bind(null, bundledDeps); + return getWantedDependenciesFromGivenSet(filterDeps({ ...pkg.optionalDependencies, ...pkg.dependencies }), { + devDependencies: {}, + optionalDependencies: (_b = pkg.optionalDependencies) !== null && _b !== void 0 ? _b : {} + }); + } + exports2.default = getNonDevWantedDependencies; + function getWantedDependenciesFromGivenSet(deps, opts) { + if (!deps) + return []; + return Object.keys(deps).map((alias) => ({ + alias, + dev: !!opts.devDependencies[alias], + optional: !!opts.optionalDependencies[alias], + pref: deps[alias] + })); + } + function getNotBundledDeps(bundledDeps, deps) { + return Object.keys(deps).filter((depName) => !bundledDeps.has(depName)).reduce((notBundledDeps, depName) => { + notBundledDeps[depName] = deps[depName]; + return notBundledDeps; + }, {}); + } + } +}); + +// ../resolve-dependencies/lib/wantedDepIsLocallyAvailable.js +var require_wantedDepIsLocallyAvailable = __commonJS({ + "../resolve-dependencies/lib/wantedDepIsLocallyAvailable.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var parsePref_1 = __importDefault(require_parsePref3()); + var semver_1 = __importDefault(require_semver2()); + function wantedDepIsLocallyAvailable(workspacePackages, wantedDependency, opts) { + const spec = parsePref_1.default(wantedDependency.pref, wantedDependency.alias, opts.defaultTag || "latest", opts.registry); + if (spec == null || !workspacePackages[spec.name]) + return false; + return pickMatchingLocalVersionOrNull(workspacePackages[spec.name], spec) !== null; + } + exports2.default = wantedDepIsLocallyAvailable; + function pickMatchingLocalVersionOrNull(versions, spec) { + const localVersions = Object.keys(versions); + switch (spec.type) { + case "tag": + return semver_1.default.maxSatisfying(localVersions, "*"); + case "version": + return versions[spec.fetchSpec] ? spec.fetchSpec : null; + case "range": + return semver_1.default.maxSatisfying(localVersions, spec.fetchSpec, true); + default: + return null; + } + } + } +}); + +// ../resolve-dependencies/lib/resolveDependencies.js +var require_resolveDependencies = __commonJS({ + "../resolve-dependencies/lib/resolveDependencies.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.nodeIdToParents = void 0; + var path_1 = __importDefault(require("path")); + var core_loggers_1 = require_lib12(); + var error_1 = __importDefault(require_lib8()); + var lockfile_utils_1 = require_lib53(); + var logger_1 = __importDefault(require_lib6()); + var pick_registry_for_package_1 = __importDefault(require_lib50()); + var dp = __importStar2(require_lib33()); + var path_exists_1 = __importDefault(require_path_exists()); + var isEmpty_1 = __importDefault(require_isEmpty2()); + var semver_1 = __importDefault(require_semver2()); + var encodePkgId_1 = __importDefault(require_encodePkgId()); + var getNonDevWantedDependencies_1 = __importDefault(require_getNonDevWantedDependencies()); + var nodeIdUtils_1 = require_nodeIdUtils(); + var wantedDepIsLocallyAvailable_1 = __importDefault(require_wantedDepIsLocallyAvailable()); + var dependencyResolvedLogger = logger_1.default("_dependency_resolved"); + function nodeIdToParents(nodeId, resolvedPackagesByDepPath) { + return nodeIdUtils_1.splitNodeId(nodeId).slice(1).map((depPath) => { + const { id, name, version } = resolvedPackagesByDepPath[depPath]; + return { id, name, version }; + }); + } + exports2.nodeIdToParents = nodeIdToParents; + async function resolveDependencies(ctx, preferredVersions, wantedDependencies, options) { + const extendedWantedDeps = getDepsToResolve(wantedDependencies, ctx.wantedLockfile, { + preferredDependencies: options.preferredDependencies, + prefix: ctx.prefix, + proceed: options.proceed || ctx.forceFullResolution, + registries: ctx.registries, + resolvedDependencies: options.resolvedDependencies + }); + const postponedResolutionsQueue = []; + const pkgAddresses = (await Promise.all(extendedWantedDeps.map(async (extendedWantedDep) => resolveDependenciesOfDependency(postponedResolutionsQueue, ctx, preferredVersions, options, extendedWantedDep)))).filter(Boolean); + const newPreferredVersions = { ...preferredVersions }; + for (const { depPath } of pkgAddresses) { + const resolvedPackage = ctx.resolvedPackagesByDepPath[depPath]; + if (!resolvedPackage) + continue; + if (!newPreferredVersions[resolvedPackage.name]) { + newPreferredVersions[resolvedPackage.name] = {}; + } + newPreferredVersions[resolvedPackage.name][resolvedPackage.version] = "version"; + } + await Promise.all(postponedResolutionsQueue.map(async (postponedResolution) => postponedResolution(newPreferredVersions))); + return pkgAddresses; + } + exports2.default = resolveDependencies; + async function resolveDependenciesOfDependency(postponedResolutionsQueue, ctx, preferredVersions, options, extendedWantedDep) { + var _a, _b, _c; + const updateDepth = typeof extendedWantedDep.wantedDependency.updateDepth === "number" ? extendedWantedDep.wantedDependency.updateDepth : options.updateDepth; + const updateShouldContinue = options.currentDepth <= updateDepth; + const update = updateShouldContinue && (ctx.updateMatching == null || ((_a = extendedWantedDep.infoFromLockfile) === null || _a === void 0 ? void 0 : _a.dependencyLockfile) == null || ctx.updateMatching((_b = extendedWantedDep.infoFromLockfile.dependencyLockfile.name) !== null && _b !== void 0 ? _b : extendedWantedDep.wantedDependency.alias)) || Boolean(options.workspacePackages != null && wantedDepIsLocallyAvailable_1.default(options.workspacePackages, extendedWantedDep.wantedDependency, { defaultTag: ctx.defaultTag, registry: ctx.registries.default })); + const resolveDependencyOpts = { + currentDepth: options.currentDepth, + parentPkg: options.parentPkg, + preferredVersions, + workspacePackages: options.workspacePackages, + currentPkg: (_c = extendedWantedDep.infoFromLockfile) !== null && _c !== void 0 ? _c : void 0, + proceed: extendedWantedDep.proceed || updateShouldContinue, + update, + updateDepth + }; + const resolveDependencyResult = await resolveDependency(extendedWantedDep.wantedDependency, ctx, resolveDependencyOpts); + if (resolveDependencyResult == null) + return null; + if (resolveDependencyResult.isLinkedDependency) { + ctx.dependenciesTree[resolveDependencyResult.pkgId] = { + children: {}, + depth: -1, + installable: true, + resolvedPackage: { + name: resolveDependencyResult.name, + version: resolveDependencyResult.version + } + }; + return resolveDependencyResult; + } + if (!resolveDependencyResult.isNew) + return resolveDependencyResult; + postponedResolutionsQueue.push(async (preferredVersions2) => { + var _a2; + return resolveChildren(ctx, resolveDependencyResult, (_a2 = extendedWantedDep.infoFromLockfile) === null || _a2 === void 0 ? void 0 : _a2.dependencyLockfile, options.workspacePackages, options.currentDepth, updateDepth, preferredVersions2); + }); + return resolveDependencyResult; + } + async function resolveChildren(ctx, parentPkg, dependencyLockfile, workspacePackages, parentDepth, updateDepth, preferredVersions) { + var _a, _b; + const currentResolvedDependencies = dependencyLockfile != null ? { + ...dependencyLockfile.dependencies, + ...dependencyLockfile.optionalDependencies + } : void 0; + const resolvedDependencies = parentPkg.updated ? void 0 : currentResolvedDependencies; + const parentDependsOnPeer = Boolean(Object.keys((_b = (_a = dependencyLockfile === null || dependencyLockfile === void 0 ? void 0 : dependencyLockfile.peerDependencies) !== null && _a !== void 0 ? _a : parentPkg.pkg.peerDependencies) !== null && _b !== void 0 ? _b : {}).length); + const wantedDependencies = getNonDevWantedDependencies_1.default(parentPkg.pkg); + const children = await resolveDependencies(ctx, preferredVersions, wantedDependencies, { + currentDepth: parentDepth + 1, + parentPkg, + preferredDependencies: currentResolvedDependencies, + proceed: !parentPkg.depIsLinked || parentDependsOnPeer, + resolvedDependencies, + updateDepth, + workspacePackages + }); + ctx.childrenByParentDepPath[parentPkg.depPath] = children.map((child) => ({ + alias: child.alias, + depPath: child.depPath + })); + ctx.dependenciesTree[parentPkg.nodeId] = { + children: children.reduce((chn, child) => { + var _a2; + chn[child.alias] = (_a2 = child["nodeId"]) !== null && _a2 !== void 0 ? _a2 : child.pkgId; + return chn; + }, {}), + depth: parentDepth, + installable: parentPkg.installable, + resolvedPackage: ctx.resolvedPackagesByDepPath[parentPkg.depPath] + }; + } + function getDepsToResolve(wantedDependencies, wantedLockfile, options) { + var _a, _b, _c; + const resolvedDependencies = (_a = options.resolvedDependencies) !== null && _a !== void 0 ? _a : {}; + const preferredDependencies = (_b = options.preferredDependencies) !== null && _b !== void 0 ? _b : {}; + const extendedWantedDeps = []; + let proceedAll = options.proceed; + const satisfiesWanted2Args = referenceSatisfiesWantedSpec.bind(null, { + lockfile: wantedLockfile, + prefix: options.prefix + }); + for (const wantedDependency of wantedDependencies) { + let reference = void 0; + let proceed = proceedAll; + if (wantedDependency.alias) { + const satisfiesWanted = satisfiesWanted2Args.bind(null, wantedDependency); + if (resolvedDependencies[wantedDependency.alias] && satisfiesWanted(resolvedDependencies[wantedDependency.alias])) { + reference = resolvedDependencies[wantedDependency.alias]; + } else if (semver_1.default.validRange(wantedDependency.pref) !== null && preferredDependencies[wantedDependency.alias] && satisfiesWanted(preferredDependencies[wantedDependency.alias])) { + proceed = true; + reference = preferredDependencies[wantedDependency.alias]; + } + } + const infoFromLockfile = getInfoFromLockfile(wantedLockfile, options.registries, reference, wantedDependency.alias); + if (!proceedAll && (infoFromLockfile == null || infoFromLockfile.dependencyLockfile != null && (infoFromLockfile.dependencyLockfile.peerDependencies != null || ((_c = infoFromLockfile.dependencyLockfile.transitivePeerDependencies) === null || _c === void 0 ? void 0 : _c.length)))) { + proceed = true; + proceedAll = true; + for (const extendedWantedDep of extendedWantedDeps) { + if (!extendedWantedDep.proceed) { + extendedWantedDep.proceed = true; + } + } + } + extendedWantedDeps.push({ + infoFromLockfile, + proceed, + wantedDependency + }); + } + return extendedWantedDeps; + } + function referenceSatisfiesWantedSpec(opts, wantedDep, preferredRef) { + var _a; + const depPath = dp.refToRelative(preferredRef, wantedDep.alias); + if (depPath === null) + return false; + const pkgSnapshot = (_a = opts.lockfile.packages) === null || _a === void 0 ? void 0 : _a[depPath]; + if (pkgSnapshot == null) { + logger_1.default.warn({ + message: `Could not find preferred package ${depPath} in lockfile`, + prefix: opts.prefix + }); + return false; + } + const { version } = lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot); + return semver_1.default.satisfies(version, wantedDep.pref, true); + } + function getInfoFromLockfile(lockfile, registries, reference, alias) { + var _a, _b, _c; + if (!reference || !alias) { + return void 0; + } + const depPath = dp.refToRelative(reference, alias); + if (!depPath) { + return void 0; + } + let dependencyLockfile = (_a = lockfile.packages) === null || _a === void 0 ? void 0 : _a[depPath]; + if (dependencyLockfile != null) { + if (dependencyLockfile.peerDependencies != null && dependencyLockfile.dependencies != null) { + const dependencies = {}; + for (const [depName, ref] of Object.entries((_b = dependencyLockfile.dependencies) !== null && _b !== void 0 ? _b : {})) { + if (dependencyLockfile.peerDependencies[depName]) + continue; + dependencies[depName] = ref; + } + dependencyLockfile = { + ...dependencyLockfile, + dependencies + }; + } + return { + ...lockfile_utils_1.nameVerFromPkgSnapshot(depPath, dependencyLockfile), + dependencyLockfile, + depPath, + pkgId: lockfile_utils_1.packageIdFromSnapshot(depPath, dependencyLockfile, registries), + resolution: dependencyLockfile.resolution && lockfile_utils_1.pkgSnapshotToResolution(depPath, dependencyLockfile, registries) + }; + } else { + return { + depPath, + pkgId: (_c = dp.tryGetPackageId(registries, depPath)) !== null && _c !== void 0 ? _c : depPath + }; + } + } + async function resolveDependency(wantedDependency, ctx, options) { + var _a, _b, _c, _d, _e, _f, _g, _h, _j; + const currentPkg = (_a = options.currentPkg) !== null && _a !== void 0 ? _a : {}; + const currentLockfileContainsTheDep = currentPkg.depPath ? Boolean((_b = ctx.currentLockfile.packages) === null || _b === void 0 ? void 0 : _b[currentPkg.depPath]) : void 0; + const depIsLinked = Boolean(currentLockfileContainsTheDep && currentPkg.depPath && currentPkg.dependencyLockfile && await path_exists_1.default(path_1.default.join(ctx.virtualStoreDir, dp.depPathToFilename(currentPkg.depPath, ctx.prefix), "node_modules", currentPkg.name, "package.json"))); + if (!options.update && !options.proceed && currentPkg.resolution != null && depIsLinked) { + return null; + } + let pkgResponse; + if (!options.parentPkg.installable) { + wantedDependency = { + ...wantedDependency, + optional: true + }; + } + try { + pkgResponse = await ctx.storeController.requestPackage(wantedDependency, { + alwaysTryWorkspacePackages: ctx.linkWorkspacePackagesDepth >= options.currentDepth, + currentPkg: currentPkg ? { + name: currentPkg.name, + version: currentPkg.version, + id: currentPkg.pkgId, + resolution: currentPkg.resolution + } : void 0, + defaultTag: ctx.defaultTag, + downloadPriority: -options.currentDepth, + lockfileDir: ctx.lockfileDir, + preferredVersions: options.preferredVersions, + preferWorkspacePackages: ctx.preferWorkspacePackages, + projectDir: options.currentDepth > 0 ? ctx.lockfileDir : ctx.prefix, + registry: wantedDependency.alias && pick_registry_for_package_1.default(ctx.registries, wantedDependency.alias, wantedDependency.pref) || ctx.registries.default, + skipFetch: false, + update: options.update, + workspacePackages: options.workspacePackages + }); + } catch (err) { + if (wantedDependency.optional) { + core_loggers_1.skippedOptionalDependencyLogger.debug({ + details: err.toString(), + package: { + name: wantedDependency.alias, + pref: wantedDependency.pref, + version: wantedDependency.alias ? wantedDependency.pref : void 0 + }, + parents: nodeIdToParents(options.parentPkg.nodeId, ctx.resolvedPackagesByDepPath), + prefix: ctx.prefix, + reason: "resolution_failure" + }); + return null; + } + err.pkgsStack = nodeIdToParents(options.parentPkg.nodeId, ctx.resolvedPackagesByDepPath); + throw err; + } + dependencyResolvedLogger.debug({ + resolution: pkgResponse.body.id, + wanted: { + dependentId: options.parentPkg.depPath, + name: wantedDependency.alias, + rawSpec: wantedDependency.pref + } + }); + pkgResponse.body.id = encodePkgId_1.default(pkgResponse.body.id); + if (!pkgResponse.body.updated && options.currentDepth === Math.max(0, options.updateDepth) && depIsLinked && !ctx.force && !options.proceed) { + return null; + } + if (pkgResponse.body.isLocal) { + const manifest = (_c = pkgResponse.body.manifest) !== null && _c !== void 0 ? _c : await pkgResponse.bundledManifest(); + return { + alias: wantedDependency.alias || manifest.name, + depPath: pkgResponse.body.id, + dev: wantedDependency.dev, + isLinkedDependency: true, + name: manifest.name, + normalizedPref: pkgResponse.body.normalizedPref, + optional: wantedDependency.optional, + pkgId: pkgResponse.body.id, + resolution: pkgResponse.body.resolution, + version: manifest.version + }; + } + let pkg; + let prepare; + let hasBin; + pkg = ctx.readPackageHook != null ? ctx.readPackageHook((_d = pkgResponse.body.manifest) !== null && _d !== void 0 ? _d : await pkgResponse.bundledManifest()) : (_e = pkgResponse.body.manifest) !== null && _e !== void 0 ? _e : await pkgResponse.bundledManifest(); + if (!pkg.name) { + throw new error_1.default("MISSING_PACKAGE_NAME", `Can't install ${wantedDependency.pref}: Missing package name`); + } + const depPath = dp.relative(ctx.registries, pkg.name, pkgResponse.body.id); + if (nodeIdUtils_1.nodeIdContainsSequence(options.parentPkg.nodeId, options.parentPkg.depPath, depPath)) { + return null; + } + if (!options.update && currentPkg.dependencyLockfile != null && currentPkg.depPath && !pkgResponse.body.updated && currentPkg.dependencyLockfile.peerDependencies == null) { + prepare = currentPkg.dependencyLockfile.prepare === true; + hasBin = currentPkg.dependencyLockfile.hasBin === true; + pkg = { + ...lockfile_utils_1.nameVerFromPkgSnapshot(currentPkg.depPath, currentPkg.dependencyLockfile), + ...currentPkg.dependencyLockfile, + ...pkg + }; + } else { + prepare = Boolean(pkgResponse.body.resolvedVia === "git-repository" && typeof ((_f = pkg.scripts) === null || _f === void 0 ? void 0 : _f.prepare) === "string"); + if (((_g = currentPkg.dependencyLockfile) === null || _g === void 0 ? void 0 : _g.deprecated) && !pkgResponse.body.updated && !pkg.deprecated) { + pkg.deprecated = currentPkg.dependencyLockfile.deprecated; + } + hasBin = Boolean((_h = pkg.bin && !isEmpty_1.default(pkg.bin)) !== null && _h !== void 0 ? _h : (_j = pkg.directories) === null || _j === void 0 ? void 0 : _j.bin); + } + if (options.currentDepth === 0 && pkgResponse.body.latest && pkgResponse.body.latest !== pkg.version) { + ctx.outdatedDependencies[pkgResponse.body.id] = pkgResponse.body.latest; + } + if (pkg.deprecated) { + core_loggers_1.deprecationLogger.debug({ + deprecated: pkg.deprecated, + depth: options.currentDepth, + pkgId: pkgResponse.body.id, + pkgName: pkg.name, + pkgVersion: pkg.version, + prefix: ctx.prefix + }); + } + const nodeId = pkgIsLeaf(pkg) ? pkgResponse.body.id : nodeIdUtils_1.createNodeId(options.parentPkg.nodeId, depPath); + const parentIsInstallable = options.parentPkg.installable === void 0 || options.parentPkg.installable; + const installable = parentIsInstallable && pkgResponse.body.isInstallable !== false; + const isNew = !ctx.resolvedPackagesByDepPath[depPath]; + if (isNew) { + if (pkgResponse.body.isInstallable === false || !parentIsInstallable) { + ctx.skipped.add(pkgResponse.body.id); + } + core_loggers_1.progressLogger.debug({ + packageId: pkgResponse.body.id, + requester: ctx.lockfileDir, + status: "resolved" + }); + logFetchResult(pkgResponse, ctx.lockfileDir); + ctx.resolvedPackagesByDepPath[depPath] = getResolvedPackage({ + dependencyLockfile: currentPkg.dependencyLockfile, + depPath, + force: ctx.force, + hasBin, + neverBuiltDependencies: ctx.neverBuiltDependencies, + pkg, + pkgResponse, + prepare, + wantedDependency + }); + } else { + ctx.resolvedPackagesByDepPath[depPath].prod = ctx.resolvedPackagesByDepPath[depPath].prod || !wantedDependency.dev && !wantedDependency.optional; + ctx.resolvedPackagesByDepPath[depPath].dev = ctx.resolvedPackagesByDepPath[depPath].dev || wantedDependency.dev; + ctx.resolvedPackagesByDepPath[depPath].optional = ctx.resolvedPackagesByDepPath[depPath].optional && wantedDependency.optional; + if (ctx.resolvedPackagesByDepPath[depPath].fetchingFiles == null && pkgResponse.files != null) { + logFetchResult(pkgResponse, ctx.lockfileDir); + ctx.resolvedPackagesByDepPath[depPath].fetchingFiles = pkgResponse.files; + ctx.resolvedPackagesByDepPath[depPath].filesIndexFile = pkgResponse.filesIndexFile; + ctx.resolvedPackagesByDepPath[depPath].finishing = pkgResponse.finishing; + ctx.resolvedPackagesByDepPath[depPath].fetchingBundledManifest = pkgResponse.bundledManifest; + } + if (ctx.dependenciesTree[nodeId]) { + ctx.dependenciesTree[nodeId].depth = Math.min(ctx.dependenciesTree[nodeId].depth, options.currentDepth); + } else { + ctx.pendingNodes.push({ + alias: wantedDependency.alias || pkg.name, + depth: options.currentDepth, + installable, + nodeId, + resolvedPackage: ctx.resolvedPackagesByDepPath[depPath] + }); + } + } + return { + alias: wantedDependency.alias || pkg.name, + depIsLinked, + depPath, + isNew, + nodeId, + normalizedPref: options.currentDepth === 0 ? pkgResponse.body.normalizedPref : void 0, + pkgId: pkgResponse.body.id, + installable, + isLinkedDependency: void 0, + pkg, + updated: pkgResponse.body.updated + }; + } + function logFetchResult(pkgResponse, lockfileDir) { + if (pkgResponse.files == null) + return; + pkgResponse.files().then((fetchResult) => { + core_loggers_1.progressLogger.debug({ + packageId: pkgResponse.body.id, + requester: lockfileDir, + status: fetchResult.fromStore ? "found_in_store" : "fetched" + }); + }).catch(() => { + }); + } + function pkgIsLeaf(pkg) { + var _a, _b, _c; + return isEmpty_1.default((_a = pkg.dependencies) !== null && _a !== void 0 ? _a : {}) && isEmpty_1.default((_b = pkg.optionalDependencies) !== null && _b !== void 0 ? _b : {}) && isEmpty_1.default((_c = pkg.peerDependencies) !== null && _c !== void 0 ? _c : {}); + } + function getResolvedPackage(options) { + var _a, _b; + const peerDependencies = peerDependenciesWithoutOwn(options.pkg); + return { + additionalInfo: { + bundledDependencies: options.pkg.bundledDependencies, + bundleDependencies: options.pkg.bundleDependencies, + cpu: options.pkg.cpu, + deprecated: options.pkg.deprecated, + engines: options.pkg.engines, + os: options.pkg.os + }, + depPath: options.depPath, + dev: options.wantedDependency.dev, + fetchingBundledManifest: options.pkgResponse.bundledManifest, + fetchingFiles: options.pkgResponse.files, + filesIndexFile: options.pkgResponse.filesIndexFile, + finishing: options.pkgResponse.finishing, + hasBin: options.hasBin, + hasBundledDependencies: !(((_a = options.pkg.bundledDependencies) !== null && _a !== void 0 ? _a : options.pkg.bundleDependencies) == null), + id: options.pkgResponse.body.id, + name: options.pkg.name, + optional: options.wantedDependency.optional, + optionalDependencies: new Set(Object.keys((_b = options.pkg.optionalDependencies) !== null && _b !== void 0 ? _b : {})), + peerDependencies: peerDependencies !== null && peerDependencies !== void 0 ? peerDependencies : {}, + peerDependenciesMeta: options.pkg.peerDependenciesMeta, + prepare: options.prepare, + prod: !options.wantedDependency.dev && !options.wantedDependency.optional, + requiresBuild: options.neverBuiltDependencies.has(options.pkg.name) ? false : options.dependencyLockfile != null ? Boolean(options.dependencyLockfile.requiresBuild) : void 0, + resolution: options.pkgResponse.body.resolution, + version: options.pkg.version + }; + } + function peerDependenciesWithoutOwn(pkg) { + var _a, _b; + if (pkg.peerDependencies == null && pkg.peerDependenciesMeta == null) + return pkg.peerDependencies; + const ownDeps = new Set([ + ...Object.keys((_a = pkg.dependencies) !== null && _a !== void 0 ? _a : {}), + ...Object.keys((_b = pkg.optionalDependencies) !== null && _b !== void 0 ? _b : {}) + ]); + const result = {}; + if (pkg.peerDependencies != null) { + for (const [peerName, peerRange] of Object.entries(pkg.peerDependencies)) { + if (ownDeps.has(peerName)) + continue; + result[peerName] = peerRange; + } + } + if (pkg.peerDependenciesMeta != null) { + for (const [peerName, peerMeta] of Object.entries(pkg.peerDependenciesMeta)) { + if (ownDeps.has(peerName) || result[peerName] || peerMeta.optional !== true) + continue; + result[peerName] = "*"; + } + } + if (isEmpty_1.default(result)) + return void 0; + return result; + } + } +}); + +// ../resolve-dependencies/lib/resolveDependencyTree.js +var require_resolveDependencyTree = __commonJS({ + "../resolve-dependencies/lib/resolveDependencyTree.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var partition_1 = __importDefault(require_partition4()); + var nodeIdUtils_1 = require_nodeIdUtils(); + var resolveDependencies_1 = __importDefault(require_resolveDependencies()); + __exportStar(require_nodeIdUtils(), exports2); + async function default_1(importers, opts) { + var _a, _b; + const directDepsByImporterId = {}; + const wantedToBeSkippedPackageIds = new Set(); + const ctx = { + childrenByParentDepPath: {}, + currentLockfile: opts.currentLockfile, + defaultTag: opts.tag, + dependenciesTree: {}, + dryRun: opts.dryRun, + engineStrict: opts.engineStrict, + force: opts.force, + forceFullResolution: opts.forceFullResolution, + linkWorkspacePackagesDepth: (_a = opts.linkWorkspacePackagesDepth) !== null && _a !== void 0 ? _a : -1, + lockfileDir: opts.lockfileDir, + neverBuiltDependencies: (_b = opts.neverBuiltDependencies) !== null && _b !== void 0 ? _b : new Set(), + nodeVersion: opts.nodeVersion, + outdatedDependencies: {}, + pendingNodes: [], + pnpmVersion: opts.pnpmVersion, + preferWorkspacePackages: opts.preferWorkspacePackages, + readPackageHook: opts.hooks.readPackage, + registries: opts.registries, + resolvedPackagesByDepPath: {}, + skipped: wantedToBeSkippedPackageIds, + storeController: opts.storeController, + updateMatching: opts.updateMatching, + virtualStoreDir: opts.virtualStoreDir, + wantedLockfile: opts.wantedLockfile + }; + await Promise.all(importers.map(async (importer) => { + var _a2; + const projectSnapshot = opts.wantedLockfile.importers[importer.id]; + const linkedDependencies = []; + const resolveCtx = { + ...ctx, + linkedDependencies, + modulesDir: importer.modulesDir, + prefix: importer.rootDir + }; + const proceed = importer.id === "." || importer.hasRemovedDependencies === true || importer.wantedDependencies.some((wantedDep) => wantedDep["isNew"]); + const resolveOpts = { + currentDepth: 0, + parentPkg: { + installable: true, + nodeId: `>${importer.id}>`, + optional: false, + depPath: importer.id + }, + proceed, + resolvedDependencies: { + ...projectSnapshot.dependencies, + ...projectSnapshot.devDependencies, + ...projectSnapshot.optionalDependencies + }, + updateDepth: -1, + workspacePackages: opts.workspacePackages + }; + directDepsByImporterId[importer.id] = await resolveDependencies_1.default(resolveCtx, (_a2 = importer.preferredVersions) !== null && _a2 !== void 0 ? _a2 : {}, importer.wantedDependencies, resolveOpts); + })); + ctx.pendingNodes.forEach((pendingNode) => { + ctx.dependenciesTree[pendingNode.nodeId] = { + children: () => buildTree(ctx, pendingNode.nodeId, pendingNode.resolvedPackage.id, ctx.childrenByParentDepPath[pendingNode.resolvedPackage.depPath], pendingNode.depth + 1, pendingNode.installable), + depth: pendingNode.depth, + installable: pendingNode.installable, + resolvedPackage: pendingNode.resolvedPackage + }; + }); + const resolvedImporters = {}; + for (const { id } of importers) { + const directDeps = directDepsByImporterId[id]; + const [linkedDependencies, directNonLinkedDeps] = partition_1.default((dep) => dep.isLinkedDependency === true, directDeps); + resolvedImporters[id] = { + directDependencies: directDeps.map((dep) => { + if (dep.isLinkedDependency === true) { + return dep; + } + const resolvedPackage = ctx.dependenciesTree[dep.nodeId].resolvedPackage; + return { + alias: dep.alias, + dev: resolvedPackage.dev, + name: resolvedPackage.name, + normalizedPref: dep.normalizedPref, + optional: resolvedPackage.optional, + pkgId: resolvedPackage.id, + resolution: resolvedPackage.resolution, + version: resolvedPackage.version + }; + }), + directNodeIdsByAlias: directNonLinkedDeps.reduce((acc, dependency) => { + acc[dependency.alias] = dependency.nodeId; + return acc; + }, {}), + linkedDependencies + }; + } + return { + dependenciesTree: ctx.dependenciesTree, + outdatedDependencies: ctx.outdatedDependencies, + resolvedImporters, + resolvedPackagesByDepPath: ctx.resolvedPackagesByDepPath, + wantedToBeSkippedPackageIds + }; + } + exports2.default = default_1; + function buildTree(ctx, parentNodeId, parentId, children, depth, installable) { + const childrenNodeIds = {}; + for (const child of children) { + if (child.depPath.startsWith("link:")) { + childrenNodeIds[child.alias] = child.depPath; + continue; + } + if (nodeIdUtils_1.nodeIdContainsSequence(parentNodeId, parentId, child.depPath)) { + continue; + } + const childNodeId = nodeIdUtils_1.createNodeId(parentNodeId, child.depPath); + childrenNodeIds[child.alias] = childNodeId; + installable = installable && !ctx.skipped.has(child.depPath); + ctx.dependenciesTree[childNodeId] = { + children: () => buildTree(ctx, childNodeId, child.depPath, ctx.childrenByParentDepPath[child.depPath], depth + 1, installable), + depth, + installable, + resolvedPackage: ctx.resolvedPackagesByDepPath[child.depPath] + }; + } + return childrenNodeIds; + } + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/scan.js +var require_scan4 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/scan.js"(exports2, module2) { + var _curry3 = require_curry3(); + var scan = /* @__PURE__ */ _curry3(function scan2(fn2, acc, list) { + var idx = 0; + var len = list.length; + var result = [acc]; + while (idx < len) { + acc = fn2(acc, list[idx]); + result[idx + 1] = acc; + idx += 1; + } + return result; + }); + module2.exports = scan; + } +}); + +// ../resolve-dependencies/lib/resolvePeers.js +var require_resolvePeers = __commonJS({ + "../resolve-dependencies/lib/resolvePeers.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var crypto_1 = __importDefault(require("crypto")); + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var logger_1 = __importDefault(require_lib6()); + var dependency_path_1 = require_lib33(); + var fromPairs_1 = __importDefault(require_fromPairs()); + var isEmpty_1 = __importDefault(require_isEmpty2()); + var scan_1 = __importDefault(require_scan4()); + var semver_1 = __importDefault(require_semver2()); + var nodeIdUtils_1 = require_nodeIdUtils(); + function default_1(opts) { + const depGraph = {}; + const pathsByNodeId = {}; + const _createPkgsByName = createPkgsByName.bind(null, opts.dependenciesTree); + const rootProject = opts.projects.length > 1 ? opts.projects.find(({ id }) => id === ".") : null; + const rootPkgsByName = rootProject == null ? {} : _createPkgsByName(rootProject); + for (const { directNodeIdsByAlias, topParents, rootDir } of opts.projects) { + const pkgsByName = { + ...rootPkgsByName, + ..._createPkgsByName({ directNodeIdsByAlias, topParents }) + }; + resolvePeersOfChildren(directNodeIdsByAlias, pkgsByName, { + dependenciesTree: opts.dependenciesTree, + depGraph, + lockfileDir: opts.lockfileDir, + pathsByNodeId, + peersCache: new Map(), + purePkgs: new Set(), + rootDir, + strictPeerDependencies: opts.strictPeerDependencies, + virtualStoreDir: opts.virtualStoreDir + }); + } + Object.values(depGraph).forEach((node) => { + node.children = Object.keys(node.children).reduce((acc, alias) => { + var _a; + acc[alias] = (_a = pathsByNodeId[node.children[alias]]) !== null && _a !== void 0 ? _a : node.children[alias]; + return acc; + }, {}); + }); + const dependenciesByProjectId = {}; + for (const { directNodeIdsByAlias, id } of opts.projects) { + dependenciesByProjectId[id] = Object.keys(directNodeIdsByAlias).reduce((rootPathsByAlias, alias) => { + rootPathsByAlias[alias] = pathsByNodeId[directNodeIdsByAlias[alias]]; + return rootPathsByAlias; + }, {}); + } + return { + dependenciesGraph: depGraph, + dependenciesByProjectId + }; + } + exports2.default = default_1; + function createPkgsByName(dependenciesTree, { directNodeIdsByAlias, topParents }) { + return Object.assign(fromPairs_1.default(topParents.map(({ name, version }) => [ + name, + { + depth: 0, + version + } + ])), toPkgByName(Object.keys(directNodeIdsByAlias).map((alias) => ({ + alias, + node: dependenciesTree[directNodeIdsByAlias[alias]], + nodeId: directNodeIdsByAlias[alias] + })))); + } + function resolvePeersOfNode(nodeId, parentParentPkgs, ctx) { + var _a; + const node = ctx.dependenciesTree[nodeId]; + if (node.depth === -1) + return { resolvedPeers: {}, missingPeers: [] }; + const resolvedPackage = node.resolvedPackage; + if (ctx.purePkgs.has(resolvedPackage.depPath) && ctx.depGraph[resolvedPackage.depPath].depth <= node.depth && isEmpty_1.default(resolvedPackage.peerDependencies)) { + ctx.pathsByNodeId[nodeId] = resolvedPackage.depPath; + return { resolvedPeers: {}, missingPeers: [] }; + } + if (typeof node.children === "function") { + node.children = node.children(); + } + const children = node.children; + const parentPkgs = isEmpty_1.default(children) ? parentParentPkgs : { + ...parentParentPkgs, + ...toPkgByName(Object.keys(children).map((alias) => ({ + alias, + node: ctx.dependenciesTree[children[alias]], + nodeId: children[alias] + }))) + }; + const hit = (_a = ctx.peersCache.get(resolvedPackage.depPath)) === null || _a === void 0 ? void 0 : _a.find((cache) => cache.resolvedPeers.every(([name, cachedNodeId]) => { + var _a2; + const parentPkgNodeId = (_a2 = parentPkgs[name]) === null || _a2 === void 0 ? void 0 : _a2.nodeId; + if (!parentPkgNodeId || !cachedNodeId) + return false; + if (parentPkgs[name].nodeId === cachedNodeId) + return true; + if (ctx.pathsByNodeId[cachedNodeId] && ctx.pathsByNodeId[cachedNodeId] === ctx.pathsByNodeId[parentPkgs[name].nodeId]) + return true; + const parentDepPath = ctx.dependenciesTree[parentPkgNodeId].resolvedPackage.depPath; + if (!ctx.purePkgs.has(parentDepPath)) + return false; + const cachedDepPath = ctx.dependenciesTree[cachedNodeId].resolvedPackage.depPath; + return parentDepPath === cachedDepPath; + }) && cache.missingPeers.every((missingPeer) => !parentPkgs[missingPeer])); + if (hit != null) { + ctx.pathsByNodeId[nodeId] = hit.depPath; + ctx.depGraph[hit.depPath].depth = Math.min(ctx.depGraph[hit.depPath].depth, node.depth); + return { + missingPeers: hit.missingPeers, + resolvedPeers: fromPairs_1.default(hit.resolvedPeers) + }; + } + const { resolvedPeers: unknownResolvedPeersOfChildren, missingPeers: missingPeersOfChildren } = resolvePeersOfChildren(children, parentPkgs, ctx); + const { resolvedPeers, missingPeers } = isEmpty_1.default(resolvedPackage.peerDependencies) ? { resolvedPeers: {}, missingPeers: [] } : resolvePeers({ + currentDepth: node.depth, + dependenciesTree: ctx.dependenciesTree, + lockfileDir: ctx.lockfileDir, + nodeId, + parentPkgs, + resolvedPackage, + rootDir: ctx.rootDir, + strictPeerDependencies: ctx.strictPeerDependencies + }); + const allResolvedPeers = Object.assign(unknownResolvedPeersOfChildren, resolvedPeers); + delete allResolvedPeers[node.resolvedPackage.name]; + const allMissingPeers = Array.from(new Set([...missingPeersOfChildren, ...missingPeers])); + let depPath; + if (isEmpty_1.default(allResolvedPeers)) { + depPath = resolvedPackage.depPath; + } else { + const peersFolderSuffix = createPeersFolderSuffix(Object.keys(allResolvedPeers).map((alias) => ctx.dependenciesTree[allResolvedPeers[alias]].resolvedPackage).map(({ name, version }) => ({ name, version }))); + depPath = `${resolvedPackage.depPath}${peersFolderSuffix}`; + } + const localLocation = path_1.default.join(ctx.virtualStoreDir, dependency_path_1.depPathToFilename(depPath, ctx.lockfileDir)); + const modules = path_1.default.join(localLocation, "node_modules"); + const isPure = isEmpty_1.default(allResolvedPeers) && allMissingPeers.length === 0; + if (isPure) { + ctx.purePkgs.add(resolvedPackage.depPath); + } else { + const cache = { + missingPeers: allMissingPeers, + depPath, + resolvedPeers: Object.entries(allResolvedPeers) + }; + if (ctx.peersCache.has(resolvedPackage.depPath)) { + ctx.peersCache.get(resolvedPackage.depPath).push(cache); + } else { + ctx.peersCache.set(resolvedPackage.depPath, [cache]); + } + } + ctx.pathsByNodeId[nodeId] = depPath; + const peerDependencies = { ...resolvedPackage.peerDependencies }; + if (!ctx.depGraph[depPath] || ctx.depGraph[depPath].depth > node.depth) { + const dir = path_1.default.join(modules, resolvedPackage.name); + const transitivePeerDependencies = new Set(); + const unknownPeers = [ + ...Object.keys(unknownResolvedPeersOfChildren), + ...missingPeersOfChildren + ]; + if (unknownPeers.length > 0) { + for (const unknownPeer of unknownPeers) { + if (!peerDependencies[unknownPeer]) { + transitivePeerDependencies.add(unknownPeer); + } + } + } + ctx.depGraph[depPath] = { + ...node.resolvedPackage, + children: Object.assign(getPreviouslyResolvedChildren(nodeId, ctx.dependenciesTree), children, resolvedPeers), + depPath, + depth: node.depth, + dir, + installable: node.installable, + isPure, + modules, + peerDependencies, + transitivePeerDependencies + }; + } + return { resolvedPeers: allResolvedPeers, missingPeers: allMissingPeers }; + } + function getPreviouslyResolvedChildren(nodeId, dependenciesTree) { + const parentIds = nodeIdUtils_1.splitNodeId(nodeId); + const ownId = parentIds.pop(); + const allChildren = {}; + if (!ownId || !parentIds.includes(ownId)) + return allChildren; + const nodeIdChunks = parentIds.join(">").split(ownId); + nodeIdChunks.pop(); + nodeIdChunks.reduce((accNodeId, part) => { + accNodeId += `${part}${ownId}`; + const parentNode = dependenciesTree[`${accNodeId}>`]; + Object.assign(allChildren, typeof parentNode.children === "function" ? parentNode.children() : parentNode.children); + return accNodeId; + }, ">"); + return allChildren; + } + function resolvePeersOfChildren(children, parentPkgs, ctx) { + const allResolvedPeers = {}; + const allMissingPeers = new Set(); + for (const childNodeId of Object.values(children)) { + const { resolvedPeers, missingPeers } = resolvePeersOfNode(childNodeId, parentPkgs, ctx); + Object.assign(allResolvedPeers, resolvedPeers); + missingPeers.forEach((missingPeer) => allMissingPeers.add(missingPeer)); + } + const unknownResolvedPeersOfChildren = Object.keys(allResolvedPeers).filter((alias) => !children[alias]).reduce((acc, peer) => { + acc[peer] = allResolvedPeers[peer]; + return acc; + }, {}); + return { resolvedPeers: unknownResolvedPeersOfChildren, missingPeers: Array.from(allMissingPeers) }; + } + function resolvePeers(ctx) { + var _a, _b; + const resolvedPeers = {}; + const missingPeers = []; + for (const peerName in ctx.resolvedPackage.peerDependencies) { + const peerVersionRange = ctx.resolvedPackage.peerDependencies[peerName]; + const resolved = ctx.parentPkgs[peerName]; + if (!resolved) { + missingPeers.push(peerName); + if (((_b = (_a = ctx.resolvedPackage.peerDependenciesMeta) === null || _a === void 0 ? void 0 : _a[peerName]) === null || _b === void 0 ? void 0 : _b.optional) === true) { + continue; + } + const friendlyPath = nodeIdToFriendlyPath(ctx); + const message2 = `${friendlyPath ? `${friendlyPath}: ` : ""}${packageFriendlyId(ctx.resolvedPackage)} requires a peer of ${peerName}@${peerVersionRange} but none was installed.`; + if (ctx.strictPeerDependencies) { + throw new error_1.default("MISSING_PEER_DEPENDENCY", message2); + } + logger_1.default.warn({ + message: message2, + prefix: ctx.rootDir + }); + continue; + } + if (!semver_1.default.satisfies(resolved.version, peerVersionRange)) { + const friendlyPath = nodeIdToFriendlyPath(ctx); + const message2 = `${friendlyPath ? `${friendlyPath}: ` : ""}${packageFriendlyId(ctx.resolvedPackage)} requires a peer of ${peerName}@${peerVersionRange} but version ${resolved.version} was installed.`; + if (ctx.strictPeerDependencies) { + throw new error_1.default("INVALID_PEER_DEPENDENCY", message2); + } + logger_1.default.warn({ + message: message2, + prefix: ctx.rootDir + }); + } + if (resolved === null || resolved === void 0 ? void 0 : resolved.nodeId) + resolvedPeers[peerName] = resolved.nodeId; + } + return { resolvedPeers, missingPeers }; + } + function packageFriendlyId(manifest) { + return `${manifest.name}@${manifest.version}`; + } + function nodeIdToFriendlyPath({ dependenciesTree, lockfileDir, nodeId, rootDir }) { + const parts = nodeIdUtils_1.splitNodeId(nodeId).slice(0, -1); + const result = scan_1.default((prevNodeId, pkgId) => nodeIdUtils_1.createNodeId(prevNodeId, pkgId), ">", parts).slice(2).map((nid) => dependenciesTree[nid].resolvedPackage.name); + const projectPath = path_1.default.relative(lockfileDir, rootDir); + if (projectPath) { + result.unshift(projectPath); + } + return result.join(" > "); + } + function toPkgByName(nodes) { + const pkgsByName = {}; + for (const { alias, node, nodeId } of nodes) { + pkgsByName[alias] = { + depth: node.depth, + nodeId, + version: node.resolvedPackage.version + }; + } + return pkgsByName; + } + function createPeersFolderSuffix(peers) { + const folderName = peers.map(({ name, version }) => `${name.replace("/", "+")}@${version}`).sort().join("+"); + if (folderName.length > 32) { + return `_${crypto_1.default.createHash("md5").update(folderName).digest("hex")}`; + } + return `_${folderName}`; + } + } +}); + +// ../resolve-dependencies/lib/updateLockfile.js +var require_updateLockfile = __commonJS({ + "../resolve-dependencies/lib/updateLockfile.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var logger_1 = __importDefault(require_lib6()); + var prune_lockfile_1 = require_lib74(); + var dp = __importStar2(require_lib33()); + var get_npm_tarball_url_1 = __importDefault(require_lib51()); + var isEmpty_1 = __importDefault(require_isEmpty2()); + var fromPairs_1 = __importDefault(require_fromPairs()); + var merge_1 = __importDefault(require_merge3()); + var partition_1 = __importDefault(require_partition4()); + var depPathToRef_1 = __importDefault(require_depPathToRef()); + function default_1(depGraph, lockfile, prefix, registries) { + var _a; + lockfile.packages = (_a = lockfile.packages) !== null && _a !== void 0 ? _a : {}; + const pendingRequiresBuilds = []; + for (const depPath of Object.keys(depGraph)) { + const depNode = depGraph[depPath]; + const [updatedOptionalDeps, updatedDeps] = partition_1.default((child) => depNode.optionalDependencies.has(child.alias), Object.keys(depNode.children).map((alias) => ({ alias, depPath: depNode.children[alias] }))); + lockfile.packages[depPath] = toLockfileDependency(pendingRequiresBuilds, depNode, { + depGraph, + depPath, + prevSnapshot: lockfile.packages[depPath], + registries, + registry: dp.getRegistryByPackageName(registries, depNode.name), + updatedDeps, + updatedOptionalDeps + }); + } + const warn = (message2) => logger_1.default.warn({ message: message2, prefix }); + return { + newLockfile: prune_lockfile_1.pruneSharedLockfile(lockfile, { warn }), + pendingRequiresBuilds + }; + } + exports2.default = default_1; + function toLockfileDependency(pendingRequiresBuilds, pkg, opts) { + var _a, _b, _c, _d, _e, _f; + const lockfileResolution = toLockfileResolution({ name: pkg.name, version: pkg.version }, opts.depPath, pkg.resolution, opts.registry); + const newResolvedDeps = updateResolvedDeps((_b = (_a = opts.prevSnapshot) === null || _a === void 0 ? void 0 : _a.dependencies) !== null && _b !== void 0 ? _b : {}, opts.updatedDeps, opts.registries, opts.depGraph); + const newResolvedOptionalDeps = updateResolvedDeps((_d = (_c = opts.prevSnapshot) === null || _c === void 0 ? void 0 : _c.optionalDependencies) !== null && _d !== void 0 ? _d : {}, opts.updatedOptionalDeps, opts.registries, opts.depGraph); + const result = { + resolution: lockfileResolution + }; + if (dp.isAbsolute(opts.depPath)) { + result["name"] = pkg.name; + if (pkg.version) { + result["version"] = pkg.version; + } + } + if (!isEmpty_1.default(newResolvedDeps)) { + result["dependencies"] = newResolvedDeps; + } + if (!isEmpty_1.default(newResolvedOptionalDeps)) { + result["optionalDependencies"] = newResolvedOptionalDeps; + } + if (pkg.dev && !pkg.prod) { + result["dev"] = true; + } else if (pkg.prod && !pkg.dev) { + result["dev"] = false; + } + if (pkg.optional) { + result["optional"] = true; + } + if (opts.depPath[0] !== "/" && !pkg.id.endsWith(opts.depPath)) { + result["id"] = pkg.id; + } + if (!isEmpty_1.default((_e = pkg.peerDependencies) !== null && _e !== void 0 ? _e : {})) { + result["peerDependencies"] = pkg.peerDependencies; + } + if (pkg.transitivePeerDependencies.size) { + result["transitivePeerDependencies"] = Array.from(pkg.transitivePeerDependencies).sort(); + } + if (pkg.peerDependenciesMeta != null) { + const normalizedPeerDependenciesMeta = {}; + for (const peer of Object.keys(pkg.peerDependenciesMeta)) { + if (pkg.peerDependenciesMeta[peer].optional) { + normalizedPeerDependenciesMeta[peer] = { optional: true }; + } + } + if (Object.keys(normalizedPeerDependenciesMeta).length > 0) { + result["peerDependenciesMeta"] = normalizedPeerDependenciesMeta; + } + } + if (pkg.additionalInfo.engines != null) { + for (const engine of Object.keys(pkg.additionalInfo.engines)) { + if (pkg.additionalInfo.engines[engine] === "*") + continue; + result["engines"] = result["engines"] || {}; + result["engines"][engine] = pkg.additionalInfo.engines[engine]; + } + } + if (pkg.additionalInfo.cpu != null) { + result["cpu"] = pkg.additionalInfo.cpu; + } + if (pkg.additionalInfo.os != null) { + result["os"] = pkg.additionalInfo.os; + } + if (Array.isArray(pkg.additionalInfo.bundledDependencies) || Array.isArray(pkg.additionalInfo.bundleDependencies)) { + result["bundledDependencies"] = (_f = pkg.additionalInfo.bundledDependencies) !== null && _f !== void 0 ? _f : pkg.additionalInfo.bundleDependencies; + } + if (pkg.additionalInfo.deprecated) { + result["deprecated"] = pkg.additionalInfo.deprecated; + } + if (pkg.hasBin) { + result["hasBin"] = true; + } + if (pkg.requiresBuild !== void 0) { + if (pkg.requiresBuild) { + result["requiresBuild"] = true; + } + } else if (opts.prevSnapshot != null) { + if (opts.prevSnapshot.requiresBuild) { + result["requiresBuild"] = opts.prevSnapshot.requiresBuild; + } + if (opts.prevSnapshot.prepare) { + result["prepare"] = opts.prevSnapshot.prepare; + } + } else if (pkg.prepare) { + result["prepare"] = true; + result["requiresBuild"] = true; + } else { + pendingRequiresBuilds.push(opts.depPath); + } + pkg.requiresBuild = result["requiresBuild"]; + return result; + } + function updateResolvedDeps(prevResolvedDeps, updatedDeps, registries, depGraph) { + const newResolvedDeps = fromPairs_1.default(updatedDeps.map(({ alias, depPath }) => { + if (depPath.startsWith("link:")) { + return [alias, depPath]; + } + const depNode = depGraph[depPath]; + return [ + alias, + depPathToRef_1.default(depNode.depPath, { + alias, + realName: depNode.name, + registries, + resolution: depNode.resolution + }) + ]; + })); + return merge_1.default(prevResolvedDeps, newResolvedDeps); + } + function toLockfileResolution(pkg, depPath, resolution, registry) { + if (dp.isAbsolute(depPath) || resolution.type !== void 0 || !resolution["integrity"]) { + return resolution; + } + const base = registry !== resolution["registry"] ? { registry: resolution["registry"] } : {}; + const expectedTarball = get_npm_tarball_url_1.default(pkg.name, pkg.version, { registry }); + const actualTarball = resolution["tarball"].replace("%2f", "/"); + if (removeProtocol(expectedTarball) !== removeProtocol(actualTarball)) { + return { + ...base, + integrity: resolution["integrity"], + tarball: relativeTarball(resolution["tarball"], registry) + }; + } + return { + ...base, + integrity: resolution["integrity"] + }; + } + function removeProtocol(url) { + return url.split("://")[1]; + } + function relativeTarball(tarball, registry) { + if (tarball.substr(0, registry.length) === registry) { + return tarball.substr(registry.length); + } + return tarball; + } + } +}); + +// ../resolve-dependencies/lib/updateProjectManifest.js +var require_updateProjectManifest = __commonJS({ + "../resolve-dependencies/lib/updateProjectManifest.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var manifest_utils_1 = require_lib15(); + var version_selector_type_1 = __importDefault(require_version_selector_type()); + async function updateProjectManifest(importer, opts) { + if (!importer.manifest) { + throw new Error("Cannot save because no package.json found"); + } + const specsToUpsert = opts.directDependencies.filter((rdd, index) => importer.wantedDependencies[index].updateSpec).map((rdd, index) => { + var _a, _b; + const wantedDep = importer.wantedDependencies[index]; + return resolvedDirectDepToSpecObject({ ...rdd, isNew: wantedDep.isNew, specRaw: wantedDep.raw }, importer, { + nodeExecPath: wantedDep.nodeExecPath, + pinnedVersion: (_b = (_a = wantedDep.pinnedVersion) !== null && _a !== void 0 ? _a : importer["pinnedVersion"]) !== null && _b !== void 0 ? _b : "major", + preserveWorkspaceProtocol: opts.preserveWorkspaceProtocol, + saveWorkspaceProtocol: opts.saveWorkspaceProtocol + }); + }); + for (const pkgToInstall of importer.wantedDependencies) { + if (pkgToInstall.updateSpec && pkgToInstall.alias && !specsToUpsert.some(({ alias }) => alias === pkgToInstall.alias)) { + specsToUpsert.push({ + alias: pkgToInstall.alias, + nodeExecPath: pkgToInstall.nodeExecPath, + peer: importer["peer"], + saveType: importer["targetDependenciesField"] + }); + } + } + const hookedManifest = await manifest_utils_1.updateProjectManifestObject(importer.rootDir, importer.manifest, specsToUpsert); + const originalManifest = importer.originalManifest != null ? await manifest_utils_1.updateProjectManifestObject(importer.rootDir, importer.originalManifest, specsToUpsert) : void 0; + return [hookedManifest, originalManifest]; + } + exports2.default = updateProjectManifest; + function resolvedDirectDepToSpecObject({ alias, isNew, name, normalizedPref, resolution, specRaw, version }, importer, opts) { + let pref; + if (normalizedPref) { + pref = normalizedPref; + } else { + if (isNew === true) { + pref = getPrefPreferSpecifiedSpec({ + alias, + name, + pinnedVersion: opts.pinnedVersion, + specRaw, + version + }); + } else { + pref = getPrefPreferSpecifiedExoticSpec({ + alias, + name, + pinnedVersion: opts.pinnedVersion, + specRaw, + version + }); + } + if (resolution.type === "directory" && (opts.saveWorkspaceProtocol || opts.preserveWorkspaceProtocol && specRaw.includes("@workspace:")) && !pref.startsWith("workspace:")) { + pref = `workspace:${pref}`; + } + } + return { + alias, + nodeExecPath: opts.nodeExecPath, + peer: importer["peer"], + pref, + saveType: isNew === true ? importer["targetDependenciesField"] : void 0 + }; + } + function getPrefPreferSpecifiedSpec(opts) { + var _a; + const prefix = manifest_utils_1.getPrefix(opts.alias, opts.name); + if ((_a = opts.specRaw) === null || _a === void 0 ? void 0 : _a.startsWith(`${opts.alias}@${prefix}`)) { + const range = opts.specRaw.substr(`${opts.alias}@${prefix}`.length); + if (range) { + const selector = version_selector_type_1.default(range); + if (selector != null && (selector.type === "version" || selector.type === "range")) { + return opts.specRaw.substr(opts.alias.length + 1); + } + } + } + return `${prefix}${manifest_utils_1.createVersionSpec(opts.version, opts.pinnedVersion)}`; + } + function getPrefPreferSpecifiedExoticSpec(opts) { + var _a; + const prefix = manifest_utils_1.getPrefix(opts.alias, opts.name); + if (((_a = opts.specRaw) === null || _a === void 0 ? void 0 : _a.startsWith(`${opts.alias}@${prefix}`)) && opts.specRaw !== `${opts.alias}@workspace:*`) { + const specWithoutName = opts.specRaw.substr(`${opts.alias}@${prefix}`.length); + const selector = version_selector_type_1.default(specWithoutName); + if (!(selector != null && (selector.type === "version" || selector.type === "range"))) { + return opts.specRaw.substr(opts.alias.length + 1); + } + } + return `${prefix}${manifest_utils_1.createVersionSpec(opts.version, opts.pinnedVersion)}`; + } + } +}); + +// ../resolve-dependencies/lib/index.js +var require_lib86 = __commonJS({ + "../resolve-dependencies/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var constants_1 = require_lib7(); + var core_loggers_1 = require_lib12(); + var manifest_utils_1 = require_lib15(); + var read_package_json_1 = require_lib32(); + var types_1 = require_lib14(); + var difference_1 = __importDefault(require_difference()); + var depPathToRef_1 = __importDefault(require_depPathToRef()); + var resolveDependencyTree_1 = __importDefault(require_resolveDependencyTree()); + var resolvePeers_1 = __importDefault(require_resolvePeers()); + var updateLockfile_1 = __importDefault(require_updateLockfile()); + var updateProjectManifest_1 = __importDefault(require_updateProjectManifest()); + async function default_1(importers, opts) { + var _a, _b, _c, _d, _e; + const { dependenciesTree, outdatedDependencies, resolvedImporters, resolvedPackagesByDepPath, wantedToBeSkippedPackageIds } = await resolveDependencyTree_1.default(importers, opts); + const linkedDependenciesByProjectId = {}; + const projectsToLink = await Promise.all(importers.map(async (project, index) => { + var _a2; + const resolvedImporter = resolvedImporters[project.id]; + linkedDependenciesByProjectId[project.id] = resolvedImporter.linkedDependencies; + let updatedManifest = project.manifest; + let updatedOriginalManifest = project.originalManifest; + if (project.updatePackageManifest) { + const manifests = await updateProjectManifest_1.default(importers[index], { + directDependencies: resolvedImporter.directDependencies, + preserveWorkspaceProtocol: opts.preserveWorkspaceProtocol, + saveWorkspaceProtocol: opts.saveWorkspaceProtocol + }); + updatedManifest = manifests[0]; + updatedOriginalManifest = manifests[1]; + } else { + core_loggers_1.packageManifestLogger.debug({ + prefix: project.rootDir, + updated: project.manifest + }); + } + if (updatedManifest != null) { + const projectSnapshot = opts.wantedLockfile.importers[project.id]; + opts.wantedLockfile.importers[project.id] = addDirectDependenciesToLockfile(updatedManifest, projectSnapshot, resolvedImporter.linkedDependencies, resolvedImporter.directDependencies, opts.registries); + } + const topParents = project.manifest ? await getTopParents(difference_1.default(Object.keys(manifest_utils_1.getAllDependenciesFromManifest(project.manifest)), resolvedImporter.directDependencies.filter((dep, index2) => project.wantedDependencies[index2].isNew === true).map(({ alias }) => alias) || []), project.modulesDir) : []; + project.manifest = (_a2 = updatedOriginalManifest !== null && updatedOriginalManifest !== void 0 ? updatedOriginalManifest : project.originalManifest) !== null && _a2 !== void 0 ? _a2 : project.manifest; + return { + binsDir: project.binsDir, + directNodeIdsByAlias: resolvedImporter.directNodeIdsByAlias, + id: project.id, + linkedDependencies: resolvedImporter.linkedDependencies, + manifest: project.manifest, + modulesDir: project.modulesDir, + rootDir: project.rootDir, + topParents + }; + })); + const { dependenciesGraph, dependenciesByProjectId } = resolvePeers_1.default({ + dependenciesTree, + lockfileDir: opts.lockfileDir, + projects: projectsToLink, + strictPeerDependencies: opts.strictPeerDependencies, + virtualStoreDir: opts.virtualStoreDir + }); + for (const { id } of projectsToLink) { + for (const [alias, depPath] of Object.entries(dependenciesByProjectId[id])) { + const depNode = dependenciesGraph[depPath]; + if (depNode.isPure) + continue; + const projectSnapshot = opts.wantedLockfile.importers[id]; + const ref = depPathToRef_1.default(depPath, { + alias, + realName: depNode.name, + registries: opts.registries, + resolution: depNode.resolution + }); + if ((_a = projectSnapshot.dependencies) === null || _a === void 0 ? void 0 : _a[alias]) { + projectSnapshot.dependencies[alias] = ref; + } else if ((_b = projectSnapshot.devDependencies) === null || _b === void 0 ? void 0 : _b[alias]) { + projectSnapshot.devDependencies[alias] = ref; + } else if ((_c = projectSnapshot.optionalDependencies) === null || _c === void 0 ? void 0 : _c[alias]) { + projectSnapshot.optionalDependencies[alias] = ref; + } + } + } + const { newLockfile, pendingRequiresBuilds } = updateLockfile_1.default(dependenciesGraph, opts.wantedLockfile, opts.virtualStoreDir, opts.registries); + if (opts.forceFullResolution && opts.wantedLockfile != null) { + for (const [depPath, pkg] of Object.entries(dependenciesGraph)) { + if (((_d = opts.neverBuiltDependencies) === null || _d === void 0 ? void 0 : _d.has(pkg.name)) || ((_e = opts.wantedLockfile.packages) === null || _e === void 0 ? void 0 : _e[depPath]) == null || pkg.requiresBuild) + continue; + pendingRequiresBuilds.push(depPath); + } + } + const waitTillAllFetchingsFinish = async () => Promise.all(Object.values(resolvedPackagesByDepPath).map(async ({ finishing }) => finishing === null || finishing === void 0 ? void 0 : finishing())); + return { + dependenciesByProjectId, + dependenciesGraph, + finishLockfileUpdates: finishLockfileUpdates.bind(null, dependenciesGraph, pendingRequiresBuilds, newLockfile), + outdatedDependencies, + linkedDependenciesByProjectId, + newLockfile, + waitTillAllFetchingsFinish, + wantedToBeSkippedPackageIds + }; + } + exports2.default = default_1; + async function finishLockfileUpdates(dependenciesGraph, pendingRequiresBuilds, newLockfile) { + return Promise.all(pendingRequiresBuilds.map(async (depPath) => { + const depNode = dependenciesGraph[depPath]; + if (depNode.optional) { + depNode.requiresBuild = true; + } else if (depNode.fetchingBundledManifest != null) { + const filesResponse = await depNode.fetchingFiles(); + const pkgJson = await depNode.fetchingBundledManifest(); + depNode.requiresBuild = Boolean(pkgJson.scripts != null && (Boolean(pkgJson.scripts.preinstall) || Boolean(pkgJson.scripts.install) || Boolean(pkgJson.scripts.postinstall)) || filesResponse.filesIndex["binding.gyp"] || Object.keys(filesResponse.filesIndex).some((filename) => !(filename.match(/^[.]hooks[\\/]/) == null))); + } else { + throw new Error(`Cannot create ${constants_1.WANTED_LOCKFILE} because raw manifest (aka package.json) wasn't fetched for "${depPath}"`); + } + if (depNode.requiresBuild && newLockfile.packages[depPath]) { + newLockfile.packages[depPath].requiresBuild = true; + } + })); + } + function addDirectDependenciesToLockfile(newManifest, projectSnapshot, linkedPackages, directDependencies, registries) { + var _a, _b, _c; + const newProjectSnapshot = { + dependencies: {}, + devDependencies: {}, + optionalDependencies: {}, + specifiers: {} + }; + linkedPackages.forEach((linkedPkg) => { + newProjectSnapshot.specifiers[linkedPkg.alias] = manifest_utils_1.getSpecFromPackageManifest(newManifest, linkedPkg.alias); + }); + const directDependenciesByAlias = directDependencies.reduce((acc, directDependency) => { + acc[directDependency.alias] = directDependency; + return acc; + }, {}); + const allDeps = Array.from(new Set(Object.keys(manifest_utils_1.getAllDependenciesFromManifest(newManifest)))); + for (const alias of allDeps) { + if (directDependenciesByAlias[alias]) { + const dep = directDependenciesByAlias[alias]; + const ref = depPathToRef_1.default(dep.pkgId, { + alias: dep.alias, + realName: dep.name, + registries, + resolution: dep.resolution + }); + if (dep.dev) { + newProjectSnapshot.devDependencies[dep.alias] = ref; + } else if (dep.optional) { + newProjectSnapshot.optionalDependencies[dep.alias] = ref; + } else { + newProjectSnapshot.dependencies[dep.alias] = ref; + } + newProjectSnapshot.specifiers[dep.alias] = manifest_utils_1.getSpecFromPackageManifest(newManifest, dep.alias); + } else if (projectSnapshot.specifiers[alias]) { + newProjectSnapshot.specifiers[alias] = projectSnapshot.specifiers[alias]; + if ((_a = projectSnapshot.dependencies) === null || _a === void 0 ? void 0 : _a[alias]) { + newProjectSnapshot.dependencies[alias] = projectSnapshot.dependencies[alias]; + } else if ((_b = projectSnapshot.optionalDependencies) === null || _b === void 0 ? void 0 : _b[alias]) { + newProjectSnapshot.optionalDependencies[alias] = projectSnapshot.optionalDependencies[alias]; + } else if ((_c = projectSnapshot.devDependencies) === null || _c === void 0 ? void 0 : _c[alias]) { + newProjectSnapshot.devDependencies[alias] = projectSnapshot.devDependencies[alias]; + } + } + } + alignDependencyTypes(newManifest, newProjectSnapshot); + return newProjectSnapshot; + } + function alignDependencyTypes(manifest, projectSnapshot) { + var _a; + const depTypesOfAliases = getAliasToDependencyTypeMap(manifest); + for (const depType of types_1.DEPENDENCIES_FIELDS) { + if (projectSnapshot[depType] == null) + continue; + for (const alias of Object.keys((_a = projectSnapshot[depType]) !== null && _a !== void 0 ? _a : {})) { + if (depType === depTypesOfAliases[alias] || !depTypesOfAliases[alias]) + continue; + projectSnapshot[depTypesOfAliases[alias]][alias] = projectSnapshot[depType][alias]; + delete projectSnapshot[depType][alias]; + } + } + } + function getAliasToDependencyTypeMap(manifest) { + var _a; + const depTypesOfAliases = {}; + for (const depType of types_1.DEPENDENCIES_FIELDS) { + if (manifest[depType] == null) + continue; + for (const alias of Object.keys((_a = manifest[depType]) !== null && _a !== void 0 ? _a : {})) { + if (!depTypesOfAliases[alias]) { + depTypesOfAliases[alias] = depType; + } + } + } + return depTypesOfAliases; + } + async function getTopParents(pkgNames, modules) { + const pkgs = await Promise.all(pkgNames.map((pkgName) => path_1.default.join(modules, pkgName)).map(read_package_json_1.safeReadPackageFromDir)); + return pkgs.filter(Boolean).map(({ name, version }) => ({ name, version })); + } + } +}); + +// ../../node_modules/.pnpm/resolve-link-target@2.0.0/node_modules/resolve-link-target/index.js +var require_resolve_link_target = __commonJS({ + "../../node_modules/.pnpm/resolve-link-target@2.0.0/node_modules/resolve-link-target/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var path = require("path"); + module2.exports = getLinkTarget; + module2.exports.sync = getLinkTargetSync; + async function getLinkTarget(linkPath) { + linkPath = path.resolve(linkPath); + const target = await fs.promises.readlink(linkPath); + return _resolveLink(linkPath, target); + } + function getLinkTargetSync(linkPath) { + linkPath = path.resolve(linkPath); + const target = fs.readlinkSync(linkPath); + return _resolveLink(linkPath, target); + } + function _resolveLink(dest, target) { + if (path.isAbsolute(target)) { + return path.resolve(target); + } + return path.join(path.dirname(dest), target); + } + } +}); + +// ../../node_modules/.pnpm/is-inner-link@4.0.0/node_modules/is-inner-link/index.js +var require_is_inner_link = __commonJS({ + "../../node_modules/.pnpm/is-inner-link@4.0.0/node_modules/is-inner-link/index.js"(exports2, module2) { + "use strict"; + var path = require("path"); + var isSubdir = require_is_subdir(); + var resolveLinkTarget = require_resolve_link_target(); + module2.exports = async function(parent, relativePathToLink) { + const linkPath = path.resolve(parent, relativePathToLink); + const target = await resolveLinkTarget(linkPath); + return { + isInner: isSubdir(parent, target), + target + }; + }; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/flatten.js +var require_flatten2 = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/flatten.js"(exports2, module2) { + var _curry1 = require_curry1(); + var _makeFlat = require_makeFlat(); + var flatten = /* @__PURE__ */ _curry1(/* @__PURE__ */ _makeFlat(true)); + module2.exports = flatten; + } +}); + +// ../parse-wanted-dependency/lib/index.js +var require_lib87 = __commonJS({ + "../parse-wanted-dependency/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var validate_npm_package_name_1 = __importDefault(require_validate_npm_package_name()); + function parseWantedDependency(rawWantedDependency) { + const versionDelimiter = rawWantedDependency.indexOf("@", 1); + if (versionDelimiter !== -1) { + const alias = rawWantedDependency.substr(0, versionDelimiter); + if (validate_npm_package_name_1.default(alias).validForOldPackages) { + return { + alias, + pref: rawWantedDependency.substr(versionDelimiter + 1) + }; + } + return { + pref: rawWantedDependency + }; + } + if (validate_npm_package_name_1.default(rawWantedDependency).validForOldPackages) { + return { + alias: rawWantedDependency + }; + } + return { + pref: rawWantedDependency + }; + } + exports2.default = parseWantedDependency; + } +}); + +// ../../node_modules/.pnpm/semver-utils@1.1.4/node_modules/semver-utils/semver-utils.js +var require_semver_utils = __commonJS({ + "../../node_modules/.pnpm/semver-utils@1.1.4/node_modules/semver-utils/semver-utils.js"(exports2, module2) { + (function() { + "use strict"; + var reSemver = /^v?((\d+)\.(\d+)\.(\d+))(?:-([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?(?:\+([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?$/, reSemverRange = /\s*((\|\||\-)|(((?:(?:~?[<>]?)|\^?)=?)\s*(v)?([0-9]+)(\.(x|\*|[0-9]+))?(\.(x|\*|[0-9]+))?(([\-+])([a-zA-Z0-9\.-]+))?))\s*/g; + function pruned(obj) { + var o = {}; + for (var key in obj) { + if (typeof obj[key] !== "undefined") { + o[key] = obj[key]; + } + } + return o; + } + function stringifySemver(obj) { + var str = ""; + str += obj.major || "0"; + str += "."; + str += obj.minor || "0"; + str += "."; + str += obj.patch || "0"; + if (obj.release) { + str += "-" + obj.release; + } + if (obj.build) { + str += "+" + obj.build; + } + return str; + } + function stringifySemverRange(arr) { + var str = ""; + function stringify(ver) { + if (ver.operator) { + str += ver.operator + " "; + } + if (ver.major) { + str += ver.toString() + " "; + } + } + arr.forEach(stringify); + return str.trim(); + } + function SemVer(obj) { + if (!obj) { + return; + } + var me = this; + Object.keys(obj).forEach(function(key) { + me[key] = obj[key]; + }); + } + SemVer.prototype.toString = function() { + return stringifySemver(this); + }; + function parseSemver(version) { + var m = reSemver.exec(version) || [], ver = new SemVer(pruned({ + semver: m[0], + version: m[1], + major: m[2], + minor: m[3], + patch: m[4], + release: m[5], + build: m[6] + })); + if (m.length === 0) { + ver = null; + } + return ver; + } + function parseSemverRange(str) { + var m, arr = [], obj; + while (m = reSemverRange.exec(str)) { + obj = { + semver: m[3], + operator: m[4] || m[2], + major: m[6], + minor: m[8], + patch: m[10] + }; + if (m[12] === "+") { + obj.build = m[13]; + } + if (m[12] === "-") { + obj.release = m[13]; + } + arr.push(new SemVer(pruned(obj))); + } + return arr; + } + module2.exports.parse = parseSemver; + module2.exports.stringify = stringifySemver; + module2.exports.parseRange = parseSemverRange; + module2.exports.stringifyRange = stringifySemverRange; + })(); + } +}); + +// ../supi/lib/guessPinnedVersionFromExistingSpec.js +var require_guessPinnedVersionFromExistingSpec = __commonJS({ + "../supi/lib/guessPinnedVersionFromExistingSpec.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var semver_utils_1 = require_semver_utils(); + function guessPinnedVersionFromExistingSpec(spec) { + if (spec.startsWith("workspace:")) + spec = spec.substr("workspace:".length); + if (spec === "*") + return "none"; + const parsedRange = semver_utils_1.parseRange(spec); + if (parsedRange.length !== 1) + return void 0; + const versionObject = parsedRange[0]; + switch (versionObject.operator) { + case "~": + return "minor"; + case "^": + return "major"; + case void 0: + if (versionObject.patch) + return "patch"; + if (versionObject.minor) + return "minor"; + } + return void 0; + } + exports2.default = guessPinnedVersionFromExistingSpec; + } +}); + +// ../supi/lib/parseWantedDependencies.js +var require_parseWantedDependencies = __commonJS({ + "../supi/lib/parseWantedDependencies.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var parse_wanted_dependency_1 = __importDefault(require_lib87()); + var guessPinnedVersionFromExistingSpec_1 = __importDefault(require_guessPinnedVersionFromExistingSpec()); + function parseWantedDependencies(rawWantedDependencies, opts) { + return rawWantedDependencies.map((rawWantedDependency) => { + var _a; + const parsed = parse_wanted_dependency_1.default(rawWantedDependency); + const alias = parsed["alias"]; + let pref = parsed["pref"]; + let pinnedVersion; + if (!opts.allowNew && (!alias || !opts.currentPrefs[alias])) { + return null; + } + if (alias && opts.currentPrefs[alias]) { + if (!pref) { + pref = opts.currentPrefs[alias].startsWith("workspace:") && opts.updateWorkspaceDependencies === true ? "workspace:*" : opts.currentPrefs[alias]; + } + pinnedVersion = guessPinnedVersionFromExistingSpec_1.default(opts.currentPrefs[alias]); + } + const result = { + alias, + dev: Boolean(opts.dev || alias && !!opts.devDependencies[alias]), + optional: Boolean(opts.optional || alias && !!opts.optionalDependencies[alias]), + pinnedVersion, + raw: rawWantedDependency + }; + if (pref) { + return { + ...result, + pref + }; + } + if (alias && ((_a = opts.preferredSpecs) === null || _a === void 0 ? void 0 : _a[alias])) { + return { + ...result, + pref: opts.preferredSpecs[alias], + raw: `${rawWantedDependency}@${opts.preferredSpecs[alias]}` + }; + } + return { + ...result, + pref: opts.defaultTag + }; + }).filter((wd) => wd !== null); + } + exports2.default = parseWantedDependencies; + } +}); + +// ../supi/lib/safeIsInnerLink.js +var require_safeIsInnerLink = __commonJS({ + "../supi/lib/safeIsInnerLink.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var logger_1 = __importDefault(require_lib6()); + var is_inner_link_1 = __importDefault(require_is_inner_link()); + var is_subdir_1 = __importDefault(require_is_subdir()); + async function safeIsInnerLink(projectModulesDir, depName, opts) { + try { + const link = await is_inner_link_1.default(projectModulesDir, depName); + if (link.isInner) + return true; + if (is_subdir_1.default(opts.virtualStoreDir, link.target) || is_subdir_1.default(opts.storeDir, link.target)) + return true; + return link.target; + } catch (err) { + if (err.code === "ENOENT") + return true; + if (opts.hideAlienModules) { + logger_1.default.warn({ + message: `Moving ${depName} that was installed by a different package manager to "node_modules/.ignored`, + prefix: opts.projectDir + }); + const ignoredDir = path_1.default.join(projectModulesDir, ".ignored", depName); + await fs_1.promises.mkdir(path_1.default.dirname(ignoredDir), { recursive: true }); + await fs_1.promises.rename(path_1.default.join(projectModulesDir, depName), ignoredDir); + } + return true; + } + } + exports2.default = safeIsInnerLink; + } +}); + +// ../supi/lib/uninstall/removeDeps.js +var require_removeDeps = __commonJS({ + "../supi/lib/uninstall/removeDeps.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var core_loggers_1 = require_lib12(); + var types_1 = require_lib14(); + async function default_1(packageManifest, removedPackages, opts) { + if (opts.saveType) { + if (packageManifest[opts.saveType] == null) + return packageManifest; + removedPackages.forEach((dependency) => { + delete packageManifest[opts.saveType][dependency]; + }); + } else { + types_1.DEPENDENCIES_FIELDS.filter((depField) => packageManifest[depField]).forEach((depField) => { + removedPackages.forEach((dependency) => { + delete packageManifest[depField][dependency]; + }); + }); + } + if (packageManifest.peerDependencies != null) { + for (const removedDependency of removedPackages) { + delete packageManifest.peerDependencies[removedDependency]; + } + } + if (packageManifest.dependenciesMeta != null) { + for (const removedDependency of removedPackages) { + delete packageManifest.dependenciesMeta[removedDependency]; + } + } + core_loggers_1.packageManifestLogger.debug({ + prefix: opts.prefix, + updated: packageManifest + }); + return packageManifest; + } + exports2.default = default_1; + } +}); + +// ../../node_modules/.pnpm/p-every@2.0.0/node_modules/p-every/index.js +var require_p_every = __commonJS({ + "../../node_modules/.pnpm/p-every@2.0.0/node_modules/p-every/index.js"(exports2, module2) { + "use strict"; + var pMap = require_p_map(); + var EndError = class extends Error { + }; + var test = (testFunction) => async (element, index) => { + const result = await testFunction(element, index); + if (!result) { + throw new EndError(); + } + return result; + }; + var pEvery = async (iterable, testFunction, opts) => { + try { + await pMap(iterable, test(testFunction), opts); + return true; + } catch (error) { + if (error instanceof EndError) { + return false; + } + throw error; + } + }; + module2.exports = pEvery; + module2.exports.default = pEvery; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_reduced.js +var require_reduced = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_reduced.js"(exports2, module2) { + function _reduced(x) { + return x && x["@@transducer/reduced"] ? x : { + "@@transducer/value": x, + "@@transducer/reduced": true + }; + } + module2.exports = _reduced; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xany.js +var require_xany = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/internal/_xany.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _reduced = require_reduced(); + var _xfBase = require_xfBase(); + var XAny = /* @__PURE__ */ function() { + function XAny2(f, xf) { + this.xf = xf; + this.f = f; + this.any = false; + } + XAny2.prototype["@@transducer/init"] = _xfBase.init; + XAny2.prototype["@@transducer/result"] = function(result) { + if (!this.any) { + result = this.xf["@@transducer/step"](result, false); + } + return this.xf["@@transducer/result"](result); + }; + XAny2.prototype["@@transducer/step"] = function(result, input) { + if (this.f(input)) { + this.any = true; + result = _reduced(this.xf["@@transducer/step"](result, true)); + } + return result; + }; + return XAny2; + }(); + var _xany = /* @__PURE__ */ _curry2(function _xany2(f, xf) { + return new XAny(f, xf); + }); + module2.exports = _xany; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/any.js +var require_any = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/any.js"(exports2, module2) { + var _curry2 = require_curry2(); + var _dispatchable = require_dispatchable(); + var _xany = require_xany(); + var any = /* @__PURE__ */ _curry2(/* @__PURE__ */ _dispatchable(["any"], _xany, function any2(fn2, list) { + var idx = 0; + while (idx < list.length) { + if (fn2(list[idx])) { + return true; + } + idx += 1; + } + return false; + })); + module2.exports = any; + } +}); + +// ../supi/lib/install/allProjectsAreUpToDate.js +var require_allProjectsAreUpToDate = __commonJS({ + "../supi/lib/install/allProjectsAreUpToDate.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var lockfile_utils_1 = require_lib53(); + var read_package_json_1 = require_lib32(); + var types_1 = require_lib14(); + var p_every_1 = __importDefault(require_p_every()); + var any_1 = __importDefault(require_any()); + var semver_1 = __importDefault(require_semver2()); + async function allProjectsAreUpToDate(projects, opts) { + const manifestsByDir = opts.workspacePackages ? getWorkspacePackagesByDirectory(opts.workspacePackages) : {}; + const _satisfiesPackageManifest = lockfile_utils_1.satisfiesPackageManifest.bind(null, opts.wantedLockfile); + const _linkedPackagesAreUpToDate = linkedPackagesAreUpToDate.bind(null, { + linkWorkspacePackages: opts.linkWorkspacePackages, + manifestsByDir, + workspacePackages: opts.workspacePackages + }); + return p_every_1.default(projects, (project) => { + const importer = opts.wantedLockfile.importers[project.id]; + return !hasLocalTarballDepsInRoot(importer) && _satisfiesPackageManifest(project.manifest, project.id) && _linkedPackagesAreUpToDate({ + dir: project.rootDir, + manifest: project.manifest, + snapshot: importer + }); + }); + } + exports2.default = allProjectsAreUpToDate; + function getWorkspacePackagesByDirectory(workspacePackages) { + const workspacePackagesByDirectory = {}; + Object.keys(workspacePackages || {}).forEach((pkgName) => { + Object.keys(workspacePackages[pkgName] || {}).forEach((pkgVersion) => { + workspacePackagesByDirectory[workspacePackages[pkgName][pkgVersion].dir] = workspacePackages[pkgName][pkgVersion].manifest; + }); + }); + return workspacePackagesByDirectory; + } + async function linkedPackagesAreUpToDate({ linkWorkspacePackages, manifestsByDir, workspacePackages }, project) { + var _a, _b, _c; + for (const depField of types_1.DEPENDENCIES_FIELDS) { + const lockfileDeps = project.snapshot[depField]; + const manifestDeps = project.manifest[depField]; + if (lockfileDeps == null || manifestDeps == null) + continue; + const depNames = Object.keys(lockfileDeps); + for (const depName of depNames) { + const currentSpec = manifestDeps[depName]; + if (!currentSpec) + continue; + const lockfileRef = lockfileDeps[depName]; + const isLinked = lockfileRef.startsWith("link:"); + if (isLinked && (currentSpec.startsWith("link:") || currentSpec.startsWith("file:") || currentSpec.startsWith("workspace:."))) { + continue; + } + const linkedDir = isLinked ? path_1.default.join(project.dir, lockfileRef.substr(5)) : (_b = (_a = workspacePackages === null || workspacePackages === void 0 ? void 0 : workspacePackages[depName]) === null || _a === void 0 ? void 0 : _a[lockfileRef]) === null || _b === void 0 ? void 0 : _b.dir; + if (!linkedDir) + continue; + if (!linkWorkspacePackages && !currentSpec.startsWith("workspace:")) { + continue; + } + const linkedPkg = (_c = manifestsByDir[linkedDir]) !== null && _c !== void 0 ? _c : await read_package_json_1.safeReadPackageFromDir(linkedDir); + const availableRange = getVersionRange(currentSpec); + const localPackageSatisfiesRange = availableRange === "*" || linkedPkg && semver_1.default.satisfies(linkedPkg.version, availableRange, { loose: true }); + if (isLinked !== localPackageSatisfiesRange) + return false; + } + } + return true; + } + function getVersionRange(spec) { + if (spec.startsWith("workspace:")) + return spec.substr(10); + if (spec.startsWith("npm:")) { + spec = spec.substr(4); + const index = spec.indexOf("@", 1); + if (index === -1) + return "*"; + return spec.substr(index + 1) || "*"; + } + return spec; + } + function hasLocalTarballDepsInRoot(importer) { + var _a, _b, _c; + return any_1.default(refIsLocalTarball, Object.values((_a = importer.dependencies) !== null && _a !== void 0 ? _a : {})) || any_1.default(refIsLocalTarball, Object.values((_b = importer.devDependencies) !== null && _b !== void 0 ? _b : {})) || any_1.default(refIsLocalTarball, Object.values((_c = importer.optionalDependencies) !== null && _c !== void 0 ? _c : {})); + } + function refIsLocalTarball(ref) { + return ref.startsWith("file:") && (ref.endsWith(".tgz") || ref.endsWith(".tar.gz") || ref.endsWith(".tar")); + } + } +}); + +// ../supi/lib/install/createPackageExtender.js +var require_createPackageExtender = __commonJS({ + "../supi/lib/install/createPackageExtender.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var parse_wanted_dependency_1 = __importDefault(require_lib87()); + var semver_1 = __importDefault(require_semver2()); + function default_1(packageExtensions) { + const extensionsByPkgName = {}; + Object.entries(packageExtensions).forEach(([selector, packageExtension]) => { + const { alias, pref } = parse_wanted_dependency_1.default(selector); + if (!extensionsByPkgName[alias]) { + extensionsByPkgName[alias] = []; + } + extensionsByPkgName[alias].push({ packageExtension, range: pref }); + }); + return extendPkgHook.bind(null, extensionsByPkgName); + } + exports2.default = default_1; + function extendPkgHook(extensionsByPkgName, manifest) { + const extensions = extensionsByPkgName[manifest.name]; + if (extensions == null) + return manifest; + extendPkg(manifest, extensions); + return manifest; + } + function extendPkg(manifest, extensions) { + for (const { range, packageExtension } of extensions) { + if (range != null && !semver_1.default.satisfies(manifest.version, range)) + continue; + for (const field of ["dependencies", "optionalDependencies", "peerDependencies", "peerDependenciesMeta"]) { + if (!packageExtension[field]) + continue; + manifest[field] = { + ...packageExtension[field], + ...manifest[field] + }; + } + } + } + } +}); + +// ../supi/lib/install/createVersionsOverrider.js +var require_createVersionsOverrider = __commonJS({ + "../supi/lib/install/createVersionsOverrider.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var parse_wanted_dependency_1 = __importDefault(require_lib87()); + var normalize_path_1 = __importDefault(require_normalize_path()); + var semver_1 = __importDefault(require_semver2()); + var DELIMITER_REGEX = /[^ |@]>/; + function default_1(overrides, rootDir) { + const genericVersionOverrides = []; + const versionOverrides = []; + Object.entries(overrides).forEach(([selector, newPref]) => { + let linkTarget; + if (newPref.startsWith("link:")) { + linkTarget = path_1.default.join(rootDir, newPref.substring(5)); + } + let delimiterIndex = selector.search(DELIMITER_REGEX); + if (delimiterIndex !== -1) { + delimiterIndex++; + const parentSelector = selector.substring(0, delimiterIndex); + const childSelector = selector.substring(delimiterIndex + 1); + versionOverrides.push({ + linkTarget, + newPref, + parentWantedDependency: parse_wanted_dependency_1.default(parentSelector), + wantedDependency: parse_wanted_dependency_1.default(childSelector) + }); + return; + } + genericVersionOverrides.push({ + linkTarget, + newPref, + wantedDependency: parse_wanted_dependency_1.default(selector) + }); + }); + return (manifest, dir) => { + overrideDepsOfPkg({ manifest, dir }, versionOverrides.filter(({ parentWantedDependency }) => { + return parentWantedDependency.alias === manifest.name && (!parentWantedDependency.pref || semver_1.default.satisfies(manifest.version, parentWantedDependency.pref)); + })); + overrideDepsOfPkg({ manifest, dir }, genericVersionOverrides); + return manifest; + }; + } + exports2.default = default_1; + function overrideDepsOfPkg({ manifest, dir }, versionOverrides) { + if (manifest.dependencies != null) + overrideDeps(versionOverrides, manifest.dependencies, dir); + if (manifest.optionalDependencies != null) + overrideDeps(versionOverrides, manifest.optionalDependencies, dir); + if (manifest.devDependencies != null) + overrideDeps(versionOverrides, manifest.devDependencies, dir); + return manifest; + } + function overrideDeps(versionOverrides, deps, dir) { + for (const versionOverride of versionOverrides) { + const actual = deps[versionOverride.wantedDependency.alias]; + if (actual == null) + continue; + if (!isSubRange(versionOverride.wantedDependency.pref, actual)) + continue; + if (versionOverride.linkTarget && dir) { + deps[versionOverride.wantedDependency.alias] = `link:${normalize_path_1.default(path_1.default.relative(dir, versionOverride.linkTarget))}`; + continue; + } + deps[versionOverride.wantedDependency.alias] = versionOverride.newPref; + } + } + function isSubRange(superRange, subRange) { + return !superRange || subRange === superRange || semver_1.default.validRange(subRange) != null && semver_1.default.validRange(superRange) != null && semver_1.default.subset(subRange, superRange); + } + } +}); + +// ../supi/lib/pnpmPkgJson.js +var require_pnpmPkgJson = __commonJS({ + "../supi/lib/pnpmPkgJson.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var load_json_file_1 = require_load_json_file(); + var pkgJson; + try { + pkgJson = load_json_file_1.sync(path_1.default.resolve(__dirname, "../package.json")); + } catch (err) { + pkgJson = { + name: "pnpm", + version: "0.0.0" + }; + } + exports2.default = pkgJson; + } +}); + +// ../supi/lib/install/extendInstallOptions.js +var require_extendInstallOptions = __commonJS({ + "../supi/lib/install/extendInstallOptions.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var constants_1 = require_lib7(); + var error_1 = __importDefault(require_lib8()); + var normalize_registries_1 = __importStar2(require_lib65()); + var pnpmPkgJson_1 = __importDefault(require_pnpmPkgJson()); + var defaults = async (opts) => { + var _a, _b, _c; + const packageManager = (_a = opts.packageManager) !== null && _a !== void 0 ? _a : { + name: pnpmPkgJson_1.default.name, + version: pnpmPkgJson_1.default.version + }; + return { + childConcurrency: 5, + depth: 0, + enablePnp: false, + engineStrict: false, + extendNodePath: true, + force: false, + forceSharedLockfile: false, + frozenLockfile: false, + hoistPattern: void 0, + hooks: {}, + ignoreCurrentPrefs: false, + ignoreScripts: false, + include: { + dependencies: true, + devDependencies: true, + optionalDependencies: true + }, + includeDirect: { + dependencies: true, + devDependencies: true, + optionalDependencies: true + }, + lockfileDir: (_c = (_b = opts.lockfileDir) !== null && _b !== void 0 ? _b : opts.dir) !== null && _c !== void 0 ? _c : process.cwd(), + lockfileOnly: false, + nodeVersion: process.version, + ownLifecycleHooksStdio: "inherit", + ignorePackageManifest: false, + packageManager, + preferFrozenLockfile: true, + preferWorkspacePackages: false, + preserveWorkspaceProtocol: true, + pruneLockfileImporters: false, + pruneStore: false, + rawConfig: {}, + registries: normalize_registries_1.DEFAULT_REGISTRIES, + saveWorkspaceProtocol: true, + shamefullyHoist: false, + shellEmulator: false, + sideEffectsCacheRead: false, + sideEffectsCacheWrite: false, + symlink: true, + storeController: opts.storeController, + storeDir: opts.storeDir, + strictPeerDependencies: false, + tag: "latest", + unsafePerm: process.platform === "win32" || process.platform === "cygwin" || !process.setgid || process.getuid() !== 0, + update: false, + useLockfile: true, + userAgent: `${packageManager.name}/${packageManager.version} npm/? node/${process.version} ${process.platform} ${process.arch}`, + verifyStoreIntegrity: true, + workspacePackages: {}, + enableModulesDir: true, + modulesCacheMaxAge: 7 * 24 * 60 + }; + }; + exports2.default = async (opts) => { + if (opts) { + for (const key in opts) { + if (opts[key] === void 0) { + delete opts[key]; + } + } + } + const defaultOpts = await defaults(opts); + const extendedOpts = { + ...defaultOpts, + ...opts, + storeDir: defaultOpts.storeDir + }; + if (extendedOpts.lockfileOnly) { + extendedOpts.ignoreScripts = true; + if (!extendedOpts.useLockfile) { + throw new error_1.default("CONFIG_CONFLICT_LOCKFILE_ONLY_WITH_NO_LOCKFILE", `Cannot generate a ${constants_1.WANTED_LOCKFILE} because lockfile is set to false`); + } + } + if (extendedOpts.userAgent.startsWith("npm/")) { + extendedOpts.userAgent = `${extendedOpts.packageManager.name}/${extendedOpts.packageManager.version} ${extendedOpts.userAgent}`; + } + extendedOpts.registries = normalize_registries_1.default(extendedOpts.registries); + extendedOpts.rawConfig["registry"] = extendedOpts.registries.default; + return extendedOpts; + }; + } +}); + +// ../supi/lib/install/getPreferredVersions.js +var require_getPreferredVersions = __commonJS({ + "../supi/lib/install/getPreferredVersions.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getPreferredVersionsFromLockfile = exports2.getAllUniqueSpecs = void 0; + var lockfile_utils_1 = require_lib53(); + var manifest_utils_1 = require_lib15(); + var version_selector_type_1 = __importDefault(require_version_selector_type()); + function getAllUniqueSpecs(manifests) { + const allSpecs = {}; + const ignored = new Set(); + for (const manifest of manifests) { + const specs = manifest_utils_1.getAllDependenciesFromManifest(manifest); + for (const [name, spec] of Object.entries(specs)) { + if (ignored.has(name)) + continue; + if (allSpecs[name] != null && allSpecs[name] !== spec || spec.includes(":")) { + ignored.add(name); + delete allSpecs[name]; + continue; + } + allSpecs[name] = spec; + } + } + return allSpecs; + } + exports2.getAllUniqueSpecs = getAllUniqueSpecs; + function getPreferredVersionsFromPackage(pkg) { + return getVersionSpecsByRealNames(manifest_utils_1.getAllDependenciesFromManifest(pkg)); + } + exports2.default = getPreferredVersionsFromPackage; + function getVersionSpecsByRealNames(deps) { + return Object.keys(deps).reduce((acc, depName) => { + if (deps[depName].startsWith("npm:")) { + const pref = deps[depName].substr(4); + const index = pref.lastIndexOf("@"); + const spec = pref.substr(index + 1); + const selector = version_selector_type_1.default(spec); + if (selector != null) { + const pkgName = pref.substr(0, index); + acc[pkgName] = acc[pkgName] || {}; + acc[pkgName][selector.normalized] = selector.type; + } + } else if (!deps[depName].includes(":")) { + const selector = version_selector_type_1.default(deps[depName]); + if (selector != null) { + acc[depName] = acc[depName] || {}; + acc[depName][selector.normalized] = selector.type; + } + } + return acc; + }, {}); + } + function getPreferredVersionsFromLockfile(snapshots) { + const preferredVersions = {}; + for (const [depPath, snapshot] of Object.entries(snapshots)) { + const { name, version } = lockfile_utils_1.nameVerFromPkgSnapshot(depPath, snapshot); + if (!preferredVersions[name]) { + preferredVersions[name] = { [version]: "version" }; + } else { + preferredVersions[name][version] = "version"; + } + } + return preferredVersions; + } + exports2.getPreferredVersionsFromLockfile = getPreferredVersionsFromLockfile; + } +}); + +// ../supi/lib/install/getWantedDependencies.js +var require_getWantedDependencies = __commonJS({ + "../supi/lib/install/getWantedDependencies.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var manifest_utils_1 = require_lib15(); + var guessPinnedVersionFromExistingSpec_1 = __importDefault(require_guessPinnedVersionFromExistingSpec()); + function getWantedDependencies(pkg, opts) { + var _a, _b, _c, _d, _e; + const depsToInstall = manifest_utils_1.filterDependenciesByType(pkg, (_a = opts === null || opts === void 0 ? void 0 : opts.includeDirect) !== null && _a !== void 0 ? _a : { + dependencies: true, + devDependencies: true, + optionalDependencies: true + }); + return getWantedDependenciesFromGivenSet(depsToInstall, { + dependencies: (_b = pkg.dependencies) !== null && _b !== void 0 ? _b : {}, + devDependencies: (_c = pkg.devDependencies) !== null && _c !== void 0 ? _c : {}, + optionalDependencies: (_d = pkg.optionalDependencies) !== null && _d !== void 0 ? _d : {}, + dependenciesMeta: (_e = pkg.dependenciesMeta) !== null && _e !== void 0 ? _e : {}, + updatePref: (opts === null || opts === void 0 ? void 0 : opts.updateWorkspaceDependencies) === true ? updateWorkspacePref : (pref) => pref + }); + } + exports2.default = getWantedDependencies; + function updateWorkspacePref(pref) { + return pref.startsWith("workspace:") ? "workspace:*" : pref; + } + function getWantedDependenciesFromGivenSet(deps, opts) { + if (!deps) + return []; + return Object.keys(deps).map((alias) => { + var _a, _b; + const pref = opts.updatePref(deps[alias]); + let depType; + if (opts.optionalDependencies[alias] != null) + depType = "optional"; + else if (opts.dependencies[alias] != null) + depType = "prod"; + else if (opts.devDependencies[alias] != null) + depType = "dev"; + return { + alias, + dev: depType === "dev", + optional: depType === "optional", + nodeExecPath: (_a = opts.nodeExecPath) !== null && _a !== void 0 ? _a : (_b = opts.dependenciesMeta[alias]) === null || _b === void 0 ? void 0 : _b.node, + pinnedVersion: guessPinnedVersionFromExistingSpec_1.default(deps[alias]), + pref, + raw: `${alias}@${pref}` + }; + }); + } + } +}); + +// ../supi/lib/install/link.js +var require_link2 = __commonJS({ + "../supi/lib/install/link.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var constants_1 = require_lib7(); + var core_loggers_1 = require_lib12(); + var filter_lockfile_1 = require_lib71(); + var hoist_1 = __importDefault(require_lib82()); + var logger_1 = __importDefault(require_lib6()); + var modules_cleaner_1 = require_lib73(); + var symlink_dependency_1 = __importStar2(require_lib75()); + var p_limit_1 = __importDefault(require_p_limit()); + var path_exists_1 = __importDefault(require_path_exists()); + var fromPairs_1 = __importDefault(require_fromPairs()); + var equals_1 = __importDefault(require_equals2()); + var difference_1 = __importDefault(require_difference()); + var omit_1 = __importDefault(require_omit()); + var props_1 = __importDefault(require_props()); + var brokenModulesLogger = logger_1.default("_broken_node_modules"); + async function linkPackages(projects, depGraph, opts) { + var _a, _b, _c; + let depNodes = Object.values(depGraph).filter(({ depPath, id }) => { + var _a2; + if (((_a2 = opts.wantedLockfile.packages) === null || _a2 === void 0 ? void 0 : _a2[depPath]) != null && !opts.wantedLockfile.packages[depPath].optional) { + opts.skipped.delete(depPath); + return true; + } + if (opts.wantedToBeSkippedPackageIds.has(id)) { + opts.skipped.add(depPath); + return false; + } + opts.skipped.delete(depPath); + return true; + }); + if (!opts.include.dependencies) { + depNodes = depNodes.filter(({ dev, optional }) => dev || optional); + } + if (!opts.include.devDependencies) { + depNodes = depNodes.filter(({ optional, prod }) => prod || optional); + } + if (!opts.include.optionalDependencies) { + depNodes = depNodes.filter(({ optional }) => !optional); + } + depGraph = fromPairs_1.default(depNodes.map((depNode) => [depNode.depPath, depNode])); + const removedDepPaths = await modules_cleaner_1.prune(projects, { + currentLockfile: opts.currentLockfile, + hoistedDependencies: opts.hoistedDependencies, + hoistedModulesDir: opts.hoistPattern != null ? opts.hoistedModulesDir : void 0, + include: opts.include, + lockfileDir: opts.lockfileDir, + pruneStore: opts.pruneStore, + pruneVirtualStore: opts.pruneVirtualStore, + publicHoistedModulesDir: opts.publicHoistPattern != null ? opts.rootModulesDir : void 0, + registries: opts.registries, + skipped: opts.skipped, + storeController: opts.storeController, + virtualStoreDir: opts.virtualStoreDir, + wantedLockfile: opts.wantedLockfile + }); + core_loggers_1.stageLogger.debug({ + prefix: opts.lockfileDir, + stage: "importing_started" + }); + const projectIds = projects.map(({ id }) => id); + const filterOpts = { + include: opts.include, + registries: opts.registries, + skipped: opts.skipped + }; + const newCurrentLockfile = filter_lockfile_1.filterLockfileByImporters(opts.wantedLockfile, projectIds, { + ...filterOpts, + failOnMissingDependencies: true, + skipped: new Set() + }); + const newDepPaths = await linkNewPackages(filter_lockfile_1.filterLockfileByImporters(opts.currentLockfile, projectIds, { + ...filterOpts, + failOnMissingDependencies: false + }), newCurrentLockfile, depGraph, { + force: opts.force, + lockfileDir: opts.lockfileDir, + optional: opts.include.optionalDependencies, + sideEffectsCacheRead: opts.sideEffectsCacheRead, + symlink: opts.symlink, + skipped: opts.skipped, + storeController: opts.storeController, + virtualStoreDir: opts.virtualStoreDir + }); + core_loggers_1.stageLogger.debug({ + prefix: opts.lockfileDir, + stage: "importing_done" + }); + if (opts.symlink) { + await Promise.all(projects.map(async ({ id, manifest, modulesDir, rootDir }) => { + const deps = opts.dependenciesByProjectId[id]; + await Promise.all([ + ...Object.entries(deps).map(([rootAlias, depPath]) => ({ rootAlias, depGraphNode: depGraph[depPath] })).filter(({ depGraphNode }) => depGraphNode).map(async ({ rootAlias, depGraphNode }) => { + var _a2, _b2; + const isDev = Boolean((_a2 = manifest.devDependencies) === null || _a2 === void 0 ? void 0 : _a2[depGraphNode.name]); + const isOptional = Boolean((_b2 = manifest.optionalDependencies) === null || _b2 === void 0 ? void 0 : _b2[depGraphNode.name]); + if (isDev && !opts.include.devDependencies || isOptional && !opts.include.optionalDependencies || !isDev && !isOptional && !opts.include.dependencies) + return; + if ((await symlink_dependency_1.default(depGraphNode.dir, modulesDir, rootAlias)).reused) + return; + core_loggers_1.rootLogger.debug({ + added: { + dependencyType: isDev && "dev" || isOptional && "optional" || "prod", + id: depGraphNode.id, + latest: opts.outdatedDependencies[depGraphNode.id], + name: rootAlias, + realName: depGraphNode.name, + version: depGraphNode.version + }, + prefix: rootDir + }); + }), + ...opts.linkedDependenciesByProjectId[id].map(async (linkedDependency) => { + const depLocation = resolvePath(rootDir, linkedDependency.resolution.directory); + return symlink_dependency_1.symlinkDirectRootDependency(depLocation, modulesDir, linkedDependency.alias, { + fromDependenciesField: linkedDependency.dev && "devDependencies" || linkedDependency.optional && "optionalDependencies" || "dependencies", + linkedPackage: linkedDependency, + prefix: rootDir + }); + }) + ]); + })); + } + let currentLockfile; + const allImportersIncluded = equals_1.default(projectIds.sort(), Object.keys(opts.wantedLockfile.importers).sort()); + if (opts.makePartialCurrentLockfile || !allImportersIncluded) { + const packages = (_a = opts.currentLockfile.packages) !== null && _a !== void 0 ? _a : {}; + if (opts.wantedLockfile.packages != null) { + for (const depPath in opts.wantedLockfile.packages) { + if (depGraph[depPath]) { + packages[depPath] = opts.wantedLockfile.packages[depPath]; + } + } + } + const projects2 = projectIds.reduce((acc, projectId) => { + acc[projectId] = opts.wantedLockfile.importers[projectId]; + return acc; + }, opts.currentLockfile.importers); + currentLockfile = filter_lockfile_1.filterLockfileByImporters({ + ...opts.wantedLockfile, + importers: projects2, + packages + }, Object.keys(projects2), { + ...filterOpts, + failOnMissingDependencies: false, + skipped: new Set() + }); + } else if (opts.include.dependencies && opts.include.devDependencies && opts.include.optionalDependencies && opts.skipped.size === 0) { + currentLockfile = opts.wantedLockfile; + } else { + currentLockfile = newCurrentLockfile; + } + let newHoistedDependencies; + if ((opts.hoistPattern != null || opts.publicHoistPattern != null) && (newDepPaths.length > 0 || removedDepPaths.size > 0)) { + const hoistLockfile = { + ...currentLockfile, + packages: omit_1.default(Array.from(opts.skipped), currentLockfile.packages) + }; + newHoistedDependencies = await hoist_1.default({ + extendNodePath: opts.extendNodePath, + lockfile: hoistLockfile, + lockfileDir: opts.lockfileDir, + privateHoistedModulesDir: opts.hoistedModulesDir, + privateHoistPattern: (_b = opts.hoistPattern) !== null && _b !== void 0 ? _b : [], + publicHoistedModulesDir: opts.rootModulesDir, + publicHoistPattern: (_c = opts.publicHoistPattern) !== null && _c !== void 0 ? _c : [], + virtualStoreDir: opts.virtualStoreDir + }); + } else { + newHoistedDependencies = {}; + } + return { + currentLockfile, + newDepPaths, + newHoistedDependencies, + removedDepPaths + }; + } + exports2.default = linkPackages; + var isAbsolutePath = /^[/]|^[A-Za-z]:/; + function resolvePath(where, spec) { + if (isAbsolutePath.test(spec)) + return spec; + return path_1.default.resolve(where, spec); + } + async function linkNewPackages(currentLockfile, wantedLockfile, depGraph, opts) { + var _a; + const wantedRelDepPaths = difference_1.default(Object.keys((_a = wantedLockfile.packages) !== null && _a !== void 0 ? _a : {}), Array.from(opts.skipped)); + let newDepPathsSet; + if (opts.force) { + newDepPathsSet = new Set(wantedRelDepPaths.filter((depPath) => depGraph[depPath])); + } else { + newDepPathsSet = await selectNewFromWantedDeps(wantedRelDepPaths, currentLockfile, depGraph); + } + core_loggers_1.statsLogger.debug({ + added: newDepPathsSet.size, + prefix: opts.lockfileDir + }); + const existingWithUpdatedDeps = []; + if (!opts.force && currentLockfile.packages != null && wantedLockfile.packages != null) { + for (const depPath of wantedRelDepPaths) { + if (currentLockfile.packages[depPath] && (!equals_1.default(currentLockfile.packages[depPath].dependencies, wantedLockfile.packages[depPath].dependencies) || !equals_1.default(currentLockfile.packages[depPath].optionalDependencies, wantedLockfile.packages[depPath].optionalDependencies))) { + if (depGraph[depPath] && !newDepPathsSet.has(depPath)) { + existingWithUpdatedDeps.push(depGraph[depPath]); + } + } + } + } + if (!newDepPathsSet.size && existingWithUpdatedDeps.length === 0) + return []; + const newDepPaths = Array.from(newDepPathsSet); + const newPkgs = props_1.default(newDepPaths, depGraph); + await Promise.all(newPkgs.map(async (depNode) => fs_1.promises.mkdir(depNode.modules, { recursive: true }))); + await Promise.all([ + !opts.symlink ? Promise.resolve() : linkAllModules([...newPkgs, ...existingWithUpdatedDeps], depGraph, { + lockfileDir: opts.lockfileDir, + optional: opts.optional + }), + linkAllPkgs(opts.storeController, newPkgs, { + force: opts.force, + lockfileDir: opts.lockfileDir, + targetEngine: opts.sideEffectsCacheRead && constants_1.ENGINE_NAME || void 0 + }) + ]); + return newDepPaths; + } + async function selectNewFromWantedDeps(wantedRelDepPaths, currentLockfile, depGraph) { + var _a; + const newDeps = new Set(); + const prevDeps = (_a = currentLockfile.packages) !== null && _a !== void 0 ? _a : {}; + await Promise.all(wantedRelDepPaths.map(async (depPath) => { + const depNode = depGraph[depPath]; + if (!depNode) + return; + const prevDep = prevDeps[depPath]; + if (prevDep && depNode.resolution["integrity"] === prevDep.resolution["integrity"]) { + if (await path_exists_1.default(depNode.dir)) { + return; + } + brokenModulesLogger.debug({ + missing: depNode.dir + }); + } + newDeps.add(depPath); + })); + return newDeps; + } + var limitLinking = p_limit_1.default(16); + async function linkAllPkgs(storeController, depNodes, opts) { + return Promise.all(depNodes.map(async (depNode) => { + const filesResponse = await depNode.fetchingFiles(); + const { importMethod, isBuilt } = await storeController.importPackage(depNode.dir, { + filesResponse, + force: opts.force, + targetEngine: opts.targetEngine + }); + if (importMethod) { + core_loggers_1.progressLogger.debug({ + method: importMethod, + requester: opts.lockfileDir, + status: "imported", + to: depNode.dir + }); + } + depNode.isBuilt = isBuilt; + })); + } + async function linkAllModules(depNodes, depGraph, opts) { + await Promise.all(depNodes.map(async ({ children, optionalDependencies, name, modules }) => { + const childrenToLink = opts.optional ? children : Object.keys(children).reduce((nonOptionalChildren, childAlias) => { + if (!optionalDependencies.has(childAlias)) { + nonOptionalChildren[childAlias] = children[childAlias]; + } + return nonOptionalChildren; + }, {}); + await Promise.all(Object.keys(childrenToLink).map(async (childAlias) => { + if (childrenToLink[childAlias].startsWith("link:")) { + await limitLinking(async () => symlink_dependency_1.default(path_1.default.resolve(opts.lockfileDir, childrenToLink[childAlias].substr(5)), modules, childAlias)); + return; + } + const pkg = depGraph[childrenToLink[childAlias]]; + if (!pkg || !pkg.installable && pkg.optional) + return; + if (childAlias === name) { + logger_1.default.warn({ + message: `Cannot link dependency with name ${childAlias} to ${modules}. Dependency's name should differ from the parent's name.`, + prefix: opts.lockfileDir + }); + return; + } + await limitLinking(async () => symlink_dependency_1.default(pkg.dir, modules, childAlias)); + })); + })); + } + } +}); + +// ../supi/lib/install/index.js +var require_install = __commonJS({ + "../supi/lib/install/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.addDependenciesToPackage = exports2.createObjectChecksum = exports2.mutateModules = exports2.install = void 0; + var crypto_1 = __importDefault(require("crypto")); + var path_1 = __importDefault(require("path")); + var build_modules_1 = __importStar2(require_lib81()); + var constants_1 = require_lib7(); + var core_loggers_1 = require_lib12(); + var error_1 = __importDefault(require_lib8()); + var get_context_1 = __importDefault(require_lib67()); + var headless_1 = __importDefault(require_lib85()); + var lifecycle_1 = require_lib80(); + var link_bins_1 = __importStar2(require_lib70()); + var lockfile_file_1 = require_lib57(); + var lockfile_to_pnp_1 = require_lib84(); + var logger_1 = __importStar2(require_lib6()); + var manifest_utils_1 = require_lib15(); + var modules_yaml_1 = require_lib64(); + var read_modules_dir_1 = __importDefault(require_lib69()); + var read_project_manifest_1 = require_lib19(); + var remove_bins_1 = require_lib72(); + var resolve_dependencies_1 = __importDefault(require_lib86()); + var rimraf_1 = __importDefault(require_rimraf()); + var is_inner_link_1 = __importDefault(require_is_inner_link()); + var p_filter_1 = __importDefault(require_p_filter()); + var p_limit_1 = __importDefault(require_p_limit()); + var flatten_1 = __importDefault(require_flatten2()); + var fromPairs_1 = __importDefault(require_fromPairs()); + var equals_1 = __importDefault(require_equals2()); + var isEmpty_1 = __importDefault(require_isEmpty2()); + var pipe_1 = __importDefault(require_pipe3()); + var props_1 = __importDefault(require_props()); + var unnest_1 = __importDefault(require_unnest()); + var parseWantedDependencies_1 = __importDefault(require_parseWantedDependencies()); + var safeIsInnerLink_1 = __importDefault(require_safeIsInnerLink()); + var removeDeps_1 = __importDefault(require_removeDeps()); + var allProjectsAreUpToDate_1 = __importDefault(require_allProjectsAreUpToDate()); + var createPackageExtender_1 = __importDefault(require_createPackageExtender()); + var createVersionsOverrider_1 = __importDefault(require_createVersionsOverrider()); + var extendInstallOptions_1 = __importDefault(require_extendInstallOptions()); + var getPreferredVersions_1 = __importStar2(require_getPreferredVersions()); + var getWantedDependencies_1 = __importDefault(require_getWantedDependencies()); + var link_1 = __importDefault(require_link2()); + var BROKEN_LOCKFILE_INTEGRITY_ERRORS = new Set([ + "ERR_PNPM_UNEXPECTED_PKG_CONTENT_IN_STORE", + "ERR_PNPM_TARBALL_INTEGRITY" + ]); + async function install(manifest, opts) { + var _a; + const projects = await mutateModules([ + { + buildIndex: 0, + manifest, + mutation: "install", + rootDir: (_a = opts.dir) !== null && _a !== void 0 ? _a : process.cwd() + } + ], opts); + return projects[0].manifest; + } + exports2.install = install; + async function mutateModules(projects, maybeOpts) { + var _a, _b, _c, _d, _e, _f, _g, _h; + const reporter = maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.reporter; + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.on("data", reporter); + } + const opts = await extendInstallOptions_1.default(maybeOpts); + if (!opts.include.dependencies && opts.include.optionalDependencies) { + throw new error_1.default("OPTIONAL_DEPS_REQUIRE_PROD_DEPS", "Optional dependencies cannot be installed without production dependencies"); + } + const installsOnly = projects.every((project) => project.mutation === "install"); + opts["forceNewModules"] = installsOnly; + const rootProjectManifest = (_b = (_a = projects.find(({ rootDir }) => rootDir === opts.lockfileDir)) === null || _a === void 0 ? void 0 : _a.manifest) !== null && _b !== void 0 ? _b : await read_project_manifest_1.safeReadProjectManifestOnly(opts.lockfileDir); + const overrides = rootProjectManifest != null ? (_d = (_c = rootProjectManifest.pnpm) === null || _c === void 0 ? void 0 : _c.overrides) !== null && _d !== void 0 ? _d : rootProjectManifest.resolutions : void 0; + const neverBuiltDependencies = (_f = (_e = rootProjectManifest === null || rootProjectManifest === void 0 ? void 0 : rootProjectManifest.pnpm) === null || _e === void 0 ? void 0 : _e.neverBuiltDependencies) !== null && _f !== void 0 ? _f : []; + const packageExtensions = (_g = rootProjectManifest === null || rootProjectManifest === void 0 ? void 0 : rootProjectManifest.pnpm) === null || _g === void 0 ? void 0 : _g.packageExtensions; + opts.hooks.readPackage = createReadPackageHook({ + readPackageHook: opts.hooks.readPackage, + overrides, + lockfileDir: opts.lockfileDir, + packageExtensions + }); + const ctx = await get_context_1.default(projects, opts); + const pruneVirtualStore = ((_h = ctx.modulesFile) === null || _h === void 0 ? void 0 : _h.prunedAt) && opts.modulesCacheMaxAge > 0 ? cacheExpired(ctx.modulesFile.prunedAt, opts.modulesCacheMaxAge) : true; + if (!maybeOpts.ignorePackageManifest) { + for (const { manifest, rootDir } of ctx.projects) { + if (!manifest) { + throw new Error(`No package.json found in "${rootDir}"`); + } + } + } + const result = await _install(); + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.removeListener("data", reporter); + } + return result; + async function _install() { + var _a2, _b2, _c2, _d2, _e2, _f2; + const packageExtensionsChecksum = isEmpty_1.default(packageExtensions !== null && packageExtensions !== void 0 ? packageExtensions : {}) ? void 0 : createObjectChecksum(packageExtensions); + let needsFullResolution = !maybeOpts.ignorePackageManifest && (!equals_1.default((_a2 = ctx.wantedLockfile.overrides) !== null && _a2 !== void 0 ? _a2 : {}, overrides !== null && overrides !== void 0 ? overrides : {}) || !equals_1.default(((_b2 = ctx.wantedLockfile.neverBuiltDependencies) !== null && _b2 !== void 0 ? _b2 : []).sort(), (neverBuiltDependencies !== null && neverBuiltDependencies !== void 0 ? neverBuiltDependencies : []).sort()) || ctx.wantedLockfile.packageExtensionsChecksum !== packageExtensionsChecksum) || opts.fixLockfile; + if (needsFullResolution) { + ctx.wantedLockfile.overrides = overrides; + ctx.wantedLockfile.neverBuiltDependencies = neverBuiltDependencies; + ctx.wantedLockfile.packageExtensionsChecksum = packageExtensionsChecksum; + } + const frozenLockfile = opts.frozenLockfile || opts.frozenLockfileIfExists && ctx.existsWantedLockfile; + if (!ctx.lockfileHadConflicts && !opts.lockfileOnly && !opts.update && !opts.fixLockfile && installsOnly && (frozenLockfile || opts.ignorePackageManifest || !needsFullResolution && opts.preferFrozenLockfile && (!opts.pruneLockfileImporters || Object.keys(ctx.wantedLockfile.importers).length === ctx.projects.length) && ctx.existsWantedLockfile && ctx.wantedLockfile.lockfileVersion === constants_1.LOCKFILE_VERSION && await allProjectsAreUpToDate_1.default(ctx.projects, { + linkWorkspacePackages: opts.linkWorkspacePackagesDepth >= 0, + wantedLockfile: ctx.wantedLockfile, + workspacePackages: opts.workspacePackages + }))) { + if (needsFullResolution) { + throw new error_1.default("FROZEN_LOCKFILE_WITH_OUTDATED_LOCKFILE", "Cannot perform a frozen installation because the lockfile needs updates"); + } + if (!ctx.existsWantedLockfile) { + if (ctx.projects.some((project) => pkgHasDependencies(project.manifest))) { + throw new Error(`Headless installation requires a ${constants_1.WANTED_LOCKFILE} file`); + } + } else { + if (maybeOpts.ignorePackageManifest) { + logger_1.default.info({ message: "Importing packages to virtual store", prefix: opts.lockfileDir }); + } else { + logger_1.default.info({ message: "Lockfile is up-to-date, resolution step is skipped", prefix: opts.lockfileDir }); + } + try { + await headless_1.default({ + childConcurrency: opts.childConcurrency, + currentEngine: { + nodeVersion: opts.nodeVersion, + pnpmVersion: opts.packageManager.name === "pnpm" ? opts.packageManager.version : "" + }, + currentLockfile: ctx.currentLockfile, + enablePnp: opts.enablePnp, + engineStrict: opts.engineStrict, + extendNodePath: opts.extendNodePath, + extraBinPaths: opts.extraBinPaths, + force: opts.force, + hoistedDependencies: ctx.hoistedDependencies, + hoistPattern: ctx.hoistPattern, + ignoreScripts: opts.ignoreScripts, + ignorePackageManifest: opts.ignorePackageManifest, + include: opts.include, + lockfileDir: ctx.lockfileDir, + modulesDir: opts.modulesDir, + ownLifecycleHooksStdio: opts.ownLifecycleHooksStdio, + packageManager: opts.packageManager, + pendingBuilds: ctx.pendingBuilds, + projects: ctx.projects, + pruneStore: opts.pruneStore, + prunedAt: (_c2 = ctx.modulesFile) === null || _c2 === void 0 ? void 0 : _c2.prunedAt, + pruneVirtualStore, + publicHoistPattern: ctx.publicHoistPattern, + rawConfig: opts.rawConfig, + registries: opts.registries, + sideEffectsCacheRead: opts.sideEffectsCacheRead, + sideEffectsCacheWrite: opts.sideEffectsCacheWrite, + symlink: opts.symlink, + skipped: ctx.skipped, + storeController: opts.storeController, + storeDir: opts.storeDir, + unsafePerm: opts.unsafePerm, + userAgent: opts.userAgent, + virtualStoreDir: ctx.virtualStoreDir, + wantedLockfile: maybeOpts.ignorePackageManifest ? void 0 : ctx.wantedLockfile + }); + return projects; + } catch (error) { + if (frozenLockfile || error.code !== "ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY" && !BROKEN_LOCKFILE_INTEGRITY_ERRORS.has(error.code)) + throw error; + if (BROKEN_LOCKFILE_INTEGRITY_ERRORS.has(error.code)) { + needsFullResolution = true; + opts.update = true; + } + logger_1.default.warn({ + error, + message: error.message, + prefix: ctx.lockfileDir + }); + logger_1.default.error(new error_1.default(error.code, "The lockfile is broken! Resolution step will be performed to fix it.")); + } + } + } + const projectsToInstall = []; + const projectsToBeInstalled = ctx.projects.filter(({ mutation }) => mutation === "install"); + const scriptsOpts = { + extraBinPaths: opts.extraBinPaths, + rawConfig: opts.rawConfig, + scriptShell: opts.scriptShell, + shellEmulator: opts.shellEmulator, + stdio: opts.ownLifecycleHooksStdio, + unsafePerm: opts.unsafePerm || false + }; + let preferredSpecs = null; + for (const project of ctx.projects) { + switch (project.mutation) { + case "uninstallSome": + projectsToInstall.push({ + pruneDirectDependencies: false, + ...project, + removePackages: project.dependencyNames, + updatePackageManifest: true, + wantedDependencies: [] + }); + break; + case "install": { + await installCase({ + ...project, + updatePackageManifest: (_d2 = opts.updatePackageManifest) !== null && _d2 !== void 0 ? _d2 : opts.update + }); + break; + } + case "installSome": { + await installSome({ + ...project, + updatePackageManifest: opts.updatePackageManifest !== false + }); + break; + } + case "unlink": { + const packageDirs = await read_modules_dir_1.default(project.modulesDir); + const externalPackages = await p_filter_1.default(packageDirs, async (packageDir) => isExternalLink(ctx.storeDir, project.modulesDir, packageDir)); + const allDeps = manifest_utils_1.getAllDependenciesFromManifest(project.manifest); + const packagesToInstall = []; + for (const pkgName of externalPackages) { + await rimraf_1.default(path_1.default.join(project.modulesDir, pkgName)); + if (allDeps[pkgName]) { + packagesToInstall.push(pkgName); + } + } + if (packagesToInstall.length === 0) + return projects; + await installCase({ ...project, mutation: "install" }); + break; + } + case "unlinkSome": { + if (((_e2 = project.manifest) === null || _e2 === void 0 ? void 0 : _e2.name) && opts.globalBin) { + await remove_bins_1.removeBin(path_1.default.join(opts.globalBin, (_f2 = project.manifest) === null || _f2 === void 0 ? void 0 : _f2.name)); + } + const packagesToInstall = []; + const allDeps = manifest_utils_1.getAllDependenciesFromManifest(project.manifest); + for (const depName of project.dependencyNames) { + try { + if (!await isExternalLink(ctx.storeDir, project.modulesDir, depName)) { + logger_1.default.warn({ + message: `${depName} is not an external link`, + prefix: project.rootDir + }); + continue; + } + } catch (err) { + if (err["code"] !== "ENOENT") + throw err; + } + await rimraf_1.default(path_1.default.join(project.modulesDir, depName)); + if (allDeps[depName]) { + packagesToInstall.push(depName); + } + } + if (packagesToInstall.length === 0) + return projects; + await installSome({ + ...project, + dependencySelectors: packagesToInstall, + mutation: "installSome", + updatePackageManifest: false + }); + break; + } + } + } + async function installCase(project) { + var _a3, _b3; + const wantedDependencies = getWantedDependencies_1.default(project.manifest, { + includeDirect: opts.includeDirect, + updateWorkspaceDependencies: opts.update, + nodeExecPath: opts.nodeExecPath + }).map((wantedDependency) => ({ ...wantedDependency, updateSpec: true })); + if ((_a3 = ctx.wantedLockfile) === null || _a3 === void 0 ? void 0 : _a3.importers) { + forgetResolutionsOfPrevWantedDeps(ctx.wantedLockfile.importers[project.id], wantedDependencies); + } + if (opts.ignoreScripts && ((_b3 = project.manifest) === null || _b3 === void 0 ? void 0 : _b3.scripts) && (project.manifest.scripts.preinstall || project.manifest.scripts.install || project.manifest.scripts.postinstall || project.manifest.scripts.prepare)) { + ctx.pendingBuilds.push(project.id); + } + projectsToInstall.push({ + pruneDirectDependencies: false, + ...project, + wantedDependencies + }); + } + async function installSome(project) { + const currentPrefs = opts.ignoreCurrentPrefs ? {} : manifest_utils_1.getAllDependenciesFromManifest(project.manifest); + const optionalDependencies = project.targetDependenciesField ? {} : project.manifest.optionalDependencies || {}; + const devDependencies = project.targetDependenciesField ? {} : project.manifest.devDependencies || {}; + if (preferredSpecs == null) { + preferredSpecs = getPreferredVersions_1.getAllUniqueSpecs(flatten_1.default(Object.values(opts.workspacePackages).map((obj) => Object.values(obj))).map(({ manifest }) => manifest)); + } + const wantedDeps = parseWantedDependencies_1.default(project.dependencySelectors, { + allowNew: project.allowNew !== false, + currentPrefs, + defaultTag: opts.tag, + dev: project.targetDependenciesField === "devDependencies", + devDependencies, + optional: project.targetDependenciesField === "optionalDependencies", + optionalDependencies, + updateWorkspaceDependencies: opts.update, + preferredSpecs + }); + projectsToInstall.push({ + pruneDirectDependencies: false, + ...project, + wantedDependencies: wantedDeps.map((wantedDep) => ({ ...wantedDep, isNew: true, updateSpec: true, nodeExecPath: opts.nodeExecPath })) + }); + } + const makePartialCurrentLockfile = !installsOnly && (ctx.existsWantedLockfile && !ctx.existsCurrentLockfile || !ctx.currentLockfileIsUpToDate); + const result2 = await installInContext(projectsToInstall, ctx, { + ...opts, + currentLockfileIsUpToDate: !ctx.existsWantedLockfile || ctx.currentLockfileIsUpToDate, + makePartialCurrentLockfile, + needsFullResolution, + neverBuiltDependencies, + overrides, + pruneVirtualStore, + updateLockfileMinorVersion: true + }); + if (!opts.ignoreScripts) { + if (opts.enablePnp) { + scriptsOpts.extraEnv = lifecycle_1.makeNodeRequireOption(path_1.default.join(opts.lockfileDir, ".pnp.cjs")); + } + await lifecycle_1.runLifecycleHooksConcurrently(["preinstall", "install", "postinstall", "prepare"], projectsToBeInstalled, opts.childConcurrency, scriptsOpts); + } + return result2; + } + } + exports2.mutateModules = mutateModules; + function createObjectChecksum(obj) { + const s = JSON.stringify(obj); + return crypto_1.default.createHash("md5").update(s).digest("hex"); + } + exports2.createObjectChecksum = createObjectChecksum; + function createReadPackageHook({ lockfileDir, overrides, packageExtensions, readPackageHook }) { + const hooks = []; + if (!isEmpty_1.default(overrides !== null && overrides !== void 0 ? overrides : {})) { + hooks.push(createVersionsOverrider_1.default(overrides, lockfileDir)); + } + if (!isEmpty_1.default(packageExtensions !== null && packageExtensions !== void 0 ? packageExtensions : {})) { + hooks.push(createPackageExtender_1.default(packageExtensions)); + } + if (hooks.length === 0) { + return readPackageHook; + } + const readPackageAndExtend = hooks.length === 1 ? hooks[0] : pipe_1.default(hooks[0], hooks[1]); + if (readPackageHook != null) { + return (manifest, dir) => readPackageAndExtend(readPackageHook(manifest, dir), dir); + } + return readPackageAndExtend; + } + function cacheExpired(prunedAt, maxAgeInMinutes) { + return (Date.now() - new Date(prunedAt).valueOf()) / (1e3 * 60) > maxAgeInMinutes; + } + async function isExternalLink(storeDir, modules, pkgName) { + const link = await is_inner_link_1.default(modules, pkgName); + return !link.isInner; + } + function pkgHasDependencies(manifest) { + var _a, _b, _c; + return Boolean(Object.keys((_a = manifest.dependencies) !== null && _a !== void 0 ? _a : {}).length > 0 || Object.keys((_b = manifest.devDependencies) !== null && _b !== void 0 ? _b : {}).length || Object.keys((_c = manifest.optionalDependencies) !== null && _c !== void 0 ? _c : {}).length); + } + async function partitionLinkedPackages(dependencies, opts) { + var _a; + const nonLinkedDependencies = []; + const linkedAliases = new Set(); + for (const dependency of dependencies) { + if (!dependency.alias || ((_a = opts.workspacePackages) === null || _a === void 0 ? void 0 : _a[dependency.alias]) != null || dependency.pref.startsWith("workspace:")) { + nonLinkedDependencies.push(dependency); + continue; + } + const isInnerLink = await safeIsInnerLink_1.default(opts.modulesDir, dependency.alias, { + hideAlienModules: !opts.lockfileOnly, + projectDir: opts.projectDir, + storeDir: opts.storeDir, + virtualStoreDir: opts.virtualStoreDir + }); + if (isInnerLink === true) { + nonLinkedDependencies.push(dependency); + continue; + } + logger_1.default.info({ + message: `${dependency.alias} is linked to ${opts.modulesDir} from ${isInnerLink}`, + prefix: opts.projectDir + }); + linkedAliases.add(dependency.alias); + } + return { + linkedAliases, + nonLinkedDependencies + }; + } + function forgetResolutionsOfPrevWantedDeps(importer, wantedDeps) { + var _a, _b, _c, _d; + if (!importer.specifiers) + return; + importer.dependencies = (_a = importer.dependencies) !== null && _a !== void 0 ? _a : {}; + importer.devDependencies = (_b = importer.devDependencies) !== null && _b !== void 0 ? _b : {}; + importer.optionalDependencies = (_c = importer.optionalDependencies) !== null && _c !== void 0 ? _c : {}; + for (const { alias, pref } of wantedDeps) { + if (alias && importer.specifiers[alias] !== pref) { + if (!((_d = importer.dependencies[alias]) === null || _d === void 0 ? void 0 : _d.startsWith("link:"))) { + delete importer.dependencies[alias]; + } + delete importer.devDependencies[alias]; + delete importer.optionalDependencies[alias]; + } + } + } + async function addDependenciesToPackage(manifest, dependencySelectors, opts) { + var _a, _b; + const projects = await mutateModules([ + { + allowNew: opts.allowNew, + dependencySelectors, + manifest, + mutation: "installSome", + peer: opts.peer, + pinnedVersion: opts.pinnedVersion, + rootDir: (_a = opts.dir) !== null && _a !== void 0 ? _a : process.cwd(), + targetDependenciesField: opts.targetDependenciesField + } + ], { + ...opts, + lockfileDir: (_b = opts.lockfileDir) !== null && _b !== void 0 ? _b : opts.dir + }); + return projects[0].manifest; + } + exports2.addDependenciesToPackage = addDependenciesToPackage; + var _installInContext = async (projects, ctx, opts) => { + var _a, _b, _c, _d, _e, _f; + if (opts.lockfileOnly && ctx.existsCurrentLockfile) { + logger_1.default.warn({ + message: "`node_modules` is present. Lockfile only installation will make it out-of-date", + prefix: ctx.lockfileDir + }); + } + ctx.wantedLockfile.importers = ctx.wantedLockfile.importers || {}; + for (const { id } of projects) { + if (!ctx.wantedLockfile.importers[id]) { + ctx.wantedLockfile.importers[id] = { specifiers: {} }; + } + } + if (opts.pruneLockfileImporters) { + const projectIds = new Set(projects.map(({ id }) => id)); + for (const wantedImporter of Object.keys(ctx.wantedLockfile.importers)) { + if (!projectIds.has(wantedImporter)) { + delete ctx.wantedLockfile.importers[wantedImporter]; + } + } + } + await Promise.all(projects.map(async (project) => { + if (project.mutation !== "uninstallSome") + return; + const _removeDeps = async (manifest) => removeDeps_1.default(manifest, project.dependencyNames, { prefix: project.rootDir, saveType: project.targetDependenciesField }); + project.manifest = await _removeDeps(project.manifest); + if (project.originalManifest != null) { + project.originalManifest = await _removeDeps(project.originalManifest); + } + })); + core_loggers_1.stageLogger.debug({ + prefix: ctx.lockfileDir, + stage: "resolution_started" + }); + const preferredVersions = (_a = opts.preferredVersions) !== null && _a !== void 0 ? _a : !opts.update && ctx.wantedLockfile.packages != null && !isEmpty_1.default(ctx.wantedLockfile.packages) ? getPreferredVersions_1.getPreferredVersionsFromLockfile(ctx.wantedLockfile.packages) : void 0; + const forceFullResolution = ctx.wantedLockfile.lockfileVersion !== constants_1.LOCKFILE_VERSION || !opts.currentLockfileIsUpToDate || opts.force || opts.needsFullResolution || ctx.lockfileHadConflicts; + const _toResolveImporter = toResolveImporter.bind(null, { + defaultUpdateDepth: opts.update || opts.updateMatching != null ? opts.depth : -1, + lockfileOnly: opts.lockfileOnly, + preferredVersions, + storeDir: ctx.storeDir, + updateAll: Boolean(opts.updateMatching), + virtualStoreDir: ctx.virtualStoreDir, + workspacePackages: opts.workspacePackages + }); + const projectsToResolve = await Promise.all(projects.map(async (project) => _toResolveImporter(project))); + if (opts.fixLockfile && ctx.wantedLockfile.packages != null && !isEmpty_1.default(ctx.wantedLockfile.packages)) { + ctx.wantedLockfile.packages = Object.entries(ctx.wantedLockfile.packages).reduce((pre, [depPath, snapshot]) => ({ + ...pre, + [depPath]: { + dependencies: snapshot.dependencies, + optionalDependencies: snapshot.optionalDependencies, + resolution: snapshot.resolution + } + }), {}); + } + let { dependenciesGraph, dependenciesByProjectId, finishLockfileUpdates, linkedDependenciesByProjectId, newLockfile, outdatedDependencies, wantedToBeSkippedPackageIds, waitTillAllFetchingsFinish } = await resolve_dependencies_1.default(projectsToResolve, { + currentLockfile: ctx.currentLockfile, + dryRun: opts.lockfileOnly, + engineStrict: opts.engineStrict, + force: opts.force, + forceFullResolution, + hooks: opts.hooks, + linkWorkspacePackagesDepth: (_b = opts.linkWorkspacePackagesDepth) !== null && _b !== void 0 ? _b : opts.saveWorkspaceProtocol ? 0 : -1, + lockfileDir: opts.lockfileDir, + neverBuiltDependencies: new Set(opts.neverBuiltDependencies), + nodeVersion: opts.nodeVersion, + pnpmVersion: opts.packageManager.name === "pnpm" ? opts.packageManager.version : "", + preferWorkspacePackages: opts.preferWorkspacePackages, + preserveWorkspaceProtocol: opts.preserveWorkspaceProtocol, + registries: opts.registries, + saveWorkspaceProtocol: opts.saveWorkspaceProtocol, + storeController: opts.storeController, + strictPeerDependencies: opts.strictPeerDependencies, + tag: opts.tag, + updateMatching: opts.updateMatching, + virtualStoreDir: ctx.virtualStoreDir, + wantedLockfile: ctx.wantedLockfile, + workspacePackages: opts.workspacePackages + }); + core_loggers_1.stageLogger.debug({ + prefix: ctx.lockfileDir, + stage: "resolution_done" + }); + newLockfile = ((_c = opts.hooks) === null || _c === void 0 ? void 0 : _c.afterAllResolved) != null ? (_d = opts.hooks) === null || _d === void 0 ? void 0 : _d.afterAllResolved(newLockfile) : newLockfile; + if (opts.updateLockfileMinorVersion) { + newLockfile.lockfileVersion = constants_1.LOCKFILE_VERSION; + } + const lockfileOpts = { forceSharedFormat: opts.forceSharedLockfile }; + if (!opts.lockfileOnly && opts.enableModulesDir) { + const result = await link_1.default(projectsToResolve, dependenciesGraph, { + currentLockfile: ctx.currentLockfile, + dependenciesByProjectId, + force: opts.force, + extendNodePath: opts.extendNodePath, + hoistedDependencies: ctx.hoistedDependencies, + hoistedModulesDir: ctx.hoistedModulesDir, + hoistPattern: ctx.hoistPattern, + include: opts.include, + linkedDependenciesByProjectId, + lockfileDir: opts.lockfileDir, + makePartialCurrentLockfile: opts.makePartialCurrentLockfile, + outdatedDependencies, + pruneStore: opts.pruneStore, + pruneVirtualStore: opts.pruneVirtualStore, + publicHoistPattern: ctx.publicHoistPattern, + registries: ctx.registries, + rootModulesDir: ctx.rootModulesDir, + sideEffectsCacheRead: opts.sideEffectsCacheRead, + symlink: opts.symlink, + skipped: ctx.skipped, + storeController: opts.storeController, + strictPeerDependencies: opts.strictPeerDependencies, + virtualStoreDir: ctx.virtualStoreDir, + wantedLockfile: newLockfile, + wantedToBeSkippedPackageIds + }); + await finishLockfileUpdates(); + if (opts.enablePnp) { + const importerNames = fromPairs_1.default(projects.map(({ manifest, id }) => { + var _a2; + return [id, (_a2 = manifest.name) !== null && _a2 !== void 0 ? _a2 : id]; + })); + await lockfile_to_pnp_1.writePnpFile(result.currentLockfile, { + importerNames, + lockfileDir: ctx.lockfileDir, + virtualStoreDir: ctx.virtualStoreDir, + registries: opts.registries + }); + } + ctx.pendingBuilds = ctx.pendingBuilds.filter((relDepPath) => !result.removedDepPaths.has(relDepPath)); + if (opts.ignoreScripts) { + ctx.pendingBuilds = ctx.pendingBuilds.concat(result.newDepPaths.filter((depPath) => dependenciesGraph[depPath].requiresBuild)); + } else if ((_e = result.newDepPaths) === null || _e === void 0 ? void 0 : _e.length) { + const depPaths = Object.keys(dependenciesGraph); + const rootNodes = depPaths.filter((depPath) => dependenciesGraph[depPath].depth === 0); + let extraEnv; + if (opts.enablePnp) { + extraEnv = lifecycle_1.makeNodeRequireOption(path_1.default.join(opts.lockfileDir, ".pnp.cjs")); + } + await build_modules_1.default(dependenciesGraph, rootNodes, { + childConcurrency: opts.childConcurrency, + depsToBuild: new Set(result.newDepPaths), + extendNodePath: opts.extendNodePath, + extraBinPaths: ctx.extraBinPaths, + extraEnv, + lockfileDir: ctx.lockfileDir, + optional: opts.include.optionalDependencies, + rawConfig: opts.rawConfig, + rootModulesDir: ctx.virtualStoreDir, + scriptShell: opts.scriptShell, + shellEmulator: opts.shellEmulator, + sideEffectsCacheWrite: opts.sideEffectsCacheWrite, + storeController: opts.storeController, + unsafePerm: opts.unsafePerm, + userAgent: opts.userAgent + }); + } + const binWarn = (prefix, message2) => logger_1.default.info({ message: message2, prefix }); + if ((_f = result.newDepPaths) === null || _f === void 0 ? void 0 : _f.length) { + const newPkgs = props_1.default(result.newDepPaths, dependenciesGraph); + await linkAllBins(newPkgs, dependenciesGraph, { + optional: opts.include.optionalDependencies, + warn: binWarn.bind(null, opts.lockfileDir) + }); + } + await Promise.all(projectsToResolve.map(async (project, index) => { + var _a2, _b2; + let linkedPackages; + if (((_a2 = ctx.publicHoistPattern) === null || _a2 === void 0 ? void 0 : _a2.length) && path_1.default.relative(project.rootDir, opts.lockfileDir) === "") { + const nodeExecPathByAlias = Object.entries((_b2 = project.manifest.dependenciesMeta) !== null && _b2 !== void 0 ? _b2 : {}).reduce((prev, [alias, { node }]) => { + if (node) { + prev[alias] = node; + } + return prev; + }, {}); + linkedPackages = await link_bins_1.default(project.modulesDir, project.binsDir, { + allowExoticManifests: true, + extendNodePath: opts.extendNodePath, + projectManifest: project.manifest, + nodeExecPathByAlias, + warn: binWarn.bind(null, project.rootDir) + }); + } else { + const directPkgs = [ + ...props_1.default(Object.values(dependenciesByProjectId[project.id]).filter((depPath) => !ctx.skipped.has(depPath)), dependenciesGraph), + ...linkedDependenciesByProjectId[project.id].map(({ pkgId }) => ({ + dir: path_1.default.join(project.rootDir, pkgId.substring(5)), + fetchingBundledManifest: void 0 + })) + ]; + linkedPackages = await link_bins_1.linkBinsOfPackages((await Promise.all(directPkgs.map(async (dep) => { + var _a3, _b3, _c2, _d2; + const manifest = (_b3 = await ((_a3 = dep.fetchingBundledManifest) === null || _a3 === void 0 ? void 0 : _a3.call(dep))) !== null && _b3 !== void 0 ? _b3 : await read_project_manifest_1.safeReadProjectManifestOnly(dep.dir); + return { + location: dep.dir, + manifest, + nodeExecPath: (_d2 = (_c2 = project.manifest.dependenciesMeta) === null || _c2 === void 0 ? void 0 : _c2[manifest.name]) === null || _d2 === void 0 ? void 0 : _d2.node + }; + }))).filter(({ manifest }) => manifest != null), project.binsDir, { extendNodePath: opts.extendNodePath, warn: binWarn.bind(null, project.rootDir) }); + } + const projectToInstall = projects[index]; + if (opts.global && projectToInstall.mutation.includes("install")) { + projectToInstall.wantedDependencies.forEach((pkg) => { + if (!(linkedPackages === null || linkedPackages === void 0 ? void 0 : linkedPackages.includes(pkg.alias))) { + logger_1.default.warn({ message: `${pkg.alias} has no binaries`, prefix: opts.lockfileDir }); + } + }); + } + })); + await Promise.all([ + opts.useLockfile ? lockfile_file_1.writeLockfiles({ + currentLockfile: result.currentLockfile, + currentLockfileDir: ctx.virtualStoreDir, + wantedLockfile: newLockfile, + wantedLockfileDir: ctx.lockfileDir, + ...lockfileOpts + }) : lockfile_file_1.writeCurrentLockfile(ctx.virtualStoreDir, result.currentLockfile, lockfileOpts), + (async () => { + if (result.currentLockfile.packages === void 0 && result.removedDepPaths.size === 0) { + return Promise.resolve(); + } + return modules_yaml_1.write(ctx.rootModulesDir, { + ...ctx.modulesFile, + hoistedDependencies: result.newHoistedDependencies, + hoistPattern: ctx.hoistPattern, + included: ctx.include, + layoutVersion: constants_1.LAYOUT_VERSION, + packageManager: `${opts.packageManager.name}@${opts.packageManager.version}`, + pendingBuilds: ctx.pendingBuilds, + publicHoistPattern: ctx.publicHoistPattern, + prunedAt: opts.pruneVirtualStore || ctx.modulesFile == null ? new Date().toUTCString() : ctx.modulesFile.prunedAt, + registries: ctx.registries, + skipped: Array.from(ctx.skipped), + storeDir: ctx.storeDir, + virtualStoreDir: ctx.virtualStoreDir + }); + })() + ]); + } else { + await finishLockfileUpdates(); + await lockfile_file_1.writeWantedLockfile(ctx.lockfileDir, newLockfile, lockfileOpts); + core_loggers_1.stageLogger.debug({ + prefix: opts.lockfileDir, + stage: "importing_done" + }); + } + await waitTillAllFetchingsFinish(); + core_loggers_1.summaryLogger.debug({ prefix: opts.lockfileDir }); + await opts.storeController.close(); + return projectsToResolve.map(({ manifest, rootDir }) => ({ rootDir, manifest })); + }; + var installInContext = async (projects, ctx, opts) => { + try { + return await _installInContext(projects, ctx, opts); + } catch (error) { + if (!BROKEN_LOCKFILE_INTEGRITY_ERRORS.has(error.code)) + throw error; + opts.needsFullResolution = true; + opts.update = true; + logger_1.default.warn({ + error, + message: error.message, + prefix: ctx.lockfileDir + }); + logger_1.default.error(new error_1.default(error.code, "The lockfile is broken! A full installation will be performed in an attempt to fix it.")); + return _installInContext(projects, ctx, opts); + } + }; + async function toResolveImporter(opts, project) { + var _a, _b, _c; + const allDeps = getWantedDependencies_1.default(project.manifest); + const { nonLinkedDependencies } = await partitionLinkedPackages(allDeps, { + lockfileOnly: opts.lockfileOnly, + modulesDir: project.modulesDir, + projectDir: project.rootDir, + storeDir: opts.storeDir, + virtualStoreDir: opts.virtualStoreDir, + workspacePackages: opts.workspacePackages + }); + const existingDeps = nonLinkedDependencies.filter(({ alias }) => !project.wantedDependencies.some((wantedDep) => wantedDep.alias === alias)); + let wantedDependencies; + if (!project.manifest) { + wantedDependencies = [ + ...project.wantedDependencies, + ...existingDeps + ].map((dep) => ({ + ...dep, + updateDepth: opts.defaultUpdateDepth + })); + } else { + const updateLocalTarballs = (dep) => ({ + ...dep, + updateDepth: opts.updateAll ? opts.defaultUpdateDepth : prefIsLocalTarball(dep.pref) ? 0 : -1 + }); + wantedDependencies = [ + ...project.wantedDependencies.map(opts.defaultUpdateDepth < 0 ? updateLocalTarballs : (dep) => ({ ...dep, updateDepth: opts.defaultUpdateDepth })), + ...existingDeps.map(updateLocalTarballs) + ]; + } + return { + ...project, + hasRemovedDependencies: Boolean((_a = project.removePackages) === null || _a === void 0 ? void 0 : _a.length), + preferredVersions: (_c = (_b = opts.preferredVersions) !== null && _b !== void 0 ? _b : project.manifest && getPreferredVersions_1.default(project.manifest)) !== null && _c !== void 0 ? _c : {}, + wantedDependencies + }; + } + function prefIsLocalTarball(pref) { + return pref.startsWith("file:") && pref.endsWith(".tgz"); + } + var limitLinking = p_limit_1.default(16); + async function linkAllBins(depNodes, depGraph, opts) { + return unnest_1.default(await Promise.all(depNodes.map(async (depNode) => limitLinking(async () => build_modules_1.linkBinsOfDependencies(depNode, depGraph, opts))))); + } + } +}); + +// ../supi/lib/api.js +var require_api = __commonJS({ + "../supi/lib/api.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.link = void 0; + var link_1 = __importDefault(require_link()); + exports2.link = link_1.default; + __exportStar(require_install(), exports2); + __exportStar(require_link(), exports2); + } +}); + +// ../supi/lib/index.js +var require_lib88 = __commonJS({ + "../supi/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UnexpectedVirtualStoreDirError = exports2.UnexpectedStoreError = void 0; + __exportStar(require_api(), exports2); + var get_context_1 = require_lib67(); + Object.defineProperty(exports2, "UnexpectedStoreError", { enumerable: true, get: function() { + return get_context_1.UnexpectedStoreError; + } }); + Object.defineProperty(exports2, "UnexpectedVirtualStoreDirError", { enumerable: true, get: function() { + return get_context_1.UnexpectedVirtualStoreDirError; + } }); + } +}); + +// ../../node_modules/.pnpm/@yarnpkg+lockfile@1.1.0/node_modules/@yarnpkg/lockfile/index.js +var require_lockfile = __commonJS({ + "../../node_modules/.pnpm/@yarnpkg+lockfile@1.1.0/node_modules/@yarnpkg/lockfile/index.js"(exports2, module2) { + module2.exports = function(modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) { + return installedModules[moduleId].exports; + } + var module3 = installedModules[moduleId] = { + i: moduleId, + l: false, + exports: {} + }; + modules[moduleId].call(module3.exports, module3, module3.exports, __webpack_require__); + module3.l = true; + return module3.exports; + } + __webpack_require__.m = modules; + __webpack_require__.c = installedModules; + __webpack_require__.i = function(value) { + return value; + }; + __webpack_require__.d = function(exports3, name, getter) { + if (!__webpack_require__.o(exports3, name)) { + Object.defineProperty(exports3, name, { + configurable: false, + enumerable: true, + get: getter + }); + } + }; + __webpack_require__.n = function(module3) { + var getter = module3 && module3.__esModule ? function getDefault() { + return module3["default"]; + } : function getModuleExports() { + return module3; + }; + __webpack_require__.d(getter, "a", getter); + return getter; + }; + __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }; + __webpack_require__.p = ""; + return __webpack_require__(__webpack_require__.s = 14); + }([ + function(module3, exports3) { + module3.exports = require("path"); + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + exports3.__esModule = true; + var _promise = __webpack_require__(173); + var _promise2 = _interopRequireDefault(_promise); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + exports3.default = function(fn2) { + return function() { + var gen = fn2.apply(this, arguments); + return new _promise2.default(function(resolve, reject) { + function step(key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) { + resolve(value); + } else { + return _promise2.default.resolve(value).then(function(value2) { + step("next", value2); + }, function(err) { + step("throw", err); + }); + } + } + return step("next"); + }); + }; + }; + }, + function(module3, exports3) { + module3.exports = require("util"); + }, + function(module3, exports3) { + module3.exports = require("fs"); + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + class MessageError extends Error { + constructor(msg, code) { + super(msg); + this.code = code; + } + } + exports3.MessageError = MessageError; + class ProcessSpawnError extends MessageError { + constructor(msg, code, process2) { + super(msg, code); + this.process = process2; + } + } + exports3.ProcessSpawnError = ProcessSpawnError; + class SecurityError extends MessageError { + } + exports3.SecurityError = SecurityError; + class ProcessTermError extends MessageError { + } + exports3.ProcessTermError = ProcessTermError; + class ResponseError extends Error { + constructor(msg, responseCode) { + super(msg); + this.responseCode = responseCode; + } + } + exports3.ResponseError = ResponseError; + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.getFirstSuitableFolder = exports3.readFirstAvailableStream = exports3.makeTempDir = exports3.hardlinksWork = exports3.writeFilePreservingEol = exports3.getFileSizeOnDisk = exports3.walk = exports3.symlink = exports3.find = exports3.readJsonAndFile = exports3.readJson = exports3.readFileAny = exports3.hardlinkBulk = exports3.copyBulk = exports3.unlink = exports3.glob = exports3.link = exports3.chmod = exports3.lstat = exports3.exists = exports3.mkdirp = exports3.stat = exports3.access = exports3.rename = exports3.readdir = exports3.realpath = exports3.readlink = exports3.writeFile = exports3.open = exports3.readFileBuffer = exports3.lockQueue = exports3.constants = void 0; + var _asyncToGenerator2; + function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); + } + let buildActionsForCopy = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, events, possibleExtraneous, reporter) { + let build = (() => { + var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { + const src = data.src, dest = data.dest, type = data.type; + const onFresh = data.onFresh || noop; + const onDone = data.onDone || noop; + if (files.has(dest.toLowerCase())) { + reporter.verbose(`The case-insensitive file ${dest} shouldn't be copied twice in one bulk copy`); + } else { + files.add(dest.toLowerCase()); + } + if (type === "symlink") { + yield mkdirp((_path || _load_path()).default.dirname(dest)); + onFresh(); + actions.symlink.push({ + dest, + linkname: src + }); + onDone(); + return; + } + if (events.ignoreBasenames.indexOf((_path || _load_path()).default.basename(src)) >= 0) { + return; + } + const srcStat = yield lstat(src); + let srcFiles; + if (srcStat.isDirectory()) { + srcFiles = yield readdir(src); + } + let destStat; + try { + destStat = yield lstat(dest); + } catch (e) { + if (e.code !== "ENOENT") { + throw e; + } + } + if (destStat) { + const bothSymlinks = srcStat.isSymbolicLink() && destStat.isSymbolicLink(); + const bothFolders = srcStat.isDirectory() && destStat.isDirectory(); + const bothFiles = srcStat.isFile() && destStat.isFile(); + if (bothFiles && artifactFiles.has(dest)) { + onDone(); + reporter.verbose(reporter.lang("verboseFileSkipArtifact", src)); + return; + } + if (bothFiles && srcStat.size === destStat.size && (0, (_fsNormalized || _load_fsNormalized()).fileDatesEqual)(srcStat.mtime, destStat.mtime)) { + onDone(); + reporter.verbose(reporter.lang("verboseFileSkip", src, dest, srcStat.size, +srcStat.mtime)); + return; + } + if (bothSymlinks) { + const srcReallink = yield readlink(src); + if (srcReallink === (yield readlink(dest))) { + onDone(); + reporter.verbose(reporter.lang("verboseFileSkipSymlink", src, dest, srcReallink)); + return; + } + } + if (bothFolders) { + const destFiles = yield readdir(dest); + invariant(srcFiles, "src files not initialised"); + for (var _iterator4 = destFiles, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator](); ; ) { + var _ref6; + if (_isArray4) { + if (_i4 >= _iterator4.length) + break; + _ref6 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) + break; + _ref6 = _i4.value; + } + const file = _ref6; + if (srcFiles.indexOf(file) < 0) { + const loc = (_path || _load_path()).default.join(dest, file); + possibleExtraneous.add(loc); + if ((yield lstat(loc)).isDirectory()) { + for (var _iterator5 = yield readdir(loc), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator](); ; ) { + var _ref7; + if (_isArray5) { + if (_i5 >= _iterator5.length) + break; + _ref7 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) + break; + _ref7 = _i5.value; + } + const file2 = _ref7; + possibleExtraneous.add((_path || _load_path()).default.join(loc, file2)); + } + } + } + } + } + } + if (destStat && destStat.isSymbolicLink()) { + yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dest); + destStat = null; + } + if (srcStat.isSymbolicLink()) { + onFresh(); + const linkname = yield readlink(src); + actions.symlink.push({ + dest, + linkname + }); + onDone(); + } else if (srcStat.isDirectory()) { + if (!destStat) { + reporter.verbose(reporter.lang("verboseFileFolder", dest)); + yield mkdirp(dest); + } + const destParts = dest.split((_path || _load_path()).default.sep); + while (destParts.length) { + files.add(destParts.join((_path || _load_path()).default.sep).toLowerCase()); + destParts.pop(); + } + invariant(srcFiles, "src files not initialised"); + let remaining = srcFiles.length; + if (!remaining) { + onDone(); + } + for (var _iterator6 = srcFiles, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator](); ; ) { + var _ref8; + if (_isArray6) { + if (_i6 >= _iterator6.length) + break; + _ref8 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) + break; + _ref8 = _i6.value; + } + const file = _ref8; + queue.push({ + dest: (_path || _load_path()).default.join(dest, file), + onFresh, + onDone: function(_onDone) { + function onDone2() { + return _onDone.apply(this, arguments); + } + onDone2.toString = function() { + return _onDone.toString(); + }; + return onDone2; + }(function() { + if (--remaining === 0) { + onDone(); + } + }), + src: (_path || _load_path()).default.join(src, file) + }); + } + } else if (srcStat.isFile()) { + onFresh(); + actions.file.push({ + src, + dest, + atime: srcStat.atime, + mtime: srcStat.mtime, + mode: srcStat.mode + }); + onDone(); + } else { + throw new Error(`unsure how to copy this: ${src}`); + } + }); + return function build2(_x5) { + return _ref5.apply(this, arguments); + }; + })(); + const artifactFiles = new Set(events.artifactFiles || []); + const files = new Set(); + for (var _iterator = queue, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator](); ; ) { + var _ref2; + if (_isArray) { + if (_i >= _iterator.length) + break; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) + break; + _ref2 = _i.value; + } + const item = _ref2; + const onDone = item.onDone; + item.onDone = function() { + events.onProgress(item.dest); + if (onDone) { + onDone(); + } + }; + } + events.onStart(queue.length); + const actions = { + file: [], + symlink: [], + link: [] + }; + while (queue.length) { + const items = queue.splice(0, CONCURRENT_QUEUE_ITEMS); + yield Promise.all(items.map(build)); + } + for (var _iterator2 = artifactFiles, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator](); ; ) { + var _ref3; + if (_isArray2) { + if (_i2 >= _iterator2.length) + break; + _ref3 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) + break; + _ref3 = _i2.value; + } + const file = _ref3; + if (possibleExtraneous.has(file)) { + reporter.verbose(reporter.lang("verboseFilePhantomExtraneous", file)); + possibleExtraneous.delete(file); + } + } + for (var _iterator3 = possibleExtraneous, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator](); ; ) { + var _ref4; + if (_isArray3) { + if (_i3 >= _iterator3.length) + break; + _ref4 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) + break; + _ref4 = _i3.value; + } + const loc = _ref4; + if (files.has(loc.toLowerCase())) { + possibleExtraneous.delete(loc); + } + } + return actions; + }); + return function buildActionsForCopy2(_x, _x2, _x3, _x4) { + return _ref.apply(this, arguments); + }; + })(); + let buildActionsForHardlink = (() => { + var _ref9 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, events, possibleExtraneous, reporter) { + let build = (() => { + var _ref13 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { + const src = data.src, dest = data.dest; + const onFresh = data.onFresh || noop; + const onDone = data.onDone || noop; + if (files.has(dest.toLowerCase())) { + onDone(); + return; + } + files.add(dest.toLowerCase()); + if (events.ignoreBasenames.indexOf((_path || _load_path()).default.basename(src)) >= 0) { + return; + } + const srcStat = yield lstat(src); + let srcFiles; + if (srcStat.isDirectory()) { + srcFiles = yield readdir(src); + } + const destExists = yield exists(dest); + if (destExists) { + const destStat = yield lstat(dest); + const bothSymlinks = srcStat.isSymbolicLink() && destStat.isSymbolicLink(); + const bothFolders = srcStat.isDirectory() && destStat.isDirectory(); + const bothFiles = srcStat.isFile() && destStat.isFile(); + if (srcStat.mode !== destStat.mode) { + try { + yield access(dest, srcStat.mode); + } catch (err) { + reporter.verbose(err); + } + } + if (bothFiles && artifactFiles.has(dest)) { + onDone(); + reporter.verbose(reporter.lang("verboseFileSkipArtifact", src)); + return; + } + if (bothFiles && srcStat.ino !== null && srcStat.ino === destStat.ino) { + onDone(); + reporter.verbose(reporter.lang("verboseFileSkip", src, dest, srcStat.ino)); + return; + } + if (bothSymlinks) { + const srcReallink = yield readlink(src); + if (srcReallink === (yield readlink(dest))) { + onDone(); + reporter.verbose(reporter.lang("verboseFileSkipSymlink", src, dest, srcReallink)); + return; + } + } + if (bothFolders) { + const destFiles = yield readdir(dest); + invariant(srcFiles, "src files not initialised"); + for (var _iterator10 = destFiles, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator](); ; ) { + var _ref14; + if (_isArray10) { + if (_i10 >= _iterator10.length) + break; + _ref14 = _iterator10[_i10++]; + } else { + _i10 = _iterator10.next(); + if (_i10.done) + break; + _ref14 = _i10.value; + } + const file = _ref14; + if (srcFiles.indexOf(file) < 0) { + const loc = (_path || _load_path()).default.join(dest, file); + possibleExtraneous.add(loc); + if ((yield lstat(loc)).isDirectory()) { + for (var _iterator11 = yield readdir(loc), _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : _iterator11[Symbol.iterator](); ; ) { + var _ref15; + if (_isArray11) { + if (_i11 >= _iterator11.length) + break; + _ref15 = _iterator11[_i11++]; + } else { + _i11 = _iterator11.next(); + if (_i11.done) + break; + _ref15 = _i11.value; + } + const file2 = _ref15; + possibleExtraneous.add((_path || _load_path()).default.join(loc, file2)); + } + } + } + } + } + } + if (srcStat.isSymbolicLink()) { + onFresh(); + const linkname = yield readlink(src); + actions.symlink.push({ + dest, + linkname + }); + onDone(); + } else if (srcStat.isDirectory()) { + reporter.verbose(reporter.lang("verboseFileFolder", dest)); + yield mkdirp(dest); + const destParts = dest.split((_path || _load_path()).default.sep); + while (destParts.length) { + files.add(destParts.join((_path || _load_path()).default.sep).toLowerCase()); + destParts.pop(); + } + invariant(srcFiles, "src files not initialised"); + let remaining = srcFiles.length; + if (!remaining) { + onDone(); + } + for (var _iterator12 = srcFiles, _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : _iterator12[Symbol.iterator](); ; ) { + var _ref16; + if (_isArray12) { + if (_i12 >= _iterator12.length) + break; + _ref16 = _iterator12[_i12++]; + } else { + _i12 = _iterator12.next(); + if (_i12.done) + break; + _ref16 = _i12.value; + } + const file = _ref16; + queue.push({ + onFresh, + src: (_path || _load_path()).default.join(src, file), + dest: (_path || _load_path()).default.join(dest, file), + onDone: function(_onDone2) { + function onDone2() { + return _onDone2.apply(this, arguments); + } + onDone2.toString = function() { + return _onDone2.toString(); + }; + return onDone2; + }(function() { + if (--remaining === 0) { + onDone(); + } + }) + }); + } + } else if (srcStat.isFile()) { + onFresh(); + actions.link.push({ + src, + dest, + removeDest: destExists + }); + onDone(); + } else { + throw new Error(`unsure how to copy this: ${src}`); + } + }); + return function build2(_x10) { + return _ref13.apply(this, arguments); + }; + })(); + const artifactFiles = new Set(events.artifactFiles || []); + const files = new Set(); + for (var _iterator7 = queue, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator](); ; ) { + var _ref10; + if (_isArray7) { + if (_i7 >= _iterator7.length) + break; + _ref10 = _iterator7[_i7++]; + } else { + _i7 = _iterator7.next(); + if (_i7.done) + break; + _ref10 = _i7.value; + } + const item = _ref10; + const onDone = item.onDone || noop; + item.onDone = function() { + events.onProgress(item.dest); + onDone(); + }; + } + events.onStart(queue.length); + const actions = { + file: [], + symlink: [], + link: [] + }; + while (queue.length) { + const items = queue.splice(0, CONCURRENT_QUEUE_ITEMS); + yield Promise.all(items.map(build)); + } + for (var _iterator8 = artifactFiles, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator](); ; ) { + var _ref11; + if (_isArray8) { + if (_i8 >= _iterator8.length) + break; + _ref11 = _iterator8[_i8++]; + } else { + _i8 = _iterator8.next(); + if (_i8.done) + break; + _ref11 = _i8.value; + } + const file = _ref11; + if (possibleExtraneous.has(file)) { + reporter.verbose(reporter.lang("verboseFilePhantomExtraneous", file)); + possibleExtraneous.delete(file); + } + } + for (var _iterator9 = possibleExtraneous, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator](); ; ) { + var _ref12; + if (_isArray9) { + if (_i9 >= _iterator9.length) + break; + _ref12 = _iterator9[_i9++]; + } else { + _i9 = _iterator9.next(); + if (_i9.done) + break; + _ref12 = _i9.value; + } + const loc = _ref12; + if (files.has(loc.toLowerCase())) { + possibleExtraneous.delete(loc); + } + } + return actions; + }); + return function buildActionsForHardlink2(_x6, _x7, _x8, _x9) { + return _ref9.apply(this, arguments); + }; + })(); + let copyBulk = exports3.copyBulk = (() => { + var _ref17 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, reporter, _events) { + const events = { + onStart: _events && _events.onStart || noop, + onProgress: _events && _events.onProgress || noop, + possibleExtraneous: _events ? _events.possibleExtraneous : new Set(), + ignoreBasenames: _events && _events.ignoreBasenames || [], + artifactFiles: _events && _events.artifactFiles || [] + }; + const actions = yield buildActionsForCopy(queue, events, events.possibleExtraneous, reporter); + events.onStart(actions.file.length + actions.symlink.length + actions.link.length); + const fileActions = actions.file; + const currentlyWriting = new Map(); + yield (_promise || _load_promise()).queue(fileActions, (() => { + var _ref18 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { + let writePromise; + while (writePromise = currentlyWriting.get(data.dest)) { + yield writePromise; + } + reporter.verbose(reporter.lang("verboseFileCopy", data.src, data.dest)); + const copier = (0, (_fsNormalized || _load_fsNormalized()).copyFile)(data, function() { + return currentlyWriting.delete(data.dest); + }); + currentlyWriting.set(data.dest, copier); + events.onProgress(data.dest); + return copier; + }); + return function(_x14) { + return _ref18.apply(this, arguments); + }; + })(), CONCURRENT_QUEUE_ITEMS); + const symlinkActions = actions.symlink; + yield (_promise || _load_promise()).queue(symlinkActions, function(data) { + const linkname = (_path || _load_path()).default.resolve((_path || _load_path()).default.dirname(data.dest), data.linkname); + reporter.verbose(reporter.lang("verboseFileSymlink", data.dest, linkname)); + return symlink(linkname, data.dest); + }); + }); + return function copyBulk2(_x11, _x12, _x13) { + return _ref17.apply(this, arguments); + }; + })(); + let hardlinkBulk = exports3.hardlinkBulk = (() => { + var _ref19 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, reporter, _events) { + const events = { + onStart: _events && _events.onStart || noop, + onProgress: _events && _events.onProgress || noop, + possibleExtraneous: _events ? _events.possibleExtraneous : new Set(), + artifactFiles: _events && _events.artifactFiles || [], + ignoreBasenames: [] + }; + const actions = yield buildActionsForHardlink(queue, events, events.possibleExtraneous, reporter); + events.onStart(actions.file.length + actions.symlink.length + actions.link.length); + const fileActions = actions.link; + yield (_promise || _load_promise()).queue(fileActions, (() => { + var _ref20 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { + reporter.verbose(reporter.lang("verboseFileLink", data.src, data.dest)); + if (data.removeDest) { + yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(data.dest); + } + yield link(data.src, data.dest); + }); + return function(_x18) { + return _ref20.apply(this, arguments); + }; + })(), CONCURRENT_QUEUE_ITEMS); + const symlinkActions = actions.symlink; + yield (_promise || _load_promise()).queue(symlinkActions, function(data) { + const linkname = (_path || _load_path()).default.resolve((_path || _load_path()).default.dirname(data.dest), data.linkname); + reporter.verbose(reporter.lang("verboseFileSymlink", data.dest, linkname)); + return symlink(linkname, data.dest); + }); + }); + return function hardlinkBulk2(_x15, _x16, _x17) { + return _ref19.apply(this, arguments); + }; + })(); + let readFileAny = exports3.readFileAny = (() => { + var _ref21 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (files) { + for (var _iterator13 = files, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : _iterator13[Symbol.iterator](); ; ) { + var _ref22; + if (_isArray13) { + if (_i13 >= _iterator13.length) + break; + _ref22 = _iterator13[_i13++]; + } else { + _i13 = _iterator13.next(); + if (_i13.done) + break; + _ref22 = _i13.value; + } + const file = _ref22; + if (yield exists(file)) { + return readFile(file); + } + } + return null; + }); + return function readFileAny2(_x19) { + return _ref21.apply(this, arguments); + }; + })(); + let readJson = exports3.readJson = (() => { + var _ref23 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) { + return (yield readJsonAndFile(loc)).object; + }); + return function readJson2(_x20) { + return _ref23.apply(this, arguments); + }; + })(); + let readJsonAndFile = exports3.readJsonAndFile = (() => { + var _ref24 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) { + const file = yield readFile(loc); + try { + return { + object: (0, (_map || _load_map()).default)(JSON.parse(stripBOM(file))), + content: file + }; + } catch (err) { + err.message = `${loc}: ${err.message}`; + throw err; + } + }); + return function readJsonAndFile2(_x21) { + return _ref24.apply(this, arguments); + }; + })(); + let find = exports3.find = (() => { + var _ref25 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (filename, dir) { + const parts = dir.split((_path || _load_path()).default.sep); + while (parts.length) { + const loc = parts.concat(filename).join((_path || _load_path()).default.sep); + if (yield exists(loc)) { + return loc; + } else { + parts.pop(); + } + } + return false; + }); + return function find2(_x22, _x23) { + return _ref25.apply(this, arguments); + }; + })(); + let symlink = exports3.symlink = (() => { + var _ref26 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (src, dest) { + try { + const stats = yield lstat(dest); + if (stats.isSymbolicLink()) { + const resolved = yield realpath(dest); + if (resolved === src) { + return; + } + } + } catch (err) { + if (err.code !== "ENOENT") { + throw err; + } + } + yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dest); + if (process.platform === "win32") { + yield fsSymlink(src, dest, "junction"); + } else { + let relative2; + try { + relative2 = (_path || _load_path()).default.relative((_fs || _load_fs()).default.realpathSync((_path || _load_path()).default.dirname(dest)), (_fs || _load_fs()).default.realpathSync(src)); + } catch (err) { + if (err.code !== "ENOENT") { + throw err; + } + relative2 = (_path || _load_path()).default.relative((_path || _load_path()).default.dirname(dest), src); + } + yield fsSymlink(relative2 || ".", dest); + } + }); + return function symlink2(_x24, _x25) { + return _ref26.apply(this, arguments); + }; + })(); + let walk = exports3.walk = (() => { + var _ref27 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, relativeDir, ignoreBasenames = new Set()) { + let files = []; + let filenames = yield readdir(dir); + if (ignoreBasenames.size) { + filenames = filenames.filter(function(name) { + return !ignoreBasenames.has(name); + }); + } + for (var _iterator14 = filenames, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : _iterator14[Symbol.iterator](); ; ) { + var _ref28; + if (_isArray14) { + if (_i14 >= _iterator14.length) + break; + _ref28 = _iterator14[_i14++]; + } else { + _i14 = _iterator14.next(); + if (_i14.done) + break; + _ref28 = _i14.value; + } + const name = _ref28; + const relative2 = relativeDir ? (_path || _load_path()).default.join(relativeDir, name) : name; + const loc = (_path || _load_path()).default.join(dir, name); + const stat2 = yield lstat(loc); + files.push({ + relative: relative2, + basename: name, + absolute: loc, + mtime: +stat2.mtime + }); + if (stat2.isDirectory()) { + files = files.concat(yield walk(loc, relative2, ignoreBasenames)); + } + } + return files; + }); + return function walk2(_x26, _x27) { + return _ref27.apply(this, arguments); + }; + })(); + let getFileSizeOnDisk = exports3.getFileSizeOnDisk = (() => { + var _ref29 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) { + const stat2 = yield lstat(loc); + const size = stat2.size, blockSize = stat2.blksize; + return Math.ceil(size / blockSize) * blockSize; + }); + return function getFileSizeOnDisk2(_x28) { + return _ref29.apply(this, arguments); + }; + })(); + let getEolFromFile = (() => { + var _ref30 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (path) { + if (!(yield exists(path))) { + return void 0; + } + const buffer = yield readFileBuffer(path); + for (let i = 0; i < buffer.length; ++i) { + if (buffer[i] === cr) { + return "\r\n"; + } + if (buffer[i] === lf) { + return "\n"; + } + } + return void 0; + }); + return function getEolFromFile2(_x29) { + return _ref30.apply(this, arguments); + }; + })(); + let writeFilePreservingEol = exports3.writeFilePreservingEol = (() => { + var _ref31 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (path, data) { + const eol = (yield getEolFromFile(path)) || (_os || _load_os()).default.EOL; + if (eol !== "\n") { + data = data.replace(/\n/g, eol); + } + yield writeFile(path, data); + }); + return function writeFilePreservingEol2(_x30, _x31) { + return _ref31.apply(this, arguments); + }; + })(); + let hardlinksWork = exports3.hardlinksWork = (() => { + var _ref32 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir) { + const filename = "test-file" + Math.random(); + const file = (_path || _load_path()).default.join(dir, filename); + const fileLink = (_path || _load_path()).default.join(dir, filename + "-link"); + try { + yield writeFile(file, "test"); + yield link(file, fileLink); + } catch (err) { + return false; + } finally { + yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(file); + yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(fileLink); + } + return true; + }); + return function hardlinksWork2(_x32) { + return _ref32.apply(this, arguments); + }; + })(); + let makeTempDir = exports3.makeTempDir = (() => { + var _ref33 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (prefix) { + const dir = (_path || _load_path()).default.join((_os || _load_os()).default.tmpdir(), `yarn-${prefix || ""}-${Date.now()}-${Math.random()}`); + yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dir); + yield mkdirp(dir); + return dir; + }); + return function makeTempDir2(_x33) { + return _ref33.apply(this, arguments); + }; + })(); + let readFirstAvailableStream = exports3.readFirstAvailableStream = (() => { + var _ref34 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (paths) { + for (var _iterator15 = paths, _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : _iterator15[Symbol.iterator](); ; ) { + var _ref35; + if (_isArray15) { + if (_i15 >= _iterator15.length) + break; + _ref35 = _iterator15[_i15++]; + } else { + _i15 = _iterator15.next(); + if (_i15.done) + break; + _ref35 = _i15.value; + } + const path = _ref35; + try { + const fd = yield open(path, "r"); + return (_fs || _load_fs()).default.createReadStream(path, { fd }); + } catch (err) { + } + } + return null; + }); + return function readFirstAvailableStream2(_x34) { + return _ref34.apply(this, arguments); + }; + })(); + let getFirstSuitableFolder = exports3.getFirstSuitableFolder = (() => { + var _ref36 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (paths, mode = constants.W_OK | constants.X_OK) { + const result = { + skipped: [], + folder: null + }; + for (var _iterator16 = paths, _isArray16 = Array.isArray(_iterator16), _i16 = 0, _iterator16 = _isArray16 ? _iterator16 : _iterator16[Symbol.iterator](); ; ) { + var _ref37; + if (_isArray16) { + if (_i16 >= _iterator16.length) + break; + _ref37 = _iterator16[_i16++]; + } else { + _i16 = _iterator16.next(); + if (_i16.done) + break; + _ref37 = _i16.value; + } + const folder = _ref37; + try { + yield mkdirp(folder); + yield access(folder, mode); + result.folder = folder; + return result; + } catch (error) { + result.skipped.push({ + error, + folder + }); + } + } + return result; + }); + return function getFirstSuitableFolder2(_x35) { + return _ref36.apply(this, arguments); + }; + })(); + exports3.copy = copy; + exports3.readFile = readFile; + exports3.readFileRaw = readFileRaw; + exports3.normalizeOS = normalizeOS; + var _fs; + function _load_fs() { + return _fs = _interopRequireDefault(__webpack_require__(3)); + } + var _glob; + function _load_glob() { + return _glob = _interopRequireDefault(__webpack_require__(75)); + } + var _os; + function _load_os() { + return _os = _interopRequireDefault(__webpack_require__(36)); + } + var _path; + function _load_path() { + return _path = _interopRequireDefault(__webpack_require__(0)); + } + var _blockingQueue; + function _load_blockingQueue() { + return _blockingQueue = _interopRequireDefault(__webpack_require__(84)); + } + var _promise; + function _load_promise() { + return _promise = _interopRequireWildcard(__webpack_require__(40)); + } + var _promise2; + function _load_promise2() { + return _promise2 = __webpack_require__(40); + } + var _map; + function _load_map() { + return _map = _interopRequireDefault(__webpack_require__(20)); + } + var _fsNormalized; + function _load_fsNormalized() { + return _fsNormalized = __webpack_require__(164); + } + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) + newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + const constants = exports3.constants = typeof (_fs || _load_fs()).default.constants !== "undefined" ? (_fs || _load_fs()).default.constants : { + R_OK: (_fs || _load_fs()).default.R_OK, + W_OK: (_fs || _load_fs()).default.W_OK, + X_OK: (_fs || _load_fs()).default.X_OK + }; + const lockQueue = exports3.lockQueue = new (_blockingQueue || _load_blockingQueue()).default("fs lock"); + const readFileBuffer = exports3.readFileBuffer = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readFile); + const open = exports3.open = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.open); + const writeFile = exports3.writeFile = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.writeFile); + const readlink = exports3.readlink = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readlink); + const realpath = exports3.realpath = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.realpath); + const readdir = exports3.readdir = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readdir); + const rename = exports3.rename = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.rename); + const access = exports3.access = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.access); + const stat = exports3.stat = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.stat); + const mkdirp = exports3.mkdirp = (0, (_promise2 || _load_promise2()).promisify)(__webpack_require__(116)); + const exists = exports3.exists = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.exists, true); + const lstat = exports3.lstat = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.lstat); + const chmod = exports3.chmod = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.chmod); + const link = exports3.link = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.link); + const glob = exports3.glob = (0, (_promise2 || _load_promise2()).promisify)((_glob || _load_glob()).default); + exports3.unlink = (_fsNormalized || _load_fsNormalized()).unlink; + const CONCURRENT_QUEUE_ITEMS = (_fs || _load_fs()).default.copyFile ? 128 : 4; + const fsSymlink = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.symlink); + const invariant = __webpack_require__(7); + const stripBOM = __webpack_require__(122); + const noop = () => { + }; + function copy(src, dest, reporter) { + return copyBulk([{ src, dest }], reporter); + } + function _readFile(loc, encoding) { + return new Promise((resolve, reject) => { + (_fs || _load_fs()).default.readFile(loc, encoding, function(err, content) { + if (err) { + reject(err); + } else { + resolve(content); + } + }); + }); + } + function readFile(loc) { + return _readFile(loc, "utf8").then(normalizeOS); + } + function readFileRaw(loc) { + return _readFile(loc, "binary"); + } + function normalizeOS(body) { + return body.replace(/\r\n/g, "\n"); + } + const cr = "\r".charCodeAt(0); + const lf = "\n".charCodeAt(0); + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.getPathKey = getPathKey; + const os = __webpack_require__(36); + const path = __webpack_require__(0); + const userHome = __webpack_require__(45).default; + var _require = __webpack_require__(171); + const getCacheDir = _require.getCacheDir, getConfigDir = _require.getConfigDir, getDataDir = _require.getDataDir; + const isWebpackBundle = __webpack_require__(227); + const DEPENDENCY_TYPES = exports3.DEPENDENCY_TYPES = ["devDependencies", "dependencies", "optionalDependencies", "peerDependencies"]; + const RESOLUTIONS = exports3.RESOLUTIONS = "resolutions"; + const MANIFEST_FIELDS = exports3.MANIFEST_FIELDS = [RESOLUTIONS, ...DEPENDENCY_TYPES]; + const SUPPORTED_NODE_VERSIONS = exports3.SUPPORTED_NODE_VERSIONS = "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0"; + const YARN_REGISTRY = exports3.YARN_REGISTRY = "https://registry.yarnpkg.com"; + const YARN_DOCS = exports3.YARN_DOCS = "https://yarnpkg.com/en/docs/cli/"; + const YARN_INSTALLER_SH = exports3.YARN_INSTALLER_SH = "https://yarnpkg.com/install.sh"; + const YARN_INSTALLER_MSI = exports3.YARN_INSTALLER_MSI = "https://yarnpkg.com/latest.msi"; + const SELF_UPDATE_VERSION_URL = exports3.SELF_UPDATE_VERSION_URL = "https://yarnpkg.com/latest-version"; + const CACHE_VERSION = exports3.CACHE_VERSION = 2; + const LOCKFILE_VERSION = exports3.LOCKFILE_VERSION = 1; + const NETWORK_CONCURRENCY = exports3.NETWORK_CONCURRENCY = 8; + const NETWORK_TIMEOUT = exports3.NETWORK_TIMEOUT = 30 * 1e3; + const CHILD_CONCURRENCY = exports3.CHILD_CONCURRENCY = 5; + const REQUIRED_PACKAGE_KEYS = exports3.REQUIRED_PACKAGE_KEYS = ["name", "version", "_uid"]; + function getPreferredCacheDirectories() { + const preferredCacheDirectories = [getCacheDir()]; + if (process.getuid) { + preferredCacheDirectories.push(path.join(os.tmpdir(), `.yarn-cache-${process.getuid()}`)); + } + preferredCacheDirectories.push(path.join(os.tmpdir(), `.yarn-cache`)); + return preferredCacheDirectories; + } + const PREFERRED_MODULE_CACHE_DIRECTORIES = exports3.PREFERRED_MODULE_CACHE_DIRECTORIES = getPreferredCacheDirectories(); + const CONFIG_DIRECTORY = exports3.CONFIG_DIRECTORY = getConfigDir(); + const DATA_DIRECTORY = exports3.DATA_DIRECTORY = getDataDir(); + const LINK_REGISTRY_DIRECTORY = exports3.LINK_REGISTRY_DIRECTORY = path.join(DATA_DIRECTORY, "link"); + const GLOBAL_MODULE_DIRECTORY = exports3.GLOBAL_MODULE_DIRECTORY = path.join(DATA_DIRECTORY, "global"); + const NODE_BIN_PATH = exports3.NODE_BIN_PATH = process.execPath; + const YARN_BIN_PATH = exports3.YARN_BIN_PATH = getYarnBinPath(); + function getYarnBinPath() { + if (isWebpackBundle) { + return __filename; + } else { + return path.join(__dirname, "..", "bin", "yarn.js"); + } + } + const NODE_MODULES_FOLDER = exports3.NODE_MODULES_FOLDER = "node_modules"; + const NODE_PACKAGE_JSON = exports3.NODE_PACKAGE_JSON = "package.json"; + const POSIX_GLOBAL_PREFIX = exports3.POSIX_GLOBAL_PREFIX = `${process.env.DESTDIR || ""}/usr/local`; + const FALLBACK_GLOBAL_PREFIX = exports3.FALLBACK_GLOBAL_PREFIX = path.join(userHome, ".yarn"); + const META_FOLDER = exports3.META_FOLDER = ".yarn-meta"; + const INTEGRITY_FILENAME = exports3.INTEGRITY_FILENAME = ".yarn-integrity"; + const LOCKFILE_FILENAME = exports3.LOCKFILE_FILENAME = "yarn.lock"; + const METADATA_FILENAME = exports3.METADATA_FILENAME = ".yarn-metadata.json"; + const TARBALL_FILENAME = exports3.TARBALL_FILENAME = ".yarn-tarball.tgz"; + const CLEAN_FILENAME = exports3.CLEAN_FILENAME = ".yarnclean"; + const NPM_LOCK_FILENAME = exports3.NPM_LOCK_FILENAME = "package-lock.json"; + const NPM_SHRINKWRAP_FILENAME = exports3.NPM_SHRINKWRAP_FILENAME = "npm-shrinkwrap.json"; + const DEFAULT_INDENT = exports3.DEFAULT_INDENT = " "; + const SINGLE_INSTANCE_PORT = exports3.SINGLE_INSTANCE_PORT = 31997; + const SINGLE_INSTANCE_FILENAME = exports3.SINGLE_INSTANCE_FILENAME = ".yarn-single-instance"; + const ENV_PATH_KEY = exports3.ENV_PATH_KEY = getPathKey(process.platform, process.env); + function getPathKey(platform, env) { + let pathKey = "PATH"; + if (platform === "win32") { + pathKey = "Path"; + for (const key in env) { + if (key.toLowerCase() === "path") { + pathKey = key; + } + } + } + return pathKey; + } + const VERSION_COLOR_SCHEME = exports3.VERSION_COLOR_SCHEME = { + major: "red", + premajor: "red", + minor: "yellow", + preminor: "yellow", + patch: "green", + prepatch: "green", + prerelease: "red", + unchanged: "white", + unknown: "red" + }; + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + var NODE_ENV = process.env.NODE_ENV; + var invariant = function(condition, format, a, b, c, d, e, f) { + if (NODE_ENV !== "production") { + if (format === void 0) { + throw new Error("invariant requires an error message argument"); + } + } + if (!condition) { + var error; + if (format === void 0) { + error = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."); + } else { + var args2 = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error(format.replace(/%s/g, function() { + return args2[argIndex++]; + })); + error.name = "Invariant Violation"; + } + error.framesToPop = 1; + throw error; + } + }; + module3.exports = invariant; + }, + , + function(module3, exports3) { + module3.exports = require("crypto"); + }, + , + function(module3, exports3) { + var global2 = module3.exports = typeof window != "undefined" && window.Math == Math ? window : typeof self != "undefined" && self.Math == Math ? self : Function("return this")(); + if (typeof __g == "number") + __g = global2; + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.sortAlpha = sortAlpha; + exports3.entries = entries; + exports3.removePrefix = removePrefix; + exports3.removeSuffix = removeSuffix; + exports3.addSuffix = addSuffix; + exports3.hyphenate = hyphenate; + exports3.camelCase = camelCase; + exports3.compareSortedArrays = compareSortedArrays; + exports3.sleep = sleep; + const _camelCase = __webpack_require__(176); + function sortAlpha(a, b) { + const shortLen = Math.min(a.length, b.length); + for (let i = 0; i < shortLen; i++) { + const aChar = a.charCodeAt(i); + const bChar = b.charCodeAt(i); + if (aChar !== bChar) { + return aChar - bChar; + } + } + return a.length - b.length; + } + function entries(obj) { + const entries2 = []; + if (obj) { + for (const key in obj) { + entries2.push([key, obj[key]]); + } + } + return entries2; + } + function removePrefix(pattern, prefix) { + if (pattern.startsWith(prefix)) { + pattern = pattern.slice(prefix.length); + } + return pattern; + } + function removeSuffix(pattern, suffix) { + if (pattern.endsWith(suffix)) { + return pattern.slice(0, -suffix.length); + } + return pattern; + } + function addSuffix(pattern, suffix) { + if (!pattern.endsWith(suffix)) { + return pattern + suffix; + } + return pattern; + } + function hyphenate(str) { + return str.replace(/[A-Z]/g, (match) => { + return "-" + match.charAt(0).toLowerCase(); + }); + } + function camelCase(str) { + if (/[A-Z]/.test(str)) { + return null; + } else { + return _camelCase(str); + } + } + function compareSortedArrays(array1, array2) { + if (array1.length !== array2.length) { + return false; + } + for (let i = 0, len = array1.length; i < len; i++) { + if (array1[i] !== array2[i]) { + return false; + } + } + return true; + } + function sleep(ms) { + return new Promise((resolve) => { + setTimeout(resolve, ms); + }); + } + }, + function(module3, exports3, __webpack_require__) { + var store = __webpack_require__(107)("wks"); + var uid = __webpack_require__(111); + var Symbol2 = __webpack_require__(11).Symbol; + var USE_SYMBOL = typeof Symbol2 == "function"; + var $exports = module3.exports = function(name) { + return store[name] || (store[name] = USE_SYMBOL && Symbol2[name] || (USE_SYMBOL ? Symbol2 : uid)("Symbol." + name)); + }; + $exports.store = store; + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.stringify = exports3.parse = void 0; + var _asyncToGenerator2; + function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); + } + var _parse; + function _load_parse() { + return _parse = __webpack_require__(81); + } + Object.defineProperty(exports3, "parse", { + enumerable: true, + get: function get() { + return _interopRequireDefault(_parse || _load_parse()).default; + } + }); + var _stringify; + function _load_stringify() { + return _stringify = __webpack_require__(150); + } + Object.defineProperty(exports3, "stringify", { + enumerable: true, + get: function get() { + return _interopRequireDefault(_stringify || _load_stringify()).default; + } + }); + exports3.implodeEntry = implodeEntry; + exports3.explodeEntry = explodeEntry; + var _misc; + function _load_misc() { + return _misc = __webpack_require__(12); + } + var _normalizePattern; + function _load_normalizePattern() { + return _normalizePattern = __webpack_require__(29); + } + var _parse2; + function _load_parse2() { + return _parse2 = _interopRequireDefault(__webpack_require__(81)); + } + var _constants; + function _load_constants() { + return _constants = __webpack_require__(6); + } + var _fs; + function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(5)); + } + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) + newObj[key] = obj[key]; + } + } + newObj.default = obj; + return newObj; + } + } + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + const invariant = __webpack_require__(7); + const path = __webpack_require__(0); + const ssri = __webpack_require__(55); + function getName(pattern) { + return (0, (_normalizePattern || _load_normalizePattern()).normalizePattern)(pattern).name; + } + function blankObjectUndefined(obj) { + return obj && Object.keys(obj).length ? obj : void 0; + } + function keyForRemote(remote) { + return remote.resolved || (remote.reference && remote.hash ? `${remote.reference}#${remote.hash}` : null); + } + function serializeIntegrity(integrity) { + return integrity.toString().split(" ").sort().join(" "); + } + function implodeEntry(pattern, obj) { + const inferredName = getName(pattern); + const integrity = obj.integrity ? serializeIntegrity(obj.integrity) : ""; + const imploded = { + name: inferredName === obj.name ? void 0 : obj.name, + version: obj.version, + uid: obj.uid === obj.version ? void 0 : obj.uid, + resolved: obj.resolved, + registry: obj.registry === "npm" ? void 0 : obj.registry, + dependencies: blankObjectUndefined(obj.dependencies), + optionalDependencies: blankObjectUndefined(obj.optionalDependencies), + permissions: blankObjectUndefined(obj.permissions), + prebuiltVariants: blankObjectUndefined(obj.prebuiltVariants) + }; + if (integrity) { + imploded.integrity = integrity; + } + return imploded; + } + function explodeEntry(pattern, obj) { + obj.optionalDependencies = obj.optionalDependencies || {}; + obj.dependencies = obj.dependencies || {}; + obj.uid = obj.uid || obj.version; + obj.permissions = obj.permissions || {}; + obj.registry = obj.registry || "npm"; + obj.name = obj.name || getName(pattern); + const integrity = obj.integrity; + if (integrity && integrity.isIntegrity) { + obj.integrity = ssri.parse(integrity); + } + return obj; + } + class Lockfile { + constructor({ cache, source, parseResultType } = {}) { + this.source = source || ""; + this.cache = cache; + this.parseResultType = parseResultType; + } + hasEntriesExistWithoutIntegrity() { + if (!this.cache) { + return false; + } + for (const key in this.cache) { + if (!/^.*@(file:|http)/.test(key) && this.cache[key] && !this.cache[key].integrity) { + return true; + } + } + return false; + } + static fromDirectory(dir, reporter) { + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const lockfileLoc = path.join(dir, (_constants || _load_constants()).LOCKFILE_FILENAME); + let lockfile; + let rawLockfile = ""; + let parseResult; + if (yield (_fs || _load_fs()).exists(lockfileLoc)) { + rawLockfile = yield (_fs || _load_fs()).readFile(lockfileLoc); + parseResult = (0, (_parse2 || _load_parse2()).default)(rawLockfile, lockfileLoc); + if (reporter) { + if (parseResult.type === "merge") { + reporter.info(reporter.lang("lockfileMerged")); + } else if (parseResult.type === "conflict") { + reporter.warn(reporter.lang("lockfileConflict")); + } + } + lockfile = parseResult.object; + } else if (reporter) { + reporter.info(reporter.lang("noLockfileFound")); + } + return new Lockfile({ cache: lockfile, source: rawLockfile, parseResultType: parseResult && parseResult.type }); + })(); + } + getLocked(pattern) { + const cache = this.cache; + if (!cache) { + return void 0; + } + const shrunk = pattern in cache && cache[pattern]; + if (typeof shrunk === "string") { + return this.getLocked(shrunk); + } else if (shrunk) { + explodeEntry(pattern, shrunk); + return shrunk; + } + return void 0; + } + removePattern(pattern) { + const cache = this.cache; + if (!cache) { + return; + } + delete cache[pattern]; + } + getLockfile(patterns) { + const lockfile = {}; + const seen = new Map(); + const sortedPatternsKeys = Object.keys(patterns).sort((_misc || _load_misc()).sortAlpha); + for (var _iterator = sortedPatternsKeys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator](); ; ) { + var _ref; + if (_isArray) { + if (_i >= _iterator.length) + break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) + break; + _ref = _i.value; + } + const pattern = _ref; + const pkg = patterns[pattern]; + const remote = pkg._remote, ref = pkg._reference; + invariant(ref, "Package is missing a reference"); + invariant(remote, "Package is missing a remote"); + const remoteKey = keyForRemote(remote); + const seenPattern = remoteKey && seen.get(remoteKey); + if (seenPattern) { + lockfile[pattern] = seenPattern; + if (!seenPattern.name && getName(pattern) !== pkg.name) { + seenPattern.name = pkg.name; + } + continue; + } + const obj = implodeEntry(pattern, { + name: pkg.name, + version: pkg.version, + uid: pkg._uid, + resolved: remote.resolved, + integrity: remote.integrity, + registry: remote.registry, + dependencies: pkg.dependencies, + peerDependencies: pkg.peerDependencies, + optionalDependencies: pkg.optionalDependencies, + permissions: ref.permissions, + prebuiltVariants: pkg.prebuiltVariants + }); + lockfile[pattern] = obj; + if (remoteKey) { + seen.set(remoteKey, obj); + } + } + return lockfile; + } + } + exports3.default = Lockfile; + }, + , + , + function(module3, exports3) { + module3.exports = require("stream"); + }, + , + , + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.default = nullify; + function nullify(obj = {}) { + if (Array.isArray(obj)) { + for (var _iterator = obj, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator](); ; ) { + var _ref; + if (_isArray) { + if (_i >= _iterator.length) + break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) + break; + _ref = _i.value; + } + const item = _ref; + nullify(item); + } + } else if (obj !== null && typeof obj === "object" || typeof obj === "function") { + Object.setPrototypeOf(obj, null); + if (typeof obj === "object") { + for (const key in obj) { + nullify(obj[key]); + } + } + } + return obj; + } + }, + , + function(module3, exports3) { + module3.exports = require("assert"); + }, + function(module3, exports3) { + var core = module3.exports = { version: "2.5.7" }; + if (typeof __e == "number") + __e = core; + }, + , + , + , + function(module3, exports3, __webpack_require__) { + var isObject = __webpack_require__(34); + module3.exports = function(it) { + if (!isObject(it)) + throw TypeError(it + " is not an object!"); + return it; + }; + }, + , + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.normalizePattern = normalizePattern; + function normalizePattern(pattern) { + let hasVersion = false; + let range = "latest"; + let name = pattern; + let isScoped = false; + if (name[0] === "@") { + isScoped = true; + name = name.slice(1); + } + const parts = name.split("@"); + if (parts.length > 1) { + name = parts.shift(); + range = parts.join("@"); + if (range) { + hasVersion = true; + } else { + range = "*"; + } + } + if (isScoped) { + name = `@${name}`; + } + return { name, range, hasVersion }; + } + }, + , + function(module3, exports3, __webpack_require__) { + var dP = __webpack_require__(50); + var createDesc = __webpack_require__(106); + module3.exports = __webpack_require__(33) ? function(object, key, value) { + return dP.f(object, key, createDesc(1, value)); + } : function(object, key, value) { + object[key] = value; + return object; + }; + }, + function(module3, exports3, __webpack_require__) { + var buffer = __webpack_require__(63); + var Buffer2 = buffer.Buffer; + function copyProps(src, dst) { + for (var key in src) { + dst[key] = src[key]; + } + } + if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) { + module3.exports = buffer; + } else { + copyProps(buffer, exports3); + exports3.Buffer = SafeBuffer; + } + function SafeBuffer(arg, encodingOrOffset, length) { + return Buffer2(arg, encodingOrOffset, length); + } + copyProps(Buffer2, SafeBuffer); + SafeBuffer.from = function(arg, encodingOrOffset, length) { + if (typeof arg === "number") { + throw new TypeError("Argument must not be a number"); + } + return Buffer2(arg, encodingOrOffset, length); + }; + SafeBuffer.alloc = function(size, fill, encoding) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + var buf = Buffer2(size); + if (fill !== void 0) { + if (typeof encoding === "string") { + buf.fill(fill, encoding); + } else { + buf.fill(fill); + } + } else { + buf.fill(0); + } + return buf; + }; + SafeBuffer.allocUnsafe = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return Buffer2(size); + }; + SafeBuffer.allocUnsafeSlow = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return buffer.SlowBuffer(size); + }; + }, + function(module3, exports3, __webpack_require__) { + module3.exports = !__webpack_require__(85)(function() { + return Object.defineProperty({}, "a", { get: function() { + return 7; + } }).a != 7; + }); + }, + function(module3, exports3) { + module3.exports = function(it) { + return typeof it === "object" ? it !== null : typeof it === "function"; + }; + }, + function(module3, exports3) { + module3.exports = {}; + }, + function(module3, exports3) { + module3.exports = require("os"); + }, + , + , + , + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.wait = wait; + exports3.promisify = promisify; + exports3.queue = queue; + function wait(delay) { + return new Promise((resolve) => { + setTimeout(resolve, delay); + }); + } + function promisify(fn2, firstData) { + return function(...args2) { + return new Promise(function(resolve, reject) { + args2.push(function(err, ...result) { + let res = result; + if (result.length <= 1) { + res = result[0]; + } + if (firstData) { + res = err; + err = null; + } + if (err) { + reject(err); + } else { + resolve(res); + } + }); + fn2.apply(null, args2); + }); + }; + } + function queue(arr, promiseProducer, concurrency = Infinity) { + concurrency = Math.min(concurrency, arr.length); + arr = arr.slice(); + const results = []; + let total = arr.length; + if (!total) { + return Promise.resolve(results); + } + return new Promise((resolve, reject) => { + for (let i = 0; i < concurrency; i++) { + next(); + } + function next() { + const item = arr.shift(); + const promise = promiseProducer(item); + promise.then(function(result) { + results.push(result); + total--; + if (total === 0) { + resolve(results); + } else { + if (arr.length) { + next(); + } + } + }, reject); + } + }); + } + }, + function(module3, exports3, __webpack_require__) { + var global2 = __webpack_require__(11); + var core = __webpack_require__(23); + var ctx = __webpack_require__(48); + var hide = __webpack_require__(31); + var has = __webpack_require__(49); + var PROTOTYPE = "prototype"; + var $export = function(type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports4 = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports4[PROTOTYPE]; + var target = IS_GLOBAL ? global2 : IS_STATIC ? global2[name] : (global2[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) + source = name; + for (key in source) { + own = !IS_FORCED && target && target[key] !== void 0; + if (own && has(exports4, key)) + continue; + out = own ? target[key] : source[key]; + exports4[key] = IS_GLOBAL && typeof target[key] != "function" ? source[key] : IS_BIND && own ? ctx(out, global2) : IS_WRAP && target[key] == out ? function(C) { + var F = function(a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: + return new C(); + case 1: + return new C(a); + case 2: + return new C(a, b); + } + return new C(a, b, c); + } + return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + }(out) : IS_PROTO && typeof out == "function" ? ctx(Function.call, out) : out; + if (IS_PROTO) { + (exports4.virtual || (exports4.virtual = {}))[key] = out; + if (type & $export.R && expProto && !expProto[key]) + hide(expProto, key, out); + } + } + }; + $export.F = 1; + $export.G = 2; + $export.S = 4; + $export.P = 8; + $export.B = 16; + $export.W = 32; + $export.U = 64; + $export.R = 128; + module3.exports = $export; + }, + function(module3, exports3, __webpack_require__) { + try { + var util = __webpack_require__(2); + if (typeof util.inherits !== "function") + throw ""; + module3.exports = util.inherits; + } catch (e) { + module3.exports = __webpack_require__(224); + } + }, + , + , + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.home = void 0; + var _rootUser; + function _load_rootUser() { + return _rootUser = _interopRequireDefault(__webpack_require__(169)); + } + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + const path = __webpack_require__(0); + const home = exports3.home = __webpack_require__(36).homedir(); + const userHomeDir = (_rootUser || _load_rootUser()).default ? path.resolve("/usr/local/share") : home; + exports3.default = userHomeDir; + }, + function(module3, exports3) { + module3.exports = function(it) { + if (typeof it != "function") + throw TypeError(it + " is not a function!"); + return it; + }; + }, + function(module3, exports3) { + var toString = {}.toString; + module3.exports = function(it) { + return toString.call(it).slice(8, -1); + }; + }, + function(module3, exports3, __webpack_require__) { + var aFunction = __webpack_require__(46); + module3.exports = function(fn2, that, length) { + aFunction(fn2); + if (that === void 0) + return fn2; + switch (length) { + case 1: + return function(a) { + return fn2.call(that, a); + }; + case 2: + return function(a, b) { + return fn2.call(that, a, b); + }; + case 3: + return function(a, b, c) { + return fn2.call(that, a, b, c); + }; + } + return function() { + return fn2.apply(that, arguments); + }; + }; + }, + function(module3, exports3) { + var hasOwnProperty = {}.hasOwnProperty; + module3.exports = function(it, key) { + return hasOwnProperty.call(it, key); + }; + }, + function(module3, exports3, __webpack_require__) { + var anObject = __webpack_require__(27); + var IE8_DOM_DEFINE = __webpack_require__(184); + var toPrimitive = __webpack_require__(201); + var dP = Object.defineProperty; + exports3.f = __webpack_require__(33) ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) + try { + return dP(O, P, Attributes); + } catch (e) { + } + if ("get" in Attributes || "set" in Attributes) + throw TypeError("Accessors not supported!"); + if ("value" in Attributes) + O[P] = Attributes.value; + return O; + }; + }, + , + , + , + function(module3, exports3) { + module3.exports = require("events"); + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + const Buffer2 = __webpack_require__(32).Buffer; + const crypto = __webpack_require__(9); + const Transform = __webpack_require__(17).Transform; + const SPEC_ALGORITHMS = ["sha256", "sha384", "sha512"]; + const BASE64_REGEX = /^[a-z0-9+/]+(?:=?=?)$/i; + const SRI_REGEX = /^([^-]+)-([^?]+)([?\S*]*)$/; + const STRICT_SRI_REGEX = /^([^-]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)*$/; + const VCHAR_REGEX = /^[\x21-\x7E]+$/; + class Hash { + get isHash() { + return true; + } + constructor(hash, opts) { + const strict = !!(opts && opts.strict); + this.source = hash.trim(); + const match = this.source.match(strict ? STRICT_SRI_REGEX : SRI_REGEX); + if (!match) { + return; + } + if (strict && !SPEC_ALGORITHMS.some((a) => a === match[1])) { + return; + } + this.algorithm = match[1]; + this.digest = match[2]; + const rawOpts = match[3]; + this.options = rawOpts ? rawOpts.slice(1).split("?") : []; + } + hexDigest() { + return this.digest && Buffer2.from(this.digest, "base64").toString("hex"); + } + toJSON() { + return this.toString(); + } + toString(opts) { + if (opts && opts.strict) { + if (!(SPEC_ALGORITHMS.some((x) => x === this.algorithm) && this.digest.match(BASE64_REGEX) && (this.options || []).every((opt) => opt.match(VCHAR_REGEX)))) { + return ""; + } + } + const options = this.options && this.options.length ? `?${this.options.join("?")}` : ""; + return `${this.algorithm}-${this.digest}${options}`; + } + } + class Integrity { + get isIntegrity() { + return true; + } + toJSON() { + return this.toString(); + } + toString(opts) { + opts = opts || {}; + let sep = opts.sep || " "; + if (opts.strict) { + sep = sep.replace(/\S+/g, " "); + } + return Object.keys(this).map((k) => { + return this[k].map((hash) => { + return Hash.prototype.toString.call(hash, opts); + }).filter((x) => x.length).join(sep); + }).filter((x) => x.length).join(sep); + } + concat(integrity, opts) { + const other = typeof integrity === "string" ? integrity : stringify(integrity, opts); + return parse(`${this.toString(opts)} ${other}`, opts); + } + hexDigest() { + return parse(this, { single: true }).hexDigest(); + } + match(integrity, opts) { + const other = parse(integrity, opts); + const algo = other.pickAlgorithm(opts); + return this[algo] && other[algo] && this[algo].find((hash) => other[algo].find((otherhash) => hash.digest === otherhash.digest)) || false; + } + pickAlgorithm(opts) { + const pickAlgorithm = opts && opts.pickAlgorithm || getPrioritizedHash; + const keys = Object.keys(this); + if (!keys.length) { + throw new Error(`No algorithms available for ${JSON.stringify(this.toString())}`); + } + return keys.reduce((acc, algo) => { + return pickAlgorithm(acc, algo) || acc; + }); + } + } + module3.exports.parse = parse; + function parse(sri, opts) { + opts = opts || {}; + if (typeof sri === "string") { + return _parse(sri, opts); + } else if (sri.algorithm && sri.digest) { + const fullSri = new Integrity(); + fullSri[sri.algorithm] = [sri]; + return _parse(stringify(fullSri, opts), opts); + } else { + return _parse(stringify(sri, opts), opts); + } + } + function _parse(integrity, opts) { + if (opts.single) { + return new Hash(integrity, opts); + } + return integrity.trim().split(/\s+/).reduce((acc, string) => { + const hash = new Hash(string, opts); + if (hash.algorithm && hash.digest) { + const algo = hash.algorithm; + if (!acc[algo]) { + acc[algo] = []; + } + acc[algo].push(hash); + } + return acc; + }, new Integrity()); + } + module3.exports.stringify = stringify; + function stringify(obj, opts) { + if (obj.algorithm && obj.digest) { + return Hash.prototype.toString.call(obj, opts); + } else if (typeof obj === "string") { + return stringify(parse(obj, opts), opts); + } else { + return Integrity.prototype.toString.call(obj, opts); + } + } + module3.exports.fromHex = fromHex; + function fromHex(hexDigest, algorithm, opts) { + const optString = opts && opts.options && opts.options.length ? `?${opts.options.join("?")}` : ""; + return parse(`${algorithm}-${Buffer2.from(hexDigest, "hex").toString("base64")}${optString}`, opts); + } + module3.exports.fromData = fromData; + function fromData(data, opts) { + opts = opts || {}; + const algorithms = opts.algorithms || ["sha512"]; + const optString = opts.options && opts.options.length ? `?${opts.options.join("?")}` : ""; + return algorithms.reduce((acc, algo) => { + const digest = crypto.createHash(algo).update(data).digest("base64"); + const hash = new Hash(`${algo}-${digest}${optString}`, opts); + if (hash.algorithm && hash.digest) { + const algo2 = hash.algorithm; + if (!acc[algo2]) { + acc[algo2] = []; + } + acc[algo2].push(hash); + } + return acc; + }, new Integrity()); + } + module3.exports.fromStream = fromStream; + function fromStream(stream, opts) { + opts = opts || {}; + const P = opts.Promise || Promise; + const istream = integrityStream(opts); + return new P((resolve, reject) => { + stream.pipe(istream); + stream.on("error", reject); + istream.on("error", reject); + let sri; + istream.on("integrity", (s) => { + sri = s; + }); + istream.on("end", () => resolve(sri)); + istream.on("data", () => { + }); + }); + } + module3.exports.checkData = checkData; + function checkData(data, sri, opts) { + opts = opts || {}; + sri = parse(sri, opts); + if (!Object.keys(sri).length) { + if (opts.error) { + throw Object.assign(new Error("No valid integrity hashes to check against"), { + code: "EINTEGRITY" + }); + } else { + return false; + } + } + const algorithm = sri.pickAlgorithm(opts); + const digest = crypto.createHash(algorithm).update(data).digest("base64"); + const newSri = parse({ algorithm, digest }); + const match = newSri.match(sri, opts); + if (match || !opts.error) { + return match; + } else if (typeof opts.size === "number" && data.length !== opts.size) { + const err = new Error(`data size mismatch when checking ${sri}. + Wanted: ${opts.size} + Found: ${data.length}`); + err.code = "EBADSIZE"; + err.found = data.length; + err.expected = opts.size; + err.sri = sri; + throw err; + } else { + const err = new Error(`Integrity checksum failed when using ${algorithm}: Wanted ${sri}, but got ${newSri}. (${data.length} bytes)`); + err.code = "EINTEGRITY"; + err.found = newSri; + err.expected = sri; + err.algorithm = algorithm; + err.sri = sri; + throw err; + } + } + module3.exports.checkStream = checkStream; + function checkStream(stream, sri, opts) { + opts = opts || {}; + const P = opts.Promise || Promise; + const checker = integrityStream(Object.assign({}, opts, { + integrity: sri + })); + return new P((resolve, reject) => { + stream.pipe(checker); + stream.on("error", reject); + checker.on("error", reject); + let sri2; + checker.on("verified", (s) => { + sri2 = s; + }); + checker.on("end", () => resolve(sri2)); + checker.on("data", () => { + }); + }); + } + module3.exports.integrityStream = integrityStream; + function integrityStream(opts) { + opts = opts || {}; + const sri = opts.integrity && parse(opts.integrity, opts); + const goodSri = sri && Object.keys(sri).length; + const algorithm = goodSri && sri.pickAlgorithm(opts); + const digests = goodSri && sri[algorithm]; + const algorithms = Array.from(new Set((opts.algorithms || ["sha512"]).concat(algorithm ? [algorithm] : []))); + const hashes = algorithms.map(crypto.createHash); + let streamSize = 0; + const stream = new Transform({ + transform(chunk, enc, cb) { + streamSize += chunk.length; + hashes.forEach((h) => h.update(chunk, enc)); + cb(null, chunk, enc); + } + }).on("end", () => { + const optString = opts.options && opts.options.length ? `?${opts.options.join("?")}` : ""; + const newSri = parse(hashes.map((h, i) => { + return `${algorithms[i]}-${h.digest("base64")}${optString}`; + }).join(" "), opts); + const match = goodSri && newSri.match(sri, opts); + if (typeof opts.size === "number" && streamSize !== opts.size) { + const err = new Error(`stream size mismatch when checking ${sri}. + Wanted: ${opts.size} + Found: ${streamSize}`); + err.code = "EBADSIZE"; + err.found = streamSize; + err.expected = opts.size; + err.sri = sri; + stream.emit("error", err); + } else if (opts.integrity && !match) { + const err = new Error(`${sri} integrity checksum failed when using ${algorithm}: wanted ${digests} but got ${newSri}. (${streamSize} bytes)`); + err.code = "EINTEGRITY"; + err.found = newSri; + err.expected = digests; + err.algorithm = algorithm; + err.sri = sri; + stream.emit("error", err); + } else { + stream.emit("size", streamSize); + stream.emit("integrity", newSri); + match && stream.emit("verified", match); + } + }); + return stream; + } + module3.exports.create = createIntegrity; + function createIntegrity(opts) { + opts = opts || {}; + const algorithms = opts.algorithms || ["sha512"]; + const optString = opts.options && opts.options.length ? `?${opts.options.join("?")}` : ""; + const hashes = algorithms.map(crypto.createHash); + return { + update: function(chunk, enc) { + hashes.forEach((h) => h.update(chunk, enc)); + return this; + }, + digest: function(enc) { + const integrity = algorithms.reduce((acc, algo) => { + const digest = hashes.shift().digest("base64"); + const hash = new Hash(`${algo}-${digest}${optString}`, opts); + if (hash.algorithm && hash.digest) { + const algo2 = hash.algorithm; + if (!acc[algo2]) { + acc[algo2] = []; + } + acc[algo2].push(hash); + } + return acc; + }, new Integrity()); + return integrity; + } + }; + } + const NODE_HASHES = new Set(crypto.getHashes()); + const DEFAULT_PRIORITY = [ + "md5", + "whirlpool", + "sha1", + "sha224", + "sha256", + "sha384", + "sha512", + "sha3", + "sha3-256", + "sha3-384", + "sha3-512", + "sha3_256", + "sha3_384", + "sha3_512" + ].filter((algo) => NODE_HASHES.has(algo)); + function getPrioritizedHash(algo1, algo2) { + return DEFAULT_PRIORITY.indexOf(algo1.toLowerCase()) >= DEFAULT_PRIORITY.indexOf(algo2.toLowerCase()) ? algo1 : algo2; + } + }, + , + , + , + , + function(module3, exports3, __webpack_require__) { + module3.exports = minimatch; + minimatch.Minimatch = Minimatch; + var path = { sep: "/" }; + try { + path = __webpack_require__(0); + } catch (er) { + } + var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var expand = __webpack_require__(175); + var plTypes = { + "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, + "?": { open: "(?:", close: ")?" }, + "+": { open: "(?:", close: ")+" }, + "*": { open: "(?:", close: ")*" }, + "@": { open: "(?:", close: ")" } + }; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials = charSet("().*{}+?[]^$\\!"); + function charSet(s) { + return s.split("").reduce(function(set, c) { + set[c] = true; + return set; + }, {}); + } + var slashSplit = /\/+/; + minimatch.filter = filter; + function filter(pattern, options) { + options = options || {}; + return function(p, i, list) { + return minimatch(p, pattern, options); + }; + } + function ext(a, b) { + a = a || {}; + b = b || {}; + var t = {}; + Object.keys(b).forEach(function(k) { + t[k] = b[k]; + }); + Object.keys(a).forEach(function(k) { + t[k] = a[k]; + }); + return t; + } + minimatch.defaults = function(def) { + if (!def || !Object.keys(def).length) + return minimatch; + var orig = minimatch; + var m = function minimatch2(p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)); + }; + m.Minimatch = function Minimatch2(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + return m; + }; + Minimatch.defaults = function(def) { + if (!def || !Object.keys(def).length) + return Minimatch; + return minimatch.defaults(def).Minimatch; + }; + function minimatch(p, pattern, options) { + if (typeof pattern !== "string") { + throw new TypeError("glob pattern string required"); + } + if (!options) + options = {}; + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } + if (pattern.trim() === "") + return p === ""; + return new Minimatch(pattern, options).match(p); + } + function Minimatch(pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options); + } + if (typeof pattern !== "string") { + throw new TypeError("glob pattern string required"); + } + if (!options) + options = {}; + pattern = pattern.trim(); + if (path.sep !== "/") { + pattern = pattern.split(path.sep).join("/"); + } + this.options = options; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.make(); + } + Minimatch.prototype.debug = function() { + }; + Minimatch.prototype.make = make; + function make() { + if (this._made) + return; + var pattern = this.pattern; + var options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + var set = this.globSet = this.braceExpand(); + if (options.debug) + this.debug = console.error; + this.debug(this.pattern, set); + set = this.globParts = set.map(function(s) { + return s.split(slashSplit); + }); + this.debug(this.pattern, set); + set = set.map(function(s, si, set2) { + return s.map(this.parse, this); + }, this); + this.debug(this.pattern, set); + set = set.filter(function(s) { + return s.indexOf(false) === -1; + }); + this.debug(this.pattern, set); + this.set = set; + } + Minimatch.prototype.parseNegate = parseNegate; + function parseNegate() { + var pattern = this.pattern; + var negate = false; + var options = this.options; + var negateOffset = 0; + if (options.nonegate) + return; + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { + negate = !negate; + negateOffset++; + } + if (negateOffset) + this.pattern = pattern.substr(negateOffset); + this.negate = negate; + } + minimatch.braceExpand = function(pattern, options) { + return braceExpand(pattern, options); + }; + Minimatch.prototype.braceExpand = braceExpand; + function braceExpand(pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options; + } else { + options = {}; + } + } + pattern = typeof pattern === "undefined" ? this.pattern : pattern; + if (typeof pattern === "undefined") { + throw new TypeError("undefined pattern"); + } + if (options.nobrace || !pattern.match(/\{.*\}/)) { + return [pattern]; + } + return expand(pattern); + } + Minimatch.prototype.parse = parse; + var SUBPARSE = {}; + function parse(pattern, isSub) { + if (pattern.length > 1024 * 64) { + throw new TypeError("pattern is too long"); + } + var options = this.options; + if (!options.noglobstar && pattern === "**") + return GLOBSTAR; + if (pattern === "") + return ""; + var re = ""; + var hasMagic = !!options.nocase; + var escaping = false; + var patternListStack = []; + var negativeLists = []; + var stateChar; + var inClass = false; + var reClassStart = -1; + var classStart = -1; + var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + var self2 = this; + function clearStateChar() { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; + } + self2.debug("clearStateChar %j %j", stateChar, re); + stateChar = false; + } + } + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + this.debug("%s %s %s %j", pattern, i, re, c); + if (escaping && reSpecials[c]) { + re += "\\" + c; + escaping = false; + continue; + } + switch (c) { + case "/": + return false; + case "\\": + clearStateChar(); + escaping = true; + continue; + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); + if (inClass) { + this.debug(" in class"); + if (c === "!" && i === classStart + 1) + c = "^"; + re += c; + continue; + } + self2.debug("call clearStateChar %j", stateChar); + clearStateChar(); + stateChar = c; + if (options.noext) + clearStateChar(); + continue; + case "(": + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }); + re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; + this.debug("plType %j %j", stateChar, re); + stateChar = false; + continue; + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + clearStateChar(); + hasMagic = true; + var pl = patternListStack.pop(); + re += pl.close; + if (pl.type === "!") { + negativeLists.push(pl); + } + pl.reEnd = re.length; + continue; + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + clearStateChar(); + re += "|"; + continue; + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + escaping = false; + continue; + } + if (inClass) { + var cs = pattern.substring(classStart + 1, i); + try { + RegExp("[" + cs + "]"); + } catch (er) { + var sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; + hasMagic = hasMagic || sp[1]; + inClass = false; + continue; + } + } + hasMagic = true; + inClass = false; + re += c; + continue; + default: + clearStateChar(); + if (escaping) { + escaping = false; + } else if (reSpecials[c] && !(c === "^" && inClass)) { + re += "\\"; + } + re += c; + } + } + if (inClass) { + cs = pattern.substr(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length); + this.debug("setting tail", re, pl); + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { + if (!$2) { + $2 = "\\"; + } + return $1 + $1 + $2 + "|"; + }); + this.debug("tail=%j\n %s", tail, tail, pl, re); + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) { + re += "\\\\"; + } + var addPatternStart = false; + switch (re.charAt(0)) { + case ".": + case "[": + case "(": + addPatternStart = true; + } + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n]; + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); + nlLast += nlAfter; + var openParensBefore = nlBefore.split("(").length - 1; + var cleanAfter = nlAfter; + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); + } + nlAfter = cleanAfter; + var dollar = ""; + if (nlAfter === "" && isSub !== SUBPARSE) { + dollar = "$"; + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; + re = newRe; + } + if (re !== "" && hasMagic) { + re = "(?=.)" + re; + } + if (addPatternStart) { + re = patternStart + re; + } + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + if (!hasMagic) { + return globUnescape(pattern); + } + var flags = options.nocase ? "i" : ""; + try { + var regExp = new RegExp("^" + re + "$", flags); + } catch (er) { + return new RegExp("$."); + } + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + minimatch.makeRe = function(pattern, options) { + return new Minimatch(pattern, options || {}).makeRe(); + }; + Minimatch.prototype.makeRe = makeRe; + function makeRe() { + if (this.regexp || this.regexp === false) + return this.regexp; + var set = this.set; + if (!set.length) { + this.regexp = false; + return this.regexp; + } + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + var flags = options.nocase ? "i" : ""; + var re = set.map(function(pattern) { + return pattern.map(function(p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) + re = "^(?!" + re + ").*$"; + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + return this.regexp; + } + minimatch.match = function(list, pattern, options) { + options = options || {}; + var mm = new Minimatch(pattern, options); + list = list.filter(function(f) { + return mm.match(f); + }); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; + }; + Minimatch.prototype.match = match; + function match(f, partial) { + this.debug("match", f, this.pattern); + if (this.comment) + return false; + if (this.empty) + return f === ""; + if (f === "/" && partial) + return true; + var options = this.options; + if (path.sep !== "/") { + f = f.split(path.sep).join("/"); + } + f = f.split(slashSplit); + this.debug(this.pattern, "split", f); + var set = this.set; + this.debug(this.pattern, "set", set); + var filename; + var i; + for (i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) + break; + } + for (i = 0; i < set.length; i++) { + var pattern = set[i]; + var file = f; + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + var hit = this.matchOne(file, pattern, partial); + if (hit) { + if (options.flipNegate) + return true; + return !this.negate; + } + } + if (options.flipNegate) + return false; + return this.negate; + } + Minimatch.prototype.matchOne = function(file, pattern, partial) { + var options = this.options; + this.debug("matchOne", { "this": this, file, pattern }); + this.debug("matchOne", file.length, pattern.length); + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug("matchOne loop"); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); + if (p === false) + return false; + if (p === GLOBSTAR) { + this.debug("GLOBSTAR", [pattern, p, f]); + var fr = fi; + var pr = pi + 1; + if (pr === pl) { + this.debug("** at the end"); + for (; fi < fl; fi++) { + if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") + return false; + } + return true; + } + while (fr < fl) { + var swallowee = file[fr]; + this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug("globstar found match!", fr, fl, swallowee); + return true; + } else { + if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { + this.debug("dot detected!", file, fr, pattern, pr); + break; + } + this.debug("globstar swallow a segment, and continue"); + fr++; + } + } + if (partial) { + this.debug("\n>>> no match, partial?", file, fr, pattern, pr); + if (fr === fl) + return true; + } + return false; + } + var hit; + if (typeof p === "string") { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase(); + } else { + hit = f === p; + } + this.debug("string match", p, f, hit); + } else { + hit = f.match(p); + this.debug("pattern match", p, f, hit); + } + if (!hit) + return false; + } + if (fi === fl && pi === pl) { + return true; + } else if (fi === fl) { + return partial; + } else if (pi === pl) { + var emptyFileEnd = fi === fl - 1 && file[fi] === ""; + return emptyFileEnd; + } + throw new Error("wtf?"); + }; + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); + } + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } + }, + function(module3, exports3, __webpack_require__) { + var wrappy = __webpack_require__(123); + module3.exports = wrappy(once); + module3.exports.strict = wrappy(onceStrict); + once.proto = once(function() { + Object.defineProperty(Function.prototype, "once", { + value: function() { + return once(this); + }, + configurable: true + }); + Object.defineProperty(Function.prototype, "onceStrict", { + value: function() { + return onceStrict(this); + }, + configurable: true + }); + }); + function once(fn2) { + var f = function() { + if (f.called) + return f.value; + f.called = true; + return f.value = fn2.apply(this, arguments); + }; + f.called = false; + return f; + } + function onceStrict(fn2) { + var f = function() { + if (f.called) + throw new Error(f.onceError); + f.called = true; + return f.value = fn2.apply(this, arguments); + }; + var name = fn2.name || "Function wrapped with `once`"; + f.onceError = name + " shouldn't be called more than once"; + f.called = false; + return f; + } + }, + , + function(module3, exports3) { + module3.exports = require("buffer"); + }, + , + , + , + function(module3, exports3) { + module3.exports = function(it) { + if (it == void 0) + throw TypeError("Can't call method on " + it); + return it; + }; + }, + function(module3, exports3, __webpack_require__) { + var isObject = __webpack_require__(34); + var document2 = __webpack_require__(11).document; + var is = isObject(document2) && isObject(document2.createElement); + module3.exports = function(it) { + return is ? document2.createElement(it) : {}; + }; + }, + function(module3, exports3) { + module3.exports = true; + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + var aFunction = __webpack_require__(46); + function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function($$resolve, $$reject) { + if (resolve !== void 0 || reject !== void 0) + throw TypeError("Bad Promise constructor"); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); + } + module3.exports.f = function(C) { + return new PromiseCapability(C); + }; + }, + function(module3, exports3, __webpack_require__) { + var def = __webpack_require__(50).f; + var has = __webpack_require__(49); + var TAG = __webpack_require__(13)("toStringTag"); + module3.exports = function(it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) + def(it, TAG, { configurable: true, value: tag }); + }; + }, + function(module3, exports3, __webpack_require__) { + var shared = __webpack_require__(107)("keys"); + var uid = __webpack_require__(111); + module3.exports = function(key) { + return shared[key] || (shared[key] = uid(key)); + }; + }, + function(module3, exports3) { + var ceil = Math.ceil; + var floor = Math.floor; + module3.exports = function(it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); + }; + }, + function(module3, exports3, __webpack_require__) { + var IObject = __webpack_require__(131); + var defined = __webpack_require__(67); + module3.exports = function(it) { + return IObject(defined(it)); + }; + }, + function(module3, exports3, __webpack_require__) { + module3.exports = glob; + var fs = __webpack_require__(3); + var rp = __webpack_require__(114); + var minimatch = __webpack_require__(60); + var Minimatch = minimatch.Minimatch; + var inherits = __webpack_require__(42); + var EE = __webpack_require__(54).EventEmitter; + var path = __webpack_require__(0); + var assert = __webpack_require__(22); + var isAbsolute = __webpack_require__(76); + var globSync = __webpack_require__(218); + var common = __webpack_require__(115); + var alphasort = common.alphasort; + var alphasorti = common.alphasorti; + var setopts = common.setopts; + var ownProp = common.ownProp; + var inflight = __webpack_require__(223); + var util = __webpack_require__(2); + var childrenIgnored = common.childrenIgnored; + var isIgnored = common.isIgnored; + var once = __webpack_require__(61); + function glob(pattern, options, cb) { + if (typeof options === "function") + cb = options, options = {}; + if (!options) + options = {}; + if (options.sync) { + if (cb) + throw new TypeError("callback provided to sync glob"); + return globSync(pattern, options); + } + return new Glob(pattern, options, cb); + } + glob.sync = globSync; + var GlobSync = glob.GlobSync = globSync.GlobSync; + glob.glob = glob; + function extend(origin, add) { + if (add === null || typeof add !== "object") { + return origin; + } + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; + } + glob.hasMagic = function(pattern, options_) { + var options = extend({}, options_); + options.noprocess = true; + var g = new Glob(pattern, options); + var set = g.minimatch.set; + if (!pattern) + return false; + if (set.length > 1) + return true; + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== "string") + return true; + } + return false; + }; + glob.Glob = Glob; + inherits(Glob, EE); + function Glob(pattern, options, cb) { + if (typeof options === "function") { + cb = options; + options = null; + } + if (options && options.sync) { + if (cb) + throw new TypeError("callback provided to sync glob"); + return new GlobSync(pattern, options); + } + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb); + setopts(this, pattern, options); + this._didRealPath = false; + var n = this.minimatch.set.length; + this.matches = new Array(n); + if (typeof cb === "function") { + cb = once(cb); + this.on("error", cb); + this.on("end", function(matches) { + cb(null, matches); + }); + } + var self2 = this; + this._processing = 0; + this._emitQueue = []; + this._processQueue = []; + this.paused = false; + if (this.noprocess) + return this; + if (n === 0) + return done(); + var sync = true; + for (var i = 0; i < n; i++) { + this._process(this.minimatch.set[i], i, false, done); + } + sync = false; + function done() { + --self2._processing; + if (self2._processing <= 0) { + if (sync) { + process.nextTick(function() { + self2._finish(); + }); + } else { + self2._finish(); + } + } + } + } + Glob.prototype._finish = function() { + assert(this instanceof Glob); + if (this.aborted) + return; + if (this.realpath && !this._didRealpath) + return this._realpath(); + common.finish(this); + this.emit("end", this.found); + }; + Glob.prototype._realpath = function() { + if (this._didRealpath) + return; + this._didRealpath = true; + var n = this.matches.length; + if (n === 0) + return this._finish(); + var self2 = this; + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next); + function next() { + if (--n === 0) + self2._finish(); + } + }; + Glob.prototype._realpathSet = function(index, cb) { + var matchset = this.matches[index]; + if (!matchset) + return cb(); + var found = Object.keys(matchset); + var self2 = this; + var n = found.length; + if (n === 0) + return cb(); + var set = this.matches[index] = Object.create(null); + found.forEach(function(p, i) { + p = self2._makeAbs(p); + rp.realpath(p, self2.realpathCache, function(er, real) { + if (!er) + set[real] = true; + else if (er.syscall === "stat") + set[p] = true; + else + self2.emit("error", er); + if (--n === 0) { + self2.matches[index] = set; + cb(); + } + }); + }); + }; + Glob.prototype._mark = function(p) { + return common.mark(this, p); + }; + Glob.prototype._makeAbs = function(f) { + return common.makeAbs(this, f); + }; + Glob.prototype.abort = function() { + this.aborted = true; + this.emit("abort"); + }; + Glob.prototype.pause = function() { + if (!this.paused) { + this.paused = true; + this.emit("pause"); + } + }; + Glob.prototype.resume = function() { + if (this.paused) { + this.emit("resume"); + this.paused = false; + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0); + this._emitQueue.length = 0; + for (var i = 0; i < eq.length; i++) { + var e = eq[i]; + this._emitMatch(e[0], e[1]); + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0); + this._processQueue.length = 0; + for (var i = 0; i < pq.length; i++) { + var p = pq[i]; + this._processing--; + this._process(p[0], p[1], p[2], p[3]); + } + } + } + }; + Glob.prototype._process = function(pattern, index, inGlobStar, cb) { + assert(this instanceof Glob); + assert(typeof cb === "function"); + if (this.aborted) + return; + this._processing++; + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]); + return; + } + var n = 0; + while (typeof pattern[n] === "string") { + n++; + } + var prefix; + switch (n) { + case pattern.length: + this._processSimple(pattern.join("/"), index, cb); + return; + case 0: + prefix = null; + break; + default: + prefix = pattern.slice(0, n).join("/"); + break; + } + var remain = pattern.slice(n); + var read; + if (prefix === null) + read = "."; + else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { + if (!prefix || !isAbsolute(prefix)) + prefix = "/" + prefix; + read = prefix; + } else + read = prefix; + var abs = this._makeAbs(read); + if (childrenIgnored(this, read)) + return cb(); + var isGlobStar = remain[0] === minimatch.GLOBSTAR; + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb); + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); + }; + Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) { + var self2 = this; + this._readdir(abs, inGlobStar, function(er, entries) { + return self2._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb); + }); + }; + Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { + if (!entries) + return cb(); + var pn = remain[0]; + var negate = !!this.minimatch.negate; + var rawGlob = pn._glob; + var dotOk = this.dot || rawGlob.charAt(0) === "."; + var matchedEntries = []; + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (e.charAt(0) !== "." || dotOk) { + var m; + if (negate && !prefix) { + m = !e.match(pn); + } else { + m = e.match(pn); + } + if (m) + matchedEntries.push(e); + } + } + var len = matchedEntries.length; + if (len === 0) + return cb(); + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + if (prefix) { + if (prefix !== "/") + e = prefix + "/" + e; + else + e = prefix + e; + } + if (e.charAt(0) === "/" && !this.nomount) { + e = path.join(this.root, e); + } + this._emitMatch(index, e); + } + return cb(); + } + remain.shift(); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + var newPattern; + if (prefix) { + if (prefix !== "/") + e = prefix + "/" + e; + else + e = prefix + e; + } + this._process([e].concat(remain), index, inGlobStar, cb); + } + cb(); + }; + Glob.prototype._emitMatch = function(index, e) { + if (this.aborted) + return; + if (isIgnored(this, e)) + return; + if (this.paused) { + this._emitQueue.push([index, e]); + return; + } + var abs = isAbsolute(e) ? e : this._makeAbs(e); + if (this.mark) + e = this._mark(e); + if (this.absolute) + e = abs; + if (this.matches[index][e]) + return; + if (this.nodir) { + var c = this.cache[abs]; + if (c === "DIR" || Array.isArray(c)) + return; + } + this.matches[index][e] = true; + var st = this.statCache[abs]; + if (st) + this.emit("stat", e, st); + this.emit("match", e); + }; + Glob.prototype._readdirInGlobStar = function(abs, cb) { + if (this.aborted) + return; + if (this.follow) + return this._readdir(abs, false, cb); + var lstatkey = "lstat\0" + abs; + var self2 = this; + var lstatcb = inflight(lstatkey, lstatcb_); + if (lstatcb) + fs.lstat(abs, lstatcb); + function lstatcb_(er, lstat) { + if (er && er.code === "ENOENT") + return cb(); + var isSym = lstat && lstat.isSymbolicLink(); + self2.symlinks[abs] = isSym; + if (!isSym && lstat && !lstat.isDirectory()) { + self2.cache[abs] = "FILE"; + cb(); + } else + self2._readdir(abs, false, cb); + } + }; + Glob.prototype._readdir = function(abs, inGlobStar, cb) { + if (this.aborted) + return; + cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb); + if (!cb) + return; + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb); + if (ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (!c || c === "FILE") + return cb(); + if (Array.isArray(c)) + return cb(null, c); + } + var self2 = this; + fs.readdir(abs, readdirCb(this, abs, cb)); + }; + function readdirCb(self2, abs, cb) { + return function(er, entries) { + if (er) + self2._readdirError(abs, er, cb); + else + self2._readdirEntries(abs, entries, cb); + }; + } + Glob.prototype._readdirEntries = function(abs, entries, cb) { + if (this.aborted) + return; + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (abs === "/") + e = abs + e; + else + e = abs + "/" + e; + this.cache[e] = true; + } + } + this.cache[abs] = entries; + return cb(null, entries); + }; + Glob.prototype._readdirError = function(f, er, cb) { + if (this.aborted) + return; + switch (er.code) { + case "ENOTSUP": + case "ENOTDIR": + var abs = this._makeAbs(f); + this.cache[abs] = "FILE"; + if (abs === this.cwdAbs) { + var error = new Error(er.code + " invalid cwd " + this.cwd); + error.path = this.cwd; + error.code = er.code; + this.emit("error", error); + this.abort(); + } + break; + case "ENOENT": + case "ELOOP": + case "ENAMETOOLONG": + case "UNKNOWN": + this.cache[this._makeAbs(f)] = false; + break; + default: + this.cache[this._makeAbs(f)] = false; + if (this.strict) { + this.emit("error", er); + this.abort(); + } + if (!this.silent) + console.error("glob error", er); + break; + } + return cb(); + }; + Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) { + var self2 = this; + this._readdir(abs, inGlobStar, function(er, entries) { + self2._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); + }); + }; + Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { + if (!entries) + return cb(); + var remainWithoutGlobStar = remain.slice(1); + var gspref = prefix ? [prefix] : []; + var noGlobStar = gspref.concat(remainWithoutGlobStar); + this._process(noGlobStar, index, false, cb); + var isSym = this.symlinks[abs]; + var len = entries.length; + if (isSym && inGlobStar) + return cb(); + for (var i = 0; i < len; i++) { + var e = entries[i]; + if (e.charAt(0) === "." && !this.dot) + continue; + var instead = gspref.concat(entries[i], remainWithoutGlobStar); + this._process(instead, index, true, cb); + var below = gspref.concat(entries[i], remain); + this._process(below, index, true, cb); + } + cb(); + }; + Glob.prototype._processSimple = function(prefix, index, cb) { + var self2 = this; + this._stat(prefix, function(er, exists) { + self2._processSimple2(prefix, index, er, exists, cb); + }); + }; + Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) { + if (!this.matches[index]) + this.matches[index] = Object.create(null); + if (!exists) + return cb(); + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix); + if (prefix.charAt(0) === "/") { + prefix = path.join(this.root, prefix); + } else { + prefix = path.resolve(this.root, prefix); + if (trail) + prefix += "/"; + } + } + if (process.platform === "win32") + prefix = prefix.replace(/\\/g, "/"); + this._emitMatch(index, prefix); + cb(); + }; + Glob.prototype._stat = function(f, cb) { + var abs = this._makeAbs(f); + var needDir = f.slice(-1) === "/"; + if (f.length > this.maxLength) + return cb(); + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (Array.isArray(c)) + c = "DIR"; + if (!needDir || c === "DIR") + return cb(null, c); + if (needDir && c === "FILE") + return cb(); + } + var exists; + var stat = this.statCache[abs]; + if (stat !== void 0) { + if (stat === false) + return cb(null, stat); + else { + var type = stat.isDirectory() ? "DIR" : "FILE"; + if (needDir && type === "FILE") + return cb(); + else + return cb(null, type, stat); + } + } + var self2 = this; + var statcb = inflight("stat\0" + abs, lstatcb_); + if (statcb) + fs.lstat(abs, statcb); + function lstatcb_(er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + return fs.stat(abs, function(er2, stat2) { + if (er2) + self2._stat2(f, abs, null, lstat, cb); + else + self2._stat2(f, abs, er2, stat2, cb); + }); + } else { + self2._stat2(f, abs, er, lstat, cb); + } + } + }; + Glob.prototype._stat2 = function(f, abs, er, stat, cb) { + if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { + this.statCache[abs] = false; + return cb(); + } + var needDir = f.slice(-1) === "/"; + this.statCache[abs] = stat; + if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) + return cb(null, false, stat); + var c = true; + if (stat) + c = stat.isDirectory() ? "DIR" : "FILE"; + this.cache[abs] = this.cache[abs] || c; + if (needDir && c === "FILE") + return cb(); + return cb(null, c, stat); + }; + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + function posix(path) { + return path.charAt(0) === "/"; + } + function win32(path) { + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ""; + var isUnc = Boolean(device && device.charAt(1) !== ":"); + return Boolean(result[2] || isUnc); + } + module3.exports = process.platform === "win32" ? win32 : posix; + module3.exports.posix = posix; + module3.exports.win32 = win32; + }, + , + , + function(module3, exports3) { + module3.exports = require("tty"); + }, + , + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.default = function(str, fileLoc = "lockfile") { + str = (0, (_stripBom || _load_stripBom()).default)(str); + return hasMergeConflicts(str) ? parseWithConflict(str, fileLoc) : { type: "success", object: parse(str, fileLoc) }; + }; + var _util; + function _load_util() { + return _util = _interopRequireDefault(__webpack_require__(2)); + } + var _invariant; + function _load_invariant() { + return _invariant = _interopRequireDefault(__webpack_require__(7)); + } + var _stripBom; + function _load_stripBom() { + return _stripBom = _interopRequireDefault(__webpack_require__(122)); + } + var _constants; + function _load_constants() { + return _constants = __webpack_require__(6); + } + var _errors; + function _load_errors() { + return _errors = __webpack_require__(4); + } + var _map; + function _load_map() { + return _map = _interopRequireDefault(__webpack_require__(20)); + } + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + const VERSION_REGEX = /^yarn lockfile v(\d+)$/; + const TOKEN_TYPES = { + boolean: "BOOLEAN", + string: "STRING", + identifier: "IDENTIFIER", + eof: "EOF", + colon: "COLON", + newline: "NEWLINE", + comment: "COMMENT", + indent: "INDENT", + invalid: "INVALID", + number: "NUMBER", + comma: "COMMA" + }; + const VALID_PROP_VALUE_TOKENS = [TOKEN_TYPES.boolean, TOKEN_TYPES.string, TOKEN_TYPES.number]; + function isValidPropValueToken(token) { + return VALID_PROP_VALUE_TOKENS.indexOf(token.type) >= 0; + } + function* tokenise(input) { + let lastNewline = false; + let line = 1; + let col = 0; + function buildToken(type, value) { + return { line, col, type, value }; + } + while (input.length) { + let chop = 0; + if (input[0] === "\n" || input[0] === "\r") { + chop++; + if (input[1] === "\n") { + chop++; + } + line++; + col = 0; + yield buildToken(TOKEN_TYPES.newline); + } else if (input[0] === "#") { + chop++; + let val = ""; + while (input[chop] !== "\n") { + val += input[chop]; + chop++; + } + yield buildToken(TOKEN_TYPES.comment, val); + } else if (input[0] === " ") { + if (lastNewline) { + let indent = ""; + for (let i = 0; input[i] === " "; i++) { + indent += input[i]; + } + if (indent.length % 2) { + throw new TypeError("Invalid number of spaces"); + } else { + chop = indent.length; + yield buildToken(TOKEN_TYPES.indent, indent.length / 2); + } + } else { + chop++; + } + } else if (input[0] === '"') { + let val = ""; + for (let i = 0; ; i++) { + const currentChar = input[i]; + val += currentChar; + if (i > 0 && currentChar === '"') { + const isEscaped = input[i - 1] === "\\" && input[i - 2] !== "\\"; + if (!isEscaped) { + break; + } + } + } + chop = val.length; + try { + yield buildToken(TOKEN_TYPES.string, JSON.parse(val)); + } catch (err) { + if (err instanceof SyntaxError) { + yield buildToken(TOKEN_TYPES.invalid); + } else { + throw err; + } + } + } else if (/^[0-9]/.test(input)) { + let val = ""; + for (let i = 0; /^[0-9]$/.test(input[i]); i++) { + val += input[i]; + } + chop = val.length; + yield buildToken(TOKEN_TYPES.number, +val); + } else if (/^true/.test(input)) { + yield buildToken(TOKEN_TYPES.boolean, true); + chop = 4; + } else if (/^false/.test(input)) { + yield buildToken(TOKEN_TYPES.boolean, false); + chop = 5; + } else if (input[0] === ":") { + yield buildToken(TOKEN_TYPES.colon); + chop++; + } else if (input[0] === ",") { + yield buildToken(TOKEN_TYPES.comma); + chop++; + } else if (/^[a-zA-Z\/-]/g.test(input)) { + let name = ""; + for (let i = 0; i < input.length; i++) { + const char = input[i]; + if (char === ":" || char === " " || char === "\n" || char === "\r" || char === ",") { + break; + } else { + name += char; + } + } + chop = name.length; + yield buildToken(TOKEN_TYPES.string, name); + } else { + yield buildToken(TOKEN_TYPES.invalid); + } + if (!chop) { + yield buildToken(TOKEN_TYPES.invalid); + } + col += chop; + lastNewline = input[0] === "\n" || input[0] === "\r" && input[1] === "\n"; + input = input.slice(chop); + } + yield buildToken(TOKEN_TYPES.eof); + } + class Parser { + constructor(input, fileLoc = "lockfile") { + this.comments = []; + this.tokens = tokenise(input); + this.fileLoc = fileLoc; + } + onComment(token) { + const value = token.value; + (0, (_invariant || _load_invariant()).default)(typeof value === "string", "expected token value to be a string"); + const comment = value.trim(); + const versionMatch = comment.match(VERSION_REGEX); + if (versionMatch) { + const version = +versionMatch[1]; + if (version > (_constants || _load_constants()).LOCKFILE_VERSION) { + throw new (_errors || _load_errors()).MessageError(`Can't install from a lockfile of version ${version} as you're on an old yarn version that only supports versions up to ${(_constants || _load_constants()).LOCKFILE_VERSION}. Run \`$ yarn self-update\` to upgrade to the latest version.`); + } + } + this.comments.push(comment); + } + next() { + const item = this.tokens.next(); + (0, (_invariant || _load_invariant()).default)(item, "expected a token"); + const done = item.done, value = item.value; + if (done || !value) { + throw new Error("No more tokens"); + } else if (value.type === TOKEN_TYPES.comment) { + this.onComment(value); + return this.next(); + } else { + return this.token = value; + } + } + unexpected(msg = "Unexpected token") { + throw new SyntaxError(`${msg} ${this.token.line}:${this.token.col} in ${this.fileLoc}`); + } + expect(tokType) { + if (this.token.type === tokType) { + this.next(); + } else { + this.unexpected(); + } + } + eat(tokType) { + if (this.token.type === tokType) { + this.next(); + return true; + } else { + return false; + } + } + parse(indent = 0) { + const obj = (0, (_map || _load_map()).default)(); + while (true) { + const propToken = this.token; + if (propToken.type === TOKEN_TYPES.newline) { + const nextToken = this.next(); + if (!indent) { + continue; + } + if (nextToken.type !== TOKEN_TYPES.indent) { + break; + } + if (nextToken.value === indent) { + this.next(); + } else { + break; + } + } else if (propToken.type === TOKEN_TYPES.indent) { + if (propToken.value === indent) { + this.next(); + } else { + break; + } + } else if (propToken.type === TOKEN_TYPES.eof) { + break; + } else if (propToken.type === TOKEN_TYPES.string) { + const key = propToken.value; + (0, (_invariant || _load_invariant()).default)(key, "Expected a key"); + const keys = [key]; + this.next(); + while (this.token.type === TOKEN_TYPES.comma) { + this.next(); + const keyToken = this.token; + if (keyToken.type !== TOKEN_TYPES.string) { + this.unexpected("Expected string"); + } + const key2 = keyToken.value; + (0, (_invariant || _load_invariant()).default)(key2, "Expected a key"); + keys.push(key2); + this.next(); + } + const valToken = this.token; + if (valToken.type === TOKEN_TYPES.colon) { + this.next(); + const val = this.parse(indent + 1); + for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator](); ; ) { + var _ref; + if (_isArray) { + if (_i >= _iterator.length) + break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) + break; + _ref = _i.value; + } + const key2 = _ref; + obj[key2] = val; + } + if (indent && this.token.type !== TOKEN_TYPES.indent) { + break; + } + } else if (isValidPropValueToken(valToken)) { + for (var _iterator2 = keys, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator](); ; ) { + var _ref2; + if (_isArray2) { + if (_i2 >= _iterator2.length) + break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) + break; + _ref2 = _i2.value; + } + const key2 = _ref2; + obj[key2] = valToken.value; + } + this.next(); + } else { + this.unexpected("Invalid value type"); + } + } else { + this.unexpected(`Unknown token: ${(_util || _load_util()).default.inspect(propToken)}`); + } + } + return obj; + } + } + const MERGE_CONFLICT_ANCESTOR = "|||||||"; + const MERGE_CONFLICT_END = ">>>>>>>"; + const MERGE_CONFLICT_SEP = "======="; + const MERGE_CONFLICT_START = "<<<<<<<"; + function extractConflictVariants(str) { + const variants = [[], []]; + const lines = str.split(/\r?\n/g); + let skip = false; + while (lines.length) { + const line = lines.shift(); + if (line.startsWith(MERGE_CONFLICT_START)) { + while (lines.length) { + const conflictLine = lines.shift(); + if (conflictLine === MERGE_CONFLICT_SEP) { + skip = false; + break; + } else if (skip || conflictLine.startsWith(MERGE_CONFLICT_ANCESTOR)) { + skip = true; + continue; + } else { + variants[0].push(conflictLine); + } + } + while (lines.length) { + const conflictLine = lines.shift(); + if (conflictLine.startsWith(MERGE_CONFLICT_END)) { + break; + } else { + variants[1].push(conflictLine); + } + } + } else { + variants[0].push(line); + variants[1].push(line); + } + } + return [variants[0].join("\n"), variants[1].join("\n")]; + } + function hasMergeConflicts(str) { + return str.includes(MERGE_CONFLICT_START) && str.includes(MERGE_CONFLICT_SEP) && str.includes(MERGE_CONFLICT_END); + } + function parse(str, fileLoc) { + const parser = new Parser(str, fileLoc); + parser.next(); + return parser.parse(); + } + function parseWithConflict(str, fileLoc) { + const variants = extractConflictVariants(str); + try { + return { type: "merge", object: Object.assign({}, parse(variants[0], fileLoc), parse(variants[1], fileLoc)) }; + } catch (err) { + if (err instanceof SyntaxError) { + return { type: "conflict", object: {} }; + } else { + throw err; + } + } + } + }, + , + , + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + var _map; + function _load_map() { + return _map = _interopRequireDefault(__webpack_require__(20)); + } + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + const debug = __webpack_require__(212)("yarn"); + class BlockingQueue { + constructor(alias, maxConcurrency = Infinity) { + this.concurrencyQueue = []; + this.maxConcurrency = maxConcurrency; + this.runningCount = 0; + this.warnedStuck = false; + this.alias = alias; + this.first = true; + this.running = (0, (_map || _load_map()).default)(); + this.queue = (0, (_map || _load_map()).default)(); + this.stuckTick = this.stuckTick.bind(this); + } + stillActive() { + if (this.stuckTimer) { + clearTimeout(this.stuckTimer); + } + this.stuckTimer = setTimeout(this.stuckTick, 5e3); + this.stuckTimer.unref && this.stuckTimer.unref(); + } + stuckTick() { + if (this.runningCount === 1) { + this.warnedStuck = true; + debug(`The ${JSON.stringify(this.alias)} blocking queue may be stuck. 5 seconds without any activity with 1 worker: ${Object.keys(this.running)[0]}`); + } + } + push(key, factory) { + if (this.first) { + this.first = false; + } else { + this.stillActive(); + } + return new Promise((resolve, reject) => { + const queue = this.queue[key] = this.queue[key] || []; + queue.push({ factory, resolve, reject }); + if (!this.running[key]) { + this.shift(key); + } + }); + } + shift(key) { + if (this.running[key]) { + delete this.running[key]; + this.runningCount--; + if (this.stuckTimer) { + clearTimeout(this.stuckTimer); + this.stuckTimer = null; + } + if (this.warnedStuck) { + this.warnedStuck = false; + debug(`${JSON.stringify(this.alias)} blocking queue finally resolved. Nothing to worry about.`); + } + } + const queue = this.queue[key]; + if (!queue) { + return; + } + var _queue$shift = queue.shift(); + const resolve = _queue$shift.resolve, reject = _queue$shift.reject, factory = _queue$shift.factory; + if (!queue.length) { + delete this.queue[key]; + } + const next = () => { + this.shift(key); + this.shiftConcurrencyQueue(); + }; + const run = () => { + this.running[key] = true; + this.runningCount++; + factory().then(function(val) { + resolve(val); + next(); + return null; + }).catch(function(err) { + reject(err); + next(); + }); + }; + this.maybePushConcurrencyQueue(run); + } + maybePushConcurrencyQueue(run) { + if (this.runningCount < this.maxConcurrency) { + run(); + } else { + this.concurrencyQueue.push(run); + } + } + shiftConcurrencyQueue() { + if (this.runningCount < this.maxConcurrency) { + const fn2 = this.concurrencyQueue.shift(); + if (fn2) { + fn2(); + } + } + } + } + exports3.default = BlockingQueue; + }, + function(module3, exports3) { + module3.exports = function(exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + }, + , + , + , + , + , + , + , + , + , + , + , + , + , + , + function(module3, exports3, __webpack_require__) { + var cof = __webpack_require__(47); + var TAG = __webpack_require__(13)("toStringTag"); + var ARG = cof(function() { + return arguments; + }()) == "Arguments"; + var tryGet = function(it, key) { + try { + return it[key]; + } catch (e) { + } + }; + module3.exports = function(it) { + var O, T, B; + return it === void 0 ? "Undefined" : it === null ? "Null" : typeof (T = tryGet(O = Object(it), TAG)) == "string" ? T : ARG ? cof(O) : (B = cof(O)) == "Object" && typeof O.callee == "function" ? "Arguments" : B; + }; + }, + function(module3, exports3) { + module3.exports = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","); + }, + function(module3, exports3, __webpack_require__) { + var document2 = __webpack_require__(11).document; + module3.exports = document2 && document2.documentElement; + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + var LIBRARY = __webpack_require__(69); + var $export = __webpack_require__(41); + var redefine = __webpack_require__(197); + var hide = __webpack_require__(31); + var Iterators = __webpack_require__(35); + var $iterCreate = __webpack_require__(188); + var setToStringTag = __webpack_require__(71); + var getPrototypeOf = __webpack_require__(194); + var ITERATOR = __webpack_require__(13)("iterator"); + var BUGGY = !([].keys && "next" in [].keys()); + var FF_ITERATOR = "@@iterator"; + var KEYS = "keys"; + var VALUES = "values"; + var returnThis = function() { + return this; + }; + module3.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function(kind) { + if (!BUGGY && kind in proto) + return proto[kind]; + switch (kind) { + case KEYS: + return function keys() { + return new Constructor(this, kind); + }; + case VALUES: + return function values() { + return new Constructor(this, kind); + }; + } + return function entries() { + return new Constructor(this, kind); + }; + }; + var TAG = NAME + " Iterator"; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod("entries") : void 0; + var $anyNative = NAME == "Array" ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + setToStringTag(IteratorPrototype, TAG, true); + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != "function") + hide(IteratorPrototype, ITERATOR, returnThis); + } + } + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { + return $native.call(this); + }; + } + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) + for (key in methods) { + if (!(key in proto)) + redefine(proto, key, methods[key]); + } + else + $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + }, + function(module3, exports3) { + module3.exports = function(exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } + }; + }, + function(module3, exports3, __webpack_require__) { + var anObject = __webpack_require__(27); + var isObject = __webpack_require__(34); + var newPromiseCapability = __webpack_require__(70); + module3.exports = function(C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) + return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; + }; + }, + function(module3, exports3) { + module3.exports = function(bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value + }; + }; + }, + function(module3, exports3, __webpack_require__) { + var core = __webpack_require__(23); + var global2 = __webpack_require__(11); + var SHARED = "__core-js_shared__"; + var store = global2[SHARED] || (global2[SHARED] = {}); + (module3.exports = function(key, value) { + return store[key] || (store[key] = value !== void 0 ? value : {}); + })("versions", []).push({ + version: core.version, + mode: __webpack_require__(69) ? "pure" : "global", + copyright: "\xA9 2018 Denis Pushkarev (zloirock.ru)" + }); + }, + function(module3, exports3, __webpack_require__) { + var anObject = __webpack_require__(27); + var aFunction = __webpack_require__(46); + var SPECIES = __webpack_require__(13)("species"); + module3.exports = function(O, D) { + var C = anObject(O).constructor; + var S; + return C === void 0 || (S = anObject(C)[SPECIES]) == void 0 ? D : aFunction(S); + }; + }, + function(module3, exports3, __webpack_require__) { + var ctx = __webpack_require__(48); + var invoke = __webpack_require__(185); + var html = __webpack_require__(102); + var cel = __webpack_require__(68); + var global2 = __webpack_require__(11); + var process2 = global2.process; + var setTask = global2.setImmediate; + var clearTask = global2.clearImmediate; + var MessageChannel2 = global2.MessageChannel; + var Dispatch = global2.Dispatch; + var counter = 0; + var queue = {}; + var ONREADYSTATECHANGE = "onreadystatechange"; + var defer, channel, port; + var run = function() { + var id = +this; + if (queue.hasOwnProperty(id)) { + var fn2 = queue[id]; + delete queue[id]; + fn2(); + } + }; + var listener = function(event) { + run.call(event.data); + }; + if (!setTask || !clearTask) { + setTask = function setImmediate2(fn2) { + var args2 = []; + var i = 1; + while (arguments.length > i) + args2.push(arguments[i++]); + queue[++counter] = function() { + invoke(typeof fn2 == "function" ? fn2 : Function(fn2), args2); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate2(id) { + delete queue[id]; + }; + if (__webpack_require__(47)(process2) == "process") { + defer = function(id) { + process2.nextTick(ctx(run, id, 1)); + }; + } else if (Dispatch && Dispatch.now) { + defer = function(id) { + Dispatch.now(ctx(run, id, 1)); + }; + } else if (MessageChannel2) { + channel = new MessageChannel2(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + } else if (global2.addEventListener && typeof postMessage == "function" && !global2.importScripts) { + defer = function(id) { + global2.postMessage(id + "", "*"); + }; + global2.addEventListener("message", listener, false); + } else if (ONREADYSTATECHANGE in cel("script")) { + defer = function(id) { + html.appendChild(cel("script"))[ONREADYSTATECHANGE] = function() { + html.removeChild(this); + run.call(id); + }; + }; + } else { + defer = function(id) { + setTimeout(ctx(run, id, 1), 0); + }; + } + } + module3.exports = { + set: setTask, + clear: clearTask + }; + }, + function(module3, exports3, __webpack_require__) { + var toInteger = __webpack_require__(73); + var min = Math.min; + module3.exports = function(it) { + return it > 0 ? min(toInteger(it), 9007199254740991) : 0; + }; + }, + function(module3, exports3) { + var id = 0; + var px = Math.random(); + module3.exports = function(key) { + return "Symbol(".concat(key === void 0 ? "" : key, ")_", (++id + px).toString(36)); + }; + }, + function(module3, exports3, __webpack_require__) { + exports3 = module3.exports = createDebug.debug = createDebug["default"] = createDebug; + exports3.coerce = coerce; + exports3.disable = disable; + exports3.enable = enable; + exports3.enabled = enabled; + exports3.humanize = __webpack_require__(229); + exports3.instances = []; + exports3.names = []; + exports3.skips = []; + exports3.formatters = {}; + function selectColor(namespace) { + var hash = 0, i; + for (i in namespace) { + hash = (hash << 5) - hash + namespace.charCodeAt(i); + hash |= 0; + } + return exports3.colors[Math.abs(hash) % exports3.colors.length]; + } + function createDebug(namespace) { + var prevTime; + function debug() { + if (!debug.enabled) + return; + var self2 = debug; + var curr = +new Date(); + var ms = curr - (prevTime || curr); + self2.diff = ms; + self2.prev = prevTime; + self2.curr = curr; + prevTime = curr; + var args2 = new Array(arguments.length); + for (var i = 0; i < args2.length; i++) { + args2[i] = arguments[i]; + } + args2[0] = exports3.coerce(args2[0]); + if (typeof args2[0] !== "string") { + args2.unshift("%O"); + } + var index = 0; + args2[0] = args2[0].replace(/%([a-zA-Z%])/g, function(match, format) { + if (match === "%%") + return match; + index++; + var formatter = exports3.formatters[format]; + if (typeof formatter === "function") { + var val = args2[index]; + match = formatter.call(self2, val); + args2.splice(index, 1); + index--; + } + return match; + }); + exports3.formatArgs.call(self2, args2); + var logFn = debug.log || exports3.log || console.log.bind(console); + logFn.apply(self2, args2); + } + debug.namespace = namespace; + debug.enabled = exports3.enabled(namespace); + debug.useColors = exports3.useColors(); + debug.color = selectColor(namespace); + debug.destroy = destroy; + if (typeof exports3.init === "function") { + exports3.init(debug); + } + exports3.instances.push(debug); + return debug; + } + function destroy() { + var index = exports3.instances.indexOf(this); + if (index !== -1) { + exports3.instances.splice(index, 1); + return true; + } else { + return false; + } + } + function enable(namespaces) { + exports3.save(namespaces); + exports3.names = []; + exports3.skips = []; + var i; + var split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); + var len = split.length; + for (i = 0; i < len; i++) { + if (!split[i]) + continue; + namespaces = split[i].replace(/\*/g, ".*?"); + if (namespaces[0] === "-") { + exports3.skips.push(new RegExp("^" + namespaces.substr(1) + "$")); + } else { + exports3.names.push(new RegExp("^" + namespaces + "$")); + } + } + for (i = 0; i < exports3.instances.length; i++) { + var instance = exports3.instances[i]; + instance.enabled = exports3.enabled(instance.namespace); + } + } + function disable() { + exports3.enable(""); + } + function enabled(name) { + if (name[name.length - 1] === "*") { + return true; + } + var i, len; + for (i = 0, len = exports3.skips.length; i < len; i++) { + if (exports3.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports3.names.length; i < len; i++) { + if (exports3.names[i].test(name)) { + return true; + } + } + return false; + } + function coerce(val) { + if (val instanceof Error) + return val.stack || val.message; + return val; + } + }, + , + function(module3, exports3, __webpack_require__) { + module3.exports = realpath; + realpath.realpath = realpath; + realpath.sync = realpathSync; + realpath.realpathSync = realpathSync; + realpath.monkeypatch = monkeypatch; + realpath.unmonkeypatch = unmonkeypatch; + var fs = __webpack_require__(3); + var origRealpath = fs.realpath; + var origRealpathSync = fs.realpathSync; + var version = process.version; + var ok = /^v[0-5]\./.test(version); + var old = __webpack_require__(217); + function newError(er) { + return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG"); + } + function realpath(p, cache, cb) { + if (ok) { + return origRealpath(p, cache, cb); + } + if (typeof cache === "function") { + cb = cache; + cache = null; + } + origRealpath(p, cache, function(er, result) { + if (newError(er)) { + old.realpath(p, cache, cb); + } else { + cb(er, result); + } + }); + } + function realpathSync(p, cache) { + if (ok) { + return origRealpathSync(p, cache); + } + try { + return origRealpathSync(p, cache); + } catch (er) { + if (newError(er)) { + return old.realpathSync(p, cache); + } else { + throw er; + } + } + } + function monkeypatch() { + fs.realpath = realpath; + fs.realpathSync = realpathSync; + } + function unmonkeypatch() { + fs.realpath = origRealpath; + fs.realpathSync = origRealpathSync; + } + }, + function(module3, exports3, __webpack_require__) { + exports3.alphasort = alphasort; + exports3.alphasorti = alphasorti; + exports3.setopts = setopts; + exports3.ownProp = ownProp; + exports3.makeAbs = makeAbs; + exports3.finish = finish; + exports3.mark = mark; + exports3.isIgnored = isIgnored; + exports3.childrenIgnored = childrenIgnored; + function ownProp(obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field); + } + var path = __webpack_require__(0); + var minimatch = __webpack_require__(60); + var isAbsolute = __webpack_require__(76); + var Minimatch = minimatch.Minimatch; + function alphasorti(a, b) { + return a.toLowerCase().localeCompare(b.toLowerCase()); + } + function alphasort(a, b) { + return a.localeCompare(b); + } + function setupIgnores(self2, options) { + self2.ignore = options.ignore || []; + if (!Array.isArray(self2.ignore)) + self2.ignore = [self2.ignore]; + if (self2.ignore.length) { + self2.ignore = self2.ignore.map(ignoreMap); + } + } + function ignoreMap(pattern) { + var gmatcher = null; + if (pattern.slice(-3) === "/**") { + var gpattern = pattern.replace(/(\/\*\*)+$/, ""); + gmatcher = new Minimatch(gpattern, { dot: true }); + } + return { + matcher: new Minimatch(pattern, { dot: true }), + gmatcher + }; + } + function setopts(self2, pattern, options) { + if (!options) + options = {}; + if (options.matchBase && pattern.indexOf("/") === -1) { + if (options.noglobstar) { + throw new Error("base matching requires globstar"); + } + pattern = "**/" + pattern; + } + self2.silent = !!options.silent; + self2.pattern = pattern; + self2.strict = options.strict !== false; + self2.realpath = !!options.realpath; + self2.realpathCache = options.realpathCache || Object.create(null); + self2.follow = !!options.follow; + self2.dot = !!options.dot; + self2.mark = !!options.mark; + self2.nodir = !!options.nodir; + if (self2.nodir) + self2.mark = true; + self2.sync = !!options.sync; + self2.nounique = !!options.nounique; + self2.nonull = !!options.nonull; + self2.nosort = !!options.nosort; + self2.nocase = !!options.nocase; + self2.stat = !!options.stat; + self2.noprocess = !!options.noprocess; + self2.absolute = !!options.absolute; + self2.maxLength = options.maxLength || Infinity; + self2.cache = options.cache || Object.create(null); + self2.statCache = options.statCache || Object.create(null); + self2.symlinks = options.symlinks || Object.create(null); + setupIgnores(self2, options); + self2.changedCwd = false; + var cwd = process.cwd(); + if (!ownProp(options, "cwd")) + self2.cwd = cwd; + else { + self2.cwd = path.resolve(options.cwd); + self2.changedCwd = self2.cwd !== cwd; + } + self2.root = options.root || path.resolve(self2.cwd, "/"); + self2.root = path.resolve(self2.root); + if (process.platform === "win32") + self2.root = self2.root.replace(/\\/g, "/"); + self2.cwdAbs = isAbsolute(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd); + if (process.platform === "win32") + self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/"); + self2.nomount = !!options.nomount; + options.nonegate = true; + options.nocomment = true; + self2.minimatch = new Minimatch(pattern, options); + self2.options = self2.minimatch.options; + } + function finish(self2) { + var nou = self2.nounique; + var all = nou ? [] : Object.create(null); + for (var i = 0, l = self2.matches.length; i < l; i++) { + var matches = self2.matches[i]; + if (!matches || Object.keys(matches).length === 0) { + if (self2.nonull) { + var literal = self2.minimatch.globSet[i]; + if (nou) + all.push(literal); + else + all[literal] = true; + } + } else { + var m = Object.keys(matches); + if (nou) + all.push.apply(all, m); + else + m.forEach(function(m2) { + all[m2] = true; + }); + } + } + if (!nou) + all = Object.keys(all); + if (!self2.nosort) + all = all.sort(self2.nocase ? alphasorti : alphasort); + if (self2.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self2._mark(all[i]); + } + if (self2.nodir) { + all = all.filter(function(e) { + var notDir = !/\/$/.test(e); + var c = self2.cache[e] || self2.cache[makeAbs(self2, e)]; + if (notDir && c) + notDir = c !== "DIR" && !Array.isArray(c); + return notDir; + }); + } + } + if (self2.ignore.length) + all = all.filter(function(m2) { + return !isIgnored(self2, m2); + }); + self2.found = all; + } + function mark(self2, p) { + var abs = makeAbs(self2, p); + var c = self2.cache[abs]; + var m = p; + if (c) { + var isDir = c === "DIR" || Array.isArray(c); + var slash = p.slice(-1) === "/"; + if (isDir && !slash) + m += "/"; + else if (!isDir && slash) + m = m.slice(0, -1); + if (m !== p) { + var mabs = makeAbs(self2, m); + self2.statCache[mabs] = self2.statCache[abs]; + self2.cache[mabs] = self2.cache[abs]; + } + } + return m; + } + function makeAbs(self2, f) { + var abs = f; + if (f.charAt(0) === "/") { + abs = path.join(self2.root, f); + } else if (isAbsolute(f) || f === "") { + abs = f; + } else if (self2.changedCwd) { + abs = path.resolve(self2.cwd, f); + } else { + abs = path.resolve(f); + } + if (process.platform === "win32") + abs = abs.replace(/\\/g, "/"); + return abs; + } + function isIgnored(self2, path2) { + if (!self2.ignore.length) + return false; + return self2.ignore.some(function(item) { + return item.matcher.match(path2) || !!(item.gmatcher && item.gmatcher.match(path2)); + }); + } + function childrenIgnored(self2, path2) { + if (!self2.ignore.length) + return false; + return self2.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path2)); + }); + } + }, + function(module3, exports3, __webpack_require__) { + var path = __webpack_require__(0); + var fs = __webpack_require__(3); + var _0777 = parseInt("0777", 8); + module3.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; + function mkdirP(p, opts, f, made) { + if (typeof opts === "function") { + f = opts; + opts = {}; + } else if (!opts || typeof opts !== "object") { + opts = { mode: opts }; + } + var mode = opts.mode; + var xfs = opts.fs || fs; + if (mode === void 0) { + mode = _0777 & ~process.umask(); + } + if (!made) + made = null; + var cb = f || function() { + }; + p = path.resolve(p); + xfs.mkdir(p, mode, function(er) { + if (!er) { + made = made || p; + return cb(null, made); + } + switch (er.code) { + case "ENOENT": + mkdirP(path.dirname(p), opts, function(er2, made2) { + if (er2) + cb(er2, made2); + else + mkdirP(p, opts, cb, made2); + }); + break; + default: + xfs.stat(p, function(er2, stat) { + if (er2 || !stat.isDirectory()) + cb(er, made); + else + cb(null, made); + }); + break; + } + }); + } + mkdirP.sync = function sync(p, opts, made) { + if (!opts || typeof opts !== "object") { + opts = { mode: opts }; + } + var mode = opts.mode; + var xfs = opts.fs || fs; + if (mode === void 0) { + mode = _0777 & ~process.umask(); + } + if (!made) + made = null; + p = path.resolve(p); + try { + xfs.mkdirSync(p, mode); + made = made || p; + } catch (err0) { + switch (err0.code) { + case "ENOENT": + made = sync(path.dirname(p), opts, made); + sync(p, opts, made); + break; + default: + var stat; + try { + stat = xfs.statSync(p); + } catch (err1) { + throw err0; + } + if (!stat.isDirectory()) + throw err0; + break; + } + } + return made; + }; + }, + , + , + , + , + , + function(module3, exports3, __webpack_require__) { + "use strict"; + module3.exports = (x) => { + if (typeof x !== "string") { + throw new TypeError("Expected a string, got " + typeof x); + } + if (x.charCodeAt(0) === 65279) { + return x.slice(1); + } + return x; + }; + }, + function(module3, exports3) { + module3.exports = wrappy; + function wrappy(fn2, cb) { + if (fn2 && cb) + return wrappy(fn2)(cb); + if (typeof fn2 !== "function") + throw new TypeError("need wrapper function"); + Object.keys(fn2).forEach(function(k) { + wrapper[k] = fn2[k]; + }); + return wrapper; + function wrapper() { + var args2 = new Array(arguments.length); + for (var i = 0; i < args2.length; i++) { + args2[i] = arguments[i]; + } + var ret = fn2.apply(this, args2); + var cb2 = args2[args2.length - 1]; + if (typeof ret === "function" && ret !== cb2) { + Object.keys(cb2).forEach(function(k) { + ret[k] = cb2[k]; + }); + } + return ret; + } + } + }, + , + , + , + , + , + , + , + function(module3, exports3, __webpack_require__) { + var cof = __webpack_require__(47); + module3.exports = Object("z").propertyIsEnumerable(0) ? Object : function(it) { + return cof(it) == "String" ? it.split("") : Object(it); + }; + }, + function(module3, exports3, __webpack_require__) { + var $keys = __webpack_require__(195); + var enumBugKeys = __webpack_require__(101); + module3.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); + }; + }, + function(module3, exports3, __webpack_require__) { + var defined = __webpack_require__(67); + module3.exports = function(it) { + return Object(defined(it)); + }; + }, + , + , + , + , + , + , + , + , + , + , + , + function(module3, exports3) { + module3.exports = { "name": "yarn", "installationMethod": "unknown", "version": "1.10.0-0", "license": "BSD-2-Clause", "preferGlobal": true, "description": "\u{1F4E6}\u{1F408} Fast, reliable, and secure dependency management.", "dependencies": { "@zkochan/cmd-shim": "^2.2.4", "babel-runtime": "^6.26.0", "bytes": "^3.0.0", "camelcase": "^4.0.0", "chalk": "^2.1.0", "commander": "^2.9.0", "death": "^1.0.0", "debug": "^3.0.0", "deep-equal": "^1.0.1", "detect-indent": "^5.0.0", "dnscache": "^1.0.1", "glob": "^7.1.1", "gunzip-maybe": "^1.4.0", "hash-for-dep": "^1.2.3", "imports-loader": "^0.8.0", "ini": "^1.3.4", "inquirer": "^3.0.1", "invariant": "^2.2.0", "is-builtin-module": "^2.0.0", "is-ci": "^1.0.10", "is-webpack-bundle": "^1.0.0", "leven": "^2.0.0", "loud-rejection": "^1.2.0", "micromatch": "^2.3.11", "mkdirp": "^0.5.1", "node-emoji": "^1.6.1", "normalize-url": "^2.0.0", "npm-logical-tree": "^1.2.1", "object-path": "^0.11.2", "proper-lockfile": "^2.0.0", "puka": "^1.0.0", "read": "^1.0.7", "request": "^2.87.0", "request-capture-har": "^1.2.2", "rimraf": "^2.5.0", "semver": "^5.1.0", "ssri": "^5.3.0", "strip-ansi": "^4.0.0", "strip-bom": "^3.0.0", "tar-fs": "^1.16.0", "tar-stream": "^1.6.1", "uuid": "^3.0.1", "v8-compile-cache": "^2.0.0", "validate-npm-package-license": "^3.0.3", "yn": "^2.0.0" }, "devDependencies": { "babel-core": "^6.26.0", "babel-eslint": "^7.2.3", "babel-loader": "^6.2.5", "babel-plugin-array-includes": "^2.0.3", "babel-plugin-transform-builtin-extend": "^1.1.2", "babel-plugin-transform-inline-imports-commonjs": "^1.0.0", "babel-plugin-transform-runtime": "^6.4.3", "babel-preset-env": "^1.6.0", "babel-preset-flow": "^6.23.0", "babel-preset-stage-0": "^6.0.0", "babylon": "^6.5.0", "commitizen": "^2.9.6", "cz-conventional-changelog": "^2.0.0", "eslint": "^4.3.0", "eslint-config-fb-strict": "^22.0.0", "eslint-plugin-babel": "^5.0.0", "eslint-plugin-flowtype": "^2.35.0", "eslint-plugin-jasmine": "^2.6.2", "eslint-plugin-jest": "^21.0.0", "eslint-plugin-jsx-a11y": "^6.0.2", "eslint-plugin-prefer-object-spread": "^1.2.1", "eslint-plugin-prettier": "^2.1.2", "eslint-plugin-react": "^7.1.0", "eslint-plugin-relay": "^0.0.24", "eslint-plugin-yarn-internal": "file:scripts/eslint-rules", "execa": "^0.10.0", "flow-bin": "^0.66.0", "git-release-notes": "^3.0.0", "gulp": "^3.9.0", "gulp-babel": "^7.0.0", "gulp-if": "^2.0.1", "gulp-newer": "^1.0.0", "gulp-plumber": "^1.0.1", "gulp-sourcemaps": "^2.2.0", "gulp-util": "^3.0.7", "gulp-watch": "^5.0.0", "jest": "^22.4.4", "jsinspect": "^0.12.6", "minimatch": "^3.0.4", "mock-stdin": "^0.3.0", "prettier": "^1.5.2", "temp": "^0.8.3", "webpack": "^2.1.0-beta.25", "yargs": "^6.3.0" }, "resolutions": { "sshpk": "^1.14.2" }, "engines": { "node": ">=4.0.0" }, "repository": "yarnpkg/yarn", "bin": { "yarn": "./bin/yarn.js", "yarnpkg": "./bin/yarn.js" }, "scripts": { "build": "gulp build", "build-bundle": "node ./scripts/build-webpack.js", "build-chocolatey": "powershell ./scripts/build-chocolatey.ps1", "build-deb": "./scripts/build-deb.sh", "build-dist": "bash ./scripts/build-dist.sh", "build-win-installer": "scripts\\build-windows-installer.bat", "changelog": "git-release-notes $(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^)..$(git describe --tags --abbrev=0) scripts/changelog.md", "dupe-check": "yarn jsinspect ./src", "lint": "eslint . && flow check", "pkg-tests": "yarn --cwd packages/pkg-tests jest yarn.test.js", "prettier": "eslint src __tests__ --fix", "release-branch": "./scripts/release-branch.sh", "test": "yarn lint && yarn test-only", "test-only": "node --max_old_space_size=4096 node_modules/jest/bin/jest.js --verbose", "test-only-debug": "node --inspect-brk --max_old_space_size=4096 node_modules/jest/bin/jest.js --runInBand --verbose", "test-coverage": "node --max_old_space_size=4096 node_modules/jest/bin/jest.js --coverage --verbose", "watch": "gulp watch", "commit": "git-cz" }, "jest": { "collectCoverageFrom": ["src/**/*.js"], "testEnvironment": "node", "modulePathIgnorePatterns": ["__tests__/fixtures/", "packages/pkg-tests/pkg-tests-fixtures", "dist/"], "testPathIgnorePatterns": ["__tests__/(fixtures|__mocks__)/", "updates/", "_(temp|mock|install|init|helpers).js$", "packages/pkg-tests"] }, "config": { "commitizen": { "path": "./node_modules/cz-conventional-changelog" } } }; + }, + , + , + , + , + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.default = stringify; + var _misc; + function _load_misc() { + return _misc = __webpack_require__(12); + } + var _constants; + function _load_constants() { + return _constants = __webpack_require__(6); + } + var _package; + function _load_package() { + return _package = __webpack_require__(145); + } + const NODE_VERSION = process.version; + function shouldWrapKey(str) { + return str.indexOf("true") === 0 || str.indexOf("false") === 0 || /[:\s\n\\",\[\]]/g.test(str) || /^[0-9]/g.test(str) || !/^[a-zA-Z]/g.test(str); + } + function maybeWrap(str) { + if (typeof str === "boolean" || typeof str === "number" || shouldWrapKey(str)) { + return JSON.stringify(str); + } else { + return str; + } + } + const priorities = { + name: 1, + version: 2, + uid: 3, + resolved: 4, + integrity: 5, + registry: 6, + dependencies: 7 + }; + function priorityThenAlphaSort(a, b) { + if (priorities[a] || priorities[b]) { + return (priorities[a] || 100) > (priorities[b] || 100) ? 1 : -1; + } else { + return (0, (_misc || _load_misc()).sortAlpha)(a, b); + } + } + function _stringify(obj, options) { + if (typeof obj !== "object") { + throw new TypeError(); + } + const indent = options.indent; + const lines = []; + const keys = Object.keys(obj).sort(priorityThenAlphaSort); + let addedKeys = []; + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + const val = obj[key]; + if (val == null || addedKeys.indexOf(key) >= 0) { + continue; + } + const valKeys = [key]; + if (typeof val === "object") { + for (let j = i + 1; j < keys.length; j++) { + const key2 = keys[j]; + if (val === obj[key2]) { + valKeys.push(key2); + } + } + } + const keyLine = valKeys.sort((_misc || _load_misc()).sortAlpha).map(maybeWrap).join(", "); + if (typeof val === "string" || typeof val === "boolean" || typeof val === "number") { + lines.push(`${keyLine} ${maybeWrap(val)}`); + } else if (typeof val === "object") { + lines.push(`${keyLine}: +${_stringify(val, { indent: indent + " " })}` + (options.topLevel ? "\n" : "")); + } else { + throw new TypeError(); + } + addedKeys = addedKeys.concat(valKeys); + } + return indent + lines.join(` +${indent}`); + } + function stringify(obj, noHeader, enableVersions) { + const val = _stringify(obj, { + indent: "", + topLevel: true + }); + if (noHeader) { + return val; + } + const lines = []; + lines.push("# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY."); + lines.push(`# yarn lockfile v${(_constants || _load_constants()).LOCKFILE_VERSION}`); + if (enableVersions) { + lines.push(`# yarn v${(_package || _load_package()).version}`); + lines.push(`# node ${NODE_VERSION}`); + } + lines.push("\n"); + lines.push(val); + return lines.join("\n"); + } + }, + , + , + , + , + , + , + , + , + , + , + , + , + , + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.fileDatesEqual = exports3.copyFile = exports3.unlink = void 0; + var _asyncToGenerator2; + function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); + } + let fixTimes = (() => { + var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (fd, dest, data) { + const doOpen = fd === void 0; + let openfd = fd ? fd : -1; + if (disableTimestampCorrection === void 0) { + const destStat = yield lstat(dest); + disableTimestampCorrection = fileDatesEqual(destStat.mtime, data.mtime); + } + if (disableTimestampCorrection) { + return; + } + if (doOpen) { + try { + openfd = yield open(dest, "a", data.mode); + } catch (er) { + try { + openfd = yield open(dest, "r", data.mode); + } catch (err) { + return; + } + } + } + try { + if (openfd) { + yield futimes(openfd, data.atime, data.mtime); + } + } catch (er) { + } finally { + if (doOpen && openfd) { + yield close(openfd); + } + } + }); + return function fixTimes2(_x7, _x8, _x9) { + return _ref3.apply(this, arguments); + }; + })(); + var _fs; + function _load_fs() { + return _fs = _interopRequireDefault(__webpack_require__(3)); + } + var _promise; + function _load_promise() { + return _promise = __webpack_require__(40); + } + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + let disableTimestampCorrection = void 0; + const readFileBuffer = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.readFile); + const close = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.close); + const lstat = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.lstat); + const open = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.open); + const futimes = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.futimes); + const write = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.write); + const unlink = exports3.unlink = (0, (_promise || _load_promise()).promisify)(__webpack_require__(233)); + const copyFile = exports3.copyFile = (() => { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data, cleanup) { + try { + yield unlink(data.dest); + yield copyFilePoly(data.src, data.dest, 0, data); + } finally { + if (cleanup) { + cleanup(); + } + } + }); + return function copyFile2(_x, _x2) { + return _ref.apply(this, arguments); + }; + })(); + const copyFilePoly = (src, dest, flags, data) => { + if ((_fs || _load_fs()).default.copyFile) { + return new Promise((resolve, reject) => (_fs || _load_fs()).default.copyFile(src, dest, flags, (err) => { + if (err) { + reject(err); + } else { + fixTimes(void 0, dest, data).then(() => resolve()).catch((ex) => reject(ex)); + } + })); + } else { + return copyWithBuffer(src, dest, flags, data); + } + }; + const copyWithBuffer = (() => { + var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (src, dest, flags, data) { + const fd = yield open(dest, "w", data.mode); + try { + const buffer = yield readFileBuffer(src); + yield write(fd, buffer, 0, buffer.length); + yield fixTimes(fd, dest, data); + } finally { + yield close(fd); + } + }); + return function copyWithBuffer2(_x3, _x4, _x5, _x6) { + return _ref2.apply(this, arguments); + }; + })(); + const fileDatesEqual = exports3.fileDatesEqual = (a, b) => { + const aTime = a.getTime(); + const bTime = b.getTime(); + if (process.platform !== "win32") { + return aTime === bTime; + } + if (Math.abs(aTime - bTime) <= 1) { + return true; + } + const aTimeSec = Math.floor(aTime / 1e3); + const bTimeSec = Math.floor(bTime / 1e3); + if (aTime - aTimeSec * 1e3 === 0 || bTime - bTimeSec * 1e3 === 0) { + return aTimeSec === bTimeSec; + } + return aTime === bTime; + }; + }, + , + , + , + , + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.isFakeRoot = isFakeRoot; + exports3.isRootUser = isRootUser; + function getUid() { + if (process.platform !== "win32" && process.getuid) { + return process.getuid(); + } + return null; + } + exports3.default = isRootUser(getUid()) && !isFakeRoot(); + function isFakeRoot() { + return Boolean(process.env.FAKEROOTKEY); + } + function isRootUser(uid) { + return uid === 0; + } + }, + , + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.getDataDir = getDataDir; + exports3.getCacheDir = getCacheDir; + exports3.getConfigDir = getConfigDir; + const path = __webpack_require__(0); + const userHome = __webpack_require__(45).default; + const FALLBACK_CONFIG_DIR = path.join(userHome, ".config", "yarn"); + const FALLBACK_CACHE_DIR = path.join(userHome, ".cache", "yarn"); + function getDataDir() { + if (process.platform === "win32") { + const WIN32_APPDATA_DIR = getLocalAppDataDir(); + return WIN32_APPDATA_DIR == null ? FALLBACK_CONFIG_DIR : path.join(WIN32_APPDATA_DIR, "Data"); + } else if (process.env.XDG_DATA_HOME) { + return path.join(process.env.XDG_DATA_HOME, "yarn"); + } else { + return FALLBACK_CONFIG_DIR; + } + } + function getCacheDir() { + if (process.platform === "win32") { + return path.join(getLocalAppDataDir() || path.join(userHome, "AppData", "Local", "Yarn"), "Cache"); + } else if (process.env.XDG_CACHE_HOME) { + return path.join(process.env.XDG_CACHE_HOME, "yarn"); + } else if (process.platform === "darwin") { + return path.join(userHome, "Library", "Caches", "Yarn"); + } else { + return FALLBACK_CACHE_DIR; + } + } + function getConfigDir() { + if (process.platform === "win32") { + const WIN32_APPDATA_DIR = getLocalAppDataDir(); + return WIN32_APPDATA_DIR == null ? FALLBACK_CONFIG_DIR : path.join(WIN32_APPDATA_DIR, "Config"); + } else if (process.env.XDG_CONFIG_HOME) { + return path.join(process.env.XDG_CONFIG_HOME, "yarn"); + } else { + return FALLBACK_CONFIG_DIR; + } + } + function getLocalAppDataDir() { + return process.env.LOCALAPPDATA ? path.join(process.env.LOCALAPPDATA, "Yarn") : null; + } + }, + , + function(module3, exports3, __webpack_require__) { + module3.exports = { "default": __webpack_require__(179), __esModule: true }; + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + module3.exports = balanced; + function balanced(a, b, str) { + if (a instanceof RegExp) + a = maybeMatch(a, str); + if (b instanceof RegExp) + b = maybeMatch(b, str); + var r = range(a, b, str); + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; + } + function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; + } + balanced.range = range; + function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + if (ai >= 0 && bi > 0) { + begs = []; + left = str.length; + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [begs.pop(), bi]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + bi = str.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length) { + result = [left, right]; + } + } + return result; + } + }, + function(module3, exports3, __webpack_require__) { + var concatMap = __webpack_require__(178); + var balanced = __webpack_require__(174); + module3.exports = expandTop; + var escSlash = "\0SLASH" + Math.random() + "\0"; + var escOpen = "\0OPEN" + Math.random() + "\0"; + var escClose = "\0CLOSE" + Math.random() + "\0"; + var escComma = "\0COMMA" + Math.random() + "\0"; + var escPeriod = "\0PERIOD" + Math.random() + "\0"; + function numeric(str) { + return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); + } + function escapeBraces(str) { + return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); + } + function unescapeBraces(str) { + return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); + } + function parseCommaParts(str) { + if (!str) + return [""]; + var parts = []; + var m = balanced("{", "}", str); + if (!m) + return str.split(","); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(","); + p[p.length - 1] += "{" + body + "}"; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; + } + function expandTop(str) { + if (!str) + return []; + if (str.substr(0, 2) === "{}") { + str = "\\{\\}" + str.substr(2); + } + return expand(escapeBraces(str), true).map(unescapeBraces); + } + function identity(e) { + return e; + } + function embrace(str) { + return "{" + str + "}"; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + function lte(i, y) { + return i <= y; + } + function gte(i, y) { + return i >= y; + } + function expand(str, isTop) { + var expansions = []; + var m = balanced("{", "}", str); + if (!m || /\$$/.test(m.pre)) + return [str]; + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,.*\}/)) { + str = m.pre + "{" + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length ? expand(m.post, false) : [""]; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + var pre = m.pre; + var post = m.post.length ? expand(m.post, false) : [""]; + var N; + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + N = []; + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") + c = ""; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) + c = "-" + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { + return expand(el, false); + }); + } + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + return expansions; + } + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + function preserveCamelCase(str) { + let isLastCharLower = false; + let isLastCharUpper = false; + let isLastLastCharUpper = false; + for (let i = 0; i < str.length; i++) { + const c = str[i]; + if (isLastCharLower && /[a-zA-Z]/.test(c) && c.toUpperCase() === c) { + str = str.substr(0, i) + "-" + str.substr(i); + isLastCharLower = false; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = true; + i++; + } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(c) && c.toLowerCase() === c) { + str = str.substr(0, i - 1) + "-" + str.substr(i - 1); + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = false; + isLastCharLower = true; + } else { + isLastCharLower = c.toLowerCase() === c; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = c.toUpperCase() === c; + } + } + return str; + } + module3.exports = function(str) { + if (arguments.length > 1) { + str = Array.from(arguments).map((x) => x.trim()).filter((x) => x.length).join("-"); + } else { + str = str.trim(); + } + if (str.length === 0) { + return ""; + } + if (str.length === 1) { + return str.toLowerCase(); + } + if (/^[a-z0-9]+$/.test(str)) { + return str; + } + const hasUpperCase = str !== str.toLowerCase(); + if (hasUpperCase) { + str = preserveCamelCase(str); + } + return str.replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+(\w|$)/g, (m, p1) => p1.toUpperCase()); + }; + }, + , + function(module3, exports3) { + module3.exports = function(xs, fn2) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn2(xs[i], i); + if (isArray(x)) + res.push.apply(res, x); + else + res.push(x); + } + return res; + }; + var isArray = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + }, + function(module3, exports3, __webpack_require__) { + __webpack_require__(205); + __webpack_require__(207); + __webpack_require__(210); + __webpack_require__(206); + __webpack_require__(208); + __webpack_require__(209); + module3.exports = __webpack_require__(23).Promise; + }, + function(module3, exports3) { + module3.exports = function() { + }; + }, + function(module3, exports3) { + module3.exports = function(it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || forbiddenField !== void 0 && forbiddenField in it) { + throw TypeError(name + ": incorrect invocation!"); + } + return it; + }; + }, + function(module3, exports3, __webpack_require__) { + var toIObject = __webpack_require__(74); + var toLength = __webpack_require__(110); + var toAbsoluteIndex = __webpack_require__(200); + module3.exports = function(IS_INCLUDES) { + return function($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + if (IS_INCLUDES && el != el) + while (length > index) { + value = O[index++]; + if (value != value) + return true; + } + else + for (; length > index; index++) + if (IS_INCLUDES || index in O) { + if (O[index] === el) + return IS_INCLUDES || index || 0; + } + return !IS_INCLUDES && -1; + }; + }; + }, + function(module3, exports3, __webpack_require__) { + var ctx = __webpack_require__(48); + var call = __webpack_require__(187); + var isArrayIter = __webpack_require__(186); + var anObject = __webpack_require__(27); + var toLength = __webpack_require__(110); + var getIterFn = __webpack_require__(203); + var BREAK = {}; + var RETURN = {}; + var exports3 = module3.exports = function(iterable, entries, fn2, that, ITERATOR) { + var iterFn = ITERATOR ? function() { + return iterable; + } : getIterFn(iterable); + var f = ctx(fn2, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != "function") + throw TypeError(iterable + " is not iterable!"); + if (isArrayIter(iterFn)) + for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) + return result; + } + else + for (iterator = iterFn.call(iterable); !(step = iterator.next()).done; ) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) + return result; + } + }; + exports3.BREAK = BREAK; + exports3.RETURN = RETURN; + }, + function(module3, exports3, __webpack_require__) { + module3.exports = !__webpack_require__(33) && !__webpack_require__(85)(function() { + return Object.defineProperty(__webpack_require__(68)("div"), "a", { get: function() { + return 7; + } }).a != 7; + }); + }, + function(module3, exports3) { + module3.exports = function(fn2, args2, that) { + var un = that === void 0; + switch (args2.length) { + case 0: + return un ? fn2() : fn2.call(that); + case 1: + return un ? fn2(args2[0]) : fn2.call(that, args2[0]); + case 2: + return un ? fn2(args2[0], args2[1]) : fn2.call(that, args2[0], args2[1]); + case 3: + return un ? fn2(args2[0], args2[1], args2[2]) : fn2.call(that, args2[0], args2[1], args2[2]); + case 4: + return un ? fn2(args2[0], args2[1], args2[2], args2[3]) : fn2.call(that, args2[0], args2[1], args2[2], args2[3]); + } + return fn2.apply(that, args2); + }; + }, + function(module3, exports3, __webpack_require__) { + var Iterators = __webpack_require__(35); + var ITERATOR = __webpack_require__(13)("iterator"); + var ArrayProto = Array.prototype; + module3.exports = function(it) { + return it !== void 0 && (Iterators.Array === it || ArrayProto[ITERATOR] === it); + }; + }, + function(module3, exports3, __webpack_require__) { + var anObject = __webpack_require__(27); + module3.exports = function(iterator, fn2, value, entries) { + try { + return entries ? fn2(anObject(value)[0], value[1]) : fn2(value); + } catch (e) { + var ret = iterator["return"]; + if (ret !== void 0) + anObject(ret.call(iterator)); + throw e; + } + }; + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + var create = __webpack_require__(192); + var descriptor = __webpack_require__(106); + var setToStringTag = __webpack_require__(71); + var IteratorPrototype = {}; + __webpack_require__(31)(IteratorPrototype, __webpack_require__(13)("iterator"), function() { + return this; + }); + module3.exports = function(Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + " Iterator"); + }; + }, + function(module3, exports3, __webpack_require__) { + var ITERATOR = __webpack_require__(13)("iterator"); + var SAFE_CLOSING = false; + try { + var riter = [7][ITERATOR](); + riter["return"] = function() { + SAFE_CLOSING = true; + }; + Array.from(riter, function() { + throw 2; + }); + } catch (e) { + } + module3.exports = function(exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) + return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function() { + return { done: safe = true }; + }; + arr[ITERATOR] = function() { + return iter; + }; + exec(arr); + } catch (e) { + } + return safe; + }; + }, + function(module3, exports3) { + module3.exports = function(done, value) { + return { value, done: !!done }; + }; + }, + function(module3, exports3, __webpack_require__) { + var global2 = __webpack_require__(11); + var macrotask = __webpack_require__(109).set; + var Observer = global2.MutationObserver || global2.WebKitMutationObserver; + var process2 = global2.process; + var Promise2 = global2.Promise; + var isNode = __webpack_require__(47)(process2) == "process"; + module3.exports = function() { + var head, last, notify; + var flush = function() { + var parent, fn2; + if (isNode && (parent = process2.domain)) + parent.exit(); + while (head) { + fn2 = head.fn; + head = head.next; + try { + fn2(); + } catch (e) { + if (head) + notify(); + else + last = void 0; + throw e; + } + } + last = void 0; + if (parent) + parent.enter(); + }; + if (isNode) { + notify = function() { + process2.nextTick(flush); + }; + } else if (Observer && !(global2.navigator && global2.navigator.standalone)) { + var toggle = true; + var node = document.createTextNode(""); + new Observer(flush).observe(node, { characterData: true }); + notify = function() { + node.data = toggle = !toggle; + }; + } else if (Promise2 && Promise2.resolve) { + var promise = Promise2.resolve(void 0); + notify = function() { + promise.then(flush); + }; + } else { + notify = function() { + macrotask.call(global2, flush); + }; + } + return function(fn2) { + var task = { fn: fn2, next: void 0 }; + if (last) + last.next = task; + if (!head) { + head = task; + notify(); + } + last = task; + }; + }; + }, + function(module3, exports3, __webpack_require__) { + var anObject = __webpack_require__(27); + var dPs = __webpack_require__(193); + var enumBugKeys = __webpack_require__(101); + var IE_PROTO = __webpack_require__(72)("IE_PROTO"); + var Empty = function() { + }; + var PROTOTYPE = "prototype"; + var createDict = function() { + var iframe = __webpack_require__(68)("iframe"); + var i = enumBugKeys.length; + var lt = "<"; + var gt = ">"; + var iframeDocument; + iframe.style.display = "none"; + __webpack_require__(102).appendChild(iframe); + iframe.src = "javascript:"; + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + "script" + gt + "document.F=Object" + lt + "/script" + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) + delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); + }; + module3.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + result[IE_PROTO] = O; + } else + result = createDict(); + return Properties === void 0 ? result : dPs(result, Properties); + }; + }, + function(module3, exports3, __webpack_require__) { + var dP = __webpack_require__(50); + var anObject = __webpack_require__(27); + var getKeys = __webpack_require__(132); + module3.exports = __webpack_require__(33) ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) + dP.f(O, P = keys[i++], Properties[P]); + return O; + }; + }, + function(module3, exports3, __webpack_require__) { + var has = __webpack_require__(49); + var toObject = __webpack_require__(133); + var IE_PROTO = __webpack_require__(72)("IE_PROTO"); + var ObjectProto = Object.prototype; + module3.exports = Object.getPrototypeOf || function(O) { + O = toObject(O); + if (has(O, IE_PROTO)) + return O[IE_PROTO]; + if (typeof O.constructor == "function" && O instanceof O.constructor) { + return O.constructor.prototype; + } + return O instanceof Object ? ObjectProto : null; + }; + }, + function(module3, exports3, __webpack_require__) { + var has = __webpack_require__(49); + var toIObject = __webpack_require__(74); + var arrayIndexOf = __webpack_require__(182)(false); + var IE_PROTO = __webpack_require__(72)("IE_PROTO"); + module3.exports = function(object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) + if (key != IE_PROTO) + has(O, key) && result.push(key); + while (names.length > i) + if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; + }, + function(module3, exports3, __webpack_require__) { + var hide = __webpack_require__(31); + module3.exports = function(target, src, safe) { + for (var key in src) { + if (safe && target[key]) + target[key] = src[key]; + else + hide(target, key, src[key]); + } + return target; + }; + }, + function(module3, exports3, __webpack_require__) { + module3.exports = __webpack_require__(31); + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + var global2 = __webpack_require__(11); + var core = __webpack_require__(23); + var dP = __webpack_require__(50); + var DESCRIPTORS = __webpack_require__(33); + var SPECIES = __webpack_require__(13)("species"); + module3.exports = function(KEY) { + var C = typeof core[KEY] == "function" ? core[KEY] : global2[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) + dP.f(C, SPECIES, { + configurable: true, + get: function() { + return this; + } + }); + }; + }, + function(module3, exports3, __webpack_require__) { + var toInteger = __webpack_require__(73); + var defined = __webpack_require__(67); + module3.exports = function(TO_STRING) { + return function(that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) + return TO_STRING ? "" : void 0; + a = s.charCodeAt(i); + return a < 55296 || a > 56319 || i + 1 === l || (b = s.charCodeAt(i + 1)) < 56320 || b > 57343 ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 55296 << 10) + (b - 56320) + 65536; + }; + }; + }, + function(module3, exports3, __webpack_require__) { + var toInteger = __webpack_require__(73); + var max = Math.max; + var min = Math.min; + module3.exports = function(index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }; + }, + function(module3, exports3, __webpack_require__) { + var isObject = __webpack_require__(34); + module3.exports = function(it, S) { + if (!isObject(it)) + return it; + var fn2, val; + if (S && typeof (fn2 = it.toString) == "function" && !isObject(val = fn2.call(it))) + return val; + if (typeof (fn2 = it.valueOf) == "function" && !isObject(val = fn2.call(it))) + return val; + if (!S && typeof (fn2 = it.toString) == "function" && !isObject(val = fn2.call(it))) + return val; + throw TypeError("Can't convert object to primitive value"); + }; + }, + function(module3, exports3, __webpack_require__) { + var global2 = __webpack_require__(11); + var navigator2 = global2.navigator; + module3.exports = navigator2 && navigator2.userAgent || ""; + }, + function(module3, exports3, __webpack_require__) { + var classof = __webpack_require__(100); + var ITERATOR = __webpack_require__(13)("iterator"); + var Iterators = __webpack_require__(35); + module3.exports = __webpack_require__(23).getIteratorMethod = function(it) { + if (it != void 0) + return it[ITERATOR] || it["@@iterator"] || Iterators[classof(it)]; + }; + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + var addToUnscopables = __webpack_require__(180); + var step = __webpack_require__(190); + var Iterators = __webpack_require__(35); + var toIObject = __webpack_require__(74); + module3.exports = __webpack_require__(103)(Array, "Array", function(iterated, kind) { + this._t = toIObject(iterated); + this._i = 0; + this._k = kind; + }, function() { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = void 0; + return step(1); + } + if (kind == "keys") + return step(0, index); + if (kind == "values") + return step(0, O[index]); + return step(0, [index, O[index]]); + }, "values"); + Iterators.Arguments = Iterators.Array; + addToUnscopables("keys"); + addToUnscopables("values"); + addToUnscopables("entries"); + }, + function(module3, exports3) { + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + var LIBRARY = __webpack_require__(69); + var global2 = __webpack_require__(11); + var ctx = __webpack_require__(48); + var classof = __webpack_require__(100); + var $export = __webpack_require__(41); + var isObject = __webpack_require__(34); + var aFunction = __webpack_require__(46); + var anInstance = __webpack_require__(181); + var forOf = __webpack_require__(183); + var speciesConstructor = __webpack_require__(108); + var task = __webpack_require__(109).set; + var microtask = __webpack_require__(191)(); + var newPromiseCapabilityModule = __webpack_require__(70); + var perform = __webpack_require__(104); + var userAgent = __webpack_require__(202); + var promiseResolve = __webpack_require__(105); + var PROMISE = "Promise"; + var TypeError2 = global2.TypeError; + var process2 = global2.process; + var versions = process2 && process2.versions; + var v8 = versions && versions.v8 || ""; + var $Promise = global2[PROMISE]; + var isNode = classof(process2) == "process"; + var empty = function() { + }; + var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; + var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; + var USE_NATIVE = !!function() { + try { + var promise = $Promise.resolve(1); + var FakePromise = (promise.constructor = {})[__webpack_require__(13)("species")] = function(exec) { + exec(empty, empty); + }; + return (isNode || typeof PromiseRejectionEvent == "function") && promise.then(empty) instanceof FakePromise && v8.indexOf("6.6") !== 0 && userAgent.indexOf("Chrome/66") === -1; + } catch (e) { + } + }(); + var isThenable = function(it) { + var then; + return isObject(it) && typeof (then = it.then) == "function" ? then : false; + }; + var notify = function(promise, isReject) { + if (promise._n) + return; + promise._n = true; + var chain = promise._c; + microtask(function() { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function(reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) + onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) + result = value; + else { + if (domain) + domain.enter(); + result = handler(value); + if (domain) { + domain.exit(); + exited = true; + } + } + if (result === reaction.promise) { + reject(TypeError2("Promise-chain cycle")); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else + resolve(result); + } else + reject(value); + } catch (e) { + if (domain && !exited) + domain.exit(); + reject(e); + } + }; + while (chain.length > i) + run(chain[i++]); + promise._c = []; + promise._n = false; + if (isReject && !promise._h) + onUnhandled(promise); + }); + }; + var onUnhandled = function(promise) { + task.call(global2, function() { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console2; + if (unhandled) { + result = perform(function() { + if (isNode) { + process2.emit("unhandledRejection", value, promise); + } else if (handler = global2.onunhandledrejection) { + handler({ promise, reason: value }); + } else if ((console2 = global2.console) && console2.error) { + console2.error("Unhandled promise rejection", value); + } + }); + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } + promise._a = void 0; + if (unhandled && result.e) + throw result.v; + }); + }; + var isUnhandled = function(promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; + }; + var onHandleUnhandled = function(promise) { + task.call(global2, function() { + var handler; + if (isNode) { + process2.emit("rejectionHandled", promise); + } else if (handler = global2.onrejectionhandled) { + handler({ promise, reason: promise._v }); + } + }); + }; + var $reject = function(value) { + var promise = this; + if (promise._d) + return; + promise._d = true; + promise = promise._w || promise; + promise._v = value; + promise._s = 2; + if (!promise._a) + promise._a = promise._c.slice(); + notify(promise, true); + }; + var $resolve = function(value) { + var promise = this; + var then; + if (promise._d) + return; + promise._d = true; + promise = promise._w || promise; + try { + if (promise === value) + throw TypeError2("Promise can't be resolved itself"); + if (then = isThenable(value)) { + microtask(function() { + var wrapper = { _w: promise, _d: false }; + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); + } + }; + if (!USE_NATIVE) { + $Promise = function Promise2(executor) { + anInstance(this, $Promise, PROMISE, "_h"); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + Internal = function Promise2(executor) { + this._c = []; + this._a = void 0; + this._s = 0; + this._d = false; + this._v = void 0; + this._h = 0; + this._n = false; + }; + Internal.prototype = __webpack_require__(196)($Promise.prototype, { + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == "function" ? onFulfilled : true; + reaction.fail = typeof onRejected == "function" && onRejected; + reaction.domain = isNode ? process2.domain : void 0; + this._c.push(reaction); + if (this._a) + this._a.push(reaction); + if (this._s) + notify(this, false); + return reaction.promise; + }, + "catch": function(onRejected) { + return this.then(void 0, onRejected); + } + }); + OwnPromiseCapability = function() { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function(C) { + return C === $Promise || C === Wrapper ? new OwnPromiseCapability(C) : newGenericPromiseCapability(C); + }; + } + $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); + __webpack_require__(71)($Promise, PROMISE); + __webpack_require__(198)(PROMISE); + Wrapper = __webpack_require__(23)[PROMISE]; + $export($export.S + $export.F * !USE_NATIVE, PROMISE, { + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + } + }); + $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + resolve: function resolve(x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + } + }); + $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(189)(function(iter) { + $Promise.all(iter)["catch"](empty); + })), PROMISE, { + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function() { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function(promise) { + var $index = index++; + var alreadyCalled = false; + values.push(void 0); + remaining++; + C.resolve(promise).then(function(value) { + if (alreadyCalled) + return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) + reject(result.v); + return capability.promise; + }, + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function() { + forOf(iterable, false, function(promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) + reject(result.v); + return capability.promise; + } + }); + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + var $at = __webpack_require__(199)(true); + __webpack_require__(103)(String, "String", function(iterated) { + this._t = String(iterated); + this._i = 0; + }, function() { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) + return { value: void 0, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; + }); + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + var $export = __webpack_require__(41); + var core = __webpack_require__(23); + var global2 = __webpack_require__(11); + var speciesConstructor = __webpack_require__(108); + var promiseResolve = __webpack_require__(105); + $export($export.P + $export.R, "Promise", { "finally": function(onFinally) { + var C = speciesConstructor(this, core.Promise || global2.Promise); + var isFunction = typeof onFinally == "function"; + return this.then(isFunction ? function(x) { + return promiseResolve(C, onFinally()).then(function() { + return x; + }); + } : onFinally, isFunction ? function(e) { + return promiseResolve(C, onFinally()).then(function() { + throw e; + }); + } : onFinally); + } }); + }, + function(module3, exports3, __webpack_require__) { + "use strict"; + var $export = __webpack_require__(41); + var newPromiseCapability = __webpack_require__(70); + var perform = __webpack_require__(104); + $export($export.S, "Promise", { "try": function(callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; + } }); + }, + function(module3, exports3, __webpack_require__) { + __webpack_require__(204); + var global2 = __webpack_require__(11); + var hide = __webpack_require__(31); + var Iterators = __webpack_require__(35); + var TO_STRING_TAG = __webpack_require__(13)("toStringTag"); + var DOMIterables = "CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","); + for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global2[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) + hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; + } + }, + function(module3, exports3, __webpack_require__) { + exports3 = module3.exports = __webpack_require__(112); + exports3.log = log2; + exports3.formatArgs = formatArgs; + exports3.save = save; + exports3.load = load; + exports3.useColors = useColors; + exports3.storage = typeof chrome != "undefined" && typeof chrome.storage != "undefined" ? chrome.storage.local : localstorage(); + exports3.colors = [ + "#0000CC", + "#0000FF", + "#0033CC", + "#0033FF", + "#0066CC", + "#0066FF", + "#0099CC", + "#0099FF", + "#00CC00", + "#00CC33", + "#00CC66", + "#00CC99", + "#00CCCC", + "#00CCFF", + "#3300CC", + "#3300FF", + "#3333CC", + "#3333FF", + "#3366CC", + "#3366FF", + "#3399CC", + "#3399FF", + "#33CC00", + "#33CC33", + "#33CC66", + "#33CC99", + "#33CCCC", + "#33CCFF", + "#6600CC", + "#6600FF", + "#6633CC", + "#6633FF", + "#66CC00", + "#66CC33", + "#9900CC", + "#9900FF", + "#9933CC", + "#9933FF", + "#99CC00", + "#99CC33", + "#CC0000", + "#CC0033", + "#CC0066", + "#CC0099", + "#CC00CC", + "#CC00FF", + "#CC3300", + "#CC3333", + "#CC3366", + "#CC3399", + "#CC33CC", + "#CC33FF", + "#CC6600", + "#CC6633", + "#CC9900", + "#CC9933", + "#CCCC00", + "#CCCC33", + "#FF0000", + "#FF0033", + "#FF0066", + "#FF0099", + "#FF00CC", + "#FF00FF", + "#FF3300", + "#FF3333", + "#FF3366", + "#FF3399", + "#FF33CC", + "#FF33FF", + "#FF6600", + "#FF6633", + "#FF9900", + "#FF9933", + "#FFCC00", + "#FFCC33" + ]; + function useColors() { + if (typeof window !== "undefined" && window.process && window.process.type === "renderer") { + return true; + } + if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); + } + exports3.formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (err) { + return "[UnexpectedJSONParseError]: " + err.message; + } + }; + function formatArgs(args2) { + var useColors2 = this.useColors; + args2[0] = (useColors2 ? "%c" : "") + this.namespace + (useColors2 ? " %c" : " ") + args2[0] + (useColors2 ? "%c " : " ") + "+" + exports3.humanize(this.diff); + if (!useColors2) + return; + var c = "color: " + this.color; + args2.splice(1, 0, c, "color: inherit"); + var index = 0; + var lastC = 0; + args2[0].replace(/%[a-zA-Z%]/g, function(match) { + if (match === "%%") + return; + index++; + if (match === "%c") { + lastC = index; + } + }); + args2.splice(lastC, 0, c); + } + function log2() { + return typeof console === "object" && console.log && Function.prototype.apply.call(console.log, console, arguments); + } + function save(namespaces) { + try { + if (namespaces == null) { + exports3.storage.removeItem("debug"); + } else { + exports3.storage.debug = namespaces; + } + } catch (e) { + } + } + function load() { + var r; + try { + r = exports3.storage.debug; + } catch (e) { + } + if (!r && typeof process !== "undefined" && "env" in process) { + r = process.env.DEBUG; + } + return r; + } + exports3.enable(load()); + function localstorage() { + try { + return window.localStorage; + } catch (e) { + } + } + }, + function(module3, exports3, __webpack_require__) { + if (typeof process === "undefined" || process.type === "renderer") { + module3.exports = __webpack_require__(211); + } else { + module3.exports = __webpack_require__(213); + } + }, + function(module3, exports3, __webpack_require__) { + var tty = __webpack_require__(79); + var util = __webpack_require__(2); + exports3 = module3.exports = __webpack_require__(112); + exports3.init = init; + exports3.log = log2; + exports3.formatArgs = formatArgs; + exports3.save = save; + exports3.load = load; + exports3.useColors = useColors; + exports3.colors = [6, 2, 3, 4, 5, 1]; + try { + var supportsColor = __webpack_require__(239); + if (supportsColor && supportsColor.level >= 2) { + exports3.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } + } catch (err) { + } + exports3.inspectOpts = Object.keys(process.env).filter(function(key) { + return /^debug_/i.test(key); + }).reduce(function(obj, key) { + var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_, k) { + return k.toUpperCase(); + }); + var val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) + val = true; + else if (/^(no|off|false|disabled)$/i.test(val)) + val = false; + else if (val === "null") + val = null; + else + val = Number(val); + obj[prop] = val; + return obj; + }, {}); + function useColors() { + return "colors" in exports3.inspectOpts ? Boolean(exports3.inspectOpts.colors) : tty.isatty(process.stderr.fd); + } + exports3.formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts).split("\n").map(function(str) { + return str.trim(); + }).join(" "); + }; + exports3.formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); + }; + function formatArgs(args2) { + var name = this.namespace; + var useColors2 = this.useColors; + if (useColors2) { + var c = this.color; + var colorCode = "[3" + (c < 8 ? c : "8;5;" + c); + var prefix = " " + colorCode + ";1m" + name + " "; + args2[0] = prefix + args2[0].split("\n").join("\n" + prefix); + args2.push(colorCode + "m+" + exports3.humanize(this.diff) + ""); + } else { + args2[0] = getDate() + name + " " + args2[0]; + } + } + function getDate() { + if (exports3.inspectOpts.hideDate) { + return ""; + } else { + return new Date().toISOString() + " "; + } + } + function log2() { + return process.stderr.write(util.format.apply(util, arguments) + "\n"); + } + function save(namespaces) { + if (namespaces == null) { + delete process.env.DEBUG; + } else { + process.env.DEBUG = namespaces; + } + } + function load() { + return process.env.DEBUG; + } + function init(debug) { + debug.inspectOpts = {}; + var keys = Object.keys(exports3.inspectOpts); + for (var i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports3.inspectOpts[keys[i]]; + } + } + exports3.enable(load()); + }, + , + , + , + function(module3, exports3, __webpack_require__) { + var pathModule = __webpack_require__(0); + var isWindows = process.platform === "win32"; + var fs = __webpack_require__(3); + var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); + function rethrow() { + var callback; + if (DEBUG) { + var backtrace = new Error(); + callback = debugCallback; + } else + callback = missingCallback; + return callback; + function debugCallback(err) { + if (err) { + backtrace.message = err.message; + err = backtrace; + missingCallback(err); + } + } + function missingCallback(err) { + if (err) { + if (process.throwDeprecation) + throw err; + else if (!process.noDeprecation) { + var msg = "fs: missing callback " + (err.stack || err.message); + if (process.traceDeprecation) + console.trace(msg); + else + console.error(msg); + } + } + } + } + function maybeCallback(cb) { + return typeof cb === "function" ? cb : rethrow(); + } + var normalize = pathModule.normalize; + if (isWindows) { + var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; + } else { + var nextPartRe = /(.*?)(?:[\/]+|$)/g; + } + if (isWindows) { + var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; + } else { + var splitRootRe = /^[\/]*/; + } + exports3.realpathSync = function realpathSync(p, cache) { + p = pathModule.resolve(p); + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return cache[p]; + } + var original = p, seenLinks = {}, knownHard = {}; + var pos; + var current; + var base; + var previous; + start(); + function start() { + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ""; + if (isWindows && !knownHard[base]) { + fs.lstatSync(base); + knownHard[base] = true; + } + } + while (pos < p.length) { + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + if (knownHard[base] || cache && cache[base] === base) { + continue; + } + var resolvedLink; + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + resolvedLink = cache[base]; + } else { + var stat = fs.lstatSync(base); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) + cache[base] = base; + continue; + } + var linkTarget = null; + if (!isWindows) { + var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + linkTarget = seenLinks[id]; + } + } + if (linkTarget === null) { + fs.statSync(base); + linkTarget = fs.readlinkSync(base); + } + resolvedLink = pathModule.resolve(previous, linkTarget); + if (cache) + cache[base] = resolvedLink; + if (!isWindows) + seenLinks[id] = linkTarget; + } + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + if (cache) + cache[original] = p; + return p; + }; + exports3.realpath = function realpath(p, cache, cb) { + if (typeof cb !== "function") { + cb = maybeCallback(cache); + cache = null; + } + p = pathModule.resolve(p); + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return process.nextTick(cb.bind(null, null, cache[p])); + } + var original = p, seenLinks = {}, knownHard = {}; + var pos; + var current; + var base; + var previous; + start(); + function start() { + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ""; + if (isWindows && !knownHard[base]) { + fs.lstat(base, function(err) { + if (err) + return cb(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); + } + } + function LOOP() { + if (pos >= p.length) { + if (cache) + cache[original] = p; + return cb(null, p); + } + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + if (knownHard[base] || cache && cache[base] === base) { + return process.nextTick(LOOP); + } + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + return gotResolvedLink(cache[base]); + } + return fs.lstat(base, gotStat); + } + function gotStat(err, stat) { + if (err) + return cb(err); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) + cache[base] = base; + return process.nextTick(LOOP); + } + if (!isWindows) { + var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + return gotTarget(null, seenLinks[id], base); + } + } + fs.stat(base, function(err2) { + if (err2) + return cb(err2); + fs.readlink(base, function(err3, target) { + if (!isWindows) + seenLinks[id] = target; + gotTarget(err3, target); + }); + }); + } + function gotTarget(err, target, base2) { + if (err) + return cb(err); + var resolvedLink = pathModule.resolve(previous, target); + if (cache) + cache[base2] = resolvedLink; + gotResolvedLink(resolvedLink); + } + function gotResolvedLink(resolvedLink) { + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + }; + }, + function(module3, exports3, __webpack_require__) { + module3.exports = globSync; + globSync.GlobSync = GlobSync; + var fs = __webpack_require__(3); + var rp = __webpack_require__(114); + var minimatch = __webpack_require__(60); + var Minimatch = minimatch.Minimatch; + var Glob = __webpack_require__(75).Glob; + var util = __webpack_require__(2); + var path = __webpack_require__(0); + var assert = __webpack_require__(22); + var isAbsolute = __webpack_require__(76); + var common = __webpack_require__(115); + var alphasort = common.alphasort; + var alphasorti = common.alphasorti; + var setopts = common.setopts; + var ownProp = common.ownProp; + var childrenIgnored = common.childrenIgnored; + var isIgnored = common.isIgnored; + function globSync(pattern, options) { + if (typeof options === "function" || arguments.length === 3) + throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); + return new GlobSync(pattern, options).found; + } + function GlobSync(pattern, options) { + if (!pattern) + throw new Error("must provide pattern"); + if (typeof options === "function" || arguments.length === 3) + throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options); + setopts(this, pattern, options); + if (this.noprocess) + return this; + var n = this.minimatch.set.length; + this.matches = new Array(n); + for (var i = 0; i < n; i++) { + this._process(this.minimatch.set[i], i, false); + } + this._finish(); + } + GlobSync.prototype._finish = function() { + assert(this instanceof GlobSync); + if (this.realpath) { + var self2 = this; + this.matches.forEach(function(matchset, index) { + var set = self2.matches[index] = Object.create(null); + for (var p in matchset) { + try { + p = self2._makeAbs(p); + var real = rp.realpathSync(p, self2.realpathCache); + set[real] = true; + } catch (er) { + if (er.syscall === "stat") + set[self2._makeAbs(p)] = true; + else + throw er; + } + } + }); + } + common.finish(this); + }; + GlobSync.prototype._process = function(pattern, index, inGlobStar) { + assert(this instanceof GlobSync); + var n = 0; + while (typeof pattern[n] === "string") { + n++; + } + var prefix; + switch (n) { + case pattern.length: + this._processSimple(pattern.join("/"), index); + return; + case 0: + prefix = null; + break; + default: + prefix = pattern.slice(0, n).join("/"); + break; + } + var remain = pattern.slice(n); + var read; + if (prefix === null) + read = "."; + else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { + if (!prefix || !isAbsolute(prefix)) + prefix = "/" + prefix; + read = prefix; + } else + read = prefix; + var abs = this._makeAbs(read); + if (childrenIgnored(this, read)) + return; + var isGlobStar = remain[0] === minimatch.GLOBSTAR; + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar); + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar); + }; + GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar); + if (!entries) + return; + var pn = remain[0]; + var negate = !!this.minimatch.negate; + var rawGlob = pn._glob; + var dotOk = this.dot || rawGlob.charAt(0) === "."; + var matchedEntries = []; + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (e.charAt(0) !== "." || dotOk) { + var m; + if (negate && !prefix) { + m = !e.match(pn); + } else { + m = e.match(pn); + } + if (m) + matchedEntries.push(e); + } + } + var len = matchedEntries.length; + if (len === 0) + return; + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + if (prefix) { + if (prefix.slice(-1) !== "/") + e = prefix + "/" + e; + else + e = prefix + e; + } + if (e.charAt(0) === "/" && !this.nomount) { + e = path.join(this.root, e); + } + this._emitMatch(index, e); + } + return; + } + remain.shift(); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + var newPattern; + if (prefix) + newPattern = [prefix, e]; + else + newPattern = [e]; + this._process(newPattern.concat(remain), index, inGlobStar); + } + }; + GlobSync.prototype._emitMatch = function(index, e) { + if (isIgnored(this, e)) + return; + var abs = this._makeAbs(e); + if (this.mark) + e = this._mark(e); + if (this.absolute) { + e = abs; + } + if (this.matches[index][e]) + return; + if (this.nodir) { + var c = this.cache[abs]; + if (c === "DIR" || Array.isArray(c)) + return; + } + this.matches[index][e] = true; + if (this.stat) + this._stat(e); + }; + GlobSync.prototype._readdirInGlobStar = function(abs) { + if (this.follow) + return this._readdir(abs, false); + var entries; + var lstat; + var stat; + try { + lstat = fs.lstatSync(abs); + } catch (er) { + if (er.code === "ENOENT") { + return null; + } + } + var isSym = lstat && lstat.isSymbolicLink(); + this.symlinks[abs] = isSym; + if (!isSym && lstat && !lstat.isDirectory()) + this.cache[abs] = "FILE"; + else + entries = this._readdir(abs, false); + return entries; + }; + GlobSync.prototype._readdir = function(abs, inGlobStar) { + var entries; + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs); + if (ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (!c || c === "FILE") + return null; + if (Array.isArray(c)) + return c; + } + try { + return this._readdirEntries(abs, fs.readdirSync(abs)); + } catch (er) { + this._readdirError(abs, er); + return null; + } + }; + GlobSync.prototype._readdirEntries = function(abs, entries) { + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (abs === "/") + e = abs + e; + else + e = abs + "/" + e; + this.cache[e] = true; + } + } + this.cache[abs] = entries; + return entries; + }; + GlobSync.prototype._readdirError = function(f, er) { + switch (er.code) { + case "ENOTSUP": + case "ENOTDIR": + var abs = this._makeAbs(f); + this.cache[abs] = "FILE"; + if (abs === this.cwdAbs) { + var error = new Error(er.code + " invalid cwd " + this.cwd); + error.path = this.cwd; + error.code = er.code; + throw error; + } + break; + case "ENOENT": + case "ELOOP": + case "ENAMETOOLONG": + case "UNKNOWN": + this.cache[this._makeAbs(f)] = false; + break; + default: + this.cache[this._makeAbs(f)] = false; + if (this.strict) + throw er; + if (!this.silent) + console.error("glob error", er); + break; + } + }; + GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar); + if (!entries) + return; + var remainWithoutGlobStar = remain.slice(1); + var gspref = prefix ? [prefix] : []; + var noGlobStar = gspref.concat(remainWithoutGlobStar); + this._process(noGlobStar, index, false); + var len = entries.length; + var isSym = this.symlinks[abs]; + if (isSym && inGlobStar) + return; + for (var i = 0; i < len; i++) { + var e = entries[i]; + if (e.charAt(0) === "." && !this.dot) + continue; + var instead = gspref.concat(entries[i], remainWithoutGlobStar); + this._process(instead, index, true); + var below = gspref.concat(entries[i], remain); + this._process(below, index, true); + } + }; + GlobSync.prototype._processSimple = function(prefix, index) { + var exists = this._stat(prefix); + if (!this.matches[index]) + this.matches[index] = Object.create(null); + if (!exists) + return; + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix); + if (prefix.charAt(0) === "/") { + prefix = path.join(this.root, prefix); + } else { + prefix = path.resolve(this.root, prefix); + if (trail) + prefix += "/"; + } + } + if (process.platform === "win32") + prefix = prefix.replace(/\\/g, "/"); + this._emitMatch(index, prefix); + }; + GlobSync.prototype._stat = function(f) { + var abs = this._makeAbs(f); + var needDir = f.slice(-1) === "/"; + if (f.length > this.maxLength) + return false; + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (Array.isArray(c)) + c = "DIR"; + if (!needDir || c === "DIR") + return c; + if (needDir && c === "FILE") + return false; + } + var exists; + var stat = this.statCache[abs]; + if (!stat) { + var lstat; + try { + lstat = fs.lstatSync(abs); + } catch (er) { + if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { + this.statCache[abs] = false; + return false; + } + } + if (lstat && lstat.isSymbolicLink()) { + try { + stat = fs.statSync(abs); + } catch (er) { + stat = lstat; + } + } else { + stat = lstat; + } + } + this.statCache[abs] = stat; + var c = true; + if (stat) + c = stat.isDirectory() ? "DIR" : "FILE"; + this.cache[abs] = this.cache[abs] || c; + if (needDir && c === "FILE") + return false; + return c; + }; + GlobSync.prototype._mark = function(p) { + return common.mark(this, p); + }; + GlobSync.prototype._makeAbs = function(f) { + return common.makeAbs(this, f); + }; + }, + , + , + function(module3, exports3, __webpack_require__) { + "use strict"; + module3.exports = function(flag, argv2) { + argv2 = argv2 || process.argv; + var terminatorPos = argv2.indexOf("--"); + var prefix = /^--/.test(flag) ? "" : "--"; + var pos = argv2.indexOf(prefix + flag); + return pos !== -1 && (terminatorPos !== -1 ? pos < terminatorPos : true); + }; + }, + , + function(module3, exports3, __webpack_require__) { + var wrappy = __webpack_require__(123); + var reqs = Object.create(null); + var once = __webpack_require__(61); + module3.exports = wrappy(inflight); + function inflight(key, cb) { + if (reqs[key]) { + reqs[key].push(cb); + return null; + } else { + reqs[key] = [cb]; + return makeres(key); + } + } + function makeres(key) { + return once(function RES() { + var cbs = reqs[key]; + var len = cbs.length; + var args2 = slice(arguments); + try { + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args2); + } + } finally { + if (cbs.length > len) { + cbs.splice(0, len); + process.nextTick(function() { + RES.apply(null, args2); + }); + } else { + delete reqs[key]; + } + } + }); + } + function slice(args2) { + var length = args2.length; + var array = []; + for (var i = 0; i < length; i++) + array[i] = args2[i]; + return array; + } + }, + function(module3, exports3) { + if (typeof Object.create === "function") { + module3.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; + } else { + module3.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + var TempCtor = function() { + }; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + }; + } + }, + , + , + function(module3, exports3, __webpack_require__) { + module3.exports = typeof __webpack_require__ !== "undefined"; + }, + , + function(module3, exports3) { + var s = 1e3; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var y = d * 365.25; + module3.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === "string" && val.length > 0) { + return parse(val); + } else if (type === "number" && isNaN(val) === false) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val)); + }; + function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || "ms").toLowerCase(); + switch (type) { + case "years": + case "year": + case "yrs": + case "yr": + case "y": + return n * y; + case "days": + case "day": + case "d": + return n * d; + case "hours": + case "hour": + case "hrs": + case "hr": + case "h": + return n * h; + case "minutes": + case "minute": + case "mins": + case "min": + case "m": + return n * m; + case "seconds": + case "second": + case "secs": + case "sec": + case "s": + return n * s; + case "milliseconds": + case "millisecond": + case "msecs": + case "msec": + case "ms": + return n; + default: + return void 0; + } + } + function fmtShort(ms) { + if (ms >= d) { + return Math.round(ms / d) + "d"; + } + if (ms >= h) { + return Math.round(ms / h) + "h"; + } + if (ms >= m) { + return Math.round(ms / m) + "m"; + } + if (ms >= s) { + return Math.round(ms / s) + "s"; + } + return ms + "ms"; + } + function fmtLong(ms) { + return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms, m, "minute") || plural(ms, s, "second") || ms + " ms"; + } + function plural(ms, n, name) { + if (ms < n) { + return; + } + if (ms < n * 1.5) { + return Math.floor(ms / n) + " " + name; + } + return Math.ceil(ms / n) + " " + name + "s"; + } + }, + , + , + , + function(module3, exports3, __webpack_require__) { + module3.exports = rimraf; + rimraf.sync = rimrafSync; + var assert = __webpack_require__(22); + var path = __webpack_require__(0); + var fs = __webpack_require__(3); + var glob = __webpack_require__(75); + var _0666 = parseInt("666", 8); + var defaultGlobOpts = { + nosort: true, + silent: true + }; + var timeout = 0; + var isWindows = process.platform === "win32"; + function defaults(options) { + var methods = [ + "unlink", + "chmod", + "stat", + "lstat", + "rmdir", + "readdir" + ]; + methods.forEach(function(m) { + options[m] = options[m] || fs[m]; + m = m + "Sync"; + options[m] = options[m] || fs[m]; + }); + options.maxBusyTries = options.maxBusyTries || 3; + options.emfileWait = options.emfileWait || 1e3; + if (options.glob === false) { + options.disableGlob = true; + } + options.disableGlob = options.disableGlob || false; + options.glob = options.glob || defaultGlobOpts; + } + function rimraf(p, options, cb) { + if (typeof options === "function") { + cb = options; + options = {}; + } + assert(p, "rimraf: missing path"); + assert.equal(typeof p, "string", "rimraf: path should be a string"); + assert.equal(typeof cb, "function", "rimraf: callback function required"); + assert(options, "rimraf: invalid options argument provided"); + assert.equal(typeof options, "object", "rimraf: options should be object"); + defaults(options); + var busyTries = 0; + var errState = null; + var n = 0; + if (options.disableGlob || !glob.hasMagic(p)) + return afterGlob(null, [p]); + options.lstat(p, function(er, stat) { + if (!er) + return afterGlob(null, [p]); + glob(p, options.glob, afterGlob); + }); + function next(er) { + errState = errState || er; + if (--n === 0) + cb(errState); + } + function afterGlob(er, results) { + if (er) + return cb(er); + n = results.length; + if (n === 0) + return cb(); + results.forEach(function(p2) { + rimraf_(p2, options, function CB(er2) { + if (er2) { + if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) { + busyTries++; + var time = busyTries * 100; + return setTimeout(function() { + rimraf_(p2, options, CB); + }, time); + } + if (er2.code === "EMFILE" && timeout < options.emfileWait) { + return setTimeout(function() { + rimraf_(p2, options, CB); + }, timeout++); + } + if (er2.code === "ENOENT") + er2 = null; + } + timeout = 0; + next(er2); + }); + }); + } + } + function rimraf_(p, options, cb) { + assert(p); + assert(options); + assert(typeof cb === "function"); + options.lstat(p, function(er, st) { + if (er && er.code === "ENOENT") + return cb(null); + if (er && er.code === "EPERM" && isWindows) + fixWinEPERM(p, options, er, cb); + if (st && st.isDirectory()) + return rmdir(p, options, er, cb); + options.unlink(p, function(er2) { + if (er2) { + if (er2.code === "ENOENT") + return cb(null); + if (er2.code === "EPERM") + return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb); + if (er2.code === "EISDIR") + return rmdir(p, options, er2, cb); + } + return cb(er2); + }); + }); + } + function fixWinEPERM(p, options, er, cb) { + assert(p); + assert(options); + assert(typeof cb === "function"); + if (er) + assert(er instanceof Error); + options.chmod(p, _0666, function(er2) { + if (er2) + cb(er2.code === "ENOENT" ? null : er); + else + options.stat(p, function(er3, stats) { + if (er3) + cb(er3.code === "ENOENT" ? null : er); + else if (stats.isDirectory()) + rmdir(p, options, er, cb); + else + options.unlink(p, cb); + }); + }); + } + function fixWinEPERMSync(p, options, er) { + assert(p); + assert(options); + if (er) + assert(er instanceof Error); + try { + options.chmodSync(p, _0666); + } catch (er2) { + if (er2.code === "ENOENT") + return; + else + throw er; + } + try { + var stats = options.statSync(p); + } catch (er3) { + if (er3.code === "ENOENT") + return; + else + throw er; + } + if (stats.isDirectory()) + rmdirSync(p, options, er); + else + options.unlinkSync(p); + } + function rmdir(p, options, originalEr, cb) { + assert(p); + assert(options); + if (originalEr) + assert(originalEr instanceof Error); + assert(typeof cb === "function"); + options.rmdir(p, function(er) { + if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) + rmkids(p, options, cb); + else if (er && er.code === "ENOTDIR") + cb(originalEr); + else + cb(er); + }); + } + function rmkids(p, options, cb) { + assert(p); + assert(options); + assert(typeof cb === "function"); + options.readdir(p, function(er, files) { + if (er) + return cb(er); + var n = files.length; + if (n === 0) + return options.rmdir(p, cb); + var errState; + files.forEach(function(f) { + rimraf(path.join(p, f), options, function(er2) { + if (errState) + return; + if (er2) + return cb(errState = er2); + if (--n === 0) + options.rmdir(p, cb); + }); + }); + }); + } + function rimrafSync(p, options) { + options = options || {}; + defaults(options); + assert(p, "rimraf: missing path"); + assert.equal(typeof p, "string", "rimraf: path should be a string"); + assert(options, "rimraf: missing options"); + assert.equal(typeof options, "object", "rimraf: options should be object"); + var results; + if (options.disableGlob || !glob.hasMagic(p)) { + results = [p]; + } else { + try { + options.lstatSync(p); + results = [p]; + } catch (er) { + results = glob.sync(p, options.glob); + } + } + if (!results.length) + return; + for (var i = 0; i < results.length; i++) { + var p = results[i]; + try { + var st = options.lstatSync(p); + } catch (er) { + if (er.code === "ENOENT") + return; + if (er.code === "EPERM" && isWindows) + fixWinEPERMSync(p, options, er); + } + try { + if (st && st.isDirectory()) + rmdirSync(p, options, null); + else + options.unlinkSync(p); + } catch (er) { + if (er.code === "ENOENT") + return; + if (er.code === "EPERM") + return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er); + if (er.code !== "EISDIR") + throw er; + rmdirSync(p, options, er); + } + } + } + function rmdirSync(p, options, originalEr) { + assert(p); + assert(options); + if (originalEr) + assert(originalEr instanceof Error); + try { + options.rmdirSync(p); + } catch (er) { + if (er.code === "ENOENT") + return; + if (er.code === "ENOTDIR") + throw originalEr; + if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") + rmkidsSync(p, options); + } + } + function rmkidsSync(p, options) { + assert(p); + assert(options); + options.readdirSync(p).forEach(function(f) { + rimrafSync(path.join(p, f), options); + }); + var retries = isWindows ? 100 : 1; + var i = 0; + do { + var threw = true; + try { + var ret = options.rmdirSync(p, options); + threw = false; + return ret; + } finally { + if (++i < retries && threw) + continue; + } + } while (true); + } + }, + , + , + , + , + , + function(module3, exports3, __webpack_require__) { + "use strict"; + var hasFlag = __webpack_require__(221); + var support = function(level) { + if (level === 0) { + return false; + } + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; + }; + var supportLevel = function() { + if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) { + return 0; + } + if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { + return 3; + } + if (hasFlag("color=256")) { + return 2; + } + if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { + return 1; + } + if (process.stdout && !process.stdout.isTTY) { + return 0; + } + if (process.platform === "win32") { + return 1; + } + if ("CI" in process.env) { + if ("TRAVIS" in process.env || process.env.CI === "Travis") { + return 1; + } + return 0; + } + if ("TEAMCITY_VERSION" in process.env) { + return process.env.TEAMCITY_VERSION.match(/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/) === null ? 0 : 1; + } + if (/^(screen|xterm)-256(?:color)?/.test(process.env.TERM)) { + return 2; + } + if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { + return 1; + } + if ("COLORTERM" in process.env) { + return 1; + } + if (process.env.TERM === "dumb") { + return 0; + } + return 0; + }(); + if (supportLevel === 0 && "FORCE_COLOR" in process.env) { + supportLevel = 1; + } + module3.exports = process && support(supportLevel); + } + ]); + } +}); + +// ../plugin-commands-import/lib/import.js +var require_import = __commonJS({ + "../plugin-commands-import/lib/import.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.commandNames = exports2.help = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var constants_1 = require_lib7(); + var error_1 = __importDefault(require_lib8()); + var read_project_manifest_1 = require_lib19(); + var store_connection_manager_1 = require_lib63(); + var graceful_fs_1 = __importDefault(require_lib18()); + var supi_1 = require_lib88(); + var rimraf_1 = __importDefault(require_rimraf()); + var load_json_file_1 = __importDefault(require_load_json_file()); + var render_help_1 = __importDefault(require_lib30()); + var lockfile_1 = require_lockfile(); + var path_exists_1 = __importDefault(require_path_exists()); + exports2.rcOptionsTypes = cliOptionsTypes; + function cliOptionsTypes() { + return {}; + } + exports2.cliOptionsTypes = cliOptionsTypes; + function help() { + return render_help_1.default({ + description: `Generates ${constants_1.WANTED_LOCKFILE} from an npm package-lock.json (or npm-shrinkwrap.json, yarn.lock) file.`, + url: cli_utils_1.docsUrl("import"), + usages: [ + "pnpm import" + ] + }); + } + exports2.help = help; + exports2.commandNames = ["import"]; + async function handler(opts) { + await rimraf_1.default(path_1.default.join(opts.dir, constants_1.WANTED_LOCKFILE)); + const versionsByPackageNames = {}; + let preferredVersions = {}; + if (await path_exists_1.default(path_1.default.join(opts.dir, "yarn.lock"))) { + const yarnPackgeLockFile = await readYarnLockFile(opts.dir); + getAllVersionsFromYarnLockFile(yarnPackgeLockFile, versionsByPackageNames); + } else if (await path_exists_1.default(path_1.default.join(opts.dir, "package-lock.json")) || await path_exists_1.default(path_1.default.join(opts.dir, "npm-shrinkwrap.json"))) { + const npmPackageLock = await readNpmLockfile(opts.dir); + getAllVersionsByPackageNames(npmPackageLock, versionsByPackageNames); + } else { + throw new error_1.default("LOCKFILE_NOT_FOUND", "No lockfile found"); + } + preferredVersions = getPreferredVersions(versionsByPackageNames); + const store = await store_connection_manager_1.createOrConnectStoreController(opts); + const installOpts = { + ...opts, + lockfileOnly: true, + preferredVersions, + storeController: store.ctrl, + storeDir: store.dir + }; + await supi_1.install(await read_project_manifest_1.readProjectManifestOnly(opts.dir), installOpts); + } + exports2.handler = handler; + async function readYarnLockFile(dir) { + try { + const yarnLockFile = await graceful_fs_1.default.readFile(path_1.default.join(dir, "yarn.lock"), "utf8"); + const lockJsonFile = await lockfile_1.parse(yarnLockFile); + if (lockJsonFile.type === "success") { + return lockJsonFile.object; + } else { + throw new error_1.default("GET_YARN_LOCKFILE_ERR", `Failed With ${lockJsonFile.type}`); + } + } catch (err) { + if (err["code"] !== "ENOENT") + throw err; + } + throw new error_1.default("YARN_LOCKFILE_NOT_FOUND", "No yarn.lock found"); + } + async function readNpmLockfile(dir) { + try { + return await load_json_file_1.default(path_1.default.join(dir, "package-lock.json")); + } catch (err) { + if (err["code"] !== "ENOENT") + throw err; + } + try { + return await load_json_file_1.default(path_1.default.join(dir, "npm-shrinkwrap.json")); + } catch (err) { + if (err["code"] !== "ENOENT") + throw err; + } + throw new error_1.default("NPM_LOCKFILE_NOT_FOUND", "No package-lock.json or npm-shrinkwrap.json found"); + } + function getPreferredVersions(versionsByPackageNames) { + const preferredVersions = {}; + for (const packageName of Object.keys(versionsByPackageNames)) { + preferredVersions[packageName] = Array.from(versionsByPackageNames[packageName]).reduce((acc, version) => { + acc[version] = "version"; + return acc; + }, {}); + } + return preferredVersions; + } + function getAllVersionsByPackageNames(npmPackageLock, versionsByPackageNames) { + if (npmPackageLock.dependencies == null) + return; + for (const packageName of Object.keys(npmPackageLock.dependencies)) { + if (!versionsByPackageNames[packageName]) { + versionsByPackageNames[packageName] = new Set(); + } + versionsByPackageNames[packageName].add(npmPackageLock.dependencies[packageName].version); + } + for (const packageName of Object.keys(npmPackageLock.dependencies)) { + getAllVersionsByPackageNames(npmPackageLock.dependencies[packageName], versionsByPackageNames); + } + } + function getAllVersionsFromYarnLockFile(yarnPackageLock, versionsByPackageNames) { + for (const packageName of Object.keys(yarnPackageLock)) { + const pkgName = packageName.substring(0, packageName.lastIndexOf("@")); + if (!versionsByPackageNames[pkgName]) { + versionsByPackageNames[pkgName] = new Set(); + } + versionsByPackageNames[pkgName].add(yarnPackageLock[packageName].version); + } + } + } +}); + +// ../plugin-commands-import/lib/index.js +var require_lib89 = __commonJS({ + "../plugin-commands-import/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.importCommand = void 0; + var importCommand = __importStar2(require_import()); + exports2.importCommand = importCommand; + } +}); + +// ../common-cli-options-help/lib/index.js +var require_lib90 = __commonJS({ + "../common-cli-options-help/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.FILTERING = exports2.UNIVERSAL_OPTIONS = exports2.OPTIONS = void 0; + exports2.OPTIONS = { + globalDir: { + description: "Specify a custom directory to store global packages", + name: "--global-dir" + }, + ignoreScripts: { + description: "Don't run lifecycle scripts", + name: "--ignore-scripts" + }, + offline: { + description: "Trigger an error if any required dependencies are not available in local store", + name: "--offline" + }, + preferOffline: { + description: "Skip staleness checks for cached data, but request missing data from the server", + name: "--prefer-offline" + }, + storeDir: { + description: "The directory in which all the packages are saved on the disk", + name: "--store-dir " + }, + virtualStoreDir: { + description: "The directory with links to the store (default is node_modules/.pnpm). All direct and indirect dependencies of the project are linked into this directory", + name: "--virtual-store-dir " + } + }; + exports2.UNIVERSAL_OPTIONS = [ + { + description: "Controls colors in the output. By default, output is always colored when it goes directly to a terminal", + name: "--[no-]color" + }, + { + description: "Output usage information", + name: "--help", + shortAlias: "-h" + }, + { + description: `Change to directory (default: ${process.cwd()})`, + name: "--dir ", + shortAlias: "-C" + }, + { + description: "Run the command on the root workspace project", + name: "--workspace-root", + shortAlias: "-w" + }, + { + description: 'What level of logs to report. Any logs at or higher than the given level will be shown. Levels (lowest to highest): debug, info, warn, error. Or use "--silent" to turn off all logging.', + name: "--loglevel " + }, + { + description: "Stream output from child processes immediately, prefixed with the originating package directory. This allows output from different packages to be interleaved.", + name: "--stream" + }, + { + description: "Divert all output to stderr", + name: "--use-stderr" + } + ]; + exports2.FILTERING = { + list: [ + { + description: 'Restricts the scope to package names matching the given pattern. E.g.: foo, "@bar/*"', + name: "--filter " + }, + { + description: "Includes all direct and indirect dependencies of the matched packages. E.g.: foo...", + name: "--filter ..." + }, + { + description: "Includes only the direct and indirect dependencies of the matched packages without including the matched packages themselves. ^ must be doubled at the Windows Command Prompt. E.g.: foo^... (foo^^... in Command Prompt)", + name: "--filter ^..." + }, + { + description: 'Includes all direct and indirect dependents of the matched packages. E.g.: ...foo, "...@bar/*"', + name: "--filter ..." + }, + { + description: "Includes only the direct and indirect dependents of the matched packages without including the matched packages themselves. ^ must be doubled at the Windows Command Prompt. E.g.: ...^foo (...^^foo in Command Prompt)", + name: "--filter ...^" + }, + { + description: "Includes all packages that are inside a given subdirectory. E.g.: ./components", + name: "--filter ./" + }, + { + description: "Includes all packages that are under the current working directory", + name: "--filter ." + }, + { + description: 'Includes all projects that are under the specified directory. It may be used with "..." to select dependents/dependencies as well. It also may be combined with "[]". For instance, all changed projects inside a directory: "{packages}[origin/master]"', + name: "--filter {}" + }, + { + description: 'Includes all packages changed since the specified commit/branch. E.g.: "[master]", "[HEAD~2]". It may be used together with "...". So, for instance, "...[HEAD~1]" selects all packages changed in the last commit and their dependents', + name: '--filter "[]"' + }, + { + description: 'If a selector starts with ! (or \\! in zsh), it means the packages matching the selector must be excluded. E.g., "pnpm --filter !foo" selects all packages except "foo"', + name: "--filter !" + }, + { + description: 'Defines files related to tests. Useful with the changed since filter. When selecting only changed packages and their dependent packages, the dependent packages will be ignored in case a package has changes only in tests. Usage example: pnpm --filter="...[origin/master]" --test-pattern="test/*" test', + name: "--test-pattern " + }, + { + description: 'Defines files to ignore when filtering for changed projects since the specified commit/branch. Usage example: pnpm --filter="...[origin/master]" --changed-files-ignore-pattern="**/README.md" build', + name: "--changed-files-ignore-pattern " + }, + { + description: "Restricts the scope to package names matching the given pattern similar to --filter, but it ignores devDependencies when searching for dependencies and dependents.", + name: "--filter-prod " + } + ], + title: "Filtering options (run the command only on packages that satisfy at least one of the selectors)" + }; + } +}); + +// ../plugin-commands-rebuild/lib/implementation/extendRebuildOptions.js +var require_extendRebuildOptions = __commonJS({ + "../plugin-commands-rebuild/lib/implementation/extendRebuildOptions.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var normalize_registries_1 = __importStar2(require_lib65()); + var load_json_file_1 = __importDefault(require_load_json_file()); + var defaults = async (opts) => { + var _a, _b, _c; + const packageManager = (_a = opts.packageManager) !== null && _a !== void 0 ? _a : await load_json_file_1.default(path_1.default.join(__dirname, "../../package.json")); + const dir = (_b = opts.dir) !== null && _b !== void 0 ? _b : process.cwd(); + const lockfileDir = (_c = opts.lockfileDir) !== null && _c !== void 0 ? _c : dir; + return { + childConcurrency: 5, + development: true, + dir, + force: false, + forceSharedLockfile: false, + lockfileDir, + optional: true, + packageManager, + pending: false, + production: true, + rawConfig: {}, + registries: normalize_registries_1.DEFAULT_REGISTRIES, + shamefullyHoist: false, + shellEmulator: false, + sideEffectsCacheRead: false, + storeDir: opts.storeDir, + unsafePerm: process.platform === "win32" || process.platform === "cygwin" || !process.setgid || process.getuid() !== 0, + useLockfile: true, + userAgent: `${packageManager.name}/${packageManager.version} npm/? node/${process.version} ${process.platform} ${process.arch}` + }; + }; + exports2.default = async (opts) => { + if (opts) { + for (const key in opts) { + if (opts[key] === void 0) { + delete opts[key]; + } + } + } + const defaultOpts = await defaults(opts); + const extendedOpts = { ...defaultOpts, ...opts, storeDir: defaultOpts.storeDir }; + extendedOpts.registries = normalize_registries_1.default(extendedOpts.registries); + return extendedOpts; + }; + } +}); + +// ../plugin-commands-rebuild/lib/implementation/index.js +var require_implementation4 = __commonJS({ + "../plugin-commands-rebuild/lib/implementation/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rebuild = exports2.rebuildPkgs = void 0; + var path_1 = __importDefault(require("path")); + var constants_1 = require_lib7(); + var core_loggers_1 = require_lib12(); + var get_context_1 = __importDefault(require_lib67()); + var lifecycle_1 = require_lib80(); + var link_bins_1 = __importDefault(require_lib70()); + var lockfile_utils_1 = require_lib53(); + var lockfile_walker_1 = __importDefault(require_lib54()); + var logger_1 = __importStar2(require_lib6()); + var modules_yaml_1 = require_lib64(); + var dp = __importStar2(require_lib33()); + var run_groups_1 = __importDefault(require_lib79()); + var npm_package_arg_1 = __importDefault(require_npa()); + var graph_sequencer_1 = __importDefault(require_graph_sequencer()); + var p_limit_1 = __importDefault(require_p_limit()); + var semver_1 = __importDefault(require_semver2()); + var extendRebuildOptions_1 = __importDefault(require_extendRebuildOptions()); + function findPackages(packages, searched, opts) { + return Object.keys(packages).filter((relativeDepPath) => { + const pkgLockfile = packages[relativeDepPath]; + const pkgInfo = lockfile_utils_1.nameVerFromPkgSnapshot(relativeDepPath, pkgLockfile); + if (!pkgInfo.name) { + logger_1.default.warn({ + message: `Skipping ${relativeDepPath} because cannot get the package name from ${constants_1.WANTED_LOCKFILE}. + Try to run run \`pnpm update --depth 100\` to create a new ${constants_1.WANTED_LOCKFILE} with all the necessary info.`, + prefix: opts.prefix + }); + return false; + } + return matches(searched, pkgInfo); + }); + } + function matches(searched, manifest) { + return searched.some((searchedPkg) => { + if (typeof searchedPkg === "string") { + return manifest.name === searchedPkg; + } + return searchedPkg.name === manifest.name && !!manifest.version && semver_1.default.satisfies(manifest.version, searchedPkg.range); + }); + } + async function rebuildPkgs(projects, pkgSpecs, maybeOpts) { + const reporter = maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.reporter; + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.on("data", reporter); + } + const opts = await extendRebuildOptions_1.default(maybeOpts); + const ctx = await get_context_1.default(projects, opts); + if (!ctx.currentLockfile || ctx.currentLockfile.packages == null) + return; + const packages = ctx.currentLockfile.packages; + const searched = pkgSpecs.map((arg) => { + const { fetchSpec, name, raw, type } = npm_package_arg_1.default(arg); + if (raw === name) { + return name; + } + if (type !== "version" && type !== "range") { + throw new Error(`Invalid argument - ${arg}. Rebuild can only select by version or range`); + } + return { + name, + range: fetchSpec + }; + }); + let pkgs = []; + for (const { rootDir } of projects) { + pkgs = [ + ...pkgs, + ...findPackages(packages, searched, { prefix: rootDir }) + ]; + } + await _rebuild({ + pkgsToRebuild: new Set(pkgs), + ...ctx + }, opts); + } + exports2.rebuildPkgs = rebuildPkgs; + async function rebuild(projects, maybeOpts) { + var _a; + const reporter = maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.reporter; + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.on("data", reporter); + } + const opts = await extendRebuildOptions_1.default(maybeOpts); + const ctx = await get_context_1.default(projects, opts); + let idsToRebuild = []; + if (opts.pending) { + idsToRebuild = ctx.pendingBuilds; + } else if (((_a = ctx.currentLockfile) === null || _a === void 0 ? void 0 : _a.packages) != null) { + idsToRebuild = Object.keys(ctx.currentLockfile.packages); + } + const pkgsThatWereRebuilt = await _rebuild({ + pkgsToRebuild: new Set(idsToRebuild), + ...ctx + }, opts); + ctx.pendingBuilds = ctx.pendingBuilds.filter((depPath) => !pkgsThatWereRebuilt.has(depPath)); + const scriptsOpts = { + extraBinPaths: ctx.extraBinPaths, + rawConfig: opts.rawConfig, + scriptShell: opts.scriptShell, + shellEmulator: opts.shellEmulator, + unsafePerm: opts.unsafePerm || false + }; + await lifecycle_1.runLifecycleHooksConcurrently(["preinstall", "install", "postinstall", "prepublish", "prepare"], ctx.projects, opts.childConcurrency || 5, scriptsOpts); + for (const { id, manifest } of ctx.projects) { + if ((manifest === null || manifest === void 0 ? void 0 : manifest.scripts) != null && (!opts.pending || ctx.pendingBuilds.includes(id))) { + ctx.pendingBuilds.splice(ctx.pendingBuilds.indexOf(id), 1); + } + } + await modules_yaml_1.write(ctx.rootModulesDir, { + prunedAt: new Date().toUTCString(), + ...ctx.modulesFile, + hoistedDependencies: ctx.hoistedDependencies, + hoistPattern: ctx.hoistPattern, + included: ctx.include, + layoutVersion: constants_1.LAYOUT_VERSION, + packageManager: `${opts.packageManager.name}@${opts.packageManager.version}`, + pendingBuilds: ctx.pendingBuilds, + publicHoistPattern: ctx.publicHoistPattern, + registries: ctx.registries, + skipped: Array.from(ctx.skipped), + storeDir: ctx.storeDir, + virtualStoreDir: ctx.virtualStoreDir + }); + } + exports2.rebuild = rebuild; + function getSubgraphToBuild(step, nodesToBuildAndTransitive, opts) { + let currentShouldBeBuilt = false; + for (const { depPath, next } of step.dependencies) { + if (nodesToBuildAndTransitive.has(depPath)) { + currentShouldBeBuilt = true; + } + const childShouldBeBuilt = getSubgraphToBuild(next(), nodesToBuildAndTransitive, opts) || opts.pkgsToRebuild.has(depPath); + if (childShouldBeBuilt) { + nodesToBuildAndTransitive.add(depPath); + currentShouldBeBuilt = true; + } + } + for (const depPath of step.missing) { + logger_1.default.debug({ message: `No entry for "${depPath}" in ${constants_1.WANTED_LOCKFILE}` }); + } + return currentShouldBeBuilt; + } + var limitLinking = p_limit_1.default(16); + async function _rebuild(ctx, opts) { + var _a; + const pkgsThatWereRebuilt = new Set(); + const graph = new Map(); + const pkgSnapshots = (_a = ctx.currentLockfile.packages) !== null && _a !== void 0 ? _a : {}; + const nodesToBuildAndTransitive = new Set(); + getSubgraphToBuild(lockfile_walker_1.default(ctx.currentLockfile, ctx.projects.map(({ id }) => id), { + include: { + dependencies: opts.production, + devDependencies: opts.development, + optionalDependencies: opts.optional + } + }).step, nodesToBuildAndTransitive, { pkgsToRebuild: ctx.pkgsToRebuild }); + const nodesToBuildAndTransitiveArray = Array.from(nodesToBuildAndTransitive); + for (const depPath of nodesToBuildAndTransitiveArray) { + const pkgSnapshot = pkgSnapshots[depPath]; + graph.set(depPath, Object.entries({ ...pkgSnapshot.dependencies, ...pkgSnapshot.optionalDependencies }).map(([pkgName, reference]) => dp.refToRelative(reference, pkgName)).filter((childRelDepPath) => childRelDepPath && nodesToBuildAndTransitive.has(childRelDepPath))); + } + const graphSequencerResult = graph_sequencer_1.default({ + graph, + groups: [nodesToBuildAndTransitiveArray] + }); + const chunks = graphSequencerResult.chunks; + const warn = (message2) => logger_1.default.info({ message: message2, prefix: opts.dir }); + const groups = chunks.map((chunk) => chunk.filter((depPath) => ctx.pkgsToRebuild.has(depPath)).map((depPath) => async () => { + var _a2; + const pkgSnapshot = pkgSnapshots[depPath]; + const pkgInfo = lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot); + const pkgRoot = path_1.default.join(ctx.virtualStoreDir, dp.depPathToFilename(depPath, opts.lockfileDir), "node_modules", pkgInfo.name); + try { + const modules = path_1.default.join(ctx.virtualStoreDir, dp.depPathToFilename(depPath, opts.lockfileDir), "node_modules"); + const binPath = path_1.default.join(pkgRoot, "node_modules", ".bin"); + await link_bins_1.default(modules, binPath, { warn }); + await lifecycle_1.runPostinstallHooks({ + depPath, + extraBinPaths: ctx.extraBinPaths, + optional: pkgSnapshot.optional === true, + pkgRoot, + rawConfig: opts.rawConfig, + rootModulesDir: ctx.rootModulesDir, + shellEmulator: opts.shellEmulator, + unsafePerm: opts.unsafePerm || false + }); + pkgsThatWereRebuilt.add(depPath); + } catch (err) { + if (pkgSnapshot.optional) { + core_loggers_1.skippedOptionalDependencyLogger.debug({ + details: err.toString(), + package: { + id: (_a2 = pkgSnapshot.id) !== null && _a2 !== void 0 ? _a2 : depPath, + name: pkgInfo.name, + version: pkgInfo.version + }, + prefix: opts.dir, + reason: "build_failure" + }); + return; + } + throw err; + } + })); + await run_groups_1.default(opts.childConcurrency || 5, groups); + await Promise.all(Object.keys(pkgSnapshots).filter((depPath) => !lockfile_utils_1.packageIsIndependent(pkgSnapshots[depPath])).map(async (depPath) => limitLinking(async () => { + const pkgSnapshot = pkgSnapshots[depPath]; + const pkgInfo = lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot); + const modules = path_1.default.join(ctx.virtualStoreDir, dp.depPathToFilename(depPath, opts.lockfileDir), "node_modules"); + const binPath = path_1.default.join(modules, pkgInfo.name, "node_modules", ".bin"); + return link_bins_1.default(modules, binPath, { warn }); + }))); + await Promise.all(ctx.projects.map(async ({ rootDir }) => limitLinking(async () => { + const modules = path_1.default.join(rootDir, "node_modules"); + const binPath = path_1.default.join(modules, ".bin"); + return link_bins_1.default(modules, binPath, { + allowExoticManifests: true, + warn + }); + }))); + return pkgsThatWereRebuilt; + } + } +}); + +// ../pnpmfile/lib/requirePnpmfile.js +var require_requirePnpmfile = __commonJS({ + "../pnpmfile/lib/requirePnpmfile.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BadReadPackageHookError = void 0; + var fs_1 = __importDefault(require("fs")); + var error_1 = __importDefault(require_lib8()); + var logger_1 = __importDefault(require_lib6()); + var chalk_1 = __importDefault(require_source()); + var BadReadPackageHookError = class extends error_1.default { + constructor(pnpmfile, message2) { + super("BAD_READ_PACKAGE_HOOK_RESULT", `${message2} Hook imported via ${pnpmfile}`); + this.pnpmfile = pnpmfile; + } + }; + exports2.BadReadPackageHookError = BadReadPackageHookError; + var PnpmFileFailError = class extends error_1.default { + constructor(pnpmfile, originalError) { + super("PNPMFILE_FAIL", `Error during pnpmfile execution. pnpmfile: "${pnpmfile}". Error: "${originalError.message}".`); + this.pnpmfile = pnpmfile; + this.originalError = originalError; + } + }; + exports2.default = (pnpmFilePath, prefix) => { + var _a, _b; + try { + const pnpmfile = require(pnpmFilePath); + logger_1.default.info({ + message: `Using hooks from: ${pnpmFilePath}`, + prefix + }); + if (typeof pnpmfile === "undefined") { + logger_1.default.warn({ + message: `Ignoring the pnpmfile at "${pnpmFilePath}". It exports "undefined".`, + prefix + }); + return void 0; + } + if (((_a = pnpmfile === null || pnpmfile === void 0 ? void 0 : pnpmfile.hooks) === null || _a === void 0 ? void 0 : _a.readPackage) && typeof pnpmfile.hooks.readPackage !== "function") { + throw new TypeError("hooks.readPackage should be a function"); + } + if ((_b = pnpmfile === null || pnpmfile === void 0 ? void 0 : pnpmfile.hooks) === null || _b === void 0 ? void 0 : _b.readPackage) { + const readPackage = pnpmfile.hooks.readPackage; + pnpmfile.hooks.readPackage = function(pkg, ...args2) { + var _a2, _b2, _c, _d; + pkg.dependencies = (_a2 = pkg.dependencies) !== null && _a2 !== void 0 ? _a2 : {}; + pkg.devDependencies = (_b2 = pkg.devDependencies) !== null && _b2 !== void 0 ? _b2 : {}; + pkg.optionalDependencies = (_c = pkg.optionalDependencies) !== null && _c !== void 0 ? _c : {}; + pkg.peerDependencies = (_d = pkg.peerDependencies) !== null && _d !== void 0 ? _d : {}; + const newPkg = readPackage(pkg, ...args2); + if (!newPkg) { + throw new BadReadPackageHookError(pnpmFilePath, "readPackage hook did not return a package manifest object."); + } + const dependencies = ["dependencies", "optionalDependencies", "peerDependencies"]; + for (const dep of dependencies) { + if (newPkg[dep] && typeof newPkg[dep] !== "object") { + throw new BadReadPackageHookError(pnpmFilePath, `readPackage hook returned package manifest object's property '${dep}' must be an object.`); + } + } + return newPkg; + }; + } + pnpmfile.filename = pnpmFilePath; + return pnpmfile; + } catch (err) { + if (err instanceof SyntaxError) { + console.error(chalk_1.default.red("A syntax error in the .pnpmfile.cjs\n")); + console.error(err); + process.exit(1); + } + if (err.code !== "MODULE_NOT_FOUND" || pnpmFileExistsSync(pnpmFilePath)) { + throw new PnpmFileFailError(pnpmFilePath, err); + } + return void 0; + } + }; + function pnpmFileExistsSync(pnpmFilePath) { + const pnpmFileRealName = pnpmFilePath.endsWith(".cjs") ? pnpmFilePath : `${pnpmFilePath}.cjs`; + return fs_1.default.existsSync(pnpmFileRealName); + } + } +}); + +// ../pnpmfile/lib/requireHooks.js +var require_requireHooks = __commonJS({ + "../pnpmfile/lib/requireHooks.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var core_loggers_1 = require_lib12(); + var logger_1 = __importDefault(require_lib6()); + var path_absolute_1 = __importDefault(require_path_absolute()); + var requirePnpmfile_1 = __importDefault(require_requirePnpmfile()); + function requireHooks(prefix, opts) { + const globalPnpmfile = opts.globalPnpmfile && requirePnpmfile_1.default(path_absolute_1.default(opts.globalPnpmfile, prefix), prefix); + let globalHooks = globalPnpmfile === null || globalPnpmfile === void 0 ? void 0 : globalPnpmfile.hooks; + const pnpmFile = opts.pnpmfile && requirePnpmfile_1.default(path_absolute_1.default(opts.pnpmfile, prefix), prefix) || requirePnpmfile_1.default(path_1.default.join(prefix, ".pnpmfile.cjs"), prefix); + let hooks = pnpmFile === null || pnpmFile === void 0 ? void 0 : pnpmFile.hooks; + if (!globalHooks && !hooks) + return {}; + globalHooks = globalHooks || {}; + hooks = hooks || {}; + const cookedHooks = {}; + if (globalHooks.readPackage || hooks.readPackage) { + logger_1.default.info({ + message: "readPackage hook is declared. Manifests of dependencies might get overridden", + prefix + }); + } + for (const hookName of ["readPackage", "afterAllResolved"]) { + if (globalHooks[hookName] && hooks[hookName]) { + const globalHookContext = createReadPackageHookContext(globalPnpmfile.filename, prefix, hookName); + const localHookContext = createReadPackageHookContext(pnpmFile.filename, prefix, hookName); + cookedHooks[hookName] = (arg) => { + return hooks[hookName](globalHooks[hookName](arg, globalHookContext), localHookContext); + }; + } else if (globalHooks[hookName]) { + const globalHook = globalHooks[hookName]; + const context = createReadPackageHookContext(globalPnpmfile.filename, prefix, hookName); + cookedHooks[hookName] = (pkg) => globalHook(pkg, context); + } else if (hooks[hookName]) { + const hook = hooks[hookName]; + const context = createReadPackageHookContext(pnpmFile.filename, prefix, hookName); + cookedHooks[hookName] = (pkg) => hook(pkg, context); + } + } + return cookedHooks; + } + exports2.default = requireHooks; + function createReadPackageHookContext(calledFrom, prefix, hook) { + return { + log: (message2) => core_loggers_1.hookLogger.debug({ + from: calledFrom, + hook, + message: message2, + prefix + }) + }; + } + } +}); + +// ../pnpmfile/lib/index.js +var require_lib91 = __commonJS({ + "../pnpmfile/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BadReadPackageHookError = exports2.requirePnpmfile = exports2.requireHooks = void 0; + var requireHooks_1 = __importDefault(require_requireHooks()); + exports2.requireHooks = requireHooks_1.default; + var requirePnpmfile_1 = __importStar2(require_requirePnpmfile()); + exports2.requirePnpmfile = requirePnpmfile_1.default; + Object.defineProperty(exports2, "BadReadPackageHookError", { enumerable: true, get: function() { + return requirePnpmfile_1.BadReadPackageHookError; + } }); + } +}); + +// ../sort-packages/lib/index.js +var require_lib92 = __commonJS({ + "../sort-packages/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sequenceGraph = void 0; + var graph_sequencer_1 = __importDefault(require_graph_sequencer()); + function sequenceGraph(pkgGraph) { + const keys = Object.keys(pkgGraph); + const setOfKeys = new Set(keys); + const graph = new Map(keys.map((pkgPath) => [ + pkgPath, + pkgGraph[pkgPath].dependencies.filter((d) => d !== pkgPath && setOfKeys.has(d)) + ])); + return graph_sequencer_1.default({ + graph, + groups: [keys] + }); + } + exports2.sequenceGraph = sequenceGraph; + function sortPackages(pkgGraph) { + const graphSequencerResult = sequenceGraph(pkgGraph); + return graphSequencerResult.chunks; + } + exports2.default = sortPackages; + } +}); + +// ../plugin-commands-installation/lib/getPinnedVersion.js +var require_getPinnedVersion = __commonJS({ + "../plugin-commands-installation/lib/getPinnedVersion.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function getPinnedVersion(opts) { + if (opts.saveExact === true || opts.savePrefix === "") + return "patch"; + return opts.savePrefix === "~" ? "minor" : "major"; + } + exports2.default = getPinnedVersion; + } +}); + +// ../plugin-commands-installation/lib/getSaveType.js +var require_getSaveType = __commonJS({ + "../plugin-commands-installation/lib/getSaveType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function getSaveType(opts) { + if (opts.saveDev === true || opts.savePeer) + return "devDependencies"; + if (opts.saveOptional) + return "optionalDependencies"; + if (opts.saveProd) + return "dependencies"; + return void 0; + } + exports2.default = getSaveType; + } +}); + +// ../../node_modules/.pnpm/map-obj@4.3.0/node_modules/map-obj/index.js +var require_map_obj = __commonJS({ + "../../node_modules/.pnpm/map-obj@4.3.0/node_modules/map-obj/index.js"(exports2, module2) { + "use strict"; + var isObject = (value) => typeof value === "object" && value !== null; + var mapObjectSkip = Symbol("skip"); + var isObjectCustom = (value) => isObject(value) && !(value instanceof RegExp) && !(value instanceof Error) && !(value instanceof Date); + var mapObject = (object, mapper, options, isSeen = new WeakMap()) => { + options = { + deep: false, + target: {}, + ...options + }; + if (isSeen.has(object)) { + return isSeen.get(object); + } + isSeen.set(object, options.target); + const { target } = options; + delete options.target; + const mapArray = (array) => array.map((element) => isObjectCustom(element) ? mapObject(element, mapper, options, isSeen) : element); + if (Array.isArray(object)) { + return mapArray(object); + } + for (const [key, value] of Object.entries(object)) { + const mapResult = mapper(key, value, object); + if (mapResult === mapObjectSkip) { + continue; + } + let [newKey, newValue, { shouldRecurse = true } = {}] = mapResult; + if (newKey === "__proto__") { + continue; + } + if (options.deep && shouldRecurse && isObjectCustom(newValue)) { + newValue = Array.isArray(newValue) ? mapArray(newValue) : mapObject(newValue, mapper, options, isSeen); + } + target[newKey] = newValue; + } + return target; + }; + module2.exports = (object, mapper, options) => { + if (!isObject(object)) { + throw new TypeError(`Expected an object, got \`${object}\` (${typeof object})`); + } + return mapObject(object, mapper, options); + }; + module2.exports.mapObjectSkip = mapObjectSkip; + } +}); + +// ../../node_modules/.pnpm/camelcase@5.3.1/node_modules/camelcase/index.js +var require_camelcase2 = __commonJS({ + "../../node_modules/.pnpm/camelcase@5.3.1/node_modules/camelcase/index.js"(exports2, module2) { + "use strict"; + var preserveCamelCase = (string) => { + let isLastCharLower = false; + let isLastCharUpper = false; + let isLastLastCharUpper = false; + for (let i = 0; i < string.length; i++) { + const character = string[i]; + if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) { + string = string.slice(0, i) + "-" + string.slice(i); + isLastCharLower = false; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = true; + i++; + } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) { + string = string.slice(0, i - 1) + "-" + string.slice(i - 1); + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = false; + isLastCharLower = true; + } else { + isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character; + } + } + return string; + }; + var camelCase = (input, options) => { + if (!(typeof input === "string" || Array.isArray(input))) { + throw new TypeError("Expected the input to be `string | string[]`"); + } + options = Object.assign({ + pascalCase: false + }, options); + const postProcess = (x) => options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x; + if (Array.isArray(input)) { + input = input.map((x) => x.trim()).filter((x) => x.length).join("-"); + } else { + input = input.trim(); + } + if (input.length === 0) { + return ""; + } + if (input.length === 1) { + return options.pascalCase ? input.toUpperCase() : input.toLowerCase(); + } + const hasUpperCase = input !== input.toLowerCase(); + if (hasUpperCase) { + input = preserveCamelCase(input); + } + input = input.replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+(\w|$)/g, (_, p1) => p1.toUpperCase()).replace(/\d+(\w|$)/g, (m) => m.toUpperCase()); + return postProcess(input); + }; + module2.exports = camelCase; + module2.exports.default = camelCase; + } +}); + +// ../../node_modules/.pnpm/quick-lru@4.0.1/node_modules/quick-lru/index.js +var require_quick_lru = __commonJS({ + "../../node_modules/.pnpm/quick-lru@4.0.1/node_modules/quick-lru/index.js"(exports2, module2) { + "use strict"; + var QuickLRU = class { + constructor(options = {}) { + if (!(options.maxSize && options.maxSize > 0)) { + throw new TypeError("`maxSize` must be a number greater than 0"); + } + this.maxSize = options.maxSize; + this.cache = new Map(); + this.oldCache = new Map(); + this._size = 0; + } + _set(key, value) { + this.cache.set(key, value); + this._size++; + if (this._size >= this.maxSize) { + this._size = 0; + this.oldCache = this.cache; + this.cache = new Map(); + } + } + get(key) { + if (this.cache.has(key)) { + return this.cache.get(key); + } + if (this.oldCache.has(key)) { + const value = this.oldCache.get(key); + this.oldCache.delete(key); + this._set(key, value); + return value; + } + } + set(key, value) { + if (this.cache.has(key)) { + this.cache.set(key, value); + } else { + this._set(key, value); + } + return this; + } + has(key) { + return this.cache.has(key) || this.oldCache.has(key); + } + peek(key) { + if (this.cache.has(key)) { + return this.cache.get(key); + } + if (this.oldCache.has(key)) { + return this.oldCache.get(key); + } + } + delete(key) { + const deleted = this.cache.delete(key); + if (deleted) { + this._size--; + } + return this.oldCache.delete(key) || deleted; + } + clear() { + this.cache.clear(); + this.oldCache.clear(); + this._size = 0; + } + *keys() { + for (const [key] of this) { + yield key; + } + } + *values() { + for (const [, value] of this) { + yield value; + } + } + *[Symbol.iterator]() { + for (const item of this.cache) { + yield item; + } + for (const item of this.oldCache) { + const [key] = item; + if (!this.cache.has(key)) { + yield item; + } + } + } + get size() { + let oldCacheSize = 0; + for (const key of this.oldCache.keys()) { + if (!this.cache.has(key)) { + oldCacheSize++; + } + } + return this._size + oldCacheSize; + } + }; + module2.exports = QuickLRU; + } +}); + +// ../../node_modules/.pnpm/camelcase-keys@6.2.2/node_modules/camelcase-keys/index.js +var require_camelcase_keys = __commonJS({ + "../../node_modules/.pnpm/camelcase-keys@6.2.2/node_modules/camelcase-keys/index.js"(exports2, module2) { + "use strict"; + var mapObj = require_map_obj(); + var camelCase = require_camelcase2(); + var QuickLru = require_quick_lru(); + var has = (array, key) => array.some((x) => { + if (typeof x === "string") { + return x === key; + } + x.lastIndex = 0; + return x.test(key); + }); + var cache = new QuickLru({ maxSize: 1e5 }); + var isObject = (value) => typeof value === "object" && value !== null && !(value instanceof RegExp) && !(value instanceof Error) && !(value instanceof Date); + var camelCaseConvert = (input, options) => { + if (!isObject(input)) { + return input; + } + options = { + deep: false, + pascalCase: false, + ...options + }; + const { exclude, pascalCase, stopPaths, deep } = options; + const stopPathsSet = new Set(stopPaths); + const makeMapper = (parentPath) => (key, value) => { + if (deep && isObject(value)) { + const path = parentPath === void 0 ? key : `${parentPath}.${key}`; + if (!stopPathsSet.has(path)) { + value = mapObj(value, makeMapper(path)); + } + } + if (!(exclude && has(exclude, key))) { + const cacheKey = pascalCase ? `${key}_` : key; + if (cache.has(cacheKey)) { + key = cache.get(cacheKey); + } else { + const ret = camelCase(key, { pascalCase }); + if (key.length < 100) { + cache.set(cacheKey, ret); + } + key = ret; + } + } + return [key, value]; + }; + return mapObj(input, makeMapper(void 0)); + }; + module2.exports = (input, options) => { + if (Array.isArray(input)) { + return Object.keys(input).map((key) => camelCaseConvert(input[key], options)); + } + return camelCaseConvert(input, options); + }; + } +}); + +// ../../node_modules/.pnpm/ini@2.0.0/node_modules/ini/ini.js +var require_ini2 = __commonJS({ + "../../node_modules/.pnpm/ini@2.0.0/node_modules/ini/ini.js"(exports2, module2) { + var { hasOwnProperty } = Object.prototype; + var eol = typeof process !== "undefined" && process.platform === "win32" ? "\r\n" : "\n"; + var encode = (obj, opt) => { + const children = []; + let out = ""; + if (typeof opt === "string") { + opt = { + section: opt, + whitespace: false + }; + } else { + opt = opt || Object.create(null); + opt.whitespace = opt.whitespace === true; + } + const separator = opt.whitespace ? " = " : "="; + for (const k of Object.keys(obj)) { + const val = obj[k]; + if (val && Array.isArray(val)) { + for (const item of val) + out += safe(k + "[]") + separator + safe(item) + "\n"; + } else if (val && typeof val === "object") + children.push(k); + else + out += safe(k) + separator + safe(val) + eol; + } + if (opt.section && out.length) + out = "[" + safe(opt.section) + "]" + eol + out; + for (const k of children) { + const nk = dotSplit(k).join("\\."); + const section = (opt.section ? opt.section + "." : "") + nk; + const { whitespace } = opt; + const child = encode(obj[k], { + section, + whitespace + }); + if (out.length && child.length) + out += eol; + out += child; + } + return out; + }; + var dotSplit = (str) => str.replace(/\1/g, "LITERAL\\1LITERAL").replace(/\\\./g, "").split(/\./).map((part) => part.replace(/\1/g, "\\.").replace(/\2LITERAL\\1LITERAL\2/g, "")); + var decode = (str) => { + const out = Object.create(null); + let p = out; + let section = null; + const re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i; + const lines = str.split(/[\r\n]+/g); + for (const line of lines) { + if (!line || line.match(/^\s*[;#]/)) + continue; + const match = line.match(re); + if (!match) + continue; + if (match[1] !== void 0) { + section = unsafe(match[1]); + if (section === "__proto__") { + p = Object.create(null); + continue; + } + p = out[section] = out[section] || Object.create(null); + continue; + } + const keyRaw = unsafe(match[2]); + const isArray = keyRaw.length > 2 && keyRaw.slice(-2) === "[]"; + const key = isArray ? keyRaw.slice(0, -2) : keyRaw; + if (key === "__proto__") + continue; + const valueRaw = match[3] ? unsafe(match[4]) : true; + const value = valueRaw === "true" || valueRaw === "false" || valueRaw === "null" ? JSON.parse(valueRaw) : valueRaw; + if (isArray) { + if (!hasOwnProperty.call(p, key)) + p[key] = []; + else if (!Array.isArray(p[key])) + p[key] = [p[key]]; + } + if (Array.isArray(p[key])) + p[key].push(value); + else + p[key] = value; + } + const remove = []; + for (const k of Object.keys(out)) { + if (!hasOwnProperty.call(out, k) || typeof out[k] !== "object" || Array.isArray(out[k])) + continue; + const parts = dotSplit(k); + let p2 = out; + const l = parts.pop(); + const nl = l.replace(/\\\./g, "."); + for (const part of parts) { + if (part === "__proto__") + continue; + if (!hasOwnProperty.call(p2, part) || typeof p2[part] !== "object") + p2[part] = Object.create(null); + p2 = p2[part]; + } + if (p2 === out && nl === l) + continue; + p2[nl] = out[k]; + remove.push(k); + } + for (const del of remove) + delete out[del]; + return out; + }; + var isQuoted = (val) => val.charAt(0) === '"' && val.slice(-1) === '"' || val.charAt(0) === "'" && val.slice(-1) === "'"; + var safe = (val) => typeof val !== "string" || val.match(/[=\r\n]/) || val.match(/^\[/) || val.length > 1 && isQuoted(val) || val !== val.trim() ? JSON.stringify(val) : val.replace(/;/g, "\\;").replace(/#/g, "\\#"); + var unsafe = (val, doUnesc) => { + val = (val || "").trim(); + if (isQuoted(val)) { + if (val.charAt(0) === "'") + val = val.substr(1, val.length - 2); + try { + val = JSON.parse(val); + } catch (_) { + } + } else { + let esc = false; + let unesc = ""; + for (let i = 0, l = val.length; i < l; i++) { + const c = val.charAt(i); + if (esc) { + if ("\\;#".indexOf(c) !== -1) + unesc += c; + else + unesc += "\\" + c; + esc = false; + } else if (";#".indexOf(c) !== -1) + break; + else if (c === "\\") + esc = true; + else + unesc += c; + } + if (esc) + unesc += "\\"; + return unesc.trim(); + } + return val; + }; + module2.exports = { + parse: decode, + decode, + stringify: encode, + encode, + safe, + unsafe + }; + } +}); + +// ../../node_modules/.pnpm/read-ini-file@3.1.0/node_modules/read-ini-file/index.js +var require_read_ini_file = __commonJS({ + "../../node_modules/.pnpm/read-ini-file@3.1.0/node_modules/read-ini-file/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var stripBom = require_strip_bom(); + var ini = require_ini2(); + var parse = (data) => ini.parse(stripBom(data)); + module2.exports = (fp) => fs.promises.readFile(fp, "utf8").then(parse); + module2.exports.sync = (fp) => parse(fs.readFileSync(fp, "utf8")); + } +}); + +// ../plugin-commands-rebuild/lib/recursive.js +var require_recursive = __commonJS({ + "../plugin-commands-rebuild/lib/recursive.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var find_workspace_packages_1 = require_lib22(); + var logger_1 = __importDefault(require_lib6()); + var sort_packages_1 = __importDefault(require_lib92()); + var store_connection_manager_1 = require_lib63(); + var camelcase_keys_1 = __importDefault(require_camelcase_keys()); + var mem_1 = __importDefault(require_dist8()); + var p_limit_1 = __importDefault(require_p_limit()); + var read_ini_file_1 = __importDefault(require_read_ini_file()); + var implementation_1 = require_implementation4(); + async function recursive(allProjects, params, opts) { + var _a; + if (allProjects.length === 0) { + return; + } + const pkgs = Object.values(opts.selectedProjectsGraph).map((wsPkg) => wsPkg.package); + if (pkgs.length === 0) { + return; + } + const manifestsByPath = {}; + for (const { dir, manifest, writeProjectManifest } of pkgs) { + manifestsByPath[dir] = { manifest, writeProjectManifest }; + } + const throwOnFail = cli_utils_1.throwOnCommandFail.bind(null, "pnpm recursive rebuild"); + const chunks = opts.sort !== false ? sort_packages_1.default(opts.selectedProjectsGraph) : [Object.keys(opts.selectedProjectsGraph).sort()]; + const store = await store_connection_manager_1.createOrConnectStoreController(opts); + const workspacePackages = find_workspace_packages_1.arrayOfWorkspacePackagesToMap(allProjects); + const rebuildOpts = Object.assign(opts, { + ownLifecycleHooksStdio: "pipe", + pruneLockfileImporters: (opts.ignoredPackages == null || opts.ignoredPackages.size === 0) && pkgs.length === allProjects.length, + storeController: store.ctrl, + storeDir: store.dir, + workspacePackages + }); + const result = { + fails: [], + passes: 0 + }; + const memReadLocalConfig = mem_1.default(readLocalConfig); + async function getImporters() { + const importers = []; + await Promise.all(chunks.map(async (prefixes, buildIndex) => { + if (opts.ignoredPackages != null) { + prefixes = prefixes.filter((prefix) => !opts.ignoredPackages.has(prefix)); + } + return Promise.all(prefixes.map(async (prefix) => { + importers.push({ + buildIndex, + manifest: manifestsByPath[prefix].manifest, + rootDir: prefix + }); + })); + })); + return importers; + } + const rebuild = params.length === 0 ? implementation_1.rebuild : (importers, opts2) => implementation_1.rebuildPkgs(importers, params, opts2); + if (opts.lockfileDir) { + const importers = await getImporters(); + await rebuild(importers, { + ...rebuildOpts, + pending: opts.pending === true + }); + return; + } + const limitRebuild = p_limit_1.default((_a = opts.workspaceConcurrency) !== null && _a !== void 0 ? _a : 4); + for (const chunk of chunks) { + await Promise.all(chunk.map(async (rootDir) => limitRebuild(async () => { + var _a2; + try { + if ((_a2 = opts.ignoredPackages) === null || _a2 === void 0 ? void 0 : _a2.has(rootDir)) { + return; + } + const localConfig = await memReadLocalConfig(rootDir); + await rebuild([ + { + buildIndex: 0, + manifest: manifestsByPath[rootDir].manifest, + rootDir + } + ], { + ...rebuildOpts, + ...localConfig, + dir: rootDir, + pending: opts.pending === true, + rawConfig: { + ...rebuildOpts.rawConfig, + ...localConfig + } + }); + result.passes++; + } catch (err) { + logger_1.default.info(err); + if (!opts.bail) { + result.fails.push({ + error: err, + message: err.message, + prefix: rootDir + }); + return; + } + err["prefix"] = rootDir; + throw err; + } + }))); + } + throwOnFail(result); + } + exports2.default = recursive; + async function readLocalConfig(prefix) { + try { + const ini = await read_ini_file_1.default(path_1.default.join(prefix, ".npmrc")); + const config = camelcase_keys_1.default(ini); + if (config.shamefullyFlatten) { + config.hoistPattern = "*"; + } + if (config.hoist === false) { + config.hoistPattern = ""; + } + return config; + } catch (err) { + if (err.code !== "ENOENT") + throw err; + return {}; + } + } + } +}); + +// ../plugin-commands-rebuild/lib/rebuild.js +var require_rebuild = __commonJS({ + "../plugin-commands-rebuild/lib/rebuild.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var store_connection_manager_1 = require_lib63(); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + var implementation_1 = require_implementation4(); + var recursive_1 = __importDefault(require_recursive()); + function rcOptionsTypes() { + return { + ...pick_1.default([ + "npm-path", + "reporter", + "unsafe-perm" + ], config_1.types) + }; + } + exports2.rcOptionsTypes = rcOptionsTypes; + function cliOptionsTypes() { + return { + ...rcOptionsTypes(), + pending: Boolean, + recursive: Boolean + }; + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["rebuild", "rb"]; + function help() { + return render_help_1.default({ + aliases: ["rb"], + description: "Rebuild a package.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: 'Rebuild every package found in subdirectories or every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + }, + { + description: "Rebuild packages that were not build during installation. Packages are not build when installing with the --ignore-scripts flag", + name: "--pending" + }, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + }, + common_cli_options_help_1.FILTERING + ], + url: cli_utils_1.docsUrl("rebuild"), + usages: ["pnpm rebuild [ ...]"] + }); + } + exports2.help = help; + async function handler(opts, params) { + var _a; + if (opts.recursive && opts.allProjects != null && opts.selectedProjectsGraph != null && opts.workspaceDir) { + await recursive_1.default(opts.allProjects, params, { ...opts, selectedProjectsGraph: opts.selectedProjectsGraph, workspaceDir: opts.workspaceDir }); + return; + } + const store = await store_connection_manager_1.createOrConnectStoreController(opts); + const rebuildOpts = Object.assign(opts, { + sideEffectsCacheRead: (_a = opts.sideEffectsCache) !== null && _a !== void 0 ? _a : opts.sideEffectsCacheReadonly, + sideEffectsCacheWrite: opts.sideEffectsCache, + storeController: store.ctrl, + storeDir: store.dir + }); + if (params.length === 0) { + await implementation_1.rebuild([ + { + buildIndex: 0, + manifest: await cli_utils_1.readProjectManifestOnly(rebuildOpts.dir, opts), + rootDir: rebuildOpts.dir + } + ], rebuildOpts); + } + await implementation_1.rebuildPkgs([ + { + manifest: await cli_utils_1.readProjectManifestOnly(rebuildOpts.dir, opts), + rootDir: rebuildOpts.dir + } + ], params, rebuildOpts); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-rebuild/lib/index.js +var require_lib93 = __commonJS({ + "../plugin-commands-rebuild/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rebuild = void 0; + var rebuild = __importStar2(require_rebuild()); + exports2.rebuild = rebuild; + } +}); + +// ../plugin-commands-installation/lib/updateWorkspaceDependencies.js +var require_updateWorkspaceDependencies = __commonJS({ + "../plugin-commands-installation/lib/updateWorkspaceDependencies.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createWorkspaceSpecs = exports2.updateToWorkspacePackagesFromManifest = void 0; + var error_1 = __importDefault(require_lib8()); + var parse_wanted_dependency_1 = __importDefault(require_lib87()); + function updateToWorkspacePackagesFromManifest(manifest, include, workspacePackages) { + const allDeps = { + ...include.devDependencies ? manifest.devDependencies : {}, + ...include.dependencies ? manifest.dependencies : {}, + ...include.optionalDependencies ? manifest.optionalDependencies : {} + }; + const updateSpecs = []; + for (const depName of Object.keys(allDeps)) { + if (workspacePackages[depName]) { + updateSpecs.push(`${depName}@workspace:*`); + } + } + return updateSpecs; + } + exports2.updateToWorkspacePackagesFromManifest = updateToWorkspacePackagesFromManifest; + function createWorkspaceSpecs(specs, workspacePackages) { + return specs.map((spec) => { + const parsed = parse_wanted_dependency_1.default(spec); + if (!parsed.alias) + throw new error_1.default("NO_PKG_NAME_IN_SPEC", `Cannot update/install from workspace through "${spec}"`); + if (!workspacePackages[parsed.alias]) + throw new error_1.default("WORKSPACE_PACKAGE_NOT_FOUND", `"${parsed.alias}" not found in the workspace`); + if (!parsed.pref) + return `${parsed.alias}@workspace:*`; + if (parsed.pref.startsWith("workspace:")) + return spec; + return `${parsed.alias}@workspace:${parsed.pref}`; + }); + } + exports2.createWorkspaceSpecs = createWorkspaceSpecs; + } +}); + +// ../plugin-commands-installation/lib/updateToLatestSpecsFromManifest.js +var require_updateToLatestSpecsFromManifest = __commonJS({ + "../plugin-commands-installation/lib/updateToLatestSpecsFromManifest.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createLatestSpecs = void 0; + var manifest_utils_1 = require_lib15(); + var version_selector_type_1 = __importDefault(require_version_selector_type()); + function updateToLatestSpecsFromManifest(manifest, include) { + const allDeps = manifest_utils_1.filterDependenciesByType(manifest, include); + const updateSpecs = []; + for (const [depName, depVersion] of Object.entries(allDeps)) { + if (depVersion.startsWith("npm:")) { + updateSpecs.push(`${depName}@${removeVersionFromSpec(depVersion)}@latest`); + } else { + const selector = version_selector_type_1.default(depVersion); + if (selector == null) + continue; + updateSpecs.push(`${depName}@latest`); + } + } + return updateSpecs; + } + exports2.default = updateToLatestSpecsFromManifest; + function createLatestSpecs(specs, manifest) { + const allDeps = manifest_utils_1.getAllDependenciesFromManifest(manifest); + return specs.filter((selector) => selector.includes("@", 1) ? allDeps[selector.substr(0, selector.indexOf("@", 1))] : allDeps[selector]).map((selector) => { + if (selector.includes("@", 1)) { + return selector; + } + if (allDeps[selector].startsWith("npm:")) { + return `${selector}@${removeVersionFromSpec(allDeps[selector])}@latest`; + } + if (version_selector_type_1.default(allDeps[selector]) == null) { + return selector; + } + return `${selector}@latest`; + }); + } + exports2.createLatestSpecs = createLatestSpecs; + function removeVersionFromSpec(spec) { + return spec.substr(0, spec.lastIndexOf("@")); + } + } +}); + +// ../plugin-commands-installation/lib/recursive.js +var require_recursive2 = __commonJS({ + "../plugin-commands-installation/lib/recursive.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createMatcher = exports2.matchDependencies = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var error_1 = __importDefault(require_lib8()); + var find_workspace_packages_1 = require_lib22(); + var logger_1 = __importDefault(require_lib6()); + var manifest_utils_1 = require_lib15(); + var matcher_1 = __importDefault(require_lib23()); + var plugin_commands_rebuild_1 = require_lib93(); + var pnpmfile_1 = require_lib91(); + var sort_packages_1 = __importDefault(require_lib92()); + var store_connection_manager_1 = require_lib63(); + var supi_1 = require_lib88(); + var camelcase_keys_1 = __importDefault(require_camelcase_keys()); + var is_subdir_1 = __importDefault(require_is_subdir()); + var mem_1 = __importDefault(require_dist8()); + var p_filter_1 = __importDefault(require_p_filter()); + var p_limit_1 = __importDefault(require_p_limit()); + var read_ini_file_1 = __importDefault(require_read_ini_file()); + var updateWorkspaceDependencies_1 = require_updateWorkspaceDependencies(); + var updateToLatestSpecsFromManifest_1 = __importStar2(require_updateToLatestSpecsFromManifest()); + var getSaveType_1 = __importDefault(require_getSaveType()); + var getPinnedVersion_1 = __importDefault(require_getPinnedVersion()); + async function recursive(allProjects, params, opts, cmdFullName) { + var _a, _b, _c; + if (allProjects.length === 0) { + return false; + } + const pkgs = Object.values(opts.selectedProjectsGraph).map((wsPkg) => wsPkg.package); + if (pkgs.length === 0) { + return false; + } + const manifestsByPath = {}; + for (const { dir, manifest, writeProjectManifest } of allProjects) { + manifestsByPath[dir] = { manifest, writeProjectManifest }; + } + const throwOnFail = cli_utils_1.throwOnCommandFail.bind(null, `pnpm recursive ${cmdFullName}`); + const chunks = opts.sort !== false ? sort_packages_1.default(opts.selectedProjectsGraph) : [Object.keys(opts.selectedProjectsGraph).sort()]; + const store = await store_connection_manager_1.createOrConnectStoreController(opts); + const workspacePackages = cmdFullName !== "unlink" ? find_workspace_packages_1.arrayOfWorkspacePackagesToMap(allProjects) : {}; + const targetDependenciesField = getSaveType_1.default(opts); + const installOpts = Object.assign(opts, { + linkWorkspacePackagesDepth: opts.linkWorkspacePackages === "deep" ? Infinity : opts.linkWorkspacePackages ? 0 : -1, + ownLifecycleHooksStdio: "pipe", + peer: opts.savePeer, + pruneLockfileImporters: (opts.ignoredPackages == null || opts.ignoredPackages.size === 0) && pkgs.length === allProjects.length, + storeController: store.ctrl, + storeDir: store.dir, + targetDependenciesField, + workspacePackages, + forceHoistPattern: typeof opts.rawLocalConfig["hoist-pattern"] !== "undefined" || typeof opts.rawLocalConfig["hoist"] !== "undefined", + forceShamefullyHoist: typeof opts.rawLocalConfig["shamefully-hoist"] !== "undefined" + }); + const result = { + fails: [], + passes: 0 + }; + const memReadLocalConfig = mem_1.default(readLocalConfig); + async function getImporters() { + const importers = []; + await Promise.all(chunks.map(async (prefixes, buildIndex) => { + if (opts.ignoredPackages != null) { + prefixes = prefixes.filter((prefix) => !opts.ignoredPackages.has(prefix)); + } + return Promise.all(prefixes.map(async (prefix) => { + importers.push({ + buildIndex, + manifest: manifestsByPath[prefix].manifest, + rootDir: prefix + }); + })); + })); + return importers; + } + const updateToLatest = opts.update && opts.latest; + const includeDirect = (_a = opts.includeDirect) !== null && _a !== void 0 ? _a : { + dependencies: true, + devDependencies: true, + optionalDependencies: true + }; + const updateMatch = cmdFullName === "update" && params.length > 0 ? createMatcher(params) : null; + if (opts.lockfileDir && ["add", "install", "remove", "update"].includes(cmdFullName)) { + let importers = await getImporters(); + const calculatedRepositoryRoot = calculateRepositoryRoot(opts.workspaceDir, importers.map((x) => x.rootDir)); + const isFromWorkspace = is_subdir_1.default.bind(null, calculatedRepositoryRoot); + importers = await p_filter_1.default(importers, async ({ rootDir }) => isFromWorkspace(await fs_1.promises.realpath(rootDir))); + if (importers.length === 0) + return true; + const hooks = opts.ignorePnpmfile ? {} : pnpmfile_1.requireHooks(opts.lockfileDir, opts); + const mutation = cmdFullName === "remove" ? "uninstallSome" : params.length === 0 && !updateToLatest ? "install" : "installSome"; + const writeProjectManifests = []; + const mutatedImporters = []; + await Promise.all(importers.map(async ({ buildIndex, rootDir }) => { + var _a2; + const localConfig = await memReadLocalConfig(rootDir); + const modulesDir = (_a2 = localConfig.modulesDir) !== null && _a2 !== void 0 ? _a2 : opts.modulesDir; + const { manifest, writeProjectManifest } = manifestsByPath[rootDir]; + let currentInput = [...params]; + if (updateMatch != null) { + currentInput = matchDependencies(updateMatch, manifest, includeDirect); + if (currentInput.length === 0 && (typeof opts.depth === "undefined" || opts.depth <= 0)) { + installOpts.pruneLockfileImporters = false; + return; + } + } + if (updateToLatest) { + if (!params || params.length === 0) { + currentInput = updateToLatestSpecsFromManifest_1.default(manifest, includeDirect); + } else { + currentInput = updateToLatestSpecsFromManifest_1.createLatestSpecs(currentInput, manifest); + if (currentInput.length === 0) { + installOpts.pruneLockfileImporters = false; + return; + } + } + } + if (opts.workspace) { + if (!currentInput || currentInput.length === 0) { + currentInput = updateWorkspaceDependencies_1.updateToWorkspacePackagesFromManifest(manifest, includeDirect, workspacePackages); + } else { + currentInput = updateWorkspaceDependencies_1.createWorkspaceSpecs(currentInput, workspacePackages); + } + } + writeProjectManifests.push(writeProjectManifest); + switch (mutation) { + case "uninstallSome": + mutatedImporters.push({ + dependencyNames: currentInput, + manifest, + modulesDir, + mutation, + rootDir, + targetDependenciesField + }); + return; + case "installSome": + mutatedImporters.push({ + allowNew: cmdFullName === "install" || cmdFullName === "add", + dependencySelectors: currentInput, + manifest, + modulesDir, + mutation, + peer: opts.savePeer, + pinnedVersion: getPinnedVersion_1.default({ + saveExact: typeof localConfig.saveExact === "boolean" ? localConfig.saveExact : opts.saveExact, + savePrefix: typeof localConfig.savePrefix === "string" ? localConfig.savePrefix : opts.savePrefix + }), + rootDir, + targetDependenciesField + }); + return; + case "install": + mutatedImporters.push({ + buildIndex, + manifest, + modulesDir, + mutation, + rootDir + }); + } + })); + if (!opts.selectedProjectsGraph[opts.workspaceDir] && manifestsByPath[opts.workspaceDir] != null) { + const localConfig = await memReadLocalConfig(opts.workspaceDir); + const modulesDir = (_b = localConfig.modulesDir) !== null && _b !== void 0 ? _b : opts.modulesDir; + const { manifest, writeProjectManifest } = manifestsByPath[opts.workspaceDir]; + writeProjectManifests.push(writeProjectManifest); + mutatedImporters.push({ + buildIndex: 0, + manifest, + modulesDir, + mutation: "install", + rootDir: opts.workspaceDir + }); + } + if (mutatedImporters.length === 0 && cmdFullName === "update") { + throw new error_1.default("NO_PACKAGE_IN_DEPENDENCIES", "None of the specified packages were found in the dependencies of any of the projects."); + } + const mutatedPkgs = await supi_1.mutateModules(mutatedImporters, { + ...installOpts, + hooks, + storeController: store.ctrl + }); + if (opts.save !== false) { + await Promise.all(mutatedPkgs.map(async ({ manifest }, index) => writeProjectManifests[index](manifest))); + } + return true; + } + const pkgPaths = chunks.length === 0 ? chunks[0] : Object.keys(opts.selectedProjectsGraph).sort(); + const limitInstallation = p_limit_1.default((_c = opts.workspaceConcurrency) !== null && _c !== void 0 ? _c : 4); + await Promise.all(pkgPaths.map(async (rootDir) => limitInstallation(async () => { + var _a2; + const hooks = opts.ignorePnpmfile ? {} : pnpmfile_1.requireHooks(rootDir, opts); + try { + if ((_a2 = opts.ignoredPackages) === null || _a2 === void 0 ? void 0 : _a2.has(rootDir)) { + return; + } + const { manifest, writeProjectManifest } = manifestsByPath[rootDir]; + let currentInput = [...params]; + if (updateMatch != null) { + currentInput = matchDependencies(updateMatch, manifest, includeDirect); + if (currentInput.length === 0) + return; + } + if (updateToLatest) { + if (!params || params.length === 0) { + currentInput = updateToLatestSpecsFromManifest_1.default(manifest, includeDirect); + } else { + currentInput = updateToLatestSpecsFromManifest_1.createLatestSpecs(currentInput, manifest); + if (currentInput.length === 0) + return; + } + } + if (opts.workspace) { + if (!currentInput || currentInput.length === 0) { + currentInput = updateWorkspaceDependencies_1.updateToWorkspacePackagesFromManifest(manifest, includeDirect, workspacePackages); + } else { + currentInput = updateWorkspaceDependencies_1.createWorkspaceSpecs(currentInput, workspacePackages); + } + } + let action; + switch (cmdFullName) { + case "unlink": + action = currentInput.length === 0 ? unlink : unlinkPkgs.bind(null, currentInput); + break; + case "remove": + action = async (manifest2, opts2) => { + const [{ manifest: newManifest2 }] = await supi_1.mutateModules([ + { + dependencyNames: currentInput, + manifest: manifest2, + mutation: "uninstallSome", + rootDir + } + ], opts2); + return newManifest2; + }; + break; + default: + action = currentInput.length === 0 ? supi_1.install : async (manifest2, opts2) => supi_1.addDependenciesToPackage(manifest2, currentInput, opts2); + break; + } + const localConfig = await memReadLocalConfig(rootDir); + const newManifest = await action(manifest, { + ...installOpts, + ...localConfig, + bin: path_1.default.join(rootDir, "node_modules", ".bin"), + dir: rootDir, + hooks, + ignoreScripts: true, + pinnedVersion: getPinnedVersion_1.default({ + saveExact: typeof localConfig.saveExact === "boolean" ? localConfig.saveExact : opts.saveExact, + savePrefix: typeof localConfig.savePrefix === "string" ? localConfig.savePrefix : opts.savePrefix + }), + rawConfig: { + ...installOpts.rawConfig, + ...localConfig + }, + storeController: store.ctrl + }); + if (opts.save !== false) { + await writeProjectManifest(newManifest); + } + result.passes++; + } catch (err) { + logger_1.default.info(err); + if (!opts.bail) { + result.fails.push({ + error: err, + message: err.message, + prefix: rootDir + }); + return; + } + err["prefix"] = rootDir; + throw err; + } + }))); + if (!opts.lockfileOnly && !opts.ignoreScripts && (cmdFullName === "add" || cmdFullName === "install" || cmdFullName === "update" || cmdFullName === "unlink")) { + await plugin_commands_rebuild_1.rebuild.handler({ + ...opts, + pending: opts.pending === true + }, []); + } + throwOnFail(result); + if (!result.passes && cmdFullName === "update") { + throw new error_1.default("NO_PACKAGE_IN_DEPENDENCIES", "None of the specified packages were found in the dependencies of any of the projects."); + } + return true; + } + exports2.default = recursive; + async function unlink(manifest, opts) { + return supi_1.mutateModules([ + { + manifest, + mutation: "unlink", + rootDir: opts.dir + } + ], opts); + } + async function unlinkPkgs(dependencyNames, manifest, opts) { + return supi_1.mutateModules([ + { + dependencyNames, + manifest, + mutation: "unlinkSome", + rootDir: opts.dir + } + ], opts); + } + async function readLocalConfig(prefix) { + try { + const ini = await read_ini_file_1.default(path_1.default.join(prefix, ".npmrc")); + const config = camelcase_keys_1.default(ini); + if (config.shamefullyFlatten) { + config.hoistPattern = "*"; + } + if (config.hoist === false) { + config.hoistPattern = ""; + } + return config; + } catch (err) { + if (err.code !== "ENOENT") + throw err; + return {}; + } + } + function calculateRepositoryRoot(workspaceDir, projectDirs) { + let relativeRepoRoot = "."; + for (const rootDir of projectDirs) { + const relativePartRegExp = new RegExp(`^(\\.\\.\\${path_1.default.sep})+`); + const relativePartMatch = relativePartRegExp.exec(path_1.default.relative(workspaceDir, rootDir)); + if (relativePartMatch != null) { + const relativePart = relativePartMatch[0]; + if (relativePart.length > relativeRepoRoot.length) { + relativeRepoRoot = relativePart; + } + } + } + return path_1.default.resolve(workspaceDir, relativeRepoRoot); + } + function matchDependencies(match, manifest, include) { + const deps = Object.keys(manifest_utils_1.filterDependenciesByType(manifest, include)); + const matchedDeps = []; + for (const dep of deps) { + const spec = match(dep); + if (spec === null) + continue; + matchedDeps.push(spec ? `${dep}@${spec}` : dep); + } + return matchedDeps; + } + exports2.matchDependencies = matchDependencies; + function createMatcher(params) { + const matchers = params.map((param) => { + const atIndex = param.indexOf("@", 1); + let pattern; + let spec; + if (atIndex === -1) { + pattern = param; + spec = ""; + } else { + pattern = param.substr(0, atIndex); + spec = param.substr(atIndex + 1); + } + return { + match: matcher_1.default(pattern), + spec + }; + }); + return (depName) => { + for (const { spec, match } of matchers) { + if (match(depName)) + return spec; + } + return null; + }; + } + exports2.createMatcher = createMatcher; + } +}); + +// ../plugin-commands-installation/lib/installDeps.js +var require_installDeps = __commonJS({ + "../plugin-commands-installation/lib/installDeps.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var error_1 = __importDefault(require_lib8()); + var filter_workspace_packages_1 = require_lib27(); + var find_workspace_packages_1 = __importStar2(require_lib22()); + var implementation_1 = require_implementation4(); + var pnpmfile_1 = require_lib91(); + var store_connection_manager_1 = require_lib63(); + var supi_1 = require_lib88(); + var logger_1 = __importDefault(require_lib6()); + var sort_packages_1 = require_lib92(); + var getPinnedVersion_1 = __importDefault(require_getPinnedVersion()); + var getSaveType_1 = __importDefault(require_getSaveType()); + var recursive_1 = __importStar2(require_recursive2()); + var updateToLatestSpecsFromManifest_1 = __importStar2(require_updateToLatestSpecsFromManifest()); + var updateWorkspaceDependencies_1 = require_updateWorkspaceDependencies(); + var OVERWRITE_UPDATE_OPTIONS = { + allowNew: true, + update: false + }; + async function handler(opts, params) { + var _a, _b, _c, _d, _e, _f; + if (opts.workspace) { + if (opts.latest) { + throw new error_1.default("BAD_OPTIONS", "Cannot use --latest with --workspace simultaneously"); + } + if (!opts.workspaceDir) { + throw new error_1.default("WORKSPACE_OPTION_OUTSIDE_WORKSPACE", "--workspace can only be used inside a workspace"); + } + if (!opts.linkWorkspacePackages && !opts.saveWorkspaceProtocol) { + if (opts.rawLocalConfig["save-workspace-protocol"] === false) { + throw new error_1.default("BAD_OPTIONS", "This workspace has link-workspace-packages turned off, so dependencies are linked from the workspace only when the workspace protocol is used. Either set link-workspace-packages to true or don't use the --no-save-workspace-protocol option when running add/update with the --workspace option"); + } else { + opts.saveWorkspaceProtocol = true; + } + } + opts["preserveWorkspaceProtocol"] = !opts.linkWorkspacePackages; + } + const includeDirect = (_a = opts.includeDirect) !== null && _a !== void 0 ? _a : { + dependencies: true, + devDependencies: true, + optionalDependencies: true + }; + const forceHoistPattern = typeof opts.rawLocalConfig["hoist-pattern"] !== "undefined" || typeof opts.rawLocalConfig["hoist"] !== "undefined"; + const forcePublicHoistPattern = typeof opts.rawLocalConfig["shamefully-hoist"] !== "undefined" || typeof opts.rawLocalConfig["public-hoist-pattern"] !== "undefined"; + const allProjects = (_b = opts.allProjects) !== null && _b !== void 0 ? _b : opts.workspaceDir ? await find_workspace_packages_1.default(opts.workspaceDir, opts) : []; + if (opts.workspaceDir) { + const selectedProjectsGraph = (_c = opts.selectedProjectsGraph) !== null && _c !== void 0 ? _c : selectProjectByDir(allProjects, opts.dir); + if (selectedProjectsGraph != null) { + const sequencedGraph = sort_packages_1.sequenceGraph(selectedProjectsGraph); + if (!sequencedGraph.safe) { + const cyclicDependenciesInfo = sequencedGraph.cycles.length > 0 ? `: ${sequencedGraph.cycles.map((deps) => deps.join(", ")).join("; ")}` : ""; + logger_1.default.warn({ + message: `There are cyclic workspace dependencies${cyclicDependenciesInfo}`, + prefix: opts.workspaceDir + }); + } + await recursive_1.default(allProjects, params, { + ...opts, + forceHoistPattern, + forcePublicHoistPattern, + selectedProjectsGraph, + workspaceDir: opts.workspaceDir + }, opts.update ? "update" : params.length === 0 ? "install" : "add"); + return; + } + } + params = params.filter(Boolean); + const dir = opts.dir || process.cwd(); + let workspacePackages; + if (opts.workspaceDir) { + workspacePackages = find_workspace_packages_1.arrayOfWorkspacePackagesToMap(allProjects); + } + const store = await store_connection_manager_1.createOrConnectStoreController(opts); + const installOpts = { + ...opts, + forceHoistPattern, + forcePublicHoistPattern, + ignoreScripts: !!workspacePackages || opts.ignoreScripts, + linkWorkspacePackagesDepth: opts.linkWorkspacePackages === "deep" ? Infinity : opts.linkWorkspacePackages ? 0 : -1, + sideEffectsCacheRead: (_d = opts.sideEffectsCache) !== null && _d !== void 0 ? _d : opts.sideEffectsCacheReadonly, + sideEffectsCacheWrite: opts.sideEffectsCache, + storeController: store.ctrl, + storeDir: store.dir, + workspacePackages + }; + if (!opts.ignorePnpmfile) { + installOpts["hooks"] = pnpmfile_1.requireHooks((_e = opts.lockfileDir) !== null && _e !== void 0 ? _e : dir, opts); + } + if (opts.global) { + installOpts["nodeExecPath"] = (_f = process.env.NODE) !== null && _f !== void 0 ? _f : process.execPath; + } + let { manifest, writeProjectManifest } = await cli_utils_1.tryReadProjectManifest(opts.dir, opts); + if (manifest === null) { + if (opts.update) { + throw new error_1.default("NO_IMPORTER_MANIFEST", "No package.json found"); + } + manifest = {}; + } + const updateMatch = opts.update && params.length > 0 ? recursive_1.createMatcher(params) : null; + if (updateMatch != null) { + params = recursive_1.matchDependencies(updateMatch, manifest, includeDirect); + if (params.length === 0) { + throw new error_1.default("NO_PACKAGE_IN_DEPENDENCIES", "None of the specified packages were found in the dependencies."); + } + } + if (opts.update && opts.latest) { + if (!params || params.length === 0) { + params = updateToLatestSpecsFromManifest_1.default(manifest, includeDirect); + } else { + params = updateToLatestSpecsFromManifest_1.createLatestSpecs(params, manifest); + } + } + if (opts.workspace) { + if (!params || params.length === 0) { + params = updateWorkspaceDependencies_1.updateToWorkspacePackagesFromManifest(manifest, includeDirect, workspacePackages); + } else { + params = updateWorkspaceDependencies_1.createWorkspaceSpecs(params, workspacePackages); + } + } + if (params === null || params === void 0 ? void 0 : params.length) { + const [updatedImporter] = await supi_1.mutateModules([ + { + allowNew: opts.allowNew, + binsDir: installOpts.bin, + dependencySelectors: params, + manifest, + mutation: "installSome", + peer: opts.savePeer, + pinnedVersion: getPinnedVersion_1.default(opts), + rootDir: installOpts.dir, + targetDependenciesField: getSaveType_1.default(installOpts) + } + ], installOpts); + if (opts.save !== false) { + await writeProjectManifest(updatedImporter.manifest); + } + return; + } + const updatedManifest = await supi_1.install(manifest, installOpts); + if (opts.update === true && opts.save !== false) { + await writeProjectManifest(updatedManifest); + } + if (opts.linkWorkspacePackages && opts.workspaceDir) { + const { selectedProjectsGraph } = await filter_workspace_packages_1.filterPkgsBySelectorObjects(allProjects, [ + { + excludeSelf: true, + includeDependencies: true, + parentDir: dir + } + ], { + workspaceDir: opts.workspaceDir + }); + await recursive_1.default(allProjects, [], { + ...opts, + ...OVERWRITE_UPDATE_OPTIONS, + selectedProjectsGraph, + workspaceDir: opts.workspaceDir + }, "install"); + if (opts.ignoreScripts) + return; + await implementation_1.rebuild([ + { + buildIndex: 0, + manifest: await cli_utils_1.readProjectManifestOnly(opts.dir, opts), + rootDir: opts.dir + } + ], { + ...opts, + pending: true, + storeController: store.ctrl, + storeDir: store.dir + }); + } + } + exports2.default = handler; + function selectProjectByDir(projects, searchedDir) { + const project = projects.find(({ dir }) => path_1.default.relative(dir, searchedDir) === ""); + if (project == null) + return void 0; + return { [searchedDir]: { dependencies: [], package: project } }; + } + } +}); + +// ../plugin-commands-installation/lib/add.js +var require_add = __commonJS({ + "../plugin-commands-installation/lib/add.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var error_1 = __importDefault(require_lib8()); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + var installDeps_1 = __importDefault(require_installDeps()); + function rcOptionsTypes() { + return pick_1.default([ + "child-concurrency", + "engine-strict", + "fetch-retries", + "fetch-retry-factor", + "fetch-retry-maxtimeout", + "fetch-retry-mintimeout", + "fetch-timeout", + "force", + "global-dir", + "global-pnpmfile", + "global", + "hoist", + "hoist-pattern", + "https-proxy", + "ignore-pnpmfile", + "ignore-scripts", + "ignore-workspace-root-check", + "link-workspace-packages", + "lockfile-dir", + "lockfile-directory", + "lockfile-only", + "lockfile", + "modules-dir", + "network-concurrency", + "noproxy", + "npmPath", + "package-import-method", + "pnpmfile", + "prefer-offline", + "production", + "proxy", + "public-hoist-pattern", + "registry", + "reporter", + "save-dev", + "save-exact", + "save-optional", + "save-peer", + "save-prod", + "save-workspace-protocol", + "shamefully-flatten", + "shamefully-hoist", + "shared-workspace-lockfile", + "side-effects-cache-readonly", + "side-effects-cache", + "store", + "store-dir", + "strict-peer-dependencies", + "unsafe-perm", + "offline", + "only", + "optional", + "use-running-store-server", + "use-store-server", + "verify-store-integrity", + "virtual-store-dir" + ], config_1.types); + } + exports2.rcOptionsTypes = rcOptionsTypes; + function cliOptionsTypes() { + return { + ...rcOptionsTypes(), + recursive: Boolean, + save: Boolean, + workspace: Boolean + }; + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["add"]; + function help() { + return render_help_1.default({ + description: "Installs a package and any packages that it depends on.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "Save package to your `dependencies`. The default behavior", + name: "--save-prod", + shortAlias: "-P" + }, + { + description: "Save package to your `devDependencies`", + name: "--save-dev", + shortAlias: "-D" + }, + { + description: "Save package to your `optionalDependencies`", + name: "--save-optional", + shortAlias: "-O" + }, + { + description: "Save package to your `peerDependencies` and `devDependencies`", + name: "--save-peer" + }, + { + description: "Install exact version", + name: "--[no-]save-exact", + shortAlias: "-E" + }, + { + description: 'Save packages from the workspace with a "workspace:" protocol. True by default', + name: "--[no-]save-workspace-protocol" + }, + { + description: "Install as a global package", + name: "--global", + shortAlias: "-g" + }, + { + description: 'Run installation recursively in every package found in subdirectories or in every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + }, + { + description: "Only adds the new dependency if it is found in the workspace", + name: "--workspace" + }, + common_cli_options_help_1.OPTIONS.ignoreScripts, + common_cli_options_help_1.OPTIONS.offline, + common_cli_options_help_1.OPTIONS.preferOffline, + common_cli_options_help_1.OPTIONS.storeDir, + common_cli_options_help_1.OPTIONS.virtualStoreDir, + common_cli_options_help_1.OPTIONS.globalDir, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + }, + common_cli_options_help_1.FILTERING + ], + url: cli_utils_1.docsUrl("add"), + usages: [ + "pnpm add ", + "pnpm add @", + "pnpm add @", + "pnpm add @", + "pnpm add :/", + "pnpm add ", + "pnpm add ", + "pnpm add ", + "pnpm add " + ] + }); + } + exports2.help = help; + async function handler(opts, params) { + if (opts.cliOptions["save"] === false) { + throw new error_1.default("OPTION_NOT_SUPPORTED", 'The "add" command currently does not support the no-save option'); + } + if (!params || params.length === 0) { + throw new error_1.default("MISSING_PACKAGE_NAME", "`pnpm add` requires the package name"); + } + if (!opts.recursive && opts.workspaceDir === opts.dir && !opts.ignoreWorkspaceRootCheck && !opts.workspaceRoot) { + throw new error_1.default("ADDING_TO_ROOT", "Running this command will add the dependency to the workspace root, which might not be what you want - if you really meant it, make it explicit by running this command again with the -w flag (or --workspace-root). If you don't want to see this warning anymore, you may set the ignore-workspace-root-check setting to true."); + } + const include = { + dependencies: opts.production !== false, + devDependencies: opts.dev !== false, + optionalDependencies: opts.optional !== false + }; + return installDeps_1.default({ + ...opts, + include, + includeDirect: include + }, params); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-installation/lib/install.js +var require_install2 = __commonJS({ + "../plugin-commands-installation/lib/install.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.shorthands = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var constants_1 = require_lib7(); + var is_ci_1 = __importDefault(require_is_ci()); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + var installDeps_1 = __importDefault(require_installDeps()); + function rcOptionsTypes() { + return pick_1.default([ + "child-concurrency", + "dev", + "engine-strict", + "fetch-retries", + "fetch-retry-factor", + "fetch-retry-maxtimeout", + "fetch-retry-mintimeout", + "fetch-timeout", + "frozen-lockfile", + "global-dir", + "global-pnpmfile", + "global", + "hoist", + "hoist-pattern", + "https-proxy", + "ignore-pnpmfile", + "ignore-scripts", + "link-workspace-packages", + "lockfile-dir", + "lockfile-directory", + "lockfile-only", + "lockfile", + "modules-dir", + "network-concurrency", + "noproxy", + "package-import-method", + "pnpmfile", + "prefer-frozen-lockfile", + "prefer-offline", + "production", + "proxy", + "public-hoist-pattern", + "registry", + "reporter", + "save-workspace-protocol", + "shamefully-flatten", + "shamefully-hoist", + "shared-workspace-lockfile", + "side-effects-cache-readonly", + "side-effects-cache", + "store", + "store-dir", + "strict-peer-dependencies", + "offline", + "only", + "optional", + "unsafe-perm", + "use-running-store-server", + "use-store-server", + "verify-store-integrity", + "virtual-store-dir" + ], config_1.types); + } + exports2.rcOptionsTypes = rcOptionsTypes; + var cliOptionsTypes = () => ({ + ...rcOptionsTypes(), + ...pick_1.default(["force"], config_1.types), + "fix-lockfile": Boolean, + recursive: Boolean + }); + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.shorthands = { + D: "--dev", + P: "--production" + }; + exports2.commandNames = ["install", "i"]; + function help() { + return render_help_1.default({ + aliases: ["i"], + description: "Installs all dependencies of the project in the current working directory. When executed inside a workspace, installs all dependencies of all projects.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: 'Run installation recursively in every package found in subdirectories. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + }, + common_cli_options_help_1.OPTIONS.ignoreScripts, + common_cli_options_help_1.OPTIONS.offline, + common_cli_options_help_1.OPTIONS.preferOffline, + common_cli_options_help_1.OPTIONS.globalDir, + { + description: "Packages in `devDependencies` won't be installed", + name: "--prod", + shortAlias: "-P" + }, + { + description: "Only `devDependencies` are installed regardless of the `NODE_ENV`", + name: "--dev", + shortAlias: "-D" + }, + { + description: "`optionalDependencies` are not installed", + name: "--no-optional" + }, + { + description: `Don't read or generate a \`${constants_1.WANTED_LOCKFILE}\` file`, + name: "--no-lockfile" + }, + { + description: `Dependencies are not downloaded. Only \`${constants_1.WANTED_LOCKFILE}\` is updated`, + name: "--lockfile-only" + }, + { + description: "Don't generate a lockfile and fail if an update is needed", + name: "--frozen-lockfile" + }, + { + description: `If the available \`${constants_1.WANTED_LOCKFILE}\` satisfies the \`package.json\` then perform a headless installation`, + name: "--prefer-frozen-lockfile" + }, + { + description: `The directory in which the ${constants_1.WANTED_LOCKFILE} of the package will be created. Several projects may share a single lockfile.`, + name: "--lockfile-dir " + }, + { + description: "Fix broken lockfile entries automatically", + name: "--fix-lockfile" + }, + { + description: "The directory in which dependencies will be installed (instead of node_modules)", + name: "--modules-dir " + }, + { + description: "Dependencies inside the modules directory will have access only to their listed dependencies", + name: "--no-hoist" + }, + { + description: "All the subdeps will be hoisted into the root node_modules. Your code will have access to them", + name: "--shamefully-hoist" + }, + { + description: "Hoist all dependencies matching the pattern to `node_modules/.pnpm/node_modules`. The default pattern is * and matches everything. Hoisted packages can be required by any dependencies, so it is an emulation of a flat node_modules", + name: "--hoist-pattern " + }, + { + description: "Hoist all dependencies matching the pattern to the root of the modules directory", + name: "--public-hoist-pattern " + }, + common_cli_options_help_1.OPTIONS.storeDir, + common_cli_options_help_1.OPTIONS.virtualStoreDir, + { + description: "Maximum number of concurrent network requests", + name: "--network-concurrency " + }, + { + description: "Controls the number of child processes run parallelly to build node modules", + name: "--child-concurrency " + }, + { + description: "Disable pnpm hooks defined in .pnpmfile.cjs", + name: "--ignore-pnpmfile" + }, + { + description: "If false, doesn't check whether packages in the store were mutated", + name: "--[no-]verify-store-integrity" + }, + { + description: "Fail on missing or invalid peer dependencies", + name: "--strict-peer-dependencies" + }, + { + description: "Starts a store server in the background. The store server will keep running after installation is done. To stop the store server, run `pnpm server stop`", + name: "--use-store-server" + }, + { + description: "Only allows installation with a store server. If no store server is running, installation will fail", + name: "--use-running-store-server" + }, + { + description: "Clones/hardlinks or copies packages. The selected method depends from the file system", + name: "--package-import-method auto" + }, + { + description: "Hardlink packages from the store", + name: "--package-import-method hardlink" + }, + { + description: "Copy packages from the store", + name: "--package-import-method copy" + }, + { + description: "Clone (aka copy-on-write) packages from the store", + name: "--package-import-method clone" + }, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + }, + { + title: "Output", + list: [ + { + description: "No output is logged to the console, except fatal errors", + name: "--silent, --reporter silent", + shortAlias: "-s" + }, + { + description: "The default reporter when the stdout is TTY", + name: "--reporter default" + }, + { + description: "The output is always appended to the end. No cursor manipulations are performed", + name: "--reporter append-only" + }, + { + description: "The most verbose reporter. Prints all logs in ndjson format", + name: "--reporter ndjson" + } + ] + }, + common_cli_options_help_1.FILTERING, + { + title: "Experimental options", + list: [ + { + description: "Use or cache the results of (pre/post)install hooks", + name: "--side-effects-cache" + }, + { + description: "Only use the side effects cache if present, do not create it for new packages", + name: "--side-effects-cache-readonly" + } + ] + } + ], + url: cli_utils_1.docsUrl("install"), + usages: ["pnpm install [options]"] + }); + } + exports2.help = help; + async function handler(opts) { + const include = { + dependencies: opts.production !== false, + devDependencies: opts.dev !== false, + optionalDependencies: opts.optional !== false + }; + return installDeps_1.default({ + ...opts, + frozenLockfileIfExists: is_ci_1.default && typeof opts.rawLocalConfig["frozen-lockfile"] === "undefined" && typeof opts.rawLocalConfig["prefer-frozen-lockfile"] === "undefined", + include, + includeDirect: include + }, []); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-installation/lib/fetch.js +var require_fetch3 = __commonJS({ + "../plugin-commands-installation/lib/fetch.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var store_connection_manager_1 = require_lib63(); + var supi_1 = require_lib88(); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + exports2.rcOptionsTypes = cliOptionsTypes; + function cliOptionsTypes() { + return pick_1.default([ + "production", + "dev" + ], config_1.types); + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["fetch"]; + function help() { + return render_help_1.default({ + description: "Fetch packages from a lockfile into virtual store, package manifest is ignored. WARNING! This is an experimental command. Breaking changes may be introduced in non-major versions of the CLI", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "Only development packages will be fetched", + name: "--dev" + }, + { + description: "Development packages will not be fetched", + name: "--prod" + }, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + } + ], + url: cli_utils_1.docsUrl("fetch"), + usages: ["pnpm fetch [--dev | --prod]"] + }); + } + exports2.help = help; + async function handler(opts) { + const store = await store_connection_manager_1.createOrConnectStoreController(opts); + const include = { + dependencies: opts.production !== false, + devDependencies: opts.dev !== false, + optionalDependencies: opts.production !== false + }; + return supi_1.mutateModules([ + { + buildIndex: 0, + manifest: {}, + mutation: "install", + pruneDirectDependencies: true, + rootDir: process.cwd() + } + ], { + ...opts, + ignorePackageManifest: true, + include, + modulesCacheMaxAge: 0, + pruneStore: true, + storeController: store.ctrl, + storeDir: store.dir + }); + } + exports2.handler = handler; + } +}); + +// ../find-workspace-dir/lib/index.js +var require_lib94 = __commonJS({ + "../find-workspace-dir/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var find_up_1 = __importDefault(require_find_up()); + var WORKSPACE_DIR_ENV_VAR = "NPM_CONFIG_WORKSPACE_DIR"; + var WORKSPACE_MANIFEST_FILENAME = "pnpm-workspace.yaml"; + async function findWorkspaceDir(cwd) { + var _a; + const workspaceManifestDirEnvVar = (_a = process.env[WORKSPACE_DIR_ENV_VAR]) !== null && _a !== void 0 ? _a : process.env[WORKSPACE_DIR_ENV_VAR.toLowerCase()]; + const workspaceManifestLocation = workspaceManifestDirEnvVar ? path_1.default.join(workspaceManifestDirEnvVar, "pnpm-workspace.yaml") : await find_up_1.default([WORKSPACE_MANIFEST_FILENAME, "pnpm-workspace.yml"], { cwd }); + if (workspaceManifestLocation === null || workspaceManifestLocation === void 0 ? void 0 : workspaceManifestLocation.endsWith(".yml")) { + throw new error_1.default("BAD_WORKSPACE_MANIFEST_NAME", `The workspace manifest file should be named "pnpm-workspace.yaml". File found: ${workspaceManifestLocation}`); + } + return workspaceManifestLocation && path_1.default.dirname(workspaceManifestLocation); + } + exports2.default = findWorkspaceDir; + } +}); + +// ../plugin-commands-installation/lib/link.js +var require_link3 = __commonJS({ + "../plugin-commands-installation/lib/link.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var error_1 = __importDefault(require_lib8()); + var find_workspace_dir_1 = __importDefault(require_lib94()); + var find_workspace_packages_1 = __importStar2(require_lib22()); + var store_connection_manager_1 = require_lib63(); + var supi_1 = require_lib88(); + var p_limit_1 = __importDefault(require_p_limit()); + var path_absolute_1 = __importDefault(require_path_absolute()); + var pick_1 = __importDefault(require_pick()); + var partition_1 = __importDefault(require_partition4()); + var render_help_1 = __importDefault(require_lib30()); + var installCommand = __importStar2(require_install2()); + var getSaveType_1 = __importDefault(require_getSaveType()); + var isWindows = process.platform === "win32" || global["FAKE_WINDOWS"]; + var isFilespec = isWindows ? /^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/ : /^(?:[.]|~[/]|[/]|[a-zA-Z]:)/; + var installLimit = p_limit_1.default(4); + exports2.rcOptionsTypes = cliOptionsTypes; + function cliOptionsTypes() { + return pick_1.default([ + "global-dir", + "global", + "only", + "package-import-method", + "production", + "registry", + "reporter", + "save-dev", + "save-exact", + "save-optional", + "unsafe-perm" + ], config_1.types); + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["link", "ln"]; + function help() { + return render_help_1.default({ + aliases: ["ln"], + descriptionLists: [ + { + title: "Options", + list: [ + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + } + ], + url: cli_utils_1.docsUrl("link"), + usages: [ + "pnpm link (in package dir)", + "pnpm link ", + "pnpm link " + ] + }); + } + exports2.help = help; + async function handler(opts, params) { + const cwd = process.cwd(); + const storeControllerCache = new Map(); + let workspacePackagesArr; + let workspacePackages; + if (opts.workspaceDir) { + workspacePackagesArr = await find_workspace_packages_1.default(opts.workspaceDir, opts); + workspacePackages = find_workspace_packages_1.arrayOfWorkspacePackagesToMap(workspacePackagesArr); + } else { + workspacePackages = {}; + } + const store = await store_connection_manager_1.createOrConnectStoreControllerCached(storeControllerCache, opts); + const linkOpts = Object.assign(opts, { + storeController: store.ctrl, + storeDir: store.dir, + targetDependenciesField: getSaveType_1.default(opts), + workspacePackages + }); + if (params == null || params.length === 0) { + if (path_1.default.relative(linkOpts.dir, cwd) === "") { + throw new error_1.default("LINK_BAD_PARAMS", "You must provide a parameter"); + } + const { manifest: manifest2, writeProjectManifest: writeProjectManifest2 } = await cli_utils_1.tryReadProjectManifest(opts.dir, opts); + const newManifest2 = await supi_1.linkToGlobal(cwd, { + ...linkOpts, + dir: cwd, + globalBin: linkOpts.bin, + globalDir: linkOpts.dir, + manifest: manifest2 !== null && manifest2 !== void 0 ? manifest2 : {} + }); + await writeProjectManifest2(newManifest2); + return; + } + const [pkgPaths, pkgNames] = partition_1.default((inp) => isFilespec.test(inp), params); + await Promise.all(pkgPaths.map(async (dir) => installLimit(async () => { + const s = await store_connection_manager_1.createOrConnectStoreControllerCached(storeControllerCache, opts); + const config = await cli_utils_1.getConfig({ ...opts.cliOptions, dir }, { + excludeReporter: true, + rcOptionsTypes: installCommand.rcOptionsTypes(), + workspaceDir: await find_workspace_dir_1.default(dir) + }); + await supi_1.install(await cli_utils_1.readProjectManifestOnly(dir, opts), { + ...config, + include: { + dependencies: config.production !== false, + devDependencies: config.dev !== false, + optionalDependencies: config.optional !== false + }, + storeController: s.ctrl, + storeDir: s.dir, + workspacePackages + }); + }))); + if (pkgNames.length > 0) { + let globalPkgNames; + if (opts.workspaceDir) { + workspacePackagesArr = await find_workspace_packages_1.default(opts.workspaceDir, opts); + const pkgsFoundInWorkspace = workspacePackagesArr.filter(({ manifest: manifest2 }) => manifest2.name && pkgNames.includes(manifest2.name)); + pkgsFoundInWorkspace.forEach((pkgFromWorkspace) => pkgPaths.push(pkgFromWorkspace.dir)); + if (pkgsFoundInWorkspace.length > 0 && !linkOpts.targetDependenciesField) { + linkOpts.targetDependenciesField = "dependencies"; + } + globalPkgNames = pkgNames.filter((pkgName) => !pkgsFoundInWorkspace.some((pkgFromWorkspace) => pkgFromWorkspace.manifest.name === pkgName)); + } else { + globalPkgNames = pkgNames; + } + const globalPkgPath = path_absolute_1.default(opts.dir); + globalPkgNames.forEach((pkgName) => pkgPaths.push(path_1.default.join(globalPkgPath, "node_modules", pkgName))); + } + const { manifest, writeProjectManifest } = await cli_utils_1.readProjectManifest(cwd, opts); + const linkConfig = await cli_utils_1.getConfig({ ...opts.cliOptions, dir: cwd }, { + excludeReporter: true, + rcOptionsTypes: installCommand.rcOptionsTypes(), + workspaceDir: await find_workspace_dir_1.default(cwd) + }); + const storeL = await store_connection_manager_1.createOrConnectStoreControllerCached(storeControllerCache, linkConfig); + const newManifest = await supi_1.link(pkgPaths, path_1.default.join(cwd, "node_modules"), { + ...linkConfig, + targetDependenciesField: linkOpts.targetDependenciesField, + storeController: storeL.ctrl, + storeDir: storeL.dir, + manifest + }); + await writeProjectManifest(newManifest); + await Promise.all(Array.from(storeControllerCache.values()).map(async (storeControllerPromise) => { + const storeControllerHolder = await storeControllerPromise; + await storeControllerHolder.ctrl.close(); + })); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-installation/lib/prune.js +var require_prune3 = __commonJS({ + "../plugin-commands-installation/lib/prune.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var store_connection_manager_1 = require_lib63(); + var supi_1 = require_lib88(); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + exports2.rcOptionsTypes = cliOptionsTypes; + function cliOptionsTypes() { + return pick_1.default([ + "dev", + "optional", + "production" + ], config_1.types); + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["prune"]; + function help() { + return render_help_1.default({ + description: "Removes extraneous packages", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "Remove the packages specified in `devDependencies`", + name: "--prod" + }, + { + description: "Remove the packages specified in `optionalDependencies`", + name: "--no-optional" + }, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + } + ], + url: cli_utils_1.docsUrl("prune"), + usages: ["pnpm prune [--prod]"] + }); + } + exports2.help = help; + async function handler(opts) { + const store = await store_connection_manager_1.createOrConnectStoreController(opts); + return supi_1.mutateModules([ + { + buildIndex: 0, + manifest: await cli_utils_1.readProjectManifestOnly(process.cwd(), opts), + mutation: "install", + pruneDirectDependencies: true, + rootDir: process.cwd() + } + ], { + ...opts, + include: { + dependencies: opts.production !== false, + devDependencies: opts.dev !== false, + optionalDependencies: opts.optional !== false + }, + modulesCacheMaxAge: 0, + pruneStore: true, + storeController: store.ctrl, + storeDir: store.dir + }); + } + exports2.handler = handler; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/flip.js +var require_flip = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/flip.js"(exports2, module2) { + var _curry1 = require_curry1(); + var curryN = require_curryN2(); + var flip = /* @__PURE__ */ _curry1(function flip2(fn2) { + return curryN(fn2.length, function(a, b) { + var args2 = Array.prototype.slice.call(arguments, 0); + args2[0] = b; + args2[1] = a; + return fn2.apply(this, args2); + }); + }); + module2.exports = flip; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/without.js +var require_without = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/without.js"(exports2, module2) { + var _includes = require_includes(); + var _curry2 = require_curry2(); + var flip = require_flip(); + var reject = require_reject(); + var without = /* @__PURE__ */ _curry2(function(xs, list) { + return reject(flip(_includes)(xs), list); + }); + module2.exports = without; + } +}); + +// ../plugin-commands-installation/lib/remove.js +var require_remove = __commonJS({ + "../plugin-commands-installation/lib/remove.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.completion = exports2.commandNames = exports2.help = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var error_1 = __importDefault(require_lib8()); + var find_workspace_packages_1 = __importStar2(require_lib22()); + var manifest_utils_1 = require_lib15(); + var pnpmfile_1 = require_lib91(); + var store_connection_manager_1 = require_lib63(); + var supi_1 = require_lib88(); + var pick_1 = __importDefault(require_pick()); + var without_1 = __importDefault(require_without()); + var render_help_1 = __importDefault(require_lib30()); + var getSaveType_1 = __importDefault(require_getSaveType()); + var recursive_1 = __importDefault(require_recursive2()); + var RemoveMissingDepsError = class extends error_1.default { + constructor(opts) { + let message2 = "Cannot remove "; + message2 += `${opts.nonMatchedDependencies.map((dep) => `'${dep}'`).join(", ")}: `; + if (opts.availableDependencies.length > 0) { + message2 += `no such ${opts.nonMatchedDependencies.length > 1 ? "dependencies" : "dependency"} `; + message2 += `found${opts.targetDependenciesField ? ` in '${opts.targetDependenciesField}'` : ""}`; + const hint = `Available dependencies: ${opts.availableDependencies.join(", ")}`; + super("CANNOT_REMOVE_MISSING_DEPS", message2, { hint }); + return; + } + message2 += opts.targetDependenciesField ? `project has no '${opts.targetDependenciesField}'` : "project has no dependencies of any kind"; + super("CANNOT_REMOVE_MISSING_DEPS", message2); + } + }; + function rcOptionsTypes() { + return pick_1.default([ + "global-dir", + "global-pnpmfile", + "global", + "lockfile-dir", + "lockfile-directory", + "lockfile-only", + "lockfile", + "package-import-method", + "pnpmfile", + "reporter", + "save-dev", + "save-optional", + "save-prod", + "shared-workspace-lockfile", + "store", + "store-dir", + "virtual-store-dir" + ], config_1.types); + } + exports2.rcOptionsTypes = rcOptionsTypes; + var cliOptionsTypes = () => ({ + ...rcOptionsTypes(), + ...pick_1.default(["force"], config_1.types), + recursive: Boolean + }); + exports2.cliOptionsTypes = cliOptionsTypes; + function help() { + return render_help_1.default({ + aliases: ["rm", "uninstall", "un"], + description: "Removes packages from `node_modules` and from the project's `package.json`.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: 'Remove from every package found in subdirectories or from every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + }, + { + description: 'Remove the dependency only from "devDependencies"', + name: "--save-dev", + shortAlias: "-D" + }, + { + description: 'Remove the dependency only from "optionalDependencies"', + name: "--save-optional", + shortAlias: "-O" + }, + { + description: 'Remove the dependency only from "dependencies"', + name: "--save-prod", + shortAlias: "-P" + }, + common_cli_options_help_1.OPTIONS.globalDir, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + }, + common_cli_options_help_1.FILTERING + ], + url: cli_utils_1.docsUrl("remove"), + usages: ["pnpm remove [@]..."] + }); + } + exports2.help = help; + exports2.commandNames = ["remove", "uninstall", "rm", "un"]; + var completion = async (cliOpts, params) => { + return cli_utils_1.readDepNameCompletions(cliOpts.dir); + }; + exports2.completion = completion; + async function handler(opts, params) { + var _a, _b; + if (params.length === 0) + throw new error_1.default("MUST_REMOVE_SOMETHING", "At least one dependency name should be specified for removal"); + const include = { + dependencies: opts.production !== false, + devDependencies: opts.dev !== false, + optionalDependencies: opts.optional !== false + }; + if (opts.recursive && opts.allProjects != null && opts.selectedProjectsGraph != null && opts.workspaceDir) { + await recursive_1.default(opts.allProjects, params, { ...opts, include, selectedProjectsGraph: opts.selectedProjectsGraph, workspaceDir: opts.workspaceDir }, "remove"); + return; + } + const store = await store_connection_manager_1.createOrConnectStoreController(opts); + const removeOpts = Object.assign(opts, { + storeController: store.ctrl, + storeDir: store.dir, + include + }); + if (!opts.ignorePnpmfile) { + removeOpts["hooks"] = pnpmfile_1.requireHooks((_a = opts.lockfileDir) !== null && _a !== void 0 ? _a : opts.dir, opts); + } + removeOpts["workspacePackages"] = opts.workspaceDir ? find_workspace_packages_1.arrayOfWorkspacePackagesToMap(await find_workspace_packages_1.default(opts.workspaceDir, opts)) : void 0; + const targetDependenciesField = getSaveType_1.default(opts); + const { manifest: currentManifest, writeProjectManifest } = await cli_utils_1.readProjectManifest(opts.dir, opts); + const availableDependencies = Object.keys(targetDependenciesField === void 0 ? manifest_utils_1.getAllDependenciesFromManifest(currentManifest) : (_b = currentManifest[targetDependenciesField]) !== null && _b !== void 0 ? _b : {}); + const nonMatchedDependencies = without_1.default(availableDependencies, params); + if (nonMatchedDependencies.length !== 0) { + throw new RemoveMissingDepsError({ + availableDependencies, + nonMatchedDependencies, + targetDependenciesField + }); + } + const [mutationResult] = await supi_1.mutateModules([ + { + binsDir: opts.bin, + dependencyNames: params, + manifest: currentManifest, + mutation: "uninstallSome", + rootDir: opts.dir, + targetDependenciesField + } + ], removeOpts); + await writeProjectManifest(mutationResult.manifest); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-installation/lib/unlink.js +var require_unlink = __commonJS({ + "../plugin-commands-installation/lib/unlink.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.rcOptionsTypes = exports2.cliOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var store_connection_manager_1 = require_lib63(); + var supi_1 = require_lib88(); + var render_help_1 = __importDefault(require_lib30()); + var install_1 = require_install2(); + Object.defineProperty(exports2, "cliOptionsTypes", { enumerable: true, get: function() { + return install_1.cliOptionsTypes; + } }); + Object.defineProperty(exports2, "rcOptionsTypes", { enumerable: true, get: function() { + return install_1.rcOptionsTypes; + } }); + var recursive_1 = __importDefault(require_recursive2()); + exports2.commandNames = ["unlink", "dislink"]; + function help() { + return render_help_1.default({ + aliases: ["dislink"], + description: "Removes the link created by `pnpm link` and reinstalls package if it is saved in `package.json`", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: 'Unlink in every package found in subdirectories or in every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + }, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + } + ], + url: cli_utils_1.docsUrl("unlink"), + usages: [ + "pnpm unlink (in package dir)", + "pnpm unlink ..." + ] + }); + } + exports2.help = help; + async function handler(opts, params) { + if (opts.recursive && opts.allProjects != null && opts.selectedProjectsGraph != null && opts.workspaceDir) { + await recursive_1.default(opts.allProjects, params, { ...opts, selectedProjectsGraph: opts.selectedProjectsGraph, workspaceDir: opts.workspaceDir }, "unlink"); + return; + } + const store = await store_connection_manager_1.createOrConnectStoreController(opts); + const unlinkOpts = Object.assign(opts, { + globalBin: opts.bin, + storeController: store.ctrl, + storeDir: store.dir + }); + if (!params || params.length === 0) { + return supi_1.mutateModules([ + { + dependencyNames: params, + manifest: await cli_utils_1.readProjectManifestOnly(opts.dir, opts), + mutation: "unlinkSome", + rootDir: opts.dir + } + ], unlinkOpts); + } + return supi_1.mutateModules([ + { + manifest: await cli_utils_1.readProjectManifestOnly(opts.dir, opts), + mutation: "unlink", + rootDir: opts.dir + } + ], unlinkOpts); + } + exports2.handler = handler; + } +}); + +// ../outdated/lib/createManifestGetter.js +var require_createManifestGetter = __commonJS({ + "../outdated/lib/createManifestGetter.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getManifest = exports2.createManifestGetter = void 0; + var client_1 = require_lib49(); + var pick_registry_for_package_1 = __importDefault(require_lib50()); + function createManifestGetter(opts) { + const resolve = client_1.createResolver({ ...opts, authConfig: opts.rawConfig }); + return getManifest.bind(null, resolve, opts); + } + exports2.createManifestGetter = createManifestGetter; + async function getManifest(resolve, opts, packageName, pref) { + var _a; + const resolution = await resolve({ alias: packageName, pref }, { + lockfileDir: opts.lockfileDir, + preferredVersions: {}, + projectDir: opts.dir, + registry: pick_registry_for_package_1.default(opts.registries, packageName, pref) + }); + return (_a = resolution === null || resolution === void 0 ? void 0 : resolution.manifest) !== null && _a !== void 0 ? _a : null; + } + exports2.getManifest = getManifest; + } +}); + +// ../outdated/lib/outdated.js +var require_outdated = __commonJS({ + "../outdated/lib/outdated.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) + __createBinding2(exports3, m, p); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var constants_1 = require_lib7(); + var error_1 = __importDefault(require_lib8()); + var lockfile_file_1 = require_lib57(); + var lockfile_utils_1 = require_lib53(); + var manifest_utils_1 = require_lib15(); + var types_1 = require_lib14(); + var dp = __importStar2(require_lib33()); + var semver_1 = __importDefault(require_semver2()); + __exportStar(require_createManifestGetter(), exports2); + async function outdated(opts) { + var _a; + if (packageHasNoDeps(opts.manifest)) + return []; + if (opts.wantedLockfile == null) { + throw new error_1.default("OUTDATED_NO_LOCKFILE", "No lockfile in this directory. Run `pnpm install` to generate one."); + } + const allDeps = manifest_utils_1.getAllDependenciesFromManifest(opts.manifest); + const importerId = lockfile_file_1.getLockfileImporterId(opts.lockfileDir, opts.prefix); + const currentLockfile = (_a = opts.currentLockfile) !== null && _a !== void 0 ? _a : { importers: { [importerId]: {} } }; + const outdated2 = []; + await Promise.all(types_1.DEPENDENCIES_FIELDS.map(async (depType) => { + var _a2; + if (((_a2 = opts.include) === null || _a2 === void 0 ? void 0 : _a2[depType]) === false || opts.wantedLockfile.importers[importerId][depType] == null) + return; + let pkgs = Object.keys(opts.wantedLockfile.importers[importerId][depType]); + if (opts.match != null) { + pkgs = pkgs.filter((pkgName) => opts.match(pkgName)); + } + await Promise.all(pkgs.map(async (alias) => { + var _a3, _b, _c, _d, _e, _f, _g; + const ref = opts.wantedLockfile.importers[importerId][depType][alias]; + if (ref.startsWith("file:")) { + return; + } + const relativeDepPath = dp.refToRelative(ref, alias); + if (relativeDepPath === null) + return; + const pkgSnapshot = (_a3 = opts.wantedLockfile.packages) === null || _a3 === void 0 ? void 0 : _a3[relativeDepPath]; + if (pkgSnapshot == null) { + throw new Error(`Invalid ${constants_1.WANTED_LOCKFILE} file. ${relativeDepPath} not found in packages field`); + } + const currentRef = (_c = (_b = currentLockfile.importers[importerId]) === null || _b === void 0 ? void 0 : _b[depType]) === null || _c === void 0 ? void 0 : _c[alias]; + const currentRelative = currentRef && dp.refToRelative(currentRef, alias); + const current = (_d = currentRelative && dp.parse(currentRelative).version) !== null && _d !== void 0 ? _d : currentRef; + const wanted = (_e = dp.parse(relativeDepPath).version) !== null && _e !== void 0 ? _e : ref; + const { name: packageName } = lockfile_utils_1.nameVerFromPkgSnapshot(relativeDepPath, pkgSnapshot); + if (pkgSnapshot.resolution && (pkgSnapshot.resolution["type"] || pkgSnapshot.name)) { + if (current !== wanted) { + outdated2.push({ + alias, + belongsTo: depType, + current, + latestManifest: void 0, + packageName, + wanted + }); + } + return; + } + const name = (_f = dp.parse(relativeDepPath).name) !== null && _f !== void 0 ? _f : packageName; + const latestManifest = await opts.getLatestManifest(name, opts.compatible ? (_g = allDeps[name]) !== null && _g !== void 0 ? _g : "latest" : "latest"); + if (latestManifest == null) + return; + if (!current) { + outdated2.push({ + alias, + belongsTo: depType, + latestManifest, + packageName, + wanted + }); + return; + } + if (current !== wanted || semver_1.default.lt(current, latestManifest.version) || latestManifest.deprecated) { + outdated2.push({ + alias, + belongsTo: depType, + current, + latestManifest, + packageName, + wanted + }); + } + })); + })); + return outdated2.sort((pkg1, pkg2) => pkg1.packageName.localeCompare(pkg2.packageName)); + } + exports2.default = outdated; + function packageHasNoDeps(manifest) { + return (manifest.dependencies == null || isEmpty(manifest.dependencies)) && (manifest.devDependencies == null || isEmpty(manifest.devDependencies)) && (manifest.optionalDependencies == null || isEmpty(manifest.optionalDependencies)); + } + function isEmpty(obj) { + return Object.keys(obj).length === 0; + } + } +}); + +// ../outdated/lib/outdatedDepsOfProjects.js +var require_outdatedDepsOfProjects = __commonJS({ + "../outdated/lib/outdatedDepsOfProjects.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var lockfile_file_1 = require_lib57(); + var matcher_1 = __importDefault(require_lib23()); + var modules_yaml_1 = require_lib64(); + var unnest_1 = __importDefault(require_unnest()); + var createManifestGetter_1 = require_createManifestGetter(); + var outdated_1 = __importDefault(require_outdated()); + async function outdatedDepsOfProjects(pkgs, args2, opts) { + var _a, _b, _c; + if (!opts.lockfileDir) { + return unnest_1.default(await Promise.all(pkgs.map(async (pkg) => outdatedDepsOfProjects([pkg], args2, { ...opts, lockfileDir: pkg.dir })))); + } + const lockfileDir = (_a = opts.lockfileDir) !== null && _a !== void 0 ? _a : opts.dir; + const modules = await modules_yaml_1.read(path_1.default.join(lockfileDir, "node_modules")); + const virtualStoreDir = (_b = modules === null || modules === void 0 ? void 0 : modules.virtualStoreDir) !== null && _b !== void 0 ? _b : path_1.default.join(lockfileDir, "node_modules/.pnpm"); + const currentLockfile = await lockfile_file_1.readCurrentLockfile(virtualStoreDir, { ignoreIncompatible: false }); + const wantedLockfile = (_c = await lockfile_file_1.readWantedLockfile(lockfileDir, { ignoreIncompatible: false })) !== null && _c !== void 0 ? _c : currentLockfile; + const getLatestManifest = createManifestGetter_1.createManifestGetter({ + ...opts, + fullMetadata: opts.fullMetadata === true, + lockfileDir + }); + return Promise.all(pkgs.map(async ({ dir, manifest }) => { + const match = args2.length > 0 && matcher_1.default(args2) || void 0; + return outdated_1.default({ + compatible: opts.compatible, + currentLockfile, + getLatestManifest, + include: opts.include, + lockfileDir, + manifest, + match, + prefix: dir, + wantedLockfile + }); + })); + } + exports2.default = outdatedDepsOfProjects; + } +}); + +// ../outdated/lib/index.js +var require_lib95 = __commonJS({ + "../outdated/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.outdatedDepsOfProjects = void 0; + var outdatedDepsOfProjects_1 = __importDefault(require_outdatedDepsOfProjects()); + exports2.outdatedDepsOfProjects = outdatedDepsOfProjects_1.default; + } +}); + +// ../../node_modules/.pnpm/@pnpm+colorize-semver-diff@1.0.1/node_modules/@pnpm/colorize-semver-diff/lib/index.js +var require_lib96 = __commonJS({ + "../../node_modules/.pnpm/@pnpm+colorize-semver-diff@1.0.1/node_modules/@pnpm/colorize-semver-diff/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var chalk = require_source(); + var DIFF_COLORS = { + feature: chalk.yellowBright.bold, + fix: chalk.greenBright.bold + }; + function colorizeSemverDiff(semverDiff) { + var _a; + if (!semverDiff) { + throw new TypeError("semverDiff must be defined"); + } + if (typeof semverDiff.change !== "string") { + throw new TypeError("semverDiff.change must be defined"); + } + const highlight = (_a = DIFF_COLORS[semverDiff.change]) !== null && _a !== void 0 ? _a : chalk.redBright.bold; + const same = joinVersionTuples(semverDiff.diff[0], 0); + const other = highlight(joinVersionTuples(semverDiff.diff[1], semverDiff.diff[0].length)); + if (!same) + return other; + if (!other) { + return same; + } + return semverDiff.diff[0].length === 3 ? `${same}-${other}` : `${same}.${other}`; + } + exports2.default = colorizeSemverDiff; + function joinVersionTuples(versionTuples, startIndex) { + const neededForSemver = 3 - startIndex; + if (versionTuples.length <= neededForSemver || neededForSemver <= 0) { + return versionTuples.join("."); + } + return `${versionTuples.slice(0, neededForSemver).join(".")}-${versionTuples.slice(neededForSemver).join(".")}`; + } + } +}); + +// ../../node_modules/.pnpm/@pnpm+semver-diff@1.0.2/node_modules/@pnpm/semver-diff/lib/index.js +var require_lib97 = __commonJS({ + "../../node_modules/.pnpm/@pnpm+semver-diff@1.0.2/node_modules/@pnpm/semver-diff/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var SEMVER_CHANGE_BY_TUPLE_NUMBER = ["breaking", "feature", "fix"]; + function semverDiff(version1, version2) { + if (version1 === version2) { + return { + change: null, + diff: [parseVersion(version1), []] + }; + } + const version1Tuples = parseVersion(version1); + const version2Tuples = parseVersion(version2); + const same = []; + let change = "unknown"; + const maxTuples = Math.max(version1Tuples.length, version2Tuples.length); + let unstable = version1Tuples[0] === "0" || version2Tuples[0] === "0" || maxTuples > 3; + for (let i = 0; i < maxTuples; i++) { + if (version1Tuples[i] === version2Tuples[i]) { + same.push(version1Tuples[i]); + continue; + } + if (unstable === false) { + change = SEMVER_CHANGE_BY_TUPLE_NUMBER[i] || "unknown"; + } + return { + change, + diff: [same, version2Tuples.slice(i)] + }; + } + return { + change, + diff: [same, []] + }; + } + exports2.default = semverDiff; + function parseVersion(version) { + const dashIndex = version.indexOf("-"); + let normalVersion; + let prereleaseVersion; + if (dashIndex === -1) { + normalVersion = version; + } else { + normalVersion = version.substr(0, dashIndex); + prereleaseVersion = version.substr(dashIndex + 1); + } + return [ + ...normalVersion.split("."), + ...typeof prereleaseVersion !== "undefined" ? prereleaseVersion.split(".") : [] + ]; + } + } +}); + +// ../plugin-commands-installation/lib/update/getUpdateChoices.js +var require_getUpdateChoices = __commonJS({ + "../plugin-commands-installation/lib/update/getUpdateChoices.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var colorize_semver_diff_1 = __importDefault(require_lib96()); + var semver_diff_1 = __importDefault(require_lib97()); + var table_1 = require_dist10(); + var isEmpty_1 = __importDefault(require_isEmpty2()); + var unnest_1 = __importDefault(require_unnest()); + function default_1(outdatedPkgsOfProjects) { + const allOutdatedPkgs = mergeOutdatedPkgs(outdatedPkgsOfProjects); + if (isEmpty_1.default(allOutdatedPkgs)) { + return []; + } + const rowsGroupedByPkgs = Object.entries(allOutdatedPkgs).sort(([pkgName1], [pkgName2]) => pkgName1.localeCompare(pkgName2)).map(([pkgName, outdatedPkgs]) => ({ + pkgName, + rows: outdatedPkgsRows(Object.values(outdatedPkgs)) + })); + const renderedTable = alignColumns(unnest_1.default(rowsGroupedByPkgs.map(({ rows }) => rows))); + const choices = []; + let i = 0; + for (const { pkgName, rows } of rowsGroupedByPkgs) { + choices.push({ + message: renderedTable.slice(i, i + rows.length).join("\n "), + name: pkgName + }); + i += rows.length; + } + return choices; + } + exports2.default = default_1; + function mergeOutdatedPkgs(outdatedPkgs) { + var _a; + const allOutdatedPkgs = {}; + for (const outdatedPkg of outdatedPkgs) { + if (!allOutdatedPkgs[outdatedPkg.packageName]) { + allOutdatedPkgs[outdatedPkg.packageName] = {}; + } + const key = JSON.stringify([ + (_a = outdatedPkg.latestManifest) === null || _a === void 0 ? void 0 : _a.version, + outdatedPkg.current + ]); + if (!allOutdatedPkgs[outdatedPkg.packageName][key]) { + allOutdatedPkgs[outdatedPkg.packageName][key] = outdatedPkg; + continue; + } + if (allOutdatedPkgs[outdatedPkg.packageName][key].belongsTo === "dependencies") + continue; + if (outdatedPkg.belongsTo !== "devDependencies") { + allOutdatedPkgs[outdatedPkg.packageName][key].belongsTo = outdatedPkg.belongsTo; + } + } + return allOutdatedPkgs; + } + function outdatedPkgsRows(outdatedPkgs) { + return outdatedPkgs.map((outdatedPkg) => { + const sdiff = semver_diff_1.default(outdatedPkg.wanted, outdatedPkg.latestManifest.version); + const nextVersion = sdiff.change === null ? outdatedPkg.latestManifest.version : colorize_semver_diff_1.default(sdiff); + let label = outdatedPkg.packageName; + switch (outdatedPkg.belongsTo) { + case "devDependencies": { + label += " (dev)"; + break; + } + case "optionalDependencies": { + label += " (optional)"; + break; + } + } + return [label, outdatedPkg.current, "\u276F", nextVersion]; + }); + } + function alignColumns(rows) { + return table_1.table(rows, { + border: table_1.getBorderCharacters("void"), + columnDefault: { + paddingLeft: 0, + paddingRight: 1 + }, + columns: { + 1: { alignment: "right" } + }, + drawHorizontalLine: () => false + }).split("\n"); + } + } +}); + +// ../plugin-commands-installation/lib/update/index.js +var require_update = __commonJS({ + "../plugin-commands-installation/lib/update/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.completion = exports2.commandNames = exports2.shorthands = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var matcher_1 = __importDefault(require_lib23()); + var outdated_1 = require_lib95(); + var enquirer_1 = require_enquirer(); + var chalk_1 = __importDefault(require_source()); + var pick_1 = __importDefault(require_pick()); + var unnest_1 = __importDefault(require_unnest()); + var render_help_1 = __importDefault(require_lib30()); + var installDeps_1 = __importDefault(require_installDeps()); + var getUpdateChoices_1 = __importDefault(require_getUpdateChoices()); + function rcOptionsTypes() { + return pick_1.default([ + "depth", + "dev", + "engine-strict", + "fetch-retries", + "fetch-retry-factor", + "fetch-retry-maxtimeout", + "fetch-retry-mintimeout", + "fetch-timeout", + "force", + "global-dir", + "global-pnpmfile", + "global", + "https-proxy", + "ignore-pnpmfile", + "ignore-scripts", + "lockfile-dir", + "lockfile-directory", + "lockfile-only", + "lockfile", + "network-concurrency", + "noproxy", + "npmPath", + "offline", + "only", + "optional", + "package-import-method", + "pnpmfile", + "prefer-offline", + "production", + "proxy", + "registry", + "reporter", + "save", + "save-exact", + "save-workspace-protocol", + "shamefully-flatten", + "shamefully-hoist", + "shared-workspace-lockfile", + "side-effects-cache-readonly", + "side-effects-cache", + "store", + "store-dir", + "unsafe-perm", + "use-running-store-server" + ], config_1.types); + } + exports2.rcOptionsTypes = rcOptionsTypes; + function cliOptionsTypes() { + return { + ...rcOptionsTypes(), + interactive: Boolean, + latest: Boolean, + recursive: Boolean, + workspace: Boolean + }; + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.shorthands = { + D: "--dev", + P: "--production" + }; + exports2.commandNames = ["update", "up", "upgrade"]; + var completion = async (cliOpts) => { + return cli_utils_1.readDepNameCompletions(cliOpts.dir); + }; + exports2.completion = completion; + function help() { + return render_help_1.default({ + aliases: ["up", "upgrade"], + description: 'Updates packages to their latest version based on the specified range. You can use "*" in package name to update all packages with the same pattern.', + descriptionLists: [ + { + title: "Options", + list: [ + { + description: 'Update in every package found in subdirectories or every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + }, + { + description: "Update globally installed packages", + name: "--global", + shortAlias: "-g" + }, + { + description: "How deep should levels of dependencies be inspected. Infinity is default. 0 would mean top-level dependencies only", + name: "--depth " + }, + { + description: "Ignore version ranges in package.json", + name: "--latest", + shortAlias: "-L" + }, + { + description: 'Update packages only in "dependencies" and "optionalDependencies"', + name: "--prod", + shortAlias: "-P" + }, + { + description: 'Update packages only in "devDependencies"', + name: "--dev", + shortAlias: "-D" + }, + { + description: `Don't update packages in "optionalDependencies"`, + name: "--no-optional" + }, + { + description: "Tries to link all packages from the workspace. Versions are updated to match the versions of packages inside the workspace. If specific packages are updated, the command will fail if any of the updated dependencies is not found inside the workspace", + name: "--workspace" + }, + { + description: "Show outdated dependencies and select which ones to update", + name: "--interactive", + shortAlias: "-i" + }, + common_cli_options_help_1.OPTIONS.globalDir, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + }, + common_cli_options_help_1.FILTERING + ], + url: cli_utils_1.docsUrl("update"), + usages: ["pnpm update [-g] [...]"] + }); + } + exports2.help = help; + async function handler(opts, params = []) { + if (opts.interactive) { + return interactiveUpdate(params, opts); + } + return update(params, opts); + } + exports2.handler = handler; + async function interactiveUpdate(input, opts) { + const include = makeIncludeDependenciesFromCLI(opts.cliOptions); + const projects = opts.selectedProjectsGraph != null ? Object.values(opts.selectedProjectsGraph).map((wsPkg) => wsPkg.package) : [ + { + dir: opts.dir, + manifest: await cli_utils_1.readProjectManifestOnly(opts.dir, opts) + } + ]; + const outdatedPkgsOfProjects = await outdated_1.outdatedDepsOfProjects(projects, input, { + ...opts, + compatible: opts.latest !== true, + include, + retry: { + factor: opts.fetchRetryFactor, + maxTimeout: opts.fetchRetryMaxtimeout, + minTimeout: opts.fetchRetryMintimeout, + retries: opts.fetchRetries + }, + timeout: opts.fetchTimeout + }); + const choices = getUpdateChoices_1.default(unnest_1.default(outdatedPkgsOfProjects)); + if (choices.length === 0) { + if (opts.latest) { + return "All of your dependencies are already up-to-date"; + } + return "All of your dependencies are already up-to-date inside the specified ranges. Use the --latest option to update the ranges in package.json"; + } + const { updateDependencies } = await enquirer_1.prompt({ + choices, + footer: "\nEnter to start updating. Ctrl-c to cancel.", + indicator(state, choice) { + return ` ${choice.enabled ? "\u25CF" : "\u25CB"}`; + }, + message: `Choose which packages to update (Press ${chalk_1.default.cyan("")} to select, ${chalk_1.default.cyan("")} to toggle all, ${chalk_1.default.cyan("")} to invert selection)`, + name: "updateDependencies", + pointer: "\u276F", + styles: { + dark: chalk_1.default.white, + em: chalk_1.default.bgBlack.whiteBright, + success: chalk_1.default.white + }, + type: "multiselect", + validate(value) { + if (value.length === 0) { + return "You must choose at least one package."; + } + return true; + }, + j() { + return this.down(); + }, + k() { + return this.up(); + } + }); + return update(updateDependencies, opts); + } + async function update(dependencies, opts) { + var _a; + const includeDirect = makeIncludeDependenciesFromCLI(opts.cliOptions); + const include = { + dependencies: opts.rawConfig.production !== false, + devDependencies: opts.rawConfig.dev !== false, + optionalDependencies: opts.rawConfig.optional !== false + }; + const depth = (_a = opts.depth) !== null && _a !== void 0 ? _a : Infinity; + return installDeps_1.default({ + ...opts, + allowNew: false, + depth, + includeDirect, + include, + update: true, + updateMatching: dependencies.length > 0 && dependencies.every((dep) => !dep.substring(1).includes("@")) && depth > 0 && !opts.latest ? matcher_1.default(dependencies) : void 0, + updatePackageManifest: opts.save !== false + }, dependencies); + } + function makeIncludeDependenciesFromCLI(opts) { + return { + dependencies: opts.production === true || opts.dev !== true && opts.optional !== true, + devDependencies: opts.dev === true || opts.production !== true && opts.optional !== true, + optionalDependencies: opts.optional === true || opts.production !== true && opts.dev !== true + }; + } + } +}); + +// ../plugin-commands-installation/lib/index.js +var require_lib98 = __commonJS({ + "../plugin-commands-installation/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.update = exports2.unlink = exports2.remove = exports2.prune = exports2.link = exports2.install = exports2.fetch = exports2.add = void 0; + var add = __importStar2(require_add()); + exports2.add = add; + var install = __importStar2(require_install2()); + exports2.install = install; + var fetch = __importStar2(require_fetch3()); + exports2.fetch = fetch; + var link = __importStar2(require_link3()); + exports2.link = link; + var prune = __importStar2(require_prune3()); + exports2.prune = prune; + var remove = __importStar2(require_remove()); + exports2.remove = remove; + var unlink = __importStar2(require_unlink()); + exports2.unlink = unlink; + var update = __importStar2(require_update()); + exports2.update = update; + } +}); + +// ../dependencies-hierarchy/lib/index.js +var require_lib99 = __commonJS({ + "../dependencies-hierarchy/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var lockfile_file_1 = require_lib57(); + var lockfile_utils_1 = require_lib53(); + var modules_yaml_1 = require_lib64(); + var normalize_registries_1 = __importDefault(require_lib65()); + var read_modules_dir_1 = __importDefault(require_lib69()); + var read_package_json_1 = require_lib32(); + var types_1 = require_lib14(); + var dependency_path_1 = require_lib33(); + var normalize_path_1 = __importDefault(require_normalize_path()); + var realpath_missing_1 = __importDefault(require_realpath_missing()); + var resolve_link_target_1 = __importDefault(require_resolve_link_target()); + async function dependenciesHierarchy(projectPaths, maybeOpts) { + var _a, _b, _c; + if (!maybeOpts || !maybeOpts.lockfileDir) { + throw new TypeError("opts.lockfileDir is required"); + } + const modulesDir = await realpath_missing_1.default(path_1.default.join(maybeOpts.lockfileDir, "node_modules")); + const modules = await modules_yaml_1.read(modulesDir); + const registries = normalize_registries_1.default({ + ...maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.registries, + ...modules === null || modules === void 0 ? void 0 : modules.registries + }); + const currentLockfile = (_a = (modules === null || modules === void 0 ? void 0 : modules.virtualStoreDir) && await lockfile_file_1.readCurrentLockfile(modules.virtualStoreDir, { ignoreIncompatible: false })) !== null && _a !== void 0 ? _a : null; + const result = {}; + if (!currentLockfile) { + for (const projectPath of projectPaths) { + result[projectPath] = {}; + } + return result; + } + const opts = { + depth: maybeOpts.depth || 0, + include: (_b = maybeOpts.include) !== null && _b !== void 0 ? _b : { + dependencies: true, + devDependencies: true, + optionalDependencies: true + }, + lockfileDir: maybeOpts.lockfileDir, + registries, + search: maybeOpts.search, + skipped: new Set((_c = modules === null || modules === void 0 ? void 0 : modules.skipped) !== null && _c !== void 0 ? _c : []) + }; + (await Promise.all(projectPaths.map(async (projectPath) => { + return [ + projectPath, + await dependenciesHierarchyForPackage(projectPath, currentLockfile, opts) + ]; + }))).forEach(([projectPath, dependenciesHierarchy2]) => { + result[projectPath] = dependenciesHierarchy2; + }); + return result; + } + exports2.default = dependenciesHierarchy; + async function dependenciesHierarchyForPackage(projectPath, currentLockfile, opts) { + var _a, _b, _c, _d, _e; + const importerId = lockfile_file_1.getLockfileImporterId(opts.lockfileDir, projectPath); + if (!currentLockfile.importers[importerId]) + return {}; + const modulesDir = path_1.default.join(projectPath, "node_modules"); + const savedDeps = getAllDirectDependencies(currentLockfile.importers[importerId]); + const allDirectDeps = (_a = await read_modules_dir_1.default(modulesDir)) !== null && _a !== void 0 ? _a : []; + const unsavedDeps = allDirectDeps.filter((directDep) => !savedDeps[directDep]); + const wantedLockfile = (_b = await lockfile_file_1.readWantedLockfile(opts.lockfileDir, { ignoreIncompatible: false })) !== null && _b !== void 0 ? _b : { packages: {} }; + const getChildrenTree = getTree.bind(null, { + currentDepth: 1, + currentPackages: (_c = currentLockfile.packages) !== null && _c !== void 0 ? _c : {}, + includeOptionalDependencies: opts.include.optionalDependencies, + lockfileDir: opts.lockfileDir, + maxDepth: opts.depth, + modulesDir, + registries: opts.registries, + search: opts.search, + skipped: opts.skipped, + wantedPackages: (_d = wantedLockfile.packages) !== null && _d !== void 0 ? _d : {} + }); + const result = {}; + for (const dependenciesField of types_1.DEPENDENCIES_FIELDS.sort().filter((dependenciedField) => opts.include[dependenciedField])) { + const topDeps = (_e = currentLockfile.importers[importerId][dependenciesField]) !== null && _e !== void 0 ? _e : {}; + result[dependenciesField] = []; + Object.keys(topDeps).forEach((alias) => { + var _a2, _b2, _c2; + const { packageInfo, packageAbsolutePath } = getPkgInfo({ + alias, + currentPackages: (_a2 = currentLockfile.packages) !== null && _a2 !== void 0 ? _a2 : {}, + lockfileDir: opts.lockfileDir, + modulesDir, + ref: topDeps[alias], + registries: opts.registries, + skipped: opts.skipped, + wantedPackages: (_b2 = wantedLockfile.packages) !== null && _b2 !== void 0 ? _b2 : {} + }); + let newEntry = null; + const matchedSearched = (_c2 = opts.search) === null || _c2 === void 0 ? void 0 : _c2.call(opts, packageInfo); + if (packageAbsolutePath === null) { + if (opts.search != null && !matchedSearched) + return; + newEntry = packageInfo; + } else { + const relativeId = dependency_path_1.refToRelative(topDeps[alias], alias); + if (relativeId) { + const dependencies = getChildrenTree([relativeId], relativeId); + if (dependencies.length > 0) { + newEntry = { + ...packageInfo, + dependencies + }; + } else if (opts.search == null || matchedSearched) { + newEntry = packageInfo; + } + } + } + if (newEntry != null) { + if (matchedSearched) { + newEntry.searched = true; + } + result[dependenciesField].push(newEntry); + } + }); + } + await Promise.all(unsavedDeps.map(async (unsavedDep) => { + var _a2, _b2, _c2; + let pkgPath = path_1.default.join(modulesDir, unsavedDep); + let version; + try { + pkgPath = await resolve_link_target_1.default(pkgPath); + version = `link:${normalize_path_1.default(path_1.default.relative(projectPath, pkgPath))}`; + } catch (err) { + const pkg2 = await read_package_json_1.safeReadPackageFromDir(pkgPath); + version = (_a2 = pkg2 === null || pkg2 === void 0 ? void 0 : pkg2.version) !== null && _a2 !== void 0 ? _a2 : "undefined"; + } + const pkg = { + alias: unsavedDep, + isMissing: false, + isPeer: false, + isSkipped: false, + name: unsavedDep, + path: pkgPath, + version + }; + const matchedSearched = (_b2 = opts.search) === null || _b2 === void 0 ? void 0 : _b2.call(opts, pkg); + if (opts.search != null && !matchedSearched) + return; + const newEntry = pkg; + if (matchedSearched) { + newEntry.searched = true; + } + result.unsavedDependencies = (_c2 = result.unsavedDependencies) !== null && _c2 !== void 0 ? _c2 : []; + result.unsavedDependencies.push(newEntry); + })); + return result; + } + function getAllDirectDependencies(projectSnapshot) { + return { + ...projectSnapshot.dependencies, + ...projectSnapshot.devDependencies, + ...projectSnapshot.optionalDependencies + }; + } + function getTree(opts, keypath, parentId) { + const dependenciesCache = new Map(); + return getTreeHelper(dependenciesCache, opts, keypath, parentId).dependencies; + } + function getTreeHelper(dependenciesCache, opts, keypath, parentId) { + var _a; + const result = { dependencies: [] }; + if (opts.currentDepth > opts.maxDepth || !opts.currentPackages || !opts.currentPackages[parentId]) + return result; + const deps = !opts.includeOptionalDependencies ? opts.currentPackages[parentId].dependencies : { + ...opts.currentPackages[parentId].dependencies, + ...opts.currentPackages[parentId].optionalDependencies + }; + if (deps == null) + return result; + const getChildrenTree = getTreeHelper.bind(null, dependenciesCache, { + ...opts, + currentDepth: opts.currentDepth + 1 + }); + const peers = new Set(Object.keys((_a = opts.currentPackages[parentId].peerDependencies) !== null && _a !== void 0 ? _a : {})); + Object.keys(deps).forEach((alias) => { + var _a2; + const { packageInfo, packageAbsolutePath } = getPkgInfo({ + alias, + currentPackages: opts.currentPackages, + lockfileDir: opts.lockfileDir, + modulesDir: opts.modulesDir, + peers, + ref: deps[alias], + registries: opts.registries, + skipped: opts.skipped, + wantedPackages: opts.wantedPackages + }); + let circular; + const matchedSearched = (_a2 = opts.search) === null || _a2 === void 0 ? void 0 : _a2.call(opts, packageInfo); + let newEntry = null; + if (packageAbsolutePath === null) { + circular = false; + if (opts.search == null || matchedSearched) { + newEntry = packageInfo; + } + } else { + let dependencies; + const relativeId = dependency_path_1.refToRelative(deps[alias], alias); + circular = keypath.includes(relativeId); + if (circular) { + dependencies = []; + } else { + dependencies = dependenciesCache.get(packageAbsolutePath); + if (dependencies == null) { + const children = getChildrenTree(keypath.concat([relativeId]), relativeId); + dependencies = children.dependencies; + if (children.circular) { + result.circular = true; + } else { + dependenciesCache.set(packageAbsolutePath, dependencies); + } + } + } + if (dependencies.length > 0) { + newEntry = { + ...packageInfo, + dependencies + }; + } else if (opts.search == null || matchedSearched) { + newEntry = packageInfo; + } + } + if (newEntry != null) { + if (circular) { + newEntry.circular = true; + result.circular = true; + } + if (matchedSearched) { + newEntry.searched = true; + } + result.dependencies.push(newEntry); + } + }); + return result; + } + function getPkgInfo(opts) { + var _a; + let name; + let version; + let resolved; + let dev; + let optional; + let isSkipped = false; + let isMissing = false; + const depPath = dependency_path_1.refToRelative(opts.ref, opts.alias); + if (depPath) { + let pkgSnapshot; + if (opts.currentPackages[depPath]) { + pkgSnapshot = opts.currentPackages[depPath]; + const parsed = lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot); + name = parsed.name; + version = parsed.version; + } else { + pkgSnapshot = opts.wantedPackages[depPath]; + if (pkgSnapshot) { + const parsed = lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot); + name = parsed.name; + version = parsed.version; + } else { + name = opts.alias; + version = opts.ref; + } + isMissing = true; + isSkipped = opts.skipped.has(depPath); + } + resolved = lockfile_utils_1.pkgSnapshotToResolution(depPath, pkgSnapshot, opts.registries)["tarball"]; + dev = pkgSnapshot.dev; + optional = pkgSnapshot.optional; + } else { + name = opts.alias; + version = opts.ref; + } + const packageAbsolutePath = dependency_path_1.refToRelative(opts.ref, opts.alias); + const packageInfo = { + alias: opts.alias, + isMissing, + isPeer: Boolean((_a = opts.peers) === null || _a === void 0 ? void 0 : _a.has(opts.alias)), + isSkipped, + name, + path: depPath ? path_1.default.join(opts.modulesDir, ".pnpm", dependency_path_1.depPathToFilename(depPath, opts.lockfileDir)) : path_1.default.join(opts.modulesDir, "..", opts.ref.substr(5)), + version + }; + if (resolved) { + packageInfo["resolved"] = resolved; + } + if (optional === true) { + packageInfo["optional"] = true; + } + if (typeof dev === "boolean") { + packageInfo["dev"] = dev; + } + return { + packageAbsolutePath, + packageInfo + }; + } + } +}); + +// ../list/lib/createPackagesSearcher.js +var require_createPackagesSearcher = __commonJS({ + "../list/lib/createPackagesSearcher.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var matcher_1 = __importDefault(require_lib23()); + var npm_package_arg_1 = __importDefault(require_npa()); + var semver_1 = __importDefault(require_semver2()); + function createPatternSearcher(queries) { + const searchers = queries.map(parseSearchQuery).map((packageSelector) => search.bind(null, packageSelector)); + return (pkg) => searchers.some((search2) => search2(pkg)); + } + exports2.default = createPatternSearcher; + function search(packageSelector, pkg) { + if (!packageSelector.matchName(pkg.name)) { + return false; + } + if (packageSelector.matchVersion == null) { + return true; + } + return !pkg.version.startsWith("link:") && packageSelector.matchVersion(pkg.version); + } + function parseSearchQuery(query) { + const parsed = npm_package_arg_1.default(query); + if (parsed.raw === parsed.name) { + return { matchName: matcher_1.default(parsed.name) }; + } + if (parsed.type !== "version" && parsed.type !== "range") { + throw new Error(`Invalid queryument - ${query}. List can search only by version or range`); + } + return { + matchName: matcher_1.default(parsed.name), + matchVersion: (version) => semver_1.default.satisfies(version, parsed.fetchSpec) + }; + } + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/sortBy.js +var require_sortBy = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/sortBy.js"(exports2, module2) { + var _curry2 = require_curry2(); + var sortBy = /* @__PURE__ */ _curry2(function sortBy2(fn2, list) { + return Array.prototype.slice.call(list, 0).sort(function(a, b) { + var aa = fn2(a); + var bb = fn2(b); + return aa < bb ? -1 : aa > bb ? 1 : 0; + }); + }); + module2.exports = sortBy; + } +}); + +// ../list/lib/readPkg.js +var require_readPkg = __commonJS({ + "../list/lib/readPkg.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var read_package_json_1 = __importDefault(require_lib32()); + var p_limit_1 = __importDefault(require_p_limit()); + var limitPkgReads = p_limit_1.default(4); + exports2.default = async (pkgPath) => limitPkgReads(async () => read_package_json_1.default(pkgPath)); + } +}); + +// ../list/lib/getPkgInfo.js +var require_getPkgInfo = __commonJS({ + "../list/lib/getPkgInfo.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var readPkg_1 = __importDefault(require_readPkg()); + async function getPkgInfo(pkg) { + var _a; + let manifest; + try { + manifest = await readPkg_1.default(path_1.default.join(pkg.path, "node_modules", pkg.name, "package.json")); + } catch (err) { + manifest = { + description: "[Could not find additional info about this dependency]" + }; + } + return { + alias: pkg.alias, + from: pkg.name, + version: pkg.version, + resolved: pkg.resolved, + description: manifest.description, + homepage: manifest.homepage, + repository: (_a = manifest.repository && (typeof manifest.repository === "string" ? manifest.repository : manifest.repository.url)) !== null && _a !== void 0 ? _a : void 0 + }; + } + exports2.default = getPkgInfo; + } +}); + +// ../list/lib/renderJson.js +var require_renderJson = __commonJS({ + "../list/lib/renderJson.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toJsonResult = void 0; + var types_1 = require_lib14(); + var sortBy_1 = __importDefault(require_sortBy()); + var path_1 = __importDefault(require_path3()); + var getPkgInfo_1 = __importDefault(require_getPkgInfo()); + var sortPackages = sortBy_1.default(path_1.default(["pkg", "alias"])); + async function default_1(pkgs, opts) { + const jsonArr = await Promise.all(pkgs.map(async (pkg) => { + var _a; + const jsonObj = { + name: pkg.name, + version: pkg.version, + path: pkg.path + }; + for (const dependenciesField of [...types_1.DEPENDENCIES_FIELDS.sort(), "unsavedDependencies"]) { + if ((_a = pkg[dependenciesField]) === null || _a === void 0 ? void 0 : _a.length) { + jsonObj[dependenciesField] = await toJsonResult(pkg[dependenciesField], { long: opts.long }); + } + } + return jsonObj; + })); + return JSON.stringify(jsonArr, null, 2); + } + exports2.default = default_1; + async function toJsonResult(entryNodes, opts) { + const dependencies = {}; + await Promise.all(sortPackages(entryNodes).map(async (node) => { + var _a; + const subDependencies = await toJsonResult((_a = node.dependencies) !== null && _a !== void 0 ? _a : [], opts); + const dep = opts.long ? await getPkgInfo_1.default(node) : { + alias: node.alias, + from: node.name, + version: node.version, + resolved: node.resolved + }; + if (Object.keys(subDependencies).length > 0) { + dep["dependencies"] = subDependencies; + } + if (!dep.resolved) { + delete dep.resolved; + } + delete dep.alias; + dependencies[node.alias] = dep; + })); + return dependencies; + } + exports2.toJsonResult = toJsonResult; + } +}); + +// ../list/lib/renderParseable.js +var require_renderParseable = __commonJS({ + "../list/lib/renderParseable.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var sortBy_1 = __importDefault(require_sortBy()); + var prop_1 = __importDefault(require_prop()); + var sortPackages = sortBy_1.default(prop_1.default("name")); + async function default_1(pkgs, opts) { + return pkgs.map((pkg) => renderParseableForPackage(pkg, opts)).filter((p) => p.length !== 0).join("\n"); + } + exports2.default = default_1; + function renderParseableForPackage(pkg, opts) { + var _a, _b, _c, _d; + const pkgs = sortPackages(flatten([ + ...(_a = pkg.optionalDependencies) !== null && _a !== void 0 ? _a : [], + ...(_b = pkg.dependencies) !== null && _b !== void 0 ? _b : [], + ...(_c = pkg.devDependencies) !== null && _c !== void 0 ? _c : [], + ...(_d = pkg.unsavedDependencies) !== null && _d !== void 0 ? _d : [] + ])); + if (!opts.alwaysPrintRootPackage && pkgs.length === 0) + return ""; + if (opts.long) { + let firstLine = pkg.path; + if (pkg.name) { + firstLine += `:${pkg.name}`; + if (pkg.version) { + firstLine += `@${pkg.version}`; + } + } + return [ + firstLine, + ...pkgs.map((pkg2) => `${pkg2.path}:${pkg2.name}@${pkg2.version}`) + ].join("\n"); + } + return [ + pkg.path, + ...pkgs.map((pkg2) => pkg2.path) + ].join("\n"); + } + function flatten(nodes) { + var _a; + let packages = []; + for (const node of nodes) { + packages.push(node); + if ((_a = node.dependencies) === null || _a === void 0 ? void 0 : _a.length) { + packages = packages.concat(flatten(node.dependencies)); + } + } + return packages; + } + } +}); + +// ../../node_modules/.pnpm/archy@1.0.0/node_modules/archy/index.js +var require_archy = __commonJS({ + "../../node_modules/.pnpm/archy@1.0.0/node_modules/archy/index.js"(exports2, module2) { + module2.exports = function archy(obj, prefix, opts) { + if (prefix === void 0) + prefix = ""; + if (!opts) + opts = {}; + var chr = function(s) { + var chars = { + "\u2502": "|", + "\u2514": "`", + "\u251C": "+", + "\u2500": "-", + "\u252C": "-" + }; + return opts.unicode === false ? chars[s] : s; + }; + if (typeof obj === "string") + obj = { label: obj }; + var nodes = obj.nodes || []; + var lines = (obj.label || "").split("\n"); + var splitter = "\n" + prefix + (nodes.length ? chr("\u2502") : " ") + " "; + return prefix + lines.join(splitter) + "\n" + nodes.map(function(node, ix) { + var last = ix === nodes.length - 1; + var more = node.nodes && node.nodes.length; + var prefix_ = prefix + (last ? " " : chr("\u2502")) + " "; + return prefix + (last ? chr("\u2514") : chr("\u251C")) + chr("\u2500") + (more ? chr("\u252C") : chr("\u2500")) + " " + archy(node, prefix_, opts).slice(prefix.length + 2); + }).join(""); + }; + } +}); + +// ../../node_modules/.pnpm/strip-ansi@4.0.0/node_modules/strip-ansi/index.js +var require_strip_ansi3 = __commonJS({ + "../../node_modules/.pnpm/strip-ansi@4.0.0/node_modules/strip-ansi/index.js"(exports2, module2) { + "use strict"; + var ansiRegex = require_ansi_regex(); + module2.exports = (input) => typeof input === "string" ? input.replace(ansiRegex(), "") : input; + } +}); + +// ../../node_modules/.pnpm/string-width@2.1.1/node_modules/string-width/index.js +var require_string_width3 = __commonJS({ + "../../node_modules/.pnpm/string-width@2.1.1/node_modules/string-width/index.js"(exports2, module2) { + "use strict"; + var stripAnsi = require_strip_ansi3(); + var isFullwidthCodePoint = require_is_fullwidth_code_point2(); + module2.exports = (str) => { + if (typeof str !== "string" || str.length === 0) { + return 0; + } + str = stripAnsi(str); + let width = 0; + for (let i = 0; i < str.length; i++) { + const code = str.codePointAt(i); + if (code <= 31 || code >= 127 && code <= 159) { + continue; + } + if (code >= 768 && code <= 879) { + continue; + } + if (code > 65535) { + i++; + } + width += isFullwidthCodePoint(code) ? 2 : 1; + } + return width; + }; + } +}); + +// ../../node_modules/.pnpm/ansi-regex@2.1.1/node_modules/ansi-regex/index.js +var require_ansi_regex4 = __commonJS({ + "../../node_modules/.pnpm/ansi-regex@2.1.1/node_modules/ansi-regex/index.js"(exports2, module2) { + "use strict"; + module2.exports = function() { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; + }; + } +}); + +// ../../node_modules/.pnpm/strip-ansi@3.0.1/node_modules/strip-ansi/index.js +var require_strip_ansi4 = __commonJS({ + "../../node_modules/.pnpm/strip-ansi@3.0.1/node_modules/strip-ansi/index.js"(exports2, module2) { + "use strict"; + var ansiRegex = require_ansi_regex4()(); + module2.exports = function(str) { + return typeof str === "string" ? str.replace(ansiRegex, "") : str; + }; + } +}); + +// ../../node_modules/.pnpm/cli-columns@3.1.2/node_modules/cli-columns/index.js +var require_cli_columns = __commonJS({ + "../../node_modules/.pnpm/cli-columns@3.1.2/node_modules/cli-columns/index.js"(exports2, module2) { + "use strict"; + var stringWidth = require_string_width3(); + var stripAnsi = require_strip_ansi4(); + var concat = Array.prototype.concat; + var defaults = { + character: " ", + newline: "\n", + padding: 2, + sort: true, + width: 0 + }; + function byPlainText(a, b) { + const plainA = stripAnsi(a); + const plainB = stripAnsi(b); + if (plainA === plainB) { + return 0; + } + if (plainA > plainB) { + return 1; + } + return -1; + } + function makeArray() { + return []; + } + function makeList(count) { + return Array.apply(null, Array(count)); + } + function padCell(fullWidth, character, value) { + const valueWidth = stringWidth(value); + const filler = makeList(fullWidth - valueWidth + 1); + return value + filler.join(character); + } + function toRows(rows, cell, i) { + rows[i % rows.length].push(cell); + return rows; + } + function toString(arr) { + return arr.join(""); + } + function columns(values, options) { + values = concat.apply([], values); + options = Object.assign({}, defaults, options); + let cells = values.filter(Boolean).map(String); + if (options.sort !== false) { + cells = cells.sort(byPlainText); + } + const termWidth = options.width || process.stdout.columns; + const cellWidth = Math.max.apply(null, cells.map(stringWidth)) + options.padding; + const columnCount = Math.floor(termWidth / cellWidth) || 1; + const rowCount = Math.ceil(cells.length / columnCount) || 1; + if (columnCount === 1) { + return cells.join(options.newline); + } + return cells.map(padCell.bind(null, cellWidth, options.character)).reduce(toRows, makeList(rowCount).map(makeArray)).map(toString).join(options.newline); + } + module2.exports = columns; + } +}); + +// ../list/lib/renderTree.js +var require_renderTree = __commonJS({ + "../list/lib/renderTree.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toArchyTree = void 0; + var path_1 = __importDefault(require("path")); + var types_1 = require_lib14(); + var archy_1 = __importDefault(require_archy()); + var chalk_1 = __importDefault(require_source()); + var cli_columns_1 = __importDefault(require_cli_columns()); + var sortBy_1 = __importDefault(require_sortBy()); + var path_2 = __importDefault(require_path3()); + var getPkgInfo_1 = __importDefault(require_getPkgInfo()); + var sortPackages = sortBy_1.default(path_2.default(["name"])); + var DEV_DEP_ONLY_CLR = chalk_1.default.yellow; + var PROD_DEP_CLR = (s) => s; + var OPTIONAL_DEP_CLR = chalk_1.default.blue; + var NOT_SAVED_DEP_CLR = chalk_1.default.red; + var LEGEND = `Legend: ${PROD_DEP_CLR("production dependency")}, ${OPTIONAL_DEP_CLR("optional only")}, ${DEV_DEP_ONLY_CLR("dev only")} + +`; + async function default_1(packages, opts) { + const output = (await Promise.all(packages.map(async (pkg) => renderTreeForPackage(pkg, opts)))).filter(Boolean).join("\n\n"); + return `${opts.depth > -1 && output ? LEGEND : ""}${output}`; + } + exports2.default = default_1; + async function renderTreeForPackage(pkg, opts) { + var _a, _b, _c, _d, _e; + if (!opts.alwaysPrintRootPackage && !((_a = pkg.dependencies) === null || _a === void 0 ? void 0 : _a.length) && !((_b = pkg.devDependencies) === null || _b === void 0 ? void 0 : _b.length) && !((_c = pkg.optionalDependencies) === null || _c === void 0 ? void 0 : _c.length) && (!opts.showExtraneous || !((_d = pkg.unsavedDependencies) === null || _d === void 0 ? void 0 : _d.length))) + return ""; + let label = ""; + if (pkg.name) { + label += pkg.name; + if (pkg.version) { + label += `@${pkg.version}`; + } + label += " "; + } + label += pkg.path; + let output = `${chalk_1.default.bold.underline(label)} +`; + const useColumns = opts.depth === 0 && !opts.long && !opts.search; + const dependenciesFields = [ + ...types_1.DEPENDENCIES_FIELDS.sort() + ]; + if (opts.showExtraneous) { + dependenciesFields.push("unsavedDependencies"); + } + for (const dependenciesField of dependenciesFields) { + if ((_e = pkg[dependenciesField]) === null || _e === void 0 ? void 0 : _e.length) { + const depsLabel = chalk_1.default.cyanBright(dependenciesField !== "unsavedDependencies" ? `${dependenciesField}:` : "not saved (you should add these dependencies to package.json if you need them):"); + output += ` +${depsLabel} +`; + const gPkgColor = dependenciesField === "unsavedDependencies" ? () => NOT_SAVED_DEP_CLR : getPkgColor; + if (useColumns && pkg[dependenciesField].length > 10) { + output += cli_columns_1.default(pkg[dependenciesField].map(printLabel.bind(printLabel, gPkgColor))) + "\n"; + continue; + } + const data = await toArchyTree(gPkgColor, pkg[dependenciesField], { + long: opts.long, + modules: path_1.default.join(pkg.path, "node_modules") + }); + for (const d of data) { + output += archy_1.default(d); + } + } + } + return output.replace(/\n$/, ""); + } + async function toArchyTree(getPkgColor2, entryNodes, opts) { + return Promise.all(sortPackages(entryNodes).map(async (node) => { + var _a; + const nodes = await toArchyTree(getPkgColor2, (_a = node.dependencies) !== null && _a !== void 0 ? _a : [], opts); + if (opts.long) { + const pkg = await getPkgInfo_1.default(node); + const labelLines = [ + printLabel(getPkgColor2, node), + pkg.description + ]; + if (pkg.repository) { + labelLines.push(pkg.repository); + } + if (pkg.homepage) { + labelLines.push(pkg.homepage); + } + return { + label: labelLines.join("\n"), + nodes + }; + } + return { + label: printLabel(getPkgColor2, node), + nodes + }; + })); + } + exports2.toArchyTree = toArchyTree; + function printLabel(getPkgColor2, node) { + const color = getPkgColor2(node); + let txt = `${color(node.name)} ${chalk_1.default.gray(node.version)}`; + if (node.isPeer) { + txt += " peer"; + } + if (node.isSkipped) { + txt += " skipped"; + } + return node.searched ? chalk_1.default.bold(txt) : txt; + } + function getPkgColor(node) { + if (node.dev === true) + return DEV_DEP_ONLY_CLR; + if (node.optional) + return OPTIONAL_DEP_CLR; + return PROD_DEP_CLR; + } + } +}); + +// ../list/lib/index.js +var require_lib100 = __commonJS({ + "../list/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.forPackages = void 0; + var read_project_manifest_1 = require_lib19(); + var dependencies_hierarchy_1 = __importDefault(require_lib99()); + var createPackagesSearcher_1 = __importDefault(require_createPackagesSearcher()); + var renderJson_1 = __importDefault(require_renderJson()); + var renderParseable_1 = __importDefault(require_renderParseable()); + var renderTree_1 = __importDefault(require_renderTree()); + var DEFAULTS = { + alwaysPrintRootPackage: true, + depth: 0, + long: false, + registries: void 0, + reportAs: "tree", + showExtraneous: true + }; + async function forPackages(packages, projectPaths, maybeOpts) { + const opts = { ...DEFAULTS, ...maybeOpts }; + const search = createPackagesSearcher_1.default(packages); + const pkgs = await Promise.all(Object.entries(await dependencies_hierarchy_1.default(projectPaths, { + depth: opts.depth, + include: maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.include, + lockfileDir: maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.lockfileDir, + registries: opts.registries, + search + })).map(async ([projectPath, dependenciesHierarchy]) => { + const entryPkg = await read_project_manifest_1.readProjectManifestOnly(projectPath); + return { + name: entryPkg.name, + version: entryPkg.version, + path: projectPath, + ...dependenciesHierarchy + }; + })); + const print = getPrinter(opts.reportAs); + return print(pkgs, { + alwaysPrintRootPackage: opts.alwaysPrintRootPackage, + depth: opts.depth, + long: opts.long, + search: Boolean(packages.length), + showExtraneous: opts.showExtraneous + }); + } + exports2.forPackages = forPackages; + async function default_1(projectPaths, maybeOpts) { + const opts = { ...DEFAULTS, ...maybeOpts }; + const pkgs = await Promise.all(Object.entries(opts.depth === -1 ? projectPaths.reduce((acc, projectPath) => { + acc[projectPath] = {}; + return acc; + }, {}) : await dependencies_hierarchy_1.default(projectPaths, { + depth: opts.depth, + include: maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.include, + lockfileDir: maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.lockfileDir, + registries: opts.registries + })).map(async ([projectPath, dependenciesHierarchy]) => { + const entryPkg = await read_project_manifest_1.readProjectManifestOnly(projectPath); + return { + name: entryPkg.name, + version: entryPkg.version, + path: projectPath, + ...dependenciesHierarchy + }; + })); + const print = getPrinter(opts.reportAs); + return print(pkgs, { + alwaysPrintRootPackage: opts.alwaysPrintRootPackage, + depth: opts.depth, + long: opts.long, + search: false, + showExtraneous: opts.showExtraneous + }); + } + exports2.default = default_1; + function getPrinter(reportAs) { + switch (reportAs) { + case "parseable": + return renderParseable_1.default; + case "json": + return renderJson_1.default; + case "tree": + return renderTree_1.default; + } + } + } +}); + +// ../plugin-commands-listing/lib/recursive.js +var require_recursive3 = __commonJS({ + "../plugin-commands-listing/lib/recursive.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var logger_1 = __importDefault(require_lib6()); + var list_1 = require_list2(); + exports2.default = async (pkgs, params, opts) => { + var _a, _b; + const depth = (_a = opts.depth) !== null && _a !== void 0 ? _a : 0; + if (opts.lockfileDir) { + return list_1.render(pkgs.map((pkg) => pkg.dir), params, { + ...opts, + alwaysPrintRootPackage: depth === -1, + lockfileDir: opts.lockfileDir + }); + } + const outputs = []; + for (const { dir } of pkgs) { + try { + const output = await list_1.render([dir], params, { + ...opts, + alwaysPrintRootPackage: depth === -1, + lockfileDir: (_b = opts.lockfileDir) !== null && _b !== void 0 ? _b : dir + }); + if (!output) + continue; + outputs.push(output); + } catch (err) { + logger_1.default.info(err); + err["prefix"] = dir; + throw err; + } + } + if (outputs.length === 0) + return ""; + const joiner = typeof depth === "number" && depth > -1 ? "\n\n" : "\n"; + return outputs.join(joiner); + }; + } +}); + +// ../plugin-commands-listing/lib/list.js +var require_list2 = __commonJS({ + "../plugin-commands-listing/lib/list.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.render = exports2.handler = exports2.help = exports2.commandNames = exports2.shorthands = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var list_1 = __importStar2(require_lib100()); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + var recursive_1 = __importDefault(require_recursive3()); + function rcOptionsTypes() { + return pick_1.default([ + "depth", + "dev", + "global-dir", + "global", + "json", + "long", + "only", + "optional", + "parseable", + "production" + ], config_1.types); + } + exports2.rcOptionsTypes = rcOptionsTypes; + var cliOptionsTypes = () => ({ + ...rcOptionsTypes(), + recursive: Boolean + }); + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.shorthands = { + D: "--dev", + P: "--production" + }; + exports2.commandNames = ["list", "ls"]; + function help() { + return render_help_1.default({ + aliases: ["list", "ls", "la", "ll"], + description: "When run as ll or la, it shows extended information by default. All dependencies are printed by default. Search by patterns is supported. For example: pnpm ls babel-* eslint-*", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: 'Perform command on every package in subdirectories or on every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + }, + { + description: "Show extended information", + name: "--long" + }, + { + description: "Show parseable output instead of tree view", + name: "--parseable" + }, + { + description: "Show information in JSON format", + name: "--json" + }, + { + description: "List packages in the global install prefix instead of in the current project", + name: "--global", + shortAlias: "-g" + }, + { + description: "Max display depth of the dependency tree", + name: "--depth " + }, + { + description: "Display only direct dependencies", + name: "--depth 0" + }, + { + description: "Display only projects. Useful in a monorepo. `pnpm ls -r --depth -1` lists all projects in a monorepo", + name: "--depth -1" + }, + { + description: "Display only the dependency graph for packages in `dependencies` and `optionalDependencies`", + name: "--prod", + shortAlias: "-P" + }, + { + description: "Display only the dependency graph for packages in `devDependencies`", + name: "--dev", + shortAlias: "-D" + }, + { + description: "Don't display packages from `optionalDependencies`", + name: "--no-optional" + }, + common_cli_options_help_1.OPTIONS.globalDir, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + }, + common_cli_options_help_1.FILTERING + ], + url: cli_utils_1.docsUrl("list"), + usages: [ + "pnpm ls [ ...]" + ] + }); + } + exports2.help = help; + async function handler(opts, params) { + var _a, _b, _c; + const include = { + dependencies: opts.production !== false, + devDependencies: opts.dev !== false, + optionalDependencies: opts.optional !== false + }; + const depth = (_b = (_a = opts.cliOptions) === null || _a === void 0 ? void 0 : _a["depth"]) !== null && _b !== void 0 ? _b : 0; + if (opts.recursive && opts.selectedProjectsGraph != null) { + const pkgs = Object.values(opts.selectedProjectsGraph).map((wsPkg) => wsPkg.package); + return recursive_1.default(pkgs, params, { ...opts, depth, include }); + } + return render([opts.dir], params, { + ...opts, + depth, + include, + lockfileDir: (_c = opts.lockfileDir) !== null && _c !== void 0 ? _c : opts.dir + }); + } + exports2.handler = handler; + async function render(prefixes, params, opts) { + var _a; + const listOpts = { + alwaysPrintRootPackage: opts.alwaysPrintRootPackage, + depth: (_a = opts.depth) !== null && _a !== void 0 ? _a : 0, + include: opts.include, + lockfileDir: opts.lockfileDir, + long: opts.long, + reportAs: opts.parseable ? "parseable" : opts.json ? "json" : "tree", + showExtraneous: false + }; + return params.length > 0 ? list_1.forPackages(params, prefixes, listOpts) : list_1.default(prefixes, listOpts); + } + exports2.render = render; + } +}); + +// ../plugin-commands-listing/lib/ll.js +var require_ll = __commonJS({ + "../plugin-commands-listing/lib/ll.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.cliOptionsTypes = exports2.rcOptionsTypes = exports2.commandNames = void 0; + var omit_1 = __importDefault(require_omit()); + var list = __importStar2(require_list2()); + exports2.commandNames = ["ll", "la"]; + exports2.rcOptionsTypes = list.rcOptionsTypes; + function cliOptionsTypes() { + return omit_1.default(["long"], list.cliOptionsTypes()); + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.help = list.help; + async function handler(opts, params) { + return list.handler({ ...opts, long: true }, params); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-listing/lib/why.js +var require_why = __commonJS({ + "../plugin-commands-listing/lib/why.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.shorthands = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var error_1 = __importDefault(require_lib8()); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + var list_1 = require_list2(); + function rcOptionsTypes() { + return pick_1.default([ + "dev", + "global-dir", + "global", + "json", + "long", + "only", + "optional", + "parseable", + "production" + ], config_1.types); + } + exports2.rcOptionsTypes = rcOptionsTypes; + var cliOptionsTypes = () => ({ + ...rcOptionsTypes(), + recursive: Boolean + }); + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.shorthands = { + D: "--dev", + P: "--production" + }; + exports2.commandNames = ["why"]; + function help() { + return render_help_1.default({ + description: `Shows the packages that depend on +For example: pnpm why babel-* eslint-*`, + descriptionLists: [ + { + title: "Options", + list: [ + { + description: 'Perform command on every package in subdirectories or on every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + }, + { + description: "Show extended information", + name: "--long" + }, + { + description: "Show parseable output instead of tree view", + name: "--parseable" + }, + { + description: "Show information in JSON format", + name: "--json" + }, + { + description: "List packages in the global install prefix instead of in the current project", + name: "--global", + shortAlias: "-g" + }, + { + description: "Display only the dependency graph for packages in `dependencies` and `optionalDependencies`", + name: "--prod", + shortAlias: "-P" + }, + { + description: "Display only the dependency graph for packages in `devDependencies`", + name: "--dev", + shortAlias: "-D" + }, + { + description: "Don't display packages from `optionalDependencies`", + name: "--no-optional" + }, + common_cli_options_help_1.OPTIONS.globalDir, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + }, + common_cli_options_help_1.FILTERING + ], + url: cli_utils_1.docsUrl("why"), + usages: [ + "pnpm why ..." + ] + }); + } + exports2.help = help; + async function handler(opts, params) { + var _a; + if (params.length === 0) { + throw new error_1.default("MISSING_PACKAGE_NAME", "`pnpm why` requires the package name"); + } + return list_1.handler({ + ...opts, + cliOptions: { + ...(_a = opts.cliOptions) !== null && _a !== void 0 ? _a : {}, + depth: Infinity + } + }, params); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-listing/lib/index.js +var require_lib101 = __commonJS({ + "../plugin-commands-listing/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.why = exports2.ll = exports2.list = void 0; + var list = __importStar2(require_list2()); + exports2.list = list; + var ll = __importStar2(require_ll()); + exports2.ll = ll; + var why = __importStar2(require_why()); + exports2.why = why; + } +}); + +// ../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/sortWith.js +var require_sortWith = __commonJS({ + "../../node_modules/.pnpm/ramda@0.27.1/node_modules/ramda/src/sortWith.js"(exports2, module2) { + var _curry2 = require_curry2(); + var sortWith = /* @__PURE__ */ _curry2(function sortWith2(fns, list) { + return Array.prototype.slice.call(list, 0).sort(function(a, b) { + var result = 0; + var i = 0; + while (result === 0 && i < fns.length) { + result = fns[i](a, b); + i += 1; + } + return result; + }); + }); + module2.exports = sortWith; + } +}); + +// ../plugin-commands-outdated/lib/utils.js +var require_utils9 = __commonJS({ + "../plugin-commands-outdated/lib/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sortBySemverChange = exports2.DEFAULT_COMPARATORS = void 0; + exports2.DEFAULT_COMPARATORS = [ + sortBySemverChange, + (o1, o2) => o1.packageName.localeCompare(o2.packageName), + (o1, o2) => o1.current && o2.current ? o1.current.localeCompare(o2.current) : 0 + ]; + function sortBySemverChange(outdated1, outdated2) { + return pkgPriority(outdated1) - pkgPriority(outdated2); + } + exports2.sortBySemverChange = sortBySemverChange; + function pkgPriority(pkg) { + switch (pkg.change) { + case null: + return 0; + case "fix": + return 1; + case "feature": + return 2; + case "breaking": + return 3; + default: + return 4; + } + } + } +}); + +// ../plugin-commands-outdated/lib/recursive.js +var require_recursive4 = __commonJS({ + "../plugin-commands-outdated/lib/recursive.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var cli_utils_1 = require_lib20(); + var outdated_1 = require_lib95(); + var table_1 = require_dist10(); + var chalk_1 = __importDefault(require_source()); + var isEmpty_1 = __importDefault(require_isEmpty2()); + var sortWith_1 = __importDefault(require_sortWith()); + var outdated_2 = require_outdated2(); + var utils_1 = require_utils9(); + var DEP_PRIORITY = { + dependencies: 1, + devDependencies: 2, + optionalDependencies: 0 + }; + var COMPARATORS = [ + ...utils_1.DEFAULT_COMPARATORS, + (o1, o2) => DEP_PRIORITY[o1.belongsTo] - DEP_PRIORITY[o2.belongsTo] + ]; + exports2.default = async (pkgs, params, opts) => { + const outdatedMap = {}; + const outdatedPackagesByProject = await outdated_1.outdatedDepsOfProjects(pkgs, params, { + ...opts, + fullMetadata: opts.long, + retry: { + factor: opts.fetchRetryFactor, + maxTimeout: opts.fetchRetryMaxtimeout, + minTimeout: opts.fetchRetryMintimeout, + retries: opts.fetchRetries + }, + timeout: opts.fetchTimeout + }); + for (let i = 0; i < outdatedPackagesByProject.length; i++) { + const { dir, manifest } = pkgs[i]; + outdatedPackagesByProject[i].forEach((outdatedPkg) => { + const key = JSON.stringify([outdatedPkg.packageName, outdatedPkg.current, outdatedPkg.belongsTo]); + if (!outdatedMap[key]) { + outdatedMap[key] = { ...outdatedPkg, dependentPkgs: [] }; + } + outdatedMap[key].dependentPkgs.push({ location: dir, manifest }); + }); + } + if (isEmpty_1.default(outdatedMap)) + return { output: "", exitCode: 0 }; + if (opts.table !== false) { + return { output: renderOutdatedTable(outdatedMap, opts), exitCode: 1 }; + } + return { output: renderOutdatedList(outdatedMap, opts), exitCode: 1 }; + }; + function renderOutdatedTable(outdatedMap, opts) { + const columnNames = [ + "Package", + "Current", + "Latest", + "Dependents" + ]; + const columnFns = [ + outdated_2.renderPackageName, + outdated_2.renderCurrent, + outdated_2.renderLatest, + dependentPackages + ]; + if (opts.long) { + columnNames.push("Details"); + columnFns.push(outdated_2.renderDetails); + } + for (let i = 0; i < columnNames.length; i++) + columnNames[i] = chalk_1.default.blueBright(columnNames[i]); + const data = [ + columnNames, + ...sortOutdatedPackages(Object.values(outdatedMap)).map((outdatedPkg) => columnFns.map((fn2) => fn2(outdatedPkg))) + ]; + return table_1.table(data, { + ...cli_utils_1.TABLE_OPTIONS, + columns: { + ...cli_utils_1.TABLE_OPTIONS.columns, + 3: { + width: outdated_2.getCellWidth(data, 3, 30), + wrapWord: true + } + } + }); + } + function renderOutdatedList(outdatedMap, opts) { + return sortOutdatedPackages(Object.values(outdatedMap)).map((outdatedPkg) => { + let info = `${chalk_1.default.bold(outdated_2.renderPackageName(outdatedPkg))} +${outdated_2.renderCurrent(outdatedPkg)} ${chalk_1.default.grey("=>")} ${outdated_2.renderLatest(outdatedPkg)}`; + const dependents = dependentPackages(outdatedPkg); + if (dependents) { + info += ` +${chalk_1.default.bold(outdatedPkg.dependentPkgs.length > 1 ? "Dependents:" : "Dependent:")} ${dependents}`; + } + if (opts.long) { + const details = outdated_2.renderDetails(outdatedPkg); + if (details) { + info += ` +${details}`; + } + } + return info; + }).join("\n\n") + "\n"; + } + function dependentPackages({ dependentPkgs }) { + return dependentPkgs.map(({ manifest, location }) => { + var _a; + return (_a = manifest.name) !== null && _a !== void 0 ? _a : location; + }).sort().join(", "); + } + function sortOutdatedPackages(outdatedPackages) { + return sortWith_1.default(COMPARATORS, outdatedPackages.map(outdated_2.toOutdatedWithVersionDiff)); + } + } +}); + +// ../plugin-commands-outdated/lib/outdated.js +var require_outdated2 = __commonJS({ + "../plugin-commands-outdated/lib/outdated.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.renderDetails = exports2.renderLatest = exports2.renderCurrent = exports2.renderPackageName = exports2.toOutdatedWithVersionDiff = exports2.getCellWidth = exports2.handler = exports2.completion = exports2.help = exports2.commandNames = exports2.shorthands = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var colorize_semver_diff_1 = __importDefault(require_lib96()); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var outdated_1 = require_lib95(); + var semver_diff_1 = __importDefault(require_lib97()); + var table_1 = require_dist10(); + var chalk_1 = __importDefault(require_source()); + var pick_1 = __importDefault(require_pick()); + var sortWith_1 = __importDefault(require_sortWith()); + var render_help_1 = __importDefault(require_lib30()); + var strip_ansi_1 = __importDefault(require_strip_ansi()); + var wrap_ansi_1 = __importDefault(require_wrap_ansi()); + var utils_1 = require_utils9(); + var recursive_1 = __importDefault(require_recursive4()); + function rcOptionsTypes() { + return { + ...pick_1.default([ + "depth", + "dev", + "global-dir", + "global", + "long", + "optional", + "production" + ], config_1.types), + compatible: Boolean, + table: Boolean + }; + } + exports2.rcOptionsTypes = rcOptionsTypes; + var cliOptionsTypes = () => ({ + ...rcOptionsTypes(), + recursive: Boolean + }); + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.shorthands = { + D: "--dev", + P: "--production" + }; + exports2.commandNames = ["outdated"]; + function help() { + return render_help_1.default({ + description: `Check for outdated packages. The check can be limited to a subset of the installed packages by providing arguments (patterns are supported). + +Examples: +pnpm outdated +pnpm outdated --long +pnpm outdated gulp-* @babel/core`, + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "Print only versions that satisfy specs in package.json", + name: "--compatible" + }, + { + description: "By default, details about the outdated packages (such as a link to the repo) are not displayed. To display the details, pass this option.", + name: "--long" + }, + { + description: 'Check for outdated dependencies in every package found in subdirectories or in every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + }, + { + description: "Prints the outdated packages in a list. Good for small consoles", + name: "--no-table" + }, + { + description: 'Check only "dependencies" and "optionalDependencies"', + name: "--prod", + shortAlias: "-P" + }, + { + description: 'Check only "devDependencies"', + name: "--dev", + shortAlias: "-D" + }, + { + description: `Don't check "optionalDependencies"`, + name: "--no-optional" + }, + common_cli_options_help_1.OPTIONS.globalDir, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + }, + common_cli_options_help_1.FILTERING + ], + url: cli_utils_1.docsUrl("outdated"), + usages: ["pnpm outdated [ ...]"] + }); + } + exports2.help = help; + var completion = async (cliOpts) => { + return cli_utils_1.readDepNameCompletions(cliOpts.dir); + }; + exports2.completion = completion; + async function handler(opts, params = []) { + const include = { + dependencies: opts.production !== false, + devDependencies: opts.dev !== false, + optionalDependencies: opts.optional !== false + }; + if (opts.recursive && opts.selectedProjectsGraph != null) { + const pkgs = Object.values(opts.selectedProjectsGraph).map((wsPkg) => wsPkg.package); + return recursive_1.default(pkgs, params, { ...opts, include }); + } + const packages = [ + { + dir: opts.dir, + manifest: await cli_utils_1.readProjectManifestOnly(opts.dir, opts) + } + ]; + const [outdatedPackages] = await outdated_1.outdatedDepsOfProjects(packages, params, { + ...opts, + fullMetadata: opts.long, + include, + retry: { + factor: opts.fetchRetryFactor, + maxTimeout: opts.fetchRetryMaxtimeout, + minTimeout: opts.fetchRetryMintimeout, + retries: opts.fetchRetries + }, + timeout: opts.fetchTimeout + }); + if (outdatedPackages.length === 0) + return { output: "", exitCode: 0 }; + if (opts.table !== false) { + return { output: renderOutdatedTable(outdatedPackages, opts), exitCode: 1 }; + } else { + return { output: renderOutdatedList(outdatedPackages, opts), exitCode: 1 }; + } + } + exports2.handler = handler; + function renderOutdatedTable(outdatedPackages, opts) { + const columnNames = [ + "Package", + "Current", + "Latest" + ]; + const columnFns = [ + renderPackageName, + renderCurrent, + renderLatest + ]; + if (opts.long) { + columnNames.push("Details"); + columnFns.push(renderDetails); + } + for (let i = 0; i < columnNames.length; i++) + columnNames[i] = chalk_1.default.blueBright(columnNames[i]); + return table_1.table([ + columnNames, + ...sortOutdatedPackages(outdatedPackages).map((outdatedPkg) => columnFns.map((fn2) => fn2(outdatedPkg))) + ], cli_utils_1.TABLE_OPTIONS); + } + function renderOutdatedList(outdatedPackages, opts) { + return sortOutdatedPackages(outdatedPackages).map((outdatedPkg) => { + let info = `${chalk_1.default.bold(renderPackageName(outdatedPkg))} +${renderCurrent(outdatedPkg)} ${chalk_1.default.grey("=>")} ${renderLatest(outdatedPkg)}`; + if (opts.long) { + const details = renderDetails(outdatedPkg); + if (details) { + info += ` +${details}`; + } + } + return info; + }).join("\n\n") + "\n"; + } + function sortOutdatedPackages(outdatedPackages) { + return sortWith_1.default(utils_1.DEFAULT_COMPARATORS, outdatedPackages.map(toOutdatedWithVersionDiff)); + } + function getCellWidth(data, columnNumber, maxWidth) { + const maxCellWidth = data.reduce((cellWidth, row) => { + const cellLines = strip_ansi_1.default(row[columnNumber]).split("\n"); + const currentCellWidth = cellLines.reduce((lineWidth, line) => { + return Math.max(lineWidth, line.length); + }, 0); + return Math.max(cellWidth, currentCellWidth); + }, 0); + return Math.min(maxWidth, maxCellWidth); + } + exports2.getCellWidth = getCellWidth; + function toOutdatedWithVersionDiff(outdated) { + if (outdated.latestManifest != null) { + return { + ...outdated, + ...semver_diff_1.default(outdated.wanted, outdated.latestManifest.version) + }; + } + return { + ...outdated, + change: "unknown" + }; + } + exports2.toOutdatedWithVersionDiff = toOutdatedWithVersionDiff; + function renderPackageName({ belongsTo, packageName }) { + switch (belongsTo) { + case "devDependencies": + return `${packageName} ${chalk_1.default.dim("(dev)")}`; + case "optionalDependencies": + return `${packageName} ${chalk_1.default.dim("(optional)")}`; + default: + return packageName; + } + } + exports2.renderPackageName = renderPackageName; + function renderCurrent({ current, wanted }) { + const output = current !== null && current !== void 0 ? current : "missing"; + if (current === wanted) + return output; + return `${output} (wanted ${wanted})`; + } + exports2.renderCurrent = renderCurrent; + function renderLatest(outdatedPkg) { + const { latestManifest, change, diff } = outdatedPkg; + if (latestManifest == null) + return ""; + if (change === null || diff == null) { + return latestManifest.deprecated ? chalk_1.default.redBright.bold("Deprecated") : latestManifest.version; + } + return colorize_semver_diff_1.default({ change, diff }); + } + exports2.renderLatest = renderLatest; + function renderDetails({ latestManifest }) { + if (latestManifest == null) + return ""; + const outputs = []; + if (latestManifest.deprecated) { + outputs.push(wrap_ansi_1.default(chalk_1.default.redBright(latestManifest.deprecated), 40)); + } + if (latestManifest.homepage) { + outputs.push(chalk_1.default.underline(latestManifest.homepage)); + } + return outputs.join("\n"); + } + exports2.renderDetails = renderDetails; + } +}); + +// ../plugin-commands-outdated/lib/index.js +var require_lib102 = __commonJS({ + "../plugin-commands-outdated/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.outdated = void 0; + var outdated = __importStar2(require_outdated2()); + exports2.outdated = outdated; + } +}); + +// ../exportable-manifest/lib/index.js +var require_lib103 = __commonJS({ + "../exportable-manifest/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var error_1 = __importDefault(require_lib8()); + var read_project_manifest_1 = require_lib19(); + var fromPairs_1 = __importDefault(require_fromPairs()); + var omit_1 = __importDefault(require_omit()); + var PUBLISH_CONFIG_WHITELIST = new Set([ + "bin", + "type", + "imports", + "main", + "module", + "typings", + "types", + "exports", + "browser", + "esnext", + "es2015", + "unpkg", + "umd:main" + ]); + var PREPUBLISH_SCRIPTS = [ + "prepublishOnly", + "prepack", + "prepare", + "postpack", + "publish", + "postpublish" + ]; + async function makePublishManifest(dir, originalManifest) { + const publishManifest = omit_1.default(["pnpm", "scripts"], originalManifest); + if (originalManifest.scripts != null) { + publishManifest.scripts = omit_1.default(PREPUBLISH_SCRIPTS, originalManifest.scripts); + } + for (const depsField of ["dependencies", "devDependencies", "optionalDependencies", "peerDependencies"]) { + const deps = await makePublishDependencies(dir, originalManifest[depsField]); + if (deps != null) { + publishManifest[depsField] = deps; + } + } + const { publishConfig } = originalManifest; + if (publishConfig != null) { + Object.keys(publishConfig).filter((key) => PUBLISH_CONFIG_WHITELIST.has(key)).forEach((key) => { + publishManifest[key] = publishConfig[key]; + }); + } + return publishManifest; + } + exports2.default = makePublishManifest; + async function makePublishDependencies(dir, dependencies) { + if (dependencies == null) + return dependencies; + const publishDependencies = fromPairs_1.default(await Promise.all(Object.entries(dependencies).map(async ([depName, depSpec]) => [ + depName, + await makePublishDependency(depName, depSpec, dir) + ]))); + return publishDependencies; + } + async function makePublishDependency(depName, depSpec, dir) { + if (!depSpec.startsWith("workspace:")) { + return depSpec; + } + const versionAliasSpecParts = /^workspace:([^@]+@)?([\^~*])$/.exec(depSpec); + if (versionAliasSpecParts != null) { + const { manifest } = await read_project_manifest_1.tryReadProjectManifest(path_1.default.join(dir, "node_modules", depName)); + if (manifest == null || !manifest.version) { + throw new error_1.default("CANNOT_RESOLVE_WORKSPACE_PROTOCOL", `Cannot resolve workspace protocol of dependency "${depName}" because this dependency is not installed. Try running "pnpm install".`); + } + const semverRangeToken = versionAliasSpecParts[2] !== "*" ? versionAliasSpecParts[2] : ""; + if (depName !== manifest.name) { + return `npm:${manifest.name}@${semverRangeToken}${manifest.version}`; + } + return `${semverRangeToken}${manifest.version}`; + } + if (depSpec.startsWith("workspace:./") || depSpec.startsWith("workspace:../")) { + const { manifest } = await read_project_manifest_1.tryReadProjectManifest(path_1.default.join(dir, depSpec.substr(10))); + if (manifest == null || !manifest.name || !manifest.version) { + throw new error_1.default("CANNOT_RESOLVE_WORKSPACE_PROTOCOL", `Cannot resolve workspace protocol of dependency "${depName}" because this dependency is not installed. Try running "pnpm install".`); + } + if (manifest.name === depName) + return `${manifest.version}`; + return `npm:${manifest.name}@${manifest.version}`; + } + depSpec = depSpec.substr(10); + if (depSpec.includes("@")) { + return `npm:${depSpec}`; + } + return depSpec; + } + } +}); + +// ../../node_modules/.pnpm/npm-normalize-package-bin@1.0.1/node_modules/npm-normalize-package-bin/index.js +var require_npm_normalize_package_bin = __commonJS({ + "../../node_modules/.pnpm/npm-normalize-package-bin@1.0.1/node_modules/npm-normalize-package-bin/index.js"(exports2, module2) { + var { join, basename } = require("path"); + var normalize = (pkg) => !pkg.bin ? removeBin(pkg) : typeof pkg.bin === "string" ? normalizeString(pkg) : Array.isArray(pkg.bin) ? normalizeArray(pkg) : typeof pkg.bin === "object" ? normalizeObject(pkg) : removeBin(pkg); + var normalizeString = (pkg) => { + if (!pkg.name) + return removeBin(pkg); + pkg.bin = { [pkg.name]: pkg.bin }; + return normalizeObject(pkg); + }; + var normalizeArray = (pkg) => { + pkg.bin = pkg.bin.reduce((acc, k) => { + acc[basename(k)] = k; + return acc; + }, {}); + return normalizeObject(pkg); + }; + var removeBin = (pkg) => { + delete pkg.bin; + return pkg; + }; + var normalizeObject = (pkg) => { + const orig = pkg.bin; + const clean = {}; + let hasBins = false; + Object.keys(orig).forEach((binKey) => { + const base = join("/", basename(binKey.replace(/\\|:/g, "/"))).substr(1); + if (typeof orig[binKey] !== "string" || !base) + return; + const binTarget = join("/", orig[binKey]).replace(/\\/g, "/").substr(1); + if (!binTarget) + return; + clean[base] = binTarget; + hasBins = true; + }); + if (hasBins) + pkg.bin = clean; + else + delete pkg.bin; + return pkg; + }; + module2.exports = normalize; + } +}); + +// ../../node_modules/.pnpm/npm-bundled@1.1.2/node_modules/npm-bundled/index.js +var require_npm_bundled = __commonJS({ + "../../node_modules/.pnpm/npm-bundled@1.1.2/node_modules/npm-bundled/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var path = require("path"); + var EE = require("events").EventEmitter; + var normalizePackageBin = require_npm_normalize_package_bin(); + var BundleWalker = class extends EE { + constructor(opt) { + opt = opt || {}; + super(opt); + this.path = path.resolve(opt.path || process.cwd()); + this.parent = opt.parent || null; + if (this.parent) { + this.result = this.parent.result; + if (!this.parent.parent) { + const base = path.basename(this.path); + const scope = path.basename(path.dirname(this.path)); + this.result.add(/^@/.test(scope) ? scope + "/" + base : base); + } + this.root = this.parent.root; + this.packageJsonCache = this.parent.packageJsonCache; + } else { + this.result = new Set(); + this.root = this.path; + this.packageJsonCache = opt.packageJsonCache || new Map(); + } + this.seen = new Set(); + this.didDone = false; + this.children = 0; + this.node_modules = []; + this.package = null; + this.bundle = null; + } + addListener(ev, fn2) { + return this.on(ev, fn2); + } + on(ev, fn2) { + const ret = super.on(ev, fn2); + if (ev === "done" && this.didDone) { + this.emit("done", this.result); + } + return ret; + } + done() { + if (!this.didDone) { + this.didDone = true; + if (!this.parent) { + const res = Array.from(this.result); + this.result = res; + this.emit("done", res); + } else { + this.emit("done"); + } + } + } + start() { + const pj = path.resolve(this.path, "package.json"); + if (this.packageJsonCache.has(pj)) + this.onPackage(this.packageJsonCache.get(pj)); + else + this.readPackageJson(pj); + return this; + } + readPackageJson(pj) { + fs.readFile(pj, (er, data) => er ? this.done() : this.onPackageJson(pj, data)); + } + onPackageJson(pj, data) { + try { + this.package = normalizePackageBin(JSON.parse(data + "")); + } catch (er) { + return this.done(); + } + this.packageJsonCache.set(pj, this.package); + this.onPackage(this.package); + } + allDepsBundled(pkg) { + return Object.keys(pkg.dependencies || {}).concat(Object.keys(pkg.optionalDependencies || {})); + } + onPackage(pkg) { + const bdRaw = this.parent ? this.allDepsBundled(pkg) : pkg.bundleDependencies || pkg.bundledDependencies || []; + const bd = Array.from(new Set(Array.isArray(bdRaw) ? bdRaw : bdRaw === true ? this.allDepsBundled(pkg) : Object.keys(bdRaw))); + if (!bd.length) + return this.done(); + this.bundle = bd; + const nm = this.path + "/node_modules"; + this.readModules(); + } + readModules() { + readdirNodeModules(this.path + "/node_modules", (er, nm) => er ? this.onReaddir([]) : this.onReaddir(nm)); + } + onReaddir(nm) { + this.node_modules = nm; + this.bundle.forEach((dep) => this.childDep(dep)); + if (this.children === 0) + this.done(); + } + childDep(dep) { + if (this.node_modules.indexOf(dep) !== -1) { + if (!this.seen.has(dep)) { + this.seen.add(dep); + this.child(dep); + } + } else if (this.parent) { + this.parent.childDep(dep); + } + } + child(dep) { + const p = this.path + "/node_modules/" + dep; + this.children += 1; + const child = new BundleWalker({ + path: p, + parent: this + }); + child.on("done", (_) => { + if (--this.children === 0) + this.done(); + }); + child.start(); + } + }; + var BundleWalkerSync = class extends BundleWalker { + constructor(opt) { + super(opt); + } + start() { + super.start(); + this.done(); + return this; + } + readPackageJson(pj) { + try { + this.onPackageJson(pj, fs.readFileSync(pj)); + } catch (er) { + } + return this; + } + readModules() { + try { + this.onReaddir(readdirNodeModulesSync(this.path + "/node_modules")); + } catch (er) { + this.onReaddir([]); + } + } + child(dep) { + new BundleWalkerSync({ + path: this.path + "/node_modules/" + dep, + parent: this + }).start(); + } + }; + var readdirNodeModules = (nm, cb) => { + fs.readdir(nm, (er, set) => { + if (er) + cb(er); + else { + const scopes = set.filter((f) => /^@/.test(f)); + if (!scopes.length) + cb(null, set); + else { + const unscoped = set.filter((f) => !/^@/.test(f)); + let count = scopes.length; + scopes.forEach((scope) => { + fs.readdir(nm + "/" + scope, (er2, pkgs) => { + if (er2 || !pkgs.length) + unscoped.push(scope); + else + unscoped.push.apply(unscoped, pkgs.map((p) => scope + "/" + p)); + if (--count === 0) + cb(null, unscoped); + }); + }); + } + } + }); + }; + var readdirNodeModulesSync = (nm) => { + const set = fs.readdirSync(nm); + const unscoped = set.filter((f) => !/^@/.test(f)); + const scopes = set.filter((f) => /^@/.test(f)).map((scope) => { + try { + const pkgs = fs.readdirSync(nm + "/" + scope); + return pkgs.length ? pkgs.map((p) => scope + "/" + p) : [scope]; + } catch (er) { + return [scope]; + } + }).reduce((a, b) => a.concat(b), []); + return unscoped.concat(scopes); + }; + var walk = (options, callback) => { + const p = new Promise((resolve, reject) => { + new BundleWalker(options).on("done", resolve).on("error", reject).start(); + }); + return callback ? p.then((res) => callback(null, res), callback) : p; + }; + var walkSync = (options) => { + return new BundleWalkerSync(options).start().result; + }; + module2.exports = walk; + walk.sync = walkSync; + walk.BundleWalker = BundleWalker; + walk.BundleWalkerSync = BundleWalkerSync; + } +}); + +// ../../node_modules/.pnpm/ignore-walk@3.0.4/node_modules/ignore-walk/index.js +var require_ignore_walk = __commonJS({ + "../../node_modules/.pnpm/ignore-walk@3.0.4/node_modules/ignore-walk/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var path = require("path"); + var EE = require("events").EventEmitter; + var Minimatch = require_minimatch().Minimatch; + var Walker = class extends EE { + constructor(opts) { + opts = opts || {}; + super(opts); + this.path = opts.path || process.cwd(); + this.basename = path.basename(this.path); + this.ignoreFiles = opts.ignoreFiles || [".ignore"]; + this.ignoreRules = {}; + this.parent = opts.parent || null; + this.includeEmpty = !!opts.includeEmpty; + this.root = this.parent ? this.parent.root : this.path; + this.follow = !!opts.follow; + this.result = this.parent ? this.parent.result : new Set(); + this.entries = null; + this.sawError = false; + } + sort(a, b) { + return a.localeCompare(b, "en"); + } + emit(ev, data) { + let ret = false; + if (!(this.sawError && ev === "error")) { + if (ev === "error") + this.sawError = true; + else if (ev === "done" && !this.parent) { + data = Array.from(data).map((e) => /^@/.test(e) ? `./${e}` : e).sort(this.sort); + this.result = data; + } + if (ev === "error" && this.parent) + ret = this.parent.emit("error", data); + else + ret = super.emit(ev, data); + } + return ret; + } + start() { + fs.readdir(this.path, (er, entries) => er ? this.emit("error", er) : this.onReaddir(entries)); + return this; + } + isIgnoreFile(e) { + return e !== "." && e !== ".." && this.ignoreFiles.indexOf(e) !== -1; + } + onReaddir(entries) { + this.entries = entries; + if (entries.length === 0) { + if (this.includeEmpty) + this.result.add(this.path.substr(this.root.length + 1)); + this.emit("done", this.result); + } else { + const hasIg = this.entries.some((e) => this.isIgnoreFile(e)); + if (hasIg) + this.addIgnoreFiles(); + else + this.filterEntries(); + } + } + addIgnoreFiles() { + const newIg = this.entries.filter((e) => this.isIgnoreFile(e)); + let igCount = newIg.length; + const then = (_) => { + if (--igCount === 0) + this.filterEntries(); + }; + newIg.forEach((e) => this.addIgnoreFile(e, then)); + } + addIgnoreFile(file, then) { + const ig = path.resolve(this.path, file); + fs.readFile(ig, "utf8", (er, data) => er ? this.emit("error", er) : this.onReadIgnoreFile(file, data, then)); + } + onReadIgnoreFile(file, data, then) { + const mmopt = { + matchBase: true, + dot: true, + flipNegate: true, + nocase: true + }; + const rules = data.split(/\r?\n/).filter((line) => !/^#|^$/.test(line.trim())).map((r) => new Minimatch(r, mmopt)); + this.ignoreRules[file] = rules; + then(); + } + filterEntries() { + const filtered = this.entries.map((entry) => { + const passFile = this.filterEntry(entry); + const passDir = this.filterEntry(entry, true); + return passFile || passDir ? [entry, passFile, passDir] : false; + }).filter((e) => e); + let entryCount = filtered.length; + if (entryCount === 0) { + this.emit("done", this.result); + } else { + const then = (_) => { + if (--entryCount === 0) + this.emit("done", this.result); + }; + filtered.forEach((filt) => { + const entry = filt[0]; + const file = filt[1]; + const dir = filt[2]; + this.stat(entry, file, dir, then); + }); + } + } + onstat(st, entry, file, dir, then) { + const abs = this.path + "/" + entry; + if (!st.isDirectory()) { + if (file) + this.result.add(abs.substr(this.root.length + 1)); + then(); + } else { + if (dir) + this.walker(entry, then); + else + then(); + } + } + stat(entry, file, dir, then) { + const abs = this.path + "/" + entry; + fs[this.follow ? "stat" : "lstat"](abs, (er, st) => { + if (er) + this.emit("error", er); + else + this.onstat(st, entry, file, dir, then); + }); + } + walkerOpt(entry) { + return { + path: this.path + "/" + entry, + parent: this, + ignoreFiles: this.ignoreFiles, + follow: this.follow, + includeEmpty: this.includeEmpty + }; + } + walker(entry, then) { + new Walker(this.walkerOpt(entry)).on("done", then).start(); + } + filterEntry(entry, partial) { + let included = true; + if (this.parent && this.parent.filterEntry) { + var pt = this.basename + "/" + entry; + included = this.parent.filterEntry(pt, partial); + } + this.ignoreFiles.forEach((f) => { + if (this.ignoreRules[f]) { + this.ignoreRules[f].forEach((rule) => { + if (rule.negate !== included) { + const match = rule.match("/" + entry) || rule.match(entry) || !!partial && (rule.match("/" + entry + "/") || rule.match(entry + "/")) || !!partial && rule.negate && (rule.match("/" + entry, true) || rule.match(entry, true)); + if (match) + included = rule.negate; + } + }); + } + }); + return included; + } + }; + var WalkerSync = class extends Walker { + constructor(opt) { + super(opt); + } + start() { + this.onReaddir(fs.readdirSync(this.path)); + return this; + } + addIgnoreFile(file, then) { + const ig = path.resolve(this.path, file); + this.onReadIgnoreFile(file, fs.readFileSync(ig, "utf8"), then); + } + stat(entry, file, dir, then) { + const abs = this.path + "/" + entry; + const st = fs[this.follow ? "statSync" : "lstatSync"](abs); + this.onstat(st, entry, file, dir, then); + } + walker(entry, then) { + new WalkerSync(this.walkerOpt(entry)).start(); + then(); + } + }; + var walk = (options, callback) => { + const p = new Promise((resolve, reject) => { + new Walker(options).on("done", resolve).on("error", reject).start(); + }); + return callback ? p.then((res) => callback(null, res), callback) : p; + }; + var walkSync = (options) => { + return new WalkerSync(options).start().result; + }; + module2.exports = walk; + walk.sync = walkSync; + walk.Walker = Walker; + walk.WalkerSync = WalkerSync; + } +}); + +// ../../node_modules/.pnpm/npm-packlist@2.2.2/node_modules/npm-packlist/index.js +var require_npm_packlist = __commonJS({ + "../../node_modules/.pnpm/npm-packlist@2.2.2/node_modules/npm-packlist/index.js"(exports2, module2) { + "use strict"; + var bundleWalk = require_npm_bundled(); + var BundleWalker = bundleWalk.BundleWalker; + var BundleWalkerSync = bundleWalk.BundleWalkerSync; + var ignoreWalk = require_ignore_walk(); + var IgnoreWalker = ignoreWalk.Walker; + var IgnoreWalkerSync = ignoreWalk.WalkerSync; + var rootBuiltinRules = Symbol("root-builtin-rules"); + var packageNecessaryRules = Symbol("package-necessary-rules"); + var path = require("path"); + var normalizePackageBin = require_npm_normalize_package_bin(); + var packageMustHaveFileNames = "readme|copying|license|licence"; + var packageMustHaves = `@(${packageMustHaveFileNames}){,.*[^~$]}`; + var packageMustHavesRE = new RegExp(`^(${packageMustHaveFileNames})(\\..*[^~$])?$`, "i"); + var fs = require("fs"); + var glob = require_glob(); + var defaultRules = [ + ".npmignore", + ".gitignore", + "**/.git", + "**/.svn", + "**/.hg", + "**/CVS", + "**/.git/**", + "**/.svn/**", + "**/.hg/**", + "**/CVS/**", + "/.lock-wscript", + "/.wafpickle-*", + "/build/config.gypi", + "npm-debug.log", + "**/.npmrc", + ".*.swp", + ".DS_Store", + "**/.DS_Store/**", + "._*", + "**/._*/**", + "*.orig", + "/package-lock.json", + "/yarn.lock", + "/archived-packages/**" + ]; + var nameIsBadForWindows = (file) => /\*/.test(file); + var npmWalker = (Class) => class Walker extends Class { + constructor(opt) { + opt = opt || {}; + opt.ignoreFiles = [ + rootBuiltinRules, + "package.json", + ".npmignore", + ".gitignore", + packageNecessaryRules + ]; + opt.includeEmpty = false; + opt.path = opt.path || process.cwd(); + const followRe = /^(?:\/node_modules\/(?:@[^/]+\/[^/]+|[^/]+)\/)*\/node_modules(?:\/@[^/]+)?$/; + const rootPath = opt.parent ? opt.parent.root : opt.path; + const followTestPath = opt.path.replace(/\\/g, "/").substr(rootPath.length); + opt.follow = followRe.test(followTestPath); + super(opt); + if (!this.parent) { + this.bundled = opt.bundled || []; + this.bundledScopes = Array.from(new Set(this.bundled.filter((f) => /^@/.test(f)).map((f) => f.split("/")[0]))); + const rules = defaultRules.join("\n") + "\n"; + this.packageJsonCache = opt.packageJsonCache || new Map(); + super.onReadIgnoreFile(rootBuiltinRules, rules, (_) => _); + } else { + this.bundled = []; + this.bundledScopes = []; + this.packageJsonCache = this.parent.packageJsonCache; + } + } + onReaddir(entries) { + if (!this.parent) { + entries = entries.filter((e) => e !== ".git" && !(e === "node_modules" && this.bundled.length === 0)); + } + if (this.parent || !entries.includes("package.json")) + return super.onReaddir(entries); + const ig = path.resolve(this.path, "package.json"); + if (this.packageJsonCache.has(ig)) { + const pkg = this.packageJsonCache.get(ig); + if (!pkg || typeof pkg !== "object") + return this.readPackageJson(entries); + return this.getPackageFiles(entries, JSON.stringify(pkg)); + } + this.readPackageJson(entries); + } + onReadPackageJson(entries, er, pkg) { + if (er) + this.emit("error", er); + else + this.getPackageFiles(entries, pkg); + } + mustHaveFilesFromPackage(pkg) { + const files = []; + if (pkg.browser) + files.push("/" + pkg.browser); + if (pkg.main) + files.push("/" + pkg.main); + if (pkg.bin) { + for (const key in pkg.bin) + files.push("/" + pkg.bin[key]); + } + files.push("/package.json", "/npm-shrinkwrap.json", "!/package-lock.json", packageMustHaves); + return files; + } + getPackageFiles(entries, pkg) { + try { + pkg = normalizePackageBin(JSON.parse(pkg.toString())); + } catch (er) { + return super.onReaddir(entries); + } + const ig = path.resolve(this.path, "package.json"); + this.packageJsonCache.set(ig, pkg); + if (!Array.isArray(pkg.files)) + return super.onReaddir(entries); + pkg.files.push(...this.mustHaveFilesFromPackage(pkg)); + if ((pkg.bundleDependencies || pkg.bundledDependencies) && entries.includes("node_modules")) + pkg.files.push("node_modules"); + const patterns = Array.from(new Set(pkg.files)).reduce((set2, pattern) => { + const excl = pattern.match(/^!+/); + if (excl) + pattern = pattern.substr(excl[0].length); + pattern = pattern.replace(/^\/+/, ""); + const negate = excl && excl[0].length % 2 === 1; + set2.push({ pattern, negate }); + return set2; + }, []); + let n = patterns.length; + const set = new Set(); + const negates = new Set(); + const results = []; + const then = (pattern, negate, er, fileList, i) => { + if (er) + return this.emit("error", er); + results[i] = { negate, fileList }; + if (--n === 0) + processResults(results); + }; + const processResults = (results2) => { + for (const { negate, fileList } of results2) { + if (negate) { + fileList.forEach((f) => { + f = f.replace(/\/+$/, ""); + set.delete(f); + negates.add(f); + }); + } else { + fileList.forEach((f) => { + f = f.replace(/\/+$/, ""); + set.add(f); + negates.delete(f); + }); + } + } + const list = Array.from(set); + pkg.files = list.concat(Array.from(negates).map((f) => "!" + f)); + const rdResult = Array.from(new Set(list.map((f) => f.replace(/^\/+/, "")))); + super.onReaddir(rdResult); + }; + patterns.forEach(({ pattern, negate }, i) => this.globFiles(pattern, (er, res) => then(pattern, negate, er, res, i))); + } + filterEntry(entry, partial) { + const p = this.path.substr(this.root.length + 1); + const pkgre = /^node_modules\/(@[^/]+\/?[^/]+|[^/]+)(\/.*)?$/; + const isRoot = !this.parent; + const pkg = isRoot && pkgre.test(entry) ? entry.replace(pkgre, "$1") : null; + const rootNM = isRoot && entry === "node_modules"; + const rootPJ = isRoot && entry === "package.json"; + return /^node_modules($|\/)/i.test(p) ? this.parent.filterEntry(this.basename + "/" + entry, partial) : pkg ? this.bundled.indexOf(pkg) !== -1 || this.bundledScopes.indexOf(pkg) !== -1 : rootNM ? !!this.bundled.length : rootPJ ? true : packageMustHavesRE.test(entry) ? true : isRoot && (entry === "npm-shrinkwrap.json" || entry === "package.json") ? true : isRoot && entry === "package-lock.json" ? false : super.filterEntry(entry, partial); + } + filterEntries() { + if (this.ignoreRules[".npmignore"]) + this.ignoreRules[".gitignore"] = null; + this.filterEntries = super.filterEntries; + super.filterEntries(); + } + addIgnoreFile(file, then) { + const ig = path.resolve(this.path, file); + if (file === "package.json" && this.parent) + then(); + else if (this.packageJsonCache.has(ig)) + this.onPackageJson(ig, this.packageJsonCache.get(ig), then); + else + super.addIgnoreFile(file, then); + } + onPackageJson(ig, pkg, then) { + this.packageJsonCache.set(ig, pkg); + if (Array.isArray(pkg.files)) { + super.onReadIgnoreFile("package.json", pkg.files.map((f) => "!" + f).join("\n") + "\n", then); + } else { + const rules = this.mustHaveFilesFromPackage(pkg).map((f) => `!${f}`); + const data = rules.join("\n") + "\n"; + super.onReadIgnoreFile(packageNecessaryRules, data, then); + } + } + stat(entry, file, dir, then) { + if (nameIsBadForWindows(entry)) + then(); + else + super.stat(entry, file, dir, then); + } + onstat(st, entry, file, dir, then) { + if (st.isSymbolicLink()) + then(); + else + super.onstat(st, entry, file, dir, then); + } + onReadIgnoreFile(file, data, then) { + if (file === "package.json") { + try { + const ig = path.resolve(this.path, file); + this.onPackageJson(ig, JSON.parse(data), then); + } catch (er) { + then(); + } + } else + super.onReadIgnoreFile(file, data, then); + } + sort(a, b) { + return sort(a, b); + } + }; + var Walker = class extends npmWalker(IgnoreWalker) { + globFiles(pattern, cb) { + glob(pattern, { dot: true, cwd: this.path, nocase: true }, cb); + } + readPackageJson(entries) { + fs.readFile(this.path + "/package.json", (er, pkg) => this.onReadPackageJson(entries, er, pkg)); + } + walker(entry, then) { + new Walker(this.walkerOpt(entry)).on("done", then).start(); + } + }; + var WalkerSync = class extends npmWalker(IgnoreWalkerSync) { + globFiles(pattern, cb) { + cb(null, glob.sync(pattern, { dot: true, cwd: this.path, nocase: true })); + } + readPackageJson(entries) { + const p = this.path + "/package.json"; + try { + this.onReadPackageJson(entries, null, fs.readFileSync(p)); + } catch (er) { + this.onReadPackageJson(entries, er); + } + } + walker(entry, then) { + new WalkerSync(this.walkerOpt(entry)).start(); + then(); + } + }; + var walk = (options, callback) => { + options = options || {}; + const p = new Promise((resolve, reject) => { + const bw = new BundleWalker(options); + bw.on("done", (bundled) => { + options.bundled = bundled; + options.packageJsonCache = bw.packageJsonCache; + new Walker(options).on("done", resolve).on("error", reject).start(); + }); + bw.start(); + }); + return callback ? p.then((res) => callback(null, res), callback) : p; + }; + var walkSync = (options) => { + options = options || {}; + const bw = new BundleWalkerSync(options).start(); + options.bundled = bw.result; + options.packageJsonCache = bw.packageJsonCache; + const walker = new WalkerSync(options); + walker.start(); + return walker.result; + }; + var sort = (a, b) => { + const exta = path.extname(a).toLowerCase(); + const extb = path.extname(b).toLowerCase(); + const basea = path.basename(a).toLowerCase(); + const baseb = path.basename(b).toLowerCase(); + return exta.localeCompare(extb, "en") || basea.localeCompare(baseb, "en") || a.localeCompare(b, "en"); + }; + module2.exports = walk; + walk.sync = walkSync; + walk.Walker = Walker; + walk.WalkerSync = WalkerSync; + } +}); + +// ../run-npm/lib/index.js +var require_lib104 = __commonJS({ + "../run-npm/lib/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runScriptSync = void 0; + var path_1 = __importDefault(require("path")); + var cross_spawn_1 = __importDefault(require_cross_spawn()); + var path_name_1 = __importDefault(require_path_name()); + function runNpm(npmPath, args2, options) { + var _a; + const npm = npmPath !== null && npmPath !== void 0 ? npmPath : "npm"; + return runScriptSync(npm, args2, { + cwd: (_a = options === null || options === void 0 ? void 0 : options.cwd) !== null && _a !== void 0 ? _a : process.cwd(), + stdio: "inherit", + userAgent: void 0 + }); + } + exports2.default = runNpm; + function runScriptSync(command, args2, opts) { + opts = Object.assign({}, opts); + return cross_spawn_1.default.sync(command, args2, Object.assign({}, opts, { + env: createEnv(opts) + })); + } + exports2.runScriptSync = runScriptSync; + function createEnv(opts) { + const env = Object.create(process.env); + env[path_name_1.default] = [ + path_1.default.join(opts.cwd, "node_modules", ".bin"), + path_1.default.dirname(process.execPath), + process.env[path_name_1.default] + ].join(path_1.default.delimiter); + if (opts.userAgent) { + env.npm_config_user_agent = opts.userAgent; + } + return env; + } + } +}); + +// ../plugin-commands-publishing/lib/recursivePublish.js +var require_recursivePublish = __commonJS({ + "../plugin-commands-publishing/lib/recursivePublish.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var client_1 = require_lib49(); + var logger_1 = __importDefault(require_lib6()); + var pick_registry_for_package_1 = __importDefault(require_lib50()); + var sort_packages_1 = __importDefault(require_lib92()); + var p_filter_1 = __importDefault(require_p_filter()); + var pick_1 = __importDefault(require_pick()); + var write_json_file_1 = __importDefault(require_write_json_file()); + var publish_1 = require_publish2(); + async function default_1(opts) { + var _a, _b; + const pkgs = Object.values(opts.selectedProjectsGraph).map((wsPkg) => wsPkg.package); + const resolve = client_1.createResolver({ + ...opts, + authConfig: opts.rawConfig, + retry: { + factor: opts.fetchRetryFactor, + maxTimeout: opts.fetchRetryMaxtimeout, + minTimeout: opts.fetchRetryMintimeout, + retries: opts.fetchRetries + }, + timeout: opts.fetchTimeout + }); + const pkgsToPublish = await p_filter_1.default(pkgs, async (pkg) => { + var _a2; + if (!pkg.manifest.name || !pkg.manifest.version || pkg.manifest.private) + return false; + if (opts.force) + return true; + return !await isAlreadyPublished({ + dir: pkg.dir, + lockfileDir: (_a2 = opts.lockfileDir) !== null && _a2 !== void 0 ? _a2 : pkg.dir, + registries: opts.registries, + resolve + }, pkg.manifest.name, pkg.manifest.version); + }); + const publishedPkgDirs = new Set(pkgsToPublish.map(({ dir }) => dir)); + const publishedPackages = []; + if (publishedPkgDirs.size === 0) { + logger_1.default.info({ + message: "There are no new packages that should be published", + prefix: opts.dir + }); + } else { + const appendedArgs = []; + if (opts.cliOptions["access"]) { + appendedArgs.push(`--access=${opts.cliOptions["access"]}`); + } + if (opts.dryRun) { + appendedArgs.push("--dry-run"); + } + const chunks = sort_packages_1.default(opts.selectedProjectsGraph); + const tag = (_a = opts.tag) !== null && _a !== void 0 ? _a : "latest"; + for (const chunk of chunks) { + for (const pkgDir of chunk) { + if (!publishedPkgDirs.has(pkgDir)) + continue; + const pkg = opts.selectedProjectsGraph[pkgDir].package; + const publishResult = await publish_1.handler({ + ...opts, + dir: pkg.dir, + argv: { + original: [ + "publish", + "--tag", + tag, + "--registry", + pick_registry_for_package_1.default(opts.registries, pkg.manifest.name), + ...appendedArgs + ] + }, + gitChecks: false, + recursive: false + }, [pkg.dir]); + if ((publishResult === null || publishResult === void 0 ? void 0 : publishResult.manifest) != null) { + publishedPackages.push(pick_1.default(["name", "version"], publishResult.manifest)); + } + } + } + } + if (opts.reportSummary) { + await write_json_file_1.default(path_1.default.join((_b = opts.lockfileDir) !== null && _b !== void 0 ? _b : opts.dir, "pnpm-publish-summary.json"), { publishedPackages }); + } + } + exports2.default = default_1; + async function isAlreadyPublished(opts, pkgName, pkgVersion) { + try { + await opts.resolve({ alias: pkgName, pref: pkgVersion }, { + lockfileDir: opts.lockfileDir, + preferredVersions: {}, + projectDir: opts.dir, + registry: pick_registry_for_package_1.default(opts.registries, pkgName, pkgVersion) + }); + return true; + } catch (err) { + return false; + } + } + } +}); + +// ../plugin-commands-publishing/lib/gitChecks.js +var require_gitChecks = __commonJS({ + "../plugin-commands-publishing/lib/gitChecks.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isRemoteHistoryClean = exports2.isWorkingTreeClean = exports2.getCurrentBranch = exports2.isGitRepo = void 0; + var execa_1 = __importDefault(require_lib26()); + async function isGitRepo() { + try { + await execa_1.default("git", ["rev-parse", "--git-dir"]); + } catch (_) { + return false; + } + return true; + } + exports2.isGitRepo = isGitRepo; + async function getCurrentBranch() { + const { stdout } = await execa_1.default("git", ["symbolic-ref", "--short", "HEAD"]); + return stdout; + } + exports2.getCurrentBranch = getCurrentBranch; + async function isWorkingTreeClean() { + try { + const { stdout: status } = await execa_1.default("git", ["status", "--porcelain"]); + if (status !== "") { + return false; + } + return true; + } catch (_) { + return false; + } + } + exports2.isWorkingTreeClean = isWorkingTreeClean; + async function isRemoteHistoryClean() { + let history; + try { + const { stdout } = await execa_1.default("git", ["rev-list", "--count", "--left-only", "@{u}...HEAD"]); + history = stdout; + } catch (_) { + history = null; + } + if (history && history !== "0") { + return false; + } + return true; + } + exports2.isRemoteHistoryClean = isRemoteHistoryClean; + } +}); + +// ../plugin-commands-publishing/lib/publish.js +var require_publish2 = __commonJS({ + "../plugin-commands-publishing/lib/publish.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.runScriptsIfPresent = exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var fs_1 = require("fs"); + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var config_1 = require_lib10(); + var error_1 = __importDefault(require_lib8()); + var lifecycle_1 = __importDefault(require_lib80()); + var run_npm_1 = __importDefault(require_lib104()); + var enquirer_1 = require_enquirer(); + var rimraf_1 = __importDefault(require_rimraf()); + var pick_1 = __importDefault(require_pick()); + var realpath_missing_1 = __importDefault(require_realpath_missing()); + var render_help_1 = __importDefault(require_lib30()); + var pack = __importStar2(require_pack2()); + var recursivePublish_1 = __importDefault(require_recursivePublish()); + var gitChecks_1 = require_gitChecks(); + function rcOptionsTypes() { + return pick_1.default([ + "access", + "git-checks", + "ignore-scripts", + "npm-path", + "otp", + "publish-branch", + "registry", + "tag", + "unsafe-perm" + ], config_1.types); + } + exports2.rcOptionsTypes = rcOptionsTypes; + function cliOptionsTypes() { + return { + ...rcOptionsTypes(), + "dry-run": Boolean, + force: Boolean, + json: Boolean, + recursive: Boolean, + "report-summary": Boolean + }; + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["publish"]; + function help() { + return render_help_1.default({ + description: "Publishes a package to the npm registry.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "Don't check if current branch is your publish branch, clean, and up-to-date", + name: "--no-git-checks" + }, + { + description: "Sets branch name to publish. Default is master", + name: "--publish-branch" + }, + { + description: "Does everything a publish would do except actually publishing to the registry", + name: "--dry-run" + }, + { + description: 'Registers the published package with the given tag. By default, the "latest" tag is used.', + name: "--tag " + }, + { + description: "Tells the registry whether this package should be published as public or restricted", + name: "--access " + }, + { + description: "Ignores any publish related lifecycle scripts (prepublishOnly, postpublish, and the like)", + name: "--ignore-scripts" + }, + { + description: 'Packages are proceeded to be published even if their current version is already in the registry. This is useful when a "prepublishOnly" script bumps the version of the package before it is published', + name: "--force" + }, + { + description: 'Save the list of the newly published packages to "pnpm-publish-summary.json". Useful when some other tooling is used to report the list of published packages.', + name: "--report-summary" + } + ] + } + ], + url: cli_utils_1.docsUrl("publish"), + usages: ["pnpm publish [|] [--tag ] [--access ] [options]"] + }); + } + exports2.help = help; + var GIT_CHECKS_HINT = 'If you want to disable Git checks on publish, set the "git-checks" setting to "false", or run again with "--no-git-checks".'; + async function handler(opts, params) { + var _a, _b; + if (opts.gitChecks !== false && await gitChecks_1.isGitRepo()) { + if (!await gitChecks_1.isWorkingTreeClean()) { + throw new error_1.default("GIT_NOT_UNCLEAN", "Unclean working tree. Commit or stash changes first.", { + hint: GIT_CHECKS_HINT + }); + } + const branches = opts.publishBranch ? [opts.publishBranch] : ["master", "main"]; + const currentBranch = await gitChecks_1.getCurrentBranch(); + if (!branches.includes(currentBranch)) { + const { confirm } = await enquirer_1.prompt({ + message: `You're on branch "${currentBranch}" but your "publish-branch" is set to "${branches.join("|")}". Do you want to continue?`, + name: "confirm", + type: "confirm" + }); + if (!confirm) { + throw new error_1.default("GIT_NOT_CORRECT_BRANCH", `Branch is not on '${branches.join("|")}'.`, { + hint: GIT_CHECKS_HINT + }); + } + } + if (!await gitChecks_1.isRemoteHistoryClean()) { + throw new error_1.default("GIT_NOT_LATEST", "Remote history differs. Please pull changes.", { + hint: GIT_CHECKS_HINT + }); + } + } + if (opts.recursive && opts.selectedProjectsGraph != null) { + await recursivePublish_1.default({ + ...opts, + selectedProjectsGraph: opts.selectedProjectsGraph, + workspaceDir: (_a = opts.workspaceDir) !== null && _a !== void 0 ? _a : process.cwd() + }); + return; + } + if (params.length > 0 && params[0].endsWith(".tgz")) { + run_npm_1.default(opts.npmPath, ["publish", ...params]); + return; + } + const dirInParams = params.length > 0 && params[0]; + const dir = dirInParams || opts.dir || process.cwd(); + const _runScriptsIfPresent = runScriptsIfPresent.bind(null, { + depPath: dir, + extraBinPaths: opts.extraBinPaths, + pkgRoot: dir, + rawConfig: opts.rawConfig, + rootModulesDir: await realpath_missing_1.default(path_1.default.join(dir, "node_modules")), + stdio: "inherit", + unsafePerm: true + }); + const { manifest } = await cli_utils_1.readProjectManifest(dir, opts); + let args2 = opts.argv.original.slice(1); + if (dirInParams) { + args2 = args2.filter((arg) => arg !== params[0]); + } + const index = args2.indexOf("--publish-branch"); + if (index !== -1) { + if ((_b = args2[index + 1]) === null || _b === void 0 ? void 0 : _b.startsWith("-")) { + args2.splice(index, 1); + } else { + args2.splice(index, 2); + } + } + const tarballName = await pack.handler({ + ...opts, + dir + }); + const tarballDir = path_1.default.dirname(path_1.default.join(dir, tarballName)); + const localNpmrc = path_1.default.join(tarballDir, ".npmrc"); + const copyNpmrc = !fs_1.existsSync(localNpmrc) && opts.workspaceDir && fs_1.existsSync(path_1.default.join(opts.workspaceDir, ".npmrc")); + if (copyNpmrc && opts.workspaceDir) { + await fs_1.promises.copyFile(path_1.default.join(opts.workspaceDir, ".npmrc"), localNpmrc); + } + const { status } = run_npm_1.default(opts.npmPath, ["publish", "--ignore-scripts", path_1.default.basename(tarballName), ...args2], { + cwd: tarballDir + }); + await rimraf_1.default(path_1.default.join(dir, tarballName)); + if (copyNpmrc) { + await rimraf_1.default(localNpmrc); + } + if (status != null && status !== 0) { + process.exit(status); + } + if (!opts.ignoreScripts) { + await _runScriptsIfPresent([ + "publish", + "postpublish" + ], manifest); + } + return { manifest }; + } + exports2.handler = handler; + async function runScriptsIfPresent(opts, scriptNames, manifest) { + var _a; + for (const scriptName of scriptNames) { + if (!((_a = manifest.scripts) === null || _a === void 0 ? void 0 : _a[scriptName])) + continue; + await lifecycle_1.default(scriptName, manifest, opts); + } + } + exports2.runScriptsIfPresent = runScriptsIfPresent; + } +}); + +// ../plugin-commands-publishing/lib/pack.js +var require_pack2 = __commonJS({ + "../plugin-commands-publishing/lib/pack.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var fs_1 = __importDefault(require("fs")); + var path_1 = __importDefault(require("path")); + var zlib_1 = require("zlib"); + var config_1 = require_lib10(); + var cli_utils_1 = require_lib20(); + var exportable_manifest_1 = __importDefault(require_lib103()); + var package_bins_1 = __importDefault(require_lib68()); + var fast_glob_1 = __importDefault(require_out4()); + var pick_1 = __importDefault(require_pick()); + var realpath_missing_1 = __importDefault(require_realpath_missing()); + var render_help_1 = __importDefault(require_lib30()); + var tar_stream_1 = __importDefault(require_tar_stream()); + var npm_packlist_1 = __importDefault(require_npm_packlist()); + var fromPairs_1 = __importDefault(require_fromPairs()); + var publish_1 = require_publish2(); + var LICENSE_GLOB = "LICEN{S,C}E{,.*}"; + var findLicenses = fast_glob_1.default.bind(fast_glob_1.default, [LICENSE_GLOB]); + function rcOptionsTypes() { + return { + ...cliOptionsTypes(), + ...pick_1.default([ + "npm-path" + ], config_1.types) + }; + } + exports2.rcOptionsTypes = rcOptionsTypes; + function cliOptionsTypes() { + return { + "pack-destination": String + }; + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["pack"]; + function help() { + return render_help_1.default({ + description: "Create a tarball from a package", + usages: ["pnpm pack"], + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "Directory in which `pnpm pack` will save tarballs. The default is the current working directory.", + name: "--pack-destination " + } + ] + } + ] + }); + } + exports2.help = help; + async function handler(opts) { + var _a, _b; + const { manifest: entryManifest } = await cli_utils_1.readProjectManifest(opts.dir, opts); + const _runScriptsIfPresent = publish_1.runScriptsIfPresent.bind(null, { + depPath: opts.dir, + extraBinPaths: opts.extraBinPaths, + pkgRoot: opts.dir, + rawConfig: opts.rawConfig, + rootModulesDir: await realpath_missing_1.default(path_1.default.join(opts.dir, "node_modules")), + stdio: "inherit", + unsafePerm: true + }); + if (!opts.ignoreScripts) { + await _runScriptsIfPresent([ + "prepublish", + "prepare", + "prepublishOnly", + "prepack" + ], entryManifest); + } + const dir = ((_a = entryManifest.publishConfig) === null || _a === void 0 ? void 0 : _a.directory) ? path_1.default.join(opts.dir, entryManifest.publishConfig.directory) : opts.dir; + const manifest = opts.dir !== dir ? (await cli_utils_1.readProjectManifest(dir, opts)).manifest : entryManifest; + const tarballName = `${manifest.name.replace("@", "").replace("/", "-")}-${manifest.version}.tgz`; + const files = await npm_packlist_1.default({ path: dir }); + const filesMap = fromPairs_1.default(files.map((file) => [`package/${file}`, path_1.default.join(dir, file)])); + if (opts.workspaceDir != null && dir !== opts.workspaceDir && !files.some((file) => /LICEN[CS]E(\..+)?/i.test(file))) { + const licenses = await findLicenses({ cwd: opts.workspaceDir }); + for (const license of licenses) { + filesMap[`package/${license}`] = path_1.default.join(opts.workspaceDir, license); + } + } + const destDir = opts.packDestination ? path_1.default.isAbsolute(opts.packDestination) ? opts.packDestination : path_1.default.join(dir, (_b = opts.packDestination) !== null && _b !== void 0 ? _b : ".") : dir; + await packPkg(path_1.default.join(destDir, tarballName), filesMap, dir); + if (!opts.ignoreScripts) { + await _runScriptsIfPresent(["postpack"], entryManifest); + } + return path_1.default.relative(opts.dir, path_1.default.join(dir, tarballName)); + } + exports2.handler = handler; + var modeIsExecutable = (mode) => (mode & 73) === 73; + async function packPkg(destFile, filesMap, projectDir) { + var _a, _b; + const { manifest } = await cli_utils_1.readProjectManifest(projectDir, {}); + const bins = [ + ...(await package_bins_1.default(manifest, projectDir)).map(({ path }) => path), + ...((_b = (_a = manifest.publishConfig) === null || _a === void 0 ? void 0 : _a.executableFiles) !== null && _b !== void 0 ? _b : []).map((executableFile) => path_1.default.join(projectDir, executableFile)) + ]; + const mtime = new Date("1985-10-26T08:15:00.000Z"); + const pack = tar_stream_1.default.pack(); + for (const [name, source] of Object.entries(filesMap)) { + let isExecutable = bins.some((bin) => path_1.default.relative(bin, source) === ""); + if (!isExecutable) { + const { mode: existingMode } = await fs_1.default.promises.stat(source); + isExecutable = modeIsExecutable(existingMode); + } + const mode = isExecutable ? 493 : 420; + if (/^package\/package\.(json|json5|yaml)/.test(name)) { + const publishManifest = await exportable_manifest_1.default(projectDir, manifest); + pack.entry({ mode, mtime, name: "package/package.json" }, JSON.stringify(publishManifest, null, 2)); + continue; + } + pack.entry({ mode, mtime, name }, fs_1.default.readFileSync(source)); + } + const tarball = fs_1.default.createWriteStream(destFile); + pack.pipe(zlib_1.createGzip()).pipe(tarball); + pack.finalize(); + return new Promise((resolve, reject) => { + tarball.on("close", () => resolve()).on("error", reject); + }); + } + } +}); + +// ../plugin-commands-publishing/lib/index.js +var require_lib105 = __commonJS({ + "../plugin-commands-publishing/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.publish = exports2.pack = void 0; + var pack = __importStar2(require_pack2()); + exports2.pack = pack; + var publish = __importStar2(require_publish2()); + exports2.publish = publish; + } +}); + +// ../plugin-commands-script-runners/lib/dlx.js +var require_dlx = __commonJS({ + "../plugin-commands-script-runners/lib/dlx.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.cliOptionsTypes = exports2.rcOptionsTypes = exports2.commandNames = void 0; + var fs_1 = __importDefault(require("fs")); + var os_1 = __importDefault(require("os")); + var path_1 = __importDefault(require("path")); + var rimraf_1 = __importDefault(require_rimraf()); + var execa_1 = __importDefault(require_lib26()); + var path_name_1 = __importDefault(require_path_name()); + var render_help_1 = __importDefault(require_lib30()); + exports2.commandNames = ["dlx"]; + function rcOptionsTypes() { + return {}; + } + exports2.rcOptionsTypes = rcOptionsTypes; + var cliOptionsTypes = () => ({ + package: [String, Array] + }); + exports2.cliOptionsTypes = cliOptionsTypes; + function help() { + return render_help_1.default({ + description: "Run a package in a temporary environment.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "The package to install before running the command", + name: "--package" + } + ] + } + ], + usages: ["pnpm dlx [args...]"] + }); + } + exports2.help = help; + async function handler(opts, params) { + var _a; + const prefix = path_1.default.join(fs_1.default.realpathSync(os_1.default.tmpdir()), `dlx-${process.pid.toString()}`); + const bins = process.platform === "win32" ? prefix : path_1.default.join(prefix, "bin"); + fs_1.default.mkdirSync(prefix, { recursive: true }); + process.on("exit", () => { + try { + fs_1.default.rmdirSync(prefix, { + recursive: true, + maxRetries: 3 + }); + } catch (err) { + } + }); + await rimraf_1.default(bins); + const pkgs = (_a = opts.package) !== null && _a !== void 0 ? _a : params.slice(0, 1); + await execa_1.default("pnpm", ["add", ...pkgs, "--global", "--global-dir", prefix, "--dir", prefix], { + stdio: "inherit" + }); + await execa_1.default(params[0], params.slice(1), { + env: { + ...process.env, + [path_name_1.default]: [ + bins, + process.env[path_name_1.default] + ].join(path_1.default.delimiter) + }, + stdio: "inherit" + }); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-script-runners/lib/existsInDir.js +var require_existsInDir = __commonJS({ + "../plugin-commands-script-runners/lib/existsInDir.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var path_exists_1 = __importDefault(require_path_exists()); + exports2.default = async (entityName, dir) => { + const entityPath = path_1.default.join(dir, entityName); + if (await path_exists_1.default(entityPath)) + return entityPath; + return void 0; + }; + } +}); + +// ../plugin-commands-script-runners/lib/runRecursive.js +var require_runRecursive = __commonJS({ + "../plugin-commands-script-runners/lib/runRecursive.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var error_1 = __importDefault(require_lib8()); + var lifecycle_1 = __importStar2(require_lib80()); + var logger_1 = __importDefault(require_lib6()); + var sort_packages_1 = __importDefault(require_lib92()); + var p_limit_1 = __importDefault(require_p_limit()); + var realpath_missing_1 = __importDefault(require_realpath_missing()); + var existsInDir_1 = __importDefault(require_existsInDir()); + exports2.default = async (params, opts) => { + var _a; + const [scriptName, ...passedThruArgs] = params; + if (!scriptName) { + throw new error_1.default("SCRIPT_NAME_IS_REQUIRED", "You must specify the script you want to run"); + } + let hasCommand = 0; + const sortedPackageChunks = opts.sort ? sort_packages_1.default(opts.selectedProjectsGraph) : [Object.keys(opts.selectedProjectsGraph).sort()]; + const packageChunks = opts.reverse ? sortedPackageChunks.reverse() : sortedPackageChunks; + const result = { + fails: [], + passes: 0 + }; + const limitRun = p_limit_1.default((_a = opts.workspaceConcurrency) !== null && _a !== void 0 ? _a : 4); + const stdio = opts.workspaceConcurrency === 1 || packageChunks.length === 1 && packageChunks[0].length === 1 ? "inherit" : "pipe"; + const existsPnp = existsInDir_1.default.bind(null, ".pnp.cjs"); + const workspacePnpPath = opts.workspaceDir && await existsPnp(opts.workspaceDir); + for (const chunk of packageChunks) { + await Promise.all(chunk.map(async (prefix) => limitRun(async () => { + var _a2; + const pkg = opts.selectedProjectsGraph[prefix]; + if (!((_a2 = pkg.package.manifest.scripts) === null || _a2 === void 0 ? void 0 : _a2[scriptName]) || process.env.npm_lifecycle_event === scriptName && process.env.PNPM_SCRIPT_SRC_DIR === prefix) { + return; + } + hasCommand++; + try { + const lifecycleOpts = { + depPath: prefix, + extraBinPaths: opts.extraBinPaths, + pkgRoot: prefix, + rawConfig: opts.rawConfig, + rootModulesDir: await realpath_missing_1.default(path_1.default.join(prefix, "node_modules")), + scriptShell: opts.scriptShell, + shellEmulator: opts.shellEmulator, + stdio, + unsafePerm: true + }; + const pnpPath = workspacePnpPath !== null && workspacePnpPath !== void 0 ? workspacePnpPath : await existsPnp(prefix); + if (pnpPath) { + lifecycleOpts.extraEnv = lifecycle_1.makeNodeRequireOption(pnpPath); + } + if (pkg.package.manifest.scripts[`pre${scriptName}`]) { + await lifecycle_1.default(`pre${scriptName}`, pkg.package.manifest, lifecycleOpts); + } + await lifecycle_1.default(scriptName, pkg.package.manifest, { ...lifecycleOpts, args: passedThruArgs }); + if (pkg.package.manifest.scripts[`post${scriptName}`]) { + await lifecycle_1.default(`post${scriptName}`, pkg.package.manifest, lifecycleOpts); + } + result.passes++; + } catch (err) { + logger_1.default.info(err); + if (!opts.bail) { + result.fails.push({ + error: err, + message: err.message, + prefix + }); + return; + } + err["code"] = "ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL"; + err["prefix"] = prefix; + throw err; + } + }))); + } + if (scriptName !== "test" && !hasCommand && !opts.ifPresent) { + const allPackagesAreSelected = Object.keys(opts.selectedProjectsGraph).length === opts.allProjects.length; + if (allPackagesAreSelected) { + throw new error_1.default("RECURSIVE_RUN_NO_SCRIPT", `None of the packages has a "${scriptName}" script`); + } else { + logger_1.default.info({ + message: `None of the selected packages has a "${scriptName}" script`, + prefix: opts.workspaceDir + }); + } + } + cli_utils_1.throwOnCommandFail("pnpm recursive run", result); + }; + } +}); + +// ../plugin-commands-script-runners/lib/run.js +var require_run = __commonJS({ + "../plugin-commands-script-runners/lib/run.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.completion = exports2.cliOptionsTypes = exports2.rcOptionsTypes = exports2.shorthands = exports2.PARALLEL_OPTION_HELP = exports2.IF_PRESENT_OPTION_HELP = exports2.IF_PRESENT_OPTION = void 0; + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var error_1 = __importDefault(require_lib8()); + var lifecycle_1 = __importStar2(require_lib80()); + var pick_1 = __importDefault(require_pick()); + var realpath_missing_1 = __importDefault(require_realpath_missing()); + var render_help_1 = __importDefault(require_lib30()); + var runRecursive_1 = __importDefault(require_runRecursive()); + var existsInDir_1 = __importDefault(require_existsInDir()); + var exec_1 = require_exec(); + exports2.IF_PRESENT_OPTION = { + "if-present": Boolean + }; + exports2.IF_PRESENT_OPTION_HELP = { + description: "Avoid exiting with a non-zero exit code when the script is undefined", + name: "--if-present" + }; + exports2.PARALLEL_OPTION_HELP = { + description: "Completely disregard concurrency and topological sorting, running a given script immediately in all matching packages with prefixed streaming output. This is the preferred flag for long-running processes such as watch run over many packages.", + name: "--parallel" + }; + exports2.shorthands = { + parallel: [ + "--workspace-concurrency=Infinity", + "--no-sort", + "--stream", + "--recursive" + ] + }; + function rcOptionsTypes() { + return { + ...pick_1.default([ + "npm-path" + ], config_1.types) + }; + } + exports2.rcOptionsTypes = rcOptionsTypes; + function cliOptionsTypes() { + return { + ...pick_1.default([ + "bail", + "sort", + "unsafe-perm", + "workspace-concurrency" + ], config_1.types), + ...exports2.IF_PRESENT_OPTION, + recursive: Boolean + }; + } + exports2.cliOptionsTypes = cliOptionsTypes; + var completion = async (cliOpts, params) => { + var _a, _b; + if (params.length > 0) { + return []; + } + const manifest = await cli_utils_1.readProjectManifestOnly((_a = cliOpts.dir) !== null && _a !== void 0 ? _a : process.cwd(), cliOpts); + return Object.keys((_b = manifest.scripts) !== null && _b !== void 0 ? _b : {}).map((name) => ({ name })); + }; + exports2.completion = completion; + exports2.commandNames = ["run", "run-script"]; + function help() { + return render_help_1.default({ + aliases: ["run-script"], + description: "Runs a defined package script.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: 'Run the defined package script in every package found in subdirectories or every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + }, + { + description: "The command will exit with a 0 exit code even if the script fails", + name: "--no-bail" + }, + exports2.IF_PRESENT_OPTION_HELP, + exports2.PARALLEL_OPTION_HELP, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + }, + common_cli_options_help_1.FILTERING + ], + url: cli_utils_1.docsUrl("run"), + usages: ["pnpm run [-- ...]"] + }); + } + exports2.help = help; + async function handler(opts, params) { + var _a, _b, _c, _d, _e; + let dir; + const [scriptName, ...passedThruArgs] = params; + if (opts.recursive) { + if (scriptName || Object.keys(opts.selectedProjectsGraph).length > 1) { + await runRecursive_1.default(params, opts); + return; + } + dir = Object.keys(opts.selectedProjectsGraph)[0]; + } else { + dir = opts.dir; + } + const manifest = await cli_utils_1.readProjectManifestOnly(dir, opts); + if (!scriptName) { + const rootManifest = opts.workspaceDir && opts.workspaceDir !== dir ? (await cli_utils_1.tryReadProjectManifest(opts.workspaceDir, opts)).manifest : void 0; + return printProjectCommands(manifest, rootManifest !== null && rootManifest !== void 0 ? rootManifest : void 0); + } + if (scriptName !== "start" && !((_a = manifest.scripts) === null || _a === void 0 ? void 0 : _a[scriptName])) { + if (opts.ifPresent) + return; + if (opts.fallbackCommandUsed) { + if (opts.argv == null) + throw new Error("Could not fallback because opts.argv.original was not passed to the script runner"); + await exec_1.handler({ + selectedProjectsGraph: {}, + ...opts + }, opts.argv.original.slice(1)); + return; + } + if (opts.workspaceDir) { + const { manifest: rootManifest } = await cli_utils_1.tryReadProjectManifest(opts.workspaceDir, opts); + if ((_b = rootManifest === null || rootManifest === void 0 ? void 0 : rootManifest.scripts) === null || _b === void 0 ? void 0 : _b[scriptName]) { + throw new error_1.default("NO_SCRIPT", `Missing script: ${scriptName}`, { + hint: `But ${scriptName} is present in the root of the workspace, +so you may run "pnpm -w run ${scriptName}"` + }); + } + } + throw new error_1.default("NO_SCRIPT", `Missing script: ${scriptName}`); + } + const lifecycleOpts = { + depPath: dir, + extraBinPaths: opts.extraBinPaths, + pkgRoot: dir, + rawConfig: opts.rawConfig, + rootModulesDir: await realpath_missing_1.default(path_1.default.join(dir, "node_modules")), + scriptShell: opts.scriptShell, + silent: opts.reporter === "silent", + shellEmulator: opts.shellEmulator, + stdio: "inherit", + unsafePerm: true + }; + const existsPnp = existsInDir_1.default.bind(null, ".pnp.cjs"); + const pnpPath = (_c = opts.workspaceDir && await existsPnp(opts.workspaceDir)) !== null && _c !== void 0 ? _c : await existsPnp(dir); + if (pnpPath) { + lifecycleOpts.extraEnv = lifecycle_1.makeNodeRequireOption(pnpPath); + } + try { + if (opts.enablePrePostScripts && ((_d = manifest.scripts) === null || _d === void 0 ? void 0 : _d[`pre${scriptName}`]) && !manifest.scripts[scriptName].includes(`pre${scriptName}`)) { + await lifecycle_1.default(`pre${scriptName}`, manifest, lifecycleOpts); + } + await lifecycle_1.default(scriptName, manifest, { ...lifecycleOpts, args: passedThruArgs }); + if (opts.enablePrePostScripts && ((_e = manifest.scripts) === null || _e === void 0 ? void 0 : _e[`post${scriptName}`]) && !manifest.scripts[scriptName].includes(`post${scriptName}`)) { + await lifecycle_1.default(`post${scriptName}`, manifest, lifecycleOpts); + } + } catch (err) { + if (opts.bail !== false) { + throw err; + } + } + return void 0; + } + exports2.handler = handler; + var ALL_LIFECYCLE_SCRIPTS = new Set([ + "prepublish", + "prepare", + "prepublishOnly", + "prepack", + "postpack", + "publish", + "postpublish", + "preinstall", + "install", + "postinstall", + "preuninstall", + "uninstall", + "postuninstall", + "preversion", + "version", + "postversion", + "pretest", + "test", + "posttest", + "prestop", + "stop", + "poststop", + "prestart", + "start", + "poststart", + "prerestart", + "restart", + "postrestart", + "preshrinkwrap", + "shrinkwrap", + "postshrinkwrap" + ]); + function printProjectCommands(manifest, rootManifest) { + var _a; + const lifecycleScripts = []; + const otherScripts = []; + for (const [scriptName, script] of Object.entries((_a = manifest.scripts) !== null && _a !== void 0 ? _a : {})) { + if (ALL_LIFECYCLE_SCRIPTS.has(scriptName)) { + lifecycleScripts.push([scriptName, script]); + } else { + otherScripts.push([scriptName, script]); + } + } + if (lifecycleScripts.length === 0 && otherScripts.length === 0) { + return "There are no scripts specified."; + } + let output = ""; + if (lifecycleScripts.length > 0) { + output += `Lifecycle scripts: +${renderCommands(lifecycleScripts)}`; + } + if (otherScripts.length > 0) { + if (output !== "") + output += "\n\n"; + output += `Commands available via "pnpm run": +${renderCommands(otherScripts)}`; + } + if ((rootManifest === null || rootManifest === void 0 ? void 0 : rootManifest.scripts) == null) { + return output; + } + const rootScripts = Object.entries(rootManifest.scripts); + if (rootScripts.length === 0) { + return output; + } + if (output !== "") + output += "\n\n"; + output += `Commands of the root workspace project (to run them, use "pnpm -w run"): +${renderCommands(rootScripts)}`; + return output; + } + function renderCommands(commands) { + return commands.map(([scriptName, script]) => ` ${scriptName} + ${script}`).join("\n"); + } + } +}); + +// ../plugin-commands-script-runners/lib/exec.js +var require_exec = __commonJS({ + "../plugin-commands-script-runners/lib/exec.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.cliOptionsTypes = exports2.rcOptionsTypes = exports2.commandNames = exports2.shorthands = void 0; + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var config_1 = require_lib10(); + var lifecycle_1 = require_lib80(); + var logger_1 = __importDefault(require_lib6()); + var read_project_manifest_1 = require_lib19(); + var sort_packages_1 = __importDefault(require_lib92()); + var execa_1 = __importDefault(require_lib26()); + var p_limit_1 = __importDefault(require_p_limit()); + var path_name_1 = __importDefault(require_path_name()); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + var existsInDir_1 = __importDefault(require_existsInDir()); + var run_1 = require_run(); + exports2.shorthands = { + parallel: run_1.shorthands.parallel + }; + exports2.commandNames = ["exec"]; + function rcOptionsTypes() { + return pick_1.default([ + "bail", + "sort", + "unsafe-perm", + "workspace-concurrency" + ], config_1.types); + } + exports2.rcOptionsTypes = rcOptionsTypes; + var cliOptionsTypes = () => ({ + ...rcOptionsTypes(), + recursive: Boolean + }); + exports2.cliOptionsTypes = cliOptionsTypes; + function help() { + return render_help_1.default({ + description: "Run a shell command in the context of a project.", + descriptionLists: [ + { + title: "Options", + list: [ + run_1.PARALLEL_OPTION_HELP, + { + description: 'Run the shell command in every package found in subdirectories or every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + } + ] + } + ], + usages: ["pnpm [-r] exec [args...]"] + }); + } + exports2.help = help; + async function handler(opts, params) { + var _a; + if (params[0] === "--") { + params.shift(); + } + const limitRun = p_limit_1.default((_a = opts.workspaceConcurrency) !== null && _a !== void 0 ? _a : 4); + const result = { + fails: [], + passes: 0 + }; + let chunks; + if (opts.recursive) { + chunks = opts.sort ? sort_packages_1.default(opts.selectedProjectsGraph) : [Object.keys(opts.selectedProjectsGraph).sort()]; + } else { + chunks = [[opts.dir]]; + const project = await read_project_manifest_1.tryReadProjectManifest(opts.dir); + if (project.manifest != null) { + opts.selectedProjectsGraph = { + [opts.dir]: { + dependencies: [], + package: { + ...project, + dir: opts.dir + } + } + }; + } + } + const existsPnp = existsInDir_1.default.bind(null, ".pnp.cjs"); + const workspacePnpPath = opts.workspaceDir && await existsPnp(opts.workspaceDir); + for (const chunk of chunks) { + await Promise.all(chunk.map(async (prefix) => limitRun(async () => { + var _a2, _b; + try { + const pnpPath = workspacePnpPath !== null && workspacePnpPath !== void 0 ? workspacePnpPath : await existsPnp(prefix); + const extraEnv = pnpPath ? lifecycle_1.makeNodeRequireOption(pnpPath) : {}; + await execa_1.default(params[0], params.slice(1), { + cwd: prefix, + env: { + ...process.env, + ...extraEnv, + [path_name_1.default]: [ + ...opts.extraBinPaths, + path_1.default.join(opts.dir, "node_modules/.bin"), + process.env[path_name_1.default] + ].join(path_1.default.delimiter), + PNPM_PACKAGE_NAME: (_b = (_a2 = opts.selectedProjectsGraph) === null || _a2 === void 0 ? void 0 : _a2[prefix]) === null || _b === void 0 ? void 0 : _b.package.manifest.name + }, + stdio: "inherit" + }); + result.passes++; + } catch (err) { + if (!opts.recursive && typeof err.exitCode === "number") { + process.exit(err.exitCode); + } + logger_1.default.info(err); + if (!opts.bail) { + result.fails.push({ + error: err, + message: err.message, + prefix + }); + return; + } + err["code"] = "ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL"; + err["prefix"] = prefix; + throw err; + } + }))); + } + cli_utils_1.throwOnCommandFail("pnpm recursive exec", result); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-script-runners/lib/restart.js +var require_restart = __commonJS({ + "../plugin-commands-script-runners/lib/restart.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var config_1 = require_lib10(); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + var run_1 = require_run(); + function rcOptionsTypes() { + return { + ...pick_1.default([ + "npm-path" + ], config_1.types) + }; + } + exports2.rcOptionsTypes = rcOptionsTypes; + function cliOptionsTypes() { + return run_1.IF_PRESENT_OPTION; + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["restart"]; + function help() { + return render_help_1.default({ + description: `Restarts a package. Runs a package's "stop", "restart", and "start" scripts, and associated pre- and post- scripts.`, + descriptionLists: [ + { + title: "Options", + list: [ + run_1.IF_PRESENT_OPTION_HELP + ] + } + ], + usages: ["pnpm restart [-- ...]"] + }); + } + exports2.help = help; + async function handler(opts, params) { + await run_1.handler(opts, ["stop", ...params]); + await run_1.handler(opts, ["restart", ...params]); + await run_1.handler(opts, ["start", ...params]); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-script-runners/lib/test.js +var require_test = __commonJS({ + "../plugin-commands-script-runners/lib/test.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var render_help_1 = __importDefault(require_lib30()); + var run = __importStar2(require_run()); + exports2.commandNames = ["test", "t", "tst"]; + function help() { + return render_help_1.default({ + aliases: ["t", "tst"], + description: `Runs a package's "test" script, if one was provided.`, + descriptionLists: [ + { + title: "Options", + list: [ + { + description: 'Run the tests in every package found in subdirectories or every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"', + name: "--recursive", + shortAlias: "-r" + } + ] + }, + common_cli_options_help_1.FILTERING + ], + url: cli_utils_1.docsUrl("test"), + usages: ["pnpm test [-- ...]"] + }); + } + exports2.help = help; + async function handler(opts, params = []) { + return run.handler(opts, ["test", ...params]); + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-script-runners/lib/index.js +var require_lib106 = __commonJS({ + "../plugin-commands-script-runners/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.test = exports2.run = exports2.restart = exports2.exec = exports2.dlx = void 0; + var dlx = __importStar2(require_dlx()); + exports2.dlx = dlx; + var exec = __importStar2(require_exec()); + exports2.exec = exec; + var restart = __importStar2(require_restart()); + exports2.restart = restart; + var run = __importStar2(require_run()); + exports2.run = run; + var _test = __importStar2(require_test()); + var test = { + ...run, + ..._test + }; + exports2.test = test; + } +}); + +// ../../node_modules/.pnpm/get-port@5.1.1/node_modules/get-port/index.js +var require_get_port = __commonJS({ + "../../node_modules/.pnpm/get-port@5.1.1/node_modules/get-port/index.js"(exports2, module2) { + "use strict"; + var net = require("net"); + var Locked = class extends Error { + constructor(port) { + super(`${port} is locked`); + } + }; + var lockedPorts = { + old: new Set(), + young: new Set() + }; + var releaseOldLockedPortsIntervalMs = 1e3 * 15; + var interval; + var getAvailablePort = (options) => new Promise((resolve, reject) => { + const server = net.createServer(); + server.unref(); + server.on("error", reject); + server.listen(options, () => { + const { port } = server.address(); + server.close(() => { + resolve(port); + }); + }); + }); + var portCheckSequence = function* (ports) { + if (ports) { + yield* ports; + } + yield 0; + }; + module2.exports = async (options) => { + let ports; + if (options) { + ports = typeof options.port === "number" ? [options.port] : options.port; + } + if (interval === void 0) { + interval = setInterval(() => { + lockedPorts.old = lockedPorts.young; + lockedPorts.young = new Set(); + }, releaseOldLockedPortsIntervalMs); + if (interval.unref) { + interval.unref(); + } + } + for (const port of portCheckSequence(ports)) { + try { + let availablePort = await getAvailablePort({ ...options, port }); + while (lockedPorts.old.has(availablePort) || lockedPorts.young.has(availablePort)) { + if (port !== 0) { + throw new Locked(port); + } + availablePort = await getAvailablePort({ ...options, port }); + } + lockedPorts.young.add(availablePort); + return availablePort; + } catch (error) { + if (!["EADDRINUSE", "EACCES"].includes(error.code) && !(error instanceof Locked)) { + throw error; + } + } + } + throw new Error("No available ports found"); + }; + module2.exports.makeRange = (from, to) => { + if (!Number.isInteger(from) || !Number.isInteger(to)) { + throw new TypeError("`from` and `to` must be integer numbers"); + } + if (from < 1024 || from > 65535) { + throw new RangeError("`from` must be between 1024 and 65535"); + } + if (to < 1024 || to > 65536) { + throw new RangeError("`to` must be between 1024 and 65536"); + } + if (to < from) { + throw new RangeError("`to` must be greater than or equal to `from`"); + } + const generator = function* (from2, to2) { + for (let port = from2; port <= to2; port++) { + yield port; + } + }; + return generator(from, to); + }; + } +}); + +// ../plugin-commands-server/lib/start.js +var require_start = __commonJS({ + "../plugin-commands-server/lib/start.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var util_1 = require("util"); + var path_1 = __importDefault(require("path")); + var cli_meta_1 = __importDefault(require_lib4()); + var error_1 = __importDefault(require_lib8()); + var logger_1 = __importDefault(require_lib6()); + var server_1 = require_lib59(); + var store_connection_manager_1 = require_lib63(); + var store_path_1 = __importDefault(require_lib38()); + var diable_1 = __importDefault(require_lib62()); + var get_port_1 = __importDefault(require_get_port()); + var is_windows_1 = __importDefault(require_is_windows()); + var signal_exit_1 = __importDefault(require_signal_exit()); + var storeServerLogger = logger_1.default("store-server"); + var write = util_1.promisify(fs_1.write); + var close = util_1.promisify(fs_1.close); + var open = util_1.promisify(fs_1.open); + exports2.default = async (opts) => { + var _a; + if (opts.protocol === "ipc" && opts.port) { + throw new Error("Port cannot be selected when server communicates via IPC"); + } + if (opts.background && !diable_1.default.isDaemon()) { + diable_1.default(); + } + const storeDir = await store_path_1.default(opts.dir, opts.storeDir); + const connectionInfoDir = store_connection_manager_1.serverConnectionInfoDir(storeDir); + const serverJsonPath = path_1.default.join(connectionInfoDir, "server.json"); + await fs_1.promises.mkdir(connectionInfoDir, { recursive: true }); + let fd; + try { + fd = await open(serverJsonPath, "wx"); + } catch (error) { + if (error.code !== "EEXIST") { + throw error; + } + throw new error_1.default("SERVER_MANIFEST_LOCKED", `Canceling startup of server (pid ${process.pid}) because another process got exclusive access to server.json`); + } + let server = null; + signal_exit_1.default(() => { + if (server !== null) { + server.close(); + } + if (fd !== null) { + try { + fs_1.closeSync(fd); + } catch (error) { + storeServerLogger.error(error, "Got error while closing file descriptor of server.json, but the process is already exiting"); + } + } + try { + fs_1.unlinkSync(serverJsonPath); + } catch (error) { + if (error.code !== "ENOENT") { + storeServerLogger.error(error, "Got error unlinking server.json, but the process is already exiting"); + } + } + }); + const store = await store_connection_manager_1.createNewStoreController(Object.assign(opts, { + storeDir + })); + const protocol = (_a = opts.protocol) !== null && _a !== void 0 ? _a : opts.port ? "tcp" : "auto"; + const serverOptions = await getServerOptions(connectionInfoDir, { protocol, port: opts.port }); + const connectionOptions = { + remotePrefix: serverOptions.path != null ? `http://unix:${serverOptions.path}:` : `http://${serverOptions.hostname}:${serverOptions.port}` + }; + server = server_1.createServer(store.ctrl, { + ...serverOptions, + ignoreStopRequests: opts.ignoreStopRequests, + ignoreUploadRequests: opts.ignoreUploadRequests + }); + const serverJson = { + connectionOptions, + pid: process.pid, + pnpmVersion: cli_meta_1.default.version + }; + const serverJsonStr = JSON.stringify(serverJson, void 0, 2); + const serverJsonBuffer = Buffer.from(serverJsonStr, "utf8"); + await write(fd, serverJsonBuffer, 0, serverJsonBuffer.byteLength); + const fdForClose = fd; + fd = null; + await close(fdForClose); + }; + async function getServerOptions(connectionInfoDir, opts) { + switch (opts.protocol) { + case "tcp": + return getTcpOptions(); + case "ipc": + if (is_windows_1.default()) { + throw new Error("IPC protocol is not supported on Windows currently"); + } + return getIpcOptions(); + case "auto": + if (is_windows_1.default()) { + return getTcpOptions(); + } + return getIpcOptions(); + default: + throw new Error(`Protocol ${opts.protocol} is not supported`); + } + async function getTcpOptions() { + return { + hostname: "localhost", + port: opts.port || await get_port_1.default({ port: 5813 }) + }; + } + function getIpcOptions() { + return { + path: path_1.default.join(connectionInfoDir, "socket") + }; + } + } + } +}); + +// ../plugin-commands-server/lib/status.js +var require_status = __commonJS({ + "../plugin-commands-server/lib/status.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var logger_1 = require_lib6(); + var store_connection_manager_1 = require_lib63(); + var store_path_1 = __importDefault(require_lib38()); + exports2.default = async (opts) => { + const storeDir = await store_path_1.default(opts.dir, opts.storeDir); + const connectionInfoDir = store_connection_manager_1.serverConnectionInfoDir(storeDir); + const serverJson = await store_connection_manager_1.tryLoadServerJson({ + serverJsonPath: path_1.default.join(connectionInfoDir, "server.json"), + shouldRetryOnNoent: false + }); + if (serverJson === null) { + logger_1.globalInfo(`No server is running for the store at ${storeDir}`); + return; + } + console.log(`store: ${storeDir} +process id: ${serverJson.pid} +remote prefix: ${serverJson.connectionOptions.remotePrefix}`); + }; + } +}); + +// ../../node_modules/.pnpm/ps-list@6.3.0/node_modules/ps-list/index.js +var require_ps_list = __commonJS({ + "../../node_modules/.pnpm/ps-list@6.3.0/node_modules/ps-list/index.js"(exports2, module2) { + "use strict"; + var util = require("util"); + var path = require("path"); + var childProcess = require("child_process"); + var TEN_MEGABYTES = 1e3 * 1e3 * 10; + var execFile = util.promisify(childProcess.execFile); + var windows = async () => { + const bin = path.join(__dirname, "fastlist.exe"); + const { stdout } = await execFile(bin, { maxBuffer: TEN_MEGABYTES }); + return stdout.trim().split("\r\n").map((line) => line.split(" ")).map(([name, pid, ppid]) => ({ + name, + pid: Number.parseInt(pid, 10), + ppid: Number.parseInt(ppid, 10) + })); + }; + var main = async (options = {}) => { + const flags = (options.all === false ? "" : "a") + "wwxo"; + const ret = {}; + await Promise.all(["comm", "args", "ppid", "uid", "%cpu", "%mem"].map(async (cmd) => { + const { stdout } = await execFile("ps", [flags, `pid,${cmd}`], { maxBuffer: TEN_MEGABYTES }); + for (let line of stdout.trim().split("\n").slice(1)) { + line = line.trim(); + const [pid] = line.split(" ", 1); + const val = line.slice(pid.length + 1).trim(); + if (ret[pid] === void 0) { + ret[pid] = {}; + } + ret[pid][cmd] = val; + } + })); + return Object.entries(ret).filter(([, value]) => value.comm && value.args && value.ppid && value.uid && value["%cpu"] && value["%mem"]).map(([key, value]) => ({ + pid: Number.parseInt(key, 10), + name: path.basename(value.comm), + cmd: value.args, + ppid: Number.parseInt(value.ppid, 10), + uid: Number.parseInt(value.uid, 10), + cpu: Number.parseFloat(value["%cpu"]), + memory: Number.parseFloat(value["%mem"]) + })); + }; + module2.exports = process.platform === "win32" ? windows : main; + module2.exports.default = module2.exports; + } +}); + +// ../../node_modules/.pnpm/process-exists@4.1.0/node_modules/process-exists/index.js +var require_process_exists = __commonJS({ + "../../node_modules/.pnpm/process-exists@4.1.0/node_modules/process-exists/index.js"(exports2, module2) { + "use strict"; + var psList = require_ps_list(); + var linuxProcessMatchesName = (wantedProcessName, process2) => { + if (typeof wantedProcessName === "string") { + return process2.name === wantedProcessName || process2.cmd.split(" ")[0] === wantedProcessName; + } + return process2.pid === wantedProcessName; + }; + var nonLinuxProcessMatchesName = (wantedProcessName, process2) => { + if (typeof wantedProcessName === "string") { + return process2.name === wantedProcessName; + } + return process2.pid === wantedProcessName; + }; + var processMatchesName = process.platform === "linux" ? linuxProcessMatchesName : nonLinuxProcessMatchesName; + module2.exports = async (processName) => { + const processes = await psList(); + return processes.some((x) => processMatchesName(processName, x)); + }; + module2.exports.all = async (processName) => { + const processes = await psList(); + return new Map(processName.map((x) => [x, processes.some((y) => processMatchesName(x, y))])); + }; + module2.exports.filterExists = async (processNames) => { + const processes = await psList(); + return processNames.filter((x) => processes.some((y) => processMatchesName(x, y))); + }; + } +}); + +// ../../node_modules/.pnpm/tree-kill@1.2.2/node_modules/tree-kill/index.js +var require_tree_kill = __commonJS({ + "../../node_modules/.pnpm/tree-kill@1.2.2/node_modules/tree-kill/index.js"(exports2, module2) { + "use strict"; + var childProcess = require("child_process"); + var spawn = childProcess.spawn; + var exec = childProcess.exec; + module2.exports = function(pid, signal, callback) { + if (typeof signal === "function" && callback === void 0) { + callback = signal; + signal = void 0; + } + pid = parseInt(pid); + if (Number.isNaN(pid)) { + if (callback) { + return callback(new Error("pid must be a number")); + } else { + throw new Error("pid must be a number"); + } + } + var tree = {}; + var pidsToProcess = {}; + tree[pid] = []; + pidsToProcess[pid] = 1; + switch (process.platform) { + case "win32": + exec("taskkill /pid " + pid + " /T /F", callback); + break; + case "darwin": + buildProcessTree(pid, tree, pidsToProcess, function(parentPid) { + return spawn("pgrep", ["-P", parentPid]); + }, function() { + killAll(tree, signal, callback); + }); + break; + default: + buildProcessTree(pid, tree, pidsToProcess, function(parentPid) { + return spawn("ps", ["-o", "pid", "--no-headers", "--ppid", parentPid]); + }, function() { + killAll(tree, signal, callback); + }); + break; + } + }; + function killAll(tree, signal, callback) { + var killed = {}; + try { + Object.keys(tree).forEach(function(pid) { + tree[pid].forEach(function(pidpid) { + if (!killed[pidpid]) { + killPid(pidpid, signal); + killed[pidpid] = 1; + } + }); + if (!killed[pid]) { + killPid(pid, signal); + killed[pid] = 1; + } + }); + } catch (err) { + if (callback) { + return callback(err); + } else { + throw err; + } + } + if (callback) { + return callback(); + } + } + function killPid(pid, signal) { + try { + process.kill(parseInt(pid, 10), signal); + } catch (err) { + if (err.code !== "ESRCH") + throw err; + } + } + function buildProcessTree(parentPid, tree, pidsToProcess, spawnChildProcessesList, cb) { + var ps = spawnChildProcessesList(parentPid); + var allData = ""; + ps.stdout.on("data", function(data) { + var data = data.toString("ascii"); + allData += data; + }); + var onClose = function(code) { + delete pidsToProcess[parentPid]; + if (code != 0) { + if (Object.keys(pidsToProcess).length == 0) { + cb(); + } + return; + } + allData.match(/\d+/g).forEach(function(pid) { + pid = parseInt(pid, 10); + tree[parentPid].push(pid); + tree[pid] = []; + pidsToProcess[pid] = 1; + buildProcessTree(pid, tree, pidsToProcess, spawnChildProcessesList, cb); + }); + }; + ps.on("close", onClose); + } + } +}); + +// ../plugin-commands-server/lib/stop.js +var require_stop = __commonJS({ + "../plugin-commands-server/lib/stop.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var util_1 = require("util"); + var path_1 = __importDefault(require("path")); + var logger_1 = require_lib6(); + var server_1 = require_lib59(); + var store_connection_manager_1 = require_lib63(); + var store_path_1 = __importDefault(require_lib38()); + var delay_1 = __importDefault(require_delay2()); + var process_exists_1 = __importDefault(require_process_exists()); + var tree_kill_1 = __importDefault(require_tree_kill()); + var kill = util_1.promisify(tree_kill_1.default); + exports2.default = async (opts) => { + const storeDir = await store_path_1.default(opts.dir, opts.storeDir); + const connectionInfoDir = store_connection_manager_1.serverConnectionInfoDir(storeDir); + const serverJson = await store_connection_manager_1.tryLoadServerJson({ + serverJsonPath: path_1.default.join(connectionInfoDir, "server.json"), + shouldRetryOnNoent: false + }); + if (serverJson === null) { + logger_1.globalInfo(`Nothing to stop. No server is running for the store at ${storeDir}`); + return; + } + const storeController = await server_1.connectStoreController(serverJson.connectionOptions); + await storeController.stop(); + if (await serverGracefullyStops(serverJson.pid)) { + logger_1.globalInfo("Server gracefully stopped"); + return; + } + logger_1.globalWarn("Graceful shutdown failed"); + await kill(serverJson.pid, "SIGINT"); + logger_1.globalInfo("Server process terminated"); + }; + async function serverGracefullyStops(pid) { + if (!await process_exists_1.default(pid)) + return true; + await delay_1.default(5e3); + return !await process_exists_1.default(pid); + } + } +}); + +// ../plugin-commands-server/lib/server.js +var require_server = __commonJS({ + "../plugin-commands-server/lib/server.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var config_1 = require_lib10(); + var error_1 = __importDefault(require_lib8()); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + var start_1 = __importDefault(require_start()); + var status_1 = __importDefault(require_status()); + var stop_1 = __importDefault(require_stop()); + exports2.rcOptionsTypes = cliOptionsTypes; + function cliOptionsTypes() { + return { + ...pick_1.default([ + "store", + "store-dir" + ], config_1.types), + background: Boolean, + "ignore-stop-requests": Boolean, + "ignore-upload-requests": Boolean, + port: Number, + protocol: ["auto", "tcp", "ipc"] + }; + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["server"]; + function help() { + return render_help_1.default({ + description: "Manage a store server", + descriptionLists: [ + { + title: "Commands", + list: [ + { + description: "Starts a service that does all interactions with the store. Other commands will delegate any store-related tasks to this service", + name: "start" + }, + { + description: "Stops the store server", + name: "stop" + }, + { + description: "Prints information about the running server", + name: "status" + } + ] + }, + { + title: "Start options", + list: [ + { + description: "Runs the server in the background", + name: "--background" + }, + { + description: "The communication protocol used by the server", + name: "--protocol " + }, + { + description: "The port number to use, when TCP is used for communication", + name: "--port " + }, + common_cli_options_help_1.OPTIONS.storeDir, + { + description: "Maximum number of concurrent network requests", + name: "--network-concurrency " + }, + { + description: "If false, doesn't check whether packages in the store were mutated", + name: "--[no-]verify-store-integrity" + }, + { + name: "--[no-]lock" + }, + { + description: "Disallows stopping the server using `pnpm server stop`", + name: "--ignore-stop-requests" + }, + { + description: "Disallows creating new side effect cache during install", + name: "--ignore-upload-requests" + }, + ...common_cli_options_help_1.UNIVERSAL_OPTIONS + ] + } + ], + url: cli_utils_1.docsUrl("server"), + usages: ["pnpm server "] + }); + } + exports2.help = help; + function handler(opts, params) { + opts.protocol = "tcp"; + switch (params[0]) { + case "start": + return start_1.default(opts); + case "status": + return status_1.default(opts); + case "stop": + return stop_1.default(opts); + default: + help(); + if (params[0]) { + throw new error_1.default("INVALID_SERVER_COMMAND", `"server ${params[0]}" is not a pnpm command. See "pnpm help server".`); + } + return void 0; + } + } + exports2.handler = handler; + } +}); + +// ../plugin-commands-server/lib/index.js +var require_lib107 = __commonJS({ + "../plugin-commands-server/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.server = void 0; + var server = __importStar2(require_server()); + exports2.server = server; + } +}); + +// ../plugin-commands-setup/lib/setupOnWindows.js +var require_setupOnWindows = __commonJS({ + "../plugin-commands-setup/lib/setupOnWindows.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.setupWindowsEnvironmentPath = void 0; + var path_1 = require("path"); + var execa_1 = __importDefault(require_lib26()); + async function setupWindowsEnvironmentPath(pnpmHomeDir) { + const pathRegex = /^ {4}(?PATH) {4}(?\w+) {4}(?.*)$/gim; + const pnpmHomeRegex = /^ {4}(?PNPM_HOME) {4}(?\w+) {4}(?.*)$/gim; + const regKey = "HKEY_CURRENT_USER\\Environment"; + const queryResult = await execa_1.default("reg", ["query", regKey]); + if (queryResult.failed) { + return "Win32 registry environment values could not be retrieved"; + } + const queryOutput = queryResult.stdout; + const pathValueMatch = [...queryOutput.matchAll(pathRegex)]; + const homeValueMatch = [...queryOutput.matchAll(pnpmHomeRegex)]; + let commitNeeded = false; + let homeDir = pnpmHomeDir; + const logger = []; + if (homeValueMatch.length === 1) { + homeDir = homeValueMatch[0].groups.data; + logger.push(`Currently 'PNPM_HOME' is set to '${homeDir}'`); + } else { + logger.push(`Setting 'PNPM_HOME' to value '${homeDir}'`); + const addResult = await execa_1.default("reg", ["add", regKey, "/v", "PNPM_HOME", "/t", "REG_EXPAND_SZ", "/d", homeDir, "/f"]); + if (addResult.failed) { + logger.push(` ${addResult.stderr}`); + } else { + commitNeeded = true; + logger.push(` ${addResult.stdout}`); + } + } + if (pathValueMatch.length === 1) { + const pathData = pathValueMatch[0].groups.data; + if (pathData == null || pathData.trim() === "") { + logger.push("Current PATH is empty. No changes to this environment variable are applied"); + } else { + const homeDirPath = path_1.win32.parse(path_1.win32.normalize(homeDir)); + if (pathData.split(path_1.win32.delimiter).map((p) => path_1.win32.normalize(p)).map((p) => path_1.win32.parse(p)).map((p) => `${p.dir}${path_1.win32.sep}${p.base}`.toUpperCase()).filter((p) => p !== "").includes(`${homeDirPath.dir}${path_1.win32.sep}${homeDirPath.base}`.toUpperCase())) { + logger.push("PATH already contains PNPM_HOME"); + } else { + logger.push("Updating PATH"); + const addResult = await execa_1.default("reg", ["add", regKey, "/v", pathValueMatch[0].groups.name, "/t", "REG_EXPAND_SZ", "/d", `${homeDir}${path_1.win32.delimiter}${pathData}`, "/f"]); + if (addResult.failed) { + logger.push(` ${addResult.stderr}`); + } else { + commitNeeded = true; + logger.push(` ${addResult.stdout}`); + } + } + } + } else { + logger.push("Current PATH is not set. No changes to this environment variable are applied"); + } + if (commitNeeded) { + await execa_1.default("setx", ["PNPM_HOME", homeDir]); + } + return logger.join("\n"); + } + exports2.setupWindowsEnvironmentPath = setupWindowsEnvironmentPath; + } +}); + +// ../plugin-commands-setup/lib/setup.js +var require_setup = __commonJS({ + "../plugin-commands-setup/lib/setup.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.shorthands = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var fs_1 = __importDefault(require("fs")); + var os_1 = __importDefault(require("os")); + var path_1 = __importDefault(require("path")); + var cli_utils_1 = require_lib20(); + var logger_1 = __importDefault(require_lib6()); + var render_help_1 = __importDefault(require_lib30()); + var setupOnWindows_1 = require_setupOnWindows(); + var rcOptionsTypes = () => ({}); + exports2.rcOptionsTypes = rcOptionsTypes; + var cliOptionsTypes = () => ({}); + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.shorthands = {}; + exports2.commandNames = ["setup"]; + function help() { + return render_help_1.default({ + description: "Sets up pnpm", + descriptionLists: [], + url: cli_utils_1.docsUrl("setup"), + usages: ["pnpm setup"] + }); + } + exports2.help = help; + function getExecPath() { + if (process["pkg"] != null) { + return process.execPath; + } + return require.main != null ? require.main.filename : process.cwd(); + } + function copyCli(currentLocation, targetDir) { + const newExecPath = path_1.default.join(targetDir, path_1.default.basename(currentLocation)); + if (path_1.default.relative(newExecPath, currentLocation) === "") + return; + logger_1.default.info({ + message: `Copying pnpm CLI from ${currentLocation} to ${newExecPath}`, + prefix: process.cwd() + }); + fs_1.default.mkdirSync(targetDir, { recursive: true }); + fs_1.default.copyFileSync(currentLocation, newExecPath); + } + async function handler(opts) { + const currentShell = typeof process.env.SHELL === "string" ? path_1.default.basename(process.env.SHELL) : null; + const execPath = getExecPath(); + if (execPath.match(/\.[cm]?js$/) == null) { + copyCli(execPath, opts.pnpmHomeDir); + } + const updateOutput = await updateShell(currentShell, opts.pnpmHomeDir); + return `${updateOutput} + +Setup complete. Open a new terminal to start using pnpm.`; + } + exports2.handler = handler; + async function updateShell(currentShell, pnpmHomeDir) { + switch (currentShell) { + case "bash": { + const configFile = path_1.default.join(os_1.default.homedir(), ".bashrc"); + return setupShell(configFile, pnpmHomeDir); + } + case "zsh": { + const configFile = path_1.default.join(os_1.default.homedir(), ".zshrc"); + return setupShell(configFile, pnpmHomeDir); + } + case "fish": { + return setupFishShell(pnpmHomeDir); + } + } + if (process.platform === "win32") { + return setupOnWindows_1.setupWindowsEnvironmentPath(pnpmHomeDir); + } + return "Could not infer shell type."; + } + async function setupShell(configFile, pnpmHomeDir) { + if (!fs_1.default.existsSync(configFile)) + return `Could not setup pnpm. No ${configFile} found`; + const configContent = await fs_1.default.promises.readFile(configFile, "utf8"); + if (configContent.includes("PNPM_HOME")) { + return `PNPM_HOME is already in ${configFile}`; + } + await fs_1.default.promises.writeFile(configFile, `${configContent} +export PNPM_HOME="${pnpmHomeDir}" +export PATH="$PNPM_HOME:$PATH" +`, "utf8"); + return `Updated ${configFile}`; + } + async function setupFishShell(pnpmHomeDir) { + const configFile = path_1.default.join(os_1.default.homedir(), ".config/fish/config.fish"); + if (!fs_1.default.existsSync(configFile)) + return `Could not setup pnpm. No ${configFile} found`; + const configContent = await fs_1.default.promises.readFile(configFile, "utf8"); + if (configContent.includes("PNPM_HOME")) { + return `PNPM_HOME is already in ${configFile}`; + } + await fs_1.default.promises.writeFile(configFile, `${configContent} +set -gx PNPM_HOME "${pnpmHomeDir}" +set -gx PATH "$PNPM_HOME" $PATH +`, "utf8"); + return `Updated ${configFile}`; + } + } +}); + +// ../plugin-commands-setup/lib/index.js +var require_lib108 = __commonJS({ + "../plugin-commands-setup/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.setup = void 0; + var setup = __importStar2(require_setup()); + exports2.setup = setup; + } +}); + +// ../plugin-commands-store/lib/storeAdd.js +var require_storeAdd = __commonJS({ + "../plugin-commands-store/lib/storeAdd.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var logger_1 = __importStar2(require_lib6()); + var parse_wanted_dependency_1 = __importDefault(require_lib87()); + var pick_registry_for_package_1 = __importDefault(require_lib50()); + async function default_1(fuzzyDeps, opts) { + var _a, _b; + const reporter = opts === null || opts === void 0 ? void 0 : opts.reporter; + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.on("data", reporter); + } + const deps = fuzzyDeps.map((dep) => parse_wanted_dependency_1.default(dep)); + let hasFailures = false; + const prefix = (_a = opts.prefix) !== null && _a !== void 0 ? _a : process.cwd(); + const registries = (_b = opts.registries) !== null && _b !== void 0 ? _b : { + default: "https://registry.npmjs.org/" + }; + await Promise.all(deps.map(async (dep) => { + var _a2; + try { + const pkgResponse = await opts.storeController.requestPackage(dep, { + downloadPriority: 1, + lockfileDir: prefix, + preferredVersions: {}, + projectDir: prefix, + registry: (_a2 = dep.alias && pick_registry_for_package_1.default(registries, dep.alias)) !== null && _a2 !== void 0 ? _a2 : registries.default + }); + await pkgResponse.files(); + logger_1.globalInfo(`+ ${pkgResponse.body.id}`); + } catch (e) { + hasFailures = true; + logger_1.default("store").error(e); + } + })); + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.removeListener("data", reporter); + } + if (hasFailures) { + throw new error_1.default("STORE_ADD_FAILURE", "Some packages have not been added correctly"); + } + } + exports2.default = default_1; + } +}); + +// ../plugin-commands-store/lib/storePrune.js +var require_storePrune = __commonJS({ + "../plugin-commands-store/lib/storePrune.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var logger_1 = require_lib6(); + async function default_1(opts) { + const reporter = opts === null || opts === void 0 ? void 0 : opts.reporter; + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.on("data", reporter); + } + await opts.storeController.prune(); + await opts.storeController.close(); + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.removeListener("data", reporter); + } + } + exports2.default = default_1; + } +}); + +// ../../node_modules/.pnpm/dint@5.1.0/node_modules/dint/index.js +var require_dint = __commonJS({ + "../../node_modules/.pnpm/dint@5.1.0/node_modules/dint/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var ssri = require_ssri(); + var path = require("path"); + var pEvery = require_p_every(); + var pLimit = require_p_limit(); + var limit = pLimit(20); + var MAX_BULK_SIZE = 1 * 1024 * 1024; + function generateFrom(dirname) { + return _retrieveFileIntegrities(dirname, dirname, {}); + } + async function _retrieveFileIntegrities(rootDir, currDir, index) { + try { + const files = await fs.promises.readdir(currDir); + await Promise.all(files.map(async (file) => { + const fullPath = path.join(currDir, file); + const stat = await fs.promises.stat(fullPath); + if (stat.isDirectory()) { + return _retrieveFileIntegrities(rootDir, fullPath, index); + } + if (stat.isFile()) { + const relativePath = path.relative(rootDir, fullPath); + index[relativePath] = { + size: stat.size, + generatingIntegrity: limit(() => { + return stat.size < MAX_BULK_SIZE ? fs.promises.readFile(fullPath).then(ssri.fromData) : ssri.fromStream(fs.createReadStream(fullPath)); + }) + }; + } + })); + return index; + } catch (err) { + if (err.code !== "ENOENT") { + throw err; + } + return index; + } + } + function check(dirname, dirIntegrity) { + dirname = path.resolve(dirname); + return pEvery(Object.keys(dirIntegrity), async (f) => { + const fstat = dirIntegrity[f]; + if (!fstat.integrity) + return false; + const filename = path.join(dirname, f); + if (fstat.size > MAX_BULK_SIZE) { + try { + return await ssri.checkStream(fs.createReadStream(filename), fstat.integrity); + } catch (err) { + if (err.code === "EINTEGRITY" || err.code === "ENOENT") + return false; + throw err; + } + } + try { + const data = await fs.promises.readFile(filename); + return ssri.checkData(data, fstat.integrity); + } catch (err) { + if (err.code === "EINTEGRITY" || err.code === "ENOENT") + return false; + throw err; + } + }, { concurrency: 100 }); + } + module2.exports = { + from: generateFrom, + check + }; + } +}); + +// ../plugin-commands-store/lib/storeStatus/extendStoreStatusOptions.js +var require_extendStoreStatusOptions = __commonJS({ + "../plugin-commands-store/lib/storeStatus/extendStoreStatusOptions.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var normalize_registries_1 = __importStar2(require_lib65()); + var defaults = async (opts) => { + var _a, _b; + const dir = (_a = opts.dir) !== null && _a !== void 0 ? _a : process.cwd(); + const lockfileDir = (_b = opts.lockfileDir) !== null && _b !== void 0 ? _b : dir; + return { + binsDir: path_1.default.join(dir, "node_modules", ".bin"), + dir, + force: false, + forceSharedLockfile: false, + lockfileDir, + registries: normalize_registries_1.DEFAULT_REGISTRIES, + shamefullyHoist: false, + storeDir: opts.storeDir, + useLockfile: true + }; + }; + exports2.default = async (opts) => { + if (opts) { + for (const key in opts) { + if (opts[key] === void 0) { + delete opts[key]; + } + } + } + const defaultOpts = await defaults(opts); + const extendedOpts = { ...defaultOpts, ...opts, storeDir: defaultOpts.storeDir }; + extendedOpts.registries = normalize_registries_1.default(extendedOpts.registries); + return extendedOpts; + }; + } +}); + +// ../plugin-commands-store/lib/storeStatus/index.js +var require_storeStatus = __commonJS({ + "../plugin-commands-store/lib/storeStatus/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var path_1 = __importDefault(require("path")); + var cafs_1 = require_lib31(); + var get_context_1 = require_lib67(); + var lockfile_utils_1 = require_lib53(); + var logger_1 = require_lib6(); + var dp = __importStar2(require_lib33()); + var dint_1 = __importDefault(require_dint()); + var load_json_file_1 = __importDefault(require_load_json_file()); + var p_filter_1 = __importDefault(require_p_filter()); + var extendStoreStatusOptions_1 = __importDefault(require_extendStoreStatusOptions()); + async function default_1(maybeOpts) { + var _a; + const reporter = maybeOpts === null || maybeOpts === void 0 ? void 0 : maybeOpts.reporter; + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.on("data", reporter); + } + const opts = await extendStoreStatusOptions_1.default(maybeOpts); + const { registries, storeDir, skipped, virtualStoreDir, wantedLockfile } = await get_context_1.getContextForSingleImporter({}, { + ...opts, + extraBinPaths: [] + }); + if (!wantedLockfile) + return []; + const pkgs = Object.keys((_a = wantedLockfile.packages) !== null && _a !== void 0 ? _a : {}).filter((depPath) => !skipped.has(depPath)).map((depPath) => { + const pkgSnapshot = wantedLockfile.packages[depPath]; + const id = lockfile_utils_1.packageIdFromSnapshot(depPath, pkgSnapshot, registries); + return { + depPath, + id, + integrity: pkgSnapshot.resolution["integrity"], + pkgPath: dp.resolve(registries, depPath), + ...lockfile_utils_1.nameVerFromPkgSnapshot(depPath, pkgSnapshot) + }; + }); + const cafsDir = path_1.default.join(storeDir, "files"); + const modified = await p_filter_1.default(pkgs, async ({ id, integrity, depPath, name }) => { + const pkgIndexFilePath = integrity ? cafs_1.getFilePathInCafs(cafsDir, integrity, "index") : path_1.default.join(storeDir, dp.depPathToFilename(id, opts.dir), "integrity.json"); + const { files } = await load_json_file_1.default(pkgIndexFilePath); + return await dint_1.default.check(path_1.default.join(virtualStoreDir, dp.depPathToFilename(depPath, opts.dir), "node_modules", name), files) === false; + }, { concurrency: 8 }); + if (reporter != null && typeof reporter === "function") { + logger_1.streamParser.removeListener("data", reporter); + } + return modified.map(({ pkgPath }) => pkgPath); + } + exports2.default = default_1; + } +}); + +// ../plugin-commands-store/lib/store.js +var require_store = __commonJS({ + "../plugin-commands-store/lib/store.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var config_1 = require_lib10(); + var error_1 = __importDefault(require_lib8()); + var logger_1 = __importDefault(require_lib6()); + var store_connection_manager_1 = require_lib63(); + var store_path_1 = __importDefault(require_lib38()); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + var storeAdd_1 = __importDefault(require_storeAdd()); + var storePrune_1 = __importDefault(require_storePrune()); + var storeStatus_1 = __importDefault(require_storeStatus()); + exports2.rcOptionsTypes = cliOptionsTypes; + function cliOptionsTypes() { + return pick_1.default([ + "registry", + "store", + "store-dir" + ], config_1.types); + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["store"]; + function help() { + return render_help_1.default({ + description: "Reads and performs actions on pnpm store that is on the current filesystem.", + descriptionLists: [ + { + title: "Commands", + list: [ + { + description: "Checks for modified packages in the store. Returns exit code 0 if the content of the package is the same as it was at the time of unpacking", + name: "status" + }, + { + description: "Adds new packages to the store. Example: pnpm store add express@4 typescript@2.1.0", + name: "add ..." + }, + { + description: "Removes unreferenced (extraneous, orphan) packages from the store. Pruning the store is not harmful, but might slow down future installations. Visit the documentation for more information on unreferenced packages and why they occur", + name: "prune" + } + ] + } + ], + url: cli_utils_1.docsUrl("store"), + usages: ["pnpm store "] + }); + } + exports2.help = help; + var StoreStatusError = class extends error_1.default { + constructor(modified) { + super("MODIFIED_DEPENDENCY", ""); + this.modified = modified; + } + }; + async function handler(opts, params) { + let store; + switch (params[0]) { + case "status": + return statusCmd(opts); + case "path": + return store_path_1.default(opts.dir, opts.storeDir); + case "prune": { + store = await store_connection_manager_1.createOrConnectStoreController(opts); + const storePruneOptions = Object.assign(opts, { + storeController: store.ctrl, + storeDir: store.dir + }); + return storePrune_1.default(storePruneOptions); + } + case "add": + store = await store_connection_manager_1.createOrConnectStoreController(opts); + return storeAdd_1.default(params.slice(1), { + prefix: opts.dir, + registries: opts.registries, + reporter: opts.reporter, + storeController: store.ctrl, + tag: opts.tag + }); + default: + return help(); + } + } + exports2.handler = handler; + async function statusCmd(opts) { + const modifiedPkgs = await storeStatus_1.default(Object.assign(opts, { + storeDir: await store_path_1.default(opts.dir, opts.storeDir) + })); + if (!modifiedPkgs || modifiedPkgs.length === 0) { + logger_1.default.info({ + message: "Packages in the store are untouched", + prefix: opts.dir + }); + return; + } + throw new StoreStatusError(modifiedPkgs); + } + } +}); + +// ../plugin-commands-store/lib/index.js +var require_lib109 = __commonJS({ + "../plugin-commands-store/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.store = void 0; + var store = __importStar2(require_store()); + exports2.store = store; + } +}); + +// lib/cmd/bin.js +var require_bin = __commonJS({ + "lib/cmd/bin.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var config_1 = require_lib10(); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + exports2.rcOptionsTypes = cliOptionsTypes; + function cliOptionsTypes() { + return pick_1.default([ + "global" + ], config_1.types); + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["bin"]; + function help() { + return render_help_1.default({ + description: "Print the directory where pnpm will install executables.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "Print the global executables directory", + name: "--global", + shortAlias: "-g" + } + ] + } + ], + usages: ["pnpm bin [-g]"] + }); + } + exports2.help = help; + async function handler(opts) { + return opts.bin; + } + exports2.handler = handler; + } +}); + +// ../../node_modules/.pnpm/split-cmd@1.0.1/node_modules/split-cmd/index.js +var require_split_cmd = __commonJS({ + "../../node_modules/.pnpm/split-cmd@1.0.1/node_modules/split-cmd/index.js"(exports2, module2) { + function split(command) { + if (typeof command !== "string") { + throw new Error("Command must be a string"); + } + var r = command.match(/[^"\s]+|"(?:\\"|[^"])*"/g); + if (!r) { + return []; + } + return r.map(function(expr) { + var isQuoted = expr.charAt(0) === '"' && expr.charAt(expr.length - 1) === '"'; + return isQuoted ? expr.slice(1, -1) : expr; + }); + } + function splitToObject(command) { + var cmds = split(command); + switch (cmds.length) { + case 0: + return {}; + case 1: + return { command: cmds[0] }; + default: { + var first = cmds[0]; + cmds.shift(); + return { command: first, args: cmds }; + } + } + } + module2.exports = { split, splitToObject }; + } +}); + +// ../../node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/abbrev.js +var require_abbrev = __commonJS({ + "../../node_modules/.pnpm/abbrev@1.1.1/node_modules/abbrev/abbrev.js"(exports2, module2) { + module2.exports = exports2 = abbrev.abbrev = abbrev; + abbrev.monkeyPatch = monkeyPatch; + function monkeyPatch() { + Object.defineProperty(Array.prototype, "abbrev", { + value: function() { + return abbrev(this); + }, + enumerable: false, + configurable: true, + writable: true + }); + Object.defineProperty(Object.prototype, "abbrev", { + value: function() { + return abbrev(Object.keys(this)); + }, + enumerable: false, + configurable: true, + writable: true + }); + } + function abbrev(list) { + if (arguments.length !== 1 || !Array.isArray(list)) { + list = Array.prototype.slice.call(arguments, 0); + } + for (var i = 0, l = list.length, args2 = []; i < l; i++) { + args2[i] = typeof list[i] === "string" ? list[i] : String(list[i]); + } + args2 = args2.sort(lexSort); + var abbrevs = {}, prev = ""; + for (var i = 0, l = args2.length; i < l; i++) { + var current = args2[i], next = args2[i + 1] || "", nextMatches = true, prevMatches = true; + if (current === next) + continue; + for (var j = 0, cl = current.length; j < cl; j++) { + var curChar = current.charAt(j); + nextMatches = nextMatches && curChar === next.charAt(j); + prevMatches = prevMatches && curChar === prev.charAt(j); + if (!nextMatches && !prevMatches) { + j++; + break; + } + } + prev = current; + if (j === cl) { + abbrevs[current] = current; + continue; + } + for (var a = current.substr(0, j); j <= cl; j++) { + abbrevs[a] = current; + a += current.charAt(j); + } + } + return abbrevs; + } + function lexSort(a, b) { + return a === b ? 0 : a > b ? 1 : -1; + } + } +}); + +// ../../node_modules/.pnpm/@pnpm+nopt@0.2.1/node_modules/@pnpm/nopt/lib/nopt.js +var require_nopt = __commonJS({ + "../../node_modules/.pnpm/@pnpm+nopt@0.2.1/node_modules/@pnpm/nopt/lib/nopt.js"(exports2, module2) { + var debug = process.env.DEBUG_NOPT || process.env.NOPT_DEBUG ? function() { + console.error.apply(console, arguments); + } : function() { + }; + var url = require("url"); + var path = require("path"); + var Stream = require("stream").Stream; + var abbrev = require_abbrev(); + var os = require("os"); + module2.exports = exports2 = nopt; + exports2.clean = clean; + exports2.typeDefs = { + String: { type: String, validate: validateString }, + Boolean: { type: Boolean, validate: validateBoolean }, + url: { type: url, validate: validateUrl }, + Number: { type: Number, validate: validateNumber }, + path: { type: path, validate: validatePath }, + Stream: { type: Stream, validate: validateStream }, + Date: { type: Date, validate: validateDate } + }; + function nopt(types, shorthands, args2, slice, opts) { + args2 = args2 || process.argv; + types = types || {}; + shorthands = shorthands || {}; + if (typeof slice !== "number") + slice = 2; + debug(types, shorthands, args2, slice); + args2 = args2.slice(slice); + var data = {}, key, argv2 = { + remain: [], + cooked: args2, + original: args2.slice(0) + }; + parse(args2, data, argv2.remain, types, shorthands, opts); + clean(data, types, exports2.typeDefs); + data.argv = argv2; + Object.defineProperty(data.argv, "toString", { value: function() { + return this.original.map(JSON.stringify).join(" "); + }, enumerable: false }); + return data; + } + function clean(data, types, typeDefs) { + typeDefs = typeDefs || exports2.typeDefs; + var remove = {}, typeDefault = [false, true, null, String, Array]; + Object.keys(data).forEach(function(k) { + if (k === "argv") + return; + var val = data[k], isArray = Array.isArray(val), type = types[k]; + if (!isArray) + val = [val]; + if (!type) + type = typeDefault; + if (type === Array) + type = typeDefault.concat(Array); + if (!Array.isArray(type)) + type = [type]; + debug("val=%j", val); + debug("types=", type); + val = val.map(function(val2) { + if (typeof val2 === "string") { + debug("string %j", val2); + val2 = val2.trim(); + if (val2 === "null" && ~type.indexOf(null) || val2 === "true" && (~type.indexOf(true) || ~type.indexOf(Boolean)) || val2 === "false" && (~type.indexOf(false) || ~type.indexOf(Boolean))) { + val2 = JSON.parse(val2); + debug("jsonable %j", val2); + } else if (~type.indexOf(Number) && !isNaN(val2)) { + debug("convert to number", val2); + val2 = +val2; + } else if (~type.indexOf(Date) && !isNaN(Date.parse(val2))) { + debug("convert to date", val2); + val2 = new Date(val2); + } + } + if (!types.hasOwnProperty(k)) { + return val2; + } + if (val2 === false && ~type.indexOf(null) && !(~type.indexOf(false) || ~type.indexOf(Boolean))) { + val2 = null; + } + var d = {}; + d[k] = val2; + debug("prevalidated val", d, val2, types[k]); + if (!validate(d, k, val2, types[k], typeDefs)) { + if (exports2.invalidHandler) { + exports2.invalidHandler(k, val2, types[k], data); + } else if (exports2.invalidHandler !== false) { + debug("invalid: " + k + "=" + val2, types[k]); + } + return remove; + } + debug("validated val", d, val2, types[k]); + return d[k]; + }).filter(function(val2) { + return val2 !== remove; + }); + if (!val.length && type.indexOf(Array) === -1) { + debug("VAL HAS NO LENGTH, DELETE IT", val, k, type.indexOf(Array)); + delete data[k]; + } else if (isArray) { + debug(isArray, data[k], val); + data[k] = val; + } else + data[k] = val[0]; + debug("k=%s val=%j", k, val, data[k]); + }); + } + function validateString(data, k, val) { + data[k] = String(val); + } + function validatePath(data, k, val) { + if (val === true) + return false; + if (val === null) + return true; + val = String(val); + var isWin = process.platform === "win32", homePattern = isWin ? /^~(\/|\\)/ : /^~\//, home = os.homedir(); + if (home && val.match(homePattern)) { + data[k] = path.resolve(home, val.substr(2)); + } else { + data[k] = path.resolve(val); + } + return true; + } + function validateNumber(data, k, val) { + debug("validate Number %j %j %j", k, val, isNaN(val)); + if (isNaN(val)) + return false; + data[k] = +val; + } + function validateDate(data, k, val) { + var s = Date.parse(val); + debug("validate Date %j %j %j", k, val, s); + if (isNaN(s)) + return false; + data[k] = new Date(val); + } + function validateBoolean(data, k, val) { + if (val instanceof Boolean) + val = val.valueOf(); + else if (typeof val === "string") { + if (!isNaN(val)) + val = !!+val; + else if (val === "null" || val === "false") + val = false; + else + val = true; + } else + val = !!val; + data[k] = val; + } + function validateUrl(data, k, val) { + val = url.parse(String(val)); + if (!val.host) + return false; + data[k] = val.href; + } + function validateStream(data, k, val) { + if (!(val instanceof Stream)) + return false; + data[k] = val; + } + function validate(data, k, val, type, typeDefs) { + if (Array.isArray(type)) { + for (var i = 0, l = type.length; i < l; i++) { + if (type[i] === Array) + continue; + if (validate(data, k, val, type[i], typeDefs)) + return true; + } + delete data[k]; + return false; + } + if (type === Array) + return true; + if (type !== type) { + debug("Poison NaN", k, val, type); + delete data[k]; + return false; + } + if (val === type) { + debug("Explicitly allowed %j", val); + data[k] = val; + return true; + } + var ok = false, types = Object.keys(typeDefs); + for (var i = 0, l = types.length; i < l; i++) { + debug("test type %j %j %j", k, val, types[i]); + var t = typeDefs[types[i]]; + if (t && (type && type.name && t.type && t.type.name ? type.name === t.type.name : type === t.type)) { + var d = {}; + ok = t.validate(d, k, val) !== false; + val = d[k]; + if (ok) { + data[k] = val; + break; + } + } + } + debug("OK? %j (%j %j %j)", ok, k, val, types[i]); + if (!ok) + delete data[k]; + return ok; + } + function parse(args2, data, remain, types, shorthands, opts) { + debug("parse", args2, data, remain); + var escapeArgs = new Set(opts && opts.escapeArgs ? opts.escapeArgs : []); + var key = null, abbrevs = abbrev(Object.keys(types)), shortAbbr = abbrev(Object.keys(shorthands)); + for (var i = 0; i < args2.length; i++) { + var arg = args2[i]; + debug("arg", arg); + if (arg.match(/^-{2,}$/)) { + remain.push.apply(remain, args2.slice(i + 1)); + args2[i] = "--"; + break; + } + if (escapeArgs.has(arg)) { + remain.push.apply(remain, args2.slice(i)); + break; + } + var hadEq = false; + if (arg.charAt(0) === "-" && arg.length > 1) { + var at = arg.indexOf("="); + if (at > -1) { + hadEq = true; + var v = arg.substr(at + 1); + arg = arg.substr(0, at); + args2.splice(i, 1, arg, v); + } + var shRes = resolveShort(arg, shorthands, shortAbbr, abbrevs); + debug("arg=%j shRes=%j", arg, shRes); + if (shRes) { + debug(arg, shRes); + args2.splice.apply(args2, [i, 1].concat(shRes)); + if (arg !== shRes[0]) { + i--; + continue; + } + } + arg = arg.replace(/^-+/, ""); + var no = null; + while (arg.toLowerCase().indexOf("no-") === 0) { + no = !no; + arg = arg.substr(3); + } + if (abbrevs[arg]) + arg = abbrevs[arg]; + var argType = types[arg]; + var isTypeArray = Array.isArray(argType); + if (isTypeArray && argType.length === 1) { + isTypeArray = false; + argType = argType[0]; + } + var isArray = argType === Array || isTypeArray && argType.indexOf(Array) !== -1; + if (!types.hasOwnProperty(arg) && data.hasOwnProperty(arg)) { + if (!Array.isArray(data[arg])) + data[arg] = [data[arg]]; + isArray = true; + } + var val, la = args2[i + 1]; + var isBool = typeof no === "boolean" || argType === Boolean || isTypeArray && argType.indexOf(Boolean) !== -1 || typeof argType === "undefined" && !hadEq || la === "false" && (argType === null || isTypeArray && ~argType.indexOf(null)); + if (isBool) { + val = !no; + if (la === "true" || la === "false") { + val = JSON.parse(la); + la = null; + if (no) + val = !val; + i++; + } + if (isTypeArray && la) { + if (~argType.indexOf(la)) { + val = la; + i++; + } else if (la === "null" && ~argType.indexOf(null)) { + val = null; + i++; + } else if (!la.match(/^-{2,}[^-]/) && !isNaN(la) && ~argType.indexOf(Number)) { + val = +la; + i++; + } else if (!la.match(/^-[^-]/) && ~argType.indexOf(String)) { + val = la; + i++; + } + } + if (isArray) + (data[arg] = data[arg] || []).push(val); + else + data[arg] = val; + continue; + } + if (argType === String) { + if (la === void 0) { + la = ""; + } else if (la.match(/^-{1,2}[^-]+/)) { + la = ""; + i--; + } + } + if (la && la.match(/^-{2,}$/)) { + la = void 0; + i--; + } + val = la === void 0 ? true : la; + if (isArray) + (data[arg] = data[arg] || []).push(val); + else + data[arg] = val; + i++; + continue; + } + remain.push(arg); + } + } + function resolveShort(arg, shorthands, shortAbbr, abbrevs) { + arg = arg.replace(/^-+/, ""); + if (abbrevs[arg] === arg) + return null; + if (shorthands[arg]) { + if (shorthands[arg] && !Array.isArray(shorthands[arg])) + shorthands[arg] = shorthands[arg].split(/\s+/); + return shorthands[arg]; + } + var singles = shorthands.___singles; + if (!singles) { + singles = Object.keys(shorthands).filter(function(s) { + return s.length === 1; + }).reduce(function(l, r) { + l[r] = true; + return l; + }, {}); + shorthands.___singles = singles; + debug("shorthand singles", singles); + } + var chrs = arg.split("").filter(function(c) { + return singles[c]; + }); + if (chrs.join("") === arg) + return chrs.map(function(c) { + return shorthands[c]; + }).reduce(function(l, r) { + return l.concat(r); + }, []); + if (abbrevs[arg] && !shorthands[arg]) + return null; + if (shortAbbr[arg]) + arg = shortAbbr[arg]; + if (shorthands[arg] && !Array.isArray(shorthands[arg])) + shorthands[arg] = shorthands[arg].split(/\s+/); + return shorthands[arg]; + } + } +}); + +// lib/getOptionType.js +var require_getOptionType = __commonJS({ + "lib/getOptionType.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.currentTypedWordType = exports2.getLastOption = exports2.getOptionCompletions = void 0; + var nopt_1 = __importDefault(require_nopt()); + var fromPairs_1 = __importDefault(require_fromPairs()); + var omit_1 = __importDefault(require_omit()); + function getOptionCompletions(optionTypes, shorthands, option) { + const optionType = getOptionType(optionTypes, shorthands, option); + return optionTypeToCompletion(optionType); + } + exports2.getOptionCompletions = getOptionCompletions; + function optionTypeToCompletion(optionType) { + switch (optionType) { + case void 0: + case Boolean: + return void 0; + case String: + case Number: + return []; + } + if (!Array.isArray(optionType)) + return []; + if (optionType.length === 1) { + return optionTypeToCompletion(optionType); + } + return optionType.filter((ot) => typeof ot === "string"); + } + function getOptionType(optionTypes, shorthands, option) { + var _a; + const allBools = fromPairs_1.default(Object.keys(optionTypes).map((optionName) => [optionName, Boolean])); + const result = omit_1.default(["argv"], nopt_1.default(allBools, shorthands, [option], 0)); + return optionTypes[(_a = Object.entries(result)[0]) === null || _a === void 0 ? void 0 : _a[0]]; + } + function getLastOption(completionCtx) { + if (isOption(completionCtx.prev)) + return completionCtx.prev; + if (completionCtx.lastPartial === "" || completionCtx.words <= 1) + return null; + const words = completionCtx.line.slice(0, completionCtx.point).trim().split(/\s+/); + const lastWord = words[words.length - 2]; + return isOption(lastWord) ? lastWord : null; + } + exports2.getLastOption = getLastOption; + function isOption(word) { + return word.startsWith("--") && word.length >= 3 || word.startsWith("-") && word.length >= 2; + } + function currentTypedWordType(completionCtx) { + if (completionCtx.partial.endsWith(" ")) + return null; + return completionCtx.lastPartial.startsWith("-") ? "option" : "value"; + } + exports2.currentTypedWordType = currentTypedWordType; + } +}); + +// ../../node_modules/.pnpm/fastest-levenshtein@1.0.12/node_modules/fastest-levenshtein/index.js +var require_fastest_levenshtein = __commonJS({ + "../../node_modules/.pnpm/fastest-levenshtein@1.0.12/node_modules/fastest-levenshtein/index.js"(exports2, module2) { + "use strict"; + var peq = new Uint32Array(65536); + var myers_32 = (a, b) => { + const n = a.length; + const m = b.length; + const lst = 1 << n - 1; + let pv = -1; + let mv = 0; + let sc = n; + let i = n; + while (i--) { + peq[a.charCodeAt(i)] |= 1 << i; + } + for (i = 0; i < m; i++) { + let eq = peq[b.charCodeAt(i)]; + const xv = eq | mv; + eq |= (eq & pv) + pv ^ pv; + mv |= ~(eq | pv); + pv &= eq; + if (mv & lst) { + sc++; + } + if (pv & lst) { + sc--; + } + mv = mv << 1 | 1; + pv = pv << 1 | ~(xv | mv); + mv &= xv; + } + i = n; + while (i--) { + peq[a.charCodeAt(i)] = 0; + } + return sc; + }; + var myers_x = (a, b) => { + const n = a.length; + const m = b.length; + const mhc = []; + const phc = []; + const hsize = Math.ceil(n / 32); + const vsize = Math.ceil(m / 32); + let score = m; + for (let i = 0; i < hsize; i++) { + phc[i] = -1; + mhc[i] = 0; + } + let j = 0; + for (; j < vsize - 1; j++) { + let mv2 = 0; + let pv2 = -1; + const start2 = j * 32; + const end2 = Math.min(32, m) + start2; + for (let k = start2; k < end2; k++) { + peq[b.charCodeAt(k)] |= 1 << k; + } + score = m; + for (let i = 0; i < n; i++) { + const eq = peq[a.charCodeAt(i)]; + const pb = phc[i / 32 | 0] >>> i & 1; + const mb = mhc[i / 32 | 0] >>> i & 1; + const xv = eq | mv2; + const xh = ((eq | mb) & pv2) + pv2 ^ pv2 | eq | mb; + let ph = mv2 | ~(xh | pv2); + let mh = pv2 & xh; + if (ph >>> 31 ^ pb) { + phc[i / 32 | 0] ^= 1 << i; + } + if (mh >>> 31 ^ mb) { + mhc[i / 32 | 0] ^= 1 << i; + } + ph = ph << 1 | pb; + mh = mh << 1 | mb; + pv2 = mh | ~(xv | ph); + mv2 = ph & xv; + } + for (let k = start2; k < end2; k++) { + peq[b.charCodeAt(k)] = 0; + } + } + let mv = 0; + let pv = -1; + const start = j * 32; + const end = Math.min(32, m - start) + start; + for (let k = start; k < end; k++) { + peq[b.charCodeAt(k)] |= 1 << k; + } + score = m; + for (let i = 0; i < n; i++) { + const eq = peq[a.charCodeAt(i)]; + const pb = phc[i / 32 | 0] >>> i & 1; + const mb = mhc[i / 32 | 0] >>> i & 1; + const xv = eq | mv; + const xh = ((eq | mb) & pv) + pv ^ pv | eq | mb; + let ph = mv | ~(xh | pv); + let mh = pv & xh; + score += ph >>> m - 1 & 1; + score -= mh >>> m - 1 & 1; + if (ph >>> 31 ^ pb) { + phc[i / 32 | 0] ^= 1 << i; + } + if (mh >>> 31 ^ mb) { + mhc[i / 32 | 0] ^= 1 << i; + } + ph = ph << 1 | pb; + mh = mh << 1 | mb; + pv = mh | ~(xv | ph); + mv = ph & xv; + } + for (let k = start; k < end; k++) { + peq[b.charCodeAt(k)] = 0; + } + return score; + }; + var distance = (a, b) => { + if (a.length > b.length) { + const tmp = b; + b = a; + a = tmp; + } + if (a.length === 0) { + return b.length; + } + if (a.length <= 32) { + return myers_32(a, b); + } + return myers_x(a, b); + }; + var closest = (str, arr) => { + let min_distance = Infinity; + let min_index = 0; + for (let i = 0; i < arr.length; i++) { + const dist = distance(str, arr[i]); + if (dist < min_distance) { + min_distance = dist; + min_index = i; + } + } + return arr[min_index]; + }; + module2.exports = { + closest, + distance + }; + } +}); + +// ../../node_modules/.pnpm/lodash.deburr@4.1.0/node_modules/lodash.deburr/index.js +var require_lodash = __commonJS({ + "../../node_modules/.pnpm/lodash.deburr@4.1.0/node_modules/lodash.deburr/index.js"(exports2, module2) { + var INFINITY = 1 / 0; + var symbolTag = "[object Symbol]"; + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + var rsComboMarksRange = "\\u0300-\\u036f\\ufe20-\\ufe23"; + var rsComboSymbolsRange = "\\u20d0-\\u20f0"; + var rsCombo = "[" + rsComboMarksRange + rsComboSymbolsRange + "]"; + var reComboMark = RegExp(rsCombo, "g"); + var deburredLetters = { + "\xC0": "A", + "\xC1": "A", + "\xC2": "A", + "\xC3": "A", + "\xC4": "A", + "\xC5": "A", + "\xE0": "a", + "\xE1": "a", + "\xE2": "a", + "\xE3": "a", + "\xE4": "a", + "\xE5": "a", + "\xC7": "C", + "\xE7": "c", + "\xD0": "D", + "\xF0": "d", + "\xC8": "E", + "\xC9": "E", + "\xCA": "E", + "\xCB": "E", + "\xE8": "e", + "\xE9": "e", + "\xEA": "e", + "\xEB": "e", + "\xCC": "I", + "\xCD": "I", + "\xCE": "I", + "\xCF": "I", + "\xEC": "i", + "\xED": "i", + "\xEE": "i", + "\xEF": "i", + "\xD1": "N", + "\xF1": "n", + "\xD2": "O", + "\xD3": "O", + "\xD4": "O", + "\xD5": "O", + "\xD6": "O", + "\xD8": "O", + "\xF2": "o", + "\xF3": "o", + "\xF4": "o", + "\xF5": "o", + "\xF6": "o", + "\xF8": "o", + "\xD9": "U", + "\xDA": "U", + "\xDB": "U", + "\xDC": "U", + "\xF9": "u", + "\xFA": "u", + "\xFB": "u", + "\xFC": "u", + "\xDD": "Y", + "\xFD": "y", + "\xFF": "y", + "\xC6": "Ae", + "\xE6": "ae", + "\xDE": "Th", + "\xFE": "th", + "\xDF": "ss", + "\u0100": "A", + "\u0102": "A", + "\u0104": "A", + "\u0101": "a", + "\u0103": "a", + "\u0105": "a", + "\u0106": "C", + "\u0108": "C", + "\u010A": "C", + "\u010C": "C", + "\u0107": "c", + "\u0109": "c", + "\u010B": "c", + "\u010D": "c", + "\u010E": "D", + "\u0110": "D", + "\u010F": "d", + "\u0111": "d", + "\u0112": "E", + "\u0114": "E", + "\u0116": "E", + "\u0118": "E", + "\u011A": "E", + "\u0113": "e", + "\u0115": "e", + "\u0117": "e", + "\u0119": "e", + "\u011B": "e", + "\u011C": "G", + "\u011E": "G", + "\u0120": "G", + "\u0122": "G", + "\u011D": "g", + "\u011F": "g", + "\u0121": "g", + "\u0123": "g", + "\u0124": "H", + "\u0126": "H", + "\u0125": "h", + "\u0127": "h", + "\u0128": "I", + "\u012A": "I", + "\u012C": "I", + "\u012E": "I", + "\u0130": "I", + "\u0129": "i", + "\u012B": "i", + "\u012D": "i", + "\u012F": "i", + "\u0131": "i", + "\u0134": "J", + "\u0135": "j", + "\u0136": "K", + "\u0137": "k", + "\u0138": "k", + "\u0139": "L", + "\u013B": "L", + "\u013D": "L", + "\u013F": "L", + "\u0141": "L", + "\u013A": "l", + "\u013C": "l", + "\u013E": "l", + "\u0140": "l", + "\u0142": "l", + "\u0143": "N", + "\u0145": "N", + "\u0147": "N", + "\u014A": "N", + "\u0144": "n", + "\u0146": "n", + "\u0148": "n", + "\u014B": "n", + "\u014C": "O", + "\u014E": "O", + "\u0150": "O", + "\u014D": "o", + "\u014F": "o", + "\u0151": "o", + "\u0154": "R", + "\u0156": "R", + "\u0158": "R", + "\u0155": "r", + "\u0157": "r", + "\u0159": "r", + "\u015A": "S", + "\u015C": "S", + "\u015E": "S", + "\u0160": "S", + "\u015B": "s", + "\u015D": "s", + "\u015F": "s", + "\u0161": "s", + "\u0162": "T", + "\u0164": "T", + "\u0166": "T", + "\u0163": "t", + "\u0165": "t", + "\u0167": "t", + "\u0168": "U", + "\u016A": "U", + "\u016C": "U", + "\u016E": "U", + "\u0170": "U", + "\u0172": "U", + "\u0169": "u", + "\u016B": "u", + "\u016D": "u", + "\u016F": "u", + "\u0171": "u", + "\u0173": "u", + "\u0174": "W", + "\u0175": "w", + "\u0176": "Y", + "\u0177": "y", + "\u0178": "Y", + "\u0179": "Z", + "\u017B": "Z", + "\u017D": "Z", + "\u017A": "z", + "\u017C": "z", + "\u017E": "z", + "\u0132": "IJ", + "\u0133": "ij", + "\u0152": "Oe", + "\u0153": "oe", + "\u0149": "'n", + "\u017F": "ss" + }; + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + function basePropertyOf(object) { + return function(key) { + return object == null ? void 0 : object[key]; + }; + } + var deburrLetter = basePropertyOf(deburredLetters); + var objectProto = Object.prototype; + var objectToString = objectProto.toString; + var Symbol2 = root.Symbol; + var symbolProto = Symbol2 ? Symbol2.prototype : void 0; + var symbolToString = symbolProto ? symbolProto.toString : void 0; + function baseToString(value) { + if (typeof value == "string") { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ""; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY ? "-0" : result; + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + function isSymbol(value) { + return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag; + } + function toString(value) { + return value == null ? "" : baseToString(value); + } + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ""); + } + module2.exports = deburr; + } +}); + +// ../../node_modules/.pnpm/didyoumean2@5.0.0/node_modules/didyoumean2/dist/index.cjs +var require_dist12 = __commonJS({ + "../../node_modules/.pnpm/didyoumean2@5.0.0/node_modules/didyoumean2/dist/index.cjs"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var e = require_fastest_levenshtein(); + function t(e2) { + return e2 && typeof e2 == "object" && "default" in e2 ? e2 : { default: e2 }; + } + var s = t(require_lodash()); + var r; + var o; + exports2.ReturnTypeEnums = void 0, (r = exports2.ReturnTypeEnums || (exports2.ReturnTypeEnums = {})).ALL_CLOSEST_MATCHES = "all-closest-matches", r.ALL_MATCHES = "all-matches", r.ALL_SORTED_MATCHES = "all-sorted-matches", r.FIRST_CLOSEST_MATCH = "first-closest-match", r.FIRST_MATCH = "first-match", exports2.ThresholdTypeEnums = void 0, (o = exports2.ThresholdTypeEnums || (exports2.ThresholdTypeEnums = {})).EDIT_DISTANCE = "edit-distance", o.SIMILARITY = "similarity"; + var n = new Error("unknown returnType"); + var T = new Error("unknown thresholdType"); + var u = (e2, t2) => { + let r2 = e2; + return t2.trimSpaces && (r2 = r2.trim().replace(/\s+/g, " ")), t2.deburr && (r2 = s.default(r2)), t2.caseSensitive || (r2 = r2.toLowerCase()), r2; + }; + var h = (e2, t2) => { + const { matchPath: s2 } = t2, r2 = ((e3, t3) => { + const s3 = t3.length > 0 ? t3.reduce((e4, t4) => e4 == null ? void 0 : e4[t4], e3) : e3; + return typeof s3 != "string" ? "" : s3; + })(e2, s2); + return u(r2, t2); + }; + exports2.default = function(t2, s2, r2) { + const o2 = ((e2) => { + const t3 = { caseSensitive: false, deburr: true, matchPath: [], returnType: exports2.ReturnTypeEnums.FIRST_CLOSEST_MATCH, thresholdType: exports2.ThresholdTypeEnums.SIMILARITY, trimSpaces: true, ...e2 }; + switch (t3.thresholdType) { + case exports2.ThresholdTypeEnums.EDIT_DISTANCE: + return { threshold: 20, ...t3 }; + case exports2.ThresholdTypeEnums.SIMILARITY: + return { threshold: 0.4, ...t3 }; + default: + throw T; + } + })(r2), { returnType: p, threshold: c, thresholdType: a } = o2, l = u(t2, o2); + let E, S; + switch (a) { + case exports2.ThresholdTypeEnums.EDIT_DISTANCE: + E = (e2) => e2 <= c, S = (t3) => e.distance(l, h(t3, o2)); + break; + case exports2.ThresholdTypeEnums.SIMILARITY: + E = (e2) => e2 >= c, S = (t3) => ((t4, s3) => { + if (!t4 || !s3) + return 0; + if (t4 === s3) + return 1; + const r3 = e.distance(t4, s3), o3 = Math.max(t4.length, s3.length); + return (o3 - r3) / o3; + })(l, h(t3, o2)); + break; + default: + throw T; + } + const d = [], i = s2.length; + switch (p) { + case exports2.ReturnTypeEnums.ALL_CLOSEST_MATCHES: + case exports2.ReturnTypeEnums.FIRST_CLOSEST_MATCH: { + const e2 = []; + let t3; + switch (a) { + case exports2.ThresholdTypeEnums.EDIT_DISTANCE: + t3 = 1 / 0; + for (let r4 = 0; r4 < i; r4 += 1) { + const o3 = S(s2[r4]); + t3 > o3 && (t3 = o3), e2.push(o3); + } + break; + case exports2.ThresholdTypeEnums.SIMILARITY: + t3 = 0; + for (let r4 = 0; r4 < i; r4 += 1) { + const o3 = S(s2[r4]); + t3 < o3 && (t3 = o3), e2.push(o3); + } + break; + default: + throw T; + } + const r3 = e2.length; + for (let s3 = 0; s3 < r3; s3 += 1) { + const r4 = e2[s3]; + E(r4) && r4 === t3 && d.push(s3); + } + break; + } + case exports2.ReturnTypeEnums.ALL_MATCHES: + for (let e2 = 0; e2 < i; e2 += 1) { + E(S(s2[e2])) && d.push(e2); + } + break; + case exports2.ReturnTypeEnums.ALL_SORTED_MATCHES: { + const e2 = []; + for (let t3 = 0; t3 < i; t3 += 1) { + const r3 = S(s2[t3]); + E(r3) && e2.push({ score: r3, index: t3 }); + } + switch (a) { + case exports2.ThresholdTypeEnums.EDIT_DISTANCE: + e2.sort((e3, t3) => e3.score - t3.score); + break; + case exports2.ThresholdTypeEnums.SIMILARITY: + e2.sort((e3, t3) => t3.score - e3.score); + break; + default: + throw T; + } + for (const t3 of e2) + d.push(t3.index); + break; + } + case exports2.ReturnTypeEnums.FIRST_MATCH: + for (let e2 = 0; e2 < i; e2 += 1) { + if (E(S(s2[e2]))) { + d.push(e2); + break; + } + } + break; + default: + throw n; + } + return ((e2, t3, s3) => { + switch (s3) { + case exports2.ReturnTypeEnums.ALL_CLOSEST_MATCHES: + case exports2.ReturnTypeEnums.ALL_MATCHES: + case exports2.ReturnTypeEnums.ALL_SORTED_MATCHES: + return t3.map((t4) => e2[t4]); + case exports2.ReturnTypeEnums.FIRST_CLOSEST_MATCH: + case exports2.ReturnTypeEnums.FIRST_MATCH: + return t3.length ? e2[t3[0]] : null; + default: + throw n; + } + })(s2, d, p); + }; + } +}); + +// ../parse-cli-args/lib/index.js +var require_lib110 = __commonJS({ + "../parse-cli-args/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = __importDefault(require_lib8()); + var find_workspace_dir_1 = __importDefault(require_lib94()); + var nopt_1 = __importDefault(require_nopt()); + var didyoumean2_1 = __importStar2(require_dist12()); + var RECURSIVE_CMDS = new Set(["recursive", "multi", "m"]); + async function parseCliArgs(opts, inputArgv) { + var _a; + const noptExploratoryResults = nopt_1.default({ + filter: [String], + help: Boolean, + recursive: Boolean, + ...opts.universalOptionsTypes, + ...opts.getTypesByCommandName("add"), + ...opts.getTypesByCommandName("install") + }, { + r: "--recursive", + ...opts.universalShorthands + }, inputArgv, 0, { escapeArgs: opts.escapeArgs }); + const recursiveCommandUsed = RECURSIVE_CMDS.has(noptExploratoryResults.argv.remain[0]); + let commandName = getCommandName(noptExploratoryResults.argv.remain); + let cmd = commandName ? opts.getCommandLongName(commandName) : null; + const fallbackCommandUsed = Boolean(commandName && !cmd && opts.fallbackCommand); + if (fallbackCommandUsed) { + cmd = opts.fallbackCommand; + commandName = opts.fallbackCommand; + inputArgv.unshift(opts.fallbackCommand); + } else if (noptExploratoryResults["help"]) { + return { + argv: noptExploratoryResults.argv, + cmd: "help", + options: {}, + params: noptExploratoryResults.argv.remain, + unknownOptions: new Map(), + fallbackCommandUsed: false + }; + } + const types = { + ...opts.universalOptionsTypes, + ...opts.getTypesByCommandName(commandName) + }; + function getCommandName(args2) { + if (recursiveCommandUsed) { + args2 = args2.slice(1); + } + if (opts.getCommandLongName(args2[0]) !== "install" || args2.length === 1) { + return args2[0]; + } + return "add"; + } + const { argv: argv2, ...options } = nopt_1.default({ + recursive: Boolean, + ...types + }, { + ...opts.universalShorthands, + ...opts.shorthandsByCommandName[commandName] + }, inputArgv, 0, { escapeArgs: opts.escapeArgs }); + if (opts.renamedOptions != null) { + for (const cliOption of Object.keys(options)) { + if (opts.renamedOptions[cliOption]) { + options[opts.renamedOptions[cliOption]] = options[cliOption]; + delete options[cliOption]; + } + } + } + const params = argv2.remain.slice(1).filter(Boolean); + if (options["recursive"] !== true && (options["filter"] || options["filter-prod"] || recursiveCommandUsed)) { + options["recursive"] = true; + const subCmd = argv2.remain[1] && opts.getCommandLongName(argv2.remain[1]); + if (subCmd && recursiveCommandUsed) { + params.shift(); + argv2.remain.shift(); + cmd = subCmd; + } + } + const dir = (_a = options["dir"]) !== null && _a !== void 0 ? _a : process.cwd(); + const workspaceDir = options["global"] ? void 0 : await find_workspace_dir_1.default(dir); + if (options["workspace-root"]) { + if (options["global"]) { + throw new error_1.default("OPTIONS_CONFLICT", "--workspace-root may not be used with --global"); + } + if (!workspaceDir) { + throw new error_1.default("NOT_IN_WORKSPACE", "--workspace-root may only be used inside a workspace"); + } + options["dir"] = workspaceDir; + } + if (cmd === "install" && params.length > 0) { + cmd = "add"; + } + if (!cmd && options["recursive"]) { + cmd = "recursive"; + } + const knownOptions = new Set(Object.keys(types)); + return { + argv: argv2, + cmd, + params, + workspaceDir, + fallbackCommandUsed, + ...normalizeOptions(options, knownOptions) + }; + } + exports2.default = parseCliArgs; + var CUSTOM_OPTION_PREFIX = "config."; + function normalizeOptions(options, knownOptions) { + const standardOptionNames = []; + const normalizedOptions = {}; + for (const [optionName, optionValue] of Object.entries(options)) { + if (optionName.startsWith(CUSTOM_OPTION_PREFIX)) { + normalizedOptions[optionName.substring(CUSTOM_OPTION_PREFIX.length)] = optionValue; + continue; + } + normalizedOptions[optionName] = optionValue; + standardOptionNames.push(optionName); + } + const unknownOptions = getUnknownOptions(standardOptionNames, knownOptions); + return { options: normalizedOptions, unknownOptions }; + } + function getUnknownOptions(usedOptions, knownOptions) { + const unknownOptions = new Map(); + const closestMatches = getClosestOptionMatches.bind(null, Array.from(knownOptions)); + for (const usedOption of usedOptions) { + if (knownOptions.has(usedOption) || usedOption.startsWith("//")) + continue; + unknownOptions.set(usedOption, closestMatches(usedOption)); + } + return unknownOptions; + } + function getClosestOptionMatches(knownOptions, option) { + return didyoumean2_1.default(option, knownOptions, { + returnType: didyoumean2_1.ReturnTypeEnums.ALL_CLOSEST_MATCHES + }); + } + } +}); + +// lib/shorthands.js +var require_shorthands = __commonJS({ + "lib/shorthands.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = { + s: "--reporter=silent", + d: "--loglevel=info", + dd: "--loglevel=verbose", + ddd: "--loglevel=silly", + L: "--latest", + r: "--recursive", + silent: "--reporter=silent", + verbose: "--loglevel=verbose", + quiet: "--loglevel=warn", + q: "--loglevel=warn", + h: "--help", + H: "--help", + "?": "--help", + usage: "--help", + v: "--version", + f: "--force", + local: "--no-global", + l: "--long", + p: "--parseable", + porcelain: "--parseable", + prod: "--production", + development: "--dev", + g: "--global", + S: "--save", + D: "--save-dev", + P: "--save-prod", + E: "--save-exact", + O: "--save-optional", + C: "--dir", + "shrinkwrap-only": "--lockfile-only", + "shared-workspace-shrinkwrap": "--shared-workspace-lockfile", + "frozen-shrinkwrap": "--frozen-lockfile", + "prefer-frozen-shrinkwrap": "--prefer-frozen-lockfile", + W: "--ignore-workspace-root-check", + w: "--workspace-root", + i: "--interactive" + }; + } +}); + +// lib/parseCliArgs.js +var require_parseCliArgs = __commonJS({ + "lib/parseCliArgs.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var parse_cli_args_1 = __importDefault(require_lib110()); + var cmd_1 = require_cmd(); + var shorthands_1 = __importDefault(require_shorthands()); + var RENAMED_OPTIONS = { + "lockfile-directory": "lockfile-dir", + prefix: "dir", + "shrinkwrap-directory": "lockfile-dir", + store: "store-dir" + }; + async function parseCliArgs(inputArgv) { + return parse_cli_args_1.default({ + fallbackCommand: "run", + escapeArgs: ["dlx", "exec"], + getCommandLongName: cmd_1.getCommandFullName, + getTypesByCommandName: cmd_1.getCliOptionsTypes, + renamedOptions: RENAMED_OPTIONS, + shorthandsByCommandName: cmd_1.shorthandsByCommandName, + universalOptionsTypes: cmd_1.GLOBAL_OPTIONS, + universalShorthands: shorthands_1.default + }, inputArgv); + } + exports2.default = parseCliArgs; + } +}); + +// lib/optionTypesToCompletions.js +var require_optionTypesToCompletions = __commonJS({ + "lib/optionTypesToCompletions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function optionTypesToCompletions(optionTypes) { + const completions = []; + for (const [name, typeObj] of Object.entries(optionTypes)) { + if (typeObj === Boolean) { + completions.push({ name: `--${name}` }); + completions.push({ name: `--no-${name}` }); + } else { + completions.push({ name: `--${name}` }); + } + } + return completions; + } + exports2.default = optionTypesToCompletions; + } +}); + +// lib/cmd/complete.js +var require_complete = __commonJS({ + "lib/cmd/complete.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var find_workspace_dir_1 = __importDefault(require_lib94()); + var find_workspace_packages_1 = __importDefault(require_lib22()); + var getOptionType_1 = require_getOptionType(); + var optionTypesToCompletions_1 = __importDefault(require_optionTypesToCompletions()); + var shorthands_1 = __importDefault(require_shorthands()); + async function complete(ctx, input) { + var _a, _b, _c, _d; + if (input.options.version) + return []; + const optionTypes = { + ...ctx.universalOptionsTypes, + ...(_c = input.cmd && ((_b = (_a = ctx.cliOptionsTypesByCommandName)[input.cmd]) === null || _b === void 0 ? void 0 : _b.call(_a))) !== null && _c !== void 0 ? _c : {} + }; + if (input.currentTypedWordType !== "option") { + if (input.lastOption === "--filter") { + const workspaceDir = (_d = await find_workspace_dir_1.default(process.cwd())) !== null && _d !== void 0 ? _d : process.cwd(); + const allProjects = await find_workspace_packages_1.default(workspaceDir, {}); + return allProjects.filter(({ manifest }) => manifest.name).map(({ manifest }) => ({ name: manifest.name })); + } else if (input.lastOption) { + const optionCompletions = getOptionType_1.getOptionCompletions(optionTypes, { + ...shorthands_1.default, + ...input.cmd ? ctx.shorthandsByCommandName[input.cmd] : {} + }, input.lastOption); + if (optionCompletions !== void 0) { + return optionCompletions.map((name) => ({ name })); + } + } + } + let completions = []; + if (input.currentTypedWordType !== "option") { + if (!input.cmd || input.currentTypedWordType === "value" && !ctx.completionByCommandName[input.cmd]) { + completions = ctx.initialCompletion(); + } else if (ctx.completionByCommandName[input.cmd]) { + try { + completions = await ctx.completionByCommandName[input.cmd](input.options, input.params); + } catch (err) { + } + } + } + if (input.currentTypedWordType === "value") { + return completions; + } + if (!input.cmd) { + return [ + ...completions, + ...optionTypesToCompletions_1.default(optionTypes), + { name: "--version" } + ]; + } + return [ + ...completions, + ...optionTypesToCompletions_1.default(optionTypes) + ]; + } + exports2.default = complete; + } +}); + +// lib/cmd/completion.js +var require_completion = __commonJS({ + "lib/cmd/completion.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var split_cmd_1 = require_split_cmd(); + var tabtab_1 = __importDefault(require_lib5()); + var getOptionType_1 = require_getOptionType(); + var parseCliArgs_1 = __importDefault(require_parseCliArgs()); + var complete_1 = __importDefault(require_complete()); + function default_1(opts) { + return async () => { + const env = tabtab_1.default.parseEnv(process.env); + if (!env.complete) + return; + const finishedArgv = env.partial.substr(0, env.partial.length - env.lastPartial.length); + const inputArgv = split_cmd_1.split(finishedArgv).slice(1); + if (inputArgv.includes("--")) + return; + const { params, options, cmd } = await parseCliArgs_1.default(inputArgv); + return tabtab_1.default.log(await complete_1.default(opts, { + cmd, + currentTypedWordType: getOptionType_1.currentTypedWordType(env), + lastOption: getOptionType_1.getLastOption(env), + options, + params + })); + }; + } + exports2.default = default_1; + } +}); + +// lib/cmd/help.js +var require_help = __commonJS({ + "lib/cmd/help.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var cli_meta_1 = __importDefault(require_lib4()); + var render_help_1 = __importDefault(require_lib30()); + function default_1(helpByCommandName) { + return function(opts, params) { + let helpText; + if (params.length === 0) { + helpText = getHelpText(); + } else if (helpByCommandName[params[0]]) { + helpText = helpByCommandName[params[0]](); + } else { + helpText = `No results for "${params[0]}"`; + } + return `Version ${cli_meta_1.default.version}${process["pkg"] != null ? ` (compiled to binary; bundled Node.js ${process.version})` : ""} +${helpText} +`; + }; + } + exports2.default = default_1; + function getHelpText() { + return render_help_1.default({ + descriptionLists: [ + { + title: "Manage your dependencies", + list: [ + { + description: "Install all dependencies for a project", + name: "install", + shortAlias: "i" + }, + { + description: "Installs a package and any packages that it depends on. By default, any new package is installed as a prod dependency", + name: "add" + }, + { + description: "Updates packages to their latest version based on the specified range", + name: "update", + shortAlias: "up" + }, + { + description: "Removes packages from node_modules and from the project's package.json", + name: "remove", + shortAlias: "rm" + }, + { + description: "Connect the local project to another one", + name: "link", + shortAlias: "ln" + }, + { + description: "Unlinks a package. Like yarn unlink but pnpm re-installs the dependency after removing the external link", + name: "unlink" + }, + { + description: "Generates a pnpm-lock.yaml from an npm package-lock.json (or npm-shrinkwrap.json) file", + name: "import" + }, + { + description: "Runs a pnpm install followed immediately by a pnpm test", + name: "install-test", + shortAlias: "it" + }, + { + description: "Rebuild a package", + name: "rebuild", + shortAlias: "rb" + }, + { + description: "Removes extraneous packages", + name: "prune" + } + ] + }, + { + title: "Review your dependencies", + list: [ + { + description: "Checks for known security issues with the installed packages", + name: "audit" + }, + { + description: "Print all the versions of packages that are installed, as well as their dependencies, in a tree-structure", + name: "list", + shortAlias: "ls" + }, + { + description: "Check for outdated packages", + name: "outdated" + } + ] + }, + { + title: "Run your scripts", + list: [ + { + description: "Executes a shell command in scope of a project", + name: "exec" + }, + { + description: "Runs a defined package script", + name: "run" + }, + { + description: `Runs a package's "test" script, if one was provided`, + name: "test", + shortAlias: "t" + }, + { + description: `Runs an arbitrary command specified in the package's "start" property of its "scripts" object`, + name: "start" + } + ] + }, + { + title: "Other", + list: [ + { + name: "pack" + }, + { + description: "Publishes a package to the registry", + name: "publish" + }, + { + name: "root" + } + ] + }, + { + title: "Manage your store", + list: [ + { + description: "Adds new packages to the pnpm store directly. Does not modify any projects or files outside the store", + name: "store add" + }, + { + description: "Removes unreferenced (extraneous, orphan) packages from the store", + name: "store prune" + }, + { + description: "Checks for modified packages in the store", + name: "store status" + } + ] + } + ], + usages: ["pnpm [command] [flags]", "pnpm [ -h | --help | -v | --version ]"] + }); + } + } +}); + +// lib/cmd/installTest.js +var require_installTest = __commonJS({ + "lib/cmd/installTest.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.rcOptionsTypes = exports2.cliOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var plugin_commands_installation_1 = require_lib98(); + var plugin_commands_script_runners_1 = require_lib106(); + var render_help_1 = __importDefault(require_lib30()); + exports2.cliOptionsTypes = plugin_commands_installation_1.install.cliOptionsTypes; + exports2.rcOptionsTypes = plugin_commands_installation_1.install.rcOptionsTypes; + exports2.commandNames = ["install-test", "it"]; + function help() { + return render_help_1.default({ + aliases: ["it"], + description: "Runs a `pnpm install` followed immediately by a `pnpm test`. It takes exactly the same arguments as `pnpm install`.", + url: cli_utils_1.docsUrl("install-test"), + usages: ["pnpm install-test"] + }); + } + exports2.help = help; + async function handler(opts, params) { + await plugin_commands_installation_1.install.handler(opts); + await plugin_commands_script_runners_1.test.handler(opts, params); + } + exports2.handler = handler; + } +}); + +// lib/cmd/recursive.js +var require_recursive5 = __commonJS({ + "lib/cmd/recursive.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var cli_utils_1 = require_lib20(); + var common_cli_options_help_1 = require_lib90(); + var constants_1 = require_lib7(); + var render_help_1 = __importDefault(require_lib30()); + var rcOptionsTypes = () => ({}); + exports2.rcOptionsTypes = rcOptionsTypes; + var cliOptionsTypes = () => ({}); + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["recursive", "multi", "m"]; + function help() { + return render_help_1.default({ + description: "Concurrently performs some actions in all subdirectories with a `package.json` (excluding node_modules). A `pnpm-workspace.yaml` file may be used to control what directories are searched for packages.", + descriptionLists: [ + { + title: "Commands", + list: [ + { + name: "install" + }, + { + name: "add" + }, + { + name: "update" + }, + { + description: "Uninstall a dependency from each package", + name: "remove ..." + }, + { + description: "Removes links to local packages and reinstalls them from the registry.", + name: "unlink" + }, + { + description: "List dependencies in each package.", + name: "list [...]" + }, + { + description: "List packages that depend on .", + name: "why ..." + }, + { + description: "Check for outdated dependencies in every package.", + name: "outdated [...]" + }, + { + description: `This runs an arbitrary command from each package's "scripts" object. If a package doesn't have the command, it is skipped. If none of the packages have the command, the command fails.`, + name: "run [-- ...]" + }, + { + description: `This runs each package's "test" script, if one was provided.`, + name: "test [-- ...]" + }, + { + description: 'This command runs the "npm build" command on each package. This is useful when you install a new version of node, and must recompile all your C++ addons with the new binary.', + name: "rebuild [[<@scope>/]...]" + }, + { + description: "Run a command in each package.", + name: "exec -- [args...]" + }, + { + description: "Publishes packages to the npm registry. Only publishes a package if its version is not taken in the registry.", + name: "publish [--tag ] [--access ]" + } + ] + }, + { + title: "Options", + list: [ + { + description: "Continues executing other tasks even if a task threw an error.", + name: "--no-bail" + }, + { + description: "Set the maximum number of concurrency. Default is 4. For unlimited concurrency use Infinity.", + name: "--workspace-concurrency " + }, + { + description: "Locally available packages are linked to node_modules instead of being downloaded from the registry. Convenient to use in a multi-package repository.", + name: "--link-workspace-packages" + }, + { + description: "Reverse the order that packages get ordered in. Disabled by default.", + name: "--reverse" + }, + { + description: "Sort packages topologically (dependencies before dependents). Pass --no-sort to disable.", + name: "--sort" + }, + { + description: `Creates a single ${constants_1.WANTED_LOCKFILE} file in the root of the workspace. A shared lockfile also means that all dependencies of all projects will be in a single node_modules.`, + name: "--shared-workspace-lockfile" + } + ] + }, + common_cli_options_help_1.FILTERING + ], + url: cli_utils_1.docsUrl("recursive"), + usages: [ + "pnpm recursive [command] [flags] [--filter ]", + "pnpm multi [command] [flags] [--filter ]", + "pnpm m [command] [flags] [--filter ]" + ] + }); + } + exports2.help = help; + function handler() { + console.log(help()); + process.exit(1); + } + exports2.handler = handler; + } +}); + +// lib/cmd/root.js +var require_root2 = __commonJS({ + "lib/cmd/root.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.handler = exports2.help = exports2.commandNames = exports2.cliOptionsTypes = exports2.rcOptionsTypes = void 0; + var path_1 = __importDefault(require("path")); + var config_1 = require_lib10(); + var pick_1 = __importDefault(require_pick()); + var render_help_1 = __importDefault(require_lib30()); + exports2.rcOptionsTypes = cliOptionsTypes; + function cliOptionsTypes() { + return pick_1.default([ + "global" + ], config_1.types); + } + exports2.cliOptionsTypes = cliOptionsTypes; + exports2.commandNames = ["root"]; + function help() { + return render_help_1.default({ + description: "Print the effective `node_modules` directory.", + descriptionLists: [ + { + title: "Options", + list: [ + { + description: "Print the global `node_modules` directory", + name: "--global", + shortAlias: "-g" + } + ] + } + ], + usages: ["pnpm root [-g]"] + }); + } + exports2.help = help; + async function handler(opts) { + return `${path_1.default.join(opts.dir, "node_modules")} +`; + } + exports2.handler = handler; + } +}); + +// lib/cmd/index.js +var require_cmd = __commonJS({ + "lib/cmd/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rcOptionsTypes = exports2.shorthandsByCommandName = exports2.getCommandFullName = exports2.getCliOptionsTypes = exports2.GLOBAL_OPTIONS = void 0; + var config_1 = require_lib10(); + var plugin_commands_audit_1 = require_lib58(); + var plugin_commands_env_1 = require_lib41(); + var plugin_commands_import_1 = require_lib89(); + var plugin_commands_installation_1 = require_lib98(); + var plugin_commands_listing_1 = require_lib101(); + var plugin_commands_outdated_1 = require_lib102(); + var plugin_commands_publishing_1 = require_lib105(); + var plugin_commands_rebuild_1 = require_lib93(); + var plugin_commands_script_runners_1 = require_lib106(); + var plugin_commands_server_1 = require_lib107(); + var plugin_commands_setup_1 = require_lib108(); + var plugin_commands_store_1 = require_lib109(); + var pick_1 = __importDefault(require_pick()); + var bin = __importStar2(require_bin()); + var completion_1 = __importDefault(require_completion()); + var help_1 = __importDefault(require_help()); + var installTest = __importStar2(require_installTest()); + var recursive = __importStar2(require_recursive5()); + var root = __importStar2(require_root2()); + exports2.GLOBAL_OPTIONS = pick_1.default([ + "color", + "dir", + "filter", + "filter-prod", + "loglevel", + "help", + "parseable", + "prefix", + "reporter", + "stream", + "test-pattern", + "changed-files-ignore-pattern", + "use-stderr", + "workspace-packages", + "workspace-root" + ], config_1.types); + var commands = [ + plugin_commands_installation_1.add, + plugin_commands_audit_1.audit, + bin, + plugin_commands_script_runners_1.dlx, + plugin_commands_env_1.env, + plugin_commands_script_runners_1.exec, + plugin_commands_installation_1.fetch, + plugin_commands_import_1.importCommand, + plugin_commands_installation_1.install, + installTest, + plugin_commands_installation_1.link, + plugin_commands_listing_1.list, + plugin_commands_listing_1.ll, + plugin_commands_outdated_1.outdated, + plugin_commands_publishing_1.pack, + plugin_commands_installation_1.prune, + plugin_commands_publishing_1.publish, + plugin_commands_rebuild_1.rebuild, + recursive, + plugin_commands_installation_1.remove, + plugin_commands_script_runners_1.restart, + root, + plugin_commands_script_runners_1.run, + plugin_commands_server_1.server, + plugin_commands_setup_1.setup, + plugin_commands_store_1.store, + plugin_commands_script_runners_1.test, + plugin_commands_installation_1.unlink, + plugin_commands_installation_1.update, + plugin_commands_listing_1.why + ]; + var handlerByCommandName = {}; + var helpByCommandName = {}; + var cliOptionsTypesByCommandName = {}; + var aliasToFullName = new Map(); + var completionByCommandName = {}; + var shorthandsByCommandName = {}; + exports2.shorthandsByCommandName = shorthandsByCommandName; + var rcOptionsTypes = {}; + exports2.rcOptionsTypes = rcOptionsTypes; + for (let i = 0; i < commands.length; i++) { + const { cliOptionsTypes, commandNames, completion, handler, help, rcOptionsTypes: rcOptionsTypes2, shorthands } = commands[i]; + if (!commandNames || commandNames.length === 0) { + throw new Error(`The command at index ${i} doesn't have command names`); + } + for (const commandName of commandNames) { + handlerByCommandName[commandName] = handler; + helpByCommandName[commandName] = help; + cliOptionsTypesByCommandName[commandName] = cliOptionsTypes; + shorthandsByCommandName[commandName] = shorthands !== null && shorthands !== void 0 ? shorthands : {}; + if (completion != null) { + completionByCommandName[commandName] = completion; + } + Object.assign(rcOptionsTypes2, rcOptionsTypes2()); + } + if (commandNames.length > 1) { + const fullName = commandNames[0]; + for (let i2 = 1; i2 < commandNames.length; i2++) { + aliasToFullName.set(commandNames[i2], fullName); + } + } + } + handlerByCommandName.help = help_1.default(helpByCommandName); + handlerByCommandName.completion = completion_1.default({ + cliOptionsTypesByCommandName, + completionByCommandName, + initialCompletion, + shorthandsByCommandName, + universalOptionsTypes: exports2.GLOBAL_OPTIONS + }); + function initialCompletion() { + return Object.keys(handlerByCommandName).map((name) => ({ name })); + } + exports2.default = handlerByCommandName; + function getCliOptionsTypes(commandName) { + var _a; + return ((_a = cliOptionsTypesByCommandName[commandName]) === null || _a === void 0 ? void 0 : _a.call(cliOptionsTypesByCommandName)) || {}; + } + exports2.getCliOptionsTypes = getCliOptionsTypes; + function getCommandFullName(commandName) { + var _a; + return (_a = aliasToFullName.get(commandName)) !== null && _a !== void 0 ? _a : handlerByCommandName[commandName] ? commandName : null; + } + exports2.getCommandFullName = getCommandFullName; + } +}); + +// lib/formatError.js +var require_formatError = __commonJS({ + "lib/formatError.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.formatUnknownOptionsError = void 0; + var chalk_1 = __importDefault(require_source()); + function formatUnknownOptionsError(unknownOptions) { + let output = chalk_1.default.bgRed.black("\u2009ERROR\u2009"); + const unknownOptionsArray = Array.from(unknownOptions.keys()); + if (unknownOptionsArray.length > 1) { + return `${output} ${chalk_1.default.red(`Unknown options: ${unknownOptionsArray.map((unknownOption2) => `'${unknownOption2}'`).join(", ")}`)}`; + } + const unknownOption = unknownOptionsArray[0]; + output += ` ${chalk_1.default.red(`Unknown option: '${unknownOption}'`)}`; + const didYouMeanOptions = unknownOptions.get(unknownOption); + if (!(didYouMeanOptions === null || didYouMeanOptions === void 0 ? void 0 : didYouMeanOptions.length)) { + return output; + } + return `${output} +Did you mean '${didYouMeanOptions.join("', or '")}'? Use "--config.unknown=value" to force an unknown option.`; + } + exports2.formatUnknownOptionsError = formatUnknownOptionsError; + } +}); + +// ../../node_modules/.pnpm/@pnpm+file-reporter@1.0.1/node_modules/@pnpm/file-reporter/lib/index.js +var require_lib111 = __commonJS({ + "../../node_modules/.pnpm/@pnpm+file-reporter@1.0.1/node_modules/@pnpm/file-reporter/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs = require_graceful_fs(); + var path = require("path"); + var LOG_FILENAME = "node_modules/.pnpm-debug.log"; + function default_1(streamParser) { + const logs = []; + streamParser["on"]("data", function(logObj) { + if (isUsefulLog(logObj)) { + logs.push(logObj); + } + }); + process.on("exit", (code) => { + if (code === 0) { + try { + fs.unlinkSync(LOG_FILENAME); + } catch (err) { + } + return; + } + const prettyLogs = getPrettyLogs(); + const jsonLogs = JSON.stringify(prettyLogs, null, 2); + const dest = fs.existsSync(path.dirname(LOG_FILENAME)) ? LOG_FILENAME : path.basename(LOG_FILENAME); + fs.writeFileSync(dest, jsonLogs, "UTF8"); + }); + function getPrettyLogs() { + const prettyLogs = {}; + logs.forEach((logObj, i) => { + const key = `${i} ${logObj["level"]} ${logObj["name"]}`; + const msgobj = getMessageObj(logObj); + prettyLogs[key] = prettify(msgobj); + }); + return prettyLogs; + } + function getMessageObj(logobj) { + const msgobj = {}; + for (let key in logobj) { + if (["time", "hostname", "pid", "level", "name"].indexOf(key) !== -1) + continue; + msgobj[key] = logobj[key]; + } + return msgobj; + } + function prettify(obj) { + if (obj instanceof Error) { + let logMsg = obj.toString(); + if (obj.stack) { + logMsg += ` +${obj.stack}`; + } + return logMsg; + } + if (Object.keys(obj).length === 1 && obj["message"]) + return obj["message"]; + return obj; + } + } + exports2.default = default_1; + function isUsefulLog(logObj) { + return logObj["name"] !== "pnpm:progress" || logObj["status"] !== "downloading"; + } + } +}); + +// lib/logging/fileLogger.js +var require_fileLogger = __commonJS({ + "lib/logging/fileLogger.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var file_reporter_1 = __importDefault(require_lib111()); + var logger_1 = require_lib6(); + file_reporter_1.default(logger_1.streamParser); + } +}); + +// lib/reporter/silentReporter.js +var require_silentReporter = __commonJS({ + "lib/reporter/silentReporter.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = (streamParser) => { + streamParser.on("data", (obj) => { + var _a, _b, _c, _d; + if (obj.level !== "error") + return; + if ((_a = obj["err"].code) === null || _a === void 0 ? void 0 : _a.startsWith("ERR_PNPM_")) + return; + console.log((_c = (_b = obj["err"]) === null || _b === void 0 ? void 0 : _b.message) !== null && _c !== void 0 ? _c : obj["message"]); + if ((_d = obj["err"]) === null || _d === void 0 ? void 0 : _d.stack) { + console.log(` +${obj["err"].stack}`); + } + }); + }; + } +}); + +// lib/reporter/index.js +var require_reporter = __commonJS({ + "lib/reporter/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var default_reporter_1 = __importDefault(require_lib11()); + var logger_1 = require_lib6(); + var silentReporter_1 = __importDefault(require_silentReporter()); + exports2.default = (reporterType, opts) => { + switch (reporterType) { + case "default": + default_reporter_1.default({ + useStderr: opts.config.useStderr, + context: { + argv: opts.cmd ? [opts.cmd] : [], + config: opts.config + }, + reportingOptions: { + appendOnly: false, + logLevel: opts.config.loglevel, + streamLifecycleOutput: opts.config.stream, + throttleProgress: 200 + }, + streamParser: logger_1.streamParser + }); + return; + case "append-only": + default_reporter_1.default({ + useStderr: opts.config.useStderr, + context: { + argv: opts.cmd ? [opts.cmd] : [], + config: opts.config + }, + reportingOptions: { + appendOnly: true, + logLevel: opts.config.loglevel, + throttleProgress: 1e3 + }, + streamParser: logger_1.streamParser + }); + return; + case "ndjson": + logger_1.writeToConsole(); + return; + case "silent": + silentReporter_1.default(logger_1.streamParser); + } + }; + } +}); + +// lib/main.js +var require_main2 = __commonJS({ + "lib/main.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var loud_rejection_1 = __importDefault(require_loud_rejection()); + var cli_meta_1 = __importDefault(require_lib4()); + var cli_utils_1 = require_lib20(); + var core_loggers_1 = require_lib12(); + var filter_workspace_packages_1 = require_lib27(); + var find_workspace_packages_1 = __importDefault(require_lib22()); + var logger_1 = __importDefault(require_lib6()); + var plugin_commands_env_1 = require_lib41(); + var chalk_1 = __importDefault(require_source()); + var checkForUpdates_1 = __importDefault(require_checkForUpdates()); + var cmd_1 = __importStar2(require_cmd()); + var formatError_1 = require_formatError(); + require_fileLogger(); + var parseCliArgs_1 = __importDefault(require_parseCliArgs()); + var reporter_1 = __importDefault(require_reporter()); + var is_ci_1 = __importDefault(require_is_ci()); + var path_1 = __importDefault(require("path")); + var isEmpty_1 = __importDefault(require_isEmpty2()); + var strip_ansi_1 = __importDefault(require_strip_ansi()); + var which_1 = __importDefault(require_which()); + process.once("SIGINT", () => process.exit(0)).once("SIGTERM", () => process.exit(0)); + loud_rejection_1.default(); + var DEPRECATED_OPTIONS = new Set([ + "independent-leaves", + "lock", + "resolution-strategy" + ]); + delete process.env.PKG_EXECPATH; + async function run(inputArgv) { + var _a, _b; + let parsedCliArgs; + try { + parsedCliArgs = await parseCliArgs_1.default(inputArgv); + } catch (err) { + printError(err.message, err["hint"]); + process.exit(1); + } + const { argv: argv2, params: cliParams, options: cliOptions, cmd, fallbackCommandUsed, unknownOptions, workspaceDir } = parsedCliArgs; + if (cmd !== null && !cmd_1.default[cmd]) { + printError(`Unknown command '${cmd}'`, "For help, run: pnpm help"); + process.exit(1); + } + if (unknownOptions.size > 0 && !fallbackCommandUsed) { + const unknownOptionsArray = Array.from(unknownOptions.keys()); + if (unknownOptionsArray.every((option) => DEPRECATED_OPTIONS.has(option))) { + let deprecationMsg = `${chalk_1.default.bgYellow.black("\u2009WARN\u2009")}`; + if (unknownOptionsArray.length === 1) { + deprecationMsg += ` ${chalk_1.default.yellow(`Deprecated option: '${unknownOptionsArray[0]}'`)}`; + } else { + deprecationMsg += ` ${chalk_1.default.yellow(`Deprecated options: ${unknownOptionsArray.map((unknownOption) => `'${unknownOption}'`).join(", ")}`)}`; + } + console.log(deprecationMsg); + } else { + printError(formatError_1.formatUnknownOptionsError(unknownOptions), `For help, run: pnpm help${cmd ? ` ${cmd}` : ""}`); + process.exit(1); + } + } + process.env["npm_config_argv"] = JSON.stringify(argv2); + let config; + try { + const globalDirShouldAllowWrite = cmd !== "root"; + config = await cli_utils_1.getConfig(cliOptions, { + excludeReporter: false, + globalDirShouldAllowWrite, + rcOptionsTypes: cmd_1.rcOptionsTypes, + workspaceDir, + checkUnknownSetting: false + }); + config.forceSharedLockfile = typeof config.workspaceDir === "string" && config.sharedWorkspaceLockfile === true; + config.argv = argv2; + config.fallbackCommandUsed = fallbackCommandUsed; + } catch (err) { + const hint = err["hint"] ? err["hint"] : `For help, run: pnpm help${cmd ? ` ${cmd}` : ""}`; + printError(err.message, hint); + process.exit(1); + } + let write = process.stdout.write.bind(process.stdout); + if (config.color === "always") { + process.env["FORCE_COLOR"] = "1"; + } else if (config.color === "never") { + process.env["FORCE_COLOR"] = "0"; + write = (text) => process.stdout.write(strip_ansi_1.default(text)); + } + const reporterType = (() => { + if (config.loglevel === "silent") + return "silent"; + if (config.reporter) + return config.reporter; + if (is_ci_1.default || !process.stdout.isTTY) + return "append-only"; + return "default"; + })(); + reporter_1.default(reporterType, { + cmd, + config + }); + global["reporterInitialized"] = reporterType; + const selfUpdate = config.global && (cmd === "add" || cmd === "update") && cliParams.includes(cli_meta_1.default.name); + if (selfUpdate) { + await cmd_1.default.server(config, ["stop"]); + try { + config.bin = path_1.default.dirname(which_1.default.sync("pnpm")); + } catch (err) { + } + } + if (cmd === "install" && typeof workspaceDir === "string") { + cliOptions["recursive"] = true; + config.recursive = true; + if (!config.recursiveInstall && !config.filter && !config.filterProd) { + config.filter = ["{.}..."]; + } + } + if (cliOptions["recursive"]) { + const wsDir = workspaceDir !== null && workspaceDir !== void 0 ? workspaceDir : process.cwd(); + const allProjects = await find_workspace_packages_1.default(wsDir, { + engineStrict: config.engineStrict, + patterns: cliOptions["workspace-packages"] + }); + if (allProjects.length === 0) { + if (!config["parseable"]) { + console.log(`No projects found in "${wsDir}"`); + } + process.exit(0); + } + config.filter = (_a = config.filter) !== null && _a !== void 0 ? _a : []; + config.filterProd = (_b = config.filterProd) !== null && _b !== void 0 ? _b : []; + const filters = [ + ...config.filter.map((filter) => ({ filter, followProdDepsOnly: false })), + ...config.filterProd.map((filter) => ({ filter, followProdDepsOnly: true })) + ]; + const relativeWSDirPath = () => path_1.default.relative(process.cwd(), wsDir) || "."; + if (config.workspaceRoot) { + filters.push({ filter: `{${relativeWSDirPath()}}`, followProdDepsOnly: false }); + } else if (config.useBetaCli && (cmd === "run" || cmd === "exec" || cmd === "add" || cmd === "test")) { + filters.push({ filter: `!{${relativeWSDirPath()}}`, followProdDepsOnly: false }); + } + const filterResults = await filter_workspace_packages_1.filterPackages(allProjects, filters, { + linkWorkspacePackages: !!config.linkWorkspacePackages, + prefix: process.cwd(), + workspaceDir: wsDir, + testPattern: config.testPattern, + changedFilesIgnorePattern: config.changedFilesIgnorePattern, + useGlobDirFiltering: config.useBetaCli + }); + config.selectedProjectsGraph = filterResults.selectedProjectsGraph; + if (isEmpty_1.default(config.selectedProjectsGraph)) { + if (!config["parseable"]) { + console.log(`No projects matched the filters in "${wsDir}"`); + } + process.exit(0); + } + if (filterResults.unmatchedFilters.length !== 0 && !config["parseable"]) { + console.log(`No projects matched the filters "${filterResults.unmatchedFilters.join(", ")}" in "${wsDir}"`); + } + config.allProjects = allProjects; + config.workspaceDir = wsDir; + } + let { output, exitCode } = await (async () => { + await new Promise((resolve) => setTimeout(() => resolve(), 0)); + if (!is_ci_1.default && !selfUpdate && !config.offline && !config.preferOffline && !config.fallbackCommandUsed) { + checkForUpdates_1.default(config).catch(() => { + }); + } + if (config.force === true && !config.fallbackCommandUsed) { + logger_1.default.warn({ + message: "using --force I sure hope you know what you are doing", + prefix: config.dir + }); + } + core_loggers_1.scopeLogger.debug({ + ...!cliOptions["recursive"] ? { selected: 1 } : { + selected: Object.keys(config.selectedProjectsGraph).length, + total: config.allProjects.length + }, + ...workspaceDir ? { workspacePrefix: workspaceDir } : {} + }); + if (config.useNodeVersion != null) { + const nodePath = await plugin_commands_env_1.node.getNodeBinDir(config); + config.extraBinPaths.push(nodePath); + } + let result = cmd_1.default[cmd !== null && cmd !== void 0 ? cmd : "help"](config, cliParams); + if (result instanceof Promise) { + result = await result; + } + if (!result) { + return { output: null, exitCode: 0 }; + } + if (typeof result === "string") { + return { output: result, exitCode: 0 }; + } + return result; + })(); + if (output) { + if (!output.endsWith("\n")) { + output = `${output} +`; + } + write(output); + } + if (!cmd) { + process.exit(1); + } + if (exitCode) { + process.exit(exitCode); + } + } + exports2.default = run; + function printError(message2, hint) { + console.error(`${chalk_1.default.bgRed.black("\u2009ERROR\u2009")} ${chalk_1.default.red(message2)}`); + if (hint) { + console.log(hint); + } + } + } +}); + +// lib/runNpm.js +var require_runNpm = __commonJS({ + "lib/runNpm.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var cli_meta_1 = __importDefault(require_lib4()); + var config_1 = __importStar2(require_lib10()); + var run_npm_1 = __importDefault(require_lib104()); + var pick_1 = __importDefault(require_pick()); + async function run(args2) { + const { config } = await config_1.default({ + cliOptions: {}, + packageManager: cli_meta_1.default, + rcOptionsTypes: { + ...pick_1.default([ + "npm-path" + ], config_1.types) + } + }); + return run_npm_1.default(config.npmPath, args2); + } + exports2.default = run; + } +}); + +// lib/pnpm.js +"use strict"; +var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); +} : function(o, m, k, k2) { + if (k2 === void 0) + k2 = k; + o[k2] = m[k]; +}); +var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +} : function(o, v) { + o["default"] = v; +}); +var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) + __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; +}; +process.setMaxListeners(0); +var argv = process.argv.slice(2); +(async () => { + switch (argv[0]) { + case "-v": + case "--version": { + const { version } = (await Promise.resolve().then(() => __importStar(require_lib4()))).default; + console.log(version); + break; + } + case "install-completion": { + const { install: installCompletion } = await Promise.resolve().then(() => __importStar(require_lib5())); + await installCompletion({ name: "pnpm", completer: "pnpm", shell: argv[1] }); + return; + } + case "uninstall-completion": { + const { uninstall: uninstallCompletion } = await Promise.resolve().then(() => __importStar(require_lib5())); + await uninstallCompletion({ name: "pnpm" }); + return; + } + case "access": + case "adduser": + case "bugs": + case "c": + case "config": + case "deprecate": + case "dist-tag": + case "docs": + case "edit": + case "get": + case "info": + case "init": + case "login": + case "logout": + case "owner": + case "ping": + case "prefix": + case "profile": + case "repo": + case "s": + case "se": + case "search": + case "set": + case "star": + case "stars": + case "team": + case "token": + case "unpublish": + case "unstar": + case "v": + case "version": + case "view": + case "whoami": + case "xmas": + await passThruToNpm(); + break; + default: + await runPnpm(); + break; + } +})(); +async function runPnpm() { + const errorHandler = (await Promise.resolve().then(() => __importStar(require_err()))).default; + try { + const main = (await Promise.resolve().then(() => __importStar(require_main2()))).default; + await main(argv); + } catch (err) { + errorHandler(err); + } +} +async function passThruToNpm() { + const runNpm = (await Promise.resolve().then(() => __importStar(require_runNpm()))).default; + const { status } = await runNpm(argv); + process.exit(status); +} +/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version v4.2.8+1e68dce6 + */ +/*! + * depd + * Copyright(c) 2014 Douglas Christopher Wilson + * MIT Licensed + */ +/*! + * depd + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ +/*! + * depd + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + */ +/*! + * depd + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ +/*! + * fill-range + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Licensed under the MIT License. + */ +/*! + * humanize-ms - index.js + * Copyright(c) 2014 dead_horse + * MIT Licensed + */ +/*! + * is-extglob + * + * Copyright (c) 2014-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ +/*! + * is-glob + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ +/*! + * is-number + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Released under the MIT License. + */ +/*! + * is-windows + * + * Copyright © 2015-2018, Jon Schlinkert. + * Released under the MIT License. + */ +/*! + * normalize-path + * + * Copyright (c) 2014-2018, Jon Schlinkert. + * Released under the MIT License. + */ +/*! + * to-regex-range + * + * Copyright (c) 2015-present, Jon Schlinkert. + * Released under the MIT License. + */ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/*! queue-microtask. MIT License. Feross Aboukhadijeh */ +/*! run-parallel. MIT License. Feross Aboukhadijeh */ +/** + * @preserve + * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) + * + * @author Jens Taylor + * @see http://github.com/homebrewing/brauhaus-diff + * @author Gary Court + * @see http://github.com/garycourt/murmurhash-js + * @author Austin Appleby + * @see http://sites.google.com/site/murmurhash/ + */ diff --git a/src/install-pnpm/run.ts b/src/install-pnpm/run.ts index c3f5761..9feafba 100644 --- a/src/install-pnpm/run.ts +++ b/src/install-pnpm/run.ts @@ -1,5 +1,4 @@ import { addPath, exportVariable } from '@actions/core' -import fetch from '@pnpm/fetch' import { spawn } from 'child_process' import { remove, ensureFile, writeFile, readFile } from 'fs-extra' import path from 'path' @@ -17,15 +16,11 @@ export async function runSelfInstaller(inputs: Inputs): Promise { // prepare target pnpm const target = await readTarget(version) - const cp = spawn(execPath, ['-', 'install', target, '--no-lockfile'], { + const cp = spawn(execPath, [path.join(__dirname, 'pnpm.js'), 'install', target, '--no-lockfile'], { cwd: dest, stdio: ['pipe', 'inherit', 'inherit'], }) - const response = await fetch('https://get.pnpm.io/v6.16.js') - if (!response.body) throw new Error('Did not receive response body') - response.body.pipe(cp.stdin) - const exitCode = await new Promise((resolve, reject) => { cp.on('error', reject) cp.on('close', resolve)